summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:29:01 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:29:01 +0000
commitadc7f9a4ebdfe11d4cd6de9388b63dfe36450b39 (patch)
tree23eb7becc5360b2cbe16aa8d45529880067f3989
parent90f1536dd315cd265bfc7ef35058761a65a01734 (diff)
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_16
-rw-r--r--GL/glx/g_disptab.c70
-rw-r--r--GL/glx/g_disptab.h14
-rw-r--r--GL/glx/g_disptab_EXT.c272
-rw-r--r--GL/glx/g_disptab_EXT.h14
-rw-r--r--GL/glx/g_render.c42
-rw-r--r--GL/glx/g_renderswap.c64
-rw-r--r--GL/glx/g_single.c6
-rw-r--r--GL/glx/glxcmds.c298
-rw-r--r--GL/glx/glxcmdsswap.c44
-rw-r--r--GL/glx/glxcontext.h11
-rw-r--r--GL/glx/glxdrawable.h10
-rw-r--r--GL/glx/glxext.c6
-rw-r--r--GL/glx/glxext.h9
-rw-r--r--GL/glx/glximports.c13
-rw-r--r--GL/glx/glximports.h3
-rw-r--r--GL/glx/glxscreens.c93
-rw-r--r--GL/glx/glxserver.h4
-rw-r--r--GL/glx/glxutil.c72
-rw-r--r--GL/glx/glxutil.h6
-rw-r--r--GL/glx/impsize.h4
-rw-r--r--GL/glx/render2.c20
-rw-r--r--GL/glx/rensize.c132
-rw-r--r--GL/glx/rensizetab.c4287
-rw-r--r--GL/glx/singlesize.c218
-rw-r--r--XTrap/xtrapdi.c11
-rw-r--r--Xext/EVI.c29
-rw-r--r--Xext/EVIstruct.h15
-rw-r--r--Xext/appgroup.c181
-rw-r--r--Xext/bigreq.c19
-rw-r--r--Xext/cup.c59
-rw-r--r--Xext/dpms.c14
-rw-r--r--Xext/dpmsproc.h4
-rw-r--r--Xext/dpmsstubs.c6
-rw-r--r--Xext/fontcache.c12
-rw-r--r--Xext/mbuf.c38
-rw-r--r--Xext/mbufbf.c39
-rw-r--r--Xext/mitmisc.c15
-rw-r--r--Xext/panoramiX.c155
-rw-r--r--Xext/panoramiX.h3
-rw-r--r--Xext/panoramiXSwap.c25
-rw-r--r--Xext/panoramiXprocs.c98
-rw-r--r--Xext/sampleEVI.c9
-rw-r--r--Xext/saver.c165
-rw-r--r--Xext/security.c162
-rw-r--r--Xext/shape.c43
-rw-r--r--Xext/shm.c53
-rw-r--r--Xext/sleepuntil.c16
-rw-r--r--Xext/sleepuntil.h6
-rw-r--r--Xext/sync.c79
-rw-r--r--Xext/xcmisc.c16
-rw-r--r--Xext/xf86bigfont.c39
-rw-r--r--Xext/xprint.c45
-rw-r--r--Xext/xres.c15
-rw-r--r--Xext/xtest.c58
-rw-r--r--Xext/xtest1dd.c41
-rw-r--r--Xext/xtest1dd.h30
-rw-r--r--Xext/xtest1di.c30
-rw-r--r--Xext/xvdisp.c18
-rw-r--r--Xext/xvmain.c34
-rw-r--r--Xext/xvmc.c2
-rw-r--r--Xext/xvmcext.h4
-rw-r--r--Xi/allowev.h6
-rw-r--r--Xi/chgdctl.h8
-rw-r--r--Xi/chgfctl.h18
-rw-r--r--Xi/chgkbd.h8
-rw-r--r--Xi/chgkmap.h6
-rw-r--r--Xi/chgprop.h6
-rw-r--r--Xi/chgptr.h14
-rw-r--r--Xi/closedev.h10
-rw-r--r--Xi/devbell.h6
-rw-r--r--Xi/exevents.c77
-rw-r--r--Xi/extinit.c7
-rw-r--r--Xi/getbmap.h8
-rw-r--r--Xi/getdctl.h10
-rw-r--r--Xi/getfctl.h20
-rw-r--r--Xi/getfocus.h8
-rw-r--r--Xi/getkmap.h8
-rw-r--r--Xi/getmmap.h8
-rw-r--r--Xi/getprop.h10
-rw-r--r--Xi/getselev.h8
-rw-r--r--Xi/getvers.h8
-rw-r--r--Xi/grabdev.h10
-rw-r--r--Xi/grabdevb.h6
-rw-r--r--Xi/grabdevk.h6
-rw-r--r--Xi/gtmotion.h8
-rw-r--r--Xi/listdev.h22
-rw-r--r--Xi/opendev.h8
-rw-r--r--Xi/queryst.h8
-rw-r--r--Xi/selectev.h6
-rw-r--r--Xi/sendexev.h6
-rw-r--r--Xi/setbmap.h8
-rw-r--r--Xi/setdval.h8
-rw-r--r--Xi/setfocus.h6
-rw-r--r--Xi/setmmap.h8
-rw-r--r--Xi/setmode.h8
-rw-r--r--Xi/stubs.c8
-rw-r--r--Xi/ungrdev.h6
-rw-r--r--Xi/ungrdevb.h6
-rw-r--r--Xi/ungrdevk.h6
-rw-r--r--Xprint/Init.c58
-rw-r--r--Xprint/Oid.c4
-rw-r--r--Xprint/ValTree.c6
-rw-r--r--Xprint/attributes.c12
-rw-r--r--Xprint/ddxInit.c10
-rw-r--r--Xprint/pcl/Pcl.h4
-rw-r--r--Xprint/pcl/PclColor.c11
-rw-r--r--Xprint/pcl/PclFonts.c3
-rw-r--r--Xprint/pcl/PclMisc.c6
-rw-r--r--Xprint/pcl/PclPixel.c10
-rw-r--r--Xprint/pcl/PclPrint.c7
-rw-r--r--Xprint/pcl/PclSFonts.c5
-rw-r--r--Xprint/pcl/PclText.c5
-rw-r--r--Xprint/pcl/PclWindow.c4
-rw-r--r--Xprint/ps/Ps.h4
-rw-r--r--Xprint/ps/PsFonts.c4
-rw-r--r--Xprint/ps/PsGC.c5
-rw-r--r--Xprint/ps/PsInit.c8
-rw-r--r--Xprint/ps/PsText.c7
-rw-r--r--Xprint/ps/PsWindow.c4
-rw-r--r--Xprint/raster/Raster.c6
-rw-r--r--afb/afb.h192
-rw-r--r--afb/afbbitblt.c7
-rw-r--r--afb/afbclip.c5
-rw-r--r--afb/afbfillarc.c4
-rw-r--r--afb/afbfillrct.c9
-rw-r--r--afb/afbimggblt.c10
-rw-r--r--afb/afbplygblt.c10
-rw-r--r--afb/afbpolypnt.c3
-rw-r--r--afb/afbpushpxl.c5
-rw-r--r--afb/afbtile.c24
-rw-r--r--afb/afbwindow.c4
-rw-r--r--afb/afbzerarc.c4
-rw-r--r--cfb/cfb.h30
-rw-r--r--cfb/cfb8bit.h8
-rw-r--r--cfb/cfb8line.c14
-rw-r--r--cfb/cfbbitblt.c372
-rw-r--r--cfb/cfbblt.c23
-rw-r--r--cfb/cfbcppl.c68
-rw-r--r--cfb/cfbfillarc.c22
-rw-r--r--cfb/cfbfillsp.c9
-rw-r--r--cfb/cfbgetsp.c8
-rw-r--r--cfb/cfbglblt8.c34
-rw-r--r--cfb/cfbmap.h4
-rw-r--r--cfb/cfbmskbits.h6
-rw-r--r--cfb/cfbply1rct.c29
-rw-r--r--cfb/cfbpntwin.c6
-rw-r--r--cfb/cfbrrop.h14
-rw-r--r--cfb/cfbscrinit.c20
-rw-r--r--cfb/cfbsetsp.c12
-rw-r--r--cfb/cfbsolid.c4
-rw-r--r--cfb/cfbtegblt.c20
-rw-r--r--cfb/cfbtile32.c20
-rw-r--r--cfb/cfbtileodd.c34
-rw-r--r--cfb/cfbunmap.h3
-rw-r--r--cfb/cfbwindow.c5
-rw-r--r--cfb/cfbzerarc.c13
-rw-r--r--cfb24/cfbrrop24.h10
-rw-r--r--dbe/dbestruct.h25
-rw-r--r--dbe/midbe.h3
-rw-r--r--dix/colormap.c44
-rw-r--r--dix/cursor.c7
-rw-r--r--dix/devices.c31
-rw-r--r--dix/dispatch.c19
-rw-r--r--dix/dixfonts.c60
-rw-r--r--dix/dixutils.c36
-rw-r--r--dix/events.c163
-rw-r--r--dix/gc.c9
-rw-r--r--dix/globals.c5
-rw-r--r--dix/grabs.c51
-rw-r--r--dix/main.c43
-rw-r--r--dix/property.c14
-rw-r--r--dix/resource.c23
-rw-r--r--dix/swaprep.c8
-rw-r--r--dix/tables.c8
-rw-r--r--dix/window.c156
-rw-r--r--doc/Xserver.man.pre55
-rw-r--r--fb/fb.h21
-rw-r--r--fb/fbbits.h5
-rw-r--r--fb/fbcompose.c35
-rw-r--r--fb/fbcopy.c4
-rw-r--r--fb/fbline.c8
-rw-r--r--fb/fboverlay.c11
-rw-r--r--fb/fbwindow.c4
-rw-r--r--hw/darwin/bundle/Dutch.lproj/Localizable.stringsbin1420 -> 1426 bytes
-rw-r--r--hw/darwin/bundle/English.lproj/Localizable.strings8
-rw-r--r--hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib8
-rw-r--r--hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nibbin20327 -> 20640 bytes
-rw-r--r--hw/darwin/bundle/French.lproj/Localizable.stringsbin1486 -> 1492 bytes
-rw-r--r--hw/darwin/bundle/German.lproj/Localizable.stringsbin1452 -> 1458 bytes
-rw-r--r--hw/darwin/bundle/Japanese.lproj/Localizable.stringsbin1146 -> 1152 bytes
-rw-r--r--hw/darwin/bundle/Portuguese.lproj/Localizable.stringsbin1498 -> 1504 bytes
-rw-r--r--hw/darwin/bundle/Spanish.lproj/Localizable.stringsbin1474 -> 1480 bytes
-rw-r--r--hw/darwin/bundle/Swedish.lproj/Localizable.stringsbin1458 -> 1464 bytes
-rw-r--r--hw/darwin/bundle/ko.lproj/Localizable.stringsbin1326 -> 1332 bytes
-rw-r--r--hw/darwin/darwin.c174
-rw-r--r--hw/darwin/darwin.h78
-rw-r--r--hw/darwin/darwinClut8.h2
-rw-r--r--hw/darwin/darwinEvents.c15
-rw-r--r--hw/darwin/darwinKeyboard.c239
-rw-r--r--hw/darwin/quartz/Preferences.h49
-rw-r--r--hw/darwin/quartz/Preferences.m80
-rw-r--r--hw/darwin/quartz/XDarwin.pbproj/project.pbxproj802
-rw-r--r--hw/darwin/quartz/XDarwinStartup.c5
-rw-r--r--hw/darwin/quartz/XServer.h35
-rw-r--r--hw/darwin/quartz/XServer.m537
-rw-r--r--hw/darwin/quartz/pseudoramiX.c4
-rw-r--r--hw/darwin/quartz/pseudoramiX.h3
-rw-r--r--hw/darwin/quartz/quartz.c159
-rw-r--r--hw/darwin/quartz/quartz.h91
-rw-r--r--hw/darwin/quartz/quartzAudio.c6
-rw-r--r--hw/darwin/quartz/quartzCocoa.m11
-rw-r--r--hw/darwin/quartz/quartzCommon.h18
-rw-r--r--hw/darwin/quartz/quartzStartup.c94
-rw-r--r--hw/darwin/utils/dumpkeymap.c3
-rw-r--r--hw/vfb/InitInput.c38
-rw-r--r--hw/vfb/InitOutput.c152
-rw-r--r--hw/xfree86/common/atKeynames.h94
-rw-r--r--hw/xfree86/common/compiler.h61
-rw-r--r--hw/xfree86/common/fourcc.h33
-rw-r--r--hw/xfree86/common/modeline2c.pl37
-rw-r--r--hw/xfree86/common/scoasm.h29
-rw-r--r--hw/xfree86/common/xf86.h57
-rw-r--r--hw/xfree86/common/xf86Bus.c36
-rw-r--r--hw/xfree86/common/xf86Bus.h29
-rw-r--r--hw/xfree86/common/xf86Config.c477
-rw-r--r--hw/xfree86/common/xf86Config.h38
-rw-r--r--hw/xfree86/common/xf86Configure.c12
-rw-r--r--hw/xfree86/common/xf86Cursor.c38
-rw-r--r--hw/xfree86/common/xf86DGA.c33
-rw-r--r--hw/xfree86/common/xf86DPMS.c52
-rw-r--r--hw/xfree86/common/xf86Date.h30
-rw-r--r--hw/xfree86/common/xf86Debug.c35
-rw-r--r--hw/xfree86/common/xf86DefModes.c9
-rw-r--r--hw/xfree86/common/xf86DoProbe.c40
-rw-r--r--hw/xfree86/common/xf86DoScanPci.c57
-rw-r--r--hw/xfree86/common/xf86Events.c185
-rw-r--r--hw/xfree86/common/xf86Globals.c27
-rw-r--r--hw/xfree86/common/xf86Helper.c315
-rw-r--r--hw/xfree86/common/xf86InPriv.h29
-rw-r--r--hw/xfree86/common/xf86Init.c238
-rw-r--r--hw/xfree86/common/xf86Io.c34
-rw-r--r--hw/xfree86/common/xf86Kbd.c33
-rw-r--r--hw/xfree86/common/xf86KbdBSD.c39
-rw-r--r--hw/xfree86/common/xf86KbdLnx.c29
-rw-r--r--hw/xfree86/common/xf86Keymap.h30
-rw-r--r--hw/xfree86/common/xf86MiscExt.c105
-rw-r--r--hw/xfree86/common/xf86Mode.c357
-rw-r--r--hw/xfree86/common/xf86Module.h29
-rw-r--r--hw/xfree86/common/xf86Opt.h42
-rw-r--r--hw/xfree86/common/xf86Option.c181
-rw-r--r--hw/xfree86/common/xf86PM.c29
-rw-r--r--hw/xfree86/common/xf86PciInfo.h99
-rw-r--r--hw/xfree86/common/xf86Priv.h30
-rw-r--r--hw/xfree86/common/xf86Privstr.h60
-rw-r--r--hw/xfree86/common/xf86RandR.c23
-rw-r--r--hw/xfree86/common/xf86Resources.h29
-rw-r--r--hw/xfree86/common/xf86Version.h33
-rw-r--r--hw/xfree86/common/xf86VidMode.c43
-rw-r--r--hw/xfree86/common/xf86XKB.c29
-rw-r--r--hw/xfree86/common/xf86Xinput.c33
-rw-r--r--hw/xfree86/common/xf86Xinput.h29
-rw-r--r--hw/xfree86/common/xf86cmap.c53
-rw-r--r--hw/xfree86/common/xf86cmap.h46
-rw-r--r--hw/xfree86/common/xf86fbBus.c27
-rw-r--r--hw/xfree86/common/xf86fbman.c315
-rw-r--r--hw/xfree86/common/xf86fbman.h36
-rw-r--r--hw/xfree86/common/xf86isaBus.c29
-rw-r--r--hw/xfree86/common/xf86noBus.c27
-rw-r--r--hw/xfree86/common/xf86pciBus.c185
-rw-r--r--hw/xfree86/common/xf86pciBus.h33
-rw-r--r--hw/xfree86/common/xf86str.h81
-rw-r--r--hw/xfree86/common/xf86xv.c769
-rw-r--r--hw/xfree86/common/xf86xv.h99
-rw-r--r--hw/xfree86/common/xf86xvmc.c40
-rw-r--r--hw/xfree86/common/xf86xvmc.h32
-rw-r--r--hw/xfree86/common/xisb.c6
-rw-r--r--hw/xfree86/ddc/ddcProperty.c12
-rw-r--r--hw/xfree86/ddc/print_edid.c4
-rw-r--r--hw/xfree86/ddc/print_vdif.c2
-rw-r--r--hw/xfree86/ddc/vdif.h7
-rw-r--r--hw/xfree86/ddc/xf86DDC.c39
-rw-r--r--hw/xfree86/dixmods/extmod/dgaproc.h5
-rw-r--r--hw/xfree86/dixmods/extmod/modinit.c110
-rw-r--r--hw/xfree86/dixmods/extmod/xf86dga.c7
-rw-r--r--hw/xfree86/dixmods/extmod/xf86dga2.c12
-rw-r--r--hw/xfree86/dixmods/extmod/xf86misc.c93
-rw-r--r--hw/xfree86/dixmods/extmod/xf86miscproc.h4
-rw-r--r--hw/xfree86/dixmods/extmod/xf86vmode.c82
-rw-r--r--hw/xfree86/dixmods/ftmodule.c6
-rw-r--r--hw/xfree86/dixmods/glxmodule.c15
-rw-r--r--hw/xfree86/doc/README.DRI4
-rw-r--r--hw/xfree86/doc/README.fonts136
-rw-r--r--hw/xfree86/doc/changelogs/CHANGELOG1716
-rw-r--r--hw/xfree86/doc/devel/README.DRIcomp36
-rw-r--r--hw/xfree86/doc/sgml/DESIGN.sgml10
-rw-r--r--hw/xfree86/dri/dri.c4
-rw-r--r--hw/xfree86/dri/sarea.h84
-rw-r--r--hw/xfree86/dri/xf86dri.c4
-rw-r--r--hw/xfree86/dummylib/dummylib.h4
-rw-r--r--hw/xfree86/dummylib/xf86drvmsg.c5
-rw-r--r--hw/xfree86/dummylib/xf86drvmsgverb.c5
-rw-r--r--hw/xfree86/dummylib/xf86errorf.c7
-rw-r--r--hw/xfree86/dummylib/xf86errorfverb.c5
-rw-r--r--hw/xfree86/dummylib/xf86msg.c5
-rw-r--r--hw/xfree86/dummylib/xf86msgverb.c5
-rw-r--r--hw/xfree86/fbdevhw/fbdevhw.c13
-rw-r--r--hw/xfree86/fbdevhw/fbdevhw.h4
-rw-r--r--hw/xfree86/fbdevhw/fbdevhwstub.c4
-rw-r--r--hw/xfree86/i2c/xf86i2c.c35
-rw-r--r--hw/xfree86/i2c/xf86i2c.h6
-rw-r--r--hw/xfree86/int10/generic.c15
-rw-r--r--hw/xfree86/int10/helper_exec.c21
-rw-r--r--hw/xfree86/int10/xf86int10.c2
-rw-r--r--hw/xfree86/loader/aout.h133
-rw-r--r--hw/xfree86/loader/aoutloader.c422
-rw-r--r--hw/xfree86/loader/aoutloader.h4
-rw-r--r--hw/xfree86/loader/ar.h62
-rw-r--r--hw/xfree86/loader/coff.h181
-rw-r--r--hw/xfree86/loader/coffloader.c1459
-rw-r--r--hw/xfree86/loader/coffloader.h4
-rw-r--r--hw/xfree86/loader/dixsym.c585
-rw-r--r--hw/xfree86/loader/dlloader.c21
-rw-r--r--hw/xfree86/loader/elf.h313
-rw-r--r--hw/xfree86/loader/elfloader.c3117
-rw-r--r--hw/xfree86/loader/elfloader.h4
-rw-r--r--hw/xfree86/loader/extsym.c39
-rw-r--r--hw/xfree86/loader/fontsym.c137
-rw-r--r--hw/xfree86/loader/hash.c321
-rw-r--r--hw/xfree86/loader/loader.c1001
-rw-r--r--hw/xfree86/loader/loader.h177
-rw-r--r--hw/xfree86/loader/loaderProcs.h75
-rw-r--r--hw/xfree86/loader/loadext.c558
-rw-r--r--hw/xfree86/loader/loadfont.c84
-rw-r--r--hw/xfree86/loader/loadmod.c1904
-rw-r--r--hw/xfree86/loader/misym.c281
-rw-r--r--hw/xfree86/loader/os.c39
-rw-r--r--hw/xfree86/loader/sym.h8
-rw-r--r--hw/xfree86/loader/xf86sym.c1723
-rw-r--r--hw/xfree86/os-support/assyntax.h29
-rw-r--r--hw/xfree86/os-support/bsd/alpha_video.c20
-rw-r--r--hw/xfree86/os-support/bsd/arm_video.c26
-rw-r--r--hw/xfree86/os-support/bsd/bsdResource.c4
-rw-r--r--hw/xfree86/os-support/bsd/bsd_axp.c6
-rw-r--r--hw/xfree86/os-support/bsd/bsd_init.c46
-rw-r--r--hw/xfree86/os-support/bsd/bsd_kbd.c8
-rw-r--r--hw/xfree86/os-support/bsd/bsd_mouse.c144
-rw-r--r--hw/xfree86/os-support/bsd/i386_video.c42
-rw-r--r--hw/xfree86/os-support/bsd/ppc_video.c17
-rw-r--r--hw/xfree86/os-support/bsd/sparc64_video.c9
-rw-r--r--hw/xfree86/os-support/bus/460gxPCI.c21
-rw-r--r--hw/xfree86/os-support/bus/Pci.c126
-rw-r--r--hw/xfree86/os-support/bus/Pci.h56
-rw-r--r--hw/xfree86/os-support/bus/Sbus.c23
-rw-r--r--hw/xfree86/os-support/bus/e8870PCI.c4
-rw-r--r--hw/xfree86/os-support/bus/freebsdPci.c4
-rw-r--r--hw/xfree86/os-support/bus/ix86Pci.c80
-rw-r--r--hw/xfree86/os-support/bus/netbsdPci.c13
-rw-r--r--hw/xfree86/os-support/bus/sparcPci.c8
-rw-r--r--hw/xfree86/os-support/bus/xf86Pci.h36
-rw-r--r--hw/xfree86/os-support/bus/xf86Sbus.h8
-rw-r--r--hw/xfree86/os-support/bus/zx1PCI.c39
-rw-r--r--hw/xfree86/os-support/int10Defines.h28
-rw-r--r--hw/xfree86/os-support/linux/int10/linux.c16
-rw-r--r--hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c4
-rw-r--r--hw/xfree86/os-support/linux/lnx_agp.c14
-rw-r--r--hw/xfree86/os-support/linux/lnx_io.c8
-rw-r--r--hw/xfree86/os-support/linux/lnx_kbd.c18
-rw-r--r--hw/xfree86/os-support/linux/lnx_mouse.c175
-rw-r--r--hw/xfree86/os-support/linux/lnx_video.c55
-rw-r--r--hw/xfree86/os-support/misc/Delay.c5
-rw-r--r--hw/xfree86/os-support/misc/SlowBcopy.c5
-rw-r--r--hw/xfree86/os-support/sco/VTsw_sco.c5
-rw-r--r--hw/xfree86/os-support/sco/sco_video.c9
-rw-r--r--hw/xfree86/os-support/shared/agp_noop.c33
-rw-r--r--hw/xfree86/os-support/shared/at_scancode.c56
-rw-r--r--hw/xfree86/os-support/shared/kbd.c28
-rw-r--r--hw/xfree86/os-support/shared/kmod_noop.c27
-rw-r--r--hw/xfree86/os-support/shared/libc_wrapper.c53
-rw-r--r--hw/xfree86/os-support/shared/pm_noop.c28
-rw-r--r--hw/xfree86/os-support/shared/posix_tty.c9
-rw-r--r--hw/xfree86/os-support/shared/sigio.c31
-rw-r--r--hw/xfree86/os-support/shared/sigiostubs.c31
-rw-r--r--hw/xfree86/os-support/shared/stdPci.c31
-rw-r--r--hw/xfree86/os-support/shared/stdResource.c34
-rw-r--r--hw/xfree86/os-support/shared/vidmem.c30
-rw-r--r--hw/xfree86/os-support/shared/xf86Axp.c28
-rw-r--r--hw/xfree86/os-support/solaris/sun_bios.c6
-rw-r--r--hw/xfree86/os-support/solaris/sun_kbd.c7
-rw-r--r--hw/xfree86/os-support/solaris/sun_kbdEv.c256
-rw-r--r--hw/xfree86/os-support/sysv/sysv_video.c11
-rw-r--r--hw/xfree86/os-support/xf86OSKbd.h49
-rw-r--r--hw/xfree86/os-support/xf86OSmouse.h124
-rw-r--r--hw/xfree86/os-support/xf86OSpriv.h28
-rw-r--r--hw/xfree86/os-support/xf86_OSlib.h31
-rw-r--r--hw/xfree86/os-support/xf86_OSproc.h5
-rw-r--r--hw/xfree86/os-support/xf86_ansic.h7
-rw-r--r--hw/xfree86/os-support/xf86_libc.h44
-rw-r--r--hw/xfree86/parser/Configint.h29
-rw-r--r--hw/xfree86/parser/Device.c29
-rw-r--r--hw/xfree86/parser/Files.c29
-rw-r--r--hw/xfree86/parser/Flags.c29
-rw-r--r--hw/xfree86/parser/Input.c29
-rw-r--r--hw/xfree86/parser/Keyboard.c35
-rw-r--r--hw/xfree86/parser/Layout.c29
-rw-r--r--hw/xfree86/parser/Module.c29
-rw-r--r--hw/xfree86/parser/Monitor.c29
-rw-r--r--hw/xfree86/parser/Pointer.c29
-rw-r--r--hw/xfree86/parser/Screen.c65
-rw-r--r--hw/xfree86/parser/Vendor.c29
-rw-r--r--hw/xfree86/parser/Video.c28
-rw-r--r--hw/xfree86/parser/configProcs.h28
-rw-r--r--hw/xfree86/parser/read.c29
-rw-r--r--hw/xfree86/parser/scan.c281
-rw-r--r--hw/xfree86/parser/write.c29
-rw-r--r--hw/xfree86/parser/xf86Optrec.h29
-rw-r--r--hw/xfree86/parser/xf86Parser.h31
-rw-r--r--hw/xfree86/parser/xf86tokens.h29
-rw-r--r--hw/xfree86/ramdac/BT.c4
-rw-r--r--hw/xfree86/ramdac/IBM.c4
-rw-r--r--hw/xfree86/ramdac/TI.c4
-rw-r--r--hw/xfree86/ramdac/xf86HWCurs.c9
-rw-r--r--hw/xfree86/ramdac/xf86RamDac.c14
-rw-r--r--hw/xfree86/scanpci/extrapci.ids15
-rw-r--r--hw/xfree86/scanpci/pci.ids239
-rw-r--r--hw/xfree86/scanpci/pciid2c.pl27
-rw-r--r--hw/xfree86/scanpci/xf86PciData.h29
-rw-r--r--hw/xfree86/scanpci/xf86PciStdIds.h1819
-rw-r--r--hw/xfree86/scanpci/xf86PciStr.h30
-rw-r--r--hw/xfree86/scanpci/xf86ScanPci.c34
-rw-r--r--hw/xfree86/scanpci/xf86ScanPci.h30
-rw-r--r--hw/xfree86/shadowfb/shadow.c26
-rw-r--r--hw/xfree86/utils/kbd_mode/sun-kbd_mode.c10
-rw-r--r--hw/xfree86/utils/pcitweak/pcitweak.c31
-rw-r--r--hw/xfree86/utils/pcitweak/pcitweak.man.pre4
-rw-r--r--hw/xfree86/utils/xorgcfg/card-cfg.c6
-rw-r--r--hw/xfree86/utils/xorgcfg/config.c10
-rw-r--r--hw/xfree86/utils/xorgcfg/config.h23
-rw-r--r--hw/xfree86/utils/xorgcfg/expert.c28
-rw-r--r--hw/xfree86/utils/xorgcfg/help.c12
-rw-r--r--hw/xfree86/utils/xorgcfg/loadmod.c30
-rw-r--r--hw/xfree86/utils/xorgcfg/monitor-cfg.c10
-rw-r--r--hw/xfree86/utils/xorgcfg/mouse-cfg.c11
-rw-r--r--hw/xfree86/utils/xorgcfg/screen-cfg.c6
-rw-r--r--hw/xfree86/utils/xorgcfg/stubs.c7
-rw-r--r--hw/xfree86/utils/xorgcfg/text-mode.c34
-rw-r--r--hw/xfree86/utils/xorgcfg/vidmode.c22
-rw-r--r--hw/xfree86/utils/xorgcfg/xf86config.c5
-rw-r--r--hw/xfree86/vbe/vbe.c17
-rw-r--r--hw/xfree86/vbe/vbe.h16
-rw-r--r--hw/xfree86/vbe/vbeModes.c12
-rw-r--r--hw/xfree86/vgahw/vgaHW.c34
-rw-r--r--hw/xfree86/x86emu/fpu.c47
-rw-r--r--hw/xfree86/x86emu/ops.c12
-rw-r--r--hw/xfree86/x86emu/ops2.c4
-rw-r--r--hw/xfree86/x86emu/x86emu/fpu_regs.h5
-rw-r--r--hw/xfree86/x86emu/x86emu/regs.h6
-rw-r--r--hw/xfree86/x86emu/x86emu/types.h7
-rw-r--r--hw/xfree86/xaa/xaaBitBlt.c4
-rw-r--r--hw/xfree86/xaa/xaaCpyPlane.c4
-rw-r--r--hw/xfree86/xaa/xaaCpyWin.c4
-rw-r--r--hw/xfree86/xaa/xaaFillPoly.c8
-rw-r--r--hw/xfree86/xaa/xaaFillRect.c6
-rw-r--r--hw/xfree86/xaa/xaaImage.c5
-rw-r--r--hw/xfree86/xaa/xaaNonTEText.c2
-rw-r--r--hw/xfree86/xaa/xaaOverlay.c4
-rw-r--r--hw/xfree86/xaa/xaaOverlayDF.c6
-rw-r--r--hw/xfree86/xaa/xaaPCache.c14
-rw-r--r--hw/xfree86/xaa/xaaPict.c12
-rw-r--r--hw/xfree86/xaa/xaaStateChange.c5
-rw-r--r--hw/xfree86/xaa/xaaStipple.c66
-rw-r--r--hw/xfree86/xaa/xaaWideLine.c4
-rw-r--r--hw/xfree86/xaa/xaalocal.h4
-rw-r--r--hw/xfree86/xf4bpp/emulTile.c4
-rw-r--r--hw/xfree86/xf4bpp/mfbfillarc.c6
-rw-r--r--hw/xfree86/xf4bpp/mfbimggblt.c8
-rw-r--r--hw/xfree86/xf4bpp/mfbline.c18
-rw-r--r--hw/xfree86/xf4bpp/ppcCpArea.c34
-rw-r--r--hw/xfree86/xf4bpp/ppcFillRct.c10
-rw-r--r--hw/xfree86/xf4bpp/ppcGCstr.h6
-rw-r--r--hw/xfree86/xf4bpp/ppcIO.c4
-rw-r--r--hw/xfree86/xf4bpp/ppcPixFS.c22
-rw-r--r--hw/xfree86/xf4bpp/ppcPntWin.c6
-rw-r--r--hw/xfree86/xf4bpp/ppcWinFS.c22
-rw-r--r--hw/xfree86/xf4bpp/vgaBitBlt.c15
-rw-r--r--hw/xfree86/xf4bpp/vgaImages.c11
-rw-r--r--hw/xfree86/xf4bpp/vgaSolid.c8
-rw-r--r--hw/xfree86/xf4bpp/vgaStipple.c5
-rw-r--r--hw/xfree86/xf4bpp/xf4bpp.h154
-rw-r--r--hw/xfree86/xf8_16bpp/cfbwindow.c6
-rw-r--r--hw/xfree86/xf8_32bpp/cfb8_32.h14
-rw-r--r--hw/xfree86/xf8_32bpp/cfbbstore.c6
-rw-r--r--hw/xfree86/xf8_32bpp/cfbcpyarea.c24
-rw-r--r--hw/xfree86/xf8_32bpp/cfbgcunder.c9
-rw-r--r--hw/xfree86/xf8_32bpp/cfbimage.c4
-rw-r--r--hw/xfree86/xf8_32bpp/cfbscrinit.c20
-rw-r--r--hw/xfree86/xf8_32bpp/cfbwindow.c8
-rw-r--r--hw/xfree86/xf8_32wid/cfbwindow.c8
-rw-r--r--hw/xnest/Args.c8
-rw-r--r--hw/xnest/Args.h2
-rw-r--r--hw/xnest/Color.c72
-rw-r--r--hw/xnest/Color.h26
-rw-r--r--hw/xnest/Cursor.c42
-rw-r--r--hw/xnest/Display.c11
-rw-r--r--hw/xnest/Display.h6
-rw-r--r--hw/xnest/Events.c31
-rw-r--r--hw/xnest/Events.h6
-rw-r--r--hw/xnest/Font.c14
-rw-r--r--hw/xnest/GC.c47
-rw-r--r--hw/xnest/GCOps.c253
-rw-r--r--hw/xnest/GCOps.h73
-rw-r--r--hw/xnest/GetTime.c4
-rw-r--r--hw/xnest/Handlers.c13
-rw-r--r--hw/xnest/Handlers.h6
-rw-r--r--hw/xnest/Init.c27
-rw-r--r--hw/xnest/Keyboard.c41
-rw-r--r--hw/xnest/Keyboard.h7
-rw-r--r--hw/xnest/Pixmap.c19
-rw-r--r--hw/xnest/Pointer.c16
-rw-r--r--hw/xnest/Pointer.h5
-rw-r--r--hw/xnest/Screen.c111
-rw-r--r--hw/xnest/Screen.h7
-rw-r--r--hw/xnest/TestExt.c23
-rw-r--r--hw/xnest/Visual.c15
-rw-r--r--hw/xnest/Visual.h7
-rw-r--r--hw/xnest/Window.c84
-rw-r--r--hw/xnest/XNCursor.h18
-rw-r--r--hw/xnest/XNFont.h5
-rw-r--r--hw/xnest/XNGC.h19
-rw-r--r--hw/xnest/XNPixmap.h9
-rw-r--r--hw/xnest/XNWindow.h32
-rw-r--r--hw/xnest/Xnest.man.pre4
-rw-r--r--hw/xnest/os2Stub.c9
-rw-r--r--hw/xwin/InitInput.c31
-rw-r--r--hw/xwin/InitOutput.c137
-rw-r--r--hw/xwin/XWin.man4
-rw-r--r--hw/xwin/XWin.rc31
-rw-r--r--hw/xwin/win.h124
-rw-r--r--hw/xwin/winblock.c8
-rw-r--r--hw/xwin/winclipboard.h4
-rw-r--r--hw/xwin/winclipboardinit.c2
-rw-r--r--hw/xwin/winclipboardtextconv.c2
-rw-r--r--hw/xwin/winclipboardthread.c55
-rw-r--r--hw/xwin/winclipboardunicode.c2
-rw-r--r--hw/xwin/winclipboardwndproc.c2
-rw-r--r--hw/xwin/winclipboardxevents.c83
-rw-r--r--hw/xwin/winconfig.c101
-rw-r--r--hw/xwin/wincreatewnd.c41
-rw-r--r--hw/xwin/wincursor.c17
-rw-r--r--hw/xwin/winengine.c9
-rw-r--r--hw/xwin/winerror.c12
-rw-r--r--hw/xwin/winfillsp.c1070
-rw-r--r--hw/xwin/winfont.c6
-rw-r--r--hw/xwin/wingc.c273
-rw-r--r--hw/xwin/wingetsp.c126
-rw-r--r--hw/xwin/winkeybd.c24
-rw-r--r--hw/xwin/winmsg.c33
-rw-r--r--hw/xwin/winmsg.h27
-rw-r--r--hw/xwin/winmultiwindowwindow.c1272
-rw-r--r--hw/xwin/winmultiwindowwm.c458
-rw-r--r--hw/xwin/winnativegdi.c30
-rw-r--r--hw/xwin/winpfbdd.c20
-rw-r--r--hw/xwin/winpixmap.c8
-rw-r--r--hw/xwin/winpolyline.c16
-rw-r--r--hw/xwin/winscrinit.c14
-rw-r--r--hw/xwin/winsetsp.c363
-rw-r--r--hw/xwin/winshaddd.c15
-rw-r--r--hw/xwin/winshadddnl.c38
-rw-r--r--hw/xwin/winshadgdi.c26
-rw-r--r--hw/xwin/winwakeup.c10
-rw-r--r--hw/xwin/winwindow.c118
-rw-r--r--hw/xwin/winwindow.h59
-rw-r--r--hw/xwin/winwndproc.c253
-rw-r--r--ilbm/ilbm.h172
-rw-r--r--ilbm/ilbmbitblt.c6
-rw-r--r--include/XIstubs.h43
-rw-r--r--include/bstorestr.h29
-rw-r--r--include/closestr.h6
-rw-r--r--include/colormap.h87
-rw-r--r--include/cursor.h64
-rw-r--r--include/dix.h509
-rw-r--r--include/dixevents.h162
-rw-r--r--include/dixgrabs.h42
-rw-r--r--include/dixstruct.h90
-rw-r--r--include/exevents.h186
-rw-r--r--include/extension.h31
-rw-r--r--include/extinit.h48
-rw-r--r--include/extnsionst.h87
-rw-r--r--include/gc.h92
-rw-r--r--include/gcstruct.h139
-rw-r--r--include/input.h263
-rw-r--r--include/inputstr.h12
-rw-r--r--include/misc.h23
-rw-r--r--include/miscstruct.h19
-rw-r--r--include/opaque.h5
-rw-r--r--include/os.h673
-rw-r--r--include/pixmap.h27
-rw-r--r--include/pixmapstr.h3
-rw-r--r--include/property.h17
-rw-r--r--include/regionstr.h210
-rw-r--r--include/resource.h129
-rw-r--r--include/screenint.h102
-rw-r--r--include/scrnintstr.h453
-rw-r--r--include/servermd.h39
-rw-r--r--include/site.h10
-rw-r--r--include/swaprep.h438
-rw-r--r--include/swapreq.h38
-rw-r--r--include/window.h181
-rw-r--r--include/windowstr.h7
-rw-r--r--iplan2p4/ipl.h245
-rw-r--r--iplan2p4/iplbitblt.c6
-rw-r--r--iplan2p4/iplwindow.c4
-rw-r--r--mfb/mfb.h196
-rw-r--r--mfb/mfbbitblt.c43
-rw-r--r--mfb/mfbclip.c4
-rw-r--r--mfb/mfbfillarc.c22
-rw-r--r--mfb/mfbgc.c60
-rw-r--r--mfb/mfbimggblt.c6
-rw-r--r--mfb/mfbplygblt.c6
-rw-r--r--mfb/mfbtile.c9
-rw-r--r--mfb/mfbwindow.c3
-rw-r--r--mfb/mfbzerarc.c12
-rw-r--r--mi/miarc.c5
-rw-r--r--mi/mibank.c10
-rw-r--r--mi/mibstore.c10
-rw-r--r--mi/micoord.h6
-rw-r--r--mi/midash.c4
-rw-r--r--mi/midispcur.c31
-rw-r--r--mi/miexpose.c6
-rw-r--r--mi/mifillarc.c4
-rw-r--r--mi/mioverlay.c37
-rw-r--r--mi/mipoly.c3
-rw-r--r--mi/mipolyrect.c4
-rw-r--r--mi/mipolyseg.c4
-rw-r--r--mi/mipolyutil.c4
-rw-r--r--mi/mipushpxl.c4
-rw-r--r--mi/miregion.c16
-rw-r--r--mi/miscrinit.c3
-rw-r--r--mi/mistruct.h4
-rw-r--r--mi/mivalidate.h2
-rw-r--r--mi/mivaltree.c30
-rw-r--r--mi/miwideline.c4
-rw-r--r--mi/miwindow.c10
-rw-r--r--mi/mizerarc.c4
-rw-r--r--miext/layer/layerinit.c4
-rw-r--r--miext/layer/layerpict.c2
-rw-r--r--miext/layer/layerstr.h9
-rw-r--r--miext/layer/layerwin.c10
-rw-r--r--miext/shadow/shadow.c28
-rw-r--r--os/WaitFor.c343
-rw-r--r--os/access.c325
-rw-r--r--os/auth.c26
-rw-r--r--os/connection.c242
-rw-r--r--os/io.c96
-rw-r--r--os/lbxio.c80
-rw-r--r--os/oscolor.c39
-rw-r--r--os/osdep.h4
-rw-r--r--os/osinit.c16
-rw-r--r--os/rpcauth.c31
-rw-r--r--os/utils.c398
-rw-r--r--os/xalloc.c8
-rw-r--r--os/xdmauth.c81
-rw-r--r--os/xdmcp.c611
-rw-r--r--randr/randr.c23
-rw-r--r--record/record.c99
-rw-r--r--record/set.c4
-rw-r--r--record/set.h13
-rw-r--r--render/animcur.c4
-rw-r--r--render/mipict.c40
-rw-r--r--render/picture.h8
-rw-r--r--render/render.c375
-rw-r--r--xkb/XKBAlloc.c92
-rw-r--r--xkb/XKBGAlloc.c365
-rw-r--r--xkb/XKBMAlloc.c92
-rw-r--r--xkb/XKBMisc.c98
-rw-r--r--xkb/ddxBeep.c20
-rw-r--r--xkb/ddxConfig.c16
-rw-r--r--xkb/ddxCtrls.c20
-rw-r--r--xkb/ddxDevBtn.c9
-rw-r--r--xkb/ddxFakeBtn.c7
-rw-r--r--xkb/ddxFakeMtn.c23
-rw-r--r--xkb/ddxInit.c6
-rw-r--r--xkb/ddxKeyClick.c8
-rw-r--r--xkb/ddxKillSrv.c9
-rw-r--r--xkb/ddxLEDs.c14
-rw-r--r--xkb/ddxList.c28
-rw-r--r--xkb/ddxLoad.c57
-rw-r--r--xkb/ddxPrivate.c24
-rw-r--r--xkb/ddxVT.c9
-rw-r--r--xkb/maprules.c218
-rw-r--r--xkb/xkb.c747
-rw-r--r--xkb/xkbAccessX.c108
-rw-r--r--xkb/xkbActions.c191
-rw-r--r--xkb/xkbDflts.h13
-rw-r--r--xkb/xkbEvents.c126
-rw-r--r--xkb/xkbInit.c146
-rw-r--r--xkb/xkbLEDs.c159
-rw-r--r--xkb/xkbPrKeyEv.c16
-rw-r--r--xkb/xkbPrOtherEv.c10
-rw-r--r--xkb/xkbSwap.c171
-rw-r--r--xkb/xkbUtils.c201
-rw-r--r--xkb/xkbconfig.c148
-rw-r--r--xkb/xkbfmisc.c95
-rw-r--r--xkb/xkbout.c154
-rw-r--r--xkb/xkbtext.c267
-rw-r--r--xkb/xkmread.c173
705 files changed, 30330 insertions, 26603 deletions
diff --git a/GL/glx/g_disptab.c b/GL/glx/g_disptab.c
index ee187330d..da05fe290 100644
--- a/GL/glx/g_disptab.c
+++ b/GL/glx/g_disptab.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.c,v 1.3 2001/03/21 16:29:35 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.c,v 1.4 2003/09/28 20:15:41 alanh Exp $ */
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
/*
** License Applicability. Except to the extent portions of this file are
@@ -32,7 +32,7 @@
#include "glxserver.h"
#include "glxext.h"
#include "g_disptab.h"
-__GLXdispatchSingleProcPtr __glXSingleTable[] = {
+__GLXdispatchSingleProcPtr __glXSingleTable[__GLX_SINGLE_TABLE_SIZE] = {
__glXNoSuchSingleOpcode,
__glXRender,
__glXRenderLarge,
@@ -54,12 +54,12 @@ __GLXdispatchSingleProcPtr __glXSingleTable[] = {
__glXQueryExtensionsString,
__glXQueryServerString,
__glXClientInfo,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode, /* glXGetFBConfigs */
+ __glXNoSuchSingleOpcode, /* glXCreatePixmap */
+ __glXNoSuchSingleOpcode, /* glXDestroyPixmap */
+ __glXNoSuchSingleOpcode, /* glXCreateNewContext */
+ __glXNoSuchSingleOpcode, /* glXQueryContext */
+ __glXMakeContextCurrent,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
@@ -409,10 +409,27 @@ __GLXdispatchRenderProcPtr __glXRenderTable[] = {
__glXDisp_MultiTexCoord4dvARB,
__glXDisp_MultiTexCoord4fvARB,
__glXDisp_MultiTexCoord4ivARB,
- __glXDisp_MultiTexCoord4svARB,
+ __glXDisp_MultiTexCoord4svARB, /* 213 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 220 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXDisp_WindowPos3fARB /* 230 */
};
-__GLXdispatchSingleProcPtr __glXSwapSingleTable[] = {
+__GLXdispatchSingleProcPtr __glXSwapSingleTable[__GLX_SINGLE_TABLE_SIZE] = {
__glXNoSuchSingleOpcode,
__glXSwapRender,
__glXSwapRenderLarge,
@@ -434,12 +451,12 @@ __GLXdispatchSingleProcPtr __glXSwapSingleTable[] = {
__glXSwapQueryExtensionsString,
__glXSwapQueryServerString,
__glXSwapClientInfo,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode, /* glXGetFBConfigs */
+ __glXNoSuchSingleOpcode, /* glXCreatePixmap */
+ __glXNoSuchSingleOpcode, /* glXDestroyPixmap */
+ __glXNoSuchSingleOpcode, /* glXCreateNewContext */
+ __glXNoSuchSingleOpcode, /* glXQueryContext */
+ __glXSwapMakeContextCurrent,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
@@ -575,7 +592,7 @@ __GLXdispatchSingleProcPtr __glXSwapSingleTable[] = {
__glXDispSwap_GetMinmaxParameteriv,
};
-__GLXdispatchRenderProcPtr __glXSwapRenderTable[] = {
+__GLXdispatchRenderProcPtr __glXSwapRenderTable[__GLX_RENDER_TABLE_SIZE] = {
__glXNoSuchRenderOpcode,
__glXDispSwap_CallList,
__glXDispSwap_CallLists,
@@ -789,5 +806,22 @@ __GLXdispatchRenderProcPtr __glXSwapRenderTable[] = {
__glXDispSwap_MultiTexCoord4dvARB,
__glXDispSwap_MultiTexCoord4fvARB,
__glXDispSwap_MultiTexCoord4ivARB,
- __glXDispSwap_MultiTexCoord4svARB,
+ __glXDispSwap_MultiTexCoord4svARB, /* 213 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 220 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXDispSwap_WindowPos3fARB /* 230 */
};
diff --git a/GL/glx/g_disptab.h b/GL/glx/g_disptab.h
index a24f7a12a..ceeab5482 100644
--- a/GL/glx/g_disptab.h
+++ b/GL/glx/g_disptab.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.h,v 1.3 2001/03/21 16:29:35 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.h,v 1.4 2003/09/28 20:15:42 alanh Exp $ */
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
#ifndef _GLX_g_disptab_h_
#define _GLX_g_disptab_h_
@@ -51,6 +51,8 @@ extern int __glXVendorPrivateWithReply(__GLXclientState*, GLbyte*);
extern int __glXQueryExtensionsString(__GLXclientState*, GLbyte*);
extern int __glXQueryServerString(__GLXclientState*, GLbyte*);
extern int __glXClientInfo(__GLXclientState*, GLbyte*);
+extern int __glXMakeContextCurrent(__GLXclientState*, GLbyte*);
+
extern int __glXDisp_NewList(__GLXclientState*, GLbyte*);
extern int __glXDisp_EndList(__GLXclientState*, GLbyte*);
extern int __glXDisp_DeleteLists(__GLXclientState*, GLbyte*);
@@ -323,6 +325,7 @@ extern void __glXDisp_MultiTexCoord4dvARB(GLbyte*);
extern void __glXDisp_MultiTexCoord4fvARB(GLbyte*);
extern void __glXDisp_MultiTexCoord4ivARB(GLbyte*);
extern void __glXDisp_MultiTexCoord4svARB(GLbyte*);
+extern void __glXDisp_WindowPos3fARB(GLbyte *);
extern int __glXSwapRender(__GLXclientState*, GLbyte*);
extern int __glXSwapRenderLarge(__GLXclientState*, GLbyte*);
@@ -344,6 +347,8 @@ extern int __glXSwapVendorPrivateWithReply(__GLXclientState*, GLbyte*);
extern int __glXSwapQueryExtensionsString(__GLXclientState*, GLbyte*);
extern int __glXSwapQueryServerString(__GLXclientState*, GLbyte*);
extern int __glXSwapClientInfo(__GLXclientState*, GLbyte*);
+extern int __glXSwapMakeContextCurrent(__GLXclientState*, GLbyte*);
+
extern int __glXDispSwap_NewList(__GLXclientState*, GLbyte*);
extern int __glXDispSwap_EndList(__GLXclientState*, GLbyte*);
extern int __glXDispSwap_DeleteLists(__GLXclientState*, GLbyte*);
@@ -616,15 +621,18 @@ extern void __glXDispSwap_MultiTexCoord4dvARB(GLbyte*);
extern void __glXDispSwap_MultiTexCoord4fvARB(GLbyte*);
extern void __glXDispSwap_MultiTexCoord4ivARB(GLbyte*);
extern void __glXDispSwap_MultiTexCoord4svARB(GLbyte*);
+extern void __glXDispSwap_WindowPos3fARB(GLbyte *);
#define __GLX_MIN_GLXCMD_OPCODE 1
#define __GLX_MAX_GLXCMD_OPCODE 20
#define __GLX_MIN_RENDER_OPCODE 1
-#define __GLX_MAX_RENDER_OPCODE 213
+/*#define __GLX_MAX_RENDER_OPCODE 213*/
+#define __GLX_MAX_RENDER_OPCODE 230
#define __GLX_MIN_SINGLE_OPCODE 1
#define __GLX_MAX_SINGLE_OPCODE 159
#define __GLX_SINGLE_TABLE_SIZE 160
-#define __GLX_RENDER_TABLE_SIZE 214
+/*#define __GLX_RENDER_TABLE_SIZE 214*/
+#define __GLX_RENDER_TABLE_SIZE 231
extern __GLXdispatchRenderProcPtr __glXRenderTable[__GLX_RENDER_TABLE_SIZE];
extern __GLXdispatchSingleProcPtr __glXSingleTable[__GLX_SINGLE_TABLE_SIZE];
extern __GLXdispatchRenderProcPtr __glXSwapRenderTable[__GLX_RENDER_TABLE_SIZE];
diff --git a/GL/glx/g_disptab_EXT.c b/GL/glx/g_disptab_EXT.c
index e839afe4f..2d8caec92 100644
--- a/GL/glx/g_disptab_EXT.c
+++ b/GL/glx/g_disptab_EXT.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab_EXT.c,v 1.3 2001/03/21 16:29:35 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab_EXT.c,v 1.4 2003/09/28 20:15:42 alanh Exp $ */
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
/*
** License Applicability. Except to the extent portions of this file are
@@ -32,21 +32,25 @@
#include "glxserver.h"
#include "glxext.h"
#include "g_disptab_EXT.h"
-__GLXdispatchRenderProcPtr __glXRenderTable_EXT[] = {
- __glXDisp_ColorTable,
- __glXDisp_ColorTableParameterfv,
+__GLXdispatchRenderProcPtr __glXRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN_RENDER_OPCODE_EXT + 1] = {
+ __glXDisp_ColorTable, /* 2053 */
+ __glXDisp_ColorTableParameterfv, /* 2054 */
__glXDisp_ColorTableParameteriv,
__glXDisp_CopyColorTable,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 2060 */
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
+ __glXDisp_PointParameterfARB, /* 2065 */
+ __glXDisp_PointParameterfvARB, /* 2066 */
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 2070 */
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
@@ -2072,15 +2076,11 @@ __GLXdispatchRenderProcPtr __glXRenderTable_EXT[] = {
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
- __glXNoSuchRenderOpcode,
- __glXNoSuchRenderOpcode,
- __glXNoSuchRenderOpcode,
- __glXNoSuchRenderOpcode,
- __glXDisp_BlendColor,
- __glXDisp_BlendEquation,
- __glXNoSuchRenderOpcode,
- __glXDisp_TexSubImage1D,
- __glXDisp_TexSubImage2D,
+ __glXDisp_BlendColor, /* 4096 */
+ __glXDisp_BlendEquation, /* 4097 */
+ __glXNoSuchRenderOpcode, /* 4098 */
+ __glXDisp_TexSubImage1D, /* 4099 */
+ __glXDisp_TexSubImage2D, /* 4100 */
__glXDisp_ConvolutionFilter1D,
__glXDisp_ConvolutionFilter2D,
__glXDisp_ConvolutionParameterf,
@@ -2090,7 +2090,7 @@ __GLXdispatchRenderProcPtr __glXRenderTable_EXT[] = {
__glXDisp_CopyConvolutionFilter1D,
__glXDisp_CopyConvolutionFilter2D,
__glXDisp_SeparableFilter2D,
- __glXDisp_Histogram,
+ __glXDisp_Histogram, /* 4110 */
__glXDisp_Minmax,
__glXDisp_ResetHistogram,
__glXDisp_ResetMinmax,
@@ -2100,38 +2100,135 @@ __GLXdispatchRenderProcPtr __glXRenderTable_EXT[] = {
__glXDisp_BindTexture,
__glXDisp_PrioritizeTextures,
__glXDisp_CopyTexImage1D,
- __glXDisp_CopyTexImage2D,
- __glXDisp_CopyTexSubImage1D,
- __glXDisp_CopyTexSubImage2D,
- __glXDisp_CopyTexSubImage3D,
+ __glXDisp_CopyTexImage2D, /* 4120 */
+ __glXDisp_CopyTexSubImage1D, /* 4121 */
+ __glXDisp_CopyTexSubImage2D, /* 4122 */
+ __glXDisp_CopyTexSubImage3D, /* 4123 */
+ __glXNoSuchRenderOpcode, /* 4124 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4130 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4140 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4150 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4160 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4170 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4180 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4190 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4200 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4210 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4219 */
+ __glXDisp_ActiveStencilFaceEXT, /* 4220 */
};
-__GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[] = {
- __glXDisp_AreTexturesResidentEXT,
- __glXDisp_DeleteTexturesEXT,
- __glXDisp_GenTexturesEXT,
- __glXDisp_IsTextureEXT,
+__GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1] = {
+ __glXDisp_AreTexturesResidentEXT, /* 11 */
+ __glXDisp_DeleteTexturesEXT, /* 12 */
+ __glXDisp_GenTexturesEXT, /* 13 */
+ __glXDisp_IsTextureEXT, /* 14 */
};
-__GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[] = {
- __glXDispSwap_ColorTable,
- __glXDispSwap_ColorTableParameterfv,
+__GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN_RENDER_OPCODE_EXT + 1] = {
+ __glXDispSwap_ColorTable, /* 2053 */
+ __glXDispSwap_ColorTableParameterfv, /* 2054 */
__glXDispSwap_ColorTableParameteriv,
__glXDispSwap_CopyColorTable,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 2060 */
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
+ __glXDispSwap_PointParameterfARB, /* 2065 */
+ __glXDispSwap_PointParameterfvARB, /* 2066 */
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
- __glXNoSuchRenderOpcode,
- __glXNoSuchRenderOpcode,
- __glXNoSuchRenderOpcode,
- __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 2070 */
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
@@ -4181,15 +4278,112 @@ __GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[] = {
__glXDispSwap_BindTexture,
__glXDispSwap_PrioritizeTextures,
__glXDispSwap_CopyTexImage1D,
- __glXDispSwap_CopyTexImage2D,
- __glXDispSwap_CopyTexSubImage1D,
- __glXDispSwap_CopyTexSubImage2D,
- __glXDispSwap_CopyTexSubImage3D,
+ __glXDispSwap_CopyTexImage2D, /* 4120 */
+ __glXDispSwap_CopyTexSubImage1D, /* 4121 */
+ __glXDispSwap_CopyTexSubImage2D, /* 4122 */
+ __glXDispSwap_CopyTexSubImage3D, /* 4123 */
+ __glXNoSuchRenderOpcode, /* 4124 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4130 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4140 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4150 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4160 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4170 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4180 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4190 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4200 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4210 */
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode,
+ __glXNoSuchRenderOpcode, /* 4219 */
+ __glXDispSwap_ActiveStencilFaceEXT, /* 4220 */
};
-__GLXdispatchVendorPrivProcPtr __glXSwapVendorPrivTable_EXT[] = {
- __glXDispSwap_AreTexturesResidentEXT,
- __glXDispSwap_DeleteTexturesEXT,
- __glXDispSwap_GenTexturesEXT,
- __glXDispSwap_IsTextureEXT,
+__GLXdispatchVendorPrivProcPtr __glXSwapVendorPrivTable_EXT[__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1] = {
+ __glXDispSwap_AreTexturesResidentEXT, /* 11 */
+ __glXDispSwap_DeleteTexturesEXT, /* 12 */
+ __glXDispSwap_GenTexturesEXT, /* 13 */
+ __glXDispSwap_IsTextureEXT, /* 14 */
};
diff --git a/GL/glx/g_disptab_EXT.h b/GL/glx/g_disptab_EXT.h
index 193da6ea7..d5b67745c 100644
--- a/GL/glx/g_disptab_EXT.h
+++ b/GL/glx/g_disptab_EXT.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab_EXT.h,v 1.3 2001/03/21 16:29:35 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab_EXT.h,v 1.4 2003/09/28 20:15:42 alanh Exp $ */
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
#ifndef _GLX_g_disptab_EXT_h_
#define _GLX_g_disptab_EXT_h_
@@ -67,6 +67,9 @@ extern void __glXDisp_CopyTexImage2D(GLbyte*);
extern void __glXDisp_CopyTexSubImage1D(GLbyte*);
extern void __glXDisp_CopyTexSubImage2D(GLbyte*);
extern void __glXDisp_CopyTexSubImage3D(GLbyte*);
+extern void __glXDisp_PointParameterfARB(GLbyte*);
+extern void __glXDisp_PointParameterfvARB(GLbyte*);
+extern void __glXDisp_ActiveStencilFaceEXT(GLbyte*);
extern int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState*, GLbyte*);
extern int __glXDispSwap_DeleteTexturesEXT(__GLXclientState*, GLbyte*);
@@ -104,13 +107,16 @@ extern void __glXDispSwap_CopyTexImage2D(GLbyte*);
extern void __glXDispSwap_CopyTexSubImage1D(GLbyte*);
extern void __glXDispSwap_CopyTexSubImage2D(GLbyte*);
extern void __glXDispSwap_CopyTexSubImage3D(GLbyte*);
+extern void __glXDispSwap_PointParameterfARB(GLbyte*);
+extern void __glXDispSwap_PointParameterfvARB(GLbyte*);
+extern void __glXDispSwap_ActiveStencilFaceEXT(GLbyte*);
#define __GLX_MIN_RENDER_OPCODE_EXT 2053
-#define __GLX_MAX_RENDER_OPCODE_EXT 4123
+#define __GLX_MAX_RENDER_OPCODE_EXT 4220
#define __GLX_MIN_VENDPRIV_OPCODE_EXT 11
#define __GLX_MAX_VENDPRIV_OPCODE_EXT 14
-#define __GLX_VENDPRIV_TABLE_SIZE_EXT 4
-#define __GLX_RENDER_TABLE_SIZE_EXT 2071
+#define __GLX_VENDPRIV_TABLE_SIZE_EXT (__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1)
+#define __GLX_RENDER_TABLE_SIZE_EXT (__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN_RENDER_OPCODE_EXT + 1)
extern __GLXdispatchRenderProcPtr __glXRenderTable_EXT[__GLX_RENDER_TABLE_SIZE_EXT];
extern __GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[__GLX_VENDPRIV_TABLE_SIZE_EXT];
extern __GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_RENDER_TABLE_SIZE_EXT];
diff --git a/GL/glx/g_render.c b/GL/glx/g_render.c
index 52ecab5b1..5e142138e 100644
--- a/GL/glx/g_render.c
+++ b/GL/glx/g_render.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/g_render.c,v 1.4 2001/03/21 16:29:35 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/g_render.c,v 1.6 2003/10/28 22:50:17 tsi Exp $ */
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
/*
** License Applicability. Except to the extent portions of this file are
@@ -982,6 +982,7 @@ void __glXDisp_TexGend(GLbyte *pc)
void __glXDisp_TexGendv(GLbyte *pc)
{
+#ifdef __GLX_ALIGN64
GLenum pname;
GLint cmdlen;
GLint compsize;
@@ -990,8 +991,6 @@ void __glXDisp_TexGendv(GLbyte *pc)
compsize = __glTexGendv_size(pname);
if (compsize < 0) compsize = 0;
cmdlen = __GLX_PAD(8+compsize*8);
-
-#ifdef __GLX_ALIGN64
if ((unsigned long)(pc) & 7) {
__GLX_MEM_COPY(pc-4, pc, cmdlen);
pc -= 4;
@@ -2075,3 +2074,40 @@ void __glXDisp_MultiTexCoord4svARB(GLbyte *pc)
);
}
+
+/*
+ * Extensions
+ */
+
+void __glXDisp_PointParameterfARB(GLbyte *pc)
+{
+ glPointParameterfARB(
+ *(GLenum *)(pc + 0),
+ *(GLfloat *)(pc + 4)
+ );
+}
+
+
+void __glXDisp_PointParameterfvARB(GLbyte *pc)
+{
+ glPointParameterfvARB(
+ *(GLenum *)(pc + 0),
+ (GLfloat *)(pc + 4)
+ );
+}
+
+void __glXDisp_ActiveStencilFaceEXT(GLbyte *pc)
+{
+ glActiveStencilFaceEXT(
+ *(GLenum *)(pc + 0)
+ );
+}
+
+void __glXDisp_WindowPos3fARB(GLbyte *pc)
+{
+ glWindowPos3fARB(
+ *(GLfloat *)(pc + 0),
+ *(GLfloat *)(pc + 4),
+ *(GLfloat *)(pc + 8)
+ );
+}
diff --git a/GL/glx/g_renderswap.c b/GL/glx/g_renderswap.c
index fa3f15d45..a03db7599 100644
--- a/GL/glx/g_renderswap.c
+++ b/GL/glx/g_renderswap.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/g_renderswap.c,v 1.5 2002/01/14 22:47:08 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/g_renderswap.c,v 1.7 2003/10/28 22:50:17 tsi Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
@@ -1570,7 +1570,9 @@ void __glXDispSwap_TexGend(GLbyte *pc)
void __glXDispSwap_TexGendv(GLbyte *pc)
{
GLenum pname;
+#ifdef __GLX_ALIGN64
GLint cmdlen;
+#endif
GLint compsize;
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
@@ -1579,9 +1581,9 @@ void __glXDispSwap_TexGendv(GLbyte *pc)
pname = *(GLenum *)(pc + 4);
compsize = __glTexGendv_size(pname);
if (compsize < 0) compsize = 0;
- cmdlen = __GLX_PAD(8+compsize*8);
#ifdef __GLX_ALIGN64
+ cmdlen = __GLX_PAD(8+compsize*8);
if ((unsigned long)(pc) & 7) {
__GLX_MEM_COPY(pc-4, pc, cmdlen);
pc -= 4;
@@ -3306,3 +3308,61 @@ void __glXDispSwap_MultiTexCoord4svARB(GLbyte *pc)
);
}
+
+/*
+ * Extensions
+ */
+
+void __glXDispSwap_PointParameterfARB(GLbyte *pc)
+{
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 4);
+ glPointParameterfARB(
+ *(GLenum *)(pc + 0),
+ *(GLfloat *)(pc + 4)
+ );
+}
+
+void __glXDispSwap_PointParameterfvARB(GLbyte *pc)
+{
+ GLenum pname;
+ GLint compsize;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_INT(pc + 0);
+ pname = *(GLenum *)(pc + 0);
+ compsize = __glPointParameterfvARB_size(pname);
+ if (compsize < 0) compsize = 0;
+ __GLX_SWAP_FLOAT_ARRAY(pc + 4, compsize);
+
+ glPointParameterfvARB(
+ *(GLenum *)(pc + 0),
+ (GLfloat *)(pc + 4)
+ );
+}
+
+void __glXDispSwap_ActiveStencilFaceEXT(GLbyte *pc)
+{
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ __GLX_SWAP_INT(pc + 0);
+
+ glActiveStencilFaceEXT(
+ *(GLenum *)(pc + 0)
+ );
+}
+
+void __glXDispSwap_WindowPos3fARB(GLbyte *pc)
+{
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_SWAP_FLOAT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 8);
+ glWindowPos3fARB(
+ *(GLfloat *)(pc + 0),
+ *(GLfloat *)(pc + 4),
+ *(GLfloat *)(pc + 8)
+ );
+}
diff --git a/GL/glx/g_single.c b/GL/glx/g_single.c
index 06529e8c5..5bcec133c 100644
--- a/GL/glx/g_single.c
+++ b/GL/glx/g_single.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/g_single.c,v 1.5 2002/01/14 22:47:08 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/g_single.c,v 1.6 2003/10/28 22:50:17 tsi Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
@@ -1264,7 +1264,6 @@ int __glXDisp_AreTexturesResident(__GLXclientState *cl, GLbyte *pc)
int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
{
- GLsizei n;
__GLXcontext *cx;
int error;
@@ -1273,7 +1272,6 @@ int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc)
return error;
}
pc += __GLX_SINGLE_HDR_SIZE;
- n = *(GLsizei *)(pc + 0);
glDeleteTextures(
*(GLsizei *)(pc + 0),
@@ -1717,7 +1715,6 @@ int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc)
int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
{
- GLsizei n;
__GLXcontext *cx;
int error;
@@ -1726,7 +1723,6 @@ int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc)
return error;
}
pc += __GLX_VENDPRIV_HDR_SIZE;
- n = *(GLsizei *)(pc + 0);
glDeleteTexturesEXT(
*(GLsizei *)(pc + 0),
diff --git a/GL/glx/glxcmds.c b/GL/glx/glxcmds.c
index 61989cfa4..12e961ee6 100644
--- a/GL/glx/glxcmds.c
+++ b/GL/glx/glxcmds.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/glxcmds.c,v 1.9 2002/12/14 01:36:09 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/glxcmds.c,v 1.11 2003/10/28 22:50:17 tsi Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
@@ -64,9 +64,13 @@ static __GLimports imports = {
__glXImpFclose,
__glXImpFprintf,
__glXImpGetDrawablePrivate,
+ __glXImpGetReadablePrivate,
NULL
};
+static int DoMakeCurrent( __GLXclientState *cl, GLXDrawable drawId,
+ GLXDrawable readId, GLXContextID contextId, GLXContextTag tag );
+
/************************************************************************/
/*
@@ -361,26 +365,138 @@ static void StartUsingContext(__GLXclientState *cl, __GLXcontext *glxc)
/*
** Make an OpenGL context and drawable current.
*/
+
int __glXMakeCurrent(__GLXclientState *cl, GLbyte *pc)
{
+ xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc;
+
+ return DoMakeCurrent( cl, req->drawable, req->drawable,
+ req->context, req->oldContextTag );
+}
+
+int __glXMakeContextCurrent(__GLXclientState *cl, GLbyte *pc)
+{
+ xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc;
+
+ return DoMakeCurrent( cl, req->drawable, req->readdrawable,
+ req->context, req->oldContextTag );
+}
+
+int __glXMakeCurrentReadSGI(__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,
+ DrawablePtr *ppDraw, __GLXpixmap **ppPixmap,
+ ClientPtr client )
+{
+ DrawablePtr pDraw;
+ __GLXpixmap *drawPixmap = NULL;
+
+ pDraw = (DrawablePtr) LookupDrawable(drawId, client);
+ if (pDraw) {
+ if (pDraw->type == DRAWABLE_WINDOW) {
+ /*
+ ** Drawable is an X Window.
+ */
+ WindowPtr pWin = (WindowPtr)pDraw;
+ VisualID vid = wVisual(pWin);
+
+ /*
+ ** Check if window and context are similar.
+ */
+ if ((vid != glxc->pVisual->vid) ||
+ (pWin->drawable.pScreen != glxc->pScreen)) {
+ client->errorValue = drawId;
+ return BadMatch;
+ }
+ } 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 __glXBadDrawable;
+ }
+ } else {
+ drawPixmap = (__GLXpixmap *) LookupIDByType(drawId, __glXPixmapRes);
+ if (drawPixmap) {
+ /*
+ ** Check if pixmap and context are similar.
+ */
+ if (drawPixmap->pScreen != glxc->pScreen ||
+ drawPixmap->pGlxVisual != glxc->pGlxVisual) {
+ client->errorValue = drawId;
+ return BadMatch;
+ }
+ pDraw = drawPixmap->pDraw;
+
+ } else {
+ /*
+ ** Drawable is neither a Window nor a GLXPixmap.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+ }
+
+ *ppPixmap = drawPixmap;
+ *ppDraw = pDraw;
+
+ return 0;
+}
+
+
+static int DoMakeCurrent( __GLXclientState *cl,
+ GLXDrawable drawId, GLXDrawable readId,
+ GLXContextID contextId, GLXContextTag tag )
+{
ClientPtr client = cl->client;
DrawablePtr pDraw;
- xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc;
+ DrawablePtr pRead;
xGLXMakeCurrentReply reply;
- GLXDrawable drawId = req->drawable;
- GLXContextID contextId = req->context;
- __GLXpixmap *pGlxPixmap = 0;
+ __GLXpixmap *drawPixmap = NULL;
+ __GLXpixmap *readPixmap = NULL;
__GLXcontext *glxc, *prevglxc;
__GLinterface *gc, *prevgc;
- __GLXdrawablePrivate *glxPriv = NULL;
- GLXContextTag tag = req->oldContextTag;
+ __GLXdrawablePrivate *drawPriv = NULL;
+ __GLXdrawablePrivate *readPriv = NULL;
GLint error;
+ GLuint mask;
/*
** If one is None and the other isn't, it's a bad match.
*/
- if ((drawId == None && contextId != None) ||
- (drawId != None && contextId == None)) {
+
+ 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;
}
@@ -410,6 +526,8 @@ int __glXMakeCurrent(__GLXclientState *cl, GLbyte *pc)
** 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;
@@ -420,72 +538,53 @@ int __glXMakeCurrent(__GLXclientState *cl, GLbyte *pc)
return BadAccess;
}
gc = glxc->gc;
- } else {
- /* Switching to no context. Ignore new drawable. */
- glxc = 0;
- gc = 0;
- }
- if (drawId != None) {
- pDraw = (DrawablePtr) LookupDrawable(drawId, client);
- if (pDraw) {
- if (pDraw->type == DRAWABLE_WINDOW) {
- /*
- ** Drawable is an X Window.
- */
- WindowPtr pWin = (WindowPtr)pDraw;
- VisualID vid = wVisual(pWin);
- /*
- ** Check if window and context are similar.
- */
- if ((vid != glxc->pVisual->vid) ||
- (pWin->drawable.pScreen != glxc->pScreen)) {
- client->errorValue = drawId;
- return BadMatch;
- }
+ assert( drawId != None );
+ assert( readId != None );
- } 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 __glXBadDrawable;
+ status = GetDrawableOrPixmap( glxc, drawId, & pDraw, & drawPixmap,
+ client );
+ if ( status != 0 ) {
+ return status;
+ }
+
+ if ( readId != drawId ) {
+ status = GetDrawableOrPixmap( glxc, readId, & pRead, & readPixmap,
+ client );
+ if ( status != 0 ) {
+ return status;
}
} else {
- pGlxPixmap = (__GLXpixmap *) LookupIDByType(drawId,
- __glXPixmapRes);
- if (pGlxPixmap) {
- /*
- ** Check if pixmap and context are similar.
- */
- if (pGlxPixmap->pScreen != glxc->pScreen ||
- pGlxPixmap->pGlxVisual != glxc->pGlxVisual) {
- client->errorValue = drawId;
- return BadMatch;
- }
- pDraw = pGlxPixmap->pDraw;
+ pRead = pDraw;
+ }
- } else {
- /*
- ** Drawable is neither a Window nor a GLXPixmap.
- */
- client->errorValue = drawId;
+ /* FIXME: Finish refactoring this. - idr */
+ /* get the drawable private */
+ if (pDraw) {
+ drawPriv = __glXGetDrawablePrivate(pDraw, drawId, glxc->modes);
+ if (drawPriv == NULL) {
return __glXBadDrawable;
}
}
+
+ if (pRead != pDraw) {
+ readPriv = __glXGetDrawablePrivate(pRead, readId, glxc->modes);
+ if (readPriv == NULL) {
+ return __glXBadDrawable;
+ }
+ } else {
+ readPriv = drawPriv;
+ }
+
} else {
+ /* Switching to no context. Ignore new drawable. */
+ glxc = 0;
+ gc = 0;
pDraw = 0;
+ pRead = 0;
}
- /* get the drawable private */
- if (pDraw) {
- glxPriv = __glXGetDrawablePrivate(pDraw, drawId, glxc->modes);
- if (glxPriv == NULL) {
- return __glXBadDrawable;
- }
- }
if (prevglxc) {
/*
@@ -506,66 +605,97 @@ int __glXMakeCurrent(__GLXclientState *cl, GLbyte *pc)
if (!(*prevgc->exports.loseCurrent)((__GLcontext *)prevgc)) {
return __glXBadContext;
}
- __glXDeassociateContext(prevglxc, prevglxc->glxPriv);
+ __glXDeassociateContext(prevglxc);
}
+
if ((glxc != 0) && !glxc->isDirect) {
- glxc->glxPriv = glxPriv;
- __glXCacheDrawableSize(glxPriv);
+ glxc->drawPriv = drawPriv;
+ glxc->readPriv = readPriv;
+ __glXCacheDrawableSize(drawPriv);
/* make the context current */
- if (!(*gc->exports.makeCurrent)((__GLcontext *)gc, &glxPriv->glPriv)) {
- glxc->glxPriv = NULL;
+ if (!(*gc->exports.makeCurrent)((__GLcontext *)gc)) {
+ glxc->drawPriv = NULL;
+ glxc->readPriv = NULL;
return __glXBadContext;
}
/* resize the buffers */
- if (!__glXResizeDrawableBuffers(glxPriv)) {
+ if (!__glXResizeDrawableBuffers(drawPriv)) {
/* could not do initial resize. make current failed */
(*gc->exports.loseCurrent)((__GLcontext *)gc);
- glxc->glxPriv = NULL;
+ glxc->drawPriv = NULL;
+ glxc->readPriv = NULL;
return __glXBadContext;
}
glxc->isCurrent = GL_TRUE;
- __glXAssociateContext(glxc, glxPriv);
- assert(glxPriv->glxc == glxc);
+ __glXAssociateContext(glxc);
+ assert(drawPriv->drawGlxc == glxc);
+ assert(readPriv->readGlxc == glxc);
}
if (prevglxc) {
- if (prevglxc->pGlxPixmap) {
+ if (prevglxc->drawPixmap) {
+ if (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);
+ __glXFree(prevglxc->readPixmap);
+ }
+ }
+
/*
** The previous drawable was a glx pixmap, release it.
*/
- prevglxc->pGlxPixmap->refcnt--;
- if (!prevglxc->pGlxPixmap->idExists &&
- !prevglxc->pGlxPixmap->refcnt) {
- PixmapPtr pPixmap = (PixmapPtr) prevglxc->pGlxPixmap->pDraw;
+ 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->pGlxPixmap->pScreen->DestroyPixmap)(pPixmap);
- __glXFree(prevglxc->pGlxPixmap);
+ (*prevglxc->drawPixmap->pScreen->DestroyPixmap)(pPixmap);
+ __glXFree(prevglxc->drawPixmap);
}
- prevglxc->pGlxPixmap = 0;
+
+ prevglxc->drawPixmap = NULL;
}
ChangeCurrentContext(cl, glxc, tag);
StopUsingContext(prevglxc);
} else {
tag = AddCurrentContext(cl, glxc);
}
+
if (glxc) {
- if (pGlxPixmap) {
- pGlxPixmap->refcnt++;
- glxc->pGlxPixmap = pGlxPixmap;
+ 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;
@@ -617,6 +747,8 @@ int __glXQueryVersion(__GLXclientState *cl, GLbyte *pc)
major = req->majorVersion;
minor = req->minorVersion;
+ (void)major;
+ (void)minor;
/*
** Server should take into consideration the version numbers sent by the
@@ -1446,6 +1578,8 @@ int __glXVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc)
switch (vendorcode) {
case X_GLXvop_QueryContextInfoEXT:
return __glXQueryContextInfoEXT(cl, pc);
+ case X_GLXvop_MakeCurrentReadSGI:
+ return __glXMakeCurrentReadSGI(cl, pc);
default:
break;
}
diff --git a/GL/glx/glxcmdsswap.c b/GL/glx/glxcmdsswap.c
index a3b8caa15..5237ecad0 100644
--- a/GL/glx/glxcmdsswap.c
+++ b/GL/glx/glxcmdsswap.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/glxcmdsswap.c,v 1.7 2002/01/14 22:47:08 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/glxcmdsswap.c,v 1.9 2003/10/28 22:50:17 tsi Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
@@ -94,6 +94,34 @@ int __glXSwapMakeCurrent(__GLXclientState *cl, GLbyte *pc)
return __glXMakeCurrent(cl, pc);
}
+int __glXSwapMakeContextCurrent(__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 __glXMakeContextCurrent(cl, pc);
+}
+
+int __glXSwapMakeCurrentReadSGI(__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 __glXMakeCurrentReadSGI(cl, pc);
+}
+
int __glXSwapIsDirect(__GLXclientState *cl, GLbyte *pc)
{
xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc;
@@ -329,7 +357,7 @@ int __glXSwapClientInfo(__GLXclientState *cl, GLbyte *pc)
return __glXClientInfo(cl, pc);
}
-int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, char *pc)
+int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@@ -337,7 +365,7 @@ int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, char *pc)
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->context);
- return __glXQueryContextInfoEXT(cl, (GLbyte *)pc);
+ return __glXQueryContextInfoEXT(cl, pc);
}
/************************************************************************/
@@ -785,6 +813,16 @@ int __glXSwapVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc)
vendorcode = req->vendorCode;
+ switch (vendorcode) {
+ case X_GLXvop_QueryContextInfoEXT:
+ return __glXSwapQueryContextInfoEXT(cl, pc);
+ case X_GLXvop_MakeCurrentReadSGI:
+ return __glXSwapMakeCurrentReadSGI(cl, pc);
+ default:
+ break;
+ }
+
+
if ((vendorcode >= __GLX_MIN_VENDPRIV_OPCODE_EXT) &&
(vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) {
return (*__glXSwapVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT])(cl, (GLbyte*)req);
diff --git a/GL/glx/glxcontext.h b/GL/glx/glxcontext.h
index b64de66d6..6454b4952 100644
--- a/GL/glx/glxcontext.h
+++ b/GL/glx/glxcontext.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/glxcontext.h,v 1.4 2002/02/22 21:45:07 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/glxcontext.h,v 1.5 2003/09/28 20:15:43 alanh Exp $ */
#ifndef _GLX_context_h_
#define _GLX_context_h_
@@ -54,7 +54,8 @@ struct __GLXcontextRec {
/*
** list of contexts bound to the same drawable
*/
- struct __GLXcontextRec *nextPriv;
+ struct __GLXcontextRec *nextDrawPriv;
+ struct __GLXcontextRec *nextReadPriv;
/*
** Opaque pointer the context object created by the GL that the
@@ -142,12 +143,14 @@ struct __GLXcontextRec {
/*
** Set only if current drawable is a glx pixmap.
*/
- __GLXpixmap *pGlxPixmap;
+ __GLXpixmap *drawPixmap;
+ __GLXpixmap *readPixmap;
/*
** The drawable private this context is bound to
*/
- __GLXdrawablePrivate *glxPriv;
+ __GLXdrawablePrivate *drawPriv;
+ __GLXdrawablePrivate *readPriv;
};
/* pending state defines */
diff --git a/GL/glx/glxdrawable.h b/GL/glx/glxdrawable.h
index 9d7ba55ba..a2c806f44 100644
--- a/GL/glx/glxdrawable.h
+++ b/GL/glx/glxdrawable.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/glxdrawable.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/glxdrawable.h,v 1.4 2003/09/28 20:15:43 alanh Exp $ */
#ifndef _GLX_drawable_h_
#define _GLX_drawable_h_
@@ -78,9 +78,13 @@ struct __GLXdrawablePrivateRec {
GLint width, height;
/*
- ** list of contexts bound to this drawable
+ ** 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.
*/
- struct __GLXcontextRec *glxc;
+ struct __GLXcontextRec *drawGlxc;
+ struct __GLXcontextRec *readGlxc;
/*
** "methods" that the drawble should be able to respond to.
diff --git a/GL/glx/glxext.c b/GL/glx/glxext.c
index 95a9c2e6e..716950953 100644
--- a/GL/glx/glxext.c
+++ b/GL/glx/glxext.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/glxext.c,v 1.8 2001/08/23 18:25:40 alanh Exp $
+/* $XFree86: xc/programs/Xserver/GL/glx/glxext.c,v 1.9 2003/09/28 20:15:43 alanh Exp $
** 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.,
@@ -114,7 +114,7 @@ static int ClientGone(int clientIndex, XID id)
for (i=0; i < cl->numCurrentContexts; i++) {
cx = cl->currentContexts[i];
if (cx) {
- __glXDeassociateContext(cx, cx->glxPriv);
+ __glXDeassociateContext(cx);
cx->isCurrent = GL_FALSE;
if (!cx->idExists) {
__glXFreeContext(cx);
@@ -343,7 +343,7 @@ __GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag,
}
if (!cx->isDirect) {
- if (cx->glxPriv == NULL) {
+ 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
diff --git a/GL/glx/glxext.h b/GL/glx/glxext.h
index 7dd57c1d7..4ec16d28d 100644
--- a/GL/glx/glxext.h
+++ b/GL/glx/glxext.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/glxext.h,v 1.4 2001/03/21 16:29:36 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/glxext.h,v 1.7 2003/11/17 22:20:26 dawes Exp $ */
#ifndef _glxext_h_
#define _glxext_h_
@@ -71,14 +71,16 @@ extern GLboolean __glXErrorOccured(void);
extern void __glXResetLargeCommandStatus(__GLXclientState*);
extern int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc);
-extern int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, char *pc);
+extern int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc);
+
+extern int __glXMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc);
+extern int __glXSwapMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc);
extern void GlxExtensionInit(void);
extern Bool __glXCoreType(void);
extern int GlxInitVisuals(
-#if NeedFunctionPrototypes
VisualPtr * visualp,
DepthPtr * depthp,
int * nvisualp,
@@ -88,7 +90,6 @@ extern int GlxInitVisuals(
unsigned long sizes,
int bitsPerRGB,
int preferredVis
-#endif
);
#endif /* _glxext_h_ */
diff --git a/GL/glx/glximports.c b/GL/glx/glximports.c
index 398c59962..7ec1134cd 100644
--- a/GL/glx/glximports.c
+++ b/GL/glx/glximports.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/glximports.c,v 1.5 2001/03/21 16:29:36 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/glximports.c,v 1.6 2003/09/28 20:15:43 alanh Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
@@ -167,5 +167,14 @@ __GLdrawablePrivate *__glXImpGetDrawablePrivate(__GLcontext *gc)
__GLinterface *glci = (__GLinterface *) gc;
__GLXcontext *glrc = (__GLXcontext *) glci->imports.other;
- return &glrc->glxPriv->glPriv;
+ return &glrc->drawPriv->glPriv;
+}
+
+
+__GLdrawablePrivate *__glXImpGetReadablePrivate(__GLcontext *gc)
+{
+ __GLinterface *glci = (__GLinterface *) gc;
+ __GLXcontext *glrc = (__GLXcontext *) glci->imports.other;
+
+ return &glrc->readPriv->glPriv;
}
diff --git a/GL/glx/glximports.h b/GL/glx/glximports.h
index 4f3513d32..e1a65a70e 100644
--- a/GL/glx/glximports.h
+++ b/GL/glx/glximports.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/glximports.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/glximports.h,v 1.4 2003/09/28 20:15:43 alanh Exp $ */
#ifndef _glximports_h_
#define _glximports_h_
@@ -55,6 +55,7 @@ extern int __glXImpFprintf(__GLcontext *gc, void *stream,
const char *fmt, ...);
extern __GLdrawablePrivate *__glXImpGetDrawablePrivate(__GLcontext *gc);
+extern __GLdrawablePrivate *__glXImpGetReadablePrivate(__GLcontext *gc);
#endif /* _glximports_h_ */
diff --git a/GL/glx/glxscreens.c b/GL/glx/glxscreens.c
index a59df6ca9..c141d3cea 100644
--- a/GL/glx/glxscreens.c
+++ b/GL/glx/glxscreens.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.c,v 1.10 2002/04/04 14:05:36 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.c,v 1.12 2003/09/28 20:15:43 alanh Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
@@ -46,23 +46,77 @@
#include "glxserver.h"
#include "glxutil.h"
-static char GLServerExtensions[] =
+static const char GLServerExtensions[] =
+ "GL_ARB_depth_texture "
"GL_ARB_imaging "
"GL_ARB_multitexture "
+ "GL_ARB_point_parameters "
+ "GL_ARB_shadow "
+ "GL_ARB_shadow_ambient "
"GL_ARB_texture_border_clamp "
"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_transpose_matrix "
+ "GL_ARB_window_pos "
"GL_EXT_abgr "
- "GL_EXT_blend_color "
- "GL_EXT_blend_minmax "
- "GL_EXT_blend_subtract "
- "GL_EXT_texture_env_add "
- "GL_EXT_texture_env_combine "
- "GL_EXT_texture_env_dot3 "
- "GL_EXT_texture_lod_bias "
+ "GL_EXT_bgra "
+ "GL_EXT_blend_color "
+ "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_multi_draw_arrays "
+ "GL_EXT_packed_pixels "
+ "GL_EXT_polygon_offset "
+ "GL_EXT_rescale_normal "
+ "GL_EXT_secondary_color "
+ "GL_EXT_separate_specular_color "
+ "GL_EXT_shadow_funcs "
+ "GL_EXT_stencil_two_side "
+ "GL_EXT_stencil_wrap "
+ "GL_EXT_subtexture "
+ "GL_EXT_texture "
+ "GL_EXT_texture3D "
+ "GL_EXT_texture_edge_clamp "
+ "GL_EXT_texture_env_add "
+ "GL_EXT_texture_env_combine "
+ "GL_EXT_texture_env_dot3 "
+ "GL_EXT_texture_lod "
+ "GL_EXT_texture_lod_bias "
+ "GL_EXT_texture_object "
+ "GL_EXT_texture_rectangle "
+ "GL_EXT_vertex_array "
+ "GL_APPLE_packed_pixels "
+ "GL_ATI_texture_mirror_once "
+ "GL_ATI_texture_env_combine3 "
+#if 0
+ /* This is currently removed because there seem to be some problems with
+ * it and the software-only indirect rendering path. At this point, I'm
+ * not sure which side (client or server) has the problem. - idr
+ */
+ "GL_HP_occlusion_test "
+#endif
+ "GL_IBM_texture_mirrored_repeat "
+ "GL_MESA_pack_invert "
+ "GL_MESA_ycbcr_texture "
+ "GL_NV_blend_square "
+ "GL_NV_texgen_reflection "
+ "GL_NV_texture_rectangle "
+ "GL_SGIS_generate_mipmap "
+ "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 "
;
/*
@@ -75,6 +129,7 @@ static char GLXServerExtensions[] =
"GLX_EXT_visual_info "
"GLX_EXT_visual_rating "
"GLX_EXT_import_context "
+ "GLX_SGI_make_current_read "
;
/*
@@ -94,6 +149,7 @@ GLint __glXNumActiveScreens;
RESTYPE __glXDrawableRes;
+#if 0
static int
CountBits(unsigned long mask)
{
@@ -106,6 +162,7 @@ CountBits(unsigned long mask)
return count;
}
+#endif
#if 0
/*
@@ -186,8 +243,13 @@ static Bool DrawableGone(__GLXdrawablePrivate *glxPriv, XID xid)
** When a window is destroyed, notify all context bound to
** it, that there are no longer bound to anything.
*/
- for (cx = glxPriv->glxc; cx; cx = cx1) {
- cx1 = cx->nextPriv;
+ 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;
}
}
@@ -247,9 +309,14 @@ static Bool PositionWindow(WindowPtr pWin, int x, int y)
/* XXX: what can we possibly do here? */
ret = False;
}
+
/* mark contexts as needing resize */
- glxc = NULL;
- for (glxc = glxPriv->glxc; glxc; glxc = glxc->nextPriv) {
+
+ 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;
}
diff --git a/GL/glx/glxserver.h b/GL/glx/glxserver.h
index ad921511b..a800f0d73 100644
--- a/GL/glx/glxserver.h
+++ b/GL/glx/glxserver.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/glxserver.h,v 1.4 2001/08/23 18:25:40 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/glxserver.h,v 1.5 2003/09/28 20:15:43 alanh Exp $ */
#ifndef _GLX_server_h_
#define _GLX_server_h_
@@ -279,4 +279,6 @@ extern int __glXConvolutionParameterfvSize(GLenum pname);
extern int __glXColorTableParameterfvSize(GLenum pname);
extern int __glXColorTableParameterivSize(GLenum pname);
+extern int __glXPointParameterfvARBReqSize(GLbyte *pc, Bool swap);
+
#endif /* !__GLX_server_h__ */
diff --git a/GL/glx/glxutil.c b/GL/glx/glxutil.c
index a32dc5e43..ebc9a2bfc 100644
--- a/GL/glx/glxutil.c
+++ b/GL/glx/glxutil.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/glxutil.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/glxutil.c,v 1.6 2003/09/28 20:15:43 alanh Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
@@ -130,33 +130,59 @@ __glXFree(void *addr)
** associate a context with a drawable
*/
void
-__glXAssociateContext(__GLXcontext *glxc, __GLXdrawablePrivate *glxPriv)
+__glXAssociateContext(__GLXcontext *glxc)
{
- glxc->nextPriv = glxPriv->glxc;
- glxPriv->glxc = glxc;
+ glxc->nextDrawPriv = glxc->drawPriv->drawGlxc;
+ glxc->drawPriv->drawGlxc = glxc;
- __glXRefDrawablePrivate(glxPriv);
+ __glXRefDrawablePrivate(glxc->drawPriv);
+
+
+ glxc->nextReadPriv = glxc->readPriv->readGlxc;
+ glxc->readPriv->readGlxc = glxc;
+
+ __glXRefDrawablePrivate(glxc->readPriv);
}
/*
** Deassociate a context from a drawable
*/
void
-__glXDeassociateContext(__GLXcontext *glxc, __GLXdrawablePrivate *glxPriv)
+__glXDeassociateContext(__GLXcontext *glxc)
{
- __GLXcontext *glxc1, *glxc2;
+ __GLXcontext *curr, *prev;
- glxc2 = NULL;
- for (glxc1=glxPriv->glxc; glxc1; glxc2=glxc1, glxc1=glxc1->nextPriv) {
- if (glxc1 == glxc) {
+ prev = NULL;
+ for ( curr = glxc->drawPriv->drawGlxc
+ ; curr != NULL
+ ; prev = curr, curr = curr->nextDrawPriv ) {
+ if (curr == glxc) {
/* found context. Deassociate. */
- if (glxc2 == NULL) {
- glxPriv->glxc = glxc1->nextPriv;
+ if (prev == NULL) {
+ glxc->drawPriv->drawGlxc = curr->nextDrawPriv;
} else {
- glxc2->nextPriv = glxc1->nextPriv;
+ prev->nextDrawPriv = curr->nextDrawPriv;
}
- glxc1->nextPriv = NULL;
- __glXUnrefDrawablePrivate(glxPriv);
+ curr->nextDrawPriv = NULL;
+ __glXUnrefDrawablePrivate(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;
+ __glXUnrefDrawablePrivate(glxc->readPriv);
break;
}
}
@@ -259,16 +285,18 @@ LockDP(__GLdrawablePrivate *glPriv, __GLcontext *gc)
assert((glxc->pendingState & __GLX_PENDING_RESIZE) == 0x0);
}
if (glxc->pendingState & __GLX_PENDING_DESTROY) {
- __GLXdrawablePrivate *glxPriv = glxc->glxPriv;
-
glxc->pendingState &= ~__GLX_PENDING_DESTROY;
- assert(glxPriv->xorigin == 0);
- assert(glxPriv->yorigin == 0);
- assert(glxPriv->width == 0);
- assert(glxPriv->height == 0);
+ assert(glxc->drawPriv->xorigin == 0);
+ assert(glxc->drawPriv->yorigin == 0);
+ assert(glxc->drawPriv->width == 0);
+ assert(glxc->drawPriv->height == 0);
+ assert(glxc->readPriv->xorigin == 0);
+ assert(glxc->readPriv->yorigin == 0);
+ assert(glxc->readPriv->width == 0);
+ assert(glxc->readPriv->height == 0);
(*glci->exports.notifyDestroy)(gc);
- __glXDeassociateContext(glxc, glxPriv);
+ __glXDeassociateContext(glxc);
assert((glxc->pendingState & __GLX_PENDING_DESTROY) == 0x0);
}
if (glxc->pendingState & __GLX_PENDING_SWAP) {
diff --git a/GL/glx/glxutil.h b/GL/glx/glxutil.h
index a4d40afc4..1f736f0f1 100644
--- a/GL/glx/glxutil.h
+++ b/GL/glx/glxutil.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/glxutil.h,v 1.3 2001/03/21 16:29:37 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/glxutil.h,v 1.4 2003/09/28 20:15:43 alanh Exp $ */
#ifndef _glxcmds_h_
#define _glxcmds_h_
@@ -46,8 +46,8 @@ extern void *__glXRealloc(void *addr, size_t newSize);
extern void __glXFree(void *ptr);
/* relate contexts with drawables */
-extern void __glXAssociateContext(__GLXcontext *glxc, __GLXdrawablePrivate *glxPriv);
-extern void __glXDeassociateContext(__GLXcontext *glxc, __GLXdrawablePrivate *glxPriv);
+extern void __glXAssociateContext(__GLXcontext *glxc);
+extern void __glXDeassociateContext(__GLXcontext *glxc);
/* drawable operation */
extern void __glXGetDrawableSize(__GLdrawablePrivate *glPriv,
diff --git a/GL/glx/impsize.h b/GL/glx/impsize.h
index f4c2778f4..c923441c2 100644
--- a/GL/glx/impsize.h
+++ b/GL/glx/impsize.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/impsize.h,v 1.3 2001/03/21 16:29:37 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/impsize.h,v 1.4 2003/09/28 20:15:43 alanh Exp $ */
#ifndef _impsize_h_
#define _impsize_h_
@@ -67,4 +67,6 @@ extern int __glTexParameterfv_size(GLenum e);
extern int __glTexParameteriv_size(GLenum e);
extern int __glEvalComputeK(GLenum target);
+extern int __glPointParameterfvARB_size(GLenum pname);
+
#endif /* _impsize_h_ */
diff --git a/GL/glx/render2.c b/GL/glx/render2.c
index 04bef0e8c..7189f9710 100644
--- a/GL/glx/render2.c
+++ b/GL/glx/render2.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/render2.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/render2.c,v 1.6 2003/10/28 22:50:18 tsi Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
@@ -82,18 +82,25 @@ void __glXDisp_Map2f(GLbyte *pc)
void __glXDisp_Map1d(GLbyte *pc)
{
- GLint order, k, compsize;
+ GLint order, k;
+#ifdef __GLX_ALIGN64
+ GLint compsize;
+#endif
GLenum target;
GLdouble u1, u2, *points;
target = *(GLenum*) (pc + 16);
order = *(GLint*) (pc + 20);
k = __glEvalComputeK(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;
@@ -118,18 +125,25 @@ void __glXDisp_Map1d(GLbyte *pc)
void __glXDisp_Map2d(GLbyte *pc)
{
GLdouble u1, u2, v1, v2, *points;
- GLint uorder, vorder, ustride, vstride, k, compsize;
+ 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 = __glEvalComputeK(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);
diff --git a/GL/glx/rensize.c b/GL/glx/rensize.c
index d93e8a206..0a3e537f8 100644
--- a/GL/glx/rensize.c
+++ b/GL/glx/rensize.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/rensize.c,v 1.5 2002/02/22 21:45:07 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/rensize.c,v 1.6 2003/09/28 20:15:43 alanh Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
@@ -267,109 +267,8 @@ int __glXPixelMapusvReqSize(GLbyte *pc, Bool swap )
int __glXImageSize( GLenum format, GLenum type, GLsizei w, GLsizei h,
GLint rowLength, GLint skipRows, GLint alignment )
{
- GLint bytesPerElement, elementsPerGroup, groupsPerRow;
- GLint groupSize, rowSize, padding;
-
- if (w < 0 || h < 0 ||
- (type == GL_BITMAP &&
- (format != GL_COLOR_INDEX && format != GL_STENCIL_INDEX))) {
- return -1;
- }
- if (w==0 || h==0) 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:
- elementsPerGroup = 1;
- break;
- case GL_RED:
- case GL_GREEN:
- case GL_BLUE:
- case GL_ALPHA:
- case GL_LUMINANCE:
- case GL_INTENSITY:
- elementsPerGroup = 1;
- break;
- 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:
- 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:
- 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;
- }
- return ((h + skipRows) * rowSize);
- }
+ return __glXImage3DSize( format, type, w, h, 1, 0, rowLength,
+ 0, skipRows, alignment );
}
/* XXX
@@ -406,8 +305,6 @@ int __glXImage3DSize( GLenum format, GLenum type, GLsizei w, GLsizei h,
case GL_COLOR_INDEX:
case GL_STENCIL_INDEX:
case GL_DEPTH_COMPONENT:
- elementsPerGroup = 1;
- break;
case GL_RED:
case GL_GREEN:
case GL_BLUE:
@@ -416,6 +313,13 @@ int __glXImage3DSize( GLenum format, GLenum type, GLsizei w, GLsizei h,
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;
@@ -451,6 +355,10 @@ int __glXImage3DSize( GLenum format, GLenum type, GLsizei w, GLsizei h,
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;
@@ -463,6 +371,9 @@ int __glXImage3DSize( GLenum format, GLenum type, GLsizei w, GLsizei h,
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;
@@ -998,3 +909,12 @@ int __glXColorTableParameterivReqSize(GLbyte *pc, Bool swap )
/* no difference between fv and iv versions */
return __glXColorTableParameterfvReqSize(pc, swap);
}
+
+int __glXPointParameterfvARBReqSize(GLbyte *pc, Bool swap )
+{
+ GLenum pname = *(GLenum *)(pc + 0);
+ if (swap) {
+ pname = SWAPL( pname );
+ }
+ return 4 * __glPointParameterfvARB_size( pname );
+}
diff --git a/GL/glx/rensizetab.c b/GL/glx/rensizetab.c
index 71a96d25c..c787366fa 100644
--- a/GL/glx/rensizetab.c
+++ b/GL/glx/rensizetab.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/rensizetab.c,v 1.3 2001/03/21 16:29:37 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/rensizetab.c,v 1.4 2003/09/28 20:15:43 alanh Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
@@ -35,8 +35,9 @@
*/
#include "glxserver.h"
+#include "g_disptab_EXT.h"
-__GLXrenderSizeData __glXRenderSizeTable[] = {
+__GLXrenderSizeData __glXRenderSizeTable[__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN_RENDER_OPCODE_EXT + 1] = {
/* no such opcode */ { 0, 0 },
/* CallList */ { 8, 0 },
/* CallLists */ { 12, __glXCallListsReqSize },
@@ -232,2090 +233,2107 @@ __GLXrenderSizeData __glXRenderSizeTable[] = {
/* PolygonOffset */ { 12, 0 },
/* no such opcode */ { 0, 0 },
/* Indexubv */ { 8, 0 },
- /* ColorSubTable */ { 44, __glXColorSubTableReqSize },
- /* CopyColorSubTable */ { 24, 0 },
- /* ActiveTextureARB */ { 8, 0 },
- /* MultiTexCoord1dvARB */ { 16, 0 },
- /* MultiTexCoord1fvARB */ { 12, 0 },
- /* MultiTexCoord1ivARB */ { 12, 0 },
- /* MultiTexCoord1svARB */ { 12, 0 },
- /* MultiTexCoord2dvARB */ { 24, 0 },
- /* MultiTexCoord2fvARB */ { 16, 0 },
- /* MultiTexCoord2ivARB */ { 16, 0 },
- /* MultiTexCoord2svARB */ { 12, 0 },
- /* MultiTexCoord3dvARB */ { 32, 0 },
- /* MultiTexCoord3fvARB */ { 20, 0 },
- /* MultiTexCoord3ivARB */ { 20, 0 },
- /* MultiTexCoord3svARB */ { 16, 0 },
- /* MultiTexCoord4dvARB */ { 40, 0 },
- /* MultiTexCoord4fvARB */ { 24, 0 },
- /* MultiTexCoord4ivARB */ { 24, 0 },
- /* MultiTexCoord4svARB */ { 16, 0 },
+ /* ColorSubTable */ { 44, __glXColorSubTableReqSize },
+ /* CopyColorSubTable */ { 24, 0 },
+ /* ActiveTextureARB */ { 8, 0 },
+ /* MultiTexCoord1dvARB */ { 16, 0 },
+ /* MultiTexCoord1fvARB */ { 12, 0 },
+ /* MultiTexCoord1ivARB */ { 12, 0 },
+ /* MultiTexCoord1svARB */ { 12, 0 },
+ /* MultiTexCoord2dvARB */ { 24, 0 },
+ /* MultiTexCoord2fvARB */ { 16, 0 },
+ /* MultiTexCoord2ivARB */ { 16, 0 },
+ /* MultiTexCoord2svARB */ { 12, 0 },
+ /* MultiTexCoord3dvARB */ { 32, 0 },
+ /* MultiTexCoord3fvARB */ { 20, 0 },
+ /* MultiTexCoord3ivARB */ { 20, 0 },
+ /* MultiTexCoord3svARB */ { 16, 0 },
+ /* MultiTexCoord4dvARB */ { 40, 0 },
+ /* MultiTexCoord4fvARB */ { 24, 0 },
+ /* MultiTexCoord4ivARB */ { 24, 0 },
+ /* MultiTexCoord4svARB 213 */ { 16, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode 220 */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* WindowPos3fARB 230 */ { 16, 0 },
};
-__GLXrenderSizeData __glXRenderSizeTable_EXT[] = {
- /* ColorTable */ { 44, __glXColorTableReqSize },
- /* ColorTableParameterfv */ { 12, __glXColorTableParameterfvReqSize },
- /* ColorTableParameteriv */ { 12, __glXColorTableParameterivReqSize },
- /* CopyColorTable */ { 24, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* no such opcode */ { 0, 0 },
- /* BlendColor */ { 20, 0 },
- /* BlendEquation */ { 8, 0 },
- /* no such opcode */ { 0, 0 },
- /* TexSubImage1D */ { 60, __glXTexSubImage1DReqSize },
- /* TexSubImage2D */ { 60, __glXTexSubImage2DReqSize },
- /* ConvolutionFilter1D */ { 48, __glXConvolutionFilter1DReqSize },
- /* ConvolutionFilter2D */ { 48, __glXConvolutionFilter2DReqSize },
- /* ConvolutionParameterf */ { 16, 0 },
- /* ConvolutionParameterfv */ { 12, __glXConvolutionParameterfvReqSize },
- /* ConvolutionParameteri */ { 16, 0 },
- /* ConvolutionParameteriv */ { 12, __glXConvolutionParameterivReqSize },
- /* CopyConvolutionFilter1D */ { 24, },
- /* CopyConvolutionFilter2D */ { 28, },
- /* SeparableFilter2D */ { 48, __glXSeparableFilter2DReqSize },
- /* Histogram */ { 20, },
- /* Minmax */ { 16, },
- /* ResetHistogram */ { 8, },
- /* ResetMinmax */ { 8, },
- /* TexImage3D */ { 84, __glXTexImage3DReqSize },
- /* TexSubImage3D */ { 92, __glXTexSubImage3DReqSize },
+__GLXrenderSizeData __glXRenderSizeTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN_RENDER_OPCODE_EXT + 1] = {
+ /* ColorTable 2053 */ { 44, __glXColorTableReqSize },
+ /* ColorTableParameterfv */ { 12, __glXColorTableParameterfvReqSize },
+ /* ColorTableParameteriv */ { 12, __glXColorTableParameterivReqSize },
+ /* CopyColorTable */ { 24, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* PointParameterfARB 2065 */ { 12, 0 },
+ /* PointParameterfvARB 2066 */ { 8, __glXPointParameterfvARBReqSize },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* BlendColor */ { 20, 0 },
+ /* BlendEquation */ { 8, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* TexSubImage1D */ { 60, __glXTexSubImage1DReqSize },
+ /* TexSubImage2D */ { 60, __glXTexSubImage2DReqSize },
+ /* ConvolutionFilter1D */ { 48, __glXConvolutionFilter1DReqSize },
+ /* ConvolutionFilter2D */ { 48, __glXConvolutionFilter2DReqSize },
+ /* ConvolutionParameterf */ { 16, 0 },
+ /* ConvolutionParameterfv */ { 12, __glXConvolutionParameterfvReqSize },
+ /* ConvolutionParameteri */ { 16, 0 },
+ /* ConvolutionParameteriv */ { 12, __glXConvolutionParameterivReqSize },
+ /* CopyConvolutionFilter1D */ { 24, },
+ /* CopyConvolutionFilter2D */ { 28, },
+ /* SeparableFilter2D */ { 48, __glXSeparableFilter2DReqSize },
+ /* Histogram */ { 20, },
+ /* Minmax */ { 16, },
+ /* ResetHistogram */ { 8, },
+ /* ResetMinmax */ { 8, },
+ /* TexImage3D */ { 84, __glXTexImage3DReqSize },
+ /* TexSubImage3D */ { 92, __glXTexSubImage3DReqSize },
/* DrawArrays */ { 16, __glXDrawArraysSize },
/* BindTexture */ { 12, 0 },
/* PrioritizeTextures */ { 8, __glXPrioritizeTexturesReqSize },
@@ -2323,5 +2341,102 @@ __GLXrenderSizeData __glXRenderSizeTable_EXT[] = {
/* CopyTexImage2D */ { 36, 0 },
/* CopyTexSubImage1D */ { 28, 0 },
/* CopyTexSubImage2D */ { 36, 0 },
- /* CopyTexSubImage3D */ { 40, 0 },
+ /* CopyTexSubImage3D 4123 */ { 40, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* no such opcode */ { 0, 0 },
+ /* ActiveStencilFaceEXT 4220 */ { 8, 0 },
};
diff --git a/GL/glx/singlesize.c b/GL/glx/singlesize.c
index 21652babd..efb13ee94 100644
--- a/GL/glx/singlesize.c
+++ b/GL/glx/singlesize.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/glx/singlesize.c,v 1.4 2002/02/22 21:45:07 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glx/singlesize.c,v 1.6 2003/11/06 18:37:56 tsi Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
@@ -35,6 +35,7 @@
*/
#include <GL/gl.h>
+#include "glxserver.h"
#include "singlesize.h"
/*
@@ -46,101 +47,7 @@
GLint __glReadPixels_size(GLenum format, GLenum type, GLint w, GLint h)
{
- GLint elements, esize;
- GLint rowsize, padding;
-
- if (w < 0 || h < 0) {
- return -1;
- }
- switch (format) {
- case GL_COLOR_INDEX:
- case GL_STENCIL_INDEX:
- case GL_DEPTH_COMPONENT:
- elements = 1;
- break;
- case GL_RED:
- case GL_GREEN:
- case GL_BLUE:
- case GL_ALPHA:
- case GL_LUMINANCE:
- case GL_INTENSITY:
- elements = 1;
- break;
- case GL_LUMINANCE_ALPHA:
- elements = 2;
- break;
- case GL_RGB:
- case GL_BGR:
- elements = 3;
- break;
- case GL_RGBA:
- case GL_BGRA:
- case GL_ABGR_EXT:
- elements = 4;
- break;
- default:
- return -1;
- }
- /*
- ** According to the GLX protocol, each row must be padded to a multiple of
- ** 4 bytes. 4 bytes also happens to be the default alignment in the pixel
- ** store modes of the GL.
- */
- switch (type) {
- case GL_BITMAP:
- if (format == GL_COLOR_INDEX || format == GL_STENCIL_INDEX) {
- rowsize = ((w * elements)+7)/8;
- padding = rowsize % 4;
- if (padding) {
- rowsize += 4 - padding;
- }
- return (rowsize * h);
- } else {
- return -1;
- }
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- esize = 1;
- break;
- case GL_UNSIGNED_BYTE_3_3_2:
- case GL_UNSIGNED_BYTE_2_3_3_REV:
- esize = 1;
- elements = 1;
- break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- esize = 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:
- esize = 2;
- elements = 1;
- break;
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_FLOAT:
- esize = 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:
- esize = 4;
- elements = 1;
- break;
- default:
- return -1;
- }
- rowsize = w * elements * esize;
- padding = rowsize % 4;
- if (padding) {
- rowsize += 4 - padding;
- }
- return (rowsize * h);
+ return __glXImage3DSize( format, type, w, h, 1, 0, 0, 0, 0, 4 );
}
GLint __glGetTexEnvfv_size(GLenum pname)
@@ -207,23 +114,43 @@ GLint __glGetTexGeniv_size(GLenum pname)
GLint __glGetTexParameterfv_size(GLenum pname)
{
switch (pname) {
+ case GL_TEXTURE_BORDER_COLOR:
+ return 4;
+
case GL_TEXTURE_WRAP_S:
case GL_TEXTURE_WRAP_T:
case GL_TEXTURE_WRAP_R:
- return 1;
case GL_TEXTURE_MIN_FILTER:
case GL_TEXTURE_MAG_FILTER:
- return 1;
- case GL_TEXTURE_BORDER_COLOR:
- return 4;
case GL_TEXTURE_PRIORITY:
- return 1;
case GL_TEXTURE_RESIDENT:
- return 1;
+
+ /* GL_SGIS_texture_lod / GL_EXT_texture_lod / GL 1.2 */
case GL_TEXTURE_MIN_LOD:
case GL_TEXTURE_MAX_LOD:
case GL_TEXTURE_BASE_LEVEL:
case GL_TEXTURE_MAX_LEVEL:
+
+ /* GL_SGIX_texture_lod_bias */
+ case GL_TEXTURE_LOD_BIAS_S_SGIX:
+ case GL_TEXTURE_LOD_BIAS_T_SGIX:
+ case GL_TEXTURE_LOD_BIAS_R_SGIX:
+
+ /* GL_ARB_shadow / GL 1.4 */
+ case GL_TEXTURE_COMPARE_MODE:
+ case GL_TEXTURE_COMPARE_FUNC:
+
+ /* GL_SGIX_shadow_ambient / GL_ARB_shadow_ambient */
+ case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
+
+ /* GL_SGIX_shadow */
+ case GL_TEXTURE_COMPARE_SGIX:
+ case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
+
+ /* GL_SGIX_texture_coordinate_clamp */
+ case GL_TEXTURE_MAX_CLAMP_S_SGIX:
+ case GL_TEXTURE_MAX_CLAMP_T_SGIX:
+ case GL_TEXTURE_MAX_CLAMP_R_SGIX:
return 1;
default:
@@ -911,6 +838,15 @@ GLint __glGet_size(GLenum sq)
case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
return 1;
+ case GL_OCCLUSION_TEST_RESULT_HP:
+ case GL_OCCLUSION_TEST_HP:
+ return 1;
+ case GL_PACK_INVERT_MESA:
+ return 1;
+ case GL_CULL_VERTEX_IBM:
+ return 1;
+ case GL_RASTER_POSITION_UNCLIPPED_IBM:
+ return 1;
default:
return -1;
}
@@ -964,82 +900,8 @@ GLint __glGetTexLevelParameteriv_size(GLenum pname)
GLint __glGetTexImage_size(GLenum target, GLint level, GLenum format,
GLenum type, GLint width, GLint height, GLint depth)
{
- GLint elements, esize;
- GLint padding, rowsize;
-
- switch (format) {
- case GL_RGBA:
- case GL_BGRA:
- case GL_ABGR_EXT:
- elements = 4;
- break;
- case GL_RGB:
- case GL_BGR:
- elements = 3;
- break;
- case GL_RED:
- case GL_GREEN:
- case GL_BLUE:
- case GL_ALPHA:
- case GL_LUMINANCE:
- case GL_INTENSITY:
- elements = 1;
- break;
- case GL_LUMINANCE_ALPHA:
- elements = 2;
- break;
- default:
- return -1;
- }
- switch (type) {
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- esize = 1;
- break;
- case GL_UNSIGNED_BYTE_3_3_2:
- case GL_UNSIGNED_BYTE_2_3_3_REV:
- esize = 1;
- elements = 1;
- break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- esize = 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:
- esize = 2;
- elements = 1;
- break;
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_FLOAT:
- esize = 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:
- esize = 4;
- elements = 1;
- break;
- default:
- return -1;
- }
- /*
- ** According to the GLX protocol, each row must be padded to a multiple of
- ** 4 bytes. 4 bytes also happens to be the default alignment in the pixel
- ** store modes of the GL.
- */
- rowsize = width * elements * esize;
- padding = rowsize % 4;
- if (padding) {
- rowsize += 4 - padding;
- }
- return (rowsize * height * depth);
+ return __glXImage3DSize( format, type, width, height, depth,
+ 0, 0, 0, 0, 4 );
}
GLint __glGetConvolutionParameteriv_size(GLenum pname)
diff --git a/XTrap/xtrapdi.c b/XTrap/xtrapdi.c
index 6aae14be2..d09b2120a 100644
--- a/XTrap/xtrapdi.c
+++ b/XTrap/xtrapdi.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/XTrap/xtrapdi.c,v 1.5 2002/09/18 17:11:47 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/XTrap/xtrapdi.c,v 1.7 2003/10/28 22:52:10 tsi Exp $ */
/*****************************************************************************
Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA
X11R6 Changes Copyright (c) 1994 by Robert Chesler of Absol-Puter, Hudson, NH.
@@ -152,7 +152,9 @@ 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
@@ -208,8 +210,9 @@ int XETrapDestroyEnv(pointer value, XID id)
next_key = XEKeyIsClear;
}
-
+#ifdef VECTORED_EVENTS
current_screen = -1L; /* Invalidate current screen */
+#endif
#ifdef VERBOSE
ErrorF("%s: Client '%d' Disconnected\n", XTrapExtName,
@@ -376,7 +379,7 @@ void DEC_XTRAPInit()
(XETrapType = CreateNewResourceType(XETrapDestroyEnv)) == 0L)
{
ErrorF("%s: Setup can't create new resource type (%d,%d,%d)\n",
- XTrapExtName, a,XETrapClass,XETrapType);
+ XTrapExtName, (int)a,(int)XETrapClass,(int)XETrapType);
return;
}
/* initialize the GetAvailable info reply here */
@@ -512,7 +515,9 @@ int XETrapCreateEnv(ClientPtr client)
}
}
+#ifdef VECTORED_EVENTS
current_screen = -1L; /* Invalidate current screen */
+#endif
#ifdef VERBOSE
if (status == Success)
diff --git a/Xext/EVI.c b/Xext/EVI.c
index aa3734b02..09aa03b64 100644
--- a/Xext/EVI.c
+++ b/Xext/EVI.c
@@ -21,7 +21,7 @@ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/Xext/EVI.c,v 3.9 2001/10/28 03:32:50 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/EVI.c,v 3.11 2003/10/28 23:08:43 tsi Exp $ */
#include "X.h"
#include "Xproto.h"
@@ -31,8 +31,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define _XEVI_SERVER_
#include "XEVIstr.h"
#include "EVIstruct.h"
+#include "modinit.h"
+
+#if 0
static unsigned char XEVIReqCode = 0;
+#endif
static EviPrivPtr eviPriv;
+
static int
ProcEVIQueryVersion(ClientPtr client)
{
@@ -74,6 +79,7 @@ ProcEVIQueryVersion(ClientPtr client)
visual1++; \
} \
}
+
static int
ProcEVIGetVisualInfo(ClientPtr client)
{
@@ -109,6 +115,7 @@ ProcEVIGetVisualInfo(ClientPtr client)
eviPriv->freeVisualInfo(eviInfo, conflict);
return (client->noClientException);
}
+
static int
ProcEVIDispatch(ClientPtr client)
{
@@ -122,15 +129,16 @@ ProcEVIDispatch(ClientPtr client)
return BadRequest;
}
}
+
static int
-SProcEVIQueryVersion(client)
-ClientPtr client;
+SProcEVIQueryVersion(ClientPtr client)
{
REQUEST(xEVIQueryVersionReq);
int n;
swaps(&stuff->length, n);
return ProcEVIQueryVersion(client);
}
+
static int
SProcEVIGetVisualInfo(ClientPtr client)
{
@@ -139,6 +147,7 @@ SProcEVIGetVisualInfo(ClientPtr client)
swaps(&stuff->length, n);
return ProcEVIGetVisualInfo(client);
}
+
static int
SProcEVIDispatch(ClientPtr client)
{
@@ -153,12 +162,14 @@ SProcEVIDispatch(ClientPtr client)
return BadRequest;
}
}
+
/*ARGSUSED*/
static void
EVIResetProc(ExtensionEntry *extEntry)
{
eviDDXReset();
}
+
/****************
* XEVIExtensionInit
*
@@ -167,15 +178,21 @@ EVIResetProc(ExtensionEntry *extEntry)
*
****************/
void
-EVIExtensionInit(void)
+EVIExtensionInit(INITARGS)
{
+#if 0
ExtensionEntry *extEntry;
+
if ((extEntry = AddExtension(EVINAME, 0, 0,
ProcEVIDispatch,
SProcEVIDispatch,
- EVIResetProc, StandardMinorOpcode)))
- {
+ EVIResetProc, StandardMinorOpcode))) {
XEVIReqCode = (unsigned char)extEntry->base;
+#else
+ if (AddExtension(EVINAME, 0, 0,
+ ProcEVIDispatch, SProcEVIDispatch,
+ EVIResetProc, StandardMinorOpcode)) {
+#endif
eviPriv = eviDDXInit();
}
}
diff --git a/Xext/EVIstruct.h b/Xext/EVIstruct.h
index 9bb24b0d2..dfe4423f8 100644
--- a/Xext/EVIstruct.h
+++ b/Xext/EVIstruct.h
@@ -21,33 +21,36 @@ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
+/* $XFree86: xc/programs/Xserver/Xext/EVIstruct.h,v 3.6 2003/11/17 22:20:26 dawes Exp $ */
+
#ifndef EVI_STRUCT_H
#define EVI_STRUCT_H
+
/*
******************************************************************************
** Per-ddx data
******************************************************************************
*/
+
typedef int (*GetVisualInfoProc)(
-#if NeedNestedPrototypes
VisualID32*,
int,
xExtendedVisualInfo**,
int*,
VisualID32**,
int*
-#endif
);
+
typedef void (*FreeVisualInfoProc)(
-#if NeedNestedPrototypes
xExtendedVisualInfo*,
VisualID32*
-#endif
);
typedef struct _EviPrivRec {
GetVisualInfoProc getVisualInfo;
FreeVisualInfoProc freeVisualInfo;
} EviPrivRec, *EviPrivPtr;
-extern EviPrivPtr eviDDXInit();
-extern void eviDDXReset();
+
+extern EviPrivPtr eviDDXInit(void);
+extern void eviDDXReset(void);
+
#endif /* EVI_STRUCT_H */
diff --git a/Xext/appgroup.c b/Xext/appgroup.c
index 37e6ee0bc..8718e3630 100644
--- a/Xext/appgroup.c
+++ b/Xext/appgroup.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/appgroup.c,v 1.9 2001/12/17 20:52:25 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/appgroup.c,v 1.11 2003/10/28 23:08:43 tsi Exp $ */
/*
Copyright 1996, 1998, 2001 The Open Group
@@ -39,6 +39,7 @@ from The Open Group.
#include "servermd.h"
#define _XAG_SERVER_
#include "Xagstr.h"
+#include "Xagsrv.h"
#define _SECURITY_SERVER
#include "security.h"
#include "Xfuncproto.h"
@@ -49,6 +50,9 @@ from The Open Group.
#include <stdio.h>
+#include "modinit.h"
+#include "appgroup.h"
+
typedef struct _AppGroupRec {
struct _AppGroupRec* next;
XID appgroupId;
@@ -65,11 +69,14 @@ typedef struct _AppGroupRec {
char* ConnectionInfo;
} AppGroupRec, *AppGroupPtr;
-static int ProcXagDispatch (), SProcXagDispatch ();
-static void XagResetProc ();
+static int ProcXagDispatch(ClientPtr client);
+static int SProcXagDispatch(ClientPtr client);
+static void XagResetProc(ExtensionEntry* extEntry);
+#if 0
static unsigned char XagReqCode = 0;
static int XagErrorBase;
+#endif
static int XagCallbackRefCount = 0;
static RESTYPE RT_APPGROUP;
@@ -80,9 +87,9 @@ extern char* ConnectionInfo;
extern int connBlockScreenStart;
static
-int XagAppGroupFree (what, id)
- pointer what;
- XID id; /* unused */
+int XagAppGroupFree(
+ pointer what,
+ XID id) /* unused */
{
int i;
AppGroupPtr pAppGrp = (AppGroupPtr) what;
@@ -113,10 +120,10 @@ int XagAppGroupFree (what, id)
}
/* static */
-void XagClientStateChange (pcbl, nulldata, calldata)
- CallbackListPtr* pcbl;
- pointer nulldata;
- pointer calldata;
+void XagClientStateChange(
+ CallbackListPtr* pcbl,
+ pointer nulldata,
+ pointer calldata)
{
SecurityAuthorizationPtr pAuth;
NewClientInfoRec* pci = (NewClientInfoRec*) calldata;
@@ -217,8 +224,9 @@ void XagClientStateChange (pcbl, nulldata, calldata)
}
void
-XagExtensionInit ()
+XagExtensionInit(INITARGS)
{
+#if 0
ExtensionEntry* extEntry;
if ((extEntry = AddExtension (XAGNAME,
@@ -230,14 +238,23 @@ XagExtensionInit ()
StandardMinorOpcode))) {
XagReqCode = (unsigned char)extEntry->base;
XagErrorBase = extEntry->errorBase;
+#else
+ if (AddExtension (XAGNAME,
+ 0,
+ XagNumberErrors,
+ ProcXagDispatch,
+ SProcXagDispatch,
+ XagResetProc,
+ StandardMinorOpcode)) {
+#endif
RT_APPGROUP = CreateNewResourceType (XagAppGroupFree);
}
}
/*ARGSUSED*/
static
-void XagResetProc (extEntry)
- ExtensionEntry* extEntry;
+void XagResetProc(
+ ExtensionEntry* extEntry)
{
DeleteCallback (&ClientStateCallback, XagClientStateChange, NULL);
XagCallbackRefCount = 0;
@@ -245,8 +262,8 @@ void XagResetProc (extEntry)
}
static
-int ProcXagQueryVersion (client)
- register ClientPtr client;
+int ProcXagQueryVersion(
+ register ClientPtr client)
{
/* REQUEST (xXagQueryVersionReq); */
xXagQueryVersionReply rep;
@@ -269,11 +286,11 @@ int ProcXagQueryVersion (client)
}
static
-void ProcessAttr (pAppGrp, client, attrib_mask, attribs)
- AppGroupPtr pAppGrp;
- ClientPtr client;
- unsigned int attrib_mask;
- CARD32* attribs;
+void ProcessAttr(
+ AppGroupPtr pAppGrp,
+ ClientPtr client,
+ unsigned int attrib_mask,
+ CARD32* attribs)
{
int i;
@@ -307,8 +324,8 @@ void ProcessAttr (pAppGrp, client, attrib_mask, attribs)
}
static
-void CreateConnectionInfo (pAppGrp)
- AppGroupPtr pAppGrp;
+void CreateConnectionInfo(
+ AppGroupPtr pAppGrp)
{
xWindowRoot* rootp;
xWindowRoot* roots[MAXSCREENS];
@@ -368,11 +385,11 @@ void CreateConnectionInfo (pAppGrp)
}
static
-AppGroupPtr CreateAppGroup (client, appgroupId, attrib_mask, attribs)
- ClientPtr client;
- XID appgroupId;
- unsigned int attrib_mask;
- CARD32* attribs;
+AppGroupPtr CreateAppGroup(
+ ClientPtr client,
+ XID appgroupId,
+ unsigned int attrib_mask,
+ CARD32* attribs)
{
AppGroupPtr pAppGrp;
@@ -396,10 +413,10 @@ AppGroupPtr CreateAppGroup (client, appgroupId, attrib_mask, attribs)
}
static
-int AttrValidate (client, attrib_mask, pAppGrp)
- ClientPtr client;
- int attrib_mask;
- AppGroupPtr pAppGrp;
+int AttrValidate(
+ ClientPtr client,
+ int attrib_mask,
+ AppGroupPtr pAppGrp)
{
WindowPtr pWin;
int idepth, ivids, found;
@@ -439,8 +456,8 @@ int AttrValidate (client, attrib_mask, pAppGrp)
}
/* static */
-int ProcXagCreate (client)
- register ClientPtr client;
+int ProcXagCreate (
+ register ClientPtr client)
{
REQUEST (xXagCreateReq);
AppGroupPtr pAppGrp;
@@ -471,8 +488,8 @@ int ProcXagCreate (client)
}
/* static */
-int ProcXagDestroy (client)
- register ClientPtr client;
+int ProcXagDestroy(
+ register ClientPtr client)
{
AppGroupPtr pAppGrp;
REQUEST (xXagDestroyReq);
@@ -488,8 +505,8 @@ int ProcXagDestroy (client)
}
static
-int ProcXagGetAttr (client)
- register ClientPtr client;
+int ProcXagGetAttr(
+ register ClientPtr client)
{
AppGroupPtr pAppGrp;
REQUEST (xXagGetAttrReq);
@@ -524,8 +541,8 @@ int ProcXagGetAttr (client)
}
static
-int ProcXagQuery (client)
- register ClientPtr client;
+int ProcXagQuery(
+ register ClientPtr client)
{
ClientPtr pClient;
AppGroupPtr pAppGrp;
@@ -556,8 +573,8 @@ int ProcXagQuery (client)
}
static
-int ProcXagCreateAssoc (client)
- register ClientPtr client;
+int ProcXagCreateAssoc(
+ register ClientPtr client)
{
REQUEST (xXagCreateAssocReq);
@@ -579,8 +596,8 @@ int ProcXagCreateAssoc (client)
}
static
-int ProcXagDestroyAssoc (client)
- register ClientPtr client;
+int ProcXagDestroyAssoc(
+ register ClientPtr client)
{
/* REQUEST (xXagDestroyAssocReq); */
@@ -590,8 +607,8 @@ int ProcXagDestroyAssoc (client)
}
static
-int ProcXagDispatch (client)
- register ClientPtr client;
+int ProcXagDispatch (
+ register ClientPtr client)
{
REQUEST (xReq);
switch (stuff->data)
@@ -616,8 +633,8 @@ int ProcXagDispatch (client)
}
static
-int SProcXagQueryVersion (client)
- register ClientPtr client;
+int SProcXagQueryVersion(
+ register ClientPtr client)
{
register int n;
REQUEST(xXagQueryVersionReq);
@@ -626,8 +643,8 @@ int SProcXagQueryVersion (client)
}
static
-int SProcXagCreate (client)
- ClientPtr client;
+int SProcXagCreate(
+ ClientPtr client)
{
register int n;
REQUEST (xXagCreateReq);
@@ -640,8 +657,8 @@ int SProcXagCreate (client)
}
static
-int SProcXagDestroy (client)
- ClientPtr client;
+int SProcXagDestroy(
+ ClientPtr client)
{
register int n;
REQUEST (xXagDestroyReq);
@@ -652,8 +669,8 @@ int SProcXagDestroy (client)
}
static
-int SProcXagGetAttr (client)
- ClientPtr client;
+int SProcXagGetAttr(
+ ClientPtr client)
{
register int n;
REQUEST (xXagGetAttrReq);
@@ -664,8 +681,8 @@ int SProcXagGetAttr (client)
}
static
-int SProcXagQuery (client)
- ClientPtr client;
+int SProcXagQuery(
+ ClientPtr client)
{
register int n;
REQUEST (xXagQueryReq);
@@ -676,8 +693,8 @@ int SProcXagQuery (client)
}
static
-int SProcXagCreateAssoc (client)
- ClientPtr client;
+int SProcXagCreateAssoc(
+ ClientPtr client)
{
register int n;
REQUEST (xXagCreateAssocReq);
@@ -690,8 +707,8 @@ int SProcXagCreateAssoc (client)
}
static
-int SProcXagDestroyAssoc (client)
- ClientPtr client;
+int SProcXagDestroyAssoc(
+ ClientPtr client)
{
register int n;
REQUEST (xXagDestroyAssocReq);
@@ -702,8 +719,8 @@ int SProcXagDestroyAssoc (client)
}
static
-int SProcXagDispatch (client)
- register ClientPtr client;
+int SProcXagDispatch(
+ register ClientPtr client)
{
REQUEST(xReq);
switch (stuff->data)
@@ -727,20 +744,20 @@ int SProcXagDispatch (client)
}
}
-Colormap XagDefaultColormap (client)
- ClientPtr client;
+Colormap XagDefaultColormap(
+ ClientPtr client)
{
return (client->appgroup ? client->appgroup->default_colormap : None);
}
-VisualID XagRootVisual (client)
- ClientPtr client;
+VisualID XagRootVisual(
+ ClientPtr client)
{
return (client->appgroup ? client->appgroup->root_visual : 0);
}
-ClientPtr XagLeader (client)
- ClientPtr client;
+ClientPtr XagLeader(
+ ClientPtr client)
{
return (client->appgroup ? client->appgroup->leader : NULL);
}
@@ -750,9 +767,9 @@ ClientPtr XagLeader (client)
* 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 (client, pParent)
- ClientPtr client;
- WindowPtr pParent;
+Bool XagIsControlledRoot(
+ ClientPtr client,
+ WindowPtr pParent)
{
if (client->appgroup) {
if (client->appgroup->single_screen &&
@@ -766,11 +783,11 @@ Bool XagIsControlledRoot (client, pParent)
return FALSE;
}
-void XagConnectionInfo (client, conn_prefix, conn_info, num_screen)
- ClientPtr client;
- xConnSetupPrefix** conn_prefix;
- char** conn_info;
- int* num_screen;
+void XagConnectionInfo(
+ ClientPtr client,
+ xConnSetupPrefix** conn_prefix,
+ char** conn_info,
+ int* num_screen)
{
if (client->appgroup && client->appgroup->ConnectionInfo) {
*conn_prefix = &client->appgroup->connSetupPrefix;
@@ -779,15 +796,15 @@ void XagConnectionInfo (client, conn_prefix, conn_info, num_screen)
}
}
-XID XagId (client)
- ClientPtr client;
+XID XagId(
+ ClientPtr client)
{
return (client->appgroup ? client->appgroup->appgroupId : 0);
}
-void XagGetDeltaInfo (client, buf)
- ClientPtr client;
- CARD32* buf;
+void XagGetDeltaInfo(
+ ClientPtr client,
+ CARD32* buf)
{
*buf++ = (CARD32) client->appgroup->default_root;
*buf++ = (CARD32) client->appgroup->root_visual;
@@ -796,8 +813,8 @@ void XagGetDeltaInfo (client, buf)
*buf = (CARD32) client->appgroup->white_pixel;
}
-void XagCallClientStateChange (client)
- ClientPtr client;
+void XagCallClientStateChange(
+ ClientPtr client)
{
if (appGrpList) {
NewClientInfoRec clientinfo;
diff --git a/Xext/bigreq.c b/Xext/bigreq.c
index 0d2dc5178..ae73783d9 100644
--- a/Xext/bigreq.c
+++ b/Xext/bigreq.c
@@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/programs/Xserver/Xext/bigreq.c,v 3.5 2001/12/14 19:58:48 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/bigreq.c,v 3.9 2003/11/17 22:20:26 dawes Exp $ */
#define NEED_EVENTS
#include "X.h"
@@ -36,26 +36,35 @@ from The Open Group.
#include "dixstruct.h"
#include "extnsionst.h"
#include "bigreqstr.h"
+#include "opaque.h"
+#include "modinit.h"
+#if 0
static unsigned char XBigReqCode;
+#endif
static void BigReqResetProc(
-#if NeedFunctionPrototypes
ExtensionEntry * /* extEntry */
-#endif
);
static DISPATCH_PROC(ProcBigReqDispatch);
void
-BigReqExtensionInit()
+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);
}
@@ -84,7 +93,7 @@ ProcBigReqDispatch (client)
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
- rep.max_request_size = MAX_BIG_REQUEST_SIZE;
+ rep.max_request_size = maxBigRequestSize;
if (client->swapped) {
swaps(&rep.sequenceNumber, n);
swapl(&rep.max_request_size, n);
diff --git a/Xext/cup.c b/Xext/cup.c
index 2159417bb..70c6fa610 100644
--- a/Xext/cup.c
+++ b/Xext/cup.c
@@ -24,7 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
-/* $XFree86: xc/programs/Xserver/Xext/cup.c,v 1.10 2001/12/14 19:58:48 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/cup.c,v 1.12 2003/10/28 23:08:43 tsi Exp $ */
#define NEED_REPLIES
#define NEED_EVENTS
@@ -47,11 +47,16 @@ in this Software without prior written authorization from The Open Group.
#include "xf86_ansic.h"
#endif
-static int ProcDispatch (), SProcDispatch ();
-static void ResetProc ();
+#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
@@ -123,8 +128,9 @@ static xColorItem citems[] = {
#define NUM_DESKTOP_COLORS (sizeof citems / sizeof citems[0])
void
-XcupExtensionInit ()
+XcupExtensionInit (INITARGS)
{
+#if 0
ExtensionEntry* extEntry;
if ((extEntry = AddExtension (XCUPNAME,
@@ -137,20 +143,29 @@ XcupExtensionInit ()
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 (extEntry)
- ExtensionEntry* extEntry;
+void ResetProc(
+ ExtensionEntry* extEntry)
{
}
static
-int ProcQueryVersion (client)
- register ClientPtr client;
+int ProcQueryVersion(
+ register ClientPtr client)
{
/* REQUEST (xXcupQueryVersionReq); */
xXcupQueryVersionReply rep;
@@ -173,8 +188,8 @@ int ProcQueryVersion (client)
}
static
-int ProcGetReservedColormapEntries (client)
- register ClientPtr client;
+int ProcGetReservedColormapEntries(
+ register ClientPtr client)
{
REQUEST (xXcupGetReservedColormapEntriesReq);
xXcupGetReservedColormapEntriesReply rep;
@@ -206,8 +221,8 @@ int ProcGetReservedColormapEntries (client)
}
static
-int ProcStoreColors (client)
- register ClientPtr client;
+int ProcStoreColors(
+ register ClientPtr client)
{
REQUEST (xXcupStoreColorsReq);
ColormapPtr pcmp;
@@ -265,8 +280,8 @@ int ProcStoreColors (client)
}
static
-int ProcDispatch (client)
- register ClientPtr client;
+int ProcDispatch(
+ register ClientPtr client)
{
REQUEST (xReq);
switch (stuff->data)
@@ -283,8 +298,8 @@ int ProcDispatch (client)
}
static
-int SProcQueryVersion (client)
- register ClientPtr client;
+int SProcQueryVersion(
+ register ClientPtr client)
{
register int n;
@@ -294,8 +309,8 @@ int SProcQueryVersion (client)
}
static
-int SProcGetReservedColormapEntries (client)
- ClientPtr client;
+int SProcGetReservedColormapEntries(
+ ClientPtr client)
{
register int n;
@@ -307,8 +322,8 @@ int SProcGetReservedColormapEntries (client)
}
static
-int SProcXcupStoreColors (client)
- ClientPtr client;
+int SProcXcupStoreColors(
+ ClientPtr client)
{
register int n;
int count;
@@ -325,8 +340,8 @@ int SProcXcupStoreColors (client)
}
static
-int SProcDispatch (client)
- register ClientPtr client;
+int SProcDispatch(
+ register ClientPtr client)
{
REQUEST(xReq);
switch (stuff->data)
diff --git a/Xext/dpms.c b/Xext/dpms.c
index 23c377fb4..584c32b22 100644
--- a/Xext/dpms.c
+++ b/Xext/dpms.c
@@ -33,7 +33,7 @@ Equipment Corporation.
* @(#)RCSfile: dpms.c,v Revision: 1.1.4.5 (DEC) Date: 1996/03/04 15:27:00
*/
-/* $XFree86: xc/programs/Xserver/Xext/dpms.c,v 3.9 2001/10/28 03:32:50 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/dpms.c,v 3.11 2003/10/28 23:08:43 tsi Exp $ */
#include "X.h"
#include "Xproto.h"
@@ -46,8 +46,11 @@ Equipment Corporation.
#include "dpms.h"
#include "dpmsstr.h"
#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);
@@ -69,15 +72,20 @@ static DISPATCH_PROC(SProcDPMSCapable);
static void DPMSResetProc(ExtensionEntry* extEntry);
void
-DPMSExtensionInit()
+DPMSExtensionInit(INITARGS)
{
+#if 0
ExtensionEntry *extEntry;
if ((extEntry = AddExtension(DPMSExtensionName, 0, 0,
ProcDPMSDispatch, SProcDPMSDispatch,
DPMSResetProc, StandardMinorOpcode)))
DPMSCode = (unsigned char)extEntry->base;
- return;
+#else
+ (void) AddExtension(DPMSExtensionName, 0, 0,
+ ProcDPMSDispatch, SProcDPMSDispatch,
+ DPMSResetProc, StandardMinorOpcode);
+#endif
}
/*ARGSUSED*/
diff --git a/Xext/dpmsproc.h b/Xext/dpmsproc.h
index 1b045cc7c..b8260491e 100644
--- a/Xext/dpmsproc.h
+++ b/Xext/dpmsproc.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/dpmsproc.h,v 1.3 2001/10/28 03:32:50 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/dpmsproc.h,v 1.4 2003/07/16 01:38:29 dawes Exp $ */
/* Prototypes for functions that the DDX must provide */
@@ -6,7 +6,7 @@
#define _DPMSPROC_H_
void DPMSSet(int level);
-int DPMSGet(int *level);
+int DPMSGet(int *plevel);
Bool DPMSSupported(void);
#endif
diff --git a/Xext/dpmsstubs.c b/Xext/dpmsstubs.c
index ac1ee352a..bc85c16ca 100644
--- a/Xext/dpmsstubs.c
+++ b/Xext/dpmsstubs.c
@@ -26,10 +26,12 @@ dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/Xext/dpmsstubs.c,v 3.4 2001/01/17 22:13:15 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/dpmsstubs.c,v 3.5 2003/07/16 01:38:29 dawes Exp $ */
typedef int Bool;
+#include "dpmsproc.h"
+
#define FALSE 0
Bool DPMSSupported(void)
@@ -37,7 +39,7 @@ Bool DPMSSupported(void)
return FALSE;
}
-int DPSMGet(int *level)
+int DPMSGet(int *plevel)
{
return -1;
}
diff --git a/Xext/fontcache.c b/Xext/fontcache.c
index cad7dcfba..7c3f5a800 100644
--- a/Xext/fontcache.c
+++ b/Xext/fontcache.c
@@ -27,7 +27,7 @@
*
* Id: fontcache.c,v 1.12 1999/01/31 13:47:45 akiyama Exp $
*/
-/* $XFree86: xc/programs/Xserver/Xext/fontcache.c,v 1.5 2000/02/23 20:29:39 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/fontcache.c,v 1.8 2003/11/17 22:20:26 dawes Exp $ */
/* THIS IS NOT AN X CONSORTIUM STANDARD */
@@ -47,13 +47,12 @@
#include "Xfuncproto.h"
#include "swaprep.h"
+#include "modinit.h"
static int miscErrorBase;
static void FontCacheResetProc(
-#if NeedFunctionPrototypes
ExtensionEntry* /* extEntry */
-#endif
);
static DISPATCH_PROC(ProcFontCacheDispatch);
@@ -67,11 +66,12 @@ static DISPATCH_PROC(SProcFontCacheGetCacheStatistics);
static DISPATCH_PROC(SProcFontCacheQueryVersion);
static DISPATCH_PROC(SProcFontCacheChangeCacheSettings);
+#if 0
static unsigned char FontCacheReqCode = 0;
-
+#endif
void
-FontCacheExtensionInit()
+FontCacheExtensionInit(INITARGS)
{
ExtensionEntry* extEntry;
@@ -83,7 +83,9 @@ FontCacheExtensionInit()
SProcFontCacheDispatch,
FontCacheResetProc,
StandardMinorOpcode))) {
+#if 0
FontCacheReqCode = (unsigned char)extEntry->base;
+#endif
miscErrorBase = extEntry->errorBase;
}
}
diff --git a/Xext/mbuf.c b/Xext/mbuf.c
index 16a59e58e..4308037be 100644
--- a/Xext/mbuf.c
+++ b/Xext/mbuf.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/mbuf.c,v 3.14 2001/12/14 19:58:49 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/mbuf.c,v 3.16 2003/11/17 22:20:26 dawes Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
@@ -61,50 +61,40 @@ in this Software without prior written authorization from The Open Group.
#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 (
-#if NeedFunctionPrototypes
MultibuffersPtr * /* ppMultibuffers */,
MultibufferPtr * /* pMultibuffer */,
int /* nbuf */
-#endif
);
static Bool QueueDisplayRequest (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
TimeStamp /* activateTime */
-#endif
);
static void BumpTimeStamp (
-#if NeedFunctionPrototypes
TimeStamp * /* ts */,
CARD32 /* inc */
-#endif
);
static void AliasMultibuffer (
-#if NeedFunctionPrototypes
MultibuffersPtr /* pMultibuffers */,
int /* i */
-#endif
);
static void RecalculateMultibufferOtherEvents (
-#if NeedFunctionPrototypes
MultibufferPtr /* pMultibuffer */
-#endif
);
static int EventSelectForMultibuffer(
-#if NeedFunctionPrototypes
MultibufferPtr /* pMultibuffer */,
ClientPtr /* client */,
Mask /* mask */
-#endif
);
/*
@@ -113,10 +103,8 @@ static int EventSelectForMultibuffer(
*/
RESTYPE MultibufferDrawableResType;
static int MultibufferDrawableDelete (
-#if NeedFunctionPrototypes
pointer /* value */,
XID /* id */
-#endif
);
/*
* The per-buffer data can be found as a resource with this type.
@@ -125,10 +113,8 @@ static int MultibufferDrawableDelete (
*/
static RESTYPE MultibufferResType;
static int MultibufferDelete (
-#if NeedFunctionPrototypes
pointer /* value */,
XID /* id */
-#endif
);
/*
@@ -137,10 +123,8 @@ static int MultibufferDelete (
*/
static RESTYPE MultibuffersResType;
static int MultibuffersDelete (
-#if NeedFunctionPrototypes
pointer /* value */,
XID /* id */
-#endif
);
/*
@@ -149,10 +133,8 @@ static int MultibuffersDelete (
*/
static RESTYPE OtherClientResType;
static int OtherClientDelete (
-#if NeedFunctionPrototypes
pointer /* value */,
XID /* id */
-#endif
);
/****************
@@ -187,44 +169,32 @@ static DISPATCH_PROC(SProcSetBufferAttributes);
static DISPATCH_PROC(SProcSetMBufferAttributes);
static void MultibufferResetProc(
-#if NeedFunctionPrototypes
ExtensionEntry * /* extEntry */
-#endif
);
static void SClobberNotifyEvent(
-#if NeedFunctionPrototypes
xMbufClobberNotifyEvent * /* from */,
xMbufClobberNotifyEvent * /* to */
-# endif
);
static void SUpdateNotifyEvent(
-#if NeedFunctionPrototypes
xMbufUpdateNotifyEvent * /* from */,
xMbufUpdateNotifyEvent * /* to */
-#endif
);
static Bool MultibufferPositionWindow(
-#if NeedFunctionPrototypes
WindowPtr /* pWin */,
int /* x */,
int /* y */
-#endif
);
static void SetupBackgroundPainter (
-#if NeedFunctionPrototypes
WindowPtr /* pWin */,
GCPtr /* pGC */
-#endif
);
static int DeliverEventsToMultibuffer (
-#if NeedFunctionPrototypes
MultibufferPtr /* pMultibuffer */,
xEvent * /* pEvents */,
int /* count */,
Mask /* filter */
-#endif
);
void
@@ -279,7 +249,9 @@ MultibufferExtensionInit()
ProcMultibufferDispatch, SProcMultibufferDispatch,
MultibufferResetProc, StandardMinorOpcode)))
{
+#if 0
MultibufferReqCode = (unsigned char)extEntry->base;
+#endif
MultibufferEventBase = extEntry->eventBase;
MultibufferErrorBase = extEntry->errorBase;
EventSwapVector[MultibufferEventBase + MultibufferClobberNotify] = (EventSwapPtr) SClobberNotifyEvent;
diff --git a/Xext/mbufbf.c b/Xext/mbufbf.c
index 925745712..99400c90a 100644
--- a/Xext/mbufbf.c
+++ b/Xext/mbufbf.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/mbufbf.c,v 3.4 2001/12/14 19:58:49 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/mbufbf.c,v 3.6 2003/11/10 18:21:42 tsi Exp $ */
/*
Copyright 1989, 1998 The Open Group
@@ -243,7 +243,7 @@ bufMultibufferInit(pScreen, pMBScreen)
pMBPriv->rgnChanged = TRUE;
REGION_INIT(pScreen, &pMBPriv->backBuffer, &box, 1);
REGION_INIT(pScreen, &pMBPriv->subtractRgn, &box, 1);
- REGION_INIT(pScreen, &pMBPriv->unionRgn, NullBox, 0);
+ REGION_NULL(pScreen, &pMBPriv->unionRgn);
/* Misc functions */
pMBPriv->CopyBufferBits = bufCopyBufferBitsFunc[pScreen->myNum];
@@ -778,7 +778,7 @@ bufPostValidateTree(pParent, pChild, kind)
pUnionRgn);
/* Paint gained and lost backbuffer areas in select plane */
- REGION_INIT(pScreen, &exposed, NullBox, 0);
+ REGION_NULL(pScreen, &exposed);
REGION_SUBTRACT(pScreen, &exposed, pSubtractRgn, pUnionRgn);
(* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane,
&exposed, FRONT_BUFFER);
@@ -793,33 +793,6 @@ bufPostValidateTree(pParent, pChild, kind)
}
}
-/* XXX - Knows region internals. */
-
-static Bool
-RegionsEqual(reg1, reg2)
- RegionPtr reg1;
- RegionPtr reg2;
-{
- int i;
- BoxPtr rects1, rects2;
-
- if (reg1->extents.x1 != reg2->extents.x1) return FALSE;
- if (reg1->extents.x2 != reg2->extents.x2) return FALSE;
- if (reg1->extents.y1 != reg2->extents.y1) return FALSE;
- if (reg1->extents.y2 != reg2->extents.y2) return FALSE;
- if (REGION_NUM_RECTS(reg1) != REGION_NUM_RECTS(reg2)) return FALSE;
-
- rects1 = REGION_RECTS(reg1);
- rects2 = REGION_RECTS(reg2);
- for (i = 0; i != REGION_NUM_RECTS(reg1); i++) {
- if (rects1[i].x1 != rects2[i].x1) return FALSE;
- if (rects1[i].x2 != rects2[i].x2) return FALSE;
- if (rects1[i].y1 != rects2[i].y1) return FALSE;
- if (rects1[i].y2 != rects2[i].y2) return FALSE;
- }
- return TRUE;
-}
-
/*
* If the window is multibuffered and displaying the backbuffer,
* add the old clipList to the subtractRgn and add the new clipList
@@ -849,7 +822,7 @@ bufClipNotify(pWin, dx,dy)
{
RegionPtr pOldClipList = (RegionPtr) pMBWindow->devPrivate.ptr;
- if (! RegionsEqual(pOldClipList, &pWin->clipList))
+ if (! REGION_EQUAL(pScreen, pOldClipList, &pWin->clipList))
{
if (pMBWindow->displayedMultibuffer == BACK_BUFFER)
{
@@ -940,8 +913,8 @@ bufWindowExposures(pWin, prgn, other_exposed)
/* miWindowExposures munges prgn and other_exposed. */
if (handleBuffers)
{
- REGION_INIT(pScreen, &tmp_rgn, NullBox, 0);
- REGION_COPY(pScreen, &tmp_rgn,prgn);
+ REGION_NULL(pScreen, &tmp_rgn);
+ REGION_COPY(pScreen, &tmp_rgn, prgn);
}
UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, WindowExposures);
diff --git a/Xext/mitmisc.c b/Xext/mitmisc.c
index b6038edba..b911d7ff5 100644
--- a/Xext/mitmisc.c
+++ b/Xext/mitmisc.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/mitmisc.c,v 3.4 2001/12/14 19:58:49 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/mitmisc.c,v 3.7 2003/11/17 22:20:26 dawes Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
@@ -38,15 +38,16 @@ in this Software without prior written authorization from The Open Group.
#include "extnsionst.h"
#define _MITMISC_SERVER_
#include "mitmiscstr.h"
+#include "modinit.h"
extern Bool permitOldBugs;
+#if 0
static unsigned char MITReqCode;
+#endif
static void MITResetProc(
-#if NeedFunctionPrototypes
ExtensionEntry * /* extEntry */
-#endif
);
static DISPATCH_PROC(ProcMITDispatch);
@@ -57,14 +58,20 @@ static DISPATCH_PROC(SProcMITGetBugMode);
static DISPATCH_PROC(SProcMITSetBugMode);
void
-MITMiscExtensionInit()
+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*/
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index fb0b9c541..89a8a2d2e 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -23,7 +23,7 @@ shall not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/Xext/panoramiX.c,v 3.32 2002/08/01 00:30:34 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/panoramiX.c,v 3.38 2003/11/10 18:21:43 tsi Exp $ */
#define NEED_REPLIES
#include <stdio.h>
@@ -50,9 +50,12 @@ Equipment Corporation.
#ifdef RENDER
#include "picturestr.h"
#endif
+#include "modinit.h"
+#if 0
static unsigned char PanoramiXReqCode = 0;
+#endif
/*
* PanoramiX data declarations
*/
@@ -62,14 +65,13 @@ int PanoramiXPixHeight = 0;
int PanoramiXNumScreens = 0;
PanoramiXData *panoramiXdataPtr = NULL;
+RegionRec PanoramiXScreenRegion = {{0, 0, 0, 0}, NULL};
+static int PanoramiXNumDepths;
+static DepthPtr PanoramiXDepths;
+static int PanoramiXNumVisuals;
+static VisualPtr PanoramiXVisuals;
-RegionRec PanoramiXScreenRegion;
-
-int PanoramiXNumDepths;
-DepthPtr PanoramiXDepths;
-int PanoramiXNumVisuals;
-VisualPtr PanoramiXVisuals;
/* We support at most 256 visuals */
XID *PanoramiXVisualTable = NULL;
@@ -79,57 +81,23 @@ unsigned long XRT_PIXMAP;
unsigned long XRT_GC;
unsigned long XRT_COLORMAP;
-
-int (* SavedProcVector[256]) ();
-ScreenInfo *GlobalScrInfo;
-
-static int panoramiXGeneration;
-static int ProcPanoramiXDispatch();
/*
* Function prototypes
*/
+static int panoramiXGeneration;
+static int ProcPanoramiXDispatch(ClientPtr client);
+
static void PanoramiXResetProc(ExtensionEntry*);
/*
- * External references for data variables
+ * External references for functions and data variables
*/
-extern int SProcPanoramiXDispatch();
-extern char *ConnectionInfo;
-extern int connBlockScreenStart;
-extern xConnSetupPrefix connSetupPrefix;
-
-/*
- * Server dispatcher function replacements
- */
+#include "panoramiXh.h"
-int PanoramiXCreateWindow(), PanoramiXChangeWindowAttributes();
-int PanoramiXDestroyWindow(), PanoramiXDestroySubwindows();
-int PanoramiXChangeSaveSet(), PanoramiXReparentWindow();
-int PanoramiXMapWindow(), PanoramiXMapSubwindows();
-int PanoramiXUnmapWindow(), PanoramiXUnmapSubwindows();
-int PanoramiXConfigureWindow(), PanoramiXCirculateWindow();
-int PanoramiXGetGeometry(), PanoramiXTranslateCoords();
-int PanoramiXCreatePixmap(), PanoramiXFreePixmap();
-int PanoramiXCreateGC(), PanoramiXChangeGC();
-int PanoramiXCopyGC(), PanoramiXCopyColormapAndFree();
-int PanoramiXSetDashes(), PanoramiXSetClipRectangles();
-int PanoramiXFreeGC(), PanoramiXClearToBackground();
-int PanoramiXCopyArea(), PanoramiXCopyPlane();
-int PanoramiXPolyPoint(), PanoramiXPolyLine();
-int PanoramiXPolySegment(), PanoramiXPolyRectangle();
-int PanoramiXPolyArc(), PanoramiXFillPoly();
-int PanoramiXPolyFillArc(), PanoramiXPolyFillRectangle();
-int PanoramiXPutImage(), PanoramiXGetImage();
-int PanoramiXPolyText8(), PanoramiXPolyText16();
-int PanoramiXImageText8(), PanoramiXImageText16();
-int PanoramiXCreateColormap(), PanoramiXFreeColormap();
-int PanoramiXInstallColormap(), PanoramiXUninstallColormap();
-int PanoramiXAllocColor(), PanoramiXAllocNamedColor();
-int PanoramiXAllocColorCells(), PanoramiXStoreNamedColor();
-int PanoramiXFreeColors(), PanoramiXStoreColors();
-int PanoramiXAllocColorPlanes();
+int (* SavedProcVector[256]) (ClientPtr client) = { NULL, };
+ScreenInfo *GlobalScrInfo = NULL;
static int PanoramiXGCIndex = -1;
static int PanoramiXScreenIndex = -1;
@@ -460,7 +428,7 @@ void PanoramiXExtensionInit(int argc, char *argv[])
int i;
Bool success = FALSE;
ExtensionEntry *extEntry;
- ScreenPtr pScreen;
+ ScreenPtr pScreen = screenInfo.screens[0];
PanoramiXScreenPtr pScreenPriv;
int w, h;
@@ -483,7 +451,10 @@ void PanoramiXExtensionInit(int argc, char *argv[])
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,
@@ -539,14 +510,16 @@ void PanoramiXExtensionInit(int argc, char *argv[])
}
- REGION_INIT(pScreen, &PanoramiXScreenRegion, NullBox, 1);
+ 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 = (screenInfo.screens[i])->width;
- panoramiXdataPtr[i].height = (screenInfo.screens[i])->height;
+ panoramiXdataPtr[i].width = pScreen->width;
+ panoramiXdataPtr[i].height = pScreen->height;
TheBox.x1 = panoramiXdataPtr[i].x;
TheBox.x2 = TheBox.x1 + panoramiXdataPtr[i].width;
@@ -646,7 +619,6 @@ Bool PanoramiXCreateConnectionBlock(void)
int old_width, old_height;
float width_mult, height_mult;
xWindowRoot *root;
- xConnSetup *setup;
xVisualType *visual;
xDepth *depth;
VisualPtr pVisual;
@@ -692,7 +664,6 @@ Bool PanoramiXCreateConnectionBlock(void)
screenInfo.numScreens = i;
- setup = (xConnSetup *) ConnectionInfo;
root = (xWindowRoot *) (ConnectionInfo + connBlockScreenStart);
length = connBlockScreenStart + sizeof(xWindowRoot);
@@ -764,19 +735,54 @@ void PanoramiXConsolidate(void)
int i, j, k;
VisualPtr pVisual, pVisual2;
ScreenPtr pScreen, pScreen2;
- PanoramiXRes *root, *defmap;
+ 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;
@@ -796,23 +802,12 @@ void PanoramiXConsolidate(void)
(pVisual->offsetGreen == pVisual2->offsetGreen) &&
(pVisual->offsetBlue == pVisual2->offsetBlue))
{
- Bool AlreadyUsed = FALSE;
-#if 0
-/* Open GL should do this reduction, not us */
- for (l = 0; l < 256; l++) {
- if (pVisual2->vid ==
- PanoramiXVisualTable[(l * MAXSCREENS) + j])
- {
- AlreadyUsed = TRUE;
- break;
- }
- }
-#endif
- if (!AlreadyUsed) {
+ /* 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;
- }
}
}
}
@@ -827,8 +822,6 @@ void PanoramiXConsolidate(void)
/* if it does, make sure it's in the list of supported depths and visuals */
if(PanoramiXVisualTable[pVisual->vid * MAXSCREENS]) {
- Bool GotIt = FALSE;
-
PanoramiXVisuals[PanoramiXNumVisuals].vid = pVisual->vid;
PanoramiXVisuals[PanoramiXNumVisuals].class = pVisual->class;
PanoramiXVisuals[PanoramiXNumVisuals].bitsPerRGBValue = pVisual->bitsPerRGBValue;
@@ -846,18 +839,9 @@ void PanoramiXConsolidate(void)
if (PanoramiXDepths[j].depth == pVisual->nplanes) {
PanoramiXDepths[j].vids[PanoramiXDepths[j].numVids] = pVisual->vid;
PanoramiXDepths[j].numVids++;
- GotIt = TRUE;
break;
}
}
-
- if (!GotIt) {
- PanoramiXDepths[PanoramiXNumDepths].depth = pVisual->nplanes;
- PanoramiXDepths[PanoramiXNumDepths].numVids = 1;
- PanoramiXDepths[PanoramiXNumDepths].vids = xalloc(sizeof(VisualID) * 256);
- PanoramiXDepths[PanoramiXNumDepths].vids[0] = pVisual->vid;
- PanoramiXNumDepths++;
- }
}
}
@@ -866,14 +850,22 @@ void PanoramiXConsolidate(void)
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);
}
@@ -1134,6 +1126,7 @@ XineramaGetImageData(
BoxRec SrcBox, *pbox;
int x, y, w, h, i, j, nbox, size, sizeNeeded, ScratchPitch, inOut, depth;
DrawablePtr pDraw = pDrawables[0];
+ ScreenPtr pScreen = pDraw->pScreen;
char *ScratchMem = NULL;
size = 0;
@@ -1149,7 +1142,7 @@ XineramaGetImageData(
SrcBox.y2 = SrcBox.y1 + height;
REGION_INIT(pScreen, &SrcRegion, &SrcBox, 1);
- REGION_INIT(pScreen, &GrabRegion, NullBox, 1);
+ REGION_NULL(pScreen, &GrabRegion);
depth = (format == XYPixmap) ? 1 : pDraw->depth;
diff --git a/Xext/panoramiX.h b/Xext/panoramiX.h
index 670a45364..d01b0b854 100644
--- a/Xext/panoramiX.h
+++ b/Xext/panoramiX.h
@@ -19,7 +19,7 @@
* or in FAR 52.227-19, as applicable. *
* *
*****************************************************************/
-/* $XFree86: xc/programs/Xserver/Xext/panoramiX.h,v 1.5 2001/01/03 02:54:17 keithp Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/panoramiX.h,v 1.6 2003/03/23 04:56:02 mvojkovi Exp $ */
/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
@@ -52,6 +52,7 @@ typedef struct {
struct {
char visibility;
char class;
+ char root;
} win;
struct {
Bool shared;
diff --git a/Xext/panoramiXSwap.c b/Xext/panoramiXSwap.c
index e78624187..e3ea803e6 100644
--- a/Xext/panoramiXSwap.c
+++ b/Xext/panoramiXSwap.c
@@ -23,7 +23,7 @@ shall not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/Xext/panoramiXSwap.c,v 3.8 2001/08/23 13:01:36 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/panoramiXSwap.c,v 3.10 2003/09/13 21:33:03 dawes Exp $ */
#include <stdio.h>
#include "X.h"
@@ -47,28 +47,7 @@ Equipment Corporation.
#include "panoramiXproto.h"
#include "panoramiXsrv.h"
#include "globals.h"
-
-
-/*
- * External references for data variables
- */
-
-extern char *ConnectionInfo;
-extern int connBlockScreenStart;
-
-#if NeedFunctionPrototypes
-#define PROC_EXTERN(pfunc) extern int pfunc(ClientPtr)
-#else
-#define PROC_EXTERN(pfunc) extern int pfunc()
-#endif
-
-PROC_EXTERN(ProcPanoramiXQueryVersion);
-PROC_EXTERN(ProcPanoramiXGetState);
-PROC_EXTERN(ProcPanoramiXGetScreenCount);
-PROC_EXTERN(ProcPanoramiXGetScreenSize);
-
-PROC_EXTERN(ProcXineramaIsActive);
-PROC_EXTERN(ProcXineramaQueryScreens);
+#include "panoramiXh.h"
static int
SProcPanoramiXQueryVersion (ClientPtr client)
diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c
index 37b54f4bc..73a441a88 100644
--- a/Xext/panoramiXprocs.c
+++ b/Xext/panoramiXprocs.c
@@ -26,7 +26,7 @@ Equipment Corporation.
/* Massively rewritten by Mark Vojkovich <markv@valinux.com> */
-/* $XFree86: xc/programs/Xserver/Xext/panoramiXprocs.c,v 3.33 2002/04/10 21:38:53 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/panoramiXprocs.c,v 3.37 2003/11/10 18:21:43 tsi Exp $ */
#include <stdio.h>
#include "X.h"
@@ -46,20 +46,21 @@ Equipment Corporation.
#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 )
-extern ScreenInfo *GlobalScrInfo;
-extern char *ConnectionInfo;
-extern int connBlockScreenStart;
+#if 0
+extern void (* EventSwapVector[128]) (fsError *, fsError *);
-extern int (* SavedProcVector[256]) ();
-extern void (* EventSwapVector[128]) ();
-extern void Swap32Write(), SLHostsExtend(), SQColorsExtend(),
+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.
@@ -131,6 +132,7 @@ int PanoramiXCreateWindow(ClientPtr client)
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);
@@ -140,7 +142,8 @@ int PanoramiXCreateWindow(ClientPtr client)
orig_visual = stuff->visual;
orig_x = stuff->x;
orig_y = stuff->y;
- parentIsRoot = (stuff->parent == WindowTable[0]->drawable.id);
+ 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;
@@ -329,7 +332,8 @@ int PanoramiXReparentWindow(ClientPtr client)
x = stuff->x;
y = stuff->y;
- parentIsRoot = (stuff->parent == WindowTable[0]->drawable.id);
+ 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;
@@ -468,7 +472,9 @@ int PanoramiXConfigureWindow(ClientPtr client)
}
}
- if(pWin->parent && (pWin->parent == WindowTable[0])) {
+ 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]);
@@ -548,7 +554,9 @@ int PanoramiXGetGeometry(ClientPtr client)
WindowPtr pWin = (WindowPtr)pDraw;
rep.x = pWin->origin.x - wBorderWidth (pWin);
rep.y = pWin->origin.y - wBorderWidth (pWin);
- if(pWin->parent == WindowTable[0]) {
+ if((pWin->parent == WindowTable[0]) ||
+ (pWin->parent->drawable.id == savedScreenInfo[0].wid))
+ {
rep.x += panoramiXdataPtr[0].x;
rep.y += panoramiXdataPtr[0].y;
}
@@ -582,7 +590,9 @@ int PanoramiXTranslateCoords(ClientPtr client)
rep.sameScreen = xTrue;
rep.child = None;
- if(pWin == WindowTable[0]) {
+ if((pWin == WindowTable[0]) ||
+ (pWin->drawable.id == savedScreenInfo[0].wid))
+ {
x = stuff->srcX - panoramiXdataPtr[0].x;
y = stuff->srcY - panoramiXdataPtr[0].y;
} else {
@@ -622,7 +632,9 @@ int PanoramiXTranslateCoords(ClientPtr client)
}
rep.dstX = x - pDst->drawable.x;
rep.dstY = y - pDst->drawable.y;
- if(pDst == WindowTable[0]) {
+ if((pDst == WindowTable[0]) ||
+ (pDst->drawable.id == savedScreenInfo[0].wid))
+ {
rep.dstX += panoramiXdataPtr[0].x;
rep.dstY += panoramiXdataPtr[0].y;
}
@@ -947,7 +959,7 @@ int PanoramiXClearToBackground(ClientPtr client)
x = stuff->x;
y = stuff->y;
- isRoot = (stuff->window == WindowTable[0]->drawable.id);
+ isRoot = win->u.win.root;
FOR_NSCREENS_BACKWARD(j) {
stuff->window = win->info[j].id;
if(isRoot) {
@@ -1002,11 +1014,9 @@ int PanoramiXCopyArea(ClientPtr client)
client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC;
- if((dst->type == XRT_WINDOW) &&
- (stuff->dstDrawable == WindowTable[0]->drawable.id))
+ if((dst->type == XRT_WINDOW) && dst->u.win.root)
dstIsRoot = TRUE;
- if((src->type == XRT_WINDOW) &&
- (stuff->srcDrawable == WindowTable[0]->drawable.id))
+ if((src->type == XRT_WINDOW) && src->u.win.root)
srcIsRoot = TRUE;
srcx = stuff->srcX; srcy = stuff->srcY;
@@ -1095,7 +1105,7 @@ int PanoramiXCopyArea(ClientPtr client)
RegionRec totalReg;
Bool overlap;
- REGION_INIT(pScreen, &totalReg, NullBox, 1);
+ REGION_NULL(pScreen, &totalReg);
FOR_NSCREENS_BACKWARD(j) {
if(pRgn[j]) {
if(srcIsRoot) {
@@ -1152,11 +1162,9 @@ int PanoramiXCopyPlane(ClientPtr client)
client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC;
- if((dst->type == XRT_WINDOW) &&
- (stuff->dstDrawable == WindowTable[0]->drawable.id))
+ if((dst->type == XRT_WINDOW) && dst->u.win.root)
dstIsRoot = TRUE;
- if((src->type == XRT_WINDOW) &&
- (stuff->srcDrawable == WindowTable[0]->drawable.id))
+ if((src->type == XRT_WINDOW) && src->u.win.root)
srcIsRoot = TRUE;
srcx = stuff->srcX; srcy = stuff->srcY;
@@ -1208,7 +1216,7 @@ int PanoramiXCopyPlane(ClientPtr client)
RegionRec totalReg;
Bool overlap;
- REGION_INIT(pScreen, &totalReg, NullBox, 1);
+ REGION_NULL(pScreen, &totalReg);
FOR_NSCREENS_BACKWARD(j) {
if(pRgn[j]) {
REGION_APPEND(pScreen, &totalReg, pRgn[j]);
@@ -1246,8 +1254,7 @@ int PanoramiXPolyPoint(ClientPtr client)
client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ 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));
@@ -1305,8 +1312,7 @@ int PanoramiXPolyLine(ClientPtr client)
client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ 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));
@@ -1364,8 +1370,7 @@ int PanoramiXPolySegment(ClientPtr client)
client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
nsegs = (client->req_len << 2) - sizeof(xPolySegmentReq);
if(nsegs & 4) return BadLength;
@@ -1427,8 +1432,7 @@ int PanoramiXPolyRectangle(ClientPtr client)
client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
nrects = (client->req_len << 2) - sizeof(xPolyRectangleReq);
if(nrects & 4) return BadLength;
@@ -1488,8 +1492,7 @@ int PanoramiXPolyArc(ClientPtr client)
client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
narcs = (client->req_len << 2) - sizeof(xPolyArcReq);
if(narcs % sizeof(xArc)) return BadLength;
@@ -1547,8 +1550,7 @@ int PanoramiXFillPoly(ClientPtr client)
client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
count = ((client->req_len << 2) - sizeof(xFillPolyReq)) >> 2;
if (count > 0){
@@ -1607,8 +1609,7 @@ int PanoramiXPolyFillRectangle(ClientPtr client)
client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
things = (client->req_len << 2) - sizeof(xPolyFillRectangleReq);
if(things & 4) return BadLength;
@@ -1667,8 +1668,7 @@ int PanoramiXPolyFillArc(ClientPtr client)
client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
narcs = (client->req_len << 2) - sizeof(xPolyFillArcReq);
IF_RETURN((narcs % sizeof(xArc)), BadLength);
@@ -1726,8 +1726,7 @@ int PanoramiXPutImage(ClientPtr client)
client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
orig_x = stuff->dstX;
orig_y = stuff->dstY;
@@ -1786,8 +1785,7 @@ int PanoramiXGetImage(ClientPtr client)
format = stuff->format;
planemask = stuff->planeMask;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
if(isRoot) {
if( /* check for being onscreen */
@@ -1919,8 +1917,7 @@ PanoramiXPolyText8(ClientPtr client)
client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
orig_x = stuff->x;
orig_y = stuff->y;
@@ -1959,8 +1956,7 @@ PanoramiXPolyText16(ClientPtr client)
client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
orig_x = stuff->x;
orig_y = stuff->y;
@@ -1999,8 +1995,7 @@ int PanoramiXImageText8(ClientPtr client)
client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
orig_x = stuff->x;
orig_y = stuff->y;
@@ -2039,8 +2034,7 @@ int PanoramiXImageText16(ClientPtr client)
client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
orig_x = stuff->x;
orig_y = stuff->y;
diff --git a/Xext/sampleEVI.c b/Xext/sampleEVI.c
index 43265a73d..15ed9401c 100644
--- a/Xext/sampleEVI.c
+++ b/Xext/sampleEVI.c
@@ -21,6 +21,8 @@ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
+/* $XFree86: xc/programs/Xserver/Xext/sampleEVI.c,v 3.5 2003/07/16 01:38:29 dawes Exp $ */
+
#include "X.h"
#include "Xproto.h"
#include "dixstruct.h"
@@ -76,6 +78,7 @@ static int sampleGetVisualInfo(
*n_info_rn = sz_evi;
return Success;
}
+
static void sampleFreeVisualInfo(
xExtendedVisualInfo *evi,
VisualID32 *conflict)
@@ -85,13 +88,15 @@ static void sampleFreeVisualInfo(
if (conflict)
xfree(conflict);
}
-EviPrivPtr eviDDXInit()
+
+EviPrivPtr eviDDXInit(void)
{
static EviPrivRec eviPriv;
eviPriv.getVisualInfo = sampleGetVisualInfo;
eviPriv.freeVisualInfo = sampleFreeVisualInfo;
return &eviPriv;
}
-void eviDDXReset()
+
+void eviDDXReset(void)
{
}
diff --git a/Xext/saver.c b/Xext/saver.c
index 463622391..944009773 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -1,6 +1,5 @@
/*
* $XConsortium: saver.c,v 1.12 94/04/17 20:59:36 dpw Exp $
- * $XFree86: xc/programs/Xserver/Xext/saver.c,v 3.4 2001/08/23 13:01:36 alanh Exp $
*
Copyright (c) 1992 X Consortium
@@ -28,6 +27,8 @@ in this Software without prior written authorization from the X Consortium.
* Author: Keith Packard, MIT X Consortium
*/
+/* $XFree86: xc/programs/Xserver/Xext/saver.c,v 3.8 2003/11/17 22:20:26 dawes Exp $ */
+
#define NEED_REPLIES
#define NEED_EVENTS
#include "X.h"
@@ -45,6 +46,11 @@ in this Software without prior written authorization from the X Consortium.
#include "gcstruct.h"
#include "cursorstr.h"
#include "colormapst.h"
+#ifdef PANORAMIX
+#include "panoramiX.h"
+#include "panoramiXsrv.h"
+#endif
+
#ifdef IN_MODULE
#include <xf86_ansic.h>
@@ -52,7 +58,11 @@ in this Software without prior written authorization from the X Consortium.
#include <stdio.h>
#endif
+#include "modinit.h"
+
+#if 0
static unsigned char ScreenSaverReqCode = 0;
+#endif
static int ScreenSaverEventBase = 0;
extern DISPATCH_PROC(ProcScreenSaverQueryInfo);
@@ -69,52 +79,38 @@ static DISPATCH_PROC(SProcScreenSaverSetAttributes);
static DISPATCH_PROC(SProcScreenSaverUnsetAttributes);
static Bool ScreenSaverHandle (
-#if NeedFunctionPrototypes
ScreenPtr /* pScreen */,
int /* xstate */,
Bool /* force */
-#endif
);
static Bool
CreateSaverWindow (
-#if NeedFunctionPrototypes
ScreenPtr /* pScreen */
-#endif
);
static Bool
DestroySaverWindow (
-#if NeedFunctionPrototypes
ScreenPtr /* pScreen */
-#endif
);
static void
UninstallSaverColormap (
-#if NeedFunctionPrototypes
ScreenPtr /* pScreen */
-#endif
);
static void
CheckScreenPrivate (
-#if NeedFunctionPrototypes
ScreenPtr /* pScreen */
-#endif
);
static void SScreenSaverNotifyEvent (
-#if NeedFunctionPrototypes
xScreenSaverNotifyEvent * /* from */,
xScreenSaverNotifyEvent * /* to */
-#endif
);
static void ScreenSaverResetProc (
-#if NeedFunctionPrototypes
ExtensionEntry * /* extEntry */
-#endif
);
/*
@@ -138,25 +134,19 @@ typedef struct _ScreenSaverEvent {
} ScreenSaverEventRec;
static int ScreenSaverFreeEvents(
-#if NeedFunctionPrototypes
pointer /* value */,
XID /* id */
-#endif
);
static Bool setEventMask (
-#if NeedFunctionPrototypes
ScreenPtr /* pScreen */,
ClientPtr /* client */,
unsigned long /* mask */
-#endif
);
static unsigned long getEventMask (
-#if NeedFunctionPrototypes
ScreenPtr /* pScreen */,
ClientPtr /* client */
-#endif
);
/*
@@ -184,31 +174,23 @@ typedef struct _ScreenSaverAttr {
} ScreenSaverAttrRec, *ScreenSaverAttrPtr;
static int ScreenSaverFreeAttr (
-#if NeedFunctionPrototypes
pointer /* value */,
XID /* id */
-#endif
);
static void FreeAttrs (
-#if NeedFunctionPrototypes
ScreenSaverAttrPtr /* pAttr */
-#endif
);
static void FreeScreenAttr (
-#if NeedFunctionPrototypes
ScreenSaverAttrPtr /* pAttr */
-#endif
);
static void
SendScreenSaverNotify (
-#if NeedFunctionPrototypes
ScreenPtr /* pScreen */,
int /* state */,
Bool /* forced */
-#endif
);
typedef struct _ScreenSaverScreenPrivate {
@@ -220,9 +202,7 @@ typedef struct _ScreenSaverScreenPrivate {
static ScreenSaverScreenPrivatePtr
MakeScreenPrivate (
-#if NeedFunctionPrototypes
ScreenPtr /* pScreen */
-#endif
);
static int ScreenPrivateIndex;
@@ -242,7 +222,7 @@ static int ScreenPrivateIndex;
****************/
void
-ScreenSaverExtensionInit()
+ScreenSaverExtensionInit(INITARGS)
{
ExtensionEntry *extEntry;
int i;
@@ -261,7 +241,9 @@ ScreenSaverExtensionInit()
ProcScreenSaverDispatch, SProcScreenSaverDispatch,
ScreenSaverResetProc, StandardMinorOpcode)))
{
+#if 0
ScreenSaverReqCode = (unsigned char)extEntry->base;
+#endif
ScreenSaverEventBase = extEntry->eventBase;
EventSwapVector[ScreenSaverEventBase] = (EventSwapPtr) SScreenSaverNotifyEvent;
}
@@ -460,7 +442,6 @@ SendScreenSaverNotify (pScreen, state, forced)
xScreenSaverNotifyEvent ev;
ClientPtr client;
int kind;
- ScreenSaverStuffPtr pSaver;
UpdateCurrentTimeIf ();
mask = ScreenSaverNotifyMask;
@@ -470,7 +451,6 @@ SendScreenSaverNotify (pScreen, state, forced)
pPriv = GetScreenPrivate(pScreen);
if (!pPriv)
return;
- pSaver = &savedScreenInfo[pScreen->myNum];
if (pPriv->attr)
kind = ScreenSaverExternal;
else if (ScreenSaverBlanking != DontPreferBlanking)
@@ -696,7 +676,10 @@ ScreenSaverHandle (pScreen, xstate, force)
ret = TRUE;
}
- SendScreenSaverNotify (pScreen, state, force);
+#ifdef PANORAMIX
+ if(noPanoramiXExtension || !pScreen->myNum)
+#endif
+ SendScreenSaverNotify (pScreen, state, force);
return ret;
}
@@ -810,8 +793,7 @@ ProcScreenSaverSelectInput (client)
}
static int
-ProcScreenSaverSetAttributes (client)
- register ClientPtr client;
+ScreenSaverSetAttributes (ClientPtr client)
{
REQUEST(xScreenSaverSetAttributesReq);
DrawablePtr pDraw;
@@ -829,7 +811,6 @@ ProcScreenSaverSetAttributes (client)
WindowOptPtr ancwopt;
unsigned long *pVlist;
unsigned long *values = 0;
- int valuei;
unsigned long tmask, imask;
unsigned long val;
Pixmap pixID;
@@ -957,7 +938,6 @@ ProcScreenSaverSetAttributes (client)
ret = BadAlloc;
goto bail;
}
- valuei = 0;
pAttr->screen = pScreen;
pAttr->client = client;
pAttr->x = stuff->x;
@@ -1191,8 +1171,7 @@ bail:
}
static int
-ProcScreenSaverUnsetAttributes (client)
- register ClientPtr client;
+ScreenSaverUnsetAttributes (ClientPtr client)
{
REQUEST(xScreenSaverSetAttributesReq);
DrawablePtr pDraw;
@@ -1212,6 +1191,110 @@ ProcScreenSaverUnsetAttributes (client)
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, SecurityWriteAccess)))
+ 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, SecurityReadAccess)))
+ 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, SecurityReadAccess)))
+ 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, SecurityReadAccess)))
+ 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, SecurityWriteAccess)))
+ 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 DISPATCH_PROC((*NormalVector[])) = {
ProcScreenSaverQueryVersion,
ProcScreenSaverQueryInfo,
diff --git a/Xext/security.c b/Xext/security.c
index 9af380dd6..568138e36 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -24,7 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
-/* $XFree86: xc/programs/Xserver/Xext/security.c,v 1.11 2002/05/31 18:45:53 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/security.c,v 1.16 2003/11/17 22:20:26 dawes Exp $ */
#include "dixstruct.h"
#include "extnsionst.h"
@@ -56,6 +56,8 @@ extern unsigned char LbxReqCode;
#undef index
#endif
+#include "modinit.h"
+
static int SecurityErrorBase; /* first Security error number */
static int SecurityEventBase; /* first Security event number */
@@ -73,14 +75,10 @@ static RESTYPE RTEventClient;
* the extension can't be listed or queried.
*/
int (*UntrustedProcVector[256])(
-#if NeedNestedPrototypes
ClientPtr /*client*/
-#endif
);
int (*SwappedUntrustedProcVector[256])(
-#if NeedNestedPrototypes
ClientPtr /*client*/
-#endif
);
/* SecurityAudit
@@ -102,9 +100,8 @@ SecurityAudit(char *format, ...)
if (auditTrailLevel < SECURITY_AUDIT_LEVEL)
return;
- AuditPrefix(format);
va_start(args, format);
- VErrorF(format, args);
+ VAuditF(format, args);
va_end(args);
} /* SecurityAudit */
@@ -123,9 +120,9 @@ SecurityAudit(char *format, ...)
*/
static int
-SecurityDeleteAuthorization(value, id)
- pointer value;
- XID id;
+SecurityDeleteAuthorization(
+ pointer value,
+ XID id)
{
SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)value;
unsigned short name_len, data_len;
@@ -141,6 +138,7 @@ SecurityDeleteAuthorization(value, id)
assert(status);
status = RemoveAuthorization(name_len, name, data_len, data);
assert(status);
+ (void)status;
/* free the auth timer if there is one */
@@ -181,9 +179,9 @@ SecurityDeleteAuthorization(value, id)
/* resource delete function for RTEventClient */
static int
-SecurityDeleteAuthorizationEventClient(value, id)
- pointer value;
- XID id;
+SecurityDeleteAuthorizationEventClient(
+ pointer value,
+ XID id)
{
OtherClientsPtr pEventClient, prev = NULL;
SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)value;
@@ -223,9 +221,9 @@ SecurityDeleteAuthorizationEventClient(value, id)
*/
static CARD32
-SecurityComputeAuthorizationTimeout(pAuth, seconds)
- SecurityAuthorizationPtr pAuth;
- unsigned int seconds;
+SecurityComputeAuthorizationTimeout(
+ SecurityAuthorizationPtr pAuth,
+ unsigned int seconds)
{
/* maxSecs is the number of full seconds that can be expressed in
* 32 bits worth of milliseconds
@@ -264,10 +262,10 @@ SecurityComputeAuthorizationTimeout(pAuth, seconds)
*/
static CARD32
-SecurityAuthorizationExpired(timer, time, pval)
- OsTimerPtr timer;
- CARD32 time;
- pointer pval;
+SecurityAuthorizationExpired(
+ OsTimerPtr timer,
+ CARD32 time,
+ pointer pval)
{
SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)pval;
@@ -299,8 +297,8 @@ SecurityAuthorizationExpired(timer, time, pval)
*/
static void
-SecurityStartAuthorizationTimer(pAuth)
- SecurityAuthorizationPtr pAuth;
+SecurityStartAuthorizationTimer(
+ SecurityAuthorizationPtr pAuth)
{
pAuth->timer = TimerSet(pAuth->timer, 0,
SecurityComputeAuthorizationTimeout(pAuth, pAuth->timeout),
@@ -313,8 +311,8 @@ SecurityStartAuthorizationTimer(pAuth)
*/
static int
-ProcSecurityQueryVersion(client)
- ClientPtr client;
+ProcSecurityQueryVersion(
+ ClientPtr client)
{
/* REQUEST(xSecurityQueryVersionReq); */
xSecurityQueryVersionReply rep;
@@ -345,10 +343,10 @@ ProcSecurityQueryVersion(client)
static int
-SecurityEventSelectForAuthorization(pAuth, client, mask)
- SecurityAuthorizationPtr pAuth;
- ClientPtr client;
- Mask mask;
+SecurityEventSelectForAuthorization(
+ SecurityAuthorizationPtr pAuth,
+ ClientPtr client,
+ Mask mask)
{
OtherClients *pEventClient;
@@ -385,8 +383,8 @@ SecurityEventSelectForAuthorization(pAuth, client, mask)
static int
-ProcSecurityGenerateAuthorization(client)
- ClientPtr client;
+ProcSecurityGenerateAuthorization(
+ ClientPtr client)
{
REQUEST(xSecurityGenerateAuthorizationReq);
int len; /* request length in CARD32s*/
@@ -582,8 +580,8 @@ bailout:
} /* ProcSecurityGenerateAuthorization */
static int
-ProcSecurityRevokeAuthorization(client)
- ClientPtr client;
+ProcSecurityRevokeAuthorization(
+ ClientPtr client)
{
REQUEST(xSecurityRevokeAuthorizationReq);
SecurityAuthorizationPtr pAuth;
@@ -607,8 +605,8 @@ ProcSecurityRevokeAuthorization(client)
static int
-ProcSecurityDispatch(client)
- ClientPtr client;
+ProcSecurityDispatch(
+ ClientPtr client)
{
REQUEST(xReq);
@@ -626,8 +624,8 @@ ProcSecurityDispatch(client)
} /* ProcSecurityDispatch */
static int
-SProcSecurityQueryVersion(client)
- ClientPtr client;
+SProcSecurityQueryVersion(
+ ClientPtr client)
{
REQUEST(xSecurityQueryVersionReq);
register char n;
@@ -641,8 +639,8 @@ SProcSecurityQueryVersion(client)
static int
-SProcSecurityGenerateAuthorization(client)
- ClientPtr client;
+SProcSecurityGenerateAuthorization(
+ ClientPtr client)
{
REQUEST(xSecurityGenerateAuthorizationReq);
register char n;
@@ -664,8 +662,8 @@ SProcSecurityGenerateAuthorization(client)
static int
-SProcSecurityRevokeAuthorization(client)
- ClientPtr client;
+SProcSecurityRevokeAuthorization(
+ ClientPtr client)
{
REQUEST(xSecurityRevokeAuthorizationReq);
register char n;
@@ -678,8 +676,8 @@ SProcSecurityRevokeAuthorization(client)
static int
-SProcSecurityDispatch(client)
- ClientPtr client;
+SProcSecurityDispatch(
+ ClientPtr client)
{
REQUEST(xReq);
@@ -697,8 +695,9 @@ SProcSecurityDispatch(client)
} /* SProcSecurityDispatch */
static void
-SwapSecurityAuthorizationRevokedEvent(from, to)
- xSecurityAuthorizationRevokedEvent *from, *to;
+SwapSecurityAuthorizationRevokedEvent(
+ xSecurityAuthorizationRevokedEvent *from,
+ xSecurityAuthorizationRevokedEvent *to)
{
to->type = from->type;
to->detail = from->detail;
@@ -726,10 +725,10 @@ SwapSecurityAuthorizationRevokedEvent(from, to)
*/
static void
-SecurityDetermineEventPropogationLimits(dev, ppWin, ppStopWin)
- DeviceIntPtr dev;
- WindowPtr *ppWin;
- WindowPtr *ppStopWin;
+SecurityDetermineEventPropogationLimits(
+ DeviceIntPtr dev,
+ WindowPtr *ppWin,
+ WindowPtr *ppStopWin)
{
WindowPtr pFocusWin = dev->focus ? dev->focus->win : NoneWin;
@@ -896,9 +895,9 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
*/
static pointer
-SecurityAuditResourceIDAccess(client, id)
- ClientPtr client;
- XID id;
+SecurityAuditResourceIDAccess(
+ ClientPtr client,
+ XID id)
{
int cid = CLIENT_ID(id);
int reqtype = ((xReq *)client->requestBuffer)->reqType;
@@ -950,12 +949,12 @@ SecurityAuditResourceIDAccess(client, id)
*/
static pointer
-SecurityCheckResourceIDAccess(client, id, rtype, access_mode, rval)
- ClientPtr client;
- XID id;
- RESTYPE rtype;
- Mask access_mode;
- pointer rval;
+SecurityCheckResourceIDAccess(
+ ClientPtr client,
+ XID id,
+ RESTYPE rtype,
+ Mask access_mode,
+ pointer rval)
{
int cid = CLIENT_ID(id);
int reqtype = ((xReq *)client->requestBuffer)->reqType;
@@ -1116,10 +1115,10 @@ SecurityCheckResourceIDAccess(client, id, rtype, access_mode, rval)
*/
static void
-SecurityClientStateCallback(pcbl, nulldata, calldata)
- CallbackListPtr *pcbl;
- pointer nulldata;
- pointer calldata;
+SecurityClientStateCallback(
+ CallbackListPtr *pcbl,
+ pointer nulldata,
+ pointer calldata)
{
NewClientInfoRec *pci = (NewClientInfoRec *)calldata;
ClientPtr client = pci->client;
@@ -1220,6 +1219,7 @@ SecurityCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h,
unsigned int format;
char * pBuf;
{
+ ScreenPtr pScreen = pDraw->pScreen;
RegionRec imageRegion; /* region representing x,y,w,h */
RegionRec censorRegion; /* region to obliterate */
BoxRec imageBox;
@@ -1230,7 +1230,7 @@ SecurityCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h,
imageBox.x2 = x + w;
imageBox.y2 = y + h;
REGION_INIT(pScreen, &imageRegion, &imageBox, 1);
- REGION_INIT(pScreen, &censorRegion, NullBox, 0);
+ REGION_NULL(pScreen, &censorRegion);
/* censorRegion = imageRegion - visibleRegion */
REGION_SUBTRACT(pScreen, &censorRegion, &imageRegion, pVisibleRegion);
@@ -1348,7 +1348,7 @@ static char *SecurityKeywords[] = {
/*#define PROPDEBUG 1*/
static void
-SecurityFreePropertyAccessList()
+SecurityFreePropertyAccessList(void)
{
while (PropertyAccessList)
{
@@ -1365,8 +1365,8 @@ SecurityFreePropertyAccessList()
#endif
static char *
-SecuritySkipWhitespace(p)
- char *p;
+SecuritySkipWhitespace(
+ char *p)
{
while (SecurityIsWhitespace(*p))
p++;
@@ -1375,8 +1375,8 @@ SecuritySkipWhitespace(p)
static char *
-SecurityParseString(rest)
- char **rest;
+SecurityParseString(
+ char **rest)
{
char *startOfString;
char *s = *rest;
@@ -1412,8 +1412,8 @@ SecurityParseString(rest)
static int
-SecurityParseKeyword(p)
- char **p;
+SecurityParseKeyword(
+ char **p)
{
int i;
char *s = *p;
@@ -1433,8 +1433,8 @@ SecurityParseKeyword(p)
static Bool
-SecurityParsePropertyAccessRule(p)
- char *p;
+SecurityParsePropertyAccessRule(
+ char *p)
{
char *propname;
char c;
@@ -1574,8 +1574,8 @@ static char **SecurityPolicyStrings = NULL;
static int nSecurityPolicyStrings = 0;
static Bool
-SecurityParseSitePolicy(p)
- char *p;
+SecurityParseSitePolicy(
+ char *p)
{
char *policyStr = SecurityParseString(&p);
char *copyPolicyStr;
@@ -1613,7 +1613,7 @@ SecurityGetSitePolicyStrings(n)
} /* SecurityGetSitePolicyStrings */
static void
-SecurityFreeSitePolicyStrings()
+SecurityFreeSitePolicyStrings(void)
{
if (SecurityPolicyStrings)
{
@@ -1630,7 +1630,7 @@ SecurityFreeSitePolicyStrings()
static void
-SecurityLoadPropertyAccessList()
+SecurityLoadPropertyAccessList(void)
{
FILE *f;
int lineNumber = 0;
@@ -1732,9 +1732,9 @@ SecurityLoadPropertyAccessList()
static Bool
-SecurityMatchString(ws, cs)
- char *ws;
- char *cs;
+SecurityMatchString(
+ char *ws,
+ char *cs)
{
while (*ws && *cs)
{
@@ -1908,8 +1908,8 @@ SecurityCheckPropertyAccess(client, pWin, propertyName, access_mode)
*/
static void
-SecurityResetProc(extEntry)
- ExtensionEntry *extEntry;
+SecurityResetProc(
+ ExtensionEntry *extEntry)
{
SecurityFreePropertyAccessList();
SecurityFreeSitePolicyStrings();
@@ -1944,7 +1944,7 @@ XSecurityOptions(argc, argv, i)
*/
void
-SecurityExtensionInit()
+SecurityExtensionInit(INITARGS)
{
ExtensionEntry *extEntry;
int i;
diff --git a/Xext/shape.c b/Xext/shape.c
index 7bd161dcc..956a8ebfc 100644
--- a/Xext/shape.c
+++ b/Xext/shape.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/shape.c,v 3.16 2001/12/14 19:58:50 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/shape.c,v 3.19 2003/11/17 22:20:26 dawes Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
@@ -46,45 +46,33 @@ in this Software without prior written authorization from The Open Group.
#ifdef EXTMODULE
#include "xf86_ansic.h"
#endif
+#include "modinit.h"
typedef RegionPtr (*CreateDftPtr)(
-#if NeedNestedPrototypes
WindowPtr /* pWin */
-#endif
);
static int ShapeFreeClient(
-#if NeedFunctionPrototypes
pointer /* data */,
XID /* id */
-#endif
);
static int ShapeFreeEvents(
-#if NeedFunctionPrototypes
pointer /* data */,
XID /* id */
-#endif
);
static void SendShapeNotify(
-#if NeedFunctionPrototypes
WindowPtr /* pWin */,
int /* which */
-#endif
);
static void ShapeResetProc(
-#if NeedFunctionPrototypes
ExtensionEntry * /* extEntry */
-#endif
);
static void SShapeNotifyEvent(
-#if NeedFunctionPrototypes
xShapeNotifyEvent * /* from */,
xShapeNotifyEvent * /* to */
-#endif
);
static int
RegionOperate (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
WindowPtr /* pWin */,
int /* kind */,
@@ -94,14 +82,9 @@ RegionOperate (
int /* xoff */,
int /* yoff */,
CreateDftPtr /* create */
-#endif
);
-#if NeedFunctionPrototypes
#define CREATE_PROC(func) RegionPtr func(WindowPtr /* pWin */)
-#else
-#define CREATE_PROC(func) RegionPtr func(/* WindowPtr pWin */)
-#endif
static CREATE_PROC(CreateBoundingShape);
static CREATE_PROC(CreateClipShape);
@@ -134,7 +117,9 @@ static DISPATCH_PROC(SProcShapeSelectInput);
#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 */
@@ -164,7 +149,7 @@ typedef struct _ShapeEvent {
****************/
void
-ShapeExtensionInit()
+ShapeExtensionInit(INITARGS)
{
ExtensionEntry *extEntry;
@@ -175,7 +160,9 @@ ShapeExtensionInit()
ProcShapeDispatch, SProcShapeDispatch,
ShapeResetProc, StandardMinorOpcode)))
{
+#if 0
ShapeReqCode = (unsigned char)extEntry->base;
+#endif
ShapeEventBase = extEntry->eventBase;
EventSwapVector[ShapeEventBase] = (EventSwapPtr) SShapeNotifyEvent;
}
@@ -390,8 +377,8 @@ ProcShapeRectangles (client)
#ifdef PANORAMIX
static int
-ProcPanoramiXShapeRectangles (client)
- register ClientPtr client;
+ProcPanoramiXShapeRectangles(
+ register ClientPtr client)
{
REQUEST(xShapeRectanglesReq);
PanoramiXRes *win;
@@ -479,8 +466,8 @@ ProcShapeMask (client)
#ifdef PANORAMIX
static int
-ProcPanoramiXShapeMask (client)
- register ClientPtr client;
+ProcPanoramiXShapeMask(
+ register ClientPtr client)
{
REQUEST(xShapeMaskReq);
PanoramiXRes *win, *pmap;
@@ -594,8 +581,8 @@ ProcShapeCombine (client)
#ifdef PANORAMIX
static int
-ProcPanoramiXShapeCombine (client)
- register ClientPtr client;
+ProcPanoramiXShapeCombine(
+ register ClientPtr client)
{
REQUEST(xShapeCombineReq);
PanoramiXRes *win, *win2;
@@ -663,8 +650,8 @@ ProcShapeOffset (client)
#ifdef PANORAMIX
static int
-ProcPanoramiXShapeOffset (client)
- register ClientPtr client;
+ProcPanoramiXShapeOffset(
+ register ClientPtr client)
{
REQUEST(xShapeOffsetReq);
PanoramiXRes *win;
diff --git a/Xext/shm.c b/Xext/shm.c
index 3ba9ad2c1..9591eab54 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/shm.c,v 3.36 2002/04/03 19:51:11 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/shm.c,v 3.40 2003/11/17 22:20:27 dawes Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
@@ -29,6 +29,8 @@ in this Software without prior written authorization from The Open Group.
/* $Xorg: shm.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */
+#define SHM
+
#include <sys/types.h>
#ifndef Lynx
#include <sys/ipc.h>
@@ -65,6 +67,8 @@ in this Software without prior written authorization from The Open Group.
#include "panoramiXsrv.h"
#endif
+#include "modinit.h"
+
typedef struct _ShmDesc {
struct _ShmDesc *next;
int shmid;
@@ -78,21 +82,15 @@ static void miShmPutImage(XSHM_PUT_IMAGE_ARGS);
static void fbShmPutImage(XSHM_PUT_IMAGE_ARGS);
static PixmapPtr fbShmCreatePixmap(XSHM_CREATE_PIXMAP_ARGS);
static int ShmDetachSegment(
-#if NeedFunctionPrototypes
pointer /* value */,
XID /* shmseg */
-#endif
);
static void ShmResetProc(
-#if NeedFunctionPrototypes
ExtensionEntry * /* extEntry */
-#endif
);
static void SShmCompletionEvent(
-#if NeedFunctionPrototypes
xShmCompletionEvent * /* from */,
xShmCompletionEvent * /* to */
-#endif
);
static Bool ShmDestroyPixmap (PixmapPtr pPixmap);
@@ -159,7 +157,7 @@ static ShmFuncs fbFuncs = {fbShmCreatePixmap, fbShmPutImage};
}
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__)
#include <sys/signal.h>
static Bool badSysCall = FALSE;
@@ -181,23 +179,32 @@ static Bool CheckForShmSyscall()
badSysCall = FALSE;
shmid = shmget(IPC_PRIVATE, 4096, IPC_CREAT);
- /* Clean up */
+
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()
+ShmExtensionInit(INITARGS)
{
ExtensionEntry *extEntry;
int i;
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#ifdef MUST_CHECK_FOR_SHM_SYSCALL
if (!CheckForShmSyscall())
{
ErrorF("MIT-SHM extension disabled due to lack of kernel support\n");
@@ -270,17 +277,17 @@ ExtensionEntry *extEntry;
}
void
-ShmRegisterFuncs(pScreen, funcs)
- ScreenPtr pScreen;
- ShmFuncsPtr funcs;
+ShmRegisterFuncs(
+ ScreenPtr pScreen,
+ ShmFuncsPtr funcs)
{
shmFuncs[pScreen->myNum] = funcs;
}
void
-ShmSetPixmapFormat(pScreen, format)
- ScreenPtr pScreen;
- int format;
+ShmSetPixmapFormat(
+ ScreenPtr pScreen,
+ int format)
{
shmPixFormat[pScreen->myNum] = format;
}
@@ -572,8 +579,7 @@ ProcPanoramiXShmPutImage(register ClientPtr client)
client, stuff->gc, XRT_GC, SecurityReadAccess)))
return BadGC;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
orig_x = stuff->dstX;
orig_y = stuff->dstY;
@@ -633,8 +639,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
format = stuff->format;
planemask = stuff->planeMask;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
if(isRoot) {
if( /* check for being onscreen */
@@ -709,8 +714,8 @@ ProcPanoramiXShmGetImage(ClientPtr client)
}
static int
-ProcPanoramiXShmCreatePixmap(client)
- register ClientPtr client;
+ProcPanoramiXShmCreatePixmap(
+ register ClientPtr client)
{
ScreenPtr pScreen = NULL;
PixmapPtr pMap = NULL;
diff --git a/Xext/sleepuntil.c b/Xext/sleepuntil.c
index eb2b96a76..afde19cba 100644
--- a/Xext/sleepuntil.c
+++ b/Xext/sleepuntil.c
@@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group.
*
* Author: Keith Packard, MIT X Consortium
*/
-/* $XFree86: xc/programs/Xserver/Xext/sleepuntil.c,v 3.5 2001/12/14 19:58:51 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/sleepuntil.c,v 3.7 2003/11/17 22:20:27 dawes Exp $ */
/* dixsleep.c - implement millisecond timeouts for X clients */
@@ -44,10 +44,8 @@ typedef struct _Sertafied {
ClientPtr pClient;
XID id;
void (*notifyFunc)(
-#if NeedNestedPrototypes
ClientPtr /* client */,
pointer /* closure */
-#endif
);
pointer closure;
@@ -59,37 +57,31 @@ static Bool BlockHandlerRegistered;
static int SertafiedGeneration;
static void ClientAwaken(
-#if NeedFunctionPrototypes
ClientPtr /* client */,
pointer /* closure */
-#endif
);
static int SertafiedDelete(
-#if NeedFunctionPrototypes
pointer /* value */,
XID /* id */
-#endif
);
static void SertafiedBlockHandler(
-#if NeedFunctionPrototypes
pointer /* data */,
OSTimePtr /* wt */,
pointer /* LastSelectMask */
-#endif
);
static void SertafiedWakeupHandler(
-#if NeedFunctionPrototypes
pointer /* data */,
int /* i */,
pointer /* LastSelectMask */
-#endif
);
int
ClientSleepUntil (client, revive, notifyFunc, closure)
ClientPtr client;
TimeStamp *revive;
- void (*notifyFunc)();
+ void (*notifyFunc)(
+ ClientPtr /* client */,
+ pointer /* closure */);
pointer closure;
{
SertafiedPtr pRequest, pReq, pPrev;
diff --git a/Xext/sleepuntil.h b/Xext/sleepuntil.h
index 29d761a0e..f8fcc6cb9 100644
--- a/Xext/sleepuntil.h
+++ b/Xext/sleepuntil.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/sleepuntil.h,v 1.1 2001/08/01 00:44:44 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/sleepuntil.h,v 1.2 2003/11/17 22:20:27 dawes Exp $ */
/*
* Copyright (C) 2001 The XFree86 Project, Inc. All Rights Reserved.
*
@@ -31,17 +31,13 @@
#include "dix.h"
extern int ClientSleepUntil(
-#if NeedFunctionPrototypes
ClientPtr client,
TimeStamp *revive,
void (*notifyFunc)(
-#if NeedNestedPrototypes
ClientPtr /* client */,
pointer /* closure */
-#endif
),
pointer Closure
-#endif
);
#endif
diff --git a/Xext/sync.c b/Xext/sync.c
index 079a804e3..25d360bfa 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -50,7 +50,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/Xext/sync.c,v 3.11 2001/12/14 19:58:51 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/sync.c,v 3.14 2003/11/17 22:20:27 dawes Exp $ */
#define NEED_REPLIES
#define NEED_EVENTS
@@ -76,10 +76,11 @@ PERFORMANCE OF THIS SOFTWARE.
#endif
#endif
+#include "modinit.h"
+
/*
* Local Global Variables
*/
-static int SyncReqCode;
static int SyncEventBase;
static int SyncErrorBase;
static RESTYPE RTCounter = 0;
@@ -98,219 +99,165 @@ static SyncCounter **SysCounterList = NULL;
static int
FreeAlarm(
-#if NeedFunctionPrototypes
pointer /* addr */,
XID /* id */
-#endif
);
static int
FreeAlarmClient(
-#if NeedFunctionPrototypes
pointer /* value */,
XID /* id */
-#endif
);
static int
FreeAwait(
-#if NeedFunctionPrototypes
pointer /* addr */,
XID /* id */
-#endif
);
static void
ServertimeBracketValues(
-#if NeedFunctionPrototypes
pointer /* pCounter */,
CARD64 * /* pbracket_less */,
CARD64 * /* pbracket_greater */
-#endif
);
static void
ServertimeQueryValue(
-#if NeedFunctionPrototypes
pointer /* pCounter */,
CARD64 * /* pValue_return */
-#endif
);
static void
ServertimeWakeupHandler(
-#if NeedFunctionPrototypes
pointer /* env */,
int /* rc */,
pointer /* LastSelectMask */
-#endif
);
static int
SyncInitTrigger(
-#if NeedFunctionPrototypes
ClientPtr /* client */,
SyncTrigger * /* pTrigger */,
XSyncCounter /* counter */,
Mask /* changes */
-#endif
);
static void
SAlarmNotifyEvent(
-#if NeedFunctionPrototypes
xSyncAlarmNotifyEvent * /* from */,
xSyncAlarmNotifyEvent * /* to */
-#endif
);
static void
SCounterNotifyEvent(
-#if NeedFunctionPrototypes
xSyncCounterNotifyEvent * /* from */,
xSyncCounterNotifyEvent * /* to */
-#endif
);
static void
ServertimeBlockHandler(
-#if NeedFunctionPrototypes
pointer /* env */,
struct timeval ** /* wt */,
pointer /* LastSelectMask */
-#endif
);
static int
SyncAddTriggerToCounter(
-#if NeedFunctionPrototypes
SyncTrigger * /* pTrigger */
-#endif
);
extern void
SyncAlarmCounterDestroyed(
-#if NeedFunctionPrototypes
SyncTrigger * /* pTrigger */
-#endif
);
static void
SyncAlarmTriggerFired(
-#if NeedFunctionPrototypes
SyncTrigger * /* pTrigger */
-#endif
);
static void
SyncAwaitTriggerFired(
-#if NeedFunctionPrototypes
SyncTrigger * /* pTrigger */
-#endif
);
static int
SyncChangeAlarmAttributes(
-#if NeedFunctionPrototypes
ClientPtr /* client */,
SyncAlarm * /* pAlarm */,
Mask /* mask */,
CARD32 * /* values */
-#endif
);
static Bool
SyncCheckTriggerNegativeComparison(
-#if NeedFunctionPrototypes
SyncTrigger * /* pTrigger */,
CARD64 /* oldval */
-#endif
);
static Bool
SyncCheckTriggerNegativeTransition(
-#if NeedFunctionPrototypes
SyncTrigger * /* pTrigger */,
CARD64 /* oldval */
-#endif
);
static Bool
SyncCheckTriggerPositiveComparison(
-#if NeedFunctionPrototypes
SyncTrigger * /* pTrigger */,
CARD64 /* oldval */
-#endif
);
static Bool
SyncCheckTriggerPositiveTransition(
-#if NeedFunctionPrototypes
SyncTrigger * /* pTrigger */,
CARD64 /* oldval */
-#endif
);
static SyncCounter *
SyncCreateCounter(
-#if NeedFunctionPrototypes
ClientPtr /* client */,
XSyncCounter /* id */,
CARD64 /* initialvalue */
-#endif
);
static void SyncComputeBracketValues(
-#if NeedFunctionPrototypes
SyncCounter * /* pCounter */,
Bool /* startOver */
-#endif
);
static void
SyncDeleteTriggerFromCounter(
-#if NeedFunctionPrototypes
SyncTrigger * /* pTrigger */
-#endif
);
static Bool
SyncEventSelectForAlarm(
-#if NeedFunctionPrototypes
SyncAlarm * /* pAlarm */,
ClientPtr /* client */,
Bool /* wantevents */
-#endif
);
static void
SyncInitServerTime(
-#if NeedFunctionPrototypes
void
-#endif
);
static void
SyncResetProc(
-#if NeedFunctionPrototypes
ExtensionEntry * /* extEntry */
-#endif
);
static void
SyncSendAlarmNotifyEvents(
-#if NeedFunctionPrototypes
SyncAlarm * /* pAlarm */
-#endif
);
static void
SyncSendCounterNotifyEvents(
-#if NeedFunctionPrototypes
ClientPtr /* client */,
SyncAwait ** /* ppAwait */,
int /* num_events */
-#endif
);
static DISPATCH_PROC(ProcSyncAwait);
@@ -1081,10 +1028,8 @@ SyncCreateCounter(client, id, initialvalue)
}
static int FreeCounter(
-#if NeedFunctionPrototypes
pointer /*env*/,
XID /*id*/
-#endif
);
/*
@@ -1098,8 +1043,13 @@ SyncCreateSystemCounter(name, initial, resolution, counterType,
CARD64 initial;
CARD64 resolution;
SyncCounterType counterType;
- void (*QueryValue) ();
- void (*BracketValues) ();
+ void (*QueryValue) (
+ pointer /* pCounter */,
+ CARD64 * /* pValue_return */);
+ void (*BracketValues) (
+ pointer /* pCounter */,
+ CARD64 * /* pbracket_less */,
+ CARD64 * /* pbracket_greater */);
{
SyncCounter *pCounter;
@@ -1588,6 +1538,8 @@ ProcSyncSetCounter(client)
SyncCounter *pCounter;
CARD64 newvalue;
+ REQUEST_SIZE_MATCH(xSyncSetCounterReq);
+
pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->cid,
RTCounter, SecurityWriteAccess);
if (pCounter == NULL)
@@ -2031,12 +1983,11 @@ static int
ProcSyncDestroyAlarm(client)
ClientPtr client;
{
- SyncAlarm *pAlarm;
REQUEST(xSyncDestroyAlarmReq);
REQUEST_SIZE_MATCH(xSyncDestroyAlarmReq);
- if (!(pAlarm = (SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm,
+ if (!((SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm,
RTAlarm, SecurityDestroyAccess)))
{
client->errorValue = stuff->alarm;
@@ -2399,7 +2350,7 @@ SyncResetProc(extEntry)
* ** Initialise the extension.
*/
void
-SyncExtensionInit()
+SyncExtensionInit(INITARGS)
{
ExtensionEntry *extEntry;
@@ -2424,7 +2375,6 @@ SyncExtensionInit()
return;
}
- SyncReqCode = extEntry->base;
SyncEventBase = extEntry->eventBase;
SyncErrorBase = extEntry->errorBase;
EventSwapVector[SyncEventBase + XSyncCounterNotify] = (EventSwapPtr) SCounterNotifyEvent;
@@ -2488,6 +2438,7 @@ pointer LastSelectMask;
{
Bool overflow;
XSyncValueSubtract(&delay, *pnext_time, Now, &overflow);
+ (void)overflow;
timeout = XSyncValueLow32(delay);
}
AdjustWaitForDelay(wt, timeout); /* os/utils.c */
diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c
index 1d3b416db..b31057a0d 100644
--- a/Xext/xcmisc.c
+++ b/Xext/xcmisc.c
@@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/programs/Xserver/Xext/xcmisc.c,v 3.5 2001/12/14 19:58:51 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xcmisc.c,v 3.8 2003/11/17 22:20:27 dawes Exp $ */
#define NEED_EVENTS
#define NEED_REPLIES
@@ -38,13 +38,14 @@ from The Open Group.
#include "extnsionst.h"
#include "swaprep.h"
#include "xcmiscstr.h"
+#include "modinit.h"
+#if 0
static unsigned char XCMiscCode;
+#endif
static void XCMiscResetProc(
-#if NeedFunctionPrototypes
ExtensionEntry * /* extEntry */
-#endif
);
static DISPATCH_PROC(ProcXCMiscDispatch);
@@ -57,14 +58,21 @@ static DISPATCH_PROC(SProcXCMiscGetXIDList);
static DISPATCH_PROC(SProcXCMiscGetXIDRange);
void
-XCMiscExtensionInit()
+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);
}
diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index 38fac9450..1da665af0 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/xf86bigfont.c,v 1.13 2001/06/30 22:41:44 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xf86bigfont.c,v 1.18 2003/11/17 22:20:27 dawes Exp $ */
/*
* BIGFONT extension for sharing font metrics between clients (if possible)
* and for transmitting font metrics to clients in a compressed form.
@@ -73,9 +73,7 @@
#include "xf86bigfstr.h"
static void XF86BigfontResetProc(
-#if NeedFunctionPrototypes
ExtensionEntry * /* extEntry */
-#endif
);
static DISPATCH_PROC(ProcXF86BigfontDispatch);
@@ -85,7 +83,9 @@ static DISPATCH_PROC(SProcXF86BigfontDispatch);
static DISPATCH_PROC(SProcXF86BigfontQueryVersion);
static DISPATCH_PROC(SProcXF86BigfontQueryFont);
+#if 0
static unsigned char XF86BigfontReqCode;
+#endif
#ifdef HAS_SHM
@@ -112,9 +112,10 @@ SigSysHandler(
badSysCall = TRUE;
}
-static Bool CheckForShmSyscall()
+static Bool
+CheckForShmSyscall(void)
{
- void (*oldHandler)();
+ void (*oldHandler)(int);
int shmid = -1;
/* If no SHM support in the kernel, the bad syscall will generate SIGSYS */
@@ -122,10 +123,16 @@ static Bool CheckForShmSyscall()
badSysCall = FALSE;
shmid = shmget(IPC_PRIVATE, 4096, IPC_CREAT);
- /* Clean up */
- if (shmid != -1) {
+ 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);
}
@@ -139,6 +146,7 @@ static Bool CheckForShmSyscall()
void
XFree86BigfontExtensionInit()
{
+#if 0
ExtensionEntry* extEntry;
if ((extEntry = AddExtension(XF86BIGFONTNAME,
@@ -149,10 +157,25 @@ XFree86BigfontExtensionInit()
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 disabled due to lack of shared memory support in the kernel\n");
+ ErrorF(XF86BIGFONTNAME " extension local-client optimization disabled due to lack of shared memory support in the kernel\n");
return;
}
#endif
diff --git a/Xext/xprint.c b/Xext/xprint.c
index db9a25135..e50fb4068 100644
--- a/Xext/xprint.c
+++ b/Xext/xprint.c
@@ -64,7 +64,7 @@ copyright holders.
** *********************************************************
**
********************************************************************/
-/* $XFree86: xc/programs/Xserver/Xext/xprint.c,v 1.13 2001/11/23 19:21:31 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xprint.c,v 1.15 2003/10/28 23:08:44 tsi Exp $ */
#define _XP_PRINT_SERVER_
#include "X.h"
@@ -83,6 +83,7 @@ copyright holders.
#include "Printstr.h"
#include "../Xprint/DiPrint.h"
#include "../Xprint/attributes.h"
+#include "modinit.h"
static void XpResetProc(ExtensionEntry *);
@@ -282,7 +283,7 @@ static CARD32 allEvents = XPPrintMask | XPAttributeMask;
*/
void
-XpExtensionInit(void)
+XpExtensionInit(INITARGS)
{
ExtensionEntry *extEntry;
int i;
@@ -753,15 +754,17 @@ ProcXpGetPageDimensions(ClientPtr client)
return XpErrorBase+XPBadContext;
}
- if(pContext->funcs.GetMediumDimensions != 0)
- result = pContext->funcs.GetMediumDimensions(pContext, &width, &height);
- else
+ if((pContext->funcs.GetMediumDimensions == 0) ||
+ (pContext->funcs.GetReproducibleArea == 0))
return BadImplementation;
- if(pContext->funcs.GetReproducibleArea != 0)
+ result = pContext->funcs.GetMediumDimensions(pContext, &width, &height);
+ if(result != Success)
+ return result;
+
result = pContext->funcs.GetReproducibleArea(pContext, &rect);
- else
- return BadImplementation;
+ if(result != Success)
+ return result;
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
@@ -814,11 +817,13 @@ ProcXpSetImageResolution(ClientPtr client)
}
rep.prevRes = pContext->imageRes;
- if(pContext->funcs.SetImageResolution != 0)
+ if(pContext->funcs.SetImageResolution != 0) {
result = pContext->funcs.SetImageResolution(pContext,
(int)stuff->imageRes,
&status);
- else
+ if(result != Success)
+ status = FALSE;
+ } else
status = FALSE;
rep.type = X_Reply;
@@ -1491,7 +1496,6 @@ ProcXpStartJob(ClientPtr client)
REQUEST(xPrintStartJobReq);
XpContextPtr pContext;
int result = Success;
- XpScreenPtr pPrintScreen;
REQUEST_SIZE_MATCH(xPrintStartJobReq);
@@ -1509,7 +1513,6 @@ ProcXpStartJob(ClientPtr client)
return BadValue;
}
- pPrintScreen = XpScreens[pContext->screenNum];
if(pContext->funcs.StartJob != 0)
result = pContext->funcs.StartJob(pContext,
(stuff->saveData == XPGetData)? TRUE:FALSE,
@@ -1533,7 +1536,6 @@ static int
ProcXpEndJob(ClientPtr client)
{
REQUEST(xPrintEndJobReq);
- XpScreenPtr pPrintScreen;
int result = Success;
XpContextPtr pContext;
@@ -1543,8 +1545,6 @@ ProcXpEndJob(ClientPtr client)
== (XpContextPtr)NULL)
return XpErrorBase+XPBadSequence;
- pPrintScreen = XpScreens[pContext->screenNum];
-
if(!(pContext->state & JOB_STARTED))
return XpErrorBase+XPBadSequence;
@@ -1603,8 +1603,6 @@ ProcXpEndJob(ClientPtr client)
static Bool
DoStartDoc(ClientPtr client, XpStDocPtr c)
{
- XpScreenPtr pPrintScreen;
- int result = Success;
XpContextPtr pContext = c->pContext;
if(c->pContext->state & JOB_GET_DATA &&
@@ -1619,10 +1617,8 @@ DoStartDoc(ClientPtr client, XpStDocPtr c)
return TRUE;
}
- pPrintScreen = XpScreens[pContext->screenNum];
-
if(pContext->funcs.StartDoc != 0)
- result = pContext->funcs.StartDoc(pContext, c->type);
+ (void) pContext->funcs.StartDoc(pContext, c->type);
else
{
SendErrorToClient(client, XpReqCode, X_PrintStartPage, 0,
@@ -1682,7 +1678,6 @@ static int
ProcXpEndDoc(ClientPtr client)
{
REQUEST(xPrintEndDocReq);
- XpScreenPtr pPrintScreen;
XpContextPtr pContext;
int result = Success;
@@ -1692,8 +1687,6 @@ ProcXpEndDoc(ClientPtr client)
== (XpContextPtr)NULL)
return XpErrorBase+XPBadSequence;
- pPrintScreen = XpScreens[pContext->screenNum];
-
if(!(pContext->state & DOC_RAW_STARTED) &&
!(pContext->state & DOC_COOKED_STARTED))
return XpErrorBase+XPBadSequence;
@@ -1744,7 +1737,6 @@ DoStartPage(
ClientPtr client,
XpStPagePtr c)
{
- XpScreenPtr pPrintScreen;
WindowPtr pWin = c->pWin;
int result = Success;
XpContextPtr pContext = c->pContext;
@@ -1815,9 +1807,6 @@ DoStartPage(
pPage->context = pContext;
pContext->pageWin = c->pWin->drawable.id;
- pPrintScreen = XpScreens[pContext->screenNum];
-
-
if(pContext->funcs.StartPage != 0)
result = pContext->funcs.StartPage(pContext, pWin);
else
@@ -1884,7 +1873,6 @@ static int
ProcXpEndPage(ClientPtr client)
{
REQUEST(xPrintEndPageReq);
- XpScreenPtr pPrintScreen;
int result = Success;
XpContextPtr pContext;
XpPagePtr page;
@@ -1899,7 +1887,6 @@ ProcXpEndPage(ClientPtr client)
if(!(pContext->state & PAGE_STARTED))
return XpErrorBase+XPBadSequence;
- pPrintScreen = XpScreens[pContext->screenNum];
pWin = (WindowPtr )LookupIDByType(pContext->pageWin, RT_WINDOW);
/* Call the ddx's EndPage proc. */
diff --git a/Xext/xres.c b/Xext/xres.c
index ca670be24..c024f7be8 100644
--- a/Xext/xres.c
+++ b/Xext/xres.c
@@ -1,7 +1,7 @@
/*
Copyright (c) 2002 XFree86 Inc
*/
-/* $XFree86: xc/programs/Xserver/Xext/xres.c,v 1.5 2002/07/01 02:25:55 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xres.c,v 1.8 2003/10/28 23:08:44 tsi Exp $ */
#define NEED_EVENTS
#define NEED_REPLIES
@@ -14,10 +14,7 @@
#include "swaprep.h"
#include "XResproto.h"
#include "pixmapstr.h"
-
-extern RESTYPE lastResourceType;
-extern RESTYPE TypeMask;
-extern Atom *ResourceNames;
+#include "modinit.h"
static int
ProcXResQueryVersion (ClientPtr client)
@@ -30,6 +27,8 @@ ProcXResQueryVersion (ClientPtr client)
client_major = stuff->client_major;
client_minor = stuff->client_minor;
+ (void) client_major;
+ (void) client_minor;
rep.type = X_Reply;
rep.length = 0;
@@ -314,11 +313,9 @@ SProcResDispatch (ClientPtr client)
}
void
-ResExtensionInit(void)
+ResExtensionInit(INITARGS)
{
- ExtensionEntry *extEntry;
-
- extEntry = AddExtension(XRES_NAME, 0, 0,
+ (void) AddExtension(XRES_NAME, 0, 0,
ProcResDispatch, SProcResDispatch,
ResResetProc, StandardMinorOpcode);
diff --git a/Xext/xtest.c b/Xext/xtest.c
index 47e7418d8..89bcae3a4 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/programs/Xserver/Xext/xtest.c,v 3.7 2001/12/14 19:58:51 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xtest.c,v 3.11 2003/11/17 22:20:27 dawes Exp $ */
#include "X.h"
#define NEED_EVENTS
@@ -53,22 +53,27 @@ from The Open Group.
#include "xf86_ansic.h"
#endif
+#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(
-#if NeedFunctionPrototypes
ExtensionEntry * /* extEntry */
-#endif
);
static int XTestSwapFakeInput(
-#if NeedFunctionPrototypes
ClientPtr /* client */,
xReq * /* req */
-#endif
);
static DISPATCH_PROC(ProcXTestCompareCursor);
@@ -83,14 +88,20 @@ static DISPATCH_PROC(SProcXTestGetVersion);
static DISPATCH_PROC(SProcXTestGrabControl);
void
-XTestExtensionInit()
+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*/
@@ -378,6 +389,33 @@ ProcXTestFakeInput(client)
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)
@@ -386,7 +424,15 @@ ProcXTestFakeInput(client)
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,
diff --git a/Xext/xtest1dd.c b/Xext/xtest1dd.c
index 8a2b779be..41c78d9c9 100644
--- a/Xext/xtest1dd.c
+++ b/Xext/xtest1dd.c
@@ -52,7 +52,7 @@ Telephone and Telegraph Company or of the Regents of the
University of California.
*/
-/* $XFree86: xc/programs/Xserver/Xext/xtest1dd.c,v 3.5 2001/12/14 19:58:52 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xtest1dd.c,v 3.7 2003/11/17 22:20:28 dawes Exp $ */
/***************************************************************
* include files
@@ -158,11 +158,6 @@ static xTestInputActionEvent input_action_packet;
*/
static int packet_index;
/*
- * set to 1 when the input action event is full and needs to be sent to the
- * client
- */
-static int input_action_event_full = 0;
-/*
* logical x position of the mouse during input action gathering
*/
short xtest_mousex;
@@ -171,14 +166,6 @@ short xtest_mousex;
*/
short xtest_mousey;
/*
- * logical x position of the mouse during input action playback
- */
-static short mx;
-/*
- * logical y position of the mouse during input action playback
- */
-static short my;
-/*
* logical x position of the mouse while we are reading fake input actions
* from the client and putting them into the fake input action array
*/
@@ -288,60 +275,38 @@ KeyCode xtest_command_key = 0;
***************************************************************/
static void parse_key_fake(
-#if NeedFunctionPrototypes
XTestKeyInfo * /* fkey */
-#endif
);
static void parse_motion_fake(
-#if NeedFunctionPrototypes
XTestMotionInfo * /* fmotion */
-#endif
);
static void parse_jump_fake(
-#if NeedFunctionPrototypes
XTestJumpInfo * /* fjump */
-#endif
);
static void parse_delay_fake(
-#if NeedFunctionPrototypes
XTestDelayInfo * /* tevent */
-#endif
);
static void send_ack(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
static void start_play_clock(
-#if NeedFunctionPrototypes
void
-#endif
);
static void compute_action_time(
-#if NeedFunctionPrototypes
struct timeval * /* rtime */
-#endif
);
static int find_residual_time(
-#if NeedFunctionPrototypes
struct timeval * /* rtime */
-#endif
);
static CARD16 check_time_event(
-#if NeedFunctionPrototypes
void
-#endif
);
static CARD32 current_ms(
-#if NeedFunctionPrototypes
struct timeval * /* otime */
-#endif
);
static int there_is_room(
-#if NeedFunctionPrototypes
int /* actsize */
-#endif
);
/******************************************************************************
@@ -471,7 +436,6 @@ flush_input_actions()
/*
* re-initialize the input action event
*/
- input_action_event_full = 0;
input_action_packet.type = XTestInputActionType;
packet_index = 0;
}
@@ -690,7 +654,6 @@ int actsize;
{
if ((packet_index + actsize) > XTestACTIONS_SIZE)
{
- input_action_event_full = 1;
return(0);
}
else
@@ -1316,8 +1279,6 @@ int mousex, mousey;
action_array[read_index].x,
action_array[read_index].y,
action_array[read_index].device);
- mx = action_array[read_index].x;
- my = action_array[read_index].y;
}
if (action_array[read_index].type == XTestKEY_ACTION)
{
diff --git a/Xext/xtest1dd.h b/Xext/xtest1dd.h
index 1b2fccdf4..6e258080e 100644
--- a/Xext/xtest1dd.h
+++ b/Xext/xtest1dd.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/xtest1dd.h,v 3.2 2001/08/01 00:44:44 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xtest1dd.h,v 3.3 2003/11/17 22:20:28 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -35,117 +35,89 @@ extern ClientPtr playback_client;
extern KeyCode xtest_command_key;
extern void stop_stealing_input(
-#if NeedFunctionPrototypes
void
-#endif
);
extern void
steal_input(
-#if NeedFunctionPrototypes
ClientPtr /* client */,
CARD32 /* mode */
-#endif
);
extern void
flush_input_actions(
-#if NeedFunctionPrototypes
void
-#endif
);
extern void
XTestStealJumpData(
-#if NeedFunctionPrototypes
int /* jx */,
int /* jy */,
int /* dev_type */
-#endif
);
extern void
XTestStealMotionData(
-#if NeedFunctionPrototypes
int /* dx */,
int /* dy */,
int /* dev_type */,
int /* mx */,
int /* my */
-#endif
);
extern Bool
XTestStealKeyData(
-#if NeedFunctionPrototypes
unsigned /* keycode */,
int /* keystate */,
int /* dev_type */,
int /* locx */,
int /* locy */
-#endif
);
extern void
parse_fake_input(
-#if NeedFunctionPrototypes
ClientPtr /* client */,
char * /* req */
-#endif
);
extern void
XTestComputeWaitTime(
-#if NeedFunctionPrototypes
struct timeval * /* waittime */
-#endif
);
extern int
XTestProcessInputAction(
-#if NeedFunctionPrototypes
int /* readable */,
struct timeval * /* waittime */
-#endif
);
extern void
abort_play_back(
-#if NeedFunctionPrototypes
void
-#endif
);
extern void
return_input_array_size(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
extern void XTestGenerateEvent(
-#if NeedFunctionPrototypes
int /* dev_type */,
int /* keycode */,
int /* keystate */,
int /* mousex */,
int /* mousey */
-#endif
);
extern void XTestGetPointerPos(
-#if NeedFunctionPrototypes
short * /* fmousex */,
short * /* fmousey */
-#endif
);
extern void XTestJumpPointer(
-#if NeedFunctionPrototypes
int /* jx */,
int /* jy */,
int /* dev_type */
-#endif
);
#endif /* XTEST1DD_H */
diff --git a/Xext/xtest1di.c b/Xext/xtest1di.c
index 43c1d58d1..539d14e30 100644
--- a/Xext/xtest1di.c
+++ b/Xext/xtest1di.c
@@ -52,7 +52,7 @@ Telephone and Telegraph Company or of the Regents of the
University of California.
*/
-/* $XFree86: xc/programs/Xserver/Xext/xtest1di.c,v 3.3 2001/12/14 19:58:52 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xtest1di.c,v 3.6 2003/11/17 22:20:28 dawes Exp $ */
/*****************************************************************************
* include files
@@ -72,6 +72,7 @@ University of California.
#include "opaque.h"
#define XTestSERVER_SIDE
#include "xtestext1.h"
+#include "modinit.h"
#include "xtest1dd.h"
@@ -80,23 +81,6 @@ University of California.
****************************************************************************/
/*****************************************************************************
- * externals
- ****************************************************************************/
-
-/*
- * id of client using XTestGetInput
- *
- * defined in xtest1dd.c
- */
-extern ClientPtr current_xtest_client;
-/*
- * id of client using XTestFakeInput
- *
- * defined in xtest1dd.c
- */
-extern ClientPtr playback_client;
-
-/*****************************************************************************
* variables
****************************************************************************/
@@ -150,29 +134,21 @@ static DISPATCH_PROC(ProcTestQueryInputSize);
static DISPATCH_PROC(SProcTestQueryInputSize);
static void XTestResetProc(
-#if NeedFunctionPrototypes
ExtensionEntry * /* unused */
-#endif
);
static void SReplyXTestDispatch(
-#if NeedFunctionPrototypes
ClientPtr /* client_ptr */,
int /* size */,
char * /* reply_ptr */
-#endif
);
static void SEventXTestDispatch(
-#if NeedFunctionPrototypes
xEvent * /* from */,
xEvent * /* to */
-#endif
);
static int XTestCurrentClientGone(
-#if NeedFunctionPrototypes
pointer /* value */,
XID /* id */
-#endif
);
/*****************************************************************************
@@ -186,7 +162,7 @@ static int XTestCurrentClientGone(
* (other than the core errors).
*/
void
-XTestExtension1Init()
+XTestExtension1Init(INITARGS)
{
/*
* holds the pointer to the extension entry structure
diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index 3d321e8ae..40313470c 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -21,7 +21,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/Xext/xvdisp.c,v 1.25 2001/11/18 23:55:48 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xvdisp.c,v 1.29 2003/10/02 13:29:39 eich Exp $ */
/*
** File:
@@ -70,6 +70,8 @@ SOFTWARE.
#include "xf86_ansic.h"
#endif
+#include "xvdisp.h"
+
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
@@ -1207,7 +1209,7 @@ ProcXvShmPutImage(ClientPtr client)
#endif
#ifdef XvMCExtension
-XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id);
+#include "xvmcext.h"
#endif
static int
@@ -1939,8 +1941,7 @@ XineramaXvShmPutImage(ClientPtr client)
client, stuff->port, XvXRTPort, SecurityReadAccess)))
return _XvBadPort;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
x = stuff->drw_x;
y = stuff->drw_y;
@@ -1987,8 +1988,7 @@ XineramaXvPutImage(ClientPtr client)
client, stuff->port, XvXRTPort, SecurityReadAccess)))
return _XvBadPort;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
x = stuff->drw_x;
y = stuff->drw_y;
@@ -2033,8 +2033,7 @@ XineramaXvPutVideo(ClientPtr client)
client, stuff->port, XvXRTPort, SecurityReadAccess)))
return _XvBadPort;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
x = stuff->drw_x;
y = stuff->drw_y;
@@ -2079,8 +2078,7 @@ XineramaXvPutStill(ClientPtr client)
client, stuff->port, XvXRTPort, SecurityReadAccess)))
return _XvBadPort;
- isRoot = (draw->type == XRT_WINDOW) &&
- (stuff->drawable == WindowTable[0]->drawable.id);
+ isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
x = stuff->drw_x;
y = stuff->drw_y;
diff --git a/Xext/xvmain.c b/Xext/xvmain.c
index c6c10e544..2c3f484bd 100644
--- a/Xext/xvmain.c
+++ b/Xext/xvmain.c
@@ -21,7 +21,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/Xext/xvmain.c,v 1.13 2001/08/23 13:01:36 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xvmain.c,v 1.16 2003/10/28 23:08:44 tsi Exp $ */
/*
** File:
@@ -101,7 +101,7 @@ SOFTWARE.
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
-extern void XineramifyXv(void);
+#include "xvdisp.h"
#endif
int XvScreenIndex = -1;
@@ -594,6 +594,15 @@ XvdiSendPortNotify(
}
+
+#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,
@@ -605,11 +614,9 @@ XvdiPutVideo(
INT16 drw_x, INT16 drw_y,
CARD16 drw_w, CARD16 drw_h
){
- int status;
DrawablePtr pOldDraw;
- if(!drw_w || !drw_h || !vid_w || !vid_h)
- return Success;
+ CHECK_SIZE(drw_w, drw_h, vid_w, vid_h);
/* UPDATE TIME VARIABLES FOR USE IN EVENTS */
@@ -633,7 +640,7 @@ XvdiPutVideo(
XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted);
}
- status = (* pPort->pAdaptor->ddPutVideo)(client, pDraw, pPort, pGC,
+ (void) (* pPort->pAdaptor->ddPutVideo)(client, pDraw, pPort, pGC,
vid_x, vid_y, vid_w, vid_h,
drw_x, drw_y, drw_w, drw_h);
@@ -662,8 +669,7 @@ XvdiPutStill(
){
int status;
- if(!drw_w || !drw_h || !vid_w || !vid_h)
- return Success;
+ CHECK_SIZE(drw_w, drw_h, vid_w, vid_h);
/* UPDATE TIME VARIABLES FOR USE IN EVENTS */
@@ -703,8 +709,7 @@ XvdiPutImage(
Bool sync,
CARD16 width, CARD16 height
){
- if(!drw_w || !drw_h || !src_w || !src_h)
- return Success;
+ CHECK_SIZE(drw_w, drw_h, src_w, src_h);
/* UPDATE TIME VARIABLES FOR USE IN EVENTS */
@@ -739,11 +744,9 @@ XvdiGetVideo(
INT16 drw_x, INT16 drw_y,
CARD16 drw_w, CARD16 drw_h
){
- int status;
DrawablePtr pOldDraw;
- if(!drw_w || !drw_h || !vid_w || !vid_h)
- return Success;
+ CHECK_SIZE(drw_w, drw_h, vid_w, vid_h);
/* UPDATE TIME VARIABLES FOR USE IN EVENTS */
@@ -767,7 +770,7 @@ XvdiGetVideo(
XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted);
}
- status = (* pPort->pAdaptor->ddGetVideo)(client, pDraw, pPort, pGC,
+ (void) (* pPort->pAdaptor->ddGetVideo)(client, pDraw, pPort, pGC,
vid_x, vid_y, vid_w, vid_h,
drw_x, drw_y, drw_w, drw_h);
@@ -796,8 +799,7 @@ XvdiGetStill(
){
int status;
- if(!drw_w || !drw_h || !vid_w || !vid_h)
- return Success;
+ CHECK_SIZE(drw_w, drw_h, vid_w, vid_h);
/* UPDATE TIME VARIABLES FOR USE IN EVENTS */
diff --git a/Xext/xvmc.c b/Xext/xvmc.c
index 7e99e11a5..cb6c06301 100644
--- a/Xext/xvmc.c
+++ b/Xext/xvmc.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/xvmc.c,v 1.7 2001/11/18 23:55:48 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xvmc.c,v 1.9 2003/07/17 16:04:33 dawes Exp $ */
#define NEED_REPLIES
#define NEED_EVENTS
diff --git a/Xext/xvmcext.h b/Xext/xvmcext.h
index b18a75511..b589c5487 100644
--- a/Xext/xvmcext.h
+++ b/Xext/xvmcext.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/xvmcext.h,v 1.1 2001/04/07 11:04:21 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xvmcext.h,v 1.2 2003/07/17 16:04:33 dawes Exp $ */
#ifndef _XVMC_H
#define _XVMC_H
@@ -106,4 +106,6 @@ void XvMCExtensionInit(void);
int XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr adapt);
+XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id);
+
#endif /* _XVMC_H */
diff --git a/Xi/allowev.h b/Xi/allowev.h
index 950824927..0202b2cf5 100644
--- a/Xi/allowev.h
+++ b/Xi/allowev.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/allowev.h,v 3.1 1996/04/15 11:18:23 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/allowev.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,16 +29,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXAllowDeviceEvents(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXAllowDeviceEvents(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
#endif /* ALLOWEV_H */
diff --git a/Xi/chgdctl.h b/Xi/chgdctl.h
index 4d245388d..0d15001a0 100644
--- a/Xi/chgdctl.h
+++ b/Xi/chgdctl.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/chgdctl.h,v 3.1 1996/04/15 11:18:25 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/chgdctl.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,25 +29,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXChangeDeviceControl(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXChangeDeviceControl(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
SRepXChangeDeviceControl (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xChangeDeviceControlReply * /* rep */
-#endif
);
#endif /* CHGDCTL_H */
diff --git a/Xi/chgfctl.h b/Xi/chgfctl.h
index ebf41976c..4f833617a 100644
--- a/Xi/chgfctl.h
+++ b/Xi/chgfctl.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/chgfctl.h,v 3.1 1996/04/15 11:18:26 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/chgfctl.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,82 +29,66 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXChangeFeedbackControl(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXChangeFeedbackControl(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ChangeKbdFeedback (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
DeviceIntPtr /* dev */,
unsigned long /* mask */,
KbdFeedbackPtr /* k */,
xKbdFeedbackCtl * /* f */
-#endif
);
int
ChangePtrFeedback (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
DeviceIntPtr /* dev */,
unsigned long /* mask */,
PtrFeedbackPtr /* p */,
xPtrFeedbackCtl * /* f */
-#endif
);
int
ChangeIntegerFeedback (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
DeviceIntPtr /* dev */,
unsigned long /* mask */,
IntegerFeedbackPtr /* i */,
xIntegerFeedbackCtl * /* f */
-#endif
);
int
ChangeStringFeedback (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
DeviceIntPtr /* dev */,
unsigned long /* mask */,
StringFeedbackPtr /* s */,
xStringFeedbackCtl * /* f */
-#endif
);
int
ChangeBellFeedback (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
DeviceIntPtr /* dev */,
unsigned long /* mask */,
BellFeedbackPtr /* b */,
xBellFeedbackCtl * /* f */
-#endif
);
int
ChangeLedFeedback (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
DeviceIntPtr /* dev */,
unsigned long /* mask */,
LedFeedbackPtr /* l */,
xLedFeedbackCtl * /* f */
-#endif
);
#endif /* CHGFCTL_H */
diff --git a/Xi/chgkbd.h b/Xi/chgkbd.h
index 98b95a6b0..5a2cef2c7 100644
--- a/Xi/chgkbd.h
+++ b/Xi/chgkbd.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/chgkbd.h,v 3.1 1996/04/15 11:18:27 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/chgkbd.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,25 +29,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXChangeKeyboardDevice(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXChangeKeyboardDevice (
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
SRepXChangeKeyboardDevice (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xChangeKeyboardDeviceReply * /* rep */
-#endif
);
diff --git a/Xi/chgkmap.h b/Xi/chgkmap.h
index fa7035988..fd7ed4673 100644
--- a/Xi/chgkmap.h
+++ b/Xi/chgkmap.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/chgkmap.h,v 3.1 1996/04/15 11:18:28 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/chgkmap.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,16 +29,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXChangeDeviceKeyMapping(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXChangeDeviceKeyMapping(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
#endif /* CHGKMAP_H */
diff --git a/Xi/chgprop.h b/Xi/chgprop.h
index a72c6f036..9df05b4d0 100644
--- a/Xi/chgprop.h
+++ b/Xi/chgprop.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/chgprop.h,v 3.1 1996/04/15 11:18:29 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/chgprop.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,16 +29,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXChangeDeviceDontPropagateList (
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXChangeDeviceDontPropagateList (
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
#endif /* CHGPROP_H */
diff --git a/Xi/chgptr.h b/Xi/chgptr.h
index 93f5822fc..3168e9710 100644
--- a/Xi/chgptr.h
+++ b/Xi/chgptr.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/chgptr.h,v 3.1 1996/04/15 11:18:31 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/chgptr.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,53 +29,41 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXChangePointerDevice(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXChangePointerDevice (
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
DeleteFocusClassDeviceStruct(
-#if NeedFunctionPrototypes
DeviceIntPtr /* dev */
-#endif
);
void
SendEventToAllWindows (
-#if NeedFunctionPrototypes
DeviceIntPtr /* dev */,
Mask /* mask */,
xEvent * /* ev */,
int /* count */
-#endif
);
void
FindInterestedChildren ( /* FIXME: could be static? */
-#if NeedFunctionPrototypes
DeviceIntPtr /* dev */,
WindowPtr /* p1 */,
Mask /* mask */,
xEvent * /* ev */,
int /* count */
-#endif
);
void
SRepXChangePointerDevice (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xChangePointerDeviceReply * /* rep */
-#endif
);
#endif /* CHGPTR_H */
diff --git a/Xi/closedev.h b/Xi/closedev.h
index f71336e96..0295b2c8f 100644
--- a/Xi/closedev.h
+++ b/Xi/closedev.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/closedev.h,v 3.1 1996/04/15 11:18:32 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/closedev.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,34 +29,26 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXCloseDevice(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXCloseDevice(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
DeleteEventsFromChildren(
-#if NeedFunctionPrototypes
DeviceIntPtr /* dev */,
WindowPtr /* p1 */,
ClientPtr /* client */
-#endif
);
void
DeleteDeviceEvents (
-#if NeedFunctionPrototypes
DeviceIntPtr /* dev */,
WindowPtr /* pWin */,
ClientPtr /* client */
-#endif
);
#endif /* CLOSEDEV_H */
diff --git a/Xi/devbell.h b/Xi/devbell.h
index cccb31de9..bbf6dea92 100644
--- a/Xi/devbell.h
+++ b/Xi/devbell.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/devbell.h,v 3.1 1996/04/15 11:18:32 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/devbell.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,16 +29,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXDeviceBell (
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXDeviceBell (
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
#endif /* DEVBELL_H */
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 76a693e6c..d2b2fb58c 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -44,7 +44,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/Xi/exevents.c,v 3.10 2001/12/14 19:58:55 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/exevents.c,v 3.11 2003/11/17 22:20:29 dawes Exp $ */
/********************************************************************
*
@@ -82,15 +82,11 @@ SOFTWARE.
(class)->state | (class)->motionMask)
static Bool ShouldFreeInputMasks(
-#if NeedFunctionPrototypes
WindowPtr /* pWin */,
Bool /* ignoreSelectedEvents */
-#endif
);
static Bool MakeInputMasks (
-#if NeedFunctionPrototypes
WindowPtr /* pWin */
-#endif
);
/**************************************************************************
@@ -328,7 +324,6 @@ InitValuatorAxisStruct( DeviceIntPtr dev,
}
static void
-#if NeedFunctionPrototypes
FixDeviceStateNotify (
DeviceIntPtr dev,
deviceStateNotify *ev,
@@ -336,15 +331,6 @@ FixDeviceStateNotify (
ButtonClassPtr b,
ValuatorClassPtr v,
int first)
-#else
-FixDeviceStateNotify (dev, ev, k, b, v, first)
- DeviceIntPtr dev;
- deviceStateNotify *ev;
- KeyClassPtr k;
- ButtonClassPtr b;
- ValuatorClassPtr v;
- int first;
-#endif
{
ev->type = DeviceStateNotify;
ev->deviceid = dev->id;
@@ -383,19 +369,11 @@ FixDeviceStateNotify (dev, ev, k, b, v, first)
}
static void
-#if NeedFunctionPrototypes
FixDeviceValuator (
DeviceIntPtr dev,
deviceValuator *ev,
ValuatorClassPtr v,
int first)
-#else
-FixDeviceValuator (dev, ev, v, first)
- DeviceIntPtr dev;
- deviceValuator *ev;
- ValuatorClassPtr v;
- int first;
-#endif
{
int nval = v->numAxes - first;
@@ -538,7 +516,6 @@ DeviceFocusEvent(dev, type, mode, detail, pWin)
}
int
-#if NeedFunctionPrototypes
GrabButton(
ClientPtr client,
DeviceIntPtr dev,
@@ -552,23 +529,6 @@ GrabButton(
Cursor rcursor,
Window rconfineTo,
Mask eventMask)
-#else
-GrabButton(client, dev, this_device_mode, other_devices_mode, modifiers,
- modifier_device, button, grabWindow, ownerEvents, rcursor, rconfineTo,
- eventMask)
- 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;
-#endif
{
WindowPtr pWin, confineTo;
CursorPtr cursor;
@@ -630,7 +590,6 @@ GrabButton(client, dev, this_device_mode, other_devices_mode, modifiers,
}
int
-#if NeedFunctionPrototypes
GrabKey(
ClientPtr client,
DeviceIntPtr dev,
@@ -642,20 +601,6 @@ GrabKey(
Window grabWindow,
BOOL ownerEvents,
Mask mask)
-#else
-GrabKey(client, dev, this_device_mode, other_devices_mode, modifiers,
- modifier_device, key, grabWindow, ownerEvents, mask)
- 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;
-#endif
{
WindowPtr pWin;
GrabPtr grab;
@@ -1102,18 +1047,11 @@ SetModifierMapping(client, dev, len, rlen, numKeyPerModifier, inputMap, k)
}
void
-#if NeedFunctionPrototypes
SendDeviceMappingNotify(
CARD8 request,
KeyCode firstKeyCode,
CARD8 count,
DeviceIntPtr dev)
-#else
-SendDeviceMappingNotify(request, firstKeyCode, count, dev)
- CARD8 request, count;
- KeyCode firstKeyCode;
- DeviceIntPtr dev;
-#endif
{
xEvent event;
deviceMappingNotify *ev = (deviceMappingNotify *) &event;
@@ -1132,7 +1070,6 @@ SendDeviceMappingNotify(request, firstKeyCode, count, dev)
}
int
-#if NeedFunctionPrototypes
ChangeKeyMapping(
ClientPtr client,
DeviceIntPtr dev,
@@ -1142,18 +1079,6 @@ ChangeKeyMapping(
CARD8 keyCodes,
CARD8 keySymsPerKeyCode,
KeySym *map)
-#else
-ChangeKeyMapping(client, dev, len, type, firstKeyCode, keyCodes,
- keySymsPerKeyCode, map)
- ClientPtr client;
- DeviceIntPtr dev;
- unsigned len;
- int type;
- KeyCode firstKeyCode;
- CARD8 keyCodes;
- CARD8 keySymsPerKeyCode;
- KeySym *map;
-#endif
{
KeySymsRec keysyms;
KeyClassPtr k = dev->key;
diff --git a/Xi/extinit.c b/Xi/extinit.c
index ce5d96c8a..01d51ba64 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/Xi/extinit.c,v 3.6 2001/12/14 19:58:55 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/extinit.c,v 3.7 2003/11/17 22:20:29 dawes Exp $ */
/********************************************************************
*
@@ -894,13 +894,8 @@ MakeDeviceTypeAtoms ()
*/
DeviceIntPtr
-#if NeedFunctionPrototypes
LookupDeviceIntRec (
CARD8 id)
-#else
-LookupDeviceIntRec (id)
- CARD8 id;
-#endif
{
DeviceIntPtr dev;
diff --git a/Xi/getbmap.h b/Xi/getbmap.h
index 30de6f5c6..999a7c9f9 100644
--- a/Xi/getbmap.h
+++ b/Xi/getbmap.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/getbmap.h,v 3.1 1996/04/15 11:18:37 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/getbmap.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,25 +29,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXGetDeviceButtonMapping(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXGetDeviceButtonMapping (
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
SRepXGetDeviceButtonMapping (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xGetDeviceButtonMappingReply * /* rep */
-#endif
);
#endif /* GETBMAP_H */
diff --git a/Xi/getdctl.h b/Xi/getdctl.h
index d22675f4f..0318b4387 100644
--- a/Xi/getdctl.h
+++ b/Xi/getdctl.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/getdctl.h,v 3.1 1996/04/15 11:18:38 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/getdctl.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,35 +29,27 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXGetDeviceControl (
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXGetDeviceControl (
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
CopySwapDeviceResolution (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
ValuatorClassPtr /* v */,
char * /* buf */,
int /* length */
-#endif
);
void
SRepXGetDeviceControl (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xGetDeviceControlReply * /* rep */
-#endif
);
#endif /* GETDCTL_H */
diff --git a/Xi/getfctl.h b/Xi/getfctl.h
index e51830d49..6ba96b066 100644
--- a/Xi/getfctl.h
+++ b/Xi/getfctl.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/getfctl.h,v 3.1 1996/04/15 11:18:39 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/getfctl.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,79 +29,61 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXGetFeedbackControl(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXGetFeedbackControl(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
CopySwapKbdFeedback (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
KbdFeedbackPtr /* k */,
char ** /* buf */
-#endif
);
void
CopySwapPtrFeedback (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
PtrFeedbackPtr /* p */,
char ** /* buf */
-#endif
);
void
CopySwapIntegerFeedback (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
IntegerFeedbackPtr /* i */,
char ** /* buf */
-#endif
);
void
CopySwapStringFeedback (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
StringFeedbackPtr /* s */,
char ** /* buf */
-#endif
);
void
CopySwapLedFeedback (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
LedFeedbackPtr /* l */,
char ** /* buf */
-#endif
);
void
CopySwapBellFeedback (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
BellFeedbackPtr /* b */,
char ** /* buf */
-#endif
);
void
SRepXGetFeedbackControl (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xGetFeedbackControlReply * /* rep */
-#endif
);
#endif /* GETFCTL_H */
diff --git a/Xi/getfocus.h b/Xi/getfocus.h
index 8a21c860c..d3df5ba5f 100644
--- a/Xi/getfocus.h
+++ b/Xi/getfocus.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/getfocus.h,v 3.1 1996/04/15 11:18:40 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/getfocus.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,25 +29,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXGetDeviceFocus(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXGetDeviceFocus(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
SRepXGetDeviceFocus (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xGetDeviceFocusReply * /* rep */
-#endif
);
#endif /* GETFOCUS_H */
diff --git a/Xi/getkmap.h b/Xi/getkmap.h
index 780a2e016..ebd02f3ef 100644
--- a/Xi/getkmap.h
+++ b/Xi/getkmap.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/getkmap.h,v 3.1 1996/04/15 11:18:41 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/getkmap.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,25 +29,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXGetDeviceKeyMapping(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXGetDeviceKeyMapping(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
SRepXGetDeviceKeyMapping (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xGetDeviceKeyMappingReply * /* rep */
-#endif
);
#endif /* GETKMAP_H */
diff --git a/Xi/getmmap.h b/Xi/getmmap.h
index cf9ca000d..ff317e0c4 100644
--- a/Xi/getmmap.h
+++ b/Xi/getmmap.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/getmmap.h,v 3.1 1996/04/15 11:18:42 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/getmmap.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,25 +29,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXGetDeviceModifierMapping(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXGetDeviceModifierMapping(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
SRepXGetDeviceModifierMapping (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xGetDeviceModifierMappingReply * /* rep */
-#endif
);
#endif /* GETMMAP_H */
diff --git a/Xi/getprop.h b/Xi/getprop.h
index 4f467e041..452875bd9 100644
--- a/Xi/getprop.h
+++ b/Xi/getprop.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/getprop.h,v 3.1 1996/04/15 11:18:44 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/getprop.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,36 +29,28 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXGetDeviceDontPropagateList(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXGetDeviceDontPropagateList (
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
XEventClass *
ClassFromMask (
-#if NeedFunctionPrototypes
XEventClass * /* buf */,
Mask /* mask */,
int /* maskndx */,
CARD16 * /* count */,
int /* mode */
-#endif
);
void
SRepXGetDeviceDontPropagateList (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xGetDeviceDontPropagateListReply * /* rep */
-#endif
);
#endif /* GETPROP_H */
diff --git a/Xi/getselev.h b/Xi/getselev.h
index 0d4e6a467..5ed759c29 100644
--- a/Xi/getselev.h
+++ b/Xi/getselev.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/getselev.h,v 3.1 1996/04/15 11:18:49 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/getselev.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,25 +29,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXGetSelectedExtensionEvents(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXGetSelectedExtensionEvents(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
SRepXGetSelectedExtensionEvents (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xGetSelectedExtensionEventsReply * /* rep */
-#endif
);
#endif /* GETSELEV_H */
diff --git a/Xi/getvers.h b/Xi/getvers.h
index 1646633e9..2304c6639 100644
--- a/Xi/getvers.h
+++ b/Xi/getvers.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/getvers.h,v 3.1 1996/04/15 11:18:50 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/getvers.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,25 +29,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXGetExtensionVersion(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXGetExtensionVersion (
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
SRepXGetExtensionVersion (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xGetExtensionVersionReply * /* rep */
-#endif
);
#endif /* GETVERS_H */
diff --git a/Xi/grabdev.h b/Xi/grabdev.h
index 382e06b99..1eddd24ac 100644
--- a/Xi/grabdev.h
+++ b/Xi/grabdev.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/grabdev.h,v 3.1 1996/04/15 11:18:51 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/grabdev.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,37 +29,29 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXGrabDevice(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXGrabDevice(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
CreateMaskFromList (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
XEventClass * /* list */,
int /* count */,
struct tmask /* mask */[],
DeviceIntPtr /* dev */,
int /* req */
-#endif
);
void
SRepXGrabDevice (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xGrabDeviceReply * /* rep */
-#endif
);
#endif /* GRABDEV_H */
diff --git a/Xi/grabdevb.h b/Xi/grabdevb.h
index 39b96bcf1..8782c12ac 100644
--- a/Xi/grabdevb.h
+++ b/Xi/grabdevb.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/grabdevb.h,v 3.1 1996/04/15 11:18:52 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/grabdevb.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,16 +29,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXGrabDeviceButton(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXGrabDeviceButton(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
#endif /* GRABDEVB_H */
diff --git a/Xi/grabdevk.h b/Xi/grabdevk.h
index 7e533fe16..eb8db9511 100644
--- a/Xi/grabdevk.h
+++ b/Xi/grabdevk.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/grabdevk.h,v 3.1 1996/04/15 11:18:53 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/grabdevk.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,16 +29,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXGrabDeviceKey(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXGrabDeviceKey(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
#endif /* GRABDEVK_H */
diff --git a/Xi/gtmotion.h b/Xi/gtmotion.h
index 1139a1a76..7d85e566e 100644
--- a/Xi/gtmotion.h
+++ b/Xi/gtmotion.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/gtmotion.h,v 3.1 1996/04/15 11:18:56 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/gtmotion.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,25 +29,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXGetDeviceMotionEvents(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXGetDeviceMotionEvents(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
SRepXGetDeviceMotionEvents (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xGetDeviceMotionEventsReply * /* rep */
-#endif
);
#endif /* GTMOTION_H */
diff --git a/Xi/listdev.h b/Xi/listdev.h
index d1ecde2ab..c9553b692 100644
--- a/Xi/listdev.h
+++ b/Xi/listdev.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/listdev.h,v 3.1 1996/04/15 11:18:57 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/listdev.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,91 +29,71 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXListInputDevices(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXListInputDevices (
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
SizeDeviceInfo (
-#if NeedFunctionPrototypes
DeviceIntPtr /* d */,
int * /* namesize */,
int * /* size */
-#endif
);
void
ListDeviceInfo (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
DeviceIntPtr /* d */,
xDeviceInfoPtr /* dev */,
char ** /* devbuf */,
char ** /* classbuf */,
char ** /* namebuf */
-#endif
);
void
CopyDeviceName (
-#if NeedFunctionPrototypes
char ** /* namebuf */,
char * /* name */
-#endif
);
void
CopySwapDevice (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
DeviceIntPtr /* d */,
int /* num_classes */,
char ** /* buf */
-#endif
);
void
CopySwapKeyClass (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
KeyClassPtr /* k */,
char ** /* buf */
-#endif
);
void
CopySwapButtonClass (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
ButtonClassPtr /* b */,
char ** /* buf */
-#endif
);
int
CopySwapValuatorClass (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
ValuatorClassPtr /* v */,
char ** /* buf */
-#endif
);
void
SRepXListInputDevices (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xListInputDevicesReply * /* rep */
-#endif
);
#endif /* LISTDEV_H */
diff --git a/Xi/opendev.h b/Xi/opendev.h
index 0813e59ad..818e2d877 100644
--- a/Xi/opendev.h
+++ b/Xi/opendev.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/opendev.h,v 3.1 1996/04/15 11:18:58 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/opendev.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,25 +29,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXOpenDevice(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXOpenDevice(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
SRepXOpenDevice (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xOpenDeviceReply * /* rep */
-#endif
);
#endif /* OPENDEV_H */
diff --git a/Xi/queryst.h b/Xi/queryst.h
index 6d6b4b65b..50d36e95e 100644
--- a/Xi/queryst.h
+++ b/Xi/queryst.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/queryst.h,v 3.1 1996/04/15 11:19:00 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/queryst.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,25 +29,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXQueryDeviceState(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXQueryDeviceState(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
SRepXQueryDeviceState (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xQueryDeviceStateReply * /* rep */
-#endif
);
#endif /* QUERYST_H */
diff --git a/Xi/selectev.h b/Xi/selectev.h
index 79332e199..2327b94c5 100644
--- a/Xi/selectev.h
+++ b/Xi/selectev.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/selectev.h,v 3.1 1996/04/15 11:19:01 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/selectev.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,16 +29,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXSelectExtensionEvent (
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXSelectExtensionEvent (
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
#endif /* SELECTEV_H */
diff --git a/Xi/sendexev.h b/Xi/sendexev.h
index 876bbe647..c2ace5804 100644
--- a/Xi/sendexev.h
+++ b/Xi/sendexev.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/sendexev.h,v 3.1 1996/04/15 11:19:02 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/sendexev.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,16 +29,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXSendExtensionEvent(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXSendExtensionEvent(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
#endif /* SENDEXEV_H */
diff --git a/Xi/setbmap.h b/Xi/setbmap.h
index 3e85c0a58..77f097104 100644
--- a/Xi/setbmap.h
+++ b/Xi/setbmap.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/setbmap.h,v 3.1 1996/04/15 11:19:03 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/setbmap.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,25 +29,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXSetDeviceButtonMapping(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXSetDeviceButtonMapping(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
SRepXSetDeviceButtonMapping(
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xSetDeviceButtonMappingReply * /* rep */
-#endif
);
#endif /* SETBMAP_H */
diff --git a/Xi/setdval.h b/Xi/setdval.h
index 5a8b42192..e6f08a64c 100644
--- a/Xi/setdval.h
+++ b/Xi/setdval.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/setdval.h,v 3.1 1996/04/15 11:19:04 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/setdval.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,25 +29,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXSetDeviceValuators(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXSetDeviceValuators(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
SRepXSetDeviceValuators(
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xSetDeviceValuatorsReply * /* rep */
-#endif
);
#endif /* SETDVAL_H */
diff --git a/Xi/setfocus.h b/Xi/setfocus.h
index 44a98193a..1da6927b4 100644
--- a/Xi/setfocus.h
+++ b/Xi/setfocus.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/setfocus.h,v 3.1 1996/04/15 11:19:05 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/setfocus.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,16 +29,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXSetDeviceFocus(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXSetDeviceFocus(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
#endif /* SETFOCUS_H */
diff --git a/Xi/setmmap.h b/Xi/setmmap.h
index 925373e9e..30fb57b48 100644
--- a/Xi/setmmap.h
+++ b/Xi/setmmap.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/setmmap.h,v 3.1 1996/04/15 11:19:06 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/setmmap.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,25 +29,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXSetDeviceModifierMapping(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXSetDeviceModifierMapping(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
SRepXSetDeviceModifierMapping(
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xSetDeviceModifierMappingReply * /* rep */
-#endif
);
#endif /* SETMMAP_H */
diff --git a/Xi/setmode.h b/Xi/setmode.h
index cd27ba146..63a1dd35b 100644
--- a/Xi/setmode.h
+++ b/Xi/setmode.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/setmode.h,v 3.1 1996/04/15 11:19:07 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/setmode.h,v 3.2 2003/11/17 22:20:29 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,25 +29,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXSetDeviceMode(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXSetDeviceMode(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
SRepXSetDeviceMode(
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* size */,
xSetDeviceModeReply * /* rep */
-#endif
);
#endif /* SETMODE_H */
diff --git a/Xi/stubs.c b/Xi/stubs.c
index 991f8b433..879d8e9b7 100644
--- a/Xi/stubs.c
+++ b/Xi/stubs.c
@@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/Xi/stubs.c,v 3.4 2001/12/14 19:58:59 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/stubs.c,v 3.5 2003/11/17 22:20:30 dawes Exp $ */
/*
* stubs.c -- stub routines for the X server side of the XINPUT
@@ -132,17 +132,11 @@ ChangeKeyboardDevice (old_dev, new_dev)
*/
int
-#if NeedFunctionPrototypes
ChangePointerDevice (
DeviceIntPtr old_dev,
DeviceIntPtr new_dev,
unsigned char x,
unsigned char y)
-#else
-ChangePointerDevice (old_dev, new_dev, x, y)
- DeviceIntPtr old_dev, new_dev;
- unsigned char x, y;
-#endif
{
/***********************************************************************
InitFocusClassDeviceStruct(old_dev); * allow focusing old ptr*
diff --git a/Xi/ungrdev.h b/Xi/ungrdev.h
index 6b00a3ef6..9a036901f 100644
--- a/Xi/ungrdev.h
+++ b/Xi/ungrdev.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/ungrdev.h,v 3.1 1996/04/15 11:19:08 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/ungrdev.h,v 3.2 2003/11/17 22:20:30 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,16 +29,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXUngrabDevice(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXUngrabDevice(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
#endif /* UNGRDEV_H */
diff --git a/Xi/ungrdevb.h b/Xi/ungrdevb.h
index d416c73c6..500b77ebb 100644
--- a/Xi/ungrdevb.h
+++ b/Xi/ungrdevb.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/ungrdevb.h,v 3.1 1996/04/15 11:19:10 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/ungrdevb.h,v 3.2 2003/11/17 22:20:30 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,16 +29,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXUngrabDeviceButton(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXUngrabDeviceButton(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
#endif /* UNGRDEVB_H */
diff --git a/Xi/ungrdevk.h b/Xi/ungrdevk.h
index 26dc14ae0..c43575ba1 100644
--- a/Xi/ungrdevk.h
+++ b/Xi/ungrdevk.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xi/ungrdevk.h,v 3.1 1996/04/15 11:19:12 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xi/ungrdevk.h,v 3.2 2003/11/17 22:20:30 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,16 +29,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
SProcXUngrabDeviceKey(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
ProcXUngrabDeviceKey(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
#endif /* UNGRDEVK_H */
diff --git a/Xprint/Init.c b/Xprint/Init.c
index a022c31c7..c936f4542 100644
--- a/Xprint/Init.c
+++ b/Xprint/Init.c
@@ -50,7 +50,7 @@ copyright holders.
** *********************************************************
**
********************************************************************/
-/* $XFree86: xc/programs/Xserver/Xprint/Init.c,v 1.13 2001/12/21 21:02:04 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/Init.c,v 1.15 2003/10/29 22:11:54 tsi Exp $ */
#include <unistd.h>
#include <stdlib.h>
@@ -325,11 +325,6 @@ typedef struct _driverMapping {
int screenNum;
} DriverMapEntry, *DriverMapPtr;
-static const char configFilePath[] =
-"/etc/dt/config/print:/usr/dt/config/print";
-
-static const char printServerConfigDir[] = "XPSERVERCONFIGDIR";
-
static char *configFileName = (char *)NULL;
static Bool freeDefaultFontPath = FALSE;
static char *origFontPath = (char *)NULL;
@@ -1511,57 +1506,6 @@ GenericScreenInit(
}
/*
- * QualifyName - takes an unqualified file name such as X6printers and
- * a colon-separated list of directory path names such as
- * /etc/opt/dt:/opt/dt/config.
- *
- * Returns a fully qualified file path name such as /etc/opt/dt/X6printers.
- * The returned value is malloc'd, and the caller is responsible for
- * freeing the associated memory.
- */
-static char *
-QualifyName(
- char *fileName,
- char *searchPath)
-{
- char * curPath = searchPath;
- char * nextPath;
- char * chance;
- FILE *pFile;
-
- if (fileName == NULL || searchPath == NULL)
- return NULL;
-
- while (1) {
- if ((nextPath = strchr(curPath, ':')) != NULL)
- *nextPath = 0;
-
- chance = (char *)xalloc(strlen(curPath) + strlen(fileName) + 2);
- sprintf(chance,"%s/%s",curPath,fileName);
-
- /* see if we can read from the file */
- if((pFile = fopen(chance, "r")) != (FILE *)NULL)
- {
- fclose(pFile);
- /* ... restore the colon, .... */
- if (nextPath)
- *nextPath = ':';
-
- return chance;
- }
-
- xfree(chance);
-
- if (nextPath == NULL) /* End of path list? */
- break;
-
- /* try the next path */
- curPath = nextPath + 1;
- }
- return NULL;
-}
-
-/*
* FillPrinterListEntry fills in a single XpDiListEntry element with data
* derived from the supplied PrinterDbPtr element.
*
diff --git a/Xprint/Oid.c b/Xprint/Oid.c
index ac0e54434..4c23a6e09 100644
--- a/Xprint/Oid.c
+++ b/Xprint/Oid.c
@@ -30,7 +30,7 @@ not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from said
copyright holders.
*/
-/* $XFree86: xc/programs/Xserver/Xprint/Oid.c,v 1.5 2001/10/28 03:32:53 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/Oid.c,v 1.6 2003/10/29 22:11:54 tsi Exp $ */
#include "attributes.h"
@@ -274,7 +274,7 @@ XpOidParse(const char* value_string,
*/
if(ptr_return != (const char**)NULL)
*ptr_return = ptr+length;
- return i;
+ return (XpOid)i;
}
/*
diff --git a/Xprint/ValTree.c b/Xprint/ValTree.c
index 73aa27a36..327cb468c 100644
--- a/Xprint/ValTree.c
+++ b/Xprint/ValTree.c
@@ -30,6 +30,8 @@ not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from said
copyright holders.
*/
+/* $XFree86: xc/programs/Xserver/Xprint/ValTree.c,v 1.2 2003/11/10 18:21:44 tsi Exp $ */
+
#include "X.h"
#include "scrnintstr.h"
#include "validate.h"
@@ -116,7 +118,7 @@ XpValidateTree (pParent, pChild, kind)
* borderSize.
*/
origPrntClip = pParent->clipList;
- REGION_INIT(pScreen, &tmpPrntClip, NullBox, 0);
+ REGION_NULL(pScreen, &tmpPrntClip);
REGION_SUBRACT(pScreen, &tmpPrntClip, &pParent->winSize,
&pChild->borderSize);
pParent->clipList = tmpPrntClip;
@@ -149,7 +151,7 @@ XpValidateTree (pParent, pChild, kind)
* Compute pParent's AfterValidate structure by subracting the original
* clipList from the newly computed clipList.
*/
- REGION_INIT(pScreen, &pParent->valdata->after.exposed, NullBox, 0);
+ REGION_NULL(pScreen, &pParent->valdata->after.exposed);
REGION_SUBTRACT(pScreen, &pParent->valdata->after.exposed,
&pParent->clipList, &origPrntClip);
diff --git a/Xprint/attributes.c b/Xprint/attributes.c
index 7d71760be..ec60f3032 100644
--- a/Xprint/attributes.c
+++ b/Xprint/attributes.c
@@ -44,7 +44,7 @@ copyright holders.
** *********************************************************
**
********************************************************************/
-/* $XFree86: xc/programs/Xserver/Xprint/attributes.c,v 1.18 2002/05/31 18:45:53 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/attributes.c,v 1.20 2003/10/29 22:11:54 tsi Exp $ */
#include <X11/Xproto.h>
#include <string.h>
@@ -61,6 +61,9 @@ copyright holders.
#include <X11/extensions/Printstr.h>
#include "attributes.h"
+
+#include "Xlib.h"
+#include "Xresource.h"
#include "Xrm.c"
static XrmDatabase CopyDb(XrmDatabase inDb);
@@ -1116,9 +1119,7 @@ SendFileToCommand(
*/
if(userName)
{
- uid_t myUid;
-
- if((myUid = geteuid()) == (uid_t)0)
+ if(geteuid() == (uid_t)0)
{
struct passwd *pPasswd;
@@ -1366,12 +1367,11 @@ VectorizeCommand(
XpContextPtr pContext)
{
char *cmdName;
- int numChars;
if(command == (char *)NULL)
return (char *)NULL;
- numChars = GetToken(command, &cmdName);
+ (void) GetToken(command, &cmdName);
if(cmdName == (char *)NULL)
return (char *)NULL;
diff --git a/Xprint/ddxInit.c b/Xprint/ddxInit.c
index a96a766f8..3d29fd1b1 100644
--- a/Xprint/ddxInit.c
+++ b/Xprint/ddxInit.c
@@ -30,7 +30,7 @@ not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from said
copyright holders.
*/
-/* $XFree86: xc/programs/Xserver/Xprint/ddxInit.c,v 1.14 2001/10/28 03:32:53 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/ddxInit.c,v 1.15 2003/06/23 17:35:44 eich Exp $ */
#include "X.h"
#include "Xproto.h"
@@ -39,8 +39,6 @@ copyright holders.
#include "Xos.h"
#include "DiPrint.h"
-static void Exit(int);
-
/*-
*-----------------------------------------------------------------------
* InitOutput --
@@ -240,12 +238,6 @@ void ddxUseMsg(void)
/* Right now, let's just do nothing */
}
-static void Exit (code)
- int code;
-{
- exit (code);
-}
-
void AbortDDX (void)
{
}
diff --git a/Xprint/pcl/Pcl.h b/Xprint/pcl/Pcl.h
index 0532e1fcc..2af1b2c41 100644
--- a/Xprint/pcl/Pcl.h
+++ b/Xprint/pcl/Pcl.h
@@ -44,7 +44,7 @@ not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from said
copyright holders.
*/
-/* $XFree86: xc/programs/Xserver/Xprint/pcl/Pcl.h,v 1.12 2001/12/21 21:02:05 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/pcl/Pcl.h,v 1.13 2003/07/16 01:38:34 dawes Exp $ */
#ifndef _PCL_H_
#define _PCL_H_
@@ -59,7 +59,7 @@ copyright holders.
#include <X11/extensions/Print.h>
#include <X11/extensions/Printstr.h>
-#include "miscstruct.h"
+#include "regionstr.h"
#include "fontstruct.h"
#include "dixfontstr.h"
#include "gcstruct.h"
diff --git a/Xprint/pcl/PclColor.c b/Xprint/pcl/PclColor.c
index 807e711de..c279c8024 100644
--- a/Xprint/pcl/PclColor.c
+++ b/Xprint/pcl/PclColor.c
@@ -45,7 +45,7 @@ not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from said
copyright holders.
*/
-/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclColor.c,v 1.9 2001/10/28 03:32:54 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclColor.c,v 1.10 2003/10/29 22:11:00 tsi Exp $ */
#include <stdio.h>
#include <string.h>
@@ -396,7 +396,7 @@ PclUpdateColormap(DrawablePtr pDrawable,
PclContextPrivPtr cPriv;
PclPaletteMapPtr pMap;
- PclCmapToContexts *pCmap, *tCmap;
+ PclCmapToContexts *pCmap;
PclContextListPtr new;
char t[80];
Colormap c;
@@ -437,13 +437,8 @@ PclUpdateColormap(DrawablePtr pDrawable,
sPriv = (PclScreenPrivPtr)cmap->pScreen
->devPrivates[PclScreenPrivateIndex].ptr;
pCmap = sPriv->colormaps;
- while( pCmap )
- {
- if( pCmap->colormapId == cmap->mid )
- break;
- tCmap = pCmap;
+ while( pCmap && ( pCmap->colormapId != cmap->mid ) )
pCmap = pCmap->next;
- }
new = (PclContextListPtr)xalloc( sizeof( PclContextList ) );
new->context = pCon;
new->next = pCmap->contexts;
diff --git a/Xprint/pcl/PclFonts.c b/Xprint/pcl/PclFonts.c
index ef4554a12..f2141f9ff 100644
--- a/Xprint/pcl/PclFonts.c
+++ b/Xprint/pcl/PclFonts.c
@@ -13,6 +13,7 @@
** *********************************************************
**
********************************************************************/
+/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclFonts.c,v 1.2 2003/07/16 01:38:34 dawes Exp $ */
/*
(c) Copyright 1996 Hewlett-Packard Company
(c) Copyright 1996 International Business Machines Corp.
@@ -45,7 +46,7 @@ dealings in this Software without prior written authorization from said
copyright holders.
*/
-#include "miscstruct.h"
+#include "regionstr.h"
#include "fontstruct.h"
#include "dixfontstr.h"
#include "scrnintstr.h"
diff --git a/Xprint/pcl/PclMisc.c b/Xprint/pcl/PclMisc.c
index f5d36a263..5b0939df2 100644
--- a/Xprint/pcl/PclMisc.c
+++ b/Xprint/pcl/PclMisc.c
@@ -44,7 +44,7 @@ not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from said
copyright holders.
*/
-/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclMisc.c,v 1.10 2001/12/02 13:35:28 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclMisc.c,v 1.11 2003/10/29 22:11:00 tsi Exp $ */
#include <stdlib.h>
#include <signal.h>
@@ -153,14 +153,14 @@ GetPropString(
static void SigchldHndlr (
int dummy)
{
- int status, w;
+ int status;
int olderrno = errno;
struct sigaction act;
sigfillset(&act.sa_mask);
act.sa_flags = 0;
act.sa_handler = SigchldHndlr;
- w = wait (&status);
+ (void) wait (&status);
/*
* Is this really necessary?
diff --git a/Xprint/pcl/PclPixel.c b/Xprint/pcl/PclPixel.c
index b9685fd1b..238a159ab 100644
--- a/Xprint/pcl/PclPixel.c
+++ b/Xprint/pcl/PclPixel.c
@@ -44,7 +44,7 @@ not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from said
copyright holders.
*/
-/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPixel.c,v 1.6 2001/10/28 03:32:55 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPixel.c,v 1.7 2003/10/29 22:11:00 tsi Exp $ */
#include <stdio.h>
@@ -66,9 +66,11 @@ PclPolyPoint( pDrawable, pGC, mode, nPoints, pPoints )
int xoffset, yoffset;
BoxRec box;
int xloc, yloc, i;
+#if 0
XpContextPtr pCon;
PclContextPrivPtr cPriv;
PclPixmapPrivPtr pPriv;
+#endif
if( PclUpdateDrawableGC( pGC, pDrawable, &outFile ) == FALSE )
return;
@@ -113,6 +115,7 @@ PclPolyPoint( pDrawable, pGC, mode, nPoints, pPoints )
}
}
+#if 0
/*
* Change the line style and width back to what they were before
* this routine was called. No, this isn't pretty...
@@ -121,18 +124,15 @@ PclPolyPoint( pDrawable, pGC, mode, nPoints, pPoints )
{
pCon = PclGetContextFromWindow( (WindowPtr)pDrawable );
cPriv = pCon->devPrivates[PclContextPrivateIndex].ptr;
-/*
cPriv->changeMask = GCLineWidth | GCLineStyle;
-*/
}
else
{
pPriv =
((PixmapPtr)pDrawable)->devPrivates[PclPixmapPrivateIndex].ptr;
-/*
pPriv->changeMask = GCLineWidth | GCLineStyle;
-*/
}
+#endif
PclUpdateDrawableGC( pGC, pDrawable, &outFile );
diff --git a/Xprint/pcl/PclPrint.c b/Xprint/pcl/PclPrint.c
index f21d6c22a..aa2164c92 100644
--- a/Xprint/pcl/PclPrint.c
+++ b/Xprint/pcl/PclPrint.c
@@ -43,7 +43,7 @@ not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from said
copyright holders.
*/
-/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPrint.c,v 1.7 2001/10/28 03:32:55 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPrint.c,v 1.8 2003/10/29 22:11:00 tsi Exp $ */
#include <stdio.h>
#include <string.h>
@@ -137,7 +137,6 @@ PclEndJob(
int retVal;
char *fileName, *trailer;
struct stat statBuf;
- int n;
PclPaletteMapPtr p;
trailer = "\033%-12345X@PJL RESET\n";
@@ -199,14 +198,14 @@ PclEndJob(
* purposes.
*/
rewind( priv->pJobFile );
- n = stat( priv->jobFileName, &statBuf );
+ stat( priv->jobFileName, &statBuf );
#ifdef CCP_DEBUG
unlink( "/users/prince/XpOutput" );
xpoutput = fopen( "/users/prince/XpOutput", "w" );
rewind( priv->pJobFile );
- n = TransferBytes( priv->pJobFile, xpoutput,
+ TransferBytes( priv->pJobFile, xpoutput,
(int)statBuf.st_size );
fclose( xpoutput );
#endif
diff --git a/Xprint/pcl/PclSFonts.c b/Xprint/pcl/PclSFonts.c
index 2f33ab857..d1ad8dc29 100644
--- a/Xprint/pcl/PclSFonts.c
+++ b/Xprint/pcl/PclSFonts.c
@@ -45,7 +45,7 @@ not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from said
copyright holders.
*/
-/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclSFonts.c,v 1.6 2001/10/28 03:32:55 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclSFonts.c,v 1.7 2003/10/29 22:11:00 tsi Exp $ */
#include <stdio.h>
@@ -151,7 +151,7 @@ PclDestroySoftFontInfo( PclSoftFontInfoPtr pSoftFontInfo )
PclFontHead8Ptr pfh8, pfh8_next;
PclFontHead16Ptr pfh16, pfh16_next;
PclInternalFontPtr pin, pin_next;
-unsigned char nindex_row, nindex_col;
+unsigned char nindex_row;
int i;
if ( pSoftFontInfo == (PclSoftFontInfoPtr) NULL )
@@ -169,7 +169,6 @@ int i;
pfh16 = pSoftFontInfo->phead16;
while (pfh16 != (PclFontHead16Ptr) NULL) {
xfree(pfh16->fontname);
- nindex_col = pfh16->lastCol - pfh16->firstCol + 1;
nindex_row = pfh16->lastRow - pfh16->firstRow + 1;
for (i=0; i<nindex_row; i++)
xfree(pfh16->index[i]);
diff --git a/Xprint/pcl/PclText.c b/Xprint/pcl/PclText.c
index ae5446a85..48b468427 100644
--- a/Xprint/pcl/PclText.c
+++ b/Xprint/pcl/PclText.c
@@ -44,7 +44,7 @@ not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from said
copyright holders.
*/
-/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclText.c,v 1.10 2001/12/19 21:55:58 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclText.c,v 1.11 2003/10/29 22:11:00 tsi Exp $ */
#ifdef DO_TWO_BYTE_PCL
#include "iconv.h"
@@ -673,7 +673,7 @@ FontPropPtr props;
FontInfoPtr pfi;
char *fontname;
Atom xa_pcl_font_name, xa_res, xa_ave_width, xa_spacing;
-int res, width = 1;
+int width = 1;
int mask;
int i;
@@ -723,7 +723,6 @@ int i;
pin->height = (float) props->value / 10.0;
mask |= 0x2;
} else if ( (Atom) props->name == xa_res ) {
- res = (int) props->value;
mask |= 0x4;
} else if ( (Atom) props->name == xa_ave_width ) {
width = (int) props->value / 10;
diff --git a/Xprint/pcl/PclWindow.c b/Xprint/pcl/PclWindow.c
index b58bd43a1..27d8ea97d 100644
--- a/Xprint/pcl/PclWindow.c
+++ b/Xprint/pcl/PclWindow.c
@@ -44,7 +44,7 @@ not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from said
copyright holders.
*/
-/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclWindow.c,v 1.10 2001/12/19 21:55:58 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclWindow.c,v 1.11 2003/10/29 22:11:00 tsi Exp $ */
#include <stdio.h>
@@ -208,7 +208,6 @@ PclPaintWindow(
RegionPtr pRegion,
int what)
{
- WindowPtr pRoot;
#define FUNCTION 0
#define FOREGROUND 1
@@ -292,7 +291,6 @@ PclPaintWindow(
gcmask |= GCFunction | GCClipMask;
i = pScreen->myNum;
- pRoot = WindowTable[i];
pBgWin = pWin;
if (what == PW_BORDER)
diff --git a/Xprint/ps/Ps.h b/Xprint/ps/Ps.h
index 9c65dc26f..7b0aaeb39 100644
--- a/Xprint/ps/Ps.h
+++ b/Xprint/ps/Ps.h
@@ -73,7 +73,7 @@ in this Software without prior written authorization from The Open Group.
** *********************************************************
**
********************************************************************/
-/* $XFree86: xc/programs/Xserver/Xprint/ps/Ps.h,v 1.13 2001/12/21 21:02:05 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/ps/Ps.h,v 1.14 2003/07/16 01:38:34 dawes Exp $ */
#ifndef _PS_H_
#define _PS_H_
@@ -93,7 +93,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/extensions/Print.h>
#include <X11/extensions/Printstr.h>
-#include "miscstruct.h"
+#include "regionstr.h"
#include "fontstruct.h"
#include "dixfontstr.h"
#include "gcstruct.h"
diff --git a/Xprint/ps/PsFonts.c b/Xprint/ps/PsFonts.c
index 15abc4b88..9792dae4d 100644
--- a/Xprint/ps/PsFonts.c
+++ b/Xprint/ps/PsFonts.c
@@ -57,7 +57,7 @@ in this Software without prior written authorization from The Open Group.
* or other dealings in this Software without prior written authorization
* from said copyright holders.
*/
-/* $XFree86: xc/programs/Xserver/Xprint/ps/PsFonts.c,v 1.6 2001/12/19 21:55:59 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/ps/PsFonts.c,v 1.7 2003/07/16 01:38:34 dawes Exp $ */
/*******************************************************************
**
@@ -75,7 +75,7 @@ in this Software without prior written authorization from The Open Group.
**
********************************************************************/
-#include "miscstruct.h"
+#include "regionstr.h"
#include "fontstruct.h"
#include "dixfontstr.h"
#include "scrnintstr.h"
diff --git a/Xprint/ps/PsGC.c b/Xprint/ps/PsGC.c
index c1e12f57c..1c2877231 100644
--- a/Xprint/ps/PsGC.c
+++ b/Xprint/ps/PsGC.c
@@ -57,7 +57,7 @@ in this Software without prior written authorization from The Open Group.
* or other dealings in this Software without prior written authorization
* from said copyright holders.
*/
-/* $XFree86: xc/programs/Xserver/Xprint/ps/PsGC.c,v 1.6 2001/12/14 19:59:15 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/ps/PsGC.c,v 1.7 2003/10/29 22:11:55 tsi Exp $ */
/*******************************************************************
**
@@ -181,7 +181,6 @@ PsUpdateDrawableGC(
GC dGC;
unsigned long valid;
int i;
- PsContextPrivPtr cPriv;
BoxPtr boxes;
if (!PsGetDrawablePrivateStuff(pDrawable, &dGC, &valid, psOut, cMap))
@@ -233,8 +232,6 @@ PsUpdateDrawableGC(
PsOut_Offset(*psOut, pDrawable->x, pDrawable->y);
PsOut_Clip(*psOut, pGC->clientClipType, (PsClipPtr)pGC->clientClip);
}
- cPriv = ( PsGetContextFromWindow( (WindowPtr)pDrawable ) )
- ->devPrivates[PsContextPrivateIndex].ptr;
break;
}
return TRUE;
diff --git a/Xprint/ps/PsInit.c b/Xprint/ps/PsInit.c
index fe2471185..193fc0518 100644
--- a/Xprint/ps/PsInit.c
+++ b/Xprint/ps/PsInit.c
@@ -73,7 +73,7 @@ in this Software without prior written authorization from The Open Group.
** *********************************************************
**
********************************************************************/
-/* $XFree86: xc/programs/Xserver/Xprint/ps/PsInit.c,v 1.13 2002/10/16 21:13:33 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/ps/PsInit.c,v 1.14 2003/10/29 22:11:55 tsi Exp $ */
#include <stdio.h>
#include <string.h>
@@ -108,7 +108,9 @@ InitializePsDriver(ndx, pScreen, argc, argv)
int argc;
char **argv;
{
+#if 0
PsScreenPrivPtr pPriv;
+#endif
int nVisuals;
int nDepths;
VisualPtr visuals;
@@ -125,8 +127,10 @@ InitializePsDriver(ndx, pScreen, argc, argv)
*/
AllocatePsPrivates(pScreen);
+#if 0
pPriv = (PsScreenPrivPtr)pScreen->devPrivates[PsScreenPrivateIndex].ptr;
-/*pPriv->resDB = rmdb;*/
+ pPriv->resDB = rmdb;
+#endif
pScreen->defColormap = (Colormap) FakeClientID(0);
pScreen->blackPixel = 1;
diff --git a/Xprint/ps/PsText.c b/Xprint/ps/PsText.c
index 41ba592f6..b04d910d5 100644
--- a/Xprint/ps/PsText.c
+++ b/Xprint/ps/PsText.c
@@ -73,7 +73,7 @@ in this Software without prior written authorization from The Open Group.
** *********************************************************
**
********************************************************************/
-/* $XFree86: xc/programs/Xserver/Xprint/ps/PsText.c,v 1.12 2001/12/14 19:59:17 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/ps/PsText.c,v 1.13 2003/10/29 22:11:55 tsi Exp $ */
#include "Ps.h"
#include "gcstruct.h"
@@ -164,7 +164,6 @@ PsPolyText8(
/* If Type1 font, try to download to printer first */
if(strstr(ffname, "Type1") && readFontName(ffname, file_name, dlfnam))
{
- int iso;
int siz;
float mtx[4];
PsOutPtr psOut;
@@ -177,7 +176,6 @@ PsPolyText8(
PsOut_Offset(psOut, pDrawable->x, pDrawable->y);
PsOut_Color(psOut, PsGetPixelColor(cMap, pGC->fgPixel));
siz = PsGetFontSize(pGC->font, mtx);
- iso = PsIsISOLatin1Encoding(pGC->font);
if( !siz ) PsOut_TextAttrsMtx(psOut, file_name, mtx, 1);
else PsOut_TextAttrs(psOut, file_name, siz, 1);
PsOut_Text(psOut, x, y, string, count, -1);
@@ -401,7 +399,7 @@ PsPolyGlyphBlt(
int gWidth, gHeight; /* width and height of glyph */
register int nbyGlyphWidth; /* bytes per scanline of glyph */
int nbyPadGlyph; /* server padded line of glyph */
- int w, tmpx;
+ int w;
XID gcvals[3];
pfont = pGC->font;
@@ -437,7 +435,6 @@ PsPolyGlyphBlt(
PsDestroyPixmap(pPixmap);
return;
}
- tmpx = 0;
while(nGlyphs--)
{
pci = *pCharInfo++;
diff --git a/Xprint/ps/PsWindow.c b/Xprint/ps/PsWindow.c
index 87d8143aa..e39b602cb 100644
--- a/Xprint/ps/PsWindow.c
+++ b/Xprint/ps/PsWindow.c
@@ -73,7 +73,7 @@ in this Software without prior written authorization from The Open Group.
** *********************************************************
**
********************************************************************/
-/* $XFree86: xc/programs/Xserver/Xprint/ps/PsWindow.c,v 1.12 2001/12/19 21:55:59 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/ps/PsWindow.c,v 1.13 2003/10/29 22:11:55 tsi Exp $ */
#include <stdio.h>
#include <string.h>
@@ -219,7 +219,6 @@ PsPaintWindow(
RegionPtr pRegion,
int what)
{
- WindowPtr pRoot;
#define FUNCTION 0
#define FOREGROUND 1
@@ -299,7 +298,6 @@ PsPaintWindow(
gcmask |= GCFunction | GCClipMask;
i = pScreen->myNum;
- pRoot = WindowTable[i];
pBgWin = pWin;
if (what == PW_BORDER)
diff --git a/Xprint/raster/Raster.c b/Xprint/raster/Raster.c
index c7264c39a..d306dea21 100644
--- a/Xprint/raster/Raster.c
+++ b/Xprint/raster/Raster.c
@@ -31,7 +31,7 @@ dealings in this Software without prior written authorization from said
copyright holders.
*/
-/* $XFree86: xc/programs/Xserver/Xprint/raster/Raster.c,v 1.11 2001/12/21 21:02:06 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xprint/raster/Raster.c,v 1.12 2003/10/29 22:11:55 tsi Exp $ */
/*******************************************************************
**
@@ -1505,14 +1505,14 @@ RasterCloseScreen(
/* ARGSUSED */
static void SigchldHndlr (int dummy)
{
- int status, w;
+ int status;
int olderrno = errno;
struct sigaction act;
sigfillset(&act.sa_mask);
act.sa_flags = 0;
act.sa_handler = SigchldHndlr;
- w = wait (&status);
+ (void) wait (&status);
/*
* Is this really necessary?
diff --git a/afb/afb.h b/afb/afb.h
index d05d0edfc..1f6401782 100644
--- a/afb/afb.h
+++ b/afb/afb.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/afb/afb.h,v 3.8 2001/10/28 03:32:57 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/afb/afb.h,v 3.11 2003/11/17 22:20:32 dawes Exp $ */
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
/***********************************************************
@@ -56,7 +56,7 @@ SOFTWARE.
#include "region.h"
#include "gc.h"
#include "colormap.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "mibstore.h"
#include "mfb.h"
@@ -64,7 +64,7 @@ extern int afbInverseAlu[];
extern int afbScreenPrivateIndex;
/* warning: PixelType definition duplicated in maskbits.h */
#ifndef PixelType
-#define PixelType CARD32
+#define PixelType CARD32
#endif /* PixelType */
#define AFB_MAX_DEPTH 8
@@ -72,18 +72,15 @@ extern int afbScreenPrivateIndex;
/* afbbitblt.c */
extern void afbDoBitblt(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
extern RegionPtr afbBitBlt(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
GCPtr /*pGC*/,
@@ -94,21 +91,17 @@ extern RegionPtr afbBitBlt(
int /*dstx*/,
int /*dsty*/,
void (*doBitBlt)(
-#if NeedNestedPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
),
unsigned long /*planemask*/
-#endif
);
extern RegionPtr afbCopyArea(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrcDrawable*/,
DrawablePtr /*pDstDrawable*/,
GCPtr/*pGC*/,
@@ -118,11 +111,9 @@ extern RegionPtr afbCopyArea(
int /*height*/,
int /*dstx*/,
int /*dsty*/
-#endif
);
extern RegionPtr afbCopyPlane(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrcDrawable*/,
DrawablePtr /*pDstDrawable*/,
GCPtr/*pGC*/,
@@ -133,83 +124,69 @@ extern RegionPtr afbCopyPlane(
int /*dstx*/,
int /*dsty*/,
unsigned long /*plane*/
-#endif
);
extern void afbCopy1ToN(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
/* afbbltC.c */
extern void afbDoBitbltCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
/* afbbltCI.c */
extern void afbDoBitbltCopyInverted(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
/* afbbltG.c */
extern void afbDoBitbltGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
/* afbbltO.c */
extern void afbDoBitbltOr(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
/* afbbltX.c */
extern void afbDoBitbltXor(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
/* afbbres.c */
extern void afbBresS(
-#if NeedFunctionPrototypes
PixelType * /*addrl*/,
int /*nlwidth*/,
int /*sizeDst*/,
@@ -224,12 +201,10 @@ extern void afbBresS(
int /*e2*/,
int /*len*/,
unsigned char * /*rrops*/
-#endif
);
/* afbbresd.c */
extern void afbBresD(
-#if NeedFunctionPrototypes
int * /*pdashIndex*/,
unsigned char * /*pDash*/,
int /*numInDashList*/,
@@ -250,98 +225,74 @@ extern void afbBresD(
int /*len*/,
unsigned char * /*rrops*/,
unsigned char * /*bgrrops*/
-#endif
);
/* afbbstore.c */
extern void afbSaveAreas(
-#if NeedFunctionPrototypes
PixmapPtr /*pPixmap*/,
RegionPtr /*prgnSave*/,
int /*xorg*/,
int /*yorg*/,
WindowPtr /*pWin*/
-#endif
);
extern void afbRestoreAreas(
-#if NeedFunctionPrototypes
PixmapPtr /*pPixmap*/,
RegionPtr /*prgnRestore*/,
int /*xorg*/,
int /*yorg*/,
WindowPtr /*pWin*/
-#endif
);
/* afbclip.c */
extern RegionPtr afbPixmapToRegion(
-#if NeedFunctionPrototypes
PixmapPtr /*pPix*/
-#endif
);
/* afbcmap.c */
extern int afbListInstalledColormaps(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
Colormap * /*pmaps*/
-#endif
);
extern void afbInstallColormap(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/
-#endif
);
extern void afbUninstallColormap(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/
-#endif
);
extern void afbResolveColor(
-#if NeedFunctionPrototypes
unsigned short * /*pred*/,
unsigned short * /*pgreen*/,
unsigned short * /*pblue*/,
VisualPtr /*pVisual*/
-#endif
);
extern Bool afbInitializeColormap(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/
-#endif
);
extern int afbExpandDirectColors(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
int /*ndefs*/,
xColorItem * /*indefs*/,
xColorItem * /*outdefs*/
-#endif
);
extern Bool afbCreateDefColormap(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/
-#endif
);
extern Bool afbSetVisualTypes(
-#if NeedFunctionPrototypes
int /*depth*/,
int /*visuals*/,
int /*bitsPerRGB*/
-#endif
);
extern Bool afbInitVisuals(
-#if NeedFunctionPrototypes
VisualPtr * /*visualp*/,
DepthPtr * /*depthp*/,
int * /*nvisualp*/,
@@ -350,201 +301,161 @@ extern Bool afbInitVisuals(
VisualID * /*defaultVisp*/,
unsigned long /*sizes*/,
int /*bitsPerRGB*/
-#endif
);
/* afbfillarc.c */
extern void afbPolyFillArcSolid(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
int /*narcs*/,
xArc * /*parcs*/
-#endif
);
/* afbfillrct.c */
extern void afbPolyFillRect(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nrectFill*/,
xRectangle * /*prectInit*/
-#endif
);
/* afbply1rct.c */
extern void afbFillPolygonSolid(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
int /*shape*/,
int /*count*/,
DDXPointPtr /*ptsIn*/
-#endif
);
/* afbfillsp.c */
extern void afbSolidFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void afbStippleFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void afbTileFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void afbUnnaturalTileFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void afbUnnaturalStippleFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void afbOpaqueStippleFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void afbUnnaturalOpaqueStippleFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
/* afbfont.c */
extern Bool afbRealizeFont(
-#if NeedFunctionPrototypes
ScreenPtr /*pscr*/,
FontPtr /*pFont*/
-#endif
);
extern Bool afbUnrealizeFont(
-#if NeedFunctionPrototypes
ScreenPtr /*pscr*/,
FontPtr /*pFont*/
-#endif
);
/* afbgc.c */
extern Bool afbCreateGC(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/
-#endif
);
extern void afbValidateGC(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/,
unsigned long /*changes*/,
DrawablePtr /*pDrawable*/
-#endif
);
extern void afbDestroyGC(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/
-#endif
);
extern void afbReduceRop(
-#if NeedFunctionPrototypes
int /*alu*/,
Pixel /*src*/,
unsigned long /*planemask*/,
int /*depth*/,
unsigned char * /*rrops*/
-#endif
);
extern void afbReduceOpaqueStipple (
-#if NeedFunctionPrototypes
Pixel /*fg*/,
Pixel /*bg*/,
unsigned long /*planemask*/,
int /*depth*/,
unsigned char * /*rrops*/
-#endif
);
extern void afbComputeCompositeClip(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/,
DrawablePtr /*pDrawable*/
-#endif
);
/* afbgetsp.c */
extern void afbGetSpans(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*wMax*/,
DDXPointPtr /*ppt*/,
int * /*pwidth*/,
int /*nspans*/,
char * /*pdstStart*/
-#endif
);
/* afbhrzvert.c */
extern void afbHorzS(
-#if NeedFunctionPrototypes
PixelType * /*addrl*/,
int /*nlwidth*/,
int /*sizeDst*/,
@@ -553,11 +464,9 @@ extern void afbHorzS(
int /*y1*/,
int /*len*/,
unsigned char * /*rrops*/
-#endif
);
extern void afbVertS(
-#if NeedFunctionPrototypes
PixelType * /*addrl*/,
int /*nlwidth*/,
int /*sizeDst*/,
@@ -566,12 +475,10 @@ extern void afbVertS(
int /*y1*/,
int /*len*/,
unsigned char * /*rrops*/
-#endif
);
/* afbigbblak.c */
extern void afbImageGlyphBlt (
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*x*/,
@@ -579,14 +486,12 @@ extern void afbImageGlyphBlt (
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* afbigbwht.c */
/* afbimage.c */
extern void afbPutImage(
-#if NeedFunctionPrototypes
DrawablePtr /*dst*/,
GCPtr /*pGC*/,
int /*depth*/,
@@ -597,11 +502,9 @@ extern void afbPutImage(
int /*leftPad*/,
int /*format*/,
char * /*pImage*/
-#endif
);
extern void afbGetImage(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*sx*/,
int /*sy*/,
@@ -610,62 +513,50 @@ extern void afbGetImage(
unsigned int /*format*/,
unsigned long /*planeMask*/,
char * /*pdstLine*/
-#endif
);
/* afbline.c */
extern void afbLineSS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
int /*npt*/,
DDXPointPtr /*pptInit*/
-#endif
);
extern void afbLineSD(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
int /*npt*/,
DDXPointPtr /*pptInit*/
-#endif
);
/* afbmisc.c */
extern void afbQueryBestSize(
-#if NeedFunctionPrototypes
int /*class*/,
unsigned short * /*pwidth*/,
unsigned short * /*pheight*/,
ScreenPtr /*pScreen*/
-#endif
);
/* afbpntarea.c */
extern void afbSolidFillArea(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
unsigned char * /*rrops*/
-#endif
);
extern void afbStippleAreaPPW(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
PixmapPtr /*pstipple*/,
unsigned char * /*rrops*/
-#endif
);
extern void afbStippleArea(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
@@ -673,12 +564,10 @@ extern void afbStippleArea(
int /*xOff*/,
int /*yOff*/,
unsigned char * /*rrops*/
-#endif
);
/* afbplygblt.c */
extern void afbPolyGlyphBlt(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*x*/,
@@ -686,82 +575,62 @@ extern void afbPolyGlyphBlt(
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* afbpixmap.c */
extern PixmapPtr afbCreatePixmap(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
int /*width*/,
int /*height*/,
int /*depth*/
-#endif
);
extern Bool afbDestroyPixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pPixmap*/
-#endif
);
extern PixmapPtr afbCopyPixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pSrc*/
-#endif
);
extern void afbPadPixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pPixmap*/
-#endif
);
extern void afbXRotatePixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pPix*/,
int /*rw*/
-#endif
);
extern void afbYRotatePixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pPix*/,
int /*rh*/
-#endif
);
extern void afbCopyRotatePixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*psrcPix*/,
PixmapPtr * /*ppdstPix*/,
int /*xrot*/,
int /*yrot*/
-#endif
);
extern void afbPaintWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
RegionPtr /*pRegion*/,
int /*what*/
-#endif
);
/* afbpolypnt.c */
extern void afbPolyPoint(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
int /*npt*/,
xPoint * /*pptInit*/
-#endif
);
/* afbpushpxl.c */
extern void afbPushPixels(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/,
PixmapPtr /*pBitMap*/,
DrawablePtr /*pDrawable*/,
@@ -769,28 +638,22 @@ extern void afbPushPixels(
int /*dy*/,
int /*xOrg*/,
int /*yOrg*/
-#endif
);
/* afbscrclse.c */
extern Bool afbCloseScreen(
-#if NeedFunctionPrototypes
int /*index*/,
ScreenPtr /*pScreen*/
-#endif
);
/* afbscrinit.c */
extern Bool afbAllocatePrivates(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
int * /*pWinIndex*/,
int * /*pGCIndex*/
-#endif
);
extern Bool afbScreenInit(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
pointer /*pbits*/,
int /*xsize*/,
@@ -798,45 +661,35 @@ extern Bool afbScreenInit(
int /*dpix*/,
int /*dpiy*/,
int /*width*/
-#endif
);
extern PixmapPtr afbGetWindowPixmap(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/
-#endif
);
extern void afbSetWindowPixmap(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
PixmapPtr /*pPix*/
-#endif
);
/* afbseg.c */
extern void afbSegmentSS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nseg*/,
xSegment * /*pSeg*/
-#endif
);
extern void afbSegmentSD(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nseg*/,
xSegment * /*pSeg*/
-#endif
);
/* afbsetsp.c */
extern void afbSetScanline(
-#if NeedFunctionPrototypes
int /*y*/,
int /*xOrigin*/,
int /*xStart*/,
@@ -848,11 +701,9 @@ extern void afbSetScanline(
int /*sizeDst*/,
int /*depthDst*/,
int /*sizeSrc*/
-#endif
);
extern void afbSetSpans(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
char * /*psrc*/,
@@ -860,12 +711,10 @@ extern void afbSetSpans(
int * /*pwidth*/,
int /*nspans*/,
int /*fSorted*/
-#endif
);
/* afbtegblt.c */
extern void afbTEGlyphBlt(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*x*/,
@@ -873,35 +722,29 @@ extern void afbTEGlyphBlt(
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* afbtileC.c */
extern void afbTileAreaPPWCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
int /*alu*/,
PixmapPtr /*ptile*/,
unsigned long /*planemask*/
-#endif
);
/* afbtileG.c */
extern void afbTileAreaPPWGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
int /*alu*/,
PixmapPtr /*ptile*/,
unsigned long /*planemask*/
-#endif
);
extern void afbTileAreaCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
@@ -910,12 +753,10 @@ extern void afbTileAreaCopy(
int /*xOff*/,
int /*yOff*/,
unsigned long /*planemask*/
-#endif
);
/* afbtileG.c */
extern void afbTileAreaGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
@@ -924,11 +765,9 @@ extern void afbTileAreaGeneral(
int /*xOff*/,
int /*yOff*/,
unsigned long /*planemask*/
-#endif
);
extern void afbOpaqueStippleAreaPPWCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
@@ -936,12 +775,10 @@ extern void afbOpaqueStippleAreaPPWCopy(
PixmapPtr /*ptile*/,
unsigned char */*rropsOS*/,
unsigned long /*planemask*/
-#endif
);
/* afbtileG.c */
extern void afbOpaqueStippleAreaPPWGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
@@ -949,11 +786,9 @@ extern void afbOpaqueStippleAreaPPWGeneral(
PixmapPtr /*ptile*/,
unsigned char */*rropsOS*/,
unsigned long /*planemask*/
-#endif
);
extern void afbOpaqueStippleAreaCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
@@ -963,12 +798,10 @@ extern void afbOpaqueStippleAreaCopy(
int /*yOff*/,
unsigned char */*rropsOS*/,
unsigned long /*planemask*/
-#endif
);
/* afbtileG.c */
extern void afbOpaqueStippleAreaGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
@@ -978,66 +811,49 @@ extern void afbOpaqueStippleAreaGeneral(
int /*yOff*/,
unsigned char */*rropsOS*/,
unsigned long /*planemask*/
-#endif
);
/* afbwindow.c */
extern Bool afbCreateWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/
-#endif
);
extern Bool afbDestroyWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/
-#endif
);
extern Bool afbMapWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWindow*/
-#endif
);
extern Bool afbPositionWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
int /*x*/,
int /*y*/
-#endif
);
extern Bool afbUnmapWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWindow*/
-#endif
);
extern void afbCopyWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
DDXPointRec /*ptOldOrg*/,
RegionPtr /*prgnSrc*/
-#endif
);
extern Bool afbChangeWindowAttributes(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
unsigned long /*mask*/
-#endif
);
/* afbzerarc.c */
extern void afbZeroPolyArcSS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
int /*narcs*/,
xArc * /*parcs*/
-#endif
);
/*
@@ -1110,7 +926,7 @@ typedef struct {
(pointer) = (PixelType *)_pPix->devPrivate.ptr; \
(width) = ((int)_pPix->devKind) / sizeof (PixelType); \
(size) = (width) * _pPix->drawable.height; \
- (dep) = _pPix->drawable.depth; \
+ (dep) = _pPix->drawable.depth; (void)(dep); \
}
#define afbGetByteWidthAndPointer(pDrawable, width, pointer) \
diff --git a/afb/afbbitblt.c b/afb/afbbitblt.c
index c201099b5..7f04a7de0 100644
--- a/afb/afbbitblt.c
+++ b/afb/afbbitblt.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/afb/afbbitblt.c,v 3.3 2001/10/28 03:32:57 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/afb/afbbitblt.c,v 3.6 2003/11/10 18:21:44 tsi Exp $ */
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
/***********************************************************
@@ -52,7 +52,6 @@ SOFTWARE.
#include "X.h"
#include "Xprotostr.h"
-#include "miscstruct.h"
#include "regionstr.h"
#include "gcstruct.h"
#include "windowstr.h"
@@ -236,7 +235,7 @@ afbBitBlt(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height,
fastExpose = 1;
/*
* clip the source; if regions extend beyond the source size,
- * make sure exposure events get sent
+ * make sure exposure events get sent
*/
if (fastBox.x1 < pSrcDrawable->x) {
fastBox.x1 = pSrcDrawable->x;
@@ -302,7 +301,7 @@ afbBitBlt(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height,
/* Check to see if the region is empty */
if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2) {
- REGION_INIT(pGC->pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pGC->pScreen, &rgnDst);
} else {
REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1);
}
diff --git a/afb/afbclip.c b/afb/afbclip.c
index 9e00fbcea..07eb3b816 100644
--- a/afb/afbclip.c
+++ b/afb/afbclip.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/afb/afbclip.c,v 3.2 2001/10/28 03:32:57 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/afb/afbclip.c,v 3.3 2003/07/16 01:38:35 dawes Exp $ */
/***********************************************************
Copyright (c) 1987 X Consortium
@@ -49,10 +49,9 @@ SOFTWARE.
/* $XConsortium: afbclip.c,v 5.6 94/04/17 20:28:19 dpw Exp $ */
#include "X.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "pixmapstr.h"
#include "scrnintstr.h"
-#include "regionstr.h"
#include "gc.h"
#include "maskbits.h"
#include "mi.h"
diff --git a/afb/afbfillarc.c b/afb/afbfillarc.c
index a05c32228..1db48b07c 100644
--- a/afb/afbfillarc.c
+++ b/afb/afbfillarc.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/afb/afbfillarc.c,v 3.1 1998/03/20 21:04:54 hohndel Exp $ */
+/* $XFree86: xc/programs/Xserver/afb/afbfillarc.c,v 3.2 2003/07/16 01:38:35 dawes Exp $ */
/************************************************************
Copyright (c) 1989 X Consortium
@@ -30,7 +30,7 @@ in this Software without prior written authorization from the X Consortium.
#include "X.h"
#include "Xprotostr.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "gcstruct.h"
#include "pixmapstr.h"
#include "scrnintstr.h"
diff --git a/afb/afbfillrct.c b/afb/afbfillrct.c
index 4d93c2634..25ab5e56e 100644
--- a/afb/afbfillrct.c
+++ b/afb/afbfillrct.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/afb/afbfillrct.c,v 3.1 1998/03/20 21:04:54 hohndel Exp $ */
+/* $XFree86: xc/programs/Xserver/afb/afbfillrct.c,v 3.3 2003/10/29 22:15:19 tsi Exp $ */
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
/***********************************************************
@@ -54,7 +54,6 @@ SOFTWARE.
#include "pixmapstr.h"
#include "gcstruct.h"
#include "windowstr.h"
-#include "miscstruct.h"
#include "regionstr.h"
#include "scrnintstr.h"
@@ -76,8 +75,8 @@ void
afbPolyFillRect(pDrawable, pGC, nrectFill, prectInit)
DrawablePtr pDrawable;
GCPtr pGC;
- int nrectFill; /* number of rectangles to fill */
- xRectangle *prectInit; /* Pointer to first rectangle to fill */
+ int nrectFill; /* number of rectangles to fill */
+ xRectangle *prectInit; /* Pointer to first rectangle to fill */
{
xRectangle *prect;
RegionPtr prgnClip;
@@ -90,12 +89,10 @@ afbPolyFillRect(pDrawable, pGC, nrectFill, prectInit)
int n;
int xorg, yorg;
afbPrivGC *priv;
- PixmapPtr ppix;
unsigned char *rrops;
unsigned char *rropsOS;
priv = (afbPrivGC *)pGC->devPrivates[afbGCPrivateIndex].ptr;
- ppix = pGC->pRotatedPixmap;
prgnClip = pGC->pCompositeClip;
rrops = priv->rrops;
rropsOS = priv->rropOS;
diff --git a/afb/afbimggblt.c b/afb/afbimggblt.c
index fbffb35dc..60d212ca0 100644
--- a/afb/afbimggblt.c
+++ b/afb/afbimggblt.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/afb/afbimggblt.c,v 3.1 1998/03/20 21:04:55 hohndel Exp $ */
+/* $XFree86: xc/programs/Xserver/afb/afbimggblt.c,v 3.2 2003/10/29 22:15:19 tsi Exp $ */
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
/***********************************************************
@@ -95,8 +95,8 @@ 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;
+ GC *pGC;
+ int x, y;
unsigned int nglyph;
CharInfoPtr *ppci; /* array of character info */
pointer pglyphBase; /* start of array of glyphs */
@@ -292,7 +292,9 @@ afbImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
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;
@@ -384,7 +386,9 @@ afbImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
glyphCol = (leftEdge - ppos[i].xpos) -
(pci->metrics.leftSideBearing);
+#if GETLEFTBITS_ALIGNMENT > 1
getWidth = w + glyphCol;
+#endif
pdstSave = afbScanlineDelta(ppos[i].pdstBase, -(y-topEdge),
widthDst);
diff --git a/afb/afbplygblt.c b/afb/afbplygblt.c
index 65cfcd1b0..3938433c3 100644
--- a/afb/afbplygblt.c
+++ b/afb/afbplygblt.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/afb/afbplygblt.c,v 3.2 2001/10/28 03:32:58 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/afb/afbplygblt.c,v 3.3 2003/10/29 22:15:19 tsi Exp $ */
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
/***********************************************************
@@ -86,8 +86,8 @@ 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;
+ GC *pGC;
+ int x, y;
unsigned int nglyph;
CharInfoPtr *ppci; /* array of character info */
pointer pglyphBase; /* start of array of glyphs */
@@ -272,7 +272,9 @@ afbPolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
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;
@@ -364,7 +366,9 @@ afbPolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
glyphCol = (leftEdge - ppos[i].xpos) -
(pci->metrics.leftSideBearing);
+#if GETLEFTBITS_ALIGNMENT > 1
getWidth = w + glyphCol;
+#endif
pdstSave = afbScanlineDelta(ppos[i].pdstBase, -(y-topEdge),
widthDst);
diff --git a/afb/afbpolypnt.c b/afb/afbpolypnt.c
index da9f13d82..b09f3b037 100644
--- a/afb/afbpolypnt.c
+++ b/afb/afbpolypnt.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/afb/afbpolypnt.c,v 3.1 1998/03/20 21:04:56 hohndel Exp $ */
+/* $XFree86: xc/programs/Xserver/afb/afbpolypnt.c,v 3.2 2003/07/16 01:38:35 dawes Exp $ */
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
/***********************************************************
@@ -54,7 +54,6 @@ SOFTWARE.
#include "pixmapstr.h"
#include "gcstruct.h"
#include "windowstr.h"
-#include "miscstruct.h"
#include "regionstr.h"
#include "scrnintstr.h"
diff --git a/afb/afbpushpxl.c b/afb/afbpushpxl.c
index 688aec973..d556acd8c 100644
--- a/afb/afbpushpxl.c
+++ b/afb/afbpushpxl.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/afb/afbpushpxl.c,v 3.1 1998/03/20 21:04:56 hohndel Exp $ */
+/* $XFree86: xc/programs/Xserver/afb/afbpushpxl.c,v 3.2 2003/07/16 01:38:35 dawes Exp $ */
/***********************************************************
Copyright (c) 1987 X Consortium
@@ -52,9 +52,8 @@ SOFTWARE.
#include "gcstruct.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
-#include "miscstruct.h"
-#include "maskbits.h"
#include "regionstr.h"
+#include "maskbits.h"
#include "afb.h"
/* afbSolidPP is courtesy of xhacks@csri.toronto.edu
diff --git a/afb/afbtile.c b/afb/afbtile.c
index 687bed0a6..3b861b822 100644
--- a/afb/afbtile.c
+++ b/afb/afbtile.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/afb/afbtile.c,v 3.3 2001/10/28 03:32:59 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/afb/afbtile.c,v 3.4 2003/10/29 22:15:19 tsi Exp $ */
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
/***********************************************************
@@ -94,7 +94,6 @@ MROP_NAME(afbTileAreaPPW)(pDraw, nbox, pbox, alu, ptile, planemask)
register PixelType *p; /* pointer to bits we're writing */
int sizeDst;
int depthDst;
- int tlwidth;
register int d;
PixelType startmask;
PixelType endmask; /* masks for reggedy bits at either end of line */
@@ -113,7 +112,6 @@ MROP_NAME(afbTileAreaPPW)(pDraw, nbox, pbox, alu, ptile, planemask)
MROP_INITIALIZE(alu,~0)
tileHeight = ptile->drawable.height;
- tlwidth = ptile->devKind / sizeof (PixelType);
pSaveSrc = (PixelType *)(ptile->devPrivate.ptr);
while (nbox--) {
@@ -249,11 +247,11 @@ MROP_NAME(afbTileArea)(pDraw, nbox, pbox, alu, pTile, xOff, yOff, planemask)
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 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;
@@ -637,11 +635,11 @@ MROP_NAME(afbOpaqueStippleArea)(pDraw, nbox, pbox, alu, pTile, xOff, yOff,
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 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;
diff --git a/afb/afbwindow.c b/afb/afbwindow.c
index 40597c72a..024fc04b6 100644
--- a/afb/afbwindow.c
+++ b/afb/afbwindow.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/afb/afbwindow.c,v 3.0 1996/08/18 01:45:58 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/afb/afbwindow.c,v 3.1 2003/09/13 21:33:04 dawes Exp $ */
/* $XConsortium: afbwindow.c,v 5.14 94/04/17 20:28:36 dpw Exp $ */
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
/***********************************************************
@@ -57,8 +57,6 @@ SOFTWARE.
#include "regionstr.h"
#include "maskbits.h"
-extern WindowPtr *WindowTable;
-
Bool
afbCreateWindow(pWin)
register WindowPtr pWin;
diff --git a/afb/afbzerarc.c b/afb/afbzerarc.c
index 334a79011..db1bd2bfd 100644
--- a/afb/afbzerarc.c
+++ b/afb/afbzerarc.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/afb/afbzerarc.c,v 3.2 2001/10/28 03:32:59 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/afb/afbzerarc.c,v 3.3 2003/07/16 01:38:36 dawes Exp $ */
/************************************************************
Copyright (c) 1989 X Consortium
@@ -36,7 +36,7 @@ in this Software without prior written authorization from the X Consortium.
#include "X.h"
#include "Xprotostr.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "gcstruct.h"
#include "pixmapstr.h"
#include "scrnintstr.h"
diff --git a/cfb/cfb.h b/cfb/cfb.h
index 731b7684a..b7d027905 100644
--- a/cfb/cfb.h
+++ b/cfb/cfb.h
@@ -27,7 +27,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/cfb/cfb.h,v 3.27 2001/01/30 22:06:15 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfb.h,v 3.30 2003/07/19 13:22:27 tsi Exp $ */
#if !defined(__CFB_H__) || defined(CFB_PROTOTYPES_ONLY)
@@ -336,8 +336,31 @@ extern RegionPtr cfbBitBlt(
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*/
+ unsigned long /*bitPlane*/ /* We must know which plane to reduce! */
),
unsigned long /*bitPlane*/
);
@@ -370,8 +393,7 @@ extern void cfbCopyPlane1to8(
int /*rop*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
- unsigned long /*planemask*/,
- unsigned long /*bitPlane*/
+ unsigned long /*planemask*/
);
#endif
diff --git a/cfb/cfb8bit.h b/cfb/cfb8bit.h
index a14402b83..0c6b51925 100644
--- a/cfb/cfb8bit.h
+++ b/cfb/cfb8bit.h
@@ -7,7 +7,7 @@
* are used for depths other than 8. Perhaps the file should be
* renamed. dpw
*/
-/* $XFree86: xc/programs/Xserver/cfb/cfb8bit.h,v 3.7 2001/12/14 19:59:20 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfb8bit.h,v 3.8 2003/11/17 22:20:32 dawes Exp $ */
/*
@@ -1545,24 +1545,19 @@ extern int cfb8StippleRRop;
extern PixelGroup cfb8BitLenMasks[PGSZ];
extern int cfb8SetStipple (
-#if NeedFunctionPrototypes
int /*alu*/,
CfbBits /*fg*/,
CfbBits /*planemask*/
-#endif
);
extern int cfb8SetOpaqueStipple (
-#if NeedFunctionPrototypes
int /*alu*/,
CfbBits /*fg*/,
CfbBits /*bg*/,
CfbBits /*planemask*/
-#endif
);
extern int cfb8ComputeClipMasks32 (
-#if NeedFunctionPrototypes
BoxPtr /*pBox*/,
int /*numRects*/,
int /*x*/,
@@ -1570,5 +1565,4 @@ extern int cfb8ComputeClipMasks32 (
int /*w*/,
int /*h*/,
CARD32 * /*clips*/
-#endif
);
diff --git a/cfb/cfb8line.c b/cfb/cfb8line.c
index f06abe084..01c412b97 100644
--- a/cfb/cfb8line.c
+++ b/cfb/cfb8line.c
@@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group.
*
* Author: Keith Packard, MIT X Consortium
*
- * $XFree86: xc/programs/Xserver/cfb/cfb8line.c,v 3.18 2002/09/18 17:11:47 tsi Exp $
+ * $XFree86: xc/programs/Xserver/cfb/cfb8line.c,v 3.19 2003/10/29 22:44:52 tsi Exp $
* Jeff Anton'x fixes: cfb8line.c 97/02/07
*/
@@ -337,9 +337,13 @@ FUNC_NAME(cfb8LineSS1Rect) (pDrawable, pGC, mode, npt, pptInit, pptInitOrig,
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);
@@ -355,12 +359,16 @@ FUNC_NAME(cfb8LineSS1Rect) (pDrawable, pGC, mode, npt, pptInit, pptInitOrig,
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);
@@ -1079,6 +1087,7 @@ FUNC_NAME(cfb8LineSS1Rect) (pDrawable, pGC, mode, npt, pptInit, pptInitOrig,
# endif
}
#endif /* !POLYSEGMENT */
+ RROP_UNDECLARE;
return -1;
}
@@ -1264,7 +1273,6 @@ RROP_NAME (cfb8ClippedLine) (pDrawable, pGC, x1, y1, x2, y2, boxp, shorten)
Bool pt1_clipped, pt2_clipped;
int changex, changey, result;
#if PSZ == 24
- int xOffset;
PixelType *addrLineEnd;
char *addrb;
int stepx3, stepy3;
@@ -1382,7 +1390,6 @@ RROP_NAME (cfb8ClippedLine) (pDrawable, pGC, x1, y1, x2, y2, boxp, shorten)
RROP_FETCH_GC(pGC);
#if PSZ == 24
- xOffset = x1;
addrLineEnd = addr + (y1 * nwidth);
addrb = (char *)addrLineEnd + x1 * 3;
if (stepx == 1 || stepx == -1){
@@ -1485,6 +1492,7 @@ RROP_NAME (cfb8ClippedLine) (pDrawable, pGC, x1, y1, x2, y2, boxp, shorten)
RROP_SOLID(addrp);
#endif
#undef body
+ RROP_UNDECLARE
}
}
diff --git a/cfb/cfbbitblt.c b/cfb/cfbbitblt.c
index 595d68c66..18f90f1fd 100644
--- a/cfb/cfbbitblt.c
+++ b/cfb/cfbbitblt.c
@@ -2,7 +2,7 @@
* cfb copy area
*/
-/* $XFree86: xc/programs/Xserver/cfb/cfbbitblt.c,v 1.14 2001/12/14 19:59:21 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbbitblt.c,v 1.20 2003/11/10 18:21:44 tsi Exp $ */
/*
@@ -68,17 +68,23 @@ static unsigned int FgPixel, BgPixel;
# endif
#endif
+/* cfbBitBltcfb == cfbCopyPlaneExpand */
RegionPtr
-cfbBitBlt (pSrcDrawable, pDstDrawable,
- pGC, srcx, srcy, width, height, dstx, dsty, doBitBlt, bitPlane)
- register DrawablePtr pSrcDrawable;
- register DrawablePtr pDstDrawable;
- GC *pGC;
- int srcx, srcy;
- int width, height;
- int dstx, dsty;
- void (*doBitBlt)();
- unsigned long bitPlane;
+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;
@@ -254,7 +260,7 @@ cfbBitBlt (pSrcDrawable, pDstDrawable,
/* Check to see if the region is empty */
if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2)
{
- REGION_INIT(pGC->pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pGC->pScreen, &rgnDst);
}
else
{
@@ -302,15 +308,276 @@ cfbBitBlt (pSrcDrawable, pDstDrawable,
ppt->y = pbox->y1 + dy;
}
- (*doBitBlt) (pSrcDrawable, pDstDrawable, pGC->alu, &rgnDst, pptSrc, pGC->planemask, bitPlane);
+ (*doBitBlt) (pSrcDrawable, pDstDrawable, pGC->alu, &rgnDst, pptSrc, pGC->planemask);
DEALLOCATE_LOCAL(pptSrc);
}
prgnExposed = NULL;
if (pGC->fExpose)
{
- extern RegionPtr miHandleExposures();
+ /* 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 =
@@ -335,21 +602,29 @@ cfbDoBitblt (pSrc, pDst, alu, prgnDst, pptSrc, planemask)
DDXPointPtr pptSrc;
unsigned long planemask;
{
- void (*blt)() = cfbDoBitbltGeneral;
+ void (*doBitBlt)(
+ DrawablePtr /*pSrc*/,
+ DrawablePtr /*pDst*/,
+ int /*alu*/,
+ RegionPtr /*prgnDst*/,
+ DDXPointPtr /*pptSrc*/,
+ unsigned long /*planemask*/)
+ = cfbDoBitbltGeneral;
+
if ((planemask & PMSK) == PMSK) {
switch (alu) {
case GXcopy:
- blt = cfbDoBitbltCopy;
+ doBitBlt = cfbDoBitbltCopy;
break;
case GXxor:
- blt = cfbDoBitbltXor;
+ doBitBlt = cfbDoBitbltXor;
break;
case GXor:
- blt = cfbDoBitbltOr;
+ doBitBlt = cfbDoBitbltOr;
break;
}
}
- (*blt) (pSrc, pDst, alu, prgnDst, pptSrc, planemask);
+ (*doBitBlt) (pSrc, pDst, alu, prgnDst, pptSrc, planemask);
}
RegionPtr
@@ -362,7 +637,13 @@ cfbCopyArea(pSrcDrawable, pDstDrawable,
int width, height;
int dstx, dsty;
{
- void (*doBitBlt) ();
+ 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)
@@ -386,18 +667,17 @@ cfbCopyArea(pSrcDrawable, pDstDrawable,
#if PSZ == 8
void
-cfbCopyPlane1to8 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc, planemask, bitPlane)
+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 */
- unsigned long planemask; /* to apply to destination writes */
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 bitPlane; /* not used; assumed always to be 1 */
+ 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 */
@@ -718,26 +998,23 @@ cfbCopyPlane1to8 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc, planemask, b
/******************************************************************/
-void
+static void
#if PSZ == 16
-cfbCopyPlane1to16 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc,
- planemask, bitPlane)
+cfbCopyPlane1to16
#endif
#if PSZ == 24
-cfbCopyPlane1to24 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc,
- planemask, bitPlane)
+cfbCopyPlane1to24
#endif
#if PSZ == 32
-cfbCopyPlane1to32 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc,
- planemask, bitPlane)
+cfbCopyPlane1to32
#endif
- DrawablePtr pSrcDrawable;
- DrawablePtr pDstDrawable;
- int rop;
- unsigned long planemask;
- RegionPtr prgnDst;
- DDXPointPtr pptSrc;
- unsigned long bitPlane;
+(
+ DrawablePtr pSrcDrawable,
+ DrawablePtr pDstDrawable,
+ int rop,
+ RegionPtr prgnDst,
+ DDXPointPtr pptSrc,
+ unsigned long planemask)
{
int srcx, srcy, dstx, dsty;
int width, height;
@@ -1078,13 +1355,19 @@ RegionPtr cfbCopyPlane(pSrcDrawable, pDstDrawable,
#if IMAGE_BYTE_ORDER == LSBFirst
- void (*doBitBlt)();
+ 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)
{
- doBitBlt = cfbCopyPlane1toN;
+ doCopyPlaneExpand = cfbCopyPlane1toN;
#if PSZ == 8
cfb8CheckOpaqueStipple (pGC->alu,
pGC->fgPixel, pGC->bgPixel,
@@ -1093,8 +1376,8 @@ RegionPtr cfbCopyPlane(pSrcDrawable, pDstDrawable,
FgPixel = pGC->fgPixel;
BgPixel = pGC->bgPixel;
#endif
- ret = cfbBitBlt (pSrcDrawable, pDstDrawable,
- pGC, srcx, srcy, width, height, dstx, dsty, doBitBlt, bitPlane);
+ ret = cfbCopyPlaneExpand (pSrcDrawable, pDstDrawable,
+ pGC, srcx, srcy, width, height, dstx, dsty, doCopyPlaneExpand, bitPlane);
}
else
ret = miHandleExposures (pSrcDrawable, pDstDrawable,
@@ -1102,7 +1385,6 @@ RegionPtr cfbCopyPlane(pSrcDrawable, pDstDrawable,
}
else if (pSrcDrawable->bitsPerPixel == PSZ && pDstDrawable->bitsPerPixel == 1)
{
- extern int InverseAlu[16];
int oldalu;
oldalu = pGC->alu;
@@ -1110,7 +1392,7 @@ RegionPtr cfbCopyPlane(pSrcDrawable, pDstDrawable,
pGC->alu = InverseAlu[pGC->alu];
else if ((pGC->fgPixel & 1) == (pGC->bgPixel & 1))
pGC->alu = mfbReduceRop(pGC->alu, pGC->fgPixel);
- ret = cfbBitBlt (pSrcDrawable, pDstDrawable,
+ ret = cfbCopyPlaneReduce(pSrcDrawable, pDstDrawable,
pGC, srcx, srcy, width, height, dstx, dsty,
cfbCopyPlaneNto1, bitPlane);
pGC->alu = oldalu;
@@ -1137,7 +1419,7 @@ RegionPtr cfbCopyPlane(pSrcDrawable, pDstDrawable,
*/
ValidateGC ((DrawablePtr) pBitmap, pGC1);
/* no exposures here, scratch GC's don't get graphics expose */
- (void) cfbBitBlt (pSrcDrawable, (DrawablePtr) pBitmap,
+ cfbCopyPlaneReduce(pSrcDrawable, (DrawablePtr) pBitmap,
pGC1, srcx, srcy, width, height, 0, 0,
cfbCopyPlaneNto1, bitPlane);
#if PSZ == 8
@@ -1149,7 +1431,7 @@ RegionPtr cfbCopyPlane(pSrcDrawable, pDstDrawable,
BgPixel = pGC->bgPixel;
#endif
/* no exposures here, copy bits from inside a pixmap */
- (void) cfbBitBlt ((DrawablePtr) pBitmap, pDstDrawable, pGC,
+ cfbCopyPlaneExpand((DrawablePtr) pBitmap, pDstDrawable, pGC,
0, 0, width, height, dstx, dsty, cfbCopyPlane1toN, 1);
FreeScratchGC (pGC1);
(*pScreen->DestroyPixmap) (pBitmap);
diff --git a/cfb/cfbblt.c b/cfb/cfbblt.c
index aafe44669..5d2e084fd 100644
--- a/cfb/cfbblt.c
+++ b/cfb/cfbblt.c
@@ -1,7 +1,7 @@
/*
* cfb copy area
*/
-/* $XFree86: xc/programs/Xserver/cfb/cfbblt.c,v 3.12 2001/12/14 19:59:21 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbblt.c,v 3.14 2003/10/29 22:44:53 tsi Exp $ */
/*
@@ -118,12 +118,13 @@ Author: Keith Packard
#endif
void
-MROP_NAME(cfbDoBitblt)(pSrc, pDst, alu, prgnDst, pptSrc, planemask)
- DrawablePtr pSrc, pDst;
- int alu;
- RegionPtr prgnDst;
- DDXPointPtr pptSrc;
- unsigned long planemask;
+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 */
@@ -167,12 +168,8 @@ MROP_NAME(cfbDoBitblt)(pSrc, pDst, alu, prgnDst, pptSrc, planemask)
#endif
#if MROP == 0
- unsigned char *psrcBaseByte, *pdstBaseByte;
- int widthSrcBytes, widthDstBytes;
-
- cfbGetByteWidthAndPointer (pSrc, widthSrcBytes, psrcBaseByte)
-
- cfbGetByteWidthAndPointer (pDst, widthDstBytes, pdstBaseByte)
+ int widthSrcBytes = cfbGetByteWidth(pSrc);
+ int widthDstBytes = cfbGetByteWidth(pDst);
#endif
#endif
diff --git a/cfb/cfbcppl.c b/cfb/cfbcppl.c
index 20ef24e1c..ee4c18fdc 100644
--- a/cfb/cfbcppl.c
+++ b/cfb/cfbcppl.c
@@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group.
*
* Author: Keith Packard, MIT X Consortium
*/
-/* $XFree86: xc/programs/Xserver/cfb/cfbcppl.c,v 1.6 2001/12/14 19:59:22 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbcppl.c,v 1.7 2003/07/16 01:38:37 dawes Exp $ */
#include "X.h"
#include "Xmd.h"
@@ -40,18 +40,23 @@ in this Software without prior written authorization from The Open Group.
#include "maskbits.h"
#define PSZ 8
#include "mergerop.h"
-#endif
+#else /* PSZ==8 */
+#include "cfbtab.h" /* provides starttab, endttab, partmasks */
+#endif /* PSZ==8 */
void
-cfbCopyImagePlane (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc, planemask)
- DrawablePtr pSrcDrawable;
- DrawablePtr pDstDrawable;
- int rop;
- RegionPtr prgnDst;
- DDXPointPtr pptSrc;
- unsigned long planemask;
+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);
@@ -90,14 +95,14 @@ cfbCopyImagePlane (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc, planemask)
}
void
-cfbCopyPlane8to1 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc, planemask, bitPlane)
- DrawablePtr pSrcDrawable;
- DrawablePtr pDstDrawable;
- int rop;
- RegionPtr prgnDst;
- DDXPointPtr pptSrc;
- unsigned long planemask;
- unsigned long bitPlane;
+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;
@@ -291,24 +296,22 @@ cfbCopyPlane8to1 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc, planemask, b
void
#if PSZ == 16
-cfbCopyPlane16to1 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc,
- planemask, bitPlane)
+cfbCopyPlane16to1
#endif
#if PSZ == 24
-cfbCopyPlane24to1 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc,
- planemask, bitPlane)
+cfbCopyPlane24to1
#endif
#if PSZ == 32
-cfbCopyPlane32to1 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc,
- planemask, bitPlane)
+cfbCopyPlane32to1
#endif
- DrawablePtr pSrcDrawable;
- DrawablePtr pDstDrawable;
- int rop;
- RegionPtr prgnDst;
- DDXPointPtr pptSrc;
- unsigned long planemask;
- unsigned long bitPlane;
+(
+ 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;
@@ -332,7 +335,7 @@ cfbCopyPlane32to1 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc,
register int curBit;
register int bitPos;
register unsigned int bits;
- unsigned int startmask, endmask;
+ unsigned int startmask = 0, endmask = 0;
int niStart = 0, niEnd = 0;
int bitStart = 0, bitEnd = 0;
int nl, nlMiddle;
@@ -340,9 +343,6 @@ cfbCopyPlane32to1 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc,
BoxPtr pbox;
int result;
- extern int starttab[32], endtab[32];
- extern unsigned int partmasks[32][32];
-
if (!(planemask & 1))
return;
diff --git a/cfb/cfbfillarc.c b/cfb/cfbfillarc.c
index 9dee99476..64ec508c8 100644
--- a/cfb/cfbfillarc.c
+++ b/cfb/cfbfillarc.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/cfb/cfbfillarc.c,v 3.5 2001/12/14 19:59:22 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbfillarc.c,v 3.7 2003/10/29 22:44:53 tsi Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
@@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group.
#include "X.h"
#include "Xprotostr.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "gcstruct.h"
#include "pixmapstr.h"
#include "scrnintstr.h"
@@ -47,10 +47,10 @@ in this Software without prior written authorization from The Open Group.
#endif
static void
-RROP_NAME(cfbFillEllipseSolid) (pDraw, pGC, arc)
- DrawablePtr pDraw;
- GCPtr pGC;
- xArc *arc;
+RROP_NAME(cfbFillEllipseSolid)(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ xArc *arc)
{
STUPID int x, y, e;
STUPID int yk, xk, ym, xm, dx, dy, xorg, yorg;
@@ -181,6 +181,7 @@ RROP_NAME(cfbFillEllipseSolid) (pDraw, pGC, arc)
RROP_SOLID_MASK(addrl, endmask);
#endif /* PSZ == 24 */
}
+ RROP_UNDECLARE
}
#if PSZ == 24
@@ -254,10 +255,10 @@ RROP_NAME(cfbFillEllipseSolid) (pDraw, pGC, arc)
}
static void
-RROP_NAME(cfbFillArcSliceSolid)(pDraw, pGC, arc)
- DrawablePtr pDraw;
- GCPtr pGC;
- xArc *arc;
+RROP_NAME(cfbFillArcSliceSolid)(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ xArc *arc)
{
int yk, xk, ym, xm, dx, dy, xorg, yorg, slw;
register int x, y, e;
@@ -313,6 +314,7 @@ RROP_NAME(cfbFillArcSliceSolid)(pDraw, pGC, arc)
FILLSLICESPANS(slice.flip_bot, addrlb);
}
}
+ RROP_UNDECLARE
}
void
diff --git a/cfb/cfbfillsp.c b/cfb/cfbfillsp.c
index 9a75ac6c6..14a6a9d52 100644
--- a/cfb/cfbfillsp.c
+++ b/cfb/cfbfillsp.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/cfb/cfbfillsp.c,v 3.7 2001/12/14 19:59:22 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbfillsp.c,v 3.8 2003/10/29 22:44:53 tsi Exp $ */
/************************************************************
Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA.
@@ -509,7 +509,10 @@ int fSorted;
width = *pwidth;
while(width > 0)
{
- int xtemp, tmpx;
+ int xtemp;
+#if PSZ != 32 || PPW != 1
+ int tmpx;
+#endif
register CfbBits *ptemp;
register CfbBits *pdsttmp;
/*
@@ -541,7 +544,9 @@ int fSorted;
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 ) {
diff --git a/cfb/cfbgetsp.c b/cfb/cfbgetsp.c
index e5c55f389..737f30237 100644
--- a/cfb/cfbgetsp.c
+++ b/cfb/cfbgetsp.c
@@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/cfb/cfbgetsp.c,v 3.9 2001/12/14 19:59:22 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbgetsp.c,v 3.10 2003/10/29 22:44:53 tsi Exp $ */
#include "X.h"
#include "Xmd.h"
@@ -91,7 +91,9 @@ cfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pchardstStart)
register int xIndex = 0;
#else
register int nstart;
+#if PSZ != 32 || PPW != 1
int nend;
+#endif
PixelGroup startmask, endmask;
int nlMiddle;
#endif
@@ -158,7 +160,7 @@ cfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pchardstStart)
psrc = (PixelGroup *)((unsigned long)psrcb & ~0x03);
getbits24(psrc, tmpSrc, srcBit);
pdst = (PixelGroup *)((unsigned long)pdstb & ~0x03);
- putbits24(tmpSrc, nstart, PPW, pdst, ~((CfbBits)0), xIndex);
+ putbits24(tmpSrc, PPW, pdst, ~((CfbBits)0), xIndex);
srcBit++;
psrcb += 3;
xIndex++;
@@ -194,7 +196,9 @@ cfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pchardstStart)
}
if (endmask)
{
+#if PSZ != 32 || PPW != 1
nend = xEnd & PIM;
+#endif
getbits(psrc, 0, nend, tmpSrc);
putbits(tmpSrc, nstart, nend, pdst, ~((CfbBits)0));
}
diff --git a/cfb/cfbglblt8.c b/cfb/cfbglblt8.c
index 5db5c1f01..60a012c28 100644
--- a/cfb/cfbglblt8.c
+++ b/cfb/cfbglblt8.c
@@ -23,7 +23,7 @@ Except as contained in this notice, the name of The Open Group shall not be
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/cfb/cfbglblt8.c,v 3.6 2001/12/14 19:59:23 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbglblt8.c,v 3.8 2003/08/06 14:04:02 eich Exp $ */
/*
* Poly glyph blt. Accepts an arbitrary font <= 32 bits wide, in Copy mode
@@ -87,7 +87,14 @@ typedef CARD32 *glyphPointer;
#endif
-static void cfbPolyGlyphBlt8Clipped();
+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
@@ -267,13 +274,14 @@ cfbPolyGlyphBlt8 (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
}
static void
-cfbPolyGlyphBlt8Clipped (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
- DrawablePtr pDrawable;
- GCPtr pGC;
- int x, y;
- unsigned int nglyph;
- CharInfoPtr *ppci; /* array of character info */
- unsigned char *pglyphBase; /* start of array of glyphs */
+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;
@@ -283,7 +291,7 @@ cfbPolyGlyphBlt8Clipped (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
#endif
register glyphPointer glyphBits;
register int xoff;
-#if defined(USE_LEFT_BITS) || (!defined(STIPPLE) && !defined(USE_STIPPLE_CODE))
+#if defined(USE_LEFTBITS) || (!defined(STIPPLE) && !defined(USE_STIPPLE_CODE))
register CfbBits *dst;
#endif
@@ -291,7 +299,7 @@ cfbPolyGlyphBlt8Clipped (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
FontPtr pfont = pGC->font;
CfbBits *dstLine;
CfbBits *pdstBase;
-#ifdef USE_LEFT_BITS
+#ifdef USE_LEFTBITS
CARD32 *cTmp;
#endif
CARD32 *clips;
@@ -398,7 +406,7 @@ cfbPolyGlyphBlt8Clipped (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
}
} while (--hTmp);
break;
-#else /* !USE_LEFT_BITS */
+#else /* !USE_LEFTBITS */
{
int h;
@@ -411,7 +419,7 @@ cfbPolyGlyphBlt8Clipped (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
}
glyphBits = clips;
/* fall through */
-#endif /* USE_LEFT_BITS */
+#endif /* USE_LEFTBITS */
case rgnIN:
#ifdef STIPPLE
STIPPLE(dstLine,glyphBits,pixel,bwidthDst,hTmp,xoff);
diff --git a/cfb/cfbmap.h b/cfb/cfbmap.h
index c02ddfb96..42056345a 100644
--- a/cfb/cfbmap.h
+++ b/cfb/cfbmap.h
@@ -26,7 +26,7 @@ in this Software without prior written authorization from The Open Group.
* Author: Keith Packard, MIT X Consortium
*/
-/* $XFree86: xc/programs/Xserver/cfb/cfbmap.h,v 3.11 2001/12/14 19:59:23 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbmap.h,v 3.12 2003/07/19 13:22:27 tsi Exp $ */
/*
* Map names around so that multiple depths can be supported simultaneously
@@ -59,6 +59,7 @@ in this Software without prior written authorization from The Open Group.
#undef cfbCopyImagePlane
#undef cfbCopyPixmap
#undef cfbCopyPlane
+#undef cfbCopyPlaneReduce
#undef cfbCopyRotatePixmap
#undef cfbCopyWindow
#undef cfbCreateGC
@@ -227,6 +228,7 @@ cfb can not hack PSZ yet
#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)
diff --git a/cfb/cfbmskbits.h b/cfb/cfbmskbits.h
index dac519001..b7f9969dd 100644
--- a/cfb/cfbmskbits.h
+++ b/cfb/cfbmskbits.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/cfb/cfbmskbits.h,v 3.13 2001/10/28 03:33:01 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbmskbits.h,v 3.14 2003/10/29 22:44:53 tsi Exp $ */
/************************************************************
Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA.
@@ -446,7 +446,7 @@ getleftbits(psrc, w, dst)
}; \
}
-#define putbits24(src, x, w, pdst, planemask, index) {\
+#define putbits24(src, w, pdst, planemask, index) {\
register PixelGroup dstpixel; \
register unsigned int idx; \
switch(idx = ((index)&3)<<1){ \
@@ -531,7 +531,7 @@ getleftbits(psrc, w, dst)
abort()
#define getbits24(psrc, dst, index) \
abort()
-#define putbits24(src, x, w, pdst, planemask, index) \
+#define putbits24(src, w, pdst, planemask, index) \
abort()
#define putbitsrop24(src, x, pdst, planemask, rop) \
abort()
diff --git a/cfb/cfbply1rct.c b/cfb/cfbply1rct.c
index e75708b96..0b14bc614 100644
--- a/cfb/cfbply1rct.c
+++ b/cfb/cfbply1rct.c
@@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group.
*
* Author: Keith Packard, MIT X Consortium
*/
-/* $XFree86: xc/programs/Xserver/cfb/cfbply1rct.c,v 3.9 2001/12/14 19:59:24 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbply1rct.c,v 3.11 2003/10/30 14:53:39 tsi Exp $ */
#include "X.h"
@@ -76,7 +76,10 @@ RROP_NAME(cfbFillPoly1Rect) (pDrawable, pGC, shape, mode, count, ptsIn)
int step1 = 0, step2 = 0;
int sign1 = 0, sign2 = 0;
int h;
- int l, r;
+ int l;
+#if PSZ != 24 && PPW > 1
+ int r;
+#endif
int nmiddle;
RROP_DECLARE
@@ -262,13 +265,17 @@ RROP_NAME(cfbFillPoly1Rect) (pDrawable, pGC, shape, mode, count, ptsIn)
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;
@@ -283,16 +290,6 @@ RROP_NAME(cfbFillPoly1Rect) (pDrawable, pGC, shape, mode, count, ptsIn)
#if PSZ == 24
addr = (CfbBits *)((char *)addrl + ((l * 3) & ~0x03));
-#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);
-#endif /* PSZ == 24 */
-#if PSZ == 24
if (nmiddle <= 1){
if (nmiddle)
RROP_SOLID24(addr, l);
@@ -315,6 +312,13 @@ RROP_NAME(cfbFillPoly1Rect) (pDrawable, pGC, shape, mode, count, ptsIn)
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)
{
@@ -351,4 +355,5 @@ RROP_NAME(cfbFillPoly1Rect) (pDrawable, pGC, shape, mode, count, ptsIn)
break;
addrl = AddrYPlus (addrl, 1);
}
+ RROP_UNDECLARE
}
diff --git a/cfb/cfbpntwin.c b/cfb/cfbpntwin.c
index d21544b37..c77d01961 100644
--- a/cfb/cfbpntwin.c
+++ b/cfb/cfbpntwin.c
@@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/cfb/cfbpntwin.c,v 3.7 2002/09/16 18:05:31 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbpntwin.c,v 3.8 2003/10/29 22:44:53 tsi Exp $ */
#include "X.h"
@@ -226,7 +226,6 @@ cfbFillBoxSolid (pDrawable, nBox, pBox, pixel)
CfbBits *pdstBase;
int widthDst;
register int h;
- register CfbBits rrop_xor;
register CfbBits *pdst;
int nmiddle;
int w;
@@ -238,13 +237,16 @@ cfbFillBoxSolid (pDrawable, nBox, pBox, pixel)
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;
diff --git a/cfb/cfbrrop.h b/cfb/cfbrrop.h
index d6f095e6b..d8dce082c 100644
--- a/cfb/cfbrrop.h
+++ b/cfb/cfbrrop.h
@@ -26,7 +26,7 @@ in this Software without prior written authorization from The Open Group.
* Author: Keith Packard, MIT X Consortium
*/
-/* $XFree86: xc/programs/Xserver/cfb/cfbrrop.h,v 3.10 2001/12/14 19:59:24 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbrrop.h,v 3.11 2003/10/29 22:44:53 tsi Exp $ */
#ifndef GXcopy
#include "X.h"
@@ -66,11 +66,13 @@ in this Software without prior written authorization from The Open Group.
(*(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 */
@@ -100,11 +102,13 @@ in this Software without prior written authorization from The Open Group.
(*(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 */
@@ -145,11 +149,13 @@ in this Software without prior written authorization from The Open Group.
(*(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 */
@@ -190,11 +196,13 @@ in this Software without prior written authorization from The Open Group.
(*(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 */
@@ -205,6 +213,7 @@ in this Software without prior written authorization from The Open Group.
#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
@@ -253,12 +262,15 @@ in this Software without prior written authorization from The Open Group.
(*(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 */
diff --git a/cfb/cfbscrinit.c b/cfb/cfbscrinit.c
index dae88ff5c..7e0d15dd4 100644
--- a/cfb/cfbscrinit.c
+++ b/cfb/cfbscrinit.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/cfb/cfbscrinit.c,v 1.19 2001/01/17 22:36:36 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbscrinit.c,v 1.20 2003/07/16 01:38:37 dawes Exp $ */
/************************************************************
Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA.
@@ -72,6 +72,20 @@ cfbCloseScreen (index, pScreen)
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;
@@ -104,11 +118,11 @@ cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
pScreen->UnrealizeFont = mfbUnrealizeFont;
pScreen->CreateGC = cfbCreateGC;
pScreen->CreateColormap = cfbInitializeColormap;
- pScreen->DestroyColormap = (void (*)())NoopDDA;
+ pScreen->DestroyColormap = DestroyColormapNoop;
pScreen->InstallColormap = cfbInstallColormap;
pScreen->UninstallColormap = cfbUninstallColormap;
pScreen->ListInstalledColormaps = cfbListInstalledColormaps;
- pScreen->StoreColors = (void (*)())NoopDDA;
+ pScreen->StoreColors = StoreColorsNoop;
pScreen->ResolveColor = cfbResolveColor;
pScreen->BitmapToRegion = mfbPixmapToRegion;
diff --git a/cfb/cfbsetsp.c b/cfb/cfbsetsp.c
index 2096d4e34..4f7dfaee1 100644
--- a/cfb/cfbsetsp.c
+++ b/cfb/cfbsetsp.c
@@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/cfb/cfbsetsp.c,v 3.5 2001/12/14 19:59:24 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbsetsp.c,v 3.6 2003/10/29 22:44:53 tsi Exp $ */
#include "X.h"
#include "Xmd.h"
@@ -83,16 +83,18 @@ cfbSetScanline(y, xOrigin, xStart, xEnd, psrc, alu, pdstBase, widthDst, planemas
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 dstBit; /* offset in bits from beginning of
- * word */
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()
@@ -110,7 +112,6 @@ cfbSetScanline(y, xOrigin, xStart, xEnd, psrc, alu, pdstBase, widthDst, planemas
offSrc = (xStart - xOrigin) & PIM;
#endif
w = xEnd - xStart;
- dstBit = xStart & PIM;
#if PSZ == 24
nl = w;
@@ -125,6 +126,7 @@ cfbSetScanline(y, xOrigin, xStart, xEnd, psrc, alu, pdstBase, widthDst, planemas
pdstb += 3;
}
#else /* PSZ == 24 */
+ dstBit = xStart & PIM;
if (dstBit + w <= PPW)
{
maskpartialbits(dstBit, w, startmask);
@@ -139,10 +141,12 @@ cfbSetScanline(y, xOrigin, xStart, xEnd, psrc, alu, pdstBase, widthDst, planemas
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);
diff --git a/cfb/cfbsolid.c b/cfb/cfbsolid.c
index 6d8a95692..f0a3e361e 100644
--- a/cfb/cfbsolid.c
+++ b/cfb/cfbsolid.c
@@ -25,7 +25,7 @@ in this Software without prior written authorization from The Open Group.
*
* Author: Keith Packard, MIT X Consortium
*/
-/* $XFree86: xc/programs/Xserver/cfb/cfbsolid.c,v 3.8 2002/09/16 18:05:31 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbsolid.c,v 3.9 2003/10/29 22:44:53 tsi Exp $ */
#include "X.h"
@@ -771,6 +771,7 @@ RROP_NAME(cfbFillRectSolid) (pDrawable, pGC, nBox, pBox)
}
#endif
}
+ RROP_UNDECLARE
}
void
@@ -1358,4 +1359,5 @@ RROP_NAME(cfbSolidSpans) (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
}
DEALLOCATE_LOCAL(pptFree);
DEALLOCATE_LOCAL(pwidthFree);
+ RROP_UNDECLARE
}
diff --git a/cfb/cfbtegblt.c b/cfb/cfbtegblt.c
index 0cba03575..7450c7829 100644
--- a/cfb/cfbtegblt.c
+++ b/cfb/cfbtegblt.c
@@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/cfb/cfbtegblt.c,v 3.6 2001/12/14 19:59:25 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbtegblt.c,v 3.7 2003/10/29 22:44:53 tsi Exp $ */
#include "X.h"
#include "Xmd.h"
@@ -109,7 +109,9 @@ cfbTEGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
register int wtmp,xtemp,width;
CfbBits bgfill,fgfill,*ptemp,tmpDst1,tmpDst2,*pdtmp;
+#if PSZ != 24
int tmpx;
+#endif
xpos += pDrawable->x;
ypos += pDrawable->y;
@@ -177,23 +179,15 @@ cfbTEGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
while (width > 0)
{
#if PSZ == 24
- tmpx = x & 3;
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));
-#endif
-
-#if PSZ == 24
- ptemp = (CfbBits *)(pglyph + ((xtemp *3)>> 2));
-#else
ptemp = (CfbBits *)(pglyph + (xtemp >> MFB_PWSH));
-#endif
-#if PSZ == 24
- getstipplepixels24(ptemp,xtemp,0,&bgfill,&tmpDst1, xtemp);
- getstipplepixels24(ptemp,xtemp,1,&fgfill,&tmpDst2, xtemp);
-#else
getstipplepixels(ptemp,xtemp,w,0,&bgfill,&tmpDst1);
getstipplepixels(ptemp,xtemp,w,1,&fgfill,&tmpDst2);
#endif
@@ -202,7 +196,7 @@ cfbTEGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
CfbBits tmpDst = tmpDst1 | tmpDst2;
#if PSZ == 24
CfbBits *pdsttmp = pdst + ((x*3) >> 2);
- putbits24(tmpDst,tmpx,w,pdsttmp,pGC->planemask,x);
+ putbits24(tmpDst,w,pdsttmp,pGC->planemask,x);
#else
CfbBits *pdsttmp = pdst + (x >> PWSH);
putbits(tmpDst,tmpx,w,pdsttmp,pGC->planemask);
diff --git a/cfb/cfbtile32.c b/cfb/cfbtile32.c
index cfa3bd503..b202943e8 100644
--- a/cfb/cfbtile32.c
+++ b/cfb/cfbtile32.c
@@ -2,7 +2,7 @@
* Fill 32 bit tiled rectangles. Used by both PolyFillRect and PaintWindow.
* no depth dependencies.
*/
-/* $XFree86: xc/programs/Xserver/cfb/cfbtile32.c,v 3.6 2001/12/14 19:59:25 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbtile32.c,v 3.7 2003/10/29 22:44:53 tsi Exp $ */
/*
@@ -234,7 +234,11 @@ MROP_NAME(cfbFillRectTile32) (pDrawable, pGC, nBox, pBox)
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;
@@ -244,7 +248,11 @@ MROP_NAME(cfbFillRectTile32) (pDrawable, pGC, nBox, pBox)
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)
@@ -346,7 +354,11 @@ MROP_NAME(cfbTile32FS)(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
PixmapPtr tile;
CfbBits *psrc; /* pointer to bits in tile */
int tileHeight;/* height of the tile */
- MROP_DECLARE_REG ()
+#if MROP == 0 && PSZ == 24
+ DeclareMergeRop()
+#else
+ MROP_DECLARE_REG()
+#endif
MROP_PREBUILT_DECLARE()
#if PSZ == 24
CfbBits xtmp;
@@ -371,7 +383,11 @@ MROP_NAME(cfbTile32FS)(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)
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)
diff --git a/cfb/cfbtileodd.c b/cfb/cfbtileodd.c
index 85efd614e..e372fe87d 100644
--- a/cfb/cfbtileodd.c
+++ b/cfb/cfbtileodd.c
@@ -2,7 +2,7 @@
* Fill odd tiled rectangles and spans.
* no depth dependencies.
*/
-/* $XFree86: xc/programs/Xserver/cfb/cfbtileodd.c,v 3.6 2001/12/14 19:59:25 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbtileodd.c,v 3.7 2003/10/29 22:44:53 tsi Exp $ */
/*
@@ -139,7 +139,11 @@ MROP_NAME(cfbFillBoxTileOdd) (pDrawable, nBox, pBox, tile, xrot, yrot, alu, plan
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 */
@@ -160,7 +164,11 @@ MROP_NAME(cfbFillBoxTileOdd) (pDrawable, nBox, pBox, tile, xrot, yrot, alu, plan
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;
@@ -395,7 +403,11 @@ MROP_NAME(cfbFillSpanTileOdd) (pDrawable, n, ppt, pwidth, tile, xrot, yrot, alu,
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 */
@@ -416,7 +428,11 @@ MROP_NAME(cfbFillSpanTileOdd) (pDrawable, n, ppt, pwidth, tile, xrot, yrot, alu,
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;
@@ -643,7 +659,11 @@ MROP_NAME(cfbFillBoxTile32s) (pDrawable, nBox, pBox, tile, xrot, yrot, alu, plan
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 */
@@ -655,7 +675,11 @@ MROP_NAME(cfbFillBoxTile32s) (pDrawable, nBox, pBox, tile, xrot, yrot, alu, plan
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;
@@ -954,7 +978,11 @@ MROP_NAME(cfbFillSpanTile32s) (pDrawable, n, ppt, pwidth, tile, xrot, yrot, alu,
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 */
@@ -966,7 +994,11 @@ MROP_NAME(cfbFillSpanTile32s) (pDrawable, n, ppt, pwidth, tile, xrot, yrot, alu,
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;
diff --git a/cfb/cfbunmap.h b/cfb/cfbunmap.h
index e94f45482..af1754c40 100644
--- a/cfb/cfbunmap.h
+++ b/cfb/cfbunmap.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/cfb/cfbunmap.h,v 1.5 1999/12/13 02:13:07 robin Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbunmap.h,v 1.6 2003/07/19 13:22:28 tsi Exp $ */
/*
* Copyright (C) 1994-1998 The XFree86 Project, Inc. All Rights Reserved.
*
@@ -58,6 +58,7 @@
#undef cfbCopyImagePlane
#undef cfbCopyPixmap
#undef cfbCopyPlane
+#undef cfbCopyPlaneReduce
#undef cfbCopyRotatePixmap
#undef cfbCopyWindow
#undef cfbCreateGC
diff --git a/cfb/cfbwindow.c b/cfb/cfbwindow.c
index 244aa412b..cae13cf3c 100644
--- a/cfb/cfbwindow.c
+++ b/cfb/cfbwindow.c
@@ -45,6 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/programs/Xserver/cfb/cfbwindow.c,v 1.6 2003/11/10 18:21:45 tsi Exp $ */
#include "X.h"
#include "scrnintstr.h"
@@ -54,8 +55,6 @@ SOFTWARE.
#include "regionstr.h"
#include "cfbmskbits.h"
-extern WindowPtr *WindowTable;
-
Bool
cfbCreateWindow(pWin)
WindowPtr pWin;
@@ -178,7 +177,7 @@ cfbCopyWindow(pWin, ptOldOrg, prgnSrc)
pwinRoot = WindowTable[pWin->drawable.pScreen->myNum];
- REGION_INIT(pWin->drawable.pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pWin->drawable.pScreen, &rgnDst);
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
diff --git a/cfb/cfbzerarc.c b/cfb/cfbzerarc.c
index c13e37739..3703a5105 100644
--- a/cfb/cfbzerarc.c
+++ b/cfb/cfbzerarc.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/cfb/cfbzerarc.c,v 3.3 2001/12/14 19:59:25 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfbzerarc.c,v 3.5 2003/10/29 22:44:53 tsi Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
@@ -35,7 +35,7 @@ in this Software without prior written authorization from The Open Group.
#include "X.h"
#include "Xprotostr.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "gcstruct.h"
#include "pixmapstr.h"
#include "scrnintstr.h"
@@ -48,10 +48,10 @@ in this Software without prior written authorization from The Open Group.
#ifdef PIXEL_ADDR
static void
-RROP_NAME(cfbZeroArcSS8) (pDraw, pGC, arc)
- DrawablePtr pDraw;
- GCPtr pGC;
- xArc *arc;
+RROP_NAME(cfbZeroArcSS8)(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ xArc *arc)
{
miZeroArcRec info;
Bool do360;
@@ -266,6 +266,7 @@ RROP_NAME(cfbZeroArcSS8) (pDraw, pGC, arc)
RROP_SOLID(yorgop - yoffset + info.xorg + x);
#endif /* PSZ == 24 */
}
+ RROP_UNDECLARE
}
void
diff --git a/cfb24/cfbrrop24.h b/cfb24/cfbrrop24.h
index 5c1d488e3..0bb97ce5b 100644
--- a/cfb24/cfbrrop24.h
+++ b/cfb24/cfbrrop24.h
@@ -1,7 +1,7 @@
-/* $XFree86: xc/programs/Xserver/cfb24/cfbrrop24.h,v 3.1 2001/10/28 03:33:03 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb24/cfbrrop24.h,v 3.2 2003/10/29 22:46:27 tsi Exp $ */
#define RROP_DECLARE \
- unsigned long piQxelAnd[3], piQxelXor[3], spiQxelAnd[8], spiQxelXor[8];
+ unsigned long piQxelAnd[3], piQxelXor[3], spiQxelXor[8];
#define RROP_COPY_SETUP(ptn) \
spiQxelXor[0] = ptn & 0xFFFFFF; \
@@ -26,12 +26,6 @@
spiQxelXor[3] = xor << 8; \
spiQxelXor[4] = (xor >> 8) & 0xFFFF; \
spiQxelXor[5] = (xor >> 16) & 0xFF; \
- spiQxelAnd[0] = (and & 0xFFFFFF) | 0xFF000000; \
- spiQxelAnd[1] = (and << 24) | 0xFFFFFF; \
- spiQxelAnd[2] = (and << 16) | 0xFFFF; \
- spiQxelAnd[3] = (and << 8) | 0xFF; \
- spiQxelAnd[4] = ((and >> 8) & 0xFFFF) | 0xFFFF0000; \
- spiQxelAnd[5] = ((and >> 16) & 0xFF) | 0xFFFFFF00; \
piQxelAnd[0] = (and & 0xFFFFFF)|(and << 24); \
piQxelAnd[1] = (and << 16)|((and >> 8) & 0xFFFF); \
piQxelAnd[2] = (and << 8)|((and >> 16) & 0xFF); \
diff --git a/dbe/dbestruct.h b/dbe/dbestruct.h
index c429cede8..3634fe7d7 100644
--- a/dbe/dbestruct.h
+++ b/dbe/dbestruct.h
@@ -30,6 +30,7 @@
* Header file for DIX-related DBE
*
*****************************************************************************/
+/* $XFree86: xc/programs/Xserver/dbe/dbestruct.h,v 3.2 2003/11/17 22:20:32 dawes Exp $ */
#ifndef DBE_STRUCT_H
@@ -179,77 +180,53 @@ typedef struct _DbeScreenPrivRec
/* Per-screen DIX routines */
Bool (*SetupBackgroundPainter)(
-#if NeedNestedPrototypes
WindowPtr /*pWin*/,
GCPtr /*pGC*/
-#endif
);
DbeWindowPrivPtr (*AllocWinPriv)(
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/
-#endif
);
int (*AllocWinPrivPrivIndex)(
-#if NeedNestedPrototypes
void
-#endif
);
Bool (*AllocWinPrivPriv)(
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/,
int /*index*/,
unsigned /*amount*/
-#endif
);
/* Per-screen DDX routines */
Bool (*GetVisualInfo)(
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/,
XdbeScreenVisualInfo * /*pVisInfo*/
-#endif
);
int (*AllocBackBufferName)(
-#if NeedNestedPrototypes
WindowPtr /*pWin*/,
XID /*bufId*/,
int /*swapAction*/
-#endif
);
int (*SwapBuffers)(
-#if NeedNestedPrototypes
ClientPtr /*client*/,
int * /*pNumWindows*/,
DbeSwapInfoPtr /*swapInfo*/
-#endif
);
void (*BeginIdiom)(
-#if NeedNestedPrototypes
ClientPtr /*client*/
-#endif
);
void (*EndIdiom)(
-#if NeedNestedPrototypes
ClientPtr /*client*/
-#endif
);
void (*WinPrivDelete)(
-#if NeedNestedPrototypes
DbeWindowPrivPtr /*pDbeWindowPriv*/,
XID /*bufId*/
-#endif
);
void (*ResetProc)(
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/
-#endif
);
void (*ValidateBuffer)(
-#if NeedNestedPrototypes
WindowPtr /*pWin*/,
XID /*bufId*/,
Bool /*dstbuffer*/
-#endif
);
/* Device-specific private information.
diff --git a/dbe/midbe.h b/dbe/midbe.h
index 7b91a6697..7b1237633 100644
--- a/dbe/midbe.h
+++ b/dbe/midbe.h
@@ -30,6 +30,7 @@
* Header file for users of machine-independent DBE code
*
*****************************************************************************/
+/* $XFree86: xc/programs/Xserver/dbe/midbe.h,v 3.2 2003/11/17 22:20:32 dawes Exp $ */
#ifndef MIDBE_H
@@ -38,10 +39,8 @@
/* EXTERNS */
extern Bool miDbeInit(
-#if NeedFunctionPrototypes
ScreenPtr pScreen,
DbeScreenPrivPtr pDbeScreenPriv
-#endif
);
#endif /* MIDBE_H */
diff --git a/dix/colormap.c b/dix/colormap.c
index b3d8d1347..af959ed86 100644
--- a/dix/colormap.c
+++ b/dix/colormap.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/dix/colormap.c,v 3.10 2002/04/14 00:45:54 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/colormap.c,v 3.12 2003/11/17 22:20:33 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -66,74 +66,55 @@ extern XID clientErrorValue;
extern int colormapPrivateCount;
static Pixel FindBestPixel(
-#if NeedFunctionPrototypes
EntryPtr /*pentFirst*/,
int /*size*/,
xrgb * /*prgb*/,
int /*channel*/
-#endif
);
static int AllComp(
-#if NeedFunctionPrototypes
EntryPtr /*pent*/,
xrgb * /*prgb*/
-#endif
);
static int RedComp(
-#if NeedFunctionPrototypes
EntryPtr /*pent*/,
xrgb * /*prgb*/
-#endif
);
static int GreenComp(
-#if NeedFunctionPrototypes
EntryPtr /*pent*/,
xrgb * /*prgb*/
-#endif
);
static int BlueComp(
-#if NeedFunctionPrototypes
EntryPtr /*pent*/,
xrgb * /*prgb*/
-#endif
);
static void FreePixels(
-#if NeedFunctionPrototypes
register ColormapPtr /*pmap*/,
register int /*client*/
-#endif
);
static void CopyFree(
-#if NeedFunctionPrototypes
int /*channel*/,
int /*client*/,
ColormapPtr /*pmapSrc*/,
ColormapPtr /*pmapDst*/
-#endif
);
static void FreeCell(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
Pixel /*i*/,
int /*channel*/
-#endif
);
static void UpdateColors(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/
-#endif
);
static int AllocDirect(
-#if NeedFunctionPrototypes
int /*client*/,
ColormapPtr /*pmap*/,
int /*c*/,
@@ -145,11 +126,9 @@ static int AllocDirect(
Pixel * /*prmask*/,
Pixel * /*pgmask*/,
Pixel * /*pbmask*/
-#endif
);
static int AllocPseudo(
-#if NeedFunctionPrototypes
int /*client*/,
ColormapPtr /*pmap*/,
int /*c*/,
@@ -158,11 +137,9 @@ static int AllocPseudo(
Pixel * /*pixels*/,
Pixel * /*pmask*/,
Pixel ** /*pppixFirst*/
-#endif
);
static Bool AllocCP(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
EntryPtr /*pentFirst*/,
int /*count*/,
@@ -170,11 +147,9 @@ static Bool AllocCP(
Bool /*contig*/,
Pixel * /*pixels*/,
Pixel * /*pMask*/
-#endif
);
static Bool AllocShared(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
Pixel * /*ppix*/,
int /*c*/,
@@ -185,29 +160,23 @@ static Bool AllocShared(
Pixel /*gmask*/,
Pixel /*bmask*/,
Pixel * /*ppixFirst*/
-#endif
);
static int FreeCo(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
int /*client*/,
int /*color*/,
int /*npixIn*/,
Pixel * /*ppixIn*/,
Pixel /*mask*/
-#endif
);
static int TellNoMap(
-#if NeedFunctionPrototypes
WindowPtr /*pwin*/,
Colormap * /*pmid*/
-#endif
);
static void FindColorInRootCmap (
-#if NeedFunctionPrototypes
ColormapPtr /* pmap */,
EntryPtr /* pentFirst */,
int /* size */,
@@ -215,7 +184,6 @@ static void FindColorInRootCmap (
Pixel* /* pPixel */,
int /* channel */,
ColorCompareProcPtr /* comp */
-#endif
);
#define NUMRED(vis) ((vis->redMask >> vis->offsetRed) + 1)
@@ -635,7 +603,7 @@ CopyFree (channel, client, pmapSrc, pmapDst)
int channel, client;
ColormapPtr pmapSrc, pmapDst;
{
- int z, npix, oldFree;
+ int z, npix;
EntryPtr pentSrcFirst, pentDstFirst;
EntryPtr pentSrc, pentDst;
Pixel *ppix;
@@ -649,21 +617,18 @@ CopyFree (channel, client, pmapSrc, pmapDst)
npix = (pmapSrc->numPixelsRed)[client];
pentSrcFirst = pmapSrc->red;
pentDstFirst = pmapDst->red;
- oldFree = pmapSrc->freeRed;
break;
case GREENMAP:
ppix = (pmapSrc->clientPixelsGreen)[client];
npix = (pmapSrc->numPixelsGreen)[client];
pentSrcFirst = pmapSrc->green;
pentDstFirst = pmapDst->green;
- oldFree = pmapSrc->freeGreen;
break;
case BLUEMAP:
ppix = (pmapSrc->clientPixelsBlue)[client];
npix = (pmapSrc->numPixelsBlue)[client];
pentSrcFirst = pmapSrc->blue;
pentDstFirst = pmapDst->blue;
- oldFree = pmapSrc->freeBlue;
break;
}
nalloc = 0;
@@ -1146,12 +1111,7 @@ typedef struct _bignum {
((r)->lower = BIGNUMLOWER-1))
static void
-#if NeedFunctionPrototypes
BigNumAdd (BigNumPtr x, BigNumPtr y, BigNumPtr r)
-#else
-BigNumAdd (x, y, r)
- BigNumPtr x, y, r;
-#endif
{
BigNumLower lower, carry = 0;
diff --git a/dix/cursor.c b/dix/cursor.c
index 29a429f34..2ef9e5e24 100644
--- a/dix/cursor.c
+++ b/dix/cursor.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/dix/cursor.c,v 3.8 2003/01/12 02:44:26 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/cursor.c,v 3.9 2003/11/17 22:20:33 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -69,12 +69,7 @@ typedef struct _GlyphShare {
static GlyphSharePtr sharedGlyphs = (GlyphSharePtr)NULL;
static void
-#if NeedFunctionPrototypes
FreeCursorBits(CursorBitsPtr bits)
-#else
-FreeCursorBits(bits)
- CursorBitsPtr bits;
-#endif
{
if (--bits->refcnt > 0)
return;
diff --git a/dix/devices.c b/dix/devices.c
index 7028cd279..46af5eabc 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/dix/devices.c,v 3.20 2001/12/14 19:59:30 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/devices.c,v 3.21 2003/11/17 22:20:33 dawes Exp $ */
/************************************************************
Copyright 1987, 1998 The Open Group
@@ -197,12 +197,7 @@ InitAndStartDevices()
}
static void
-#if NeedFunctionPrototypes
CloseDevice(register DeviceIntPtr dev)
-#else
-CloseDevice(dev)
- register DeviceIntPtr dev;
-#endif
{
KbdFeedbackPtr k, knext;
PtrFeedbackPtr p, pnext;
@@ -501,12 +496,7 @@ SetKeySymsMap(dst, src)
}
static Bool
-#if NeedFunctionPrototypes
InitModMap(register KeyClassPtr keyc)
-#else
-InitModMap(keyc)
- register KeyClassPtr keyc;
-#endif
{
int i, j;
CARD8 keysPerModifier[8];
@@ -1712,17 +1702,10 @@ ProcQueryKeymap(client)
#ifdef AddInputDevice
#undef AddInputDevice
-#if NeedFunctionPrototypes
DevicePtr
AddInputDevice(
DeviceProc deviceProc,
Bool autoStart)
-#else
-DevicePtr
-AddInputDevice(deviceProc, autoStart)
- DeviceProc deviceProc;
- Bool autoStart;
-#endif
{
return (DevicePtr)_AddInputDevice(deviceProc, autoStart);
}
@@ -1731,14 +1714,8 @@ AddInputDevice(deviceProc, autoStart)
#ifdef RegisterPointerDevice
#undef RegisterPointerDevice
-#if NeedFunctionPrototypes
void
RegisterPointerDevice(DevicePtr device)
-#else
-void
-RegisterPointerDevice(device)
- DevicePtr device;
-#endif
{
_RegisterPointerDevice((DeviceIntPtr)device);
}
@@ -1747,14 +1724,8 @@ RegisterPointerDevice(device)
#ifdef RegisterKeyboardDevice
#undef RegisterKeyboardDevice
-#if NeedFunctionPrototypes
void
RegisterKeyboardDevice(DevicePtr device)
-#else
-void
-RegisterKeyboardDevice(device)
- DevicePtr device;
-#endif
{
_RegisterKeyboardDevice((DeviceIntPtr)device);
}
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 24b825e41..cd1ce6790 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -68,7 +68,7 @@ SOFTWARE.
* *
*****************************************************************/
-/* $XFree86: xc/programs/Xserver/dix/dispatch.c,v 3.29 2003/01/12 02:44:26 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/dispatch.c,v 3.33 2003/11/17 22:20:33 dawes Exp $ */
#ifdef PANORAMIX_DEBUG
#include <stdio.h>
@@ -136,15 +136,11 @@ HWEventQueuePtr checkForInput[2];
extern int connBlockScreenStart;
static void KillAllClients(
-#if NeedFunctionPrototypes
void
-#endif
);
static void DeleteClientFromAnySelections(
-#if NeedFunctionPrototypes
ClientPtr /*client*/
-#endif
);
static int nextFreeClientID; /* always MIN free client ID */
@@ -444,7 +440,7 @@ Dispatch(void)
client->requestLog[client->requestLogIndex] = MAJOROP;
client->requestLogIndex++;
#endif
- if (result > (MAX_BIG_REQUEST_SIZE << 2))
+ if (result > (maxBigRequestSize << 2))
result = BadLength;
else
result = (* client->requestVector[MAJOROP])(client);
@@ -1172,12 +1168,7 @@ ProcGrabServer(client)
}
static void
-#if NeedFunctionPrototypes
UngrabServer(ClientPtr client)
-#else
-UngrabServer(client)
- ClientPtr client;
-#endif
{
int i;
@@ -2226,7 +2217,7 @@ DoGetImage(client, format, drawable, x, y, width, height, planemask, im_return)
pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw);
if (pVisibleRegion)
{
- REGION_TRANSLATE(pScreen, pVisibleRegion, -pDraw->x, -pDraw->y);
+ REGION_TRANSLATE(pDraw->pScreen, pVisibleRegion, -pDraw->x, -pDraw->y);
}
}
#endif
@@ -2320,7 +2311,7 @@ DoGetImage(client, format, drawable, x, y, width, height, planemask, im_return)
}
#ifdef XCSECURITY
if (pVisibleRegion)
- REGION_DESTROY(pScreen, pVisibleRegion);
+ REGION_DESTROY(pDraw->pScreen, pVisibleRegion);
#endif
if (!im_return)
DEALLOCATE_LOCAL(pBuf);
@@ -3297,6 +3288,8 @@ ProcSetScreenSaver (client)
ScreenSaverInterval = stuff->interval * MILLI_PER_SECOND;
else
ScreenSaverInterval = defaultScreenSaverInterval;
+
+ SetScreenSaverTimer();
return (client->noClientException);
}
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 5386c908b..d971260c7 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/dix/dixfonts.c,v 3.27 2003/02/15 03:47:05 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/dixfonts.c,v 3.29 2003/11/17 22:20:34 dawes Exp $ */
/************************************************************************
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
@@ -193,23 +193,13 @@ FontWakeup(data, count, LastSelectMask)
/* XXX -- these two funcs may want to be broken into macros */
static void
-#if NeedFunctionPrototypes
UseFPE(FontPathElementPtr fpe)
-#else
-UseFPE(fpe)
- FontPathElementPtr fpe;
-#endif
{
fpe->refcount++;
}
static void
-#if NeedFunctionPrototypes
FreeFPE (FontPathElementPtr fpe)
-#else
-FreeFPE (fpe)
- FontPathElementPtr fpe;
-#endif
{
fpe->refcount--;
if (fpe->refcount == 0) {
@@ -220,13 +210,7 @@ FreeFPE (fpe)
}
static Bool
-#if NeedFunctionPrototypes
doOpenFont(ClientPtr client, OFclosurePtr c)
-#else
-doOpenFont(client, c)
- ClientPtr client;
- OFclosurePtr c;
-#endif
{
FontPtr pfont = NullFont;
FontPathElementPtr fpe = NULL;
@@ -576,13 +560,7 @@ QueryFont(pFont, pReply, nProtoCCIStructs)
}
static Bool
-#if NeedFunctionPrototypes
doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
-#else
-doListFontsAndAliases(client, c)
- ClientPtr client;
- LFclosurePtr c;
-#endif
{
FontPathElementPtr fpe;
int err = Successful;
@@ -998,7 +976,11 @@ doListFontsWithInfo(client, c)
c->saved = c->current;
c->haveSaved = TRUE;
c->savedNumFonts = numFonts;
- c->savedName = (char *) pFontInfo;
+ 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);
@@ -1105,6 +1087,7 @@ bail:
FreeFPE(c->fpe_list[i]);
xfree(c->reply);
xfree(c->fpe_list);
+ if (c->savedName) xfree(c->savedName);
xfree(c);
return TRUE;
}
@@ -1155,6 +1138,7 @@ StartListFontsWithInfo(client, length, pattern, max_names)
c->savedNumFonts = 0;
c->haveSaved = FALSE;
c->slept = FALSE;
+ c->savedName = 0;
doListFontsWithInfo(client, c);
return Success;
badAlloc:
@@ -1642,12 +1626,7 @@ ImageText(client, pDraw, pGC, nChars, data, xorg, yorg, reqType, did)
/* does the necessary magic to figure out the fpe type */
static int
-#if NeedFunctionPrototypes
DetermineFPEType(char *pathname)
-#else
-DetermineFPEType(pathname)
- char *pathname;
-#endif
{
int i;
@@ -1660,14 +1639,7 @@ DetermineFPEType(pathname)
static void
-#if NeedFunctionPrototypes
FreeFontPath(FontPathElementPtr *list, int n, Bool force)
-#else
-FreeFontPath(list, n, force)
- FontPathElementPtr *list;
- Bool force;
- int n;
-#endif
{
int i;
@@ -1694,15 +1666,7 @@ FreeFontPath(list, n, force)
}
static FontPathElementPtr
-#if NeedFunctionPrototypes
find_existing_fpe(FontPathElementPtr *list, int num, unsigned char *name, int len)
-#else
-find_existing_fpe(list, num, name, len)
- FontPathElementPtr *list;
- int num;
- unsigned char *name;
- int len;
-#endif
{
FontPathElementPtr fpe;
int i;
@@ -1717,15 +1681,7 @@ find_existing_fpe(list, num, name, len)
static int
-#if NeedFunctionPrototypes
SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist)
-#else
-SetFontPathElements(npaths, paths, bad, persist)
- int npaths;
- unsigned char *paths;
- int *bad;
- Bool persist;
-#endif
{
int i, err = 0;
int valid_paths = 0;
diff --git a/dix/dixutils.c b/dix/dixutils.c
index 7e9bfa4bf..38cfd4e0d 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/dix/dixutils.c,v 3.13 2003/01/12 02:44:26 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/dixutils.c,v 3.14 2003/11/17 22:20:34 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -604,22 +604,13 @@ ProcessWorkQueueZombies(void)
}
Bool
-#if NeedFunctionPrototypes
QueueWorkProc (
Bool (*function)(
-#if NeedNestedPrototypes
ClientPtr /* pClient */,
pointer /* closure */
-#endif
),
ClientPtr client,
pointer closure)
-#else
-QueueWorkProc (function, client, closure)
- Bool (*function)();
- ClientPtr client;
- pointer closure;
-#endif
{
WorkQueuePtr q;
@@ -736,17 +727,10 @@ static int numCallbackListsToCleanup = 0;
static CallbackListPtr **listsToCleanup = NULL;
static Bool
-#if NeedFunctionPrototypes
_AddCallback(
CallbackListPtr *pcbl,
CallbackProcPtr callback,
pointer data)
-#else
-_AddCallback(pcbl, callback, data)
- CallbackListPtr *pcbl;
- CallbackProcPtr callback;
- pointer data;
-#endif
{
CallbackPtr cbr;
@@ -762,17 +746,10 @@ _AddCallback(pcbl, callback, data)
}
static Bool
-#if NeedFunctionPrototypes
_DeleteCallback(
CallbackListPtr *pcbl,
CallbackProcPtr callback,
pointer data)
-#else
-_DeleteCallback(pcbl, callback, data)
- CallbackListPtr *pcbl;
- CallbackProcPtr callback;
- pointer data;
-#endif
{
CallbackListPtr cbl = *pcbl;
CallbackPtr cbr, pcbr;
@@ -805,15 +782,9 @@ _DeleteCallback(pcbl, callback, data)
}
static void
-#if NeedFunctionPrototypes
_CallCallbacks(
CallbackListPtr *pcbl,
pointer call_data)
-#else
-_CallCallbacks(pcbl, call_data)
- CallbackListPtr *pcbl;
- pointer call_data;
-#endif
{
CallbackListPtr cbl = *pcbl;
CallbackPtr cbr, pcbr;
@@ -868,13 +839,8 @@ _CallCallbacks(pcbl, call_data)
}
static void
-#if NeedFunctionPrototypes
_DeleteCallbackList(
CallbackListPtr *pcbl)
-#else
-_DeleteCallbackList(pcbl)
- CallbackListPtr *pcbl;
-#endif
{
CallbackListPtr cbl = *pcbl;
CallbackPtr cbr, nextcbr;
diff --git a/dix/events.c b/dix/events.c
index ce8e53f92..2131b5fd4 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/dix/events.c,v 3.46 2002/09/17 01:15:09 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/events.c,v 3.50 2003/11/17 22:20:34 dawes Exp $ */
/************************************************************
Copyright 1987, 1998 The Open Group
@@ -90,11 +90,7 @@ SOFTWARE.
#ifdef XKB
#include "XKBsrv.h"
-#if NeedFunctionPrototypes
extern Bool XkbFilterEvents(ClientPtr, int, xEvent *);
-#else
-extern Bool XkbFilterEvents();
-#endif
#endif
#ifdef XCSECURITY
@@ -204,18 +200,14 @@ static struct {
} sprite; /* info about the cursor sprite */
static void DoEnterLeaveEvents(
-#if NeedFunctionPrototypes
WindowPtr /*fromWin*/,
WindowPtr /*toWin*/,
int /*mode*/
-#endif
);
static WindowPtr XYToWindow(
-#if NeedFunctionPrototypes
int /*x*/,
int /*y*/
-#endif
);
extern int lastEvent;
@@ -613,12 +605,7 @@ SetCriticalEvent(event)
}
static void
-#if NeedFunctionPrototypes
SyntheticMotion(int x, int y)
-#else
-SyntheticMotion(x, y)
- int x, y;
-#endif
{
xEvent xE;
@@ -643,13 +630,7 @@ SyntheticMotion(x, y)
#ifdef SHAPE
static void
-#if NeedFunctionPrototypes
ConfineToShape(RegionPtr shape, int *px, int *py)
-#else
-ConfineToShape(shape, px, py)
- RegionPtr shape;
- int *px, *py;
-#endif
{
BoxRec box;
int x = *px, y = *py;
@@ -686,19 +667,11 @@ ConfineToShape(shape, px, py)
#endif
static void
-#if NeedFunctionPrototypes
CheckPhysLimits(
CursorPtr cursor,
Bool generateEvents,
Bool confineToScreen,
ScreenPtr pScreen)
-#else
-CheckPhysLimits(cursor, generateEvents, confineToScreen, pScreen)
- CursorPtr cursor;
- Bool generateEvents;
- Bool confineToScreen;
- ScreenPtr pScreen;
-#endif
{
HotSpot new;
@@ -739,15 +712,9 @@ CheckPhysLimits(cursor, generateEvents, confineToScreen, pScreen)
}
static void
-#if NeedFunctionPrototypes
CheckVirtualMotion(
register QdEventPtr qe,
register WindowPtr pWin)
-#else
-CheckVirtualMotion(qe, pWin)
- register QdEventPtr qe;
- register WindowPtr pWin;
-#endif
{
#ifdef PANORAMIX
if(!noPanoramiXExtension) {
@@ -831,12 +798,7 @@ PointerConfinedToScreen()
}
static void
-#if NeedFunctionPrototypes
ChangeToCursor(CursorPtr cursor)
-#else
-ChangeToCursor(cursor)
- CursorPtr cursor;
-#endif
{
#ifdef PANORAMIX
if(!noPanoramiXExtension) {
@@ -868,11 +830,7 @@ IsParent(a, b)
}
static void
-#if NeedFunctionPrototypes
PostNewCursor(void)
-#else
-PostNewCursor()
-#endif
{
register WindowPtr win;
register GrabPtr grab = inputInfo.pointer->grab;
@@ -942,12 +900,7 @@ XineramaGetCursorScreen()
#define TIMESLOP (5 * 60 * 1000) /* 5 minutes */
static void
-#if NeedFunctionPrototypes
MonthChangedOrBadTime(register xEvent *xE)
-#else
-MonthChangedOrBadTime(xE)
- register xEvent *xE;
-#endif
{
/* 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
@@ -988,6 +941,13 @@ EnqueueEvent(xE, device, count)
xEvent *qxE;
NoticeTime(xE);
+
+#ifdef XKB
+ /* Fix for key repeating bug. */
+ if (xE->u.u.type == KeyRelease)
+ AccessXCancelRepeatKey(device->key->xkbInfo, xE->u.u.detail);
+#endif
+
if (DeviceEventCallback)
{
DeviceEventInfoRec eventinfo;
@@ -1048,11 +1008,7 @@ EnqueueEvent(xE, device, count)
}
static void
-#if NeedFunctionPrototypes
PlayReleasedEvents(void)
-#else
-PlayReleasedEvents()
-#endif
{
register QdEventPtr *prev, qe;
register DeviceIntPtr dev;
@@ -1099,13 +1055,7 @@ PlayReleasedEvents()
}
static void
-#if NeedFunctionPrototypes
FreezeThaw(register DeviceIntPtr dev, Bool frozen)
-#else
-FreezeThaw(dev, frozen)
- register DeviceIntPtr dev;
- Bool frozen;
-#endif
{
dev->sync.frozen = frozen;
if (frozen)
@@ -1774,19 +1724,11 @@ MaybeDeliverEventsToClient(pWin, pEvents, count, filter, dontClient)
}
static void
-#if NeedFunctionPrototypes
FixUpEventFromWindow(
xEvent *xE,
WindowPtr pWin,
Window child,
Bool calcChild)
-#else
-FixUpEventFromWindow(xE, pWin, child, calcChild)
- xEvent *xE;
- WindowPtr pWin;
- Window child;
- Bool calcChild;
-#endif
{
if (calcChild)
{
@@ -1970,12 +1912,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
}
static WindowPtr
-#if NeedFunctionPrototypes
XYToWindow(int x, int y)
-#else
-XYToWindow(x, y)
- int x, y;
-#endif
{
register WindowPtr pWin;
@@ -2017,12 +1954,7 @@ XYToWindow(x, y)
}
static Bool
-#if NeedFunctionPrototypes
CheckMotion(xEvent *xE)
-#else
-CheckMotion(xE)
- xEvent *xE;
-#endif
{
WindowPtr prevSpriteWin = sprite.win;
@@ -2123,10 +2055,13 @@ DefineInitialRootWindow(win)
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_INIT(pScreen, &sprite.Reg1, NullBox, 1);
- REGION_INIT(pScreen, &sprite.Reg2, NullBox, 1);
+ REGION_NULL(pScreen, &sprite.Reg1);
+ REGION_NULL(pScreen, &sprite.Reg2);
}
#endif
}
@@ -2404,19 +2339,11 @@ BorderSizeNotEmpty(WindowPtr pWin)
passive grab set on the window to be activated. */
static Bool
-#if NeedFunctionPrototypes
CheckPassiveGrabsOnWindow(
WindowPtr pWin,
register DeviceIntPtr device,
register xEvent *xE,
int count)
-#else
-CheckPassiveGrabsOnWindow(pWin, device, xE, count)
- WindowPtr pWin;
- register DeviceIntPtr device;
- register xEvent *xE;
- int count;
-#endif
{
register GrabPtr grab = wPassiveGrabs(pWin);
GrabRec tempGrab;
@@ -3150,14 +3077,9 @@ EventSuppressForWindow(pWin, client, mask, checkOptional)
}
static WindowPtr
-#if NeedFunctionPrototypes
CommonAncestor(
register WindowPtr a,
register WindowPtr b)
-#else
-CommonAncestor(a, b)
- register WindowPtr a, b;
-#endif
{
for (b = b->parent; b; b = b->parent)
if (IsParent(b, a)) return b;
@@ -3165,19 +3087,12 @@ CommonAncestor(a, b)
}
static void
-#if NeedFunctionPrototypes
EnterLeaveEvent(
int type,
int mode,
int detail,
register WindowPtr pWin,
Window child)
-#else
-EnterLeaveEvent(type, mode, detail, pWin, child)
- int type, mode, detail;
- register WindowPtr pWin;
- Window child;
-#endif
{
xEvent event;
register DeviceIntPtr keybd = inputInfo.keyboard;
@@ -3258,13 +3173,7 @@ EnterLeaveEvent(type, mode, detail, pWin, child)
}
static void
-#if NeedFunctionPrototypes
EnterNotifies(WindowPtr ancestor, WindowPtr child, int mode, int detail)
-#else
-EnterNotifies(ancestor, child, mode, detail)
- WindowPtr ancestor, child;
- int mode, detail;
-#endif
{
WindowPtr parent = child->parent;
@@ -3275,13 +3184,7 @@ EnterNotifies(ancestor, child, mode, detail)
}
static void
-#if NeedFunctionPrototypes
LeaveNotifies(WindowPtr child, WindowPtr ancestor, int mode, int detail)
-#else
-LeaveNotifies(child, ancestor, mode, detail)
- WindowPtr child, ancestor;
- int detail, mode;
-#endif
{
register WindowPtr pWin;
@@ -3295,13 +3198,7 @@ LeaveNotifies(child, ancestor, mode, detail)
}
static void
-#if NeedFunctionPrototypes
DoEnterLeaveEvents(WindowPtr fromWin, WindowPtr toWin, int mode)
-#else
-DoEnterLeaveEvents(fromWin, toWin, mode)
- WindowPtr fromWin, toWin;
- int mode;
-#endif
{
if (fromWin == toWin)
return;
@@ -3329,14 +3226,7 @@ DoEnterLeaveEvents(fromWin, toWin, mode)
}
static void
-#if NeedFunctionPrototypes
FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, register WindowPtr pWin)
-#else
-FocusEvent(dev, type, mode, detail, pWin)
- DeviceIntPtr dev;
- int type, mode, detail;
- register WindowPtr pWin;
-#endif
{
xEvent event;
@@ -3377,19 +3267,11 @@ FocusEvent(dev, type, mode, detail, pWin)
* no-op if child not descended from ancestor
*/
static Bool
-#if NeedFunctionPrototypes
FocusInEvents(
DeviceIntPtr dev,
WindowPtr ancestor, WindowPtr child, WindowPtr skipChild,
int mode, int detail,
Bool doAncestor)
-#else
-FocusInEvents(dev, ancestor, child, skipChild, mode, detail, doAncestor)
- DeviceIntPtr dev;
- WindowPtr ancestor, child, skipChild;
- int mode, detail;
- Bool doAncestor;
-#endif
{
if (child == NullWindow)
return ancestor == NullWindow;
@@ -3411,20 +3293,11 @@ FocusInEvents(dev, ancestor, child, skipChild, mode, detail, doAncestor)
/* dies horribly if ancestor is not an ancestor of child */
static void
-#if NeedFunctionPrototypes
FocusOutEvents(
DeviceIntPtr dev,
WindowPtr child, WindowPtr ancestor,
int mode, int detail,
Bool doAncestor)
-#else
-FocusOutEvents(dev, child, ancestor, mode, detail, doAncestor)
- DeviceIntPtr dev;
- WindowPtr child, ancestor;
- int mode;
- int detail;
- Bool doAncestor;
-#endif
{
register WindowPtr pWin;
@@ -3564,7 +3437,6 @@ DoFocusEvents(dev, fromWin, toWin, mode)
}
int
-#if NeedFunctionPrototypes
SetInputFocus(
ClientPtr client,
DeviceIntPtr dev,
@@ -3572,15 +3444,6 @@ SetInputFocus(
CARD8 revertTo,
Time ctime,
Bool followOK)
-#else
-SetInputFocus(client, dev, focusID, revertTo, ctime, followOK)
- ClientPtr client;
- DeviceIntPtr dev;
- Window focusID;
- CARD8 revertTo;
- Time ctime;
- Bool followOK;
-#endif
{
register FocusClassPtr focus;
register WindowPtr focusWin;
diff --git a/dix/gc.c b/dix/gc.c
index 6ab685d6c..11f215c8d 100644
--- a/dix/gc.c
+++ b/dix/gc.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/dix/gc.c,v 3.9 2001/12/14 19:59:32 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/gc.c,v 3.10 2003/11/17 22:20:34 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -66,9 +66,7 @@ extern XID clientErrorValue;
extern FontPtr defaultFont;
static Bool CreateDefaultTile(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/
-#endif
);
unsigned char DefaultDash[2] = {4, 4};
@@ -585,12 +583,7 @@ BUG:
*/
static GCPtr
-#if NeedFunctionPrototypes
AllocateGC(ScreenPtr pScreen)
-#else
-AllocateGC(pScreen)
- ScreenPtr pScreen;
-#endif
{
GCPtr pGC;
register char *ptr;
diff --git a/dix/globals.c b/dix/globals.c
index 3051ebbbb..1ec71aac1 100644
--- a/dix/globals.c
+++ b/dix/globals.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/dix/globals.c,v 1.10 2002/10/08 23:55:18 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/globals.c,v 1.12 2003/11/10 18:21:46 tsi Exp $ */
/************************************************************
Copyright 1987, 1998 The Open Group
@@ -79,6 +79,7 @@ PtrCtrl defaultPointerControl = {
ClientPtr *clients;
ClientPtr serverClient;
int currentMaxClients; /* current size of clients array */
+long maxBigRequestSize = MAX_BIG_REQUEST_SIZE;
WindowPtr *WindowTable;
@@ -146,3 +147,5 @@ int argcGlobal;
char **argvGlobal;
DDXPointRec dixScreenOrigins[MAXSCREENS];
+
+volatile ScreenPtr currentRegionScreen;
diff --git a/dix/grabs.c b/dix/grabs.c
index bebbd3bec..7a9fbcdb5 100644
--- a/dix/grabs.c
+++ b/dix/grabs.c
@@ -46,7 +46,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/dix/grabs.c,v 3.4 2002/02/19 11:09:22 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/grabs.c,v 3.5 2003/11/17 22:20:34 dawes Exp $ */
#include "X.h"
#include "misc.h"
@@ -65,7 +65,6 @@ SOFTWARE.
#define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i))
GrabPtr
-#if NeedFunctionPrototypes
CreateGrab(
int client,
DeviceIntPtr device,
@@ -78,21 +77,6 @@ CreateGrab(
KeyCode keybut, /* key or button */
WindowPtr confineTo,
CursorPtr cursor)
-#else
-CreateGrab(client, device, window, eventMask, ownerEvents, keyboardMode,
- pointerMode, modDevice, modifiers, type, keybut, confineTo, cursor)
- int client;
- DeviceIntPtr device;
- WindowPtr window;
- Mask eventMask;
- Bool ownerEvents, keyboardMode, pointerMode;
- DeviceIntPtr modDevice;
- unsigned short modifiers;
- int type;
- KeyCode keybut; /* key or button */
- WindowPtr confineTo;
- CursorPtr cursor;
-#endif
{
GrabPtr grab;
@@ -125,12 +109,7 @@ CreateGrab(client, device, window, eventMask, ownerEvents, keyboardMode,
}
static void
-#if NeedFunctionPrototypes
FreeGrab(GrabPtr pGrab)
-#else
-FreeGrab(pGrab)
- GrabPtr pGrab;
-#endif
{
if (pGrab->modifiersDetail.pMask != NULL)
xfree(pGrab->modifiersDetail.pMask);
@@ -173,13 +152,7 @@ DeletePassiveGrab(value, id)
}
static Mask *
-#if NeedFunctionPrototypes
DeleteDetailFromMask(Mask *pDetailMask, unsigned short detail)
-#else
-DeleteDetailFromMask(pDetailMask, detail)
- Mask *pDetailMask;
- unsigned short detail;
-#endif
{
register Mask *mask;
register int i;
@@ -199,16 +172,10 @@ DeleteDetailFromMask(pDetailMask, detail)
}
static Bool
-#if NeedFunctionPrototypes
IsInGrabMask(
DetailRec firstDetail,
DetailRec secondDetail,
unsigned short exception)
-#else
-IsInGrabMask(firstDetail, secondDetail, exception)
- DetailRec firstDetail, secondDetail;
- unsigned short exception;
-#endif
{
if (firstDetail.exact == exception)
{
@@ -227,15 +194,10 @@ IsInGrabMask(firstDetail, secondDetail, exception)
}
static Bool
-#if NeedFunctionPrototypes
IdenticalExactDetails(
unsigned short firstExact,
unsigned short secondExact,
unsigned short exception)
-#else
-IdenticalExactDetails(firstExact, secondExact, exception)
- unsigned short firstExact, secondExact, exception;
-#endif
{
if ((firstExact == exception) || (secondExact == exception))
return FALSE;
@@ -247,16 +209,10 @@ IdenticalExactDetails(firstExact, secondExact, exception)
}
static Bool
-#if NeedFunctionPrototypes
DetailSupersedesSecond(
DetailRec firstDetail,
DetailRec secondDetail,
unsigned short exception)
-#else
-DetailSupersedesSecond(firstDetail, secondDetail, exception)
- DetailRec firstDetail, secondDetail;
- unsigned short exception;
-#endif
{
if (IsInGrabMask(firstDetail, secondDetail, exception))
return TRUE;
@@ -269,12 +225,7 @@ DetailSupersedesSecond(firstDetail, secondDetail, exception)
}
static Bool
-#if NeedFunctionPrototypes
GrabSupersedesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab)
-#else
-GrabSupersedesSecond(pFirstGrab, pSecondGrab)
- GrabPtr pFirstGrab, pSecondGrab;
-#endif
{
if (!DetailSupersedesSecond(pFirstGrab->modifiersDetail,
pSecondGrab->modifiersDetail,
diff --git a/dix/main.c b/dix/main.c
index a31f33d8a..37add2a62 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/dix/main.c,v 3.40 2003/02/17 16:55:31 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/main.c,v 3.44 2003/11/17 22:20:34 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -106,15 +106,11 @@ SOFTWARE.
#endif
extern int InitClientPrivates(
-#if NeedFunctionPrototypes
ClientPtr /*client*/
-#endif
);
extern void Dispatch(
-#if NeedFunctionPrototypes
void
-#endif
);
char *ConnectionInfo;
@@ -151,11 +147,9 @@ NotImplemented(xEvent *from, xEvent *to)
/*ARGSUSED*/
void
ReplyNotSwappd(
-#if NeedNestedPrototypes
ClientPtr pClient ,
int size ,
void * pbuf
-#endif
)
{
FatalError("Not implemented");
@@ -319,8 +313,8 @@ main(int argc, char *argv[], char *envp[])
}
else
ResetWellKnownSockets ();
- clients[0] = serverClient;
- currentMaxClients = 1;
+ clients[0] = serverClient;
+ currentMaxClients = 1;
if (!InitClientResources(serverClient)) /* for root resources */
FatalError("couldn't init server resources");
@@ -418,8 +412,11 @@ main(int argc, char *argv[], char *envp[])
for (i = 0; i < screenInfo.numScreens; i++)
InitRootWindow(WindowTable[i]);
- DefineInitialRootWindow(WindowTable[0]);
+ DefineInitialRootWindow(WindowTable[0]);
SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverReset);
+#ifdef DPMSExtension
+ SetDPMSTimers();
+#endif
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
@@ -437,6 +434,7 @@ main(int argc, char *argv[], char *envp[])
/* Now free up whatever must be freed */
if (screenIsSaved == SCREEN_SAVER_ON)
SaveScreens(SCREEN_SAVER_OFF, ScreenSaverReset);
+ FreeScreenSaverTimer();
CloseDownExtensions();
#ifdef PANORAMIX
@@ -463,7 +461,12 @@ main(int argc, char *argv[], char *envp[])
CloseDownEvents();
xfree(WindowTable);
WindowTable = NULL;
- FreeFonts ();
+ FreeFonts();
+
+#ifdef DPMSExtension
+ FreeDPMSTimers();
+#endif
+ FreeAuditTimer();
xfree(serverClient->devPrivates);
serverClient->devPrivates = NULL;
@@ -471,7 +474,12 @@ main(int argc, char *argv[], char *envp[])
if (dispatchException & DE_TERMINATE)
{
CloseWellKnownConnections();
- OsCleanup();
+ }
+
+ OsCleanup((dispatchException & DE_TERMINATE) != 0);
+
+ if (dispatchException & DE_TERMINATE)
+ {
ddxGiveUp();
break;
}
@@ -540,7 +548,7 @@ CreateConnectionBlock()
i = padlength[setup.nbytesVendor & 3];
sizesofar += i;
while (--i >= 0)
- *pBuf++ = 0;
+ *pBuf++ = 0;
for (i=0; i<screenInfo.numPixmapFormats; i++)
{
@@ -634,24 +642,15 @@ with its screen number, a pointer to its ScreenRec, argc, and argv.
*/
int
-#if NeedFunctionPrototypes
AddScreen(
Bool (* pfnInit)(
-#if NeedNestedPrototypes
int /*index*/,
ScreenPtr /*pScreen*/,
int /*argc*/,
char ** /*argv*/
-#endif
),
int argc,
char **argv)
-#else
-AddScreen(pfnInit, argc, argv)
- Bool (* pfnInit)();
- int argc;
- char **argv;
-#endif
{
int i;
diff --git a/dix/property.c b/dix/property.c
index ba12faffe..1af6156b5 100644
--- a/dix/property.c
+++ b/dix/property.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/dix/property.c,v 3.12 2002/02/19 11:09:22 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/property.c,v 3.13 2003/07/16 01:38:37 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -66,11 +66,13 @@ SOFTWARE.
#endif
#if defined(LBX) || defined(LBX_COMPAT)
+#if 0 /* no header in X11 environment, not used in X11 environment */
int fWriteToClient(ClientPtr client, int len, char *buf)
{
return WriteToClient(client, len, buf);
}
#endif
+#endif
/*****************************************************************
* Property Stuff
@@ -467,11 +469,11 @@ DeleteAllWindowProperties(pWin)
}
static int
-NullPropertyReply(client, propertyType, format, reply)
- ClientPtr client;
- ATOM propertyType;
- int format;
- xGetPropertyReply *reply;
+NullPropertyReply(
+ ClientPtr client,
+ ATOM propertyType,
+ int format,
+ xGetPropertyReply *reply)
{
reply->nItems = 0;
reply->length = 0;
diff --git a/dix/resource.c b/dix/resource.c
index d17586a77..d885c03ef 100644
--- a/dix/resource.c
+++ b/dix/resource.c
@@ -72,7 +72,7 @@ SOFTWARE.
* 1, and an otherwise arbitrary ID in the low 22 bits, we can create a
* resource "owned" by the client.
*/
-/* $XFree86: xc/programs/Xserver/dix/resource.c,v 3.12 2002/03/06 21:13:38 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/resource.c,v 3.14 2003/11/17 22:20:34 dawes Exp $ */
#define NEED_EVENTS
#include "X.h"
@@ -95,9 +95,7 @@ SOFTWARE.
#include <assert.h>
static void RebuildTable(
-#if NeedFunctionPrototypes
int /*client*/
-#endif
);
#define SERVER_MINID 32
@@ -253,13 +251,7 @@ InitClientResources(client)
static int
-#if NeedFunctionPrototypes
Hash(int client, register XID id)
-#else
-Hash(client, id)
- int client;
- register XID id;
-#endif
{
id &= RESOURCE_ID_MASK;
switch (clientTable[client].hashsize)
@@ -281,17 +273,11 @@ Hash(client, id)
}
static XID
-#if NeedFunctionPrototypes
AvailableID(
register int client,
register XID id,
register XID maxid,
register XID goodid)
-#else
-AvailableID(client, id, maxid, goodid)
- register int client;
- register XID id, maxid, goodid;
-#endif
{
register ResourcePtr res;
@@ -427,8 +413,8 @@ AddResource(id, type, value)
rrec = &clientTable[client];
if (!rrec->buckets)
{
- ErrorF("AddResource(%x, %x, %x), client=%d \n",
- id, type, (unsigned long)value, client);
+ 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) &&
@@ -546,7 +532,8 @@ FreeResource(id, skipDeleteFuncType)
}
}
if (!gotOne)
- FatalError("Freeing resource id=%X which isn't there", id);
+ FatalError("Freeing resource id=%lX which isn't there",
+ (unsigned long)id);
}
diff --git a/dix/swaprep.c b/dix/swaprep.c
index e16f7c53f..494471730 100644
--- a/dix/swaprep.c
+++ b/dix/swaprep.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/dix/swaprep.c,v 3.7 2001/12/14 19:59:33 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/swaprep.c,v 3.8 2003/11/17 22:20:35 dawes Exp $ */
/************************************************************
Copyright 1987, 1998 The Open Group
@@ -60,23 +60,17 @@ SOFTWARE.
#include "globals.h"
static void SwapFontInfo(
-#if NeedFunctionPrototypes
xQueryFontReply * /* pr */
-#endif
);
#ifndef LBX
static void SwapCharInfo(
-#if NeedFunctionPrototypes
xCharInfo * /* pInfo */
-#endif
);
static void SwapFont(
-#if NeedFunctionPrototypes
xQueryFontReply * /* pr */,
Bool /* hasGlyphs */
-#endif
);
#endif
diff --git a/dix/tables.c b/dix/tables.c
index 7f42c005d..a76bc7535 100644
--- a/dix/tables.c
+++ b/dix/tables.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/dix/tables.c,v 3.5 2002/02/19 11:09:22 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/tables.c,v 3.6 2003/11/17 22:20:35 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -65,9 +65,7 @@ extern int
#endif
int (* InitialVector[3]) (
-#if NeedNestedPrototypes
ClientPtr /* client */
-#endif
) =
{
0,
@@ -76,9 +74,7 @@ int (* InitialVector[3]) (
};
int (* ProcVector[256]) (
-#if NeedNestedPrototypes
ClientPtr /* client */
-#endif
) =
{
ProcBadRequest,
@@ -212,9 +208,7 @@ int (* ProcVector[256]) (
};
int (* SwappedProcVector[256]) (
-#if NeedNestedPrototypes
ClientPtr /* client */
-#endif
) =
{
ProcBadRequest,
diff --git a/dix/window.c b/dix/window.c
index 30c0df032..0ed9cb083 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -70,7 +70,7 @@ SOFTWARE.
* *
*****************************************************************/
-/* $XFree86: xc/programs/Xserver/dix/window.c,v 3.32 2003/01/12 02:44:26 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/dix/window.c,v 3.37 2003/11/17 22:20:35 dawes Exp $ */
#include "misc.h"
#include "scrnintstr.h"
@@ -100,13 +100,6 @@ SOFTWARE.
#include "security.h"
#endif
-#if defined(NEED_SCREEN_REGIONS)
-#define REGION_PTR(pScreen,pWin) \
- register ScreenPtr pScreen = pWin->drawable.pScreen;
-#else
-#define REGION_PTR(pScreen,pWin) /* nothing */
-#endif
-
/******
* Window stuff for server
*
@@ -132,10 +125,8 @@ extern void RecalculateDeliverableEvents();
#endif
static Bool TileScreenSaver(
-#if NeedFunctionPrototypes
int /*i*/,
int /*kind*/
-#endif
);
@@ -260,12 +251,7 @@ Bool enableBackingStore = FALSE;
Bool disableSaveUnders = FALSE;
static void
-#if NeedFunctionPrototypes
SetWindowToDefaults(register WindowPtr pWin)
-#else
-SetWindowToDefaults(pWin)
- register WindowPtr pWin;
-#endif
{
pWin->prevSib = NullWindow;
pWin->firstChild = NullWindow;
@@ -300,12 +286,7 @@ SetWindowToDefaults(pWin)
}
static void
-#if NeedFunctionPrototypes
MakeRootTile(WindowPtr pWin)
-#else
-MakeRootTile(pWin)
- WindowPtr pWin;
-#endif
{
ScreenPtr pScreen = pWin->drawable.pScreen;
GCPtr pGC;
@@ -500,9 +481,8 @@ void
InitRootWindow(pWin)
WindowPtr pWin;
{
- ScreenPtr pScreen;
+ ScreenPtr pScreen = pWin->drawable.pScreen;
- pScreen = pWin->drawable.pScreen;
if (!(*pScreen->CreateWindow)(pWin))
return; /* XXX */
(*pScreen->PositionWindow)(pWin, 0, 0);
@@ -532,7 +512,7 @@ ClippedRegionFromBox(pWin, Rgn, x, y, w, h)
register int x, y;
int w, h;
{
- REGION_PTR(pScreen, pWin)
+ ScreenPtr pScreen = pWin->drawable.pScreen;
BoxRec box;
box = *(REGION_EXTENTS(pScreen, &pWin->winSize));
@@ -744,10 +724,10 @@ CreateWindow(wid, pParent, x, y, w, h, bw, class, vmask, vlist,
pWin->drawable.y = pParent->drawable.y + y + (int)bw;
/* set up clip list correctly for unobscured WindowPtr */
- REGION_INIT(pScreen, &pWin->clipList, NullBox, 1);
- REGION_INIT(pScreen, &pWin->borderClip, NullBox, 1);
- REGION_INIT(pScreen, &pWin->winSize, NullBox, 1);
- REGION_INIT(pScreen, &pWin->borderSize, NullBox, 1);
+ REGION_NULL(pScreen, &pWin->clipList);
+ REGION_NULL(pScreen, &pWin->borderClip);
+ REGION_NULL(pScreen, &pWin->winSize);
+ REGION_NULL(pScreen, &pWin->borderSize);
pHead = RealChildHead(pParent);
if (pHead)
@@ -820,12 +800,7 @@ CreateWindow(wid, pParent, x, y, w, h, bw, class, vmask, vlist,
}
static void
-#if NeedFunctionPrototypes
FreeWindowResources(register WindowPtr pWin)
-#else
-FreeWindowResources(pWin)
- register WindowPtr pWin;
-#endif
{
register ScreenPtr pScreen = pWin->drawable.pScreen;
@@ -854,12 +829,7 @@ FreeWindowResources(pWin)
}
static void
-#if NeedFunctionPrototypes
CrushTree(WindowPtr pWin)
-#else
-CrushTree(pWin)
- WindowPtr pWin;
-#endif
{
register WindowPtr pChild, pSib, pParent;
UnrealizeWindowProcPtr UnrealizeWindow;
@@ -1513,7 +1483,7 @@ PatchUp:
{
RegionRec exposed;
- REGION_INIT(pScreen, &exposed, NullBox, 0);
+ REGION_NULL(pScreen, &exposed);
REGION_SUBTRACT(pScreen, &exposed, &pWin->borderClip, &pWin->winSize);
(*pWin->drawable.pScreen->PaintWindowBorder)(pWin, &exposed, PW_BORDER);
REGION_UNINIT(pScreen, &exposed);
@@ -1637,6 +1607,17 @@ MoveWindowInStack(pWin, pNextSib)
(*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 );
}
@@ -1654,7 +1635,7 @@ CreateUnclippedWinSize (pWin)
pRgn = REGION_CREATE(pWin->drawable.pScreen, &box, 1);
#ifdef SHAPE
if (wBoundingShape (pWin) || wClipShape (pWin)) {
- REGION_PTR(pScreen, pWin)
+ ScreenPtr pScreen = pWin->drawable.pScreen;
REGION_TRANSLATE(pScreen, pRgn, - pWin->drawable.x,
- pWin->drawable.y);
@@ -1678,7 +1659,7 @@ SetWinSize (pWin)
(int)pWin->drawable.height);
#ifdef SHAPE
if (wBoundingShape (pWin) || wClipShape (pWin)) {
- REGION_PTR(pScreen, pWin)
+ ScreenPtr pScreen = pWin->drawable.pScreen;
REGION_TRANSLATE(pScreen, &pWin->winSize, - pWin->drawable.x,
- pWin->drawable.y);
@@ -1708,7 +1689,7 @@ SetBorderSize (pWin)
(int)(pWin->drawable.height + (bw<<1)));
#ifdef SHAPE
if (wBoundingShape (pWin)) {
- REGION_PTR(pScreen, pWin)
+ ScreenPtr pScreen = pWin->drawable.pScreen;
REGION_TRANSLATE(pScreen, &pWin->borderSize, - pWin->drawable.x,
- pWin->drawable.y);
@@ -1876,14 +1857,9 @@ ResizeChildrenWinSize(pWin, dx, dy, dw, dh)
*/
static int
-#if NeedFunctionPrototypes
IsSiblingAboveMe(
register WindowPtr pMe,
register WindowPtr pSib)
-#else
-IsSiblingAboveMe(pMe, pSib)
- register WindowPtr pMe, pSib;
-#endif
{
register WindowPtr pWin;
@@ -1900,15 +1876,9 @@ IsSiblingAboveMe(pMe, pSib)
}
static BoxPtr
-#if NeedFunctionPrototypes
WindowExtents(
register WindowPtr pWin,
register BoxPtr pBox)
-#else
-WindowExtents(pWin, pBox)
- register WindowPtr pWin;
- register BoxPtr pBox;
-#endif
{
pBox->x1 = pWin->drawable.x - wBorderWidth (pWin);
pBox->y1 = pWin->drawable.y - wBorderWidth (pWin);
@@ -1923,18 +1893,12 @@ WindowExtents(pWin, pBox)
#define IS_SHAPED(pWin) (wBoundingShape (pWin) != (RegionPtr) NULL)
static RegionPtr
-#if NeedFunctionPrototypes
MakeBoundingRegion (
register WindowPtr pWin,
BoxPtr pBox)
-#else
-MakeBoundingRegion (pWin, pBox)
- register WindowPtr pWin;
- BoxPtr pBox;
-#endif
{
RegionPtr pRgn;
- REGION_PTR(pScreen, pWin)
+ ScreenPtr pScreen = pWin->drawable.pScreen;
pRgn = REGION_CREATE(pScreen, pBox, 1);
if (wBoundingShape (pWin)) {
@@ -1948,17 +1912,11 @@ MakeBoundingRegion (pWin, pBox)
}
static Bool
-#if NeedFunctionPrototypes
ShapeOverlap (
WindowPtr pWin,
BoxPtr pWinBox,
WindowPtr pSib,
BoxPtr pSibBox)
-#else
-ShapeOverlap (pWin, pWinBox, pSib, pSibBox)
- WindowPtr pWin, pSib;
- BoxPtr pWinBox, pSibBox;
-#endif
{
RegionPtr pWinRgn, pSibRgn;
register ScreenPtr pScreen;
@@ -1978,16 +1936,10 @@ ShapeOverlap (pWin, pWinBox, pSib, pSibBox)
#endif
static Bool
-#if NeedFunctionPrototypes
AnyWindowOverlapsMe(
WindowPtr pWin,
WindowPtr pHead,
register BoxPtr box)
-#else
-AnyWindowOverlapsMe(pWin, pHead, box)
- WindowPtr pWin, pHead;
- register BoxPtr box;
-#endif
{
register WindowPtr pSib;
BoxRec sboxrec;
@@ -2010,15 +1962,9 @@ AnyWindowOverlapsMe(pWin, pHead, box)
}
static Bool
-#if NeedFunctionPrototypes
IOverlapAnyWindow(
WindowPtr pWin,
register BoxPtr box)
-#else
-IOverlapAnyWindow(pWin, box)
- WindowPtr pWin;
- register BoxPtr box;
-#endif
{
register WindowPtr pSib;
BoxRec sboxrec;
@@ -2069,7 +2015,6 @@ IOverlapAnyWindow(pWin, box)
*/
static WindowPtr
-#if NeedFunctionPrototypes
WhereDoIGoInTheStack(
register WindowPtr pWin,
register WindowPtr pSib,
@@ -2078,13 +2023,6 @@ WhereDoIGoInTheStack(
unsigned short w,
unsigned short h,
int smode)
-#else
-WhereDoIGoInTheStack(pWin, pSib, x, y, w, h, smode)
- register WindowPtr pWin, pSib;
- short x, y;
- unsigned short w, h;
- int smode;
-#endif
{
BoxRec box;
register ScreenPtr pScreen;
@@ -2183,21 +2121,14 @@ WhereDoIGoInTheStack(pWin, pSib, x, y, w, h, smode)
}
static void
-#if NeedFunctionPrototypes
ReflectStackChange(
register WindowPtr pWin,
register WindowPtr pSib,
VTKind kind)
-#else
-ReflectStackChange(pWin, pSib, kind)
- register WindowPtr pWin, pSib;
- VTKind kind;
-#endif
{
/* Note that pSib might be NULL */
Bool WasViewable = (Bool)pWin->viewable;
- WindowPtr pParent;
Bool anyMarked;
WindowPtr pFirstChange;
#ifdef DO_SAVE_UNDERS
@@ -2207,8 +2138,8 @@ ReflectStackChange(pWin, pSib, kind)
ScreenPtr pScreen = pWin->drawable.pScreen;
/* if this is a root window, can't be restacked */
- if (!(pParent = pWin->parent))
- return ;
+ if (!pWin->parent)
+ return;
pFirstChange = MoveWindowInStack(pWin, pSib);
@@ -2456,7 +2387,10 @@ ConfigureWindow(pWin, mask, vlist, client)
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);
@@ -2588,15 +2522,9 @@ CirculateWindow(pParent, direction, client)
}
static int
-#if NeedFunctionPrototypes
CompareWIDs(
WindowPtr pWin,
pointer value) /* must conform to VisitWindowProcPtr */
-#else
-CompareWIDs(pWin, value)
- WindowPtr pWin;
- pointer value; /* must conform to VisitWindowProcPtr */
-#endif
{
Window *wid = (Window *)value;
@@ -2705,12 +2633,7 @@ ReparentWindow(pWin, pParent, x, y, client)
}
static void
-#if NeedFunctionPrototypes
RealizeTree(WindowPtr pWin)
-#else
-RealizeTree(pWin)
- WindowPtr pWin;
-#endif
{
register WindowPtr pChild;
RealizeWindowProcPtr Realize;
@@ -2862,7 +2785,7 @@ MapWindow(pWin, client)
(*pScreen->ClipNotify) (pWin, 0, 0);
if (pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(NullWindow, pWin, VTMap);
- REGION_INIT(pScreen, &temp, NullBox, 0);
+ REGION_NULL(pScreen, &temp);
REGION_COPY(pScreen, &temp, &pWin->clipList);
(*pScreen->WindowExposures) (pWin, &temp, NullRegion);
REGION_UNINIT(pScreen, &temp);
@@ -2997,15 +2920,9 @@ MapSubwindows(pParent, client)
}
static void
-#if NeedFunctionPrototypes
UnrealizeTree(
WindowPtr pWin,
Bool fromConfigure)
-#else
-UnrealizeTree(pWin, fromConfigure)
- WindowPtr pWin;
- Bool fromConfigure;
-#endif
{
register WindowPtr pChild;
UnrealizeWindowProcPtr Unrealize;
@@ -3370,9 +3287,7 @@ SendVisibilityNotify(pWin)
#ifndef NOLOGOHACK
static void DrawLogo(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/
-#endif
);
#endif
@@ -3487,16 +3402,12 @@ SaveScreens(on, mode)
}
}
screenIsSaved = what;
+ if (mode == ScreenSaverReset)
+ SetScreenSaverTimer();
}
static Bool
-#if NeedFunctionPrototypes
TileScreenSaver(int i, int kind)
-#else
-TileScreenSaver(i, kind)
- int i;
- int kind;
-#endif
{
int j;
int result;
@@ -3764,12 +3675,7 @@ DisposeWindowOptional (pWin)
#ifndef NOLOGOHACK
static void
-#if NeedFunctionPrototypes
DrawLogo(WindowPtr pWin)
-#else
-DrawLogo(pWin)
- WindowPtr pWin;
-#endif
{
DrawablePtr pDraw;
ScreenPtr pScreen;
diff --git a/doc/Xserver.man.pre b/doc/Xserver.man.pre
index d57fde80e..972280ba0 100644
--- a/doc/Xserver.man.pre
+++ b/doc/Xserver.man.pre
@@ -22,7 +22,9 @@
.\" not be 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.21 2002/11/19 23:18:09 dawes Exp $
+.\" $XFree86: xc/programs/Xserver/Xserver.man,v 3.29 2003/09/08 14:25:26 eich Exp $
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
.TH XSERVER 1 __xorgversion__
.SH NAME
Xserver \- X Window System display server
@@ -60,7 +62,10 @@ 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 following command line options:
+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.
@@ -118,7 +123,7 @@ Not obeyed by all servers.
.TP 8
.B \-co \fIfilename\fP
sets name of RGB color database. The default is
-\fI__projectroot__/lib/X11/rgb\fP.
+.IR __projectroot__/lib/X11/rgb .
.ig
.TP 8
.B \-config \fIfilename\fP
@@ -135,8 +140,9 @@ different from the user's real uid.
causes the server to generate a core dump on fatal errors.
.TP 8
.B \-dpi \fIresolution\fP
-sets the resolution of the screen, in dots per inch.
-To be used when the server cannot determine the screen size from the hardware.
+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 \-deferglyphs \fIwhichfonts\fP
specifies the types of fonts for which the server should attempt to use
@@ -166,6 +172,8 @@ causes all remaining command line arguments to be ignored.
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
@@ -261,6 +269,25 @@ There is currently no way to change this from a client.
.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
.SH XDMCP OPTIONS
X servers that support XDMCP have the following options.
See the \fIX Display Manager Control Protocol\fP specification for more
@@ -273,6 +300,15 @@ enables XDMCP and sends Query packets to the specified
.B \-broadcast
enable XDMCP and broadcasts BroadcastQuery packets to the network. The
first responding display manager will be chosen for the session.
+.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
@@ -307,7 +343,7 @@ data (not that it is very private, being on the command line!).
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. \(oqXKB\(cq) extension accept the
+X servers that support the XKEYBOARD (a.k.a. \*qXKB\*q) extension accept the
following options:
.TP 8
.B [+-]kb
@@ -435,7 +471,7 @@ null-terminated strings. If any of the strings match <string/rv>, the
rule applies.
.PP
The definition of string matching is simple case-sensitive string
-comparison with one elaboration: the occurence of the character '*' in
+comparison with one elaboration: the occurrence of the character '*' in
<string/rv> is a wildcard meaning "any string." A <string/rv> can
contain multiple wildcards anywhere in the string. For example, "x*"
matches strings that begin with x, "*x" matches strings that end with
@@ -673,9 +709,6 @@ Bitmap font directories
.TP 30
.IR __projectroot__/lib/X11/fonts/Speedo , __projectroot__/lib/X11/fonts/Type1
Outline font directories
-.\" .TP 30
-.\" __projectroot__/lib/X11/fonts/PEX
-.\" PEX font directories
.TP 30
.I __projectroot__/lib/X11/rgb.txt
Color database
@@ -700,7 +733,7 @@ Protocols:
.I "X Display Manager Control Protocol"
.PP
Fonts: \fIbdftopcf\fP(1), \fImkfontdir\fP(1), \fIxfs\fP(1),
-\FIxlsfonts\fP(1), \fIxfontsel\fP(1), \fIxfd\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),
diff --git a/fb/fb.h b/fb/fb.h
index 48cf40d38..c9633d248 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/fb/fb.h,v 1.35 2003/01/30 21:46:30 tsi Exp $
+ * $XFree86: xc/programs/Xserver/fb/fb.h,v 1.37 2003/11/03 05:11:00 tsi Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -105,7 +105,8 @@ typedef unsigned __int64 FbBits;
defined(ia64) || defined(__ia64__) || \
defined(__sparc64__) || \
defined(__s390x__) || \
- defined(x86_64) || defined (__x86_64__)
+ defined(AMD64) || defined (__AMD64__) || \
+ (defined(sgi) && (_MIPS_SZLONG == 64))
typedef unsigned long FbBits;
# else
typedef unsigned long long FbBits;
@@ -652,10 +653,10 @@ typedef struct {
else \
_pPix = (PixmapPtr) (pDrawable); \
(pointer) = (FbBits *) _pPix->devPrivate.ptr; \
- (stride) = ((int) _pPix->devKind) / sizeof (FbBits); \
- (bpp) = _pPix->drawable.bitsPerPixel; \
- (xoff) = __fbPixOriginX(_pPix); \
- (yoff) = __fbPixOriginY(_pPix); \
+ (stride) = ((int) _pPix->devKind) / sizeof (FbBits); (void)(stride); \
+ (bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \
+ (xoff) = __fbPixOriginX(_pPix); (void)(xoff); \
+ (yoff) = __fbPixOriginY(_pPix); (void)(yoff); \
}
#define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
@@ -665,10 +666,10 @@ typedef struct {
else \
_pPix = (PixmapPtr) (pDrawable); \
(pointer) = (FbStip *) _pPix->devPrivate.ptr; \
- (stride) = ((int) _pPix->devKind) / sizeof (FbStip); \
- (bpp) = _pPix->drawable.bitsPerPixel; \
- (xoff) = __fbPixOriginX(_pPix); \
- (yoff) = __fbPixOriginY(_pPix); \
+ (stride) = ((int) _pPix->devKind) / sizeof (FbStip); (void)(stride); \
+ (bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \
+ (xoff) = __fbPixOriginX(_pPix); (void)(xoff); \
+ (yoff) = __fbPixOriginY(_pPix); (void)(yoff); \
}
/*
diff --git a/fb/fbbits.h b/fb/fbbits.h
index 515e179ac..80fbc4010 100644
--- a/fb/fbbits.h
+++ b/fb/fbbits.h
@@ -1,5 +1,5 @@
/*
- * Id: fbbits.h,v 1.1 1999/11/02 03:54:45 keithp Exp $
+ * $XFree86: xc/programs/Xserver/fb/fbbits.h,v 1.14 2003/11/03 05:11:00 tsi Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,6 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbbits.h,v 1.13 2001/11/18 05:00:25 torrey Exp $ */
/*
* This file defines functions for drawing some primitives using
@@ -824,8 +823,6 @@ POLYSEGMENT (DrawablePtr pDrawable,
ul = coordToInt(pBox->x1 - xoff, pBox->y1 - yoff);
lr = coordToInt(pBox->x2 - xoff - 1, pBox->y2 - yoff - 1);
- bits += bitsStride * yoff + xoff * MUL;
-
capNotLast = pGC->capStyle == CapNotLast;
while (nseg--)
diff --git a/fb/fbcompose.c b/fb/fbcompose.c
index b7733dbb5..dd030d927 100644
--- a/fb/fbcompose.c
+++ b/fb/fbcompose.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/fb/fbcompose.c,v 1.16 2002/11/06 22:45:35 keithp Exp $
+ * $XFree86: xc/programs/Xserver/fb/fbcompose.c,v 1.17 2003/11/03 05:11:00 tsi Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -2826,9 +2826,6 @@ fbCompositeGeneral (CARD8 op,
CARD16 height)
{
FbCompositeOperand src[4],msk[4],dst[4],*pmsk;
- FbCompositeOperand *srcPict, *srcAlpha;
- FbCompositeOperand *dstPict, *dstAlpha;
- FbCompositeOperand *mskPict = 0, *mskAlpha = 0;
FbCombineFunc f;
int w;
@@ -2836,26 +2833,6 @@ fbCompositeGeneral (CARD8 op,
return;
if (!fbBuildCompositeOperand (pDst, dst, xDst, yDst, FALSE, TRUE))
return;
- if (pSrc->alphaMap)
- {
- srcPict = &src[1];
- srcAlpha = &src[2];
- }
- else
- {
- srcPict = &src[0];
- srcAlpha = 0;
- }
- if (pDst->alphaMap)
- {
- dstPict = &dst[1];
- dstAlpha = &dst[2];
- }
- else
- {
- dstPict = &dst[0];
- dstAlpha = 0;
- }
f = fbCombineFuncU[op];
if (pMask)
{
@@ -2864,16 +2841,6 @@ fbCompositeGeneral (CARD8 op,
pmsk = msk;
if (pMask->componentAlpha)
f = fbCombineFuncC[op];
- if (pMask->alphaMap)
- {
- mskPict = &msk[1];
- mskAlpha = &msk[2];
- }
- else
- {
- mskPict = &msk[0];
- mskAlpha = 0;
- }
}
else
pmsk = 0;
diff --git a/fb/fbcopy.c b/fb/fbcopy.c
index 51bc621d6..74d07a1bf 100644
--- a/fb/fbcopy.c
+++ b/fb/fbcopy.c
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbcopy.c,v 1.12 2001/07/16 05:04:05 keithp Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbcopy.c,v 1.13 2003/11/10 18:21:47 tsi Exp $ */
#include "fb.h"
#ifdef IN_MODULE
@@ -531,7 +531,7 @@ fbDoCopy (DrawablePtr pSrcDrawable,
/* Check to see if the region is empty */
if (box.x1 >= box.x2 || box.y1 >= box.y2)
{
- REGION_INIT(pGC->pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pGC->pScreen, &rgnDst);
}
else
{
diff --git a/fb/fbline.c b/fb/fbline.c
index b6cf1c84b..957222492 100644
--- a/fb/fbline.c
+++ b/fb/fbline.c
@@ -1,5 +1,5 @@
/*
- * Id: fbline.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
+ * $XFree86: xc/programs/Xserver/fb/fbline.c,v 1.8 2003/11/03 05:11:00 tsi Exp $
*
* Copyright © 1998 Keith Packard
*
@@ -21,7 +21,6 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbline.c,v 1.7 2001/01/17 07:40:02 keithp Exp $ */
#include "fb.h"
@@ -32,20 +31,15 @@ fbZeroLine (DrawablePtr pDrawable,
int npt,
DDXPointPtr ppt)
{
- FbGCPrivPtr pPriv = fbGetGCPrivate (pGC);
int x1, y1, x2, y2;
int x, y;
int dashOffset;
- int totalDash;
x = pDrawable->x;
y = pDrawable->y;
x1 = ppt->x;
y1 = ppt->y;
dashOffset = pGC->dashOffset;
- totalDash = 0;
- if (pGC->lineStyle != LineSolid)
- totalDash = pPriv->dashLength;
while (--npt)
{
++ppt;
diff --git a/fb/fboverlay.c b/fb/fboverlay.c
index 761cf0949..00521eef2 100644
--- a/fb/fboverlay.c
+++ b/fb/fboverlay.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/fb/fboverlay.c,v 1.5 2002/09/16 18:05:34 eich Exp $
+ * $XFree86: xc/programs/Xserver/fb/fboverlay.c,v 1.7 2003/11/10 18:21:47 tsi Exp $
*
* Copyright © 2000 SuSE, Inc.
*
@@ -179,7 +179,7 @@ fbOverlayUpdateLayerRegion (ScreenPtr pScreen,
&pScrPriv->layer[i].u.run.region))
{
/* paint new piece with chroma key */
- REGION_INIT (pScreen, &rgnNew, NullBox, 0);
+ REGION_NULL (pScreen, &rgnNew);
REGION_INTERSECT (pScreen,
&rgnNew,
prgn,
@@ -210,13 +210,10 @@ fbOverlayCopyWindow(WindowPtr pWin,
FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pWin->drawable.pScreen);
RegionRec rgnDst;
int dx, dy;
- WindowPtr pwinRoot;
int i;
RegionRec layerRgn[FB_OVERLAY_MAX];
PixmapPtr pPixmap;
- pwinRoot = WindowTable[pWin->drawable.pScreen->myNum];
-
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
@@ -224,7 +221,7 @@ fbOverlayCopyWindow(WindowPtr pWin,
* Clip to existing bits
*/
REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy);
- REGION_INIT (pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL (pScreen, &rgnDst);
REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc);
REGION_TRANSLATE(pScreen, &rgnDst, dx, dy);
/*
@@ -232,7 +229,7 @@ fbOverlayCopyWindow(WindowPtr pWin,
*/
for (i = 0; i < pScrPriv->nlayers; i++)
{
- REGION_INIT (pScreen, &layerRgn[i], NullBox, 0);
+ REGION_NULL (pScreen, &layerRgn[i]);
REGION_INTERSECT(pScreen, &layerRgn[i], &rgnDst,
&pScrPriv->layer[i].u.run.region);
if (REGION_NOTEMPTY (pScreen, &layerRgn[i]))
diff --git a/fb/fbwindow.c b/fb/fbwindow.c
index 36952614f..262716543 100644
--- a/fb/fbwindow.c
+++ b/fb/fbwindow.c
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/fb/fbwindow.c,v 1.10 2003/01/31 00:01:45 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/fb/fbwindow.c,v 1.11 2003/11/10 18:21:47 tsi Exp $ */
#include "fb.h"
#ifdef IN_MODULE
@@ -129,7 +129,7 @@ fbCopyWindow(WindowPtr pWin,
dy = ptOldOrg.y - pWin->drawable.y;
REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy);
- REGION_INIT (pWin->drawable.pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL (pWin->drawable.pScreen, &rgnDst);
REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, &pWin->borderClip, prgnSrc);
diff --git a/hw/darwin/bundle/Dutch.lproj/Localizable.strings b/hw/darwin/bundle/Dutch.lproj/Localizable.strings
index 22d7683eb..6abd91072 100644
--- a/hw/darwin/bundle/Dutch.lproj/Localizable.strings
+++ b/hw/darwin/bundle/Dutch.lproj/Localizable.strings
Binary files differ
diff --git a/hw/darwin/bundle/English.lproj/Localizable.strings b/hw/darwin/bundle/English.lproj/Localizable.strings
index 6025a2469..241d1585b 100644
--- a/hw/darwin/bundle/English.lproj/Localizable.strings
+++ b/hw/darwin/bundle/English.lproj/Localizable.strings
@@ -1,5 +1,5 @@
/* 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 $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/Localizable.strings,v 1.4 2003/11/04 22:48:14 torrey Exp $ */
/* Title of alert panel */
"Quit X server?" = "Quit X server?";
@@ -14,10 +14,10 @@
"Cancel" = "Cancel";
/* Default keymapping file */
-"USA.keymapping" = "USA.keymapping"
+"USA.keymapping" = "USA.keymapping";
/* Default switch string */
-"Cmd-Opt-a" = "Cmd-Opt-a"
+"Cmd-Opt-a" = "Cmd-Opt-a";
/* Button title when changing switch key */
-"Press key" = "Press key"
+"Press key" = "Press key";
diff --git a/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib
index ba1e3a206..77f345a4e 100644
--- a/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib
+++ b/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib
@@ -41,14 +41,20 @@
},
{
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;
@@ -56,6 +62,8 @@
startupHelpButton = NSButton;
startupModeButton = NSButton;
switchWindow = NSPanel;
+ windowMenu = NSMenu;
+ windowSeparator = NSMenuItem;
};
SUPERCLASS = NSObject;
}
diff --git a/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib
index 7aedf01c2..5aa102278 100644
--- a/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib
+++ b/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib
Binary files differ
diff --git a/hw/darwin/bundle/French.lproj/Localizable.strings b/hw/darwin/bundle/French.lproj/Localizable.strings
index 591f73cae..21c4a99c1 100644
--- a/hw/darwin/bundle/French.lproj/Localizable.strings
+++ b/hw/darwin/bundle/French.lproj/Localizable.strings
Binary files differ
diff --git a/hw/darwin/bundle/German.lproj/Localizable.strings b/hw/darwin/bundle/German.lproj/Localizable.strings
index 365cc291a..5db6306ec 100644
--- a/hw/darwin/bundle/German.lproj/Localizable.strings
+++ b/hw/darwin/bundle/German.lproj/Localizable.strings
Binary files differ
diff --git a/hw/darwin/bundle/Japanese.lproj/Localizable.strings b/hw/darwin/bundle/Japanese.lproj/Localizable.strings
index 091138dd5..c5c26d61a 100644
--- a/hw/darwin/bundle/Japanese.lproj/Localizable.strings
+++ b/hw/darwin/bundle/Japanese.lproj/Localizable.strings
Binary files differ
diff --git a/hw/darwin/bundle/Portuguese.lproj/Localizable.strings b/hw/darwin/bundle/Portuguese.lproj/Localizable.strings
index b3edbb41d..c79b282f6 100644
--- a/hw/darwin/bundle/Portuguese.lproj/Localizable.strings
+++ b/hw/darwin/bundle/Portuguese.lproj/Localizable.strings
Binary files differ
diff --git a/hw/darwin/bundle/Spanish.lproj/Localizable.strings b/hw/darwin/bundle/Spanish.lproj/Localizable.strings
index 06eb0e5fb..5bf813f1f 100644
--- a/hw/darwin/bundle/Spanish.lproj/Localizable.strings
+++ b/hw/darwin/bundle/Spanish.lproj/Localizable.strings
Binary files differ
diff --git a/hw/darwin/bundle/Swedish.lproj/Localizable.strings b/hw/darwin/bundle/Swedish.lproj/Localizable.strings
index 7ade67d55..9709e5469 100644
--- a/hw/darwin/bundle/Swedish.lproj/Localizable.strings
+++ b/hw/darwin/bundle/Swedish.lproj/Localizable.strings
Binary files differ
diff --git a/hw/darwin/bundle/ko.lproj/Localizable.strings b/hw/darwin/bundle/ko.lproj/Localizable.strings
index 2e7137b05..fb8c77e0d 100644
--- a/hw/darwin/bundle/ko.lproj/Localizable.strings
+++ b/hw/darwin/bundle/ko.lproj/Localizable.strings
Binary files differ
diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c
index ff5ae1b33..a7a0d839c 100644
--- a/hw/darwin/darwin.c
+++ b/hw/darwin/darwin.c
@@ -1,11 +1,11 @@
/**************************************************************
*
* Shared code for the Darwin X Server
- * running with Quartz or the IOKit
+ * running with Quartz or IOKit display mode
*
**************************************************************/
/*
- * Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved.
+ * 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"),
@@ -29,7 +29,7 @@
* 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/darwin.c,v 1.50 2003/02/26 09:21:33 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.c,v 1.55 2003/11/15 00:07:09 torrey Exp $ */
#include "X.h"
#include "Xproto.h"
@@ -52,6 +52,7 @@
#include <sys/syslimits.h>
#include <stdio.h>
#include <fcntl.h>
+#include <unistd.h>
#define NO_CFPLUGIN
#include <IOKit/IOKitLib.h>
@@ -60,8 +61,6 @@
#include "darwin.h"
#include "darwinClut8.h"
-#include "quartz/quartz.h"
-#include "xfIOKit.h"
/*
* X server shared global variables
@@ -69,9 +68,9 @@
int darwinScreensFound = 0;
int darwinScreenIndex = 0;
io_connect_t darwinParamConnect = 0;
-int darwinEventFD = -1;
-Bool quartz = FALSE;
-int quartzMouseAccelChange = 1;
+int darwinEventReadFD = -1;
+int darwinEventWriteFD = -1;
+int darwinMouseAccelChange = 1;
int darwinFakeButtons = 0;
// location of X11's (0,0) point in global screen coordinates
@@ -113,7 +112,7 @@ const int NUMFORMATS = sizeof(formats)/sizeof(formats[0]);
#define PRE_RELEASE XF86_VERSION_SNAP
#endif
-static void
+void
DarwinPrintBanner()
{
#if PRE_RELEASE
@@ -193,11 +192,7 @@ static Bool DarwinAddScreen(
SCREEN_PRIV(pScreen) = dfb;
// setup hardware/mode specific details
- if (quartz) {
- ret = QuartzAddScreen(foundIndex, pScreen);
- } else {
- ret = XFIOKitAddScreen(foundIndex, pScreen);
- }
+ ret = DarwinModeAddScreen(foundIndex, pScreen);
foundIndex++;
if (! ret)
return FALSE;
@@ -276,14 +271,8 @@ static Bool DarwinAddScreen(
pScreen->SaveScreen = DarwinSaveScreen;
// finish mode dependent screen setup including cursor support
- if (quartz) {
- if (! QuartzSetupScreen(index, pScreen)) {
- return FALSE;
- }
- } else {
- if (! XFIOKitSetupScreen(index, pScreen)) {
- return FALSE;
- }
+ if (!DarwinModeSetupScreen(index, pScreen)) {
+ return FALSE;
}
// create and install the default colormap and
@@ -337,7 +326,7 @@ static void DarwinChangePointerControl(
kern_return_t kr;
double acceleration;
- if (!quartzMouseAccelChange)
+ if (!darwinMouseAccelChange)
return;
acceleration = ctrl->num / ctrl->den;
@@ -378,13 +367,13 @@ static int DarwinMouseProc(
case DEVICE_ON:
pPointer->public.on = TRUE;
- AddEnabledDevice( darwinEventFD );
+ AddEnabledDevice( darwinEventReadFD );
return Success;
case DEVICE_CLOSE:
case DEVICE_OFF:
pPointer->public.on = FALSE;
- RemoveEnabledDevice( darwinEventFD );
+ RemoveEnabledDevice( darwinEventReadFD );
return Success;
}
@@ -404,11 +393,11 @@ static int DarwinKeybdProc( DeviceIntPtr pDev, int onoff )
break;
case DEVICE_ON:
pDev->public.on = TRUE;
- AddEnabledDevice( darwinEventFD );
+ AddEnabledDevice( darwinEventReadFD );
break;
case DEVICE_OFF:
pDev->public.on = FALSE;
- RemoveEnabledDevice( darwinEventFD );
+ RemoveEnabledDevice( darwinEventReadFD );
break;
case DEVICE_CLOSE:
break;
@@ -529,12 +518,61 @@ void InitInput( int argc, char **argv )
darwinKeyboard = AddInputDevice(DarwinKeybdProc, TRUE);
RegisterKeyboardDevice( darwinKeyboard );
- DarwinEQInit( (DevicePtr)darwinKeyboard, (DevicePtr)darwinPointer );
+ if (serverGeneration == 1) {
+ DarwinEQInit( (DevicePtr)darwinKeyboard, (DevicePtr)darwinPointer );
+ }
- if (quartz) {
- QuartzInitInput(argc, argv);
- } else {
- XFIOKitInitInput(argc, argv);
+ 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);
+ }
}
}
@@ -554,7 +592,7 @@ void InitInput( int argc, char **argv )
*/
void InitOutput( ScreenInfo *pScreenInfo, int argc, char **argv )
{
- int i, left, top;
+ int i;
static unsigned long generation = 0;
pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER;
@@ -574,55 +612,14 @@ void InitOutput( ScreenInfo *pScreenInfo, int argc, char **argv )
}
// Discover screens and do mode specific initialization
- if (quartz) {
- QuartzInitOutput(argc, argv);
- } else {
- XFIOKitInitOutput(argc, argv);
- }
+ DarwinModeInitOutput(argc, argv);
// Add screens
for (i = 0; i < darwinScreensFound; i++) {
AddScreen( DarwinAddScreen, argc, argv );
}
- // 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.
- 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);
- }
- }
+ DarwinAdjustScreenOrigins(pScreenInfo);
}
@@ -648,13 +645,16 @@ void OsVendorInit(void)
// Find the full path to the keymapping file.
if ( darwinKeymapFile ) {
char *tempStr = DarwinFindLibraryFile(darwinKeymapFile, "Keyboards");
- if ( !tempStr )
- FatalError("Could not find keymapping file %s.\n",
- darwinKeymapFile);
+ if ( !tempStr ) {
+ ErrorF("Could not find keymapping file %s.\n", darwinKeymapFile);
+ } else {
+ ErrorF("Using keymapping provided in %s.\n", tempStr);
+ }
darwinKeymapFile = tempStr;
- ErrorF("Using keymapping provided in %s.\n", darwinKeymapFile);
- } else {
- ErrorF("Reading keymapping from the kernel.\n");
+ }
+
+ if ( !darwinKeymapFile ) {
+ ErrorF("Reading keymap from the system.\n");
}
}
@@ -667,12 +667,10 @@ void OsVendorInit(void)
*/
int ddxProcessArgument( int argc, char *argv[], int i )
{
-#ifdef DARWIN_WITH_QUARTZ
int numDone;
- if ((numDone = QuartzProcessArgument( argc, argv, i )))
+ if ((numDone = DarwinModeProcessArgument( argc, argv, i )))
return numDone;
-#endif
if ( !strcmp( argv[i], "-fakebuttons" ) ) {
darwinFakeButtons = TRUE;
@@ -833,11 +831,7 @@ void ddxGiveUp( void )
{
ErrorF( "Quitting XDarwin...\n" );
- if (quartz) {
- QuartzGiveUp();
- } else {
- XFIOKitGiveUp();
- }
+ DarwinModeGiveUp();
}
diff --git a/hw/darwin/darwin.h b/hw/darwin/darwin.h
index 62698d74a..79fa00ffc 100644
--- a/hw/darwin/darwin.h
+++ b/hw/darwin/darwin.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved.
+ * 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"),
@@ -23,16 +23,15 @@
* 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/darwin.h,v 1.15 2002/12/10 00:00:38 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.h,v 1.20 2003/11/15 00:07:09 torrey Exp $ */
#ifndef _DARWIN_H
#define _DARWIN_H
#include <IOKit/IOTypes.h>
#include "inputstr.h"
-#include "screenint.h"
+#include "scrnintstr.h"
#include "extensions/XKB.h"
-#include "quartz/quartzShared.h"
typedef struct {
void *framebuffer;
@@ -48,6 +47,9 @@ typedef struct {
} DarwinFramebufferRec, *DarwinFramebufferPtr;
+// From darwin.c
+void DarwinPrintBanner();
+void DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo);
void xf86SetRootClip (ScreenPtr pScreen, BOOL enable);
// From darwinEvents.c
@@ -64,6 +66,17 @@ 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__); }
@@ -76,31 +89,60 @@ int DarwinModifierStringToNXKey(const char *string);
#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 darwinEventFD;
-extern Bool quartz;
+extern int darwinEventReadFD;
+extern int darwinEventWriteFD;
+
+// User preferences
+extern int darwinMouseAccelChange;
+extern int darwinFakeButtons;
+extern int darwinFakeMouse2Mask;
+extern int darwinFakeMouse3Mask;
+extern char *darwinKeymapFile;
+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
- kXDarwinShow, // vt switch to X server;
- // recapture screen and restore X drawing
- kXDarwinHide, // vt switch away from X server;
- // release screen and clip X drawing
- 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
+ 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/hw/darwin/darwinClut8.h b/hw/darwin/darwinClut8.h
index 06e7b71c5..68a7ad16f 100644
--- a/hw/darwin/darwinClut8.h
+++ b/hw/darwin/darwinClut8.h
@@ -1,7 +1,7 @@
/*
* Darwin default 8-bit Colormap for StaticColor
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/darwinClut8.h,v 1.1.8.1 2003/03/04 01:31:43 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/darwinClut8.h,v 1.2 2003/03/04 01:37:59 torrey Exp $ */
#ifndef _DARWIN_CLUT8_
#define _DARWIN_CLUT8_
diff --git a/hw/darwin/darwinEvents.c b/hw/darwin/darwinEvents.c
index 72d7eff05..ba1ec8fc2 100644
--- a/hw/darwin/darwinEvents.c
+++ b/hw/darwin/darwinEvents.c
@@ -28,6 +28,7 @@ Except as contained in this notice, the name of The Open Group shall not be
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/hw/darwin/darwinEvents.c,v 1.5 2003/11/03 05:36:30 tsi Exp $ */
#define NEED_EVENTS
#include "X.h"
@@ -42,7 +43,6 @@ in this Software without prior written authorization from The Open Group.
#include "mipointer.h"
#include "darwin.h"
-#include "quartz/quartz.h"
#include <sys/types.h>
#include <sys/uio.h>
@@ -181,6 +181,7 @@ DarwinEQEnqueue(
const xEvent *e)
{
HWEventQueueType oldtail, newtail;
+ char byte = 0;
oldtail = darwinEventQueue.tail;
@@ -209,6 +210,9 @@ DarwinEQEnqueue(
// Update the tail after the event is prepared
darwinEventQueue.tail = newtail;
+
+ // Signal there is an event ready to handle
+ write(darwinEventWriteFD, &byte, 1);
}
@@ -253,7 +257,7 @@ void ProcessInputEvents(void)
// Empty the signaling pipe
x = sizeof(xe);
while (x == sizeof(xe)) {
- x = read(darwinEventFD, &xe, sizeof(xe));
+ x = read(darwinEventReadFD, &xe, sizeof(xe));
}
while (darwinEventQueue.head != darwinEventQueue.tail)
@@ -425,11 +429,8 @@ void ProcessInputEvents(void)
}
default:
- if (quartz) {
- QuartzProcessEvent(&xe);
- } else {
- ErrorF("Unknown X event caught: %d\n", xe.u.u.type);
- }
+ // Check for mode specific event
+ DarwinModeProcessEvent(&xe);
}
}
}
diff --git a/hw/darwin/darwinKeyboard.c b/hw/darwin/darwinKeyboard.c
index 4113bacba..57bf5fa3d 100644
--- a/hw/darwin/darwinKeyboard.c
+++ b/hw/darwin/darwinKeyboard.c
@@ -2,7 +2,8 @@
//
// Keyboard support for the Darwin X Server
//
-// Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved.
+// Copyright (c) 2001-2003 Torrey T. Lyons. All Rights Reserved.
+// Copyright (c) 2003 Apple Computer, Inc. All Rights Reserved.
//
// The code to parse the Darwin keymap is derived from dumpkeymap.c
// by Eric Sunshine, which includes the following copyright:
@@ -36,7 +37,7 @@
//
//=============================================================================
-/* $XFree86: xc/programs/Xserver/hw/darwin/darwinKeyboard.c,v 1.17 2002/12/10 00:00:38 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/darwinKeyboard.c,v 1.19 2003/11/01 08:13:08 torrey Exp $ */
/*
===========================================================================
@@ -59,26 +60,18 @@
// 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 <drivers/event_status_driver.h>
#include <IOKit/hidsystem/ev_keymap.h>
#include <stdio.h>
#include <stdlib.h>
+#include <errno.h>
#include <sys/stat.h>
#include <architecture/byte_order.h> // For the NXSwap*
#include "darwin.h"
-#include "xfIOKit.h"
-#include "quartz/quartzAudio.h"
-#include "quartz/quartzShared.h"
-
-#define XK_TECHNICAL // needed to get XK_Escape
-#define XK_PUBLISHING
-#include "keysym.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
+#include "darwinKeyboard.h"
#define AltMask Mod1Mask
#define MetaMask Mod2Mask
@@ -224,11 +217,9 @@ static void DarwinChangeKeyboardControl( DeviceIntPtr device, KeybdCtrl *ctrl )
// keyclick, bell volume / pitch, autorepead, LED's
}
-static CARD8 modMap[MAP_LENGTH];
-static KeySym map[MAP_LENGTH * GLYPHS_PER_KEY];
-static unsigned char modifierKeycodes[NX_NUMMODIFIERS][2];
-static FILE *fref = NULL;
-static char *inBuffer = NULL;
+static darwinKeyboardInfo keyInfo;
+static FILE *fref = NULL;
+static char *inBuffer = NULL;
//-----------------------------------------------------------------------------
// Data Stream Object
@@ -449,34 +440,18 @@ Bool DarwinReadKeymapFile(
/*
- * DarwinKeyboardInit
- * Get the Darwin keyboard map and compute an equivalent
- * X keyboard map and modifier map. Set the new keyboard
- * device structure.
+ * DarwinParseNXKeyMapping
*/
-void DarwinKeyboardInit(
- DeviceIntPtr pDev )
+Bool DarwinParseNXKeyMapping(
+ darwinKeyboardInfo *info)
{
KeySym *k;
int i;
short numMods, numKeys, numPadKeys = 0;
- KeySymsRec keySyms;
+ Bool haveKeymap = FALSE;
NXKeyMapping keyMap;
DataStream *keyMapStream;
unsigned char const *numPadStart = 0;
- BellProcPtr bellProc;
- Bool haveKeymap = FALSE;
-
- memset( modMap, NoSymbol, sizeof( modMap ) );
- memset( map, 0, sizeof( map ) );
- for (i = 0; i < NX_NUMMODIFIERS; i++) {
- modifierKeycodes[i][0] = modifierKeycodes[i][1] = 0;
- }
-
- // 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() );
if (darwinKeymapFile) {
haveKeymap = DarwinReadKeymapFile(&keyMap);
@@ -494,7 +469,7 @@ void DarwinKeyboardInit(
keyMap.size = NXKeyMappingLength( darwinParamConnect );
keyMap.mapping = (char*) xalloc( keyMap.size );
if (!NXGetKeyMapping( darwinParamConnect, &keyMap )) {
- FatalError("Could not get kernel keymapping! Load keymapping from file instead.\n");
+ return FALSE;
}
}
@@ -507,9 +482,7 @@ void DarwinKeyboardInit(
ErrorF("Current 16-bit keymapping may not be interpreted correctly.\n");
}
- // Compute the modifier map and
- // insert X modifier KeySyms into keyboard map.
- // Store modifier keycodes in modifierKeycodes.
+ // Insert X modifier KeySyms into the keyboard map.
numMods = get_number(keyMapStream);
while (numMods-- > 0) {
int left = 1; // first keycode is left
@@ -526,40 +499,33 @@ void DarwinKeyboardInit(
while (numKeyCodes-- > 0) {
const short keyCode = get_number(keyMapStream);
if (charCode != NX_MODIFIERKEY_NUMERICPAD) {
- modifierKeycodes[charCode][1-left] = keyCode;
switch (charCode) {
case NX_MODIFIERKEY_ALPHALOCK:
- modMap[keyCode + MIN_KEYCODE] = LockMask;
- map[keyCode * GLYPHS_PER_KEY] = XK_Caps_Lock;
+ info->keyMap[keyCode * GLYPHS_PER_KEY] = XK_Caps_Lock;
break;
case NX_MODIFIERKEY_SHIFT:
- modMap[keyCode + MIN_KEYCODE] = ShiftMask;
- map[keyCode * GLYPHS_PER_KEY] =
+ info->keyMap[keyCode * GLYPHS_PER_KEY] =
(left ? XK_Shift_L : XK_Shift_R);
break;
case NX_MODIFIERKEY_CONTROL:
- modMap[keyCode + MIN_KEYCODE] = ControlMask;
- map[keyCode * GLYPHS_PER_KEY] =
+ info->keyMap[keyCode * GLYPHS_PER_KEY] =
(left ? XK_Control_L : XK_Control_R);
break;
case NX_MODIFIERKEY_ALTERNATE:
- modMap[keyCode + MIN_KEYCODE] = AltMask;
- map[keyCode * GLYPHS_PER_KEY] =
+ info->keyMap[keyCode * GLYPHS_PER_KEY] =
(left ? XK_Mode_switch : XK_Alt_R);
break;
case NX_MODIFIERKEY_COMMAND:
- modMap[keyCode + MIN_KEYCODE] = MetaMask;
- map[keyCode * GLYPHS_PER_KEY] =
+ info->keyMap[keyCode * GLYPHS_PER_KEY] =
(left ? XK_Meta_L : XK_Meta_R);
break;
case NX_MODIFIERKEY_SECONDARYFN:
- modMap[keyCode + MIN_KEYCODE] = FunctionMask;
- map[keyCode * GLYPHS_PER_KEY] =
+ 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
- map[keyCode * GLYPHS_PER_KEY] = XK_Help;
+ info->keyMap[keyCode * GLYPHS_PER_KEY] = XK_Help;
break;
}
}
@@ -567,12 +533,12 @@ void DarwinKeyboardInit(
}
}
- // Convert the Darwin keyboard map to an X keyboard map.
+ // 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 = map; i < numKeys; i++, k += GLYPHS_PER_KEY) {
+ 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);
@@ -656,7 +622,7 @@ void DarwinKeyboardInit(
keyMapStream->data = numPadStart;
while(numPadKeys-- > 0) {
const short keyCode = get_number(keyMapStream);
- k = &map[keyCode * GLYPHS_PER_KEY];
+ 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;
@@ -671,7 +637,9 @@ void DarwinKeyboardInit(
#ifdef DUMP_DARWIN_KEYMAP
ErrorF("Darwin -> X converted keyboard map\n");
- for (i = 0, k = map; i < NX_NUMKEYCODES; i++, k += GLYPHS_PER_KEY) {
+ 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++) {
@@ -685,18 +653,145 @@ void DarwinKeyboardInit(
}
#endif
- keySyms.map = map;
+ 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;
+ int darwinSwapAltMeta = 0;
+
+ 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:
+ info->modifierKeycodes[NX_MODIFIERKEY_SHIFT][1] = i;
+ 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:
+ info->modifierKeycodes[NX_MODIFIERKEY_CONTROL][1] = i;
+ 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:
+ info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][1] = i;
+ 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:
+ info->modifierKeycodes[NX_MODIFIERKEY_COMMAND][1] = i;
+ 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_Alt_R)
+ k[0] = XK_Mode_switch;
+#endif
+ }
+}
+
+
+/*
+ * 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;
+
+ memset( keyInfo.keyMap, 0, sizeof( keyInfo.keyMap ) );
+
+ // 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() );
+
+ if (!DarwinParseNXKeyMapping(&keyInfo)) {
+ if (!DarwinModeReadSystemKeymap(&keyInfo)) {
+ FatalError("Could not build a valid keymap.");
+ }
+ }
+
+ DarwinBuildModifierMaps(&keyInfo);
+
+ keySyms.map = keyInfo.keyMap;
keySyms.mapWidth = GLYPHS_PER_KEY;
keySyms.minKeyCode = MIN_KEYCODE;
keySyms.maxKeyCode = MAX_KEYCODE;
- if (quartz)
- bellProc = QuartzBell;
- else
- bellProc = XFIOKitBell;
-
- assert( InitKeyboardDeviceStruct( (DevicePtr)pDev, &keySyms, modMap,
- bellProc,
+ assert( InitKeyboardDeviceStruct( (DevicePtr)pDev, &keySyms,
+ keyInfo.modMap, DarwinModeBell,
DarwinChangeKeyboardControl ));
}
@@ -718,7 +813,7 @@ void DarwinKeyboardInit(
*/
int DarwinModifierNXKeyToNXKeycode(int key, int side)
{
- return modifierKeycodes[key][side];
+ return keyInfo.modifierKeycodes[key][side];
}
/*
@@ -734,7 +829,7 @@ int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide)
// search modifierKeycodes for this keycode+side
for (key = 0; key < NX_NUMMODIFIERS; key++) {
for (side = 0; side <= 1; side++) {
- if (modifierKeycodes[key][side] == keycode) break;
+ if (keyInfo.modifierKeycodes[key][side] == keycode) break;
}
}
if (key == NX_NUMMODIFIERS) return -1;
diff --git a/hw/darwin/quartz/Preferences.h b/hw/darwin/quartz/Preferences.h
index 2c0d6756b..22a2f1441 100644
--- a/hw/darwin/quartz/Preferences.h
+++ b/hw/darwin/quartz/Preferences.h
@@ -1,4 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/Preferences.h,v 1.2 2003/01/15 02:34:05 torrey Exp $ */
+/*
+ * 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.
+ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/Preferences.h,v 1.3 2003/09/16 00:36:12 torrey Exp $ */
#import <Cocoa/Cocoa.h>
@@ -35,14 +62,14 @@
- (IBAction)saveChanges:(id)sender;
- (IBAction)setKey:(id)sender;
-- (BOOL)sendEvent:(NSEvent*)anEvent;
+- (BOOL)sendEvent:(NSEvent *)anEvent;
- (void)awakeFromNib;
- (void)windowWillClose:(NSNotification *)aNotification;
+ (void)setUseKeymapFile:(BOOL)newUseKeymapFile;
-+ (void)setKeymapFile:(NSString*)newFile;
-+ (void)setSwitchString:(NSString*)newString;
++ (void)setKeymapFile:(NSString *)newFile;
++ (void)setSwitchString:(NSString *)newString;
+ (void)setKeyCode:(int)newKeyCode;
+ (void)setModifiers:(int)newModifiers;
+ (void)setDisplay:(int)newDisplay;
@@ -59,15 +86,16 @@
+ (void)setSystemBeep:(BOOL)newSystemBeep;
+ (void)setXinerama:(BOOL)newXinerama;
+ (void)setAddToPath:(BOOL)newAddToPath;
-+ (void)setAddToPathString:(NSString*)newAddToPathString;
++ (void)setAddToPathString:(NSString *)newAddToPathString;
+ (void)setUseDefaultShell:(BOOL)newUseDefaultShell;
-+ (void)setShellString:(NSString*)newShellString;
++ (void)setShellString:(NSString *)newShellString;
+ (void)setDepth:(int)newDepth;
++ (void)setDisplayModeBundles:(NSArray *)newBundles;
+ (void)saveToDisk;
+ (BOOL)useKeymapFile;
-+ (NSString*)keymapFile;
-+ (NSString*)switchString;
++ (NSString *)keymapFile;
++ (NSString *)switchString;
+ (unsigned int)keyCode;
+ (unsigned int)modifiers;
+ (int)display;
@@ -84,10 +112,11 @@
+ (BOOL)systemBeep;
+ (BOOL)xinerama;
+ (BOOL)addToPath;
-+ (NSString*)addToPathString;
++ (NSString *)addToPathString;
+ (BOOL)useDefaultShell;
-+ (NSString*)shellString;
++ (NSString *)shellString;
+ (int)depth;
++ (NSArray *)displayModeBundles;
@end
diff --git a/hw/darwin/quartz/Preferences.m b/hw/darwin/quartz/Preferences.m
index 4f8dacbf0..4120b6360 100644
--- a/hw/darwin/quartz/Preferences.m
+++ b/hw/darwin/quartz/Preferences.m
@@ -3,10 +3,43 @@
//
// This class keeps track of the user preferences.
//
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/Preferences.m,v 1.2 2003/01/15 02:34:06 torrey Exp $ */
+/*
+ * 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.
+ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/Preferences.m,v 1.4 2003/09/16 00:36:12 torrey Exp $ */
-#import "Preferences.h"
#import "quartzCommon.h"
+
+#define BOOL xBOOL
+#include "darwin.h"
+#undef BOOL
+
+#import "Preferences.h"
+
#include <IOKit/hidsystem/IOLLEvent.h> // for modifier masks
// Macros to build the path name
@@ -36,8 +69,8 @@
@"YES", @"ShowStartupHelp",
[NSNumber numberWithInt:0], @"SwitchKeyCode",
[NSNumber numberWithInt:(NSCommandKeyMask | NSAlternateKeyMask)],
- @"SwitchModifiers", @"NO", @"UseSystemBeep",
- @"YES", @"DockSwitch",
+ @"SwitchModifiers", @"NO", @"UseSystemBeep",
+ @"YES", @"DockSwitch",
@"NO", @"AllowMouseAccelChange",
[NSNumber numberWithInt:qdCursor_Not8Bit], @"UseQDCursor",
@"YES", @"Xinerama",
@@ -45,7 +78,13 @@
[NSString stringWithCString:XSTRPATH(XBINDIR)], @"AddToPathString",
@"YES", @"UseDefaultShell",
@"/bin/tcsh", @"Shell",
- [NSNumber numberWithInt:depth_Current], @"Depth", nil];
+ [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];
@@ -207,7 +246,7 @@
[switchString setString:@""];
}
-- (BOOL)sendEvent:(NSEvent*)anEvent
+- (BOOL)sendEvent:(NSEvent *)anEvent
{
if(isGettingKeyCode) {
if([anEvent type]==NSKeyDown) // wait for keyup
@@ -240,7 +279,7 @@
return NO;
}
-+ (void)setKeymapFile:(NSString*)newFile
++ (void)setKeymapFile:(NSString *)newFile
{
[[NSUserDefaults standardUserDefaults] setObject:newFile
forKey:@"KeymappingFile"];
@@ -252,7 +291,7 @@
forKey:@"UseKeymappingFile"];
}
-+ (void)setSwitchString:(NSString*)newString
++ (void)setSwitchString:(NSString *)newString
{
[[NSUserDefaults standardUserDefaults] setObject:newString
forKey:@"SwitchString"];
@@ -311,7 +350,7 @@
[[NSUserDefaults standardUserDefaults] setBool:newMouseAccelChange
forKey:@"AllowMouseAccelChange"];
// Update the setting used by the X server thread
- quartzMouseAccelChange = newMouseAccelChange;
+ darwinMouseAccelChange = newMouseAccelChange;
}
+ (void)setUseQDCursor:(int)newUseQDCursor
@@ -364,7 +403,7 @@
forKey:@"AddToPath"];
}
-+ (void)setAddToPathString:(NSString*)newAddToPathString
++ (void)setAddToPathString:(NSString *)newAddToPathString
{
[[NSUserDefaults standardUserDefaults] setObject:newAddToPathString
forKey:@"AddToPathString"];
@@ -376,7 +415,7 @@
forKey:@"UseDefaultShell"];
}
-+ (void)setShellString:(NSString*)newShellString
++ (void)setShellString:(NSString *)newShellString
{
[[NSUserDefaults standardUserDefaults] setObject:newShellString
forKey:@"Shell"];
@@ -388,6 +427,12 @@
forKey:@"Depth"];
}
++ (void)setDisplayModeBundles:(NSArray *)newBundles
+{
+ [[NSUserDefaults standardUserDefaults] setObject:newBundles
+ forKey:@"DisplayModeBundles"];
+}
+
+ (void)saveToDisk
{
[[NSUserDefaults standardUserDefaults] synchronize];
@@ -399,13 +444,13 @@
boolForKey:@"UseKeymappingFile"];
}
-+ (NSString*)keymapFile
++ (NSString *)keymapFile
{
return [[NSUserDefaults standardUserDefaults]
stringForKey:@"KeymappingFile"];
}
-+ (NSString*)switchString
++ (NSString *)switchString
{
return [[NSUserDefaults standardUserDefaults]
stringForKey:@"SwitchString"];
@@ -502,7 +547,7 @@
return [[NSUserDefaults standardUserDefaults] boolForKey:@"AddToPath"];
}
-+ (NSString*)addToPathString
++ (NSString *)addToPathString
{
return [[NSUserDefaults standardUserDefaults]
stringForKey:@"AddToPathString"];
@@ -514,7 +559,7 @@
boolForKey:@"UseDefaultShell"];
}
-+ (NSString*)shellString
++ (NSString *)shellString
{
return [[NSUserDefaults standardUserDefaults]
stringForKey:@"Shell"];
@@ -526,5 +571,10 @@
integerForKey:@"Depth"];
}
++ (NSArray *)displayModeBundles
+{
+ return [[NSUserDefaults standardUserDefaults]
+ objectForKey:@"DisplayModeBundles"];
+}
@end
diff --git a/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj b/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj
index 574ce5f18..3afc9177b 100644
--- a/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj
+++ b/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj
@@ -23,48 +23,6 @@
path = XApplication.h;
refType = 4;
};
- 014C68ED00ED6A9D7F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = XView.h;
- refType = 4;
- };
- 014C68EE00ED6A9D7F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = XView.m;
- refType = 4;
- };
- 014C68F200ED7AD67F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = fakeBoxRec.h;
- refType = 4;
- };
- 014C68F300EE5AB97F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = rootlessCommon.c;
- refType = 4;
- };
- 014C68F400EE5AB97F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = rootlessCommon.h;
- refType = 4;
- };
- 014C68F700EE678F7F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = rootlessWindow.c;
- refType = 4;
- };
- 014C68F800EE678F7F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = rootlessWindow.h;
- refType = 4;
- };
015698ED003DF345CE6F79C2 = {
isa = PBXFileReference;
path = XDarwin.icns;
@@ -99,18 +57,6 @@
path = /System/Library/Frameworks/IOKit.framework;
refType = 0;
};
- 017D6F4400E861FB7F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = rootlessGC.c;
- refType = 4;
- };
- 017D6F4500E861FB7F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = rootlessScreen.c;
- refType = 4;
- };
018F40F2003E1902CE6F79C2 = {
children = (
018F40F3003E1916CE6F79C2,
@@ -118,6 +64,7 @@
3E74E03600863F047F000001,
F5A94EF10314BAC70100011B,
018F40F6003E1974CE6F79C2,
+ 6E5F5F0005537A1A008FEAD7,
);
isa = PBXGroup;
name = "X Server";
@@ -261,22 +208,6 @@
//042
//043
//044
-//060
-//061
-//062
-//063
-//064
- 06EB6C3B004099E7CE6F79C2 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = quartzShared.h;
- refType = 4;
- };
-//060
-//061
-//062
-//063
-//064
//080
//081
//082
@@ -290,8 +221,6 @@
0127909800074B1A0A000002,
01279092000747AA0A000002,
1C4A3109004D8F24CE6F79C2,
- 014C68EE00ED6A9D7F000001,
- 014C68ED00ED6A9D7F000001,
);
isa = PBXGroup;
name = Classes;
@@ -356,6 +285,8 @@
dependencies = (
6EF065C903D4F0CA006877C2,
6EF065C703D4EE19006877C2,
+ 6E11A986048BDFFB006877C2,
+ 6E7904110500F33B00EEC080,
);
isa = PBXApplicationTarget;
name = XDarwin;
@@ -368,10 +299,42 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>x11app</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>X11 Application</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>****</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>tool</string>
+ <string>*</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>UNIX Application</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>****</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ </dict>
+ </array>
<key>CFBundleExecutable</key>
<string>XDarwin</string>
<key>CFBundleGetInfoString</key>
- <string>XDarwin 1.2.0, ©2001-2003 XFree86 Project, Inc.</string>
+ <string>XDarwin 1.3b4, ©2001-2003 XFree86 Project, Inc.</string>
<key>CFBundleIconFile</key>
<string>XDarwin.icns</string>
<key>CFBundleIdentifier</key>
@@ -383,7 +346,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>XDarwin 1.2.0</string>
+ <string>XDarwin 1.3b4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
@@ -548,7 +511,7 @@
};
};
1220774600712D75416877C2 = {
- fileEncoding = 30;
+ fileEncoding = 10;
isa = PBXFileReference;
name = Japanese;
path = Japanese.lproj/Localizable.strings;
@@ -579,7 +542,7 @@
);
isa = PBXGroup;
name = IOKit;
- path = ..;
+ path = ../iokit;
refType = 4;
};
//170
@@ -597,6 +560,8 @@
0A79E19E004499A1CE6F79C2,
6EF7C58703D3BC6D00000104,
6EF065C603D4EE19006877C2,
+ 6E11A985048BDFEE006877C2,
+ 6E7904100500F05600EEC080,
);
isa = PBXGroup;
name = Products;
@@ -770,7 +735,9 @@
targets = (
0A79E19F004499A1CE6F79C2,
6EF7C58603D3BC6D00000104,
+ 6E11A984048BDFEE006877C2,
6EF065C503D4EE19006877C2,
+ 6E79040F0500F05600EEC080,
);
};
29B97314FDCFA39411CA2CEA = {
@@ -780,7 +747,10 @@
170DFB0000729C86416877C2,
43B962CE00617089416877C2,
F5614B3D025112D901000114,
+ 6EC4A64C042A9597006877C2,
32FEE13C00E07C3E7F000001,
+ 6EE1214104968658006877C2,
+ 6EC4A66D042A97FC006877C2,
29B97315FDCFA39411CA2CEA,
29B97317FDCFA39411CA2CEA,
29B97323FDCFA39411CA2CEA,
@@ -875,66 +845,14 @@
//324
32FEE13C00E07C3E7F000001 = {
children = (
- F56CBD0D02EB84A801129B8A,
- F56CBD0E02EB84A801129B8A,
- F56CBD0F02EBDCFC01129B8A,
- 014C68F200ED7AD67F000001,
F5269C2D01D5BC3501000001,
F5269C2E01D5BC3501000001,
- 32FEE13E00E07CBE7F000001,
- 32FEE13F00E07CBE7F000001,
- 32FEE14000E07CBE7F000001,
- 32FEE14100E07CBE7F000001,
- 32FEE14200E07CBE7F000001,
- 014C68F300EE5AB97F000001,
- 014C68F400EE5AB97F000001,
- 017D6F4400E861FB7F000001,
- 017D6F4500E861FB7F000001,
- 014C68F700EE678F7F000001,
- 014C68F800EE678F7F000001,
- 32FEE14900E07D317F000001,
);
isa = PBXGroup;
- name = Rootless;
+ name = "Old Cocoa Imp";
path = "";
refType = 4;
};
- 32FEE13E00E07CBE7F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = rootless.h;
- refType = 4;
- };
- 32FEE13F00E07CBE7F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = rootlessAqua.h;
- refType = 4;
- };
- 32FEE14000E07CBE7F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = rootlessAquaGlue.c;
- refType = 4;
- };
- 32FEE14100E07CBE7F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = rootlessAquaImp.h;
- refType = 4;
- };
- 32FEE14200E07CBE7F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = rootlessAquaImp.m;
- refType = 4;
- };
- 32FEE14900E07D317F000001 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = rootlessValTree.c;
- refType = 4;
- };
//320
//321
//322
@@ -979,17 +897,19 @@
//434
43B962CE00617089416877C2 = {
children = (
+ 6EE9B21604E859C200CA7FEA,
+ 6E97A0F505079F9100B8294C,
+ 6E5F5F030553815A008FEAD7,
+ 6E5F5F040553815A008FEAD7,
018F40F8003E1979CE6F79C2,
018F40FA003E197ECE6F79C2,
237A34C10076E37E7F000001,
237A34C40076F4F07F000001,
- 3576829A0077B8F17F000001,
- 0338412F0083BFE57F000001,
- 43B962D000617089416877C2,
- 43B962D100617089416877C2,
43B962CF00617089416877C2,
F5582948015DAD3B01000001,
- 06EB6C3B004099E7CE6F79C2,
+ 6E5F5F0105537A5F008FEAD7,
+ 43B962D000617089416877C2,
+ 43B962D100617089416877C2,
02A1FEA8006D38F0416877C2,
);
isa = PBXGroup;
@@ -1051,6 +971,536 @@
//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 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
+<plist version=\"1.0\">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>glxCGL</string>
+ <key>CFBundleGetInfoString</key>
+ <string></string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string></string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>GLX bundle using Apple's OpenGL</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>0.1</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>0.1</string>
+</dict>
+</plist>
+";
+ };
+ 6E11A985048BDFEE006877C2 = {
+ isa = PBXBundleReference;
+ path = glxCGL.bundle;
+ refType = 3;
+ };
+ 6E11A986048BDFFB006877C2 = {
+ isa = PBXTargetDependency;
+ target = 6E11A984048BDFEE006877C2;
+ };
+ 6E5F5F0005537A1A008FEAD7 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = darwinKeyboard.h;
+ refType = 4;
+ };
+ 6E5F5F0105537A5F008FEAD7 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = quartzKeyboard.c;
+ refType = 4;
+ };
+ 6E5F5F030553815A008FEAD7 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = keysym2ucs.c;
+ refType = 4;
+ };
+ 6E5F5F040553815A008FEAD7 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = keysym2ucs.h;
+ refType = 4;
+ };
+ 6E6656EC048832CF006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = "x-hook.c";
+ refType = 4;
+ };
+ 6E6656ED048832CF006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = "x-hook.h";
+ refType = 4;
+ };
+ 6E6656F0048832EC006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = dri.c;
+ refType = 4;
+ };
+ 6E6656F1048832EC006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = dri.h;
+ refType = 4;
+ };
+ 6E6656F2048832EC006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = dristruct.h;
+ refType = 4;
+ };
+ 6E6656F3048832F9006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = appledri.c;
+ refType = 4;
+ };
+ 6E79040104FD5ED900EEC080 = {
+ children = (
+ 6E79040204FD5EDA00EEC080,
+ 6E79040304FD5EDA00EEC080,
+ 6E79040404FD5EDA00EEC080,
+ );
+ isa = PBXGroup;
+ name = "Safe Alpha";
+ path = safeAlpha;
+ refType = 4;
+ };
+ 6E79040204FD5EDA00EEC080 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = safeAlpha.h;
+ refType = 4;
+ };
+ 6E79040304FD5EDA00EEC080 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = safeAlphaPicture.c;
+ refType = 4;
+ };
+ 6E79040404FD5EDA00EEC080 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = safeAlphaWindow.c;
+ refType = 4;
+ };
+ 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 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
+<plist version=\"1.0\">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>xpr</string>
+ <key>CFBundleGetInfoString</key>
+ <string></string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string></string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>Xplugin rootless implementation</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>0.1</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>0.1</string>
+</dict>
+</plist>
+";
+ };
+ 6E7904100500F05600EEC080 = {
+ isa = PBXBundleReference;
+ path = xpr.bundle;
+ refType = 3;
+ };
+ 6E7904110500F33B00EEC080 = {
+ isa = PBXTargetDependency;
+ target = 6E79040F0500F05600EEC080;
+ };
+ 6E97A0F2050798B100B8294C = {
+ fileEncoding = 4;
+ isa = PBXFileReference;
+ path = xprAppleWM.c;
+ refType = 4;
+ };
+ 6E97A0F305079B6500B8294C = {
+ fileEncoding = 4;
+ isa = PBXFileReference;
+ path = crAppleWM.m;
+ refType = 4;
+ };
+ 6E97A0F505079F9100B8294C = {
+ fileEncoding = 4;
+ isa = PBXFileReference;
+ path = applewmExt.h;
+ refType = 4;
+ };
+ 6EA0B3AF0544A9CC006877C2 = {
+ children = (
+ 6EA0B3B00544A9CC006877C2,
+ 6EA0B3B10544A9CC006877C2,
+ 6EA0B3B20544A9CC006877C2,
+ 6EA0B3B30544A9CC006877C2,
+ 6EA0B3B40544A9CC006877C2,
+ 6EA0B3B50544A9CC006877C2,
+ 6EA0B3B60544A9CC006877C2,
+ 6EA0B3B70544A9CC006877C2,
+ );
+ isa = PBXGroup;
+ name = Acceleration;
+ path = accel;
+ refType = 4;
+ };
+ 6EA0B3B00544A9CC006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = rlAccel.h;
+ refType = 4;
+ };
+ 6EA0B3B10544A9CC006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = rlBlt.c;
+ refType = 4;
+ };
+ 6EA0B3B20544A9CC006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = rlCopy.c;
+ refType = 4;
+ };
+ 6EA0B3B30544A9CC006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = rlFill.c;
+ refType = 4;
+ };
+ 6EA0B3B40544A9CC006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = rlFillRect.c;
+ refType = 4;
+ };
+ 6EA0B3B50544A9CC006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = rlFillSpans.c;
+ refType = 4;
+ };
+ 6EA0B3B60544A9CC006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = rlGlyph.c;
+ refType = 4;
+ };
+ 6EA0B3B70544A9CC006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = rlSolid.c;
+ refType = 4;
+ };
+ 6EA8EEC80445E25C006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = rootlessConfig.h;
+ refType = 4;
+ };
+ 6EC4A64C042A9597006877C2 = {
+ children = (
+ 6EC4A65D042A9654006877C2,
+ 6EC4A65E042A9654006877C2,
+ 6EC4A65F042A9654006877C2,
+ 6EA8EEC80445E25C006877C2,
+ 6EC4A661042A9654006877C2,
+ 6EC4A662042A9654006877C2,
+ 6EC4A660042A9654006877C2,
+ 6EC4A663042A9654006877C2,
+ 6EC4A664042A9654006877C2,
+ 6EA0B3AF0544A9CC006877C2,
+ 6E79040104FD5ED900EEC080,
+ );
+ isa = PBXGroup;
+ name = Rootless;
+ path = ../../../miext/rootless;
+ refType = 2;
+ };
+ 6EC4A65D042A9654006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = rootless.h;
+ refType = 4;
+ };
+ 6EC4A65E042A9654006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = rootlessCommon.c;
+ refType = 4;
+ };
+ 6EC4A65F042A9654006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = rootlessCommon.h;
+ refType = 4;
+ };
+ 6EC4A660042A9654006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = rootlessWindow.h;
+ refType = 4;
+ };
+ 6EC4A661042A9654006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = rootlessScreen.c;
+ refType = 4;
+ };
+ 6EC4A662042A9654006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = rootlessWindow.c;
+ refType = 4;
+ };
+ 6EC4A663042A9654006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = rootlessGC.c;
+ refType = 4;
+ };
+ 6EC4A664042A9654006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = rootlessValTree.c;
+ refType = 4;
+ };
+ 6EC4A66D042A97FC006877C2 = {
+ children = (
+ 6EF471A004478DE0006877C2,
+ 6E6656F3048832F9006877C2,
+ 6E6656F0048832EC006877C2,
+ 6E6656F1048832EC006877C2,
+ 6E6656F2048832EC006877C2,
+ 6ECF218404589E4D006877C2,
+ 6E97A0F2050798B100B8294C,
+ 6ECF218604589F40006877C2,
+ 6EF4719E04478B08006877C2,
+ 6EDDB2DF04508B2C006877C2,
+ 6EF471A204479263006877C2,
+ 6EF471A404479263006877C2,
+ 6E6656EC048832CF006877C2,
+ 6E6656ED048832CF006877C2,
+ 6EF471A504479263006877C2,
+ 6EF471A304479263006877C2,
+ );
+ isa = PBXGroup;
+ path = xpr;
+ refType = 4;
+ };
+ 6ECF218404589E4D006877C2 = {
+ fileEncoding = 4;
+ isa = PBXFileReference;
+ path = xpr.h;
+ refType = 4;
+ };
+ 6ECF218604589F40006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = xprCursor.c;
+ refType = 4;
+ };
+ 6EDDB2DF04508B2C006877C2 = {
+ fileEncoding = 4;
+ isa = PBXFileReference;
+ path = xprScreen.c;
+ refType = 4;
+ };
+ 6EE1214104968658006877C2 = {
+ children = (
+ 6EE1214304968692006877C2,
+ 6EE1214404968692006877C2,
+ 6EE1214204968692006877C2,
+ 6E97A0F305079B6500B8294C,
+ 6EE1214504968692006877C2,
+ 6EE1214604968692006877C2,
+ );
+ isa = PBXGroup;
+ path = cr;
+ refType = 4;
+ };
+ 6EE1214204968692006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = cr.h;
+ refType = 4;
+ };
+ 6EE1214304968692006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = XView.m;
+ refType = 4;
+ };
+ 6EE1214404968692006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = XView.h;
+ refType = 4;
+ };
+ 6EE1214504968692006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = crFrame.m;
+ refType = 4;
+ };
+ 6EE1214604968692006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = crScreen.m;
+ refType = 4;
+ };
+ 6EE9B21604E859C200CA7FEA = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = applewm.c;
+ refType = 4;
+ };
6EF065C003D4EE19006877C2 = {
buildActionMask = 2147483647;
files = (
@@ -1153,6 +1603,42 @@
isa = PBXTargetDependency;
target = 6EF7C58603D3BC6D00000104;
};
+ 6EF4719E04478B08006877C2 = {
+ fileEncoding = 4;
+ isa = PBXFileReference;
+ path = xprFrame.c;
+ refType = 4;
+ };
+ 6EF471A004478DE0006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = Xplugin.h;
+ refType = 4;
+ };
+ 6EF471A204479263006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = "x-hash.c";
+ refType = 4;
+ };
+ 6EF471A304479263006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = "x-list.h";
+ refType = 4;
+ };
+ 6EF471A404479263006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = "x-hash.h";
+ refType = 4;
+ };
+ 6EF471A504479263006877C2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = "x-list.c";
+ refType = 4;
+ };
6EF7C58103D3BC6D00000104 = {
buildActionMask = 2147483647;
files = (
@@ -1209,7 +1695,7 @@
);
isa = PBXBundleTarget;
name = glxAGL;
- productName = glxAqua;
+ productName = glxAGL;
productReference = 6EF7C58703D3BC6D00000104;
productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
@@ -1228,7 +1714,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
- <string>GLX bundle with AGL</string>
+ <string>GLX bundle using AGL framework</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
@@ -1277,7 +1763,7 @@
refType = 4;
};
F51BF62D02026E1C01000001 = {
- fileEncoding = 30;
+ fileEncoding = 10;
isa = PBXFileReference;
name = Portuguese;
path = Portuguese.lproj/Localizable.strings;
@@ -1336,7 +1822,7 @@
refType = 4;
};
F533213C0193CBC901000001 = {
- fileEncoding = 30;
+ fileEncoding = 10;
isa = PBXFileReference;
name = German;
path = German.lproj/Localizable.strings;
@@ -1395,7 +1881,7 @@
refType = 4;
};
F533214501A4B42501000001 = {
- fileEncoding = 30;
+ fileEncoding = 10;
isa = PBXFileReference;
name = Dutch;
path = Dutch.lproj/Localizable.strings;
@@ -1450,38 +1936,14 @@
path = fullscreen.c;
refType = 4;
};
- F5614B3C0251124C01000114 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = fullscreen.h;
- refType = 4;
- };
F5614B3D025112D901000114 = {
children = (
F5614B3B0251124C01000114,
- F5614B3C0251124C01000114,
+ 3576829A0077B8F17F000001,
+ 0338412F0083BFE57F000001,
);
isa = PBXGroup;
- name = "Full Screen";
- path = "";
- refType = 4;
- };
- F56CBD0D02EB84A801129B8A = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = aqua.h;
- refType = 4;
- };
- F56CBD0E02EB84A801129B8A = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = aquaPicture.c;
- refType = 4;
- };
- F56CBD0F02EBDCFC01129B8A = {
- fileEncoding = 30;
- isa = PBXFileReference;
- path = aquaWindow.c;
+ path = fullscreen;
refType = 4;
};
F587E16001924C1D01000001 = {
@@ -1505,7 +1967,7 @@
refType = 4;
};
F587E16301924C5E01000001 = {
- fileEncoding = 30;
+ fileEncoding = 10;
isa = PBXFileReference;
name = Swedish;
path = Swedish.lproj/Localizable.strings;
@@ -1552,7 +2014,7 @@
refType = 4;
};
F58D65DE018F79A001000001 = {
- fileEncoding = 30;
+ fileEncoding = 10;
isa = PBXFileReference;
name = French;
path = French.lproj/Localizable.strings;
@@ -1604,7 +2066,7 @@
refType = 4;
};
F5ACD25FC5B5E9AA01000001 = {
- fileEncoding = 30;
+ fileEncoding = 10;
isa = PBXFileReference;
name = Spanish;
path = Spanish.lproj/Localizable.strings;
@@ -1651,7 +2113,7 @@
refType = 4;
};
F5ACD266C5BE03C501000001 = {
- fileEncoding = 30;
+ fileEncoding = 10;
isa = PBXFileReference;
name = ko;
path = ko.lproj/Localizable.strings;
diff --git a/hw/darwin/quartz/XDarwinStartup.c b/hw/darwin/quartz/XDarwinStartup.c
index 53343aa1e..7b2c89f38 100644
--- a/hw/darwin/quartz/XDarwinStartup.c
+++ b/hw/darwin/quartz/XDarwinStartup.c
@@ -38,16 +38,15 @@
* dealings in this Software without prior written authorization from
* Torrey T. Lyons.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XDarwinStartup.c,v 1.1 2002/03/28 02:21:18 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XDarwinStartup.c,v 1.2 2003/05/14 05:15:56 torrey Exp $ */
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
+#include <errno.h>
#include <sys/syslimits.h>
#include <ApplicationServices/ApplicationServices.h>
-extern int errno;
-
// Macros to build the path name
#ifndef XBINDIR
#define XBINDIR /usr/X11R6/bin
diff --git a/hw/darwin/quartz/XServer.h b/hw/darwin/quartz/XServer.h
index 3eadd650e..58c7ff748 100644
--- a/hw/darwin/quartz/XServer.h
+++ b/hw/darwin/quartz/XServer.h
@@ -29,7 +29,7 @@
* sale, use or other dealings in this Software without prior written
* authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XServer.h,v 1.8 2003/01/23 00:34:26 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XServer.h,v 1.15 2003/11/14 20:27:58 torrey Exp $ */
#define BOOL xBOOL
#include "Xproto.h"
@@ -41,15 +41,14 @@
// server state
int serverState;
NSRecursiveLock *serverLock;
+ NSMutableArray *pendingClients;
BOOL serverVisible;
BOOL rootlessMenuBarVisible;
BOOL queueShowServer;
+ BOOL quitWithoutQuery;
UInt32 mouseState;
- Class windowClass;
-
- // server event queue
BOOL sendServerEvents;
- int eventWriteFD;
+ BOOL x11Active;
// Aqua interface
IBOutlet NSWindow *modeWindow;
@@ -59,6 +58,12 @@
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;
@@ -68,9 +73,11 @@
+ (void)append:(NSString *)value toEnv:(NSString *)name;
+- (BOOL)loadDisplayBundle;
- (void)startX;
- (void)finishStartX;
- (BOOL)startXClients;
+- (void)runClient:(NSString *)filename;
- (void)run;
- (void)toggle;
- (void)showServer:(BOOL)show;
@@ -82,19 +89,36 @@
- (void)sendXEvent:(xEvent *)xe;
- (void)sendShowHide:(BOOL)show;
- (void)clientProcessDone:(int)clientStatus;
+- (void)activateX11:(BOOL)state;
+- (void)windowBecameKey:(NSWindow *)window;
+- (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;
@@ -109,4 +133,3 @@ enum {
server_Quitting,
server_Done
};
-
diff --git a/hw/darwin/quartz/XServer.m b/hw/darwin/quartz/XServer.m
index c57defd53..1be22f82c 100644
--- a/hw/darwin/quartz/XServer.m
+++ b/hw/darwin/quartz/XServer.m
@@ -34,7 +34,7 @@
* sale, use or other dealings in this Software without prior written
* authorization.
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.8 2003/01/23 00:34:26 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.17 2003/11/14 20:27:58 torrey Exp $ */
#include "quartzCommon.h"
@@ -42,7 +42,12 @@
#include "X.h"
#include "Xproto.h"
#include "os.h"
+#include "opaque.h"
#include "darwin.h"
+#include "quartz.h"
+#define _APPLEWM_SERVER_
+#include "applewm.h"
+#include "applewmExt.h"
#undef BOOL
#import "XServer.h"
@@ -64,14 +69,6 @@
#import <IOKit/pwr_mgt/IOPMLib.h>
#import <IOKit/IOMessage.h>
-#define ENQUEUE(xe) \
-{ \
- char byte = 0; \
- DarwinEQEnqueue(xe); \
- /* signal there is an event ready to handle */ \
- write(eventWriteFD, &byte, 1); \
-}
-
// Types of shells
enum {
shell_Unknown,
@@ -90,7 +87,7 @@ static shellList_t const shellList[] = {
{ "sh", shell_Bourne }, // standard Bourne shell
{ "zsh", shell_Bourne }, // Z shell
{ "bash", shell_Bourne }, // GNU Bourne again shell
- { NULL, shell_Unknown }
+ { NULL, shell_Unknown }
};
extern int argcGlobal;
@@ -99,7 +96,6 @@ extern char **envpGlobal;
extern int main(int argc, char *argv[], char *envp[]);
extern void HideMenuBar(void);
extern void ShowMenuBar(void);
-extern void QuartzReallySetCursor();
static void childDone(int sig);
static void powerDidChange(void *x, io_service_t y, natural_t messageType,
void *messageArgument);
@@ -122,15 +118,15 @@ static io_connect_t root_port;
serverState = server_NotStarted;
serverLock = [[NSRecursiveLock alloc] init];
+ pendingClients = nil;
clientPID = 0;
sendServerEvents = NO;
+ x11Active = YES;
serverVisible = NO;
rootlessMenuBarVisible = YES;
queueShowServer = YES;
quartzServerQuitting = NO;
mouseState = 0;
- eventWriteFD = quartzEventWriteFD;
- windowClass = [NSWindow class];
// set up a port to safely send messages to main thread from server thread
signalPort = [[NSPort port] retain];
@@ -145,6 +141,11 @@ static io_connect_t root_port;
[[NSRunLoop currentRunLoop] addPort:signalPort
forMode:NSModalPanelRunLoopMode];
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(windowBecameKey:)
+ name:NSWindowDidBecomeKeyNotification
+ object:nil];
+
return self;
}
@@ -164,7 +165,7 @@ static io_connect_t root_port;
[self showServer:NO];
sendServerEvents = NO;
- if (clientPID != 0 || !quartzStartClients) {
+ if (!quitWithoutQuery && (clientPID != 0 || !quartzStartClients)) {
int but;
but = NSRunAlertPanel(NSLocalizedString(@"Quit X server?",@""),
@@ -270,11 +271,18 @@ static io_connect_t root_port;
break;
case NSLeftMouseDown:
[self getMousePosition:&xe fromEvent:anEvent];
- if (quartzRootless &&
- ! ([anEvent window] &&
- [[anEvent window] isKindOfClass:windowClass])) {
- // Click in non X window - ignore
- return NO;
+ 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;
xe.u.u.type = ButtonPress;
@@ -310,6 +318,8 @@ static io_connect_t root_port;
break;
case NSKeyDown:
case NSKeyUp:
+ if (!x11Active)
+ return NO;
// If the mouse is not on the valid X display area,
// we don't send the X server key events.
if (![self getMousePosition:&xe fromEvent:nil])
@@ -321,6 +331,8 @@ static io_connect_t root_port;
xe.u.u.detail = [anEvent keyCode];
break;
case NSFlagsChanged:
+ if (!x11Active)
+ return NO;
[self getMousePosition:&xe fromEvent:nil];
xe.u.u.type = kXDarwinUpdateModifiers;
xe.u.clientMessage.u.l.longs0 = flags;
@@ -335,14 +347,13 @@ static io_connect_t root_port;
[self sendXEvent:&xe];
- // Rootless: Send first NSLeftMouseDown to windows and views so window
- // ordering can be suppressed.
+ // 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] isKindOfClass:windowClass])
+ [anEvent clickCount] == 1 && [anEvent window])
{
return NO;
}
@@ -429,6 +440,27 @@ static io_connect_t root_port;
}
}
+
+// 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
{
@@ -455,6 +487,9 @@ static io_connect_t root_port;
else
NSLog(@"No version");
+ if (![self loadDisplayBundle])
+ [NSApp terminate:nil];
+
// Start the X server thread
serverState = server_Starting;
[NSThread detachNewThreadSelector:@selector(run) toTarget:self
@@ -517,6 +552,19 @@ static io_connect_t root_port;
if (quartzServerQuitting) {
[self quitServer];
[NSApp replyToApplicationShouldTerminate:YES];
+ return;
+ }
+
+ if (pendingClients) {
+ NSEnumerator *enumerator = [pendingClients objectEnumerator];
+ NSString *filename;
+
+ while ((filename = [enumerator nextObject])) {
+ [self runClient:filename];
+ }
+
+ [pendingClients release];
+ pendingClients = nil;
}
}
@@ -666,6 +714,87 @@ static io_connect_t root_port;
return YES;
}
+// Start the specified client in its own task
+// FIXME: This should be unified with startXClients
+- (void)runClient:(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";
+
+ /* 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/X11R6/bin", tem);
+ else
+ snprintf(buf, sizeof(buf), "/bin:/usr/bin:/usr/X11R6/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
{
@@ -712,6 +841,12 @@ static io_connect_t root_port;
[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
{
@@ -787,11 +922,10 @@ static io_connect_t root_port;
if (show) {
if (!quartzRootless) {
- QuartzFSCapture();
+ quartzProcs->CaptureScreens();
HideMenuBar();
}
- xe.u.u.type = kXDarwinShow;
- [self sendXEvent:&xe];
+ [self activateX11:YES];
// the mouse location will have moved; track it
xe.u.u.type = MotionNotify;
@@ -802,14 +936,19 @@ static io_connect_t root_port;
xe.u.clientMessage.u.l.longs0 = [[NSApp currentEvent] modifierFlags];
[self sendXEvent:&xe];
- // put the pasteboard into the X cut buffer
- [self readPasteboard];
+ // 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 {
- // put the X cut buffer on the pasteboard
- [self writePasteboard];
+ // 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];
+ }
- xe.u.u.type = kXDarwinHide;
- [self sendXEvent:&xe];
+ [self activateX11:NO];
}
serverVisible = show;
@@ -877,7 +1016,7 @@ static io_connect_t root_port;
}
#endif
- ENQUEUE(xe);
+ DarwinEQEnqueue(xe);
}
// Handle messages from the X server thread
@@ -885,12 +1024,12 @@ static io_connect_t root_port;
{
unsigned msg = [portMessage msgid];
- switch(msg) {
+ switch (msg) {
case kQuartzServerHidden:
// Make sure the X server wasn't queued to be shown again while
// the hide was pending.
if (!quartzRootless && !serverVisible) {
- QuartzFSRelease();
+ quartzProcs->ReleaseScreens();
ShowMenuBar();
}
break;
@@ -908,13 +1047,43 @@ static io_connect_t root_port;
break;
case kQuartzCursorUpdate:
- QuartzReallySetCursor();
+ if (quartzProcs->CursorUpdate)
+ quartzProcs->CursorUpdate();
break;
case kQuartzPostEvent:
{
const xEvent *xe = [[[portMessage components] lastObject] bytes];
- ENQUEUE(xe);
+ 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;
}
@@ -939,6 +1108,234 @@ static io_connect_t root_port;
}
}
+// 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:(NSWindow *)window
+{
+ 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)applicationDidHide:(NSNotification *)aNotification
+{
+ if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0) {
+ QuartzMessageServerThread(kXDarwinControllerNotify, 1,
+ AppleWMHideAll);
+ } else {
+ // FIXME: We need to hide Xplugin windows here
+ }
+}
+
+- (void)applicationDidUnhide:(NSNotification *)aNotification
+{
+ if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0) {
+ QuartzMessageServerThread(kXDarwinControllerNotify, 1,
+ AppleWMShowAll);
+ } else {
+ [NSApp arrangeInFront:nil];
+ }
+}
+
// Called when the user clicks the application icon,
// but not when Cmd-Tab is used.
// Rootless: Don't switch until applicationWillBecomeActive.
@@ -958,8 +1355,38 @@ static io_connect_t root_port;
- (void)applicationWillBecomeActive:(NSNotification *)aNotification
{
- if (quartzRootless)
+ 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
@@ -970,7 +1397,7 @@ static io_connect_t root_port;
// NSPort is not thread safe.
void QuartzMessageMainThread(unsigned msg, void *data, unsigned length)
{
- if (msg == kQuartzPostEvent) {
+ if (length > 0) {
NSData *eventData = [NSData dataWithBytes:data length:length];
NSArray *eventArray = [NSArray arrayWithObject:eventData];
NSPortMessage *newMessage =
@@ -986,6 +1413,36 @@ void QuartzMessageMainThread(unsigned msg, void *data, unsigned length)
}
}
+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)
{
@@ -1025,5 +1482,5 @@ static void powerDidChange(
}
break;
}
-
+
}
diff --git a/hw/darwin/quartz/pseudoramiX.c b/hw/darwin/quartz/pseudoramiX.c
index e55aabd6f..2dd7c3ae5 100644
--- a/hw/darwin/quartz/pseudoramiX.c
+++ b/hw/darwin/quartz/pseudoramiX.c
@@ -32,7 +32,7 @@ shall not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.c,v 1.2 2002/10/16 21:13:33 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.c,v 1.3 2003/04/30 23:15:39 torrey Exp $ */
#include "pseudoramiX.h"
@@ -111,7 +111,7 @@ void PseudoramiXExtensionInit(int argc, char *argv[])
if (noPseudoramiXExtension) return;
- if (pseudoramiXNumScreens == 1 || aquaNumScreens == 1) {
+ if (pseudoramiXNumScreens == 1) {
// Only one screen - disable Xinerama extension.
noPseudoramiXExtension = TRUE;
return;
diff --git a/hw/darwin/quartz/pseudoramiX.h b/hw/darwin/quartz/pseudoramiX.h
index d0d596686..23738cfb3 100644
--- a/hw/darwin/quartz/pseudoramiX.h
+++ b/hw/darwin/quartz/pseudoramiX.h
@@ -1,10 +1,9 @@
/*
* Minimal implementation of PanoramiX/Xinerama
*/
-/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.h,v 1.1 2002/03/28 02:21:18 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.h,v 1.2 2003/04/30 23:15:39 torrey Exp $ */
extern int noPseudoramiXExtension;
-extern int aquaNumScreens;
void PseudoramiXAddScreen(int x, int y, int w, int h);
void PseudoramiXExtensionInit(int argc, char *argv[]);
diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c
index 592a0e4a0..4643886f3 100644
--- a/hw/darwin/quartz/quartz.c
+++ b/hw/darwin/quartz/quartz.c
@@ -29,16 +29,16 @@
* 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/quartz.c,v 1.7 2003/01/23 00:34:26 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartz.c,v 1.13 2003/11/12 20:21:51 torrey Exp $ */
#include "quartzCommon.h"
#include "quartz.h"
#include "darwin.h"
#include "quartzAudio.h"
-#include "quartzCursor.h"
-#include "fullscreen.h"
-#include "rootlessAqua.h"
#include "pseudoramiX.h"
+#define _APPLEWM_SERVER_
+#include "applewm.h"
+#include "applewmExt.h"
// X headers
#include "scrnintstr.h"
@@ -61,8 +61,8 @@ int quartzServerQuitting = FALSE;
int quartzScreenIndex = 0;
int aquaMenuBarHeight = 0;
int noPseudoramiXExtension = TRUE;
-int aquaNumScreens = 0;
-
+QuartzModeProcsPtr quartzProcs = NULL;
+const char *quartzOpenGLBundle = NULL;
/*
===========================================================================
@@ -73,10 +73,10 @@ int aquaNumScreens = 0;
*/
/*
- * QuartzAddScreen
+ * DarwinModeAddScreen
* Do mode dependent initialization of each screen for Quartz.
*/
-Bool QuartzAddScreen(
+Bool DarwinModeAddScreen(
int index,
ScreenPtr pScreen)
{
@@ -84,34 +84,25 @@ Bool QuartzAddScreen(
QuartzScreenPtr displayInfo = xcalloc(sizeof(QuartzScreenRec), 1);
QUARTZ_PRIV(pScreen) = displayInfo;
- // do full screen or rootless specific initialization
- if (quartzRootless) {
- return AquaAddScreen(index, pScreen);
- } else {
- return QuartzFSAddScreen(index, pScreen);
- }
+ // do Quartz mode specific initialization
+ return quartzProcs->AddScreen(index, pScreen);
}
/*
- * QuartzSetupScreen
+ * DarwinModeSetupScreen
* Finalize mode specific setup of each screen.
*/
-Bool QuartzSetupScreen(
+Bool DarwinModeSetupScreen(
int index,
ScreenPtr pScreen)
{
- // do full screen or rootless specific setup
- if (quartzRootless) {
- if (! AquaSetupScreen(index, pScreen))
- return FALSE;
- } else {
- if (! QuartzFSSetupScreen(index, pScreen))
- return FALSE;
- }
+ // do Quartz mode specific setup
+ if (! quartzProcs->SetupScreen(index, pScreen))
+ return FALSE;
// setup cursor support
- if (! QuartzInitCursor(pScreen))
+ if (! quartzProcs->InitCursor(pScreen))
return FALSE;
return TRUE;
@@ -119,10 +110,10 @@ Bool QuartzSetupScreen(
/*
- * QuartzInitOutput
+ * DarwinModeInitOutput
* Quartz display initialization.
*/
-void QuartzInitOutput(
+void DarwinModeInitOutput(
int argc,
char **argv )
{
@@ -145,13 +136,8 @@ void QuartzInitOutput(
FatalError("Could not register block and wakeup handlers.");
}
- if (quartzRootless) {
- ErrorF("Display mode: Rootless Quartz\n");
- AquaDisplayInit();
- } else {
- ErrorF("Display mode: Full screen Quartz\n");
- QuartzFSDisplayInit();
- }
+ // Do display mode specific initialization
+ quartzProcs->DisplayInit();
// Init PseudoramiX implementation of Xinerama.
// This should be in InitExtensions, but that causes link errors
@@ -163,21 +149,28 @@ void QuartzInitOutput(
/*
- * QuartzInitInput
+ * DarwinModeInitInput
* Inform the main thread the X server is ready to handle events.
*/
-void QuartzInitInput(
+void DarwinModeInitInput(
int argc,
char **argv )
{
- QuartzMessageMainThread(kQuartzServerStarted, NULL, 0);
+ if (serverGeneration == 1) {
+ QuartzMessageMainThread(kQuartzServerStarted, NULL, 0);
+ }
+
+ // Do final display mode specific initialization before handling events
+ if (quartzProcs->InitInput)
+ quartzProcs->InitInput(argc, argv);
}
/*
* QuartzShow
* Show the X server on screen. Does nothing if already shown.
- * Restore the X clip regions and the X server cursor state.
+ * 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
@@ -189,9 +182,7 @@ static void QuartzShow(
quartzServerVisible = TRUE;
for (i = 0; i < screenInfo.numScreens; i++) {
if (screenInfo.screens[i]) {
- QuartzResumeXCursor(screenInfo.screens[i], x, y);
- if (!quartzRootless)
- xf86SetRootClip(screenInfo.screens[i], TRUE);
+ quartzProcs->ResumeScreen(screenInfo.screens[i], x, y);
}
}
}
@@ -201,8 +192,8 @@ static void QuartzShow(
/*
* QuartzHide
* Remove the X server display from the screen. Does nothing if already
- * hidden. Set X clip regions to prevent drawing, and restore the Aqua
- * cursor.
+ * 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)
{
@@ -211,9 +202,7 @@ static void QuartzHide(void)
if (quartzServerVisible) {
for (i = 0; i < screenInfo.numScreens; i++) {
if (screenInfo.screens[i]) {
- QuartzSuspendXCursor(screenInfo.screens[i]);
- if (!quartzRootless)
- xf86SetRootClip(screenInfo.screens[i], FALSE);
+ quartzProcs->SuspendScreen(screenInfo.screens[i]);
}
}
}
@@ -243,20 +232,58 @@ static void QuartzSetRootClip(
/*
- * QuartzProcessEvent
+ * 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 QuartzProcessEvent(
+void DarwinModeProcessEvent(
xEvent *xe)
{
switch (xe->u.u.type) {
- case kXDarwinShow:
+ case kXDarwinActivate:
QuartzShow(xe->u.keyButtonPointer.rootX,
xe->u.keyButtonPointer.rootY);
+ AppleWMSendEvent(AppleWMActivationNotify,
+ AppleWMActivationNotifyMask,
+ AppleWMIsActive, 0);
break;
- case kXDarwinHide:
+ case kXDarwinDeactivate:
+ AppleWMSendEvent(AppleWMActivationNotify,
+ AppleWMActivationNotifyMask,
+ AppleWMIsInactive, 0);
QuartzHide();
break;
@@ -276,18 +303,42 @@ void QuartzProcessEvent(
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:
+ case kXDarwinWindowState:
+ case kXDarwinWindowMoved:
+ // FIXME: Not implemented yet
+ break;
+
default:
- ErrorF("Unknown application defined event.\n");
+ ErrorF("Unknown application defined event type %d.\n",
+ xe->u.u.type);
}
}
/*
- * QuartzGiveUp
+ * DarwinModeGiveUp
* Cleanup before X server shutdown
* Release the screen and restore the Aqua cursor.
*/
-void QuartzGiveUp(void)
+void DarwinModeGiveUp(void)
{
#if 0
// Trying to switch cursors when quitting causes deadlock
@@ -301,5 +352,5 @@ void QuartzGiveUp(void)
#endif
if (!quartzRootless)
- QuartzFSRelease();
+ quartzProcs->ReleaseScreens();
}
diff --git a/hw/darwin/quartz/quartz.h b/hw/darwin/quartz/quartz.h
index cd4f732f3..849e10cef 100644
--- a/hw/darwin/quartz/quartz.h
+++ b/hw/darwin/quartz/quartz.h
@@ -1,11 +1,11 @@
/*
* quartz.h
*
- * External interface of the Quartz modes seen by the generic, mode
+ * External interface of the Quartz display modes seen by the generic, mode
* independent parts of the Darwin X server.
*/
/*
- * Copyright (c) 2001-2002 Greg Parker and Torrey T. Lyons.
+ * 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
@@ -30,21 +30,88 @@
* 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/quartz.h,v 1.4 2002/11/20 23:51:58 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartz.h,v 1.7 2003/11/12 20:21:51 torrey Exp $ */
#ifndef _QUARTZ_H
#define _QUARTZ_H
-#include "screenint.h"
-#include "Xproto.h"
#include "quartzPasteboard.h"
-int QuartzProcessArgument(int argc, char *argv[], int i);
-void QuartzInitOutput(int argc, char **argv);
-void QuartzInitInput(int argc, char **argv);
-Bool QuartzAddScreen(int index, ScreenPtr pScreen);
-Bool QuartzSetupScreen(int index, ScreenPtr pScreen);
-void QuartzGiveUp(void);
-void QuartzProcessEvent(xEvent *xe);
+#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);
+
+/*
+ * Rootless helper functions
+ */
+typedef Bool (*IsX11WindowProc)(void *nsWindow, int windowNumber);
+
+/*
+ * 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
+
+ IsX11WindowProc IsX11Window;
+
+ FrameForWindowProc FrameForWindow;
+ TopLevelParentProc TopLevelParent;
+ CreateSurfaceProc CreateSurface;
+ DestroySurfaceProc DestroySurface;
+} QuartzModeProcsRec, *QuartzModeProcsPtr;
+
+extern QuartzModeProcsPtr quartzProcs;
+
+Bool QuartzLoadDisplayBundle(const char *dpyBundleName);
#endif
diff --git a/hw/darwin/quartz/quartzAudio.c b/hw/darwin/quartz/quartzAudio.c
index 2dfb313b7..a3e6af127 100644
--- a/hw/darwin/quartz/quartzAudio.c
+++ b/hw/darwin/quartz/quartzAudio.c
@@ -35,7 +35,7 @@
* 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/quartzAudio.c,v 1.1 2002/03/28 02:21:18 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzAudio.c,v 1.2 2003/05/14 05:27:56 torrey Exp $ */
#include "quartzCommon.h"
#include "quartzAudio.h"
@@ -242,10 +242,10 @@ static void QuartzCoreAudioBell(
/*
- * QuartzBell
+ * DarwinModeBell
* Ring the bell
*/
-void QuartzBell(
+void DarwinModeBell(
int volume, // volume in percent of max
DeviceIntPtr pDevice,
pointer ctrl,
diff --git a/hw/darwin/quartz/quartzCocoa.m b/hw/darwin/quartz/quartzCocoa.m
index d6d9bbe32..bba71c041 100644
--- a/hw/darwin/quartz/quartzCocoa.m
+++ b/hw/darwin/quartz/quartzCocoa.m
@@ -33,12 +33,17 @@
* 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/quartzCocoa.m,v 1.3 2003/01/19 06:52:54 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCocoa.m,v 1.4 2003/05/14 05:27:56 torrey Exp $ */
+
+#include "quartzCommon.h"
+
+#define BOOL xBOOL
+#include "darwin.h"
+#undef BOOL
#include <Cocoa/Cocoa.h>
#import "Preferences.h"
-#include "quartzCommon.h"
#include "pseudoramiX.h"
extern void FatalError(const char *, ...);
@@ -57,7 +62,7 @@ void QuartzReadPreferences(void)
darwinFakeButtons = [Preferences fakeButtons];
darwinFakeMouse2Mask = [Preferences button2Mask];
darwinFakeMouse3Mask = [Preferences button3Mask];
- quartzMouseAccelChange = [Preferences mouseAccelChange];
+ darwinMouseAccelChange = [Preferences mouseAccelChange];
quartzUseSysBeep = [Preferences systemBeep];
// quartzRootless has already been set
diff --git a/hw/darwin/quartz/quartzCommon.h b/hw/darwin/quartz/quartzCommon.h
index 6c375bd04..e3ae4b850 100644
--- a/hw/darwin/quartz/quartzCommon.h
+++ b/hw/darwin/quartz/quartzCommon.h
@@ -31,7 +31,7 @@
* 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/quartzCommon.h,v 1.8 2003/01/23 00:34:26 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCommon.h,v 1.14 2003/11/12 20:21:51 torrey Exp $ */
#ifndef _QUARTZCOMMON_H
#define _QUARTZCOMMON_H
@@ -48,8 +48,6 @@
#undef WindowPtr
#undef Picture
-#include "quartzShared.h"
-
// Quartz specific per screen storage structure
typedef struct {
// List of CoreGraphics displays that this X11 screen covers.
@@ -78,11 +76,17 @@ 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);
+int QuartzFSUseQDCursor(int depth);
void QuartzBlockHandler(void *blockData, void *pTimeout, void *pReadmask);
void QuartzWakeupHandler(void *blockData, int result, void *pReadmask);
@@ -92,7 +96,11 @@ enum {
kQuartzServerStarted,
kQuartzServerDied,
kQuartzCursorUpdate,
- kQuartzPostEvent
+ kQuartzPostEvent,
+ kQuartzSetWindowMenu,
+ kQuartzSetWindowMenuCheck,
+ kQuartzSetFrontProcess,
+ kQuartzSetCanQuit
};
#endif /* _QUARTZCOMMON_H */
diff --git a/hw/darwin/quartz/quartzStartup.c b/hw/darwin/quartz/quartzStartup.c
index dfa7b8166..bb7c7d214 100644
--- a/hw/darwin/quartz/quartzStartup.c
+++ b/hw/darwin/quartz/quartzStartup.c
@@ -28,13 +28,14 @@
* 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/quartzStartup.c,v 1.3 2003/01/19 06:35:13 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzStartup.c,v 1.9 2003/11/15 00:07:09 torrey Exp $ */
#include <fcntl.h>
#include <unistd.h>
#include <CoreFoundation/CoreFoundation.h>
#include "quartzCommon.h"
#include "darwin.h"
+#include "quartz.h"
#include "opaque.h"
#include "micmap.h"
@@ -50,6 +51,8 @@ static GlxExtensionInitPtr GlxExtensionInit = NULL;
typedef void (*GlxWrapInitVisualsPtr)(miInitVisualsProcPtr *);
static GlxWrapInitVisualsPtr GlxWrapInitVisuals = NULL;
+typedef Bool (*QuartzModeBundleInitPtr)(void);
+
/*
* DarwinHandleGUI
@@ -76,19 +79,25 @@ void DarwinHandleGUI(
// Make a pipe to pass events
assert( pipe(fd) == 0 );
- darwinEventFD = fd[0];
- quartzEventWriteFD = fd[1];
- fcntl(darwinEventFD, F_SETFL, O_NONBLOCK);
+ 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;
- // Determine if we need to start X clients
- // and what display mode to use
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")) {
@@ -98,13 +107,70 @@ void DarwinHandleGUI(
}
}
- quartz = TRUE;
main_exit = NSApplicationMain(argc, argv);
exit(main_exit);
}
/*
+ * 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;
+}
+
+
+/*
* LoadGlxBundle
* The Quartz mode X server needs to dynamically load the appropriate
* bundle before initializing GLX.
@@ -122,10 +188,14 @@ static void LoadGlxBundle(void)
// Choose the bundle to load
ErrorF("Loading GLX bundle ");
if (quartzUseAGL) {
- bundleName = CFSTR("glxAGL.bundle");
- ErrorF("glxAGL.bundle (using Apple's OpenGL)\n");
+ 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");
}
@@ -155,7 +225,7 @@ static void LoadGlxBundle(void)
}
// Release the CF objects
- CFRelease(mainBundle);
+ CFRelease(bundleName);
CFRelease(bundleURL);
}
@@ -186,7 +256,7 @@ void DarwinGlxWrapInitVisuals(
}
-int QuartzProcessArgument( int argc, char *argv[], int i )
+int DarwinModeProcessArgument( int argc, char *argv[], int i )
{
// fullscreen: CoreGraphics full-screen mode
// rootless: Cocoa rootless mode
@@ -208,7 +278,7 @@ int QuartzProcessArgument( int argc, char *argv[], int i )
QUARTZ_SAFETY_DELAY );
#endif
return 1;
- }
+ }
if ( !strcmp( argv[i], "-quartz" ) ) {
ErrorF( "Running in parallel with Mac OS X Quartz window server.\n" );
diff --git a/hw/darwin/utils/dumpkeymap.c b/hw/darwin/utils/dumpkeymap.c
index c1b6ea15b..a264cbc10 100644
--- a/hw/darwin/utils/dumpkeymap.c
+++ b/hw/darwin/utils/dumpkeymap.c
@@ -1,4 +1,4 @@
-// $XFree86: xc/programs/Xserver/hw/darwin/utils/dumpkeymap.c,v 1.3 2000/12/05 21:18:34 dawes Exp $
+// $XFree86: xc/programs/Xserver/hw/darwin/utils/dumpkeymap.c,v 1.4 2003/04/13 14:52:51 herrb Exp $
//=============================================================================
//
// Copyright (C) 1999,2000 by Eric Sunshine <sunshine@sunshineco.com>
@@ -141,6 +141,7 @@
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <sys/stat.h>
#if !defined(DUMPKEYMAP_FILE_ONLY)
#include <drivers/event_status_driver.h>
diff --git a/hw/vfb/InitInput.c b/hw/vfb/InitInput.c
index 71d879fa7..345526d19 100644
--- a/hw/vfb/InitInput.c
+++ b/hw/vfb/InitInput.c
@@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/programs/Xserver/hw/vfb/InitInput.c,v 3.9 2001/12/14 19:59:45 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/vfb/InitInput.c,v 3.10 2003/11/16 03:16:59 dawes Exp $ */
#include "X11/X.h"
#define NEED_EVENTS
@@ -41,9 +41,7 @@ from The Open Group.
#include "keysym.h"
Bool
-LegalModifier(key, pDev)
- unsigned int key;
- DevicePtr pDev;
+LegalModifier(unsigned int key, DevicePtr pDev)
{
return TRUE;
}
@@ -63,9 +61,7 @@ KeySym map[MAP_LENGTH * LK201_GLYPHS_PER_KEY];
* easy to lift.
*/
static Bool
-GetLK201Mappings(pKeySyms, pModMap)
- KeySymsPtr pKeySyms;
- CARD8 *pModMap;
+GetLK201Mappings(KeySymsPtr pKeySyms, CARD8 *pModMap)
{
#define INDEX(in) ((in - VFB_MIN_KEY) * LK201_GLYPHS_PER_KEY)
int i;
@@ -257,9 +253,7 @@ GetLK201Mappings(pKeySyms, pModMap)
}
static int
-vfbKeybdProc(pDevice, onoff)
- DeviceIntPtr pDevice;
- int onoff;
+vfbKeybdProc(DeviceIntPtr pDevice, int onoff)
{
KeySymsRec keySyms;
CARD8 modMap[MAP_LENGTH];
@@ -285,9 +279,7 @@ vfbKeybdProc(pDevice, onoff)
}
static int
-vfbMouseProc(pDevice, onoff)
- DeviceIntPtr pDevice;
- int onoff;
+vfbMouseProc(DeviceIntPtr pDevice, int onoff)
{
BYTE map[4];
DevicePtr pDev = (DevicePtr)pDevice;
@@ -317,9 +309,7 @@ vfbMouseProc(pDevice, onoff)
}
void
-InitInput(argc, argv)
- int argc;
- char *argv[];
+InitInput(int argc, char *argv[])
{
DeviceIntPtr p, k;
p = AddInputDevice(vfbMouseProc, TRUE);
@@ -332,26 +322,18 @@ InitInput(argc, argv)
#ifdef XTESTEXT1
void
-XTestGenerateEvent(dev_type, keycode, keystate, mousex, mousey)
- int dev_type;
- int keycode;
- int keystate;
- int mousex;
- int mousey;
+XTestGenerateEvent(int dev_type, int keycode, int keystate, int mousex,
+ int mousey)
{
}
void
-XTestGetPointerPos(fmousex, fmousey)
- short *fmousex, *fmousey;
+XTestGetPointerPos(short *fmousex, short *fmousey)
{
}
void
-XTestJumpPointer(jx, jy, dev_type)
- int jx;
- int jy;
- int dev_type;
+XTestJumpPointer(int jx, int jy, int dev_type)
{
}
#endif
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index 378728c0c..25f426232 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/programs/Xserver/hw/vfb/InitOutput.c,v 3.22 2003/01/15 02:34:07 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/vfb/InitOutput.c,v 3.26 2003/11/16 03:16:59 dawes Exp $ */
#if defined(WIN32)
#include <X11/Xwinsock.h>
@@ -66,8 +66,6 @@ from The Open Group.
#include "miline.h"
#include "mfb.h"
-extern char *display;
-
#define VFB_DEFAULT_WIDTH 1280
#define VFB_DEFAULT_HEIGHT 1024
#define VFB_DEFAULT_DEPTH 8
@@ -80,6 +78,7 @@ typedef struct
{
int scrnum;
int width;
+ int paddedBytesWidth;
int paddedWidth;
int height;
int depth;
@@ -92,6 +91,7 @@ typedef struct
Pixel blackPixel;
Pixel whitePixel;
unsigned int lineBias;
+ CloseScreenProcPtr closeScreen;
#ifdef HAS_MMAP
int mmap_fd;
@@ -125,7 +125,7 @@ static Bool Render = TRUE;
static void
-vfbInitializePixmapDepths()
+vfbInitializePixmapDepths(void)
{
int i;
vfbPixmapDepths[1] = TRUE; /* always need bitmaps */
@@ -134,7 +134,7 @@ vfbInitializePixmapDepths()
}
static void
-vfbInitializeDefaultScreens()
+vfbInitializeDefaultScreens(void)
{
int i;
@@ -153,8 +153,7 @@ vfbInitializeDefaultScreens()
}
static int
-vfbBitsPerPixel(depth)
- int depth;
+vfbBitsPerPixel(int depth)
{
if (depth == 1) return 1;
else if (depth <= 8) return 8;
@@ -275,10 +274,7 @@ ddxUseMsg()
}
int
-ddxProcessArgument (argc, argv, i)
- int argc;
- char *argv[];
- int i;
+ddxProcessArgument(int argc, char *argv[], int i)
{
static Bool firstTime = TRUE;
@@ -438,8 +434,7 @@ GetTimeInMillis()
static Bool
-vfbMultiDepthCreateGC(pGC)
- GCPtr pGC;
+vfbMultiDepthCreateGC(GCPtr pGC)
{
switch (vfbBitsPerPixel(pGC->depth))
{
@@ -452,13 +447,13 @@ vfbMultiDepthCreateGC(pGC)
}
static void
-vfbMultiDepthGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart)
- 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 *pdstStart; /* where to put the bits */
+vfbMultiDepthGetSpans(
+ 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 *pdstStart) /* where to put the bits */
{
switch (pDrawable->bitsPerPixel) {
case 1:
@@ -474,12 +469,9 @@ vfbMultiDepthGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart)
}
static void
-vfbMultiDepthGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine)
- DrawablePtr pDrawable;
- int sx, sy, w, h;
- unsigned int format;
- unsigned long planeMask;
- char *pdstLine;
+vfbMultiDepthGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
+ unsigned int format, unsigned long planeMask,
+ char *pdstLine)
{
switch (pDrawable->bitsPerPixel)
{
@@ -497,9 +489,7 @@ vfbMultiDepthGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine)
static ColormapPtr InstalledMaps[MAXSCREENS];
static int
-vfbListInstalledColormaps(pScreen, pmaps)
- ScreenPtr pScreen;
- Colormap *pmaps;
+vfbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
{
/* By the time we are processing requests, we can guarantee that there
* is always a colormap installed */
@@ -509,8 +499,7 @@ vfbListInstalledColormaps(pScreen, pmaps)
static void
-vfbInstallColormap(pmap)
- ColormapPtr pmap;
+vfbInstallColormap(ColormapPtr pmap)
{
int index = pmap->pScreen->myNum;
ColormapPtr oldpmap = InstalledMaps[index];
@@ -568,8 +557,7 @@ vfbInstallColormap(pmap)
}
static void
-vfbUninstallColormap(pmap)
- ColormapPtr pmap;
+vfbUninstallColormap(ColormapPtr pmap)
{
ColormapPtr curpmap = InstalledMaps[pmap->pScreen->myNum];
@@ -585,10 +573,7 @@ vfbUninstallColormap(pmap)
}
static void
-vfbStoreColors(pmap, ndef, pdefs)
- ColormapPtr pmap;
- int ndef;
- xColorItem *pdefs;
+vfbStoreColors(ColormapPtr pmap, int ndef, xColorItem *pdefs)
{
XWDColor *pXWDCmap;
int i;
@@ -623,9 +608,7 @@ vfbStoreColors(pmap, ndef, pdefs)
}
static Bool
-vfbSaveScreen(pScreen, on)
- ScreenPtr pScreen;
- int on;
+vfbSaveScreen(ScreenPtr pScreen, int on)
{
return TRUE;
}
@@ -634,10 +617,7 @@ vfbSaveScreen(pScreen, on)
/* this flushes any changes to the screens out to the mmapped file */
static void
-vfbBlockHandler(blockData, pTimeout, pReadmask)
- pointer blockData;
- OSTimePtr pTimeout;
- pointer pReadmask;
+vfbBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask)
{
int i;
@@ -660,17 +640,13 @@ vfbBlockHandler(blockData, pTimeout, pReadmask)
static void
-vfbWakeupHandler(blockData, result, pReadmask)
- pointer blockData;
- int result;
- pointer pReadmask;
+vfbWakeupHandler(pointer blockData, int result, pointer pReadmask)
{
}
static void
-vfbAllocateMmappedFramebuffer(pvfb)
- vfbScreenInfoPtr pvfb;
+vfbAllocateMmappedFramebuffer(vfbScreenInfoPtr pvfb)
{
#define DUMMY_BUFFER_SIZE 65536
char dummyBuffer[DUMMY_BUFFER_SIZE];
@@ -726,8 +702,7 @@ vfbAllocateMmappedFramebuffer(pvfb)
#ifdef HAS_SHM
static void
-vfbAllocateSharedMemoryFramebuffer(pvfb)
- vfbScreenInfoPtr pvfb;
+vfbAllocateSharedMemoryFramebuffer(vfbScreenInfoPtr pvfb)
{
/* create the shared memory segment */
@@ -755,16 +730,11 @@ vfbAllocateSharedMemoryFramebuffer(pvfb)
#endif /* HAS_SHM */
static char *
-vfbAllocateFramebufferMemory(pvfb)
- vfbScreenInfoPtr pvfb;
+vfbAllocateFramebufferMemory(vfbScreenInfoPtr pvfb)
{
if (pvfb->pfbMemory) return pvfb->pfbMemory; /* already done */
- if (pvfb->bitsPerPixel == 1)
- pvfb->sizeInBytes = (pvfb->paddedWidth * pvfb->height);
- else
- pvfb->sizeInBytes = pvfb->paddedWidth * pvfb->height *
- (pvfb->bitsPerPixel/8);
+ pvfb->sizeInBytes = pvfb->paddedBytesWidth * pvfb->height;
/* Calculate how many entries in colormap. This is rather bogus, because
* the visuals haven't even been set up yet, but we need to know because we
@@ -822,8 +792,7 @@ vfbAllocateFramebufferMemory(pvfb)
static void
-vfbWriteXWDFileHeader(pScreen)
- ScreenPtr pScreen;
+vfbWriteXWDFileHeader(ScreenPtr pScreen)
{
vfbScreenInfoPtr pvfb = &vfbScreens[pScreen->myNum];
XWDFileHeader *pXWDHeader = pvfb->pXWDHeader;
@@ -852,7 +821,7 @@ vfbWriteXWDFileHeader(pScreen)
pXWDHeader->bitmap_pad = BITMAP_SCANLINE_PAD_PROTO;
#endif
pXWDHeader->bits_per_pixel = pvfb->bitsPerPixel;
- pXWDHeader->bytes_per_line = pvfb->paddedWidth;
+ pXWDHeader->bytes_per_line = pvfb->paddedBytesWidth;
pXWDHeader->ncolors = pvfb->ncolors;
/* visual related fields are written when colormap is installed */
@@ -891,17 +860,13 @@ vfbWriteXWDFileHeader(pScreen)
static Bool
-vfbCursorOffScreen (ppScreen, x, y)
- ScreenPtr *ppScreen;
- int *x, *y;
+vfbCursorOffScreen (ScreenPtr *ppScreen, int *x, int *y)
{
return FALSE;
}
static void
-vfbCrossScreen (pScreen, entering)
- ScreenPtr pScreen;
- Bool entering;
+vfbCrossScreen (ScreenPtr pScreen, Bool entering)
{
}
@@ -913,19 +878,37 @@ static miPointerScreenFuncRec vfbPointerCursorFuncs =
};
static Bool
-vfbScreenInit(index, pScreen, argc, argv)
- int index;
- ScreenPtr pScreen;
- int argc;
- char ** argv;
+vfbCloseScreen(int index, ScreenPtr pScreen)
+{
+ vfbScreenInfoPtr pvfb = &vfbScreens[index];
+ int i;
+
+ pScreen->CloseScreen = pvfb->closeScreen;
+
+ /*
+ * XXX probably lots of stuff to clean. For now,
+ * clear InstalledMaps[] so that server reset works correctly.
+ */
+ for (i = 0; i < MAXSCREENS; i++)
+ InstalledMaps[i] = NULL;
+
+ return pScreen->CloseScreen(index, pScreen);
+}
+
+static Bool
+vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
{
vfbScreenInfoPtr pvfb = &vfbScreens[index];
int dpix = 100, dpiy = 100;
int ret;
char *pbits;
- pvfb->paddedWidth = PixmapBytePad(pvfb->width, pvfb->depth);
+ pvfb->paddedBytesWidth = PixmapBytePad(pvfb->width, pvfb->depth);
pvfb->bitsPerPixel = vfbBitsPerPixel(pvfb->depth);
+ if (pvfb->bitsPerPixel >= 8 )
+ pvfb->paddedWidth = pvfb->paddedBytesWidth / (pvfb->bitsPerPixel / 8);
+ else
+ pvfb->paddedWidth = pvfb->paddedBytesWidth * 8;
pbits = vfbAllocateFramebufferMemory(pvfb);
if (!pbits) return FALSE;
@@ -935,7 +918,7 @@ vfbScreenInit(index, pScreen, argc, argv)
{
case 1:
ret = mfbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
- dpix, dpiy, pvfb->paddedWidth * 8);
+ dpix, dpiy, pvfb->paddedWidth);
break;
case 8:
case 16:
@@ -988,16 +971,16 @@ vfbScreenInit(index, pScreen, argc, argv)
miSetZeroLineBias(pScreen, pvfb->lineBias);
+ pvfb->closeScreen = pScreen->CloseScreen;
+ pScreen->CloseScreen = vfbCloseScreen;
+
return ret;
} /* end vfbScreenInit */
void
-InitOutput(screenInfo, argc, argv)
- ScreenInfo *screenInfo;
- int argc;
- char **argv;
+InitOutput(ScreenInfo *screenInfo, int argc, char **argv)
{
int i;
int NumFormats = 0;
@@ -1010,9 +993,16 @@ InitOutput(screenInfo, argc, argv)
vfbPixmapDepths[vfbScreens[i].depth] = TRUE;
}
- /* for RENDER we need 32bpp */
- if (Render)
+ /* RENDER needs a good set of pixmaps. */
+ if (Render) {
+ vfbPixmapDepths[1] = TRUE;
+ vfbPixmapDepths[4] = TRUE;
+ vfbPixmapDepths[8] = TRUE;
+ vfbPixmapDepths[15] = TRUE;
+ vfbPixmapDepths[16] = TRUE;
+ vfbPixmapDepths[24] = TRUE;
vfbPixmapDepths[32] = TRUE;
+ }
for (i = 1; i <= 32; i++)
{
diff --git a/hw/xfree86/common/atKeynames.h b/hw/xfree86/common/atKeynames.h
index 23760db5e..17bb21f4d 100644
--- a/hw/xfree86/common/atKeynames.h
+++ b/hw/xfree86/common/atKeynames.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/atKeynames.h,v 3.18 2001/09/29 20:40:30 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/atKeynames.h,v 3.21 2003/10/09 11:43:59 pascal Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
*
@@ -21,6 +21,33 @@
* PERFORMANCE OF THIS SOFTWARE.
*
*/
+/*
+ * Copyright (c) 1994-2003 by The XFree86 Project, 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 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).
+ */
+
/* $XConsortium: atKeynames.h /main/11 1996/03/09 11:17:41 kaleb $ */
#ifndef _ATKEYNAMES_H
@@ -199,6 +226,71 @@
#define KEY_NFER /* No Kanji Transfer 0x7b */ 123
#define KEY_Yen /* Yen 0x7d */ 125
+#define KEY_Power /* Power Key 0x84 */ 132
+#define KEY_Mute /* Audio Mute 0x85 */ 133
+#define KEY_AudioLower /* Audio Lower 0x86 */ 134
+#define KEY_AudioRaise /* Audio Raise 0x87 */ 135
+#define KEY_Help /* Help 0x88 */ 136
+#define KEY_L1 /* Stop 0x89 */ 137
+#define KEY_L2 /* Again 0x8a */ 138
+#define KEY_L3 /* Props 0x8b */ 139
+#define KEY_L4 /* Undo 0x8c */ 140
+#define KEY_L5 /* Front 0x8d */ 141
+#define KEY_L6 /* Copy 0x8e */ 142
+#define KEY_L7 /* Open 0x8f */ 143
+#define KEY_L8 /* Paste 0x90 */ 144
+#define KEY_L9 /* Find 0x91 */ 145
+#define KEY_L10 /* Cut 0x92 */ 146
+
+/*
+ * Fake 'scancodes' in the following ranges are generated for 2-byte
+ * codes not handled elsewhere. These correspond to most extended keys
+ * on so-called "Internet" keyboards:
+ *
+ * 0x79-0x93
+ * 0x96-0xa1
+ * 0xa3-0xac
+ * 0xb1-0xb4
+ * 0xba-0xbd
+ * 0xc2
+ * 0xcc-0xd2
+ * 0xd6-0xf7
+ */
+
+/*
+ * Remapped 'scancodes' are generated for single-byte codes in the range
+ * 0x59-0x5f,0x62-0x76. These are used for some extra keys on some keyboards.
+ */
+
+#define KEY_0x59 0x95
+#define KEY_0x5A 0xA2
+#define KEY_0x5B 0xAD
+#define KEY_0x5C KEY_KP_EQUAL
+#define KEY_0x5D 0xAE
+#define KEY_0x5E 0xAF
+#define KEY_0x5F 0xB0
+#define KEY_0x62 0xB5
+#define KEY_0x63 0xB6
+#define KEY_0x64 0xB7
+#define KEY_0x65 0xB8
+#define KEY_0x66 0xB9
+#define KEY_0x67 0xBE
+#define KEY_0x68 0xBF
+#define KEY_0x69 0xC0
+#define KEY_0x6A 0xC1
+#define KEY_0x6B 0xC3
+#define KEY_0x6C 0xC4
+#define KEY_0x6D 0xC5
+#define KEY_0x6E 0xC6
+#define KEY_0x6F 0xC7
+#define KEY_0x70 0xC8
+#define KEY_0x71 0xC9
+#define KEY_0x72 0xCA
+#define KEY_0x73 0xCB
+#define KEY_0x74 0xD3
+#define KEY_0x75 0xD4
+#define KEY_0x76 0xD5
+
/* These are for "notused" and "unknown" entries in translation maps. */
#define KEY_NOTUSED 0
#define KEY_UNKNOWN 255
diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 4dda2f6c6..bf9fbeee2 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/compiler.h,v 3.99 2003/01/29 15:23:20 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/compiler.h,v 3.104 2003/11/03 05:11:01 tsi Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
*
@@ -21,6 +21,33 @@
* PERFORMANCE OF THIS SOFTWARE.
*
*/
+/*
+ * Copyright (c) 1994-2003 by The XFree86 Project, 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 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).
+ */
+
/* $XConsortium: compiler.h /main/16 1996/10/25 15:38:34 kaleb $ */
#ifndef _COMPILER_H
@@ -423,23 +450,37 @@ __ustw (unsigned long r5, unsigned short * r11)
# define stq_u(v,p) __ustq(v,p)
# define stl_u(v,p) __ustl(v,p)
# define stw_u(v,p) __ustw(v,p)
-
-# define mem_barrier() __asm__ __volatile__ ("mf" ::: "memory")
-# define write_mem_barrier() __asm__ __volatile__ ("mf" ::: "memory")
+
+# ifndef __INTEL_COMPILER
+# define mem_barrier() __asm__ __volatile__ ("mf" ::: "memory")
+# define write_mem_barrier() __asm__ __volatile__ ("mf" ::: "memory")
+# else
+# include "ia64intrin.h"
+# define mem_barrier() __mf()
+# define write_mem_barrier() __mf()
+# endif
/*
* This is overkill, but for different reasons depending on where it is used.
* This is thus general enough to be used everywhere cache flushes are needed.
* It doesn't handle memory access serialisation by other processors, though.
*/
-# define ia64_flush_cache(Addr) \
+# ifndef __INTEL_COMPILER
+# define ia64_flush_cache(Addr) \
__asm__ __volatile__ ( \
"fc %0;;;" \
"sync.i;;;" \
"mf;;;" \
"srlz.i;;;" \
:: "r"(Addr) : "memory")
-
+# else
+# define ia64_flush_cache(Addr) { \
+ __fc(Addr);\
+ __synci();\
+ __mf();\
+ __isrlz();\
+ }
+# endif
# undef outb
# undef outw
# undef outl
@@ -448,7 +489,7 @@ __ustw (unsigned long r5, unsigned short * r11)
# define outw(a,b) _outw(b,a)
# define outl(a,b) _outl(b,a)
-# elif defined(linux) && defined(__x86_64__)
+# elif defined(linux) && defined(__AMD64__)
# include <inttypes.h>
@@ -514,7 +555,7 @@ inl(unsigned short port)
return ret;
}
-# elif (defined(linux) || defined(Lynx) || defined(sun) || defined(__OpenBSD__)) && defined(__sparc__)
+# elif (defined(linux) || defined(Lynx) || defined(sun) || defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__sparc__)
# if !defined(Lynx)
# ifndef ASI_PL
@@ -1515,11 +1556,13 @@ extern void outl(unsigned int a, unsigned int l);
# include <sys/types.h>
# endif /* IN_MODULE */
# endif /* USL */
+# ifndef sgi
# include <sys/inline.h>
+# endif
# else
# include "scoasm.h"
# endif
-# if !defined(__HIGHC__) && !defined(SCO325)
+# if !defined(__HIGHC__) && !defined(SCO325) && !defined(sgi)
# pragma asm partial_optimization outl
# pragma asm partial_optimization outw
# pragma asm partial_optimization outb
diff --git a/hw/xfree86/common/fourcc.h b/hw/xfree86/common/fourcc.h
index 61f403679..e60aa4e83 100644
--- a/hw/xfree86/common/fourcc.h
+++ b/hw/xfree86/common/fourcc.h
@@ -1,4 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/fourcc.h,v 1.3 2001/12/03 22:13:24 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/fourcc.h,v 1.5 2003/08/24 17:36:48 dawes Exp $ */
+
+/*
+ * Copyright (c) 2000-2003 by The XFree86 Project, 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 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).
+ */
/*
This header file contains listings of STANDARD guids for video formats.
@@ -7,6 +34,9 @@
For an explanation of fourcc <-> guid mappings see RFC2361.
*/
+#ifndef _XF86_FOURCC_H_
+#define _XF86_FOURCC_H_ 1
+
#define FOURCC_YUY2 0x32595559
#define XVIMAGE_YUY2 \
{ \
@@ -128,3 +158,4 @@
XvTopToBottom \
}
+#endif /* _XF86_FOURCC_H_ */
diff --git a/hw/xfree86/common/modeline2c.pl b/hw/xfree86/common/modeline2c.pl
index fb76789d6..e31fe28e1 100644
--- a/hw/xfree86/common/modeline2c.pl
+++ b/hw/xfree86/common/modeline2c.pl
@@ -8,9 +8,33 @@
# perl /modeline2c.pl < [modesfile] > xf86DefModes.c
#
# hackish perl - author Dirk Hohndel
-# Copyright 1999-2001 by The XFree86 Project, Inc.
#
-# $XFree86: xc/programs/Xserver/hw/xfree86/common/modeline2c.pl,v 1.8 2001/10/28 03:33:17 tsi Exp $
+# Copyright 1999-2003 by The XFree86 Project, 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 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).
+#
+# $XFree86: xc/programs/Xserver/hw/xfree86/common/modeline2c.pl,v 1.11 2003/11/03 05:11:01 tsi Exp $
#my %flagshash;
$flagshash{""} = "0";
@@ -32,17 +56,20 @@ $flagshash{"-hsync -vsync interlace"} = "V_NHSYNC | V_NVSYNC | V_INTERLACE";
# stop CVS from expanding the XFree86 Id here...
$proj = "XFree86";
-printf("/* \$$proj: \$ */
+printf("/* \$$proj\$ */
/* THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT -- LOOK at
* modeline2c.pl */
/*
- * Copyright 1999 by The XFree86 Project, Inc.
+ * Copyright 1999-2003 by The XFree86 Project, Inc.
*
* Author: Dirk Hohndel <hohndel\@XFree86.Org>
*/
+#ifdef __UNIXOS2__
+#define I_NEED_OS2_H
+#endif
#include \"xf86.h\"
#include \"xf86Config.h\"
#include \"xf86Priv.h\"
@@ -50,7 +77,7 @@ printf("/* \$$proj: \$ */
#include \"globals.h\"
-#define MODEPREFIX(name) NULL, NULL, name, 0,M_T_DEFAULT
+#define MODEPREFIX(name) NULL, NULL, name, MODE_OK, M_T_DEFAULT
#define MODESUFFIX 0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0
DisplayModeRec xf86DefaultModes [] = {
diff --git a/hw/xfree86/common/scoasm.h b/hw/xfree86/common/scoasm.h
index 12fe46693..dbf8c8f86 100644
--- a/hw/xfree86/common/scoasm.h
+++ b/hw/xfree86/common/scoasm.h
@@ -1,4 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/scoasm.h,v 3.0 1996/10/03 08:34:06 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/scoasm.h,v 3.1 2003/08/24 17:36:49 dawes Exp $ */
+
+/*
+ * Copyright (c) 1996 by The XFree86 Project, 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 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).
+ */
/*
* scoasm.h - used to define inline versions of certain functions which
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 119adc5a6..e189e81d2 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -1,7 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86.h,v 3.169 2003/02/13 10:49:38 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86.h,v 3.172 2003/09/24 02:43:16 dawes Exp $ */
/*
- * Copyright (c) 1997 by The XFree86 Project, Inc.
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
*/
/*
@@ -203,6 +226,11 @@ void xf86ProcessActionEvent(ActionEvent action, void *arg);
/* xf86Helper.c */
+#ifdef printf
+#define printf_defined
+#undef printf
+#endif
+
void xf86AddDriver(DriverPtr driver, pointer module, int flags);
void xf86DeleteDriver(int drvIndex);
ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags);
@@ -221,12 +249,14 @@ void xf86EnableDisableFBAccess(int scrnIndex, Bool enable);
void xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb,
const char *format, va_list args);
void xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb,
- const char *format, ...);
-void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...);
-void xf86MsgVerb(MessageType type, int verb, const char *format, ...);
-void xf86Msg(MessageType type, const char *format, ...);
-void xf86ErrorFVerb(int verb, const char *format, ...);
-void xf86ErrorF(const char *format, ...);
+ const char *format, ...) _printf_attribute(4,5);
+void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...)
+ _printf_attribute(3,4);
+void xf86MsgVerb(MessageType type, int verb, const char *format, ...)
+ _printf_attribute(3,4);
+void xf86Msg(MessageType type, const char *format, ...) _printf_attribute(2,3);
+void xf86ErrorFVerb(int verb, const char *format, ...) _printf_attribute(2,3);
+void xf86ErrorF(const char *format, ...) _printf_attribute(1,2);
const char *xf86TokenToString(SymTabPtr table, int token);
int xf86StringToToken(SymTabPtr table, const char *string);
void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from);
@@ -334,6 +364,11 @@ void xf86AddModuleInfo(ModuleInfoPtr info, pointer module);
void xf86DeleteModuleInfo(int idx);
#endif
+#ifdef printf_defined
+#define printf xf86printf
+#undef printf_defined
+#endif
+
/* xf86Debug.c */
#ifdef BUILDDEBUG
void xf86Break1(void);
@@ -402,6 +437,12 @@ void xf86RandRSetInitialMode (ScreenPtr pScreen);
Bool VidModeExtensionInit(ScreenPtr pScreen);
+/* xf86Versions.c */
+CARD32 xf86GetBuiltinInterfaceVersion(BuiltinInterface iface, int flag);
+Bool xf86RegisterBuiltinInterfaceVersion(BuiltinInterface iface,
+ CARD32 version, int flags);
+
+
#endif /* _NO_XF86_PROTOTYPES */
#endif /* _XF86_H */
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index fd9e3c3d1..2ffbfa964 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -1,7 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Bus.c,v 1.76 2003/02/21 17:19:34 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Bus.c,v 1.79 2003/11/03 05:11:01 tsi Exp $ */
/*
- * Copyright (c) 1997-1999 by The XFree86 Project, Inc.
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
*/
+
#define REDUCER
/*
* This file contains the interfaces to the bus-specific code
@@ -1280,14 +1304,14 @@ xf86PrintResList(int verb, resPtr list)
switch (list->res_type & ResExtMask) {
case ResBlock:
xf86ErrorFVerb(verb,
- "\t[%d] %d\t%d\t0x%08lx - 0x%08lx (0x%lx)",
+ "\t[%d] %d\t%ld\t0x%08lx - 0x%08lx (0x%lx)",
i, list->entityIndex,
(list->res_type & ResDomain) >> 24,
list->block_begin, list->block_end,
list->block_end - list->block_begin + 1);
break;
case ResSparse:
- xf86ErrorFVerb(verb, "\t[%d] %d\t%d\t0x%08lx - 0x%08lx ",
+ xf86ErrorFVerb(verb, "\t[%d] %d\t%ld\t0x%08lx - 0x%08lx ",
i, list->entityIndex,
(list->res_type & ResDomain) >> 24,
list->sparse_base,list->sparse_mask);
@@ -1581,7 +1605,6 @@ xf86GetSparse(unsigned long type, memType fixed_bits,
memType new_mask;
memType mask1;
memType base;
- memType bits;
memType counter = 0;
memType counter1;
memType max_counter = ~(memType)0;
@@ -1653,7 +1676,6 @@ xf86GetSparse(unsigned long type, memType fixed_bits,
counter = 0;
while (1) {
- bits = make_base(counter,new_mask) | fixed_bits;
counter1 = 0;
while (1) {
base = make_base(counter1,mask1);
@@ -2134,7 +2156,7 @@ static void
resError(resList list)
{
FatalError("A driver tried to allocate the %s %sresource at \n"
- "0x%x:0x%x which conflicted with another resource. Send the\n"
+ "0x%lx:0x%lx which conflicted with another resource. Send the\n"
"output of the server to %s. Please \n"
"specify your computer hardware as closely as possible.\n",
ResIsBlock(list)?"Block":"Sparse",
diff --git a/hw/xfree86/common/xf86Bus.h b/hw/xfree86/common/xf86Bus.h
index 6a129ad56..fbeca7f9c 100644
--- a/hw/xfree86/common/xf86Bus.h
+++ b/hw/xfree86/common/xf86Bus.h
@@ -1,6 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Bus.h,v 1.21 2002/11/25 14:04:56 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Bus.h,v 1.23 2003/08/24 17:36:50 dawes Exp $ */
+
/*
- * Copyright (c) 1997 by The XFree86 Project, Inc.
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
*/
/*
@@ -98,7 +122,6 @@ typedef struct x_BusAccRec {
int primary_bus;
PCITAG acc;
pciBridgesSave save;
- void (*func)(PCITAG,int,CARD32,CARD32);
} pci;
} busdep;
} BusAccRec, *BusAccPtr;
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 1738222f5..8f6dd2803 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1,17 +1,48 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 3.269 2003/02/20 04:36:07 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 3.277 2003/10/15 22:51:48 dawes Exp $ */
/*
- * Copyright 1991-2002 by The XFree86 Project, Inc.
- * Copyright 1997 by Metro Link, Inc.
- *
* Loosely based on code bearing the following copyright:
*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
+ */
+
+/*
+ * Copyright 1992-2003 by The XFree86 Project, Inc.
+ * Copyright 1997 by Metro Link, 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:
*
- * <Put copyright message here>
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
- * Author: Dirk Hohndel <hohndel@XFree86.Org> and others.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 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).
+ */
+
+/*
+ *
+ * Authors:
+ * Dirk Hohndel <hohndel@XFree86.Org>
+ * David Dawes <dawes@XFree86.Org>
+ * Marc La France <tsi@XFree86.Org>
+ * Egbert Eich <eich@XFree86.Org>
+ * ... and others
*/
#ifdef XF86DRI
@@ -19,6 +50,10 @@
#include <grp.h>
#endif
+#ifdef __UNIXOS2__
+#define I_NEED_OS2_H
+#endif
+
#include "xf86.h"
#include "xf86Parser.h"
#include "xf86tokens.h"
@@ -905,9 +940,11 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
if (!xf86NameCmp(s,"flush")) {
xf86Msg(X_CONFIG, "Flushing logfile enabled\n");
xf86Info.log = LogFlush;
+ LogSetParameter(XLOG_FLUSH, TRUE);
} else if (!xf86NameCmp(s,"sync")) {
xf86Msg(X_CONFIG, "Syncing logfile enabled\n");
xf86Info.log = LogSync;
+ LogSetParameter(XLOG_SYNC, TRUE);
} else {
xf86Msg(X_WARNING,"Unknown Log option\n");
}
@@ -1143,6 +1180,11 @@ configInputKbd(IDevPtr inputp)
xf86Msg(X_PROBED, "Keyboard type: Sun\n");
break;
#endif
+#ifdef WSKBD_TYPE_SUN5
+ case WSKBD_TYPE_SUN5:
+ xf86Msg(X_PROBED, "Keyboard type: Sun5\n");
+ break;
+#endif
default:
xf86ConfigError("Unsupported wskbd type \"%d\"",
xf86Info.wsKbdType);
@@ -1314,105 +1356,297 @@ configInputKbd(IDevPtr inputp)
return TRUE;
}
+/*
+ * Locate the core input devices. These can be specified/located in
+ * the following ways, in order of priority:
+ *
+ * 1. The InputDevices named by the -pointer and -keyboard command line
+ * options.
+ * 2. The "CorePointer" and "CoreKeyboard" InputDevices referred to by
+ * the active ServerLayout.
+ * 3. The first InputDevices marked as "CorePointer" and "CoreKeyboard".
+ * 4. The first InputDevices that use the 'mouse' and 'keyboard' or 'kbd'
+ * drivers.
+ * 5. Default devices with an empty (default) configuration. These defaults
+ * will reference the 'mouse' and 'keyboard' drivers.
+ */
+
static Bool
checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
{
- Bool havePointer = FALSE, haveKeyboard = FALSE;
+ IDevPtr corePointer = NULL, coreKeyboard = NULL;
Bool foundPointer = FALSE, foundKeyboard = FALSE;
+ const char *pointerMsg = NULL, *keyboardMsg = NULL;
IDevPtr indp;
IDevRec Pointer, Keyboard;
XF86ConfInputPtr confInput;
+ XF86ConfInputRec defPtr, defKbd;
int count = 0;
MessageType from = X_DEFAULT;
- /* Check if a core pointer or core keyboard is needed. */
+ /*
+ * First check if a core pointer or core keyboard have been specified
+ * in the active ServerLayout. If more than one is specified for either,
+ * remove the core attribute from the later ones.
+ */
for (indp = servlayoutp->inputs; indp->identifier; indp++) {
- if ((indp->commonOptions &&
- xf86FindOption(indp->commonOptions, "CorePointer")) ||
- (indp->extraOptions &&
- xf86FindOption(indp->extraOptions, "CorePointer"))) {
- havePointer = TRUE;
+ pointer opt1 = NULL, opt2 = NULL;
+ if (indp->commonOptions &&
+ xf86CheckBoolOption(indp->commonOptions, "CorePointer", FALSE)) {
+ opt1 = indp->commonOptions;
+ }
+ if (indp->extraOptions &&
+ xf86CheckBoolOption(indp->extraOptions, "CorePointer", FALSE)) {
+ opt2 = indp->extraOptions;
+ }
+ if (opt1 || opt2) {
+ if (!corePointer) {
+ corePointer = indp;
+ } else {
+ if (opt1)
+ xf86ReplaceBoolOption(opt1, "CorePointer", FALSE);
+ if (opt2)
+ xf86ReplaceBoolOption(opt2, "CorePointer", FALSE);
+ xf86Msg(X_WARNING, "Duplicate core pointer devices. "
+ "Removing core pointer attribute from \"%s\"\n",
+ indp->identifier);
+ }
+ }
+ opt1 = opt2 = NULL;
+ if (indp->commonOptions &&
+ xf86CheckBoolOption(indp->commonOptions, "CoreKeyboard", FALSE)) {
+ opt1 = indp->commonOptions;
}
- if ((indp->commonOptions &&
- xf86FindOption(indp->commonOptions, "CoreKeyboard")) ||
- (indp->extraOptions &&
- xf86FindOption(indp->extraOptions, "CoreKeyboard"))) {
- haveKeyboard = TRUE;
+ if (indp->extraOptions &&
+ xf86CheckBoolOption(indp->extraOptions, "CoreKeyboard", FALSE)) {
+ opt2 = indp->extraOptions;
+ }
+ if (opt1 || opt2) {
+ if (!coreKeyboard) {
+ coreKeyboard = indp;
+ } else {
+ if (opt1)
+ xf86ReplaceBoolOption(opt1, "CoreKeyboard", FALSE);
+ if (opt2)
+ xf86ReplaceBoolOption(opt2, "CoreKeyboard", FALSE);
+ xf86Msg(X_WARNING, "Duplicate core keyboard devices. "
+ "Removing core keyboard attribute from \"%s\"\n",
+ indp->identifier);
+ }
}
count++;
}
- if (!havePointer) {
- if (xf86PointerName) {
- confInput = xf86findInput(xf86PointerName,
- xf86configptr->conf_input_lst);
- if (!confInput) {
- xf86Msg(X_ERROR, "No InputDevice section called \"%s\"\n",
- xf86PointerName);
- return FALSE;
+
+ confInput = NULL;
+
+ /* 1. Check for the -pointer command line option. */
+ if (xf86PointerName) {
+ confInput = xf86findInput(xf86PointerName,
+ xf86configptr->conf_input_lst);
+ if (!confInput) {
+ xf86Msg(X_ERROR, "No InputDevice section called \"%s\"\n",
+ xf86PointerName);
+ return FALSE;
+ }
+ from = X_CMDLINE;
+ /*
+ * If one was already specified in the ServerLayout, it needs to be
+ * removed.
+ */
+ if (corePointer) {
+ for (indp = servlayoutp->inputs; indp->identifier; indp++)
+ if (indp == corePointer)
+ break;
+ for (; indp->identifier; indp++)
+ indp[0] = indp[1];
+ count--;
+ }
+ corePointer = NULL;
+ foundPointer = TRUE;
+ }
+
+ /* 2. ServerLayout-specified core pointer. */
+ if (corePointer) {
+ foundPointer = TRUE;
+ from = X_CONFIG;
+ }
+
+ /* 3. First core pointer device. */
+ if (!foundPointer) {
+ XF86ConfInputPtr p;
+
+ for (p = xf86configptr->conf_input_lst; p; p = p->list.next) {
+ if (p->inp_option_lst &&
+ xf86CheckBoolOption(p->inp_option_lst, "CorePointer", FALSE)) {
+ confInput = p;
+ foundPointer = TRUE;
+ from = X_DEFAULT;
+ pointerMsg = "first core pointer device";
+ break;
}
- from = X_CMDLINE;
- } else {
+ }
+ }
+
+ /* 4. First pointer with 'mouse' as the driver. */
+ if (!foundPointer) {
+ confInput = xf86findInput(CONF_IMPLICIT_POINTER,
+ xf86configptr->conf_input_lst);
+ if (!confInput) {
+ confInput = xf86findInputByDriver("mouse",
+ xf86configptr->conf_input_lst);
+ }
+ if (confInput) {
+ foundPointer = TRUE;
from = X_DEFAULT;
- confInput = xf86findInput(CONF_IMPLICIT_POINTER,
- xf86configptr->conf_input_lst);
- if (!confInput && implicitLayout) {
- confInput = xf86findInputByDriver("mouse",
- xf86configptr->conf_input_lst);
- }
+ pointerMsg = "first mouse device";
+ }
+ }
+
+ /* 5. Built-in default. */
+ if (!foundPointer) {
+ bzero(&defPtr, sizeof(defPtr));
+ defPtr.inp_identifier = "<default pointer>";
+ defPtr.inp_driver = "mouse";
+ confInput = &defPtr;
+ foundPointer = TRUE;
+ from = X_DEFAULT;
+ pointerMsg = "default mouse configuration";
+ }
+
+ /* Add the core pointer device to the layout, and set it to Core. */
+ if (foundPointer && confInput) {
+ foundPointer = configInput(&Pointer, confInput, from);
+ if (foundPointer) {
+ count++;
+ indp = xnfrealloc(servlayoutp->inputs,
+ (count + 1) * sizeof(IDevRec));
+ indp[count - 1] = Pointer;
+ indp[count - 1].extraOptions =
+ xf86addNewOption(NULL, "CorePointer", NULL);
+ indp[count].identifier = NULL;
+ servlayoutp->inputs = indp;
}
- if (confInput)
- foundPointer = configInput(&Pointer, confInput, from);
- }
- if (!haveKeyboard) {
- if (xf86KeyboardName) {
- confInput = xf86findInput(xf86KeyboardName,
- xf86configptr->conf_input_lst);
- if (!confInput) {
- xf86Msg(X_ERROR, "No InputDevice section called \"%s\"\n",
- xf86KeyboardName);
- return FALSE;
+ }
+
+ if (!foundPointer) {
+ /* This shouldn't happen. */
+ xf86Msg(X_ERROR, "Cannot locate a core pointer device.\n");
+ return FALSE;
+ }
+
+ confInput = NULL;
+
+ /* 1. Check for the -keyboard command line option. */
+ if (xf86KeyboardName) {
+ confInput = xf86findInput(xf86KeyboardName,
+ xf86configptr->conf_input_lst);
+ if (!confInput) {
+ xf86Msg(X_ERROR, "No InputDevice section called \"%s\"\n",
+ xf86KeyboardName);
+ return FALSE;
+ }
+ from = X_CMDLINE;
+ /*
+ * If one was already specified in the ServerLayout, it needs to be
+ * removed.
+ */
+ if (coreKeyboard) {
+ for (indp = servlayoutp->inputs; indp->identifier; indp++)
+ if (indp == coreKeyboard)
+ break;
+ for (; indp->identifier; indp++)
+ indp[0] = indp[1];
+ count--;
+ }
+ coreKeyboard = NULL;
+ foundKeyboard = TRUE;
+ }
+
+ /* 2. ServerLayout-specified core keyboard. */
+ if (coreKeyboard) {
+ foundKeyboard = TRUE;
+ from = X_CONFIG;
+ }
+
+ /* 3. First core keyboard device. */
+ if (!foundKeyboard) {
+ XF86ConfInputPtr p;
+
+ for (p = xf86configptr->conf_input_lst; p; p = p->list.next) {
+ if (p->inp_option_lst &&
+ xf86CheckBoolOption(p->inp_option_lst, "CoreKeyboard", FALSE)) {
+ confInput = p;
+ foundKeyboard = TRUE;
+ from = X_DEFAULT;
+ keyboardMsg = "first core keyboard device";
+ break;
}
- from = X_CMDLINE;
- } else {
+ }
+ }
+
+ /* 4. First keyboard with 'keyboard' or 'kbd' as the driver. */
+ if (!foundKeyboard) {
+ confInput = xf86findInput(CONF_IMPLICIT_KEYBOARD,
+ xf86configptr->conf_input_lst);
+ if (!confInput) {
+ confInput = xf86findInputByDriver("keyboard",
+ xf86configptr->conf_input_lst);
+ }
+ if (!confInput) {
+ confInput = xf86findInputByDriver("kbd",
+ xf86configptr->conf_input_lst);
+ }
+ if (confInput) {
+ foundKeyboard = TRUE;
from = X_DEFAULT;
- confInput = xf86findInput(CONF_IMPLICIT_KEYBOARD,
- xf86configptr->conf_input_lst);
- if (!confInput && implicitLayout) {
- confInput = xf86findInputByDriver("keyboard",
- xf86configptr->conf_input_lst);
- }
+ pointerMsg = "first keyboard device";
}
- if (confInput)
- foundKeyboard = configInput(&Keyboard, confInput, from);
}
- if (foundPointer) {
- count++;
- indp = xnfrealloc(servlayoutp->inputs, (count + 1) * sizeof(IDevRec));
- indp[count - 1] = Pointer;
- indp[count - 1].extraOptions = xf86addNewOption(NULL, "CorePointer", NULL);
- indp[count].identifier = NULL;
- servlayoutp->inputs = indp;
- } else if (!havePointer) {
- if (implicitLayout)
- xf86Msg(X_ERROR, "Unable to find a core pointer device\n");
- else
- xf86Msg(X_ERROR, "No core pointer device specified\n");
- return FALSE;
+
+ /* 5. Built-in default. */
+ if (!foundKeyboard) {
+ bzero(&defKbd, sizeof(defKbd));
+ defKbd.inp_identifier = "<default keyboard>";
+ defKbd.inp_driver = "keyboard";
+ confInput = &defKbd;
+ foundKeyboard = TRUE;
+ keyboardMsg = "default keyboard configuration";
+ from = X_DEFAULT;
}
- if (foundKeyboard) {
- count++;
- indp = xnfrealloc(servlayoutp->inputs, (count + 1) * sizeof(IDevRec));
- indp[count - 1] = Keyboard;
- indp[count - 1].extraOptions = xf86addNewOption(NULL, "CoreKeyboard", NULL);
- indp[count].identifier = NULL;
- servlayoutp->inputs = indp;
- } else if (!haveKeyboard) {
- if (implicitLayout)
- xf86Msg(X_ERROR, "Unable to find a core keyboard device\n");
- else
- xf86Msg(X_ERROR, "No core keyboard device specified\n");
+
+ /* Add the core keyboard device to the layout, and set it to Core. */
+ if (foundKeyboard && confInput) {
+ foundKeyboard = configInput(&Keyboard, confInput, from);
+ if (foundKeyboard) {
+ count++;
+ indp = xnfrealloc(servlayoutp->inputs,
+ (count + 1) * sizeof(IDevRec));
+ indp[count - 1] = Keyboard;
+ indp[count - 1].extraOptions =
+ xf86addNewOption(NULL, "CoreKeyboard", NULL);
+ indp[count].identifier = NULL;
+ servlayoutp->inputs = indp;
+ }
+ }
+
+ if (!foundKeyboard) {
+ /* This shouldn't happen. */
+ xf86Msg(X_ERROR, "Cannot locate a core keyboard device.\n");
return FALSE;
}
+
+ if (pointerMsg) {
+ xf86Msg(X_WARNING, "The core pointer device wasn't specified "
+ "explicitly in the layout.\n"
+ "\tUsing the %s.\n", pointerMsg);
+ }
+
+ if (keyboardMsg) {
+ xf86Msg(X_WARNING, "The core keyboard device wasn't specified "
+ "explicitly in the layout.\n"
+ "\tUsing the %s.\n", keyboardMsg);
+ }
+
return TRUE;
}
@@ -1767,6 +2001,7 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum,
int count = 0;
XF86ConfDisplayPtr dispptr;
XF86ConfAdaptorLinkPtr conf_adaptor;
+ Bool defaultMonitor = FALSE;
xf86Msg(from, "|-->Screen \"%s\" (%d)\n", conf_screen->scrn_identifier,
scrnum);
@@ -1779,8 +2014,29 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum,
screenp->defaultbpp = conf_screen->scrn_defaultbpp;
screenp->defaultfbbpp = conf_screen->scrn_defaultfbbpp;
screenp->monitor = xnfcalloc(1, sizeof(MonRec));
- if (!configMonitor(screenp->monitor,conf_screen->scrn_monitor))
- return FALSE;
+ /* If no monitor is specified, create a default one. */
+ if (!conf_screen->scrn_monitor) {
+ XF86ConfMonitorRec defMon;
+
+ bzero(&defMon, sizeof(defMon));
+ defMon.mon_identifier = "<default monitor>";
+ /*
+ * TARGET_REFRESH_RATE may be defined to effectively limit the
+ * default resolution to the largest that has a "good" refresh
+ * rate.
+ */
+#ifdef TARGET_REFRESH_RATE
+ defMon.mon_option_lst = xf86ReplaceRealOption(defMon.mon_option_lst,
+ "TargetRefresh",
+ TARGET_REFRESH_RATE);
+#endif
+ if (!configMonitor(screenp->monitor, &defMon))
+ return FALSE;
+ defaultMonitor = TRUE;
+ } else {
+ if (!configMonitor(screenp->monitor,conf_screen->scrn_monitor))
+ return FALSE;
+ }
screenp->device = xnfcalloc(1, sizeof(GDevRec));
configDevice(screenp->device,conf_screen->scrn_device, TRUE);
screenp->device->myScreenSection = screenp;
@@ -1822,6 +2078,10 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum,
conf_adaptor = (XF86ConfAdaptorLinkPtr)conf_adaptor->list.next;
}
+ if (defaultMonitor) {
+ xf86Msg(X_WARNING, "No monitor specified for screen \"%s\".\n"
+ "\tUsing a default monitor configuration.\n", screenp->id);
+ }
return TRUE;
}
@@ -2149,7 +2409,7 @@ configInput(IDevPtr inputp, XF86ConfInputPtr conf_input, MessageType from)
return TRUE;
}
-
+
static Bool
modeIsPresent(char * modename,MonPtr monitorp)
{
@@ -2207,35 +2467,38 @@ addDefaultModes(MonPtr monitorp)
/*
* load the config file and fill the global data structure
*/
-Bool
-xf86HandleConfigFile(void)
+ConfigStatus
+xf86HandleConfigFile(Bool autoconfig)
{
const char *filename;
char *searchpath;
MessageType from = X_DEFAULT;
- if (getuid() == 0)
- searchpath = ROOT_CONFIGPATH;
- else
- searchpath = USER_CONFIGPATH;
-
- if (xf86ConfigFile)
- from = X_CMDLINE;
+ if (!autoconfig) {
+ if (getuid() == 0)
+ searchpath = ROOT_CONFIGPATH;
+ else
+ searchpath = USER_CONFIGPATH;
- filename = xf86openConfigFile(searchpath, xf86ConfigFile, PROJECTROOT);
- if (filename) {
- xf86MsgVerb(from, 0, "Using config file: \"%s\"\n", filename);
- xf86ConfigFile = xnfstrdup(filename);
- } else {
- xf86Msg(X_ERROR, "Unable to locate/open config file");
if (xf86ConfigFile)
- xf86ErrorFVerb(0, ": \"%s\"", xf86ConfigFile);
- xf86ErrorFVerb(0, "\n");
- return FALSE;
+ from = X_CMDLINE;
+
+ filename = xf86openConfigFile(searchpath, xf86ConfigFile, PROJECTROOT);
+ if (filename) {
+ xf86MsgVerb(from, 0, "Using config file: \"%s\"\n", filename);
+ xf86ConfigFile = xnfstrdup(filename);
+ } else {
+ xf86Msg(X_ERROR, "Unable to locate/open config file");
+ if (xf86ConfigFile)
+ xf86ErrorFVerb(0, ": \"%s\"", xf86ConfigFile);
+ xf86ErrorFVerb(0, "\n");
+ return CONFIG_NOFILE;
+ }
}
+
if ((xf86configptr = xf86readConfigFile ()) == NULL) {
xf86Msg(X_ERROR, "Problem parsing the config file\n");
- return FALSE;
+ return CONFIG_PARSE_ERROR;
}
xf86closeConfigFile ();
@@ -2260,7 +2523,7 @@ xf86HandleConfigFile(void)
if (!configImpliedLayout(&xf86ConfigLayout,
xf86configptr->conf_screen_lst)) {
xf86Msg(X_ERROR, "Unable to determine the screen layout\n");
- return FALSE;
+ return CONFIG_PARSE_ERROR;
}
} else {
if (xf86configptr->conf_flags != NULL) {
@@ -2272,13 +2535,13 @@ xf86HandleConfigFile(void)
if (!configLayout(&xf86ConfigLayout, xf86configptr->conf_layout_lst,
dfltlayout)) {
xf86Msg(X_ERROR, "Unable to determine the screen layout\n");
- return FALSE;
+ return CONFIG_PARSE_ERROR;
}
} else {
if (!configLayout(&xf86ConfigLayout, xf86configptr->conf_layout_lst,
NULL)) {
xf86Msg(X_ERROR, "Unable to determine the screen layout\n");
- return FALSE;
+ return CONFIG_PARSE_ERROR;
}
}
}
@@ -2293,7 +2556,7 @@ xf86HandleConfigFile(void)
#endif
) {
ErrorF ("Problem when converting the config data structures\n");
- return FALSE;
+ return CONFIG_PARSE_ERROR;
}
/*
@@ -2317,7 +2580,7 @@ xf86HandleConfigFile(void)
if (xf86AllowMouseOpenFail)
xf86Info.allowMouseOpenFail = TRUE;
- return TRUE;
+ return CONFIG_OK;
}
diff --git a/hw/xfree86/common/xf86Config.h b/hw/xfree86/common/xf86Config.h
index 6a24df0e0..e54da3d09 100644
--- a/hw/xfree86/common/xf86Config.h
+++ b/hw/xfree86/common/xf86Config.h
@@ -1,6 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Config.h,v 1.5 2000/02/24 05:36:50 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Config.h,v 1.7 2003/10/08 14:58:27 dawes Exp $ */
+
/*
- * Copyright 1997 by The XFree86 Project, Inc
+ * Copyright (c) 1997-2000 by The XFree86 Project, 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 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).
*/
#ifndef _xf86_config_h
@@ -13,6 +37,12 @@
extern XF86ConfigPtr xf86configptr;
#endif
+typedef enum _ConfigStatus {
+ CONFIG_OK = 0,
+ CONFIG_PARSE_ERROR,
+ CONFIG_NOFILE
+} ConfigStatus;
+
/*
* prototypes
*/
@@ -22,6 +52,8 @@ char ** xf86DriverlistFromCompile(void);
char ** xf86InputDriverlistFromConfig(void);
char ** xf86InputDriverlistFromCompile(void);
Bool xf86BuiltinInputDriver(const char *);
-Bool xf86HandleConfigFile(void);
+ConfigStatus xf86HandleConfigFile(Bool);
+
+Bool xf86AutoConfig(void);
#endif /* _xf86_config_h */
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 687730ea5..3dde4ba7d 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Configure.c,v 3.78 2003/01/18 07:27:13 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Configure.c,v 3.81 2003/10/29 04:17:21 dawes Exp $ */
/*
* Copyright 2000-2002 by Alan Hourihane, Flint Mountain, North Wales.
*
@@ -46,7 +46,7 @@
#include "Configint.h"
#include "vbe.h"
#include "xf86DDC.h"
-#ifdef __sparc__
+#if defined(__sparc__) && !defined(__OpenBSD__)
#include "xf86Bus.h"
#include "xf86Sbus.h"
#endif
@@ -55,7 +55,7 @@
typedef struct _DevToConfig {
GDevRec GDev;
pciVideoPtr pVideo;
-#ifdef __sparc__
+#if defined(__sparc__) && !defined(__OpenBSD__)
sbusDevicePtr sVideo;
#endif
int iDriver;
@@ -280,6 +280,8 @@ configureInputSection (void)
DFLT_MOUSE_DEV = "/dev/wsmouse";
DFLT_MOUSE_PROTO = "wsmouse";
close(fd);
+ } else {
+ ErrorF("cannot open /dev/wsmouse\n");
}
#endif
@@ -868,7 +870,7 @@ DoConfigure()
xf86DoConfigurePass1 = FALSE;
/* Try to get DDC information filled in */
xf86ConfigFile = filename;
- if (!xf86HandleConfigFile()) {
+ if (xf86HandleConfigFile(FALSE) != CONFIG_OK) {
goto bail;
}
@@ -990,7 +992,7 @@ DoConfigure()
ErrorF("To test the server, run 'XFree86 -xf86config %s'\n\n", filename);
bail:
- OsCleanup();
+ OsCleanup(TRUE);
AbortDDX();
fflush(stderr);
exit(0);
diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c
index 1a214c4ad..22b7b00e6 100644
--- a/hw/xfree86/common/xf86Cursor.c
+++ b/hw/xfree86/common/xf86Cursor.c
@@ -1,4 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Cursor.c,v 3.35 2003/02/13 10:49:38 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Cursor.c,v 3.37 2003/11/07 22:20:17 dawes Exp $ */
+/*
+ * Copyright (c) 1994-2003 by The XFree86 Project, 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 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).
+ */
+
/* $XConsortium: xf86Cursor.c /main/10 1996/10/19 17:58:23 kaleb $ */
#define NEED_EVENTS
@@ -77,11 +104,16 @@ xf86InitViewport(ScrnInfoPtr pScr)
/*
* Compute the initial Viewport if necessary
*/
- if (pScr->frameX0 < 0)
- {
+ if (pScr->display) {
+ if (pScr->display->frameX0 < 0) {
pScr->frameX0 = (pScr->virtualX - pScr->modes->HDisplay) / 2;
pScr->frameY0 = (pScr->virtualY - pScr->modes->VDisplay) / 2;
+ } else {
+ pScr->frameX0 = pScr->display->frameX0;
+ pScr->frameY0 = pScr->display->frameY0;
}
+ }
+
pScr->frameX1 = pScr->frameX0 + pScr->modes->HDisplay - 1;
pScr->frameY1 = pScr->frameY0 + pScr->modes->VDisplay - 1;
diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index 1ad8b42ff..5e4bc29b6 100644
--- a/hw/xfree86/common/xf86DGA.c
+++ b/hw/xfree86/common/xf86DGA.c
@@ -1,9 +1,32 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86DGA.c,v 1.47 2003/08/24 17:36:51 dawes Exp $ */
/*
- Copyright (c) 1999 - The XFree86 Project, Inc.
-
- Written by Mark Vojkovich
-*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86DGA.c,v 1.46 2002/12/03 18:17:40 tsi Exp $ */
+ * Copyright (c) 1998-2002 by The XFree86 Project, 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 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).
+ *
+ * Written by Mark Vojkovich
+ */
#include "xf86.h"
#include "xf86str.h"
diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c
index 0de054ff3..df968797c 100644
--- a/hw/xfree86/common/xf86DPMS.c
+++ b/hw/xfree86/common/xf86DPMS.c
@@ -1,7 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86DPMS.c,v 1.8 2003/02/13 02:41:09 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86DPMS.c,v 1.11 2003/11/11 21:02:28 dawes Exp $ */
/*
- * Copyright (c) 1997-1998 by The XFree86 Project, Inc.
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
*/
/*
@@ -14,6 +37,8 @@
#include "xf86.h"
#include "xf86Priv.h"
#ifdef DPMSExtension
+#define DPMS_SERVER
+#include "extensions/dpms.h"
#include "dpmsproc.h"
#endif
@@ -30,6 +55,7 @@ Bool
xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
{
#ifdef DPMSExtension
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
DPMSPtr pDPMS;
pointer DPMSOpt;
@@ -45,13 +71,12 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
return FALSE;
pDPMS = (DPMSPtr)pScreen->devPrivates[DPMSIndex].ptr;
- pDPMS->Set = set;
+ pScrn->DPMSSet = set;
pDPMS->Flags = flags;
- DPMSOpt = xf86FindOption(xf86Screens[pScreen->myNum]->options, "dpms");
+ DPMSOpt = xf86FindOption(pScrn->options, "dpms");
if (DPMSOpt) {
if ((pDPMS->Enabled
- = xf86SetBoolOption(xf86Screens[pScreen->myNum]->options,
- "dpms",FALSE))
+ = xf86SetBoolOption(pScrn->options, "dpms", FALSE))
&& !DPMSDisabledSwitch)
DPMSEnabled = TRUE;
xf86MarkOptionUsed(DPMSOpt);
@@ -111,18 +136,23 @@ DPMSSet(int level)
{
int i;
DPMSPtr pDPMS;
+ ScrnInfoPtr pScrn;
DPMSPowerLevel = level;
if (DPMSIndex < 0)
return;
+ if (level != DPMSModeOn)
+ SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverActive);
+
/* For each screen, set the DPMS level */
for (i = 0; i < xf86NumScreens; i++) {
+ pScrn = xf86Screens[i];
pDPMS = (DPMSPtr)screenInfo.screens[i]->devPrivates[DPMSIndex].ptr;
- if (pDPMS && pDPMS->Set && pDPMS->Enabled && xf86Screens[i]->vtSema) {
- xf86EnableAccess(xf86Screens[i]);
- pDPMS->Set(xf86Screens[i], level, 0);
+ if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) {
+ xf86EnableAccess(pScrn);
+ pScrn->DPMSSet(pScrn, level, 0);
}
}
}
@@ -137,6 +167,7 @@ DPMSSupported(void)
{
int i;
DPMSPtr pDPMS;
+ ScrnInfoPtr pScrn;
if (DPMSIndex < 0) {
return FALSE;
@@ -144,8 +175,9 @@ DPMSSupported(void)
/* For each screen, check if DPMS is supported */
for (i = 0; i < xf86NumScreens; i++) {
+ pScrn = xf86Screens[i];
pDPMS = (DPMSPtr)screenInfo.screens[i]->devPrivates[DPMSIndex].ptr;
- if (pDPMS && pDPMS->Set)
+ if (pDPMS && pScrn->DPMSSet)
return TRUE;
}
return FALSE;
diff --git a/hw/xfree86/common/xf86Date.h b/hw/xfree86/common/xf86Date.h
index 506e05370..754e20d18 100644
--- a/hw/xfree86/common/xf86Date.h
+++ b/hw/xfree86/common/xf86Date.h
@@ -1,7 +1,33 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf86Date.h,v 1.3.2.3 2003/05/10 01:10:10 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf86Date.h,v 1.52 2003/11/21 06:01:44 dawes Exp $ */
+/*
+ * Copyright (c) 2003 by The XFree86 Project, 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 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).
+ */
#ifndef XF86_DATE
-#define XF86_DATE "9 May 2003"
+#define XF86_DATE "20 November 2003"
#endif
diff --git a/hw/xfree86/common/xf86Debug.c b/hw/xfree86/common/xf86Debug.c
index b069743a1..3bf21689f 100644
--- a/hw/xfree86/common/xf86Debug.c
+++ b/hw/xfree86/common/xf86Debug.c
@@ -1,4 +1,35 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Debug.c,v 1.4 2001/12/13 18:01:50 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Debug.c,v 1.7 2003/09/24 02:43:17 dawes Exp $ */
+
+/*
+ * Copyright (c) 2000-2003 by The XFree86 Project, 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 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).
+ */
+
+#ifdef __UNIXOS2__
+#define I_NEED_OS2_H
+#endif
#include <sys/time.h>
#include <unistd.h>
@@ -154,7 +185,7 @@ xf86SPTimestamp(xf86TsPtr* timestamp, char *str)
else
diff = ((*timestamp)->sec - ts.tv_sec) * 1000
+(- ts.tv_usec + (*timestamp)->usec) / 1000;
- ErrorF("%s Elapsed: %i\n",str,diff);
+ ErrorF("%s Elapsed: %li\n",str,diff);
} else {
*timestamp = xnfalloc(sizeof(xf86TsRec));
gettimeofday((struct timeval*)*timestamp,NULL);
diff --git a/hw/xfree86/common/xf86DefModes.c b/hw/xfree86/common/xf86DefModes.c
index abef13110..7257b204b 100644
--- a/hw/xfree86/common/xf86DefModes.c
+++ b/hw/xfree86/common/xf86DefModes.c
@@ -1,14 +1,17 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86DefModes.c,v 1.9 2002/11/11 04:24:40 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86DefModes.c,v 1.10 2003/11/03 05:11:02 tsi Exp $ */
/* THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT -- LOOK at
* modeline2c.pl */
/*
- * Copyright 1999 by The XFree86 Project, Inc.
+ * Copyright 1999-2003 by The XFree86 Project, Inc.
*
* Author: Dirk Hohndel <hohndel@XFree86.Org>
*/
+#ifdef __UNIXOS2__
+#define I_NEED_OS2_H
+#endif
#include "xf86.h"
#include "xf86Config.h"
#include "xf86Priv.h"
@@ -16,7 +19,7 @@
#include "globals.h"
-#define MODEPREFIX(name) NULL, NULL, name, 0,M_T_DEFAULT
+#define MODEPREFIX(name) NULL, NULL, name, MODE_OK, M_T_DEFAULT
#define MODESUFFIX 0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0
DisplayModeRec xf86DefaultModes [] = {
diff --git a/hw/xfree86/common/xf86DoProbe.c b/hw/xfree86/common/xf86DoProbe.c
index 518f67214..eece97719 100644
--- a/hw/xfree86/common/xf86DoProbe.c
+++ b/hw/xfree86/common/xf86DoProbe.c
@@ -1,10 +1,34 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86DoProbe.c,v 1.11 2002/07/02 02:00:03 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86DoProbe.c,v 1.14 2003/10/29 04:17:21 dawes Exp $ */
/*
- * finish setting up the server
- * Load the driver modules and call their probe functions.
+ * Copyright (c) 1999-2002 by The XFree86 Project, 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:
*
- * Copyright 1999 by The XFree86 Project, Inc.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
*
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 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).
+ */
+
+/*
+ * finish setting up the server
+ * Load the driver modules and call their probe functions.
*/
#include <ctype.h>
@@ -67,16 +91,14 @@ DoProbe()
/* If we have a result, then call driver's Identify function */
if (xf86DriverList[i]->Identify != NULL) {
- int verbose = xf86Verbose;
-
- xf86Verbose = 1;
+ int verbose = xf86SetVerbosity(1);
(*xf86DriverList[i]->Identify)(0);
- xf86Verbose = verbose;
+ xf86SetVerbosity(verbose);
}
}
}
- OsCleanup();
+ OsCleanup(TRUE);
AbortDDX();
fflush(stderr);
exit(0);
diff --git a/hw/xfree86/common/xf86DoScanPci.c b/hw/xfree86/common/xf86DoScanPci.c
index 2328d2b05..8938c1d96 100644
--- a/hw/xfree86/common/xf86DoScanPci.c
+++ b/hw/xfree86/common/xf86DoScanPci.c
@@ -1,11 +1,34 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86DoScanPci.c,v 1.15 2003/09/23 06:43:46 dawes Exp $ */
+/*
+ * Copyright (c) 1999-2002 by The XFree86 Project, 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 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).
+ */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86DoScanPci.c,v 1.12 2002/07/15 20:46:01 dawes Exp $ */
/*
* Finish setting up the server.
* Call the functions from the scanpci module.
- *
- * Copyright 1999-2002 by The XFree86 Project, Inc.
- *
*/
#include <ctype.h>
@@ -38,11 +61,12 @@ void DoScanPci(int argc, char **argv, int i)
OsInit();
/*
- * now we decrease verbosity and remember the value, in case a later
- * -verbose on the command line increases it, because that is a
- * verbose flag for scanpci...
+ * The old verbosity processing that was here isn't useful anymore, but
+ * for compatibility purposes, ignore verbosity changes after the -scanpci
+ * flag.
*/
- globalVerbose = --xf86Verbose;
+ globalVerbose = xf86Verbose;
+
/*
* next we process the arguments that are remaining on the command line,
* so that things like the module path can be set there
@@ -51,14 +75,19 @@ void DoScanPci(int argc, char **argv, int i)
if ((skip = ddxProcessArgument(argc, argv, j)))
j += (skip - 1);
}
+
/*
- * was the verbosity level increased?
+ * Was the verbosity level increased? If so, set it back.
*/
- if( (globalVerbose == 0) && (xf86Verbose > 0) )
- scanpciVerbose = xf86Verbose - globalVerbose -1;
- else
- scanpciVerbose = xf86Verbose - globalVerbose;
- xf86Verbose = globalVerbose;
+ if (xf86Verbose > globalVerbose)
+ xf86SetVerbosity(globalVerbose);
+
+ /*
+ * Setting scanpciVerbose to 0 will ensure that the output will go to
+ * stderr for all reasonable default stderr verbosity levels.
+ */
+ scanpciVerbose = 0;
+
/*
* now get the loader set up and load the scanpci module
*/
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 4d0efbcb9..1c3f3a34f 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Events.c,v 3.146 2003/02/20 04:20:52 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Events.c,v 3.158 2003/11/03 05:11:02 tsi Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
*
@@ -21,10 +21,41 @@
* PERFORMANCE OF THIS SOFTWARE.
*
*/
+/*
+ * Copyright (c) 1994-2003 by The XFree86 Project, 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 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).
+ */
+
/* $XConsortium: xf86Events.c /main/46 1996/10/25 11:36:30 kaleb $ */
/* [JCH-96/01/21] Extended std reverse map to four buttons. */
+#ifdef __UNIXOS2__
+#define I_NEED_OS2_H
+#endif
+
#include "X.h"
#include "Xpoll.h"
#include "Xproto.h"
@@ -315,10 +346,14 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
CloseDownClient(server);
}
break;
-#if !defined(__SOL8__) && (!defined(sun) || defined(i386))
+#if !defined(__SOL8__) && !defined(__UNIXOS2__) && !defined(sgi) && \
+ (!defined(sun) || defined(i386))
case ACTION_SWITCHSCREEN:
if (VTSwitchEnabled && !xf86Info.dontVTSwitch && arg) {
int vtno = *((int *) arg);
+#ifdef SCO
+ vtno--;
+#endif
#if defined(QNX4)
xf86Info.vtRequestsPending = vtno;
#else
@@ -329,8 +364,12 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
break;
case ACTION_SWITCHSCREEN_NEXT:
if (VTSwitchEnabled && !xf86Info.dontVTSwitch) {
+#if defined(SCO) /* Shouldn't this be true for (sun) && (i386) && (SVR4) ? */
+ if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) < 0)
+#else
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno + 1) < 0)
-#if defined(SCO) || (defined(sun) && defined (i386) && defined (SVR4))
+#endif
+#if defined (SCO) || (defined(sun) && defined (i386) && defined (SVR4))
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 0) < 0)
#else
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 1) < 0)
@@ -339,12 +378,36 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
}
break;
case ACTION_SWITCHSCREEN_PREV:
- if (VTSwitchEnabled && !xf86Info.dontVTSwitch) {
+ if (VTSwitchEnabled && !xf86Info.dontVTSwitch && xf86Info.vtno > 0) {
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno - 1) < 0)
ErrorF("Failed to switch consoles (%s)\n", strerror(errno));
}
break;
#endif
+ case ACTION_MESSAGE:
+ {
+ char *retstr, *message = (char *) arg;
+ ScrnInfoPtr pScr = XF86SCRNINFO(xf86Info.currentScreen);
+
+#ifdef DEBUG
+ ErrorF("ActionMessage: '%s'\n", message);
+#endif
+ /* Okay the message made it to the ddx. The common layer */
+ /* can check for relevant messages here and react to any */
+ /* that have a global effect. For example: */
+ /* */
+ /* if (!strcmp(message, "foo") { */
+ /* do_foo(); break */
+ /* } */
+ /* */
+ /* otherwise fallback to sending a key event message to */
+ /* the current screen's driver: */
+ if (*pScr->HandleMessage) {
+ (void) (*pScr->HandleMessage)(pScr->scrnIndex,
+ "KeyEventMessage", message, &retstr);
+ }
+ }
+ break;
default:
break;
}
@@ -384,7 +447,7 @@ xf86PostKbdEvent(unsigned key)
#if defined(SYSCONS_SUPPORT) || defined(PCVT_SUPPORT) || defined(WSCONS_SUPPORT)
static Bool first_time = TRUE;
#endif
-#if defined(__sparc__)
+#if defined(__sparc__) && defined(__linux__)
static int kbdSun = -1;
#endif
/* Disable any keyboard processing while in suspend */
@@ -400,7 +463,7 @@ xf86PostKbdEvent(unsigned key)
}
#endif
-#if defined (__sparc__)
+#if defined (__sparc__) && defined(__linux__)
if (kbdSun == -1) {
if ((xf86Info.xkbmodel && !strcmp(xf86Info.xkbmodel, "sun"))
|| (xf86Info.xkbrules && !strcmp(xf86Info.xkbrules, "sun")))
@@ -410,26 +473,7 @@ xf86PostKbdEvent(unsigned key)
}
if (kbdSun)
goto special;
-#endif /* __sparc__ */
-
-#if defined (i386) && defined (SVR4)
- /*
- * PANIX returns DICOP standards based keycodes in using 106jp
- * keyboard. We need to remap some keys.
- */
- if(xf86Info.panix106 == TRUE){
- switch (scanCode) {
- case 0x56: scanCode = KEY_BSlash2; break; /* Backslash */
- case 0x5A: scanCode = KEY_NFER; break; /* No Kanji Transfer*/
- case 0x5B: scanCode = KEY_XFER; break; /* Kanji Tranfer */
- case 0x5C: scanCode = KEY_Yen; break; /* Yen curs pgup */
- case 0x6B: scanCode = KEY_Left; break; /* Cur Left */
- case 0x6F: scanCode = KEY_PgUp; break; /* Cur PageUp */
- case 0x72: scanCode = KEY_AltLang; break; /* AltLang(right) */
- case 0x73: scanCode = KEY_RCtrl; break; /* not needed */
- }
- }
-#endif /* i386 && SVR4 */
+#endif /* __sparc__ && __linux__ */
#ifdef __linux__
if (xf86Info.kbdCustomKeycodes) {
@@ -461,6 +505,56 @@ xf86PostKbdEvent(unsigned key)
break;
#endif
}
+#if defined (i386) && defined (SVR4)
+ /*
+ * PANIX returns DICOP standards based keycodes in using 106jp
+ * keyboard. We need to remap some keys.
+ */
+ if(xf86Info.panix106 == TRUE){
+ switch (scanCode) {
+ case 0x56: scanCode = KEY_BSlash2; break; /* Backslash */
+ case 0x5A: scanCode = KEY_NFER; break; /* No Kanji Transfer*/
+ case 0x5B: scanCode = KEY_XFER; break; /* Kanji Tranfer */
+ case 0x5C: scanCode = KEY_Yen; break; /* Yen curs pgup */
+ case 0x6B: scanCode = KEY_Left; break; /* Cur Left */
+ case 0x6F: scanCode = KEY_PgUp; break; /* Cur PageUp */
+ case 0x72: scanCode = KEY_AltLang; break; /* AltLang(right) */
+ case 0x73: scanCode = KEY_RCtrl; break; /* not needed */
+ }
+ } else
+#endif /* i386 && SVR4 */
+ {
+ switch (scanCode) {
+ case 0x59: scanCode = KEY_0x59; break;
+ case 0x5a: scanCode = KEY_0x5A; break;
+ case 0x5b: scanCode = KEY_0x5B; break;
+ case 0x5c: scanCode = KEY_KP_Equal; break; /* Keypad Equal */
+ case 0x5d: scanCode = KEY_0x5D; break;
+ case 0x5e: scanCode = KEY_0x5E; break;
+ case 0x5f: scanCode = KEY_0x5F; break;
+ case 0x62: scanCode = KEY_0x62; break;
+ case 0x63: scanCode = KEY_0x63; break;
+ case 0x64: scanCode = KEY_0x64; break;
+ case 0x65: scanCode = KEY_0x65; break;
+ case 0x66: scanCode = KEY_0x66; break;
+ case 0x67: scanCode = KEY_0x67; break;
+ case 0x68: scanCode = KEY_0x68; break;
+ case 0x69: scanCode = KEY_0x69; break;
+ case 0x6a: scanCode = KEY_0x6A; break;
+ case 0x6b: scanCode = KEY_0x6B; break;
+ case 0x6c: scanCode = KEY_0x6C; break;
+ case 0x6d: scanCode = KEY_0x6D; break;
+ case 0x6e: scanCode = KEY_0x6E; break;
+ case 0x6f: scanCode = KEY_0x6F; break;
+ case 0x70: scanCode = KEY_0x70; break;
+ case 0x71: scanCode = KEY_0x71; break;
+ case 0x72: scanCode = KEY_0x72; break;
+ case 0x73: scanCode = KEY_0x73; break;
+ case 0x74: scanCode = KEY_0x74; break;
+ case 0x75: scanCode = KEY_0x75; break;
+ case 0x76: scanCode = KEY_0x76; break;
+ }
+ }
}
else if (
@@ -534,6 +628,19 @@ xf86PostKbdEvent(unsigned key)
scanCode = KEY_Pause; /* pause */
}
+#ifndef __sparc64__
+ /*
+ * PC keyboards generate separate key codes for
+ * Alt+Print and Control+Pause but in the X keyboard model
+ * they need to get the same key code as the base key on the same
+ * physical keyboard key.
+ */
+ if (scanCode == KEY_SysReqest)
+ scanCode = KEY_Print;
+ else if (scanCode == KEY_Break)
+ scanCode = KEY_Pause;
+#endif
+
/*
* and now get some special keysequences
*/
@@ -568,7 +675,7 @@ customkeycodes:
}
}
#endif
-#if defined (__sparc__)
+#if defined (__sparc__) && defined(__linux__)
special:
if (kbdSun) {
switch (scanCode) {
@@ -602,7 +709,7 @@ special:
*/
scanCode--;
}
-#endif /* defined (__sparc__) */
+#endif /* defined (__sparc__) && defined(__linux__) */
#ifdef XKB
if ((xf86Info.ddxSpecialKeys == SKWhenNeeded &&
@@ -692,9 +799,6 @@ special:
int vtno = specialkey - KEY_F1 + 1;
if (specialkey == KEY_F11 || specialkey == KEY_F12)
vtno = specialkey - KEY_F11 + 11;
-#ifdef SCO325
- vtno--;
-#endif
if (down)
xf86ProcessActionEvent(ACTION_SWITCHSCREEN, (void *) &vtno);
return;
@@ -829,17 +933,6 @@ special:
#endif
/*
- * PC keyboards generate separate key codes for
- * Alt+Print and Control+Pause but in the X keyboard model
- * they need to get the same key code as the base key on the same
- * physical keyboard key.
- */
- if (scanCode == KEY_SysReqest)
- scanCode = KEY_Print;
- else if (scanCode == KEY_Break)
- scanCode = KEY_Pause;
-
- /*
* Now map the scancodes to real X-keycodes ...
*/
keycode = scanCode + MIN_KEYCODE;
@@ -1060,16 +1153,16 @@ xf86Wakeup(pointer blockData, int err, pointer pReadmask)
pInfo = xf86InputDevs;
while (pInfo) {
if (pInfo->read_input && pInfo->fd >= 0 &&
- (FD_ISSET(pInfo->fd, ((fd_set *)pReadmask)) != 0)) {
+ (FD_ISSET(pInfo->fd, &devicesWithInput) != 0)) {
int sigstate = xf86BlockSIGIO();
pInfo->read_input(pInfo);
xf86UnblockSIGIO(sigstate);
/*
- * Must break here because more than one device may share
- * the same file descriptor.
+ * Remove the descriptior from the set because more than one
+ * device may share the same file descriptor.
*/
- break;
+ FD_CLR(pInfo->fd, &devicesWithInput);
}
pInfo = pInfo->next;
}
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index 99c53fb0b..c6dee3731 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -1,7 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Globals.c,v 1.40 2003/02/20 04:05:14 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Globals.c,v 1.41 2003/08/24 17:36:52 dawes Exp $ */
/*
- * Copyright (c) 1997 by The XFree86 Project, Inc.
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
*/
/*
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 73050eab7..713e7861a 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1,10 +1,36 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Helper.c,v 1.128 2003/02/26 23:45:24 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Helper.c,v 1.135 2003/10/08 14:58:27 dawes Exp $ */
/*
- * Copyright (c) 1997-1998 by The XFree86 Project, Inc.
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
+/*
* Authors: Dirk Hohndel <hohndel@XFree86.Org>
* David Dawes <dawes@XFree86.Org>
+ * ... and others
*
* This file includes the helper functions that the server provides for
* different drivers.
@@ -38,7 +64,6 @@
#endif
static int xf86ScrnInfoPrivateCount = 0;
-static FILE *logfile = NULL;
#ifdef XFree86LOADER
@@ -405,6 +430,14 @@ xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad)
/* Can the screen handle 24bpp pixmaps for 32bpp fb */
#define DO_PIX24FOR32(f) ((f & Support32bppFb) && (f & SupportConvert24to32))
+#ifndef GLOBAL_DEFAULT_DEPTH
+#define GLOBAL_DEFAULT_DEPTH 16
+#endif
+
+#ifndef GLOBAL_DEFAULT_FBBPP
+#define GLOBAL_DEFAULT_FBBPP 16
+#endif
+
Bool
xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
int depth24flags)
@@ -449,6 +482,39 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
scrp->depth = scrp->confScreen->defaultdepth;
scrp->depthFrom = X_CONFIG;
}
+
+ if (scrp->confScreen->defaultfbbpp <= 0 &&
+ scrp->confScreen->defaultdepth <= 0) {
+ /*
+ * Check for DefaultDepth and DefaultFbBpp options in the
+ * Device sections.
+ */
+ int i;
+ GDevPtr device;
+ Bool found = FALSE;
+
+ for (i = 0; i < scrp->numEntities; i++) {
+ device = xf86GetDevFromEntity(scrp->entityList[i],
+ scrp->entityInstanceList[i]);
+ if (device && device->options) {
+ if (xf86FindOption(device->options, "DefaultDepth")) {
+ scrp->depth = xf86SetIntOption(device->options,
+ "DefaultDepth", -1);
+ scrp->depthFrom = X_CONFIG;
+ found = TRUE;
+ }
+ if (xf86FindOption(device->options, "DefaultFbBpp")) {
+ scrp->bitsPerPixel = xf86SetIntOption(device->options,
+ "DefaultFbBpp",
+ -1);
+ scrp->bitsPerPixelFrom = X_CONFIG;
+ found = TRUE;
+ }
+ }
+ if (found)
+ break;
+ }
+ }
}
/* If none of these is set, pick a default */
@@ -459,8 +525,8 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
if (depth > 0)
scrp->depth = depth;
} else {
- scrp->bitsPerPixel = 8;
- scrp->depth = 8;
+ scrp->bitsPerPixel = GLOBAL_DEFAULT_FBBPP;
+ scrp->depth = GLOBAL_DEFAULT_DEPTH;
}
}
@@ -610,11 +676,46 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
break;
}
}
+
+ /*
+ * If an exact match can't be found, see if there is one with no
+ * depth or fbbpp specified.
+ */
+ if (i == scrp->confScreen->numdisplays) {
+ for (i = 0, disp = scrp->confScreen->displays;
+ i < scrp->confScreen->numdisplays; i++, disp++) {
+ if (disp->depth <= 0 && disp->fbbpp <= 0) {
+ scrp->display = disp;
+ break;
+ }
+ }
+ }
+
+ /*
+ * If all else fails, create a default one.
+ */
if (i == scrp->confScreen->numdisplays) {
- xf86DrvMsg(scrp->scrnIndex, X_ERROR, "No Display subsection "
- "in Screen section \"%s\" for depth/fbbpp %d/%d\n",
+ scrp->confScreen->numdisplays++;
+ scrp->confScreen->displays =
+ xnfrealloc(scrp->confScreen->displays,
+ scrp->confScreen->numdisplays * sizeof(DispRec));
+ xf86DrvMsg(scrp->scrnIndex, X_INFO,
+ "Creating default Display subsection in Screen section\n"
+ "\t\"%s\" for depth/fbbpp %d/%d\n",
scrp->confScreen->id, scrp->depth, scrp->bitsPerPixel);
- return FALSE;
+ memset(&scrp->confScreen->displays[i], 0, sizeof(DispRec));
+ scrp->confScreen->displays[i].blackColour.red = -1;
+ scrp->confScreen->displays[i].blackColour.green = -1;
+ scrp->confScreen->displays[i].blackColour.blue = -1;
+ scrp->confScreen->displays[i].whiteColour.red = -1;
+ scrp->confScreen->displays[i].whiteColour.green = -1;
+ scrp->confScreen->displays[i].whiteColour.blue = -1;
+ scrp->confScreen->displays[i].defaultVisual = -1;
+ scrp->confScreen->displays[i].modes = xnfalloc(sizeof(char *));
+ scrp->confScreen->displays[i].modes[0] = NULL;
+ scrp->confScreen->displays[i].depth = depth;
+ scrp->confScreen->displays[i].fbbpp = fbbpp;
+ scrp->display = &scrp->confScreen->displays[i];
}
/*
@@ -720,15 +821,17 @@ xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask)
if (scrp->weight.red)
xf86DrvMsg(scrp->scrnIndex, weightFrom, "RGB weight %d%d%d\n",
- scrp->weight.red, scrp->weight.green, scrp->weight.blue);
+ (int)scrp->weight.red, (int)scrp->weight.green,
+ (int)scrp->weight.blue);
if (scrp->depth > MAX_PSEUDO_DEPTH &&
(scrp->depth != scrp->weight.red + scrp->weight.green +
scrp->weight.blue)) {
xf86DrvMsg(scrp->scrnIndex, X_ERROR,
"Weight given (%d%d%d) is inconsistent with the "
- "depth (%d)\n", scrp->weight.red, scrp->weight.green,
- scrp->weight.blue, scrp->depth);
+ "depth (%d)\n",
+ (int)scrp->weight.red, (int)scrp->weight.green,
+ (int)scrp->weight.blue, scrp->depth);
return FALSE;
}
if (scrp->depth > MAX_PSEUDO_DEPTH && scrp->weight.red) {
@@ -1194,123 +1297,36 @@ xf86EnableDisableFBAccess(int scrnIndex, Bool enable)
}
}
-/* Buffer to hold log data written before the log file is opened */
-static char *saveBuffer = NULL;
-static int size = 0, unused = 0, pos = 0;
-
-/* These functions do the actual writes. */
-static void
-VWrite(int verb, const char *f, va_list args)
-{
- static char buffer[1024];
- int len = 0;
-
- /*
- * Since a va_list can only be processed once, write the string to a
- * buffer, and then write the buffer out to the appropriate output
- * stream(s).
- */
- if (verb < 0 || xf86LogVerbose >= verb || xf86Verbose >= verb) {
- vsnprintf(buffer, sizeof(buffer), f, args);
- len = strlen(buffer);
- }
- if ((verb < 0 || xf86Verbose >= verb) && len > 0)
- fwrite(buffer, len, 1, stderr);
- if ((verb < 0 || xf86LogVerbose >= verb) && len > 0) {
- if (logfile) {
- fwrite(buffer, len, 1, logfile);
- if (xf86Info.log) {
- fflush(logfile);
- if (xf86Info.log == LogSync)
- fsync(fileno(logfile));
- }
- } else {
- /*
- * Note, this code is used before OsInit() has been called, so
- * xalloc and friends can't be used.
- */
- if (len > unused) {
- size += 1024;
- unused += 1024;
- saveBuffer = realloc(saveBuffer, size);
- if (!saveBuffer)
- FatalError("realloc() failed while saving log messages\n");
- }
- unused -= len;
- memcpy(saveBuffer + pos, buffer, len);
- pos += len;
- }
- }
-}
-
-static void
-Write(int verb, const char *f, ...)
-{
- va_list args;
-
- va_start(args, f);
- VWrite(verb, f, args);
- va_end(args);
-}
-
/* Print driver messages in the standard format */
+#undef PREFIX_SIZE
+#define PREFIX_SIZE 14
+
void
xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format,
va_list args)
{
- char *s = X_UNKNOWN_STRING;
-
- /* Ignore verbosity for X_ERROR */
- if (xf86Verbose >= verb || xf86LogVerbose >= verb || type == X_ERROR) {
- switch (type) {
- case X_PROBED:
- s = X_PROBE_STRING;
- break;
- case X_CONFIG:
- s = X_CONFIG_STRING;
- break;
- case X_DEFAULT:
- s = X_DEFAULT_STRING;
- break;
- case X_CMDLINE:
- s = X_CMDLINE_STRING;
- break;
- case X_NOTICE:
- s = X_NOTICE_STRING;
- break;
- case X_ERROR:
- s = X_ERROR_STRING;
- if (verb > 0)
- verb = 0;
- break;
- case X_WARNING:
- s = X_WARNING_STRING;
- break;
- case X_INFO:
- s = X_INFO_STRING;
- break;
- case X_NOT_IMPLEMENTED:
- s = X_NOT_IMPLEMENTED_STRING;
- break;
- case X_NONE:
- s = NULL;
- break;
- }
+ char *tmpFormat;
- if (s != NULL)
- Write(verb, "%s ", s);
- if (scrnIndex >= 0 && scrnIndex < xf86NumScreens)
- Write(verb, "%s(%d): ", xf86Screens[scrnIndex]->name, scrnIndex);
- VWrite(verb, format, args);
-#if 0
- if (type == X_ERROR && xf86Verbose < xf86LogVerbose) {
- fprintf(stderr, X_ERROR_STRING " Please check the log file \"%s\""
- " >before<\n\treporting a problem.\n", xf86LogFile);
- }
-#endif
- }
+ /* Prefix the scrnIndex name to the format string. */
+ if (scrnIndex >= 0 && scrnIndex < xf86NumScreens &&
+ xf86Screens[scrnIndex]->name) {
+ tmpFormat = xalloc(strlen(format) +
+ strlen(xf86Screens[scrnIndex]->name) +
+ PREFIX_SIZE + 1);
+ if (!tmpFormat)
+ return;
+
+ snprintf(tmpFormat, PREFIX_SIZE + 1, "%s(%d): ",
+ xf86Screens[scrnIndex]->name, scrnIndex);
+
+ strcat(tmpFormat, format);
+ LogVMessageVerb(type, verb, tmpFormat, args);
+ xfree(tmpFormat);
+ } else
+ LogVMessageVerb(type, verb, format, args);
}
+#undef PREFIX_SIZE
/* Print driver messages, with verbose level specified directly */
void
@@ -1365,7 +1381,7 @@ xf86ErrorFVerb(int verb, const char *format, ...)
va_start(ap, format);
if (xf86Verbose >= verb || xf86LogVerbose >= verb)
- VWrite(verb, format, ap);
+ LogVWrite(verb, format, ap);
va_end(ap);
}
@@ -1377,15 +1393,10 @@ xf86ErrorF(const char *format, ...)
va_start(ap, format);
if (xf86Verbose >= 1 || xf86LogVerbose >= 1)
- VWrite(1, format, ap);
+ LogVWrite(1, format, ap);
va_end(ap);
}
-void
-OsVendorVErrorF(const char *f, va_list args)
-{
- VWrite(-1, f, args);
-}
void
xf86LogInit()
@@ -1398,59 +1409,28 @@ xf86LogInit()
/* Get the log file name */
if (xf86LogFileFrom == X_DEFAULT) {
/* Append the display number and ".log" */
- lf = malloc(strlen(xf86LogFile) + strlen(display) +
+ lf = malloc(strlen(xf86LogFile) + strlen("%s") +
strlen(LOGSUFFIX) + 1);
if (!lf)
FatalError("Cannot allocate space for the log file name\n");
- sprintf(lf, "%s%s" LOGSUFFIX, xf86LogFile, display);
+ sprintf(lf, "%s%%s" LOGSUFFIX, xf86LogFile);
xf86LogFile = lf;
}
- {
- struct stat buf;
- if (!stat(xf86LogFile,&buf) && S_ISREG(buf.st_mode)) {
- char *oldlog = (char *)malloc(strlen(xf86LogFile)
- + strlen(LOGOLDSUFFIX));
- if (!oldlog)
- FatalError("Cannot allocate space for the log file name\n");
- sprintf(oldlog, "%s" LOGOLDSUFFIX, xf86LogFile);
- if (rename(xf86LogFile,oldlog) == -1)
- FatalError("Cannot move old logfile \"%s\"\n",oldlog);
- free(oldlog);
- }
- }
-
- if ((logfile = fopen(xf86LogFile, "w")) == NULL)
- FatalError("Cannot open log file \"%s\"\n", xf86LogFile);
+
+ xf86LogFile = LogInit(xf86LogFile, LOGOLDSUFFIX);
xf86LogFileWasOpened = TRUE;
- setvbuf(logfile, NULL, _IONBF, 0);
-#ifdef DDXOSVERRORF
- if (!OsVendorVErrorFProc)
- OsVendorVErrorFProc = OsVendorVErrorF;
-#endif
- /* Flush saved log information */
- if (saveBuffer && size > 0) {
- fwrite(saveBuffer, pos, 1, logfile);
- if (xf86Info.log) {
- fflush(logfile);
- if (xf86Info.log == LogFlush)
- fsync(fileno(logfile));
- }
- free(saveBuffer); /* Note, must be free(), not xfree() */
- saveBuffer = 0;
- size = 0;
- }
+ xf86SetVerbosity(xf86Verbose);
+ xf86SetLogVerbosity(xf86LogVerbose);
#undef LOGSUFFIX
+#undef LOGOLDSUFFIX
}
void
xf86CloseLog()
{
- if (logfile) {
- fclose(logfile);
- logfile = NULL;
- }
+ LogClose();
}
@@ -1826,7 +1806,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID,
if (dev || devBus)
xf86MsgVerb(X_WARNING, 0,
"%s: More than one matching Device section "
- "found: %s\n", devList[j]->identifier);
+ "found: %s\n", driverName, devList[j]->identifier);
else
dev = devList[j];
}
@@ -2233,7 +2213,6 @@ xf86GetVerbosity()
return max(xf86Verbose, xf86LogVerbose);
}
-
Pix24Flags
xf86GetPix24()
{
diff --git a/hw/xfree86/common/xf86InPriv.h b/hw/xfree86/common/xf86InPriv.h
index 5cd66d882..32e3c8e1d 100644
--- a/hw/xfree86/common/xf86InPriv.h
+++ b/hw/xfree86/common/xf86InPriv.h
@@ -1,4 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86InPriv.h,v 1.4 1999/05/17 13:17:14 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86InPriv.h,v 1.5 2003/08/24 17:36:52 dawes Exp $ */
+
+/*
+ * Copyright (c) 1999 by The XFree86 Project, 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 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).
+ */
#ifndef _xf86InPriv_h
#define _xf86InPriv_h
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 7c65ce888..ce8817096 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1,16 +1,49 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Init.c,v 3.198 2003/02/26 09:21:38 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Init.c,v 3.211 2003/11/01 00:47:01 dawes Exp $ */
/*
- * Copyright 1991-1999 by The XFree86 Project, Inc.
- *
* Loosely based on code bearing the following copyright:
*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
*/
+/*
+ * Copyright (c) 1992-2003 by The XFree86 Project, 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 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).
+ */
#include <stdlib.h>
+#undef HAS_UTSNAME
+#if !defined(WIN32) && !defined(__UNIXOS2__)
+#define HAS_UTSNAME 1
+#include <sys/utsname.h>
+#endif
+
#define NEED_EVENTS
+#ifdef __UNIXOS2__
+#define I_NEED_OS2_H
+#endif
#include "X.h"
#include "Xmd.h"
#include "Xproto.h"
@@ -134,7 +167,8 @@ xf86CreateRootWindow(WindowPtr pWin)
/* Can't find hook we are hung on */
xf86DrvMsg(pScreen->myNum, X_WARNING /* X_ERROR */,
"xf86CreateRootWindow %p called when not in pScreen->CreateWindow %p n",
- xf86CreateRootWindow, pScreen->CreateWindow );
+ (void *)xf86CreateRootWindow,
+ (void *)pScreen->CreateWindow );
}
/* Unhook this function ... */
@@ -183,7 +217,8 @@ xf86CreateRootWindow(WindowPtr pWin)
xf86RegisteredPropertiesTable[pScreen->myNum] = NULL;
} else {
xf86Msg(X_ERROR, "xf86CreateRootWindow unexpectedly called with "
- "non-root window %p (parent %p)\n", pWin, pWin->parent);
+ "non-root window %p (parent %p)\n",
+ (void *)pWin, (void *)pWin->parent);
ret = FALSE;
}
}
@@ -202,6 +237,46 @@ xf86CreateRootWindow(WindowPtr pWin)
* collecting the pixmap formats.
*/
+static void
+PostConfigInit(void)
+{
+ /*
+ * Install signal handler for unexpected signals
+ */
+ xf86Info.caughtSignal=FALSE;
+ if (!xf86Info.notrapSignals) {
+ signal(SIGSEGV,xf86SigHandler);
+ signal(SIGILL,xf86SigHandler);
+#ifdef SIGEMT
+ signal(SIGEMT,xf86SigHandler);
+#endif
+ signal(SIGFPE,xf86SigHandler);
+#ifdef SIGBUS
+ signal(SIGBUS,xf86SigHandler);
+#endif
+#ifdef SIGSYS
+ signal(SIGSYS,xf86SigHandler);
+#endif
+#ifdef SIGXCPU
+ signal(SIGXCPU,xf86SigHandler);
+#endif
+#ifdef SIGXFSZ
+ signal(SIGXFSZ,xf86SigHandler);
+#endif
+#ifdef MEMDEBUG
+ signal(SIGUSR2,xf86SigMemDebug);
+#endif
+ }
+
+ xf86OSPMClose = xf86OSPMOpen();
+
+ /* Run an external VT Init program if specified in the config file */
+ xf86RunVtInit();
+
+ /* Do this after XF86Config is read (it's normally in OsInit()) */
+ OsInitColors();
+}
+
void
InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
{
@@ -215,6 +290,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
Pix24Flags screenpix24, pix24;
MessageType pix24From = X_DEFAULT;
Bool pix24Fail = FALSE;
+ Bool autoconfig = FALSE;
#ifdef __UNIXOS2__
os2ServerVideoAccess(); /* See if we have access to the screen before doing anything */
@@ -257,51 +333,20 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
/* Read and parse the config file */
if (!xf86DoProbe && !xf86DoConfigure) {
- if (!xf86HandleConfigFile()) {
- xf86Msg(X_ERROR, "Error from xf86HandleConfigFile()\n");
+ switch (xf86HandleConfigFile(FALSE)) {
+ case CONFIG_OK:
+ break;
+ case CONFIG_PARSE_ERROR:
+ xf86Msg(X_ERROR, "Error parsing the config file\n");
return;
+ case CONFIG_NOFILE:
+ autoconfig = TRUE;
+ break;
}
}
- /*
- * Install signal handler for unexpected signals
- */
- xf86Info.caughtSignal=FALSE;
- if (!xf86Info.notrapSignals) {
- signal(SIGSEGV,xf86SigHandler);
- signal(SIGILL,xf86SigHandler);
-#ifdef SIGEMT
- signal(SIGEMT,xf86SigHandler);
-#endif
- signal(SIGFPE,xf86SigHandler);
-#ifdef SIGBUS
- signal(SIGBUS,xf86SigHandler);
-#endif
-#ifdef SIGSYS
- signal(SIGSYS,xf86SigHandler);
-#endif
-#ifdef SIGXCPU
- signal(SIGXCPU,xf86SigHandler);
-#endif
-#ifdef SIGXFSZ
- signal(SIGXFSZ,xf86SigHandler);
-#endif
-#ifdef MEMDEBUG
- signal(SIGUSR2,xf86SigMemDebug);
-#endif
- }
-
- xf86OpenConsole();
- xf86OSPMClose = xf86OSPMOpen();
-
- /* Run an external VT Init program if specified in the config file */
- xf86RunVtInit();
-
- /* Do this after XF86Config is read (it's normally in OsInit()) */
- OsInitColors();
-
- /* Enable full I/O access */
- xf86EnableIO();
+ if (!autoconfig)
+ PostConfigInit();
#ifdef XFree86LOADER
/* Initialise the loader */
@@ -349,6 +394,11 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
#endif
+ xf86OpenConsole();
+
+ /* Enable full I/O access */
+ xf86EnableIO();
+
/* Do a general bus probe. This will be a PCI probe for x86 platforms */
xf86BusProbe();
@@ -358,6 +408,14 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
if (xf86DoConfigure)
DoConfigure();
+ if (autoconfig) {
+ if (!xf86AutoConfig()) {
+ xf86Msg(X_ERROR, "Auto configuration failed\n");
+ return;
+ }
+ PostConfigInit();
+ }
+
/* Initialise the resource broker */
xf86ResourceBrokerInit();
@@ -597,7 +655,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
/* XXX Should this be before or after loading dependent modules? */
if (xf86ProbeOnly)
{
- OsCleanup();
+ OsCleanup(TRUE);
AbortDDX();
fflush(stderr);
exit(0);
@@ -743,7 +801,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
if (xf86OSPMClose)
xf86OSPMClose();
if ((xf86OSPMClose = xf86OSPMOpen()) != NULL)
- xf86MsgVerb(3,X_INFO,"APM registered successfully\n");
+ xf86MsgVerb(X_INFO, 3, "APM registered successfully\n");
/* Make sure full I/O access is enabled */
xf86EnableIO();
@@ -825,6 +883,9 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
*/
xf86Screens[i]->EnableDisableFBAccess = xf86EnableDisableFBAccess;
xf86Screens[i]->SetDGAMode = xf86SetDGAMode;
+ xf86Screens[i]->DPMSSet = NULL;
+ xf86Screens[i]->LoadPalette = NULL;
+ xf86Screens[i]->SetOverscan = NULL;
scr_index = AddScreen(xf86Screens[i]->ScreenInit, argc, argv);
if (scr_index == i) {
/*
@@ -1198,6 +1259,26 @@ OsVendorFatalError()
ErrorF("\n");
}
+int
+xf86SetVerbosity(int verb)
+{
+ int save = xf86Verbose;
+
+ xf86Verbose = verb;
+ LogSetParameter(XLOG_VERBOSITY, verb);
+ return save;
+}
+
+int
+xf86SetLogVerbosity(int verb)
+{
+ int save = xf86LogVerbose;
+
+ xf86LogVerbose = verb;
+ LogSetParameter(XLOG_FILE_VERBOSITY, verb);
+ return save;
+}
+
/*
* ddxProcessArgument --
* Process device-dependent command line args. Returns 0 if argument is
@@ -1217,19 +1298,6 @@ ddxProcessArgument(int argc, char **argv, int i)
* yet. Use malloc/free instead.
*/
-#ifdef DDXOSVERRORF
- static Bool beenHere = FALSE;
-
- if (!beenHere) {
- /*
- * This initialises our hook into VErrorF() for catching log messages
- * that are generated before OsInit() is called.
- */
- OsVendorVErrorFProc = OsVendorVErrorF;
- beenHere = TRUE;
- }
-#endif
-
/* First the options that are only allowed for root */
if (getuid() == 0)
{
@@ -1346,11 +1414,11 @@ ddxProcessArgument(int argc, char **argv, int i)
val = strtol(argv[i], &end, 0);
if (*end == '\0')
{
- xf86Verbose = val;
+ xf86SetVerbosity(val);
return 2;
}
}
- xf86Verbose++;
+ xf86SetVerbosity(++xf86Verbose);
return 1;
}
if (!strcmp(argv[i],"-logverbose"))
@@ -1362,16 +1430,16 @@ ddxProcessArgument(int argc, char **argv, int i)
val = strtol(argv[i], &end, 0);
if (*end == '\0')
{
- xf86LogVerbose = val;
+ xf86SetLogVerbosity(val);
return 2;
}
}
- xf86LogVerbose++;
+ xf86SetLogVerbosity(++xf86LogVerbose);
return 1;
}
if (!strcmp(argv[i],"-quiet"))
{
- xf86Verbose = 0;
+ xf86SetVerbosity(0);
return 1;
}
if (!strcmp(argv[i],"-showconfig") || !strcmp(argv[i],"-version"))
@@ -1659,7 +1727,17 @@ xf86PrintBanner()
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 BUILD_DATE
+#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];
@@ -1673,6 +1751,20 @@ xf86PrintBanner()
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
@@ -1686,17 +1778,7 @@ xf86PrintBanner()
static void
xf86PrintMarkers()
{
- /* Show what the marker symbols mean */
- ErrorF("Markers: " X_PROBE_STRING " probed, "
- X_CONFIG_STRING " from config file, "
- X_DEFAULT_STRING " default setting,\n"
- " " X_CMDLINE_STRING " from command line, "
- X_NOTICE_STRING " notice, "
- X_INFO_STRING " informational,\n"
- " " X_WARNING_STRING " warning, "
- X_ERROR_STRING " error, "
- X_NOT_IMPLEMENTED_STRING " not implemented, "
- X_UNKNOWN_STRING " unknown.\n");
+ LogPrintMarkers();
}
static void
diff --git a/hw/xfree86/common/xf86Io.c b/hw/xfree86/common/xf86Io.c
index 06819bccf..bd44bdeb5 100644
--- a/hw/xfree86/common/xf86Io.c
+++ b/hw/xfree86/common/xf86Io.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Io.c,v 3.53 2003/01/15 03:29:05 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Io.c,v 3.56 2003/11/03 05:11:02 tsi Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
*
@@ -21,6 +21,33 @@
* PERFORMANCE OF THIS SOFTWARE.
*
*/
+/*
+ * Copyright (c) 1992-2003 by The XFree86 Project, 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 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).
+ */
+
/* $XConsortium: xf86Io.c /main/27 1996/10/19 17:58:55 kaleb $ */
#define NEED_EVENTS
@@ -88,7 +115,7 @@ xf86KbdLeds ()
{
int leds, real_leds = 0;
-#if defined (__sparc__)
+#if defined (__sparc__) && defined(__linux__)
static int kbdSun = -1;
if (kbdSun == -1) {
if ((xf86Info.xkbmodel && !strcmp(xf86Info.xkbmodel, "sun")) ||
@@ -122,7 +149,7 @@ xf86KbdLeds ()
#endif
#endif
xf86SetKbdLeds(real_leds);
- return;
+ (void)leds;
}
/*
@@ -264,6 +291,7 @@ Bool init;
#endif /* INHERIT_LOCK_STATE */
xf86SetKbdLeds(leds);
#endif /* LED_CAP */
+ (void)leds;
if (xf86Info.kbdDelay <= 375) rad = 0x00;
else if (xf86Info.kbdDelay <= 625) rad = 0x20;
diff --git a/hw/xfree86/common/xf86Kbd.c b/hw/xfree86/common/xf86Kbd.c
index c1ad79778..3c7ed7a69 100644
--- a/hw/xfree86/common/xf86Kbd.c
+++ b/hw/xfree86/common/xf86Kbd.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Kbd.c,v 3.24 2002/05/31 18:45:58 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Kbd.c,v 3.26 2003/08/24 17:36:53 dawes Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
*
@@ -21,8 +21,39 @@
* PERFORMANCE OF THIS SOFTWARE.
*
*/
+/*
+ * Copyright (c) 1992-2003 by The XFree86 Project, 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 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).
+ */
+
/* $XConsortium: xf86Kbd.c /main/10 1996/02/21 17:38:32 kaleb $ */
+#ifdef __UNIXOS2__
+#define I_NEED_OS2_H
+#endif
+
#include "X.h"
#include "Xmd.h"
#include "input.h"
diff --git a/hw/xfree86/common/xf86KbdBSD.c b/hw/xfree86/common/xf86KbdBSD.c
index a606b14fb..2621e2a81 100644
--- a/hw/xfree86/common/xf86KbdBSD.c
+++ b/hw/xfree86/common/xf86KbdBSD.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86KbdBSD.c,v 3.20 2002/05/22 21:38:27 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86KbdBSD.c,v 3.22 2003/10/07 22:00:52 herrb Exp $ */
/*
* Derived from xf86Kbd.c by S_ren Schmidt (sos@login.dkuug.dk)
* which is Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
@@ -22,6 +22,33 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
+/*
+ * Copyright (c) 1994-2002 by The XFree86 Project, 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 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).
+ */
+
/* $XConsortium: xf86KbdBSD.c /main/6 1996/10/23 13:12:27 kaleb $ */
#include "X.h"
@@ -1057,6 +1084,8 @@ static CARD8 wsAdbMap[] = {
/* 223 */ KEY_NOTUSED,
};
+#define WS_ADB_MAP_SIZE (sizeof(wsAdbMap)/sizeof(unsigned char))
+
static CARD8 wsSunMap[] = {
/* 0x00 */ KEY_NOTUSED,
/* 0x01 */ KEY_NOTUSED, /* stop */
@@ -1190,9 +1219,6 @@ static CARD8 wsSunMap[] = {
#define WS_SUN_MAP_SIZE (sizeof(wsSunMap)/sizeof(unsigned char))
-
-#define WS_ADB_MAP_SIZE (sizeof(wsAdbMap)/sizeof(unsigned char))
-
/*
* Translate raw wskbd keyboard event values to XFree86 standard keycodes
* (based on the AT keyboard scan codes using the tables above
@@ -1210,7 +1236,7 @@ WSKbdToKeycode(int keycode)
return KEY_UNKNOWN;
else
return wsUsbMap[keycode];
-#ifdef WSKBD_TYPE_ADB
+#ifdef WSKBD_TYPE_ADB
case WSKBD_TYPE_ADB:
if (keycode < 0 || keycode >= WS_ADB_MAP_SIZE)
return KEY_UNKNOWN;
@@ -1219,6 +1245,9 @@ WSKbdToKeycode(int keycode)
#endif
#ifdef WSKBD_TYPE_SUN
case WSKBD_TYPE_SUN:
+#ifdef WSKBD_TYPE_SUN5
+ case WSKBD_TYPE_SUN5:
+#endif
if (keycode < 0 || keycode >= WS_SUN_MAP_SIZE)
return KEY_UNKNOWN;
else
diff --git a/hw/xfree86/common/xf86KbdLnx.c b/hw/xfree86/common/xf86KbdLnx.c
index 1f97c0b15..b023acfbd 100644
--- a/hw/xfree86/common/xf86KbdLnx.c
+++ b/hw/xfree86/common/xf86KbdLnx.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86KbdLnx.c,v 3.16 2001/03/05 20:18:20 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86KbdLnx.c,v 3.17 2003/08/24 17:36:53 dawes Exp $ */
/*
* Linux version of keymapping setup. The kernel (since 0.99.14) has support
* for fully remapping the keyboard, but there are some differences between
@@ -28,6 +28,33 @@
* PERFORMANCE OF THIS SOFTWARE.
*
*/
+/*
+ * Copyright (c) 1994-2001 by The XFree86 Project, 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 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).
+ */
+
/* $XConsortium: xf86KbdLnx.c /main/7 1996/10/19 17:59:00 kaleb $ */
#include "X.h"
diff --git a/hw/xfree86/common/xf86Keymap.h b/hw/xfree86/common/xf86Keymap.h
index 45f4dd104..82ea52eef 100644
--- a/hw/xfree86/common/xf86Keymap.h
+++ b/hw/xfree86/common/xf86Keymap.h
@@ -1,4 +1,32 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Keymap.h,v 3.19 2002/05/31 18:45:58 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Keymap.h,v 3.20 2003/08/24 17:36:53 dawes Exp $ */
+
+/*
+ * Copyright (c) 1994-2002 by The XFree86 Project, 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 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).
+ */
+
/*
*
* For Scancodes see notes in atKeynames.h !!!!
diff --git a/hw/xfree86/common/xf86MiscExt.c b/hw/xfree86/common/xf86MiscExt.c
index f04a0b8d8..a36ca52f2 100644
--- a/hw/xfree86/common/xf86MiscExt.c
+++ b/hw/xfree86/common/xf86MiscExt.c
@@ -1,13 +1,40 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86MiscExt.c,v 1.16 2003/11/03 05:11:02 tsi Exp $ */
/*
- * Copyright (c) 1999 by The XFree86 Project, Inc.
+ * Copyright (c) 1999-2003 by The XFree86 Project, 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 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).
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86MiscExt.c,v 1.11 2002/11/20 04:04:57 dawes Exp $ */
/*
* This file contains the Pointer/Keyboard functions needed by the
* XFree86-Misc extension.
*/
+#ifdef __UNIXOS2__
+#define I_NEED_OS2_H
+#endif
+
#include "X.h"
#include "os.h"
#include "xf86.h"
@@ -62,31 +89,17 @@ typedef struct {
int serverNumLock; /* obsolete */
} kbdParamsRec, *kbdParamsPtr;
-typedef enum {
- TO_MISC,
- FROM_MISC
-} MseProtoMapDirection;
-
-static void MiscExtClientStateCallback(pointer, pointer, pointer);
-
/*
Sigh...
The extension should probably be changed to use protocol
names instead of ID numbers
*/
-struct mouse_map {
+static struct mouse_map {
int mtype;
MouseProtocolID proto;
-};
-
-static int
-MapMseProto(int proto, MseProtoMapDirection mapping)
+} m_map[] =
{
- int i;
-
- static struct mouse_map m_map[] =
- {
{ MTYPE_MICROSOFT, PROT_MS },
{ MTYPE_MOUSESYS, PROT_MSC },
{ MTYPE_MMSERIES, PROT_MM },
@@ -109,17 +122,30 @@ MapMseProto(int proto, MseProtoMapDirection mapping)
{ MTYPE_AUTOMOUSE, PROT_AUTO },
{ MTYPE_SYSMOUSE, PROT_SYSMOUSE },
{ MTYPE_UNKNOWN, PROT_UNKNOWN }
- };
+};
+
+static int
+MapMseProtoToMisc(MouseProtocolID proto)
+{
+ int i;
- if (mapping == TO_MISC) {
for (i = 0; m_map[i].proto != PROT_UNKNOWN; i++)
- if (proto == m_map[i].proto) return m_map[i].mtype;
+ if (proto == m_map[i].proto)
+ return m_map[i].mtype;
+
return MTYPE_UNKNOWN;
- } else {
+}
+
+static MouseProtocolID
+MapMseMiscToProto(int proto)
+{
+ int i;
+
for (i = 0; m_map[i].mtype != MTYPE_UNKNOWN; i++)
- if (proto == m_map[i].mtype) return m_map[i].proto;
+ if (proto == m_map[i].mtype)
+ return m_map[i].proto;
+
return PROT_UNKNOWN;
- }
}
Bool
@@ -140,7 +166,7 @@ MiscExtGetMouseSettings(pointer *mouse, char **devname)
*devname = xf86FindOptionValue(pInfo->options, "Device");
pMse = pInfo->private;
- mseptr->type = MapMseProto(pMse->protocolID, TO_MISC);
+ mseptr->type = MapMseProtoToMisc(pMse->protocolID);
mseptr->baudrate = pMse->baudRate;
mseptr->samplerate = pMse->sampleRate;
mseptr->resolution = pMse->resolution;
@@ -279,7 +305,8 @@ MiscExtSetKbdValue(pointer keyboard, MiscExtKbdValType valtype, int value)
}
static void
-MiscExtClientStateCallback(pointer callbacks, pointer data, pointer args)
+MiscExtClientStateCallback(CallbackListPtr *callbacks,
+ pointer data, pointer args)
{
NewClientInfoRec *clientinfo = (NewClientInfoRec*)args;
@@ -287,8 +314,7 @@ MiscExtClientStateCallback(pointer callbacks, pointer data, pointer args)
clientinfo->client->clientState == ClientStateGone) {
xf86Info.grabInfo.override = NULL;
xf86Info.grabInfo.disabled = 0;
- DeleteCallback(&ClientStateCallback,
- (CallbackProcPtr)MiscExtClientStateCallback, NULL);
+ DeleteCallback(&ClientStateCallback, MiscExtClientStateCallback, NULL);
}
}
@@ -307,13 +333,13 @@ MiscExtSetGrabKeysState(ClientPtr client, int state)
if (state == 0 && xf86Info.grabInfo.disabled == 0) {
xf86Info.grabInfo.disabled = 1;
AddCallback(&ClientStateCallback,
- (CallbackProcPtr)MiscExtClientStateCallback, NULL);
+ MiscExtClientStateCallback, NULL);
xf86Info.grabInfo.override = client;
}
else if (state == 1 && xf86Info.grabInfo.disabled == 1) {
xf86Info.grabInfo.disabled = 0;
DeleteCallback(&ClientStateCallback,
- (CallbackProcPtr)MiscExtClientStateCallback, NULL);
+ MiscExtClientStateCallback, NULL);
xf86Info.grabInfo.override = NULL;
}
else
@@ -426,6 +452,7 @@ MiscExtApply(pointer structure, MiscExtStructType mse_or_kbd)
Bool protoChanged = FALSE;
int oldflags;
Bool reopen = FALSE;
+ MouseProtocolID newProtocol;
mseParamsPtr mse = structure;
InputInfoPtr pInfo;
MouseDevPtr pMse;
@@ -508,7 +535,8 @@ MiscExtApply(pointer structure, MiscExtStructType mse_or_kbd)
pMse = pInfo->private;
oldflags = pMse->mouseFlags;
- protoChanged = pMse->protocolID != MapMseProto(mse->type, FROM_MISC);
+ newProtocol = MapMseMiscToProto(mse->type);
+ protoChanged = pMse->protocolID != newProtocol;
if (protoChanged
|| pMse->baudRate != mse->baudrate
|| pMse->sampleRate != mse->samplerate
@@ -522,7 +550,7 @@ MiscExtApply(pointer structure, MiscExtStructType mse_or_kbd)
if (reopen)
(pMse->device->deviceProc)(pMse->device, DEVICE_CLOSE);
- pMse->protocolID = MapMseProto(mse->type, FROM_MISC);
+ pMse->protocolID = newProtocol;
pMse->baudRate = mse->baudrate;
pMse->sampleRate = mse->samplerate;
pMse->resolution = mse->resolution;
@@ -608,5 +636,18 @@ MiscExtGetFilePaths(const char **configfile, const char **modulepath,
return TRUE;
}
+int
+MiscExtPassMessage(int scrnIndex, const char *msgtype, const char *msgval,
+ char **retstr)
+{
+ ScrnInfoPtr pScr = xf86Screens[scrnIndex];
+
+ DEBUG_P("MiscExtPassMessage");
+
+ if (*pScr->HandleMessage == NULL)
+ return BadImplementation;
+ return (*pScr->HandleMessage)(scrnIndex, msgtype, msgval, retstr);
+}
+
#endif /* XF86MISC */
diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c
index ba73921e4..fd2ff4a22 100644
--- a/hw/xfree86/common/xf86Mode.c
+++ b/hw/xfree86/common/xf86Mode.c
@@ -1,10 +1,36 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Mode.c,v 1.63.2.1 2003/04/08 20:51:27 tsi Exp $ */
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Mode.c,v 1.69 2003/10/08 14:58:28 dawes Exp $ */
/*
- * Copyright (c) 1997,1998 by The XFree86 Project, Inc.
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
+/*
* Authors: Dirk Hohndel <hohndel@XFree86.Org>
* David Dawes <dawes@XFree86.Org>
+ * Marc La France <tsi@XFree86.Org>
+ * ... and others
*
* This file includes helper functions for mode related things.
*/
@@ -13,6 +39,7 @@
#include "os.h"
#include "servermd.h"
#include "mibank.h"
+#include "globals.h"
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86DDC.h"
@@ -318,6 +345,25 @@ xf86HandleBuiltinMode(ScrnInfoPtr scrp,
return MODE_OK;
}
+static double
+ModeVRefresh(DisplayModePtr mode)
+{
+ double refresh = 0.0;
+
+ if (mode->VRefresh > 0.0)
+ refresh = mode->VRefresh;
+ else if (mode->HTotal > 0 && mode->VTotal > 0) {
+ refresh = mode->Clock * 1000.0 / mode->HTotal / mode->VTotal;
+ if (mode->Flags & V_INTERLACE)
+ refresh *= 2.0;
+ if (mode->Flags & V_DBLSCAN)
+ refresh /= 2.0;
+ if (mode->VScan > 1)
+ refresh /= mode->VScan;
+ }
+ return refresh;
+}
+
/*
* xf86LookupMode
*
@@ -442,17 +488,7 @@ xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep,
ModePrivFlags = cp->PrivFlags;
break;
}
- if (p->VRefresh > 0.0)
- refresh = p->VRefresh;
- else {
- refresh = p->Clock * 1000.0 / p->HTotal / p->VTotal;
- if (p->Flags & V_INTERLACE)
- refresh *= 2.0;
- if (p->Flags & V_DBLSCAN)
- refresh /= 2.0;
- if (p->VScan > 1)
- refresh /= p->VScan;
- }
+ refresh = ModeVRefresh(p);
if (p->Flags & V_INTERLACE)
refresh /= INTERLACE_REFRESH_WEIGHT;
if (refresh > bestRefresh) {
@@ -491,17 +527,7 @@ xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep,
found = TRUE;
if (strategy == LOOKUP_BEST_REFRESH) {
- if (p->VRefresh > 0.0)
- refresh = p->VRefresh;
- else {
- refresh = p->Clock * 1000.0 / p->HTotal / p->VTotal;
- if (p->Flags & V_INTERLACE)
- refresh *= 2.0;
- if (p->Flags & V_DBLSCAN)
- refresh /= 2.0;
- if (p->VScan > 1)
- refresh /= p->VScan;
- }
+ refresh = ModeVRefresh(p);
if (p->Flags & V_INTERLACE)
refresh /= INTERLACE_REFRESH_WEIGHT;
if (refresh > bestRefresh) {
@@ -847,7 +873,7 @@ xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode,
int i, needDiv2;
/* Sanity checks */
- if (!scrp || !mode /*|| !clockRanges*/) {
+ if (!scrp || !mode || !clockRanges) {
ErrorF("xf86InitialCheckModeForDriver: "
"called with invalid parameters\n");
return MODE_ERROR;
@@ -1186,13 +1212,17 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
int linePitch = -1, virtX = 0, virtY = 0;
int newLinePitch, newVirtX, newVirtY;
int modeSize; /* in pixels */
- Bool validateAllDefaultModes;
+ Bool validateAllDefaultModes = FALSE;
Bool userModes = FALSE;
int saveType;
PixmapFormatRec *BankFormat;
ClockRangePtr cp;
ClockRangesPtr storeClockRanges;
struct monitor_ranges *mon_range = NULL;
+ double targetRefresh = 0.0;
+ int numTimings = 0;
+ range hsync[MAX_HSYNC];
+ range vrefresh[MAX_VREFRESH];
#ifdef DEBUG
ErrorF("xf86ValidateModes(%p, %p, %p, %p,\n\t\t %p, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x)\n",
@@ -1222,58 +1252,164 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
return -1;
}
- /* Probe monitor so that we can enforce/warn about its limits */
+ /*
+ * Probe monitor so that we can enforce/warn about its limits.
+ * If one or more DS_RANGES descriptions are present, use the parameters
+ * that they provide. Otherwise, deduce limits based on the modes that
+ * are shown as supported via standard and detailed timings.
+ *
+ * XXX The full potential of the DDC/EDID data still isn't being tapped.
+ */
if (scrp->monitor->DDC) {
MonPtr monitor = scrp->monitor;
xf86MonPtr DDC = (xf86MonPtr)(scrp->monitor->DDC);
- struct detailed_monitor_section* detMon;
- int i;
+ int i, j;
+ float hmin = 1e6, hmax = 0.0, vmin = 1e6, vmax = 0.0;
+ float h;
+ struct std_timings *t;
+ struct detailed_timings *dt;
+
+ numTimings = 0;
+ for (i = 0; i < DET_TIMINGS; i++) {
+ switch (DDC->det_mon[i].type) {
+ case DS_RANGES:
+ mon_range = &DDC->det_mon[i].section.ranges;
+ hsync[numTimings].lo = mon_range->min_h;
+ hsync[numTimings].hi = mon_range->max_h;
+ vrefresh[numTimings].lo = mon_range->min_v;
+ vrefresh[numTimings].hi = mon_range->max_v;
+ numTimings++;
+ break;
- for (i = 0; i < 4; i++) {
- detMon = &DDC->det_mon[i];
- if(detMon->type == DS_RANGES) {
- mon_range = &detMon->section.ranges;
+ case DS_STD_TIMINGS:
+ t = DDC->det_mon[i].section.std_t;
+ for (j = 0; j < 5; j++) {
+ if (t[j].hsize > 256) { /* sanity check */
+ if (t[j].refresh < vmin)
+ vmin = t[i].refresh;
+ if (t[j].refresh > vmax)
+ vmax = t[i].refresh;
+ /*
+ * For typical modes this is a reasonable estimate
+ * of the horizontal sync rate.
+ */
+ h = t[j].refresh * 1.07 * t[j].vsize / 1000.0;
+ if (h < hmin)
+ hmin = h;
+ if (h > hmax)
+ hmax = h;
+ }
+ }
+ break;
+
+ case DT:
+ dt = &DDC->det_mon[i].section.d_timings;
+ if (dt->clock > 15000000) { /* sanity check */
+ float v;
+ h = (float)dt->clock / (dt->h_active + dt->h_blanking);
+ v = h / (dt->v_active + dt->v_blanking);
+ h /= 1000.0;
+ if (dt->interlaced)
+ v /= 2.0;
+
+ if (v < vmin)
+ vmin = v;
+ if (v > vmax)
+ vmax = v;
+ if (h < hmin)
+ hmin = h;
+ if (h > hmax)
+ hmax = h;
+ }
+ break;
}
+
+ if (numTimings > MAX_HSYNC)
+ break;
}
- if (mon_range) {
+
+ if (numTimings == 0) {
+ t = DDC->timings2;
+ for (i = 0; i < STD_TIMINGS; i++) {
+ if (t[i].hsize > 256) { /* sanity check */
+ if (t[i].refresh < vmin)
+ vmin = t[i].refresh;
+ if (t[i].refresh > vmax)
+ vmax = t[i].refresh;
+ /*
+ * For typical modes this is a reasonable estimate
+ * of the horizontal sync rate.
+ */
+ h = t[i].refresh * 1.07 * t[i].vsize / 1000.0;
+ if (h < hmin)
+ hmin = h;
+ if (h > hmax)
+ hmax = h;
+ }
+ }
+
+ if (hmax > 0.0) {
+ hsync[numTimings].lo = hmin;
+ hsync[numTimings].hi = hmax;
+ vrefresh[numTimings].lo = vmin;
+ vrefresh[numTimings].hi = vmax;
+ numTimings++;
+ }
+ }
+
+ if (numTimings > 0) {
#ifdef DEBUG
- ErrorF("DDC - Max clock %d, Hsync %d-%d kHz - Vrefresh %d-%d Hz\n",
- mon_range->max_clock, mon_range->min_h, mon_range->max_h,
- mon_range->min_v, mon_range->max_v );
+ for (i = 0; i < numTimings; i++) {
+ ErrorF("DDC - Hsync %.1f-%.1f kHz - Vrefresh %.1f-%.1f Hz\n",
+ hsync[i].lo, hsync[i].hi,
+ vrefresh[i].lo, vrefresh[i].hi);
+ }
#endif
#define DDC_SYNC_TOLERANCE SYNC_TOLERANCE
if (monitor->nHsync > 0) {
for (i = 0; i < monitor->nHsync; i++) {
- if ((1.0 - DDC_SYNC_TOLERANCE) * mon_range->min_h >
- monitor->hsync[i].lo ||
- (1.0 + DDC_SYNC_TOLERANCE) * mon_range->max_h <
+ Bool good = FALSE;
+ for (j = 0; j < numTimings; j++) {
+ if ((1.0 - DDC_SYNC_TOLERANCE) * hsync[j].lo <=
+ monitor->hsync[i].lo &&
+ (1.0 + DDC_SYNC_TOLERANCE) * hsync[j].hi >=
monitor->hsync[i].hi) {
+ good = TRUE;
+ break;
+ }
+ }
+ if (!good) {
xf86DrvMsg(scrp->scrnIndex, X_WARNING,
"config file hsync range %g-%gkHz not within DDC "
- "hsync range %d-%dkHz\n",
- monitor->hsync[i].lo, monitor->hsync[i].hi,
- mon_range->min_h, mon_range->max_h);
+ "hsync ranges.\n",
+ monitor->hsync[i].lo, monitor->hsync[i].hi);
}
}
}
if (monitor->nVrefresh > 0) {
- for (i=0; i<monitor->nVrefresh; i++) {
- if ((1.0 - DDC_SYNC_TOLERANCE) * mon_range->min_v >
- monitor->vrefresh[0].lo ||
- (1.0 + DDC_SYNC_TOLERANCE) * mon_range->max_v <
+ for (i = 0; i < monitor->nVrefresh; i++) {
+ Bool good = FALSE;
+ for (j = 0; j < numTimings; j++) {
+ if ((1.0 - DDC_SYNC_TOLERANCE) * vrefresh[j].lo <=
+ monitor->vrefresh[0].lo &&
+ (1.0 + DDC_SYNC_TOLERANCE) * vrefresh[j].hi >=
monitor->vrefresh[0].hi) {
+ good = TRUE;
+ break;
+ }
+ }
+ if (!good) {
xf86DrvMsg(scrp->scrnIndex, X_WARNING,
"config file vrefresh range %g-%gHz not within DDC "
- "vrefresh range %d-%dHz\n",
- monitor->vrefresh[i].lo, monitor->vrefresh[i].hi,
- mon_range->min_v, mon_range->max_v);
+ "vrefresh ranges.\n",
+ monitor->vrefresh[i].lo, monitor->vrefresh[i].hi);
}
}
}
- } /* if (mon_range) */
+ }
}
/*
@@ -1283,58 +1419,61 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
if (strategy & LOOKUP_OPTIONAL_TOLERANCES) {
strategy &= ~LOOKUP_OPTIONAL_TOLERANCES;
} else {
+ const char *type = "";
+
if (scrp->monitor->nHsync <= 0) {
- if (mon_range) {
- scrp->monitor->hsync[0].lo = mon_range->min_h;
- scrp->monitor->hsync[0].hi = mon_range->max_h;
+ if (numTimings > 0) {
+ scrp->monitor->nHsync = numTimings;
+ for (i = 0; i < numTimings; i++) {
+ scrp->monitor->hsync[i].lo = hsync[i].lo;
+ scrp->monitor->hsync[i].hi = hsync[i].hi;
+ }
} else {
scrp->monitor->hsync[0].lo = 28;
scrp->monitor->hsync[0].hi = 33;
+ scrp->monitor->nHsync = 1;
}
- xf86DrvMsg(scrp->scrnIndex, X_WARNING,
- "%s: Using default hsync range of %.2f-%.2fkHz\n",
- scrp->monitor->id,
- scrp->monitor->hsync[0].lo, scrp->monitor->hsync[0].hi);
- scrp->monitor->nHsync = 1;
- } else {
- for (i = 0; i < scrp->monitor->nHsync; i++)
+ type = "default ";
+ }
+ for (i = 0; i < scrp->monitor->nHsync; i++) {
if (scrp->monitor->hsync[i].lo == scrp->monitor->hsync[i].hi)
xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "%s: Using hsync value of %.2f kHz\n",
- scrp->monitor->id,
+ "%s: Using %shsync value of %.2f kHz\n",
+ scrp->monitor->id, type,
scrp->monitor->hsync[i].lo);
else
xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "%s: Using hsync range of %.2f-%.2f kHz\n",
- scrp->monitor->id,
+ "%s: Using %shsync range of %.2f-%.2f kHz\n",
+ scrp->monitor->id, type,
scrp->monitor->hsync[i].lo,
scrp->monitor->hsync[i].hi);
}
+
+ type = "";
if (scrp->monitor->nVrefresh <= 0) {
- if (mon_range) {
- scrp->monitor->vrefresh[0].lo = mon_range->min_v;
- scrp->monitor->vrefresh[0].hi = mon_range->max_v;
+ if (numTimings > 0) {
+ scrp->monitor->nVrefresh = numTimings;
+ for (i = 0; i < numTimings; i++) {
+ scrp->monitor->vrefresh[i].lo = vrefresh[i].lo;
+ scrp->monitor->vrefresh[i].hi = vrefresh[i].hi;
+ }
} else {
scrp->monitor->vrefresh[0].lo = 43;
scrp->monitor->vrefresh[0].hi = 72;
+ scrp->monitor->nVrefresh = 1;
}
- xf86DrvMsg(scrp->scrnIndex, X_WARNING,
- "%s: using default vrefresh range of %.2f-%.2fHz\n",
- scrp->monitor->id,
- scrp->monitor->vrefresh[0].lo,
- scrp->monitor->vrefresh[0].hi);
- scrp->monitor->nVrefresh = 1;
- } else {
- for (i = 0; i < scrp->monitor->nVrefresh; i++)
+ type = "default ";
+ }
+ for (i = 0; i < scrp->monitor->nVrefresh; i++) {
if (scrp->monitor->vrefresh[i].lo == scrp->monitor->vrefresh[i].hi)
xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "%s: Using vrefresh value of %.2f Hz\n",
- scrp->monitor->id,
+ "%s: Using %svrefresh value of %.2f Hz\n",
+ scrp->monitor->id, type,
scrp->monitor->vrefresh[i].lo);
else
xf86DrvMsg(scrp->scrnIndex, X_INFO,
- "%s: Using vrefresh range of %.2f-%.2f Hz\n",
- scrp->monitor->id,
+ "%s: Using %svrefresh range of %.2f-%.2f Hz\n",
+ scrp->monitor->id, type,
scrp->monitor->vrefresh[i].lo,
scrp->monitor->vrefresh[i].hi);
}
@@ -1498,6 +1637,26 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
}
/*
+ * Go through the mode pool and see if any modes match the target
+ * refresh rate, (if specified). If no modes match, abandon the target.
+ */
+ targetRefresh = xf86SetRealOption(scrp->options,
+ "TargetRefresh", 0.0);
+ if (targetRefresh > 0.0) {
+ for (p = scrp->modePool; p != NULL; p = p->next) {
+ if (ModeVRefresh(p) > targetRefresh * (1.0 - SYNC_TOLERANCE))
+ break;
+ }
+ if (!p)
+ targetRefresh = 0.0;
+ }
+
+ if (targetRefresh > 0.0) {
+ xf86DrvMsg(scrp->scrnIndex, X_CONFIG,
+ "Target refresh rate is %.1f Hz\n", targetRefresh);
+ }
+
+ /*
* Allocate one entry in scrp->modes for each named mode.
*/
while (scrp->modes)
@@ -1520,7 +1679,15 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
}
/* Lookup each mode */
- validateAllDefaultModes = TRUE;
+#ifdef RANDR
+ if (!xf86Info.disableRandR
+#ifdef PANORAMIX
+ && noPanoramiXExtension
+#endif
+ )
+ validateAllDefaultModes = TRUE;
+#endif
+
for (p = scrp->modes; ; p = p->next) {
Bool repeat;
@@ -1561,6 +1728,14 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
((double)q->HTotal / (double)q->HDisplay) < 1.15)
continue;
+ /*
+ * If there is a target refresh rate, skip modes that
+ * don't match up.
+ */
+ if (ModeVRefresh(q) <
+ (1.0 - SYNC_TOLERANCE) * targetRefresh)
+ continue;
+
if (modeSize < (q->HDisplay * q->VDisplay)) {
r = q;
modeSize = q->HDisplay * q->VDisplay;
@@ -1833,8 +2008,16 @@ xf86PruneDriverModes(ScrnInfoPtr scrp)
} while (p != NULL && p != first);
/* modePool is no longer needed, turf it */
- while (scrp->modePool)
+ while (scrp->modePool) {
+ /*
+ * A modePool mode's prev field is used to hold a pointer to the
+ * member of the scrp->modes list for which a match was considered.
+ * Clear that pointer first, otherwise xf86DeleteMode might get
+ * confused
+ */
+ scrp->modePool->prev = NULL;
xf86DeleteMode(&scrp->modePool, scrp->modePool);
+ }
}
@@ -1946,22 +2129,16 @@ xf86PrintModes(ScrnInfoPtr scrp)
hsync = (float)p->Clock / (float)p->HTotal;
else
hsync = 0.0;
- if (p->VTotal > 0)
- refresh = hsync * 1000.0 / p->VTotal;
+ refresh = ModeVRefresh(p);
if (p->Flags & V_INTERLACE) {
- refresh *= 2.0;
desc = " (I)";
}
if (p->Flags & V_DBLSCAN) {
- refresh /= 2.0;
desc = " (D)";
}
if (p->VScan > 1) {
- refresh /= p->VScan;
desc2 = " (VScan)";
}
- if (p->VRefresh > 0.0)
- refresh = p->VRefresh;
if (p->type & M_T_BUILTIN)
prefix = "Built-in mode";
else if (p->type & M_T_DEFAULT)
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index 21b9aa590..bd18e895f 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -1,7 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Module.h,v 1.35 2002/12/22 02:03:25 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Module.h,v 1.37 2003/08/24 17:36:54 dawes Exp $ */
/*
- * Copyright (c) 1997-2001 by The XFree86 Project, Inc.
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
*/
/*
@@ -62,7 +85,7 @@ typedef enum {
* mask is 0xFFFF0000.
*/
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 2)
-#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(0, 6)
+#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(0, 7)
#define ABI_XINPUT_VERSION SET_ABI_VERSION(0, 4)
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(0, 2)
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 4)
diff --git a/hw/xfree86/common/xf86Opt.h b/hw/xfree86/common/xf86Opt.h
index dc5c2ca67..718732353 100644
--- a/hw/xfree86/common/xf86Opt.h
+++ b/hw/xfree86/common/xf86Opt.h
@@ -1,4 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Opt.h,v 1.12 2001/05/04 19:05:30 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Opt.h,v 1.15 2003/10/08 14:30:38 dawes Exp $ */
+
+/*
+ * Copyright (c) 1998-2003 by The XFree86 Project, 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 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).
+ */
/* Option handling things that ModuleSetup procs can use */
@@ -46,7 +73,11 @@ int xf86SetIntOption(pointer optlist, const char *name, int deflt);
double xf86SetRealOption(pointer optlist, const char *name, double deflt);
char *xf86SetStrOption(pointer optlist, const char *name, char *deflt);
int xf86SetBoolOption(pointer list, const char *name, int deflt );
-pointer xf86AddNewOption(pointer head, char *name, char *val );
+int xf86CheckIntOption(pointer optlist, const char *name, int deflt);
+double xf86CheckRealOption(pointer optlist, const char *name, double deflt);
+char *xf86CheckStrOption(pointer optlist, const char *name, char *deflt);
+int xf86CheckBoolOption(pointer list, const char *name, int deflt );
+pointer xf86AddNewOption(pointer head, const char *name, const char *val );
pointer xf86NewOption(char *name, char *value );
pointer xf86NextOption(pointer list );
pointer xf86OptionListCreate(const char **options, int count, int used);
@@ -76,7 +107,8 @@ Bool xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value);
Bool xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def);
int xf86NameCmp(const char *s1, const char *s2);
char *xf86NormalizeName(const char *s);
-pointer xf86ReplaceIntOption(pointer optlist, char *name, int val);
-pointer xf86ReplaceBoolOption(pointer optlist, char *name, Bool val);
-pointer xf86ReplaceStrOption(pointer optlist, char *name, char* val);
+pointer xf86ReplaceIntOption(pointer optlist, const char *name, const int val);
+pointer xf86ReplaceRealOption(pointer optlist, const char *name, const double val);
+pointer xf86ReplaceBoolOption(pointer optlist, const char *name, const Bool val);
+pointer xf86ReplaceStrOption(pointer optlist, const char *name, const char* val);
#endif
diff --git a/hw/xfree86/common/xf86Option.c b/hw/xfree86/common/xf86Option.c
index 6ca1590e4..0ba09b507 100644
--- a/hw/xfree86/common/xf86Option.c
+++ b/hw/xfree86/common/xf86Option.c
@@ -1,10 +1,33 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Option.c,v 1.25 2002/09/10 17:39:28 dawes Exp $ */
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Option.c,v 1.29 2003/10/18 12:34:19 dawes Exp $ */
/*
- * Copyright (c) 1998 by The XFree86 Project, Inc.
+ * Copyright (c) 1998-2003 by The XFree86 Project, Inc.
*
- * Author: David Dawes <dawes@xfree86.org>
+ * 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).
+ */
+
+/*
+ * Author: David Dawes <dawes@xfree86.org>
*
* This file includes public option handling functions.
*/
@@ -17,7 +40,8 @@
#include "xf86Xinput.h"
#include "xf86Optrec.h"
-static Bool ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p);
+static Bool ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p,
+ Bool markUsed);
/*
* xf86CollectOptions collects the options from each of the config file
@@ -140,42 +164,41 @@ xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts,
/* Created for new XInput stuff -- essentially extensions to the parser */
-/* These xf86Set* functions are intended for use by non-screen specific code */
-
-int
-xf86SetIntOption(pointer optlist, const char *name, int deflt)
+static int
+LookupIntOption(pointer optlist, const char *name, int deflt, Bool markUsed)
{
OptionInfoRec o;
o.name = name;
o.type = OPTV_INTEGER;
- if (ParseOptionValue(-1, optlist, &o))
+ if (ParseOptionValue(-1, optlist, &o, markUsed))
deflt = o.value.num;
return deflt;
}
-double
-xf86SetRealOption(pointer optlist, const char *name, double deflt)
+static double
+LookupRealOption(pointer optlist, const char *name, double deflt,
+ Bool markUsed)
{
OptionInfoRec o;
o.name = name;
o.type = OPTV_REAL;
- if (ParseOptionValue(-1, optlist, &o))
+ if (ParseOptionValue(-1, optlist, &o, markUsed))
deflt = o.value.realnum;
return deflt;
}
-char *
-xf86SetStrOption(pointer optlist, const char *name, char *deflt)
+static char *
+LookupStrOption(pointer optlist, const char *name, char *deflt, Bool markUsed)
{
OptionInfoRec o;
o.name = name;
o.type = OPTV_STRING;
- if (ParseOptionValue(-1, optlist, &o))
+ if (ParseOptionValue(-1, optlist, &o, markUsed))
deflt = o.value.str;
if (deflt)
return xstrdup(deflt);
@@ -184,24 +207,84 @@ xf86SetStrOption(pointer optlist, const char *name, char *deflt)
}
-int
-xf86SetBoolOption(pointer optlist, const char *name, int deflt)
+static int
+LookupBoolOption(pointer optlist, const char *name, int deflt, Bool markUsed)
{
OptionInfoRec o;
o.name = name;
o.type = OPTV_BOOLEAN;
- if (ParseOptionValue(-1, optlist, &o))
+ if (ParseOptionValue(-1, optlist, &o, markUsed))
deflt = o.value.bool;
return deflt;
}
+/* These xf86Set* functions are intended for use by non-screen specific code */
+
+int
+xf86SetIntOption(pointer optlist, const char *name, int deflt)
+{
+ return LookupIntOption(optlist, name, deflt, TRUE);
+}
+
+
+double
+xf86SetRealOption(pointer optlist, const char *name, double deflt)
+{
+ return LookupRealOption(optlist, name, deflt, TRUE);
+}
+
+
+char *
+xf86SetStrOption(pointer optlist, const char *name, char *deflt)
+{
+ return LookupStrOption(optlist, name, deflt, TRUE);
+}
+
+
+int
+xf86SetBoolOption(pointer optlist, const char *name, int deflt)
+{
+ return LookupBoolOption(optlist, name, deflt, TRUE);
+}
+
+/*
+ * These are like the Set*Option functions, but they don't mark the options
+ * as used.
+ */
+int
+xf86CheckIntOption(pointer optlist, const char *name, int deflt)
+{
+ return LookupIntOption(optlist, name, deflt, FALSE);
+}
+
+
+double
+xf86CheckRealOption(pointer optlist, const char *name, double deflt)
+{
+ return LookupRealOption(optlist, name, deflt, FALSE);
+}
+
+
+char *
+xf86CheckStrOption(pointer optlist, const char *name, char *deflt)
+{
+ return LookupStrOption(optlist, name, deflt, FALSE);
+}
+
+
+int
+xf86CheckBoolOption(pointer optlist, const char *name, int deflt)
+{
+ return LookupBoolOption(optlist, name, deflt, FALSE);
+}
+
/*
* addNewOption() has the required property of replacing the option value
- * it the option is alread present.
+ * if the option is already present.
*/
pointer
-xf86ReplaceIntOption(pointer optlist, char *name, int val)
+xf86ReplaceIntOption(pointer optlist, const char *name, const int val)
{
char *tmp = xnfalloc(16);
sprintf(tmp,"%i",val);
@@ -209,20 +292,29 @@ xf86ReplaceIntOption(pointer optlist, char *name, int val)
}
pointer
-xf86ReplaceBoolOption(pointer optlist, char *name, Bool val)
+xf86ReplaceRealOption(pointer optlist, const char *name, const double val)
+{
+ char *tmp = xnfalloc(32);
+ snprintf(tmp,32,"%f",val);
+ return xf86AddNewOption(optlist,name,tmp);
+}
+
+pointer
+xf86ReplaceBoolOption(pointer optlist, const char *name, const Bool val)
{
- return xf86AddNewOption(optlist,name,(Bool)val?"True":"False");
+ return xf86AddNewOption(optlist,name,val?"True":"False");
}
pointer
-xf86ReplaceStrOption(pointer optlist, char *name, char* val)
+xf86ReplaceStrOption(pointer optlist, const char *name, const char* val)
{
return xf86AddNewOption(optlist,name,val);
}
pointer
-xf86AddNewOption(pointer head, char *name, char *val)
+xf86AddNewOption(pointer head, const char *name, const char *val)
{
+ /* XXX These should actually be allocated in the parser library. */
char *tmp = strdup(val);
char *tmp_name = strdup(name);
@@ -387,14 +479,17 @@ GetBoolValue(OptionInfoPtr p, const char *s)
}
static Bool
-ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p)
+ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p,
+ Bool markUsed)
{
char *s, *end;
- Bool wasUsed;
+ Bool wasUsed = FALSE;
if ((s = xf86findOptionValue(options, p->name)) != NULL) {
- wasUsed = xf86CheckIfOptionUsedByName(options, p->name);
- xf86MarkOptionUsedByName(options, p->name);
+ if (markUsed) {
+ wasUsed = xf86CheckIfOptionUsedByName(options, p->name);
+ xf86MarkOptionUsedByName(options, p->name);
+ }
switch (p->type) {
case OPTV_INTEGER:
if (*s == '\0') {
@@ -501,7 +596,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p)
p->found = FALSE;
break;
}
- if (p->found) {
+ if (p->found && markUsed) {
int verb = 2;
if (wasUsed)
verb = 4;
@@ -535,7 +630,8 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p)
newn = n;
}
if ((s = xf86findOptionValue(options, newn)) != NULL) {
- xf86MarkOptionUsedByName(options, newn);
+ if (markUsed)
+ xf86MarkOptionUsedByName(options, newn);
if (GetBoolValue(&opt, s)) {
p->value.bool = !opt.value.bool;
p->found = TRUE;
@@ -547,7 +643,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p)
} else {
p->found = FALSE;
}
- if (p->found) {
+ if (p->found && markUsed) {
xf86DrvMsgVerb(scrnIndex, X_CONFIG, 2, "Option \"%s\"", newn);
if (*s != 0) {
xf86ErrorFVerb(2, " \"%s\"", s);
@@ -568,7 +664,7 @@ xf86ProcessOptions(int scrnIndex, pointer options, OptionInfoPtr optinfo)
OptionInfoPtr p;
for (p = optinfo; p->name != NULL; p++) {
- ParseOptionValue(scrnIndex, options, p);
+ ParseOptionValue(scrnIndex, options, p, TRUE);
}
}
@@ -576,20 +672,27 @@ xf86ProcessOptions(int scrnIndex, pointer options, OptionInfoPtr optinfo)
OptionInfoPtr
xf86TokenToOptinfo(const OptionInfoRec *table, int token)
{
- const OptionInfoRec *p;
+ const OptionInfoRec *p, *match = NULL, *set = NULL;
if (!table) {
ErrorF("xf86TokenToOptinfo: table is NULL\n");
return NULL;
}
- for (p = table; p->token >= 0 && p->token != token; p++)
- ;
+ for (p = table; p->token >= 0; p++) {
+ if (p->token == token) {
+ match = p;
+ if (p->found)
+ set = p;
+ }
+ }
- if (p->token < 0)
- return NULL;
+ if (set)
+ return (OptionInfoPtr)set;
+ else if (match)
+ return (OptionInfoPtr)match;
else
- return (OptionInfoPtr)p;
+ return NULL;
}
diff --git a/hw/xfree86/common/xf86PM.c b/hw/xfree86/common/xf86PM.c
index 03f5bdec1..eb56fb614 100644
--- a/hw/xfree86/common/xf86PM.c
+++ b/hw/xfree86/common/xf86PM.c
@@ -1,5 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86PM.c,v 3.8 2002/09/29 23:54:34 keithp Exp $ */
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86PM.c,v 3.9 2003/08/24 17:36:54 dawes Exp $ */
+/*
+ * Copyright (c) 2000-2002 by The XFree86 Project, 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 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).
+ */
#include "X.h"
#include "xf86.h"
diff --git a/hw/xfree86/common/xf86PciInfo.h b/hw/xfree86/common/xf86PciInfo.h
index 14f86cf89..19cc009dd 100644
--- a/hw/xfree86/common/xf86PciInfo.h
+++ b/hw/xfree86/common/xf86PciInfo.h
@@ -1,7 +1,33 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h,v 1.144 2003/02/07 20:41:11 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h,v 1.156 2003/10/30 15:26:33 tsi Exp $ */
+
/*
- * Copyright 1995-2002 by The XFree86 Project, Inc.
+ * Copyright (c) 1995-2003 by The XFree86 Project, 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 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).
+ */
+
+/*
* This file contains macros for the PCI Vendor and Device IDs for video
* cards plus a few other things that are needed in drivers or elsewhere.
* This information is used in several ways:
@@ -57,12 +83,10 @@
#define PCI_VENDOR_SUN 0x108E
#define PCI_VENDOR_DIAMOND 0x1092
#define PCI_VENDOR_BROOKTREE 0x109E
-#define PCI_VENDOR_ALI_2 0x10B9
#define PCI_VENDOR_NEOMAGIC 0x10C8
#define PCI_VENDOR_NVIDIA 0x10DE
#define PCI_VENDOR_IMS 0x10E0
#define PCI_VENDOR_INTEGRAPHICS 0x10EA
-#define PCI_VENDOR_VIA 0x1106
#define PCI_VENDOR_ALLIANCE 0x1142
#define PCI_VENDOR_RENDITION 0x1163
#define PCI_VENDOR_3DFX 0x121A
@@ -89,14 +113,31 @@
#define PCI_CHIP_QV1280 0x3033
/* ATI */
+#define PCI_CHIP_RS100_4136 0x4136
+#define PCI_CHIP_RS200_4137 0x4137
#define PCI_CHIP_R300_AD 0x4144
#define PCI_CHIP_R300_AE 0x4145
#define PCI_CHIP_R300_AF 0x4146
#define PCI_CHIP_R300_AG 0x4147
+#define PCI_CHIP_R350_AH 0x4148
+#define PCI_CHIP_R350_AI 0x4149
+#define PCI_CHIP_R350_AJ 0x414A
+#define PCI_CHIP_R350_AK 0x414B
+#define PCI_CHIP_RV350_AP 0x4150
+#define PCI_CHIP_RV350_AQ 0x4151
+#define PCI_CHIP_RV360_AR 0x4152
+#define PCI_CHIP_RV350_AS 0x4153
+#define PCI_CHIP_RV350_AT 0x4154
+#define PCI_CHIP_RV350_AV 0x4156
#define PCI_CHIP_MACH32 0x4158
+#define PCI_CHIP_RS250_4237 0x4237
#define PCI_CHIP_R200_BB 0x4242
+#define PCI_CHIP_R200_BC 0x4243
+#define PCI_CHIP_RS100_4336 0x4336
+#define PCI_CHIP_RS200_4337 0x4337
#define PCI_CHIP_MACH64CT 0x4354
#define PCI_CHIP_MACH64CX 0x4358
+#define PCI_CHIP_RS250_4437 0x4437
#define PCI_CHIP_MACH64ET 0x4554
#define PCI_CHIP_MACH64GB 0x4742
#define PCI_CHIP_MACH64GD 0x4744
@@ -140,12 +181,23 @@
#define PCI_CHIP_RV250_Le 0x4C65
#define PCI_CHIP_RV250_Lf 0x4C66
#define PCI_CHIP_RV250_Lg 0x4C67
+#define PCI_CHIP_RV250_Ln 0x4C6E
#define PCI_CHIP_RAGE128MF 0x4D46
#define PCI_CHIP_RAGE128ML 0x4D4C
#define PCI_CHIP_R300_ND 0x4E44
#define PCI_CHIP_R300_NE 0x4E45
#define PCI_CHIP_R300_NF 0x4E46
#define PCI_CHIP_R300_NG 0x4E47
+#define PCI_CHIP_R350_NH 0x4E48
+#define PCI_CHIP_R350_NI 0x4E49
+#define PCI_CHIP_R360_NJ 0x4E4A
+#define PCI_CHIP_R350_NK 0x4E4B
+#define PCI_CHIP_RV350_NP 0x4E50
+#define PCI_CHIP_RV350_NQ 0x4E51
+#define PCI_CHIP_RV350_NR 0x4E52
+#define PCI_CHIP_RV350_NS 0x4E53
+#define PCI_CHIP_RV350_NT 0x4E54
+#define PCI_CHIP_RV350_NV 0x4E56
#define PCI_CHIP_RAGE128PA 0x5041
#define PCI_CHIP_RAGE128PB 0x5042
#define PCI_CHIP_RAGE128PC 0x5043
@@ -186,11 +238,6 @@
#define PCI_CHIP_RV200_QX 0x5158
#define PCI_CHIP_RV100_QY 0x5159
#define PCI_CHIP_RV100_QZ 0x515A
-#define PCI_CHIP_R200_Qh 0x5168
-#define PCI_CHIP_R200_Qi 0x5169
-#define PCI_CHIP_R200_Qj 0x516A
-#define PCI_CHIP_R200_Qk 0x516B
-#define PCI_CHIP_R200_Ql 0x516C /* Undocumented in all ATI manuals */
#define PCI_CHIP_RAGE128RE 0x5245
#define PCI_CHIP_RAGE128RF 0x5246
#define PCI_CHIP_RAGE128RG 0x5247
@@ -213,6 +260,16 @@
#define PCI_CHIP_MACH64VT 0x5654
#define PCI_CHIP_MACH64VU 0x5655
#define PCI_CHIP_MACH64VV 0x5656
+#define PCI_CHIP_RS300_5834 0x5834
+#define PCI_CHIP_RS300_5835 0x5835
+#define PCI_CHIP_RS300_5836 0x5836
+#define PCI_CHIP_RS300_5837 0x5837
+#define PCI_CHIP_RV280_5960 0x5960
+#define PCI_CHIP_RV280_5961 0x5961
+#define PCI_CHIP_RV280_5962 0x5962
+#define PCI_CHIP_RV280_5964 0x5964
+#define PCI_CHIP_RV280_5C61 0x5C61
+#define PCI_CHIP_RV280_5C63 0x5C63
/* Avance Logic */
#define PCI_CHIP_ALG2064 0x2064
@@ -259,6 +316,7 @@
#define PCI_CHIP_AMD761 0x700E
/* Trident */
+#define PCI_CHIP_2100 0x2100
#define PCI_CHIP_8400 0x8400
#define PCI_CHIP_8420 0x8420
#define PCI_CHIP_8500 0x8500
@@ -343,20 +401,21 @@
#define PCI_CHIP_SIS6326 0x6326
#define PCI_CHIP_SIS7001 0x7001
#define PCI_CHIP_SIS300 0x0300
-#define PCI_CHIP_SIS315H 0x0310
-#define PCI_CHIP_SIS315PRO 0x0325
-#define PCI_CHIP_SIS330 0x0330
+#define PCI_CHIP_SIS315H 0x0310
+#define PCI_CHIP_SIS315PRO 0x0325
+#define PCI_CHIP_SIS330 0x0330
#define PCI_CHIP_SIS630 0x6300
#define PCI_CHIP_SIS540 0x5300
-#define PCI_CHIP_SIS550 0x5315
-#define PCI_CHIP_SIS650 0x6325
-#define PCI_CHIP_SIS730 0x7300
+#define PCI_CHIP_SIS550 0x5315
+#define PCI_CHIP_SIS650 0x6325
+#define PCI_CHIP_SIS730 0x7300
/* Hewlett-Packard */
#define PCI_CHIP_ELROY 0x1054
#define PCI_CHIP_ZX1_SBA 0x1229
#define PCI_CHIP_ZX1_IOC 0x122A
#define PCI_CHIP_ZX1_LBA 0x122E /* a.k.a. Mercury */
+#define PCI_CHIP_ZX1_AGP8 0x12B4 /* a.k.a. QuickSilver */
/* SGS */
#define PCI_CHIP_STG2000 0x0008
@@ -389,9 +448,6 @@
#define PCI_CHIP_BT848 0x0350
#define PCI_CHIP_BT849 0x0351
-/* Acer Laboratories Inc (ALI_2) */
-#define PCI_CHIP_M1541 0x1541
-
/* NVIDIA */
#define PCI_CHIP_NV1 0x0008
#define PCI_CHIP_DAC64 0x0009
@@ -442,10 +498,6 @@
#define PCI_CHIP_IMSTT128 0x9128
#define PCI_CHIP_IMSTT3D 0x9135
-/* VIA Technologies */
-#define PCI_CHIP_APOLLOVP1 0x0585
-#define PCI_CHIP_APOLLOPRO133X 0x0691
-
/* Alliance Semiconductor */
#define PCI_CHIP_AP6410 0x3210
#define PCI_CHIP_AP6422 0x6422
@@ -538,7 +590,6 @@
/* Intel */
#define PCI_CHIP_I815_BRIDGE 0x1130
#define PCI_CHIP_I815 0x1132
-#define PCI_CHIP_430HX_BRIDGE 0x1250
#define PCI_CHIP_82801_P2P 0x244E
#define PCI_CHIP_845_G_BRIDGE 0x2560
#define PCI_CHIP_845_G 0x2562
@@ -550,7 +601,6 @@
#define PCI_CHIP_I810_DC100 0x7123
#define PCI_CHIP_I810_E_BRIDGE 0x7124
#define PCI_CHIP_I810_E 0x7125
-#define PCI_CHIP_440BX_BRIDGE 0x7190
#define PCI_CHIP_I740_AGP 0x7800
#define PCI_CHIP_460GX_PXB 0x84CB
#define PCI_CHIP_460GX_SAC 0x84E0
@@ -565,6 +615,7 @@
#define PCI_CHIP_SMI710 0x0710
#define PCI_CHIP_SMI712 0x0712
#define PCI_CHIP_SMI720 0x0720
+#define PCI_CHIP_SMI731 0x0730
/* VMware */
#define PCI_CHIP_VMWARE0405 0x0405
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index 308e7a72c..a46bfc39b 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -1,7 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Priv.h,v 3.80 2002/12/12 18:29:10 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Priv.h,v 3.82 2003/09/09 03:20:36 dawes Exp $ */
/*
- * Copyright (c) 1997 by The XFree86 Project, Inc.
+ * Copyright (c) 1997-2002 by The XFree86 Project, 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 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).
*/
/*
@@ -167,10 +190,11 @@ void xf86GrabServerCallback(CallbackListPtr *, pointer, pointer);
/* xf86Helper.c */
void xf86LogInit(void);
void xf86CloseLog(void);
-void OsVendorVErrorF(const char *f, va_list args);
/* xf86Init.c */
Bool xf86LoadModules(char **list, pointer *optlist);
+int xf86SetVerbosity(int verb);
+int xf86SetLogVerbosity(int verb);
/* xf86Io.c */
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index ff704b912..8b0a0f4ce 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -1,7 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Privstr.h,v 1.37 2003/02/20 04:05:14 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Privstr.h,v 1.40 2003/10/17 20:02:12 alanh Exp $ */
/*
- * Copyright (c) 1997,1998 by The XFree86 Project, Inc.
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
*/
/*
@@ -159,7 +182,6 @@ typedef struct {
#ifdef DPMSExtension
/* Private info for DPMS */
typedef struct {
- DPMSSetProcPtr Set;
CloseScreenProcPtr CloseScreen;
Bool Enabled;
int Flags;
@@ -199,36 +221,4 @@ typedef struct {
#define WSCONS 32
#endif
-/* Prefix strings for driver messages */
-#ifndef X_UNKNOWN_STRING
-#define X_UNKNOWN_STRING "(\?\?)"
-#endif
-#ifndef X_PROBE_STRING
-#define X_PROBE_STRING "(--)"
-#endif
-#ifndef X_CONFIG_STRING
-#define X_CONFIG_STRING "(**)"
-#endif
-#ifndef X_DEFAULT_STRING
-#define X_DEFAULT_STRING "(==)"
-#endif
-#ifndef X_CMDLINE_STRING
-#define X_CMDLINE_STRING "(++)"
-#endif
-#ifndef X_NOTICE_STRING
-#define X_NOTICE_STRING "(!!)"
-#endif
-#ifndef X_ERROR_STRING
-#define X_ERROR_STRING "(EE)"
-#endif
-#ifndef X_WARNING_STRING
-#define X_WARNING_STRING "(WW)"
-#endif
-#ifndef X_INFO_STRING
-#define X_INFO_STRING "(II)"
-#endif
-#ifndef X_NOT_IMPLEMENTED_STRING
-#define X_NOT_IMPLEMENTED_STRING "(NI)"
-#endif
-
#endif /* _XF86PRIVSTR_H */
diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c
index c2dbcc170..546c909ff 100644
--- a/hw/xfree86/common/xf86RandR.c
+++ b/hw/xfree86/common/xf86RandR.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86RandR.c,v 1.4 2003/02/13 10:49:38 eich Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86RandR.c,v 1.8 2003/11/10 16:42:13 tsi Exp $
*
* Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -48,9 +48,9 @@ static int
xf86RandRModeRefresh (DisplayModePtr mode)
{
if (mode->VRefresh)
- return (int) mode->VRefresh;
+ return (int) (mode->VRefresh + 0.5);
else
- return (int) (mode->Clock * 1000.0 / mode->HTotal / mode->VTotal);
+ return (int) (mode->Clock * 1000.0 / mode->HTotal / mode->VTotal + 0.5);
}
static Bool
@@ -60,7 +60,6 @@ xf86RandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
DisplayModePtr mode;
- Bool reportVirtual = TRUE;
int refresh0 = 60;
*rotations = RR_Rotate_0;
@@ -75,9 +74,6 @@ xf86RandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
pScreen->mmWidth, pScreen->mmHeight);
if (!pSize)
return FALSE;
- if (mode->HDisplay == randrp->virtualX &&
- mode->VDisplay == randrp->virtualY)
- reportVirtual = FALSE;
RRRegisterRate (pScreen, pSize, refresh);
if (mode == scrp->currentMode &&
mode->HDisplay == pScreen->width && mode->VDisplay == pScreen->height)
@@ -85,13 +81,14 @@ xf86RandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
if (mode->next == scrp->modes)
break;
}
- if (reportVirtual)
+ if (scrp->currentMode->HDisplay != randrp->virtualX ||
+ scrp->currentMode->VDisplay != randrp->virtualY)
{
mode = scrp->modes;
pSize = RRRegisterSize (pScreen,
randrp->virtualX, randrp->virtualY,
- pScreen->mmWidth * randrp->virtualX / mode->HDisplay,
- pScreen->mmHeight * randrp->virtualY / mode->VDisplay);
+ pScreen->mmWidth * randrp->virtualX / scrp->currentMode->HDisplay,
+ pScreen->mmHeight * randrp->virtualY / scrp->currentMode->VDisplay);
if (!pSize)
return FALSE;
RRRegisterRate (pScreen, pSize, refresh0);
@@ -202,17 +199,21 @@ xf86RandRSetConfig (ScreenPtr pScreen,
static Bool
xf86RandRCreateScreenResources (ScreenPtr pScreen)
{
- ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+#if 0
+ ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
DisplayModePtr mode;
+#endif
pScreen->CreateScreenResources = randrp->CreateScreenResources;
if (!(*pScreen->CreateScreenResources) (pScreen))
return FALSE;
+#if 0
mode = scrp->currentMode;
if (mode)
xf86RandRSetMode (pScreen, mode, TRUE);
+#endif
return TRUE;
}
diff --git a/hw/xfree86/common/xf86Resources.h b/hw/xfree86/common/xf86Resources.h
index 6ed3015ec..ce2c62bb3 100644
--- a/hw/xfree86/common/xf86Resources.h
+++ b/hw/xfree86/common/xf86Resources.h
@@ -1,4 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Resources.h,v 1.14 2002/07/24 01:47:24 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Resources.h,v 1.15 2003/08/24 17:36:55 dawes Exp $ */
+
+/*
+ * Copyright (c) 1999-2002 by The XFree86 Project, 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 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).
+ */
#ifndef _XF86_RESOURCES_H
diff --git a/hw/xfree86/common/xf86Version.h b/hw/xfree86/common/xf86Version.h
index e548b0437..07253bace 100644
--- a/hw/xfree86/common/xf86Version.h
+++ b/hw/xfree86/common/xf86Version.h
@@ -1,11 +1,38 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf86Version.h,v 3.543.2.1 2003/05/10 01:10:10 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf86Version.h,v 3.563 2003/11/21 06:01:44 dawes Exp $ */
+
+/*
+ * Copyright (c) 1994-2003 by The XFree86 Project, 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 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).
+ */
#ifndef XF86_VERSION_CURRENT
#define XF86_VERSION_MAJOR 4
#define XF86_VERSION_MINOR 3
-#define XF86_VERSION_PATCH 0
-#define XF86_VERSION_SNAP 1
+#define XF86_VERSION_PATCH 99
+#define XF86_VERSION_SNAP 16
/* This has five arguments for compatibilty reasons */
#define XF86_VERSION_NUMERIC(major,minor,patch,snap,dummy) \
diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c
index f766f899e..467270e10 100644
--- a/hw/xfree86/common/xf86VidMode.c
+++ b/hw/xfree86/common/xf86VidMode.c
@@ -1,7 +1,30 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86VidMode.c,v 1.17 2003/08/24 17:36:55 dawes Exp $ */
/*
- * Copyright (c) 1999 by The XFree86 Project, Inc.
+ * Copyright (c) 1999-2003 by The XFree86 Project, 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 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).
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86VidMode.c,v 1.14 2003/01/28 20:52:28 tsi Exp $ */
/*
* This file contains the VidMode functions required by the extension.
@@ -330,6 +353,8 @@ Bool
VidModeSwitchMode(int scrnIndex, pointer mode)
{
ScrnInfoPtr pScrn;
+ DisplayModePtr pTmpMode;
+ Bool retval;
DEBUG_P("VidModeSwitchMode");
@@ -337,9 +362,15 @@ VidModeSwitchMode(int scrnIndex, pointer mode)
return FALSE;
pScrn = xf86Screens[scrnIndex];
+ /* save in case we fail */
+ pTmpMode = pScrn->currentMode;
/* Force a mode switch */
pScrn->currentMode = NULL;
- return xf86SwitchMode(pScrn->pScreen, mode);
+ retval = xf86SwitchMode(pScrn->pScreen, mode);
+ /* we failed: restore it */
+ if (retval == FALSE)
+ pScrn->currentMode = pTmpMode;
+ return retval;
}
Bool
@@ -440,10 +471,13 @@ VidModeAddModeline(int scrnIndex, pointer mode)
pScrn = xf86Screens[scrnIndex];
+ ((DisplayModePtr)mode)->name = strdup(""); /* freed by deletemode */
+ ((DisplayModePtr)mode)->status = MODE_OK;
((DisplayModePtr)mode)->next = pScrn->modes->next;
((DisplayModePtr)mode)->prev = pScrn->modes;
pScrn->modes->next = (DisplayModePtr)mode;
- ((DisplayModePtr)mode)->next->prev = (DisplayModePtr)mode;
+ if( ((DisplayModePtr)mode)->next != NULL )
+ ((DisplayModePtr)mode)->next->prev = (DisplayModePtr)mode;
return TRUE;
}
@@ -547,6 +581,7 @@ VidModeCreateMode(void)
mode = xalloc(sizeof(DisplayModeRec));
if (mode != NULL) {
mode->name = "";
+ mode->VScan = 1; /* divides refresh rate. default = 1 */
mode->Private = NULL;
mode->next = mode;
mode->prev = mode;
diff --git a/hw/xfree86/common/xf86XKB.c b/hw/xfree86/common/xf86XKB.c
index ddd3055ab..e1755de1e 100644
--- a/hw/xfree86/common/xf86XKB.c
+++ b/hw/xfree86/common/xf86XKB.c
@@ -24,7 +24,34 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86XKB.c,v 3.11 2002/10/11 01:40:31 dawes Exp $ */
+/*
+ * Copyright (c) 1994-2002 by The XFree86 Project, 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 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).
+ */
+
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86XKB.c,v 3.12 2003/08/24 17:36:55 dawes Exp $ */
#include <stdio.h>
#define NEED_EVENTS 1
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 53fa1b3ff..eb871a40d 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -1,4 +1,4 @@
-/* $XConsortium: xf86Xinput.c /main/14 1996/10/27 11:05:25 kaleb $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c,v 3.70 2003/11/03 05:11:02 tsi Exp $ */
/*
* Copyright 1995-1999 by Frederic Lepied, France. <Lepied@XFree86.org>
*
@@ -21,8 +21,33 @@
* PERFORMANCE OF THIS SOFTWARE.
*
*/
-
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c,v 3.68 2002/10/11 01:40:31 dawes Exp $ */
+/*
+ * Copyright (c) 2000-2002 by The XFree86 Project, 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 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).
+ */
+/* $XConsortium: xf86Xinput.c /main/14 1996/10/27 11:05:25 kaleb $ */
#include "Xfuncproto.h"
#include "Xmd.h"
@@ -854,7 +879,6 @@ xf86PostMotionEvent(DeviceIntPtr device,
int valuator[6];
int oldaxis[6];
int *axisvals;
- AxisInfoPtr axes;
int dx = 0, dy = 0;
float mult;
int x, y;
@@ -883,7 +907,6 @@ xf86PostMotionEvent(DeviceIntPtr device,
}
axisvals = val->axisVal;
- axes = val->axes;
va_start(var, num_valuators);
diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h
index 1e9694402..9a0393447 100644
--- a/hw/xfree86/common/xf86Xinput.h
+++ b/hw/xfree86/common/xf86Xinput.h
@@ -22,7 +22,34 @@
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Xinput.h,v 3.35 2002/10/11 01:40:31 dawes Exp $ */
+/*
+ * Copyright (c) 2000-2002 by The XFree86 Project, 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 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).
+ */
+
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Xinput.h,v 3.36 2003/08/24 17:36:55 dawes Exp $ */
#ifndef _xf86Xinput_h
#define _xf86Xinput_h
diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c
index 531a83c08..f7cb065a4 100644
--- a/hw/xfree86/common/xf86cmap.c
+++ b/hw/xfree86/common/xf86cmap.c
@@ -1,4 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86cmap.c,v 1.23 2001/11/16 16:47:55 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86cmap.c,v 1.25 2003/10/17 20:02:12 alanh Exp $ */
+/*
+ * Copyright (c) 1998-2001 by The XFree86 Project, 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 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).
+ */
#if defined(_XOPEN_SOURCE) || defined(__QNXNTO__)
#include <math.h>
@@ -52,8 +78,6 @@ typedef struct {
DestroyColormapProcPtr DestroyColormap;
InstallColormapProcPtr InstallColormap;
StoreColorsProcPtr StoreColors;
- LoadPaletteFuncPtr LoadPalette;
- SetOverscanFuncPtr SetOverscan;
Bool (*EnterVT)(int, int);
Bool (*SwitchMode)(int, DisplayModePtr, int);
int (*SetDGAMode)(int, int, DGADevicePtr);
@@ -103,8 +127,8 @@ Bool xf86HandleColormaps(
ScreenPtr pScreen,
int maxColors,
int sigRGBbits,
- LoadPaletteFuncPtr loadPalette,
- SetOverscanFuncPtr setOverscan,
+ xf86LoadPaletteProc *loadPalette,
+ xf86SetOverscanProc *setOverscan,
unsigned int flags
){
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
@@ -155,8 +179,8 @@ Bool xf86HandleColormaps(
pScreen->StoreColors = CMapStoreColors;
pScreenPriv->pScrn = pScrn;
- pScreenPriv->LoadPalette = loadPalette;
- pScreenPriv->SetOverscan = setOverscan;
+ pScrn->LoadPalette = loadPalette;
+ pScrn->SetOverscan = setOverscan;
pScreenPriv->maxColors = maxColors;
pScreenPriv->sigRGBbits = sigRGBbits;
pScreenPriv->gammaElements = elements;
@@ -483,6 +507,7 @@ CMapReinstallMap(ColormapPtr pmap)
(CMapScreenPtr) pmap->pScreen->devPrivates[CMapScreenIndex].ptr;
CMapColormapPtr cmapPriv =
(CMapColormapPtr) pmap->devPrivates[CMapColormapIndex].ptr;
+ ScrnInfoPtr pScrn = xf86Screens[pmap->pScreen->myNum];
int i = cmapPriv->numColors;
int *indices = pScreenPriv->PreAllocIndices;
@@ -492,13 +517,13 @@ CMapReinstallMap(ColormapPtr pmap)
if(cmapPriv->recalculate)
CMapRefreshColors(pmap, cmapPriv->numColors, indices);
else {
- (*pScreenPriv->LoadPalette)(pScreenPriv->pScrn, cmapPriv->numColors,
+ (*pScrn->LoadPalette)(pScrn, cmapPriv->numColors,
indices, cmapPriv->colors, pmap->pVisual);
- if (pScreenPriv->SetOverscan) {
+ if (pScrn->SetOverscan) {
#ifdef DEBUGOVERSCAN
ErrorF("SetOverscan() called from CMapReinstallMap\n");
#endif
- pScreenPriv->SetOverscan(pScreenPriv->pScrn, cmapPriv->overscan);
+ pScrn->SetOverscan(pScrn, cmapPriv->overscan);
}
}
@@ -514,6 +539,7 @@ CMapRefreshColors(ColormapPtr pmap, int defs, int* indices)
CMapColormapPtr pColPriv =
(CMapColormapPtr) pmap->devPrivates[CMapColormapIndex].ptr;
VisualPtr pVisual = pmap->pVisual;
+ ScrnInfoPtr pScrn = xf86Screens[pmap->pScreen->myNum];
int numColors, i;
LOCO *gamma, *colors;
EntryPtr entry;
@@ -616,10 +642,10 @@ CMapRefreshColors(ColormapPtr pmap, int defs, int* indices)
if(LOAD_PALETTE(pmap, pmap->pScreen->myNum))
- (*pScreenPriv->LoadPalette)(pScreenPriv->pScrn, defs, indices,
+ (*pScrn->LoadPalette)(pScreenPriv->pScrn, defs, indices,
colors, pmap->pVisual);
- if (pScreenPriv->SetOverscan)
+ if (pScrn->SetOverscan)
CMapSetOverscan(pmap, defs, indices);
}
@@ -646,6 +672,7 @@ CMapSetOverscan(ColormapPtr pmap, int defs, int *indices)
(CMapScreenPtr) pmap->pScreen->devPrivates[CMapScreenIndex].ptr;
CMapColormapPtr pColPriv =
(CMapColormapPtr) pmap->devPrivates[CMapColormapIndex].ptr;
+ ScrnInfoPtr pScrn = xf86Screens[pmap->pScreen->myNum];
VisualPtr pVisual = pmap->pVisual;
int i;
LOCO *colors;
@@ -771,7 +798,7 @@ CMapSetOverscan(ColormapPtr pmap, int defs, int *indices)
#ifdef DEBUGOVERSCAN
ErrorF("SetOverscan() called from CmapSetOverscan\n");
#endif
- pScreenPriv->SetOverscan(pScreenPriv->pScrn, overscan);
+ pScrn->SetOverscan(pScreenPriv->pScrn, overscan);
}
}
}
diff --git a/hw/xfree86/common/xf86cmap.h b/hw/xfree86/common/xf86cmap.h
index b871d6762..4291b971a 100644
--- a/hw/xfree86/common/xf86cmap.h
+++ b/hw/xfree86/common/xf86cmap.h
@@ -1,4 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86cmap.h,v 1.7 2001/05/06 00:49:12 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86cmap.h,v 1.9 2003/10/17 20:02:12 alanh Exp $ */
+
+/*
+ * Copyright (c) 1998-2001 by The XFree86 Project, 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 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).
+ */
#ifndef _XF86CMAP_H
#define _XF86CMAP_H
@@ -10,25 +37,12 @@
#define CMAP_RELOAD_ON_MODE_SWITCH 0x0000002
#define CMAP_LOAD_EVEN_IF_OFFSCREEN 0x0000004
-typedef void (*LoadPaletteFuncPtr)(
- ScrnInfoPtr pScrn,
- int numColors,
- int *indicies,
- LOCO *colors,
- VisualPtr pVisual
-);
-
-typedef void (*SetOverscanFuncPtr)(
- ScrnInfoPtr pScrn,
- int Index
-);
-
Bool xf86HandleColormaps(
ScreenPtr pScreen,
int maxCol,
int sigRGBbits,
- LoadPaletteFuncPtr loadPalette,
- SetOverscanFuncPtr setOverscan,
+ xf86LoadPaletteProc *loadPalette,
+ xf86SetOverscanProc *setOverscan,
unsigned int flags
);
diff --git a/hw/xfree86/common/xf86fbBus.c b/hw/xfree86/common/xf86fbBus.c
index 8fcf9b817..8a807624f 100644
--- a/hw/xfree86/common/xf86fbBus.c
+++ b/hw/xfree86/common/xf86fbBus.c
@@ -1,7 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86fbBus.c,v 1.2 2001/10/28 03:33:19 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86fbBus.c,v 1.3 2003/08/24 17:36:55 dawes Exp $ */
/*
- * Copyright (c) 2000 by The XFree86 Project, Inc.
+ * Copyright (c) 2000-2001 by The XFree86 Project, 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 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).
*/
/*
diff --git a/hw/xfree86/common/xf86fbman.c b/hw/xfree86/common/xf86fbman.c
index 7f4cffaae..b7c4afa1c 100644
--- a/hw/xfree86/common/xf86fbman.c
+++ b/hw/xfree86/common/xf86fbman.c
@@ -1,4 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86fbman.c,v 1.24 2001/12/05 19:23:52 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86fbman.c,v 1.28 2003/11/03 05:11:03 tsi Exp $ */
+
+/*
+ * Copyright (c) 1998-2001 by The XFree86 Project, 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 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).
+ */
#include "misc.h"
#include "xf86.h"
@@ -8,6 +35,10 @@
#include "regionstr.h"
#include "xf86fbman.h"
+/*
+#define DEBUG
+*/
+
static int xf86FBMangerIndex = -1;
static unsigned long xf86ManagerGeneration = 0;
@@ -118,19 +149,19 @@ xf86FreeOffscreenArea(FBAreaPtr area)
void
-xf86FreeOffscreenLinear(FBLinearPtr area)
+xf86FreeOffscreenLinear(FBLinearPtr linear)
{
FBManagerFuncsPtr funcs;
- if(!area) return;
+ if(!linear) return;
if(xf86FBMangerIndex < 0)
return;
if(!(funcs =
- (FBManagerFuncsPtr)area->pScreen->devPrivates[xf86FBMangerIndex].ptr))
+ (FBManagerFuncsPtr)linear->pScreen->devPrivates[xf86FBMangerIndex].ptr))
return;
- (*funcs->FreeOffscreenLinear)(area);
+ (*funcs->FreeOffscreenLinear)(linear);
return;
}
@@ -244,18 +275,19 @@ typedef struct _FBLink {
} FBLink, *FBLinkPtr;
typedef struct _FBLinearLink {
- FBLinear linear;
- FBAreaPtr area;
+ FBLinear linear;
+ int free; /* need to add free here as FBLinear is publicly accessible */
+ FBAreaPtr area; /* only used if allocation came from XY area */
struct _FBLinearLink *next;
} FBLinearLink, *FBLinearLinkPtr;
typedef struct {
- ScreenPtr pScreen;
- RegionPtr InitialBoxes;
- RegionPtr FreeBoxes;
- FBLinkPtr UsedAreas;
- int NumUsedAreas;
+ ScreenPtr pScreen;
+ RegionPtr InitialBoxes;
+ RegionPtr FreeBoxes;
+ FBLinkPtr UsedAreas;
+ int NumUsedAreas;
FBLinearLinkPtr LinearAreas;
CloseScreenProcPtr CloseScreen;
int NumCallbacks;
@@ -772,6 +804,97 @@ LinearRemoveCBWrapper(FBAreaPtr area)
xfree(pLink);
}
+#ifdef DEBUG
+static void
+Dump(FBLinearLinkPtr pLink)
+{
+ if (!pLink) ErrorF("MMmm, PLINK IS NULL!\n");
+
+ while (pLink) {
+ ErrorF(" Offset:%08x, Size:%08x, %s,%s\n",
+ pLink->linear.offset,
+ pLink->linear.size,
+ pLink->free ? "Free" : "Used",
+ pLink->area ? "Area" : "Linear");
+
+ pLink = pLink->next;
+ }
+}
+#endif
+
+static FBLinearPtr
+AllocateLinear(
+ FBManagerPtr offman,
+ int size,
+ int granularity,
+ pointer privData
+){
+ ScreenPtr pScreen = offman->pScreen;
+ FBLinearLinkPtr linear = NULL;
+ FBLinearLinkPtr newlink = NULL;
+ int offset, end;
+
+ if(size <= 0) return NULL;
+
+ if (!offman->LinearAreas) return NULL;
+
+ linear = offman->LinearAreas;
+ while (linear) {
+ /* Make sure we get a free area that's not an XY fallback case */
+ if (!linear->area && linear->free) {
+ offset = (linear->linear.offset + granularity) & ~granularity;
+ end = offset+size;
+ if (end <= (linear->linear.offset + linear->linear.size))
+ break;
+ }
+ linear = linear->next;
+ }
+ if (!linear)
+ return NULL;
+
+ /* break left */
+ if (offset > linear->linear.offset) {
+ newlink = xalloc(sizeof(FBLinearLink));
+ if (!newlink)
+ return NULL;
+ newlink->area = NULL;
+ newlink->linear.offset = offset;
+ newlink->linear.size = linear->linear.size - (offset - linear->linear.offset);
+ newlink->free = 1;
+ newlink->next = linear->next;
+ linear->linear.size -= newlink->linear.size;
+ linear->next = newlink;
+ linear = newlink;
+ }
+
+ /* break right */
+ if (size < linear->linear.size) {
+ newlink = xalloc(sizeof(FBLinearLink));
+ if (!newlink)
+ return NULL;
+ newlink->area = NULL;
+ newlink->linear.offset = offset + size;
+ newlink->linear.size = linear->linear.size - size;
+ newlink->free = 1;
+ newlink->next = linear->next;
+ linear->linear.size = size;
+ linear->next = newlink;
+ }
+
+ /* p = middle block */
+ linear->linear.granularity = granularity;
+ linear->free = 0;
+ linear->linear.pScreen = pScreen;
+ linear->linear.MoveLinearCallback = NULL;
+ linear->linear.RemoveLinearCallback = NULL;
+ linear->linear.devPrivate.ptr = NULL;
+
+#ifdef DEBUG
+ Dump(offman->LinearAreas);
+#endif
+
+ return &(linear->linear);
+}
static FBLinearPtr
localAllocateOffscreenLinear(
@@ -791,28 +914,21 @@ localAllocateOffscreenLinear(
offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
- if(!(link = xalloc(sizeof(FBLinearLink))))
- return NULL;
+ /* Try to allocate from linear memory first...... */
+#ifdef DEBUG
+ ErrorF("ALLOCATING LINEAR\n");
+#endif
+ if ((linear = AllocateLinear(offman, length, gran, privData)))
+ return linear;
-#if 0
- if(we have linear heap space) {
- if(able to allocate some) {
- link->area = NULL;
- link->next = offman->LinearAreas;
- offman->LinearAreas = link;
- linear = link->linear;
- linear->pScreen = pScreen;
- linear->size = length;
- linear->offset = ????;
- linear->granularity = gran;
- linear->MoveLinearAreaCallback = moveCB;
- linear->RemoveLinearAreaCallback = removeCB;
- linear->devPrivate.ptr = privData;
- return linear;
- } /* else fallthrough */
- }
+#ifdef DEBUG
+ ErrorF("NOPE, ALLOCATING AREA\n");
#endif
+ if(!(link = xalloc(sizeof(FBLinearLink))))
+ return NULL;
+
+ /* No linear available, so try and pinch some from the XY areas */
extents = REGION_EXTENTS(pScreen, offman->InitialBoxes);
pitch = extents->x2 - extents->x1;
@@ -836,6 +952,7 @@ localAllocateOffscreenLinear(
privData)))
{
link->area = area;
+ link->free = 0;
link->next = offman->LinearAreas;
offman->LinearAreas = link;
linear = &(link->linear);
@@ -849,6 +966,10 @@ localAllocateOffscreenLinear(
} else
xfree(link);
+#ifdef DEBUG
+ Dump(offman->LinearAreas);
+#endif
+
return linear;
}
@@ -861,7 +982,7 @@ localFreeOffscreenLinear(FBLinearPtr linear)
ScreenPtr pScreen = linear->pScreen;
offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
-
+
pLink = offman->LinearAreas;
if(!pLink) return;
@@ -872,16 +993,42 @@ localFreeOffscreenLinear(FBLinearPtr linear)
}
if(pLink->area) { /* really an XY area */
- localFreeOffscreenArea(pLink->area);
- } else {
- /* free the linear area */
+#ifdef DEBUG
+ ErrorF("FREEING AREA\n");
+#endif
+ localFreeOffscreenArea(pLink->area);
+ if(pLinkPrev)
+ pLinkPrev->next = pLink->next;
+ else offman->LinearAreas = pLink->next;
+ xfree(pLink);
+#ifdef DEBUG
+ Dump(offman->LinearAreas);
+#endif
+ return;
}
- if(pLinkPrev)
- pLinkPrev->next = pLink->next;
- else offman->LinearAreas = pLink->next;
+ pLink->free = 1;
- xfree(pLink);
+ if (pLink->next && pLink->next->free) {
+ FBLinearLinkPtr p = pLink->next;
+ pLink->linear.size += p->linear.size;
+ pLink->next = p->next;
+ free(p);
+ }
+
+ if(pLinkPrev) {
+ if (pLinkPrev->next && pLinkPrev->next->free && !pLinkPrev->area) {
+ FBLinearLinkPtr p = pLinkPrev->next;
+ pLinkPrev->linear.size += p->linear.size;
+ pLinkPrev->next = p->next;
+ free(p);
+ }
+ }
+
+#ifdef DEBUG
+ ErrorF("FREEING LINEAR\n");
+ Dump(offman->LinearAreas);
+#endif
}
@@ -889,7 +1036,7 @@ static Bool
localResizeOffscreenLinear(FBLinearPtr resize, int length)
{
FBManagerPtr offman;
- FBLinearLinkPtr pLink, pLinkPrev = NULL;
+ FBLinearLinkPtr pLink;
ScreenPtr pScreen = resize->pScreen;
offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
@@ -898,7 +1045,6 @@ localResizeOffscreenLinear(FBLinearPtr resize, int length)
if(!pLink) return FALSE;
while(&(pLink->linear) != resize) {
- pLinkPrev = pLink;
pLink = pLink->next;
if(!pLink) return FALSE;
}
@@ -928,7 +1074,7 @@ localResizeOffscreenLinear(FBLinearPtr resize, int length)
return TRUE;
}
} else {
- /* resize the linear area */
+ /* TODO!!!! resize the linear area */
}
return FALSE;
@@ -943,22 +1089,45 @@ localQueryLargestOffscreenLinear(
int priority
)
{
- int w, h;
+ FBManagerPtr offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
+ FBLinearLinkPtr pLink;
+ FBLinearLinkPtr pLinkRet;
*size = 0;
+
+ if (!offman->LinearAreas) return FALSE;
- /* for now, we only look at XY space */
- if(localQueryLargestOffscreenArea(pScreen, &w, &h, gran,
- FAVOR_WIDTH_THEN_AREA, priority))
- {
- FBManagerPtr offman;
- BoxPtr extents;
+ pLink = offman->LinearAreas;
+ pLinkRet = pLink;
- offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
- extents = REGION_EXTENTS(pScreen, offman->InitialBoxes);
- if((extents->x2 - extents->x1) == w)
- *size = w * h;
- return TRUE;
+ if (!pLink->area) {
+ while (pLink) {
+ if (pLink->free) {
+ if (pLink->linear.size > pLinkRet->linear.size)
+ pLinkRet = pLink;
+ }
+ pLink = pLink->next;
+ }
+
+ if (pLinkRet->free) {
+ *size = pLinkRet->linear.size;
+ return TRUE;
+ }
+ } else {
+ int w, h;
+
+ if(localQueryLargestOffscreenArea(pScreen, &w, &h, gran,
+ FAVOR_WIDTH_THEN_AREA, priority))
+ {
+ FBManagerPtr offman;
+ BoxPtr extents;
+
+ offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
+ extents = REGION_EXTENTS(pScreen, offman->InitialBoxes);
+ if((extents->x2 - extents->x1) == w)
+ *size = w * h;
+ return TRUE;
+ }
}
return FALSE;
@@ -1189,6 +1358,44 @@ xf86InitFBManagerRegion(
return TRUE;
}
+Bool
+xf86InitFBManagerLinear(
+ ScreenPtr pScreen,
+ int offset,
+ int size
+){
+ FBManagerPtr offman;
+ FBLinearLinkPtr link;
+ FBLinearPtr linear;
+
+ if (size <= 0)
+ return FALSE;
+
+ /* we expect people to have called the Area setup first for pixmap cache */
+ if (!pScreen->devPrivates[xf86FBScreenIndex].ptr)
+ return FALSE;
+
+ offman = pScreen->devPrivates[xf86FBScreenIndex].ptr;
+
+ offman->LinearAreas = xalloc(sizeof(FBLinearLink));
+ if (!offman->LinearAreas)
+ return FALSE;
+
+ link = offman->LinearAreas;
+ link->area = NULL;
+ link->next = NULL;
+ link->free = 1;
+ linear = &(link->linear);
+ linear->pScreen = pScreen;
+ linear->size = size;
+ linear->offset = offset;
+ linear->granularity = 0;
+ linear->MoveLinearCallback = NULL;
+ linear->RemoveLinearCallback = NULL;
+ linear->devPrivate.ptr = NULL;
+
+ return TRUE;
+}
/* This is an implementation specific function and should
diff --git a/hw/xfree86/common/xf86fbman.h b/hw/xfree86/common/xf86fbman.h
index 673c7bc33..adb26a1f1 100644
--- a/hw/xfree86/common/xf86fbman.h
+++ b/hw/xfree86/common/xf86fbman.h
@@ -1,4 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86fbman.h,v 1.12 2001/08/28 16:55:09 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86fbman.h,v 1.14 2003/10/09 12:40:54 alanh Exp $ */
+
+/*
+ * Copyright (c) 1998-2001 by The XFree86 Project, 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 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).
+ */
#ifndef _XF86FBMAN_H
#define _XF86FBMAN_H
@@ -108,6 +135,13 @@ xf86InitFBManager(
BoxPtr FullBox
);
+Bool
+xf86InitFBManagerLinear(
+ ScreenPtr pScreen,
+ int offset,
+ int size
+);
+
Bool
xf86FBManagerRunning(
ScreenPtr pScreen
diff --git a/hw/xfree86/common/xf86isaBus.c b/hw/xfree86/common/xf86isaBus.c
index cfe6ed000..1b9890d5e 100644
--- a/hw/xfree86/common/xf86isaBus.c
+++ b/hw/xfree86/common/xf86isaBus.c
@@ -1,9 +1,32 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86isaBus.c,v 3.5 2000/12/06 15:35:11 eich Exp $ */
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86isaBus.c,v 3.6 2003/08/24 17:36:55 dawes Exp $ */
/*
- * Copyright (c) 1997-1999 by The XFree86 Project, Inc.
+ * Copyright (c) 1997-2000 by The XFree86 Project, 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 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).
*/
+
/*
* This file contains the interfaces to the bus-specific code
*/
diff --git a/hw/xfree86/common/xf86noBus.c b/hw/xfree86/common/xf86noBus.c
index a9efcdbc4..2d79ab476 100644
--- a/hw/xfree86/common/xf86noBus.c
+++ b/hw/xfree86/common/xf86noBus.c
@@ -1,7 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86noBus.c,v 1.1 2002/09/18 08:54:55 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86noBus.c,v 1.2 2003/08/24 17:36:55 dawes Exp $ */
/*
- * Copyright (c) 2000 by The XFree86 Project, Inc.
+ * Copyright (c) 2000-2002 by The XFree86 Project, 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 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).
*/
/*
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index c40fc1016..641d1c919 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -1,6 +1,29 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c,v 3.68.2.1 2003/05/06 17:00:43 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c,v 3.77 2003/11/03 05:11:03 tsi Exp $ */
/*
- * Copyright (c) 1997-2002 by The XFree86 Project, Inc.
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
*/
/*
@@ -270,8 +293,8 @@ FindPCIVideoInfo(void)
}
/*
- * 64-bit base addresses are checked for and avoided.
- * XXX Should deal with them on platforms that support them.
+ * 64-bit base addresses are checked for and avoided on 32-bit
+ * platforms.
*/
if (pcrp->pci_base0) {
if (pcrp->pci_base0 & PCI_MAP_IO) {
@@ -454,7 +477,7 @@ FindPCIVideoInfo(void)
memdone = TRUE;
} else
xf86ErrorF(", ");
- xf86ErrorF("0x%08x/%d", info->memBase[i], info->size[i]);
+ xf86ErrorF("0x%08lx/%d", info->memBase[i], info->size[i]);
}
}
for (i = 0; i < 6; i++) {
@@ -465,12 +488,12 @@ FindPCIVideoInfo(void)
iodone = TRUE;
} else
xf86ErrorF(", ");
- xf86ErrorF("0x%04x/%d", info->ioBase[i], info->size[i]);
+ xf86ErrorF("0x%04lx/%d", info->ioBase[i], info->size[i]);
}
}
if (info->biosBase &&
(info->biosBase < (memType)(-1 << info->biosSize)))
- xf86ErrorF(", BIOS @ 0x%08x/%d", info->biosBase, info->biosSize);
+ xf86ErrorF(", BIOS @ 0x%08lx/%d", info->biosBase, info->biosSize);
xf86ErrorF("\n");
}
}
@@ -567,7 +590,7 @@ pciIoAccessEnable(void* arg)
ErrorF("pciIoAccessEnable: 0x%05lx\n", *(PCITAG *)arg);
#endif
pArg->ctrl |= SETBITS | PCI_CMD_MASTER_ENABLE;
- (*pArg->func)(pArg->tag, PCI_CMD_STAT_REG, pArg->ctrl);
+ pciWriteLong(pArg->tag, PCI_CMD_STAT_REG, pArg->ctrl);
}
static void
@@ -577,7 +600,7 @@ pciIoAccessDisable(void* arg)
ErrorF("pciIoAccessDisable: 0x%05lx\n", *(PCITAG *)arg);
#endif
pArg->ctrl &= ~SETBITS;
- (*pArg->func)(pArg->tag, PCI_CMD_STAT_REG, pArg->ctrl);
+ pciWriteLong(pArg->tag, PCI_CMD_STAT_REG, pArg->ctrl);
}
#undef SETBITS
@@ -589,7 +612,7 @@ pciIo_MemAccessEnable(void* arg)
ErrorF("pciIo_MemAccessEnable: 0x%05lx\n", *(PCITAG *)arg);
#endif
pArg->ctrl |= SETBITS | PCI_CMD_MASTER_ENABLE;
- (*pArg->func)(pArg->tag, PCI_CMD_STAT_REG, pArg->ctrl);
+ pciWriteLong(pArg->tag, PCI_CMD_STAT_REG, pArg->ctrl);
}
static void
@@ -599,7 +622,7 @@ pciIo_MemAccessDisable(void* arg)
ErrorF("pciIo_MemAccessDisable: 0x%05lx\n", *(PCITAG *)arg);
#endif
pArg->ctrl &= ~SETBITS;
- (*pArg->func)(pArg->tag, PCI_CMD_STAT_REG, pArg->ctrl);
+ pciWriteLong(pArg->tag, PCI_CMD_STAT_REG, pArg->ctrl);
}
#undef SETBITS
@@ -611,7 +634,7 @@ pciMemAccessEnable(void* arg)
ErrorF("pciMemAccessEnable: 0x%05lx\n", *(PCITAG *)arg);
#endif
pArg->ctrl |= SETBITS | PCI_CMD_MASTER_ENABLE;
- (*pArg->func)(pArg->tag, PCI_CMD_STAT_REG, pArg->ctrl);
+ pciWriteLong(pArg->tag, PCI_CMD_STAT_REG, pArg->ctrl);
}
static void
@@ -621,38 +644,48 @@ pciMemAccessDisable(void* arg)
ErrorF("pciMemAccessDisable: 0x%05lx\n", *(PCITAG *)arg);
#endif
pArg->ctrl &= ~SETBITS;
- (*pArg->func)(pArg->tag, PCI_CMD_STAT_REG, pArg->ctrl);
+ pciWriteLong(pArg->tag, PCI_CMD_STAT_REG, pArg->ctrl);
}
#undef SETBITS
#undef pArg
/* move to OS layer */
-#define PCI_PCI_BRDG_CTRL_BASE (PCI_PCI_BRIDGE_CONTROL_REG & 0xFC)
-#define SHIFT_BITS ((PCI_PCI_BRIDGE_CONTROL_REG & 0x3) << 3)
-#define SETBITS (CARD32)((PCI_PCI_BRIDGE_VGA_EN) << SHIFT_BITS)
+#define MASKBITS (PCI_PCI_BRIDGE_VGA_EN | PCI_PCI_BRIDGE_MASTER_ABORT_EN)
static void
pciBusAccessEnable(BusAccPtr ptr)
{
+ PCITAG tag = ptr->busdep.pci.acc;
+ CARD16 ctrl;
+
#ifdef DEBUG
ErrorF("pciBusAccessEnable: bus=%d\n", ptr->busdep.pci.bus);
#endif
- (*ptr->busdep.pci.func)(ptr->busdep.pci.acc, PCI_PCI_BRDG_CTRL_BASE,
- SETBITS, SETBITS);
+ ctrl = pciReadWord(tag, PCI_PCI_BRIDGE_CONTROL_REG);
+ if ((ctrl & MASKBITS) != PCI_PCI_BRIDGE_VGA_EN) {
+ ctrl = (ctrl | PCI_PCI_BRIDGE_VGA_EN) &
+ ~(PCI_PCI_BRIDGE_MASTER_ABORT_EN | PCI_PCI_BRIDGE_SECONDARY_RESET);
+ pciWriteWord(tag, PCI_PCI_BRIDGE_CONTROL_REG, ctrl);
+ }
}
/* move to OS layer */
static void
pciBusAccessDisable(BusAccPtr ptr)
{
+ PCITAG tag = ptr->busdep.pci.acc;
+ CARD16 ctrl;
+
#ifdef DEBUG
ErrorF("pciBusAccessDisable: bus=%d\n", ptr->busdep.pci.bus);
#endif
- (*ptr->busdep.pci.func)(ptr->busdep.pci.acc, PCI_PCI_BRDG_CTRL_BASE,
- SETBITS, 0);
+ ctrl = pciReadWord(tag, PCI_PCI_BRIDGE_CONTROL_REG);
+ if (ctrl & MASKBITS) {
+ ctrl &= ~(MASKBITS | PCI_PCI_BRIDGE_SECONDARY_RESET);
+ pciWriteWord(tag, PCI_PCI_BRIDGE_CONTROL_REG, ctrl);
+ }
}
-#undef SETBITS
-#undef SHIFT_BITS
+#undef MASKBITS
/* move to OS layer */
static void
@@ -740,23 +773,34 @@ restorePciState(PCITAG tag, pciSavePtr ptr)
static void
savePciBusState(BusAccPtr ptr)
{
+ PCITAG tag = ptr->busdep.pci.acc;
+
ptr->busdep.pci.save.control =
- pciReadWord(ptr->busdep.pci.acc, PCI_PCI_BRIDGE_CONTROL_REG) &
+ pciReadWord(tag, PCI_PCI_BRIDGE_CONTROL_REG) &
~PCI_PCI_BRIDGE_SECONDARY_RESET;
/* Allow master aborts to complete normally on non-root buses */
if (ptr->busdep.pci.save.control & PCI_PCI_BRIDGE_MASTER_ABORT_EN)
- pciWriteWord(ptr->busdep.pci.acc, PCI_PCI_BRIDGE_CONTROL_REG,
- ptr->busdep.pci.save.control
- & ~PCI_PCI_BRIDGE_MASTER_ABORT_EN);
+ pciWriteWord(tag, PCI_PCI_BRIDGE_CONTROL_REG,
+ ptr->busdep.pci.save.control & ~PCI_PCI_BRIDGE_MASTER_ABORT_EN);
}
/* move to OS layer */
+#define MASKBITS (PCI_PCI_BRIDGE_VGA_EN | PCI_PCI_BRIDGE_MASTER_ABORT_EN)
static void
restorePciBusState(BusAccPtr ptr)
{
- pciWriteWord(ptr->busdep.pci.acc, PCI_PCI_BRIDGE_CONTROL_REG,
- ptr->busdep.pci.save.control);
+ PCITAG tag = ptr->busdep.pci.acc;
+ CARD16 ctrl;
+
+ /* Only restore the bits we've changed (and don't cause resets) */
+ ctrl = pciReadWord(tag, PCI_PCI_BRIDGE_CONTROL_REG);
+ if ((ctrl ^ ptr->busdep.pci.save.control) & MASKBITS) {
+ ctrl &= ~(MASKBITS | PCI_PCI_BRIDGE_SECONDARY_RESET);
+ ctrl |= ptr->busdep.pci.save.control & MASKBITS;
+ pciWriteWord(tag, PCI_PCI_BRIDGE_CONTROL_REG, ctrl);
+ }
}
+#undef MASKBITS
/* move to OS layer */
static void
@@ -828,12 +872,17 @@ correctPciSize(memType base, memType oldsize, memType newsize,
#if defined(LONG64) || defined(WORD64)
||
(B2M(pcrp->tag,PCIGETMEMORY64(basep[i])) == base)
+#else
+ ||
+ (!basep[i+1]
+ && (B2M(pcrp->tag,PCIGETMEMORY(basep[i])) == base))
#endif
))) {
pcrp->basesize[i] = new_bits;
break; /* to next device */
}
}
+ if (PCI_MAP_IS64BITMEM(basep[i])) i++;
}
}
@@ -883,7 +932,7 @@ removeOverlapsWithBridges(int busIndex, resPtr target)
target->block_end - target->block_begin,
target->res_type);
xf86MsgVerb(X_INFO, 3,
- "PCI %s resource overlap reduced 0x%08x from 0x%08x to 0x%08x\n",
+ "PCI %s resource overlap reduced 0x%08lx from 0x%08lx to 0x%08lx\n",
((target->res_type & ResPhysMask) == ResMem) ? "Memory" : "I/O",
range.rBegin, range.rEnd, target->block_end);
}
@@ -988,28 +1037,38 @@ xf86GetPciRes(resPtr *activeRes, resPtr *inactiveRes)
(subclass == PCI_SUBCLASS_BRIDGE_HOST))
resMisc |= ResOverlap;
- if ((pcrp->pci_command & (PCI_CMD_IO_ENABLE | PCI_CMD_MEM_ENABLE)))
- res = activeRes;
- else
- res = inactiveRes;
-
basep = &pcrp->pci_base0;
for (i = 0; i < 6; i++) {
if (basep[i]) {
- if (PCI_MAP_IS_IO(basep[i]))
- P_I_RANGE(range,pcrp->tag,PCIGETIO(basep[i]),
+ if (PCI_MAP_IS_IO(basep[i])) {
+ if (pcrp->pci_command & PCI_CMD_IO_ENABLE)
+ res = activeRes;
+ else
+ res = inactiveRes;
+ P_I_RANGE(range, pcrp->tag, PCIGETIO(basep[i]),
pcrp->basesize[i], ResExcIoBlock | resMisc)
- else if (!PCI_MAP_IS64BITMEM(basep[i]))
- P_M_RANGE(range,pcrp->tag,PCIGETMEMORY(basep[i]),
- pcrp->basesize[i], ResExcMemBlock | resMisc)
- else {
+ } else if (!PCI_MAP_IS64BITMEM(basep[i])) {
+ if (pcrp->pci_command & PCI_CMD_MEM_ENABLE)
+ res = activeRes;
+ else
+ res = inactiveRes;
+ P_M_RANGE(range, pcrp->tag, PCIGETMEMORY(basep[i]),
+ pcrp->basesize[i], ResExcMemBlock | resMisc)
+ } else {
i++;
#if defined(LONG64) || defined(WORD64)
- P_M_RANGE(range,pcrp->tag,PCIGETMEMORY64(basep[i-1]),
- pcrp->basesize[i-1], ResExcMemBlock | resMisc)
+ P_M_RANGE(range,pcrp->tag,PCIGETMEMORY64(basep[i - 1]),
+ pcrp->basesize[i - 1], ResExcMemBlock | resMisc)
#else
+ if (basep[i])
continue;
+ P_M_RANGE(range, pcrp->tag, PCIGETMEMORY(basep[i - 1]),
+ pcrp->basesize[i - 1], ResExcMemBlock | resMisc)
#endif
+ if (pcrp->pci_command & PCI_CMD_MEM_ENABLE)
+ res = activeRes;
+ else
+ res = inactiveRes;
}
if (range.rBegin) { /* catch cases where PCI base is unset */
tmp = xf86AddResToList(NULL, &range, -1);
@@ -1018,15 +1077,16 @@ xf86GetPciRes(resPtr *activeRes, resPtr *inactiveRes)
}
}
}
+
/* Ignore disabled non-video ROMs */
- if ((res == activeRes) &&
+ if ((pcrp->pci_command & PCI_CMD_MEM_ENABLE) &&
(pcrp->pci_baserom & PCI_MAP_ROM_DECODE_ENABLE)) {
P_M_RANGE(range,pcrp->tag,PCIGETROM(pcrp->pci_baserom),
pcrp->basesize[6], ResExcMemBlock | resMisc);
if (range.rBegin) {
tmp = xf86AddResToList(NULL, &range, -1);
- removeOverlapsWithBridges(pcrp->busnum,tmp);
- *res = xf86JoinResLists(tmp,*res);
+ removeOverlapsWithBridges(pcrp->busnum, tmp);
+ *activeRes = xf86JoinResLists(tmp, *activeRes);
}
}
}
@@ -1063,8 +1123,8 @@ xf86GetPciRes(resPtr *activeRes, resPtr *inactiveRes)
pRes->block_end - pRes->block_begin,
pRes->res_type);
xf86MsgVerb(X_INFO, 3,
- "PCI %s resource overlap reduced 0x%08x"
- " from 0x%08x to 0x%08x\n",
+ "PCI %s resource overlap reduced 0x%08lx"
+ " from 0x%08lx to 0x%08lx\n",
((pRes->res_type & ResPhysMask) == ResMem) ?
"Memory" : "I/O",
range.rBegin, range.rEnd, pRes->block_end);
@@ -1092,8 +1152,8 @@ xf86GetPciRes(resPtr *activeRes, resPtr *inactiveRes)
pRes->block_end - pRes->block_begin,
pRes->res_type);
xf86MsgVerb(X_INFO, 3,
- "PCI %s resource overlap reduced 0x%08x"
- " from 0x%08x to 0x%08x\n",
+ "PCI %s resource overlap reduced 0x%08lx"
+ " from 0x%08lx to 0x%08lx\n",
((pRes->res_type & ResPhysMask) == ResMem) ?
"Memory" : "I/O",
range.rBegin, range.rEnd, pRes->block_end);
@@ -1760,8 +1820,8 @@ xf86GetPciBridgeInfo(void)
break;
}
- if (pBusInfo && pBusInfo->funcs->pciGetBridgeBusses)
- (*pBusInfo->funcs->pciGetBridgeBusses)(secondary,
+ if (pBusInfo && pBusInfo->funcs->pciGetBridgeBuses)
+ (*pBusInfo->funcs->pciGetBridgeBuses)(secondary,
&primary,
&secondary,
&subordinate);
@@ -1899,8 +1959,8 @@ xf86GetPciBridgeInfo(void)
break;
}
- if (pBusInfo && pBusInfo->funcs->pciGetBridgeBusses)
- (*pBusInfo->funcs->pciGetBridgeBusses)(secondary,
+ if (pBusInfo && pBusInfo->funcs->pciGetBridgeBuses)
+ (*pBusInfo->funcs->pciGetBridgeBuses)(secondary,
&primary,
&secondary,
&subordinate);
@@ -2087,8 +2147,8 @@ xf86GetPciBridgeInfo(void)
if (pBusInfo) {
PciBus->primary = PciBus->secondary = secondary;
- if (pBusInfo->funcs->pciGetBridgeBusses)
- (*pBusInfo->funcs->pciGetBridgeBusses)
+ if (pBusInfo->funcs->pciGetBridgeBuses)
+ (*pBusInfo->funcs->pciGetBridgeBuses)
(secondary,
&PciBus->primary,
&PciBus->secondary,
@@ -2275,7 +2335,6 @@ ValidatePci(void)
pciConfigPtr pcrp, *pcrpp;
CARD32 *basep;
resPtr Sys;
- resPtr Fix;
resRange range;
int n = 0, m, i;
@@ -2286,6 +2345,7 @@ ValidatePci(void)
* the ones which have been assigned to a screen.
*/
Sys = xf86DupResList(osRes);
+ /* Only validate graphics devices in use */
for (i=0; i<xf86NumScreens; i++) {
for (m = 0; m < xf86Screens[i]->numEntities; m++)
if ((pvp = xf86GetPciInfoForEntity(xf86Screens[i]->entityList[m])))
@@ -2328,6 +2388,7 @@ ValidatePci(void)
}
for (pcrpp = xf86PciInfo, pcrp = *pcrpp; pcrp; pcrp = *++(pcrpp)) {
+ /* These were handled above */
if (PCIINFOCLASSES(pcrp->pci_base_class, pcrp->pci_sub_class))
continue;
@@ -2350,13 +2411,16 @@ ValidatePci(void)
pcrp->basesize[i], ResExcMemBlock)
} else {
i++;
-#if defined(LONG64) || defined(WORD64)
if (!(pcrp->pci_command & PCI_CMD_MEM_ENABLE))
continue;
+#if defined(LONG64) || defined(WORD64)
P_M_RANGE(range, pcrp->tag, PCIGETMEMORY64(basep[i-1]),
pcrp->basesize[i-1], ResExcMemBlock)
#else
- continue;
+ if (basep[i])
+ continue;
+ P_M_RANGE(range, pcrp->tag, PCIGETMEMORY(basep[i-1]),
+ pcrp->basesize[i-1], ResExcMemBlock)
#endif
}
Sys = xf86AddResToList(Sys, &range, -1);
@@ -2458,7 +2522,6 @@ ValidatePci(void)
xf86MsgVerb(X_INFO, 3,"MEM/IO:\n");
xf86PrintResList(3,res_m_io);
#endif
- Fix = NULL;
for (i = 0; i < 6; i++) {
int j;
resPtr own = NULL;
@@ -2596,8 +2659,6 @@ initPciState(void)
pcaccp->devnum = pvp->device;
pcaccp->funcnum = pvp->func;
pcaccp->arg.tag = pciTag(pvp->bus, pvp->device, pvp->func);
- pcaccp->arg.func =
- (WriteProcPtr)pciLongFunc(pcaccp->arg.tag,WRITE);
pcaccp->ioAccess.AccessDisable = pciIoAccessDisable;
pcaccp->ioAccess.AccessEnable = pciIoAccessEnable;
pcaccp->ioAccess.arg = &pcaccp->arg;
@@ -2674,8 +2735,6 @@ initPciBusState(void)
pbap->enable_f = pciBusAccessEnable;
pbap->disable_f = pciBusAccessDisable;
pbap->busdep.pci.acc = pciTag(pbp->brbus,pbp->brdev,pbp->brfunc);
- pbap->busdep.pci.func =
- (SetBitsProcPtr)pciLongFunc(pbap->busdep.pci.acc,SET_BITS);
savePciBusState(pbap);
break;
case PCI_SUBCLASS_BRIDGE_ISA:
diff --git a/hw/xfree86/common/xf86pciBus.h b/hw/xfree86/common/xf86pciBus.h
index fbe3fbe62..fbb733ae7 100644
--- a/hw/xfree86/common/xf86pciBus.h
+++ b/hw/xfree86/common/xf86pciBus.h
@@ -1,4 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86pciBus.h,v 3.8 2002/09/16 16:55:33 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86pciBus.h,v 3.10 2003/08/24 17:36:56 dawes Exp $ */
+
+/*
+ * Copyright (c) 1999-2003 by The XFree86 Project, 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 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).
+ */
#ifndef _XF86_PCI_BUS_H
#define _XF86_PCI_BUS_H
@@ -11,12 +38,8 @@ typedef struct {
CARD32 biosBase;
} pciSave, *pciSavePtr;
-typedef void (*SetBitsProcPtr)(PCITAG, int, CARD32, CARD32);
-typedef void (*WriteProcPtr)(PCITAG, int, CARD32);
-
typedef struct {
PCITAG tag;
- WriteProcPtr func;
CARD32 ctrl;
} pciArg;
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 2b6deed33..367cb19a9 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -1,7 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86str.h,v 1.90 2002/11/25 14:04:56 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86str.h,v 1.97 2003/10/30 17:36:56 tsi Exp $ */
/*
- * Copyright (c) 1997-2000 by The XFree86 Project, Inc.
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
*/
/*
@@ -16,6 +39,7 @@
#include "input.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
+#include "colormapst.h"
#include "xf86Module.h"
#include "xf86Opt.h"
#include "xf86Pci.h"
@@ -452,24 +476,10 @@ typedef struct _confdrirec {
/* These values should be adjusted when new fields are added to ScrnInfoRec */
#define NUM_RESERVED_INTS 16
#define NUM_RESERVED_POINTERS 15
-#define NUM_RESERVED_FUNCS 16
+#define NUM_RESERVED_FUNCS 12
typedef pointer (*funcPointer)(void);
-/* Flags for driver messages */
-typedef enum {
- X_PROBED, /* Value was probed */
- X_CONFIG, /* Value was given in the config file */
- X_DEFAULT, /* Value is a default */
- X_CMDLINE, /* Value was given on the command line */
- X_NOTICE, /* Notice */
- X_ERROR, /* Error message */
- X_WARNING, /* Warning message */
- X_INFO, /* Informational message */
- X_NONE, /* No prefix */
- X_NOT_IMPLEMENTED /* Not implemented */
-} MessageType;
-
/* flags for depth 24 pixmap options */
typedef enum {
Pix24DontCare = 0,
@@ -747,12 +757,16 @@ typedef void xf86AdjustFrameProc (int, int, int, int);
typedef Bool xf86EnterVTProc (int, int);
typedef void xf86LeaveVTProc (int, int);
typedef void xf86FreeScreenProc (int, int);
-typedef int xf86ValidModeProc (int, DisplayModePtr, Bool, int);
+typedef ModeStatus xf86ValidModeProc (int, DisplayModePtr, Bool, int);
typedef void xf86EnableDisableFBAccessProc(int, Bool);
typedef int xf86SetDGAModeProc (int, int, DGADevicePtr);
typedef int xf86ChangeGammaProc (int, Gamma);
typedef void xf86PointerMovedProc (int, int, int);
typedef Bool xf86PMEventProc (int, pmEvent, Bool);
+typedef int xf86HandleMessageProc (int, const char*, const char*, char**);
+typedef void xf86DPMSSetProc (ScrnInfoPtr, int, int);
+typedef void xf86LoadPaletteProc (ScrnInfoPtr, int, int *, LOCO *, VisualPtr);
+typedef void xf86SetOverscanProc (ScrnInfoPtr, int);
/*
* ScrnInfoRec
@@ -903,6 +917,10 @@ typedef struct _ScrnInfoRec {
xf86ChangeGammaProc *ChangeGamma;
xf86PointerMovedProc *PointerMoved;
xf86PMEventProc *PMEvent;
+ xf86HandleMessageProc *HandleMessage;
+ xf86DPMSSetProc *DPMSSet;
+ xf86LoadPaletteProc *LoadPalette;
+ xf86SetOverscanProc *SetOverscan;
/*
* This can be used when the minor ABI version is incremented.
@@ -1023,7 +1041,32 @@ typedef enum {
ACTION_CLOSECLIENT, /* Kill client holding grab */
ACTION_SWITCHSCREEN = 100, /* VT switch */
ACTION_SWITCHSCREEN_NEXT,
- ACTION_SWITCHSCREEN_PREV
+ ACTION_SWITCHSCREEN_PREV,
+ ACTION_MESSAGE = 9999 /* Generic message passing */
} ActionEvent;
+/* xf86Versions.c */
+/*
+ * Never change existing values, and always assign values explicitly.
+ * NUM_BUILTIN_IFS must always be the last entry.
+ */
+typedef enum {
+ BUILTIN_IF_OSMOUSE = 0,
+ BUILTIN_IF_OSKBD = 1,
+ NUM_BUILTIN_IFS
+} BuiltinInterface;
+
+/*
+ * These are intentionally the same as the module version macros.
+ * It is possible to register a module as providing a specific interface,
+ * in which case the module's version is used. This feature isn't
+ * really ready for use yet though.
+ */
+
+#define BUILTIN_INTERFACE_VERSION_NUMERIC(maj, min, patch) \
+ ((((maj) & 0xFF) << 24) | (((min) & 0xFF) << 16) | (patch & 0xFFFF))
+#define GET_BUILTIN_INTERFACE_MAJOR_VERSION(vers) (((vers) >> 24) & 0xFF)
+#define GET_BUILTIN_INTERFACE_MINOR_VERSION(vers) (((vers) >> 16) & 0xFF)
+#define GET_BUILTIN_INTERFACE_PATCH_VERSION(vers) ((vers) & 0xFFFF)
+
#endif /* _XF86STR_H */
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index c6a09121b..90289057b 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -1,12 +1,34 @@
-/*
-
- XFree86 Xv DDX written by Mark Vojkovich (markv@valinux.com)
-
- Copyright (C) 1998, 1999 - The XFree86 Project Inc.
-
-*/
-
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86xv.c,v 1.33 2002/11/09 01:18:11 keithp Exp $ */
+/*
+ * XFree86 Xv DDX written by Mark Vojkovich (markv@valinux.com)
+ */
+/*
+ * Copyright (c) 1998-2003 by The XFree86 Project, 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 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).
+ */
+
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86xv.c,v 1.37 2003/11/10 18:22:15 tsi Exp $ */
#include "misc.h"
#include "xf86.h"
@@ -31,7 +53,7 @@
#include "xvmodproc.h"
#endif
-#include "xf86xv.h"
+#include "xf86xvpriv.h"
/* XvScreenRec fields */
@@ -44,29 +66,29 @@ static int xf86XVQueryAdaptors(ScreenPtr, XvAdaptorPtr *, int *);
static int xf86XVAllocatePort(unsigned long, XvPortPtr, XvPortPtr*);
static int xf86XVFreePort(XvPortPtr);
static int xf86XVPutVideo(ClientPtr, DrawablePtr,XvPortPtr, GCPtr,
- INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16,
INT16, INT16, CARD16, CARD16);
static int xf86XVPutStill(ClientPtr, DrawablePtr,XvPortPtr, GCPtr,
- INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16,
INT16, INT16, CARD16, CARD16);
static int xf86XVGetVideo(ClientPtr, DrawablePtr,XvPortPtr, GCPtr,
- INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16,
INT16, INT16, CARD16, CARD16);
static int xf86XVGetStill(ClientPtr, DrawablePtr,XvPortPtr, GCPtr,
- INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16,
INT16, INT16, CARD16, CARD16);
static int xf86XVStopVideo(ClientPtr, XvPortPtr, DrawablePtr);
static int xf86XVSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32);
static int xf86XVGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32*);
static int xf86XVQueryBestSize(ClientPtr, XvPortPtr, CARD8,
- CARD16, CARD16,CARD16, CARD16,
+ CARD16, CARD16,CARD16, CARD16,
unsigned int*, unsigned int*);
static int xf86XVPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
- INT16, INT16, CARD16, CARD16,
+ INT16, INT16, CARD16, CARD16,
INT16, INT16, CARD16, CARD16,
XvImagePtr, unsigned char*, Bool,
CARD16, CARD16);
-static int xf86XVQueryImageAttributes(ClientPtr, XvPortPtr, XvImagePtr,
+static int xf86XVQueryImageAttributes(ClientPtr, XvPortPtr, XvImagePtr,
CARD16*, CARD16*, int*, int*);
@@ -107,7 +129,7 @@ int (*XvScreenInitProc)(ScreenPtr) = XvScreenInit;
((XvScreenPtr)((pScreen)->devPrivates[XF86XvScreenIndex].ptr))
#define GET_XF86XV_SCREEN(pScreen) \
- ((XF86XVScreenPtr)(GET_XV_SCREEN(pScreen)->devPriv.ptr))
+ ((XF86XVScreenPtr)(GET_XV_SCREEN(pScreen)->devPriv.ptr))
#define GET_XF86XV_WINDOW(pWin) \
((XF86XVWindowPtr)((pWin)->devPrivates[XF86XVWindowIndex].ptr))
@@ -121,12 +143,12 @@ xf86XVRegisterGenericAdaptorDriver(
){
xf86XVInitGenericAdaptorPtr *newdrivers;
- newdrivers = xrealloc(GenDrivers, sizeof(xf86XVInitGenericAdaptorPtr) *
+ newdrivers = xrealloc(GenDrivers, sizeof(xf86XVInitGenericAdaptorPtr) *
(1 + NumGenDrivers));
if (!newdrivers)
return 0;
GenDrivers = newdrivers;
-
+
GenDrivers[NumGenDrivers++] = InitFunc;
return 1;
@@ -134,7 +156,7 @@ xf86XVRegisterGenericAdaptorDriver(
int
xf86XVListGenericAdaptors(
- ScrnInfoPtr pScrn,
+ ScrnInfoPtr pScrn,
XF86VideoAdaptorPtr **adaptors
){
int i,j,n,num;
@@ -142,8 +164,13 @@ xf86XVListGenericAdaptors(
num = 0;
*adaptors = NULL;
- for (i = 0; i < NumGenDrivers; i++) {
- n = GenDrivers[i](pScrn,&DrivAdap);
+ /*
+ * The v4l driver registers itself first, but can use surfaces registered
+ * by other drivers. So, call the v4l driver last.
+ */
+ for (i = NumGenDrivers; --i >= 0; ) {
+ DrivAdap = NULL;
+ n = (*GenDrivers[i])(pScrn, &DrivAdap);
if (0 == n)
continue;
new = xrealloc(*adaptors, sizeof(XF86VideoAdaptorPtr) * (num+n));
@@ -156,6 +183,38 @@ xf86XVListGenericAdaptors(
return num;
}
+
+/**************** Offscreen surface stuff *******************/
+
+typedef struct {
+ XF86OffscreenImagePtr images;
+ int num;
+} OffscreenImageRec;
+
+static OffscreenImageRec OffscreenImages[MAXSCREENS];
+
+Bool
+xf86XVRegisterOffscreenImages(
+ ScreenPtr pScreen,
+ XF86OffscreenImagePtr images,
+ int num
+){
+ OffscreenImages[pScreen->myNum].num = num;
+ OffscreenImages[pScreen->myNum].images = images;
+
+ return TRUE;
+}
+
+XF86OffscreenImagePtr
+xf86XVQueryOffscreenImages(
+ ScreenPtr pScreen,
+ int *num
+){
+ *num = OffscreenImages[pScreen->myNum].num;
+ return OffscreenImages[pScreen->myNum].images;
+}
+
+
XF86VideoAdaptorPtr
xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn)
{
@@ -171,7 +230,7 @@ xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr)
Bool
xf86XVScreenInit(
- ScreenPtr pScreen,
+ ScreenPtr pScreen,
XF86VideoAdaptorPtr *adaptors,
int num
){
@@ -181,7 +240,7 @@ xf86XVScreenInit(
if(num <= 0 ||
!XvGetScreenIndexProc || !XvGetRTPortProc || !XvScreenInitProc)
- return FALSE;
+ return FALSE;
if(XF86XVGeneration != serverGeneration) {
if((XF86XVWindowIndex = AllocateWindowPrivateIndex()) < 0)
@@ -190,7 +249,7 @@ xf86XVScreenInit(
}
if(!AllocateWindowPrivate(pScreen,XF86XVWindowIndex,0))
- return FALSE;
+ return FALSE;
if(Success != (*XvScreenInitProc)(pScreen)) return FALSE;
@@ -245,31 +304,28 @@ xf86XVFreeAdaptor(XvAdaptorPtr pAdaptor)
{
int i;
- if(pAdaptor->name)
- xfree(pAdaptor->name);
+ xfree(pAdaptor->name);
if(pAdaptor->pEncodings) {
XvEncodingPtr pEncode = pAdaptor->pEncodings;
- for(i = 0; i < pAdaptor->nEncodings; i++, pEncode++) {
- if(pEncode->name) xfree(pEncode->name);
- }
+ for(i = 0; i < pAdaptor->nEncodings; i++, pEncode++)
+ xfree(pEncode->name);
xfree(pAdaptor->pEncodings);
}
- if(pAdaptor->pFormats)
- xfree(pAdaptor->pFormats);
+ xfree(pAdaptor->pFormats);
if(pAdaptor->pPorts) {
XvPortPtr pPort = pAdaptor->pPorts;
XvPortRecPrivatePtr pPriv;
for(i = 0; i < pAdaptor->nPorts; i++, pPort++) {
- pPriv = (XvPortRecPrivatePtr)pPort->devPriv.ptr;
+ pPriv = (XvPortRecPrivatePtr)pPort->devPriv.ptr;
if(pPriv) {
- if(pPriv->clientClip)
+ if(pPriv->clientClip)
REGION_DESTROY(pAdaptor->pScreen, pPriv->clientClip);
- if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
+ if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
REGION_DESTROY(pAdaptor->pScreen, pPriv->pCompositeClip);
xfree(pPriv);
}
@@ -280,23 +336,18 @@ xf86XVFreeAdaptor(XvAdaptorPtr pAdaptor)
if(pAdaptor->nAttributes) {
XvAttributePtr pAttribute = pAdaptor->pAttributes;
- for(i = 0; i < pAdaptor->nAttributes; i++, pAttribute++) {
- if(pAttribute->name) xfree(pAttribute->name);
- }
-
+ for(i = 0; i < pAdaptor->nAttributes; i++, pAttribute++)
+ xfree(pAttribute->name);
xfree(pAdaptor->pAttributes);
}
- if(pAdaptor->nImages)
- xfree(pAdaptor->pImages);
-
- if(pAdaptor->devPriv.ptr)
- xfree(pAdaptor->devPriv.ptr);
+ xfree(pAdaptor->pImages);
+ xfree(pAdaptor->devPriv.ptr);
}
static Bool
xf86XVInitAdaptors(
- ScreenPtr pScreen,
+ ScreenPtr pScreen,
XF86VideoAdaptorPtr *infoPtr,
int number
) {
@@ -325,7 +376,7 @@ xf86XVInitAdaptors(
pxvs->nAdaptors = 0;
pxvs->pAdaptors = NULL;
- if(!(pAdaptor = xcalloc(number, sizeof(XvAdaptorRec))))
+ if(!(pAdaptor = xcalloc(number, sizeof(XvAdaptorRec))))
return FALSE;
for(pa = pAdaptor, na = 0, numAdaptor = 0; na < number; na++, adaptorPtr++) {
@@ -339,7 +390,7 @@ xf86XVInitAdaptors(
if(!adaptorPtr->nEncodings || !adaptorPtr->pEncodings)
continue;
- pa->type = adaptorPtr->type;
+ pa->type = adaptorPtr->type;
if(!adaptorPtr->PutVideo && !adaptorPtr->GetVideo)
pa->type &= ~XvVideoMask;
@@ -350,19 +401,19 @@ xf86XVInitAdaptors(
if(!adaptorPtr->PutImage || !adaptorPtr->QueryImageAttributes)
pa->type &= ~XvImageMask;
- if(!adaptorPtr->PutVideo && !adaptorPtr->PutImage &&
+ if(!adaptorPtr->PutVideo && !adaptorPtr->PutImage &&
!adaptorPtr->PutStill)
pa->type &= ~XvInputMask;
if(!adaptorPtr->GetVideo && !adaptorPtr->GetStill)
pa->type &= ~XvOutputMask;
-
- if(!(adaptorPtr->type & (XvPixmapMask | XvWindowMask)))
+
+ if(!(adaptorPtr->type & (XvPixmapMask | XvWindowMask)))
continue;
- if(!(adaptorPtr->type & (XvImageMask | XvVideoMask | XvStillMask)))
+ if(!(adaptorPtr->type & (XvImageMask | XvVideoMask | XvStillMask)))
continue;
- pa->pScreen = pScreen;
+ pa->pScreen = pScreen;
pa->ddAllocatePort = xf86XVAllocatePort;
pa->ddFreePort = xf86XVFreePort;
pa->ddPutVideo = xf86XVPutVideo;
@@ -376,33 +427,33 @@ xf86XVInitAdaptors(
pa->ddQueryBestSize = xf86XVQueryBestSize;
pa->ddQueryImageAttributes = xf86XVQueryImageAttributes;
if((pa->name = xalloc(strlen(adaptorPtr->name) + 1)))
- strcpy(pa->name, adaptorPtr->name);
+ strcpy(pa->name, adaptorPtr->name);
if(adaptorPtr->nEncodings &&
(pEncode = xcalloc(adaptorPtr->nEncodings, sizeof(XvEncodingRec)))) {
- for(pe = pEncode, encodingPtr = adaptorPtr->pEncodings, i = 0;
- i < adaptorPtr->nEncodings; pe++, i++, encodingPtr++)
- {
+ for(pe = pEncode, encodingPtr = adaptorPtr->pEncodings, i = 0;
+ i < adaptorPtr->nEncodings; pe++, i++, encodingPtr++)
+ {
pe->id = encodingPtr->id;
pe->pScreen = pScreen;
if((pe->name = xalloc(strlen(encodingPtr->name) + 1)))
- strcpy(pe->name, encodingPtr->name);
+ strcpy(pe->name, encodingPtr->name);
pe->width = encodingPtr->width;
pe->height = encodingPtr->height;
pe->rate.numerator = encodingPtr->rate.numerator;
pe->rate.denominator = encodingPtr->rate.denominator;
}
pa->nEncodings = adaptorPtr->nEncodings;
- pa->pEncodings = pEncode;
- }
+ pa->pEncodings = pEncode;
+ }
if(adaptorPtr->nImages &&
- (pImage = xcalloc(adaptorPtr->nImages, sizeof(XvImageRec)))) {
+ (pImage = xcalloc(adaptorPtr->nImages, sizeof(XvImageRec)))) {
- for(i = 0, pi = pImage, imagePtr = adaptorPtr->pImages;
- i < adaptorPtr->nImages; i++, pi++, imagePtr++)
- {
+ for(i = 0, pi = pImage, imagePtr = adaptorPtr->pImages;
+ i < adaptorPtr->nImages; i++, pi++, imagePtr++)
+ {
pi->id = imagePtr->id;
pi->type = imagePtr->type;
pi->byte_order = imagePtr->byte_order;
@@ -425,7 +476,7 @@ xf86XVInitAdaptors(
pi->vert_v_period = imagePtr->vert_v_period;
memcpy(pi->component_order, imagePtr->component_order, 32);
pi->scanline_order = imagePtr->scanline_order;
- }
+ }
pa->nImages = adaptorPtr->nImages;
pa->pImages = pImage;
}
@@ -433,65 +484,65 @@ xf86XVInitAdaptors(
if(adaptorPtr->nAttributes &&
(pAttribute = xcalloc(adaptorPtr->nAttributes, sizeof(XvAttributeRec))))
{
- for(pat = pAttribute, attributePtr = adaptorPtr->pAttributes, i = 0;
- i < adaptorPtr->nAttributes; pat++, i++, attributePtr++)
- {
+ for(pat = pAttribute, attributePtr = adaptorPtr->pAttributes, i = 0;
+ i < adaptorPtr->nAttributes; pat++, i++, attributePtr++)
+ {
pat->flags = attributePtr->flags;
pat->min_value = attributePtr->min_value;
pat->max_value = attributePtr->max_value;
if((pat->name = xalloc(strlen(attributePtr->name) + 1)))
- strcpy(pat->name, attributePtr->name);
+ strcpy(pat->name, attributePtr->name);
}
pa->nAttributes = adaptorPtr->nAttributes;
- pa->pAttributes = pAttribute;
- }
+ pa->pAttributes = pAttribute;
+ }
totFormat = adaptorPtr->nFormats;
if(!(pFormat = xcalloc(totFormat, sizeof(XvFormatRec)))) {
- xf86XVFreeAdaptor(pa);
- continue;
+ xf86XVFreeAdaptor(pa);
+ continue;
}
- for(pf = pFormat, i = 0, numFormat = 0, formatPtr = adaptorPtr->pFormats;
- i < adaptorPtr->nFormats; i++, formatPtr++)
+ for(pf = pFormat, i = 0, numFormat = 0, formatPtr = adaptorPtr->pFormats;
+ i < adaptorPtr->nFormats; i++, formatPtr++)
{
numVisuals = pScreen->numVisuals;
- pVisual = pScreen->visuals;
+ pVisual = pScreen->visuals;
- while(numVisuals--) {
- if((pVisual->class == formatPtr->class) &&
- (pVisual->nplanes == formatPtr->depth)) {
+ while(numVisuals--) {
+ if((pVisual->class == formatPtr->class) &&
+ (pVisual->nplanes == formatPtr->depth)) {
if(numFormat >= totFormat) {
- void *moreSpace;
+ void *moreSpace;
totFormat *= 2;
- moreSpace = xrealloc(pFormat,
+ moreSpace = xrealloc(pFormat,
totFormat * sizeof(XvFormatRec));
if(!moreSpace) break;
pFormat = moreSpace;
pf = pFormat + numFormat;
}
- pf->visual = pVisual->vid;
+ pf->visual = pVisual->vid;
pf->depth = formatPtr->depth;
pf++;
numFormat++;
- }
- pVisual++;
- }
+ }
+ pVisual++;
+ }
}
pa->nFormats = numFormat;
- pa->pFormats = pFormat;
+ pa->pFormats = pFormat;
if(!numFormat) {
- xf86XVFreeAdaptor(pa);
- continue;
+ xf86XVFreeAdaptor(pa);
+ continue;
}
if(!(adaptorPriv = xcalloc(1, sizeof(XvAdaptorRecPrivate)))) {
- xf86XVFreeAdaptor(pa);
- continue;
+ xf86XVFreeAdaptor(pa);
+ continue;
}
adaptorPriv->flags = adaptorPtr->flags;
@@ -510,47 +561,47 @@ xf86XVInitAdaptors(
pa->devPriv.ptr = (pointer)adaptorPriv;
if(!(pPort = xcalloc(adaptorPtr->nPorts, sizeof(XvPortRec)))) {
- xf86XVFreeAdaptor(pa);
- continue;
+ xf86XVFreeAdaptor(pa);
+ continue;
}
- for(pp = pPort, i = 0, numPort = 0;
+ for(pp = pPort, i = 0, numPort = 0;
i < adaptorPtr->nPorts; i++) {
- if(!(pp->id = FakeClientID(0)))
+ if(!(pp->id = FakeClientID(0)))
continue;
- if(!(portPriv = xcalloc(1, sizeof(XvPortRecPrivate))))
+ if(!(portPriv = xcalloc(1, sizeof(XvPortRecPrivate))))
continue;
-
+
if(!AddResource(pp->id, PortResource, pp)) {
xfree(portPriv);
continue;
}
- pp->pAdaptor = pa;
- pp->pNotify = (XvPortNotifyPtr)NULL;
- pp->pDraw = (DrawablePtr)NULL;
- pp->client = (ClientPtr)NULL;
- pp->grab.client = (ClientPtr)NULL;
- pp->time = currentTime;
- pp->devPriv.ptr = portPriv;
+ pp->pAdaptor = pa;
+ pp->pNotify = (XvPortNotifyPtr)NULL;
+ pp->pDraw = (DrawablePtr)NULL;
+ pp->client = (ClientPtr)NULL;
+ pp->grab.client = (ClientPtr)NULL;
+ pp->time = currentTime;
+ pp->devPriv.ptr = portPriv;
portPriv->pScrn = pScrn;
portPriv->AdaptorRec = adaptorPriv;
- portPriv->DevPriv.ptr = adaptorPtr->pPortPrivates[i].ptr;
-
- pp++;
- numPort++;
+ portPriv->DevPriv.ptr = adaptorPtr->pPortPrivates[i].ptr;
+
+ pp++;
+ numPort++;
}
pa->nPorts = numPort;
pa->pPorts = pPort;
if(!numPort) {
- xf86XVFreeAdaptor(pa);
- continue;
+ xf86XVFreeAdaptor(pa);
+ continue;
}
pa->base_id = pPort->id;
-
+
pa++;
numAdaptor++;
}
@@ -576,23 +627,25 @@ xf86XVInitAdaptors(
the GC and used it's clip list when they needed to reclip the window,
even if the client clip was different from the one the video was
initialized with. If the original GC was destroyed, they had to stop
- the video. I like the new method better (MArk).
+ the video. I like the new method better (MArk).
This function only works for windows. Will need to rewrite when
(if) we support pixmap rendering.
*/
-static void
+static void
xf86XVUpdateCompositeClip(XvPortRecPrivatePtr portPriv)
{
RegionPtr pregWin, pCompositeClip;
WindowPtr pWin;
- Bool freeCompClip = FALSE;
+ ScreenPtr pScreen;
+ Bool freeCompClip = FALSE;
if(portPriv->pCompositeClip)
return;
pWin = (WindowPtr)portPriv->pDraw;
+ pScreen = pWin->drawable.pScreen;
/* get window clip list */
if(portPriv->subWindowMode == IncludeInferiors) {
@@ -607,19 +660,19 @@ xf86XVUpdateCompositeClip(XvPortRecPrivatePtr portPriv)
return;
}
- pCompositeClip = REGION_CREATE(pWin->pScreen, NullBox, 1);
- REGION_COPY(pWin->pScreen, pCompositeClip, portPriv->clientClip);
- REGION_TRANSLATE(pWin->pScreen, pCompositeClip,
+ pCompositeClip = REGION_CREATE(pScreen, NullBox, 1);
+ REGION_COPY(pScreen, pCompositeClip, portPriv->clientClip);
+ REGION_TRANSLATE(pScreen, pCompositeClip,
portPriv->pDraw->x + portPriv->clipOrg.x,
portPriv->pDraw->y + portPriv->clipOrg.y);
- REGION_INTERSECT(pWin->pScreen, pCompositeClip, pregWin, pCompositeClip);
+ REGION_INTERSECT(pScreen, pCompositeClip, pregWin, pCompositeClip);
portPriv->pCompositeClip = pCompositeClip;
portPriv->FreeCompositeClip = TRUE;
if(freeCompClip) {
- REGION_DESTROY(pWin->pScreen, pregWin);
- }
+ REGION_DESTROY(pScreen, pregWin);
+ }
}
/* Save the current clientClip and update the CompositeClip whenever
@@ -627,23 +680,25 @@ xf86XVUpdateCompositeClip(XvPortRecPrivatePtr portPriv)
static void
xf86XVCopyClip(
- XvPortRecPrivatePtr portPriv,
+ XvPortRecPrivatePtr portPriv,
GCPtr pGC
){
+ ScreenPtr pScreen = pGC->pScreen;
+
/* copy the new clip if it exists */
if((pGC->clientClipType == CT_REGION) && pGC->clientClip) {
if(!portPriv->clientClip)
- portPriv->clientClip = REGION_CREATE(pGC->pScreen, NullBox, 1);
+ portPriv->clientClip = REGION_CREATE(pScreen, NullBox, 1);
/* Note: this is in window coordinates */
- REGION_COPY(pGC->pScreen, portPriv->clientClip, pGC->clientClip);
+ REGION_COPY(pScreen, portPriv->clientClip, pGC->clientClip);
} else if(portPriv->clientClip) { /* free the old clientClip */
- REGION_DESTROY(pGC->pScreen, portPriv->clientClip);
+ REGION_DESTROY(pScreen, portPriv->clientClip);
portPriv->clientClip = NULL;
}
/* get rid of the old clip list */
if(portPriv->pCompositeClip && portPriv->FreeCompositeClip) {
- REGION_DESTROY(pWin->pScreen, portPriv->pCompositeClip);
+ REGION_DESTROY(pScreen, portPriv->pCompositeClip);
}
portPriv->clipOrg = pGC->clipOrg;
@@ -670,12 +725,12 @@ xf86XVRegetVideo(XvPortRecPrivatePtr portPriv)
WinBox.y1 = portPriv->pDraw->y + portPriv->drw_y;
WinBox.x2 = WinBox.x1 + portPriv->drw_w;
WinBox.y2 = WinBox.y1 + portPriv->drw_h;
-
+
/* clip to the window composite clip */
REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
- REGION_INIT(pScreen, &ClipRegion, NullBox, 1);
- REGION_INTERSECT(Screen, &ClipRegion, &WinRegion, portPriv->pCompositeClip);
-
+ REGION_NULL(pScreen, &ClipRegion);
+ REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip);
+
/* that's all if it's totally obscured */
if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
clippedAway = TRUE;
@@ -686,11 +741,11 @@ xf86XVRegetVideo(XvPortRecPrivatePtr portPriv)
REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion);
}
- ret = (*portPriv->AdaptorRec->GetVideo)(portPriv->pScrn,
- portPriv->vid_x, portPriv->vid_y,
- WinBox.x1, WinBox.y1,
- portPriv->vid_w, portPriv->vid_h,
- portPriv->drw_w, portPriv->drw_h,
+ ret = (*portPriv->AdaptorRec->GetVideo)(portPriv->pScrn,
+ portPriv->vid_x, portPriv->vid_y,
+ WinBox.x1, WinBox.y1,
+ portPriv->vid_w, portPriv->vid_h,
+ portPriv->drw_w, portPriv->drw_h,
&ClipRegion, portPriv->DevPriv.ptr);
if(ret == Success)
@@ -734,27 +789,27 @@ xf86XVReputVideo(XvPortRecPrivatePtr portPriv)
WinBox.y1 = portPriv->pDraw->y + portPriv->drw_y;
WinBox.x2 = WinBox.x1 + portPriv->drw_w;
WinBox.y2 = WinBox.y1 + portPriv->drw_h;
-
+
/* clip to the window composite clip */
REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
- REGION_INIT(pScreen, &ClipRegion, NullBox, 1);
- REGION_INTERSECT(Screen, &ClipRegion, &WinRegion, portPriv->pCompositeClip);
+ REGION_NULL(pScreen, &ClipRegion);
+ REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip);
/* clip and translate to the viewport */
if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) {
RegionRec VPReg;
BoxRec VPBox;
- VPBox.x1 = portPriv->pScrn->frameX0;
+ VPBox.x1 = portPriv->pScrn->frameX0;
VPBox.y1 = portPriv->pScrn->frameY0;
- VPBox.x2 = portPriv->pScrn->frameX1;
+ VPBox.x2 = portPriv->pScrn->frameX1;
VPBox.y2 = portPriv->pScrn->frameY1;
REGION_INIT(pScreen, &VPReg, &VPBox, 1);
- REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg);
+ REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg);
REGION_UNINIT(pScreen, &VPReg);
}
-
+
/* that's all if it's totally obscured */
if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
clippedAway = TRUE;
@@ -765,8 +820,8 @@ xf86XVReputVideo(XvPortRecPrivatePtr portPriv)
if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
BoxPtr clipBox = REGION_RECTS(&ClipRegion);
if( (REGION_NUM_RECTS(&ClipRegion) != 1) ||
- (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
- (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2))
+ (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
+ (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2))
{
clippedAway = TRUE;
goto CLIP_VIDEO_BAILOUT;
@@ -777,11 +832,11 @@ xf86XVReputVideo(XvPortRecPrivatePtr portPriv)
REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion);
}
- ret = (*portPriv->AdaptorRec->PutVideo)(portPriv->pScrn,
- portPriv->vid_x, portPriv->vid_y,
+ ret = (*portPriv->AdaptorRec->PutVideo)(portPriv->pScrn,
+ portPriv->vid_x, portPriv->vid_y,
WinBox.x1, WinBox.y1,
- portPriv->vid_w, portPriv->vid_h,
- portPriv->drw_w, portPriv->drw_h,
+ portPriv->vid_w, portPriv->vid_h,
+ portPriv->drw_w, portPriv->drw_h,
&ClipRegion, portPriv->DevPriv.ptr);
if(ret == Success) portPriv->isOn = XV_ON;
@@ -823,27 +878,27 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv)
WinBox.y1 = portPriv->pDraw->y + portPriv->drw_y;
WinBox.x2 = WinBox.x1 + portPriv->drw_w;
WinBox.y2 = WinBox.y1 + portPriv->drw_h;
-
+
/* clip to the window composite clip */
REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
- REGION_INIT(pScreen, &ClipRegion, NullBox, 1);
- REGION_INTERSECT(Screen, &ClipRegion, &WinRegion, portPriv->pCompositeClip);
+ REGION_NULL(pScreen, &ClipRegion);
+ REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip);
/* clip and translate to the viewport */
if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) {
RegionRec VPReg;
BoxRec VPBox;
- VPBox.x1 = portPriv->pScrn->frameX0;
+ VPBox.x1 = portPriv->pScrn->frameX0;
VPBox.y1 = portPriv->pScrn->frameY0;
- VPBox.x2 = portPriv->pScrn->frameX1;
+ VPBox.x2 = portPriv->pScrn->frameX1;
VPBox.y2 = portPriv->pScrn->frameY1;
REGION_INIT(pScreen, &VPReg, &VPBox, 1);
- REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg);
+ REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg);
REGION_UNINIT(pScreen, &VPReg);
}
-
+
/* that's all if it's totally obscured */
if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
clippedAway = TRUE;
@@ -854,8 +909,8 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv)
if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
BoxPtr clipBox = REGION_RECTS(&ClipRegion);
if( (REGION_NUM_RECTS(&ClipRegion) != 1) ||
- (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
- (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2))
+ (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
+ (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2))
{
clippedAway = TRUE;
goto CLIP_VIDEO_BAILOUT;
@@ -866,7 +921,7 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv)
REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion);
}
- ret = (*portPriv->AdaptorRec->ReputImage)(portPriv->pScrn,
+ ret = (*portPriv->AdaptorRec->ReputImage)(portPriv->pScrn,
WinBox.x1, WinBox.y1,
&ClipRegion, portPriv->DevPriv.ptr);
@@ -910,7 +965,7 @@ xf86XVReputAllVideo(WindowPtr pWin, pointer data)
static int
xf86XVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv)
{
- XF86XVWindowPtr winPriv, PrivRoot;
+ XF86XVWindowPtr winPriv, PrivRoot;
winPriv = PrivRoot = GET_XF86XV_WINDOW(pWin);
@@ -927,7 +982,7 @@ xf86XVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv)
winPriv->PortRec = portPriv;
winPriv->next = PrivRoot;
pWin->devPrivates[XF86XVWindowIndex].ptr = (pointer)winPriv;
- }
+ }
return Success;
}
@@ -941,15 +996,15 @@ xf86XVRemovePortFromWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv)
while(winPriv) {
if(winPriv->PortRec == portPriv) {
- if(prevPriv)
+ if(prevPriv)
prevPriv->next = winPriv->next;
- else
- pWin->devPrivates[XF86XVWindowIndex].ptr =
+ else
+ pWin->devPrivates[XF86XVWindowIndex].ptr =
(pointer)winPriv->next;
xfree(winPriv);
break;
}
- prevPriv = winPriv;
+ prevPriv = winPriv;
winPriv = winPriv->next;
}
portPriv->pDraw = NULL;
@@ -1008,7 +1063,7 @@ xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2)
/* filter out XClearWindow/Area */
if (!pWin->valdata) return;
-
+
pPrev = NULL;
while(WinPriv) {
@@ -1019,10 +1074,10 @@ xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2)
switch(pPriv->type) {
case XvInputMask:
xf86XVReputVideo(pPriv);
- break;
+ break;
case XvOutputMask:
- xf86XVRegetVideo(pPriv);
- break;
+ xf86XVRegetVideo(pPriv);
+ break;
default: /* overlaid still/image*/
if (pPriv->AdaptorRec->ReputImage)
xf86XVReputImage(pPriv);
@@ -1036,8 +1091,8 @@ xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2)
}
pPriv->pDraw = NULL;
- if(!pPrev)
- pWin->devPrivates[XF86XVWindowIndex].ptr =
+ if(!pPrev)
+ pWin->devPrivates[XF86XVWindowIndex].ptr =
(pointer)(WinPriv->next);
else
pPrev->next = WinPriv->next;
@@ -1054,7 +1109,7 @@ xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2)
}
-static void
+static void
xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
@@ -1073,7 +1128,7 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
pPriv->pCompositeClip = NULL;
- /* Stop everything except images, but stop them too if the
+ /* Stop everything except images, but stop them too if the
window isn't visible. But we only remove the images. */
if(pPriv->type || !visible) {
@@ -1086,8 +1141,8 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
if(!pPriv->type) { /* overlaid still/image */
pPriv->pDraw = NULL;
- if(!pPrev)
- pWin->devPrivates[XF86XVWindowIndex].ptr =
+ if(!pPrev)
+ pWin->devPrivates[XF86XVWindowIndex].ptr =
(pointer)(WinPriv->next);
else
pPrev->next = WinPriv->next;
@@ -1122,6 +1177,9 @@ xf86XVCloseScreen(int i, ScreenPtr pScreen)
XvAdaptorPtr pa;
int c;
+ /* Clear offscreen images */
+ (void)memset(&OffscreenImages[pScreen->myNum], 0, sizeof(OffscreenImages[0]));
+
if(!ScreenPriv) return TRUE;
if(ScreenPriv->videoGC) {
@@ -1133,20 +1191,16 @@ xf86XVCloseScreen(int i, ScreenPtr pScreen)
pScreen->WindowExposures = ScreenPriv->WindowExposures;
pScreen->ClipNotify = ScreenPriv->ClipNotify;
- pScrn->EnterVT = ScreenPriv->EnterVT;
- pScrn->LeaveVT = ScreenPriv->LeaveVT;
+ pScrn->EnterVT = ScreenPriv->EnterVT;
+ pScrn->LeaveVT = ScreenPriv->LeaveVT;
pScrn->AdjustFrame = ScreenPriv->AdjustFrame;
- for(c = 0, pa = pxvs->pAdaptors; c < pxvs->nAdaptors; c++, pa++) {
+ for(c = 0, pa = pxvs->pAdaptors; c < pxvs->nAdaptors; c++, pa++) {
xf86XVFreeAdaptor(pa);
}
- if(pxvs->pAdaptors)
- xfree(pxvs->pAdaptors);
-
+ xfree(pxvs->pAdaptors);
xfree(ScreenPriv);
-
-
return TRUE;
}
@@ -1168,7 +1222,7 @@ xf86XVQueryAdaptors(
/**** ScrnInfoRec fields ****/
-static Bool
+static Bool
xf86XVEnterVT(int index, int flags)
{
ScreenPtr pScreen = screenInfo.screens[index];
@@ -1177,12 +1231,12 @@ xf86XVEnterVT(int index, int flags)
ret = (*ScreenPriv->EnterVT)(index, flags);
- if(ret) WalkTree(pScreen, xf86XVReputAllVideo, 0);
-
+ if(ret) WalkTree(pScreen, xf86XVReputAllVideo, 0);
+
return ret;
}
-static void
+static void
xf86XVLeaveVT(int index, int flags)
{
ScreenPtr pScreen = screenInfo.screens[index];
@@ -1229,14 +1283,14 @@ xf86XVAdjustFrame(int index, int x, int y, int flags)
WindowPtr pWin;
XvAdaptorPtr pa;
int c, i;
-
+
if(ScreenPriv->AdjustFrame) {
pScrn->AdjustFrame = ScreenPriv->AdjustFrame;
(*pScrn->AdjustFrame)(index, x, y, flags);
pScrn->AdjustFrame = xf86XVAdjustFrame;
}
-
- for(c = pxvs->nAdaptors, pa = pxvs->pAdaptors; c > 0; c--, pa++) {
+
+ for(c = pxvs->nAdaptors, pa = pxvs->pAdaptors; c > 0; c--, pa++) {
XvPortPtr pPort = pa->pPorts;
XvPortRecPrivatePtr pPriv;
@@ -1254,7 +1308,7 @@ xf86XVAdjustFrame(int index, int x, int y, int flags)
if ((pPriv->AdaptorRec->ReputImage) &&
((pWin->visibility == VisibilityUnobscured) ||
- (pWin->visibility == VisibilityPartiallyObscured)))
+ (pWin->visibility == VisibilityPartiallyObscured)))
{
xf86XVReputImage(pPriv);
} else {
@@ -1297,8 +1351,8 @@ xf86XVPutVideo(
DrawablePtr pDraw,
XvPortPtr pPort,
GCPtr pGC,
- INT16 vid_x, INT16 vid_y,
- CARD16 vid_w, CARD16 vid_h,
+ INT16 vid_x, INT16 vid_y,
+ CARD16 vid_w, CARD16 vid_h,
INT16 drw_x, INT16 drw_y,
CARD16 drw_w, CARD16 drw_h
){
@@ -1310,7 +1364,7 @@ xf86XVPutVideo(
pPort->pDraw = (DrawablePtr)NULL;
return BadAlloc;
}
-
+
/* If we are changing windows, unregister our port in the old window */
if(portPriv->pDraw && (portPriv->pDraw != pDraw))
xf86XVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv);
@@ -1333,7 +1387,7 @@ xf86XVPutVideo(
/* To indicate to the DI layer that we were successful */
pPort->pDraw = pDraw;
-
+
if(!portPriv->pScrn->vtSema) return Success; /* Success ? */
return(xf86XVReputVideo(portPriv));
@@ -1345,8 +1399,8 @@ xf86XVPutStill(
DrawablePtr pDraw,
XvPortPtr pPort,
GCPtr pGC,
- INT16 vid_x, INT16 vid_y,
- CARD16 vid_w, CARD16 vid_h,
+ INT16 vid_x, INT16 vid_y,
+ CARD16 vid_w, CARD16 vid_h,
INT16 drw_x, INT16 drw_y,
CARD16 drw_w, CARD16 drw_h
){
@@ -1369,22 +1423,22 @@ xf86XVPutStill(
WinBox.y1 = pDraw->y + drw_y;
WinBox.x2 = WinBox.x1 + drw_w;
WinBox.y2 = WinBox.y1 + drw_h;
-
+
REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
- REGION_INIT(pScreen, &ClipRegion, NullBox, 1);
- REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip);
+ REGION_NULL(pScreen, &ClipRegion);
+ REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip);
if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) {
RegionRec VPReg;
BoxRec VPBox;
- VPBox.x1 = portPriv->pScrn->frameX0;
+ VPBox.x1 = portPriv->pScrn->frameX0;
VPBox.y1 = portPriv->pScrn->frameY0;
- VPBox.x2 = portPriv->pScrn->frameX1;
+ VPBox.x2 = portPriv->pScrn->frameX1;
VPBox.y2 = portPriv->pScrn->frameY1;
REGION_INIT(pScreen, &VPReg, &VPBox, 1);
- REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg);
+ REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg);
REGION_UNINIT(pScreen, &VPReg);
}
@@ -1400,11 +1454,11 @@ xf86XVPutStill(
if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
BoxPtr clipBox = REGION_RECTS(&ClipRegion);
if( (REGION_NUM_RECTS(&ClipRegion) != 1) ||
- (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
+ (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
(clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2))
{
clippedAway = TRUE;
- goto PUT_STILL_BAILOUT;
+ goto PUT_STILL_BAILOUT;
}
}
@@ -1412,7 +1466,7 @@ xf86XVPutStill(
REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion);
}
- ret = (*portPriv->AdaptorRec->PutStill)(portPriv->pScrn,
+ ret = (*portPriv->AdaptorRec->PutStill)(portPriv->pScrn,
vid_x, vid_y, WinBox.x1, WinBox.y1,
vid_w, vid_h, drw_w, drw_h,
&ClipRegion, portPriv->DevPriv.ptr);
@@ -1433,9 +1487,9 @@ xf86XVPutStill(
PUT_STILL_BAILOUT:
if((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) {
- (*portPriv->AdaptorRec->StopVideo)(
- portPriv->pScrn, portPriv->DevPriv.ptr, FALSE);
- portPriv->isOn = XV_PENDING;
+ (*portPriv->AdaptorRec->StopVideo)(
+ portPriv->pScrn, portPriv->DevPriv.ptr, FALSE);
+ portPriv->isOn = XV_PENDING;
}
REGION_UNINIT(pScreen, &WinRegion);
@@ -1450,8 +1504,8 @@ xf86XVGetVideo(
DrawablePtr pDraw,
XvPortPtr pPort,
GCPtr pGC,
- INT16 vid_x, INT16 vid_y,
- CARD16 vid_w, CARD16 vid_h,
+ INT16 vid_x, INT16 vid_y,
+ CARD16 vid_w, CARD16 vid_h,
INT16 drw_x, INT16 drw_y,
CARD16 drw_w, CARD16 drw_h
){
@@ -1463,7 +1517,7 @@ xf86XVGetVideo(
pPort->pDraw = (DrawablePtr)NULL;
return BadAlloc;
}
-
+
/* If we are changing windows, unregister our port in the old window */
if(portPriv->pDraw && (portPriv->pDraw != pDraw))
xf86XVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv);
@@ -1486,7 +1540,7 @@ xf86XVGetVideo(
/* To indicate to the DI layer that we were successful */
pPort->pDraw = pDraw;
-
+
if(!portPriv->pScrn->vtSema) return Success; /* Success ? */
return(xf86XVRegetVideo(portPriv));
@@ -1498,8 +1552,8 @@ xf86XVGetStill(
DrawablePtr pDraw,
XvPortPtr pPort,
GCPtr pGC,
- INT16 vid_x, INT16 vid_y,
- CARD16 vid_w, CARD16 vid_h,
+ INT16 vid_x, INT16 vid_y,
+ CARD16 vid_w, CARD16 vid_h,
INT16 drw_x, INT16 drw_y,
CARD16 drw_w, CARD16 drw_h
){
@@ -1522,10 +1576,10 @@ xf86XVGetStill(
WinBox.y1 = pDraw->y + drw_y;
WinBox.x2 = WinBox.x1 + drw_w;
WinBox.y2 = WinBox.y1 + drw_h;
-
+
REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
- REGION_INIT(pScreen, &ClipRegion, NullBox, 1);
- REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip);
+ REGION_NULL(pScreen, &ClipRegion);
+ REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip);
if(portPriv->pDraw) {
xf86XVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv);
@@ -1548,9 +1602,9 @@ xf86XVGetStill(
GET_STILL_BAILOUT:
if((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) {
- (*portPriv->AdaptorRec->StopVideo)(
- portPriv->pScrn, portPriv->DevPriv.ptr, FALSE);
- portPriv->isOn = XV_PENDING;
+ (*portPriv->AdaptorRec->StopVideo)(
+ portPriv->pScrn, portPriv->DevPriv.ptr, FALSE);
+ portPriv->isOn = XV_PENDING;
}
REGION_UNINIT(pScreen, &WinRegion);
@@ -1559,7 +1613,7 @@ GET_STILL_BAILOUT:
return ret;
}
-
+
static int
xf86XVStopVideo(
@@ -1571,7 +1625,7 @@ xf86XVStopVideo(
if(pDraw->type != DRAWABLE_WINDOW)
return BadAlloc;
-
+
xf86XVRemovePortFromWindow((WindowPtr)pDraw, portPriv);
if(!portPriv->pScrn->vtSema) return Success; /* Success ? */
@@ -1595,8 +1649,8 @@ xf86XVSetPortAttribute(
INT32 value
){
XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr);
-
- return((*portPriv->AdaptorRec->SetPortAttribute)(portPriv->pScrn,
+
+ return((*portPriv->AdaptorRec->SetPortAttribute)(portPriv->pScrn,
attribute, value, portPriv->DevPriv.ptr));
}
@@ -1609,8 +1663,8 @@ xf86XVGetPortAttribute(
INT32 *p_value
){
XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr);
-
- return((*portPriv->AdaptorRec->GetPortAttribute)(portPriv->pScrn,
+
+ return((*portPriv->AdaptorRec->GetPortAttribute)(portPriv->pScrn,
attribute, p_value, portPriv->DevPriv.ptr));
}
@@ -1626,8 +1680,8 @@ xf86XVQueryBestSize(
unsigned int *p_w, unsigned int *p_h
){
XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr);
-
- (*portPriv->AdaptorRec->QueryBestSize)(portPriv->pScrn,
+
+ (*portPriv->AdaptorRec->QueryBestSize)(portPriv->pScrn,
(Bool)motion, vid_w, vid_h, drw_w, drw_h,
p_w, p_h, portPriv->DevPriv.ptr);
@@ -1635,14 +1689,14 @@ xf86XVQueryBestSize(
}
-static int
+static int
xf86XVPutImage(
- ClientPtr client,
- DrawablePtr pDraw,
- XvPortPtr pPort,
+ ClientPtr client,
+ DrawablePtr pDraw,
+ XvPortPtr pPort,
GCPtr pGC,
- INT16 src_x, INT16 src_y,
- CARD16 src_w, CARD16 src_h,
+ 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 format,
@@ -1669,22 +1723,22 @@ xf86XVPutImage(
WinBox.y1 = pDraw->y + drw_y;
WinBox.x2 = WinBox.x1 + drw_w;
WinBox.y2 = WinBox.y1 + drw_h;
-
+
REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
- REGION_INIT(pScreen, &ClipRegion, NullBox, 1);
- REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip);
+ REGION_NULL(pScreen, &ClipRegion);
+ REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip);
if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) {
RegionRec VPReg;
BoxRec VPBox;
- VPBox.x1 = portPriv->pScrn->frameX0;
+ VPBox.x1 = portPriv->pScrn->frameX0;
VPBox.y1 = portPriv->pScrn->frameY0;
- VPBox.x2 = portPriv->pScrn->frameX1 + 1;
+ VPBox.x2 = portPriv->pScrn->frameX1 + 1;
VPBox.y2 = portPriv->pScrn->frameY1 + 1;
REGION_INIT(pScreen, &VPReg, &VPBox, 1);
- REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg);
+ REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg);
REGION_UNINIT(pScreen, &VPReg);
}
@@ -1700,11 +1754,11 @@ xf86XVPutImage(
if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) {
BoxPtr clipBox = REGION_RECTS(&ClipRegion);
if( (REGION_NUM_RECTS(&ClipRegion) != 1) ||
- (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
+ (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) ||
(clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2))
{
clippedAway = TRUE;
- goto PUT_IMAGE_BAILOUT;
+ goto PUT_IMAGE_BAILOUT;
}
}
@@ -1712,7 +1766,7 @@ xf86XVPutImage(
REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion);
}
- ret = (*portPriv->AdaptorRec->PutImage)(portPriv->pScrn,
+ ret = (*portPriv->AdaptorRec->PutImage)(portPriv->pScrn,
src_x, src_y, WinBox.x1, WinBox.y1,
src_w, src_h, drw_w, drw_h, format->id, data, width, height,
sync, &ClipRegion, portPriv->DevPriv.ptr);
@@ -1733,9 +1787,9 @@ xf86XVPutImage(
PUT_IMAGE_BAILOUT:
if((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) {
- (*portPriv->AdaptorRec->StopVideo)(
- portPriv->pScrn, portPriv->DevPriv.ptr, FALSE);
- portPriv->isOn = XV_PENDING;
+ (*portPriv->AdaptorRec->StopVideo)(
+ portPriv->pScrn, portPriv->DevPriv.ptr, FALSE);
+ portPriv->isOn = XV_PENDING;
}
REGION_UNINIT(pScreen, &WinRegion);
@@ -1745,19 +1799,19 @@ PUT_IMAGE_BAILOUT:
}
-static int
+static int
xf86XVQueryImageAttributes(
- ClientPtr client,
+ ClientPtr client,
XvPortPtr pPort,
- XvImagePtr format,
- CARD16 *width,
- CARD16 *height,
+ XvImagePtr format,
+ CARD16 *width,
+ CARD16 *height,
int *pitches,
int *offsets
){
XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr);
- return (*portPriv->AdaptorRec->QueryImageAttributes)(portPriv->pScrn,
+ return (*portPriv->AdaptorRec->QueryImageAttributes)(portPriv->pScrn,
format->id, width, height, pitches, offsets);
}
@@ -1778,7 +1832,7 @@ xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
pval[0] = key;
pval[1] = IncludeInferiors;
ScreenPriv->videoGC = CreateGC(root, GCForeground | GCSubwindowMode,
- pval, &status);
+ pval, &status);
if(!ScreenPriv->videoGC) return;
ValidateGC(root, ScreenPriv->videoGC);
} else if (key != ScreenPriv->videoGC->fgPixel){
@@ -1795,20 +1849,20 @@ xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
rects[i].width = pbox->x2 - pbox->x1;
rects[i].height = pbox->y2 - pbox->y1;
}
-
+
(*ScreenPriv->videoGC->ops->PolyFillRect)(
- root, ScreenPriv->videoGC, nbox, rects);
+ root, ScreenPriv->videoGC, nbox, rects);
DEALLOCATE_LOCAL(rects);
}
-/* xf86XVClipVideoHelper -
+/* xf86XVClipVideoHelper -
Takes the dst box in standard X BoxRec form (top and left
edges inclusive, bottom and right exclusive). The new dst
- box is returned. The source boundaries are given (x1, y1
- inclusive, x2, y2 exclusive) and returned are the new source
- boundaries in 16.16 fixed point.
+ box is returned. The source boundaries are given (x1, y1
+ inclusive, x2, y2 exclusive) and returned are the new source
+ boundaries in 16.16 fixed point.
*/
#define DummyScreen screenInfo.screens[0]
@@ -1824,112 +1878,169 @@ xf86XVClipVideoHelper(
INT32 width,
INT32 height
){
- INT32 vscale, hscale, delta;
+ double xsw, xdw, ysw, ydw;
+ INT32 delta;
BoxPtr extents = REGION_EXTENTS(DummyScreen, reg);
int diff;
- hscale = ((*xb - *xa) << 16) / (dst->x2 - dst->x1);
- vscale = ((*yb - *ya) << 16) / (dst->y2 - dst->y1);
+ xsw = (*xb - *xa) << 16;
+ xdw = dst->x2 - dst->x1;
+ ysw = (*yb - *ya) << 16;
+ ydw = dst->y2 - dst->y1;
*xa <<= 16; *xb <<= 16;
*ya <<= 16; *yb <<= 16;
diff = extents->x1 - dst->x1;
- if(diff > 0) {
- dst->x1 = extents->x1;
- *xa += diff * hscale;
+ if (diff > 0) {
+ dst->x1 = extents->x1;
+ *xa += (diff * xsw) / xdw;
}
diff = dst->x2 - extents->x2;
- if(diff > 0) {
- dst->x2 = extents->x2;
- *xb -= diff * hscale;
+ if (diff > 0) {
+ dst->x2 = extents->x2;
+ *xb -= (diff * xsw) / xdw;
}
diff = extents->y1 - dst->y1;
- if(diff > 0) {
- dst->y1 = extents->y1;
- *ya += diff * vscale;
+ if (diff > 0) {
+ dst->y1 = extents->y1;
+ *ya += (diff * ysw) / ydw;
}
diff = dst->y2 - extents->y2;
- if(diff > 0) {
- dst->y2 = extents->y2;
- *yb -= diff * vscale;
+ if (diff > 0) {
+ dst->y2 = extents->y2;
+ *yb -= (diff * ysw) / ydw;
}
- if(*xa < 0) {
- diff = (- *xa + hscale - 1)/ hscale;
- dst->x1 += diff;
- *xa += diff * hscale;
+ if (*xa < 0) {
+ diff = (((-*xa) * xdw) + xsw - 1) / xsw;
+ dst->x1 += diff;
+ *xa += (diff * xsw) / xdw;
}
delta = *xb - (width << 16);
- if(delta > 0) {
- diff = (delta + hscale - 1)/ hscale;
- dst->x2 -= diff;
- *xb -= diff * hscale;
+ if (delta > 0) {
+ diff = ((delta * xdw) + xsw - 1) / xsw;
+ dst->x2 -= diff;
+ *xb -= (diff * xsw) / xdw;
}
- if(*xa >= *xb) return FALSE;
+ if (*xa >= *xb) return FALSE;
- if(*ya < 0) {
- diff = (- *ya + vscale - 1)/ vscale;
- dst->y1 += diff;
- *ya += diff * vscale;
+ if (*ya < 0) {
+ diff = (((-*ya) * ydw) + ysw - 1) / ysw;
+ dst->y1 += diff;
+ *ya += (diff * ysw) / ydw;
}
delta = *yb - (height << 16);
- if(delta > 0) {
- diff = (delta + vscale - 1)/ vscale;
- dst->y2 -= diff;
- *yb -= diff * vscale;
+ if (delta > 0) {
+ diff = ((delta * ydw) + ysw - 1) / ysw;
+ dst->y2 -= diff;
+ *yb -= (diff * ysw) / ydw;
}
- if(*ya >= *yb) return FALSE;
+ if (*ya >= *yb) return FALSE;
- if((dst->x1 != extents->x1) || (dst->x2 != extents->x2) ||
- (dst->y1 != extents->y1) || (dst->y2 != extents->y2))
+ if ((dst->x1 > extents->x1) || (dst->x2 < extents->x2) ||
+ (dst->y1 > extents->y1) || (dst->y2 < extents->y2))
{
- RegionRec clipReg;
- REGION_INIT(DummyScreen, &clipReg, dst, 1);
- REGION_INTERSECT(DummyScreen, reg, reg, &clipReg);
- REGION_UNINIT(DummyScreen, &clipReg);
+ RegionRec clipReg;
+ REGION_INIT(DummyScreen, &clipReg, dst, 1);
+ REGION_INTERSECT(DummyScreen, reg, reg, &clipReg);
+ REGION_UNINIT(DummyScreen, &clipReg);
}
return TRUE;
}
+void
+xf86XVCopyYUV12ToPacked(
+ const void *srcy,
+ const void *srcv,
+ const void *srcu,
+ void *dst,
+ int srcPitchy,
+ int srcPitchuv,
+ int dstPitch,
+ int h,
+ int w
+){
+ CARD32 *Dst;
+ const CARD8 *Y, *U, *V;
+ int i, j;
-/**************** Offscreen surface stuff *******************/
-
-typedef struct {
- XF86OffscreenImagePtr images;
- int num;
-} OffscreenImageRec;
+ w >>= 1;
+
+ for (j = 0; j < h; j++) {
+ Dst = dst;
+ Y = srcy; V = srcv; U = srcu;
+ i = w;
+ while (i >= 4) {
+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
+ Dst[0] = Y[0] | (Y[1] << 16) | (U[0] << 8) | (V[0] << 24);
+ Dst[1] = Y[2] | (Y[3] << 16) | (U[1] << 8) | (V[1] << 24);
+ Dst[2] = Y[4] | (Y[5] << 16) | (U[2] << 8) | (V[2] << 24);
+ Dst[3] = Y[6] | (Y[7] << 16) | (U[3] << 8) | (V[3] << 24);
+#else
+ /* This assumes a little-endian framebuffer */
+ Dst[0] = (Y[0] << 24) | (Y[1] << 8) | (U[0] << 16) | Y[0];
+ Dst[1] = (Y[2] << 24) | (Y[3] << 8) | (U[1] << 16) | Y[1];
+ Dst[2] = (Y[4] << 24) | (Y[5] << 8) | (U[2] << 16) | Y[2];
+ Dst[3] = (Y[6] << 24) | (Y[7] << 8) | (U[3] << 16) | Y[3];
+#endif
+ Dst += 4; Y += 8; V += 4; U += 4;
+ i -= 4;
+ }
-static OffscreenImageRec OffscreenImages[MAXSCREENS];
-static Bool offscreenInited = FALSE;
+ while (i--) {
+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
+ Dst[0] = Y[0] | (Y[1] << 16) | (U[0] << 8) | (V[0] << 24);
+#else
+ /* This assumes a little-endian framebuffer */
+ Dst[0] = (Y[0] << 24) | (Y[1] << 8) | (U[0] << 16) | Y[0];
+#endif
+ Dst++; Y += 2; V++; U++;
+ }
-Bool
-xf86XVRegisterOffscreenImages(
- ScreenPtr pScreen,
- XF86OffscreenImagePtr images,
- int num
-){
- if(!offscreenInited) {
- bzero(OffscreenImages, sizeof(OffscreenImages[MAXSCREENS]));
- offscreenInited = TRUE;
+ dst = (CARD8 *)dst + dstPitch;
+ srcy = (const CARD8 *)srcy + srcPitchy;
+ if (j & 1) {
+ srcu = (const CARD8 *)srcu + srcPitchuv;
+ srcv = (const CARD8 *)srcv + srcPitchuv;
+ }
}
-
- OffscreenImages[pScreen->myNum].num = num;
- OffscreenImages[pScreen->myNum].images = images;
-
- return TRUE;
}
-XF86OffscreenImagePtr
-xf86XVQueryOffscreenImages(
- ScreenPtr pScreen,
- int *num
+void
+xf86XVCopyPacked(
+ const void *src,
+ void *dst,
+ int srcPitch,
+ int dstPitch,
+ int h,
+ int w
){
- if(!offscreenInited) {
- *num = 0;
- return NULL;
- }
-
- *num = OffscreenImages[pScreen->myNum].num;
- return OffscreenImages[pScreen->myNum].images;
+ const CARD32 *Src;
+ CARD32 *Dst;
+ int i;
+
+ w >>= 1;
+ while (--h >= 0) {
+ do {
+ Dst = dst; Src = src;
+ i = w;
+ while (i >= 4) {
+ Dst[0] = Src[0];
+ Dst[1] = Src[1];
+ Dst[2] = Src[2];
+ Dst[3] = Src[3];
+ Dst += 4; Src += 4; i -= 4;
+ }
+ if (!i) break;
+ Dst[0] = Src[0];
+ if (i == 1) break;
+ Dst[1] = Src[1];
+ if (i == 2) break;
+ Dst[2] = Src[2];
+ } while (0);
+
+ src = (const CARD8 *)src + srcPitch;
+ dst = (CARD8 *)dst + dstPitch;
+ }
}
diff --git a/hw/xfree86/common/xf86xv.h b/hw/xfree86/common/xf86xv.h
index 9fd6b4edf..316d6c9e5 100644
--- a/hw/xfree86/common/xf86xv.h
+++ b/hw/xfree86/common/xf86xv.h
@@ -1,4 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86xv.h,v 1.23 2002/11/09 01:18:33 keithp Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86xv.h,v 1.25 2003/08/24 17:36:56 dawes Exp $ */
+
+/*
+ * Copyright (c) 1998-2003 by The XFree86 Project, 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 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).
+ */
#ifndef _XF86XV_H_
#define _XF86XV_H_
@@ -218,55 +245,27 @@ xf86XVClipVideoHelper(
INT32 height
);
-/*** These are DDX layer privates ***/
-
-extern int XF86XvScreenIndex;
-
-typedef struct {
- DestroyWindowProcPtr DestroyWindow;
- ClipNotifyProcPtr ClipNotify;
- WindowExposuresProcPtr WindowExposures;
- void (*AdjustFrame)(int, int, int, int);
- Bool (*EnterVT)(int, int);
- void (*LeaveVT)(int, int);
- GCPtr videoGC;
-} XF86XVScreenRec, *XF86XVScreenPtr;
-
-typedef struct {
- int flags;
- PutVideoFuncPtr PutVideo;
- PutStillFuncPtr PutStill;
- GetVideoFuncPtr GetVideo;
- GetStillFuncPtr GetStill;
- StopVideoFuncPtr StopVideo;
- SetPortAttributeFuncPtr SetPortAttribute;
- GetPortAttributeFuncPtr GetPortAttribute;
- QueryBestSizeFuncPtr QueryBestSize;
- PutImageFuncPtr PutImage;
- ReputImageFuncPtr ReputImage;
- QueryImageAttributesFuncPtr QueryImageAttributes;
-} XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr;
-
-typedef struct {
- ScrnInfoPtr pScrn;
- DrawablePtr pDraw;
- unsigned char type;
- unsigned int subWindowMode;
- DDXPointRec clipOrg;
- RegionPtr clientClip;
- RegionPtr pCompositeClip;
- Bool FreeCompositeClip;
- XvAdaptorRecPrivatePtr AdaptorRec;
- XvStatus isOn;
- Bool moved;
- int vid_x, vid_y, vid_w, vid_h;
- int drw_x, drw_y, drw_w, drw_h;
- DevUnion DevPriv;
-} XvPortRecPrivate, *XvPortRecPrivatePtr;
+void
+xf86XVCopyYUV12ToPacked(
+ const void *srcy,
+ const void *srcv,
+ const void *srcu,
+ void *dst,
+ int srcPitchy,
+ int srcPitchuv,
+ int dstPitch,
+ int h,
+ int w
+);
-typedef struct _XF86XVWindowRec{
- XvPortRecPrivatePtr PortRec;
- struct _XF86XVWindowRec *next;
-} XF86XVWindowRec, *XF86XVWindowPtr;
+void
+xf86XVCopyPacked(
+ const void *src,
+ void *dst,
+ int srcPitch,
+ int dstPitch,
+ int h,
+ int w
+);
#endif /* _XF86XV_H_ */
diff --git a/hw/xfree86/common/xf86xvmc.c b/hw/xfree86/common/xf86xvmc.c
index 4559359ec..832861ea4 100644
--- a/hw/xfree86/common/xf86xvmc.c
+++ b/hw/xfree86/common/xf86xvmc.c
@@ -1,4 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86xvmc.c,v 1.3 2001/04/01 14:00:08 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86xvmc.c,v 1.6 2003/10/08 22:31:59 mvojkovi Exp $ */
+
+/*
+ * Copyright (c) 2001-2003 by The XFree86 Project, 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 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).
+ */
#include "misc.h"
#include "xf86.h"
@@ -14,6 +41,7 @@
#include "xvmodproc.h"
#endif
+#include "xf86xvpriv.h"
#include "xf86xvmc.h"
#ifdef XFree86LOADER
@@ -199,3 +227,13 @@ Bool xf86XvMCScreenInit(
return TRUE;
}
+
+XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void)
+{
+ return xcalloc(1, sizeof(XF86MCAdaptorRec));
+}
+
+void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor)
+{
+ xfree(adaptor);
+}
diff --git a/hw/xfree86/common/xf86xvmc.h b/hw/xfree86/common/xf86xvmc.h
index 074edbebe..0b073aac8 100644
--- a/hw/xfree86/common/xf86xvmc.h
+++ b/hw/xfree86/common/xf86xvmc.h
@@ -1,4 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86xvmc.h,v 1.5 2001/11/14 21:54:39 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86xvmc.h,v 1.7 2003/10/08 22:31:59 mvojkovi Exp $ */
+
+/*
+ * Copyright (c) 2001 by The XFree86 Project, 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 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).
+ */
#ifndef _XF86XVMC_H
#define _XF86XVMC_H
@@ -131,4 +158,7 @@ Bool xf86XvMCScreenInit(
XF86MCAdaptorPtr *adaptors
);
+XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void);
+void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor);
+
#endif /* _XF86XVMC_H */
diff --git a/hw/xfree86/common/xisb.c b/hw/xfree86/common/xisb.c
index 4132c7abf..facc27842 100644
--- a/hw/xfree86/common/xisb.c
+++ b/hw/xfree86/common/xisb.c
@@ -24,7 +24,7 @@
* in this Software without prior written authorization from Metro Link.
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xisb.c,v 1.5 2000/11/06 19:24:07 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xisb.c,v 1.6 2003/03/25 04:18:21 dawes Exp $ */
/*
X Input Serial Buffer routines for use in any XInput driver that accesses
@@ -36,6 +36,10 @@
* Standard Headers
****************************************************************************/
+#ifdef __UNIXOS2__
+#define I_NEED_OS2_H
+#endif
+
#include <misc.h>
#include <xf86.h>
#include <xf86Version.h>
diff --git a/hw/xfree86/ddc/ddcProperty.c b/hw/xfree86/ddc/ddcProperty.c
index d779834c2..666dfc632 100644
--- a/hw/xfree86/ddc/ddcProperty.c
+++ b/hw/xfree86/ddc/ddcProperty.c
@@ -3,7 +3,7 @@
*
* Copyright 1999 by Andrew C Aitchison <A.C.Aitchison@dpmms.cam.ac.uk>
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/ddc/ddcProperty.c,v 1.9 2001/10/28 03:33:21 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/ddc/ddcProperty.c,v 1.10 2003/11/03 05:11:04 tsi Exp $ */
#include "misc.h"
#include "xf86.h"
@@ -100,10 +100,8 @@ xf86SetDDCproperties(ScrnInfoPtr pScrnInfo, xf86MonPtr DDC)
EDID1Atom, XA_INTEGER, 8,
128, (unsigned char *)EDID1rawdata
);
-#ifdef DEBUG
+ if (ret != Success)
ErrorF("xf86RegisterRootWindowProperty returns %d\n", ret );
-#endif
-
}
if (makeEDID2prop) {
@@ -127,9 +125,8 @@ xf86SetDDCproperties(ScrnInfoPtr pScrnInfo, xf86MonPtr DDC)
EDID2Atom, XA_INTEGER, 8,
256, (unsigned char *)EDID2rawdata
);
-#ifdef DEBUG
+ if (ret != Success)
ErrorF("xf86RegisterRootWindowProperty returns %d\n", ret );
-#endif
}
if (DDC->vdif) {
@@ -151,9 +148,8 @@ xf86SetDDCproperties(ScrnInfoPtr pScrnInfo, xf86MonPtr DDC)
strlen(VDIF_DUMMY_STRING),
VDIF_DUMMY_STRING
);
-#ifdef DEBUG
+ if (ret != Success)
ErrorF("xf86RegisterRootWindowProperty returns %d\n", ret );
-#endif
}
return TRUE;
diff --git a/hw/xfree86/ddc/print_edid.c b/hw/xfree86/ddc/print_edid.c
index 3451e52f6..064533800 100644
--- a/hw/xfree86/ddc/print_edid.c
+++ b/hw/xfree86/ddc/print_edid.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/ddc/print_edid.c,v 1.15 2001/05/22 17:01:23 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/ddc/print_edid.c,v 1.16 2003/09/24 02:43:17 dawes Exp $ */
/* print_edid.c: print out all information retrieved from display device
*
@@ -41,7 +41,7 @@ static void
print_vendor(int scrnIndex, struct vendor *c)
{
xf86DrvMsg(scrnIndex, X_INFO, "Manufacturer: %s Model: %x Serial#: %u\n",
- &c->name, c->prod_id, c->serial);
+ (char *)&c->name, c->prod_id, c->serial);
xf86DrvMsg(scrnIndex, X_INFO, "Year: %u Week: %u\n", c->year, c->week);
}
diff --git a/hw/xfree86/ddc/print_vdif.c b/hw/xfree86/ddc/print_vdif.c
index c65d1a0c9..fbb540e1d 100644
--- a/hw/xfree86/ddc/print_vdif.c
+++ b/hw/xfree86/ddc/print_vdif.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/ddc/print_vdif.c,v 1.3 2003/02/17 16:08:27 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/ddc/print_vdif.c,v 1.5 2003/11/06 18:37:58 tsi Exp $ */
#include "vdif.h"
#include "misc.h"
diff --git a/hw/xfree86/ddc/vdif.h b/hw/xfree86/ddc/vdif.h
index 38026e56a..8d358613e 100644
--- a/hw/xfree86/ddc/vdif.h
+++ b/hw/xfree86/ddc/vdif.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/ddc/vdif.h,v 1.3 2000/04/14 12:16:04 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/ddc/vdif.h,v 1.5 2003/11/06 18:37:58 tsi Exp $ */
#ifndef _VDIF_H
#define _VDIF_H
@@ -24,7 +24,8 @@
#include "Xmd.h"
-#pragma pack(1)
+#undef CARD32
+#define CARD32 unsigned int /* ... on all supported platforms */
typedef struct _VDIF { /* Monitor Description: */
CARD8 VDIFId[4]; /* alway "VDIF" */
@@ -169,6 +170,6 @@ typedef struct _vdif {
char * strings;
} xf86vdif, *xf86vdifPtr;
-#pragma pack()
+#undef CARD32
#endif
diff --git a/hw/xfree86/ddc/xf86DDC.c b/hw/xfree86/ddc/xf86DDC.c
index 736fb741b..496f3573f 100644
--- a/hw/xfree86/ddc/xf86DDC.c
+++ b/hw/xfree86/ddc/xf86DDC.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/ddc/xf86DDC.c,v 1.23 2003/02/17 16:08:27 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/ddc/xf86DDC.c,v 1.27 2003/10/30 17:48:19 tsi Exp $ */
/* xf86DDC.c
*
@@ -19,6 +19,7 @@ const char *i2cSymbols[] = {
"xf86CreateI2CDevRec",
"xf86I2CDevInit",
"xf86I2CWriteRead",
+ "xf86I2CFindDev",
"xf86DestroyI2CDevRec",
NULL
};
@@ -332,19 +333,22 @@ DDCRead_DDC2(int scrnIndex, I2CBusPtr pBus, int start, int len)
int i;
xf86LoaderReqSymLists(i2cSymbols, NULL);
- dev = xf86CreateI2CDevRec();
- dev->DevName = "ddc2";
- dev->SlaveAddr = 0xA0;
- dev->ByteTimeout = 2200; /* VESA DDC spec 3 p. 43 (+10 %) */
- dev->StartTimeout = 550;
- dev->BitTimeout = 40;
- dev->ByteTimeout = 40;
- dev->AcknTimeout = 40;
-
- dev->pI2CBus = pBus;
- if (! xf86I2CDevInit(dev)) {
- xf86DrvMsg(X_PROBED,scrnIndex,"No DDC2 device\n");
- return NULL;
+
+ if (!(dev = xf86I2CFindDev(pBus, 0x00A0))) {
+ dev = xf86CreateI2CDevRec();
+ dev->DevName = "ddc2";
+ dev->SlaveAddr = 0xA0;
+ dev->ByteTimeout = 2200; /* VESA DDC spec 3 p. 43 (+10 %) */
+ dev->StartTimeout = 550;
+ dev->BitTimeout = 40;
+ dev->ByteTimeout = 40;
+ dev->AcknTimeout = 40;
+
+ dev->pI2CBus = pBus;
+ if (!xf86I2CDevInit(dev)) {
+ xf86DrvMsg(scrnIndex, X_PROBED, "No DDC2 device\n");
+ return NULL;
+ }
}
if (start < 0x100) {
w_bytes = 1;
@@ -358,10 +362,9 @@ DDCRead_DDC2(int scrnIndex, I2CBusPtr pBus, int start, int len)
* (len));
for (i=0; i<RETRIES; i++) {
if (xf86I2CWriteRead(dev, W_Buffer,w_bytes, R_Buffer,len)) {
- if (!DDC_checksum(R_Buffer,len)) {
- xf86DestroyI2CDevRec(dev,TRUE);
+ if (!DDC_checksum(R_Buffer,len))
return R_Buffer;
- }
+
#ifdef DEBUG
else ErrorF("Checksum error in EDID block\n");
#endif
@@ -375,5 +378,3 @@ DDCRead_DDC2(int scrnIndex, I2CBusPtr pBus, int start, int len)
xfree(R_Buffer);
return NULL;
}
-
-
diff --git a/hw/xfree86/dixmods/extmod/dgaproc.h b/hw/xfree86/dixmods/extmod/dgaproc.h
index 2b0118f15..a0108053c 100644
--- a/hw/xfree86/dixmods/extmod/dgaproc.h
+++ b/hw/xfree86/dixmods/extmod/dgaproc.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/dgaproc.h,v 1.21 2000/06/30 19:06:54 keithp Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/dgaproc.h,v 1.22 2003/07/16 01:38:29 dawes Exp $ */
#ifndef __DGAPROC_H
#define __DGAPROC_H
@@ -53,9 +53,6 @@ typedef struct {
int reserved2;
} XDGAModeRec, *XDGAModePtr;
-
-void XFree86DGAExtensionInit(void);
-
/* DDX interface */
int
diff --git a/hw/xfree86/dixmods/extmod/modinit.c b/hw/xfree86/dixmods/extmod/modinit.c
index d97b88fa4..dc76cbf21 100644
--- a/hw/xfree86/dixmods/extmod/modinit.c
+++ b/hw/xfree86/dixmods/extmod/modinit.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/extmod/modinit.c,v 1.16 2002/03/06 21:12:33 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/extmod/modinit.c,v 1.17 2003/07/16 01:38:33 dawes Exp $ */
/*
*
@@ -31,113 +31,9 @@
#include "Xproto.h"
-static MODULESETUPPROTO(extmodSetup);
-
-extern Bool noTestExtensions;
-
-#ifdef SHAPE
-extern void ShapeExtensionInit(INITARGS);
-#define _SHAPE_SERVER_ /* don't want Xlib structures */
-#include "shapestr.h"
-#endif
-
-#ifdef MULTIBUFFER
-extern void MultibufferExtensionInit(INITARGS);
-#define _MULTIBUF_SERVER_ /* don't want Xlib structures */
-#include "multibufst.h"
-#endif
-
-#ifdef MITMISC
-extern void MITMiscExtensionInit(INITARGS);
-#define _MITMISC_SERVER_
-#include "mitmiscstr.h"
-#endif
-
-#ifdef XTEST
-extern void XTestExtensionInit(INITARGS);
-#define _XTEST_SERVER_
-#include "XTest.h"
-#include "xteststr.h"
-#endif
-
-#ifdef BIGREQS
-extern void BigReqExtensionInit(INITARGS);
-#include "bigreqstr.h"
-#endif
-
-#ifdef XSYNC
-extern void SyncExtensionInit(INITARGS);
-#define _SYNC_SERVER
-#include "sync.h"
-#include "syncstr.h"
-#endif
-
-#ifdef SCREENSAVER
-extern void ScreenSaverExtensionInit (INITARGS);
-#include "saver.h"
-#endif
-
-#ifdef XCMISC
-extern void XCMiscExtensionInit(INITARGS);
-#include "xcmiscstr.h"
-#endif
-
-#ifdef XF86VIDMODE
-extern void XFree86VidModeExtensionInit(INITARGS);
-#define _XF86VIDMODE_SERVER_
-#include "xf86vmstr.h"
-#endif
-
-#ifdef XF86MISC
-extern void XFree86MiscExtensionInit(INITARGS);
-#define _XF86MISC_SERVER_
-#define _XF86MISC_SAVER_COMPAT_
-#include "xf86mscstr.h"
-#endif
-
-#ifdef XFreeXDGA
-extern void XFree86DGAExtensionInit(INITARGS);
-extern void XFree86DGARegister(INITARGS);
-#define _XF86DGA_SERVER_
-#include "xf86dgastr.h"
-#endif
-
-#ifdef DPMSExtension
-extern void DPMSExtensionInit(INITARGS);
-#include "dpmsstr.h"
-#endif
-
-#ifdef FONTCACHE
-extern void FontCacheExtensionInit(INITARGS);
-#define _FONTCACHE_SERVER_
-#include "fontcacheP.h"
-#include "fontcachstr.h"
-#endif
-
-#ifdef TOGCUP
-extern void XcupExtensionInit(INITARGS);
-#define _XCUP_SERVER_
-#include "Xcupstr.h"
-#endif
-
-#ifdef EVI
-extern void EVIExtensionInit(INITARGS);
-#define _XEVI_SERVER_
-#include "XEVIstr.h"
-#endif
+#include "modinit.h"
-#ifdef XV
-extern void XvExtensionInit(INITARGS);
-extern void XvMCExtensionInit(INITARGS);
-extern void XvRegister(INITARGS);
-#include "Xv.h"
-#include "XvMC.h"
-#endif
-
-#ifdef RES
-extern void ResExtensionInit(INITARGS);
-#include "XResproto.h"
-#endif
+static MODULESETUPPROTO(extmodSetup);
/*
* Array describing extensions to be initialized
diff --git a/hw/xfree86/dixmods/extmod/xf86dga.c b/hw/xfree86/dixmods/extmod/xf86dga.c
index 9593c4a40..973f54e23 100644
--- a/hw/xfree86/dixmods/extmod/xf86dga.c
+++ b/hw/xfree86/dixmods/extmod/xf86dga.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/xf86dga.c,v 3.21 2000/06/30 19:06:54 keithp Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xf86dga.c,v 3.22 2003/07/16 01:38:30 dawes Exp $ */
/*
@@ -24,6 +24,8 @@ Copyright (c) 1995, 1996, 1999 XFree86 Inc
#include "swaprep.h"
#include "dgaproc.h"
+#include "xf86dgaext.h"
+
static DISPATCH_PROC(ProcXF86DGADirectVideo);
static DISPATCH_PROC(ProcXF86DGAGetVidPage);
@@ -270,8 +272,7 @@ ProcXF86DGAViewPortChanged(ClientPtr client)
}
int
-ProcXF86DGADispatch (client)
- register ClientPtr client;
+ProcXF86DGADispatch(register ClientPtr client)
{
REQUEST(xReq);
diff --git a/hw/xfree86/dixmods/extmod/xf86dga2.c b/hw/xfree86/dixmods/extmod/xf86dga2.c
index c0d51b809..2556743bb 100644
--- a/hw/xfree86/dixmods/extmod/xf86dga2.c
+++ b/hw/xfree86/dixmods/extmod/xf86dga2.c
@@ -3,7 +3,7 @@
Written by Mark Vojkovich
*/
-/* $XFree86: xc/programs/Xserver/Xext/xf86dga2.c,v 1.17 2001/10/28 03:32:51 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xf86dga2.c,v 1.18 2003/07/16 01:38:30 dawes Exp $ */
#define NEED_REPLIES
@@ -24,6 +24,7 @@
#include "xf86dgastr.h"
#include "swaprep.h"
#include "dgaproc.h"
+#include "xf86dgaext.h"
#ifdef EXTMODULE
#include "xf86_ansic.h"
@@ -31,6 +32,7 @@
#include <string.h>
#endif
+#include "modinit.h"
static DISPATCH_PROC(ProcXDGADispatch);
static DISPATCH_PROC(SProcXDGADispatch);
@@ -51,10 +53,6 @@ static DISPATCH_PROC(ProcXDGASetClientVersion);
static DISPATCH_PROC(ProcXDGAChangePixmapMode);
static DISPATCH_PROC(ProcXDGACreateColormap);
-
-extern DISPATCH_PROC(ProcXF86DGADispatch);
-
-
static void XDGAResetProc(ExtensionEntry *extEntry);
static void DGAClientStateChange (CallbackListPtr*, pointer, pointer);
@@ -78,7 +76,7 @@ typedef struct {
#define DGAPRIV(c) ((c)->devPrivates[DGAClientPrivateIndex].ptr)
void
-XFree86DGAExtensionInit(void)
+XFree86DGAExtensionInit(INITARGS)
{
ExtensionEntry* extEntry;
@@ -766,7 +764,7 @@ ProcXDGADispatch (ClientPtr client)
#ifdef EXTMODULE
void
-XFree86DGARegister()
+XFree86DGARegister(INITARGS)
{
XDGAEventBase = &DGAEventBase;
}
diff --git a/hw/xfree86/dixmods/extmod/xf86misc.c b/hw/xfree86/dixmods/extmod/xf86misc.c
index bc8e94b45..620761742 100644
--- a/hw/xfree86/dixmods/extmod/xf86misc.c
+++ b/hw/xfree86/dixmods/extmod/xf86misc.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/xf86misc.c,v 3.37 2002/11/20 04:04:58 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xf86misc.c,v 3.41 2003/11/17 22:20:27 dawes Exp $ */
/*
* Copyright (c) 1995, 1996 The XFree86 Project, Inc
@@ -54,9 +54,7 @@ typedef struct {
#define MPRIV(c) ((c)->devPrivates[MiscClientPrivateIndex].ptr)
static void XF86MiscResetProc(
-#if NeedFunctionPrototypes
ExtensionEntry* /* extEntry */
-#endif
);
static void
@@ -84,6 +82,7 @@ static DISPATCH_PROC(ProcXF86MiscSetMouseSettings);
static DISPATCH_PROC(ProcXF86MiscSetGrabKeysState);
static DISPATCH_PROC(ProcXF86MiscSetClientVersion);
static DISPATCH_PROC(ProcXF86MiscGetFilePaths);
+static DISPATCH_PROC(ProcXF86MiscPassMessage);
#ifdef _XF86MISC_SAVER_COMPAT_
static DISPATCH_PROC(ProcXF86MiscGetSaver);
static DISPATCH_PROC(ProcXF86MiscSetSaver);
@@ -97,12 +96,15 @@ static DISPATCH_PROC(SProcXF86MiscSetMouseSettings);
static DISPATCH_PROC(SProcXF86MiscSetGrabKeysState);
static DISPATCH_PROC(SProcXF86MiscSetClientVersion);
static DISPATCH_PROC(SProcXF86MiscGetFilePaths);
+static DISPATCH_PROC(SProcXF86MiscPassMessage);
#ifdef _XF86MISC_SAVER_COMPAT_
static DISPATCH_PROC(SProcXF86MiscGetSaver);
static DISPATCH_PROC(SProcXF86MiscSetSaver);
#endif
+#if 0
static unsigned char XF86MiscReqCode = 0;
+#endif
#ifdef DEBUG
# define DEBUG_P(x) ErrorF(x"\n");
@@ -148,7 +150,9 @@ XFree86MiscExtensionInit(void)
SProcXF86MiscDispatch,
XF86MiscResetProc,
StandardMinorOpcode))) {
+#if 0
XF86MiscReqCode = (unsigned char)extEntry->base;
+#endif
miscErrorBase = extEntry->errorBase;
}
}
@@ -354,14 +358,13 @@ ProcXF86MiscSetMouseSettings(client)
if (xf86GetVerbosity() > 1) {
ErrorF("SetMouseSettings - type: %d brate: %d srate: %d chdmid: %d\n",
- stuff->mousetype, stuff->baudrate,
- stuff->samplerate, stuff->chordmiddle);
- ErrorF(" em3but: %d em3tim: %d res: %d flags: %d\n",
- stuff->emulate3buttons, stuff->emulate3timeout,
- stuff->resolution, stuff->flags);
+ (int)stuff->mousetype, (int)stuff->baudrate,
+ (int)stuff->samplerate, stuff->chordmiddle);
+ ErrorF(" em3but: %d em3tim: %d res: %d flags: %ld\n",
+ stuff->emulate3buttons, (int)stuff->emulate3timeout,
+ (int)stuff->resolution, (unsigned long)stuff->flags);
}
-
if ((mouse = MiscExtCreateStruct(MISC_POINTER)) == (pointer) 0)
return BadAlloc;
@@ -427,8 +430,8 @@ ProcXF86MiscSetKbdSettings(client)
if (xf86GetVerbosity() > 1)
ErrorF("SetKbdSettings - type: %d rate: %d delay: %d snumlk: %d\n",
- stuff->kbdtype, stuff->rate,
- stuff->delay, stuff->servnumlock);
+ (int)stuff->kbdtype, (int)stuff->rate,
+ (int)stuff->delay, stuff->servnumlock);
if ((kbd = MiscExtCreateStruct(MISC_KEYBOARD)) == (pointer) 0)
return BadAlloc;
@@ -555,6 +558,59 @@ ProcXF86MiscGetFilePaths(client)
}
static int
+ProcXF86MiscPassMessage(client)
+ register ClientPtr client;
+{
+ xXF86MiscPassMessageReply rep;
+ char *msgtype, *msgval, *retstr;
+ int retval, size;
+ register int n;
+
+ REQUEST(xXF86MiscPassMessageReq);
+
+ DEBUG_P("XF86MiscPassMessage");
+
+ REQUEST_AT_LEAST_SIZE(xXF86MiscPassMessageReq);
+ size = (sizeof(xXF86MiscPassMessageReq) + 3) >> 2;
+ size+= (stuff->typelen + 3) >> 2;
+ size+= (stuff->vallen + 3) >> 2;
+ if (client->req_len < size)
+ return BadLength;
+ if (stuff->typelen) {
+ if (!(msgtype = xalloc(stuff->typelen)))
+ return BadAlloc;
+ strncpy(msgtype,(char*)(&stuff[1]),stuff->typelen);
+ } else return BadValue;
+ if (stuff->vallen) {
+ if (!(msgval = xalloc(stuff->vallen)))
+ return BadAlloc;
+ strncpy(msgval,(char*)(&stuff[1] + ((stuff->typelen + 3) & ~3)),
+ stuff->vallen);
+ } else return BadValue;
+
+ if ((retval= MiscExtPassMessage(stuff->screen,msgtype,msgval,&retstr)) != 0)
+ return retval;
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.mesglen = (retstr? strlen(retstr): 0);
+ rep.length = (SIZEOF(xXF86MiscPassMessageReply) - SIZEOF(xGenericReply) +
+ ((rep.mesglen + 3) & ~3)) >> 2;
+
+ if (client->swapped) {
+ swaps(&rep.sequenceNumber, n);
+ swapl(&rep.length, n);
+ swaps(&rep.mesglen, n);
+ }
+ WriteToClient(client, SIZEOF(xXF86MiscPassMessageReply), (char *)&rep);
+
+ if (rep.mesglen)
+ WriteToClient(client, rep.mesglen, (char *)retstr);
+
+ return (client->noClientException);
+}
+
+static int
ProcXF86MiscDispatch (client)
register ClientPtr client;
{
@@ -577,6 +633,8 @@ ProcXF86MiscDispatch (client)
return ProcXF86MiscSetClientVersion(client);
case X_XF86MiscGetFilePaths:
return ProcXF86MiscGetFilePaths(client);
+ case X_XF86MiscPassMessage:
+ return ProcXF86MiscPassMessage(client);
default:
if (!xf86GetModInDevEnabled())
return miscErrorBase + XF86MiscModInDevDisabled;
@@ -724,6 +782,17 @@ SProcXF86MiscGetFilePaths(client)
}
static int
+SProcXF86MiscPassMessage(client)
+ ClientPtr client;
+{
+ register int n;
+ REQUEST(xXF86MiscPassMessageReq);
+ swaps(&stuff->length, n);
+ REQUEST_SIZE_MATCH(xXF86MiscPassMessageReq);
+ return ProcXF86MiscPassMessage(client);
+}
+
+static int
SProcXF86MiscDispatch (client)
register ClientPtr client;
{
@@ -746,6 +815,8 @@ SProcXF86MiscDispatch (client)
return SProcXF86MiscSetClientVersion(client);
case X_XF86MiscGetFilePaths:
return SProcXF86MiscGetFilePaths(client);
+ case X_XF86MiscPassMessage:
+ return SProcXF86MiscPassMessage(client);
default:
if (!xf86GetModInDevEnabled())
return miscErrorBase + XF86MiscModInDevDisabled;
diff --git a/hw/xfree86/dixmods/extmod/xf86miscproc.h b/hw/xfree86/dixmods/extmod/xf86miscproc.h
index 63db938d1..208260947 100644
--- a/hw/xfree86/dixmods/extmod/xf86miscproc.h
+++ b/hw/xfree86/dixmods/extmod/xf86miscproc.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/xf86miscproc.h,v 1.5 2002/11/20 04:04:58 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xf86miscproc.h,v 1.6 2003/04/03 16:15:47 dawes Exp $ */
/* Prototypes for Pointer/Keyboard functions that the DDX must provide */
@@ -59,6 +59,8 @@ MiscExtReturn MiscExtApply(pointer structure, MiscExtStructType mse_or_kbd);
Bool MiscExtSetMouseDevice(pointer mouse, char* device);
Bool MiscExtGetFilePaths(const char **configfile, const char **modulepath,
const char **logfile);
+int MiscExtPassMessage(int scrn, const char *msgtype, const char *msgval,
+ char **retstr);
#endif
diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
index f9882f2f1..f4751a1c7 100644
--- a/hw/xfree86/dixmods/extmod/xf86vmode.c
+++ b/hw/xfree86/dixmods/extmod/xf86vmode.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/Xext/xf86vmode.c,v 3.54 2002/12/22 00:46:51 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/Xext/xf86vmode.c,v 3.59 2003/11/17 22:20:27 dawes Exp $ */
/*
@@ -64,9 +64,7 @@ typedef struct {
#define VMPRIV(c) ((c)->devPrivates[VidModeClientPrivateIndex].ptr)
static void XF86VidModeResetProc(
-#if NeedFunctionPrototypes
ExtensionEntry* /* extEntry */
-#endif
);
static DISPATCH_PROC(ProcXF86VidModeDispatch);
@@ -112,8 +110,9 @@ static DISPATCH_PROC(SProcXF86VidModeGetGammaRamp);
static DISPATCH_PROC(SProcXF86VidModeSetGammaRamp);
static DISPATCH_PROC(SProcXF86VidModeGetGammaRampSize);
+#if 0
static unsigned char XF86VidModeReqCode = 0;
-
+#endif
/* The XF86VIDMODE_EVENTS code is far from complete */
@@ -217,7 +216,9 @@ XFree86VidModeExtensionInit(void)
SProcXF86VidModeDispatch,
XF86VidModeResetProc,
StandardMinorOpcode))) {
+#if 0
XF86VidModeReqCode = (unsigned char)extEntry->base;
+#endif
VidModeErrorBase = extEntry->errorBase;
#ifdef XF86VIDMODE_EVENTS
XF86VidModeEventBase = extEntry->eventBase;
@@ -467,14 +468,14 @@ ProcXF86VidModeGetModeLine(ClientPtr client)
rep.flags = VidModeGetModeValue(mode, VIDMODE_FLAGS);
if (xf86GetVerbosity() > 1) {
- ErrorF("GetModeLine - scrn: %d clock: %d\n",
- stuff->screen, rep.dotclock);
+ ErrorF("GetModeLine - scrn: %d clock: %ld\n",
+ stuff->screen, (unsigned long)rep.dotclock);
ErrorF("GetModeLine - hdsp: %d hbeg: %d hend: %d httl: %d\n",
rep.hdisplay, rep.hsyncstart,
rep.hsyncend, rep.htotal);
- ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %d\n",
+ ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n",
rep.vdisplay, rep.vsyncstart, rep.vsyncend,
- rep.vtotal, rep.flags);
+ rep.vtotal, (unsigned long)rep.flags);
}
/*
@@ -675,22 +676,23 @@ ProcXF86VidModeAddModeLine(ClientPtr client)
stuff->after_flags = oldstuff->after_flags;
}
if (xf86GetVerbosity() > 1) {
- ErrorF("AddModeLine - scrn: %d clock: %d\n",
- stuff->screen, stuff->dotclock);
+ ErrorF("AddModeLine - scrn: %d clock: %ld\n",
+ (int)stuff->screen, (unsigned long)stuff->dotclock);
ErrorF("AddModeLine - hdsp: %d hbeg: %d hend: %d httl: %d\n",
stuff->hdisplay, stuff->hsyncstart,
stuff->hsyncend, stuff->htotal);
- ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %d\n",
+ ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n",
stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend,
- stuff->vtotal, stuff->flags);
- ErrorF(" after - scrn: %d clock: %d\n",
- stuff->screen, stuff->after_dotclock);
+ stuff->vtotal, (unsigned long)stuff->flags);
+ ErrorF(" after - scrn: %d clock: %ld\n",
+ (int)stuff->screen, (unsigned long)stuff->after_dotclock);
ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n",
stuff->after_hdisplay, stuff->after_hsyncstart,
stuff->after_hsyncend, stuff->after_htotal);
- ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %d\n",
+ ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n",
stuff->after_vdisplay, stuff->after_vsyncstart,
- stuff->after_vsyncend, stuff->after_vtotal, stuff->after_flags);
+ stuff->after_vsyncend, stuff->after_vtotal,
+ (unsigned long)stuff->after_flags);
}
if (ver < 2) {
@@ -742,6 +744,7 @@ ProcXF86VidModeAddModeLine(ClientPtr client)
if (mode == NULL)
return BadValue;
+ VidModeSetModeValue(mode, VIDMODE_CLOCK, stuff->dotclock);
VidModeSetModeValue(mode, VIDMODE_H_DISPLAY, stuff->hdisplay);
VidModeSetModeValue(mode, VIDMODE_H_SYNCSTART, stuff->hsyncstart);
VidModeSetModeValue(mode, VIDMODE_H_SYNCEND, stuff->hsyncend);
@@ -821,14 +824,14 @@ ProcXF86VidModeDeleteModeLine(ClientPtr client)
stuff->privsize = oldstuff->privsize;
}
if (xf86GetVerbosity() > 1) {
- ErrorF("DeleteModeLine - scrn: %d clock: %d\n",
- stuff->screen, stuff->dotclock, stuff->dotclock);
+ ErrorF("DeleteModeLine - scrn: %d clock: %ld\n",
+ (int)stuff->screen, (unsigned long)stuff->dotclock);
ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n",
stuff->hdisplay, stuff->hsyncstart,
stuff->hsyncend, stuff->htotal);
- ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %d\n",
+ ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n",
stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend,
- stuff->vtotal, stuff->flags);
+ stuff->vtotal, (unsigned long)stuff->flags);
}
if (ver < 2) {
@@ -840,8 +843,11 @@ ProcXF86VidModeDeleteModeLine(ClientPtr client)
}
if (len != stuff->privsize) {
if (xf86GetVerbosity() > 1) {
- ErrorF("req_len = %d, sizeof(Req) = %d, privsize = %d, len = %d, length = %d\n",
- client->req_len, sizeof(xXF86VidModeDeleteModeLineReq)>>2, stuff->privsize, len, stuff->length);
+ ErrorF("req_len = %ld, sizeof(Req) = %d, privsize = %ld, "
+ "len = %d, length = %d\n",
+ (unsigned long)client->req_len,
+ (int)sizeof(xXF86VidModeDeleteModeLineReq)>>2,
+ (unsigned long)stuff->privsize, len, stuff->length);
}
return BadLength;
}
@@ -935,11 +941,11 @@ ProcXF86VidModeModModeLine(ClientPtr client)
}
if (xf86GetVerbosity() > 1) {
ErrorF("ModModeLine - scrn: %d hdsp: %d hbeg: %d hend: %d httl: %d\n",
- stuff->screen, stuff->hdisplay, stuff->hsyncstart,
+ (int)stuff->screen, stuff->hdisplay, stuff->hsyncstart,
stuff->hsyncend, stuff->htotal);
- ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %d\n",
+ ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n",
stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend,
- stuff->vtotal, stuff->flags);
+ stuff->vtotal, (unsigned long)stuff->flags);
}
if (ver < 2) {
@@ -989,18 +995,23 @@ ProcXF86VidModeModModeLine(ClientPtr client)
break;
case MODE_HSYNC:
case MODE_H_ILLEGAL:
+ xfree(modetmp);
return VidModeErrorBase + XF86VidModeBadHTimings;
case MODE_VSYNC:
case MODE_V_ILLEGAL:
+ xfree(modetmp);
return VidModeErrorBase + XF86VidModeBadVTimings;
default:
+ xfree(modetmp);
return VidModeErrorBase + XF86VidModeModeUnsuitable;
}
/* Check that the driver is happy with the mode */
if (VidModeCheckModeForDriver(stuff->screen, modetmp) != MODE_OK) {
+ xfree(modetmp);
return VidModeErrorBase + XF86VidModeModeUnsuitable;
}
+ xfree(modetmp);
VidModeSetModeValue(mode, VIDMODE_H_DISPLAY, stuff->hdisplay);
VidModeSetModeValue(mode, VIDMODE_H_SYNCSTART, stuff->hsyncstart);
@@ -1029,7 +1040,7 @@ ProcXF86VidModeValidateModeLine(ClientPtr client)
(xXF86OldVidModeValidateModeLineReq *)client->requestBuffer;
xXF86VidModeValidateModeLineReq newstuff;
xXF86VidModeValidateModeLineReply rep;
- pointer mode, modetmp;
+ pointer mode, modetmp = NULL;
int len, status, dotClock;
int ver;
@@ -1055,14 +1066,14 @@ ProcXF86VidModeValidateModeLine(ClientPtr client)
stuff->privsize = oldstuff->privsize;
}
if (xf86GetVerbosity() > 1) {
- ErrorF("ValidateModeLine - scrn: %d clock: %d\n",
- stuff->screen, stuff->dotclock);
+ ErrorF("ValidateModeLine - scrn: %d clock: %ld\n",
+ (int)stuff->screen, (unsigned long)stuff->dotclock);
ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n",
stuff->hdisplay, stuff->hsyncstart,
stuff->hsyncend, stuff->htotal);
- ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %d\n",
+ ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n",
stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend,
- stuff->vtotal, stuff->flags);
+ stuff->vtotal, (unsigned long)stuff->flags);
}
if (ver < 2) {
@@ -1119,6 +1130,9 @@ ProcXF86VidModeValidateModeLine(ClientPtr client)
status = VidModeCheckModeForDriver(stuff->screen, modetmp);
status_reply:
+ if(modetmp)
+ xfree(modetmp);
+
rep.type = X_Reply;
rep.length = (SIZEOF(xXF86VidModeValidateModeLineReply)
- SIZEOF(xGenericReply)) >> 2;
@@ -1186,14 +1200,14 @@ ProcXF86VidModeSwitchToMode(ClientPtr client)
stuff->privsize = oldstuff->privsize;
}
if (xf86GetVerbosity() > 1) {
- ErrorF("SwitchToMode - scrn: %d clock: %d\n",
- stuff->screen, stuff->dotclock);
+ ErrorF("SwitchToMode - scrn: %d clock: %ld\n",
+ (int)stuff->screen, (unsigned long)stuff->dotclock);
ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n",
stuff->hdisplay, stuff->hsyncstart,
stuff->hsyncend, stuff->htotal);
- ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %d\n",
+ ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n",
stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend,
- stuff->vtotal, stuff->flags);
+ stuff->vtotal, (unsigned long)stuff->flags);
}
if (ver < 2) {
diff --git a/hw/xfree86/dixmods/ftmodule.c b/hw/xfree86/dixmods/ftmodule.c
index e44c94984..ceb5485c0 100644
--- a/hw/xfree86/dixmods/ftmodule.c
+++ b/hw/xfree86/dixmods/ftmodule.c
@@ -23,7 +23,7 @@
* dealings in this Software without prior written authorization from the
* XFree86 Project.
*/
-/* $XFree86: xc/lib/font/FreeType/module/ftmodule.c,v 1.14 2003/02/13 03:01:45 dawes Exp $ */
+/* $XFree86: xc/lib/font/FreeType/module/ftmodule.c,v 1.18 2003/11/02 04:30:57 dawes Exp $ */
#include "misc.h"
@@ -40,11 +40,11 @@ static MODULESETUPPROTO(freetypeSetup);
static XF86ModuleVersionInfo VersRec =
{
"freetype",
- MODULEVENDORSTRING,
+ MODULEVENDORSTRING " & the After X-TT Project",
MODINFOSTRING1,
MODINFOSTRING2,
XF86_VERSION_CURRENT,
- 2, 0, 2,
+ 2, 1, 0,
ABI_CLASS_FONT, /* Font module */
ABI_FONT_VERSION,
MOD_CLASS_FONT,
diff --git a/hw/xfree86/dixmods/glxmodule.c b/hw/xfree86/dixmods/glxmodule.c
index 513bb7647..f449d55ec 100644
--- a/hw/xfree86/dixmods/glxmodule.c
+++ b/hw/xfree86/dixmods/glxmodule.c
@@ -25,7 +25,7 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
-/* $XFree86: xc/programs/Xserver/GL/glxmodule.c,v 1.11 2001/06/15 21:22:38 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/glxmodule.c,v 1.12 2003/09/28 20:15:40 alanh Exp $ */
/*
* Authors:
@@ -104,6 +104,7 @@ static const char *glcoreSymbols[] = {
"__glLightiv_size",
"__glMaterialfv_size",
"__glMaterialiv_size",
+ "__glPointParameterfvARB_size",
"__glReadPixels_size",
"__glTexEnvfv_size",
"__glTexEnviv_size",
@@ -146,6 +147,7 @@ static const char *glcoreSymbols[] = {
"__glXDestroyContext",
"__glXDestroyGLXPixmap",
"__glXDispSwap_Accum",
+ "__glXDispSwap_ActiveStencilFaceEXT",
"__glXDispSwap_ActiveTextureARB",
"__glXDispSwap_AlphaFunc",
"__glXDispSwap_AreTexturesResident",
@@ -357,6 +359,8 @@ static const char *glcoreSymbols[] = {
"__glXDispSwap_PixelTransferf",
"__glXDispSwap_PixelTransferi",
"__glXDispSwap_PixelZoom",
+ "__glXDispSwap_PointParameterfARB",
+ "__glXDispSwap_PointParameterfvARB",
"__glXDispSwap_PointSize",
"__glXDispSwap_PolygonMode",
"__glXDispSwap_PolygonOffset",
@@ -451,7 +455,9 @@ static const char *glcoreSymbols[] = {
"__glXDispSwap_Vertex4iv",
"__glXDispSwap_Vertex4sv",
"__glXDispSwap_Viewport",
+ "__glXDispSwap_WindowPos3fARB",
"__glXDisp_Accum",
+ "__glXDisp_ActiveStencilFaceEXT",
"__glXDisp_ActiveTextureARB",
"__glXDisp_AlphaFunc",
"__glXDisp_AreTexturesResident",
@@ -663,6 +669,8 @@ static const char *glcoreSymbols[] = {
"__glXDisp_PixelTransferf",
"__glXDisp_PixelTransferi",
"__glXDisp_PixelZoom",
+ "__glXDisp_PointParameterfARB",
+ "__glXDisp_PointParameterfvARB",
"__glXDisp_PointSize",
"__glXDisp_PolygonMode",
"__glXDisp_PolygonOffset",
@@ -757,6 +765,7 @@ static const char *glcoreSymbols[] = {
"__glXDisp_Vertex4iv",
"__glXDisp_Vertex4sv",
"__glXDisp_Viewport",
+ "__glXDisp_WindowPos3fARB",
"__glXDrawArraysSize",
"__glXDrawPixelsReqSize",
"__glXDrawableRes",
@@ -886,6 +895,7 @@ static const char *glcoreSymbols[] = {
"__glXWaitX",
"__glXcombine_strings",
"glAccum",
+ "glActiveStencilFaceEXT",
"glActiveTextureARB",
"glAlphaFunc",
"glAreTexturesResident",
@@ -1102,6 +1112,8 @@ static const char *glcoreSymbols[] = {
"glPixelTransferf",
"glPixelTransferi",
"glPixelZoom",
+ "glPointParameterfARB",
+ "glPointParameterfvARB",
"glPointSize",
"glPolygonMode",
"glPolygonOffset",
@@ -1198,6 +1210,7 @@ static const char *glcoreSymbols[] = {
"glVertex4sv",
"glVertexPointer",
"glViewport",
+ "glWindowPos3fARB",
"glxSwapQueryExtensionsStringReply",
"glxSwapQueryServerStringReply",
NULL
diff --git a/hw/xfree86/doc/README.DRI b/hw/xfree86/doc/README.DRI
index 66a5a5ff8..e663f2928 100644
--- a/hw/xfree86/doc/README.DRI
+++ b/hw/xfree86/doc/README.DRI
@@ -1251,7 +1251,7 @@ demo programs is available from http://dri.sourceforge.net/res.phtml
o In the future there may be IHV and Linux vendor support resources for
the DRI.
- Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DRI.sgml,v 1.29 2003/02/17 03:57:29 dawes Exp $
+ Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DRI.sgml,v 1.29 dawes Exp $
-$XFree86: xc/programs/Xserver/hw/xfree86/doc/README.DRI,v 1.21 2003/02/17 04:04:07 dawes Exp $
+$XFree86: xc/programs/Xserver/hw/xfree86/doc/README.DRI,v 1.22 2003/07/15 02:28:28 dawes Exp $
diff --git a/hw/xfree86/doc/README.fonts b/hw/xfree86/doc/README.fonts
index fb1c1f5fb..7563c1c56 100644
--- a/hw/xfree86/doc/README.fonts
+++ b/hw/xfree86/doc/README.fonts
@@ -2,7 +2,7 @@
Juliusz Chroboczek, <jch@xfree86.org>
- 17 January 2003
+ 17 November 2003
1. Introduction
@@ -16,8 +16,8 @@ this document for background information.
1.1 Two font systems
-XFree86 includes two font systems: the core X11 fonts system, which is pre-
-sent in all implementations of X11, and the Xft fonts system, which is not
+XFree86 includes two font systems: the core X11 fonts system, which is
+present in all implementations of X11, and the Xft fonts system, which is not
currently distributed with implementations of X11 that are not based on
XFree86 but will hopefully be included by them in the future
@@ -596,7 +596,7 @@ Please note: the X-TrueType (X-TT) backend does not use the fontenc layer,
but instead uses its own method for font reencoding. If you are only inter-
ested in X-TT you may want to skip to Using Symbol Fonts (section 4.1.5, page
1), as the intervening information does not apply to X-TT. X-TT itself is
-described in more detail in X-TrueType (section 4.2.3, page 1).
+described in more detail in X-TrueType (section 4.2.2, page 1).
In the fontenc layer, an encoding is defined by a name (such as iso8859-1),
possibly a number of aliases (alternate names), and an ordered collection of
@@ -926,75 +926,111 @@ more precisely described in the mkfontdir(1) manual page.
4.2 Additional notes about scalable core fonts
-The FreeType backend (module `freetype', formerly known as xfsft) is able to
-deal with both TrueType and Type 1 fonts. This puts it in conflict with the
-X-TT and Type 1 backends respectively.
+The FreeType (libfreetype-xtt2) backend (module `freetype', formerly known as
+xfsft) is able to deal with both TrueType and Type 1 fonts. This puts it in
+conflict with the X-TT and Type 1 backends respectively.
If both the FreeType and the Type 1 backends are loaded, the FreeType backend
will be used for Type 1 fonts. If both the FreeType and X-TT backends are
loaded, X-TT will be used for TrueType fonts.
-4.2.1 Delayed glyph rasterisation
+4.2.1 About the FreeType backend
-Both FreeType and X-TT delay glyph rasterisation up to the time at which a
-glyph is first used. For this reason, they only provide an approximate value
-for the ``average width'' font property.
+The FreeType (libfreetype-xtt2) backend (formerly xfsft) is a backend based
+on version 2 of the FreeType library (see the FreeType web site
+<URL:http://www.freetype.org/>) and has the X-TT functionalities for CJKV
+support provided by the After X-TT Project (see the After X-TT Project web
+site <URL:http://x-tt.sourceforge.jp/>). The FreeType module has support for
+the ``fontenc'' style of internationalisation (see The fontenc layer (section
+4.1.1, page 1)). This backend supports TrueType font files (`*.ttf'), Open-
+Type font files (`*.otf'), TrueType Collections (`*.ttc'), OpenType Collec-
+tions (`*.otc') and Type 1 font files (`*.pfa' and `*.pfb').
-Both backends also support an optimisation for character-cell fonts (fonts
-with all glyph metrics equal, or terminal fonts). A font with an XLFD speci-
-fying a character-cell spacing `c', as in
+In order to access the faces in a TrueType Collection file, the face number
+must be specified in the fonts.dir file before the filename, within a pair of
+colons, or by setting the 'fn' TTCap option. For example,
- -misc-mincho-medium-r-normal--0-0-0-0-c-0-jisx0208.1990-0
+ :1:mincho.ttc -misc-pmincho-medium-r-normal--0-0-0-0-p-0-jisx0208.1990-0
-will not rasterise glyphs at metrics computation time, but instead trust the
-font really to be a character-cell font. You are encouraged to make use of
-this optimisation when useful, but be warned that not all monospaced fonts
-are character-cell fonts.
+refers to face 1 in the `mincho.ttc' TrueType Collection file.
-4.2.2 About the FreeType backend
+The new FreeType backend supports the extended `fonts.dir' syntax introduced
+by X-TrueType with a number of options, collectively known as `TTCap'. A
+`TTCap' entry follows the general syntax
-The FreeType backend (formerly xfsft) is a backend based on version 2 of the
-FreeType library (see the FreeType web site <URL:http://www.freetype.org/>)
-and has support for the ``fontenc'' style of internationalisation (see The
-fontenc layer (section 4.1.1, page 1)). This backend supports TrueType font
-files (`*.ttf'), OpenType font files (`*.otf'), TrueType Collections
-(`*.ttc'), OpenType Collections (`*.otc') and Type 1 font files (`*.pfa' and
-`*.pfb').
+ option=value:
-In order to access the faces in a TrueType Collection file, the face number
-must be specified in the fonts.dir file before the filename within colons.
-For example,
+and should be specified before the filename. The new FreeType almost per-
+fectly supports TTCap options that are compatible with X-TT 1.4. The Auto-
+matic Italic (`ai'), Double Strike (`ds') and Bounding box Width (`bw')
+options are indispensable in CJKV. For example,
- :2:mincho.ttc -misc-mincho-medium-r-normal--0-0-0-0-c-0-jisx0208.1990-0
+ mincho.ttc -misc-mincho-medium-r-normal--0-0-0-0-c-0-jisx0208.1990-0
+ ds=y:mincho.ttc -misc-mincho-bold-r-normal--0-0-0-0-c-0-jisx0208.1990-0
+ ai=0.2:mincho.ttc -misc-mincho-medium-i-normal--0-0-0-0-c-0-jisx0208.1990-0
+ ds=y:ai=0.2:mincho.ttc -misc-mincho-bold-i-normal--0-0-0-0-c-0-jisx0208.1990-0
+ bw=0.5:mincho.ttc -misc-mincho-medium-r-normal--0-0-0-0-c-0-jisx0201.1976-0
+ bw=0.5:ds=y:mincho.ttc -misc-mincho-bold-r-normal--0-0-0-0-c-0-jisx0201.1976-0
+ bw=0.5:ai=0.2:mincho.ttc -misc-mincho-medium-i-normal--0-0-0-0-c-0-jisx0201.1976-0
+ bw=0.5:ds=y:ai=0.2:mincho.ttc -misc-mincho-bold-i-normal--0-0-0-0-c-0-jisx0201.1976-0
-refers to face 2 in the `mincho.ttc' TrueType Collection file.
+setup the complete combination of jisx0208 and jisx0201 using mincho.ttc
+only. More information on the TTCap syntax is found on the After X-TT
+Project page <URL:http://x-tt.sourceforge.jp/>.
The FreeType backend uses the fontenc layer in order to support recoding of
fonts; this was described in The fontenc layer (section 4.1.1, page 1) and
especially FreeType-specific notes about fontenc (section 4.1.2.1, page 1)
earlier in this document.
-4.2.3 About the X-TrueType TrueType backend
+4.2.2 About the X-TrueType TrueType backend
The `X-TrueType' backend is a backend based on version 1 of the FreeType
library. X-TrueType doesn't use the `fontenc' layer for managing font encod-
-ings, but instead uses its own database of encodings.
-
-X-TrueType extends the `fonts.dir' syntax with a number of options, collec-
-tively known as `TTCap'. A `TTCap' entry follows the general syntax
+ings, but instead uses its own database of encodings. Since the functionali-
+ties for CJKV support introduced by X-TT have been merged into the new
+FreeType backend, the X-TT backend will be removed from XFree86's tree near
+the future. Therefore, the use of FreeType backend is preferred over the X-
+TT backend. General information on X-TrueType may be found at ."
+
+4.2.3 Delayed glyph rasterisation
+
+When loading a large character set, the old FreeType delayed glyph rasterisa-
+tion until the time at which the glyph was first used. The new FreeType
+(libfreetype-xtt2) has an improved `very lazy' metric calculation method to
+speed up the process when loading TrueType or OpenType fonts. Although the
+X-TT module also has this method, the "vl=y" TTCap option must be set if you
+want to use it. This is the default method for FreeType when it loads multi-
+byte fonts. Even if you use a unicode font which has tens of thousands of
+glyphs, this delay will not be worrisome as long as you use the new FreeType
+backend -- its `very lazy' method is super-fast.
+
+The maximum error of bitmap position using `very lazy' method is 1 pixel, and
+is the same as that of a character-cell spacing. When the X-TT backend is
+used with the `vl=y' option, a chipped bitmap is displayed with certain
+fonts. However, the new FreeType backend has minimal problem with this,
+since it corrects left- and right-side bearings using `italicAngle' in the
+TrueType/OpenType post table, and does automatic correction of bitmap posi-
+tions when rasterisation so that chipped bitmaps are not displayed. Never-
+theless if you don't want to use the `very lazy' method when using multi-
+bytes fonts, set `vl=n' in the TTCap option to disable it:
+
+ vl=n:luxirr.ttf -b&h-Luxi Serif-medium-r-normal--0-0-0-0-p-0-iso10646-1
+
+Of course, both backends also support an optimisation for character-cell
+fonts (fonts with all glyph metrics equal, or terminal fonts). A font with
+an XLFD specifying a character-cell spacing `c', as in
- :option=value:
-
-and should be specified before the filename.
+ -misc-mincho-medium-r-normal--0-0-0-0-c-0-jisx0208.1990-0
-The most useful TTCap option is used to specify the face number to use with
-TTCs; this is the `fn' TTCap option. For example, face 2 of font file `min-
-cho.ttc' is specified using:
+or
- :fn=2:mincho.ttc -misc-mincho-medium-r-normal--0-0-0-0-c-0-jisx0208.1990-0
+ fs=c:mincho.ttc -misc-mincho-medium-r-normal--0-0-0-0-p-0-jisx0208.1990-0
-More information on the TTCap syntax, and on X-TrueType in general, may be
-found on the X-TrueType home page <URL:http://x-tt.dsl.gr.jp/>.
+will not compute the metric for each glyph, but instead trust the font to be
+a character-cell font. You are encouraged to make use of this optimisation
+when useful, but be warned that not all monospaced fonts are character-cell
+fonts.
5. Appendix: background and terminology
@@ -1126,8 +1162,8 @@ The author's software pages <URL:http://www.pps.jussieu.fr/~jch/software/>
might or might not contain related scribbles and development versions of
software.
-The documentation of X-TrueType is available from the X-TrueType home page
-<URL:http://x-tt.dsl.gr.jp/>.
+The documentation of X-TrueType is available from the After X-TT Project page
+<URL:http://x-tt.sourceforge.jp/>.
A number of East-Asian CIDFonts are available from O'Reilly's FTP site
<URL:ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/>.
@@ -1140,7 +1176,7 @@ The IANA RFC documents, available from a number of sites throughout the
world, often provide interesting information about character set issues; see
for example RFC 373.
- Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/fonts.sgml,v 1.20 2003/01/20 03:43:07 dawes Exp $
+ Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/fonts.sgml,v 1.22 dawes Exp $
-$XFree86: xc/programs/Xserver/hw/xfree86/doc/README.fonts,v 1.22 2003/01/20 04:10:01 dawes Exp $
+$XFree86: xc/programs/Xserver/hw/xfree86/doc/README.fonts,v 1.26 2003/11/19 01:44:58 dawes Exp $
diff --git a/hw/xfree86/doc/changelogs/CHANGELOG b/hw/xfree86/doc/changelogs/CHANGELOG
index 732330eec..78f7f2e84 100644
--- a/hw/xfree86/doc/changelogs/CHANGELOG
+++ b/hw/xfree86/doc/changelogs/CHANGELOG
@@ -1,46 +1,1696 @@
-XFree86 4.3.0.2 (xx May 2003)
+XFree86 4.3.99.17 (xx November 2003)
+
+XFree86 4.3.99.16 (20 November 2003)
+ 609. Fix 'constype' for modern framebuffers on Solaris (Bugzilla #890,
+ Alan Coopersmith).
+ 608. Fix a thread deadlock problem in libXp (Bugzilla #887, Roland Mainz).
+ 607. Fix event buffer overrun in the wacom driver (Bugzilla #882, David Dawes,
+ reported by Jonathan Hough).
+ 606. Add unmapping code to DGAUnmapPhysical() for most systems that use
+ mmap(). Without this lots of map/unmap calls would result in running
+ out of address space and/or file handles (Bugzilla #880, David Dawes,
+ reported by Eckhard Neber).
+ 605. Restore the Windows keycodes in the 'xfree86' XKB keycodes map,
+ and add the Solaris-compatible tokens as aliases (reported by
+ Panagiotis Papadakos).
+ 604. Fix some problems building against external installations of
+ freetype2 (David Dawes).
+ 603. Add font bounds checking to the X server side of the font server
+ interface (Chisato Yamauchi, David Dawes).
+ 602. Fix ForcePCIMode option to work as advertised in Radeon driver
+ (Bugzilla #850, Kevin Martin).
+ 601. Update the fonts document for the FreeType backend changes
+ (Chisato Yamauchi, Reiko Nakajima, After X-TT Project).
+ 600. Don't allow the lack of "SUPERSCRIPT TWO" to prevent Adobe Standard
+ Cyrillic encoded fonts from being accepted as "koi8" capable
+ (Michail Vidiassov).
+ 599. Xvfb didn't have enough pixmap formats for Render (David Dawes).
+ 598. Fix the processing of xdm/config/Xres.cpp, which is broken with
+ gcc 3.3.2 (reported by Chisato Yamauchi).
+ 597. Fix two problems with Xvfb:
+ - Too much memory was allocated because of a confusion between
+ bytes and pixels.
+ - The XWD header was corrupted at server reset.
+ (David Dawes).
+ 596. Fix several problems xwud has displaying TrueColor dumps (extreme
+ slowness displaying on TrueColor visuals, and incorrectness displaying
+ on DirectColor visuals) (David Dawes).
+ 595. Rank TrueColor above DirectColor in xwud. This avoids colourmap flashing
+ by default when running on a server with both visuals available
+ (David Dawes).
+ 594. Build with Xplugin support by default on Panther (Torrey T. Lyons).
+ 593. On Mac OS X, allow "X -version" to work without connecting to
+ CoreGraphics (Torrey T. Lyons, reported by Benjamin Reed).
+ 592. Don't optimize away window restacks in rootless mode (John Harper).
+ 591. Fix problems preventing mesa-based GLX from working with Xnest, even
+ though it is linked in and advertised (David Dawes).
+ 590. Fix typing in XDarwin Preference panel going to X11 (Torrey T. Lyons).
+ 589. Fix rootless build after REGION_* macro rework (Torrey T. Lyons).
+ 588. Fix broken GLX indirect rendering (David Dawes).
+ 587. Fix the XKB definitions for the "Hiragana_Katakana" key, and fix
+ some incorrect definitions in symbols/jp (Chisato Yamauchi).
+ 586. Change the mkfontdir wrapper script to invoke mkfontscale via its full
+ path name (Chisato Yamauchi).
+ 585. Modify xf86config and xf86cfg to enable loading the "freetype" module
+ (Chisato Yamauchi).
+ 584. Wrap ucs2any with ProgramTargetName in dependencies, as needed for
+ OS/2, and note that OS/2 doesn't have basename(3) (Bugzilla #871,
+ Frank Giessler).
+ 583. Fix atimisc's decoding of the mode on input for large panels
+ (Marc La France).
+ 582. Fix SEGV when ATIPreinit() fails (Marc La France).
+ 581. In rootless XDarwin, don't send ButtonPress events when clicking in
+ non-X11 windows (Torrey T. Lyons, John Harper).
+ 580. AppleWM compatibility fixes:
+ - Disable XDarwin handling cut and paste if AppleWM-aware cut and
+ paste manager is available.
+ - Set _NATIVE_SCREEN_ORIGIN property on root window.
+ (John Harper, Torrey T. Lyons).
+ 579. Change ProjectRoot from /XFree86 to /usr/X11R6 on OS/2 (Bugzilla #865,
+ Frank Giessler).
+ 578. Fix building of new Mesa on OS/2 (Bugzilla #865, Frank Giessler).
+ 577. Change the way how libraries with long file names are handed on
+ OS/2 (Bugzilla #865, Frank Giessler).
+ 576. Force screen blanking when entering DPMS states (Bugzilla #866,
+ David Dawes, reported by Ed Fardos).
+ 575. XDarwin fixes/cleanups:
+ - Handle X11 executables opened from the Finder.
+ - Use xcodebuild instead of pbxbuild on Panther.
+ - Clean up Darwin specific imake #defines.
+ - Fix compiler warnings on Panther.
+ (Torrey T. Lyons).
+ 574. A workaround for platforms (like *BSD) where IPv6 sockets don't accept
+ IPv4 connections: disable IPv6 XDMCP code by default. This allows IPv4
+ XDMCP to work on such platforms (David Dawes).
+ 573. Rework REGION_* macros to eliminate NEED_SCREEN_REGIONS build failures
+ (Marc La France).
+ 572. Fix an old bug in the X server and xfs related to usage of
+ c->savedName (Bugzilla #818, Owen Taylor).
+ 571. Fix FontFileListOneFontWithInfo() so that it handles aliases in the
+ same was as FontFileOpenFont() (Bugzilla #818, Owen Taylor).
+ 570. Respect USE_SSE_ASM for the .S files in the r200 and radeon 3D drivers.
+ This should fix the reported OpenBSD build problem (David Dawes).
+ 569. Some missing FreeBSD AMD64/Sparc64 patches (Bugzilla #786, Eric Anholt).
+ 568. The call to xf86RandRSetMode() from xf86RandRCreateScreenResources()
+ doesn't appear to be necessary. Removing it restores the documented
+ ViewPort behaviour when RandR is enabled (David Dawes).
+ 567. Make the vesa driver blank the screen during initialisation for
+ cosmetic reasons (David Dawes).
+ 566. Make the cirrus driver blank the screen during initialisation for
+ cosmetic reaons (most other drivers do this) (Bugzilla #781,
+ Nicholas Miell).
+ 565. The vesa driver wasn't setting the viewport correctly either at
+ ScreenInit or EnterVT (David Dawes).
+ 564. Fix the viewport initialisation. The ViewPort parameters from the
+ XF86Config file were being ignored, and the default was a 0,0 viewport
+ rather than centred on the virtual screen as documented. When RandR
+ is enabled, it undoes all of this though... (David Dawes).
+ 563. Fix an off-by-one bug in libXcursor that can result in segfaulting
+ applications (David Dawes, reported by Agustin Gianni).
+ 562. Fix RandR initialization problem when default screen resolution is
+ different from the virtual resolution. (Bugzilla #853, Bob Paauwe).
+ 561. Fix an Xv problem with the via driver where updating a portion of the
+ overlay causes excessive CPU usage (Bugzilla #821, Neil Terry).
+ 560. Fix an Xnest hang on OS/2 (Bugzilla #852, Frank Giessler).
+ 559. OS/2 update for the recent move to building most libraries shared,
+ and add some functions to the export lists for freetype and Xt for
+ compatibility with older applications (Bugzilla #852, Frank Giessler).
+ 558. Fix the installation location of the XRes and Xss manpage aliases
+ (Bugzilla #848, ISHIKAWA Mutsumi).
+ 557. Include backwards compatibility API for renamed stream functions in
+ Freetype2 library (Torrey T. Lyons).
+ 556. Fix acecad driver to call xf86DeleteInput() (Bugzilla #855, S. Voltz).
+ 555. Register to handle X11 executables on Panther (John Harper).
+ 554. Fixes for GLX on Mac OS X:
+ - Make libGL not export libGLU symbols.
+ - Fix uninitialized mutex for threaded direct GLX.
+ (John Harper).
+ 553. Fix "Non-aligned pointer being freed" warnings on XDarwin startup
+ (Torrey T. Lyons).
+ 552. Miscellaneous fixes for Panther:
+ - Fix spurious #pragma getting inserted by cpp (Martin Costabel).
+ - Fix startup failure due to bad keymapping file (Torrey T. Lyons).
+ - Fix startup warning about missing semicolons (Torrey T. Lyons).
+ 551. Mesa X86 asm build fix for Solaris (David Dawes).
+ 550. Fix building libOSMesa on Darwin (Torrey T. Lyons).
+ 549. Get backlight working on Apple's GeForce4 powerbooks (Guido Guenther).
+
+XFree86 4.3.99.15 ( 1 November 2003)
+ 548. Update libfreetype-xtt2 to version 1.1:
+ - Improved the very lazy method. To prevent displaying chipped bitmap
+ when having italic angle, the lsb and rsb are adjusted by using
+ italicAngle in post table.
+ - Added automatic correction of bitmap position for preventing
+ displaying chipped bitmap when using charcell or very lazy method.
+ - Set DEFAULT_VERY_LAZY macro. If post table is available, the very
+ lazy method is used as default when handling multi-bytes fonts.
+ - Added additional glyphs(0x2d21-0x2d7c) to jisx0208.1990-0.enc.
+ (Chisato Yamauchi, After X-TT Project).
+ 547. Set the pixel clock limit above which hzoom is enabled for the video
+ overlay for G450 and G550 cards to 234MHz. This fixes a problem with
+ the Xv support having half horizontal resolution (Michel Lespinasse).
+ 546. Add support on Mac OS X for building keymap using Carbon Keyboard
+ Layout API (John Harper).
+ 545. Map holes in kdrive VESA driver (#5436, Juliusz Chroboczek).
+ 544. Add option to Radeon driver to allow minimum dot clock to be
+ overridden (Bugzilla #831, Nils Philippsen).
+ 543. Add shared libraries run-path information to pkg-config datafiles
+ provided for some libraries. (Bugzilla #832, Frederick Bruckman,
+ Matthieu Herrb).
+ 542. Fix buglets detected by SGI compiler in neomagic, sis and tseng drivers
+ (Marc La France).
+ 541. Fix I/O alignment in mga and via drivers (Marc La France).
+ 540. Improve xkbcomp's key types auto-recognition (Ivan Pascal).
+ 539. Add support for multi-threaded direct GLX rendering with AppleDRI
+ (John Harper).
+ 538. Fix a problem in Xlib that was cause by the ANSI prototype cleanups
+ (Bugzilla #839, Owen Taylor).
+ 537. Limit the rate of duplicate audit messages in the X server. (Matthieu
+ Herrb, David Dawes).
+ 536. Fix ChipValidMode() return type (Marc La France).
+ 535. Fix for AGP8x support on HP zx1-based systems (Marc La France).
+ 534. Workaround for mysterious segfault related to mkfontscale's use of
+ memcmp() (Marc La France).
+ 533. Support the new Linear allocator in the trident driver and make the
+ hardware cursor use it. Xv automagically uses it. (Alan Hourihane).
+ 532. Fix acecad input driver build and re-enable it
+ (Bugzilla #816, Alan Hourihane).
+ 531. Fix DRM_CAS on ia64 as used by the DRI (Bugzilla #778, John Dennis).
+ 530. Call OsCleanup() at the end of each server generation, and add an
+ argument to indicate when the server is terminating. This allows
+ misc end-of-generation cleanups to be added to OsCleanup() (David Dawes).
+ 529. Explicitly free the DPMS and ScreenSaver timer resources at the end
+ of each server generation (David Dawes).
+ 528. Cygwin configuration updates and install script updates (Bugzilla #799,
+ 805, Harold L Hunt II, Alexander Gottwald)
+ 527. Build shared libraries for Xt and Xaw on Cygwin. (Bugzilla #804,
+ Ralf Habacker).
+ 526. Xterm patches #180, 181 (Thomas Dickey).
+ 525. Update libfreetype-xtt2 to version 1.0d:
+ - Fixed server crash caused by loading fonts for which encoding file
+ does not exist.
+ - Some fixes for minor bugs when handling errors.
+ - Some minor cleanups.
+ (Chisato Yamauchi, After X-TT Project).
+ 524. Export strl{cat,cpy} functions to the server modules and provide
+ an implementation for the systems that don't have them. (Matthieu
+ Herrb).
+ 523. Fixes and updates for XKB keyboard maps:
+ - Update Serbian layouts (Bugzilla #92, Danilo Segan).
+ - Add 'MS Windows like' US International variant for 'us' keymap (Ivan
+ Pascal).
+ - Change CapsLock default behavior to 'Caps acts as locking Shift,
+ Shift cancels Caps'. Add new type for four-level keys (Ivan Pascal).
+ 522. Fix generic rootless code bug which tests CopyWindow instead of CopyBytes
+ (Kensuke Matsuzaki).
+ 521. Update libfreetype-xtt2 to version 1.0c. This consists of some minor
+ fixes and cleanups (Chisato Yamauchi, After X-TT Project).
+ 520. Add accelerated rootless drawing support and fix bug in rootless
+ FillSpans (Torrey T. Lyons and John Harper).
+ 519. Update SiS driver:
+ - Merge 661/741/760 support
+ - Clean up
+ - Fix Xv problems after swsuspend
+ - Fix LCD-via-CRT1 on various machines
+ 518. Prevent some compilers from optimising out Mesa's X11 error interface
+ (Marc La France).
+ 517. Add rules to generate post-processed and assembler source from C++ files
+ (Marc La France).
+ 516. Change `make World` so that well it interrupts itself to build a utility
+ (makedepend, pswrap, etc), it only builds that utility. Some things were
+ being built too early (Marc La France).
+ 515. When the i830 driver's checks for sufficient memory for tiled mode
+ fail, don't later try to allocate with tiling enabled (David Dawes).
+ 514. Enable I845G_VBE_WORKAROUND in the i830 driver for all platforms, since
+ this reportedly fixes VT switching problems on hardware other than the
+ 845G.
+ 513. Updated README.SiS (Thomas Winischhofer).
+ 512. Add the After X-TT Project's libfreetype-xtt2 1.0b fixes and
+ enhancements to the "freetype" module (Chisato Yamauchi,
+ After X-TT Project). This should make it possible to deprecate the
+ "xtt" module in a future release. Fixes and enhancements include:
+ - Fixed crash caused by using fonts which have OS2 sfnt table.
+ - Corrected metrics calculation error. Although the original code uses
+ size->metrics, the FT_Size_Metrics does not have exact values when
+ handling the outline. So the codes for metrics calculation were
+ drastically rewritten.
+ - Fixed some problems with FreeTypeRasteriseGlyph():
+ + Made "only metrics is required" distinct from "both metrics and
+ rasterised bitmap are required" to improve performance when
+ loading large charset.
+ + Fixed the erroneous usage of freetype2 API. To get valid metrics,
+ FT_Outline_Get_BBox() or FT_Outline_Get_CBox() is used for outline.
+ + Took the strange code for raster copying and rewrote it.
+ - Fixed UNDERLINE_POSITION so that it counts downwards.
+ - Fixed a risky calculational method for info->maxbound and
+ info->minbound when spacing is not charcell. All glyphs' metrics are
+ calculated and valid info->maxbounds and info->minbounds are set
+ without cutting any corners.
+ - Added TTCap option "fn","ai","ds","fs","vl","cr","bw","eb","hi",
+ "fc" and "fm" which are compatible with X-TT 1.4.
+ - Supported character width for vertical layouts.
+ 511. Encoding file updates (After X-TT Project):
+ - Removed jisx0208.1983-0.enc and added 'ALIAS jisx0208.1983-0' to
+ jisx0208.1990-0.enc.
+ - Added Windows ucs2 cmap(3,1) to jisx0208.1990-0.enc and
+ jisx0201.1976-0.enc.
+ - Added files for GB18030-0 and GB18030-1 (James Su).
+ 510. Update X-TrueType (X-TT) to version 1.4.2 (Chisato Yamauchi,
+ After X-TT Project):
+ - Fixed several bugs of make_up_italic_bitmap() function.
+ - Changed the order of priority of mapIDRelations in JISX0208 and
+ JISX0201 code converter. The windows ucs2 is given the highest
+ priority for kochi-substitute Japanese fonts.
+ - Fixed code relation in cc_jisx0208_to_std_ucs2() function
+ (not 0x215d -> 0x00b1 but 0x215d -> 0x2212)
+ - Added minor improvements.
+ 509. Fixes and updates for HTML and PDF versions of spec docs for
+ installation and inclusion in the online docs (David Dawes).
+ 508. Implement SharedLibtoolLibraryTarget, etc for bsdLib/ELF, including
+ creating links for older but compatible revisions of such
+ libraries (David Dawes).
+ 507. Allow a simple form of option name aliasing for options handled
+ via OptionInfoRec (David Dawes).
+ 506. Add optimized code for RENDER with rootless XDarwin (John Harper,
+ Torrey T. Lyons).
+ 505. Declare LoadPalette, SetOverscan and DPMSSet as public functions through
+ the XFree86's ScrnInfoRec, so these functions can be wrapped.
+ (Alan Hourihane).
+ 504. XDarwin improvements:
+ - Add complete server side support for AppleWM with xpr.
+ - Allow Aqua and X11 windows to interleave when AppleWM-aware window
+ manager is present.
+ - Fix hang on server reset.
+ (Torrey T. Lyons, John Harper).
+ 503. Fix double-free at server regeneration in the screensave/DPMS timer
+ code (David Dawes).
+ 502. Build most libraries as shared by default. (Matthieu Herrb,
+ David Dawes).
+ 501. Add missing symbol definition files for libraries (Matthieu Herrb).
+ 500. Add 'inet' keymaps for two Logitec keyboard models (Bugzilla #762,
+ Eric Mountain; Bugzilla #766, Chris Hornbaker) and cleanup Logitec
+ keymaps (Ivan Pascal).
+ 499. Add missing SetScreenSaverTimer() to ProcSetScreenSaver (Ivan Pascal).
+ 498. Fix building on Mac OS X after DRI merge (Torrey T. Lyons).
+
+XFree86 4.3.99.14 (10 October 2003)
+ 497. Add an xf86InitFBManagerLinear() function and implement the Linear
+ allocation routines. These still fallback to XY area allocation if
+ no (or the lack of) linear space is available. It assumes the driver
+ has already called one of the init routines to the FBManager for Areas
+ before this new setup can be used (Alan Hourihane).
+ 496. Added USB keyboard support for Solaris/x86 platform (Bugzilla #352,
+ Daniel Rock).
+ 495. i830/i810 driver:
+ * Added Christian Ziez's code to tweak BIOS image to convince chipset of
+ resized video RAM.
+ * Fixed viewport/video overlay window alignment issues.
+ * Fixed calculation of video overlay memory size.
+ * Fixed video overlay on TV out (Bugzilla #213). (Egbert Eich).
+ 494. Fixed mode setting in trident driver: use mode passed in function
+ argument, not value in currentMode (Bugzilla #197, Egbert Eich).
+ 493. Added delay when writing to Glint PM2 ramdac to avoid lockups
+ (Egbert Eich).
+ 492. Fixed bug in Glint Bresenham line fallback code that caused line be drawn
+ beyond framebuffer boundaries (Bugzilla #624, Egbert Eich).
+ 490. Force sane pallette when entering DGA mode in Matrox driver
+ (Egbert Eich).
+ 489. ATI Rage128: Wait with modifying FP video mode according to BIOS values
+ until final call of ValidMode() to prevent modes from being rejected
+ (Bugzilla #661, Egbert Eich).
+ 488. Some Savage BIOSes turn on clock doubling on non-doubled modes.
+ Added code that catches and fixes this situation (Egbert Eich).
+ 487. Tdfx driver: Fixed order of initialization/deinitialization in
+ ScreenInit()/ CloseScreen().
+ Fixed texture video support, removed artefacts in last line of overlay
+ video support (Bugzilla #299). (Egbert Eich).
+ 486. Add "automatic configuration" support for the XFree86 server, allowing
+ it to be started in a useful way without an XF86Config file.
+ - Add support to the config file parser for processing internally
+ supplied configuration data.
+ - Modify the algorithm for finding core input devices to maximise the
+ likelihood that they will be found.
+ - Add a FindDevice function to the OSMouse interface, allowing
+ an OS-specific function to be called to find the mouse device when
+ none is specified in the configuration. Implementations included for
+ Linux and FreeBSD.
+ - Add a GuessProtocol function to the OSMouse interface, allowing
+ an OS-specific function to be called as a fallback when the mouse
+ protocol can't otherwise be detected. Implementation included for
+ Linux.
+ - Bump the OSMouse interface version to 1.1 with the addition of the
+ above two functions.
+ - An interface for calling an external utility "getconfig" to generate
+ some configuration data. Implementation of getconfig included.
+ - Generate a default internal configuration, autodetecting as much
+ as possible, with reasonable fallbacks.
+ - Recognise "DefaultDepth" and "DefaultFbbpp" options in the Device
+ section.
+ - Add a "TargetRefreshRate" option to help prevent modes with too
+ high a resolution (and poor refresh rate) being used as the default.
+ - Use DDC-probed mode timings to estimate the monitor parameters when
+ the DDC-probed information doesn't include a DS_RANGES property.
+ This should improve the reliability of monitor auto-detection.
+ (David Dawes, X-Oz Technologies).
+ 485. Add functions for checking option values without marking them as "used"
+ (David Dawes).
+ 484. Add missing xf86ReplaceRealOption() function (David Dawes).
+ 483. Added support for Siliconmotion Cougar3DR chip (Bugzilla #754,
+ Chris Edgington).
+ 482. Cygwin:
+ * Added another German keyboard layout.
+ * Added Japanese keyboard layout to the list of defaults as jp.
+ * Added a new default keyboard layout for Portuguese (Brazil, ABNT2).
+ * Print the layout number in hexadecimal.
+ * Display the argument to the -query option in the window title.
+ (Bugzilla #763, Alexander Gottwald)
+ 481. Add processing for WM_WINDOWPOSCHANGED to cause window to repaint when
+ using TweakUI's focus-follows-mouse behavior. (Bugzilla #763,
+ Harold L Hunt II)
+ 480. Added runtime detection of SHM support by checking the return value of
+ shmget to the SHM and xf86BIGFONT extension to support SHM on Cygwin
+ (Bugzilla #764, Harold L Hunt II).
+ 479. Adding O_BINARY flag when opening an xkm file if this flag is defined
+ (Bugzilla #768, Alexander Gottwald).
+ 478. Radeon driver fixes (Hui Yu@ATI)
+ - 9200 DVI fix and TMDS_PLL initialization for all chips
+ - New chips support (9800XT/SE, 9600XT/SE, M11, T2/X2 etc.)
+ - Cleanup unused/secondary chip ids
+ - Autodetect PCI cards
+ - Add BusType to override PCI card autodetect
+ - Add display bandwidth calculation routine to fix flickering/tearing
+ display problem
+ - Workaround for corrupted BIOS image causing incorrect panel size
+ - Fix the LCD table reading loop
+ - Various small changes (including improving DDC reliability and
+ CRTC_MORE_CNTL initialization)
+ 477. Fix XAA Color8x8 cache bug:
+ Pattern was expanded from source instead of destination
+ (Thomas Winischhofer)
+ 476. Fixes and updates for XKB keyboard maps:
+ - Add 'United Kingdom w/deadkeys' gb(intl) keymap (Bugzilla #744,
+ Phil Jones).
+ - Add multi_layout compliant 'us_intl' keymap (Ivan Pascal).
+ - Fix 'macintosh' geometry file (Bugzilla #753, Simon Vallet).
+ 475. APM driver:
+ . improved clock parameter calculation.
+ . Fixed order of initialization of cursor.
+ . Fixed restauration of graphical text mode.
+ . Added YUY2 video format.
+ . Corrected accel framebuffer pitches and max screen height
+ (Bugzilla #528, Egbert Eich).
+ 474. Moved DisableMMIO() out of the unmap() function, added call to
+ EnableMMIO() to EnterVT() to work around lockup problems when
+ switching between two Xserver (Bugzilla #748, Egbert Eich).
+ 473. Fixed problem with text widget in Xaw when widget has a different
+ depth than the default visual (Bugzilla #745, Wolfram Gloger).
+ 472. Fixed Sig11 when calling X -query with no ipv6 support in kernel
+ (Bugzilla #737, Egbert Eich).
+ 471. Added support for Sparc64 and AMD64 on FreeBSD.
+ This patch also disables warnings from system headers, fixes some elf
+ relocations also relevant for other platforms and disables translation of
+ KEY_SysReqest and KEY_Break on sparc64. (Bugzilla #739, Eric Anholt).
+ 470. Switched VIA video driver to fillkey helper function (Bugzilla #525,
+ Alan Cox).
+ 469. Fixed CRT modes > FP panel size for siliconmotion (Bugzilla #727,
+ Hugues Fournier).
+ 468. Fixed xedit coredumps: update counter of free objects when getting an
+ object from the list (Bugzilla #722, Egbert Eich).
+ 467. Fixed definition of UseInstalledOnCrossCompile so that it never is
+ undefined (Harlod L. Hunt II).
+ 466. Add the 'b' flag to fopen() when opening binary xkm files. This is
+ irrelevant for *nix OSes, but required for Cygwin. (Bugzilla #689,
+ Harold L Hunt II).
+ 465. Cygwin:
+ * MultiWindow Mode: Automatically validate the size of windows that are
+ being resized. (Earle F. Philhower III)
+ * Safely shutdown the MultiWindow Mode and Clipboard Manager threads on
+ server shutdown. (Earle F. Philhower III)
+ * MultiWindow Mode - Fix a crash from a string copy bug.
+ (Earle F. Philhower III)
+ * Add lots of defaults for keyboardlayout. (Alexander Gottwald)
+ * Add a system tha allows arbitrary commands to be added to the tray menu
+ icon. (Earle F. Philhower III)
+ * Print the name of the keyboardlayout to aid in adding more layouts.
+ (Alexander Gottwald)
+ * Stop printing the IDirectDrawSurface4_Blt() failure messages after 10
+ times. (Harold L Hunt II)
+ * Disable check for pc105 keyboard and just assume that it is present.
+ This check was causing problems with certain keyboard drivers that
+ failed to report that a pc105 keyboard was present.
+ (Alexander Gottwald)
+ * MultiWindow Mode - Add handling for WM_CHANGE_STATE IconicState
+ messages;
+ minimize the associated Windows window when these messages are
+ received. (Harold L Hunt II).
+ Submitted: (Bugzilla #704, Harold L. Hunt).
+ 464. cygwin.cf:
+ * removed BuildDPS flag.
+ * Changed Alloca flag as Cygwin 1.5.x supports alloca, now.
+ * Use external expat package by default.
+ * Changed XawI18nDefines to utilize improved wide char support in
+ Cygwin 1.5.x. (Bugzilla #699, Harold L. Hunt II).
+ 463. Fixed C&T panel register setting (Akira Taniguchi, Egbert Eich).
+ 462. Fixing crash on ia64 because of wrong setjmp buffer alignment (Bugzilla
+ #596, John Dennis).
+ 461. Changing ImPS/2 mouse Z-axis range to -8 to 7 (Bugzilla #691,
+ Matthew W. S. Bell, Egbert Eich).
+ 460. Making sure the compiled xkb config file is found by Xnest if
+ ProjectRoot is modified (Bugzilla #688, Frank Giessler).
+ 459. Fixing build of machine code .S files on OS/2 (Bugzilla #689,
+ Frank Giessler).
+ 458. Import Mesa 5.0.2 (Alan Hourihane).
+ 457. DRI merge (DRI Project)
+ * details to follow..........
+ 456. Fixes and updates for XKB keyboard maps:
+ - Update xkb geometry files (Alexander Pohoyda).
+ - Fix German-Romanian maps (Manfred Pohler).
+ - Cleanup Hungarian layout (Bugzilla #730, Egmont Koblinger).
+ 455. Change the order of the timeouts processing and the input devices
+ reading in WaitForSomething() which caused unneeded keyboard autorepat
+ events (Ivan Pascal).
+
+XFree86 4.3.99.13 (25 September 2003)
+ 454. Add support for chip ID 5964 (Radeon 9200 SE) to the radeon driver, and
+ fix detection of IDs 5962 and 5963 with Driver "ati" (Bugzilla #732,
+ Michel Daenzer)
+ 453. Add gcc format checking for the X server's message and logging
+ functions, and fix lots of associated warnings (David Dawes).
+ 452. Replace the perl version of ucs2any with a C version ( Ben Collver and
+ other NetBSD developers, Matthieu Herrb).
+ 451. For drivers that support 'Option "dri"' have the driver request
+ loading the dri module when this option is true. This brings
+ it in to line with how other things are handled. Other drivers
+ that have DRI support need to have the "dri" option added (David Dawes).
+ 450. Fix libGL bug that could cause deadlock when switching contexts
+ (John Harper).
+ 449. Improve the contrast of the whiteglass xterm cursor, and fix the
+ hotspot of the whiteglass right_ptr cursor and add transparency
+ to it (#5867, René Rebe).
+ 448. Fix a problem with the "pl2" (Polish qwertz) map where the order in
+ which the Alt_R and Shift keys are pressed affects the results
+ (Tom Pala).
+ 447. In xdm, use better pseudo-random number generators to generate
+ magic cookies. Add support for EGD and other compatible entropy
+ gathering daemons. (Oswald Buddenhagen from KDE, Matthieu Herrb).
+ 446. Fix IMPS/2 mouse wheel on platforms where char defaults to unsigned
+ (Rene Rebe).
+ 445. Fix rare xterm crash on Darwin due to dyld deadlock when a signal comes
+ in while dyld is looking up a symbol (Rob Braun).
+ 444. XDarwin cleanup and improvements:
+ - Load bundle at runtime for chosen Quartz mode: xpr, cr, or fullscreen.
+ - AppleWM extension has been generalized to work with any Quartz mode.
+ Currently only the xpr implementation is complete.
+ - Wrote a man page for AppleWM.
+ - Moved hw/darwin/quartz/aqua* files that contained code to protect
+ the alpha channel to miext/rootless/safeAlpha.
+ (Torrey T. Lyons).
+ 443. Remove lots of redundant redeclarations (David Dawes).
+ 442. VIA driver:
+ Fixed video memory detection. (Bugzilla #525, Alan Cox).
+ Fixed TV and FP initialization problems (Bugzilla #525, Frederic Crozat,
+ Alan Cox).
+ Removed remaining globals (Egbert Eich).
+ 441. Fixed memory leaks in the loader (Bugzilla #682 and #683, Juergen Keil).
+ 440. Fixed erroneous freeing of DisplayModeRec in xf86DeleteMode() when
+ deleting the modePool in xf86PruneDriverModes() the 'prev' member has
+ a different meaning for modePool modes than for ScrnInfoPtr->modes modes
+ where it creates a doubly linked list (Bugzilla #678, Juergen Keil).
+ 439. Fixed SDK for VIA driver (Bugzilla #674, Bernhard Rosenkraenzer).
+ 438. Extended list of monitor ranges and modes in xf86cfg (Egbert Eich).
+
+XFree86 4.3.99.12 (10 September 2003)
+ 437. Move the X server log file handling from the XFree86 DDX to the DIX,
+ allowing the more descriptive logging to be used throughout the server,
+ and the log messages to be more uniform in formatting (David Dawes).
+ 436. Added support for the Compaq Evo keyboard (Stanislav Brabec).
+ 435. Fixed writes past end of array in via_bios.c (Bugzilla #662,
+ Egbert Eich).
+ 434. Let luit copy the termios settings from the calling terminal (Bugzilla
+ #641, Juliusz Chroboczek).
+ 433. Add _ADOBE_POSTSCRIPT_FONTNAME to the list of font properties xlsfonts
+ that are atoms and should be converted to strings when run with the
+ -ll flag. Also fixed the lenght problems that may arise (Bugzilla # 659,
+ Alan Coopersmith).
+ 432. Backing out 321.: sysMem gets initialized once during server lifetime
+ (Egbert Eich).
+ 431. Fixing X11.tmpl to set XFTINCLUDES after defining a non-standard path
+ to fontconfig, adding FONTCONFIGINCLUDES to the build rules for fontconfig
+ (Kevin P. Fleming).
+ 430. Added support for the hp5181 inet keyboard (Bugzilla #648, Alan Strohm).
+ 429. Added support for Apple Laptop keyboards, added level3/group switching to
+ KP_Enter, modified layout so keyboards acts the same way as under Mac OS
+ (Bugzilla #642, Frank Murphy).
+ 428. Adding ANGKHANKHU (U+0E5A) character to level 3 of keycode <AD09> on
+ th_tis keymap (Theppitak Karoonboonyanan).
+ 427. Fixes and updates for XKB keyboard maps:
+ - Add 'Romanian keymap for German keyboard' and 'Romanian keymap with
+ access to German umlauts' (Manfred Pohler).
+ - Update xfree86.dtd file (Sergey V. Oudaltsov).
+ - Add an XkbOption that makes a keyboard map without special keysyms
+ on Ctrl+Alt+smth for those who use such combinations for another
+ purposes (Ivan Pascal).
+ 426. Reverse patch #423 because it causes compile problems (Ivan Pascal).
+ 425. Disable the bytecode interpreter by default in FreeType 1, bringing it
+ into line with the default for FreeType 2. Document how to enable
+ it in xf86site.def for those with no legal impediment to doing so
+ (David Dawes).
+ 424. Improvement of Xlib's keysym compose module:
+ - Allow to figure out a mulibyte string if it is omitted in Compose file.
+ - Add 'include' instruction with some substitutions.
+ - Add a searching of Compose file as a value of XCOMPOSEFILE environment
+ variable and as a $HOME/.XCompose file. (Ivan Pascal).
+ 423. Add a writing of some Xserver XKB module error messages into a servers
+ log file (Ivan Pascal).
+ 422. Add Trident CyberBladeXP4 support, but acceleration is currently
+ disabled. (Alan Hourihane).
+ 421. Xinstall.sh updates to reduce its reliance on external utilities and
+ provide better diagnostics when required external utilities don't exist.
+ (David Dawes).
+ 420. Fixes and updates for XKB keyboard maps:
+ - Fix unneeded BKSL redefinition in Ukrainian 'winkeys' keyboard map
+ (Andriy Rysin).
+ - Fix some keycodes for jp106 keyboard model (Bugzilla #657,
+ Stephen J. Turnbull).
+ - Update xfree86.xml registry file (Andriy Rysin, Sergey V. Oudaltsov).
+ 419. Add a missing xf86UnblockSIGIO() call to xf86InstallSIGIOHandler()
+ (#5839, NetBSD PR xsrc/22668, Yorick Hardy).
+ 418. Fix a problem with the "pl" map where the order in which the Alt_R and
+ Shift keys are pressed affects the results (#5832, Tom Pala).
+ 417. Fix the warning generated by the ONE_LEVEL <RALT> definition in
+ the "level3" map (#5832, Tom Pala).
+ 416. Remove the unnecessary dependence of RandR on RENDER (David Dawes).
+ 415. Remove some static variables that should be per-screen (David Dawes).
+ 414. SiS driver update:
+ - Add 8x8 Color Pattern Fill (315/330 series)
+ - Add transparency support for 8x8 Mono Pattern (300/315/330 series)
+ - Fix Xv "insufficency" triggered by MPlayer (315 series)
+ 413. Add missing REQUEST_SIZE_MATCH() to xSyncSetCounter protocol request
+ (noticed by Ruben Nunez Francisco).
+ 412. Allow building libOSMesa during non-XFree86 builds (Marc La France).
+ 411. Rip out incorrect limits on the number of PCI buses an ix86 chipset can
+ handle and implement an improved solution for avoiding "phantom" PCI
+ buses (Marc La France, Bugzilla #604).
+ 410. Fixes for potential integer overflows in font libraries. (blexim,
+ Matthieu Herrb).
+ 409. SiS driver: Add RENDER hardware acceleration
+ 408. Add a Fopen() function to open the Xauthority file without spawning
+ a shell (Bugzilla #255, Aidan Kehoe, Matthieu Herrb).
+ 407. Fix a bug introduced with #397 that results in the core pointer and
+ keyboard devices specified in a ServerLayout section being ignored
+ (David Dawes).
+ 406. Added big5hkscs encoding to font encoding files (Bugzilla #575,
+ Jungshik Shin).
+ 405. Don't call FBIOPAN_DISPLAY ioctl with arguments that will cause a
+ confusing if harmless error; make an fbdevhw internal function static to
+ fix a warning. (Michel Dänzer)
+ 404. Passing correct virtual screen size to xf86ValidateModes() in VIA driver
+ (Luc Verhaegen).
+ 403. Added RGB overlays to i810 driver (Bugzilla# 625, Alastair M. Robinson).
+ 402. Fixed mode switching and mode comparison for xf86VidMode extension for S3
+ driver (Bugzilla #613, Alexey Baj, Egbert Eich).
+ 401. Via driver: Fixed remaining globals, some formatting issues, out of
+ memory handling in Xv overlay code and a couple of small glitches caused
+ by the fixes (Bugzilla# 525, Alan Cox)
+ Fixed some missing globals and static build (Egbert Eich).
+ A handful globals still remain.
+ 400. Update the Xserver(1), XFree86(1) and XF86Config(5) man pages to
+ clarify how XFree86 configuration/run-time parameters are specified
+ and their order of precedence (David Dawes).
+
+XFree86 4.3.99.11 (25 August 2003)
+ 399. Try to make the state of libXfont more consistent. It shouldn't depend
+ on whether a static or loadable XFree86 server is being built, so it
+ now always has a dependency on the FreeType2 library (when FreeType
+ support is enabled) (David Dawes).
+ 398. Make the specification of a Monitor in the Screen sections of the
+ XF86Config file optional. Some drivers may need changes (coming later)
+ to maximise the utility of this (David Dawes).
+ 397. When a core keyboard or core pointer cannot be found in the
+ configuration, create default ones. The pointer part of this
+ requires some changes to the mouse driver (coming later) before
+ the default core pointer configuration will be useful on most
+ platforms (David Dawes).
+ 396. Add a facility for assigning version numbers to builtin XFree86 server
+ interfaces and allowing modules to query them. Assign versions for
+ the os-mouse and os-kbd interfaces (David Dawes).
+ 395. Include uname(2) information in the server's banner messages
+ (Marc La France).
+ 394. Fix bug in detection of multi-function PCI devices (Marc La France, in
+ partial resolution of Bugzilla #574).
+ 393. Change the XFree86 server's global default depth to 16, and change most
+ drivers that support the three common depths (8, 16, 24) to defer to
+ the global default rather than specifying their own (David Dawes).
+ 392. Fixed a crash when _XIMProtoOpenIM(), hich is called through XOpenIM()
+ API when protocol IM is being set up, fails (Bugzilla #618,
+ Hisashi MIYASHITA).
+ 391. Fixed a possible source of Sig11 in Jamstudio driver (Bugzilla #617,
+ Jonathan Hough, Egbert Eich).
+ 390. Fixed building without RENDER support (Bugzilla #306, Matthieu Herrb,
+ Egbert Eich).
+ 389. Pass pointer obtained by Xalloc() to Xfree() not the one that may be
+ manipulated in the mean time (Bugzilla #614, Alan Coopersmith).
+ 388. Added reverse mapping of keysyms to keycodes (XKeysymToKeycode())
+ to xev to detect situations where this maps to a different keycode than
+ the one of the key pressed (Egbert Eich).
+ 387. Made xauth called by startx quiet (Bugzilla #597, Stas Sergeev).
+ 386. Added missing operand size override handling to PUSH imm8 in x86emu
+ (Bugzilla #590, Boris Weissman).
+ 385. Fixed compile glitch with NetBSD in xdm/genauth.c (Bugzilla #587,
+ Nicolas JOLY)
+ 384. Fix bugs in Xlib's EUC string converters that cause incorrect work of
+ _Xmblen. Fix _Xmblen usage in imCallbk.c when Xlib is built with
+ X_LOCALE (Etsushi Kato).
+ 383. Update xev program for print the result of XmbLookupString call
+ (Bugzilla #582, Noah Levitt, Ivan Pascal)
+ 382. Fixes and updates for XKB keyboard maps:
+ - Fix for Uzbek keyboard map (Bugzilla #595, Mashrab Kuvatov).
+ - Fix for the problem with Alt+Tab combinations in some window mangers
+ (Bugzilla #580,616): window chooser menu doesn't disappear after
+ Alt key release (Egbert Eich, Ivan Pascal).
+ 381. Allow a Display subsection with no depth or fbbpp specified to match
+ any depth/fbbpp, and make Display subsections optional, creating one
+ with default parameters when no suitable one can be found (David Dawes).
+ 380. Include <sys/param.h> to get the BSD macro for luit (ITO Tsuyoshi).
+ 379. DRM resync from the DRI trunk...
+ - Lots of misc fixes/cleanups, and some resyncs with 2.4 and 2.6
+ kernels.
+ - Fix maplist entries being used after they were freed; thanks to
+ Benjamin Herrenschmidt for tracking this down (Michel Daenzer).
+ - FreeBSD updates (Eric Anholt).
+ - Fail in DRM(agp_acquire) if the AGP aperture can't be used, such
+ that the X server falls back to PCI GART or disables the DRI
+ gracefully (Michel Daenzer).
+ - Possibly fix stanford checker complaints about sarea for radeon
+ (Keith Whitwell).
+ - Restore i830 texture age waiting when swapping in new textures
+ (Keith Whitwell).
+ - Fix texture rectangle support for r100 (Keith Whitwell).
+ - Add i810 add page flipping support to the DRM (Dave Airlie).
+ - Merged DRM documentation (Jose Fonseca).
+ - r128 MESA_ycbcr_texture (Ian Romanick, Leif Delgass).
+ 378. Linux drm module build fixes for newish kernels from the DRI
+ repository (Michel Daenzer, Linus Torvalds, Leif Delgass). This
+ addresses Bugzilla #603, 605 (Calum Mackay).
+ 377. Fix the test for 2.5.x with x < 52 Linux kernels for the drm module
+ build (Bugzilla #601, Callum Mackay).
+ 376. Fix an XAA pixmap cache server crash that can happen in some cases
+ when the off-screen memory is heavily fragmented (David Dawes, based
+ on #5752, Koike Kazuhiko, Chisato Yamauchi).
+ 375. Fix for the Brazilian ABNT2 keyboard extra key that now translates to
+ a different keycode value. Patch suggested by Ivan Pascal.
+ 374. Fixed XDarwin fullscreen crash in some screen sizes (Torrey T. Lyons).
+ 373. Be a little more precise about differentiating between active and
+ inactive non-video PCI resources (Marc La France).
+ 372. Added Apple-WM extension and library (John Harper, Torrey T. Lyons).
+ 371. Fixed indirect GLX on Mac OS X when the client can not make a
+ connection to the CoreGraphics window server (John Harper).
+ 370. Fixed support for 64bit PCI bus on 32bit systems (Egbert Eich).
+ 369. Added support for using aliases in the -nolisten option. '-nolisten tcp'
+ aliases to IPv4 and IPv6 (Matthieu Herrb, Egbert Eich).
+ 368. Added fallback Xlib transport layer if IPv6 socket cannot be openend
+ (Egbert Eich).
+ 367. Added missing symbol to the vbeSymbols table in i740 driver (Bugzilla
+ #583, Egbert Eich).
+ 366. Changed scripts containing 'head -1' which is not supported by
+ POSIX 1003.1-2001 any more (Bugzilla #570, #569, Paul Eggert,
+ Egbert Eich).
+ 365. Changed POSIX 1003.1-2001 non-conformant 'sort +2' to 'sort -k 3' with
+ backward compatibility (Bugzilla #568, Paul Eggert).
+ 364. Add Microsoft Pro OEM model to XKB inet map (Bugzilla #458,
+ maxim@wzzrd.com)
+ 363. Extract the CHANGELOG's commit date and include it in the XFree86
+ server log/version information (David Dawes).
+ 362. Change the way xf86Build.h is created so that it doesn't cause its
+ dependencies to be rebuilt when its contents are not changed
+ (David Dawes).
-XFree86 4.3.0.1 (9 May 2003)
- 987. Fix a FreeBSD/alpha build problem (#5679, Fred Clift).
- 986. Fix SiliconMotion driver for mode switching and SEGV problem when
- initializing Xv functionality (Bugzilla #50, Alan Hourihane).
- 985. Fix a SEGV that can happen with Riva128 cards (Mark Vojkovich).
- 984. Prevent a SIGFPE with the glint/pm3 driver when attempting to display
+XFree86 4.3.99.10 (10 August 2003)
+ 361. Fixes and updates for XKB keyboard maps:
+ - Added numpad:microsoft XKB option (Bugzilla #558, Will Styles).
+ - Fixed inconsistence in indicator names (Bugzilla #577, Noah Levitt).
+ - Added type6 model of Sun keyboard (Warren Turkal).
+ 360. Add UK (gb) layout to the dvorak XKB map (#5739, Mike Sulivan).
+ 359. More work on the NativeGDI server for Cygwin/XFree86. The span routines
+ are nearing completion (albeit they run slowly until the higher
+ level X primitive functions are implemented). The obvious issue with
+ the current code is the problems surrounding 1-bit DIBsections which
+ have msb/lsb issues compared to the other types of DIBsections.
+ This work was done quite some time ago in the Cygwin/XFree86 CVS.
+ (Alan Hourihane).
+ 358. SiS driver update:
+ - Added pseudo-Xinerama extension for MergedFB mode
+ - Fixes for Clevo L285/L287 (1024x768)
+ 357. Include Xmd.h in Xpm/lib/XpmI.h to get definitions of LONG64
+ (Bugzilla #562, John Dennis).
+ 356. Moved Meta_L/R keys and added Super_L/R keys on macintosh keyboard.
+ This makes the layout more compatible to the PC keyboard layout
+ (Bugzilla #565, Frank Murphy).
+ 355. Add check for Xmalloc() return value in XGetErrorDatabaseText() to avoid
+ Sig11 (Bugzilla #563, Alan Coopersmith).
+ 354. Separated build of libglx.a module and normal libglx.a library
+ (Bugzilla #541, Frank Giessler).
+ 353. Fixed build of Xnest, Xprt and Xvfb for OS/2 by linking with the linker
+ definition files (Bugzilla #541, Frank Giessler).
+ 352. Fixed freeing of properties form xkb_geomerty block (Bugzilla #550,
+ Alexander Pohoyda).
+ 351. Fixed string octal number parsing and string to int conversion for "\00"
+ in xkbcomp (Bugzilla #553, Egbert Eich).
+ 350. Removed stale definition from XftCompat.h (Bugzilla #543, Egbert Eich).
+ 349. Added XLC_LOCALE file for zh_CN.UTF-8, moved iso10646 encoding to the end
+ in ja_JP, ko_KR and zh_TW UTF-8 XLC_LOCALE files
+ (Bugzilla #544, Akira TAGOH).
+ 348. Fixed typo in #if conditional in cfb code (Bugzilla #556, Dave Love).
+ 347. Fixed ValidMode() in C&T driver to work with option 'FixPanelSize'
+ (Egbert Eich).
+ 346. Fixed Meta_R key on us layout Macintosh keyboard (Bugzilla #539,
+ Frank Murphy).
+ 345. Add new charset sequence for CText at the end of list. This way the
+ sequence of a charsets that were added earlier will be picked if two
+ sequences for the same charset are registered (Bugzilla #228,
+ Egbert Eich).
+ 344. Use return value sysconf (_SC_OPEN_MAX) instead of the fixed number 256
+ for allowed number of open files on POSIX.1 conformant systems
+ (Egbert Eich).
+ 343. Added missing exported functions in libfreetype to compile mkfontscale,
+ made mkfontsdir script install on platforms that use extensions (Bugzilla
+ 536, Frank Giessler).
+ 342, Fixed a sig11 in Xaw that may appear on the rare condition that no font
+ can be found (Bugzilla #482, Egbert Eich).
+ 341. Added KP_Separator to symbols that can generate decimal() in xcalc
+ (Egbert Eich).
+ 340. Disabled Color8x8PatternFill() in savage driver (Egbert Eich).
+ 339. Fixed a sig11 in twm when used with a session manager (Egbert Eich).
+ 338. Fixed rounding of refresh rate in RandR, updated Xrandr man page
+ (Bugzilla #527, Egbert Eich).
+ 337. Added MenuBorderWidth and MenuBorderColor options to twm (Bugzilla #529,
+ Alexander Pohoyda)
+ 336. Update for VIA driver:
+ - DGA no longer hangs (eg freedroidRPG now runs reliably)
+ - Starting two copies of Xine no longer aborts the X server
+ - Added support for KM400/K8M400
+ - Improved video overlay support.
+ - Fixed video overlay clipping when the image cliprects change but
+ not the size.
+ - TV tuner support via XV interface for two overlay ports.
+ - DRI support (the client side library is not yet fully ported to 4.3).
+ - Disable Xv in modes with insufficient bandwidth (1600c1200x16).
+ - Updated documentation
+ It differs from the base VIA codedrop.
+ - Several of the fixes were done by me on top of it (the dual Xine fix,
+ and bandwidth)
+ - Various system types have been turned to CARD32 to make the code
+ portable
+ - The hybrid Video4Linux/XV glue was racy and has been removed
+ (the XV layer is more than sufficient anyway)
+ - DRI library client code is not included (porting not yet finished)
+ - Additional debugging
+ (Bugzilla #525, VIA, Alan Cox) .
+ - Cleaning up namespace pollution, removing dependency on via_drm.h
+ removing some global symbols from driver (Egbert Eich).
+ Please note: there are more global symbols yet to be removed.
+ 335. Remove the 'xc/xkbcomp/geometry/HP' directory from the CVS repository.
+ 334. Substantial rewrite of the "nv" driver (Mark Vojkovich).
+ 333. Resync with Cygwin/XFree86 changes up to Test92 (#5721, Harold Hunt and
+ the Cygwin/XFree86 project).
+ 332. Add a clean target for Cygwin's ResourceObjectRule() rule (#5720,
+ Harold Hunt).
+ 331. Fix xman's formatting/displaying of manual pages on Darwin, where
+ 'groff' defaults to PostScript formatting (#5719, T. M. Pederson).
+ 330. SiS driver update:
+ - Fixed SiS 620 support
+ - Added interface for sisctrl utility
+ (Thomas Winischhofer)
+ 329. Fixes for regressions in xauth and xhost with IPv6 code
+ (Matthieu Herrb, Hideki ONO).
+ 328. Update X-TrueType (X-TT) to version 1.4.1 (Chisato Yamauchi,
+ After X-TT Project):
+ - Extension of code converter modules for ARABIC, ARMSCII8,
+ BIG5HKSCS, GB18030, ISO8859.*, etc. (Pablo Saratxaga, James Su)
+ - Try to use TT_Load_Glyph_Bitmap() in get_metrics() when `bs'
+ option is not set.
+ - Use Embedded Bitmap with the option `eb=y' when Auto Italic is set.
+ - Enhancements for `ds', `eb' and `bw' options.
+ - New options for TTCap, `fc' and `fm': they enable the *extremely*
+ fast loading of big Japanese or unicode fonts with `-p-' in the XLFD.
+ - Performance improvement of FreeTypeGetMetrics() function.
+ - Improved performance based on the solution to the buffer
+ overflow problem, caused by exceeding the range of
+ maxbounds.ascent/maxbounds.descent. This problem occurred only
+ when `-m-' spacing was used.
+ - Improved fix to crashes caused when certain fonts (e.g. verdana.ttf)
+ are used; solution based on investigating the true nature of the
+ problem.
+ - Added patch for mktcapdir-0.5.4 and some ttfconf files suitable for
+ X-TT 1.4.0.
+ - Preparation for extending the encoding field of XLFD. X-TT permits
+ the following additional XLFD format:
+ "-foo-foo-medium-r-normal--0-0-0-0-c-0-foo.2000-0.0"
+ "-foo-foo-medium-r-normal--0-0-0-0-c-0-foo.2000-0.1"
+ The last number can be used to indicate the plane number of a huge
+ character set.
+ - Support for reverse `fc' specification. `fc=0xaa00-0xa0ff' means
+ specifying the ranges 0x0000-0xa0ff and 0xaa00-0xffff. This is
+ useful for GB18030 proportional fonts.
+ - Improved fix for server crash that appears on Linux/PPC.
+ - Added ksc5601.*-3 and ksx1001.*-3 to KSCJOHAB/main.c (Jungshik Shin).
+ - Added U+20AC and U+00AE characters to KSCJOHABtoUCS2.c and
+ KSC5601toUCS2.c (Jungshik Shin).
+ - Fixed an X server crash when using LucidaSansRegular.ttf
+ (reported by Koike Kazuhiko).
+ - Improved fix to prevent NULL dereference when the font cache
+ becomes full; solution by allocation of a dummy area for bitmap.
+ - Fixed an X server crash because of an inconsistency problem between
+ XFree86 and X-TT (reported by Koike Kazuhiko).
+ - Numerous minor improvements.
+
+XFree86 4.3.99.9 (25 July 2003)
+ 327. Add Mach64 I2C framework. Derived from GATOS project (Marc La France).
+ 326. Removed ru_yawerty xkb symbols file as it is misleading as suggested
+ by Ivan Pasacal (Bugzilla #516, Ivan Pascal).
+ 325. Fixed two bounds errors in rman
+ (Bugzilla #505, Dan Nelson, Bugzilla #506, Eric Anholt).
+ 324. Cleaned up MMIO map/unmap in RADEONPreInit(), unmapped MMIO in
+ CloseScreen() even when server is switched away (Bugzilla #504,
+ Hui Yu, Egbert Eich).
+ 323. Modified transport code so that a bind to an IPv4 socket fails silently
+ when the bind to an IPv6 socket for the same port was successful.
+ This works around a problem in theIPv6 implementation on some OSes
+ that also handle IPv4 calls over IPv6 sockets (Egbert Eich).
+ 322. Simplified handling of the -nolisten option as suggested by
+ Alan Coopersmith. This option can now be issued multiple times.
+ 321. Added code to unmap sysMem when freeing int10 (Bugzilla #504,
+ Frank Giessler).
+ 320. Fix generic rootless crash while resizing when CopyBytes is not defined
+ by the implementation (Torrey T. Lyons).
+ 319. Fix XDarwin Cocoa rootless crash when unshaping a shaped window
+ (Torrey T. Lyons).
+ 318. More IPv6 changes from Alan Coopersmith as follows:
+ - Add support for IPv6 bracketed numeric addresses, similar to RFC 2732
+ syntax to a number of areas.
+ - Fix some issues with colon parsing and determining which addresses are
+ DECnet (two colons between hostname and display number) and which are
+ non-bracketed IPv6 numeric addresses ending in two colons, followed by
+ another colon and the display number (three colons in a row).
+ - Fix additional places Fabio forgot to change the string length when
+ switching "inetv6" to "inet6".
+ - Use MAXHOSTNAMELEN if it is defined for MAXHOSTNAME in xrdb. (Perhaps
+ NI_MAXHOST should be used as well on platforms that support it.)
+ - Make #include <sys/socket.h> in Xtrans.h look like the other places
+ it's included in the tree, with checks for Lynx & Win32
+ 317. IPv6: 2003.07.11 update to X.Org's response to comment #13; i.e.
+ s/FamilyInternetV6/FamilyInternet6/g (Marc La France).
+ 316. IPv6 build fixes for older Linux systems; Many of these are derived from
+ a suggestion by Alan Coopersmith (Marc La France).
+ 315. Change DEVID macro to work around glitch in SCO's C compiler
+ (Marc La France).
+ 314. Fixed Radeon driver so that clone modes survive server reset
+ (Bugzilla #487, Egbert Eich).
+ 313. Changed behavior of FreeType and Type1 renderer: when no encoding file
+ is found fail with BadFontName instead of using an iso8859-1 encoding
+ (Bugzilla #479, Roland Mainz, Juliusz Chroboczek, Egbert Eich).
+ 312. Fixed screen switching problem on SCO where VT was off by one
+ (Bugzilla #470, Kean Johnston).
+ 311. S3 driver:
+ . allow only specific displayWidths when acceleration is enabled
+ . added double_scan support (Egbert Eich).
+ 310. Removed build rules for hp Xserver that was recently removed from
+ Xserver/Imakefile (Egbert Eich).
+ 309. Fixes for C&T driver:
+ . switch to SW mouse in doublescan modes.
+ . centered video correctly for all interlaced modes (docs were
+ misleading).
+ . fixed README (Egbert Eich).
+ 308. Fixed a typo in mkfontscale (Bugzilla #491, Juliusz Chroboczek).
+ 307. A lot of X server prototype cleanups, including fixing an
+ inconsistency between the cfbBitBlt and CopyPlane functions
+ exposed by the prototyping (#A.1859, Alexander Stohr).
+ 306. Fix missing newline in Message -> MessageF transition in dri_glx.c
+ (#A.1833, Alexander Stohr).
+ 305. Fill out the sunleo man page (#A.1783, Arnaud Quette).
+ 304. Fix a typo in the XSetWMProtocols(3) man page (#5697, Alexander Pohoyda).
+ 303. Fix for a few Xlib charset converters (Bruno Haible).
+ 302. Fix calculation of CRTC2 frame offset with page flipping in radeon driver
+ (Michel Daenzer)
+ 301. Xinerama-fy the XTest extension (Rik Faith).
+
+XFree86 4.3.99.8 (10 July 2003)
+ 300. X.Org IPv6 changes (Bugzilla #227, Alan Coopersmith, Marc La France).
+ See http://www.x.org/IPV6_Specific_Changes.html for details. This has
+ been further modified as follows.
+ - Deal with small memory leaks in xdm & xauth.
+ - Fix a number of compilation issues.
+ - Where supported, use SIOCGLIFCONF to query network interfaces on more
+ than only Solaris.
+ - Incorporate X.Org responses to comments #'s 1, 2, 4, 5, 7, 10, 11, 12,
+ 13, 14 and 15 (taken from an X.Org-internal document dated 2003.06.17).
+ - Replace HasIPv6 imake symbol with BuildIPv6, defaulting it to YES, and
+ build in IPv6 support whenever BuildIPv6 is asserted _and_ the OS
+ #define's AF_INET6. This is to maximise IPv6 code exposure and
+ eliminate <OS>.cf file changes to support IPv6.
+ 299. On Solaris, don't allow remote root xdm logins if CONSOLE is set in
+ /etc/default/login (Bugzilla #227, Alan Coopersmith).
+ 298. Fix SEGV in fstobdf when font server is not specified and FSServerName()
+ returns NULL (Bugzilla #227, Alan Coopersmith).
+ 297. Fix XDMCP bug that could cause local host entries in /etc/X0.hosts to be
+ lost (Bugzilla #227, Alan Coopersmith).
+ 296. Make certain xtrans static variable volatile to avoid optimisation issues
+ that occur when they are modified by SIGALRM handlers
+ (Bugzilla #227, Alan Coopersmith).
+ 295. Use %p instead of %x to print pointer values in xtrans debug messages to
+ avoid overflow on platforms with 32-bit ints & 64-bit pointers
+ (Bugzilla #227, Alan Coopersmith).
+ 294. Change SUN-RPC code to use authdes_seccreate() call rather than the
+ deprecated authdes_create() (Bugzilla #227, Alan Coopersmith).
+ 293. Add xdm /dev/random handling for Solaris
+ (Bugzilla #227, Alan Coopersmith).
+ 292. Solaris compile fixes (Bugzilla #227, Alan Coopersmith).
+ 291. Update X.Org version numbers to X11R6.6 or X11R6.7 and replace old
+ references to X Consortium with X.Org (Bugzilla #227, Alan Coopersmith).
+ 290. Update the usage of DRM AGP handles so that valid handles aren't
+ mis-interpreted as invalid handles (based on Bugzilla #484, Dave Airlie).
+ 289. Twisting fontfile.c and fontdir.c to be able to pass all fonts (bitmap
+ and scaleable) to the scalable renderer as this one can deal with
+ XLFD names (Bugzilla #475, Juliusz Chroboczek). PLEASE TEST!
+ 288. Changing PS/2 mouse resolution to 8 counts/mm as some broken mice have
+ problems with other values (W. uses 8) (Egbert Eich).
+ 287. Fixing mode setting by BIOS. Wrong clock selection in MiscOut register
+ caused screen to stay blank (Egbert Eich).
+ 286. Added description for -dumpSched and -schedInterval to the usage
+ message (Egbert Eich)
+ 285. Update the SCO OpenServer port, fixing these specific problems:
+ . Fixed the Imake template so i[3456]86 and friends arent defined
+ . Fixed bad preprocessor stuff in X11.tmpl that was producing warnings
+ . Updated default GCC flags to more aggresively optimize
+ . Fixed keyboard LED handling
+ . Enable SCO function keys in xterm
+ . Make Delete key send DEL by default on SCO in xterm
+ . Fix to make fonttosfnt compile (Bugzilla #470, Kean Johnston).
+ 284. Added missing ro2 symbols file to list of files to install
+ (Bugzilla #476, Egbert Eich).
+ 283. Corrected precedence problem in test in xc/lib/X11/XKBUse.c:
+ XkbUseExtension(). This avoids an extra round trip during application
+ startup (Bugzilla #473, Owen Taylor).
+ 282. Fixing deadlock in libXi - when is called _XLockDisplay() twice - when
+ calling a Xi function that calls XGetExtensionVersion() (Bugzilla #260,
+ Bastien Nocera, Owen Taylor).
+ 281. Adding support for video modes <320x240 to S3 driver by changing the
+ minimal clock frequency to 15.6 MHz (Bugzilla #472, Alexey Baj).
+ 280. Made mkfontscale behavior and options compatible to mkfontdir, fixed
+ bugs in output format (Bugzilla #425, Juliusz Chroboczek, Kean Johnston).
+ 279. Changed xclock hands back to black (antialiased) , created XClk-col.ad
+ to set colored hands instead, added missing documentation for missing
+ resources. This follows the behavior of the other X applications more
+ closely (Bugzilla #437, Joerg Wunsch).
+ 278. Added support for Trio64UV+ and Trio64V2/DX/GX to S3 driver (backport
+ from 3.x) (Bugzilla #465, Alexej Baj).
+ 277. Increased Xlib default buffer size to 16k (was 2048), made size
+ configurable thru environment variable XLIBBUFFERSIZE (minimum 2048)
+ (Bugzilla #466, Roland Mainz).
+ 276. Increased maximum BIGREQUEST size to 4Mb and made it configurable thru
+ a command line option. This increases performance of certain
+ applications considerably (Bugzilla #460, Roland Mainz).
+ 275. VIA driver: initialized screen parameters in PreInit() instead of
+ AccelInit() so that they are set even when acceleration is disabled
+ (Egbert Eich).
+ 274. Do not drop H&V sync during screen blanking for Radeon
+ (Bugzilla #320, Michael Breuer, Hui Yu@ATI).
+ 273. Let out-of-limit pixel clocks only use the frequency below pll output
+ lower limit for Radeons (Bugzilla #262, John Vickers, Hui Yu@ATI).
+ 272. Add support for Radeon cards with DAC/TMDS wire up in different ways
+ from what the driver was originally programmed to; includes support
+ for dual DVI cards (Hui Yu@ATI).
+ 271. Add Radeon DPMS handling for flat panels (Bugzilla #26, Hui Yu@ATI).
+ 270. Decreased the retry loops in DDC probing so that Radeon startup
+ time won't be too long in the worst case (Hui Yu@ATI).
+ 269. Fix Radeon Asic bug in RMX unit of IGP chips (Hui Yu@ATI).
+ 268. Fix Radeon register initialization for RGB offset to fix the
+ "milky-screen" problem (Bugzilla #351, Hui Yu@ATI).
+ 267. Add support for new Radeon chips: R350(9800), RV350(9600,M10),
+ RS250(IGP7000), RS300(IGP9000), RV280(9200) (Hui Yu@ATI).
+ 266. Fix a lockup with the trident driver when stopping/starting Xv
+ applications (Alan Hourihane).
+ 265. Fix initialisation in xauth (Martin Birgmeier).
+ 264. Calling RADEONSaveFPRegisters() regardless of display type to catch
+ register restauration problems (Bugzilla #193, Hui Yu).
+ 263. Fixed order of name and filename in encodings.dir files generated by
+ mkfontscale (Roland Mainz).
+ 262. Changed resource registration in TDFX driver: VGA mem resources
+ are unused during OPERATING state, RAC isn't required for memory
+ resources (Bugzilla #357, Egbert Eich).
+ 261. Attempt to fix VIA driver lockups when moving windows:
+ assumed bug compatibility to previous S3 products
+ (Bugzilla #435, Egbert Eich).
+ 260. Disabled mode writeback to client program from MGA driver (Egbert Eich).
+ 259. #ifdef'ed variables in os-support/bsd in cases they are not needed
+ (Bugzilla #430, Jason L. Wright).
+ 258. Fixes and updates for XKB keyboard maps:
+ - add Faroese keyboard map (Bugzilla #401, Roi a Torkilsheyggi)
+ - add missing KPPT key to ABNT2 keycodes list (Bugzilla #431, Christian
+ Tosta)
+ - fix geometry/pc file (Alexander Pohoyda).
+ 257. Don't sleep on Darwin for directory owner/mode problems (John Harper).
+ 256. Limit 430TX and 430VX to 128 and 32 PCI buses respectively
+ (Marc La France).
+ 255. Add direct GLX rendering on Mac OS X and Apple-DRI extension
+ (John Harper).
+ 254. Replaced inline asms with compier intrinsics for Intel compiler
+ (Bugzilla #427, Slava Sysoltsev).
+ 253. Partly fixed build problems caused by mkfontdir replacement
+ (Bugzilla #425, Egbert Eich).
+ 252. SiS driver update:
+ Fixed Xabre support
+ (Final) fix for Compaq 3045US
+ Customized timing for 848x480 parallel panels
+ 251. Replaced mkfontdir by simple shell script that calls mkfontscale
+ (see #233) (Bugzilla #388, Juliusz Chroboczek).
+ 250. Added encoding files for Arabic (iso8859-6.16 and iso8859-6.8x)
+ (Bugzilla #420, Roland Mainz).
+ 249. Removed O_SYNC from open call for /dev/mem for all Linux platforms.
+ This hopefully takes care of the speed problem
+ (Bugzilla #419, #414, Egbert Eich).
+ 248. Fixed fontstosfnt to build on OS/2 (Bugzilla #415, Frank Giessler
+ Juliusz Chroboczek).
+ 247. Fixed DMC touchscreen driver: button press events are properly
+ recognized now, made sure device is still recognized after a restart,
+ fixed misleading error messages (Bugzilla #418, Andreas Kies).
+ 246. Added PanoramiX supprt for the RENDER requests: Trapezoids, Triangles,
+ TriStrip, TriFan, SetPictureTransform and SetPictureFilter
+ (Bugzilla #138, Egbert Eich).
+ 245. Fixed SW/Theme cursor drawing glitches in i740 driver (Bugzilla #21,
+ Egbert Eich).
+ 244. Added input driver for Aiptek tablet (Bugzilla: #393, (list #5686),
+ Bryan W. Headley).
+
+XFree86 4.3.99.7 (25 June 2003)
+ 243. Added 'BitKeeper' to the directories that get excluded by lndir
+ (Bugzilla #408, H.J.Lu).
+ 242. Fixed gcc warnings in xdmauth.c (Bugzilla #410, Jason L. Wright).
+ 241. Updated Citron touchscreen driver: set 'block duration time'
+ to one second to avoid timeouts, added user strings to inform about
+ HW version (Peter Kunzmann).
+ 240. Fixed wraparound bug in TimerSet() (Peter Osterlund).
+ 239. Fixed X*LookupString() in imDevLkup.c to return status
+ XBufferOverflow and the required size as required
+ (Bugzilla #397, Kusanagi Kouichi).
+ Dto. for imLcLkup.c (Egbert Eich).
+ 238. Removed unused function QualifyName, Exit() from Xprint
+ and CountBits(), matchVisuals() from GLX
+ (Bugzilla #395, #400, #394 Jason L. Wright).
+ 237. Fixed type warning when building sunffb driver on 64bit
+ (Bugzilla #404, Jason L. Wright).
+ 236. Fixed warnings when building Palmex touchscreen driver statically
+ (Bugzilla #405, Jason L. Wright).
+ 235. Fixes and updates for XKB keyboard maps:
+ - add programmers variant to the Turkish keyboard map (Nilgün Belma
+ Bugüner)
+ - add a variant of the Romanian keyboard map for German keyboard
+ (Manfred Pohler)
+ - add layout for BTC 9001AH keyboard (Nick Kurshev)
+ - add Uzbek keymap description (Bugzilla #391, Mashrab Kuvatov)
+ - update geometry files (Alexander Pohoyda)
+ 234. Added fonttosfnt, a utility that generates bitmap-only TTFs. It is
+ capable of reading most font formats (Bugzilla #389,
+ Juliusz Chroboczek).
+ 233. Added functionalities to mkfontscale so mkfontscale performs every
+ functionality mkfontdir does (Bugzilla #387, Juliusz Chroboczek).
+ 232. Removed absolute path from cpp for Linux as /usr/bin/ should be
+ in the default search patch (Egbert Eich).
+ 231. Fix regression of Xvideo not working with some videos on the
+ CyberBladeXP/Ai1 chips (Bugzilla #251, Stephane Voltz).
+ 230. Added early failure and warning message when not sufficient memory
+ available for DRI in i8xx driver (Egbert Eich).
+ 229. Fix bug in original patch which added support for two new relocation
+ types for IA64 (Bugzilla #195, John Dennis).
+ 228. Fix scaling calculus in savage driver (Bugzilla #274, Emmanuel).
+ 227. Clarifying if conditions, fixing memory leaks in error path, removing
+ useless code in savage driver (Bugzilla #278+279, Emmanuel).
+ 226. Adding message to R128 driver which informs about modified modes for LCD
+ according to VBIOS (Bugzilla #23, Egbert Eich).
+ 225. Fixed chipset ID for v2100/v2200 for overrides (Egbert Eich).
+ 224. Added interlaced support for Voodoo 3,4,5 to TDFX driver (Bugzilla #383,
+ Jakub Bogusz).
+ 223. Fixed typo in getPciBiosTypes() (Bugzilla #382, Jakub Bogusz).
+ 222. Restore previous mode if mode switch fails (Bugzilla #381, Jakub Bogusz).
+ 221. Fixed typo that prevented lubB19 fonts with different maps from being
+ generated (Bugzilla #380, Jakub Bogusz).
+ 220. Sync entrypoints for OS/2 with recent changes in fontconfig and Xft
+ (Bugzilla #374, Frank Giessler).
+ 219. Added detection of 2Mb memory for CLGD7548, fixed a possible memory
+ leak and did minor cleanups (Bugzilla #369, Lucas Correia Villa Real).
+ (PLEASE TEST!)
+ 218. Recode single-byte keyboard scancodes that clash with recoded
+ double-byte scancodes (David Dawes).
+ 217. Fixes and updates for XKB keyboard maps:
+ - add more EuroSign to "us_intl" keyboard map (Paul Bolle)
+ - update geometry files (Alexander Pohoyda)
+ - add AudioMute key to inet(hpxe3gc) (Bugzilla #350, Paul Pacheco)
+ - add option for replacing RCtrl key with Right Alt (Bugzilla #343,
+ Adam Tlalka)
+ - add Uzbek keyboard map (Bugzilla #372, Mashrab Kuvatov)
+ 216. (Re-)fix portability of gccmakedep and generate ccmakedep on all
+ platforms (Marc La France).
+ 215. Fix i810/i815 problem with interlaced modes where only the top half
+ of the screen gets displayed (Paul Stewart).
+ 214. Changed any occurance of x86_64 to AMD64, the official name of the
+ architecture (Egbert Eich).
+ 213. Removed Copyright sign from man pages as this causes some formatters
+ to choke (Egbert Eich).
+ 212. Export SysV IPC functions to modules in Net and OpenBSD
+ (Bugzilla #355, Quentin Garnier).
+ 211. Fix rootless bug when reordering windows behind others (Torrey T Lyons).
+ 210. Fix page size issues that prevented the mmap()'ing of SBUS devices
+ (Marc La France).
+ 209. Fixes for the following problems on OS/2:
+ - long startup delay of xinit
+ - recovery from hard-error popups
+ - text-mode version of xf86cfg
+ - xf86cfg unable to find default config file
+ - installation of static libraries
+ - missing exported functions in X11.dll
+ - typo in xf86pathIsAbsolute()
+ (Bugzilla #267, Frank Giessler).
+ 208. SiS driver update:
+ Fixed 1280x960 and 1280x1024 LCD support (SiS 30x)
+ Added Chroma-Keying support to Xv part
+ Added support for Barco iQ R and G series projectors
+
+XFree86 4.3.99.6 (10 June 2003)
+ 207. Add support for the Mac's KP_Equal key (untested) (David Dawes).
+ 206. Import fontconfig 2.1.0 as an external package, and update the build
+ to use this version (David Dawes).
+ 205. New version of the FreeType backend. (Bugzilla #325, Juliusz Chroboczek).
+ 204. Rework XDarwin's Cocoa rootless implementation to use new generic
+ rootless code in miext/rootless (Torrey T. Lyons).
+ 203. Fix repeated image problem when using a vesa video mode before starting
+ the Xserver on the S3 Trio3D cards (Alan Hourihane).
+ 202. Import zlib 1.1.4 for systems that don't provide it (Matthieu Herrb).
+ 201. Improve fonts width and weight detection (Bugzilla #265-266,
+ Juliusz Chroboczek).
+ 200. Fix library dependencies for xlibi18n modules (Bugzilla #82, Joe Kelsey,
+ Matthieu Herrb).
+ 199. Fix manual pages typos (Bugzilla #316, Jens Schweikhardt).
+ 198. Fix bug (Bugzilla #315) in _XTextPropertyToTextList() that causes
+ an application crash in some circumstances (Ivan Pascal).
+ 197. Fixes and updates for XKB keyboard maps:
+ - add asciitilde to Swedish 'nodeadkeys' map (Bugzilla #291).
+ - add map for true Romanian keyboard (Bugzilla #300, Manfred Pohler).
+ - add EuroSign to "us_intl" keyboard map (Bugzilla #309, Paul Bolle).
+ - fix some keys in Armenian 'phonetic' layout (Bugzilla #313, Ani).
+ - add some geometry files (Alexander Pohoyda).
+ - some cosmetic changes.
+ 196. Import FreeType 2.1.4, and do initial merge for config/build
+ (David Dawes).
+ 195. Remove unnecessary links of libm (Marc La France).
+ 194. IRIX 6.5 build fixes and noise reductions (Marc La France).
+ 193. Clean up confusion in Imakefiles between XONLYLIB and XLIBONLY (and
+ between DEPXONLYLIB and the previously non-existent DEPXLIBONLY)
+ (Marc La France).
+ 192. Do not unnecessarily link libXmu, libXt and/or libXext into executables
+ (Marc La France).
+ 191. Fix makedepend for IRIX 6.5 (Marc La France).
+ 190. Make the handling of X_BYTE_ORDER in Imakefiles more portable
+ (Marc La France).
+ 189. Allow building of a libXfont without font cache support (Marc La France).
+ 188. When using cpp to generate scripts and data files, change XCOMM to pound
+ signs even when preceeded by only whitespace, and provide a means to
+ generate output lines with trailing backslashes. Change `startx` script
+ accordingly (Marc La France).
+
+XFree86 4.3.99.5 (25 May 2003)
+ 187. Fix XDMCP queries in xdm on systems using getifaddrs().
+ (Bugzilla #277, Joel Ray Holveck).
+ 186. Initial imake/config support for more closely (and more
+ automatically) emulating how libtool handles shared library revisions.
+ Implmemented for Linux only so far (David Dawes).
+ 185. Fix libexpat shared lib revision on platforms that use minor version
+ numbers (David Dawes).
+ 184. Update Tamil keyboard map (Thuraiappah Vaseeharan).
+ 183. Add missing xfs reply to GetEventMask requests (Marc La France).
+ 182. Change the ELF loader to ignore .debug* sections (Marc La France).
+ 181. Simplify internal interfaces in the PCI code and remove the Xserver's
+ interference with normal PCMCIA operation (Marc La France).
+ 180. i810/815 depth buffer needs to be a multiple of the tile size. This
+ fixes 3D corruption near the bottom of the screen at 800x600@16bpp
+ (Bugzilla #283, Dave Airlie).
+ 179. SiS driver update
+ - Allow Modelines for LCD and secondary VGA on 301B
+ - Support plasma panels natively (including a small
+ database for some known panels since some panels
+ report wrong timing data via DDC)
+ 178. DRM resync from the DRI trunk...
+ - Lots of fixes/cleanups/resyncs for the BSD DRM drivers (Eric Anholt).
+ - Fix potential oops and memory leaks when allocations fail in
+ addbufs_agp/pci (Leif Delgass).
+ - Add support for buffer private structs with PCI DMA buffers
+ (Leif Delgass).
+ - Disable MTRRS on FreeBSD-stable (Eric Anholt).
+ - Remove some unused code (Keith Whitwell).
+ - Move prototypes for gamma functions to gamma_drv.h (Keith Whitwell).
+ - 2.5.x resync (Linus Torvalds).
+ - Ensure driver has been initialized before installing irq handler,
+ and modify all drivers to ensure irq handler is removed before
+ cleanup, and cleanup is called at takedown (Leif Delgass).
+ - Check for lock on init/cleanup in all drivers except i810/i830
+ (Leif Delgass).
+ - Put back __HAVE_KERNEL_CTX_SWITCH for the sparc drm driver
+ (Keith Whitwell).
+ - Only free original pagelist in addbufs_pci if one already exists
+ (fixes oops) (Leif Delgass).
+ - texmem-0-0-1 branch merge (Ian Romanick).
+ - Fix warning on machines where sizeof(drm_addr_t) != 4 (Randy Dunlap).
+ - Support AGP bridges where the AGP aperture can't be accessed directly
+ by the CPU (David Mosberger, Benjamin Herrenschmidt, Michel Daenzer,
+ Paul Mackerras, Jeff Wiedemeier).
+ 177. Fix another xedit compile problem (Marc La France).
+ 176. Small fix for Italian keyboard map (Sebastiano Vigna).
+ 175. Don't ship xf86Bus.h and xf86pciBus.h with the SDK (Marc La France).
+ 174. Restore VGA driver's checking for depths 1, 4 & 8 (Marc La France).
+ 173. Fix a problem with savage driver when UseBIOS is off, such that the
+ performance drops dramatically. Now the performance matches or
+ exceeds that of the option UseBIOS (Alan Hourihane).
+ 172. Add workaround for problems that arise when in multi-layout map
+ different modifier keysyms share the same key (Ivan Pascal).
+ 171. Fix bug that causes XGetKeyboardMapping produce incorrect map when keys
+ have more then two keysyms. Also add a map columns duplication for better
+ compatibility with core protocol keyboard maps (Ivan Pascal).
+ 170. Fix XKB bug (Bugzilla #253) that causes an Xserver crash when XKB action
+ RedirectKey is used (Ivan Pascal).
+ 169. Add missing letters to Ukrainian phonetic keyboard map (Andriy Rysin).
+
+XFree86 4.3.99.4 (10 May 2003)
+ 168. Prevent a SIGFPE with the glint/pm3 driver when attempting to display
an XVideo image less than 8 pixels wide (Måns Rullgård).
- 983. Fix double free bug when a Mac-specific font fails to load with
+ 167. Support for building a DRI enabled server on OpenBSD (Wilbern Cobb,
+ Matthieu Herrb).
+ 166. Fix double free bug when a Mac-specific font fails to load with
Freetype (Torrey T. Lyons).
- 982. Check for NULL tObj in the i830 3D driver's TexEnv function. This
+ 165. Check for NULL tObj in the i830 3D driver's TexEnv function. This
fixes a FlightGear crash (Keith Whitwell).
- 981. Fix lockup on server reset in radeon driver
- (Michel Dänzer, Keith Whitwell).
- 980. Set Mesa hooks to flush vertices on state changes in Radeon 3D drivers
+ 164. Set Mesa hooks to flush vertices on state changes in Radeon 3D drivers
(Keith Whitwell).
- 979. Fix to prevent PCI and CardBus resets when switching out of the server's
+ 163. Add an entry to the i2c module that drivers can call to retrieve an array
+ of all I2C buses associated with a screen (Marc La France).
+ 162. Fix to prevent PCI and CardBus resets when switching out of the server's
virtual console (Marc La France).
- 978. Fix infinite loop that occurs on systems whose PCI configuration space
+ 161. Change the /dev/ file used on some *BSD's to mmap the framebuffer in DGA
+ clients to match the /dev/ file used by the server (Marc La France).
+ 160. SiS driver fixes:
+ - Added MergedFB mode (including HWCursor and Xv)
+ - Xv enhancements and fixes for all chipsets
+ - New Xv properties (SWITCHCRT, TVPOSITION, etc)
+ - Added support for custom LCD resolutions (via DDC)
+ - Fixed DVI output (DVI-D and DVI-A), automatic detection
+ - Numerous bugfixes and enhancements
+ (Thomas Winischhofer)
+ 159. Make freetype-config more useful on NetBSD (#5693, Thomas Klausner).
+ 158. Small fixes in keyboard maps:
+ - add an explicit type declaration in level3(ralt_switch)
+ (Bugzilla #225, Séamus Ó Ciardhuáin);
+ - fix wrong group number in Russian keyboard map (Ivan Pascal).
+ 157. Add rootless implementation for XDarwin using Apple's Xplugin API
+ (John Harper, Torrey T. Lyons).
+ 156. Fix precision problems in xf86XVClipVideoHelper and in Mach64 XVideo
+ support (Marc La France).
+ 155. Add missing symbols when DRI is disabled to glint driver
+ (Bugzilla #203, Mike Harris).
+ 154. Fix a memory leak caused by the data allocated in XGetDefault() never
+ being freed (Jim Radford).
+ 153. Update keysym capitalization rules in XConvertCase() with unicode
+ keysyms and some missed charsets (Bugzilla #209, Séamus Ó Ciardhuáin).
+ 152. Use C89 style function prototypes in manual pages (Bugzilla #208,
+ Aidan Kehoe).
+ 151. Fix small memory leaks in XvQueryAdaptors() and __driUtilCreateScreen()
+ (Jim Radford).
+ 150. Updated Wacom driver to support ntuos 2 2D mouse and a few styli,
+ TabletPC with ISD V4 protocol, intiq 15X and Cintiq 18SX
+ (Wacom).
+ 149. Fix programming error in ix86 motherboard chipset determination
+ (Marc La France).
+ 148. Ansi prototypes cleanup in Xserver/include and Xserver/os
+ (Matthieu Herrb).
+ 147. Fix shared libXp dependencies on *BSD and Darwin (Dale Rahn).
+ 146. Fix infinite loop that occurs on systems whose PCI configuration space
doesn't advertise a host bridge (Marc La France).
- 977. Workaround for broken devices that don't implement the header type field
+ 145. Workaround for broken devices that don't implement the header type field
in their PCI configuration space (Marc La France).
- 976. Fix programming error in ix86 motherboard chipset determination
+ 144. Portability changes for older Sun compilers (Alan Coopersmith).
+
+XFree86 4.3.99.3 (25 April 2003)
+ 143. Fix building of the dristat and drmstat utilities (David Dawes).
+ 142. From the DRI trunk...
+ - Remove more dead code from the BSD DRM (Eric Anholt).
+ - Remove some #if 0'd code and unused string functions from the Linux
+ DRM (Keith Whitwell).
+ - Move debug versions of the DRM memory functions to a new file
+ (Keith Whitwell).
+ - drm_memory cleanup (Leif Delgass).
+ - dristat and drmstat cleanups (Leif Delgass).
+ - Remove unused dev->map_count (Leif Delgass).
+ - For the i830 DRM driver, pass the dma handle from pci_alloc_consistent
+ to the card for status page rather than using virt_to_bus on
+ the virtual address (Leif Delgass).
+ - Cleanup the style of the linux-compat code in the BSD DRM, and use
+ ioctl directly rather than reimplementing it (Eric Anholt).
+ 141. Remove old XF86Setup source code. (Matthieu Herrb).
+ 140. Only add all default modes to mode list when RandR is enabled and
+ active (Egbert Eich).
+ 139. MGA driver: vertical blanking can generate interrupt (2D driver part)
+ (Ville Syrjala Bugz.: 199).
+ 138. Fix mmapw SEGV (Marc La France).
+ 137. From the DRI trunk...
+ - Install dummy/noop read & poll fops unless the driver has
+ replacements (Keith Whitwell).
+ - Remove gamma-specific stuff from the BSD DRM (Eric Anholt).
+ - Remove DRM_DMA_HISTOGRAM and associated code from the BSD DRM
+ (Eric Anholt).
+ - Remove BSD DRM's unused drm_init.h (Eric Anholt).
+ - Handle read() failures in the drm X server module (Michel Daenzer).
+ - Set DRM device major for NetBSD.
+ 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).
- 975. Fix bug in mode validation that occurs when the XF86Config doesn't
+ 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).
+ 125. Add missing tests for vtSema to xaa 'Picture' functions.
+ These missing checks caused strange behavior with some drivers
+ when RENDER extension requests were made while X was switched away.
+ (Egbert Eich).
+ 124. i810 driver: call drmCtlUninstHandler() on CloseScreen()
+ (David Airlie).
+ 123. Savage driver updated to 1.1.1.27: several fixes for video glitches
+ (Tim Roberts).
+ 122. Put back the DRM part of Charl Botha's Radeon suspend/resume support
+ that was inadvertently backed out in the DRI resync last week.
+ 121. Resync the Linux drm modules with the DRI trunk. Includes:
+ - Check for NULL map before calling DRM(ioremapfree) on cleanup
+ (Leif Delgass).
+ - Remove DRM read, poll and write_string (Keith Whitwell).
+ - Add more get_param queries for embedded project (Keith Whitwell).
+ - Move a bunch of gamma-specific code into a gamma-specific file,
+ and restore the kooky DRM(write_string) code for gamma
+ (Keith Whitwell).
+ - Remove unused DMA histogram code (Keith Whitwell).
+ - Remove unused 'DRM_FLAG_NOCTX' option (Keith Whitwell).
+ - Remove unused __HAVE_KERNEL_CTX_SWITCH code (Keith Whitwell).
+ - Fix templates so the i8x0 drivers don't have to define
+ __HAVE_DMA_WAITLIST (Keith Whitwell).
+ - Gamma drm updates (Alan Hourihane).
+ - Only mga, i810, i830 require AGP (Leif Delgass).
+ - Remove PCIGART_ENABLED define for radeon, pcigart support now
+ included for any arch (Leif Delgass).
+ - Get rid of superfluous fields in struct drm_radeon_ring_buffer
+ (Michel Daenzer).
+ - Use correct address for radeon ring read pointer writeback
+ (Michel Daenzer).
+ 120. Fix a potential bug in ZX1 support (Marc La France).
+ 119. Fix a buffer overflow in xkbprint (Ivan Pascal).
+ 118. Fix a bug in Xlib that prevents a vertical text drawing with
+ X[mb|wc]DrawString (bugzilla #178, OSAME Ken-ichiro).
+ 117. Added missing files to the SDK so it can actually be used (Sven Luther).
+ 116. mkfontscale enhancements (bugzilla #166, Julius Chroboczek).
+ 115. Fix handling of local host names in /etc/X<n>.hosts (bugzilla #156,
+ Alan Coopersmith).
+ 114. Add to XLookupString an automatic search of the layout which keysym can
+ be converted to a control-code when Control modifier is set (Ivan Pascal).
+ 113. Fix xkbcomp crash with some combinations of layouts in a multi-layout
+ keyboard map (Ivan Pascal).
+ 112. Keyboard maps cleanups, including:
+ - fix incorrect aliases in a keycodes file.
+ - remove unneeded type declarations.
+ - remove ThirdLevel modifier key descriptions in maps and replace them
+ with references to a common one in 'level3' file.
+ - some cosmetic changes.
+ (Ivan Pascal).
+ 111. Fix some function definition conflicts from Xlib cleanup when X_LOCALE
+ or NeedWidePrototypes is set (Torrey T. Lyons).
+ 110. Resync the BSD drm modules with the DRI trunk (Eric Anholt).
+ 109. Resync the Linux drm modules with the DRI trunk. Includes:
+ - Add 2nd arg for DRM_FREE (Keith Whitwell).
+ - Use file pointers instead of pids for resource and lock tracking
+ (Keith Whitwell).
+ - Add 'SG' map type identifier string ((pci scatter/gather) to /proc vm
+ info (Leif Delgass).
+ - Use list_entry() to get container struct from struct list_head
+ pointers. Build fix for RedHat 9 kernel (5 args to
+ remap_page_range()) (Leif Delgass).
+ 108. Fix a server crash with shadowfb and render when refreshing outside the
+ visible screen (Sven Luther).
+ 107. Fix a potential infinite loop during server generation when in
+ Xinerama (Rik Faith).
+ 106. Fix DRM module build on 2.5.41 and later kernels (tqueue -> workqueue)
+ (David Dawes).
+ 105. Fix lockup when using Xv in the trident driver (Alan Hourihane).
+ 104. Add support for TV chipsets VT1621 and CH7005 to the trident driver
+ (VIA, Alan Hourihane).
+ 103. Add VIA CLE266 driver (Bugzilla #154, VIA/S3)
+ 102. Remove non-functioning glxStub, and remove external GlxStaticServerLib
+ support (David Dawes).
+ 101. Change the WORLDOPTS default to empty. This means that 'make World'
+ will now stop on the first error. To get the old behaviour, run
+ 'make WORLDOPTS=-k World' (David Dawes).
+ 100. Add preliminary version of generic rootless code based on XDarwin's
+ rootless mode (Torrey T. Lyons, John Harper).
+ 99. Remove PEX and XIE source code (Matthieu Herrb).
+ 98. The XKB version of XRefreshKeyboardMapping() had an UnlockDisplay()
+ call without a preceding LockDisplay() call (Yoel Perl).
+ 97. Xlib cleanups and fixes, including:
+ - Fixed up any old style function defintions that raised warnings.
+ - Fixed functions with no parameter or return value.
+ - Moved any external prototype in a c-files to h-files.
+ - Set unreferenced and unmentioned functions to static.
+ - Completed any forward declartion with its calling parameters.
+ - Established function typedefs where might be helpful.
+ - Fixed bogus XIM callback function to XID type, fixed XPointer* -
+ XPointer mismatch on some callback.
+ - Added explicit FIXME XXX statement on locations for the work around
+ macro XCMS_CONVERSION_HARDWARE where the compiler was unsatisfied
+ about a known problem with the currently inconsistent src_to_CIEXYZ
+ table types.
+ - Split _XcmsSetGetColor and *Colors handling routine in order
+ to avoid any type conflicts there, fixed a memory leak for
+ error case in that area. Used stack based Buffer for single-color
+ version (should be simpler and faster).
+ - Fixed _XAsyncReply where a "register variable pend" was passed
+ and returned with the & operator. This location is further
+ suspect of variable size problems on anything else but 32 bit
+ platforms, with the new code it might more likely raise a type
+ mismatch warning for those specific location.
+ (#A.1729, Alexander Stohr).
+ 96. Fix the <KPDL> mapping for the hr XKB map, and add an hr_US map (#A.1726,
+ Vlatko Kosturjak).
+ 95. Fix vmware driver crash when running two X servers concurrently (#5688,
+ Nolan Leake).
+ 94. Rework the Linux drm kernel module build to leverage off the standard
+ kernel build system. This is based on suggestions and examples from
+ David Woodhouse. This approach has the advantage that the build
+ requirements of a wider range of standard kernels are now supported
+ transparently, but the disadvantage of some extra complexity to handle
+ building against clean vendor-distributed kernel source trees.
+ This has been tested with some recent Red Hat and SuSE distributions
+ (David Dawes).
+ 93. Update Italian keyboard map (Bugzilla #109, Sebastiano Vigna).
+ 92. Add keys missed in multi-layout keyboard maps: LSGT key in Belgian map
+ and 'old','phonetic' variants in Armenian map (Ivan Pascal).
+ 91. More reliable workaround for handling the I830Sync() function being
+ called while VT switched away (David Dawes).
+ 90. Fix references to DRI functions in non-DRI i810_driver.c build
+ (David Dawes).
+ 89. Import expat 1.95.4 (Matthieu Herrb).
+
+XFree86 4.3.99.2 (10 April 2003)
+ 88. Fix file descriptor leaks in xman (Ted Unangst, OpenBSD PR#3186).
+ 87. Fix bug in mode validation that occurs when the XF86Config doesn't
specify any mode or virtual resolution information (Marc La France).
- 974. Another int10 fix. This time for adapters found at PCI:0:0:0. This
+ 86. Resetting 'bound' flag for an agp entry after undbind succeeded in
+ drm_agpsupport.h (Egbert Eich).
+ 85. Ignoring hw_lock for drm device if lock was set by a different instance
+ (ie Xserver) to prevent second server to spin in driver release function
+ (currently only relevant for i8xx drm drivers) (David Dawes).
+ 84. Adding extra delay before doing a slowBcopy in ia64 to prevent a MC
+ when saving/restoring VGA fonts (Egbert Eich).
+ 83. Turn off needToSync in LeaveVT() in i830 driver to prevent server
+ crashes because xaa tries to sync blitter while switched away
+ (Egbert Eich).
+ 82. Added the O_SYNC flag when opening /dev/mem to work around a kernel bug
+ which causes conflits between WC settings in MTRR registers and cacheable
+ attribute in page table (Egbert Eich).
+ 81. Reduced retry count for mouse configuration to 4. This should speed
+ up server start for people who use a mouse repeater like gpm
+ (Egbert Eich).
+ 80. Fixed xf86cfg to duplicate font names before they get freed when
+ unloading the module (Egbert Eich).
+ 79. Added missing functions to xf86cfg (Egbert Eich).
+ 78. Added missing ROP_NEEDS_SOURCE to Savage driver;
+ now all 2D accel functions should use this flag (Egbert Eich).
+ 77. Reduced flicker with video playback in Savage driver (Tim Roberts).
+ 76. Load vgahw submodule in RENDITION driver before using it
+ (Egbert Eich).
+ 75. Magically speed up video playback on Neomagic (Egbert Eich).
+ 74. Added drmAgpUnbind()/drmAgpBind() functionality on Leave/Enter for i810
+ cards to allow a second Xserver to be started if the first one has
+ DRI enabled (Egbert Eich).
+ 73. Set NeedRingBufferLow for i855/i865 to avoid lockups on vt switches
+ (Egbert Eich).
+ 72. Check for vtSema before accessing registers in I830BIOSSaveScreen()
+ (Egbert Eich).
+ 71. Some sanity fixes for atiprobe to work better with xf86cfg: Handle
+ situation gracefully if the PCI config pointer doesn't exist
+ (Egbert Eich).
+ 70. Changed behavior of fontfile: don't drop the entire directory if some
+ fonts cannot be rendered (Egbert Eich).
+ 69. Fixed B&H bdf fonts: AVERAGE_WIDTH is not a string but an int (Mike Fabian).
+ 68. Fixed type in radeon driver which caused display to go into
+ powersaving mode when Xcursor is disabled (Bugz: 90, Michel Dänzer).
+ 67. Fixed typo in XKB-Config.sgml (Bugz: 53, Hiroyuki Bessho).
+ 66. Fix SiliconMotion driver for mode switching and SEGV problem when
+ initializing Xv functionality (Bugzilla #50, Alan Hourihane).
+ 65. Add Radeon DRI suspend/resume support (Charl Botha, #A.1431).
+ 64. Rage 128 Xv fix for high resolution displays (Rik Faith).
+ 63. PPC updates for Radeon (Michel Dänzer, Hui Yu@ATI).
+ 62. Radeon patch from ATI (Hui Yu@ATI).
+ - IGP320/330/340 support (2D only)
+ - RV280 (9200/M9+) support
+ - Fix for some M9 laptop panels
+ - Improved version of monitor detection code previously submitted
+ - Fixed bug for two or more radeon cards
+ - Man page updates
+ - Workaround for double scan modes problem at high resolutions
+ - Overlay scaling problem when RMX is used
+ 61. Fix xprop to get all windows (not only the first) in a property holding
+ a window list printed (#A.1676, Kim Woelders).
+ 60. Fix for spontaneous repeated keyboard events during sync grab (#A.1713,
+ Michal Maruska).
+ 59. Fixed DPMS problem on C&T 69000 due to incorrect LCD flag
+ (Bugzilla #101, Egbert Eich).
+ 58. Added xkb symbols layout for BTC 5090 internet keyboard
+ (Bugzilla #57, Jack Angel).
+ 57. Fix the Xinstall.sh script so that it can handle being run from a
+ directory with white space in its path name (#A.1690, Eric Branlund).
+ 56. Allow AGPGART support to be enabled for OpenBSD (#A.1684, Brian Feldman).
+ 55. Make the mouse driver check the SendDragEvents option (based on #A.1682,
+ Juuso Åberg).
+ 54. Fix a double allocation in _XTextPropertyToTextList() (#A.1681,
+ Lubos Lunak).
+ 53. Fix a typo that causes the 'yu' keymap to emit a lower case 'L' in
+ both shift states (#A.1675, Nikola Smolenski).
+ 52. Allow the remote shell command for xon to be specified from the
+ command line. This allows ssh to be used (for example) (#A.1657,
+ Mike Urban).
+ 51. Fix segfaults that can happen when using composition of RENDER and
+ non-RENDER fonts (#A.1656, Wu Jian Feng).
+ 50. Add convenient ways to enter "double quote" and "cedilla" with the
+ en_US.UTF-8 compose rules (Alexandre Oliva).
+ 49. Improve support for Wacom Cintiq boards (#A.1547, Sebastian Rittau).
+ 48. Add support for Kensington's "ValuMouse" to the mouse driver (#A.1494,
+ Roy Wood).
+ 47. Workaround for a crash that happens if a scalable font has a bitmap
+ entry in fonts.dir (#5687, Juliusz Chroboczek).
+ 46. Single/dual rasterizer quiescence patch for the glint/gamma DRI driver
+ (#5685, Sven Luther).
+ 45. Fix a FreeBSD/alpha build problem (#5679, Fred Clift).
+ 44. Fix a bug in the GLU/project.3gl man page (#5676, Thomas Klausner).
+ 43. Luit fixes:
+ - Fix a buffer overflow.
+ - Allow for holes in the pty space, and use the union of the pty
+ names in 4.4BSD and recent FreeBSD.
+ - Allow luit to be set-uid on all BSD releases, and introduce an
+ additional security fix on POSIX saved-id systems.
+ (#5672, 5674, ITO Tsuyoshi, Juliusz Chroboczek).
+ 42. Fix memory leaks in ProcXF86VidModeModModeLine and
+ ProcXF86VidModeValidateModeLine, and unintialized fields of the mode
+ structure in ProcXF86VidModeAddModeLine, VidModeCreateMode, and
+ VidModeAddModeline (#5671, Miguel Freitas).
+ 41. Fix SEGV in fbdev's mode validation (Alexandr Andreev).
+ 40. Add two more variations of Thai XKB maps (#5658,
+ Theppitak Karoonboonyanan, Visanu Euarchukiati,
+ Supphachoke Santiwichaya).
+ 39. Fix a twm crash when the window menu is used and no windows are open
+ (#5667, Matthias Scheler).
+ 38. Restore the sign of UNDERLINE_POSITION in the FreeType backend (#5665,
+ Roman Kagan).
+ 37. Check the return value of fclose() in xauth to prevent losing the
+ existing contents of an Xauthority file when there is insufficient
+ space to write the new one (#5663, Owen Taylor).
+ 36. Fix case in xmag which would cause a BadMatch during a X_GetImage for
+ single child of root class InputOnly. Also do some null pointer
+ protection (#5657, Kevin Brosius).
+ 35. Allow an arbitary message to be sent to the DDX by pressing a key
+ which has the appropriate action definition (#5519, Joe Moss).
+ 34. Add a new request to the XF86Misc extension that allows a client
+ to send an arbitrary message to the DDX, which in turn can send the
+ message to the driver. The driver may also send a string back.
+ An example of this is implemented for the radeon driver (#5518,
+ Joe Moss).
+ 33. Remove duplicate XShmGetEventBase() declaration (#5656,
+ Branden Robinson).
+ 32. Fix drag lock when using a mouse button greater than 4
+ (Bugzilla #51, Paul Elliott)
+ 31. Fix lockup on server shutdown/restart with the radeon driver
+ (Bugzilla #94, Michel Dänzer).
+ 30. Add missing symbols to reference list that show up when DRI is not
+ loaded in r128 driver (Bugzilla #83, Leif Delgass).
+ 29. Add missing symbols to reference list that show up when DRI is not
+ loaded in mga driver (Bugzilla #84, Leif Delgass).
+ 28. Various build and warning fixes (#A.1703, Peter Breitenlohner).
+ 27. Avoid overlapping strcpy() in imake.c (Dan Nelson).
+ 26. Updates for building on OS/2 (#5650, Frank Giessler).
+
+XFree86 4.3.99.1 (23 March 2003)
+ 25. Xterm patch #176 (Thomas Dickey).
+ 24. Another int10 fix. This time for adapters found at PCI:0:0:0. This
fix is particularly important for ZX1-based systems (Marc La France).
- 973. int10 fix for all ix86 non-Linux systems (Marc La France).
- 972. Fix compatibility problem between modules generated without the recent
+ 23. int10 fix for all ix86 non-Linux systems (Marc La France).
+ 22. Add preliminary support for generating HTML and PDF versions of most
+ spec documents (David Dawes).
+ 21. Use lower-case extensions uniformly for text and PostScript documents
+ (based on #4876, Branden Robinson).
+ 20. Disable cuase of SEGV's in rendition driver (Marc La France).
+ 18. Limit 440EX & 440LX based systems to 32 PCI buses (Marc La France).
+ 18. Fix typo that caused incorrect initialization of xkb memory
+ (John Heasley).
+ 17. Fix bug in trident driver that caused old Cyber 9382/9385 chipsets
+ to display half a jittered screen (Alan Hourihane).
+ 16. Add shadowfb support to XDarwin IOKit mode (Torrey T. Lyons).
+ 15. Change most of os-support/ to respect VIDMEM_READONLY (Marc La France).
+ 14. Fix compatibility problem between modules generated without the recent
setjmp/longjmp work and a server generated using glibc <= 2.2.*
(Marc La France).
- 971. setjmp/longjmp related fixes for Linux/libc5 systems (Marc La France).
- 970. Make setjmp/longjmp emulation save/restore blocked signal masks on all
+ 13. setjmp/longjmp related fixes for Linux/libc5 systems (Marc La France).
+ 12. Fix possible overflow in _XlcLocaleDirName. (Matthieu Herrb).
+ 11. Various NetBSD fixes for non-i386 (#5662, #5666 Aymeric Vincent,
+ Matthew Green, Chris Gilbert, Thomas Klausner).
+ 10. Enable native thread support on NetBSD 1.6M and later (#5597, #5660,
+ Matthias Scheler).
+ 9. Make setjmp/longjmp emulation save/restore blocked signal masks on all
libc5 & glibc systems (Marc La France).
- 969. Fix setjmp/longjmp emulation for glibc 2.2.[01] systems and remove
+ 8. Fix for non-PC keyboard bug introduced by changes to make SysRq
+ generate the same keycode as PrtScrn (Ivan Pascal).
+ 7. Workaround for problems linking C programs against libGLU on FreeBSD 3.x
+ (David Dawes).
+ 6. Make setjmp/longjmp emulation save/restore blocked signal masks on all
+ 5. Fix setjmp/longjmp emulation for glibc 2.2.[01] systems and remove
HasGlibc21Sigsetjmp override (Marc La France).
- 968. setjmp/longjmp-related compilation fixes for libc5 systems
+ 4. setjmp/longjmp-related compilation fixes for libc5 systems
(Marc La France).
- 967. Fix possible overflow in _XlcLocaleDirName. (Matthieu Herrb).
- 966. Fix XDarwin build broken by #960 (Shantonu Sen).
- 965. Fix StaticColor colormap on Darwin/x86 6.x (Rob Braun).
+ 3. Fix minor glitch in the generation of Makefiles for libraries that don't
+ need threads support (Marc La France).
+ 2. Fix XDarwin build broken by #960 (Shantonu Sen).
+ 1. Fix StaticColor colormap on Darwin/x86 6.x (Rob Braun).
XFree86 4.3.0 (27 February 2003)
964. Add an imake option to allow the glibc21-style setjmp() behaviour
@@ -91,7 +1741,7 @@ XFree86 4.3.0 (27 February 2003)
ARGB cursors by always using the ARGB mode (#A.1639, Michel Dänzer and
Fredrik Höglund).
944. Fix rootless XDarwin crash when trying to GetImage with a rectangle
- bigger then the associated top level window (Apple).
+ bigger then the associated top level window (John Harper).
943. Add support for multi-head on ZX1-based Itanium2 systems (Marc La France
with documentation and assistance from Hewlett-Packard).
942. Correctly initialize the RE_LINE_PATTERN register in the radeon
@@ -443,14 +2093,14 @@ XFree86 4.2.99.901 (4 February 2003)
797. Fix for memory fences on PowerPC (Marc La France).
796. Work-around for Radeon int10 problems (Marc La France).
795. Fix XDarwin crash in rootless mode with 16-bit color by ensuring that
- window pixmap pointers are 32-bit aligned (Apple, Torrey T. Lyons).
+ window pixmap pointers are 32-bit aligned (John Harper, Torrey T. Lyons).
794. Update the i810 2D driver and i830 3D drivers to recognise and handle
the Intel 852GM/855GM integrated graphics chipsets (David Dawes,
Keith Whitwell).
793. Force extension-generated mode switches always occur (Marc La France).
792. Fix OS/2 library build problem (Frank Giessler).
791. Fix bug that at times prevented recognition of resources decoded on PCI
- root busses (Marc La France).
+ root buses (Marc La France).
790. Fix XDarwin's spurious transparent regions in rootless windows
(Torrey T. Lyons).
789. Fix bug in recognition of certain ix86 Host-to-PCI bridges
@@ -483,7 +2133,7 @@ XFree86 4.2.99.901 (4 February 2003)
(#A.1539, Juergen Keil).
773. Fix artifacts left by XDarwin when reshaping a shaped window (reported
by Adrian Umpleby).
- 772. Fix XDarwin rootless crash when resizing a window (Apple).
+ 772. Fix XDarwin rootless crash when resizing a window (John Harper).
771. Fix vbe module to not assume BIOS call results are zero-extended
(Paulo Cesar Pereira de Andrade).
770. Fix improper initialisation of pciConfigRec's. Reported by Marcel
@@ -495,7 +2145,7 @@ XFree86 4.2.99.901 (4 February 2003)
(reported by Alexis Vartanian).
XFree86 4.2.99.4 (20 January 2003)
- 766. Fix XDarwin's rootless mode with 16-bit color (Apple).
+ 766. Fix XDarwin's rootless mode with 16-bit color (John Harper).
765. Allow UTF8 conversion to work for Japanese locales (#A.1527,
Etsushi Kato).
764. Add a method for working around a problem that can show up when
@@ -16580,7 +18230,7 @@ XFree86 3.0a (28 April 1994)
XFree86 3.0 (26 April 1994)
-$XFree86: xc/programs/Xserver/hw/xfree86/CHANGELOG,v 3.2588.2.13 2003/05/10 01:12:56 dawes Exp $
+$XFree86: xc/programs/Xserver/hw/xfree86/CHANGELOG,v 3.2982 2003/11/21 06:01:42 dawes Exp $
diff --git a/hw/xfree86/doc/devel/README.DRIcomp b/hw/xfree86/doc/devel/README.DRIcomp
index 1e9773ccc..0f1bd1b69 100644
--- a/hw/xfree86/doc/devel/README.DRIcomp
+++ b/hw/xfree86/doc/devel/README.DRIcomp
@@ -374,6 +374,13 @@ a 2.4.x kernel, you should add the following:
#define MesaUseSSE YES
+If you want to build the DRM kernel modules as part of the full build pro-
+cess, add the following:
+
+ #define BuildXF86DRM YES
+
+Otherwise, you'll need to build them separately as described below.
+
8.3 Compilation
To compile the complete DRI tree:
@@ -401,11 +408,21 @@ work with XFree86/DRI.
Using your text editor, examine world.log for errors by searching for the
pattern ***.
-Verify that the DRI kernel module(s) for your system were built:
+After fixing the errors, run make World again. Later, you might just compile
+parts of the source tree but it's important that the whole tree will build
+first.
+
+If you edited your host.def file to enable automatic building of the DRI ker-
+nel module(s), verify that they were built:
cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel
ls
+Otherwise, build them now by running
+
+ cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel
+ make -f Makefile.linux
+
For the 3dfx Voodoo, you should see tdfx.o. For the Matrox G200/G400, you
should see mga.o. For the ATI Rage 128, you should see r128.o. For the ATI
Radeon, you should see radeon.o. For the Intel i810, you should see i810.o.
@@ -416,17 +433,14 @@ always supported.
If your build machine is running a different version of the kernel than your
target machine (i.e. 2.2.x vs. 2.4.x), make will select the wrong kernel
-headers. This can be fixed by explicitly setting the value of TREE. If the
-path to your kernel source is /usr/src/linux-2.4.x,
+source tree. This can be fixed by explicitly setting the value of LINUXDIR.
+If the path to your kernel source is /usr/src/linux-2.4.x,
cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel
- make TREE=/usr/src/linux-2.4.x/include
-
-or alternatively, edit Makefile to include this change.
+ make -f Makefile.linux LINUXDIR=/usr/src/linux-2.4.x
-After fixing the errors, run make World again. Later, you might just compile
-parts of the source tree but it's important that the whole tree will build
-first.
+or alternatively, edit Makefile.linux to set LINUXDIR before the ifndef LIN-
+UXDIR line.
8.5 DRI kernel module installation
@@ -537,7 +551,7 @@ At this point your X server should be up and running with hardware-acceler-
ated direct rendering. Please read the DRI User Guide for information about
trouble shooting and how to use the DRI-enabled X server for 3D applications.
- Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DRIcomp.sgml,v 1.19 2002/11/26 01:05:50 dawes Exp $
+ Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DRIcomp.sgml,v 1.20 dawes Exp $
-$XFree86: xc/programs/Xserver/hw/xfree86/doc/README.DRIcomp,v 3.16 2002/11/26 02:24:01 dawes Exp $
+$XFree86: xc/programs/Xserver/hw/xfree86/doc/README.DRIcomp,v 3.17 2003/07/15 02:28:28 dawes Exp $
diff --git a/hw/xfree86/doc/sgml/DESIGN.sgml b/hw/xfree86/doc/sgml/DESIGN.sgml
index 322ab00e0..365acaf1a 100644
--- a/hw/xfree86/doc/sgml/DESIGN.sgml
+++ b/hw/xfree86/doc/sgml/DESIGN.sgml
@@ -36,7 +36,7 @@
<ident>
-$XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DESIGN.sgml,v 1.52 2003/02/25 19:31:00 dawes Exp $
+$XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DESIGN.sgml,v 1.53 2003/08/23 14:10:14 dawes Exp $
</ident>
@@ -6784,11 +6784,13 @@ ZZZPreInit(ScrnInfoPtr pScrn, int flags)
*/
/*
- * Set the depth/bpp. Our preferred default depth/bpp is 8, and
- * we support both 24bpp and 32bpp framebuffer layouts.
+ * Set the depth/bpp. Use the globally preferred depth/bpp. If the
+ * driver has special default depth/bpp requirements, the defaults should
+ * be specified here explicitly.
+ * We support both 24bpp and 32bpp framebuffer layouts.
* This sets pScrn->display also.
*/
- if (!xf86SetDepthBpp(pScrn, 8, 8, 8,
+ if (!xf86SetDepthBpp(pScrn, 0, 0, 0,
Support24bppFb | Support32bppFb)) {
return FALSE;
} else {
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index b08379099..409ada437 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.38 2002/11/20 18:10:24 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.39 2003/11/10 18:21:41 tsi Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -1557,7 +1557,7 @@ DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
if(pDRIPriv->nrWindows > 0) {
RegionRec reg;
- REGION_INIT(pScreen, &reg, NullBox, 0);
+ REGION_NULL(pScreen, &reg);
TraverseTree(pWin, DRITreeTraversal, (pointer)(&reg));
if(REGION_NOTEMPTY(pScreen, &reg)) {
diff --git a/hw/xfree86/dri/sarea.h b/hw/xfree86/dri/sarea.h
index 99c04b9e9..fcb4b59bd 100644
--- a/hw/xfree86/dri/sarea.h
+++ b/hw/xfree86/dri/sarea.h
@@ -1,40 +1,41 @@
-/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.11 2002/10/30 12:52:03 alanh Exp $ */
-/**************************************************************************
-
-Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
-Copyright 2000 VA Linux Systems, 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.
-
-**************************************************************************/
+/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.12 2003/09/28 20:15:41 alanh Exp $ */
+/**
+ * \file sarea.h
+ * SAREA definitions.
+ *
+ * \author Kevin E. Martin <kevin@precisioninsight.com>
+ * \author Jens Owen <jens@tungstengraphics.com>
+ * \author Rickard E. (Rik) Faith <faith@valinux.com>
+ */
/*
- * Authors:
- * Kevin E. Martin <kevin@precisioninsight.com>
- * Jens Owen <jens@tungstengraphics.com>
- * Rickard E. (Rik) Faith <faith@valinux.com>
- *
+ * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, 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.
*/
+/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.12 2003/09/28 20:15:41 alanh Exp $ */
+
#ifndef _SAREA_H_
#define _SAREA_H_
@@ -54,11 +55,21 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000
+/**
+ * SAREA per drawable information.
+ *
+ * \sa _XF86DRISAREA.
+ */
typedef struct _XF86DRISAREADrawable {
unsigned int stamp;
unsigned int flags;
} XF86DRISAREADrawableRec, *XF86DRISAREADrawablePtr;
+/**
+ * SAREA frame information.
+ *
+ * \sa _XF86DRISAREA.
+ */
typedef struct _XF86DRISAREAFrame {
unsigned int x;
unsigned int y;
@@ -67,10 +78,13 @@ typedef struct _XF86DRISAREAFrame {
unsigned int fullscreen;
} XF86DRISAREAFrameRec, *XF86DRISAREAFramePtr;
+/**
+ * SAREA definition.
+ */
typedef struct _XF86DRISAREA {
- /* first thing is always the drm locking structure */
+ /** first thing is always the DRM locking structure */
drmLock lock;
- /* NOT_DONE: Use readers/writer lock for drawable_lock */
+ /** \todo Use readers/writer lock for drawable_lock */
drmLock drawable_lock;
XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES];
XF86DRISAREAFrameRec frame;
diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index 7920b217d..3df0cca59 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/GL/dri/xf86dri.c,v 1.12 2002/12/14 01:36:08 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/GL/dri/xf86dri.c,v 1.13 2003/09/24 02:43:12 dawes Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -241,7 +241,7 @@ ProcXF86DRIAuthConnection(
rep.authenticated = 1;
if (!DRIAuthConnection( screenInfo.screens[stuff->screen], stuff->magic)) {
- ErrorF("Failed to authenticate %u\n", stuff->magic);
+ ErrorF("Failed to authenticate %lu\n", (unsigned long)stuff->magic);
rep.authenticated = 0;
}
WriteToClient(client, sizeof(xXF86DRIAuthConnectionReply), (char *)&rep);
diff --git a/hw/xfree86/dummylib/dummylib.h b/hw/xfree86/dummylib/dummylib.h
index 4b685e272..d8a0d285a 100644
--- a/hw/xfree86/dummylib/dummylib.h
+++ b/hw/xfree86/dummylib/dummylib.h
@@ -1,8 +1,6 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/dummylib/dummylib.h,v 1.1 2000/02/13 03:06:38 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/dummylib/dummylib.h,v 1.2 2003/09/09 03:20:38 dawes Exp $ */
#ifndef _DUMMY_LIB_H
#define _DUMMY_LIB_H
-extern void VErrorFVerb(int verb, const char *format, va_list ap);
-
#endif /* _DUMMY_LIB_H */
diff --git a/hw/xfree86/dummylib/xf86drvmsg.c b/hw/xfree86/dummylib/xf86drvmsg.c
index ffcefd6bf..5780d9c13 100644
--- a/hw/xfree86/dummylib/xf86drvmsg.c
+++ b/hw/xfree86/dummylib/xf86drvmsg.c
@@ -1,10 +1,9 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/dummylib/xf86drvmsg.c,v 1.1 2000/02/13 03:06:40 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/dummylib/xf86drvmsg.c,v 1.2 2003/09/09 03:20:38 dawes Exp $ */
#include "X.h"
#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
-#include "dummylib.h"
/*
* Utility functions required by libxf86_os.
@@ -16,7 +15,7 @@ xf86DrvMsg(int i, MessageType type, const char *format, ...)
va_list ap;
va_start(ap, format);
- VErrorFVerb(1, format, ap);
+ LogVWrite(1, format, ap);
va_end(ap);
}
diff --git a/hw/xfree86/dummylib/xf86drvmsgverb.c b/hw/xfree86/dummylib/xf86drvmsgverb.c
index f59c42abf..b7c0ddb53 100644
--- a/hw/xfree86/dummylib/xf86drvmsgverb.c
+++ b/hw/xfree86/dummylib/xf86drvmsgverb.c
@@ -1,10 +1,9 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/dummylib/xf86drvmsgverb.c,v 1.1 2000/02/13 03:06:40 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/dummylib/xf86drvmsgverb.c,v 1.2 2003/09/09 03:20:38 dawes Exp $ */
#include "X.h"
#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
-#include "dummylib.h"
/*
* Utility functions required by libxf86_os.
@@ -16,7 +15,7 @@ xf86DrvMsgVerb(int i, MessageType type, int verb, const char *format, ...)
va_list ap;
va_start(ap, format);
- VErrorFVerb(verb, format, ap);
+ LogVWrite(verb, format, ap);
va_end(ap);
}
diff --git a/hw/xfree86/dummylib/xf86errorf.c b/hw/xfree86/dummylib/xf86errorf.c
index 072f639ca..122f46d43 100644
--- a/hw/xfree86/dummylib/xf86errorf.c
+++ b/hw/xfree86/dummylib/xf86errorf.c
@@ -1,10 +1,9 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/dummylib/xf86errorf.c,v 1.2 2000/05/31 07:15:05 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/dummylib/xf86errorf.c,v 1.3 2003/09/09 03:20:38 dawes Exp $ */
#include "X.h"
#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
-#include "dummylib.h"
/*
* Utility functions required by libxf86_os.
@@ -16,7 +15,7 @@ xf86ErrorF(const char *format, ...)
va_list ap;
va_start(ap, format);
- VErrorFVerb(1, format, ap);
+ LogVWrite(1, format, ap);
va_end(ap);
}
@@ -26,6 +25,6 @@ ErrorF(const char *format, ...)
va_list ap;
va_start(ap, format);
- VErrorFVerb(1, format, ap);
+ LogVWrite(1, format, ap);
va_end(ap);
}
diff --git a/hw/xfree86/dummylib/xf86errorfverb.c b/hw/xfree86/dummylib/xf86errorfverb.c
index 61bff15a5..61c3e02a2 100644
--- a/hw/xfree86/dummylib/xf86errorfverb.c
+++ b/hw/xfree86/dummylib/xf86errorfverb.c
@@ -1,10 +1,9 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/dummylib/xf86errorfverb.c,v 1.1 2000/02/13 03:06:41 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/dummylib/xf86errorfverb.c,v 1.2 2003/09/09 03:20:38 dawes Exp $ */
#include "X.h"
#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
-#include "dummylib.h"
/*
* Utility functions required by libxf86_os.
@@ -16,7 +15,7 @@ xf86ErrorFVerb(int verb, const char *format, ...)
va_list ap;
va_start(ap, format);
- VErrorFVerb(verb, format, ap);
+ LogVWrite(verb, format, ap);
va_end(ap);
}
diff --git a/hw/xfree86/dummylib/xf86msg.c b/hw/xfree86/dummylib/xf86msg.c
index bc8c76626..2d36bea97 100644
--- a/hw/xfree86/dummylib/xf86msg.c
+++ b/hw/xfree86/dummylib/xf86msg.c
@@ -1,10 +1,9 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/dummylib/xf86msg.c,v 1.1 2000/02/13 03:06:42 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/dummylib/xf86msg.c,v 1.2 2003/09/09 03:20:38 dawes Exp $ */
#include "X.h"
#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
-#include "dummylib.h"
/*
* Utility functions required by libxf86_os.
@@ -16,7 +15,7 @@ xf86Msg(MessageType type, const char *format, ...)
va_list ap;
va_start(ap, format);
- VErrorFVerb(1, format, ap);
+ LogVWrite(1, format, ap);
va_end(ap);
}
diff --git a/hw/xfree86/dummylib/xf86msgverb.c b/hw/xfree86/dummylib/xf86msgverb.c
index b9e343fd9..f460b6b9f 100644
--- a/hw/xfree86/dummylib/xf86msgverb.c
+++ b/hw/xfree86/dummylib/xf86msgverb.c
@@ -1,10 +1,9 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/dummylib/xf86msgverb.c,v 1.1 2000/02/13 03:06:42 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/dummylib/xf86msgverb.c,v 1.2 2003/09/09 03:20:38 dawes Exp $ */
#include "X.h"
#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
-#include "dummylib.h"
/*
* Utility functions required by libxf86_os.
@@ -16,7 +15,7 @@ xf86MsgVerb(MessageType type, int verb, const char *format, ...)
va_list ap;
va_start(ap, format);
- VErrorFVerb(verb, format, ap);
+ LogVWrite(verb, format, ap);
va_end(ap);
}
diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index a90fff34c..752cdb044 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/fbdevhw/fbdevhw.c,v 1.30 2002/11/25 14:05:00 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/fbdevhw/fbdevhw.c,v 1.33 2003/10/30 17:37:16 tsi Exp $ */
/* all driver need this */
#include "xf86.h"
@@ -462,7 +462,7 @@ fbdevHWSetVideoModes(ScrnInfoPtr pScrn)
int virtY = pScrn->display->virtualY;
struct fb_var_screeninfo var;
char **modename;
- DisplayModePtr mode,this,last = NULL;
+ DisplayModePtr mode,this,last = pScrn->modes;
TRACE_ENTER("VerifyModes");
if (NULL == pScrn->display->modes)
@@ -542,7 +542,7 @@ fbdevHWUseBuildinMode(ScrnInfoPtr pScrn)
/* -------------------------------------------------------------------- */
-void
+static void
calculateFbmem_len(fbdevHWPtr fPtr)
{
fPtr->fboff = (unsigned long) fPtr->fix.smem_start & ~PAGE_MASK;
@@ -747,7 +747,7 @@ fbdevHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
/* -------------------------------------------------------------------- */
/* these can be hooked directly into ScrnInfoRec */
-int
+ModeStatus
fbdevHWValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
@@ -789,6 +789,11 @@ fbdevHWAdjustFrame(int scrnIndex, int x, int y, int flags)
fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);
TRACE_ENTER("AdjustFrame");
+
+ if ( x < 0 || x + fPtr->var.xres > fPtr->var.xres_virtual ||
+ y < 0 || y + fPtr->var.yres > fPtr->var.yres_virtual )
+ return;
+
fPtr->var.xoffset = x;
fPtr->var.yoffset = y;
if (-1 == ioctl(fPtr->fd,FBIOPAN_DISPLAY,(void*)&fPtr->var))
diff --git a/hw/xfree86/fbdevhw/fbdevhw.h b/hw/xfree86/fbdevhw/fbdevhw.h
index 78a5b5882..cfc47f905 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.h
+++ b/hw/xfree86/fbdevhw/fbdevhw.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/fbdevhw/fbdevhw.h,v 1.11 2001/10/01 13:44:12 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/fbdevhw/fbdevhw.h,v 1.12 2003/10/30 17:37:16 tsi Exp $ */
#ifndef _FBDEVHW_H_
#define _FBDEVHW_H_
@@ -40,7 +40,7 @@ void fbdevHWRestore(ScrnInfoPtr pScrn);
void fbdevHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
LOCO *colors, VisualPtr pVisual);
-int fbdevHWValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags);
+ModeStatus fbdevHWValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags);
Bool fbdevHWSwitchMode(int scrnIndex, DisplayModePtr mode, int flags);
void fbdevHWAdjustFrame(int scrnIndex, int x, int y, int flags);
Bool fbdevHWEnterVT(int scrnIndex, int flags);
diff --git a/hw/xfree86/fbdevhw/fbdevhwstub.c b/hw/xfree86/fbdevhw/fbdevhwstub.c
index 02086ef8f..b262be90f 100644
--- a/hw/xfree86/fbdevhw/fbdevhwstub.c
+++ b/hw/xfree86/fbdevhw/fbdevhwstub.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/fbdevhw/fbdevhwstub.c,v 1.12 2001/10/28 03:33:55 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/fbdevhw/fbdevhwstub.c,v 1.13 2003/10/30 17:37:16 tsi Exp $ */
#include "xf86.h"
#include "xf86cmap.h"
@@ -130,7 +130,7 @@ fbdevHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
{
}
-int
+ModeStatus
fbdevHWValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
{
return MODE_ERROR;
diff --git a/hw/xfree86/i2c/xf86i2c.c b/hw/xfree86/i2c/xf86i2c.c
index 494f9303b..a7f5adf1a 100644
--- a/hw/xfree86/i2c/xf86i2c.c
+++ b/hw/xfree86/i2c/xf86i2c.c
@@ -6,7 +6,7 @@
* (c) 1998 Gerd Knorr <kraxel@cs.tu-berlin.de>
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/i2c/xf86i2c.c,v 1.13 2002/09/16 18:06:07 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/i2c/xf86i2c.c,v 1.15 2003/08/29 21:08:06 tsi Exp $ */
#if 1
#include "misc.h"
@@ -750,7 +750,7 @@ xf86DestroyI2CBusRec(I2CBusPtr b, Bool unalloc, Bool devs_too)
if (b) {
I2CBusPtr *p;
- /* Remove this from the list of active I2C busses. */
+ /* Remove this from the list of active I2C buses */
for (p = &I2CBusList; *p != NULL; p = &(*p)->NextBus)
if (*p == b) {
@@ -794,7 +794,7 @@ xf86DestroyI2CBusRec(I2CBusPtr b, Bool unalloc, Bool devs_too)
Bool
xf86I2CBusInit(I2CBusPtr b)
{
- /* I2C busses must be identified by a unique scrnIndex
+ /* I2C buses must be identified by a unique scrnIndex
* and name. If scrnIndex is unspecified (a negative value),
* then the name must be unique throughout the server.
*/
@@ -861,3 +861,32 @@ xf86I2CFindBus(int scrnIndex, char *name)
return NULL;
}
+
+/*
+ * Return an array of I2CBusPtr's related to a screen. The caller is
+ * responsible for freeing the array.
+ */
+int
+xf86I2CGetScreenBuses(int scrnIndex, I2CBusPtr **pppI2CBus)
+{
+ I2CBusPtr pI2CBus;
+ int n = 0;
+
+ if (pppI2CBus)
+ *pppI2CBus = NULL;
+
+ for (pI2CBus = I2CBusList; pI2CBus; pI2CBus = pI2CBus->NextBus) {
+ if ((pI2CBus->scrnIndex >= 0) && (pI2CBus->scrnIndex != scrnIndex))
+ continue;
+
+ n++;
+
+ if (!pppI2CBus)
+ continue;
+
+ *pppI2CBus = xnfrealloc(*pppI2CBus, n * sizeof(I2CBusPtr));
+ *pppI2CBus[n - 1] = pI2CBus;
+ }
+
+ return n;
+}
diff --git a/hw/xfree86/i2c/xf86i2c.h b/hw/xfree86/i2c/xf86i2c.h
index 42b68a179..e7423155a 100644
--- a/hw/xfree86/i2c/xf86i2c.h
+++ b/hw/xfree86/i2c/xf86i2c.h
@@ -2,11 +2,11 @@
* Copyright (C) 1998 Itai Nahshon, Michael Schimek
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/i2c/xf86i2c.h,v 1.8 2001/07/19 14:19:40 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/i2c/xf86i2c.h,v 1.11 2003/08/29 21:08:06 tsi Exp $ */
#ifndef _XF86I2C_H
#define _XF86I2C_H
-#include "miscstruct.h"
+#include "regionstr.h"
typedef unsigned char I2CByte;
typedef unsigned short I2CSlaveAddr;
@@ -52,6 +52,8 @@ I2CBusPtr xf86CreateI2CBusRec(void);
void xf86DestroyI2CBusRec(I2CBusPtr pI2CBus, Bool unalloc, Bool devs_too);
Bool xf86I2CBusInit(I2CBusPtr pI2CBus);
I2CBusPtr xf86I2CFindBus(int scrnIndex, char *name);
+int xf86I2CGetScreenBuses(int scrnIndex, I2CBusPtr **pppI2CBus);
+
/* I2C slave devices */
diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c
index d481f000d..845c8a177 100644
--- a/hw/xfree86/int10/generic.c
+++ b/hw/xfree86/int10/generic.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/generic.c,v 1.25.2.1 2003/03/20 15:14:25 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/generic.c,v 1.29 2003/09/24 02:43:33 dawes Exp $ */
/*
* XFree86 int10 module
* execute BIOS int 10h calls in x86 real mode environment
@@ -139,20 +139,22 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
if (bios.bus == BUS_ISA && bios.location.legacy) {
xf86DrvMsg(screen, X_CONFIG,
- "Overriding BIOS location: 0x%lx\n",
+ "Overriding BIOS location: 0x%x\n",
bios.location.legacy);
cs = bios.location.legacy >> 4;
#define CHECK_V_SEGMENT_RANGE(x) \
- if ((x << 4) < V_BIOS) {\
+ if (((x) << 4) < V_BIOS) {\
xf86DrvMsg(screen, X_ERROR, \
- "V_BIOS address 0x%x out of range\n",x << 4); \
+ "V_BIOS address 0x%lx out of range\n", \
+ (unsigned long)(x) << 4); \
goto error1; \
}
CHECK_V_SEGMENT_RANGE(cs);
vbiosMem = (unsigned char *)sysMem - V_BIOS + (cs << 4);
if (!int10_check_bios(screen, cs, vbiosMem)) {
xf86DrvMsg(screen, X_ERROR,
- "No V_BIOS at specified address 0x%x\n",cs << 4);
+ "No V_BIOS at specified address 0x%lx\n",
+ (unsigned long)cs << 4);
goto error1;
}
} else {
@@ -182,7 +184,8 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
}
}
- xf86DrvMsg(screen, X_INFO, "Primary V_BIOS segment is: 0x%x\n", cs);
+ xf86DrvMsg(screen, X_INFO, "Primary V_BIOS segment is: 0x%lx\n",
+ (unsigned long)cs);
set_return_trap(pInt);
pInt->BIOSseg = cs;
diff --git a/hw/xfree86/int10/helper_exec.c b/hw/xfree86/int10/helper_exec.c
index 2d6c0eb24..7528fea0e 100644
--- a/hw/xfree86/int10/helper_exec.c
+++ b/hw/xfree86/int10/helper_exec.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/helper_exec.c,v 1.24 2002/11/25 21:05:49 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/helper_exec.c,v 1.26 2003/11/06 18:38:12 tsi Exp $ */
/*
* XFree86 int10 module
* execute BIOS int 10h calls in x86 real mode environment
@@ -145,7 +145,7 @@ void
dump_code(xf86Int10InfoPtr pInt)
{
int i;
- CARD32 lina = SEG_ADR((CARD32), X86_CS, IP);
+ unsigned long lina = SEG_ADR((CARD32), X86_CS, IP);
xf86DrvMsgVerb(pInt->scrnIndex, X_INFO, 3, "code at 0x%8.8lx:\n", lina);
for (i=0; i<0x10; i++)
@@ -160,25 +160,28 @@ void
dump_registers(xf86Int10InfoPtr pInt)
{
xf86DrvMsgVerb(pInt->scrnIndex, X_INFO, 3,
- "EAX=0x%8.8x, EBX=0x%8.8x, ECX=0x%8.8x, EDX=0x%8.8x\n",
- X86_EAX, X86_EBX, X86_ECX, X86_EDX);
+ "EAX=0x%8.8lx, EBX=0x%8.8lx, ECX=0x%8.8lx, EDX=0x%8.8lx\n",
+ (unsigned long)X86_EAX, (unsigned long)X86_EBX,
+ (unsigned long)X86_ECX, (unsigned long)X86_EDX);
xf86DrvMsgVerb(pInt->scrnIndex, X_INFO, 3,
- "ESP=0x%8.8x, EBP=0x%8.8x, ESI=0x%8.8x, EDI=0x%8.8x\n",
- X86_ESP, X86_EBP, X86_ESI, X86_EDI);
+ "ESP=0x%8.8lx, EBP=0x%8.8lx, ESI=0x%8.8lx, EDI=0x%8.8lx\n",
+ (unsigned long)X86_ESP, (unsigned long)X86_EBP,
+ (unsigned long)X86_ESI, (unsigned long)X86_EDI);
xf86DrvMsgVerb(pInt->scrnIndex, X_INFO, 3,
"CS=0x%4.4x, SS=0x%4.4x,"
" DS=0x%4.4x, ES=0x%4.4x, FS=0x%4.4x, GS=0x%4.4x\n",
X86_CS, X86_SS, X86_DS, X86_ES, X86_FS, X86_GS);
xf86DrvMsgVerb(pInt->scrnIndex, X_INFO, 3,
- "EIP=0x%8.8x, EFLAGS=0x%8.8x\n", X86_EIP, X86_EFLAGS);
+ "EIP=0x%8.8lx, EFLAGS=0x%8.8lx\n",
+ (unsigned long)X86_EIP, (unsigned long)X86_EFLAGS);
}
void
stack_trace(xf86Int10InfoPtr pInt)
{
int i = 0;
- CARD32 stack = SEG_ADR((CARD32), X86_SS, SP);
- CARD32 tail = (CARD32)((X86_SS << 4) + 0x1000);
+ unsigned long stack = SEG_ADR((CARD32), X86_SS, SP);
+ unsigned long tail = (CARD32)((X86_SS << 4) + 0x1000);
if (stack >= tail) return;
diff --git a/hw/xfree86/int10/xf86int10.c b/hw/xfree86/int10/xf86int10.c
index d6c5d1f43..a74bbeacd 100644
--- a/hw/xfree86/int10/xf86int10.c
+++ b/hw/xfree86/int10/xf86int10.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/xf86int10.c,v 1.10.2.1 2003/03/21 22:29:59 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/xf86int10.c,v 1.11 2003/03/21 22:26:11 tsi Exp $ */
/*
* XFree86 int10 module
* execute BIOS int 10h calls in x86 real mode environment
diff --git a/hw/xfree86/loader/aout.h b/hw/xfree86/loader/aout.h
index 2e58f2cab..cd7807531 100644
--- a/hw/xfree86/loader/aout.h
+++ b/hw/xfree86/loader/aout.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/aout.h,v 1.7 2002/05/31 18:46:00 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/aout.h,v 1.8 2003/10/15 16:29:02 dawes Exp $ */
/*
* Borrowed from NetBSD's exec_aout.h
@@ -41,8 +41,8 @@
#include <ctype.h>
/* OS/2 EMX has ntohl in this file */
-#ifdef __UNIXOS2__
-#include <sys/param.h>
+#ifdef __UNIXOS2__
+#include <sys/param.h>
#endif
#define __LDPGSZ 4096U
@@ -54,44 +54,44 @@
* a.out header
*/
typedef struct AOUT_exec {
- unsigned long a_midmag; /* htonl(flags<<26 | mid<<16 | magic) */
- unsigned long a_text; /* text segment size */
- unsigned long a_data; /* initialized data size */
- unsigned long a_bss; /* uninitialized data size */
- unsigned long a_syms; /* symbol table size */
- unsigned long a_entry; /* entry point */
- unsigned long a_trsize; /* text relocation size */
- unsigned long a_drsize; /* data relocation size */
+ unsigned long a_midmag; /* htonl(flags<<26 | mid<<16 | magic) */
+ unsigned long a_text; /* text segment size */
+ unsigned long a_data; /* initialized data size */
+ unsigned long a_bss; /* uninitialized data size */
+ unsigned long a_syms; /* symbol table size */
+ unsigned long a_entry; /* entry point */
+ unsigned long a_trsize; /* text relocation size */
+ unsigned long a_drsize; /* data relocation size */
} AOUTHDR;
/* a_magic */
-#define OMAGIC 0407 /* old impure format */
-#define NMAGIC 0410 /* read-only text */
-#define ZMAGIC 0413 /* demand load format */
-#define QMAGIC 0314 /* "compact" demand load format; deprecated */
+#define OMAGIC 0407 /* old impure format */
+#define NMAGIC 0410 /* read-only text */
+#define ZMAGIC 0413 /* demand load format */
+#define QMAGIC 0314 /* "compact" demand load format; deprecated */
/*
* a_mid - keep sorted in numerical order for sanity's sake
* ensure that: 0 < mid < 0x3ff
*/
-#define MID_ZERO 0 /* unknown - implementation dependent */
-#define MID_SUN010 1 /* sun 68010/68020 binary */
-#define MID_SUN020 2 /* sun 68020-only binary */
-#define MID_PC386 100 /* 386 PC binary. (so quoth BFD) */
-#define MID_HP200 200 /* hp200 (68010) BSD binary */
-#define MID_I386 134 /* i386 BSD binary */
-#define MID_M68K 135 /* m68k BSD binary with 8K page sizes */
-#define MID_M68K4K 136 /* m68k BSD binary with 4K page sizes */
-#define MID_NS32532 137 /* ns32532 */
-#define MID_SPARC 138 /* sparc */
-#define MID_PMAX 139 /* pmax */
-#define MID_VAX 140 /* vax */
-#define MID_ALPHA 141 /* Alpha BSD binary */
-#define MID_MIPS 142 /* big-endian MIPS */
-#define MID_ARM6 143 /* ARM6 */
-#define MID_HP300 300 /* hp300 (68020+68881) BSD binary */
-#define MID_HPUX 0x20C /* hp200/300 HP-UX binary */
-#define MID_HPUX800 0x20B /* hp800 HP-UX binary */
+#define MID_ZERO 0 /* unknown - implementation dependent */
+#define MID_SUN010 1 /* sun 68010/68020 binary */
+#define MID_SUN020 2 /* sun 68020-only binary */
+#define MID_PC386 100 /* 386 PC binary. (so quoth BFD) */
+#define MID_HP200 200 /* hp200 (68010) BSD binary */
+#define MID_I386 134 /* i386 BSD binary */
+#define MID_M68K 135 /* m68k BSD binary with 8K page sizes */
+#define MID_M68K4K 136 /* m68k BSD binary with 4K page sizes */
+#define MID_NS32532 137 /* ns32532 */
+#define MID_SPARC 138 /* sparc */
+#define MID_PMAX 139 /* pmax */
+#define MID_VAX 140 /* vax */
+#define MID_ALPHA 141 /* Alpha BSD binary */
+#define MID_MIPS 142 /* big-endian MIPS */
+#define MID_ARM6 143 /* ARM6 */
+#define MID_HP300 300 /* hp300 (68020+68881) BSD binary */
+#define MID_HPUX 0x20C /* hp200/300 HP-UX binary */
+#define MID_HPUX800 0x20B /* hp800 HP-UX binary */
/*
* a_flags
@@ -179,19 +179,19 @@ typedef struct AOUT_exec {
#define AOUT_STROFF(ex) \
(AOUT_SYMOFF(ex) + (ex)->a_syms)
-
/* Relocation format. */
struct relocation_info_i386 {
- int r_address; /* offset in text or data segment */
- unsigned int r_symbolnum : 24, /* ordinal number of add symbol */
- r_pcrel : 1, /* 1 if value should be pc-relative */
- r_length : 2, /* log base 2 of value's width */
- r_extern : 1, /* 1 if need to add symbol to value */
- r_baserel : 1, /* linkage table relative */
- r_jmptable : 1, /* relocate to jump table */
- r_relative : 1, /* load address relative */
- r_copy : 1; /* run time copy */
+ int r_address; /* offset in text or data segment */
+ unsigned int r_symbolnum:24, /* ordinal number of add symbol */
+ r_pcrel:1, /* 1 if value should be pc-relative */
+ r_length:2, /* log base 2 of value's width */
+ r_extern:1, /* 1 if need to add symbol to value */
+ r_baserel:1, /* linkage table relative */
+ r_jmptable:1, /* relocate to jump table */
+ r_relative:1, /* load address relative */
+ r_copy:1; /* run time copy */
};
+
#define relocation_info relocation_info_i386
/*
@@ -200,33 +200,32 @@ struct relocation_info_i386 {
*/
typedef struct AOUT_nlist {
union {
- char *n_name; /* symbol name (in memory) */
- long n_strx; /* file string table offset (on disk) */
+ char *n_name; /* symbol name (in memory) */
+ long n_strx; /* file string table offset (on disk) */
} n_un;
-
-#define AOUT_UNDF 0x00 /* undefined */
-#define AOUT_ABS 0x02 /* absolute address */
-#define AOUT_TEXT 0x04 /* text segment */
-#define AOUT_DATA 0x06 /* data segment */
-#define AOUT_BSS 0x08 /* bss segment */
-#define AOUT_INDR 0x0a /* alias definition */
-#define AOUT_SIZE 0x0c /* pseudo type, defines a symbol's size */
-#define AOUT_COMM 0x12 /* common reference */
-#define AOUT_FN 0x1e /* file name (AOUT_EXT on) */
-#define AOUT_WARN 0x1e /* warning message (AOUT_EXT off) */
-
-#define AOUT_EXT 0x01 /* external (global) bit, OR'ed in */
-#define AOUT_TYPE 0x1e /* mask for all the type bits */
- unsigned char n_type; /* type defines */
-
- char n_other; /* spare */
-#define n_hash n_desc /* used internally by ld(1); XXX */
- short n_desc; /* used by stab entries */
- unsigned long n_value; /* address/value of the symbol */
+#define AOUT_UNDF 0x00 /* undefined */
+#define AOUT_ABS 0x02 /* absolute address */
+#define AOUT_TEXT 0x04 /* text segment */
+#define AOUT_DATA 0x06 /* data segment */
+#define AOUT_BSS 0x08 /* bss segment */
+#define AOUT_INDR 0x0a /* alias definition */
+#define AOUT_SIZE 0x0c /* pseudo type, defines a symbol's size */
+#define AOUT_COMM 0x12 /* common reference */
+#define AOUT_FN 0x1e /* file name (AOUT_EXT on) */
+#define AOUT_WARN 0x1e /* warning message (AOUT_EXT off) */
+
+#define AOUT_EXT 0x01 /* external (global) bit, OR'ed in */
+#define AOUT_TYPE 0x1e /* mask for all the type bits */
+ unsigned char n_type; /* type defines */
+
+ char n_other; /* spare */
+#define n_hash n_desc /* used internally by ld(1); XXX */
+ short n_desc; /* used by stab entries */
+ unsigned long n_value; /* address/value of the symbol */
} AOUT_nlist;
-#define AOUT_FORMAT "%08x" /* namelist value format; XXX */
-#define AOUT_STAB 0x0e0 /* mask for debugger symbols -- stab(5) */
+#define AOUT_FORMAT "%08x" /* namelist value format; XXX */
+#define AOUT_STAB 0x0e0 /* mask for debugger symbols -- stab(5) */
#endif
diff --git a/hw/xfree86/loader/aoutloader.c b/hw/xfree86/loader/aoutloader.c
index 98e657dca..f77b3d73c 100644
--- a/hw/xfree86/loader/aoutloader.c
+++ b/hw/xfree86/loader/aoutloader.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/aoutloader.c,v 1.17 2001/11/16 16:47:55 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/aoutloader.c,v 1.20 2003/10/15 17:46:00 dawes Exp $ */
/*
*
@@ -52,10 +52,13 @@
#include "loader.h"
#include "aoutloader.h"
-/*
-#define AOUTDEBUG ErrorF
-*/
+#ifndef LOADERDEBUG
+#define LOADERDEBUG 0
+#endif
+#if LOADERDEBUG
+#define AOUTDEBUG ErrorF
+#endif
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
@@ -67,22 +70,22 @@
*/
typedef struct {
- int handle;
- int module;
- int fd;
- loader_funcs *funcs;
- AOUTHDR *header;/* file header */
- unsigned char *text; /* Start address of the text section */
- unsigned int textsize; /* Size of the text section */
- unsigned char *data; /* Start address of the data section */
- unsigned int datasize; /* Size of the data section */
- unsigned char *bss; /* Start address of the bss data */
- unsigned int bsssize; /* Size of the bss section */
- struct relocation_info *txtrel; /* Start address of the text relocation table */
- struct relocation_info *datarel; /* Start address of the data relocation table */
- AOUT_nlist *symtab; /* Start address of the symbol table */
- unsigned char *strings; /* Start address of the string table */
- unsigned long strsize; /* size of string table */
+ int handle;
+ int module;
+ int fd;
+ loader_funcs *funcs;
+ AOUTHDR *header; /* file header */
+ unsigned char *text; /* Start address of the text section */
+ unsigned int textsize; /* Size of the text section */
+ unsigned char *data; /* Start address of the data section */
+ unsigned int datasize; /* Size of the data section */
+ unsigned char *bss; /* Start address of the bss data */
+ unsigned int bsssize; /* Size of the bss section */
+ struct relocation_info *txtrel; /* Start address of the text relocation table */
+ struct relocation_info *datarel; /* Start address of the data relocation table */
+ AOUT_nlist *symtab; /* Start address of the symbol table */
+ unsigned char *strings; /* Start address of the string table */
+ unsigned long strsize; /* size of string table */
unsigned char *common; /* Start address of the common data */
unsigned long comsize; /* size of common data */
} AOUTModuleRec, *AOUTModulePtr;
@@ -121,10 +124,12 @@ static void *AOUTGetSymbolValue(AOUTModulePtr, int);
static AOUTCommonPtr AOUTAddCommon(struct AOUT_nlist *, int);
static LOOKUP *AOUTCreateCommon(AOUTModulePtr);
static LOOKUP *AOUT_GetSymbols(AOUTModulePtr);
-static AOUTRelocPtr AOUTDelayRelocation(AOUTModulePtr, int, struct relocation_info_i386 *);
+static AOUTRelocPtr AOUTDelayRelocation(AOUTModulePtr, int,
+ struct relocation_info_i386 *);
static AOUTRelocPtr AOUTCollectRelocations(AOUTModulePtr);
static void AOUT_Relocate(unsigned long *, unsigned long, int);
-static AOUTRelocPtr AOUT_RelocateEntry(AOUTModulePtr, int, struct relocation_info_i386 *);
+static AOUTRelocPtr AOUT_RelocateEntry(AOUTModulePtr, int,
+ struct relocation_info_i386 *);
/*
* Return 1 if the symbol in item belongs to aoutfile
@@ -133,6 +138,7 @@ static int
AOUTHashCleanOut(void *voidptr, itemPtr item)
{
AOUTModulePtr aoutfile = (AOUTModulePtr) voidptr;
+
return (aoutfile->handle == item->handle);
}
@@ -140,8 +146,8 @@ AOUTHashCleanOut(void *voidptr, itemPtr item)
* Manage listResolv
*/
static AOUTRelocPtr
-AOUTDelayRelocation(AOUTModulePtr aoutfile, int type,
- struct relocation_info *rel)
+AOUTDelayRelocation(AOUTModulePtr aoutfile, int type,
+ struct relocation_info *rel)
{
AOUTRelocPtr reloc;
@@ -158,8 +164,6 @@ AOUTDelayRelocation(AOUTModulePtr aoutfile, int type,
reloc->next = 0;
return reloc;
}
-
-
/*
* Manage listCOMMON
@@ -170,8 +174,8 @@ AOUTAddCommon(struct AOUT_nlist *sym, int index)
{
AOUTCommonPtr common;
- if ((common = xf86loadermalloc(sizeof (AOUTCommonRec))) == NULL) {
- ErrorF( "AOUTAddCommon() Unable to allocate memory\n" );
+ if ((common = xf86loadermalloc(sizeof(AOUTCommonRec))) == NULL) {
+ ErrorF("AOUTAddCommon() Unable to allocate memory\n");
return 0;
}
common->sym = sym;
@@ -183,8 +187,8 @@ AOUTAddCommon(struct AOUT_nlist *sym, int index)
static LOOKUP *
AOUTCreateCommon(AOUTModulePtr aoutfile)
{
- int numsyms = 0, size = 0, l = 0;
- int offset = 0;
+ int numsyms = 0, size = 0, l = 0;
+ int offset = 0;
AOUTCommonPtr common;
LOOKUP *lookup;
@@ -194,46 +198,47 @@ AOUTCreateCommon(AOUTModulePtr aoutfile)
common = listCOMMON;
for (common = listCOMMON; common; common = common->next) {
/* Ensure long word alignment */
- if( (common->sym->n_value & (sizeof(long)-1)) != 0 )
- common->sym->n_value = (common->sym->n_value + (sizeof(long)-1))
- & ~(sizeof(long)-1);
+ if ((common->sym->n_value & (sizeof(long) - 1)) != 0)
+ common->sym->n_value = (common->sym->n_value + (sizeof(long) - 1))
+ & ~(sizeof(long) - 1);
/* accumulate the sizes */
size += common->sym->n_value;
numsyms++;
- } /* while */
+ } /* while */
#ifdef AOUTDEBUG
AOUTDEBUG("AOUTCreateCommon() %d entries (%d bytes) of COMMON data\n",
- numsyms, size );
+ numsyms, size);
#endif
-
- if ((lookup = xf86loadermalloc((numsyms+1)*sizeof(LOOKUP))) == NULL) {
- ErrorF( "AOUTCreateCommon() Unable to allocate memory\n" );
- return NULL;
+
+ if ((lookup = xf86loadermalloc((numsyms + 1) * sizeof(LOOKUP))) == NULL) {
+ ErrorF("AOUTCreateCommon() Unable to allocate memory\n");
+ return NULL;
}
-
+
aoutfile->comsize = size;
- if ((aoutfile->common = xf86loadercalloc(1,size)) == NULL) {
- ErrorF( "AOUTCreateCommon() Unable to allocate memory\n" );
- return NULL;
+ if ((aoutfile->common = xf86loadercalloc(1, size)) == NULL) {
+ ErrorF("AOUTCreateCommon() Unable to allocate memory\n");
+ return NULL;
}
-
+
while (listCOMMON) {
- common = listCOMMON;
- lookup[l].symName= AOUTGetSymbolName(aoutfile, common->sym);
- lookup[l].offset = (funcptr)(aoutfile->common+offset);
+ common = listCOMMON;
+ lookup[l].symName = AOUTGetSymbolName(aoutfile, common->sym);
+ lookup[l].offset = (funcptr) (aoutfile->common + offset);
#ifdef AOUTDEBUG
- AOUTDEBUG("Adding %x %s\n", lookup[l].offset, lookup[l].symName );
+ AOUTDEBUG("Adding %p %s\n", (void *)lookup[l].offset,
+ lookup[l].symName);
#endif
- listCOMMON = common->next;
- offset += common->sym->n_value;
- xf86loaderfree(common);
- l++;
- } /* while */
+ listCOMMON = common->next;
+ offset += common->sym->n_value;
+ xf86loaderfree(common);
+ l++;
+ } /* while */
/* listCOMMON == NULL */
- lookup[l].symName=NULL; /* Terminate the list */
+ lookup[l].symName = NULL; /* Terminate the list */
return lookup;
}
@@ -244,7 +249,7 @@ AOUTCreateCommon(AOUTModulePtr aoutfile)
static char *
AOUTGetString(AOUTModulePtr aoutfile, int index)
{
- char *symname = (char *) &(aoutfile->strings[index]);
+ char *symname = (char *)&(aoutfile->strings[index]);
if (symname[0] == '_') {
symname++;
@@ -252,20 +257,21 @@ AOUTGetString(AOUTModulePtr aoutfile, int index)
return symname;
}
+
/*
* Return the name of a symbol
*/
static char *
AOUTGetSymbolName(AOUTModulePtr aoutfile, struct AOUT_nlist *sym)
{
- char *symname = AOUTGetString(aoutfile,sym->n_un.n_strx);
+ char *symname = AOUTGetString(aoutfile, sym->n_un.n_strx);
char *name;
- name=xf86loadermalloc(strlen(symname)+1);
+ name = xf86loadermalloc(strlen(symname) + 1);
if (!name)
FatalError("AOUTGetSymbolName: Out of memory\n");
- strcpy(name,symname);
+ strcpy(name, symname);
return name;
}
@@ -276,13 +282,13 @@ AOUTGetSymbolName(AOUTModulePtr aoutfile, struct AOUT_nlist *sym)
static void *
AOUTGetSymbolValue(AOUTModulePtr aoutfile, int index)
{
- void *symval = NULL; /* value of the indicated symbol */
- itemPtr symbol = NULL; /* name/value of symbol */
+ void *symval = NULL; /* value of the indicated symbol */
+ itemPtr symbol = NULL; /* name/value of symbol */
char *name = NULL;
name = AOUTGetSymbolName(aoutfile, aoutfile->symtab + index);
- if( name )
+ if (name)
symbol = LoaderHashFind(name);
if (symbol)
@@ -292,7 +298,6 @@ AOUTGetSymbolValue(AOUTModulePtr aoutfile, int index)
return symval;
}
-
/*
* Perform the actual relocation
*/
@@ -300,28 +305,27 @@ static void
AOUT_Relocate(unsigned long *destl, unsigned long val, int pcrel)
{
#ifdef AOUTDEBUG
- AOUTDEBUG("AOUT_Relocate %p : %08x %s",
- destl, *destl, pcrel == 1 ? "rel" : "abs");
+ AOUTDEBUG("AOUT_Relocate %p : %08lx %s",
+ (void *)destl, *destl, pcrel == 1 ? "rel" : "abs");
#endif
if (pcrel) {
/* relative to PC */
- *destl = val - ((unsigned long)destl + sizeof(long));
+ *destl = val - ((unsigned long)destl + sizeof(long));
} else {
*destl += val;
}
#ifdef AOUTDEBUG
- AOUTDEBUG(" -> %08x\n", *destl);
+ AOUTDEBUG(" -> %08lx\n", *destl);
#endif
}
-
/*
* Fix the relocation for text or data section
*/
static AOUTRelocPtr
AOUT_RelocateEntry(AOUTModulePtr aoutfile, int type,
- struct relocation_info *rel)
+ struct relocation_info *rel)
{
AOUTHDR *header = aoutfile->header;
AOUT_nlist *symtab = aoutfile->symtab;
@@ -330,22 +334,23 @@ AOUT_RelocateEntry(AOUTModulePtr aoutfile, int type,
unsigned long *destl; /* address of the location to be modified */
symnum = rel->r_symbolnum;
-#ifdef AOUTDEBUG
+#ifdef AOUTDEBUG
{
- char *name;
- if (rel->r_extern) {
- AOUTDEBUG("AOUT_RelocateEntry: extern %s\n",
- name=AOUTGetSymbolName(aoutfile, symtab+symnum));
- xf86loaderfree(name);
- } else {
- AOUTDEBUG("AOUT_RelocateEntry: intern\n");
- }
- AOUTDEBUG(" pcrel: %d", rel->r_pcrel);
- AOUTDEBUG(" length: %d", rel->r_length);
- AOUTDEBUG(" baserel: %d", rel->r_baserel);
- AOUTDEBUG(" jmptable: %d", rel->r_jmptable);
- AOUTDEBUG(" relative: %d", rel->r_relative);
- AOUTDEBUG(" copy: %d\n", rel->r_copy);
+ char *name;
+
+ if (rel->r_extern) {
+ AOUTDEBUG("AOUT_RelocateEntry: extern %s\n",
+ name = AOUTGetSymbolName(aoutfile, symtab + symnum));
+ xf86loaderfree(name);
+ } else {
+ AOUTDEBUG("AOUT_RelocateEntry: intern\n");
+ }
+ AOUTDEBUG(" pcrel: %d", rel->r_pcrel);
+ AOUTDEBUG(" length: %d", rel->r_length);
+ AOUTDEBUG(" baserel: %d", rel->r_baserel);
+ AOUTDEBUG(" jmptable: %d", rel->r_jmptable);
+ AOUTDEBUG(" relative: %d", rel->r_relative);
+ AOUTDEBUG(" copy: %d\n", rel->r_copy);
}
#endif /* AOUTDEBUG */
@@ -356,15 +361,15 @@ AOUT_RelocateEntry(AOUTModulePtr aoutfile, int type,
* First find the address to modify
*/
switch (type) {
- case AOUT_TEXT:
+ case AOUT_TEXT:
/* Check that the relocation offset is in the text segment */
if (rel->r_address > header->a_text) {
ErrorF("AOUT_RelocateEntry(): "
"text relocation out of text section\n");
- }
+ }
destl = (unsigned long *)(aoutfile->text + rel->r_address);
break;
- case AOUT_DATA:
+ case AOUT_DATA:
/* Check that the relocation offset is in the data segment */
if (rel->r_address > header->a_data) {
ErrorF("AOUT_RelocateEntry():"
@@ -372,10 +377,10 @@ AOUT_RelocateEntry(AOUTModulePtr aoutfile, int type,
}
destl = (unsigned long *)(aoutfile->data + rel->r_address);
break;
- default:
+ default:
ErrorF("AOUT_RelocateEntry(): unknown section type %d\n", type);
return 0;
- } /* switch */
+ } /* switch */
/*
* Now handle the relocation
@@ -385,70 +390,70 @@ AOUT_RelocateEntry(AOUTModulePtr aoutfile, int type,
symval = AOUTGetSymbolValue(aoutfile, symnum);
if (symval != 0) {
/* we've got the value */
- AOUT_Relocate(destl, (unsigned long) symval, rel->r_pcrel);
+ AOUT_Relocate(destl, (unsigned long)symval, rel->r_pcrel);
return 0;
} else {
/* The symbol should be undefined */
switch (symtab[symnum].n_type & AOUT_TYPE) {
- case AOUT_UNDF:
+ case AOUT_UNDF:
#ifdef AOUTDEBUG
AOUTDEBUG(" extern AOUT_UNDEF\n");
#endif
/* Add this relocation back to the global list */
- return AOUTDelayRelocation(aoutfile,type,rel);
+ return AOUTDelayRelocation(aoutfile, type, rel);
- default:
+ default:
ErrorF("AOUT_RelocateEntry():"
- " impossible intern relocation type: %d\n",
+ " impossible intern relocation type: %d\n",
symtab[symnum].n_type);
return 0;
- } /* switch */
+ } /* switch */
}
} else {
/* intern */
switch (rel->r_symbolnum) {
- case AOUT_TEXT:
+ case AOUT_TEXT:
#ifdef AOUTDEBUG
AOUTDEBUG(" AOUT_TEXT\n");
#endif
/* Only absolute intern text relocations need to be handled */
- if (rel->r_pcrel == 0)
- AOUT_Relocate(destl, (unsigned long)aoutfile->text,
+ if (rel->r_pcrel == 0)
+ AOUT_Relocate(destl, (unsigned long)aoutfile->text,
rel->r_pcrel);
return 0;
- case AOUT_DATA:
+ case AOUT_DATA:
#ifdef AOUTDEBUG
AOUTDEBUG(" AOUT_DATA\n");
#endif
- if (rel->r_pcrel == 0)
+ if (rel->r_pcrel == 0)
AOUT_Relocate(destl, (unsigned long)aoutfile->data
- header->a_text, rel->r_pcrel);
else
ErrorF("AOUT_RelocateEntry(): "
"don't know how to handle data pc-relative reloc\n");
-
+
return 0;
- case AOUT_BSS:
+ case AOUT_BSS:
#ifdef AOUTDEBUG
AOUTDEBUG(" AOUT_BSS\n");
#endif
if (rel->r_pcrel == 0)
AOUT_Relocate(destl, (unsigned long)aoutfile->bss
- - header->a_text - header->a_data,
+ - header->a_text - header->a_data,
rel->r_pcrel);
else
ErrorF("AOUT_RelocateEntry(): "
"don't know how to handle bss pc-relative reloc\n");
-
+
return 0;
- default:
+ default:
ErrorF("AOUT_RelocateEntry():"
" unknown intern relocation type: %d\n", rel->r_symbolnum);
return 0;
- } /* switch */
+ } /* switch */
}
-} /* AOUT_RelocateEntry */
-
+} /* AOUT_RelocateEntry */
+
static AOUTRelocPtr
AOUTCollectRelocations(AOUTModulePtr aoutfile)
{
@@ -460,7 +465,7 @@ AOUTCollectRelocations(AOUTModulePtr aoutfile)
/* Text relocations */
if (aoutfile->text != NULL && aoutfile->txtrel != NULL) {
- nreloc = header->a_trsize/sizeof(struct relocation_info);
+ nreloc = header->a_trsize / sizeof(struct relocation_info);
for (i = 0; i < nreloc; i++) {
rel = aoutfile->txtrel + i;
@@ -469,28 +474,28 @@ AOUTCollectRelocations(AOUTModulePtr aoutfile)
tmp->next = reloc_head;
reloc_head = tmp;
}
- } /* for */
+ } /* for */
}
/* Data relocations */
if (aoutfile->data != NULL && aoutfile->datarel != NULL) {
- nreloc = header->a_drsize/sizeof(struct relocation_info);
-
+ nreloc = header->a_drsize / sizeof(struct relocation_info);
+
for (i = 0; i < nreloc; i++) {
rel = aoutfile->datarel + i;
tmp = AOUTDelayRelocation(aoutfile, AOUT_DATA, rel);
tmp->next = reloc_head;
reloc_head = tmp;
- } /* for */
+ } /* for */
}
return reloc_head;
-} /* AOUTCollectRelocations */
+} /* AOUTCollectRelocations */
/*
* AOUT_GetSymbols()
*
* add the symbols to the loader's symbol table
*/
-static LOOKUP *
+static LOOKUP *
AOUT_GetSymbols(AOUTModulePtr aoutfile)
{
int fd = aoutfile->fd;
@@ -501,11 +506,11 @@ AOUT_GetSymbols(AOUTModulePtr aoutfile)
LOOKUP *lookup, *lookup_common;
AOUTCommonPtr tmp;
- aoutfile->symtab = (AOUT_nlist *)_LoaderFileToMem(fd,
- AOUT_SYMOFF(header),
- header->a_syms,
- "symbols");
- nsyms = header->a_syms/sizeof(AOUT_nlist);
+ aoutfile->symtab = (AOUT_nlist *) _LoaderFileToMem(fd,
+ AOUT_SYMOFF(header),
+ header->a_syms,
+ "symbols");
+ nsyms = header->a_syms / sizeof(AOUT_nlist);
lookup = xf86loadermalloc(nsyms * sizeof(LOOKUP));
if (lookup == NULL) {
ErrorF("AOUT_GetSymbols(): can't allocate memory\n");
@@ -513,17 +518,16 @@ AOUT_GetSymbols(AOUTModulePtr aoutfile)
}
for (i = 0, l = 0; i < nsyms; i++) {
s = aoutfile->symtab + i;
- soff=s->n_un.n_strx;
- if (soff == 0 || (s->n_type & AOUT_STAB) != 0)
+ soff = s->n_un.n_strx;
+ if (soff == 0 || (s->n_type & AOUT_STAB) != 0)
continue;
- symname=AOUTGetSymbolName(aoutfile,s);
+ symname = AOUTGetSymbolName(aoutfile, s);
#ifdef AOUTDEBUG
- AOUTDEBUG("AOUT_GetSymbols(): %s %02x %02x %08x\n",
- symname, s->n_type,
- s->n_other, s->n_value);
+ AOUTDEBUG("AOUT_GetSymbols(): %s %02x %02x %08lx\n",
+ symname, s->n_type, s->n_other, s->n_value);
#endif
switch (s->n_type & AOUT_TYPE) {
- case AOUT_UNDF:
+ case AOUT_UNDF:
if (s->n_value != 0) {
if (!LoaderHashFind(symname)) {
#ifdef AOUTDEBUG
@@ -542,51 +546,54 @@ AOUT_GetSymbols(AOUTModulePtr aoutfile)
}
xf86loaderfree(symname);
break;
- case AOUT_TEXT:
+ case AOUT_TEXT:
if (s->n_type & AOUT_EXT) {
lookup[l].symName = symname;
/* text symbols start at 0 */
- lookup[l].offset = (funcptr)(aoutfile->text + s->n_value);
+ lookup[l].offset = (funcptr) (aoutfile->text + s->n_value);
#ifdef AOUTDEBUG
- AOUTDEBUG("Adding text %s %08x\n", symname, lookup[l].offset);
+ AOUTDEBUG("Adding text %s %p\n", symname,
+ (void *)lookup[l].offset);
#endif
l++;
} else {
xf86loaderfree(symname);
}
break;
- case AOUT_DATA :
+ case AOUT_DATA:
if (s->n_type & AOUT_EXT) {
lookup[l].symName = symname;
/* data symbols are following text */
- lookup[l].offset = (funcptr)(aoutfile->data +
- s->n_value - header->a_text);
+ lookup[l].offset = (funcptr) (aoutfile->data +
+ s->n_value - header->a_text);
#ifdef AOUTDEBUG
- AOUTDEBUG("Adding data %s %08x\n", symname, lookup[l].offset);
+ AOUTDEBUG("Adding data %s %p\n", symname,
+ (void *)lookup[l].offset);
#endif
l++;
} else {
xf86loaderfree(symname);
}
break;
- case AOUT_BSS:
+ case AOUT_BSS:
if (s->n_type & AOUT_EXT) {
lookup[l].symName = symname;
/* bss symbols follow both text and data */
- lookup[l].offset = (funcptr)(aoutfile->bss + s->n_value
- - (header->a_data
- + header->a_text));
+ lookup[l].offset = (funcptr) (aoutfile->bss + s->n_value
+ - (header->a_data
+ + header->a_text));
#ifdef AOUTDEBUG
- AOUTDEBUG("Adding bss %s %08x\n", symname, lookup[l].offset);
+ AOUTDEBUG("Adding bss %s %p\n", symname,
+ (void *)lookup[l].offset);
#endif
l++;
} else {
xf86loaderfree(symname);
}
break;
- case AOUT_FN:
+ case AOUT_FN:
#ifdef AOUTDEBUG
- if (n->n_type& AOUT_EXT) {
+ if (s->n_type & AOUT_EXT) {
AOUTDEBUG("Ignoring AOUT_FN %s\n", symname);
} else {
AOUTDEBUG("Ignoring AOUT_WARN %s\n", symname);
@@ -594,68 +601,66 @@ AOUT_GetSymbols(AOUTModulePtr aoutfile)
#endif
xf86loaderfree(symname);
break;
- default:
- ErrorF("Unknown symbol type %x\n", s->n_type & AOUT_TYPE);
- xf86loaderfree(symname);
- } /* switch */
- } /* for */
+ default:
+ ErrorF("Unknown symbol type %x\n", s->n_type & AOUT_TYPE);
+ xf86loaderfree(symname);
+ } /* switch */
+ } /* for */
lookup[l].symName = NULL;
-
+
lookup_common = AOUTCreateCommon(aoutfile);
if (lookup_common) {
LOOKUP *p;
- for (i = 0, p = lookup_common; p->symName; i++, p++)
- ;
- memcpy(&(lookup[l]), lookup_common, i * sizeof (LOOKUP));
+ for (i = 0, p = lookup_common; p->symName; i++, p++) ;
+ memcpy(&(lookup[l]), lookup_common, i * sizeof(LOOKUP));
xf86loaderfree(lookup_common);
l += i;
lookup[l].symName = NULL;
}
return lookup;
-} /* AOUT_GetSymbols */
+} /* AOUT_GetSymbols */
/*
* Public API for the a.out implementation of the loader
*/
void *
-AOUTLoadModule(loaderPtr modrec,
- int aoutfd,
- LOOKUP **ppLookup)
+AOUTLoadModule(loaderPtr modrec, int aoutfd, LOOKUP ** ppLookup)
{
AOUTModulePtr aoutfile = NULL;
AOUTHDR *header;
AOUTRelocPtr reloc, tail;
- void *v;
+ void *v;
#ifdef AOUTDEBUG
AOUTDEBUG("AOUTLoadModule(%s, %d, %d)\n",
modrec->name, modrec->handle, aoutfd);
#endif
- if ((aoutfile=xf86loadercalloc(1,sizeof(AOUTModuleRec))) == NULL ) {
- ErrorF( "Unable to allocate AOUTModuleRec\n" );
+ if ((aoutfile = xf86loadercalloc(1, sizeof(AOUTModuleRec))) == NULL) {
+ ErrorF("Unable to allocate AOUTModuleRec\n");
return NULL;
}
- aoutfile->handle=modrec->handle;
- aoutfile->module=modrec->module;
- aoutfile->fd=aoutfd;
- v=aoutfile->funcs=modrec->funcs;
+ aoutfile->handle = modrec->handle;
+ aoutfile->module = modrec->module;
+ aoutfile->fd = aoutfd;
+ v = aoutfile->funcs = modrec->funcs;
/*
* Get the a.out header
*/
- aoutfile->header=(AOUTHDR *)_LoaderFileToMem(aoutfd,0,sizeof(AOUTHDR),
- "header");
- header= (AOUTHDR *)aoutfile->header;
+ aoutfile->header =
+ (AOUTHDR *) _LoaderFileToMem(aoutfd, 0, sizeof(AOUTHDR),
+ "header");
+ header = (AOUTHDR *) aoutfile->header;
/*
* Load the 6 other sections
*/
/* text */
if (header->a_text != 0) {
- aoutfile->text = _LoaderFileToMem(aoutfile->fd,
+ aoutfile->text = _LoaderFileToMem(aoutfile->fd,
AOUT_TXTOFF(header),
header->a_text, "text");
aoutfile->textsize = header->a_text;
@@ -689,13 +694,13 @@ AOUTLoadModule(loaderPtr modrec,
/* Data Relocations */
if (header->a_drsize != 0) {
aoutfile->datarel = _LoaderFileToMem(aoutfile->fd,
- AOUT_DRELOFF(header),
- header->a_drsize, "datarel");
+ AOUT_DRELOFF(header),
+ header->a_drsize, "datarel");
} else {
aoutfile->datarel = NULL;
}
/* String table */
- _LoaderFileRead(aoutfile->fd, AOUT_STROFF(header),
+ _LoaderFileRead(aoutfile->fd, AOUT_STROFF(header),
&(aoutfile->strsize), sizeof(int));
if (aoutfile->strsize != 0) {
aoutfile->strings = _LoaderFileToMem(aoutfile->fd,
@@ -711,8 +716,7 @@ AOUTLoadModule(loaderPtr modrec,
reloc = AOUTCollectRelocations(aoutfile);
if (reloc) {
- for (tail = reloc; tail->next; tail = tail->next)
- ;
+ for (tail = reloc; tail->next; tail = tail->next) ;
tail->next = _LoaderGetRelocations(v)->aout_reloc;
_LoaderGetRelocations(v)->aout_reloc = reloc;
}
@@ -721,8 +725,7 @@ AOUTLoadModule(loaderPtr modrec,
}
void
-AOUTResolveSymbols(mod)
-void *mod;
+AOUTResolveSymbols(void *mod)
{
AOUTRelocPtr newlist, p, tmp;
@@ -731,7 +734,7 @@ void *mod;
#endif
newlist = 0;
- for (p = _LoaderGetRelocations(mod)->aout_reloc; p; ) {
+ for (p = _LoaderGetRelocations(mod)->aout_reloc; p;) {
tmp = AOUT_RelocateEntry(p->file, p->type, p->rel);
if (tmp) {
/* Failed to relocate. Keep it in the list. */
@@ -743,11 +746,10 @@ void *mod;
xf86loaderfree(tmp);
}
_LoaderGetRelocations(mod)->aout_reloc = newlist;
-} /* AOUTResolveSymbols */
+} /* AOUTResolveSymbols */
int
-AOUTCheckForUnresolved(mod)
-void *mod;
+AOUTCheckForUnresolved(void *mod)
{
int symnum;
AOUTRelocPtr crel;
@@ -763,18 +765,20 @@ void *mod;
while (crel) {
if (crel->type == AOUT_TEXT) {
/* Attempt to make unresolved text references
- point to a default function */
- AOUT_Relocate((unsigned long *)(crel->file->text
- + crel->rel->r_address) ,
- (unsigned long)LoaderDefaultFunc,
+ * point to a default function */
+ AOUT_Relocate((unsigned long *)(crel->file->text
+ + crel->rel->r_address),
+ (unsigned long)LoaderDefaultFunc,
crel->rel->r_pcrel);
}
symnum = crel->rel->r_symbolnum;
- name=AOUTGetSymbolName(crel->file, crel->file->symtab + symnum);
- flag = _LoaderHandleUnresolved(name,
- _LoaderHandleToName(crel->file->handle));
+ name = AOUTGetSymbolName(crel->file, crel->file->symtab + symnum);
+ flag = _LoaderHandleUnresolved(name,
+ _LoaderHandleToName(crel->file->
+ handle));
xf86loaderfree(name);
- if (flag) fatalsym = 1;
+ if (flag)
+ fatalsym = 1;
crel = crel->next;
}
return fatalsym;
@@ -783,8 +787,9 @@ void *mod;
void
AOUTUnloadModule(void *modptr)
{
- AOUTModulePtr aoutfile = (AOUTModulePtr)modptr;
+ AOUTModulePtr aoutfile = (AOUTModulePtr) modptr;
AOUTRelocPtr relptr, *prevptr;
+
#ifdef AOUTDEBUG
AOUTDEBUG("AOUTUnLoadModule(0x%p)\n", modptr);
#endif
@@ -793,8 +798,8 @@ AOUTUnloadModule(void *modptr)
* Delete any unresolved relocations
*/
- relptr=_LoaderGetRelocations(aoutfile->funcs)->aout_reloc;
- prevptr=&(_LoaderGetRelocations(aoutfile->funcs)->aout_reloc);
+ relptr = _LoaderGetRelocations(aoutfile->funcs)->aout_reloc;
+ prevptr = &(_LoaderGetRelocations(aoutfile->funcs)->aout_reloc);
while (relptr) {
if (relptr->file == aoutfile) {
@@ -805,19 +810,19 @@ AOUTUnloadModule(void *modptr)
prevptr = &(relptr->next);
relptr = relptr->next;
}
- } /* while */
-
+ } /* while */
+
/* clean the symbols table */
LoaderHashTraverse((void *)aoutfile, AOUTHashCleanOut);
#define CheckandFree(ptr,size) if(ptr) _LoaderFreeFileMem((ptr),(size))
- CheckandFree(aoutfile->strings,aoutfile->strsize);
- CheckandFree(aoutfile->symtab,aoutfile->header->a_syms);
- CheckandFree(aoutfile->datarel,aoutfile->header->a_drsize);
- CheckandFree(aoutfile->txtrel,aoutfile->header->a_trsize);
- CheckandFree(aoutfile->data,aoutfile->header->a_data);
- CheckandFree(aoutfile->text,aoutfile->header->a_text);
+ CheckandFree(aoutfile->strings, aoutfile->strsize);
+ CheckandFree(aoutfile->symtab, aoutfile->header->a_syms);
+ CheckandFree(aoutfile->datarel, aoutfile->header->a_drsize);
+ CheckandFree(aoutfile->txtrel, aoutfile->header->a_trsize);
+ CheckandFree(aoutfile->data, aoutfile->header->a_data);
+ CheckandFree(aoutfile->text, aoutfile->header->a_text);
/* Free allocated sections */
if (aoutfile->bss != NULL) {
xf86loaderfree(aoutfile->bss);
@@ -838,21 +843,20 @@ AOUTUnloadModule(void *modptr)
char *
AOUTAddressToSection(void *modptr, unsigned long address)
{
- AOUTModulePtr aoutfile = (AOUTModulePtr)modptr;
-
- if( address >= (unsigned long)aoutfile->text &&
- address <= (unsigned long)aoutfile->text+aoutfile->textsize ) {
- return "text";
- }
- if( address >= (unsigned long)aoutfile->data &&
- address <= (unsigned long)aoutfile->data+aoutfile->datasize ) {
- return "data";
- }
- if( address >= (unsigned long)aoutfile->bss &&
- address <= (unsigned long)aoutfile->bss+aoutfile->bsssize ) {
- return "bss";
- }
+ AOUTModulePtr aoutfile = (AOUTModulePtr) modptr;
+
+ if (address >= (unsigned long)aoutfile->text &&
+ address <= (unsigned long)aoutfile->text + aoutfile->textsize) {
+ return "text";
+ }
+ if (address >= (unsigned long)aoutfile->data &&
+ address <= (unsigned long)aoutfile->data + aoutfile->datasize) {
+ return "data";
+ }
+ if (address >= (unsigned long)aoutfile->bss &&
+ address <= (unsigned long)aoutfile->bss + aoutfile->bsssize) {
+ return "bss";
+ }
return NULL;
}
-
diff --git a/hw/xfree86/loader/aoutloader.h b/hw/xfree86/loader/aoutloader.h
index 2714b140f..b0e156319 100644
--- a/hw/xfree86/loader/aoutloader.h
+++ b/hw/xfree86/loader/aoutloader.h
@@ -19,13 +19,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/aoutloader.h,v 1.3 1998/09/20 14:41:03 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/aoutloader.h,v 1.4 2003/10/15 16:29:02 dawes Exp $ */
#ifndef _AOUTLOADER_H
#define _AOUTLOADER_H
extern void *AOUTLoadModule(loaderPtr, int, LOOKUP **);
extern void AOUTResolveSymbols(void *);
extern int AOUTCheckForUnresolved(void *);
-extern char *AOUTAddressToSection(void *,unsigned long);
+extern char *AOUTAddressToSection(void *, unsigned long);
extern void AOUTUnloadModule(void *);
#endif
diff --git a/hw/xfree86/loader/ar.h b/hw/xfree86/loader/ar.h
index 4dbc97901..956b810a0 100644
--- a/hw/xfree86/loader/ar.h
+++ b/hw/xfree86/loader/ar.h
@@ -1,5 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/ar.h,v 1.3 1998/07/25 16:56:12 dawes Exp $ */
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/ar.h,v 1.4 2003/10/15 16:29:02 dawes Exp $ */
#ifndef _AR_H
#define _AR_H
@@ -10,13 +9,13 @@
#if !(defined(__powerpc__) && defined(Lynx))
struct ar_hdr {
- char ar_name[16],
- ar_date[12],
- ar_uid[6],
- ar_gid[6],
- ar_mode[8],
- ar_size[10],
- ar_fmag[2];
+ char ar_name[16];
+ char ar_date[12];
+ char ar_uid[6];
+ char ar_gid[6];
+ char ar_mode[8];
+ char ar_size[10];
+ char ar_fmag[2];
};
#else
@@ -25,35 +24,31 @@ struct ar_hdr {
#define SAIAMAG 8
#define AIAFMAG "`\n"
-struct fl_hdr /* archive fixed length header - printable ascii */
-{
- char fl_magic[SAIAMAG]; /* Archive file magic string */
- char fl_memoff[12]; /* Offset to member table */
- char fl_gstoff[12]; /* Offset to global symbol table */
- char fl_fstmoff[12]; /* Offset to first archive member */
- char fl_lstmoff[12]; /* Offset to last archive member */
- char fl_freeoff[12]; /* Offset to first mem on free list */
+struct fl_hdr { /* archive fixed length header - printable ascii */
+ char fl_magic[SAIAMAG]; /* Archive file magic string */
+ char fl_memoff[12]; /* Offset to member table */
+ char fl_gstoff[12]; /* Offset to global symbol table */
+ char fl_fstmoff[12]; /* Offset to first archive member */
+ char fl_lstmoff[12]; /* Offset to last archive member */
+ char fl_freeoff[12]; /* Offset to first mem on free list */
};
#define FL_HDR struct fl_hdr
#define FL_HSZ sizeof(FL_HDR)
-
-struct ar_hdr /* archive file member header - printable ascii */
-{
- char ar_size[12]; /* file member size - decimal */
- char ar_nxtmem[12]; /* pointer to next member - decimal */
- char ar_prvmem[12]; /* pointer to previous member - decimal */
- char ar_date[12]; /* file member date - decimal */
- char ar_uid[12]; /* file member user id - decimal */
- char ar_gid[12]; /* file member group id - decimal */
- char ar_mode[12]; /* file member mode - octal */
- char ar_namlen[4]; /* file member name length - decimal */
- union
- {
- char an_name[2]; /* variable length member name */
- char an_fmag[2]; /* AIAFMAG - string to end header */
- } _ar_name; /* and variable length name */
+struct ar_hdr { /* archive file member header - printable ascii */
+ char ar_size[12]; /* file member size - decimal */
+ char ar_nxtmem[12]; /* pointer to next member - decimal */
+ char ar_prvmem[12]; /* pointer to previous member - decimal */
+ char ar_date[12]; /* file member date - decimal */
+ char ar_uid[12]; /* file member user id - decimal */
+ char ar_gid[12]; /* file member group id - decimal */
+ char ar_mode[12]; /* file member mode - octal */
+ char ar_namlen[4]; /* file member name length - decimal */
+ union {
+ char an_name[2]; /* variable length member name */
+ char an_fmag[2]; /* AIAFMAG - string to end header */
+ } _ar_name; /* and variable length name */
};
#define ar_name _ar_name.an_name
@@ -74,4 +69,3 @@ struct ar_hdr /* archive file member header - printable ascii */
#endif /* !__powerpc__ && Lynx */
#endif /* _AR_H */
-
diff --git a/hw/xfree86/loader/coff.h b/hw/xfree86/loader/coff.h
index cebf5e179..52553278e 100644
--- a/hw/xfree86/loader/coff.h
+++ b/hw/xfree86/loader/coff.h
@@ -1,5 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/coff.h,v 1.5 1998/07/25 16:56:12 dawes Exp $ */
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/coff.h,v 1.6 2003/10/15 16:29:02 dawes Exp $ */
/* This file was implemented from the information in the book
Understanding and Using COFF
@@ -20,7 +19,7 @@
#ifndef _COFF_H
#define _COFF_H
-#define E_SYMNMLEN 8 /* Number of characters in a symbol name */
+#define E_SYMNMLEN 8 /* Number of characters in a symbol name */
/*
* Intel 386/486
*/
@@ -29,15 +28,14 @@
* FILE HEADER
*/
-typedef struct COFF_filehdr
-{
- unsigned short f_magic; /* magic number */
- unsigned short f_nscns; /* number of sections */
- long f_timdat; /* time & date stamp */
- long f_symptr; /* file pointer to symtab */
- long f_nsyms; /* number of symtab entries */
- unsigned short f_opthdr; /* sizeof(optional hdr) */
- unsigned short f_flags; /* flags */
+typedef struct COFF_filehdr {
+ unsigned short f_magic; /* magic number */
+ unsigned short f_nscns; /* number of sections */
+ long f_timdat; /* time & date stamp */
+ long f_symptr; /* file pointer to symtab */
+ long f_nsyms; /* number of symtab entries */
+ unsigned short f_opthdr; /* sizeof(optional hdr) */
+ unsigned short f_flags; /* flags */
} FILHDR;
#define FILHSZ sizeof(FILHDR)
@@ -46,18 +44,17 @@ typedef struct COFF_filehdr
* SECTION HEADER
*/
-typedef struct COFF_scnhdr
-{
- char s_name[8]; /* section name */
- long s_paddr; /* physical address */
- long s_vaddr; /* virtual address */
- long s_size; /* section size */
- long s_scnptr; /* raw data for section */
- long s_relptr; /* relocation */
- long s_lnnoptr; /* line numbers */
- unsigned short s_nreloc; /* number of relocation entries */
- unsigned short s_nlnno; /* number of line number entries*/
- long s_flags; /* flags */
+typedef struct COFF_scnhdr {
+ char s_name[8]; /* section name */
+ long s_paddr; /* physical address */
+ long s_vaddr; /* virtual address */
+ long s_size; /* section size */
+ long s_scnptr; /* raw data for section */
+ long s_relptr; /* relocation */
+ long s_lnnoptr; /* line numbers */
+ unsigned short s_nreloc; /* number of relocation entries */
+ unsigned short s_nlnno; /* number of line number entries */
+ long s_flags; /* flags */
} SCNHDR;
#define COFF_SCNHDR struct COFF_scnhdr
@@ -68,41 +65,36 @@ typedef struct COFF_scnhdr
* the optional COFF header as used by Linux COFF
*/
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes */
- char dsize[4]; /* initialized data */
- char bsize[4]; /* uninitialized data */
- char entry[4]; /* entry point */
- char text_start[4]; /* base of text */
- char data_start[4]; /* base of data */
+typedef struct {
+ char magic[2]; /* type of file */
+ char vstamp[2]; /* version stamp */
+ char tsize[4]; /* text size in bytes */
+ char dsize[4]; /* initialized data */
+ char bsize[4]; /* uninitialized data */
+ char entry[4]; /* entry point */
+ char text_start[4]; /* base of text */
+ char data_start[4]; /* base of data */
} AOUTHDR;
-
/*
* SYMBOLS
*/
-typedef struct COFF_syment
-{
- union
- {
- char _n_name[E_SYMNMLEN]; /* Symbol name (first 8 chars) */
- struct
- {
- long _n_zeroes; /* Leading zeros */
- long _n_offset; /* Offset for a header section */
+typedef struct COFF_syment {
+ union {
+ char _n_name[E_SYMNMLEN]; /* Symbol name (first 8 chars) */
+ struct {
+ long _n_zeroes; /* Leading zeros */
+ long _n_offset; /* Offset for a header section */
} _n_n;
- char *_n_nptr[2]; /* allows for overlaying */
- } _n;
-
- long n_value; /* address of the segment */
- short n_scnum; /* Section number */
- unsigned short n_type; /* Type of section */
- char n_sclass; /* Loader class */
- char n_numaux; /* Number of aux entries following */
+ char *_n_nptr[2]; /* allows for overlaying */
+ } _n;
+
+ long n_value; /* address of the segment */
+ short n_scnum; /* Section number */
+ unsigned short n_type; /* Type of section */
+ char n_sclass; /* Loader class */
+ char n_numaux; /* Number of aux entries following */
} SYMENT;
#define n_name _n._n_name
@@ -110,8 +102,8 @@ typedef struct COFF_syment
#define n_zeroes _n._n_n._n_zeroes
#define n_offset _n._n_n._n_offset
-#define COFF_E_SYMNMLEN 8 /* characters in a short symbol name */
-#define COFF_E_FILNMLEN 14 /* characters in a file name */
+#define COFF_E_SYMNMLEN 8 /* characters in a short symbol name */
+#define COFF_E_FILNMLEN 14 /* characters in a file name */
#define COFF_E_DIMNUM 4 /* array dimensions in aux entry */
#define SYMNMLEN COFF_E_SYMNMLEN
#define SYMESZ 18 /* not really sizeof(SYMENT) due to padding */
@@ -131,62 +123,59 @@ typedef struct COFF_syment
* AUX Entries
*/
typedef struct COFF_auxent {
- long x_scnlen;
- long x_parmhash;
- unsigned short x_snhash;
- unsigned char x_smtyp;
- unsigned char x_smclas;
- long x_stab;
- unsigned short x_snstab;
+ long x_scnlen;
+ long x_parmhash;
+ unsigned short x_snhash;
+ unsigned char x_smtyp;
+ unsigned char x_smclas;
+ long x_stab;
+ unsigned short x_snstab;
} AUXENT;
/* Auxillary Symbol type values */
-#define XTY_ER 0 /* Enternal Reference */
-#define XTY_SD 1 /* csect section definition */
-#define XTY_LD 2 /* Label definition */
-#define XTY_CM 3 /* common csect definition */
+#define XTY_ER 0 /* Enternal Reference */
+#define XTY_SD 1 /* csect section definition */
+#define XTY_LD 2 /* Label definition */
+#define XTY_CM 3 /* common csect definition */
/* Auxillary Symbol storage mapping class values */
-#define XMC_PR 0 /* Program code */
-#define XMC_RO 1 /* Read-only constant */
-#define XMC_DB 2 /* Debug dictionary */
-#define XMC_TC 3 /* TOC entry */
-#define XMC_UA 4 /* Unclassified */
-#define XMC_RW 5 /* Read/write data */
-#define XMC_GL 6 /* Global linkage */
-#define XMC_XO 7 /* Extended operation */
-#define XMC_SV 8 /* Supervisor call descriptor */
-#define XMC_BS 9 /* BSS class */
-#define XMC_DS 10 /* Function descriptor csect */
-#define XMC_UC 11 /* Unnamed FORTRAN comon */
-#define XMC_TI 12 /* Reserved */
-#define XMC_TB 13 /* Reserved */
-#define XMC_TC0 15 /* TOC anchor */
-#define XMC_TD 16 /* Scalar data entry in TOC */
+#define XMC_PR 0 /* Program code */
+#define XMC_RO 1 /* Read-only constant */
+#define XMC_DB 2 /* Debug dictionary */
+#define XMC_TC 3 /* TOC entry */
+#define XMC_UA 4 /* Unclassified */
+#define XMC_RW 5 /* Read/write data */
+#define XMC_GL 6 /* Global linkage */
+#define XMC_XO 7 /* Extended operation */
+#define XMC_SV 8 /* Supervisor call descriptor */
+#define XMC_BS 9 /* BSS class */
+#define XMC_DS 10 /* Function descriptor csect */
+#define XMC_UC 11 /* Unnamed FORTRAN comon */
+#define XMC_TI 12 /* Reserved */
+#define XMC_TB 13 /* Reserved */
+#define XMC_TC0 15 /* TOC anchor */
+#define XMC_TD 16 /* Scalar data entry in TOC */
/*
* RELOCATION DIRECTIVES
*/
-typedef struct COFF_reloc
-{
- long r_vaddr; /* Virtual address of item */
- long r_symndx; /* Symbol index in the symtab */
+typedef struct COFF_reloc {
+ long r_vaddr; /* Virtual address of item */
+ long r_symndx; /* Symbol index in the symtab */
#if defined(__powerpc__)
- union
- {
- unsigned short _r_type; /* old style coff relocation type */
- struct
- {
- char _r_rsize; /* sign and reloc bit len */
- char _r_rtype; /* toc relocation type */
+ union {
+ unsigned short _r_type; /* old style coff relocation type */
+ struct {
+ char _r_rsize; /* sign and reloc bit len */
+ char _r_rtype; /* toc relocation type */
} _r_r;
- } _r;
-#define r_otype _r._r_type /* old style reloc - original name */
+ } _r;
+#define r_otype _r._r_type /* old style reloc - original name */
#define r_rsize _r._r_r._r_rsize /* extract sign and bit len */
#define r_type _r._r_r._r_rtype /* extract toc relocation type */
#else
- unsigned short r_type; /* Relocation type */
+ unsigned short r_type; /* Relocation type */
#endif
} RELOC;
@@ -222,7 +211,7 @@ typedef struct COFF_reloc
#define R_REL 0x02 /* A(sym-*) Relative to self */
#define R_TOC 0x03 /* A(sym-TOC) Relative to TOC */
#define R_TRL 0x12 /* A(sym-TOC) TOC Relative indirect load. */
- /* modifiable instruction */
+ /* modifiable instruction */
#define R_TRLA 0x13 /* A(sym-TOC) TOC Rel load address. modifiable inst */
#define R_GL 0x05 /* A(external TOC of sym) Global Linkage */
#define R_TCL 0x06 /* A(local TOC of sym) Local object TOC address */
diff --git a/hw/xfree86/loader/coffloader.c b/hw/xfree86/loader/coffloader.c
index 7a1ef28ad..b2fbfcf14 100644
--- a/hw/xfree86/loader/coffloader.c
+++ b/hw/xfree86/loader/coffloader.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/coffloader.c,v 1.18 2002/09/16 18:06:10 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/coffloader.c,v 1.21 2003/10/15 17:40:15 dawes Exp $ */
/*
*
@@ -48,63 +48,66 @@
#include "coffloader.h"
#include "compiler.h"
-/*
-#ifndef LDTEST
+
+#ifndef LOADERDEBUG
+#define LOADERDEBUG 0
+#endif
+
+#if LOADERDEBUG
#define COFFDEBUG ErrorF
#endif
-*/
/*
* This structure contains all of the information about a module
* that has been loaded.
*/
-typedef struct {
- int handle;
- long module; /* Id of the module used to find inter module calls */
- int fd;
- loader_funcs *funcs;
- FILHDR *header; /* file header */
- AOUTHDR *optheader; /* optional file header */
- unsigned short numsh;
- SCNHDR *sections; /* Start address of the section table */
- int secsize; /* size of the section table */
- unsigned char **saddr;/* Start addresss of the sections table */
- unsigned char **reladdr;/* Start addresss of the relocation table */
- unsigned char *strtab; /* Start address of the string table */
- int strsize; /* size of the string table */
- unsigned char *text; /* Start address of the .text section */
- int txtndx; /* index of the .text section */
- long txtaddr; /* offset of the .text section */
- int txtsize; /* size of the .text section */
- int txtrelsize; /* size of the .rel.text section */
- unsigned char *data; /* Start address of the .data section */
- int datndx; /* index of the .data section */
- long dataddr; /* offset of the .data section */
- int datsize; /* size of the .data section */
- int datrelsize; /* size of the .rel.data section */
- unsigned char *bss; /* Start address of the .bss section */
- int bssndx; /* index of the .bss section */
- long bssaddr; /* offset of the .bss section */
- int bsssize; /* size of the .bss section */
- SYMENT *symtab; /* Start address of the .symtab section */
- int symndx; /* index of the .symtab section */
- int symsize; /* size of the .symtab section */
- unsigned char *common; /* Start address of the .common section */
- int comsize; /* size of the .common section */
- long toc; /* Offset of the TOC csect */
- unsigned char *tocaddr; /* Address of the TOC csect */
- } COFFModuleRec, *COFFModulePtr;
+typedef struct {
+ int handle;
+ long module; /* Id of the module used to find inter module calls */
+ int fd;
+ loader_funcs *funcs;
+ FILHDR *header; /* file header */
+ AOUTHDR *optheader; /* optional file header */
+ unsigned short numsh;
+ SCNHDR *sections; /* Start address of the section table */
+ int secsize; /* size of the section table */
+ unsigned char **saddr; /* Start addresss of the sections table */
+ unsigned char **reladdr; /* Start addresss of the relocation table */
+ unsigned char *strtab; /* Start address of the string table */
+ int strsize; /* size of the string table */
+ unsigned char *text; /* Start address of the .text section */
+ int txtndx; /* index of the .text section */
+ long txtaddr; /* offset of the .text section */
+ int txtsize; /* size of the .text section */
+ int txtrelsize; /* size of the .rel.text section */
+ unsigned char *data; /* Start address of the .data section */
+ int datndx; /* index of the .data section */
+ long dataddr; /* offset of the .data section */
+ int datsize; /* size of the .data section */
+ int datrelsize; /* size of the .rel.data section */
+ unsigned char *bss; /* Start address of the .bss section */
+ int bssndx; /* index of the .bss section */
+ long bssaddr; /* offset of the .bss section */
+ int bsssize; /* size of the .bss section */
+ SYMENT *symtab; /* Start address of the .symtab section */
+ int symndx; /* index of the .symtab section */
+ int symsize; /* size of the .symtab section */
+ unsigned char *common; /* Start address of the .common section */
+ int comsize; /* size of the .common section */
+ long toc; /* Offset of the TOC csect */
+ unsigned char *tocaddr; /* Address of the TOC csect */
+} COFFModuleRec, *COFFModulePtr;
/*
* If any relocation is unable to be satisfied, then put it on a list
* to try later after more modules have been loaded.
*/
typedef struct _coff_reloc {
- COFFModulePtr file;
- RELOC *rel;
- int secndx;
- struct _coff_reloc *next;
+ COFFModulePtr file;
+ RELOC *rel;
+ int secndx;
+ struct _coff_reloc *next;
} COFFRelocRec;
/*
@@ -116,10 +119,10 @@ typedef struct _coff_reloc {
*/
typedef struct _coff_COMMON {
- SYMENT *sym;
- int index;
- struct _coff_COMMON *next;
- } COFFCommonRec;
+ SYMENT *sym;
+ int index;
+ struct _coff_COMMON *next;
+} COFFCommonRec;
static COFFCommonPtr listCOMMON = NULL;
@@ -140,36 +143,30 @@ static COFFRelocPtr COFFCollectRelocations(COFFModulePtr);
* Utility Functions
*/
-
static int
-COFFhashCleanOut(voidptr, item)
-void *voidptr;
-itemPtr item ;
+COFFhashCleanOut(void *voidptr, itemPtr item)
{
- COFFModulePtr module = (COFFModulePtr) voidptr;
- return ( module->handle == item->handle ) ;
-}
+ COFFModulePtr module = (COFFModulePtr) voidptr;
+ return (module->handle == item->handle);
+}
/*
* Manage listResolv
*/
static COFFRelocPtr
-COFFDelayRelocation(cofffile,secndx,rel)
-COFFModulePtr cofffile;
-int secndx;
-RELOC *rel;
+COFFDelayRelocation(COFFModulePtr cofffile, int secndx, RELOC *rel)
{
COFFRelocPtr reloc;
if ((reloc = xf86loadermalloc(sizeof(COFFRelocRec))) == NULL) {
- ErrorF( "COFFDelayRelocation() Unable to allocate memory!!!!\n" );
+ ErrorF("COFFDelayRelocation() Unable to allocate memory!!!!\n");
return 0;
}
- reloc->file=cofffile;
- reloc->secndx=secndx;
- reloc->rel=rel;
+ reloc->file = cofffile;
+ reloc->secndx = secndx;
+ reloc->rel = rel;
reloc->next = 0;
return reloc;
@@ -180,83 +177,80 @@ RELOC *rel;
*/
static COFFCommonPtr
-COFFAddCOMMON(sym,index)
-SYMENT *sym;
-int index;
+COFFAddCOMMON(SYMENT *sym, int index)
{
COFFCommonPtr common;
if ((common = xf86loadermalloc(sizeof(COFFCommonRec))) == NULL) {
- ErrorF( "COFFAddCOMMON() Unable to allocate memory!!!!\n" );
+ ErrorF("COFFAddCOMMON() Unable to allocate memory!!!!\n");
return 0;
}
- common->sym=sym;
- common->index=index;
- common->next=0;
+ common->sym = sym;
+ common->index = index;
+ common->next = 0;
return common;
}
static LOOKUP *
-COFFCreateCOMMON(cofffile)
-COFFModulePtr cofffile;
+COFFCreateCOMMON(COFFModulePtr cofffile)
{
- int numsyms=0,size=0,l=0;
- int offset=0;
- LOOKUP *lookup;
+ int numsyms = 0, size = 0, l = 0;
+ int offset = 0;
+ LOOKUP *lookup;
COFFCommonPtr common;
if (listCOMMON == NULL)
return NULL;
- common=listCOMMON;
+ common = listCOMMON;
for (common = listCOMMON; common; common = common->next) {
/* Ensure long word alignment */
- if( common->sym->n_value != 2
- && common->sym->n_value != 1) /* But not for short and char ;-)(mr)*/
- if( common->sym->n_value%4 != 0 )
- common->sym->n_value+= 4-(common->sym->n_value%4);
+ if (common->sym->n_value != 2 && common->sym->n_value != 1) /* But not for short and char ;-)(mr) */
+ if (common->sym->n_value % 4 != 0)
+ common->sym->n_value += 4 - (common->sym->n_value % 4);
/* accumulate the sizes */
- size+=common->sym->n_value;
+ size += common->sym->n_value;
numsyms++;
}
#ifdef COFFDEBUG
COFFDEBUG("COFFCreateCOMMON() %d entries (%d bytes) of COMMON data\n",
- numsyms, size );
+ numsyms, size);
#endif
- if ((lookup = xf86loadermalloc((numsyms+1)*sizeof(LOOKUP))) == NULL) {
- ErrorF( "COFFCreateCOMMON() Unable to allocate memory!!!!\n" );
- return NULL;
+ if ((lookup = xf86loadermalloc((numsyms + 1) * sizeof(LOOKUP))) == NULL) {
+ ErrorF("COFFCreateCOMMON() Unable to allocate memory!!!!\n");
+ return NULL;
}
- cofffile->comsize=size;
- if ((cofffile->common = xf86loadercalloc(1,size)) == NULL) {
- ErrorF( "COFFCreateCOMMON() Unable to allocate memory!!!!\n" );
- return NULL;
+ cofffile->comsize = size;
+ if ((cofffile->common = xf86loadercalloc(1, size)) == NULL) {
+ ErrorF("COFFCreateCOMMON() Unable to allocate memory!!!!\n");
+ return NULL;
}
/* Traverse the common list and create a lookup table with all the
* common symbols. Destroy the common list in the process.
* See also ResolveSymbols.
*/
- while(listCOMMON) {
- common=listCOMMON;
- lookup[l].symName=COFFGetSymbolName(cofffile,common->index);
- lookup[l].offset=(funcptr)(cofffile->common+offset);
+ while (listCOMMON) {
+ common = listCOMMON;
+ lookup[l].symName = COFFGetSymbolName(cofffile, common->index);
+ lookup[l].offset = (funcptr) (cofffile->common + offset);
#ifdef COFFDEBUG
- COFFDEBUG("Adding %x %s\n", lookup[l].offset, lookup[l].symName );
+ COFFDEBUG("Adding %p %s\n", (void *)lookup[l].offset,
+ lookup[l].symName);
#endif
- listCOMMON=common->next;
- offset+=common->sym->n_value;
- xf86loaderfree(common);
- l++;
+ listCOMMON = common->next;
+ offset += common->sym->n_value;
+ xf86loaderfree(common);
+ l++;
}
/* listCOMMON == NULL */
- lookup[l].symName=NULL; /* Terminate the list */
+ lookup[l].symName = NULL; /* Terminate the list */
return lookup;
}
@@ -268,68 +262,62 @@ COFFModulePtr cofffile;
* Get symbol name
*/
static char *
-COFFGetSymbolName(cofffile, index)
-COFFModulePtr cofffile;
-int index;
+COFFGetSymbolName(COFFModulePtr cofffile, int index)
{
- char *name;
- SYMENT *sym;
+ char *name;
+ SYMENT *sym;
- sym=(SYMENT *)(((unsigned char *)cofffile->symtab)+(index*SYMESZ));
+ sym = (SYMENT *) (((unsigned char *)cofffile->symtab) + (index * SYMESZ));
#ifdef COFFDEBUG
- COFFDEBUG("COFFGetSymbolName(%x,%x) %x",cofffile, index, sym->n_zeroes );
+ COFFDEBUG("COFFGetSymbolName(%p,%x) %lx", (void *)cofffile, index,
+ sym->n_zeroes);
#endif
name = xf86loadermalloc(sym->n_zeroes ? SYMNMLEN + 1
- : strlen((const char *)&cofffile->strtab[(int)sym->n_offset-4]) + 1);
+ : strlen((const char *)&cofffile->
+ strtab[(int)sym->n_offset - 4]) + 1);
if (!name)
FatalError("COFFGetSymbolName: Out of memory\n");
- if( sym->n_zeroes )
- {
- strncpy(name,sym->n_name,SYMNMLEN);
- name[SYMNMLEN]='\000';
- }
- else {
- strcpy(name, (const char *)&cofffile->strtab[(int)sym->n_offset-4]);
- }
+ if (sym->n_zeroes) {
+ strncpy(name, sym->n_name, SYMNMLEN);
+ name[SYMNMLEN] = '\000';
+ } else {
+ strcpy(name, (const char *)&cofffile->strtab[(int)sym->n_offset - 4]);
+ }
#ifdef COFFDEBUG
- COFFDEBUG(" %s\n", name );
+ COFFDEBUG(" %s\n", name);
#endif
return name;
}
static SYMENT *
-COFFGetSymbol(file, index)
-COFFModulePtr file;
-int index;
+COFFGetSymbol(COFFModulePtr file, int index)
{
- return (SYMENT *)(((unsigned char *)file->symtab)+(index*SYMESZ));
+ return (SYMENT *) (((unsigned char *)file->symtab) + (index * SYMESZ));
}
static unsigned char *
-COFFGetSymbolValue(cofffile, index)
-COFFModulePtr cofffile;
-int index;
+COFFGetSymbolValue(COFFModulePtr cofffile, int index)
{
- unsigned char *symval=0; /* value of the indicated symbol */
+ unsigned char *symval = 0; /* value of the indicated symbol */
itemPtr symbol; /* name/value of symbol */
- char *symname;
+ char *symname;
- symname=COFFGetSymbolName(cofffile, index);
+ symname = COFFGetSymbolName(cofffile, index);
#ifdef COFFDEBUG
- COFFDEBUG("COFFGetSymbolValue() for %s=", symname );
+ COFFDEBUG("COFFGetSymbolValue() for %s=", symname);
#endif
symbol = LoaderHashFind(symname);
- if( symbol )
- symval=(unsigned char *)symbol->address;
+ if (symbol)
+ symval = (unsigned char *)symbol->address;
#ifdef COFFDEBUG
- COFFDEBUG("%x\n", symval );
+ COFFDEBUG("%p\n", symval);
#endif
xf86loaderfree(symname);
@@ -343,22 +331,20 @@ int index;
* same module as the calling function.
*/
static unsigned char *
-COFFGetSymbolGlinkValue(cofffile, index)
-COFFModulePtr cofffile;
-int index;
+COFFGetSymbolGlinkValue(COFFModulePtr cofffile, int index)
{
- unsigned char *symval=0; /* value of the indicated symbol */
+ unsigned char *symval = 0; /* value of the indicated symbol */
itemPtr symbol; /* name/value of symbol */
- char *name;
+ char *name;
- name=COFFGetSymbolName(cofffile, index);
+ name = COFFGetSymbolName(cofffile, index);
#ifdef COFFDEBUG
- COFFDEBUG("COFFGetSymbolGlinkValue() for %s=", name );
+ COFFDEBUG("COFFGetSymbolGlinkValue() for %s=", name);
#endif
- symbol = LoaderHashFind(name+1); /* Eat the '.' so we get the
- Function descriptor instead */
+ symbol = LoaderHashFind(name + 1); /* Eat the '.' so we get the
+ * Function descriptor instead */
/* Here we are building up a glink function that will change the TOC
* pointer before calling a function that resides in a different module.
@@ -373,26 +359,27 @@ int index;
7 00000018 4e800420 bctr # branch to it
*/
- if( symbol ) {
- symval=(unsigned char *)&symbol->code.glink;
+ if (symbol) {
+ symval = (unsigned char *)&symbol->code.glink;
#ifdef COFFDEBUG
- COFFDEBUG("%x\n", symval );
- COFFDEBUG("glink_%s=%x\n", name,symval );
-#endif
- symbol->code.glink[ 0]=0x3d80; /* lis r12 */
- symbol->code.glink[ 1]=((unsigned long)symbol->address&0xffff0000)>>16;
- symbol->code.glink[ 2]=0x618c; /* ori r12 */
- symbol->code.glink[ 3]=((unsigned long)symbol->address&0x0000ffff);
- symbol->code.glink[ 4]=0x9041; /* st r2,20(r1) */
- symbol->code.glink[ 5]=0x0014;
- symbol->code.glink[ 6]=0x804c; /* l r2,0(r12) */
- symbol->code.glink[ 7]=0x0000;
- symbol->code.glink[ 8]=0x7c49; /* mtctr r2 */
- symbol->code.glink[ 9]=0x03a6;
- symbol->code.glink[10]=0x804c; /* l r2,4(r12) */
- symbol->code.glink[11]=0x0004;
- symbol->code.glink[12]=0x4e80; /* bctr */
- symbol->code.glink[13]=0x0420;
+ COFFDEBUG("%x\n", symval);
+ COFFDEBUG("glink_%s=%x\n", name, symval);
+#endif
+ symbol->code.glink[0] = 0x3d80; /* lis r12 */
+ symbol->code.glink[1] =
+ ((unsigned long)symbol->address & 0xffff0000) >> 16;
+ symbol->code.glink[2] = 0x618c; /* ori r12 */
+ symbol->code.glink[3] = ((unsigned long)symbol->address & 0x0000ffff);
+ symbol->code.glink[4] = 0x9041; /* st r2,20(r1) */
+ symbol->code.glink[5] = 0x0014;
+ symbol->code.glink[6] = 0x804c; /* l r2,0(r12) */
+ symbol->code.glink[7] = 0x0000;
+ symbol->code.glink[8] = 0x7c49; /* mtctr r2 */
+ symbol->code.glink[9] = 0x03a6;
+ symbol->code.glink[10] = 0x804c; /* l r2,4(r12) */
+ symbol->code.glink[11] = 0x0004;
+ symbol->code.glink[12] = 0x4e80; /* bctr */
+ symbol->code.glink[13] = 0x0420;
ppc_flush_icache(&symbol->code.glink[0]);
ppc_flush_icache(&symbol->code.glink[12]);
}
@@ -406,17 +393,15 @@ int index;
* Fix all of the relocation for the given section.
*/
static COFFRelocPtr
-COFF_RelocateEntry(cofffile, secndx, rel)
-COFFModulePtr cofffile;
-int secndx; /* index of the target section */
-RELOC *rel;
+COFF_RelocateEntry(COFFModulePtr cofffile, int secndx, RELOC *rel)
{
- SYMENT *symbol; /* value of the indicated symbol */
+ SYMENT *symbol; /* value of the indicated symbol */
unsigned long *dest32; /* address of the place being modified */
+
#if defined(__powerpc__)
unsigned short *dest16; /* address of the place being modified */
- itemPtr symitem; /* symbol structure from has table */
- char *name;
+ itemPtr symitem; /* symbol structure from has table */
+ char *name;
#endif
unsigned char *symval; /* value of the indicated symbol */
@@ -431,386 +416,401 @@ RELOC *rel;
*/
#ifdef COFFDEBUG
- COFFDEBUG("%x %d %o ",
- rel->r_vaddr,rel->r_symndx,rel->r_type );
+ COFFDEBUG("%lx %ld %o ", (unsigned long)rel->r_vaddr,
+ rel->r_symndx, rel->r_type);
#if defined(__powerpc__)
COFFDEBUG("[%x %x %x] ",
- RELOC_RSIGN(*rel), RELOC_RFIXUP(*rel), RELOC_RLEN(*rel));
+ RELOC_RSIGN(*rel), RELOC_RFIXUP(*rel), RELOC_RLEN(*rel));
#endif
#endif
- symbol=COFFGetSymbol(cofffile,rel->r_symndx);
+ symbol = COFFGetSymbol(cofffile, rel->r_symndx);
#ifdef COFFDEBUG
- COFFDEBUG("%d %x %d-%d\n", symbol->n_sclass, symbol->n_value, symbol->n_scnum, secndx );
+ COFFDEBUG("%d %lx %d-%d\n", symbol->n_sclass, symbol->n_value,
+ symbol->n_scnum, secndx);
#endif
/*
* Check to see if the relocation offset is part of the .text segment.
* If not, we must change the offset to be relative to the .data section
* which is NOT contiguous.
- */
- switch(secndx+1) { /* change the bias */
+ */
+ switch (secndx + 1) { /* change the bias */
case N_TEXT:
- if( (long)rel->r_vaddr < cofffile->txtaddr ||
- (long)rel->r_vaddr > (long)(cofffile->txtaddr+cofffile->txtsize) ) {
- FatalError("Relocation against N_TEXT not in .text section\n");
+ if ((long)rel->r_vaddr < cofffile->txtaddr ||
+ (long)rel->r_vaddr >
+ (long)(cofffile->txtaddr + cofffile->txtsize)) {
+ FatalError("Relocation against N_TEXT not in .text section\n");
}
- dest32=(unsigned long *)((long)(cofffile->saddr[secndx])+
- ((unsigned char *)rel->r_vaddr-cofffile->txtaddr));
+ dest32 = (unsigned long *)((long)(cofffile->saddr[secndx]) +
+ ((unsigned char *)rel->r_vaddr -
+ cofffile->txtaddr));
break;
case N_DATA:
- if( (long)rel->r_vaddr < cofffile->dataddr ||
- (long)rel->r_vaddr > (long)(cofffile->dataddr+cofffile->datsize) ) {
- FatalError("Relocation against N_DATA not in .data section\n");
+ if ((long)rel->r_vaddr < cofffile->dataddr ||
+ (long)rel->r_vaddr >
+ (long)(cofffile->dataddr + cofffile->datsize)) {
+ FatalError("Relocation against N_DATA not in .data section\n");
}
- dest32=(unsigned long *)((long)(cofffile->saddr[secndx])+
- ((unsigned char *)rel->r_vaddr-cofffile->dataddr));
+ dest32 = (unsigned long *)((long)(cofffile->saddr[secndx]) +
+ ((unsigned char *)rel->r_vaddr -
+ cofffile->dataddr));
break;
case N_BSS:
- if( (long)rel->r_vaddr < cofffile->bssaddr ||
- (long)rel->r_vaddr > (long)(cofffile->bssaddr+cofffile->bsssize) ) {
- FatalError("Relocation against N_TEXT not in .bss section\n");
+ if ((long)rel->r_vaddr < cofffile->bssaddr ||
+ (long)rel->r_vaddr >
+ (long)(cofffile->bssaddr + cofffile->bsssize)) {
+ FatalError("Relocation against N_TEXT not in .bss section\n");
}
- dest32=(unsigned long *)((long)(cofffile->saddr[secndx])+
- ((unsigned char *)rel->r_vaddr-cofffile->bssaddr));
+ dest32 = (unsigned long *)((long)(cofffile->saddr[secndx]) +
+ ((unsigned char *)rel->r_vaddr -
+ cofffile->bssaddr));
break;
default:
- FatalError("Relocation against unknown section %d\n", secndx );
+ FatalError("Relocation against unknown section %d\n", secndx);
}
- if( symbol->n_sclass == 0 )
- {
- symval=(unsigned char *)(symbol->n_value+(*dest32)-symbol->n_type);
+ if (symbol->n_sclass == 0) {
+ symval = (unsigned char *)(symbol->n_value + (*dest32) -
+ symbol->n_type);
#ifdef COFFDEBUG
- COFFDEBUG( "symbol->n_sclass==0\n" );
- COFFDEBUG( "dest32=%x\t", dest32 );
- COFFDEBUG( "symval=%x\t", symval );
- COFFDEBUG( "*dest32=%8.8x\t", *dest32 );
+ COFFDEBUG("symbol->n_sclass==0\n");
+ COFFDEBUG("dest32=%p\t", (void *)dest32);
+ COFFDEBUG("symval=%p\t", symval);
+ COFFDEBUG("*dest32=%8.8lx\t", *dest32);
#endif
- *dest32=(unsigned long)symval;
- return 0;
- }
+ *dest32 = (unsigned long)symval;
+ return 0;
+ }
- switch( rel->r_type )
- {
+ switch (rel->r_type) {
#if defined(i386)
- case R_DIR32:
- symval=COFFGetSymbolValue(cofffile, rel->r_symndx);
- if( symval ) {
+ case R_DIR32:
+ symval = COFFGetSymbolValue(cofffile, rel->r_symndx);
+ if (symval) {
#ifdef COFFDEBUG
- char *namestr;
- COFFDEBUG( "R_DIR32 %s\n",
- namestr=COFFGetSymbolName(cofffile,rel->r_symndx) );
- xf86loaderfree(namestr);
- COFFDEBUG( "txtsize=%x\t", cofffile->txtsize );
- COFFDEBUG( "dest32=%x\t", dest32 );
- COFFDEBUG( "symval=%x\t", symval );
- COFFDEBUG( "*dest32=%8.8x\t", *dest32 );
-#endif
- *dest32=(unsigned long)(symval+(*dest32)-symbol->n_value);
- } else {
- switch( symbol->n_scnum ) {
- case N_UNDEF:
+ char *namestr;
+
+ COFFDEBUG("R_DIR32 %s\n",
+ namestr = COFFGetSymbolName(cofffile, rel->r_symndx));
+ xf86loaderfree(namestr);
+ COFFDEBUG("txtsize=%x\t", cofffile->txtsize);
+ COFFDEBUG("dest32=%p\t", (void *)dest32);
+ COFFDEBUG("symval=%p\t", symval);
+ COFFDEBUG("*dest32=%8.8lx\t", *dest32);
+#endif
+ *dest32 = (unsigned long)(symval + (*dest32) - symbol->n_value);
+ } else {
+ switch (symbol->n_scnum) {
+ case N_UNDEF:
#ifdef COFFDEBUG
- COFFDEBUG( "R_DIR32 N_UNDEF\n" );
+ COFFDEBUG("R_DIR32 N_UNDEF\n");
#endif
- return COFFDelayRelocation(cofffile,secndx,rel);
- case N_ABS:
+ return COFFDelayRelocation(cofffile, secndx, rel);
+ case N_ABS:
#ifdef COFFDEBUG
- COFFDEBUG( "R_DIR32 N_ABS\n" );
+ COFFDEBUG("R_DIR32 N_ABS\n");
#endif
- return 0;
- case N_DEBUG:
+ return 0;
+ case N_DEBUG:
#ifdef COFFDEBUG
- COFFDEBUG( "R_DIR32 N_DEBUG\n" );
+ COFFDEBUG("R_DIR32 N_DEBUG\n");
#endif
- return 0;
- case N_COMMENT:
+ return 0;
+ case N_COMMENT:
#ifdef COFFDEBUG
- COFFDEBUG( "R_DIR32 N_COMMENT\n" );
+ COFFDEBUG("R_DIR32 N_COMMENT\n");
#endif
- return 0;
- case N_TEXT:
+ return 0;
+ case N_TEXT:
#ifdef COFFDEBUG
- COFFDEBUG( "R_DIR32 N_TEXT\n" );
- COFFDEBUG( "dest32=%x\t", dest32 );
- COFFDEBUG( "symval=%x\t", symval );
- COFFDEBUG( "*dest32=%8.8x\t", *dest32 );
-#endif
- *dest32=(unsigned long)((*dest32)+
- (unsigned long)(cofffile->saddr[N_TEXT-1]));
- break;
- case N_DATA:
+ COFFDEBUG("R_DIR32 N_TEXT\n");
+ COFFDEBUG("dest32=%p\t", (void *)dest32);
+ COFFDEBUG("symval=%p\t", symval);
+ COFFDEBUG("*dest32=%8.8lx\t", *dest32);
+#endif
+ *dest32 = (unsigned long)((*dest32) +
+ (unsigned long)(cofffile->
+ saddr[N_TEXT - 1]));
+ break;
+ case N_DATA:
#ifdef COFFDEBUG
- COFFDEBUG( "R_DIR32 N_DATA\n" );
- COFFDEBUG( "txtsize=%x\t", cofffile->txtsize );
- COFFDEBUG( "dest32=%x\t", dest32 );
- COFFDEBUG( "symval=%x\t", symval );
- COFFDEBUG( "*dest32=%8.8x\t", *dest32 );
-#endif
- *dest32=(unsigned long)((*dest32)+
- ((unsigned long)(cofffile->saddr[N_DATA-1]))-
- cofffile->dataddr);
- break;
- case N_BSS:
+ COFFDEBUG("R_DIR32 N_DATA\n");
+ COFFDEBUG("txtsize=%x\t", cofffile->txtsize);
+ COFFDEBUG("dest32=%p\t", (void *)dest32);
+ COFFDEBUG("symval=%p\t", symval);
+ COFFDEBUG("*dest32=%8.8lx\t", *dest32);
+#endif
+ *dest32 = (unsigned long)((*dest32) +
+ ((unsigned long)(cofffile->
+ saddr[N_DATA -
+ 1])) -
+ cofffile->dataddr);
+ break;
+ case N_BSS:
#ifdef COFFDEBUG
- COFFDEBUG( "R_DIR32 N_BSS\n" );
- COFFDEBUG( "dest32=%x\t", dest32 );
- COFFDEBUG( "symval=%x\t", symval );
- COFFDEBUG( "*dest32=%8.8x\t", *dest32 );
-#endif
- *dest32=(unsigned long)((*dest32)+
- (unsigned long)(cofffile->saddr[N_BSS-1])-
- (cofffile->bssaddr));
- break;
- default:
- ErrorF("R_DIR32 with unexpected section %d\n",
- symbol->n_scnum );
- }
-
+ COFFDEBUG("R_DIR32 N_BSS\n");
+ COFFDEBUG("dest32=%p\t", (void *)dest32);
+ COFFDEBUG("symval=%p\t", symval);
+ COFFDEBUG("*dest32=%8.8lx\t", *dest32);
+#endif
+ *dest32 = (unsigned long)((*dest32) +
+ (unsigned long)(cofffile->
+ saddr[N_BSS - 1]) -
+ (cofffile->bssaddr));
+ break;
+ default:
+ ErrorF("R_DIR32 with unexpected section %d\n",
+ symbol->n_scnum);
}
+
+ }
#ifdef COFFDEBUG
- COFFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ COFFDEBUG("*dest32=%8.8lx\n", *dest32);
#endif
+ break;
+ case R_PCRLONG:
+ if (symbol->n_scnum == N_TEXT)
break;
- case R_PCRLONG:
- if( symbol->n_scnum == N_TEXT )
- break;
- symval=COFFGetSymbolValue(cofffile, rel->r_symndx);
+ symval = COFFGetSymbolValue(cofffile, rel->r_symndx);
#ifdef COFFDEBUG
- COFFDEBUG( "R_PCRLONG ");
- COFFDEBUG( "dest32=%x\t", dest32 );
- COFFDEBUG( "symval=%x\t", symval );
- COFFDEBUG( "*dest32=%8.8x\t", *dest32 );
+ COFFDEBUG("R_PCRLONG ");
+ COFFDEBUG("dest32=%p\t", (void *)dest32);
+ COFFDEBUG("symval=%p\t", symval);
+ COFFDEBUG("*dest32=%8.8lx\t", *dest32);
#endif
- if( symval == 0 ) {
+ if (symval == 0) {
#ifdef COFFDEBUG
- char *name;
- COFFDEBUG( "***Unable to resolve symbol %s\n",
- name=COFFGetSymbolName(cofffile,rel->r_symndx) );
- xf86loaderfree(name);
+ char *name;
+
+ COFFDEBUG("***Unable to resolve symbol %s\n",
+ name = COFFGetSymbolName(cofffile, rel->r_symndx));
+ xf86loaderfree(name);
#endif
- return COFFDelayRelocation(cofffile,secndx,rel);
- }
- *dest32=(unsigned long)(symval-((long)dest32+sizeof(long)));
+ return COFFDelayRelocation(cofffile, secndx, rel);
+ }
+ *dest32 = (unsigned long)(symval - ((long)dest32 + sizeof(long)));
#ifdef COFFDEBUG
- COFFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ COFFDEBUG("*dest32=%8.8lx\n", *dest32);
#endif
- break;
- case R_ABS:
- /*
- * Nothing to really do here.
- * Usually, a dummy relocation for .file
- */
- break;
+ break;
+ case R_ABS:
+ /*
+ * Nothing to really do here.
+ * Usually, a dummy relocation for .file
+ */
+ break;
#endif /* i386 */
#if defined(__powerpc__)
- case R_POS:
- /*
- * Positive Relocation
- */
- if( RELOC_RLEN(*rel) != 0x1f )
- FatalError("R_POS with size != 32 bits" );
- symval=COFFGetSymbolValue(cofffile, rel->r_symndx);
- if( symval ) {
+ case R_POS:
+ /*
+ * Positive Relocation
+ */
+ if (RELOC_RLEN(*rel) != 0x1f)
+ FatalError("R_POS with size != 32 bits");
+ symval = COFFGetSymbolValue(cofffile, rel->r_symndx);
+ if (symval) {
#ifdef COFFDEBUG
- COFFDEBUG( "R_POS ");
- COFFDEBUG( "dest32=%x\t", dest32 );
- COFFDEBUG( "symval=%x\t", symval );
- COFFDEBUG( "*dest32=%8.8x\t", *dest32 );
+ COFFDEBUG("R_POS ");
+ COFFDEBUG("dest32=%x\t", dest32);
+ COFFDEBUG("symval=%x\t", symval);
+ COFFDEBUG("*dest32=%8.8x\t", *dest32);
#endif
- *dest32=(unsigned long)(symval+(*dest32)-symbol->n_value);
- ppc_flush_icache(dest32);
- } else {
- switch( symbol->n_scnum ) {
- case N_UNDEF:
+ *dest32 = (unsigned long)(symval + (*dest32) - symbol->n_value);
+ ppc_flush_icache(dest32);
+ } else {
+ switch (symbol->n_scnum) {
+ case N_UNDEF:
#ifdef COFFDEBUG
- COFFDEBUG( "R_POS N_UNDEF\n" );
+ COFFDEBUG("R_POS N_UNDEF\n");
#endif
- return COFFDelayRelocation(cofffile,secndx,rel);
- case N_ABS:
+ return COFFDelayRelocation(cofffile, secndx, rel);
+ case N_ABS:
#ifdef COFFDEBUG
- COFFDEBUG( "R_POS N_ABS\n" );
+ COFFDEBUG("R_POS N_ABS\n");
#endif
- return 0;
- case N_DEBUG:
+ return 0;
+ case N_DEBUG:
#ifdef COFFDEBUG
- COFFDEBUG( "R_POS N_DEBUG\n" );
+ COFFDEBUG("R_POS N_DEBUG\n");
#endif
- return 0;
- case N_COMMENT:
+ return 0;
+ case N_COMMENT:
#ifdef COFFDEBUG
- COFFDEBUG( "R_POS N_COMMENT\n" );
+ COFFDEBUG("R_POS N_COMMENT\n");
#endif
- return 0;
- case N_TEXT:
+ return 0;
+ case N_TEXT:
#ifdef COFFDEBUG
- COFFDEBUG( "R_POS N_TEXT\n" );
- COFFDEBUG( "dest32=%x\t", dest32 );
- COFFDEBUG( "symval=%x\t", symval );
- COFFDEBUG( "*dest32=%8.8x\t", *dest32 );
-#endif
- *dest32=(unsigned long)((*dest32)+
- ((unsigned long)(cofffile->saddr[N_TEXT-1]))-
- cofffile->txtaddr);
- ppc_flush_icache(dest32);
- break;
- case N_DATA:
+ COFFDEBUG("R_POS N_TEXT\n");
+ COFFDEBUG("dest32=%x\t", dest32);
+ COFFDEBUG("symval=%x\t", symval);
+ COFFDEBUG("*dest32=%8.8x\t", *dest32);
+#endif
+ *dest32 = (unsigned long)((*dest32) +
+ ((unsigned long)(cofffile->
+ saddr[N_TEXT -
+ 1])) -
+ cofffile->txtaddr);
+ ppc_flush_icache(dest32);
+ break;
+ case N_DATA:
#ifdef COFFDEBUG
- COFFDEBUG( "R_POS N_DATA\n" );
- COFFDEBUG( "txtsize=%x\t", cofffile->txtsize );
- COFFDEBUG( "dest32=%x\t", dest32 );
- COFFDEBUG( "symval=%x\t", symval );
- COFFDEBUG( "*dest32=%8.8x\t", *dest32 );
-#endif
- *dest32=(unsigned long)((*dest32)+
- ((unsigned long)(cofffile->saddr[N_DATA-1]))-
- cofffile->dataddr);
- ppc_flush_icache(dest32);
- break;
- case N_BSS:
+ COFFDEBUG("R_POS N_DATA\n");
+ COFFDEBUG("txtsize=%x\t", cofffile->txtsize);
+ COFFDEBUG("dest32=%x\t", dest32);
+ COFFDEBUG("symval=%x\t", symval);
+ COFFDEBUG("*dest32=%8.8x\t", *dest32);
+#endif
+ *dest32 = (unsigned long)((*dest32) +
+ ((unsigned long)(cofffile->
+ saddr[N_DATA -
+ 1])) -
+ cofffile->dataddr);
+ ppc_flush_icache(dest32);
+ break;
+ case N_BSS:
#ifdef COFFDEBUG
- COFFDEBUG( "R_POS N_BSS\n" );
- COFFDEBUG( "dest32=%x\t", dest32 );
- COFFDEBUG( "symval=%x\t", symval );
- COFFDEBUG( "*dest32=%8.8x\t", *dest32 );
-#endif
- *dest32=(unsigned long)((*dest32)+
- (unsigned long)(cofffile->saddr[N_BSS-1])-
- (cofffile->bssaddr));
- ppc_flush_icache(dest32);
- break;
- default:
- ErrorF("R_POS with unexpected section %d\n",
- symbol->n_scnum );
- }
+ COFFDEBUG("R_POS N_BSS\n");
+ COFFDEBUG("dest32=%x\t", dest32);
+ COFFDEBUG("symval=%x\t", symval);
+ COFFDEBUG("*dest32=%8.8x\t", *dest32);
+#endif
+ *dest32 = (unsigned long)((*dest32) +
+ (unsigned long)(cofffile->
+ saddr[N_BSS - 1]) -
+ (cofffile->bssaddr));
+ ppc_flush_icache(dest32);
+ break;
+ default:
+ ErrorF("R_POS with unexpected section %d\n", symbol->n_scnum);
}
+ }
#ifdef COFFDEBUG
- COFFDEBUG( "*dest32=%8.8x\t", *dest32 );
- COFFDEBUG( "\n" );
+ COFFDEBUG("*dest32=%8.8x\t", *dest32);
+ COFFDEBUG("\n");
#endif
- break;
- case R_TOC:
- /*
- * Relative to TOC
- */
- {
- dest16=(unsigned short *)dest32;
- if( RELOC_RLEN(*rel) != 0x0f )
- FatalError("R_TOC with size != 16 bits" );
+ break;
+ case R_TOC:
+ /*
+ * Relative to TOC
+ */
+ {
+ dest16 = (unsigned short *)dest32;
+ if (RELOC_RLEN(*rel) != 0x0f)
+ FatalError("R_TOC with size != 16 bits");
#ifdef COFFDEBUG
- COFFDEBUG( "R_TOC ");
- COFFDEBUG( "dest16=%x\t", dest16 );
- COFFDEBUG( "symbol=%x\t", symbol );
- COFFDEBUG( "symbol->n_value=%x\t", symbol->n_value );
- COFFDEBUG( "cofffile->toc=%x\t", cofffile->toc );
- COFFDEBUG( "*dest16=%8.8x\t", *dest16 );
-#endif
- *dest16=(unsigned long)((symbol->n_value-cofffile->toc));
+ COFFDEBUG("R_TOC ");
+ COFFDEBUG("dest16=%x\t", dest16);
+ COFFDEBUG("symbol=%x\t", symbol);
+ COFFDEBUG("symbol->n_value=%x\t", symbol->n_value);
+ COFFDEBUG("cofffile->toc=%x\t", cofffile->toc);
+ COFFDEBUG("*dest16=%8.8x\t", *dest16);
+#endif
+ *dest16 = (unsigned long)((symbol->n_value - cofffile->toc));
ppc_flush_icache(dest16);
- }
+ }
#ifdef COFFDEBUG
- COFFDEBUG( "*dest16=%8.8x\t", *dest16 );
- COFFDEBUG( "\n" );
+ COFFDEBUG("*dest16=%8.8x\t", *dest16);
+ COFFDEBUG("\n");
#endif
- break;
- case R_BR:
- /*
- * Branch relative to self, non-modifiable
- */
-
- if( RELOC_RLEN(*rel) != 0x19 )
- FatalError("R_BR with size != 24 bits" );
- name = COFFGetSymbolName(cofffile, rel->r_symndx);
+ break;
+ case R_BR:
+ /*
+ * Branch relative to self, non-modifiable
+ */
+
+ if (RELOC_RLEN(*rel) != 0x19)
+ FatalError("R_BR with size != 24 bits");
+ name = COFFGetSymbolName(cofffile, rel->r_symndx);
+ symitem = LoaderHashFind(name);
+ if (symitem == 0) {
+ name++;
symitem = LoaderHashFind(name);
- if( symitem == 0 ) {
- name++;
- symitem = LoaderHashFind(name);
- }
- if( symitem && cofffile->module != symitem->module ) {
+ }
+ if (symitem && cofffile->module != symitem->module) {
#ifdef COFFDEBUG
- COFFDEBUG("Symbol module %d != file module %d\n",
- symitem->module, cofffile->module );
+ COFFDEBUG("Symbol module %d != file module %d\n",
+ symitem->module, cofffile->module);
#endif
- symval=COFFGetSymbolGlinkValue(cofffile, rel->r_symndx);
- }
- else
- symval=COFFGetSymbolValue(cofffile, rel->r_symndx);
- if( symval == 0 ) {
+ symval = COFFGetSymbolGlinkValue(cofffile, rel->r_symndx);
+ } else
+ symval = COFFGetSymbolValue(cofffile, rel->r_symndx);
+ if (symval == 0) {
#ifdef COFFDEBUG
- char *name;
- COFFDEBUG( "***Unable to resolve symbol %s\n",
- name=COFFGetSymbolName(cofffile,rel->r_symndx) );
- xf86loaderfree(name);
+ char *name;
+
+ COFFDEBUG("***Unable to resolve symbol %s\n",
+ name = COFFGetSymbolName(cofffile, rel->r_symndx));
+ xf86loaderfree(name);
#endif
- return COFFDelayRelocation(cofffile,secndx,rel);
- }
+ return COFFDelayRelocation(cofffile, secndx, rel);
+ }
#ifdef COFFDEBUG
- COFFDEBUG( "R_BR ");
- COFFDEBUG( "dest32=%x\t", dest32 );
- COFFDEBUG( "symval=%x\t", symval );
- COFFDEBUG( "*dest32=%8.8x\t", *dest32 );
-#endif
- {
- unsigned long val;
- val=((unsigned long)symval-(unsigned long)dest32);
+ COFFDEBUG("R_BR ");
+ COFFDEBUG("dest32=%x\t", dest32);
+ COFFDEBUG("symval=%x\t", symval);
+ COFFDEBUG("*dest32=%8.8x\t", *dest32);
+#endif
+ {
+ unsigned long val;
+
+ val = ((unsigned long)symval - (unsigned long)dest32);
#ifdef COFFDEBUG
- COFFDEBUG( "val=%8.8x\n", val );
+ COFFDEBUG("val=%8.8x\n", val);
#endif
- val = val>>2;
- if( (val & 0x3f000000) != 0x3f000000 &&
- (val & 0x3f000000) != 0x00000000 ) {
- FatalError( "R_BR offset %x too large\n", val<<2 );
- break;
- }
- val &= 0x00ffffff;
+ val = val >> 2;
+ if ((val & 0x3f000000) != 0x3f000000 &&
+ (val & 0x3f000000) != 0x00000000) {
+ FatalError("R_BR offset %x too large\n", val << 2);
+ break;
+ }
+ val &= 0x00ffffff;
#ifdef COFFDEBUG
- COFFDEBUG( "val=%8.8x\n", val );
-#endif
- /*
- * The address part contains the offset to the beginning
- * of the .text section. Disreguard this since we have
- * calculated the correct offset already.
- */
- (*dest32)=((*dest32)&0xfc000003)|(val<<2);
+ COFFDEBUG("val=%8.8x\n", val);
+#endif
+ /*
+ * The address part contains the offset to the beginning
+ * of the .text section. Disreguard this since we have
+ * calculated the correct offset already.
+ */
+ (*dest32) = ((*dest32) & 0xfc000003) | (val << 2);
#ifdef COFFDEBUG
- COFFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ COFFDEBUG("*dest32=%8.8x\n", *dest32);
#endif
- if( cofffile->module != symitem->module ) {
- (*++dest32)=0x80410014; /* lwz r2,20(r1) */
- }
- ppc_flush_icache(--dest32);
+ if (cofffile->module != symitem->module) {
+ (*++dest32) = 0x80410014; /* lwz r2,20(r1) */
}
+ ppc_flush_icache(--dest32);
+ }
- break;
+ break;
#endif /* __powerpc__ */
- default:
- ErrorF(
- "COFF_RelocateEntry() Unsupported relocation type %o\n",
- rel->r_type );
- break;
- }
+ default:
+ ErrorF("COFF_RelocateEntry() Unsupported relocation type %o\n",
+ rel->r_type);
+ break;
+ }
return 0;
}
static COFFRelocPtr
-COFFCollectRelocations(cofffile)
-COFFModulePtr cofffile;
+COFFCollectRelocations(COFFModulePtr cofffile)
{
- unsigned short i,j;
- RELOC *rel;
- SCNHDR *sec;
+ unsigned short i, j;
+ RELOC *rel;
+ SCNHDR *sec;
COFFRelocPtr reloc_head = NULL;
COFFRelocPtr tmp;
- for(i=0; i<cofffile->numsh; i++ ) {
- if( cofffile->saddr[i] == NULL )
- continue; /* Section not loaded!! */
- sec=&(cofffile->sections[i]);
- for(j=0;j<sec->s_nreloc;j++) {
- rel=(RELOC *)(cofffile->reladdr[i]+(j*RELSZ));
- tmp = COFFDelayRelocation(cofffile,i,rel);
+ for (i = 0; i < cofffile->numsh; i++) {
+ if (cofffile->saddr[i] == NULL)
+ continue; /* Section not loaded!! */
+ sec = &(cofffile->sections[i]);
+ for (j = 0; j < sec->s_nreloc; j++) {
+ rel = (RELOC *) (cofffile->reladdr[i] + (j * RELSZ));
+ tmp = COFFDelayRelocation(cofffile, i, rel);
tmp->next = reloc_head;
reloc_head = tmp;
}
@@ -826,199 +826,191 @@ COFFModulePtr cofffile;
*/
static LOOKUP *
-COFF_GetSymbols(cofffile)
-COFFModulePtr cofffile;
+COFF_GetSymbols(COFFModulePtr cofffile)
{
- SYMENT *sym;
- AUXENT *aux=NULL;
- int i, l, numsyms;
- LOOKUP *lookup, *lookup_common, *p;
- char *symname;
+ SYMENT *sym;
+ AUXENT *aux = NULL;
+ int i, l, numsyms;
+ LOOKUP *lookup, *lookup_common, *p;
+ char *symname;
/*
* Load the symbols into memory
*/
- numsyms=cofffile->header->f_nsyms;
+ numsyms = cofffile->header->f_nsyms;
#ifdef COFFDEBUG
- COFFDEBUG("COFF_GetSymbols(): %d symbols\n", numsyms );
+ COFFDEBUG("COFF_GetSymbols(): %d symbols\n", numsyms);
#endif
- cofffile->symsize=(numsyms*SYMESZ);
- cofffile->symtab=(SYMENT *)_LoaderFileToMem(cofffile->fd,cofffile->header->f_symptr,
- (numsyms*SYMESZ),"symbols");
+ cofffile->symsize = (numsyms * SYMESZ);
+ cofffile->symtab =
+ (SYMENT *) _LoaderFileToMem(cofffile->fd,
+ cofffile->header->f_symptr,
+ (numsyms * SYMESZ), "symbols");
- if ((lookup = xf86loadermalloc((numsyms+1)*sizeof(LOOKUP))) == NULL)
+ if ((lookup = xf86loadermalloc((numsyms + 1) * sizeof(LOOKUP))) == NULL)
return NULL;
- for(i=0,l=0; i<numsyms; i++)
- {
- sym=(SYMENT *)(((unsigned char *)cofffile->symtab)+(i*SYMESZ));
- symname=COFFGetSymbolName(cofffile,i);
- if( sym->n_numaux > 0 )
- aux=(AUXENT *)(((unsigned char *)cofffile->symtab)+((i+1)*SYMESZ));
- else
- aux=NULL;
+ for (i = 0, l = 0; i < numsyms; i++) {
+ sym = (SYMENT *) (((unsigned char *)cofffile->symtab) + (i * SYMESZ));
+ symname = COFFGetSymbolName(cofffile, i);
+ if (sym->n_numaux > 0)
+ aux = (AUXENT *) (((unsigned char *)cofffile->symtab) +
+ ((i + 1) * SYMESZ));
+ else
+ aux = NULL;
#ifdef COFFDEBUG
- COFFDEBUG("\t%d %d %x %x %d %d %s\n",
- i, sym->n_scnum, sym->n_value, sym->n_type,
- sym->n_sclass, sym->n_numaux, symname );
- if( aux )
- COFFDEBUG("aux=\t%d %x %x %x %x %x %x\n",
- aux->x_scnlen, aux->x_parmhash, aux->x_snhash,
- aux->x_smtyp, aux->x_smclas, aux->x_stab,
- aux->x_snstab );
-#endif
- i+=sym->n_numaux;
- /*
- * check for TOC csect before discarding C_HIDEXT below
- */
- if( aux && aux->x_smclas == XMC_TC0 ) {
- if( sym->n_scnum != N_DATA )
- FatalError("TOC not in N_DATA section");
- cofffile->toc=sym->n_value;
- cofffile->tocaddr=(cofffile->saddr[sym->n_scnum-1]+
- sym->n_value-(cofffile->dataddr));
+ COFFDEBUG("\t%d %d %lx %x %d %d %s\n",
+ i, sym->n_scnum, sym->n_value, sym->n_type,
+ sym->n_sclass, sym->n_numaux, symname);
+ if (aux)
+ COFFDEBUG("aux=\t%ld %lx %x %x %x %lx %x\n",
+ aux->x_scnlen, aux->x_parmhash, aux->x_snhash,
+ aux->x_smtyp, aux->x_smclas, aux->x_stab,
+ aux->x_snstab);
+#endif
+ i += sym->n_numaux;
+ /*
+ * check for TOC csect before discarding C_HIDEXT below
+ */
+ if (aux && aux->x_smclas == XMC_TC0) {
+ if (sym->n_scnum != N_DATA)
+ FatalError("TOC not in N_DATA section");
+ cofffile->toc = sym->n_value;
+ cofffile->tocaddr = (cofffile->saddr[sym->n_scnum - 1] +
+ sym->n_value - (cofffile->dataddr));
#ifdef COFFDEBUG
- COFFDEBUG("TOC=%x\n", cofffile->toc );
- COFFDEBUG("TOCaddr=%x\n", cofffile->tocaddr );
+ COFFDEBUG("TOC=%lx\n", cofffile->toc);
+ COFFDEBUG("TOCaddr=%p\n", cofffile->tocaddr);
#endif
- continue;
- }
- if( sym->n_sclass == C_HIDEXT ) {
+ continue;
+ }
+ if (sym->n_sclass == C_HIDEXT) {
/*
&& aux && !(aux->x_smclas == XMC_DS
&& aux->x_smtyp == XTY_SD) ) ) {
*/
#ifdef COFFDEBUG
- COFFDEBUG("Skipping C_HIDEXT class symbol %s\n", symname );
+ COFFDEBUG("Skipping C_HIDEXT class symbol %s\n", symname);
#endif
- continue;
- }
- switch( sym->n_scnum )
- {
- case N_UNDEF:
- if( sym->n_value != 0 ) {
- char *name;
- COFFCommonPtr tmp;
-
- name = COFFGetSymbolName(cofffile,i);
+ continue;
+ }
+ switch (sym->n_scnum) {
+ case N_UNDEF:
+ if (sym->n_value != 0) {
+ char *name;
+ COFFCommonPtr tmp;
+
+ name = COFFGetSymbolName(cofffile, i);
#ifdef COFFDEBUG
- COFFDEBUG("Adding COMMON space for %s\n", name);
-#endif
- if(!LoaderHashFind(name)) {
- tmp = COFFAddCOMMON(sym,i);
- if (tmp) {
- tmp->next = listCOMMON;
- listCOMMON = tmp;
- }
- }
- xf86loaderfree(name);
+ COFFDEBUG("Adding COMMON space for %s\n", name);
+#endif
+ if (!LoaderHashFind(name)) {
+ tmp = COFFAddCOMMON(sym, i);
+ if (tmp) {
+ tmp->next = listCOMMON;
+ listCOMMON = tmp;
}
- xf86loaderfree(symname);
- break;
- case N_ABS:
- case N_DEBUG:
- case N_COMMENT:
+ }
+ xf86loaderfree(name);
+ }
+ xf86loaderfree(symname);
+ break;
+ case N_ABS:
+ case N_DEBUG:
+ case N_COMMENT:
#ifdef COFFDEBUG
- COFFDEBUG("Freeing %s, section %d\n",
- symname, sym->n_scnum );
-#endif
- xf86loaderfree(symname);
- break;
- case N_TEXT:
- if( (sym->n_sclass == C_EXT || sym->n_sclass == C_HIDEXT)
- && cofffile->saddr[sym->n_scnum-1]) {
- lookup[l].symName=symname;
- lookup[l].offset=(funcptr)
- (cofffile->saddr[sym->n_scnum-1]+
- sym->n_value-cofffile->txtaddr);
+ COFFDEBUG("Freeing %s, section %d\n", symname, sym->n_scnum);
+#endif
+ xf86loaderfree(symname);
+ break;
+ case N_TEXT:
+ if ((sym->n_sclass == C_EXT || sym->n_sclass == C_HIDEXT)
+ && cofffile->saddr[sym->n_scnum - 1]) {
+ lookup[l].symName = symname;
+ lookup[l].offset = (funcptr)
+ (cofffile->saddr[sym->n_scnum - 1] +
+ sym->n_value - cofffile->txtaddr);
#ifdef COFFDEBUG
- COFFDEBUG("Adding %x %s\n",
- lookup[l].offset, lookup[l].symName );
+ COFFDEBUG("Adding %p %s\n",
+ (void *)lookup[l].offset, lookup[l].symName);
#endif
- l++;
- }
- else {
+ l++;
+ } else {
#ifdef COFFDEBUG
- COFFDEBUG( "TEXT Section not loaded %d\n",
- sym->n_scnum-1 );
+ COFFDEBUG("TEXT Section not loaded %d\n", sym->n_scnum - 1);
#endif
- xf86loaderfree(symname);
- }
- break;
- case N_DATA:
- /*
- * Note: COFF expects .data to be contiguous with
- * .data, so that offsets for .data are relative to
- * .text. We need to adjust for this, and make them
- * relative to .data so that the relocation can be
- * properly applied. This is needed becasue we allocate
- * .data seperately from .text.
- */
- if( (sym->n_sclass == C_EXT || sym->n_sclass == C_HIDEXT)
- && cofffile->saddr[sym->n_scnum-1]) {
- lookup[l].symName=symname;
- lookup[l].offset=(funcptr)
- (cofffile->saddr[sym->n_scnum-1]+
- sym->n_value-cofffile->dataddr);
+ xf86loaderfree(symname);
+ }
+ break;
+ case N_DATA:
+ /*
+ * Note: COFF expects .data to be contiguous with
+ * .data, so that offsets for .data are relative to
+ * .text. We need to adjust for this, and make them
+ * relative to .data so that the relocation can be
+ * properly applied. This is needed becasue we allocate
+ * .data seperately from .text.
+ */
+ if ((sym->n_sclass == C_EXT || sym->n_sclass == C_HIDEXT)
+ && cofffile->saddr[sym->n_scnum - 1]) {
+ lookup[l].symName = symname;
+ lookup[l].offset = (funcptr)
+ (cofffile->saddr[sym->n_scnum - 1] +
+ sym->n_value - cofffile->dataddr);
#ifdef COFFDEBUG
- COFFDEBUG("Adding %x %s\n",
- lookup[l].offset, lookup[l].symName );
+ COFFDEBUG("Adding %p %s\n",
+ (void *)lookup[l].offset, lookup[l].symName);
#endif
- l++;
- }
- else {
+ l++;
+ } else {
#ifdef COFFDEBUG
- COFFDEBUG( "DATA Section not loaded %d\n",
- sym->n_scnum-1 );
+ COFFDEBUG("DATA Section not loaded %d\n", sym->n_scnum - 1);
#endif
- xf86loaderfree(symname);
- }
- break;
- case N_BSS:
- /*
- * Note: COFF expects .bss to be contiguous with
- * .data, so that offsets for .bss are relative to
- * .text. We need to adjust for this, and make them
- * relative to .bss so that the relocation can be
- * properly applied. This is needed becasue we allocate
- * .bss seperately from .text and .data.
- */
- if( (sym->n_sclass == C_EXT || sym->n_sclass == C_HIDEXT)
- && cofffile->saddr[sym->n_scnum-1]) {
- lookup[l].symName=symname;
- lookup[l].offset=(funcptr)
- (cofffile->saddr[sym->n_scnum-1]+
- sym->n_value-cofffile->bssaddr);
+ xf86loaderfree(symname);
+ }
+ break;
+ case N_BSS:
+ /*
+ * Note: COFF expects .bss to be contiguous with
+ * .data, so that offsets for .bss are relative to
+ * .text. We need to adjust for this, and make them
+ * relative to .bss so that the relocation can be
+ * properly applied. This is needed becasue we allocate
+ * .bss seperately from .text and .data.
+ */
+ if ((sym->n_sclass == C_EXT || sym->n_sclass == C_HIDEXT)
+ && cofffile->saddr[sym->n_scnum - 1]) {
+ lookup[l].symName = symname;
+ lookup[l].offset = (funcptr)
+ (cofffile->saddr[sym->n_scnum - 1] +
+ sym->n_value - cofffile->bssaddr);
#ifdef COFFDEBUG
- COFFDEBUG("Adding %x %s\n",
- lookup[l].offset, lookup[l].symName );
+ COFFDEBUG("Adding %p %s\n",
+ (void *)lookup[l].offset, lookup[l].symName);
#endif
- l++;
- }
- else {
+ l++;
+ } else {
#ifdef COFFDEBUG
- COFFDEBUG( "BSS Section not loaded %d\n",
- sym->n_scnum-1 );
+ COFFDEBUG("BSS Section not loaded %d\n", sym->n_scnum - 1);
#endif
- xf86loaderfree(symname);
- }
- break;
- default:
- ErrorF("Unknown Section number %d\n", sym->n_scnum );
- xf86loaderfree(symname);
- break;
- }
+ xf86loaderfree(symname);
+ }
+ break;
+ default:
+ ErrorF("Unknown Section number %d\n", sym->n_scnum);
+ xf86loaderfree(symname);
+ break;
}
+ }
- lookup[l].symName=NULL; /* Terminate the list */
+ lookup[l].symName = NULL; /* Terminate the list */
lookup_common = COFFCreateCOMMON(cofffile);
if (lookup_common) {
- for (i = 0, p = lookup_common; p->symName; i++, p++)
- ;
- memcpy(&(lookup[l]), lookup_common, i * sizeof (LOOKUP));
+ for (i = 0, p = lookup_common; p->symName; i++, p++) ;
+ memcpy(&(lookup[l]), lookup_common, i * sizeof(LOOKUP));
xf86loaderfree(lookup_common);
l += i;
@@ -1030,10 +1022,11 @@ COFFModulePtr cofffile;
*/
for (i = 0, p = lookup; p->symName; i++, p++) {
while (p->symName && (!strcmp(lookup[i].symName, ".text")
- || !strcmp(lookup[i].symName, ".data")
- || !strcmp(lookup[i].symName, ".bss")
+ || !strcmp(lookup[i].symName, ".data")
+ || !strcmp(lookup[i].symName, ".bss")
)) {
- memmove(&(lookup[i]), &(lookup[i+1]), (l-- - i) * sizeof (LOOKUP));
+ memmove(&(lookup[i]), &(lookup[i + 1]),
+ (l-- - i) * sizeof(LOOKUP));
}
}
@@ -1052,94 +1045,95 @@ COFFModulePtr cofffile;
* Do the work required to load each section into memory.
*/
static void
-COFFCollectSections(cofffile)
-COFFModulePtr cofffile;
+COFFCollectSections(COFFModulePtr cofffile)
{
- unsigned short i;
+ unsigned short i;
/*
* Find and identify all of the Sections
*/
#ifdef COFFDEBUG
- COFFDEBUG("COFFCollectSections(): %d sections\n", cofffile->numsh );
+ COFFDEBUG("COFFCollectSections(): %d sections\n", cofffile->numsh);
#endif
- for( i=0; i<cofffile->numsh; i++) {
+ for (i = 0; i < cofffile->numsh; i++) {
#ifdef COFFDEBUG
- COFFDEBUG("%d %s\n", i, cofffile->sections[i].s_name );
+ COFFDEBUG("%d %s\n", i, cofffile->sections[i].s_name);
#endif
/* .text */
- if( strcmp(cofffile->sections[i].s_name,
- ".text" ) == 0 ) {
- cofffile->text=_LoaderFileToMem(cofffile->fd,
- SecOffset(i),SecSize(i),".text");
- cofffile->saddr[i]=cofffile->text;
- cofffile->txtndx=i;
- cofffile->txtaddr=SecAddr(i);
- cofffile->txtsize=SecSize(i);
- cofffile->txtrelsize=RelSize(i);
- cofffile->reladdr[i]=_LoaderFileToMem(cofffile->fd,
- RelOffset(i), RelSize(i),".rel.text");
+ if (strcmp(cofffile->sections[i].s_name, ".text") == 0) {
+ cofffile->text = _LoaderFileToMem(cofffile->fd,
+ SecOffset(i), SecSize(i),
+ ".text");
+ cofffile->saddr[i] = cofffile->text;
+ cofffile->txtndx = i;
+ cofffile->txtaddr = SecAddr(i);
+ cofffile->txtsize = SecSize(i);
+ cofffile->txtrelsize = RelSize(i);
+ cofffile->reladdr[i] = _LoaderFileToMem(cofffile->fd,
+ RelOffset(i), RelSize(i),
+ ".rel.text");
#ifdef COFFDEBUG
- COFFDEBUG(".text starts at %x (%x bytes)\n", cofffile->text, cofffile->txtsize );
+ COFFDEBUG(".text starts at %p (%x bytes)\n", cofffile->text,
+ cofffile->txtsize);
#endif
continue;
}
/* .data */
- if( strcmp(cofffile->sections[i].s_name,
- ".data" ) == 0 ) {
- cofffile->data=_LoaderFileToMem(cofffile->fd,
- SecOffset(i),SecSize(i),".data");
- cofffile->saddr[i]=cofffile->data;
- cofffile->datndx=i;
- cofffile->dataddr=SecAddr(i);
- cofffile->datsize=SecSize(i);
- cofffile->datrelsize=RelSize(i);
- cofffile->reladdr[i]=_LoaderFileToMem(cofffile->fd,
- RelOffset(i), RelSize(i),".rel.data");
+ if (strcmp(cofffile->sections[i].s_name, ".data") == 0) {
+ cofffile->data = _LoaderFileToMem(cofffile->fd,
+ SecOffset(i), SecSize(i),
+ ".data");
+ cofffile->saddr[i] = cofffile->data;
+ cofffile->datndx = i;
+ cofffile->dataddr = SecAddr(i);
+ cofffile->datsize = SecSize(i);
+ cofffile->datrelsize = RelSize(i);
+ cofffile->reladdr[i] = _LoaderFileToMem(cofffile->fd,
+ RelOffset(i), RelSize(i),
+ ".rel.data");
#ifdef COFFDEBUG
- COFFDEBUG(".data starts at %x (%x bytes)\n", cofffile->data, cofffile->datsize );
+ COFFDEBUG(".data starts at %p (%x bytes)\n", cofffile->data,
+ cofffile->datsize);
#endif
continue;
}
/* .bss */
- if( strcmp(cofffile->sections[i].s_name,
- ".bss" ) == 0 ) {
- if( SecSize(i) )
- cofffile->bss=xf86loadercalloc(1,SecSize(i));
+ if (strcmp(cofffile->sections[i].s_name, ".bss") == 0) {
+ if (SecSize(i))
+ cofffile->bss = xf86loadercalloc(1, SecSize(i));
else
- cofffile->bss=NULL;
- cofffile->saddr[i]=cofffile->bss;
- cofffile->bssndx=i;
- cofffile->bssaddr=SecAddr(i);
- cofffile->bsssize=SecSize(i);
+ cofffile->bss = NULL;
+ cofffile->saddr[i] = cofffile->bss;
+ cofffile->bssndx = i;
+ cofffile->bssaddr = SecAddr(i);
+ cofffile->bsssize = SecSize(i);
#ifdef COFFDEBUG
- COFFDEBUG(".bss starts at %x (%x bytes)\n", cofffile->bss, cofffile->bsssize );
+ COFFDEBUG(".bss starts at %p (%x bytes)\n", cofffile->bss,
+ cofffile->bsssize);
#endif
continue;
}
/* .comment */
- if( strncmp(cofffile->sections[i].s_name,
- ".comment",strlen(".comment") ) == 0 ) {
+ if (strncmp(cofffile->sections[i].s_name,
+ ".comment", strlen(".comment")) == 0) {
continue;
}
/* .stab */
- if( strcmp(cofffile->sections[i].s_name,
- ".stab" ) == 0 ) {
+ if (strcmp(cofffile->sections[i].s_name, ".stab") == 0) {
continue;
}
/* .stabstr */
- if( strcmp(cofffile->sections[i].s_name,
- ".stabstr" ) == 0 ) {
+ if (strcmp(cofffile->sections[i].s_name, ".stabstr") == 0) {
continue;
}
/* .stab.* */
- if( strncmp(cofffile->sections[i].s_name,
- ".stab.", strlen(".stab.") ) == 0 ) {
+ if (strncmp(cofffile->sections[i].s_name,
+ ".stab.", strlen(".stab.")) == 0) {
continue;
}
- ErrorF("COFF: Not loading %s\n", cofffile->sections[i].s_name );
+ ErrorF("COFF: Not loading %s\n", cofffile->sections[i].s_name);
}
}
@@ -1147,52 +1141,54 @@ COFFModulePtr cofffile;
* Public API for the COFF implementation of the loader.
*/
void *
-COFFLoadModule(modrec, cofffd, ppLookup)
-loaderPtr modrec;
-int cofffd;
-LOOKUP **ppLookup;
+COFFLoadModule(loaderPtr modrec, int cofffd, LOOKUP **ppLookup)
{
- COFFModulePtr cofffile;
+ COFFModulePtr cofffile;
FILHDR *header;
- int stroffset; /* offset of string table */
+ int stroffset; /* offset of string table */
COFFRelocPtr coff_reloc, tail;
- void *v;
+ void *v;
#ifdef COFFDEBUG
- COFFDEBUG("COFFLoadModule(%s,%x,%x)\n",modrec->name,modrec->handle,cofffd);
+ COFFDEBUG("COFFLoadModule(%s,%x,%x)\n", modrec->name, modrec->handle,
+ cofffd);
#endif
- if ((cofffile = xf86loadercalloc(1,sizeof(COFFModuleRec))) == NULL) {
- ErrorF( "Unable to allocate COFFModuleRec\n" );
+ if ((cofffile = xf86loadercalloc(1, sizeof(COFFModuleRec))) == NULL) {
+ ErrorF("Unable to allocate COFFModuleRec\n");
return NULL;
}
- cofffile->handle=modrec->handle;
- cofffile->module=modrec->module;
- cofffile->fd=cofffd;
- v=cofffile->funcs=modrec->funcs;
+ cofffile->handle = modrec->handle;
+ cofffile->module = modrec->module;
+ cofffile->fd = cofffd;
+ v = cofffile->funcs = modrec->funcs;
/*
* Get the COFF header
*/
- cofffile->header=(FILHDR *)_LoaderFileToMem(cofffd,0,sizeof(FILHDR),"header");
- header=(FILHDR *)cofffile->header;
+ cofffile->header =
+ (FILHDR *) _LoaderFileToMem(cofffd, 0, sizeof(FILHDR), "header");
+ header = (FILHDR *) cofffile->header;
- if( header->f_symptr == 0 || header->f_nsyms == 0 ) {
+ if (header->f_symptr == 0 || header->f_nsyms == 0) {
ErrorF("No symbols found in module\n");
- _LoaderFreeFileMem(header,sizeof(FILHDR));
+ _LoaderFreeFileMem(header, sizeof(FILHDR));
xf86loaderfree(cofffile);
return NULL;
}
/*
* Get the section table
*/
- cofffile->numsh=header->f_nscns;
- cofffile->secsize=(header->f_nscns*SCNHSZ);
- cofffile->sections=(SCNHDR *)_LoaderFileToMem(cofffd,FILHSZ+header->f_opthdr,
- cofffile->secsize, "sections");
- cofffile->saddr=xf86loadercalloc(cofffile->numsh, sizeof(unsigned char *));
- cofffile->reladdr=xf86loadercalloc(cofffile->numsh, sizeof(unsigned char *));
+ cofffile->numsh = header->f_nscns;
+ cofffile->secsize = (header->f_nscns * SCNHSZ);
+ cofffile->sections =
+ (SCNHDR *) _LoaderFileToMem(cofffd, FILHSZ + header->f_opthdr,
+ cofffile->secsize, "sections");
+ cofffile->saddr =
+ xf86loadercalloc(cofffile->numsh, sizeof(unsigned char *));
+ cofffile->reladdr =
+ xf86loadercalloc(cofffile->numsh, sizeof(unsigned char *));
/*
* Load the optional header if we need it ?????
@@ -1206,13 +1202,14 @@ LOOKUP **ppLookup;
/*
* load the string table (must be done before we process symbols).
*/
- stroffset=header->f_symptr+(header->f_nsyms*SYMESZ);
+ stroffset = header->f_symptr + (header->f_nsyms * SYMESZ);
- _LoaderFileRead(cofffd,stroffset,&(cofffile->strsize),sizeof(int));
+ _LoaderFileRead(cofffd, stroffset, &(cofffile->strsize), sizeof(int));
- stroffset+=4; /* Move past the size */
- cofffile->strsize-=sizeof(int); /* size includes itself, so reduce by 4 */
- cofffile->strtab=_LoaderFileToMem(cofffd,stroffset,cofffile->strsize,"strings");
+ stroffset += 4; /* Move past the size */
+ cofffile->strsize -= sizeof(int); /* size includes itself, so reduce by 4 */
+ cofffile->strtab =
+ _LoaderFileToMem(cofffd, stroffset, cofffile->strsize, "strings");
/*
* add symbols
@@ -1224,8 +1221,7 @@ LOOKUP **ppLookup;
*/
coff_reloc = COFFCollectRelocations(cofffile);
if (coff_reloc) {
- for (tail = coff_reloc; tail->next; tail = tail->next)
- ;
+ for (tail = coff_reloc; tail->next; tail = tail->next) ;
tail->next = _LoaderGetRelocations(v)->coff_reloc;
_LoaderGetRelocations(v)->coff_reloc = coff_reloc;
}
@@ -1234,8 +1230,7 @@ LOOKUP **ppLookup;
}
void
-COFFResolveSymbols(mod)
-void *mod;
+COFFResolveSymbols(void *mod)
{
COFFRelocPtr newlist, p, tmp;
@@ -1243,7 +1238,7 @@ void *mod;
* which we failed to relocate. Destroy the old list in the process.
*/
newlist = 0;
- for (p = _LoaderGetRelocations(mod)->coff_reloc; p; ) {
+ for (p = _LoaderGetRelocations(mod)->coff_reloc; p;) {
tmp = COFF_RelocateEntry(p->file, p->secndx, p->rel);
if (tmp) {
/* Failed to relocate. Keep it in the list. */
@@ -1258,53 +1253,51 @@ void *mod;
}
int
-COFFCheckForUnresolved( mod)
-void *mod;
+COFFCheckForUnresolved(void *mod)
{
- char *name;
+ char *name;
COFFRelocPtr crel;
int flag, fatalsym = 0;
if ((crel = _LoaderGetRelocations(mod)->coff_reloc) == NULL)
return 0;
- while( crel )
- {
+ while (crel) {
name = COFFGetSymbolName(crel->file, crel->rel->r_symndx);
- flag = _LoaderHandleUnresolved(name,
- _LoaderHandleToName(crel->file->handle));
- if (flag) fatalsym = 1;
+ flag = _LoaderHandleUnresolved(name,
+ _LoaderHandleToName(crel->file->
+ handle));
+ if (flag)
+ fatalsym = 1;
xf86loaderfree(name);
- crel=crel->next;
- }
+ crel = crel->next;
+ }
return fatalsym;
}
void
-COFFUnloadModule(modptr)
-void *modptr;
+COFFUnloadModule(void *modptr)
{
- COFFModulePtr cofffile = (COFFModulePtr)modptr;
- COFFRelocPtr relptr, reltptr, *brelptr;
+ COFFModulePtr cofffile = (COFFModulePtr) modptr;
+ COFFRelocPtr relptr, reltptr, *brelptr;
/*
* Delete any unresolved relocations
*/
- relptr=_LoaderGetRelocations(cofffile->funcs)->coff_reloc;
- brelptr=&(_LoaderGetRelocations(cofffile->funcs)->coff_reloc);
-
- while(relptr) {
- if( relptr->file == cofffile ) {
- *brelptr=relptr->next; /* take it out of the list */
- reltptr=relptr; /* save pointer to this node */
- relptr=relptr->next; /* advance the pointer */
- xf86loaderfree(reltptr); /* free the node */
+ relptr = _LoaderGetRelocations(cofffile->funcs)->coff_reloc;
+ brelptr = &(_LoaderGetRelocations(cofffile->funcs)->coff_reloc);
+
+ while (relptr) {
+ if (relptr->file == cofffile) {
+ *brelptr = relptr->next; /* take it out of the list */
+ reltptr = relptr; /* save pointer to this node */
+ relptr = relptr->next; /* advance the pointer */
+ xf86loaderfree(reltptr); /* free the node */
+ } else {
+ brelptr = &(relptr->next);
+ relptr = relptr->next; /* advance the pointer */
}
- else {
- brelptr=&(relptr->next);
- relptr=relptr->next; /* advance the pointer */
- }
}
/*
@@ -1318,22 +1311,22 @@ void *modptr;
*/
#define CheckandFree(ptr,size) if(ptr) _LoaderFreeFileMem((ptr),(size))
- CheckandFree(cofffile->strtab,cofffile->strsize);
- CheckandFree(cofffile->symtab,cofffile->symsize);
- CheckandFree(cofffile->text,cofffile->txtsize);
- CheckandFree(cofffile->reladdr[cofffile->txtndx],cofffile->txtrelsize);
- CheckandFree(cofffile->data,cofffile->datsize);
- CheckandFree(cofffile->reladdr[cofffile->datndx],cofffile->datrelsize);
- CheckandFree(cofffile->bss,cofffile->bsssize);
- if( cofffile->common )
+ CheckandFree(cofffile->strtab, cofffile->strsize);
+ CheckandFree(cofffile->symtab, cofffile->symsize);
+ CheckandFree(cofffile->text, cofffile->txtsize);
+ CheckandFree(cofffile->reladdr[cofffile->txtndx], cofffile->txtrelsize);
+ CheckandFree(cofffile->data, cofffile->datsize);
+ CheckandFree(cofffile->reladdr[cofffile->datndx], cofffile->datrelsize);
+ CheckandFree(cofffile->bss, cofffile->bsssize);
+ if (cofffile->common)
xf86loaderfree(cofffile->common);
/*
* Free the section table, and section pointer array
*/
- _LoaderFreeFileMem(cofffile->sections,cofffile->secsize);
+ _LoaderFreeFileMem(cofffile->sections, cofffile->secsize);
xf86loaderfree(cofffile->saddr);
xf86loaderfree(cofffile->reladdr);
- _LoaderFreeFileMem(cofffile->header,sizeof(FILHDR));
+ _LoaderFreeFileMem(cofffile->header, sizeof(FILHDR));
/*
* Free the COFFModuleRec
*/
@@ -1345,14 +1338,14 @@ void *modptr;
char *
COFFAddressToSection(void *modptr, unsigned long address)
{
- COFFModulePtr cofffile = (COFFModulePtr)modptr;
+ COFFModulePtr cofffile = (COFFModulePtr) modptr;
int i;
- for( i=1; i<cofffile->numsh; i++) {
- if( address >= (unsigned long)cofffile->saddr[i] &&
- address <= (unsigned long)cofffile->saddr[i]+SecSize(i) ) {
- return cofffile->sections[i].s_name;
- }
- }
-return NULL;
+ for (i = 1; i < cofffile->numsh; i++) {
+ if (address >= (unsigned long)cofffile->saddr[i] &&
+ address <= (unsigned long)cofffile->saddr[i] + SecSize(i)) {
+ return cofffile->sections[i].s_name;
+ }
+ }
+ return NULL;
}
diff --git a/hw/xfree86/loader/coffloader.h b/hw/xfree86/loader/coffloader.h
index 35ce4b2c5..217474671 100644
--- a/hw/xfree86/loader/coffloader.h
+++ b/hw/xfree86/loader/coffloader.h
@@ -21,7 +21,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/coffloader.h,v 1.3 1998/09/20 14:41:04 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/coffloader.h,v 1.4 2003/10/15 16:29:02 dawes Exp $ */
#ifndef _COFFLOADER_H
#define _COFFLOADER_H
@@ -29,6 +29,6 @@
extern void *COFFLoadModule(loaderPtr, int, LOOKUP **);
extern void COFFResolveSymbols(void *);
extern int COFFCheckForUnresolved(void *);
-extern char *COFFAddressToSection(void *,unsigned long);
+extern char *COFFAddressToSection(void *, unsigned long);
extern void COFFUnloadModule(void *);
#endif /* _COFFLOADER_H */
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index 3c1d5b883..3808cf3e3 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -1,8 +1,6 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.53 2003/01/26 16:40:42 eich Exp $ */
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v 1.61 2003/11/10 18:22:35 tsi Exp $ */
/*
- *
* Copyright 1995-1998 by Metro Link, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
@@ -23,6 +21,32 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
#undef DBMALLOC
#include "sym.h"
@@ -68,300 +92,309 @@ extern int NumCurrentSelections;
LOOKUP dixLookupTab[] = {
- /* dix */
- /* atom.c */
- SYMFUNC(MakeAtom)
- SYMFUNC(ValidAtom)
- /* colormap.c */
- SYMFUNC(AllocColor)
- SYMFUNC(CreateColormap)
- SYMFUNC(FakeAllocColor)
- SYMFUNC(FakeFreeColor)
- SYMFUNC(FreeColors)
- SYMFUNC(StoreColors)
- SYMFUNC(TellLostMap)
- SYMFUNC(TellGainedMap)
- SYMFUNC(QueryColors)
- /* cursor.c */
- SYMFUNC(FreeCursor)
- /* devices.c */
- SYMFUNC(Ones)
- SYMFUNC(InitButtonClassDeviceStruct)
- SYMFUNC(InitFocusClassDeviceStruct)
- SYMFUNC(InitLedFeedbackClassDeviceStruct)
- SYMFUNC(InitPtrFeedbackClassDeviceStruct)
- SYMFUNC(InitValuatorClassDeviceStruct)
- SYMFUNC(InitKeyClassDeviceStruct)
- SYMFUNC(InitKeyboardDeviceStruct)
- SYMFUNC(SendMappingNotify)
- /* dispatch.c */
- SYMFUNC(SetInputCheck)
- SYMFUNC(SendErrorToClient)
- SYMFUNC(UpdateCurrentTime)
- SYMFUNC(UpdateCurrentTimeIf)
- SYMFUNC(ProcBadRequest)
- SYMVAR(dispatchException)
- SYMVAR(isItTimeToYield)
- SYMVAR(ClientStateCallback)
- SYMVAR(ServerGrabCallback)
- SYMVAR(CurrentSelections)
- SYMVAR(NumCurrentSelections)
- /* dixfonts.c */
- SYMFUNC(CloseFont)
- SYMFUNC(FontToXError)
- SYMFUNC(LoadGlyphs)
- SYMVAR(fpe_functions)
- /* dixutils.c */
- SYMFUNC(AddCallback)
- SYMFUNC(ClientSleep)
- SYMFUNC(ClientTimeToServerTime)
- SYMFUNC(ClientWakeup)
- SYMFUNC(CompareTimeStamps)
- SYMFUNC(CopyISOLatin1Lowered)
- SYMFUNC(DeleteCallback)
- SYMFUNC(LookupClient)
- SYMFUNC(LookupDrawable)
- SYMFUNC(LookupWindow)
- SYMFUNC(NoopDDA)
- SYMFUNC(QueueWorkProc)
- SYMFUNC(RegisterBlockAndWakeupHandlers)
- SYMFUNC(RemoveBlockAndWakeupHandlers)
+ /* dix */
+ /* atom.c */
+ SYMFUNC(MakeAtom)
+ SYMFUNC(ValidAtom)
+ /* colormap.c */
+ SYMFUNC(AllocColor)
+ SYMFUNC(CreateColormap)
+ SYMFUNC(FakeAllocColor)
+ SYMFUNC(FakeFreeColor)
+ SYMFUNC(FreeColors)
+ SYMFUNC(StoreColors)
+ SYMFUNC(TellLostMap)
+ SYMFUNC(TellGainedMap)
+ SYMFUNC(QueryColors)
+ /* cursor.c */
+ SYMFUNC(FreeCursor)
+ /* devices.c */
+ SYMFUNC(Ones)
+ SYMFUNC(InitButtonClassDeviceStruct)
+ SYMFUNC(InitFocusClassDeviceStruct)
+ SYMFUNC(InitLedFeedbackClassDeviceStruct)
+ SYMFUNC(InitPtrFeedbackClassDeviceStruct)
+ SYMFUNC(InitValuatorClassDeviceStruct)
+ SYMFUNC(InitKeyClassDeviceStruct)
+ SYMFUNC(InitKeyboardDeviceStruct)
+ SYMFUNC(SendMappingNotify)
+ /* dispatch.c */
+ SYMFUNC(SetInputCheck)
+ SYMFUNC(SendErrorToClient)
+ SYMFUNC(UpdateCurrentTime)
+ SYMFUNC(UpdateCurrentTimeIf)
+ SYMFUNC(ProcBadRequest)
+ SYMVAR(dispatchException)
+ SYMVAR(isItTimeToYield)
+ SYMVAR(ClientStateCallback)
+ SYMVAR(ServerGrabCallback)
+ SYMVAR(CurrentSelections)
+ SYMVAR(NumCurrentSelections)
+ /* dixfonts.c */
+ SYMFUNC(CloseFont)
+ SYMFUNC(FontToXError)
+ SYMFUNC(LoadGlyphs)
+ SYMVAR(fpe_functions)
+ /* dixutils.c */
+ SYMFUNC(AddCallback)
+ SYMFUNC(ClientSleep)
+ SYMFUNC(ClientTimeToServerTime)
+ SYMFUNC(ClientWakeup)
+ SYMFUNC(CompareTimeStamps)
+ SYMFUNC(CopyISOLatin1Lowered)
+ SYMFUNC(DeleteCallback)
+ SYMFUNC(LookupClient)
+ SYMFUNC(LookupDrawable)
+ SYMFUNC(LookupWindow)
+ SYMFUNC(NoopDDA)
+ SYMFUNC(QueueWorkProc)
+ SYMFUNC(RegisterBlockAndWakeupHandlers)
+ SYMFUNC(RemoveBlockAndWakeupHandlers)
#ifdef XCSECURITY
- SYMFUNC(SecurityLookupDrawable)
- SYMFUNC(SecurityLookupWindow)
+ SYMFUNC(SecurityLookupDrawable)
+ SYMFUNC(SecurityLookupWindow)
#endif
- /* events.c */
- SYMFUNC(CheckCursorConfinement)
- SYMFUNC(DeliverEvents)
- SYMFUNC(NewCurrentScreen)
- SYMFUNC(PointerConfinedToScreen)
- SYMFUNC(TryClientEvents)
- SYMFUNC(WriteEventsToClient)
- SYMVAR(DeviceEventCallback)
- SYMVAR(EventCallback)
- SYMVAR(inputInfo)
- SYMVAR(SetCriticalEvent)
+ /* events.c */
+ SYMFUNC(CheckCursorConfinement)
+ SYMFUNC(DeliverEvents)
+ SYMFUNC(NewCurrentScreen)
+ SYMFUNC(PointerConfinedToScreen)
+ SYMFUNC(TryClientEvents)
+ SYMFUNC(WriteEventsToClient)
+ SYMVAR(DeviceEventCallback)
+ SYMVAR(EventCallback)
+ SYMVAR(inputInfo)
+ SYMVAR(SetCriticalEvent)
#ifdef PANORAMIX
- SYMVAR(XineramaGetCursorScreen)
+ SYMVAR(XineramaGetCursorScreen)
#endif
- /* property.c */
- SYMFUNC(ChangeWindowProperty)
- /* extension.c */
- SYMFUNC(AddExtension)
- SYMFUNC(AddExtensionAlias)
- SYMFUNC(CheckExtension)
- SYMFUNC(DeclareExtensionSecurity)
- SYMFUNC(MinorOpcodeOfRequest)
- SYMFUNC(StandardMinorOpcode)
- /* gc.c */
- SYMFUNC(CopyGC)
- SYMFUNC(CreateGC)
- SYMFUNC(CreateScratchGC)
- SYMFUNC(ChangeGC)
- SYMFUNC(dixChangeGC)
- SYMFUNC(DoChangeGC)
- SYMFUNC(FreeGC)
- SYMFUNC(FreeScratchGC)
- SYMFUNC(GetScratchGC)
- SYMFUNC(SetClipRects)
- SYMFUNC(ValidateGC)
- SYMFUNC(VerifyRectOrder)
- SYMFUNC(SetDashes)
- /* globals.c */
- SYMVAR(DPMSEnabled)
- SYMVAR(DPMSCapableFlag)
- SYMVAR(DPMSOffTime)
- SYMVAR(DPMSPowerLevel)
- SYMVAR(DPMSStandbyTime)
- SYMVAR(DPMSSuspendTime)
- SYMVAR(DPMSEnabledSwitch)
- SYMVAR(DPMSDisabledSwitch)
- SYMVAR(defaultDPMSEnabled)
+ /* property.c */
+ SYMFUNC(ChangeWindowProperty)
+ /* extension.c */
+ SYMFUNC(AddExtension)
+ SYMFUNC(AddExtensionAlias)
+ SYMFUNC(CheckExtension)
+ SYMFUNC(DeclareExtensionSecurity)
+ SYMFUNC(MinorOpcodeOfRequest)
+ SYMFUNC(StandardMinorOpcode)
+ /* gc.c */
+ SYMFUNC(CopyGC)
+ SYMFUNC(CreateGC)
+ SYMFUNC(CreateScratchGC)
+ SYMFUNC(ChangeGC)
+ SYMFUNC(dixChangeGC)
+ SYMFUNC(DoChangeGC)
+ SYMFUNC(FreeGC)
+ SYMFUNC(FreeScratchGC)
+ SYMFUNC(GetScratchGC)
+ SYMFUNC(SetClipRects)
+ SYMFUNC(ValidateGC)
+ SYMFUNC(VerifyRectOrder)
+ SYMFUNC(SetDashes)
+ /* globals.c */
+ SYMVAR(DPMSEnabled)
+ SYMVAR(DPMSCapableFlag)
+ SYMVAR(DPMSOffTime)
+ SYMVAR(DPMSPowerLevel)
+ SYMVAR(DPMSStandbyTime)
+ SYMVAR(DPMSSuspendTime)
+ SYMVAR(DPMSEnabledSwitch)
+ SYMVAR(DPMSDisabledSwitch)
+ SYMVAR(defaultDPMSEnabled)
+ SYMVAR(currentRegionScreen)
+ /* bigreq */
+ SYMVAR(maxBigRequestSize)
#ifdef XV
- /* XXX These are exported from the DDX, not DIX. */
- SYMVAR(XvScreenInitProc)
- SYMVAR(XvGetScreenIndexProc)
- SYMVAR(XvGetRTPortProc)
- SYMVAR(XvMCScreenInitProc)
+ /* XXX These are exported from the DDX, not DIX. */
+ SYMVAR(XvScreenInitProc)
+ SYMVAR(XvGetScreenIndexProc)
+ SYMVAR(XvGetRTPortProc)
+ SYMVAR(XvMCScreenInitProc)
+#endif
+ SYMVAR(ScreenSaverBlanking)
+ SYMVAR(WindowTable)
+ SYMVAR(clients)
+ SYMVAR(currentMaxClients)
+ SYMVAR(currentTime)
+ SYMVAR(defaultColorVisualClass)
+ SYMVAR(globalSerialNumber)
+ SYMVAR(lastDeviceEventTime)
+ SYMVAR(monitorResolution)
+ SYMVAR(permitOldBugs)
+ SYMVAR(screenInfo)
+ SYMVAR(serverClient)
+ SYMVAR(serverGeneration)
+ /* main.c */
+ SYMFUNC(NotImplemented)
+ /* pixmap.c */
+ SYMFUNC(AllocatePixmap)
+ SYMFUNC(GetScratchPixmapHeader)
+ SYMFUNC(FreeScratchPixmapHeader)
+ SYMVAR(PixmapWidthPaddingInfo)
+ /* privates.c */
+ SYMFUNC(AllocateClientPrivate)
+ SYMFUNC(AllocateClientPrivateIndex)
+ SYMFUNC(AllocateGCPrivate)
+ SYMFUNC(AllocateGCPrivateIndex)
+ SYMFUNC(AllocateWindowPrivate)
+ SYMFUNC(AllocateWindowPrivateIndex)
+ SYMFUNC(AllocateScreenPrivateIndex)
+ SYMFUNC(AllocateColormapPrivateIndex)
+#ifdef PIXPRIV
+ SYMFUNC(AllocatePixmapPrivateIndex)
+ SYMFUNC(AllocatePixmapPrivate)
#endif
- SYMVAR(ScreenSaverBlanking)
- SYMVAR(WindowTable)
- SYMVAR(clients)
- SYMVAR(currentMaxClients)
- SYMVAR(currentTime)
- SYMVAR(defaultColorVisualClass)
- SYMVAR(globalSerialNumber)
- SYMVAR(lastDeviceEventTime)
- SYMVAR(monitorResolution)
- SYMVAR(permitOldBugs)
- SYMVAR(screenInfo)
- SYMVAR(serverClient)
- SYMVAR(serverGeneration)
- /* main.c */
- SYMFUNC(NotImplemented)
- /* pixmap.c */
- SYMFUNC(AllocatePixmap)
- SYMFUNC(GetScratchPixmapHeader)
- SYMFUNC(FreeScratchPixmapHeader)
- SYMVAR(PixmapWidthPaddingInfo)
- /* privates.c */
- SYMFUNC(AllocateClientPrivate)
- SYMFUNC(AllocateClientPrivateIndex)
- SYMFUNC(AllocateGCPrivate)
- SYMFUNC(AllocateGCPrivateIndex)
- SYMFUNC(AllocateWindowPrivate)
- SYMFUNC(AllocateWindowPrivateIndex)
- SYMFUNC(AllocateScreenPrivateIndex)
- SYMFUNC(AllocateColormapPrivateIndex)
- /* resource.c */
- SYMFUNC(AddResource)
- SYMFUNC(ChangeResourceValue)
- SYMFUNC(CreateNewResourceClass)
- SYMFUNC(CreateNewResourceType)
- SYMFUNC(FakeClientID)
- SYMFUNC(FreeResource)
- SYMFUNC(FreeResourceByType)
- SYMFUNC(GetXIDList)
- SYMFUNC(GetXIDRange)
- SYMFUNC(LookupIDByType)
- SYMFUNC(LookupIDByClass)
- SYMFUNC(LegalNewID)
+ /* resource.c */
+ SYMFUNC(AddResource)
+ SYMFUNC(ChangeResourceValue)
+ SYMFUNC(CreateNewResourceClass)
+ SYMFUNC(CreateNewResourceType)
+ SYMFUNC(FakeClientID)
+ SYMFUNC(FreeResource)
+ SYMFUNC(FreeResourceByType)
+ SYMFUNC(GetXIDList)
+ SYMFUNC(GetXIDRange)
+ SYMFUNC(LookupIDByType)
+ SYMFUNC(LookupIDByClass)
+ SYMFUNC(LegalNewID)
#ifdef XCSECURITY
- SYMFUNC(SecurityLookupIDByClass)
- SYMFUNC(SecurityLookupIDByType)
+ SYMFUNC(SecurityLookupIDByClass)
+ SYMFUNC(SecurityLookupIDByType)
#endif
- SYMFUNC(FindClientResourcesByType)
- SYMFUNC(FindAllClientResources)
- SYMVAR(lastResourceType)
- SYMVAR(TypeMask)
+ SYMFUNC(FindClientResourcesByType)
+ SYMFUNC(FindAllClientResources)
+ SYMVAR(lastResourceType)
+ SYMVAR(TypeMask)
#ifdef RES
- SYMFUNC(RegisterResourceName)
- SYMVAR(ResourceNames)
+ SYMFUNC(RegisterResourceName)
+ SYMVAR(ResourceNames)
#endif
- /* swaprep.c */
- SYMFUNC(CopySwap32Write)
- SYMFUNC(Swap32Write)
- SYMFUNC(SwapConnSetupInfo)
- SYMFUNC(SwapConnSetupPrefix)
- SYMFUNC(SwapShorts)
- SYMFUNC(SwapLongs)
- /* swapreq.c */
- SYMFUNC(SwapColorItem)
- /* tables.c */
- SYMVAR(EventSwapVector)
- SYMVAR(ReplySwapVector)
- SYMVAR(ProcVector)
- /* window.c */
- SYMFUNC(ChangeWindowAttributes)
- SYMFUNC(CheckWindowOptionalNeed)
- SYMFUNC(CreateUnclippedWinSize)
- SYMFUNC(CreateWindow)
- SYMFUNC(FindWindowWithOptional)
- SYMFUNC(GravityTranslate)
- SYMFUNC(MakeWindowOptional)
- SYMFUNC(MapWindow)
- SYMFUNC(MoveWindowInStack)
- SYMFUNC(NotClippedByChildren)
- SYMFUNC(ResizeChildrenWinSize)
- SYMFUNC(SaveScreens)
- SYMFUNC(SendVisibilityNotify)
- SYMFUNC(SetWinSize)
- SYMFUNC(SetBorderSize)
- SYMFUNC(TraverseTree)
- SYMFUNC(UnmapWindow)
- SYMFUNC(WalkTree)
- SYMFUNC(WindowsRestructured)
- SYMVAR(deltaSaveUndersViewable)
- SYMVAR(numSaveUndersViewable)
- SYMVAR(savedScreenInfo)
- SYMVAR(screenIsSaved)
+ /* swaprep.c */
+ SYMFUNC(CopySwap32Write)
+ SYMFUNC(Swap32Write)
+ SYMFUNC(SwapConnSetupInfo)
+ SYMFUNC(SwapConnSetupPrefix)
+ SYMFUNC(SwapShorts)
+ SYMFUNC(SwapLongs)
+ /* swapreq.c */
+ SYMFUNC(SwapColorItem)
+ /* tables.c */
+ SYMVAR(EventSwapVector)
+ SYMVAR(ReplySwapVector)
+ SYMVAR(ProcVector)
+ /* window.c */
+ SYMFUNC(ChangeWindowAttributes)
+ SYMFUNC(CheckWindowOptionalNeed)
+ SYMFUNC(CreateUnclippedWinSize)
+ SYMFUNC(CreateWindow)
+ SYMFUNC(FindWindowWithOptional)
+ SYMFUNC(GravityTranslate)
+ SYMFUNC(MakeWindowOptional)
+ SYMFUNC(MapWindow)
+ SYMFUNC(MoveWindowInStack)
+ SYMFUNC(NotClippedByChildren)
+ SYMFUNC(ResizeChildrenWinSize)
+ SYMFUNC(SaveScreens)
+ SYMFUNC(SendVisibilityNotify)
+ SYMFUNC(SetWinSize)
+ SYMFUNC(SetBorderSize)
+ SYMFUNC(TraverseTree)
+ SYMFUNC(UnmapWindow)
+ SYMFUNC(WalkTree)
+ SYMFUNC(WindowsRestructured)
+ SYMVAR(deltaSaveUndersViewable)
+ SYMVAR(numSaveUndersViewable)
+ SYMVAR(savedScreenInfo)
+ SYMVAR(screenIsSaved)
- /*os/ */
- /* access.c */
- SYMFUNC(LocalClient)
- /* util.c */
- SYMFUNC(Error)
- SYMFUNC(VErrorF)
- SYMFUNC(ErrorF)
- SYMFUNC(FatalError)
- SYMFUNC(Xstrdup)
- SYMFUNC(XNFstrdup)
- SYMVAR(Must_have_memory)
- /* xalloc.c */
- SYMFUNC(XNFalloc)
- SYMFUNC(XNFcalloc)
- SYMFUNC(XNFrealloc)
- SYMFUNC(Xalloc)
- SYMFUNC(Xcalloc)
- SYMFUNC(Xfree)
- SYMFUNC(Xrealloc)
- /* WaitFor.c */
- SYMFUNC(ScreenSaverTime)
- SYMFUNC(TimerFree)
- SYMFUNC(TimerSet)
- SYMFUNC(TimerCancel)
- /* io.c */
- SYMFUNC(WriteToClient)
- SYMFUNC(SetCriticalOutputPending)
- SYMVAR(FlushCallback)
- SYMVAR(ReplyCallback)
- SYMVAR(SkippedRequestsCallback)
- SYMFUNC(ResetCurrentRequest)
- /* connection.c */
- SYMFUNC(IgnoreClient)
- SYMFUNC(AttendClient)
- SYMFUNC(AddEnabledDevice)
- SYMFUNC(RemoveEnabledDevice)
- SYMFUNC(MakeClientGrabPervious)
- SYMFUNC(MakeClientGrabImpervious)
- SYMVAR(GrabInProgress)
- /* utils.c */
- SYMFUNC(AdjustWaitForDelay)
- SYMVAR(noTestExtensions)
+ /*os/ */
+ /* access.c */
+ SYMFUNC(LocalClient)
+ /* utils.c */
+ SYMFUNC(Xstrdup)
+ SYMFUNC(XNFstrdup)
+ SYMVAR(Must_have_memory)
+ SYMFUNC(AdjustWaitForDelay)
+ SYMVAR(noTestExtensions)
+ SYMFUNC(GiveUp)
+ /* log.c */
+ SYMFUNC(LogVWrite)
+ SYMFUNC(LogWrite)
+ SYMFUNC(LogVMessageVerb)
+ SYMFUNC(LogMessageVerb)
+ SYMFUNC(LogMessage)
+ SYMFUNC(FatalError)
+ SYMFUNC(VErrorF)
+ SYMFUNC(ErrorF)
+ SYMFUNC(Error)
+ /* xalloc.c */
+ SYMFUNC(XNFalloc)
+ SYMFUNC(XNFcalloc)
+ SYMFUNC(XNFrealloc)
+ SYMFUNC(Xalloc)
+ SYMFUNC(Xcalloc)
+ SYMFUNC(Xfree)
+ SYMFUNC(Xrealloc)
+ /* WaitFor.c */
+ SYMFUNC(ScreenSaverTime)
+ SYMFUNC(TimerFree)
+ SYMFUNC(TimerSet)
+ SYMFUNC(TimerCancel)
+ /* io.c */
+ SYMFUNC(WriteToClient)
+ SYMFUNC(SetCriticalOutputPending)
+ SYMVAR(FlushCallback)
+ SYMVAR(ReplyCallback)
+ SYMVAR(SkippedRequestsCallback)
+ SYMFUNC(ResetCurrentRequest)
+ /* connection.c */
+ SYMFUNC(IgnoreClient)
+ SYMFUNC(AttendClient)
+ SYMFUNC(AddEnabledDevice)
+ SYMFUNC(RemoveEnabledDevice)
+ SYMFUNC(MakeClientGrabPervious)
+ SYMFUNC(MakeClientGrabImpervious)
+ SYMVAR(GrabInProgress)
- /* devices.c */
- SYMFUNC(InitPointerDeviceStruct)
- SYMFUNC(LookupKeyboardDevice)
- SYMFUNC(LookupPointerDevice)
+ /* devices.c */
+ SYMFUNC(InitPointerDeviceStruct)
+ SYMFUNC(LookupKeyboardDevice)
+ SYMFUNC(LookupPointerDevice)
#ifdef XKB
- /* xkb/xkbInit.c */
- SYMFUNC(XkbInitKeyboardDeviceStruct)
- SYMFUNC(XkbSetRulesDflts)
- SYMVAR(noXkbExtension)
+ /* xkb/xkbInit.c */
+ SYMFUNC(XkbInitKeyboardDeviceStruct)
+ SYMFUNC(XkbSetRulesDflts)
+ SYMVAR(noXkbExtension)
#endif
#ifdef XINPUT
- /* Xi */
- /* exevents.c */
- SYMFUNC(InitValuatorAxisStruct)
- SYMFUNC(InitProximityClassDeviceStruct)
- /* extinit.c */
- SYMFUNC(AssignTypeAndName)
+ /* Xi */
+ /* exevents.c */
+ SYMFUNC(InitValuatorAxisStruct)
+ SYMFUNC(InitProximityClassDeviceStruct)
+ /* extinit.c */
+ SYMFUNC(AssignTypeAndName)
#endif
- /* xf86DGA.c */
- /* XXX This is exported from the DDX, not DIX. */
- SYMVAR(XDGAEventBase)
+ /* xf86DGA.c */
+ /* XXX This is exported from the DDX, not DIX. */
+ SYMVAR(XDGAEventBase)
- /* librender.a */
+ /* librender.a */
#ifdef RENDER
- SYMFUNC(PictureInit)
- SYMFUNC(miPictureInit)
- SYMFUNC(miComputeCompositeRegion)
- SYMFUNC(miGlyphs)
- SYMFUNC(miCompositeRects)
- SYMVAR(PictureScreenPrivateIndex)
- SYMFUNC(PictureTransformPoint)
- SYMFUNC(PictureAddFilter)
- SYMFUNC(PictureSetFilterAlias)
- SYMFUNC(PictureGetSubpixelOrder)
- SYMFUNC(PictureSetSubpixelOrder)
+ SYMFUNC(PictureInit)
+ SYMFUNC(miPictureInit)
+ SYMFUNC(miComputeCompositeRegion)
+ SYMFUNC(miGlyphs)
+ SYMFUNC(miCompositeRects)
+ SYMVAR(PictureScreenPrivateIndex)
+ SYMFUNC(PictureTransformPoint)
+ SYMFUNC(PictureAddFilter)
+ SYMFUNC(PictureSetFilterAlias)
+ SYMFUNC(PictureGetSubpixelOrder)
+ SYMFUNC(PictureSetSubpixelOrder)
#endif
- /* os/utils.c */
- SYMFUNC(GiveUp)
-
- { 0, 0 },
-
+ {0, 0}
};
diff --git a/hw/xfree86/loader/dlloader.c b/hw/xfree86/loader/dlloader.c
index bf4c8c078..9d3011caf 100644
--- a/hw/xfree86/loader/dlloader.c
+++ b/hw/xfree86/loader/dlloader.c
@@ -1,5 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dlloader.c,v 1.11 2000/08/23 22:10:14 tsi Exp $ */
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/dlloader.c,v 1.13 2003/10/15 16:29:02 dawes Exp $ */
/*
*
@@ -100,13 +99,13 @@ DLFindSymbol(const char *name)
n = xf86loadermalloc(strlen(name) + 2);
sprintf(n, "_%s", name);
#endif
-
- (void)dlerror(); /* Clear out any previous error */
+
+ (void)dlerror(); /* Clear out any previous error */
for (l = dlModuleList; l != NULL; l = l->next) {
#ifdef NEED_UNDERSCORE_FOR_DLLSYM
- p = dlsym(l->module->dlhandle, n);
+ p = dlsym(l->module->dlhandle, n);
#else
- p = dlsym(l->module->dlhandle, name);
+ p = dlsym(l->module->dlhandle, name);
#endif
if (dlerror() == NULL) {
#ifdef NEED_UNDERSCORE_FOR_DLLSYM
@@ -115,10 +114,10 @@ DLFindSymbol(const char *name)
return p;
}
}
-#ifdef NEED_UNDERSCORE_FOR_DLLSYM
+#ifdef NEED_UNDERSCORE_FOR_DLLSYM
xf86loaderfree(n);
#endif
-
+
return NULL;
}
@@ -126,12 +125,12 @@ DLFindSymbol(const char *name)
* public interface
*/
void *
-DLLoadModule(loaderPtr modrec, int fd, LOOKUP **ppLookup)
+DLLoadModule(loaderPtr modrec, int fd, LOOKUP ** ppLookup)
{
DLModulePtr dlfile;
DLModuleList *l;
- if ((dlfile=xf86loadercalloc(1,sizeof(DLModuleRec)))==NULL) {
+ if ((dlfile = xf86loadercalloc(1, sizeof(DLModuleRec))) == NULL) {
ErrorF("Unable to allocate DLModuleRec\n");
return NULL;
}
@@ -167,7 +166,7 @@ DLCheckForUnresolved(void *mod)
void
DLUnloadModule(void *modptr)
{
- DLModulePtr dlfile = (DLModulePtr)modptr;
+ DLModulePtr dlfile = (DLModulePtr) modptr;
DLModuleList *l, *p;
/* remove it from dlModuleList */
diff --git a/hw/xfree86/loader/elf.h b/hw/xfree86/loader/elf.h
index ad072c199..91130e63d 100644
--- a/hw/xfree86/loader/elf.h
+++ b/hw/xfree86/loader/elf.h
@@ -1,19 +1,18 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elf.h,v 1.15 2002/10/30 17:50:19 alanh Exp $ */
-
-
-typedef unsigned int Elf32_Addr;
-typedef unsigned short Elf32_Half;
-typedef unsigned int Elf32_Off;
-typedef long Elf32_Sword;
-typedef unsigned int Elf32_Word;
-
-typedef unsigned long Elf64_Addr;
-typedef unsigned short Elf64_Half;
-typedef unsigned long Elf64_Off;
-typedef int Elf64_Sword;
-typedef unsigned int Elf64_Word;
-typedef unsigned long Elf64_Xword;
-typedef long Elf64_Sxword;
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elf.h,v 1.17 2003/10/15 16:29:02 dawes Exp $ */
+
+typedef unsigned int Elf32_Addr;
+typedef unsigned short Elf32_Half;
+typedef unsigned int Elf32_Off;
+typedef long Elf32_Sword;
+typedef unsigned int Elf32_Word;
+
+typedef unsigned long Elf64_Addr;
+typedef unsigned short Elf64_Half;
+typedef unsigned long Elf64_Off;
+typedef int Elf64_Sword;
+typedef unsigned int Elf64_Word;
+typedef unsigned long Elf64_Xword;
+typedef long Elf64_Sxword;
/* These constants are for the segment types stored in the image headers */
#define PT_NULL 0
@@ -42,7 +41,7 @@ typedef long Elf64_Sxword;
#define EM_386 3
#define EM_68K 4
#define EM_88K 5
-#define EM_486 6 /* Perhaps disused */
+#define EM_486 6 /* Perhaps disused */
#define EM_860 7
#define EM_MIPS 8
#define EM_MIPS_RS4_BE 10
@@ -101,23 +100,23 @@ typedef long Elf64_Sxword;
#define ELF64_ST_TYPE(x) ELF32_ST_TYPE (x)
typedef struct dynamic32 {
- Elf32_Sword d_tag;
- union{
- Elf32_Sword d_val;
- Elf32_Addr d_ptr;
- } d_un;
+ Elf32_Sword d_tag;
+ union {
+ Elf32_Sword d_val;
+ Elf32_Addr d_ptr;
+ } d_un;
} Elf32_Dyn;
typedef struct dynamic64 {
- Elf64_Sxword d_tag;
- union{
- Elf64_Xword d_val;
- Elf64_Addr d_ptr;
- } d_un;
+ Elf64_Sxword d_tag;
+ union {
+ Elf64_Xword d_val;
+ Elf64_Addr d_ptr;
+ } d_un;
} Elf64_Dyn;
#ifndef QNX4
-extern Elf32_Dyn _DYNAMIC [];
+extern Elf32_Dyn _DYNAMIC[];
#endif
/* The following are used with relocations */
@@ -141,7 +140,7 @@ extern Elf32_Dyn _DYNAMIC [];
#define R_386_GOTPC 10
#define R_386_NUM 11
-/* x86_64 Relocation Types */
+/* AMD64 Relocation Types */
#define R_X86_64_NONE 0
#define R_X86_64_64 1
#define R_X86_64_PC32 2
@@ -221,29 +220,29 @@ extern Elf32_Dyn _DYNAMIC [];
#define R_SPARC_NUM 56
/* m68k Relocation Types */
-#define R_68K_NONE 0 /* No reloc */
-#define R_68K_32 1 /* Direct 32 bit */
-#define R_68K_16 2 /* Direct 16 bit */
-#define R_68K_8 3 /* Direct 8 bit */
-#define R_68K_PC32 4 /* PC relative 32 bit */
-#define R_68K_PC16 5 /* PC relative 16 bit */
-#define R_68K_PC8 6 /* PC relative 8 bit */
-#define R_68K_GOT32 7 /* 32 bit PC relative GOT entry */
-#define R_68K_GOT16 8 /* 16 bit PC relative GOT entry */
-#define R_68K_GOT8 9 /* 8 bit PC relative GOT entry */
-#define R_68K_GOT32O 10 /* 32 bit GOT offset */
-#define R_68K_GOT16O 11 /* 16 bit GOT offset */
-#define R_68K_GOT8O 12 /* 8 bit GOT offset */
-#define R_68K_PLT32 13 /* 32 bit PC relative PLT address */
-#define R_68K_PLT16 14 /* 16 bit PC relative PLT address */
-#define R_68K_PLT8 15 /* 8 bit PC relative PLT address */
-#define R_68K_PLT32O 16 /* 32 bit PLT offset */
-#define R_68K_PLT16O 17 /* 16 bit PLT offset */
-#define R_68K_PLT8O 18 /* 8 bit PLT offset */
-#define R_68K_COPY 19 /* Copy symbol at runtime */
-#define R_68K_GLOB_DAT 20 /* Create GOT entry */
-#define R_68K_JMP_SLOT 21 /* Create PLT entry */
-#define R_68K_RELATIVE 22 /* Adjust by program base */
+#define R_68K_NONE 0 /* No reloc */
+#define R_68K_32 1 /* Direct 32 bit */
+#define R_68K_16 2 /* Direct 16 bit */
+#define R_68K_8 3 /* Direct 8 bit */
+#define R_68K_PC32 4 /* PC relative 32 bit */
+#define R_68K_PC16 5 /* PC relative 16 bit */
+#define R_68K_PC8 6 /* PC relative 8 bit */
+#define R_68K_GOT32 7 /* 32 bit PC relative GOT entry */
+#define R_68K_GOT16 8 /* 16 bit PC relative GOT entry */
+#define R_68K_GOT8 9 /* 8 bit PC relative GOT entry */
+#define R_68K_GOT32O 10 /* 32 bit GOT offset */
+#define R_68K_GOT16O 11 /* 16 bit GOT offset */
+#define R_68K_GOT8O 12 /* 8 bit GOT offset */
+#define R_68K_PLT32 13 /* 32 bit PC relative PLT address */
+#define R_68K_PLT16 14 /* 16 bit PC relative PLT address */
+#define R_68K_PLT8 15 /* 8 bit PC relative PLT address */
+#define R_68K_PLT32O 16 /* 32 bit PLT offset */
+#define R_68K_PLT16O 17 /* 16 bit PLT offset */
+#define R_68K_PLT8O 18 /* 8 bit PLT offset */
+#define R_68K_COPY 19 /* Copy symbol at runtime */
+#define R_68K_GLOB_DAT 20 /* Create GOT entry */
+#define R_68K_JMP_SLOT 21 /* Create PLT entry */
+#define R_68K_RELATIVE 22 /* Adjust by program base */
/* Alpha Relocation Types */
#define R_ALPHA_NONE 0 /* No reloc */
@@ -495,79 +494,79 @@ extern Elf32_Dyn _DYNAMIC [];
#define R_ARM_RBASE 255
typedef struct elf32_rel {
- Elf32_Addr r_offset;
- Elf32_Word r_info;
+ Elf32_Addr r_offset;
+ Elf32_Word r_info;
} Elf32_Rel;
typedef struct elf64_rel {
- Elf64_Addr r_offset;
- Elf64_Xword r_info;
+ Elf64_Addr r_offset;
+ Elf64_Xword r_info;
} Elf64_Rel;
-typedef struct elf32_rela{
- Elf32_Addr r_offset;
- Elf32_Word r_info;
- Elf32_Sword r_addend;
+typedef struct elf32_rela {
+ Elf32_Addr r_offset;
+ Elf32_Word r_info;
+ Elf32_Sword r_addend;
} Elf32_Rela;
-typedef struct elf64_rela{
- Elf64_Addr r_offset;
- Elf64_Xword r_info;
- Elf64_Sxword r_addend;
+typedef struct elf64_rela {
+ Elf64_Addr r_offset;
+ Elf64_Xword r_info;
+ Elf64_Sxword r_addend;
} Elf64_Rela;
-typedef struct elf32_sym{
- Elf32_Word st_name;
- Elf32_Addr st_value;
- Elf32_Word st_size;
- unsigned char st_info;
- unsigned char st_other;
- Elf32_Half st_shndx;
+typedef struct elf32_sym {
+ Elf32_Word st_name;
+ Elf32_Addr st_value;
+ Elf32_Word st_size;
+ unsigned char st_info;
+ unsigned char st_other;
+ Elf32_Half st_shndx;
} Elf32_Sym;
-typedef struct elf64_sym{
- Elf64_Word st_name;
- unsigned char st_info;
- unsigned char st_other;
- Elf64_Half st_shndx;
- Elf64_Addr st_value;
- Elf64_Xword st_size;
+typedef struct elf64_sym {
+ Elf64_Word st_name;
+ unsigned char st_info;
+ unsigned char st_other;
+ Elf64_Half st_shndx;
+ Elf64_Addr st_value;
+ Elf64_Xword st_size;
} Elf64_Sym;
#define EI_NIDENT 16
-typedef struct elf32hdr{
- unsigned char e_ident[EI_NIDENT];
- Elf32_Half e_type;
- Elf32_Half e_machine;
- Elf32_Word e_version;
- Elf32_Addr e_entry; /* Entry point */
- Elf32_Off e_phoff;
- Elf32_Off e_shoff;
- Elf32_Word e_flags;
- Elf32_Half e_ehsize;
- Elf32_Half e_phentsize;
- Elf32_Half e_phnum;
- Elf32_Half e_shentsize;
- Elf32_Half e_shnum;
- Elf32_Half e_shstrndx;
+typedef struct elf32hdr {
+ unsigned char e_ident[EI_NIDENT];
+ Elf32_Half e_type;
+ Elf32_Half e_machine;
+ Elf32_Word e_version;
+ Elf32_Addr e_entry; /* Entry point */
+ Elf32_Off e_phoff;
+ Elf32_Off e_shoff;
+ Elf32_Word e_flags;
+ Elf32_Half e_ehsize;
+ Elf32_Half e_phentsize;
+ Elf32_Half e_phnum;
+ Elf32_Half e_shentsize;
+ Elf32_Half e_shnum;
+ Elf32_Half e_shstrndx;
} Elf32_Ehdr;
typedef struct elf64hdr {
- unsigned char e_ident[EI_NIDENT];
- Elf64_Half e_type;
- Elf64_Half e_machine;
- Elf64_Word e_version;
- Elf64_Addr e_entry;
- Elf64_Off e_phoff;
- Elf64_Off e_shoff;
- Elf64_Word e_flags;
- Elf64_Half e_ehsize;
- Elf64_Half e_phentsize;
- Elf64_Half e_phnum;
- Elf64_Half e_shentsize;
- Elf64_Half e_shnum;
- Elf64_Half e_shstrndx;
+ unsigned char e_ident[EI_NIDENT];
+ Elf64_Half e_type;
+ Elf64_Half e_machine;
+ Elf64_Word e_version;
+ Elf64_Addr e_entry;
+ Elf64_Off e_phoff;
+ Elf64_Off e_shoff;
+ Elf64_Word e_flags;
+ Elf64_Half e_ehsize;
+ Elf64_Half e_phentsize;
+ Elf64_Half e_phnum;
+ Elf64_Half e_shentsize;
+ Elf64_Half e_shnum;
+ Elf64_Half e_shstrndx;
} Elf64_Ehdr;
/* These constants define the permissions on sections in the program
@@ -576,27 +575,26 @@ typedef struct elf64hdr {
#define PF_W 0x2
#define PF_X 0x1
-typedef struct elf_phdr{
- Elf32_Word p_type;
- Elf32_Off p_offset;
- Elf32_Addr p_vaddr;
- Elf32_Addr p_paddr;
- Elf32_Word p_filesz;
- Elf32_Word p_memsz;
- Elf32_Word p_flags;
- Elf32_Word p_align;
+typedef struct elf_phdr {
+ Elf32_Word p_type;
+ Elf32_Off p_offset;
+ Elf32_Addr p_vaddr;
+ Elf32_Addr p_paddr;
+ Elf32_Word p_filesz;
+ Elf32_Word p_memsz;
+ Elf32_Word p_flags;
+ Elf32_Word p_align;
} Elf32_Phdr;
-typedef struct
-{
- Elf64_Word p_type;
- Elf64_Word p_flags;
- Elf64_Off p_offset;
- Elf64_Addr p_vaddr;
- Elf64_Addr p_paddr;
- Elf64_Xword p_filesz;
- Elf64_Xword p_memsz;
- Elf64_Xword p_align;
+typedef struct {
+ Elf64_Word p_type;
+ Elf64_Word p_flags;
+ Elf64_Off p_offset;
+ Elf64_Addr p_vaddr;
+ Elf64_Addr p_paddr;
+ Elf64_Xword p_filesz;
+ Elf64_Xword p_memsz;
+ Elf64_Xword p_align;
} Elf64_Phdr;
/* sh_type */
@@ -618,7 +616,7 @@ typedef struct
#define SHT_LOUSER 0x80000000
#define SHT_HIUSER 0xffffffff
-#define SHT_IA_64_UNWIND (SHT_LOPROC + 1) /* unwind bits */
+#define SHT_IA_64_UNWIND (SHT_LOPROC + 1) /* unwind bits */
/* sh_flags */
#define SHF_WRITE 0x1
@@ -634,35 +632,34 @@ typedef struct
#define SHN_ABS 0xfff1
#define SHN_COMMON 0xfff2
#define SHN_HIRESERVE 0xffff
-
+
typedef struct {
- Elf32_Word sh_name;
- Elf32_Word sh_type;
- Elf32_Word sh_flags;
- Elf32_Addr sh_addr;
- Elf32_Off sh_offset;
- Elf32_Word sh_size;
- Elf32_Word sh_link;
- Elf32_Word sh_info;
- Elf32_Word sh_addralign;
- Elf32_Word sh_entsize;
+ Elf32_Word sh_name;
+ Elf32_Word sh_type;
+ Elf32_Word sh_flags;
+ Elf32_Addr sh_addr;
+ Elf32_Off sh_offset;
+ Elf32_Word sh_size;
+ Elf32_Word sh_link;
+ Elf32_Word sh_info;
+ Elf32_Word sh_addralign;
+ Elf32_Word sh_entsize;
} Elf32_Shdr;
-typedef struct
-{
- Elf64_Word sh_name;
- Elf64_Word sh_type;
- Elf64_Xword sh_flags;
- Elf64_Addr sh_addr;
- Elf64_Off sh_offset;
- Elf64_Xword sh_size;
- Elf64_Word sh_link;
- Elf64_Word sh_info;
- Elf64_Xword sh_addralign;
- Elf64_Xword sh_entsize;
+typedef struct {
+ Elf64_Word sh_name;
+ Elf64_Word sh_type;
+ Elf64_Xword sh_flags;
+ Elf64_Addr sh_addr;
+ Elf64_Off sh_offset;
+ Elf64_Xword sh_size;
+ Elf64_Word sh_link;
+ Elf64_Word sh_info;
+ Elf64_Xword sh_addralign;
+ Elf64_Xword sh_entsize;
} Elf64_Shdr;
-#define EI_MAG0 0 /* e_ident[] indexes */
+#define EI_MAG0 0 /* e_ident[] indexes */
#define EI_MAG1 1
#define EI_MAG2 2
#define EI_MAG3 3
@@ -671,7 +668,7 @@ typedef struct
#define EI_VERSION 6
#define EI_PAD 7
-#define ELFMAG0 0x7f /* EI_MAG */
+#define ELFMAG0 0x7f /* EI_MAG */
#define ELFMAG1 'E'
#define ELFMAG2 'L'
#define ELFMAG3 'F'
@@ -681,16 +678,16 @@ typedef struct
#define ELFDLMAG 3
#define ELFDLOFF 16
-#define ELFCLASSNONE 0 /* EI_CLASS */
+#define ELFCLASSNONE 0 /* EI_CLASS */
#define ELFCLASS32 1
#define ELFCLASS64 2
#define ELFCLASSNUM 3
-#define ELFDATANONE 0 /* e_ident[EI_DATA] */
+#define ELFDATANONE 0 /* e_ident[EI_DATA] */
#define ELFDATA2LSB 1
#define ELFDATA2MSB 2
-#define EV_NONE 0 /* e_version, EI_VERSION */
+#define EV_NONE 0 /* e_version, EI_VERSION */
#define EV_CURRENT 1
#define EV_NUM 2
@@ -702,9 +699,9 @@ typedef struct
/* Note header in a PT_NOTE section */
typedef struct elf_note {
- Elf32_Word n_namesz; /* Name size */
- Elf32_Word n_descsz; /* Content size */
- Elf32_Word n_type; /* Content type */
+ Elf32_Word n_namesz; /* Name size */
+ Elf32_Word n_descsz; /* Content size */
+ Elf32_Word n_type; /* Content type */
} Elf32_Nhdr;
#define ELF_START_MMAP 0x80000000
diff --git a/hw/xfree86/loader/elfloader.c b/hw/xfree86/loader/elfloader.c
index 822a50efa..5ab8af62d 100644
--- a/hw/xfree86/loader/elfloader.c
+++ b/hw/xfree86/loader/elfloader.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.49 2003/01/24 17:26:35 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.62 2003/11/06 18:38:13 tsi Exp $ */
/*
*
@@ -23,7 +23,9 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/types.h>
+#ifndef __UNIXOS2__
#include <sys/mman.h>
+#endif
#include <unistd.h>
#include <stdlib.h>
#ifdef __QNX__
@@ -52,13 +54,75 @@
#include "compiler.h"
-#undef LDTEST
+#ifndef LOADERDEBUG
+#define LOADERDEBUG 0
+#endif
-/*
-#ifndef LDTEST
+#if LOADERDEBUG
# define ELFDEBUG ErrorF
#endif
-*/
+
+#if defined(__ia64__)
+
+/*
+ * R_IA64_LTOFF22X and R_IA64_LDXMOV are relocation optimizations for
+ * IA64. Conforming implementations must recognize them and may either
+ * implement the optimization or may fallback to previous
+ * non-optimized behavior by treating R_IA64_LTOFF22X as a
+ * R_IA64_LTOFF22 and ignoring R_IA64_LDXMOV. The
+ * IA64_LDX_OPTIMIZATION conditional controls the fallback behavior,
+ * if defined the optimizations are performed.
+ *
+ * To implement the optimization we want to change is the sequence on
+ * the left to that on the right, without regard to any intervening
+ * instructions:
+ *
+ * 1) addl t1=@ltoff(var),gp ==> addl t1=@gprel(var),gp
+ * 2) ld8 t2=[t1] ==> mov t2=t1
+ * 3) ld8 loc0=[t2] ==> ld8 loc0=[t2]
+ *
+ * The relocations that match the above instructions are:
+ *
+ * 1) R_IA64_LTOFF22 ==> R_IA64_LTOFF22X
+ * 2) -- ==> R_IA64_LDXMOV
+ * 3) -- ==> --
+ *
+ * First lets look at left hand column to understand the original
+ * mechanism. The virtual address of a symbol is stored in the GOT,
+ * when that symbol is referenced the following sequence occurs,
+ * instruction 1 loads the address of the GOT entry containing the
+ * virtural address of the symbol into t1. Instruction 2 loads the
+ * virtual address of the symbol into t2 by dereferencing t1. Finally
+ * the symbol is loaded in instruction 3 by dereferencing its virtual
+ * address in t2.
+ *
+ * The optimization that LTOFF22X/LDXMOV introduces is based on the
+ * observation we are doing an extra load (instruction 2) if we can
+ * generate the virtual address for the symbol without doing a lookup in
+ * the GOT. This is possible if the virtual address of the symbol can be
+ * computed via GP relative addressing. In other words the virtual
+ * address of the symbol is a fixed offset from the GP. This fixed offset
+ * must be within the limits of the signed 22 bit immediate offset in the
+ * ld8 instruction, otherwise the original indirect GOT lookup must be
+ * performed (LTOFF22).
+ *
+ * If we can use GP relative addressing for the symbol then the
+ * instruction that loaded the virtual address of the symbol into t2 must
+ * also be patched, hence the introduction of the LDXMOV relocation. The
+ * LDXMOV essentially turns the GOT lookup into a no-op by changing the
+ * ld8 into a register move that preserves the register location of the
+ * symbol's virtual address (e.g. t2).
+ *
+ * The important point to recognize when implementing the LTOFF22X/LDXMOV
+ * optimization is that relocations are interdependent, the LDXMOV is
+ * only applied if the LTOFF22X is applied. It is also worth noting that
+ * there is no relationship between LDXMOV relocations and LTOFF22X in
+ * the ELF relocation section other than they share the same
+ * symbol+addend value.
+ */
+
+#define IA64_LDX_OPTIMIZATION 1
+#endif
#ifndef UseMMAP
# if defined (__ia64__) || defined (__sparc__)
@@ -73,7 +137,7 @@
# if !defined(linux)
# error No MAP_ANON?
# endif
-# if !defined (__x86_64__)
+# if !defined (__AMD64__) || !defined(__linux__)
# define MMAP_FLAGS (MAP_PRIVATE | MAP_ANON)
# else
# define MMAP_FLAGS (MAP_PRIVATE | MAP_ANON | MAP_32BIT)
@@ -91,7 +155,7 @@
#if defined (__alpha__) || \
defined (__ia64__) || \
- defined (__x86_64__) || \
+ defined (__AMD64__) || \
(defined (__sparc__) && \
(defined (__arch64__) || \
defined (__sparcv9)))
@@ -105,6 +169,7 @@ typedef Elf64_Half Elf_Half;
typedef Elf64_Off Elf_Off;
typedef Elf64_Sword Elf_Sword;
typedef Elf64_Word Elf_Word;
+
#define ELF_ST_BIND ELF64_ST_BIND
#define ELF_ST_TYPE ELF64_ST_TYPE
#define ELF_R_SYM ELF64_R_SYM
@@ -117,17 +182,17 @@ typedef Elf64_Word Elf_Word;
*
*/
typedef struct _elf_GOT_Entry {
- Elf_Rela *rel;
- int offset;
- struct _elf_GOT_Entry *next;
+ Elf_Rela *rel;
+ int offset;
+ struct _elf_GOT_Entry *next;
} ELFGotEntryRec, *ELFGotEntryPtr;
typedef struct _elf_GOT {
- unsigned int size;
- unsigned int nuses;
- unsigned char *freeptr;
- struct _elf_GOT *next;
- unsigned char section[1];
+ unsigned int size;
+ unsigned int nuses;
+ unsigned char *freeptr;
+ struct _elf_GOT *next;
+ unsigned char section[1];
} ELFGotRec, *ELFGotPtr;
# ifdef MergeSectionAlloc
@@ -141,10 +206,10 @@ static ELFGotPtr ELFSharedGOTs;
* have already been added to the PLT.
*/
typedef struct _elf_PLT_Entry {
- Elf_Rela *rel;
- int offset;
- int gotoffset;
- struct _elf_PLT_Entry *next;
+ Elf_Rela *rel;
+ int offset;
+ int gotoffset;
+ struct _elf_PLT_Entry *next;
} ELFPltEntryRec, *ELFPltEntryPtr;
/*
@@ -152,10 +217,10 @@ typedef struct _elf_PLT_Entry {
* of entries that have already been added to the OPD.
*/
typedef struct _elf_OPD {
- LOOKUP *l;
- int index;
- int offset;
- struct _elf_OPD *next;
+ LOOKUP *l;
+ int index;
+ int offset;
+ struct _elf_OPD *next;
} ELFOpdRec, *ELFOpdPtr;
# endif
@@ -170,6 +235,7 @@ typedef Elf32_Half Elf_Half;
typedef Elf32_Off Elf_Off;
typedef Elf32_Sword Elf_Sword;
typedef Elf32_Word Elf_Word;
+
#define ELF_ST_BIND ELF32_ST_BIND
#define ELF_ST_TYPE ELF32_ST_TYPE
#define ELF_R_SYM ELF32_R_SYM
@@ -181,10 +247,10 @@ typedef Elf32_Word Elf_Word;
defined(__alpha__) || \
defined(__sparc__) || \
defined(__ia64__) || \
- defined(__x86_64__)
+ defined(__AMD64__)
typedef Elf_Rela Elf_Rel_t;
#else
-typedef Elf_Rel Elf_Rel_t;
+typedef Elf_Rel Elf_Rel_t;
#endif
typedef struct {
@@ -203,57 +269,57 @@ typedef struct {
* that has been loaded.
*/
-typedef struct {
- int handle;
- int module;
- int fd;
- loader_funcs *funcs;
- Elf_Ehdr *header;/* file header */
- int numsh;
- Elf_Shdr *sections;/* Address of the section header table */
- int secsize; /* size of the section table */
- unsigned char **saddr;/* Start addresss of the section pointer table */
- unsigned char *shstraddr; /* Start address of the section header string table */
- int shstrndx; /* index of the section header string table */
- int shstrsize; /* size of the section header string table */
+typedef struct {
+ int handle;
+ int module;
+ int fd;
+ loader_funcs *funcs;
+ Elf_Ehdr *header; /* file header */
+ int numsh;
+ Elf_Shdr *sections; /* Address of the section header table */
+ int secsize; /* size of the section table */
+ unsigned char **saddr; /* Start addresss of the section pointer table */
+ unsigned char *shstraddr; /* Start address of the section header string table */
+ int shstrndx; /* index of the section header string table */
+ int shstrsize; /* size of the section header string table */
#if defined(__alpha__) || defined(__ia64__)
- unsigned char *got; /* Start address of the .got section */
- ELFGotEntryPtr got_entries; /* List of entries in the .got section */
- int gotndx; /* index of the .got section */
- int gotsize; /* actual size of the .got section */
- ELFGotPtr shared_got; /* Pointer to ELFGotRec if shared */
-#endif /*(__alpha__) || (__ia64__)*/
+ unsigned char *got; /* Start address of the .got section */
+ ELFGotEntryPtr got_entries; /* List of entries in the .got section */
+ int gotndx; /* index of the .got section */
+ int gotsize; /* actual size of the .got section */
+ ELFGotPtr shared_got; /* Pointer to ELFGotRec if shared */
+#endif /*(__alpha__) || (__ia64__) */
#if defined(__ia64__)
- ELFOpdPtr opd_entries; /* List of entries in the .opd section */
- unsigned char *plt; /* Start address of the .plt section */
- ELFPltEntryPtr plt_entries; /* List of entries in the .plt section */
- int pltndx; /* index of the .plt section */
- int pltsize; /* size of the .plt section */
+ ELFOpdPtr opd_entries; /* List of entries in the .opd section */
+ unsigned char *plt; /* Start address of the .plt section */
+ ELFPltEntryPtr plt_entries; /* List of entries in the .plt section */
+ int pltndx; /* index of the .plt section */
+ int pltsize; /* size of the .plt section */
#endif /*__ia64__*/
- Elf_Sym *symtab; /* Start address of the .symtab section */
- int symndx; /* index of the .symtab section */
- unsigned char *common; /* Start address of the SHN_COMMON space */
- int comsize; /* size of the SHN_COMMON space */
-
- unsigned char *base; /* Alloced address of section block */
- unsigned long baseptr; /* Pointer to next free space in base */
- int basesize; /* Size of that allocation */
- unsigned char *straddr; /* Start address of the string table */
- int strndx; /* index of the string table */
- int strsize; /* size of the string table */
- LoadSection *lsection;
- int lsectidx;
-} ELFModuleRec, *ELFModulePtr;
+ Elf_Sym *symtab; /* Start address of the .symtab section */
+ int symndx; /* index of the .symtab section */
+ unsigned char *common; /* Start address of the SHN_COMMON space */
+ int comsize; /* size of the SHN_COMMON space */
+
+ unsigned char *base; /* Alloced address of section block */
+ unsigned long baseptr; /* Pointer to next free space in base */
+ int basesize; /* Size of that allocation */
+ unsigned char *straddr; /* Start address of the string table */
+ int strndx; /* index of the string table */
+ int strsize; /* size of the string table */
+ LoadSection *lsection;
+ int lsectidx;
+} ELFModuleRec, *ELFModulePtr;
/*
* If a relocation is unable to be satisfied, then put it on a list
* to try later after more modules have been loaded.
*/
typedef struct _elf_reloc {
- Elf_Rel_t *rel;
- ELFModulePtr file;
- Elf_Word secn;
- struct _elf_reloc *next;
+ Elf_Rel_t *rel;
+ ELFModulePtr file;
+ Elf_Word secn;
+ struct _elf_reloc *next;
} ELFRelocRec;
/*
@@ -263,11 +329,11 @@ typedef struct _elf_reloc {
* are done.
*/
typedef struct _elf_COMMON {
- Elf_Sym *sym;
- struct _elf_COMMON *next;
+ Elf_Sym *sym;
+ struct _elf_COMMON *next;
} ELFCommonRec;
-static ELFCommonPtr listCOMMON=NULL;
+static ELFCommonPtr listCOMMON = NULL;
/* Prototypes for static functions */
static int ELFhashCleanOut(void *, itemPtr);
@@ -277,14 +343,16 @@ static char *ElfGetSectionName(ELFModulePtr, int);
static ELFRelocPtr ElfDelayRelocation(ELFModulePtr, Elf_Word, Elf_Rel_t *);
static ELFCommonPtr ElfAddCOMMON(Elf_Sym *);
static int ElfCOMMONSize(void);
-static int ElfCreateCOMMON(ELFModulePtr,LOOKUP *);
+static int ElfCreateCOMMON(ELFModulePtr, LOOKUP *);
static char *ElfGetSymbolNameIndex(ELFModulePtr, int, int);
static char *ElfGetSymbolName(ELFModulePtr, int);
static Elf_Addr ElfGetSymbolValue(ELFModulePtr, int);
-static ELFRelocPtr Elf_RelocateEntry(ELFModulePtr, Elf_Word, Elf_Rel_t *, int);
+static ELFRelocPtr Elf_RelocateEntry(ELFModulePtr, Elf_Word, Elf_Rel_t *,
+ int);
static ELFRelocPtr ELFCollectRelocations(ELFModulePtr, int);
static LOOKUP *ELF_GetSymbols(ELFModulePtr, unsigned short **);
static void ELFCollectSections(ELFModulePtr, int, int *, int *);
+
#if defined(__alpha__) || defined(__ia64__)
static void ElfAddGOT(ELFModulePtr, Elf_Rel_t *);
static int ELFCreateGOT(ELFModulePtr, int);
@@ -296,21 +364,19 @@ static void ElfAddPLT(ELFModulePtr, Elf_Rel_t *);
static void ELFCreatePLT(ELFModulePtr);
enum ia64_operand {
IA64_OPND_IMM22,
- IA64_OPND_TGT25C
+ IA64_OPND_TGT25C,
+ IA64_OPND_LDXMOV
};
static void IA64InstallReloc(unsigned long *, int, enum ia64_operand, long);
#endif /*__ia64__*/
#ifdef MergeSectionAlloc
static void *
-ELFLoaderSectToMem(elffile, align, offset, size, label)
-ELFModulePtr elffile;
-int align;
-unsigned long offset;
-int size;
-char *label;
+ELFLoaderSectToMem(ELFModulePtr elffile, int align, unsigned long offset,
+ int size, char *label)
{
void *ret;
+
elffile->baseptr = (elffile->baseptr + align - 1) & ~(align - 1);
ret = (void *)elffile->baseptr;
_LoaderFileRead(elffile->fd, offset, ret, size);
@@ -319,17 +385,15 @@ char *label;
}
static void *
-ELFLoaderSectCalloc(elffile, align, size)
-ELFModulePtr elffile;
-int align;
-int size;
+ELFLoaderSectCalloc(ELFModulePtr elffile, int align, int size)
{
void *ret;
+
elffile->baseptr = (elffile->baseptr + align - 1) & ~(align - 1);
ret = (void *)elffile->baseptr;
elffile->baseptr += size;
#ifndef DoMMAPedMerge
- memset(ret, 0, size); /* mmap() does this for us */
+ memset(ret, 0, size); /* mmap() does this for us */
#endif
return ret;
}
@@ -343,13 +407,11 @@ _LoaderFileToMem((elffile)->fd,offset,size,label)
* Utility Functions
*/
-
static int
-ELFhashCleanOut(voidptr, item)
-void *voidptr;
-itemPtr item ;
+ELFhashCleanOut(void *voidptr, itemPtr item)
{
ELFModulePtr module = (ELFModulePtr) voidptr;
+
return (module->handle == item->handle);
}
@@ -357,31 +419,29 @@ itemPtr item ;
* Manage listResolv
*/
static ELFRelocPtr
-ElfDelayRelocation(elffile, secn, rel)
-ELFModulePtr elffile;
-Elf_Word secn;
-Elf_Rel_t *rel;
+ElfDelayRelocation(ELFModulePtr elffile, Elf_Word secn, Elf_Rel_t *rel)
{
- ELFRelocPtr reloc;
+ ELFRelocPtr reloc;
if ((reloc = xf86loadermalloc(sizeof(ELFRelocRec))) == NULL) {
- ErrorF( "ElfDelayRelocation() Unable to allocate memory!!!!\n" );
+ ErrorF("ElfDelayRelocation() Unable to allocate memory!!!!\n");
return 0;
}
- reloc->file=elffile;
- reloc->secn=secn;
- reloc->rel=rel;
- reloc->next=0;
+ reloc->file = elffile;
+ reloc->secn = secn;
+ reloc->rel = rel;
+ reloc->next = 0;
#ifdef ELFDEBUG
- ELFDEBUG("ElfDelayRelocation %lx: file %lx, sec %d,"
+ ELFDEBUG("ElfDelayRelocation %p: file %p, sec %d,"
" r_offset 0x%lx, r_info 0x%x",
- reloc, elffile, secn, rel->r_offset, rel->r_info);
+ (void *)reloc, (void *)elffile, secn,
+ (unsigned long)rel->r_offset, rel->r_info);
# if defined(__powerpc__) || \
defined(__mc68000__) || \
defined(__alpha__) || \
defined(__sparc__) || \
defined(__ia64__) || \
- defined(__x86_64__)
+ defined(__AMD64__)
ELFDEBUG(", r_addend 0x%lx", rel->r_addend);
# endif
ELFDEBUG("\n");
@@ -393,162 +453,146 @@ Elf_Rel_t *rel;
* Manage listCOMMON
*/
static ELFCommonPtr
-ElfAddCOMMON(sym)
-Elf_Sym *sym;
+ElfAddCOMMON(Elf_Sym *sym)
{
ELFCommonPtr common;
if ((common = xf86loadermalloc(sizeof(ELFCommonRec))) == NULL) {
- ErrorF( "ElfAddCOMMON() Unable to allocate memory!!!!\n" );
+ ErrorF("ElfAddCOMMON() Unable to allocate memory!!!!\n");
return 0;
}
- common->sym=sym;
- common->next=0;
+ common->sym = sym;
+ common->next = 0;
return common;
}
static int
ElfCOMMONSize(void)
{
- int size=0;
+ int size = 0;
ELFCommonPtr common;
for (common = listCOMMON; common; common = common->next) {
- size+=common->sym->st_size;
+ size += common->sym->st_size;
#if defined(__alpha__) || \
defined(__ia64__) || \
- defined(__x86_64__) || \
+ defined(__AMD64__) || \
(defined(__sparc__) && \
(defined(__arch64__) || \
defined(__sparcv9)))
- size = (size+7)&~0x7;
+ size = (size + 7) & ~0x7;
#endif
}
return size;
}
static int
-ElfCreateCOMMON(elffile,pLookup)
-ELFModulePtr elffile;
-LOOKUP *pLookup;
+ElfCreateCOMMON(ELFModulePtr elffile, LOOKUP *pLookup)
{
- int numsyms=0,size=0,l=0;
- int offset=0,firstcommon=0;
+ int numsyms = 0, size = 0, l = 0;
+ int offset = 0, firstcommon = 0;
ELFCommonPtr common;
if (listCOMMON == NULL)
return TRUE;
for (common = listCOMMON; common; common = common->next) {
- size+=common->sym->st_size;
+ size += common->sym->st_size;
#if defined(__alpha__) || \
defined(__ia64__) || \
- defined(__x86_64__) || \
+ defined(__AMD64__) || \
(defined(__sparc__) && \
(defined(__arch64__) || \
defined(__sparcv9)))
- size = (size+7)&~0x7;
+ size = (size + 7) & ~0x7;
#endif
numsyms++;
}
#ifdef ELFDEBUG
ELFDEBUG("ElfCreateCOMMON() %d entries (%d bytes) of COMMON data\n",
- numsyms, size );
+ numsyms, size);
#endif
- elffile->comsize=size;
- if((elffile->common = ELFLoaderSectCalloc(elffile,8,size)) == NULL) {
- ErrorF( "ElfCreateCOMMON() Unable to allocate memory!!!!\n" );
+ elffile->comsize = size;
+ if ((elffile->common = ELFLoaderSectCalloc(elffile, 8, size)) == NULL) {
+ ErrorF("ElfCreateCOMMON() Unable to allocate memory!!!!\n");
return FALSE;
}
- if (DebuggerPresent)
- {
- ldrCommons = xf86loadermalloc(numsyms*sizeof(LDRCommon));
+ if (DebuggerPresent) {
+ ldrCommons = xf86loadermalloc(numsyms * sizeof(LDRCommon));
nCommons = numsyms;
}
- for (l = 0; pLookup[l].symName; l++)
- ;
- firstcommon=l;
-
+ for (l = 0; pLookup[l].symName; l++) ;
+ firstcommon = l;
+
/* Traverse the common list and create a lookup table with all the
* common symbols. Destroy the common list in the process.
* See also ResolveSymbols.
*/
- while(listCOMMON) {
- common=listCOMMON;
+ while (listCOMMON) {
+ common = listCOMMON;
/* this is xstrdup because is should be more efficient. it is freed
* with xf86loaderfree
*/
pLookup[l].symName =
- xf86loaderstrdup(ElfGetString(elffile,common->sym->st_name));
- pLookup[l].offset = (funcptr)(elffile->common + offset);
+ xf86loaderstrdup(ElfGetString(elffile, common->sym->st_name));
+ pLookup[l].offset = (funcptr) (elffile->common + offset);
#ifdef ELFDEBUG
- ELFDEBUG("Adding common %lx %s\n",
- pLookup[l].offset, pLookup[l].symName);
+ ELFDEBUG("Adding common %p %s\n",
+ (void *)pLookup[l].offset, pLookup[l].symName);
#endif
-
+
/* Record the symbol address for gdb */
- if (DebuggerPresent && ldrCommons)
- {
- ldrCommons[l-firstcommon].addr = (void *)pLookup[l].offset;
- ldrCommons[l-firstcommon].name = pLookup[l].symName;
- ldrCommons[l-firstcommon].namelen = strlen(pLookup[l].symName);
+ if (DebuggerPresent && ldrCommons) {
+ ldrCommons[l - firstcommon].addr = (void *)pLookup[l].offset;
+ ldrCommons[l - firstcommon].name = pLookup[l].symName;
+ ldrCommons[l - firstcommon].namelen = strlen(pLookup[l].symName);
}
- listCOMMON=common->next;
- offset+=common->sym->st_size;
+ listCOMMON = common->next;
+ offset += common->sym->st_size;
#if defined(__alpha__) || \
defined(__ia64__) || \
- defined(__x86_64__) || \
+ defined(__AMD64__) || \
(defined(__sparc__) && \
(defined(__arch64__) || \
defined(__sparcv9)))
- offset = (offset+7)&~0x7;
+ offset = (offset + 7) & ~0x7;
#endif
xf86loaderfree(common);
l++;
}
/* listCOMMON == 0 */
- pLookup[l].symName=NULL; /* Terminate the list. */
+ pLookup[l].symName = NULL; /* Terminate the list. */
return TRUE;
}
-
/*
* String Table
*/
static char *
-ElfGetStringIndex(file, offset, index)
-ELFModulePtr file;
-int offset;
-int index;
+ElfGetStringIndex(ELFModulePtr file, int offset, int index)
{
- if( !offset || !index )
- return "";
+ if (!offset || !index)
+ return "";
- return (char *)(file->saddr[index]+offset);
+ return (char *)(file->saddr[index] + offset);
}
static char *
-ElfGetString(file, offset)
-ELFModulePtr file;
-int offset;
+ElfGetString(ELFModulePtr file, int offset)
{
- return ElfGetStringIndex( file, offset, file->strndx );
+ return ElfGetStringIndex(file, offset, file->strndx);
}
static char *
-ElfGetSectionName(file, offset)
-ELFModulePtr file;
-int offset;
+ElfGetSectionName(ELFModulePtr file, int offset)
{
- return (char *)(file->shstraddr+offset);
+ return (char *)(file->shstraddr + offset);
}
-
-
/*
* Symbol Table
*/
@@ -557,113 +601,105 @@ int offset;
* Get symbol name
*/
static char *
-ElfGetSymbolNameIndex(elffile, index, secndx)
-ELFModulePtr elffile;
-int index;
-int secndx;
+ElfGetSymbolNameIndex(ELFModulePtr elffile, int index, int secndx)
{
- Elf_Sym *syms;
+ Elf_Sym *syms;
#ifdef ELFDEBUG
- ELFDEBUG("ElfGetSymbolNameIndex(%x,%x) ",index, secndx );
+ ELFDEBUG("ElfGetSymbolNameIndex(%x,%x) ", index, secndx);
#endif
- syms=(Elf_Sym *)elffile->saddr[secndx];
+ syms = (Elf_Sym *) elffile->saddr[secndx];
#ifdef ELFDEBUG
- ELFDEBUG("%s ",ElfGetString(elffile, syms[index].st_name));
- ELFDEBUG("%x %x ",ELF_ST_BIND(syms[index].st_info),
+ ELFDEBUG("%s ", ElfGetString(elffile, syms[index].st_name));
+ ELFDEBUG("%x %x ", ELF_ST_BIND(syms[index].st_info),
ELF_ST_TYPE(syms[index].st_info));
- ELFDEBUG("%lx\n",syms[index].st_value);
+ ELFDEBUG("%lx\n", (unsigned long)syms[index].st_value);
#endif
- return ElfGetString(elffile,syms[index].st_name );
+ return ElfGetString(elffile, syms[index].st_name);
}
static char *
-ElfGetSymbolName(elffile, index)
-ELFModulePtr elffile;
-int index;
+ElfGetSymbolName(ELFModulePtr elffile, int index)
{
return ElfGetSymbolNameIndex(elffile, index, elffile->symndx);
}
static Elf_Addr
-ElfGetSymbolValue(elffile, index)
-ELFModulePtr elffile;
-int index;
+ElfGetSymbolValue(ELFModulePtr elffile, int index)
{
- Elf_Sym *syms;
- Elf_Addr symval=0; /* value of the indicated symbol */
- char *symname = NULL; /* name of symbol in relocation */
- itemPtr symbol = NULL; /* name/value of symbol */
+ Elf_Sym *syms;
+ Elf_Addr symval = 0; /* value of the indicated symbol */
+ char *symname = NULL; /* name of symbol in relocation */
+ itemPtr symbol = NULL; /* name/value of symbol */
- syms=(Elf_Sym *)elffile->saddr[elffile->symndx];
+ syms = (Elf_Sym *) elffile->saddr[elffile->symndx];
- switch( ELF_ST_TYPE(syms[index].st_info) )
- {
- case STT_NOTYPE:
- case STT_OBJECT:
- case STT_FUNC:
- switch( ELF_ST_BIND(syms[index].st_info) )
- {
- case STB_LOCAL:
- symval=(Elf_Addr)(
- elffile->saddr[syms[index].st_shndx]+
- syms[index].st_value);
+ switch (ELF_ST_TYPE(syms[index].st_info)) {
+ case STT_NOTYPE:
+ case STT_OBJECT:
+ case STT_FUNC:
+ switch (ELF_ST_BIND(syms[index].st_info)) {
+ case STB_LOCAL:
+ symval = (Elf_Addr) (elffile->saddr[syms[index].st_shndx] +
+ syms[index].st_value);
#ifdef __ia64__
- if( ELF_ST_TYPE(syms[index].st_info) == STT_FUNC ) {
- ELFOpdPtr opdent;
- for (opdent = elffile->opd_entries; opdent; opdent = opdent->next)
- if (opdent->index == index)
- break;
- if(opdent) {
- ((unsigned long *)(elffile->got+opdent->offset))[0] = symval;
- ((unsigned long *)(elffile->got+opdent->offset))[1] = (long)elffile->got;
- symval = (Elf_Addr)(elffile->got+opdent->offset);
- }
- }
-#endif
- break;
- case STB_GLOBAL:
- case STB_WEAK: /* STB_WEAK seems like a hack to cover for
- some other problem */
- symname=
- ElfGetString(elffile,syms[index].st_name);
- symbol = LoaderHashFind(symname);
- if( symbol == 0 ) {
- return 0;
- }
- symval=(Elf_Addr)symbol->address;
- break;
- default:
- symval=0;
- ErrorF(
- "ElfGetSymbolValue(), unhandled symbol scope %x\n",
- ELF_ST_BIND(syms[index].st_info) );
- break;
+ if (ELF_ST_TYPE(syms[index].st_info) == STT_FUNC) {
+ ELFOpdPtr opdent;
+
+ for (opdent = elffile->opd_entries; opdent;
+ opdent = opdent->next)
+ if (opdent->index == index)
+ break;
+ if (opdent) {
+ ((unsigned long *)(elffile->got + opdent->offset))[0] =
+ symval;
+ ((unsigned long *)(elffile->got + opdent->offset))[1] =
+ (long)elffile->got;
+ symval = (Elf_Addr) (elffile->got + opdent->offset);
}
-#ifdef ELFDEBUG
- ELFDEBUG( "%lx\t", symbol );
- ELFDEBUG( "%lx\t", symval );
- ELFDEBUG( "%s\n", symname ? symname : "NULL");
+ }
#endif
break;
- case STT_SECTION:
- symval=(Elf_Addr)elffile->saddr[syms[index].st_shndx];
-#ifdef ELFDEBUG
- ELFDEBUG( "ST_SECTION %lx\n", symval );
-#endif
+ case STB_GLOBAL:
+ case STB_WEAK: /* STB_WEAK seems like a hack to cover for
+ * some other problem */
+ symname = ElfGetString(elffile, syms[index].st_name);
+ symbol = LoaderHashFind(symname);
+ if (symbol == 0) {
+ return 0;
+ }
+ symval = (Elf_Addr) symbol->address;
break;
- case STT_FILE:
- case STT_LOPROC:
- case STT_HIPROC:
default:
- symval=0;
- ErrorF( "ElfGetSymbolValue(), unhandled symbol type %x\n",
- ELF_ST_TYPE(syms[index].st_info) );
+ symval = 0;
+ ErrorF("ElfGetSymbolValue(), unhandled symbol scope %x\n",
+ ELF_ST_BIND(syms[index].st_info));
break;
}
+#ifdef ELFDEBUG
+ ELFDEBUG("%p\t", (void *)symbol);
+ ELFDEBUG("%lx\t", (unsigned long)symval);
+ ELFDEBUG("%s\n", symname ? symname : "NULL");
+#endif
+ break;
+ case STT_SECTION:
+ symval = (Elf_Addr) elffile->saddr[syms[index].st_shndx];
+#ifdef ELFDEBUG
+ ELFDEBUG("ST_SECTION %lx\n", (unsigned long)symval);
+#endif
+ break;
+ case STT_FILE:
+ case STT_LOPROC:
+ case STT_HIPROC:
+ default:
+ symval = 0;
+ ErrorF("ElfGetSymbolValue(), unhandled symbol type %x\n",
+ ELF_ST_TYPE(syms[index].st_info));
+ break;
+ }
return symval;
}
@@ -676,30 +712,25 @@ int index;
* will be within a 24 bit offset (non-PIC code).
*/
static Elf_Addr
-ElfGetPltAddr(elffile, index)
-ELFModulePtr elffile;
-int index;
+ElfGetPltAddr(ELFModulePtr elffile, int index)
{
- Elf_Sym *syms;
- Elf_Addr symval=0; /* value of the indicated symbol */
+ Elf_Sym *syms;
+ Elf_Addr symval = 0; /* value of the indicated symbol */
char *symname = NULL; /* name of symbol in relocation */
itemPtr symbol; /* name/value of symbol */
- syms=(Elf_Sym *)elffile->saddr[elffile->symndx];
+ syms = (Elf_Sym *) elffile->saddr[elffile->symndx];
- switch( ELF_ST_TYPE(syms[index].st_info) )
- {
- case STT_NOTYPE:
- case STT_OBJECT:
- case STT_FUNC:
- switch( ELF_ST_BIND(syms[index].st_info) )
- {
- case STB_GLOBAL:
- symname=
- ElfGetString(elffile,syms[index].st_name);
- symbol=LoaderHashFind(symname);
- if( symbol == 0 )
- return 0;
+ switch (ELF_ST_TYPE(syms[index].st_info)) {
+ case STT_NOTYPE:
+ case STT_OBJECT:
+ case STT_FUNC:
+ switch (ELF_ST_BIND(syms[index].st_info)) {
+ case STB_GLOBAL:
+ symname = ElfGetString(elffile, syms[index].st_name);
+ symbol = LoaderHashFind(symname);
+ if (symbol == 0)
+ return 0;
/*
* Here we are building up a pseudo Plt function that can make a call to
* a function that has an offset greater than 24 bits. The following code
@@ -715,43 +746,43 @@ int index;
*/
- symbol->code.plt[0]=0x3d80; /* lis r12 */
- symbol->code.plt[1]=(((Elf_Addr)symbol->address)&0xffff0000)>>16;
- symbol->code.plt[2]=0x618c; /* ori r12,r12 */
- symbol->code.plt[3]=(((Elf_Addr)symbol->address)&0xffff);
- symbol->code.plt[4]=0x7d89; /* mtcr r12 */
- symbol->code.plt[5]=0x03a6;
- symbol->code.plt[6]=0x4e80; /* bctr */
- symbol->code.plt[7]=0x0420;
- symbol->address=(char *)&symbol->code.plt[0];
- symval=(Elf_Addr)symbol->address;
- ppc_flush_icache(&symbol->code.plt[0]);
- ppc_flush_icache(&symbol->code.plt[6]);
- break;
- default:
- symval=0;
- ErrorF(
- "ElfGetPltAddr(), unhandled symbol scope %x\n",
- ELF_ST_BIND(syms[index].st_info) );
- break;
- }
-# ifdef ELFDEBUG
- ELFDEBUG( "ElfGetPlt: symbol=%lx\t", symbol );
- ELFDEBUG( "newval=%lx\t", symval );
- ELFDEBUG( "name=\"%s\"\n", symname ? symname : "NULL");
-# endif
+ symbol->code.plt[0] = 0x3d80; /* lis r12 */
+ symbol->code.plt[1] =
+ (((Elf_Addr) symbol->address) & 0xffff0000) >> 16;
+ symbol->code.plt[2] = 0x618c; /* ori r12,r12 */
+ symbol->code.plt[3] = (((Elf_Addr) symbol->address) & 0xffff);
+ symbol->code.plt[4] = 0x7d89; /* mtcr r12 */
+ symbol->code.plt[5] = 0x03a6;
+ symbol->code.plt[6] = 0x4e80; /* bctr */
+ symbol->code.plt[7] = 0x0420;
+ symbol->address = (char *)&symbol->code.plt[0];
+ symval = (Elf_Addr) symbol->address;
+ ppc_flush_icache(&symbol->code.plt[0]);
+ ppc_flush_icache(&symbol->code.plt[6]);
break;
- case STT_SECTION:
- case STT_FILE:
- case STT_LOPROC:
- case STT_HIPROC:
default:
- symval=0;
- ErrorF( "ElfGetPltAddr(), Unexpected symbol type %x",
- ELF_ST_TYPE(syms[index].st_info) );
- ErrorF( "for a Plt request\n" );
+ symval = 0;
+ ErrorF("ElfGetPltAddr(), unhandled symbol scope %x\n",
+ ELF_ST_BIND(syms[index].st_info));
break;
}
+# ifdef ELFDEBUG
+ ELFDEBUG("ElfGetPlt: symbol=%lx\t", symbol);
+ ELFDEBUG("newval=%lx\t", symval);
+ ELFDEBUG("name=\"%s\"\n", symname ? symname : "NULL");
+# endif
+ break;
+ case STT_SECTION:
+ case STT_FILE:
+ case STT_LOPROC:
+ case STT_HIPROC:
+ default:
+ symval = 0;
+ ErrorF("ElfGetPltAddr(), Unexpected symbol type %x",
+ ELF_ST_TYPE(syms[index].st_info));
+ ErrorF("for a Plt request\n");
+ break;
+ }
return symval;
}
#endif /* __powerpc__ */
@@ -761,34 +792,33 @@ int index;
* Manage GOT Entries
*/
static void
-ElfAddGOT(elffile,rel)
-ELFModulePtr elffile;
-Elf_Rel_t *rel;
+ElfAddGOT(ELFModulePtr elffile, Elf_Rel_t *rel)
{
ELFGotEntryPtr gotent;
# ifdef ELFDEBUG
{
- Elf_Sym *sym;
-
- sym=(Elf_Sym *)&(elffile->symtab[ELF_R_SYM(rel->r_info)]);
- if( sym->st_name) {
- ELFDEBUG("ElfAddGOT: Adding GOT entry for %s\n",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- }
- else
- ELFDEBUG("ElfAddGOT: Adding GOT entry for %s\n",
- ElfGetSectionName(elffile,elffile->sections[sym->st_shndx].sh_name));
+ Elf_Sym *sym;
+
+ sym = (Elf_Sym *) & (elffile->symtab[ELF_R_SYM(rel->r_info)]);
+ if (sym->st_name) {
+ ELFDEBUG("ElfAddGOT: Adding GOT entry for %s\n",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ } else
+ ELFDEBUG("ElfAddGOT: Adding GOT entry for %s\n",
+ ElfGetSectionName(elffile,
+ elffile->sections[sym->st_shndx].
+ sh_name));
}
# endif
- for (gotent=elffile->got_entries;gotent;gotent=gotent->next) {
- if ( ELF_R_SYM(gotent->rel->r_info) == ELF_R_SYM(rel->r_info) &&
- gotent->rel->r_addend == rel->r_addend )
- break;
+ for (gotent = elffile->got_entries; gotent; gotent = gotent->next) {
+ if (ELF_R_SYM(gotent->rel->r_info) == ELF_R_SYM(rel->r_info) &&
+ gotent->rel->r_addend == rel->r_addend)
+ break;
}
- if( gotent ) {
+ if (gotent) {
# ifdef ELFDEBUG
ELFDEBUG("Entry already present in GOT\n");
# endif
@@ -796,25 +826,22 @@ Elf_Rel_t *rel;
}
if ((gotent = xf86loadermalloc(sizeof(ELFGotEntryRec))) == NULL) {
- ErrorF( "ElfAddGOT() Unable to allocate memory!!!!\n" );
+ ErrorF("ElfAddGOT() Unable to allocate memory!!!!\n");
return;
}
-
# ifdef ELFDEBUG
- ELFDEBUG("Entry added with offset %x\n",elffile->gotsize);
+ ELFDEBUG("Entry added with offset %x\n", elffile->gotsize);
# endif
- gotent->rel=rel;
- gotent->offset=elffile->gotsize;
- gotent->next=elffile->got_entries;
- elffile->got_entries=gotent;
- elffile->gotsize+=8;
+ gotent->rel = rel;
+ gotent->offset = elffile->gotsize;
+ gotent->next = elffile->got_entries;
+ elffile->got_entries = gotent;
+ elffile->gotsize += 8;
return;
}
static int
-ELFCreateGOT(elffile, maxalign)
-ELFModulePtr elffile;
-int maxalign;
+ELFCreateGOT(ELFModulePtr elffile, int maxalign)
{
# ifdef MergeSectionAlloc
ELFGotPtr gots;
@@ -825,18 +852,19 @@ int maxalign;
* XXX: Is it REALLY needed to ensure GOT's are non-null?
*/
# ifdef ELFDEBUG
- ELFDEBUG( "ELFCreateGOT: %x entries in the GOT\n", elffile->gotsize/8 );
+ ELFDEBUG("ELFCreateGOT: %x entries in the GOT\n", elffile->gotsize / 8);
/*
* Hmmm. Someone is getting here without any got entries, but they
* may still have R_ALPHA_GPDISP relocations against the got.
*/
- if( elffile->gotsize == 0 )
- ELFDEBUG( "Module %s doesn't have any GOT entries!\n",
- _LoaderModuleToName(elffile->module) );
+ if (elffile->gotsize == 0)
+ ELFDEBUG("Module %s doesn't have any GOT entries!\n",
+ _LoaderModuleToName(elffile->module));
# endif
- if( elffile->gotsize == 0 ) elffile->gotsize=8;
- elffile->sections[elffile->gotndx].sh_size=elffile->gotsize;
+ if (elffile->gotsize == 0)
+ elffile->gotsize = 8;
+ elffile->sections[elffile->gotndx].sh_size = elffile->gotsize;
gotsize = elffile->gotsize;
# ifdef MergeSectionAlloc
@@ -853,7 +881,8 @@ int maxalign;
if (gots->section + gots->size - elffile->base >= GOTDistance)
continue;
} else {
- if (elffile->base + elffile->basesize - gots->section >= GOTDistance)
+ if (elffile->base + elffile->basesize - gots->section >=
+ GOTDistance)
continue;
}
elffile->got = gots->freeptr;
@@ -861,20 +890,19 @@ int maxalign;
gots->freeptr = gots->freeptr + elffile->gotsize;
gots->nuses++;
# ifdef ELFDEBUG
- ELFDEBUG( "ELFCreateGOT: GOT address %lx in shared GOT, nuses %d\n",
- elffile->got, gots->nuses );
+ ELFDEBUG("ELFCreateGOT: GOT address %lx in shared GOT, nuses %d\n",
+ elffile->got, gots->nuses);
# endif
return TRUE;
}
gotsize += 16383 + sizeof(ELFGotRec);
-# endif /*MergeSectionAlloc*/
+# endif /*MergeSectionAlloc */
if ((elffile->got = xf86loadermalloc(gotsize)) == NULL) {
- ErrorF( "ELFCreateGOT() Unable to allocate memory!!!!\n" );
+ ErrorF("ELFCreateGOT() Unable to allocate memory!!!!\n");
return FALSE;
}
-
# ifdef MergeSectionAlloc
if (elffile->got > elffile->base) {
if (elffile->got + elffile->gotsize - elffile->base >= GOTDistance)
@@ -890,7 +918,7 @@ int maxalign;
elffile->basesize += 8 + elffile->gotsize;
elffile->base = xf86loaderrealloc(elffile->base, elffile->basesize);
if (elffile->base == NULL) {
- ErrorF( "ELFCreateGOT() Unable to reallocate memory!!!!\n" );
+ ErrorF("ELFCreateGOT() Unable to reallocate memory!!!!\n");
return FALSE;
}
# if defined(linux) && defined(__ia64__) || defined(__OpenBSD__)
@@ -898,29 +926,36 @@ int maxalign;
unsigned long page_size = getpagesize();
unsigned long round;
- round = (unsigned long)elffile->base & (page_size-1);
- mprotect(elffile->base - round, (elffile->basesize+round+page_size-1) & ~(page_size-1),
- PROT_READ|PROT_WRITE|PROT_EXEC);
+ round = (unsigned long)elffile->base & (page_size - 1);
+ mprotect(elffile->base - round,
+ (elffile->basesize + round + page_size -
+ 1) & ~(page_size - 1),
+ PROT_READ | PROT_WRITE | PROT_EXEC);
}
# endif
# else
{
int oldbasesize = elffile->basesize;
+
elffile->basesize += 8 + elffile->gotsize;
MMAP_ALIGN(elffile->basesize);
- elffile->base = mremap(elffile->base,oldbasesize,
- elffile->basesize,MREMAP_MAYMOVE);
+ elffile->base = mremap(elffile->base, oldbasesize,
+ elffile->basesize, MREMAP_MAYMOVE);
if (elffile->base == NULL) {
- ErrorF( "ELFCreateGOT() Unable to remap memory!!!!\n" );
+ ErrorF("ELFCreateGOT() Unable to remap memory!!!!\n");
return FALSE;
}
}
# endif
- elffile->baseptr = ((long)elffile->base + (maxalign - 1)) & ~(maxalign - 1);
- elffile->got = (unsigned char *)((long)(elffile->base + elffile->basesize - elffile->gotsize) & ~7);
+ elffile->baseptr =
+ ((long)elffile->base + (maxalign - 1)) & ~(maxalign - 1);
+ elffile->got =
+ (unsigned char
+ *)((long)(elffile->base + elffile->basesize -
+ elffile->gotsize) & ~7);
} else {
- gots = (ELFGotPtr)elffile->got;
+ gots = (ELFGotPtr) elffile->got;
elffile->got = gots->section;
gots->size = gotsize - sizeof(ELFGotRec) + 1;
gots->nuses = 1;
@@ -929,28 +964,26 @@ int maxalign;
ELFSharedGOTs = gots;
elffile->shared_got = gots;
# ifdef ELFDEBUG
- ELFDEBUG( "ELFCreateGOT: Created a shareable GOT with size %d\n", gots->size);
+ ELFDEBUG("ELFCreateGOT: Created a shareable GOT with size %d\n",
+ gots->size);
# endif
}
-# endif/*MergeSectionAlloc*/
+# endif /*MergeSectionAlloc */
# ifdef ELFDEBUG
- ELFDEBUG( "ELFCreateGOT: GOT address %lx\n", elffile->got );
+ ELFDEBUG("ELFCreateGOT: GOT address %lx\n", elffile->got);
# endif
return TRUE;
}
-#endif /* defined(__alpha__) || defined(__ia64__)*/
+#endif /* defined(__alpha__) || defined(__ia64__) */
#if defined(__ia64__)
/*
* Manage OPD Entries
*/
static void
-ElfAddOPD(elffile,index,l)
-ELFModulePtr elffile;
-int index;
-LOOKUP *l;
+ElfAddOPD(ELFModulePtr elffile, int index, LOOKUP *l)
{
ELFOpdPtr opdent;
@@ -961,37 +994,37 @@ LOOKUP *l;
}
if ((opdent = xf86loadermalloc(sizeof(ELFOpdRec))) == NULL) {
- ErrorF( "ElfAddOPD() Unable to allocate memory!!!!\n" );
+ ErrorF("ElfAddOPD() Unable to allocate memory!!!!\n");
return;
}
-
# ifdef ELFDEBUG
- ELFDEBUG("OPD Entry %d added with offset %x\n",index,elffile->gotsize);
-# endif
- opdent->l=l;
- opdent->index=index;
- opdent->offset=elffile->gotsize;
- opdent->next=elffile->opd_entries;
- elffile->opd_entries=opdent;
- elffile->gotsize+=16;
- return ;
+ ELFDEBUG("OPD Entry %d added with offset %x\n", index, elffile->gotsize);
+# endif
+ opdent->l = l;
+ opdent->index = index;
+ opdent->offset = elffile->gotsize;
+ opdent->next = elffile->opd_entries;
+ elffile->opd_entries = opdent;
+ elffile->gotsize += 16;
+ return;
}
static void
-ELFCreateOPD(elffile)
-ELFModulePtr elffile;
+ELFCreateOPD(ELFModulePtr elffile)
{
ELFOpdPtr opdent;
if (elffile->got == NULL)
- ErrorF( "ELFCreateOPD() Unallocated GOT!!!!\n" );
+ ErrorF("ELFCreateOPD() Unallocated GOT!!!!\n");
for (opdent = elffile->opd_entries; opdent; opdent = opdent->next) {
if (opdent->index != -1)
continue;
- ((unsigned long *)(elffile->got+opdent->offset))[0] = (long)opdent->l->offset;
- ((unsigned long *)(elffile->got+opdent->offset))[1] = (long)elffile->got;
- opdent->l->offset = (funcptr)(elffile->got+opdent->offset);
+ ((unsigned long *)(elffile->got + opdent->offset))[0] =
+ (long)opdent->l->offset;
+ ((unsigned long *)(elffile->got + opdent->offset))[1] =
+ (long)elffile->got;
+ opdent->l->offset = (funcptr) (elffile->got + opdent->offset);
}
}
@@ -999,35 +1032,32 @@ ELFModulePtr elffile;
* Manage PLT Entries
*/
static void
-ElfAddPLT(elffile,rel)
-ELFModulePtr elffile;
-Elf_Rel_t *rel;
+ElfAddPLT(ELFModulePtr elffile, Elf_Rel_t *rel)
{
ELFPltEntryPtr pltent;
# ifdef ELFDEBUG
{
- Elf_Sym *sym;
-
- sym=(Elf_Sym *)&(elffile->symtab[ELF_R_SYM(rel->r_info)]);
- if( sym->st_name) {
- ELFDEBUG("ElfAddPLT: Adding PLT entry for %s\n",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- }
- else
- ErrorF("ElfAddPLT: Add PLT entry for section??\n");
+ Elf_Sym *sym;
+
+ sym = (Elf_Sym *) & (elffile->symtab[ELF_R_SYM(rel->r_info)]);
+ if (sym->st_name) {
+ ELFDEBUG("ElfAddPLT: Adding PLT entry for %s\n",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ } else
+ ErrorF("ElfAddPLT: Add PLT entry for section??\n");
}
# endif
if (rel->r_addend)
ErrorF("ElfAddPLT: Add PLT entry with non-zero addend??\n");
- for (pltent=elffile->plt_entries;pltent;pltent=pltent->next) {
- if ( ELF_R_SYM(pltent->rel->r_info) == ELF_R_SYM(rel->r_info) )
- break;
+ for (pltent = elffile->plt_entries; pltent; pltent = pltent->next) {
+ if (ELF_R_SYM(pltent->rel->r_info) == ELF_R_SYM(rel->r_info))
+ break;
}
- if( pltent ) {
+ if (pltent) {
# ifdef ELFDEBUG
ELFDEBUG("Entry already present in PLT\n");
# endif
@@ -1035,68 +1065,73 @@ Elf_Rel_t *rel;
}
if ((pltent = xf86loadermalloc(sizeof(ELFPltEntryRec))) == NULL) {
- ErrorF( "ElfAddPLT() Unable to allocate memory!!!!\n" );
+ ErrorF("ElfAddPLT() Unable to allocate memory!!!!\n");
return;
}
-
# ifdef ELFDEBUG
- ELFDEBUG("Entry added with offset %x\n",elffile->pltsize);
-# endif
- pltent->rel=rel;
- pltent->offset=elffile->pltsize;
- pltent->gotoffset=elffile->gotsize;
- pltent->next=elffile->plt_entries;
- elffile->plt_entries=pltent;
- elffile->pltsize+=32;
- elffile->gotsize+=16;
- return ;
+ ELFDEBUG("Entry added with offset %x\n", elffile->pltsize);
+# endif
+ pltent->rel = rel;
+ pltent->offset = elffile->pltsize;
+ pltent->gotoffset = elffile->gotsize;
+ pltent->next = elffile->plt_entries;
+ elffile->plt_entries = pltent;
+ elffile->pltsize += 32;
+ elffile->gotsize += 16;
+ return;
}
static void
-ELFCreatePLT(elffile)
-ELFModulePtr elffile;
+ELFCreatePLT(ELFModulePtr elffile)
{
# ifdef ELFDEBUG
- ELFDEBUG( "ELFCreatePLT: %x entries in the PLT\n", elffile->pltsize/8 );
+ ELFDEBUG("ELFCreatePLT: %x entries in the PLT\n", elffile->pltsize / 8);
# endif
- if( elffile->pltsize == 0 ) return;
+ if (elffile->pltsize == 0)
+ return;
- if ((elffile->plt = ELFLoaderSectCalloc(elffile,32,elffile->pltsize)) == NULL) {
- ErrorF( "ELFCreatePLT() Unable to allocate memory!!!!\n" );
+ if ((elffile->plt =
+ ELFLoaderSectCalloc(elffile, 32, elffile->pltsize)) == NULL) {
+ ErrorF("ELFCreatePLT() Unable to allocate memory!!!!\n");
return;
}
- elffile->sections[elffile->pltndx].sh_size=elffile->pltsize;
+ elffile->sections[elffile->pltndx].sh_size = elffile->pltsize;
# ifdef ELFDEBUG
- ELFDEBUG( "ELFCreatePLT: PLT address %lx\n", elffile->plt );
+ ELFDEBUG("ELFCreatePLT: PLT address %lx\n", elffile->plt);
# endif
return;
}
static void
-IA64InstallReloc(data128, slot, opnd, value)
-unsigned long *data128;
-int slot;
-enum ia64_operand opnd;
-long value;
+IA64InstallReloc(unsigned long *data128, int slot, enum ia64_operand opnd,
+ long value)
{
unsigned long data = 0;
# ifdef ELFDEBUG
- ELFDEBUG( "\nIA64InstallReloc %p %d %d %016lx\n", data128, slot, opnd, value);
- ELFDEBUG( "Before [%016lx%016lx]\n", data128[1], data128[0]);
+ ELFDEBUG("\nIA64InstallReloc %p %d %d %016lx\n", data128, slot, opnd,
+ value);
+ ELFDEBUG("Before [%016lx%016lx]\n", data128[1], data128[0]);
# endif
switch (slot) {
- case 0: data = *data128; break;
- case 1: memcpy(&data, (char *)data128 + 5, 8); break;
- case 2: memcpy(&data, (char *)data128 + 10, 6); break;
- default: FatalError("Unexpected slot in IA64InstallReloc()\n");
+ case 0:
+ data = *data128;
+ break;
+ case 1:
+ memcpy(&data, (char *)data128 + 5, 8);
+ break;
+ case 2:
+ memcpy(&data, (char *)data128 + 10, 6);
+ break;
+ default:
+ FatalError("Unexpected slot in IA64InstallReloc()\n");
}
switch (opnd) {
case IA64_OPND_IMM22:
data &= ~(0x3fff9fc0000UL << slot);
- data |= (value & 0x7f) << (18 + slot); /* [13:19] + 5 + slot */
+ data |= (value & 0x7f) << (18 + slot); /* [13:19] + 5 + slot */
data |= (value & 0xff80) << (25 + slot); /* [27:35] + 5 + slot */
data |= (value & 0x1f0000) << (11 + slot); /* [22:26] + 5 + slot */
data |= (value & 0x200000) << (20 + slot); /* [36:36] + 5 + slot */
@@ -1110,18 +1145,44 @@ long value;
if (value << 39 >> 39 != value || (value & 0xf))
ErrorF("Relocation %016lx truncated to fit into TGT25C\n", value);
break;
+#ifdef IA64_LDX_OPTIMIZATION
+ case IA64_OPND_LDXMOV:
+ /*
+ * Convert "ld8 t2=[t1]" to "mov t2=t1" which is really "add t2=0,t1"
+ * Mask all but the r3,r1,qp fields,
+ * then OR in the ALU opcode = 8 into the opcode field [40:37]
+ *
+ * Mask for the r3,r1,qp bit fields [26:20][12:6][5:0] = 0x7f01fff,
+ * This mask negated only within the 41 bit wide instruction and
+ * shifted left by 5 for the bundle template is 0x3FFF01FC0000
+ *
+ * opcode field [40:37] with a value of 8 is 0x10000000000
+ * shifted left by 5 for the bundle template is 0x200000000000
+ *
+ */
+ data &= ~(0x3FFF01FC0000 << slot);
+ data |= (0x200000000000 << slot);
+ break;
+#endif
default:
FatalError("Unhandled operand in IA64InstallReloc()\n");
}
switch (slot) {
- case 0: *data128 = data; break;
- case 1: memcpy((char *)data128 + 5, &data, 8); break;
- case 2: memcpy((char *)data128 + 10, &data, 6); break;
- default: FatalError("Unexpected slot in IA64InstallReloc()\n");
+ case 0:
+ *data128 = data;
+ break;
+ case 1:
+ memcpy((char *)data128 + 5, &data, 8);
+ break;
+ case 2:
+ memcpy((char *)data128 + 10, &data, 6);
+ break;
+ default:
+ FatalError("Unexpected slot in IA64InstallReloc()\n");
}
ia64_flush_cache(data128);
# ifdef ELFDEBUG
- ELFDEBUG( "After [%016lx%016lx]\n", data128[1], data128[0]);
+ ELFDEBUG("After [%016lx%016lx]\n", data128[1], data128[0]);
# endif
}
@@ -1135,13 +1196,11 @@ long value;
*/
static ELFRelocPtr
-Elf_RelocateEntry(elffile, secn, rel, force)
-ELFModulePtr elffile;
-Elf_Word secn;
-Elf_Rel_t *rel;
-int force;
+Elf_RelocateEntry(ELFModulePtr elffile, Elf_Word secn, Elf_Rel_t *rel,
+ int force)
{
unsigned char *secp = elffile->saddr[secn];
+
#if !defined(__ia64__)
unsigned int *dest32; /* address of the 32 bit place being modified */
#endif
@@ -1150,13 +1209,14 @@ int force;
#endif
#if defined(__sparc__)
unsigned char *dest8; /* address of the 8 bit place being modified */
+ unsigned long *dest64;
#endif
-#if defined(__alpha__)
+#if defined(__alpha__)
unsigned int *dest32h; /* address of the high 32 bit place being modified */
unsigned long *dest64;
unsigned short *dest16;
#endif
-#if defined(__x86_64__)
+#if defined(__AMD64__)
unsigned long *dest64;
int *dest32s;
#endif
@@ -1167,28 +1227,29 @@ int force;
Elf_Addr symval = 0; /* value of the indicated symbol */
#ifdef ELFDEBUG
- ELFDEBUG( "%lx %d %d\n", rel->r_offset,
- ELF_R_SYM(rel->r_info), ELF_R_TYPE(rel->r_info) );
+ ELFDEBUG("%lx %d %d\n", (unsigned long)rel->r_offset,
+ ELF_R_SYM(rel->r_info), ELF_R_TYPE(rel->r_info));
# if defined(__powerpc__) || \
defined(__mc68000__) || \
defined(__alpha__) || \
defined(__sparc__) || \
defined(__ia64__) || \
- defined(__x86_64__)
- ELFDEBUG( "%lx", rel->r_addend );
+ defined(__AMD64__)
+ ELFDEBUG("%lx", rel->r_addend);
# endif
ELFDEBUG("\n");
#endif /*ELFDEBUG*/
#if defined(__alpha__)
- if (ELF_R_SYM(rel->r_info) && ELF_R_TYPE(rel->r_info) != R_ALPHA_GPDISP)
+ if (ELF_R_SYM(rel->r_info)
+ && ELF_R_TYPE(rel->r_info) != R_ALPHA_GPDISP)
#else
- if (ELF_R_SYM(rel->r_info))
+ if (ELF_R_SYM(rel->r_info))
#endif
{
symval = ElfGetSymbolValue(elffile, ELF_R_SYM(rel->r_info));
if (symval == 0) {
if (force) {
- symval = (Elf_Addr) &LoaderDefaultFunc;
+ symval = (Elf_Addr) & LoaderDefaultFunc;
} else {
#ifdef ELFDEBUG
ELFDEBUG("***Unable to resolve symbol %s\n",
@@ -1199,942 +1260,982 @@ int force;
}
}
- switch( ELF_R_TYPE(rel->r_info) )
- {
+ switch (ELF_R_TYPE(rel->r_info)) {
#if defined(i386)
- case R_386_32:
- dest32=(unsigned int *)(secp+rel->r_offset);
+ case R_386_32:
+ dest32 = (unsigned int *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- ELFDEBUG( "R_386_32\t");
- ELFDEBUG( "dest32=%x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8lx\t", *dest32 );
+ ELFDEBUG("R_386_32\t");
+ ELFDEBUG("dest32=%p\t", (void *)dest32);
+ ELFDEBUG("*dest32=%8.8x\t", (unsigned int)*dest32);
# endif
- *dest32=symval+(*dest32); /* S + A */
+ *dest32 = symval + (*dest32); /* S + A */
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%8.8lx\n", *dest32 );
+ ELFDEBUG("*dest32=%8.8x\n", (unsigned int)*dest32);
# endif
- break;
- case R_386_PC32:
- dest32=(unsigned int *)(secp+rel->r_offset);
+ break;
+ case R_386_PC32:
+ dest32 = (unsigned int *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- ELFDEBUG( "R_386_PC32 %s\t",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%x\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest32=%x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8lx\t", *dest32 );
+ ELFDEBUG("R_386_PC32 %s\t",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ ELFDEBUG("secp=%p\t", secp);
+ ELFDEBUG("symval=%lx\t", (unsigned long)symval);
+ ELFDEBUG("dest32=%p\t", (void *)dest32);
+ ELFDEBUG("*dest32=%8.8x\t", (unsigned int)*dest32);
# endif
- *dest32=symval+(*dest32)-(Elf_Addr)dest32; /* S + A - P */
+ *dest32 = symval + (*dest32) - (Elf_Addr) dest32; /* S + A - P */
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%8.8lx\n", *dest32 );
+ ELFDEBUG("*dest32=%8.8x\n", (unsigned int)*dest32);
# endif
- break;
+ break;
#endif /* i386 */
-#if defined(__x86_64__)
- case R_X86_64_32:
- dest32=(unsigned int *)(secp+rel->r_offset );
+#if defined(__AMD64__)
+ case R_X86_64_32:
+ dest32 = (unsigned int *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- ELFDEBUG( "R_X86_32\t");
- ELFDEBUG( "dest32=%x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8lx\t", *dest32 );
- ELFDEBUG( "r_addend=%lx\t", rel->r_addend);
+ ELFDEBUG("R_X86_32\t");
+ ELFDEBUG("dest32=%x\t", dest32);
+ ELFDEBUG("*dest32=%8.8lx\t", *dest32);
+ ELFDEBUG("r_addend=%lx\t", rel->r_addend);
# endif
- *dest32=symval + rel->r_addend + (*dest32); /* S + A */
+ *dest32 = symval + rel->r_addend + (*dest32); /* S + A */
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%8.8lx\n", *dest32 );
+ ELFDEBUG("*dest32=%8.8lx\n", *dest32);
# endif
- break;
- case R_X86_64_32S:
- dest32s=(int *)(secp+rel->r_offset);
+ break;
+ case R_X86_64_32S:
+ dest32s = (int *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- ELFDEBUG( "R_X86_64_32\t");
- ELFDEBUG( "dest32s=%x\t", dest32s );
- ELFDEBUG( "*dest32s=%8.8lx\t", *dest32s );
- ELFDEBUG( "r_addend=%lx\t", rel->r_addend);
+ ELFDEBUG("R_X86_64_32\t");
+ ELFDEBUG("dest32s=%x\t", dest32s);
+ ELFDEBUG("*dest32s=%8.8lx\t", *dest32s);
+ ELFDEBUG("r_addend=%lx\t", rel->r_addend);
# endif
- *dest32s=symval + rel->r_addend + (*dest32s); /* S + A */
+ *dest32s = symval + rel->r_addend + (*dest32s); /* S + A */
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32s=%8.8lx\n", *dest32s );
+ ELFDEBUG("*dest32s=%8.8lx\n", *dest32s);
# endif
- break;
- case R_X86_64_PC32:
- dest32=(unsigned int *)(secp+rel->r_offset);
+ break;
+ case R_X86_64_PC32:
+ dest32 = (unsigned int *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- ELFDEBUG( "R_X86_64_PC32 %s\t",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%x\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest32=%x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8lx\t", *dest32 );
- ELFDEBUG( "r_addend=%lx\t", rel->r_addend);
+ ELFDEBUG("R_X86_64_PC32 %s\t",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ ELFDEBUG("secp=%x\t", secp);
+ ELFDEBUG("symval=%lx\t", symval);
+ ELFDEBUG("dest32=%x\t", dest32);
+ ELFDEBUG("*dest32=%8.8lx\t", *dest32);
+ ELFDEBUG("r_addend=%lx\t", rel->r_addend);
# endif
- *dest32 = symval + rel->r_addend + (*dest32)-(Elf_Addr)dest32; /* S + A - P */
+ *dest32 = symval + rel->r_addend + (*dest32) - (Elf_Addr) dest32; /* S + A - P */
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%8.8lx\n", *dest32 );
+ ELFDEBUG("*dest32=%8.8lx\n", *dest32);
# endif
- break;
- case R_X86_64_64:
- dest64=(unsigned long *)(secp+rel->r_offset);
+ break;
+ case R_X86_64_64:
+ dest64 = (unsigned long *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- ELFDEBUG( "R_x86_64_64\t");
- ELFDEBUG( "dest64=%x\t", dest64 );
- ELFDEBUG( "*dest64=%8.8lx\t", *dest64 );
- ELFDEBUG( "r_addend=%lx\t", rel->r_addend);
+ ELFDEBUG("R_AMD64_64\t");
+ ELFDEBUG("dest64=%x\t", dest64);
+ ELFDEBUG("*dest64=%8.8lx\t", *dest64);
+ ELFDEBUG("r_addend=%lx\t", rel->r_addend);
# endif
- *dest64=symval + rel->r_addend + (*dest64); /* S + A */
+ *dest64 = symval + rel->r_addend + (*dest64); /* S + A */
# ifdef ELFDEBUG
- ELFDEBUG( "*dest64=%8.8lx\n", *dest64 );
+ ELFDEBUG("*dest64=%8.8lx\n", *dest64);
# endif
- break;
-#endif /* __x86_64__ */
+ break;
+#endif /* __AMD64__ */
#if defined(__alpha__)
- case R_ALPHA_NONE:
- case R_ALPHA_LITUSE:
- break;
-
- case R_ALPHA_REFQUAD:
- dest64=(unsigned long *)(secp+rel->r_offset);
- symval=ElfGetSymbolValue(elffile,
- ELF_R_SYM(rel->r_info));
-# ifdef ELFDEBUG
- ELFDEBUG( "R_ALPHA_REFQUAD\t");
- ELFDEBUG( "dest64=%lx\t", dest64 );
- ELFDEBUG( "*dest64=%8.8lx\t", *dest64 );
-# endif
- *dest64=symval+rel->r_addend+(*dest64); /* S + A + P */
-# ifdef ELFDEBUG
- ELFDEBUG( "*dest64=%8.8lx\n", *dest64 );
-# endif
- break;
-
- case R_ALPHA_GPREL32:
- {
- dest64=(unsigned long *)(secp+rel->r_offset);
- dest32=(unsigned int *)dest64;
-
-# ifdef ELFDEBUG
- ELFDEBUG( "R_ALPHA_GPREL32 %s\t",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest32=%lx\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\t", *dest32 );
+ case R_ALPHA_NONE:
+ case R_ALPHA_LITUSE:
+ break;
+
+ case R_ALPHA_REFQUAD:
+ dest64 = (unsigned long *)(secp + rel->r_offset);
+ symval = ElfGetSymbolValue(elffile, ELF_R_SYM(rel->r_info));
+# ifdef ELFDEBUG
+ ELFDEBUG("R_ALPHA_REFQUAD\t");
+ ELFDEBUG("dest64=%lx\t", dest64);
+ ELFDEBUG("*dest64=%8.8lx\t", *dest64);
+# endif
+ *dest64 = symval + rel->r_addend + (*dest64); /* S + A + P */
+# ifdef ELFDEBUG
+ ELFDEBUG("*dest64=%8.8lx\n", *dest64);
+# endif
+ break;
+
+ case R_ALPHA_GPREL32:
+ {
+ dest64 = (unsigned long *)(secp + rel->r_offset);
+ dest32 = (unsigned int *)dest64;
+
+# ifdef ELFDEBUG
+ ELFDEBUG("R_ALPHA_GPREL32 %s\t",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ ELFDEBUG("secp=%lx\t", secp);
+ ELFDEBUG("symval=%lx\t", symval);
+ ELFDEBUG("dest32=%lx\t", dest32);
+ ELFDEBUG("*dest32=%8.8x\t", *dest32);
# endif
symval += rel->r_addend;
- symval = ((unsigned char *)symval)-((unsigned char *)elffile->got);
+ symval = ((unsigned char *)symval) -
+ ((unsigned char *)elffile->got);
# ifdef ELFDEBUG
- ELFDEBUG( "symval=%lx\t", symval );
+ ELFDEBUG("symval=%lx\t", symval);
# endif
- if( (symval&0xffffffff00000000) != 0x0000000000000000 &&
- (symval&0xffffffff00000000) != 0xffffffff00000000 ) {
+ if ((symval & 0xffffffff00000000) != 0x0000000000000000 &&
+ (symval & 0xffffffff00000000) != 0xffffffff00000000) {
FatalError("R_ALPHA_GPREL32 symval-got is too large for %s\n",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)));
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
}
- *dest32=symval;
+ *dest32 = symval;
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%x\n", *dest32 );
+ ELFDEBUG("*dest32=%x\n", *dest32);
# endif
break;
- }
+ }
- case R_ALPHA_GPRELLOW:
- {
- dest64=(unsigned long *)(secp+rel->r_offset);
- dest16=(unsigned short *)dest64;
+ case R_ALPHA_GPRELLOW:
+ {
+ dest64 = (unsigned long *)(secp + rel->r_offset);
+ dest16 = (unsigned short *)dest64;
symval += rel->r_addend;
- symval = ((unsigned char *)symval)-((unsigned char *)elffile->got);
+ symval = ((unsigned char *)symval) -
+ ((unsigned char *)elffile->got);
- *dest16=symval;
+ *dest16 = symval;
break;
- }
+ }
- case R_ALPHA_GPRELHIGH:
- {
- dest64=(unsigned long *)(secp+rel->r_offset);
- dest16=(unsigned short *)dest64;
+ case R_ALPHA_GPRELHIGH:
+ {
+ dest64 = (unsigned long *)(secp + rel->r_offset);
+ dest16 = (unsigned short *)dest64;
symval += rel->r_addend;
- symval = ((unsigned char *)symval)-((unsigned char *)elffile->got);
+ symval = ((unsigned char *)symval) -
+ ((unsigned char *)elffile->got);
symval = ((long)symval >> 16) + ((symval >> 15) & 1);
- if( (long)symval > 0x7fff || (long)symval < -(long)0x8000 ) {
- FatalError("R_ALPHA_GPRELHIGH symval-got is too large for %s:%lx\n",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)),symval);
+ if ((long)symval > 0x7fff || (long)symval < -(long)0x8000) {
+ FatalError
+ ("R_ALPHA_GPRELHIGH symval-got is too large for %s:%lx\n",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)),
+ symval);
}
- *dest16=symval;
+ *dest16 = symval;
break;
- }
+ }
- case R_ALPHA_LITERAL:
- {
+ case R_ALPHA_LITERAL:
+ {
ELFGotEntryPtr gotent;
- dest32=(unsigned int *)(secp+rel->r_offset);
+
+ dest32 = (unsigned int *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- ELFDEBUG( "R_ALPHA_LITERAL %s\t",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest32=%lx\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\t", *dest32 );
+ ELFDEBUG("R_ALPHA_LITERAL %s\t",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ ELFDEBUG("secp=%lx\t", secp);
+ ELFDEBUG("symval=%lx\t", symval);
+ ELFDEBUG("dest32=%lx\t", dest32);
+ ELFDEBUG("*dest32=%8.8x\t", *dest32);
# endif
- for (gotent=elffile->got_entries;gotent;gotent=gotent->next) {
- if ( ELF_R_SYM(gotent->rel->r_info) == ELF_R_SYM(rel->r_info) &&
- gotent->rel->r_addend == rel->r_addend )
- break;
+ for (gotent = elffile->got_entries; gotent; gotent = gotent->next) {
+ if (ELF_R_SYM(gotent->rel->r_info) == ELF_R_SYM(rel->r_info)
+ && gotent->rel->r_addend == rel->r_addend)
+ break;
}
/* Set the address in the GOT */
- if( gotent ) {
- *(unsigned long *)(elffile->got+gotent->offset) =
- symval+rel->r_addend;
+ if (gotent) {
+ *(unsigned long *)(elffile->got + gotent->offset) =
+ symval + rel->r_addend;
# ifdef ELFDEBUG
ELFDEBUG("Setting gotent[%x]=%lx\t",
- gotent->offset, symval+rel->r_addend);
+ gotent->offset, symval + rel->r_addend);
# endif
if ((gotent->offset & 0xffff0000) != 0)
FatalError("\nR_ALPHA_LITERAL offset %x too large\n",
gotent->offset);
- (*dest32)|=(gotent->offset); /* The address part is always 0 */
- }
- else {
+ (*dest32) |= (gotent->offset); /* The address part is always 0 */
+ } else {
unsigned long val;
-
+
/* S + A - P >> 2 */
- val=((symval+(rel->r_addend)-(Elf_Addr)dest32));
+ val = ((symval + (rel->r_addend) - (Elf_Addr) dest32));
# ifdef ELFDEBUG
- ELFDEBUG("S+A-P=%x\t",val);
+ ELFDEBUG("S+A-P=%x\t", val);
# endif
- if( (val & 0xffff0000) != 0xffff0000 &&
- (val & 0xffff0000) != 0x00000000 ) {
+ if ((val & 0xffff0000) != 0xffff0000 &&
+ (val & 0xffff0000) != 0x00000000) {
ErrorF("\nR_ALPHA_LITERAL offset %x too large\n", val);
- break;
+ break;
}
val &= 0x0000ffff;
- (*dest32)|=(val); /* The address part is always 0 */
+ (*dest32) |= (val); /* The address part is always 0 */
}
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
break;
- }
-
- case R_ALPHA_GPDISP:
- {
+ }
+
+ case R_ALPHA_GPDISP:
+ {
long offset;
- dest32h=(unsigned int *)(secp+rel->r_offset);
- dest32=(unsigned int *)((secp+rel->r_offset)+rel->r_addend);
+ dest32h = (unsigned int *)(secp + rel->r_offset);
+ dest32 = (unsigned int *)((secp + rel->r_offset) + rel->r_addend);
# ifdef ELFDEBUG
- ELFDEBUG( "R_ALPHA_GPDISP %s\t",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "got=%lx\t", elffile->got );
- ELFDEBUG( "dest32=%lx\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\t", *dest32 );
- ELFDEBUG( "dest32h=%lx\t", dest32h );
- ELFDEBUG( "*dest32h=%8.8x\t", *dest32h );
+ ELFDEBUG("R_ALPHA_GPDISP %s\t",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ ELFDEBUG("secp=%lx\t", secp);
+ ELFDEBUG("got=%lx\t", elffile->got);
+ ELFDEBUG("dest32=%lx\t", dest32);
+ ELFDEBUG("*dest32=%8.8x\t", *dest32);
+ ELFDEBUG("dest32h=%lx\t", dest32h);
+ ELFDEBUG("*dest32h=%8.8x\t", *dest32h);
# endif
if ((*dest32h >> 26) != 9 || (*dest32 >> 26) != 8) {
- ErrorF( "***Bad instructions in relocating %s\n",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
+ ErrorF("***Bad instructions in relocating %s\n",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
}
symval = (*dest32h & 0xffff) << 16 | (*dest32 & 0xffff);
symval = (symval ^ 0x80008000) - 0x80008000;
-
- offset = ((unsigned char *)elffile->got - (unsigned char *)dest32h);
+
+ offset = ((unsigned char *)elffile->got -
+ (unsigned char *)dest32h);
# ifdef ELFDEBUG
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "got-dest32=%lx\t", offset );
+ ELFDEBUG("symval=%lx\t", symval);
+ ELFDEBUG("got-dest32=%lx\t", offset);
# endif
- if( (offset >= 0x7fff8000L) || (offset < -0x80000000L) ) {
- FatalError( "Offset overflow for R_ALPHA_GPDISP\n");
+ if ((offset >= 0x7fff8000L) || (offset < -0x80000000L)) {
+ FatalError("Offset overflow for R_ALPHA_GPDISP\n");
}
symval += (unsigned long)offset;
# ifdef ELFDEBUG
- ELFDEBUG( "symval=%lx\t", symval );
+ ELFDEBUG("symval=%lx\t", symval);
+# endif
+ *dest32 = (*dest32 & 0xffff0000) | (symval & 0xffff);
+ *dest32h = (*dest32h & 0xffff0000) |
+ (((symval >> 16) + ((symval >> 15) & 1)) & 0xffff);
+# ifdef ELFDEBUG
+ ELFDEBUG("*dest32=%8.8x\t", *dest32);
+ ELFDEBUG("*dest32h=%8.8x\n", *dest32h);
# endif
- *dest32=(*dest32&0xffff0000) | (symval&0xffff);
- *dest32h=(*dest32h&0xffff0000)|
- (((symval>>16)+((symval>>15)&1))&0xffff);
+ break;
+ }
+
+ case R_ALPHA_HINT:
+ dest32 = (unsigned int *)((secp + rel->r_offset) + rel->r_addend);
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%8.8x\t", *dest32 );
- ELFDEBUG( "*dest32h=%8.8x\n", *dest32h );
+ ELFDEBUG("R_ALPHA_HINT %s\t",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ ELFDEBUG("secp=%lx\t", secp);
+ ELFDEBUG("symval=%lx\t", symval);
+ ELFDEBUG("dest32=%lx\t", dest32);
+ ELFDEBUG("*dest32=%8.8x\t", *dest32);
# endif
- break;
- }
-
- case R_ALPHA_HINT:
- dest32=(unsigned int *)((secp+rel->r_offset)+rel->r_addend);
+
# ifdef ELFDEBUG
- ELFDEBUG( "R_ALPHA_HINT %s\t",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest32=%lx\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\t", *dest32 );
+ ELFDEBUG("symval=%lx\t", symval);
# endif
+ symval -= (Elf_Addr) (((unsigned char *)dest32) + 4);
+ if (symval % 4) {
+ ErrorF("R_ALPHA_HINT bad alignment of offset\n");
+ }
+ symval = symval >> 2;
# ifdef ELFDEBUG
- ELFDEBUG( "symval=%lx\t", symval );
+ ELFDEBUG("symval=%lx\t", symval);
# endif
- symval -= (Elf_Addr)(((unsigned char *)dest32)+4);
- if (symval % 4 ) {
- ErrorF( "R_ALPHA_HINT bad alignment of offset\n");
- }
- symval=symval>>2;
+ if (symval & 0xffff8000) {
# ifdef ELFDEBUG
- ELFDEBUG( "symval=%lx\t", symval );
+ ELFDEBUG("R_ALPHA_HINT symval too large\n");
# endif
+ }
+
+ *dest32 = (*dest32 & ~0x3fff) | (symval & 0x3fff);
- if( symval & 0xffff8000 ) {
# ifdef ELFDEBUG
- ELFDEBUG("R_ALPHA_HINT symval too large\n" );
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
+ break;
+
+ case R_ALPHA_GPREL16:
+ {
+ dest64 = (unsigned long *)(secp + rel->r_offset);
+ dest16 = (unsigned short *)dest64;
+
+ symval += rel->r_addend;
+ symval = ((unsigned char *)symval) -
+ ((unsigned char *)elffile->got);
+ if ((long)symval > 0x7fff || (long)symval < -(long)0x8000) {
+ FatalError
+ ("R_ALPHA_GPREL16 symval-got is too large for %s:%lx\n",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)),
+ symval);
}
- *dest32 = (*dest32&~0x3fff) | (symval&0x3fff);
-
-# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
-# endif
- break;
-
- case R_ALPHA_GPREL16:
- {
- dest64=(unsigned long *)(secp+rel->r_offset);
- dest16=(unsigned short *)dest64;
-
- symval += rel->r_addend;
- symval = ((unsigned char *)symval)-((unsigned char *)elffile->got);
- if( (long)symval > 0x7fff ||
- (long)symval < -(long)0x8000 ) {
- FatalError("R_ALPHA_GPREL16 symval-got is too large for %s:%lx\n",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)),symval);
- }
-
- *dest16=symval;
- break;
- }
-
+ *dest16 = symval;
+ break;
+ }
+
#endif /* alpha */
#if defined(__mc68000__)
- case R_68K_32:
- dest32=(unsigned int *)(secp+rel->r_offset);
+ case R_68K_32:
+ dest32 = (unsigned int *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- ELFDEBUG( "R_68K_32\t" );
- ELFDEBUG( "secp=%x\t", secp );
- ELFDEBUG( "symval=%x\t", symval );
- ELFDEBUG( "r_addend=%x\t", rel->r_addend );
- ELFDEBUG( "dest32=%8.8x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("R_68K_32\t");
+ ELFDEBUG("secp=%x\t", secp);
+ ELFDEBUG("symval=%x\t", symval);
+ ELFDEBUG("r_addend=%x\t", rel->r_addend);
+ ELFDEBUG("dest32=%8.8x\t", dest32);
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- {
- unsigned long val;
- /* S + A */
- val=symval+(rel->r_addend);
+ {
+ unsigned long val;
+
+ /* S + A */
+ val = symval + (rel->r_addend);
# ifdef ELFDEBUG
- ELFDEBUG("S+A=%x\t",val);
+ ELFDEBUG("S+A=%x\t", val);
# endif
- *dest32=val; /* S + A */
- }
+ *dest32 = val; /* S + A */
+ }
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- break;
- case R_68K_PC32:
- dest32=(unsigned int *)(secp+rel->r_offset);
+ break;
+ case R_68K_PC32:
+ dest32 = (unsigned int *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- ELFDEBUG( "R_68K_PC32\t" );
- ELFDEBUG( "secp=%x\t", secp );
- ELFDEBUG( "symval=%x\t", symval );
- ELFDEBUG( "r_addend=%x\t", rel->r_addend );
- ELFDEBUG( "dest32=%8.8x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("R_68K_PC32\t");
+ ELFDEBUG("secp=%x\t", secp);
+ ELFDEBUG("symval=%x\t", symval);
+ ELFDEBUG("r_addend=%x\t", rel->r_addend);
+ ELFDEBUG("dest32=%8.8x\t", dest32);
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- {
- unsigned long val;
- /* S + A - P */
- val=symval+(rel->r_addend);
- val-=*dest32;
+ {
+ unsigned long val;
+
+ /* S + A - P */
+ val = symval + (rel->r_addend);
+ val -= *dest32;
# ifdef ELFDEBUG
- ELFDEBUG("S+A=%x\t",val);
- ELFDEBUG("S+A-P=%x\t",val+(*dest32)-(Elf_Addr)dest32);
+ ELFDEBUG("S+A=%x\t", val);
+ ELFDEBUG("S+A-P=%x\t", val + (*dest32) - (Elf_Addr) dest32);
# endif
- *dest32=val+(*dest32)-(Elf_Addr)dest32; /* S + A - P */
- }
+ *dest32 = val + (*dest32) - (Elf_Addr) dest32; /* S + A - P */
+ }
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- break;
+ break;
#endif /* __mc68000__ */
#if defined(__powerpc__)
# if defined(PowerMAX_OS)
- case R_PPC_DISP24: /* 11 */
- dest32=(unsigned long *)(secp+rel->r_offset);
+ case R_PPC_DISP24: /* 11 */
+ dest32 = (unsigned long *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- ELFDEBUG( "R_PPC_DISP24 %s\t", ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%x\t", secp );
- ELFDEBUG( "symval=%x\t", symval );
- ELFDEBUG( "dest32=%x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\t", *dest32 );
+ ELFDEBUG("R_PPC_DISP24 %s\t",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ ELFDEBUG("secp=%x\t", secp);
+ ELFDEBUG("symval=%x\t", symval);
+ ELFDEBUG("dest32=%x\t", dest32);
+ ELFDEBUG("*dest32=%8.8x\t", *dest32);
# endif
- {
- unsigned long val;
-
- /* S + A - P >> 2 */
- val=((symval+(rel->r_addend)-(Elf_Addr)dest32));
+ {
+ unsigned long val;
+
+ /* S + A - P >> 2 */
+ val = ((symval + (rel->r_addend) - (Elf_Addr) dest32));
# ifdef ELFDEBUG
- ELFDEBUG("S+A-P=%x\t",val);
+ ELFDEBUG("S+A-P=%x\t", val);
# endif
- val = val>>2;
- if( (val & 0x3f000000) != 0x3f000000 &&
- (val & 0x3f000000) != 0x00000000 ) {
+ val = val >> 2;
+ if ((val & 0x3f000000) != 0x3f000000 &&
+ (val & 0x3f000000) != 0x00000000) {
# ifdef ELFDEBUG
- ELFDEBUG("R_PPC_DISP24 offset %x too large\n", val<<2);
+ ELFDEBUG("R_PPC_DISP24 offset %x too large\n", val << 2);
# endif
- symval = ElfGetPltAddr(elffile,ELF_R_SYM(rel->r_info));
- val=((symval+(rel->r_addend)-(Elf_Addr)dest32));
+ symval = ElfGetPltAddr(elffile, ELF_R_SYM(rel->r_info));
+ val = ((symval + (rel->r_addend) - (Elf_Addr) dest32));
# ifdef ELFDEBUG
- ELFDEBUG("PLT offset is %x\n", val);
+ ELFDEBUG("PLT offset is %x\n", val);
# endif
- val=val>>2;
- if( (val & 0x3f000000) != 0x3f000000 &&
- (val & 0x3f000000) != 0x00000000 )
- FatalError("R_PPC_DISP24 PLT offset %x too large\n", val<<2);
- }
- val &= 0x00ffffff;
- (*dest32)|=(val<<2); /* The address part is always 0 */
- ppc_flush_icache(dest32);
+ val = val >> 2;
+ if ((val & 0x3f000000) != 0x3f000000 &&
+ (val & 0x3f000000) != 0x00000000)
+ FatalError("R_PPC_DISP24 PLT offset %x too large\n",
+ val << 2);
}
+ val &= 0x00ffffff;
+ (*dest32) |= (val << 2); /* The address part is always 0 */
+ ppc_flush_icache(dest32);
+ }
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- break;
- case R_PPC_16HU: /* 31 */
- dest16=(unsigned short *)(secp+rel->r_offset);
+ break;
+ case R_PPC_16HU: /* 31 */
+ dest16 = (unsigned short *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- dest32=(unsigned long *)(dest16-1);
+ dest32 = (unsigned long *)(dest16 - 1);
# endif
# ifdef ELFDEBUG
- ELFDEBUG( "R_PPC_16HU\t" );
- ELFDEBUG( "secp=%x\t", secp );
- ELFDEBUG( "symval=%x\t", symval );
- ELFDEBUG( "r_addend=%x\t", rel->r_addend );
- ELFDEBUG( "dest16=%x\t", dest16 );
- ELFDEBUG( "*dest16=%8.8x\t", *dest16 );
- ELFDEBUG( "dest32=%8.8x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("R_PPC_16HU\t");
+ ELFDEBUG("secp=%x\t", secp);
+ ELFDEBUG("symval=%x\t", symval);
+ ELFDEBUG("r_addend=%x\t", rel->r_addend);
+ ELFDEBUG("dest16=%x\t", dest16);
+ ELFDEBUG("*dest16=%8.8x\t", *dest16);
+ ELFDEBUG("dest32=%8.8x\t", dest32);
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- {
- unsigned short val;
- /* S + A */
- val=((symval+(rel->r_addend))&0xffff0000)>>16;
+ {
+ unsigned short val;
+
+ /* S + A */
+ val = ((symval + (rel->r_addend)) & 0xffff0000) >> 16;
# ifdef ELFDEBUG
- ELFDEBUG("uhi16(S+A)=%x\t",val);
+ ELFDEBUG("uhi16(S+A)=%x\t", val);
# endif
- *dest16=val; /* S + A */
- ppc_flush_icache(dest16);
- }
+ *dest16 = val; /* S + A */
+ ppc_flush_icache(dest16);
+ }
# ifdef ELFDEBUG
- ELFDEBUG( "*dest16=%8.8x\t", *dest16 );
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("*dest16=%8.8x\t", *dest16);
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- break;
- case R_PPC_32: /* 32 */
- dest32=(unsigned long *)(secp+rel->r_offset);
+ break;
+ case R_PPC_32: /* 32 */
+ dest32 = (unsigned long *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- ELFDEBUG( "R_PPC_32\t" );
- ELFDEBUG( "secp=%x\t", secp );
- ELFDEBUG( "symval=%x\t", symval );
- ELFDEBUG( "r_addend=%x\t", rel->r_addend );
- ELFDEBUG( "dest32=%8.8x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("R_PPC_32\t");
+ ELFDEBUG("secp=%x\t", secp);
+ ELFDEBUG("symval=%x\t", symval);
+ ELFDEBUG("r_addend=%x\t", rel->r_addend);
+ ELFDEBUG("dest32=%8.8x\t", dest32);
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- {
- unsigned long val;
- /* S + A */
- val=symval+(rel->r_addend);
+ {
+ unsigned long val;
+
+ /* S + A */
+ val = symval + (rel->r_addend);
# ifdef ELFDEBUG
- ELFDEBUG("S+A=%x\t",val);
+ ELFDEBUG("S+A=%x\t", val);
# endif
- *dest32=val; /* S + A */
- ppc_flush_icache(dest32);
- }
+ *dest32 = val; /* S + A */
+ ppc_flush_icache(dest32);
+ }
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- break;
- case R_PPC_32UA: /* 33 */
- dest32=(unsigned long *)(secp+rel->r_offset);
+ break;
+ case R_PPC_32UA: /* 33 */
+ dest32 = (unsigned long *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- ELFDEBUG( "R_PPC_32UA\t" );
- ELFDEBUG( "secp=%x\t", secp );
- ELFDEBUG( "symval=%x\t", symval );
- ELFDEBUG( "r_addend=%x\t", rel->r_addend );
- ELFDEBUG( "dest32=%8.8x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("R_PPC_32UA\t");
+ ELFDEBUG("secp=%x\t", secp);
+ ELFDEBUG("symval=%x\t", symval);
+ ELFDEBUG("r_addend=%x\t", rel->r_addend);
+ ELFDEBUG("dest32=%8.8x\t", dest32);
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- {
- unsigned long val;
- unsigned char *dest8 = (unsigned char *)dest32;
- /* S + A */
- val=symval+(rel->r_addend);
+ {
+ unsigned long val;
+ unsigned char *dest8 = (unsigned char *)dest32;
+
+ /* S + A */
+ val = symval + (rel->r_addend);
# ifdef ELFDEBUG
- ELFDEBUG("S+A=%x\t",val);
+ ELFDEBUG("S+A=%x\t", val);
# endif
- *dest8++=(val&0xff000000)>>24;
- *dest8++=(val&0x00ff0000)>>16;
- *dest8++=(val&0x0000ff00)>> 8;
- *dest8++=(val&0x000000ff);
- ppc_flush_icache(dest32);
- }
+ *dest8++ = (val & 0xff000000) >> 24;
+ *dest8++ = (val & 0x00ff0000) >> 16;
+ *dest8++ = (val & 0x0000ff00) >> 8;
+ *dest8++ = (val & 0x000000ff);
+ ppc_flush_icache(dest32);
+ }
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- break;
- case R_PPC_16H: /* 34 */
- dest16=(unsigned short *)(secp+rel->r_offset);
+ break;
+ case R_PPC_16H: /* 34 */
+ dest16 = (unsigned short *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- dest32=(unsigned long *)(dest16-1);
+ dest32 = (unsigned long *)(dest16 - 1);
# endif
# ifdef ELFDEBUG
- ELFDEBUG( "R_PPC_16H\t" );
- ELFDEBUG( "secp=%x\t", secp );
- ELFDEBUG( "symbol=%s\t", ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "symval=%x\t", symval );
- ELFDEBUG( "r_addend=%x\t", rel->r_addend );
- ELFDEBUG( "dest16=%x\t", dest16 );
- ELFDEBUG( "*dest16=%8.8x\t", *dest16 );
- ELFDEBUG( "dest32=%8.8x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("R_PPC_16H\t");
+ ELFDEBUG("secp=%x\t", secp);
+ ELFDEBUG("symbol=%s\t",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ ELFDEBUG("symval=%x\t", symval);
+ ELFDEBUG("r_addend=%x\t", rel->r_addend);
+ ELFDEBUG("dest16=%x\t", dest16);
+ ELFDEBUG("*dest16=%8.8x\t", *dest16);
+ ELFDEBUG("dest32=%8.8x\t", dest32);
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- {
- unsigned short val;
- unsigned short loval;
- /* S + A */
- val=((symval+(rel->r_addend))&0xffff0000)>>16;
- loval=(symval+(rel->r_addend))&0xffff;
- if( loval & 0x8000 ) {
- /*
- * This is hi16(), instead of uhi16(). Because of this,
- * if the lo16() will produce a negative offset, then
- * we have to increment this part of the address to get
- * the correct final result.
- */
- val++;
- }
+ {
+ unsigned short val;
+ unsigned short loval;
+
+ /* S + A */
+ val = ((symval + (rel->r_addend)) & 0xffff0000) >> 16;
+ loval = (symval + (rel->r_addend)) & 0xffff;
+ if (loval & 0x8000) {
+ /*
+ * This is hi16(), instead of uhi16(). Because of this,
+ * if the lo16() will produce a negative offset, then
+ * we have to increment this part of the address to get
+ * the correct final result.
+ */
+ val++;
+ }
# ifdef ELFDEBUG
- ELFDEBUG("hi16(S+A)=%x\t",val);
+ ELFDEBUG("hi16(S+A)=%x\t", val);
# endif
- *dest16=val; /* S + A */
- ppc_flush_icache(dest16);
- }
+ *dest16 = val; /* S + A */
+ ppc_flush_icache(dest16);
+ }
# ifdef ELFDEBUG
- ELFDEBUG( "*dest16=%8.8x\t", *dest16 );
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("*dest16=%8.8x\t", *dest16);
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- break;
- case R_PPC_16L: /* 35 */
- dest16=(unsigned short *)(secp+rel->r_offset);
+ break;
+ case R_PPC_16L: /* 35 */
+ dest16 = (unsigned short *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- dest32=(unsigned long *)(dest16-1);
+ dest32 = (unsigned long *)(dest16 - 1);
# endif
# ifdef ELFDEBUG
- ELFDEBUG( "R_PPC_16L\t" );
- ELFDEBUG( "secp=%x\t", secp );
- ELFDEBUG( "symval=%x\t", symval );
- ELFDEBUG( "r_addend=%x\t", rel->r_addend );
- ELFDEBUG( "dest16=%x\t", dest16 );
- ELFDEBUG( "*dest16=%8.8x\t", *dest16 );
- ELFDEBUG( "dest32=%8.8x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("R_PPC_16L\t");
+ ELFDEBUG("secp=%x\t", secp);
+ ELFDEBUG("symval=%x\t", symval);
+ ELFDEBUG("r_addend=%x\t", rel->r_addend);
+ ELFDEBUG("dest16=%x\t", dest16);
+ ELFDEBUG("*dest16=%8.8x\t", *dest16);
+ ELFDEBUG("dest32=%8.8x\t", dest32);
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- {
- unsigned short val;
- /* S + A */
- val=(symval+(rel->r_addend))&0xffff;
+ {
+ unsigned short val;
+
+ /* S + A */
+ val = (symval + (rel->r_addend)) & 0xffff;
# ifdef ELFDEBUG
- ELFDEBUG("lo16(S+A)=%x\t",val);
+ ELFDEBUG("lo16(S+A)=%x\t", val);
# endif
- *dest16=val; /* S + A */
- ppc_flush_icache(dest16);
- }
+ *dest16 = val; /* S + A */
+ ppc_flush_icache(dest16);
+ }
# ifdef ELFDEBUG
- ELFDEBUG( "*dest16=%8.8x\t", *dest16 );
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("*dest16=%8.8x\t", *dest16);
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- break;
+ break;
# else /* PowerMAX_OS */
- /* Linux PPC */
- case R_PPC_ADDR32: /* 1 */
- dest32=(unsigned int *)(secp+rel->r_offset);
- symval=ElfGetSymbolValue(elffile,ELF_R_SYM(rel->r_info));
+ /* Linux PPC */
+ case R_PPC_ADDR32: /* 1 */
+ dest32 = (unsigned int *)(secp + rel->r_offset);
+ symval = ElfGetSymbolValue(elffile, ELF_R_SYM(rel->r_info));
# ifdef ELFDEBUG
- ELFDEBUG( "R_PPC_ADDR32\t" );
- ELFDEBUG( "secp=%x\t", secp );
- ELFDEBUG( "symval=%x\t", symval );
- ELFDEBUG( "r_addend=%x\t", rel->r_addend );
- ELFDEBUG( "dest32=%8.8x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("R_PPC_ADDR32\t");
+ ELFDEBUG("secp=%x\t", secp);
+ ELFDEBUG("symval=%x\t", symval);
+ ELFDEBUG("r_addend=%x\t", rel->r_addend);
+ ELFDEBUG("dest32=%8.8x\t", dest32);
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- {
- unsigned long val;
- /* S + A */
- val=symval+(rel->r_addend);
+ {
+ unsigned long val;
+
+ /* S + A */
+ val = symval + (rel->r_addend);
# ifdef ELFDEBUG
- ELFDEBUG("S+A=%x\t",val);
+ ELFDEBUG("S+A=%x\t", val);
# endif
- *dest32=val; /* S + A */
- ppc_flush_icache(dest32);
- }
+ *dest32 = val; /* S + A */
+ ppc_flush_icache(dest32);
+ }
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- break;
- case R_PPC_ADDR16_LO: /* 4 */
- dest16=(unsigned short *)(secp+rel->r_offset);
+ break;
+ case R_PPC_ADDR16_LO: /* 4 */
+ dest16 = (unsigned short *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- dest32=(unsigned long *)(dest16-1);
+ dest32 = (unsigned long *)(dest16 - 1);
# endif
# ifdef ELFDEBUG
- ELFDEBUG( "R_PPC_ADDR16_LO\t" );
- ELFDEBUG( "secp=%x\t", secp );
- ELFDEBUG( "symval=%x\t", symval );
- ELFDEBUG( "r_addend=%x\t", rel->r_addend );
- ELFDEBUG( "dest16=%x\t", dest16 );
- ELFDEBUG( "*dest16=%8.8x\t", *dest16 );
+ ELFDEBUG("R_PPC_ADDR16_LO\t");
+ ELFDEBUG("secp=%x\t", secp);
+ ELFDEBUG("symval=%x\t", symval);
+ ELFDEBUG("r_addend=%x\t", rel->r_addend);
+ ELFDEBUG("dest16=%x\t", dest16);
+ ELFDEBUG("*dest16=%8.8x\t", *dest16);
# endif
- {
- unsigned short val;
- /* S + A */
- val=(symval+(rel->r_addend))&0xffff;
+ {
+ unsigned short val;
+
+ /* S + A */
+ val = (symval + (rel->r_addend)) & 0xffff;
# ifdef ELFDEBUG
- ELFDEBUG("lo16(S+A)=%x\t",val);
+ ELFDEBUG("lo16(S+A)=%x\t", val);
# endif
- *dest16=val; /* S + A */
- ppc_flush_icache(dest16);
- }
+ *dest16 = val; /* S + A */
+ ppc_flush_icache(dest16);
+ }
# ifdef ELFDEBUG
- ELFDEBUG( "*dest16=%8.8x\t", *dest16 );
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("*dest16=%8.8x\t", *dest16);
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- break;
- case R_PPC_ADDR16_HA: /* 6 */
- dest16=(unsigned short *)(secp+rel->r_offset);
+ break;
+ case R_PPC_ADDR16_HA: /* 6 */
+ dest16 = (unsigned short *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- dest32=(unsigned long *)(dest16-1);
+ dest32 = (unsigned long *)(dest16 - 1);
# endif
# ifdef ELFDEBUG
- ELFDEBUG( "R_PPC_ADDR16_HA\t" );
- ELFDEBUG( "secp=%x\t", secp );
- ELFDEBUG( "symval=%x\t", symval );
- ELFDEBUG( "r_addend=%x\t", rel->r_addend );
- ELFDEBUG( "dest16=%x\t", dest16 );
- ELFDEBUG( "*dest16=%8.8x\t", *dest16 );
+ ELFDEBUG("R_PPC_ADDR16_HA\t");
+ ELFDEBUG("secp=%x\t", secp);
+ ELFDEBUG("symval=%x\t", symval);
+ ELFDEBUG("r_addend=%x\t", rel->r_addend);
+ ELFDEBUG("dest16=%x\t", dest16);
+ ELFDEBUG("*dest16=%8.8x\t", *dest16);
# endif
- {
- unsigned short val;
- unsigned short loval;
- /* S + A */
- val=((symval+(rel->r_addend))&0xffff0000)>>16;
- loval=(symval+(rel->r_addend))&0xffff;
- if( loval & 0x8000 ) {
- /*
- * This is hi16(), instead of uhi16(). Because of this,
- * if the lo16() will produce a negative offset, then
- * we have to increment this part of the address to get
- * the correct final result.
- */
- val++;
- }
+ {
+ unsigned short val;
+ unsigned short loval;
+
+ /* S + A */
+ val = ((symval + (rel->r_addend)) & 0xffff0000) >> 16;
+ loval = (symval + (rel->r_addend)) & 0xffff;
+ if (loval & 0x8000) {
+ /*
+ * This is hi16(), instead of uhi16(). Because of this,
+ * if the lo16() will produce a negative offset, then
+ * we have to increment this part of the address to get
+ * the correct final result.
+ */
+ val++;
+ }
# ifdef ELFDEBUG
- ELFDEBUG("hi16(S+A)=%x\t",val);
+ ELFDEBUG("hi16(S+A)=%x\t", val);
# endif
- *dest16=val; /* S + A */
- ppc_flush_icache(dest16);
- }
+ *dest16 = val; /* S + A */
+ ppc_flush_icache(dest16);
+ }
# ifdef ELFDEBUG
- ELFDEBUG( "*dest16=%8.8x\t", *dest16 );
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("*dest16=%8.8x\t", *dest16);
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- break;
- case R_PPC_REL24: /* 10 */
- dest32=(unsigned int *)(secp+rel->r_offset);
+ break;
+ case R_PPC_REL24: /* 10 */
+ dest32 = (unsigned int *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- ELFDEBUG( "R_PPC_REL24 %s\t", ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%x\t", secp );
- ELFDEBUG( "symval=%x\t", symval );
- ELFDEBUG( "dest32=%x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\t", *dest32 );
+ ELFDEBUG("R_PPC_REL24 %s\t",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ ELFDEBUG("secp=%x\t", secp);
+ ELFDEBUG("symval=%x\t", symval);
+ ELFDEBUG("dest32=%x\t", dest32);
+ ELFDEBUG("*dest32=%8.8x\t", *dest32);
# endif
- {
- unsigned long val;
-
- /* S + A - P >> 2 */
- val=((symval+(rel->r_addend)-(Elf_Addr)dest32));
+ {
+ unsigned long val;
+
+ /* S + A - P >> 2 */
+ val = ((symval + (rel->r_addend) - (Elf_Addr) dest32));
# ifdef ELFDEBUG
- ELFDEBUG("S+A-P=%x\t",val);
+ ELFDEBUG("S+A-P=%x\t", val);
# endif
- val = val>>2;
- if( (val & 0x3f000000) != 0x3f000000 &&
- (val & 0x3f000000) != 0x00000000 ) {
+ val = val >> 2;
+ if ((val & 0x3f000000) != 0x3f000000 &&
+ (val & 0x3f000000) != 0x00000000) {
# ifdef ELFDEBUG
- ELFDEBUG("R_PPC_REL24 offset %x too large\n", val<<2);
+ ELFDEBUG("R_PPC_REL24 offset %x too large\n", val << 2);
# endif
- symval = ElfGetPltAddr(elffile,ELF_R_SYM(rel->r_info));
- val=((symval+(rel->r_addend)-(Elf_Addr)dest32));
+ symval = ElfGetPltAddr(elffile, ELF_R_SYM(rel->r_info));
+ val = ((symval + (rel->r_addend) - (Elf_Addr) dest32));
# ifdef ELFDEBUG
- ELFDEBUG("PLT offset is %x\n", val);
+ ELFDEBUG("PLT offset is %x\n", val);
# endif
- val=val>>2;
- if( (val & 0x3f000000) != 0x3f000000 &&
- (val & 0x3f000000) != 0x00000000 )
- FatalError("R_PPC_REL24 PLT offset %x too large\n", val<<2);
- }
- val &= 0x00ffffff;
- (*dest32)|=(val<<2); /* The address part is always 0 */
- ppc_flush_icache(dest32);
+ val = val >> 2;
+ if ((val & 0x3f000000) != 0x3f000000 &&
+ (val & 0x3f000000) != 0x00000000)
+ FatalError("R_PPC_REL24 PLT offset %x too large\n",
+ val << 2);
}
+ val &= 0x00ffffff;
+ (*dest32) |= (val << 2); /* The address part is always 0 */
+ ppc_flush_icache(dest32);
+ }
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- break;
- case R_PPC_REL32: /* 26 */
- dest32=(unsigned int *)(secp+rel->r_offset);
+ break;
+ case R_PPC_REL32: /* 26 */
+ dest32 = (unsigned int *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- ELFDEBUG( "R_PPC_REL32\t" );
- ELFDEBUG( "secp=%x\t", secp );
- ELFDEBUG( "symval=%x\t", symval );
- ELFDEBUG( "r_addend=%x\t", rel->r_addend );
- ELFDEBUG( "dest32=%8.8x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("R_PPC_REL32\t");
+ ELFDEBUG("secp=%x\t", secp);
+ ELFDEBUG("symval=%x\t", symval);
+ ELFDEBUG("r_addend=%x\t", rel->r_addend);
+ ELFDEBUG("dest32=%8.8x\t", dest32);
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- {
- unsigned long val;
- /* S + A - P */
- val=symval+(rel->r_addend);
- val-=*dest32;
+ {
+ unsigned long val;
+
+ /* S + A - P */
+ val = symval + (rel->r_addend);
+ val -= *dest32;
# ifdef ELFDEBUG
- ELFDEBUG("S+A=%x\t",val);
- ELFDEBUG("S+A-P=%x\t",val+(*dest32)-(Elf_Addr)dest32);
+ ELFDEBUG("S+A=%x\t", val);
+ ELFDEBUG("S+A-P=%x\t", val + (*dest32) - (Elf_Addr) dest32);
# endif
- *dest32=val+(*dest32)-(Elf_Addr)dest32; /* S + A - P */
- ppc_flush_icache(dest32);
- }
+ *dest32 = val + (*dest32) - (Elf_Addr) dest32; /* S + A - P */
+ ppc_flush_icache(dest32);
+ }
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%8.8x\n", *dest32 );
+ ELFDEBUG("*dest32=%8.8x\n", *dest32);
# endif
- break;
-# endif /* PowerMAX_OS */
+ break;
+# endif /* PowerMAX_OS */
#endif /* __powerpc__ */
#ifdef __sparc__
- case R_SPARC_NONE: /* 0 */
- break;
+ case R_SPARC_NONE: /* 0 */
+ break;
- case R_SPARC_8: /* 1 */
- dest8 = (unsigned char *)(secp + rel->r_offset);
- symval += rel->r_addend;
- *dest8 = symval;
- break;
+ case R_SPARC_8: /* 1 */
+ dest8 = (unsigned char *)(secp + rel->r_offset);
+ symval += rel->r_addend;
+ *dest8 = symval;
+ break;
- case R_SPARC_16: /* 2 */
- dest16 = (unsigned short *)(secp + rel->r_offset);
- symval += rel->r_addend;
- *dest16 = symval;
- break;
+ case R_SPARC_16: /* 2 */
+ dest16 = (unsigned short *)(secp + rel->r_offset);
+ symval += rel->r_addend;
+ *dest16 = symval;
+ break;
- case R_SPARC_32: /* 3 */
- case R_SPARC_GLOB_DAT: /* 20 */
- case R_SPARC_UA32: /* 23 */
- dest32 = (unsigned int *)(secp + rel->r_offset);
- symval += rel->r_addend;
- ((unsigned char *)dest32)[0] = (unsigned char)(symval >> 24);
- ((unsigned char *)dest32)[1] = (unsigned char)(symval >> 16);
- ((unsigned char *)dest32)[2] = (unsigned char)(symval >> 8);
- ((unsigned char *)dest32)[3] = (unsigned char)(symval );
- break;
+ case R_SPARC_32: /* 3 */
+ case R_SPARC_UA32: /* 23 */
+ dest32 = (unsigned int *)(secp + rel->r_offset);
+ symval += rel->r_addend;
+ ((unsigned char *)dest32)[0] = (unsigned char)(symval >> 24);
+ ((unsigned char *)dest32)[1] = (unsigned char)(symval >> 16);
+ ((unsigned char *)dest32)[2] = (unsigned char)(symval >> 8);
+ ((unsigned char *)dest32)[3] = (unsigned char)(symval);
+ break;
- case R_SPARC_DISP8: /* 4 */
- dest8 = (unsigned char *)(secp + rel->r_offset);
- symval += rel->r_addend;
- *dest8 = (symval - (Elf32_Addr) dest8);
- break;
+ case R_SPARC_GLOB_DAT: /* 20 */
+ case R_SPARC_64: /* 32 */
+ dest64 = (unsigned long *)(secp + rel->r_offset);
+ symval += rel->r_addend;
+ *dest64 = symval;
+ break;
- case R_SPARC_DISP16: /* 5 */
- dest16 = (unsigned short *)(secp + rel->r_offset);
- symval += rel->r_addend;
- *dest16 = (symval - (Elf32_Addr) dest16);
- break;
+ case R_SPARC_DISP8: /* 4 */
+ dest8 = (unsigned char *)(secp + rel->r_offset);
+ symval += rel->r_addend;
+ *dest8 = (symval - (Elf_Addr) dest8);
+ break;
- case R_SPARC_DISP32: /* 6 */
- dest32 = (unsigned int *)(secp + rel->r_offset);
- symval += rel->r_addend;
- *dest32 = (symval - (Elf32_Addr) dest32);
- break;
+ case R_SPARC_DISP16: /* 5 */
+ dest16 = (unsigned short *)(secp + rel->r_offset);
+ symval += rel->r_addend;
+ *dest16 = (symval - (Elf_Addr) dest16);
+ break;
- case R_SPARC_WDISP30: /* 7 */
- dest32 = (unsigned int *)(secp + rel->r_offset);
- symval += rel->r_addend;
- *dest32 = ((*dest32 & 0xc0000000) |
- ((symval - (Elf32_Addr) dest32) >> 2));
- break;
+ case R_SPARC_DISP32: /* 6 */
+ dest32 = (unsigned int *)(secp + rel->r_offset);
+ symval += rel->r_addend;
+ *dest32 = (symval - (Elf_Addr) dest32);
+ break;
- case R_SPARC_HI22: /* 9 */
- dest32 = (unsigned int *)(secp + rel->r_offset);
- symval += rel->r_addend;
- *dest32 = (*dest32 & 0xffc00000) | (symval >> 10);
- break;
+ case R_SPARC_WDISP30: /* 7 */
+ dest32 = (unsigned int *)(secp + rel->r_offset);
+ symval += rel->r_addend;
+ *dest32 = ((*dest32 & 0xc0000000) |
+ (((symval - (Elf_Addr) dest32) >> 2) & 0x3fffffff));
+ break;
- case R_SPARC_LO10: /* 12 */
- dest32 = (unsigned int *)(secp + rel->r_offset);
- symval += rel->r_addend;
- *dest32 = (*dest32 & ~0x3ff) | (symval & 0x3ff);
- break;
+ case R_SPARC_HI22: /* 9 */
+ dest32 = (unsigned int *)(secp + rel->r_offset);
+ symval += rel->r_addend;
+ *dest32 = (*dest32 & 0xffc00000) | (symval >> 10);
+ break;
- case R_SPARC_COPY: /* 19 */
- /* Fix your code... I'd rather dish out an error here
- * so people will not link together PIC and non-PIC
- * code into a final driver object file.
- */
- ErrorF("Elf_RelocateEntry():"
- " Copy relocs not supported on Sparc.\n");
- break;
+ case R_SPARC_LO10: /* 12 */
+ dest32 = (unsigned int *)(secp + rel->r_offset);
+ symval += rel->r_addend;
+ *dest32 = (*dest32 & ~0x3ff) | (symval & 0x3ff);
+ break;
- case R_SPARC_JMP_SLOT: /* 21 */
- dest32 = (unsigned int *)(secp + rel->r_offset);
- /* Before we change it the PLT entry looks like:
- *
- * pltent: sethi %hi(rela_plt_offset), %g1
- * b,a PLT0
- * nop
- *
- * We change it into:
- *
- * pltent: sethi %hi(rela_plt_offset), %g1
- * sethi %hi(symval), %g1
- * jmp %g1 + %lo(symval), %g0
- */
- symval += rel->r_addend;
- dest32[2] = 0x81c06000 | (symval & 0x3ff);
- __asm __volatile("flush %0 + 0x8" : : "r" (dest32));
- dest32[1] = 0x03000000 | (symval >> 10);
- __asm __volatile("flush %0 + 0x4" : : "r" (dest32));
- break;
+ case R_SPARC_COPY: /* 19 */
+ /* Fix your code... I'd rather dish out an error here
+ * so people will not link together PIC and non-PIC
+ * code into a final driver object file.
+ */
+ ErrorF("Elf_RelocateEntry():"
+ " Copy relocs not supported on Sparc.\n");
+ break;
- case R_SPARC_RELATIVE: /* 22 */
- dest32 = (unsigned int *)(secp + rel->r_offset);
- *dest32 += (unsigned int)secp + rel->r_addend;
- break;
+ case R_SPARC_JMP_SLOT: /* 21 */
+ dest32 = (unsigned int *)(secp + rel->r_offset);
+ /* Before we change it the PLT entry looks like:
+ *
+ * pltent: sethi %hi(rela_plt_offset), %g1
+ * b,a PLT0
+ * nop
+ *
+ * We change it into:
+ *
+ * pltent: sethi %hi(rela_plt_offset), %g1
+ * sethi %hi(symval), %g1
+ * jmp %g1 + %lo(symval), %g0
+ */
+ symval += rel->r_addend;
+ dest32[2] = 0x81c06000 | (symval & 0x3ff);
+ __asm __volatile("flush %0 + 0x8"::"r"(dest32));
+
+ dest32[1] = 0x03000000 | (symval >> 10);
+ __asm __volatile("flush %0 + 0x4"::"r"(dest32));
+
+ break;
+
+ case R_SPARC_RELATIVE: /* 22 */
+ dest64 = (unsigned long *)(secp + rel->r_offset);
+ *dest64 = (unsigned long)secp + rel->r_addend;
+ break;
#endif /*__sparc__*/
#ifdef __ia64__
- case R_IA64_NONE:
- break;
+ case R_IA64_NONE:
+ break;
- case R_IA64_LTOFF_FPTR22:
- if (rel->r_addend)
- FatalError("\nAddend for R_IA64_LTOFF_FPTR22 not supported\n");
+ case R_IA64_LTOFF_FPTR22:
+ if (rel->r_addend)
+ FatalError("\nAddend for R_IA64_LTOFF_FPTR22 not supported\n");
# ifdef ELFDEBUG
- ELFDEBUG( "opd=%016lx.%016lx\n",
- ((long *)symval)[0], ((long *)symval)[1] );
+ ELFDEBUG("opd=%016lx.%016lx\n",
+ ((long *)symval)[0], ((long *)symval)[1]);
# endif
- /* FALLTHROUGH */
- case R_IA64_LTOFF22:
- {
+ /* FALLTHROUGH */
+ case R_IA64_LTOFF22:
+#ifndef IA64_LDX_OPTIMIZATION
+ case R_IA64_LTOFF22X: /* If not implementing LDXMOV optimization treat LTOFF22X as LTOFF22 */
+#endif
+ {
ELFGotEntryPtr gotent;
- dest128=(unsigned long *)(secp+(rel->r_offset&~3));
-# ifdef ELFDEBUG
- ELFDEBUG( "%s %s\t", ELF_R_TYPE(rel->r_info) == R_IA64_LTOFF22 ?
- "R_IA64_LTOFF22" : "R_IA64_LTOFF_FPTR22",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest128=%lx\t", dest128 );
- ELFDEBUG( "slot=%d\n", rel->r_offset & 3);
- ELFDEBUG( "*dest128=[%016lx%016lx]\n", dest128[1], dest128[0]);
-# endif
- for (gotent=elffile->got_entries;gotent;gotent=gotent->next) {
- if ( ELF_R_SYM(gotent->rel->r_info) == ELF_R_SYM(rel->r_info) &&
- gotent->rel->r_addend == rel->r_addend )
- break;
+ dest128 = (unsigned long *)(secp + (rel->r_offset & ~3));
+# ifdef ELFDEBUG
+ ELFDEBUG("%s %s\t", ELF_R_TYPE(rel->r_info) == R_IA64_LTOFF22 ?
+ "R_IA64_LTOFF22" : "R_IA64_LTOFF_FPTR22",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ ELFDEBUG("secp=%lx\t", secp);
+ ELFDEBUG("symval=%lx\t", symval);
+ ELFDEBUG("dest128=%lx\t", dest128);
+ ELFDEBUG("slot=%d\n", rel->r_offset & 3);
+ ELFDEBUG("*dest128=[%016lx%016lx]\n", dest128[1], dest128[0]);
+# endif
+
+ for (gotent = elffile->got_entries; gotent; gotent = gotent->next) {
+ if (ELF_R_SYM(gotent->rel->r_info) == ELF_R_SYM(rel->r_info)
+ && gotent->rel->r_addend == rel->r_addend)
+ break;
}
/* Set the address in the GOT */
- if( gotent ) {
- *(unsigned long *)(elffile->got+gotent->offset) =
- symval+rel->r_addend;
+ if (gotent) {
+ *(unsigned long *)(elffile->got + gotent->offset) =
+ symval + rel->r_addend;
# ifdef ELFDEBUG
ELFDEBUG("Setting gotent[%x]=%lx\n",
- gotent->offset, symval+rel->r_addend);
+ gotent->offset, symval + rel->r_addend);
# endif
if ((gotent->offset & 0xffe00000) != 0)
FatalError("\nR_IA64_LTOFF22 offset %x too large\n",
gotent->offset);
- IA64InstallReloc(dest128, rel->r_offset & 3, IA64_OPND_IMM22, gotent->offset);
- }
- else
+ IA64InstallReloc(dest128, rel->r_offset & 3, IA64_OPND_IMM22,
+ gotent->offset);
+ } else
FatalError("\nCould not find GOT entry\n");
- }
- break;
+ }
+ break;
- case R_IA64_PCREL21B:
- {
+ case R_IA64_PCREL21B:
+ {
ELFPltEntryPtr pltent;
- dest128=(unsigned long *)(secp+(rel->r_offset&~3));
+
+ dest128 = (unsigned long *)(secp + (rel->r_offset & ~3));
# ifdef ELFDEBUG
- ELFDEBUG( "R_IA64_PCREL21B %s\t",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "opd=%lx.%lx\t", ((long *)symval)[0], ((long *)symval)[1]);
- ELFDEBUG( "dest128=%lx\t", dest128 );
- ELFDEBUG( "slot=%d\n", rel->r_offset & 3);
- ELFDEBUG( "*dest128=[%016lx%016lx]\n", dest128[1], dest128[0]);
+ ELFDEBUG("R_IA64_PCREL21B %s\t",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ ELFDEBUG("secp=%lx\t", secp);
+ ELFDEBUG("symval=%lx\t", symval);
+ ELFDEBUG("opd=%lx.%lx\t", ((long *)symval)[0],
+ ((long *)symval)[1]);
+ ELFDEBUG("dest128=%lx\t", dest128);
+ ELFDEBUG("slot=%d\n", rel->r_offset & 3);
+ ELFDEBUG("*dest128=[%016lx%016lx]\n", dest128[1], dest128[0]);
# endif
if (rel->r_addend)
FatalError("\nAddend for PCREL21B not supported\n");
if (((long *)symval)[1] == (long)elffile->got
- && (((unsigned long)dest128 - ((unsigned long *)symval)[0]) + 0x2000000 < 0x4000000)) {
+ && (((unsigned long)dest128 - ((unsigned long *)symval)[0]) +
+ 0x2000000 < 0x4000000)) {
/* We can save the travel through PLT */
IA64InstallReloc(dest128, rel->r_offset & 3, IA64_OPND_TGT25C,
- ((unsigned long *)symval)[0] - (unsigned long)dest128);
+ ((unsigned long *)symval)[0] -
+ (unsigned long)dest128);
break;
}
- for (pltent=elffile->plt_entries;pltent;pltent=pltent->next) {
- if ( ELF_R_SYM(pltent->rel->r_info) == ELF_R_SYM(rel->r_info) &&
- pltent->rel->r_addend == rel->r_addend )
- break;
+ for (pltent = elffile->plt_entries; pltent; pltent = pltent->next) {
+ if (ELF_R_SYM(pltent->rel->r_info) == ELF_R_SYM(rel->r_info)
+ && pltent->rel->r_addend == rel->r_addend)
+ break;
}
/* Set the address in the PLT */
if (pltent == NULL)
FatalError("\nCould not find PLT entry\n");
else {
- unsigned long *p = (unsigned long *)(elffile->plt+pltent->offset);
- unsigned long r = (unsigned long)symval - (unsigned long)elffile->got;
+ unsigned long *p =
+ (unsigned long *)(elffile->plt + pltent->offset);
+ unsigned long r =
+ (unsigned long)symval - (unsigned long)elffile->got;
if (r + 0x200000 >= 0x400000) {
- /* Too far from gp to use the official function descriptor,
- * so we have to make a local one.
- */
- r = pltent->gotoffset;
- memcpy(elffile->got+r, (char *)symval, 16);
+ /* Too far from gp to use the official function descriptor,
+ * so we have to make a local one.
+ */
+ r = pltent->gotoffset;
+ memcpy(elffile->got + r, (char *)symval, 16);
}
/* [MMI] addl r15=NNN,r1;; ld8 r16=[r15],8; mov r14=r1;; */
@@ -2147,162 +2248,262 @@ int force;
IA64InstallReloc(dest128, rel->r_offset & 3, IA64_OPND_TGT25C,
(unsigned long)p - (unsigned long)dest128);
}
- }
- break;
+ }
+ break;
+
+ case R_IA64_FPTR64LSB:
+ dest64 = (unsigned long *)(secp + rel->r_offset);
+# ifdef ELFDEBUG
+ ELFDEBUG("R_IA64_FPTR64LSB %s\t",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ ELFDEBUG("secp=%lx\t", secp);
+ ELFDEBUG("symval=%lx\t", symval);
+ ELFDEBUG("dest64=%lx\t", dest64);
+ ELFDEBUG("opd=%016lx.%016lx\n", ((long *)symval)[0],
+ ((long *)symval)[1]);
+# endif
+
+ if (rel->r_addend)
+ FatalError("\nAddend not supported for R_IA64_FPTR64LSB\n");
+ *dest64 = symval;
+ ia64_flush_cache(dest64);
+ break;
+
+ case R_IA64_DIR64LSB:
+ dest64 = (unsigned long *)(secp + rel->r_offset);
+# ifdef ELFDEBUG
+ ELFDEBUG("R_IA64_DIR64LSB %s\t",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ ELFDEBUG("secp=%lx\t", secp);
+ ELFDEBUG("symval=%lx\t", symval);
+ ELFDEBUG("dest64=%lx\n", dest64);
+# endif
+ *dest64 = symval + rel->r_addend;
+ ia64_flush_cache(dest64);
+ break;
+
+ case R_IA64_PCREL64LSB:
+ dest64 = (unsigned long *)(secp + rel->r_offset);
+#ifdef ELFDEBUG
+ ELFDEBUG("R_IA64_PCREL64LSB %s\t",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ ELFDEBUG("secp=%lx\t", secp);
+ ELFDEBUG("symval=%lx\t", symval);
+ ELFDEBUG("dest64=%lx\n", dest64);
+#endif
+ *dest64 = symval + rel->r_addend - (unsigned long)dest64;
+ break;
+
+ case R_IA64_GPREL22:
+ dest128 = (unsigned long *)(secp + (rel->r_offset & ~3));
+# ifdef ELFDEBUG
+ ELFDEBUG("R_IA64_GPREL22 %s\t",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ ELFDEBUG("secp=%lx\t", secp);
+ ELFDEBUG("symval=%lx\t", symval);
+ ELFDEBUG("dest128=%lx\t", dest128);
+ ELFDEBUG("slot=%d\n", rel->r_offset & 3);
+ ELFDEBUG("*dest128=[%016lx%016lx]\n", dest128[1], dest128[0]);
+# endif
+ IA64InstallReloc(dest128, rel->r_offset & 3, IA64_OPND_IMM22,
+ symval + rel->r_addend - (long)elffile->got);
+ break;
+
+#ifdef IA64_LDX_OPTIMIZATION
+ case R_IA64_LTOFF22X:
+ {
+ ELFGotEntryPtr gotent;
+ long gp_offset = symval + rel->r_addend - (long)elffile->got;
+
+ dest128 = (unsigned long *)(secp + (rel->r_offset & ~3));
- case R_IA64_FPTR64LSB:
- dest64=(unsigned long *)(secp+rel->r_offset);
# ifdef ELFDEBUG
- ELFDEBUG( "R_IA64_FPTR64LSB %s\t",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest64=%lx\t", dest64 );
- ELFDEBUG( "opd=%016lx.%016lx\n", ((long *)symval)[0], ((long *)symval)[1] );
+ ELFDEBUG("R_IA64_LTOFF22X %s\t",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+ ELFDEBUG("secp=%lx\t", secp);
+ ELFDEBUG("symval=%lx\t", symval);
+ ELFDEBUG("dest128=%lx\t", dest128);
+ ELFDEBUG("slot=%d\n", rel->r_offset & 3);
# endif
- if (rel->r_addend)
- FatalError("\nAddend not supported for R_IA64_FPTR64LSB\n");
- *dest64 = symval;
- ia64_flush_cache(dest64);
- break;
+ if (gp_offset << 42 >> 42 != gp_offset) {
+ /* Offset is too large for LTOFF22X,
+ * fallback to using GOT lookup, e.g. LTOFF22.
+ * Note: LDXMOV will fail the same test and will be ignored. */
- case R_IA64_DIR64LSB:
- dest64=(unsigned long *)(secp+rel->r_offset);
# ifdef ELFDEBUG
- ELFDEBUG( "R_IA64_DIR64LSB %s\t",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest64=%lx\n", dest64 );
+ ELFDEBUG("gp_offset=%ld too large, using GOT instead (LTOFF22)\n", gp_offset);
# endif
- *dest64 = symval + rel->r_addend;
- ia64_flush_cache(dest64);
- break;
- case R_IA64_PCREL64LSB:
- dest64=(unsigned long *)(secp+rel->r_offset);
-#ifdef ELFDEBUG
- ELFDEBUG( "R_IA64_PCREL64LSB %s\t",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest64=%lx\n", dest64 );
-#endif
- *dest64 = symval + rel->r_addend - (unsigned long)dest64;
- break;
+ for (gotent = elffile->got_entries; gotent;
+ gotent = gotent->next) {
+ if (ELF_R_SYM(gotent->rel->r_info) ==
+ ELF_R_SYM(rel->r_info)
+ && gotent->rel->r_addend == rel->r_addend)
+ break;
+ }
- case R_IA64_GPREL22:
- dest128=(unsigned long *)(secp+(rel->r_offset&~3));
+ /* Set the address in the GOT */
+ if (gotent) {
+ *(unsigned long *)(elffile->got + gotent->offset) =
+ symval + rel->r_addend;
+# ifdef ELFDEBUG
+ ELFDEBUG("Setting gotent[%x]=%lx\n", gotent->offset,
+ symval + rel->r_addend);
+# endif
+ if ((gotent->offset & 0xffe00000) != 0)
+ FatalError("\nR_IA64_LTOFF22 offset %x too large\n",
+ gotent->offset);
+ } else {
+ FatalError("\nCould not find GOT entry\n");
+ }
+ gp_offset = gotent->offset; /* Use GOT lookup */
+ } else {
# ifdef ELFDEBUG
- ELFDEBUG( "R_IA64_GPREL22 %s\t",
- ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
- ELFDEBUG( "secp=%lx\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest128=%lx\t", dest128 );
- ELFDEBUG( "slot=%d\n", rel->r_offset & 3);
- ELFDEBUG( "*dest128=[%016lx%016lx]\n", dest128[1], dest128[0]);
+ ELFDEBUG("using gp_offset=%ld (LTOFF22X)", gp_offset);
# endif
+ }
IA64InstallReloc(dest128, rel->r_offset & 3, IA64_OPND_IMM22,
- symval + rel->r_addend - (long)elffile->got);
- break;
+ gp_offset);
+ }
+ break;
+#endif
+
+ case R_IA64_LDXMOV:
+# ifdef ELFDEBUG
+ ELFDEBUG("R_IA64_LDXMOV %s\t",
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
+# endif
+
+#ifdef IA64_LDX_OPTIMIZATION
+ {
+ long gp_offset = symval + rel->r_addend - (long)elffile->got;
+
+ dest128 = (unsigned long *)(secp + (rel->r_offset & ~3));
+
+ if (gp_offset << 42 >> 42 != gp_offset) {
+ /* Offset is too large for LTOFF22X, ignore this relocation */
+# ifdef ELFDEBUG
+ ELFDEBUG("offset = %ld too large, ignoring\n", gp_offset);
+# endif
+ } else {
+
+# ifdef ELFDEBUG
+ ELFDEBUG("secp=%lx\t", secp);
+ ELFDEBUG("symval=%lx\t", symval);
+ ELFDEBUG("dest128=%lx\t", dest128);
+ ELFDEBUG("slot=%d\n", rel->r_offset & 3);
+ ELFDEBUG("offset=%ld\n", gp_offset);
+ ELFDEBUG("*dest128=[%016lx%016lx]\n", dest128[1], dest128[0]);
+# endif
+
+ IA64InstallReloc(dest128, rel->r_offset & 3, IA64_OPND_LDXMOV,
+ 0);
+ }
+ }
+#endif
+ break;
#endif /*__ia64__*/
#if defined(__arm__)
- case R_ARM_ABS32:
- dest32=(unsigned int *)(secp+rel->r_offset);
+ case R_ARM_ABS32:
+ dest32 = (unsigned int *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- ELFDEBUG( "R_ARM_ABS32\t");
- ELFDEBUG( "dest32=%x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8lx\t", *dest32 );
+ ELFDEBUG("R_ARM_ABS32\t");
+ ELFDEBUG("dest32=%x\t", dest32);
+ ELFDEBUG("*dest32=%8.8lx\t", *dest32);
# endif
- *dest32=symval+(*dest32); /* S + A */
+ *dest32 = symval + (*dest32); /* S + A */
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%8.8lx\n", *dest32 );
+ ELFDEBUG("*dest32=%8.8lx\n", *dest32);
# endif
- break;
+ break;
- case R_ARM_REL32:
- dest32=(unsigned int *)(secp+rel->r_offset);
+ case R_ARM_REL32:
+ dest32 = (unsigned int *)(secp + rel->r_offset);
# ifdef ELFDEBUG
- {
+ {
char *namestr;
- ELFDEBUG( "R_ARM_REL32 %s\t",
- namestr=ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)) );
+
+ ELFDEBUG("R_ARM_REL32 %s\t",
+ namestr =
+ ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)));
xf86loaderfree(namestr);
- ELFDEBUG( "secp=%x\t", secp );
- ELFDEBUG( "symval=%lx\t", symval );
- ELFDEBUG( "dest32=%x\t", dest32 );
- ELFDEBUG( "*dest32=%8.8lx\t", *dest32 );
- }
+ ELFDEBUG("secp=%x\t", secp);
+ ELFDEBUG("symval=%lx\t", symval);
+ ELFDEBUG("dest32=%x\t", dest32);
+ ELFDEBUG("*dest32=%8.8lx\t", *dest32);
+ }
# endif
- *dest32=symval+(*dest32)-(Elf_Addr)dest32; /* S + A - P */
+ *dest32 = symval + (*dest32) - (Elf_Addr) dest32; /* S + A - P */
# ifdef ELFDEBUG
- ELFDEBUG( "*dest32=%8.8lx\n", *dest32 );
+ ELFDEBUG("*dest32=%8.8lx\n", *dest32);
# endif
- break;
+ break;
- case R_ARM_PC24:
- {
+ case R_ARM_PC24:
+ {
unsigned long val;
- dest32=(unsigned int *)(secp+rel->r_offset);
+
+ dest32 = (unsigned int *)(secp + rel->r_offset);
val = (*dest32 & 0x00ffffff) << 2;
- val = symval - (unsigned long)dest32 + val;
- val >>= 2;
- *dest32 = (*dest32 & 0xff000000) | (val & 0x00ffffff);
+ val = symval - (unsigned long)dest32 + val;
+ val >>= 2;
+ *dest32 = (*dest32 & 0xff000000) | (val & 0x00ffffff);
#ifdef NOTYET
arm_flush_cache(dest32);
#endif
- }
- break;
+ }
+ break;
#endif /* (__arm__) */
- default:
- ErrorF("Elf_RelocateEntry() Unsupported relocation type %d\n",
- ELF_R_TYPE(rel->r_info));
- break;
- }
+ default:
+ ErrorF("Elf_RelocateEntry() Unsupported relocation type %d\n",
+ (int)ELF_R_TYPE(rel->r_info));
+ break;
+ }
return 0;
}
static ELFRelocPtr
ELFCollectRelocations(elffile, index)
-ELFModulePtr elffile;
-int index; /* The section to use as relocation data */
+ ELFModulePtr elffile;
+ int index; /* The section to use as relocation data */
{
- int i, numrel;
- Elf_Shdr *sect=&(elffile->sections[index]);
- Elf_Rel_t *rel=(Elf_Rel_t *)elffile->saddr[index];
- Elf_Sym *syms;
+ int i, numrel;
+ Elf_Shdr *sect = &(elffile->sections[index]);
+ Elf_Rel_t *rel = (Elf_Rel_t *) elffile->saddr[index];
ELFRelocPtr reloc_head = NULL;
ELFRelocPtr tmp;
- syms = (Elf_Sym *) elffile->saddr[elffile->symndx];
+ numrel = sect->sh_size / sect->sh_entsize;
- numrel=sect->sh_size/sect->sh_entsize;
-
- for(i=0; i<numrel; i++ ) {
+ for (i = 0; i < numrel; i++) {
#if defined(__alpha__)
- if( ELF_R_TYPE(rel[i].r_info) == R_ALPHA_LITERAL) {
- ElfAddGOT(elffile,&rel[i]);
- }
+ if (ELF_R_TYPE(rel[i].r_info) == R_ALPHA_LITERAL) {
+ ElfAddGOT(elffile, &rel[i]);
+ }
#endif
#if defined(__ia64__)
if (ELF_R_TYPE(rel[i].r_info) == R_IA64_LTOFF22
+ || ELF_R_TYPE(rel[i].r_info) == R_IA64_LTOFF22X
|| ELF_R_TYPE(rel[i].r_info) == R_IA64_LTOFF_FPTR22) {
- ElfAddGOT(elffile,&rel[i]);
+ ElfAddGOT(elffile, &rel[i]);
}
if (ELF_R_TYPE(rel[i].r_info) == R_IA64_PCREL21B) {
- ElfAddPLT(elffile,&rel[i]);
+ ElfAddPLT(elffile, &rel[i]);
}
if (ELF_R_TYPE(rel[i].r_info) == R_IA64_LTOFF_FPTR22
|| ELF_R_TYPE(rel[i].r_info) == R_IA64_FPTR64LSB) {
- if (ELF_ST_BIND(syms[ELF_R_SYM(rel[i].r_info)].st_info) == STB_LOCAL) {
+ Elf_Sym *syms = (Elf_Sym *) elffile->saddr[elffile->symndx];
+
+ if (ELF_ST_BIND(syms[ELF_R_SYM(rel[i].r_info)].st_info) ==
+ STB_LOCAL) {
ElfAddOPD(elffile, ELF_R_SYM(rel[i].r_info), NULL);
}
}
@@ -2322,110 +2523,109 @@ int index; /* The section to use as relocation data */
*/
static LOOKUP *
-ELF_GetSymbols(elffile, psecttable)
-ELFModulePtr elffile;
-unsigned short **psecttable;
+ELF_GetSymbols(ELFModulePtr elffile, unsigned short **psecttable)
{
- Elf_Sym *syms;
- Elf_Shdr *sect;
- int i, l, numsyms;
- LOOKUP *lookup, *p;
+ Elf_Sym *syms;
+ Elf_Shdr *sect;
+ int i, l, numsyms;
+ LOOKUP *lookup, *p;
ELFCommonPtr tmp;
unsigned short *secttable;
- syms=elffile->symtab;
- sect=&(elffile->sections[elffile->symndx]);
- numsyms=sect->sh_size/sect->sh_entsize;
+ syms = elffile->symtab;
+ sect = &(elffile->sections[elffile->symndx]);
+ numsyms = sect->sh_size / sect->sh_entsize;
- if ((lookup = xf86loadermalloc((numsyms+1)*sizeof(LOOKUP))) == NULL)
+ if ((lookup = xf86loadermalloc((numsyms + 1) * sizeof(LOOKUP))) == NULL)
return 0;
- if ((secttable = xf86loadercalloc(sizeof(unsigned short),(numsyms+1))) == NULL) {
+ if ((secttable =
+ xf86loadercalloc(sizeof(unsigned short), (numsyms + 1))) == NULL) {
xf86loaderfree(lookup);
return 0;
}
*psecttable = secttable;
- for(i=0,l=0; i<numsyms; i++)
- {
+ for (i = 0, l = 0; i < numsyms; i++) {
#ifdef ELFDEBUG
- ELFDEBUG("value=%lx\tsize=%lx\tBIND=%x\tTYPE=%x\tndx=%x\t%s\n",
- syms[i].st_value,syms[i].st_size,
- ELF_ST_BIND(syms[i].st_info),ELF_ST_TYPE(syms[i].st_info),
- syms[i].st_shndx,ElfGetString(elffile,syms[i].st_name) );
+ ELFDEBUG("value=%lx\tsize=%lx\tBIND=%x\tTYPE=%x\tndx=%x\t%s\n",
+ (unsigned long)syms[i].st_value,
+ (unsigned long)syms[i].st_size,
+ ELF_ST_BIND(syms[i].st_info), ELF_ST_TYPE(syms[i].st_info),
+ syms[i].st_shndx, ElfGetString(elffile, syms[i].st_name));
#endif
- if( ELF_ST_BIND(syms[i].st_info) == STB_LOCAL )
- /* Don't add static symbols to the symbol table */
- continue;
+ if (ELF_ST_BIND(syms[i].st_info) == STB_LOCAL)
+ /* Don't add static symbols to the symbol table */
+ continue;
- switch( ELF_ST_TYPE(syms[i].st_info) )
- {
- case STT_OBJECT:
- case STT_FUNC:
- case STT_SECTION:
- case STT_NOTYPE:
- switch(syms[i].st_shndx)
- {
- case SHN_ABS:
- ErrorF("ELF_GetSymbols() Don't know how to handle SHN_ABS\n" );
- break;
- case SHN_COMMON:
+ switch (ELF_ST_TYPE(syms[i].st_info)) {
+ case STT_OBJECT:
+ case STT_FUNC:
+ case STT_SECTION:
+ case STT_NOTYPE:
+ switch (syms[i].st_shndx) {
+ case SHN_ABS:
+ ErrorF("ELF_GetSymbols() Don't know how to handle SHN_ABS\n");
+ break;
+ case SHN_COMMON:
#ifdef ELFDEBUG
- ELFDEBUG("Adding COMMON space for %s\n",
- ElfGetString(elffile,syms[i].st_name) );
-#endif
- if (!LoaderHashFind(ElfGetString(elffile,
- syms[i].st_name))) {
- tmp = ElfAddCOMMON(&(syms[i]));
- if (tmp) {
- tmp->next = listCOMMON;
- listCOMMON = tmp;
- }
- }
- break;
- case SHN_UNDEF:
- /*
- * UNDEF will get resolved later, so the value
- * doesn't really matter here.
- */
- /* since we don't know the value don't advertise the symbol */
- break;
- default:
- lookup[l].symName=xf86loaderstrdup(ElfGetString(elffile,syms[i].st_name));
- lookup[l].offset=(funcptr)syms[i].st_value;
- secttable[l] = syms[i].st_shndx;
+ ELFDEBUG("Adding COMMON space for %s\n",
+ ElfGetString(elffile, syms[i].st_name));
+#endif
+ if (!LoaderHashFind(ElfGetString(elffile, syms[i].st_name))) {
+ tmp = ElfAddCOMMON(&(syms[i]));
+ if (tmp) {
+ tmp->next = listCOMMON;
+ listCOMMON = tmp;
+ }
+ }
+ break;
+ case SHN_UNDEF:
+ /*
+ * UNDEF will get resolved later, so the value
+ * doesn't really matter here.
+ */
+ /* since we don't know the value don't advertise the symbol */
+ break;
+ default:
+ lookup[l].symName =
+ xf86loaderstrdup(ElfGetString
+ (elffile, syms[i].st_name));
+ lookup[l].offset = (funcptr) syms[i].st_value;
+ secttable[l] = syms[i].st_shndx;
#ifdef ELFDEBUG
- ELFDEBUG("Adding symbol %lx(%d) %s\n",
- lookup[l].offset, secttable[l], lookup[l].symName );
+ ELFDEBUG("Adding symbol %lx(%d) %s\n",
+ (unsigned long)lookup[l].offset, secttable[l],
+ lookup[l].symName);
#endif
#ifdef __ia64__
- if ( ELF_ST_TYPE(syms[i].st_info) == STT_FUNC ) {
- ElfAddOPD(elffile, -1, &lookup[l]);
- }
+ if (ELF_ST_TYPE(syms[i].st_info) == STT_FUNC) {
+ ElfAddOPD(elffile, -1, &lookup[l]);
+ }
#endif
- l++;
- break;
- }
- break;
- case STT_FILE:
- case STT_LOPROC:
- case STT_HIPROC:
- /* Skip this type */
+ l++;
+ break;
+ }
+ break;
+ case STT_FILE:
+ case STT_LOPROC:
+ case STT_HIPROC:
+ /* Skip this type */
#ifdef ELFDEBUG
- ELFDEBUG("Skipping TYPE %d %s\n",
- ELF_ST_TYPE(syms[i].st_info),
- ElfGetString(elffile,syms[i].st_name));
+ ELFDEBUG("Skipping TYPE %d %s\n",
+ ELF_ST_TYPE(syms[i].st_info),
+ ElfGetString(elffile, syms[i].st_name));
#endif
- break;
- default:
- ErrorF("ELF_GetSymbols(): Unepected symbol type %d\n",
- ELF_ST_TYPE(syms[i].st_info) );
- break;
- }
+ break;
+ default:
+ ErrorF("ELF_GetSymbols(): Unepected symbol type %d\n",
+ ELF_ST_TYPE(syms[i].st_info));
+ break;
}
+ }
- lookup[l].symName=NULL; /* Terminate the list */
+ lookup[l].symName = NULL; /* Terminate the list */
/*
* Remove the ELF symbols that will show up in every object module.
@@ -2436,8 +2636,10 @@ unsigned short **psecttable;
|| !strcmp(lookup[i].symName, ".bss")
|| !strcmp(lookup[i].symName, ".comment")
|| !strcmp(lookup[i].symName, ".note")
- ) {
- memmove(&(lookup[i]), &(lookup[i+1]), (l-- - i) * sizeof (LOOKUP));
+ ) {
+ memmove(&(lookup[i]), &(lookup[i + 1]), (l - i) * sizeof(LOOKUP));
+ memmove(&(secttable[i]), &(secttable[i + 1]),
+ (l-- - i) * sizeof(unsigned short));
}
}
return lookup;
@@ -2466,105 +2668,106 @@ unsigned short **psecttable;
* Do the work required to load each section into memory.
*/
static void
-ELFCollectSections(elffile,pass,totalsize,maxalign)
-ELFModulePtr elffile;
-int pass;
-int *totalsize;
-int *maxalign;
+ELFCollectSections(ELFModulePtr elffile, int pass, int *totalsize,
+ int *maxalign)
{
- int i;
+ int i;
int j;
+
/*
* Find and identify all of the Sections
*/
j = elffile->lsectidx;
- for( i=1; i<elffile->numsh; i++) {
+ for (i = 1; i < elffile->numsh; i++) {
int flags = 0;
char *name = ElfGetSectionName(elffile, elffile->sections[i].sh_name);
#if defined(__alpha__) || defined(__ia64__)
- if (!strcmp(name,".got") /*Isn't there a more generic way to do this?*/
+ if (!strcmp(name, ".got") /*Isn't there a more generic way to do this? */
# if defined(__ia64__)
- || !strcmp(name,".plt") || !strcmp(name, ".IA_64.unwind_info")
+ || !strcmp(name, ".plt") || !strcmp(name, ".IA_64.unwind_info")
# endif
- ) continue;
+ )
+ continue;
#endif
switch (SecType(i)) {
case SHT_STRTAB:
- if (!strcmp(name,".shstrtab")) /* already loaded */
+ if (!strcmp(name, ".shstrtab")) /* already loaded */
continue;
- if (!strcmp(name,".stabstr")) /* ignore debug info */
+ if (!strcmp(name, ".stabstr")) /* ignore debug info */
continue;
case SHT_SYMTAB:
- if (pass) continue;
+ if (pass)
+ continue;
flags = LOADED_SECTION;
flags |= RELOC_SECTION;
break;
case SHT_REL:
case SHT_RELA:
- if (pass) continue;
- if (! (SecFlags(SecInfo(i)) & SHF_ALLOC))
- continue;
+ if (pass)
+ continue;
+ if (!(SecFlags(SecInfo(i)) & SHF_ALLOC))
+ continue;
#ifdef __ia64__
if (SecType(SecInfo(i)) == SHT_IA_64_UNWIND)
- continue;
+ continue;
#endif
- flags = LOADED_SECTION;
- flags |= RELOC_SECTION;
- break;
+ flags = LOADED_SECTION;
+ flags |= RELOC_SECTION;
+ break;
case SHT_PROGBITS:
flags |= LOADED_SECTION;
case SHT_NOBITS:
- if (! (elffile->sections[i].sh_flags & SHF_ALLOC))
+ if (!(elffile->sections[i].sh_flags & SHF_ALLOC))
continue;
AdjustSize(i);
break;
default:
#ifdef ELFDEBUG
if (pass)
- ELFDEBUG("ELF: Not loading %s\n",name);
+ ELFDEBUG("ELF: Not loading %s\n", name);
#endif
continue;
}
-
+
elffile->lsection = xf86loaderrealloc(elffile->lsection,
- (j + 1) * sizeof (LoadSection));
+ (j + 1) * sizeof(LoadSection));
if (!(flags & RELOC_SECTION)) {
- if (flags & LOADED_SECTION) {
- elffile->lsection[j].saddr /* sect. contains data */
- = ELFLoaderSectToMem(elffile,SecAlign(i),SecOffset(i),
- SecSize(i), name);
+ if (flags & LOADED_SECTION) {
+ elffile->lsection[j].saddr /* sect. contains data */
+ = ELFLoaderSectToMem(elffile, SecAlign(i),
+ SecOffset(i), SecSize(i), name);
} else {
- if( SecSize(i) )
- elffile->lsection[j].saddr
- = ELFLoaderSectCalloc(elffile,SecAlign(i),
- SecSize(i));
- else
+ if (SecSize(i))
+ elffile->lsection[j].saddr
+ = ELFLoaderSectCalloc(elffile, SecAlign(i),
+ SecSize(i));
+ else
elffile->lsection[j].saddr = NULL;
}
} else {
elffile->lsection[j].saddr =
- (Elf_Sym *)_LoaderFileToMem(elffile->fd,SecOffset(i),
- SecSize(i),name);
+ (Elf_Sym *) _LoaderFileToMem(elffile->fd, SecOffset(i),
+ SecSize(i), name);
}
- elffile->saddr[i]=elffile->lsection[j].saddr;
+ elffile->saddr[i] = elffile->lsection[j].saddr;
#ifdef ELFDEBUG
- ELFDEBUG("%s starts at %lx size: %lx\n",
- name, elffile->saddr[i], SecSize(i));
-#endif
- elffile->lsection[j].name= name;
+ ELFDEBUG("%s starts at %p size: %lx\n",
+ name, elffile->saddr[i], (unsigned long)SecSize(i));
+#endif
+ elffile->lsection[j].name = name;
elffile->lsection[j].ndx = i;
- elffile->lsection[j].size=SecSize(i);
- elffile->lsection[j].flags=flags;
+ elffile->lsection[j].size = SecSize(i);
+ elffile->lsection[j].flags = flags;
switch (SecType(i)) {
#ifdef __OpenBSD__
case SHT_PROGBITS:
- mprotect(elffile->lsection[j].saddr, SecSize(i),
- PROT_READ|PROT_WRITE|PROT_EXEC);
+ mprotect(elffile->lsection[j].saddr, SecSize(i),
+ PROT_READ | PROT_WRITE | PROT_EXEC);
break;
#endif
case SHT_SYMTAB:
- elffile->symtab = (Elf_Sym *)elffile->saddr[i];
+ elffile->symtab = (Elf_Sym *) elffile->saddr[i];
elffile->symndx = i;
break;
case SHT_STRTAB:
@@ -2583,20 +2786,17 @@ int *maxalign;
* Public API for the ELF implementation of the loader.
*/
void *
-ELFLoadModule(modrec, elffd, ppLookup)
-loaderPtr modrec;
-int elffd;
-LOOKUP **ppLookup;
+ELFLoadModule(loaderPtr modrec, int elffd, LOOKUP **ppLookup)
{
ELFModulePtr elffile;
- Elf_Ehdr *header;
- ELFRelocPtr elf_reloc, tail;
- void *v;
+ Elf_Ehdr *header;
+ ELFRelocPtr elf_reloc, tail;
+ void *v;
LDRModulePtr elfmod;
- int totalsize, maxalign, i;
+ int totalsize, maxalign, i;
unsigned short *secttable;
- LOOKUP *pLookup;
-
+ LOOKUP *pLookup;
+
ldrCommons = 0;
nCommons = 0;
@@ -2604,72 +2804,77 @@ LOOKUP **ppLookup;
ELFDEBUG("Loading %s %s\n", modrec->name, modrec->cname);
#endif
if ((elffile = xf86loadercalloc(1, sizeof(ELFModuleRec))) == NULL) {
- ErrorF( "Unable to allocate ELFModuleRec\n" );
+ ErrorF("Unable to allocate ELFModuleRec\n");
return NULL;
}
- elffile->handle=modrec->handle;
- elffile->module=modrec->module;
- elffile->fd=elffd;
- v=elffile->funcs=modrec->funcs;
+ elffile->handle = modrec->handle;
+ elffile->module = modrec->module;
+ elffile->fd = elffd;
+ v = elffile->funcs = modrec->funcs;
/*
* Get the ELF header
*/
- elffile->header=
- (Elf_Ehdr*)_LoaderFileToMem(elffd, 0, sizeof(Elf_Ehdr), "header");
- header=(Elf_Ehdr *)elffile->header;
+ elffile->header =
+ (Elf_Ehdr *) _LoaderFileToMem(elffd, 0, sizeof(Elf_Ehdr),
+ "header");
+ header = (Elf_Ehdr *) elffile->header;
/*
* Get the section table
*/
- elffile->numsh=header->e_shnum;
- elffile->secsize=(header->e_shentsize * header->e_shnum);
- elffile->sections=
- (Elf_Shdr *)_LoaderFileToMem(elffd, header->e_shoff, elffile->secsize,
- "sections");
+ elffile->numsh = header->e_shnum;
+ elffile->secsize = (header->e_shentsize * header->e_shnum);
+ elffile->sections =
+ (Elf_Shdr *) _LoaderFileToMem(elffd, header->e_shoff,
+ elffile->secsize, "sections");
#if defined(__alpha__) || defined(__ia64__)
/*
* Need to allocate space for the .got section which will be
* fabricated later
*/
- elffile->gotndx=header->e_shnum;
+ elffile->gotndx = header->e_shnum;
header->e_shnum++;
# if defined(__ia64__)
- elffile->pltndx=header->e_shnum;
+ elffile->pltndx = header->e_shnum;
header->e_shnum++;
# endif
- elffile->numsh=header->e_shnum;
- elffile->secsize=(header->e_shentsize*header->e_shnum);
- elffile->sections=xf86loaderrealloc(elffile->sections,elffile->secsize);
-#endif /*defined(__alpha__) || defined(__ia64__)*/
- elffile->saddr=xf86loadercalloc(elffile->numsh, sizeof(unsigned char *));
+ elffile->numsh = header->e_shnum;
+ elffile->secsize = (header->e_shentsize * header->e_shnum);
+ elffile->sections =
+ xf86loaderrealloc(elffile->sections, elffile->secsize);
+#endif /*defined(__alpha__) || defined(__ia64__) */
+ elffile->saddr =
+ xf86loadercalloc(elffile->numsh, sizeof(unsigned char *));
#if defined(__alpha__) || defined(__ia64__)
/*
* Manually fill in the entry for the .got section so ELFCollectSections()
* will be able to find it.
*/
- elffile->sections[elffile->gotndx].sh_name=SecSize(header->e_shstrndx)+1;
- elffile->sections[elffile->gotndx].sh_type=SHT_PROGBITS;
- elffile->sections[elffile->gotndx].sh_flags=SHF_WRITE|SHF_ALLOC;
- elffile->sections[elffile->gotndx].sh_size=0;
- elffile->sections[elffile->gotndx].sh_addralign=8;
+ elffile->sections[elffile->gotndx].sh_name =
+ SecSize(header->e_shstrndx) + 1;
+ elffile->sections[elffile->gotndx].sh_type = SHT_PROGBITS;
+ elffile->sections[elffile->gotndx].sh_flags = SHF_WRITE | SHF_ALLOC;
+ elffile->sections[elffile->gotndx].sh_size = 0;
+ elffile->sections[elffile->gotndx].sh_addralign = 8;
/* Add room to copy ".got", and maintain alignment */
- SecSize(header->e_shstrndx)+=8;
+ SecSize(header->e_shstrndx) += 8;
#endif
#if defined(__ia64__)
/*
* Manually fill in the entry for the .plt section so ELFCollectSections()
* will be able to find it.
*/
- elffile->sections[elffile->pltndx].sh_name=SecSize(header->e_shstrndx)+1;
- elffile->sections[elffile->pltndx].sh_type=SHT_PROGBITS;
- elffile->sections[elffile->pltndx].sh_flags=SHF_EXECINSTR|SHF_ALLOC;
- elffile->sections[elffile->pltndx].sh_size=0;
- elffile->sections[elffile->pltndx].sh_addralign=32;
+ elffile->sections[elffile->pltndx].sh_name =
+ SecSize(header->e_shstrndx) + 1;
+ elffile->sections[elffile->pltndx].sh_type = SHT_PROGBITS;
+ elffile->sections[elffile->pltndx].sh_flags = SHF_EXECINSTR | SHF_ALLOC;
+ elffile->sections[elffile->pltndx].sh_size = 0;
+ elffile->sections[elffile->pltndx].sh_addralign = 32;
/* Add room to copy ".plt", and maintain alignment */
- SecSize(header->e_shstrndx)+=32;
+ SecSize(header->e_shstrndx) += 32;
#endif
/*
@@ -2677,22 +2882,22 @@ LOOKUP **ppLookup;
*/
elffile->shstrsize = SecSize(header->e_shstrndx);
elffile->shstraddr =
- _LoaderFileToMem(elffd, SecOffset(header->e_shstrndx),
- SecSize(header->e_shstrndx), ".shstrtab");
+ _LoaderFileToMem(elffd, SecOffset(header->e_shstrndx),
+ SecSize(header->e_shstrndx), ".shstrtab");
elffile->shstrndx = header->e_shstrndx;
#if defined(__alpha__) || defined(__ia64__)
/*
* Add the string for the .got section
*/
- strcpy((char*)(elffile->shstraddr+elffile->sections[elffile->gotndx].sh_name),
- ".got");
+ strcpy((char *)(elffile->shstraddr +
+ elffile->sections[elffile->gotndx].sh_name), ".got");
#endif
#if defined(__ia64__)
/*
* Add the string for the .plt section
*/
- strcpy((char*)(elffile->shstraddr+elffile->sections[elffile->pltndx].sh_name),
- ".plt");
+ strcpy((char *)(elffile->shstraddr +
+ elffile->sections[elffile->pltndx].sh_name), ".plt");
#endif
/*
@@ -2701,12 +2906,12 @@ LOOKUP **ppLookup;
totalsize = 0;
maxalign = 0;
ELFCollectSections(elffile, 0, &totalsize, &maxalign);
- if( elffile->straddr == NULL || elffile->strsize == 0 ) {
+ if (elffile->straddr == NULL || elffile->strsize == 0) {
#if 0
ErrorF("No symbols found in this module\n");
#endif
ELFUnloadModule(elffile);
- return (void *) -1L;
+ return (void *)-1L;
}
/*
* add symbols
@@ -2724,10 +2929,9 @@ LOOKUP **ppLookup;
default:
continue;
}
- elf_reloc = ELFCollectRelocations(elffile,elffile->lsection[i].ndx);
+ elf_reloc = ELFCollectRelocations(elffile, elffile->lsection[i].ndx);
if (elf_reloc) {
- for (tail = elf_reloc; tail->next; tail = tail->next)
- ;
+ for (tail = elf_reloc; tail->next; tail = tail->next) ;
tail->next = _LoaderGetRelocations(v)->elf_reloc;
_LoaderGetRelocations(v)->elf_reloc = elf_reloc;
}
@@ -2747,11 +2951,11 @@ LOOKUP **ppLookup;
#ifdef MergeSectionAlloc
elffile->basesize = totalsize + maxalign;
-
+
# if !defined(DoMMAPedMerge)
elffile->base = xf86loadermalloc(elffile->basesize);
if (elffile->base == NULL) {
- ErrorF( "Unable to allocate ELF sections\n" );
+ ErrorF("Unable to allocate ELF sections\n");
return NULL;
}
# if defined(linux) && defined(__ia64__) || defined(__OpenBSD__)
@@ -2759,25 +2963,28 @@ LOOKUP **ppLookup;
unsigned long page_size = getpagesize();
unsigned long round;
- round = (unsigned long)elffile->base & (page_size-1);
- mprotect(elffile->base - round, (elffile->basesize+round+page_size-1) & ~(page_size-1),
- PROT_READ|PROT_WRITE|PROT_EXEC);
+ round = (unsigned long)elffile->base & (page_size - 1);
+ mprotect(elffile->base - round,
+ (elffile->basesize + round + page_size - 1) & ~(page_size -
+ 1),
+ PROT_READ | PROT_WRITE | PROT_EXEC);
}
# endif
-# else
+# else
MMAP_ALIGN(elffile->basesize);
- elffile->base = mmap( 0,elffile->basesize,MMAP_PROT,MMAP_FLAGS,-1,
- (off_t)0);
+ elffile->base = mmap(0, elffile->basesize, MMAP_PROT, MMAP_FLAGS, -1,
+ (off_t) 0);
if (elffile->base == NULL) {
- ErrorF( "Unable to mmap ELF sections\n" );
+ ErrorF("Unable to mmap ELF sections\n");
return NULL;
}
# endif
- elffile->baseptr = ((long)elffile->base + (maxalign - 1)) & ~(maxalign - 1);
+ elffile->baseptr =
+ ((long)elffile->base + (maxalign - 1)) & ~(maxalign - 1);
#endif
#if defined(__alpha__) || defined(__ia64__)
- if (! ELFCreateGOT(elffile, maxalign))
+ if (!ELFCreateGOT(elffile, maxalign))
return NULL;
#endif
#if defined(__ia64__)
@@ -2788,10 +2995,12 @@ LOOKUP **ppLookup;
for (i = 0; pLookup[i].symName; i++)
if (secttable[i]) {
- pLookup[i].offset = (funcptr)((long)pLookup[i].offset + (long)elffile->saddr[secttable[i]]);
+ pLookup[i].offset =
+ (funcptr) ((long)pLookup[i].offset +
+ (long)elffile->saddr[secttable[i]]);
#ifdef ELFDEBUG
- ELFDEBUG("Finalizing symbol %lx %s\n",
- pLookup[i].offset, pLookup[i].symName);
+ ELFDEBUG("Finalizing symbol %p %s\n",
+ (void *)pLookup[i].offset, pLookup[i].symName);
#endif
}
xf86loaderfree(secttable);
@@ -2800,24 +3009,25 @@ LOOKUP **ppLookup;
ELFCreateOPD(elffile);
#endif
- if (! ElfCreateCOMMON(elffile, *ppLookup))
+ if (!ElfCreateCOMMON(elffile, *ppLookup))
return NULL;
/* Record info for gdb - if we can't allocate the loader record fail
- silently (the user will find out soon enough that there's no VM left */
+ * silently (the user will find out soon enough that there's no VM left */
if ((elfmod = xf86loadercalloc(1, sizeof(LDRModuleRec))) != NULL) {
elfmod->name = strdup(modrec->name);
elfmod->namelen = strlen(modrec->name);
elfmod->version = 1;
- for (i=0; i < elffile->lsectidx;i++) {
+ for (i = 0; i < elffile->lsectidx; i++) {
char *name = elffile->lsection[i].name;
- if (!strcmp(name,".text"))
+
+ if (!strcmp(name, ".text"))
elfmod->text = elffile->lsection[i].saddr;
- else if (!strcmp(name,".data"))
+ else if (!strcmp(name, ".data"))
elfmod->data = elffile->lsection[i].saddr;
- else if (!strcmp(name,".rodata"))
+ else if (!strcmp(name, ".rodata"))
elfmod->rodata = elffile->lsection[i].saddr;
- else if (!strcmp(name,".bss"))
+ else if (!strcmp(name, ".bss"))
elfmod->bss = elffile->lsection[i].saddr;
}
elfmod->next = ModList;
@@ -2833,8 +3043,7 @@ LOOKUP **ppLookup;
}
void
-ELFResolveSymbols(mod)
-void *mod;
+ELFResolveSymbols(void *mod)
{
ELFRelocPtr newlist, p, tmp;
@@ -2842,10 +3051,12 @@ void *mod;
* which we failed to relocate. Destroy the old list in the process.
*/
newlist = 0;
- for (p = _LoaderGetRelocations(mod)->elf_reloc; p; ) {
+ for (p = _LoaderGetRelocations(mod)->elf_reloc; p;) {
#ifdef ELFDEBUG
- ErrorF("ResolveSymbols: file %lx, sec %d, r_offset 0x%x, r_info 0x%lx\n",
- p->file, p->secn, p->rel->r_offset, p->rel->r_info);
+ ELFDEBUG("ResolveSymbols: "
+ "file %p, sec %d, r_offset 0x%x, r_info 0x%p\n",
+ (void *)p->file, p->secn, p->rel->r_offset,
+ (void *)p->rel->r_info);
#endif
tmp = Elf_RelocateEntry(p->file, p->secn, p->rel, FALSE);
if (tmp) {
@@ -2857,57 +3068,56 @@ void *mod;
p = p->next;
xf86loaderfree(tmp);
}
- _LoaderGetRelocations(mod)->elf_reloc=newlist;
+ _LoaderGetRelocations(mod)->elf_reloc = newlist;
}
int
-ELFCheckForUnresolved(mod)
-void *mod;
+ELFCheckForUnresolved(void *mod)
{
- ELFRelocPtr erel;
- char *name;
- int flag, fatalsym=0;
+ ELFRelocPtr erel;
+ char *name;
+ int flag, fatalsym = 0;
if ((erel = _LoaderGetRelocations(mod)->elf_reloc) == NULL)
return 0;
- while( erel ) {
+ while (erel) {
Elf_RelocateEntry(erel->file, erel->secn, erel->rel, TRUE);
name = ElfGetSymbolName(erel->file, ELF_R_SYM(erel->rel->r_info));
- flag = _LoaderHandleUnresolved(
- name, _LoaderHandleToName(erel->file->handle));
- if(flag) fatalsym = 1;
- erel=erel->next;
+ flag = _LoaderHandleUnresolved(name,
+ _LoaderHandleToName(erel->file->
+ handle));
+ if (flag)
+ fatalsym = 1;
+ erel = erel->next;
}
return fatalsym;
}
void
-ELFUnloadModule(modptr)
-void *modptr;
+ELFUnloadModule(void *modptr)
{
- ELFModulePtr elffile = (ELFModulePtr)modptr;
- ELFRelocPtr relptr, reltptr, *brelptr;
+ ELFModulePtr elffile = (ELFModulePtr) modptr;
+ ELFRelocPtr relptr, reltptr, *brelptr;
int i;
-
+
/*
* Delete any unresolved relocations
*/
- relptr=_LoaderGetRelocations(elffile->funcs)->elf_reloc;
- brelptr=&(_LoaderGetRelocations(elffile->funcs)->elf_reloc);
+ relptr = _LoaderGetRelocations(elffile->funcs)->elf_reloc;
+ brelptr = &(_LoaderGetRelocations(elffile->funcs)->elf_reloc);
- while(relptr) {
- if( relptr->file == elffile ) {
- *brelptr=relptr->next; /* take it out of the list */
- reltptr=relptr; /* save pointer to this node */
- relptr=relptr->next; /* advance the pointer */
- xf86loaderfree(reltptr); /* free the node */
+ while (relptr) {
+ if (relptr->file == elffile) {
+ *brelptr = relptr->next; /* take it out of the list */
+ reltptr = relptr; /* save pointer to this node */
+ relptr = relptr->next; /* advance the pointer */
+ xf86loaderfree(reltptr); /* free the node */
+ } else {
+ brelptr = &(relptr->next);
+ relptr = relptr->next; /* advance the pointer */
}
- else {
- brelptr=&(relptr->next);
- relptr=relptr->next; /* advance the pointer */
- }
}
/*
@@ -2921,18 +3131,19 @@ void *modptr;
*/
#if !defined (DoMMAPedMerge)
# define CheckandFree(ptr,size) if(ptr) xf86loaderfree(ptr)
-#else
+#else
# define CheckandFree(ptr,size) if (ptr) munmap(ptr,size)
#endif
#define CheckandFreeFile(ptr,size) if(ptr) _LoaderFreeFileMem((ptr),(size))
#ifdef MergeSectionAlloc
- CheckandFree(elffile->base,elffile->basesize);
+ CheckandFree(elffile->base, elffile->basesize);
# if defined(__alpha__) || defined(__ia64__)
if (elffile->shared_got) {
elffile->shared_got->nuses--;
if (!elffile->shared_got->nuses) {
ELFGotPtr *pgot = &ELFSharedGOTs;
+
while (*pgot && *pgot != elffile->shared_got)
pgot = &(*pgot)->next;
if (*pgot)
@@ -2941,19 +3152,20 @@ void *modptr;
}
}
# endif
-#else /*MergeSectionAlloc*/
- CheckandFree(elffile->common,elffile->comsize);
+#else /*MergeSectionAlloc */
+ CheckandFree(elffile->common, elffile->comsize);
# if defined(__alpha__) || defined(__ia64__)
- CheckandFree(elffile->got,elffile->gotsize);
+ CheckandFree(elffile->got, elffile->gotsize);
# endif
# if defined(__ia64__)
- CheckandFree(elffile->plt,elffile->pltsize);
+ CheckandFree(elffile->plt, elffile->pltsize);
# endif
#endif
#if defined(__alpha__) || defined(__ia64__)
{
ELFGotEntryPtr gotent;
- while((gotent = elffile->got_entries)) {
+
+ while ((gotent = elffile->got_entries)) {
elffile->got_entries = gotent->next;
xf86loaderfree(gotent);
}
@@ -2962,6 +3174,7 @@ void *modptr;
#if defined(__ia64__)
{
ELFPltEntryPtr pltent;
+
while ((pltent = elffile->plt_entries)) {
elffile->plt_entries = pltent->next;
xf86loaderfree(pltent);
@@ -2969,6 +3182,7 @@ void *modptr;
}
{
ELFOpdPtr opdent;
+
while ((opdent = elffile->opd_entries)) {
elffile->opd_entries = opdent->next;
xf86loaderfree(opdent);
@@ -2994,12 +3208,11 @@ void *modptr;
/*
* Free the section table, section pointer array, and section names
*/
- _LoaderFreeFileMem(elffile->sections,elffile->secsize);
+ _LoaderFreeFileMem(elffile->sections, elffile->secsize);
xf86loaderfree(elffile->saddr);
- _LoaderFreeFileMem(elffile->header,sizeof(Elf_Ehdr));
- _LoaderFreeFileMem(elffile->shstraddr,elffile->shstrsize);
-
-
+ _LoaderFreeFileMem(elffile->header, sizeof(Elf_Ehdr));
+ _LoaderFreeFileMem(elffile->shstraddr, elffile->shstrsize);
+
/*
* Free the ELFModuleRec
*/
@@ -3011,14 +3224,14 @@ void *modptr;
char *
ELFAddressToSection(void *modptr, unsigned long address)
{
- ELFModulePtr elffile = (ELFModulePtr)modptr;
+ ELFModulePtr elffile = (ELFModulePtr) modptr;
int i;
- for( i=1; i<elffile->numsh; i++) {
- if( address >= (unsigned long)elffile->saddr[i] &&
- address <= (unsigned long)elffile->saddr[i]+SecSize(i) ) {
- return ElfGetSectionName(elffile, elffile->sections[i].sh_name);
- }
+ for (i = 1; i < elffile->numsh; i++) {
+ if (address >= (unsigned long)elffile->saddr[i] &&
+ address <= (unsigned long)elffile->saddr[i] + SecSize(i)) {
+ return ElfGetSectionName(elffile, elffile->sections[i].sh_name);
}
+ }
return NULL;
}
diff --git a/hw/xfree86/loader/elfloader.h b/hw/xfree86/loader/elfloader.h
index cbd5f118a..e4693411b 100644
--- a/hw/xfree86/loader/elfloader.h
+++ b/hw/xfree86/loader/elfloader.h
@@ -21,7 +21,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elfloader.h,v 1.3 1998/09/20 14:41:05 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elfloader.h,v 1.4 2003/10/15 16:29:03 dawes Exp $ */
#ifndef _ELFLOADER_H
#define _ELFLOADER_H
@@ -29,6 +29,6 @@
extern void *ELFLoadModule(loaderPtr, int, LOOKUP **);
extern void ELFResolveSymbols(void *);
extern int ELFCheckForUnresolved(void *);
-extern char *ELFAddressToSection(void *,unsigned long);
+extern char *ELFAddressToSection(void *, unsigned long);
extern void ELFUnloadModule(void *);
#endif /* _ELFLOADER_h */
diff --git a/hw/xfree86/loader/extsym.c b/hw/xfree86/loader/extsym.c
index 62a5ea98a..8da5089bc 100644
--- a/hw/xfree86/loader/extsym.c
+++ b/hw/xfree86/loader/extsym.c
@@ -1,8 +1,8 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.6 2001/11/17 16:05:59 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/extsym.c,v 1.9 2003/10/15 16:29:03 dawes Exp $ */
/*
*
- * Copyright 1999 by The XFree86 Project, Inc.
+ * Copyright 1999-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
@@ -42,38 +42,39 @@ extern RESTYPE ShmSegType, ShmPixType;
extern Bool noPanoramiXExtension;
extern int PanoramiXNumScreens;
extern PanoramiXData *panoramiXdataPtr;
+extern XID *PanoramiXVisualTable;
extern unsigned long XRT_WINDOW;
extern unsigned long XRT_PIXMAP;
extern unsigned long XRT_GC;
extern unsigned long XRT_COLORMAP;
extern unsigned long XRC_DRAWABLE;
-extern Bool XineramaRegisterConnectionBlockCallback(void (*func)(void));
+extern Bool XineramaRegisterConnectionBlockCallback(void (*func) (void));
extern int XineramaDeleteResource(pointer, XID);
#endif
LOOKUP extLookupTab[] = {
- SYMFUNC(ClientSleepUntil)
+ SYMFUNC(ClientSleepUntil)
#ifdef HAS_SHM
- SYMVAR(ShmCompletionCode)
- SYMVAR(BadShmSegCode)
- SYMVAR(ShmSegType)
+ SYMVAR(ShmCompletionCode)
+ SYMVAR(BadShmSegCode)
+ SYMVAR(ShmSegType)
#endif
#ifdef PANORAMIX
- SYMFUNC(XineramaRegisterConnectionBlockCallback)
- SYMFUNC(XineramaDeleteResource)
- SYMVAR(noPanoramiXExtension)
- SYMVAR(PanoramiXNumScreens)
- SYMVAR(panoramiXdataPtr)
- SYMVAR(XRT_WINDOW)
- SYMVAR(XRT_PIXMAP)
- SYMVAR(XRT_GC)
- SYMVAR(XRT_COLORMAP)
- SYMVAR(XRC_DRAWABLE)
+ SYMFUNC(XineramaRegisterConnectionBlockCallback)
+ SYMFUNC(XineramaDeleteResource)
+ SYMVAR(noPanoramiXExtension)
+ SYMVAR(PanoramiXNumScreens)
+ SYMVAR(panoramiXdataPtr)
+ SYMVAR(PanoramiXVisualTable)
+ SYMVAR(XRT_WINDOW)
+ SYMVAR(XRT_PIXMAP)
+ SYMVAR(XRT_GC)
+ SYMVAR(XRT_COLORMAP)
+ SYMVAR(XRC_DRAWABLE)
#endif
- { 0, 0 },
-
+ {0, 0}
};
diff --git a/hw/xfree86/loader/fontsym.c b/hw/xfree86/loader/fontsym.c
index 50def63ea..d91a2e216 100644
--- a/hw/xfree86/loader/fontsym.c
+++ b/hw/xfree86/loader/fontsym.c
@@ -1,4 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/fontsym.c,v 1.11 2002/12/09 17:30:12 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/fontsym.c,v 1.13 2003/10/15 16:29:04 dawes Exp $ */
+/*
+ * Copyright (c) 1998-2002 by The XFree86 Project, 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 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).
+ */
#include "font.h"
#include "sym.h"
@@ -16,64 +42,63 @@
LOOKUP fontLookupTab[] = {
- SYMFUNC(TwoByteSwap)
- SYMFUNC(FourByteSwap)
- SYMFUNC(FontCouldBeTerminal)
- SYMFUNC(BufFileRead)
- SYMFUNC(BufFileWrite)
- SYMFUNC(CheckFSFormat)
- SYMFUNC(FontFileOpen)
- SYMFUNC(FontFilePriorityRegisterRenderer)
- SYMFUNC(FontFileRegisterRenderer)
- SYMFUNC(FontParseXLFDName)
- SYMFUNC(FontFileCloseFont)
- SYMFUNC(FontFileOpenBitmap)
- SYMFUNC(FontFileCompleteXLFD)
- SYMFUNC(FontFileCountDashes)
- SYMFUNC(FontFileFindNameInDir)
- SYMFUNC(FontFileClose)
- SYMFUNC(FontComputeInfoAccelerators)
- SYMFUNC(FontDefaultFormat)
- SYMFUNC(NameForAtom)
- SYMFUNC(BitOrderInvert)
- SYMFUNC(FontFileMatchRenderer)
- SYMFUNC(RepadBitmap)
- SYMFUNC(FontEncName)
- SYMFUNC(FontEncRecode)
- SYMFUNC(FontEncFind)
- SYMFUNC(FontMapFind)
- SYMFUNC(FontEncMapFind)
- SYMFUNC(FontEncFromXLFD)
- SYMFUNC(FontEncDirectory)
- SYMFUNC(FontMapReverse)
- SYMFUNC(FontMapReverseFree)
- SYMFUNC(CreateFontRec)
- SYMFUNC(DestroyFontRec)
- SYMFUNC(GetGlyphs)
- SYMFUNC(QueryGlyphExtents)
-
- SYMVAR(FontFileBitmapSources)
+ SYMFUNC(TwoByteSwap)
+ SYMFUNC(FourByteSwap)
+ SYMFUNC(FontCouldBeTerminal)
+ SYMFUNC(BufFileRead)
+ SYMFUNC(BufFileWrite)
+ SYMFUNC(CheckFSFormat)
+ SYMFUNC(FontFileOpen)
+ SYMFUNC(FontFilePriorityRegisterRenderer)
+ SYMFUNC(FontFileRegisterRenderer)
+ SYMFUNC(FontParseXLFDName)
+ SYMFUNC(FontFileCloseFont)
+ SYMFUNC(FontFileOpenBitmap)
+ SYMFUNC(FontFileCompleteXLFD)
+ SYMFUNC(FontFileCountDashes)
+ SYMFUNC(FontFileFindNameInDir)
+ SYMFUNC(FontFileClose)
+ SYMFUNC(FontComputeInfoAccelerators)
+ SYMFUNC(FontDefaultFormat)
+ SYMFUNC(NameForAtom)
+ SYMFUNC(BitOrderInvert)
+ SYMFUNC(FontFileMatchRenderer)
+ SYMFUNC(RepadBitmap)
+ SYMFUNC(FontEncName)
+ SYMFUNC(FontEncRecode)
+ SYMFUNC(FontEncFind)
+ SYMFUNC(FontMapFind)
+ SYMFUNC(FontEncMapFind)
+ SYMFUNC(FontEncFromXLFD)
+ SYMFUNC(FontEncDirectory)
+ SYMFUNC(FontMapReverse)
+ SYMFUNC(FontMapReverseFree)
+ SYMFUNC(CreateFontRec)
+ SYMFUNC(DestroyFontRec)
+ SYMFUNC(GetGlyphs)
+ SYMFUNC(QueryGlyphExtents)
+
+ SYMVAR(FontFileBitmapSources)
#ifdef FONTENC_COMPATIBILITY
- /* Obsolete backwards compatibility symbols -- fontencc.c */
- SYMFUNC(font_encoding_from_xlfd)
- SYMFUNC(font_encoding_find)
- SYMFUNC(font_encoding_recode)
- SYMFUNC(font_encoding_name)
- SYMFUNC(identifyEncodingFile)
+ /* Obsolete backwards compatibility symbols -- fontencc.c */
+ SYMFUNC(font_encoding_from_xlfd)
+ SYMFUNC(font_encoding_find)
+ SYMFUNC(font_encoding_recode)
+ SYMFUNC(font_encoding_name)
+ SYMFUNC(identifyEncodingFile)
#endif
- /* fontcache.c */
- SYMFUNC(FontCacheGetSettings)
- SYMFUNC(FontCacheGetStatistics)
- SYMFUNC(FontCacheChangeSettings)
- SYMFUNC(FontCacheOpenCache)
- SYMFUNC(FontCacheCloseCache)
- SYMFUNC(FontCacheSearchEntry)
- SYMFUNC(FontCacheGetEntry)
- SYMFUNC(FontCacheInsertEntry)
- SYMFUNC(FontCacheGetBitmap)
-
- { 0, 0 },
+ /* fontcache.c */
+ SYMFUNC(FontCacheGetSettings)
+ SYMFUNC(FontCacheGetStatistics)
+ SYMFUNC(FontCacheChangeSettings)
+ SYMFUNC(FontCacheOpenCache)
+ SYMFUNC(FontCacheCloseCache)
+ SYMFUNC(FontCacheSearchEntry)
+ SYMFUNC(FontCacheGetEntry)
+ SYMFUNC(FontCacheInsertEntry)
+ SYMFUNC(FontCacheGetBitmap)
+ {0, 0}
};
diff --git a/hw/xfree86/loader/hash.c b/hw/xfree86/loader/hash.c
index 22996f217..f8ddd45a4 100644
--- a/hw/xfree86/loader/hash.c
+++ b/hw/xfree86/loader/hash.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/hash.c,v 1.19 2001/07/25 15:05:07 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/hash.c,v 1.24 2003/11/17 22:20:40 dawes Exp $ */
/*
*
@@ -42,58 +42,54 @@
/* Prototypes for static functions. */
static unsigned int hashFunc(const char *);
static itemPtr LoaderHashFindNearest(
-#if NeedFunctionPrototypes
-unsigned long
-#endif
-);
+ unsigned long
+ );
-static itemPtr LoaderhashTable[ HASHSIZE ] ;
+static itemPtr LoaderhashTable[HASHSIZE];
#ifdef DEBUG
-static int hashhits[ HASHSIZE ] ;
+static int hashhits[HASHSIZE];
void
DumpHashHits(void)
{
- int i;
- int depth=0;
- int dev=0;
+ int i;
+ int depth = 0;
+ int dev = 0;
- for(i=0;i<HASHSIZE;i++) {
- ErrorF("hashhits[%d]=%d\n", i, hashhits[i] );
+ for (i = 0; i < HASHSIZE; i++) {
+ ErrorF("hashhits[%d]=%d\n", i, hashhits[i]);
depth += hashhits[i];
}
depth /= HASHSIZE;
- ErrorF("Average hash depth=%d\n", depth );
+ ErrorF("Average hash depth=%d\n", depth);
- for(i=0;i<HASHSIZE;i++) {
- if( hashhits[i] < depth )
- dev += depth-hashhits[i];
+ for (i = 0; i < HASHSIZE; i++) {
+ if (hashhits[i] < depth)
+ dev += depth - hashhits[i];
else
- dev += hashhits[i]-depth;
+ dev += hashhits[i] - depth;
}
- dev /=HASHSIZE;
- ErrorF("Average hash deviation=%d\n", dev );
+ dev /= HASHSIZE;
+ ErrorF("Average hash deviation=%d\n", dev);
}
#endif
-
static unsigned int
-hashFunc(string)
-const char *string;
+hashFunc(const char *string)
{
- int i=0;
+ int i = 0;
- while ( i < 10 && string[i] )
- i ++ ;
+ while (i < 10 && string[i])
+ i++;
- if ( i < 5 ) {
+ if (i < 5) {
#ifdef DEBUG
hashhits[i]++;
#endif
- return i ;
+ return i;
}
/*
@@ -111,29 +107,25 @@ const char *string;
}
void
-LoaderHashAdd( entry )
- itemPtr entry ;
+LoaderHashAdd(itemPtr entry)
{
- int bucket = hashFunc( entry->name ) ;
- itemPtr oentry;
+ int bucket = hashFunc(entry->name);
+ itemPtr oentry;
- if ((oentry = LoaderHashFind(entry->name)) != NULL)
+ if ((oentry = LoaderHashFind(entry->name)) != NULL)
LoaderDuplicateSymbol(entry->name, oentry->handle);
- entry->next = LoaderhashTable[ bucket ] ;
- LoaderhashTable[ bucket ] = entry ;
- return;
+ entry->next = LoaderhashTable[bucket];
+ LoaderhashTable[bucket] = entry;
+ return;
}
void
-LoaderAddSymbols(handle, module, list)
-int handle;
-int module;
-LOOKUP *list ;
+LoaderAddSymbols(int handle, int module, LOOKUP *list)
{
- LOOKUP *l = list, *exports = NULL;
- itemPtr i, exportsItem = NULL;
- char *modname;
+ LOOKUP *l = list, *exports = NULL;
+ itemPtr i, exportsItem = NULL;
+ char *modname;
if (!list)
return;
@@ -148,7 +140,7 @@ LOOKUP *list ;
char *exportname;
exportname = xf86loadermalloc(strlen("ExportedSymbols") +
- strlen(modname) + 1);
+ strlen(modname) + 1);
if (exportname) {
sprintf(exportname, "%sExportedSymbols", modname);
while (l->symName) {
@@ -160,6 +152,7 @@ LOOKUP *list ;
}
l++;
}
+ xf86loaderfree(exportname);
}
}
@@ -167,13 +160,13 @@ LOOKUP *list ;
* Allocate the exports list item first.
*/
if (exports) {
- exportsItem = xf86loadermalloc( sizeof( itemRec )) ;
- exportsItem->name = exports->symName ;
- exportsItem->address = (char *) exports->offset ;
- exportsItem->handle = handle ;
- exportsItem->module = module ;
+ exportsItem = xf86loadermalloc(sizeof(itemRec));
+ exportsItem->name = exports->symName;
+ exportsItem->address = (char *)exports->offset;
+ exportsItem->handle = handle;
+ exportsItem->module = module;
exportsItem->exports = NULL;
- LoaderHashAdd( exportsItem );
+ LoaderHashAdd(exportsItem);
}
/*
@@ -181,107 +174,106 @@ LOOKUP *list ;
* reference to the export list, if present.
*/
l = list;
- while ( l->symName ) {
+ while (l->symName) {
if (l != exports) {
- i = xf86loadermalloc( sizeof( itemRec )) ;
- i->name = l->symName ;
- i->address = (char *) l->offset ;
- i->handle = handle ;
- i->module = module ;
+ i = xf86loadermalloc(sizeof(itemRec));
+ i->name = l->symName;
+ i->address = (char *)l->offset;
+ i->handle = handle;
+ i->module = module;
i->exports = exportsItem;
- LoaderHashAdd( i );
+ LoaderHashAdd(i);
}
- l ++ ;
+ l++;
}
}
itemPtr
-LoaderHashDelete(string)
-const char *string;
+LoaderHashDelete(const char *string)
{
- int bucket = hashFunc( string ) ;
- itemPtr entry;
- itemPtr *entry2;
-
- entry = LoaderhashTable[ bucket ] ;
- entry2= &(LoaderhashTable[ bucket ]);
- while ( entry ) {
- if (! strcmp( entry->name, string )) {
- *entry2=entry->next;
- xf86loaderfree(entry->name);
- xf86loaderfree( entry ) ;
- return 0 ;
+ int bucket = hashFunc(string);
+ itemPtr entry;
+ itemPtr *entry2;
+
+ entry = LoaderhashTable[bucket];
+ entry2 = &(LoaderhashTable[bucket]);
+ while (entry) {
+ if (!strcmp(entry->name, string)) {
+ *entry2 = entry->next;
+ xf86loaderfree(entry->name);
+ xf86loaderfree(entry);
+ return 0;
+ }
+ entry2 = &(entry->next);
+ entry = entry->next;
}
- entry2 = &(entry->next) ;
- entry = entry->next ;
- }
- return 0 ;
+ return 0;
}
itemPtr
-LoaderHashFind(string)
-const char *string;
+LoaderHashFind(const char *string)
{
- int bucket = hashFunc( string ) ;
- itemPtr entry ;
- entry = LoaderhashTable[ bucket ] ;
- while ( entry ) {
- if (!strcmp(entry->name, string)) {
- return entry;
- }
- entry = entry->next;
+ int bucket = hashFunc(string);
+ itemPtr entry;
+
+ entry = LoaderhashTable[bucket];
+ while (entry) {
+ if (!strcmp(entry->name, string)) {
+ return entry;
}
+ entry = entry->next;
+ }
return 0;
}
static itemPtr
-LoaderHashFindNearest(address)
-unsigned long address;
+LoaderHashFindNearest(unsigned long address)
{
- int i ;
- itemPtr entry, best_entry = 0 ;
- long best_difference = MAXINT;
-
- for ( i = 0 ; i < HASHSIZE ; i ++ ) {
- entry = LoaderhashTable[ i ] ;
- while ( entry ) {
- long difference = (long) address - (long) entry->address ;
- if ( difference >= 0 ) {
- if ( best_entry ) {
- if ( difference < best_difference ) {
- best_entry = entry ;
- best_difference = difference ;
- }
- }
- else {
- best_entry = entry ;
- best_difference = difference ;
+ int i;
+ itemPtr entry, best_entry = 0;
+ long best_difference = MAXINT;
+
+ for (i = 0; i < HASHSIZE; i++) {
+ entry = LoaderhashTable[i];
+ while (entry) {
+ long difference = (long)address - (long)entry->address;
+
+ if (difference >= 0) {
+ if (best_entry) {
+ if (difference < best_difference) {
+ best_entry = entry;
+ best_difference = difference;
+ }
+ } else {
+ best_entry = entry;
+ best_difference = difference;
+ }
+ }
+ entry = entry->next;
}
- }
- entry = entry->next ;
}
- }
- return best_entry ;
+ return best_entry;
}
void
-LoaderPrintSymbol(address)
-unsigned long address;
+LoaderPrintSymbol(unsigned long address)
{
- itemPtr entry;
- entry=LoaderHashFindNearest(address);
+ itemPtr entry;
+
+ entry = LoaderHashFindNearest(address);
if (entry) {
const char *module, *section;
+
#if defined(__alpha__) || defined(__ia64__)
- ErrorF("0x%016lx %s+%lx\n", entry->address, entry->name,
- address - (unsigned long) entry->address);
+ ErrorF("0x%016lx %s+%lx\n", (unsigned long)entry->address,
+ entry->name, address - (unsigned long)entry->address);
#else
- ErrorF("0x%x %s+%x\n", entry->address, entry->name,
- address - (unsigned long) entry->address);
+ ErrorF("0x%lx %s+%lx\n", (unsigned long)entry->address, entry->name,
+ address - (unsigned long)entry->address);
#endif
- if ( _LoaderAddressToSection(address, &module, &section) )
- ErrorF("\tModule \"%s\"\n\tSection \"%s\"\n",module, section );
+ if (_LoaderAddressToSection(address, &module, &section))
+ ErrorF("\tModule \"%s\"\n\tSection \"%s\"\n", module, section);
} else {
ErrorF("(null)\n");
}
@@ -292,73 +284,70 @@ LoaderPrintItem(itemPtr pItem)
{
if (pItem) {
const char *module, *section;
+
#if defined(__alpha__) || defined(__ia64__)
- ErrorF("0x%016lx %s\n", pItem->address, pItem->name);
+ ErrorF("0x%016lx %s\n", (unsigned long)pItem->address, pItem->name);
#else
- ErrorF("0x%lx %s\n", pItem->address, pItem->name);
+ ErrorF("0x%lx %s\n", (unsigned long)pItem->address, pItem->name);
#endif
- if ( _LoaderAddressToSection((unsigned long)pItem->address,
- &module, &section) )
- ErrorF("\tModule \"%s\"\n\tSection \"%s\"\n",module, section );
+ if (_LoaderAddressToSection((unsigned long)pItem->address,
+ &module, &section))
+ ErrorF("\tModule \"%s\"\n\tSection \"%s\"\n", module, section);
} else
ErrorF("(null)\n");
}
-
+
void
-LoaderPrintAddress(symbol)
-const char *symbol;
+LoaderPrintAddress(const char *symbol)
{
- itemPtr entry;
+ itemPtr entry;
+
entry = LoaderHashFind(symbol);
LoaderPrintItem(entry);
}
void
-LoaderHashTraverse(card, fnp)
- void *card;
- int (*fnp)(void *, itemPtr);
+LoaderHashTraverse(void *card, int (*fnp)(void *, itemPtr))
{
- int i ;
- itemPtr entry, last_entry = 0 ;
-
- for ( i = 0 ; i < HASHSIZE ; i ++ ) {
- last_entry = 0 ;
- entry = LoaderhashTable[ i ] ;
- while ( entry ) {
- if (( * fnp )( card, entry )) {
- if ( last_entry ) {
- last_entry->next = entry->next ;
- xf86loaderfree( entry->name ) ;
- xf86loaderfree( entry ) ;
- entry = last_entry->next ;
- }
- else {
- LoaderhashTable[ i ] = entry->next ;
- xf86loaderfree( entry->name ) ;
- xf86loaderfree( entry ) ;
- entry = LoaderhashTable[ i ] ;
+ int i;
+ itemPtr entry, last_entry = 0;
+
+ for (i = 0; i < HASHSIZE; i++) {
+ last_entry = 0;
+ entry = LoaderhashTable[i];
+ while (entry) {
+ if ((*fnp) (card, entry)) {
+ if (last_entry) {
+ last_entry->next = entry->next;
+ xf86loaderfree(entry->name);
+ xf86loaderfree(entry);
+ entry = last_entry->next;
+ } else {
+ LoaderhashTable[i] = entry->next;
+ xf86loaderfree(entry->name);
+ xf86loaderfree(entry);
+ entry = LoaderhashTable[i];
+ }
+ } else {
+ last_entry = entry;
+ entry = entry->next;
+ }
}
- }
- else {
- last_entry = entry ;
- entry = entry->next ;
- }
}
- }
}
void
LoaderDumpSymbols()
{
- itemPtr entry;
- int j;
-
- for (j=0; j<HASHSIZE; j++) {
- entry = LoaderhashTable[j];
- while (entry) {
- LoaderPrintItem(entry);
- entry = entry->next;
- }
+ itemPtr entry;
+ int j;
+
+ for (j = 0; j < HASHSIZE; j++) {
+ entry = LoaderhashTable[j];
+ while (entry) {
+ LoaderPrintItem(entry);
+ entry = entry->next;
}
-
+ }
+
}
diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
index e09fa50b0..39ba510a1 100644
--- a/hw/xfree86/loader/loader.c
+++ b/hw/xfree86/loader/loader.c
@@ -1,7 +1,6 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loader.c,v 1.63 2002/11/25 14:05:03 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loader.c,v 1.71 2003/11/06 18:38:13 tsi Exp $ */
/*
- *
* Copyright 1995-1998 by Metro Link, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
@@ -22,6 +21,33 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
@@ -35,7 +61,7 @@
#include <string.h>
#if defined(linux) && \
(defined(__alpha__) || defined(__powerpc__) || defined(__ia64__) \
- || defined(__x86_64__))
+ || defined(__AMD64__))
#include <malloc.h>
#endif
#include <stdarg.h>
@@ -73,7 +99,7 @@ int check_unresolved_sema = 0;
#endif
#ifdef __UNIXOS2__
-void * os2ldcalloc(size_t,size_t);
+void *os2ldcalloc(size_t, size_t);
#endif
#ifdef HANDLE_IN_HASH_ENTRY
@@ -84,11 +110,11 @@ void * os2ldcalloc(size_t,size_t);
#define MAX_HANDLE 256
#define HANDLE_FREE 0
#define HANDLE_USED 1
-static char freeHandles[MAX_HANDLE] ;
-static int refCount[MAX_HANDLE] ;
+static char freeHandles[MAX_HANDLE];
+static int refCount[MAX_HANDLE];
#endif
-#if defined(__sparc__) && defined(__GNUC__)
+#if defined(__sparc__) && defined(__GNUC__) && !defined(__FreeBSD__)
# define SYMFUNCDOT(func) { "." #func, (funcptr)&__sparc_dot_ ## func },
# if !defined(__OpenBSD__)
# define SYMFUNCDOT89(func) { "." #func, (funcptr)&func ## _sparcv89 },
@@ -108,24 +134,25 @@ DEFFUNCDOT(div)
DEFFUNCDOT(udiv)
#ifdef linux
static LOOKUP SparcV89LookupTab[] = {
- SYMFUNCDOT89(rem)
- SYMFUNCDOT89(urem)
- SYMFUNCDOT89(mul)
- SYMFUNCDOT89(umul)
- SYMFUNCDOT89(div)
- SYMFUNCDOT89(udiv)
- { 0, 0 }
+ SYMFUNCDOT89(rem)
+ SYMFUNCDOT89(urem)
+ SYMFUNCDOT89(mul)
+ SYMFUNCDOT89(umul)
+ SYMFUNCDOT89(div)
+ SYMFUNCDOT89(udiv)
+ {0, 0}
};
#endif
static LOOKUP SparcLookupTab[] = {
- SYMFUNCDOT(rem)
- SYMFUNCDOT(urem)
- SYMFUNCDOT(mul)
- SYMFUNCDOT(umul)
- SYMFUNCDOT(div)
- SYMFUNCDOT(udiv)
- { 0, 0 }
+ SYMFUNCDOT(rem)
+ SYMFUNCDOT(urem)
+ SYMFUNCDOT(mul)
+ SYMFUNCDOT(umul)
+ SYMFUNCDOT(div)
+ SYMFUNCDOT(udiv)
+ {0, 0}
};
+
#ifdef linux
#if defined(__GNUC__) && defined(__GLIBC__)
#define HWCAP_SPARC_MULDIV 8
@@ -138,29 +165,32 @@ sparcUseHWMulDiv(void)
FILE *f;
char buffer[1024];
char *p;
+
#if defined(__GNUC__) && defined(__GLIBC__)
unsigned long *hwcap;
+
__asm(".weak _dl_hwcap");
-
+
hwcap = &_dl_hwcap;
- __asm("" : "=r" (hwcap) : "0" (hwcap));
+ __asm("": "=r"(hwcap):"0"(hwcap));
if (hwcap) {
- if (*hwcap & HWCAP_SPARC_MULDIV)
- return 1;
- else
- return 0;
+ if (*hwcap & HWCAP_SPARC_MULDIV)
+ return 1;
+ else
+ return 0;
}
#endif
- f = fopen("/proc/cpuinfo","r");
- if (!f) return 0;
+ f = fopen("/proc/cpuinfo", "r");
+ if (!f)
+ return 0;
while (fgets(buffer, 1024, f) != NULL) {
- if (!strncmp (buffer, "type", 4)) {
- p = strstr (buffer, "sun4");
- if (p && (p[4] == 'u' || p[4] == 'd' || p[4] == 'm')) {
- fclose(f);
- return 1;
- }
- }
+ if (!strncmp(buffer, "type", 4)) {
+ p = strstr(buffer, "sun4");
+ if (p && (p[4] == 'u' || p[4] == 'd' || p[4] == 'm')) {
+ fclose(f);
+ return 1;
+ }
+ }
}
fclose(f);
return 0;
@@ -191,8 +221,8 @@ LDRCommonPtr ldrCommons;
int nCommons;
typedef struct {
- int num;
- const char ** list;
+ int num;
+ const char **list;
} symlist;
/*
@@ -210,119 +240,127 @@ static int fatalReqSym = 0;
static int _GetModuleType(int, long);
static loaderPtr _LoaderListPush(void);
static loaderPtr _LoaderListPop(int);
-/*ARGSUSED*/
-static void ARCHIVEResolveSymbols(void *unused) {}
-/*ARGSUSED*/
-static int ARCHIVECheckForUnresolved(void *v) { return 0; }
-/*ARGSUSED*/
-static char *ARCHIVEAddressToSection(void *modptr, unsigned long address)
-{ return NULL; }
-/*ARGSUSED*/
-static void ARCHIVEUnload(void *unused2) {}
+ /*ARGSUSED*/ static void
+ARCHIVEResolveSymbols(void *unused)
+{
+}
+ /*ARGSUSED*/ static int
+ARCHIVECheckForUnresolved(void *v)
+{
+ return 0;
+}
+ /*ARGSUSED*/ static char *
+ARCHIVEAddressToSection(void *modptr, unsigned long address)
+{
+ return NULL;
+}
+ /*ARGSUSED*/ static void
+ARCHIVEUnload(void *unused2)
+{
+}
/*
* Array containing entry points for different formats.
*/
static loader_funcs funcs[] = {
- /* LD_ARCHIVE */
- {ARCHIVELoadModule,
- ARCHIVEResolveSymbols,
- ARCHIVECheckForUnresolved,
- ARCHIVEAddressToSection,
- ARCHIVEUnload, {0,0,0,0,0}},
- /* LD_ELFOBJECT */
- {ELFLoadModule,
- ELFResolveSymbols,
- ELFCheckForUnresolved,
- ELFAddressToSection,
- ELFUnloadModule, {0,0,0,0,0}},
- /* LD_COFFOBJECT */
- {COFFLoadModule,
- COFFResolveSymbols,
- COFFCheckForUnresolved,
- COFFAddressToSection,
- COFFUnloadModule, {0,0,0,0,0}},
- /* LD_XCOFFOBJECT */
- {COFFLoadModule,
- COFFResolveSymbols,
- COFFCheckForUnresolved,
- COFFAddressToSection,
- COFFUnloadModule, {0,0,0,0,0}},
- /* LD_AOUTOBJECT */
- {AOUTLoadModule,
- AOUTResolveSymbols,
- AOUTCheckForUnresolved,
- AOUTAddressToSection,
- AOUTUnloadModule, {0,0,0,0,0}},
- /* LD_AOUTDLOBJECT */
+ /* LD_ARCHIVE */
+ {ARCHIVELoadModule,
+ ARCHIVEResolveSymbols,
+ ARCHIVECheckForUnresolved,
+ ARCHIVEAddressToSection,
+ ARCHIVEUnload, {0, 0, 0, 0, 0}},
+ /* LD_ELFOBJECT */
+ {ELFLoadModule,
+ ELFResolveSymbols,
+ ELFCheckForUnresolved,
+ ELFAddressToSection,
+ ELFUnloadModule, {0, 0, 0, 0, 0}},
+ /* LD_COFFOBJECT */
+ {COFFLoadModule,
+ COFFResolveSymbols,
+ COFFCheckForUnresolved,
+ COFFAddressToSection,
+ COFFUnloadModule, {0, 0, 0, 0, 0}},
+ /* LD_XCOFFOBJECT */
+ {COFFLoadModule,
+ COFFResolveSymbols,
+ COFFCheckForUnresolved,
+ COFFAddressToSection,
+ COFFUnloadModule, {0, 0, 0, 0, 0}},
+ /* LD_AOUTOBJECT */
+ {AOUTLoadModule,
+ AOUTResolveSymbols,
+ AOUTCheckForUnresolved,
+ AOUTAddressToSection,
+ AOUTUnloadModule, {0, 0, 0, 0, 0}},
+ /* LD_AOUTDLOBJECT */
#ifdef DLOPEN_SUPPORT
- {DLLoadModule,
- DLResolveSymbols,
- DLCheckForUnresolved,
- ARCHIVEAddressToSection,
- DLUnloadModule, {0,0,0,0,0}},
+ {DLLoadModule,
+ DLResolveSymbols,
+ DLCheckForUnresolved,
+ ARCHIVEAddressToSection,
+ DLUnloadModule, {0, 0, 0, 0, 0}},
#else
- {AOUTLoadModule,
- AOUTResolveSymbols,
- AOUTCheckForUnresolved,
- AOUTAddressToSection,
- AOUTUnloadModule, {0,0,0,0,0}},
+ {AOUTLoadModule,
+ AOUTResolveSymbols,
+ AOUTCheckForUnresolved,
+ AOUTAddressToSection,
+ AOUTUnloadModule, {0, 0, 0, 0, 0}},
#endif
- /* LD_ELFDLOBJECT */
+ /* LD_ELFDLOBJECT */
#ifdef DLOPEN_SUPPORT
- {DLLoadModule,
- DLResolveSymbols,
- DLCheckForUnresolved,
- ARCHIVEAddressToSection,
- DLUnloadModule, {0,0,0,0,0}},
+ {DLLoadModule,
+ DLResolveSymbols,
+ DLCheckForUnresolved,
+ ARCHIVEAddressToSection,
+ DLUnloadModule, {0, 0, 0, 0, 0}},
#else
- {ELFLoadModule,
- ELFResolveSymbols,
- ELFCheckForUnresolved,
- ELFAddressToSection,
- ELFUnloadModule, {0,0,0,0,0}},
+ {ELFLoadModule,
+ ELFResolveSymbols,
+ ELFCheckForUnresolved,
+ ELFAddressToSection,
+ ELFUnloadModule, {0, 0, 0, 0, 0}},
#endif
- };
-
-int numloaders=sizeof(funcs)/sizeof(loader_funcs);
+};
+int numloaders = sizeof(funcs) / sizeof(loader_funcs);
void
LoaderInit(void)
{
const char *osname = NULL;
- LoaderAddSymbols(-1, -1, miLookupTab ) ;
- LoaderAddSymbols(-1, -1, xfree86LookupTab ) ;
- LoaderAddSymbols(-1, -1, dixLookupTab ) ;
- LoaderAddSymbols(-1, -1, fontLookupTab ) ;
- LoaderAddSymbols(-1, -1, extLookupTab );
-#ifdef __sparc__
+ LoaderAddSymbols(-1, -1, miLookupTab);
+ LoaderAddSymbols(-1, -1, xfree86LookupTab);
+ LoaderAddSymbols(-1, -1, dixLookupTab);
+ LoaderAddSymbols(-1, -1, fontLookupTab);
+ LoaderAddSymbols(-1, -1, extLookupTab);
+#if defined(__sparc__) && !defined(__FreeBSD__)
#ifdef linux
if (sparcUseHWMulDiv())
- LoaderAddSymbols(-1, -1, SparcV89LookupTab ) ;
+ LoaderAddSymbols(-1, -1, SparcV89LookupTab);
else
#endif
- LoaderAddSymbols(-1, -1, SparcLookupTab ) ;
-#endif
+ LoaderAddSymbols(-1, -1, SparcLookupTab);
+#endif
xf86MsgVerb(X_INFO, 2, "Module ABI versions:\n");
xf86ErrorFVerb(2, "\t%s: %d.%d\n", ABI_CLASS_ANSIC,
- GET_ABI_MAJOR(LoaderVersionInfo.ansicVersion),
- GET_ABI_MINOR(LoaderVersionInfo.ansicVersion));
+ GET_ABI_MAJOR(LoaderVersionInfo.ansicVersion),
+ GET_ABI_MINOR(LoaderVersionInfo.ansicVersion));
xf86ErrorFVerb(2, "\t%s: %d.%d\n", ABI_CLASS_VIDEODRV,
- GET_ABI_MAJOR(LoaderVersionInfo.videodrvVersion),
- GET_ABI_MINOR(LoaderVersionInfo.videodrvVersion));
+ GET_ABI_MAJOR(LoaderVersionInfo.videodrvVersion),
+ GET_ABI_MINOR(LoaderVersionInfo.videodrvVersion));
xf86ErrorFVerb(2, "\t%s : %d.%d\n", ABI_CLASS_XINPUT,
- GET_ABI_MAJOR(LoaderVersionInfo.xinputVersion),
- GET_ABI_MINOR(LoaderVersionInfo.xinputVersion));
+ GET_ABI_MAJOR(LoaderVersionInfo.xinputVersion),
+ GET_ABI_MINOR(LoaderVersionInfo.xinputVersion));
xf86ErrorFVerb(2, "\t%s : %d.%d\n", ABI_CLASS_EXTENSION,
- GET_ABI_MAJOR(LoaderVersionInfo.extensionVersion),
- GET_ABI_MINOR(LoaderVersionInfo.extensionVersion));
+ GET_ABI_MAJOR(LoaderVersionInfo.extensionVersion),
+ GET_ABI_MINOR(LoaderVersionInfo.extensionVersion));
xf86ErrorFVerb(2, "\t%s : %d.%d\n", ABI_CLASS_FONT,
- GET_ABI_MAJOR(LoaderVersionInfo.fontVersion),
- GET_ABI_MINOR(LoaderVersionInfo.fontVersion));
+ GET_ABI_MAJOR(LoaderVersionInfo.fontVersion),
+ GET_ABI_MINOR(LoaderVersionInfo.fontVersion));
LoaderGetOS(&osname, NULL, NULL, NULL);
if (osname)
@@ -330,13 +368,13 @@ LoaderInit(void)
#if defined(linux) && \
(defined(__alpha__) || defined(__powerpc__) || defined(__ia64__) \
- || ( defined __x86_64__ && ! defined UseMMAP && ! defined DoMMAPedMerge))
+ || ( defined __AMD64__ && ! defined UseMMAP && ! defined DoMMAPedMerge))
/*
* The glibc malloc uses mmap for large allocations anyway. This breaks
* some relocation types because the offset overflow. See loader.h for more
* details. We need to turn off this behavior here.
*/
- mallopt(M_MMAP_MAX,0);
+ mallopt(M_MMAP_MAX, 0);
#endif
}
@@ -350,84 +388,83 @@ LoaderInit(void)
static int
_GetModuleType(int fd, long offset)
{
- unsigned char buf[256]; /* long enough for the largest magic type */
+ unsigned char buf[256]; /* long enough for the largest magic type */
- if( read(fd,buf,sizeof(buf)) < 0 ) {
+ if (read(fd, buf, sizeof(buf)) < 0) {
return -1;
}
-
#ifdef DEBUG
- ErrorF("Checking module type %10s\n", buf );
- ErrorF("Checking module type %x %x %x %x\n", buf[0], buf[1], buf[2], buf[3] );
+ ErrorF("Checking module type %10s\n", buf);
+ ErrorF("Checking module type %x %x %x %x\n", buf[0], buf[1], buf[2],
+ buf[3]);
#endif
- lseek(fd,offset,SEEK_SET);
+ lseek(fd, offset, SEEK_SET);
- if (strncmp((char *) buf, ARMAG, SARMAG) == 0) {
+ if (strncmp((char *)buf, ARMAG, SARMAG) == 0) {
return LD_ARCHIVE;
}
-
#if defined(AIAMAG)
/* LynxOS PPC style archives */
- if (strncmp((char *) buf, AIAMAG, SAIAMAG) == 0) {
+ if (strncmp((char *)buf, AIAMAG, SAIAMAG) == 0) {
return LD_ARCHIVE;
}
#endif
- if (strncmp((char *) buf, ELFMAG, SELFMAG) == 0) {
- if( *((Elf32_Half *)(buf + ELFDLOFF)) == ELFDLMAG ) {
+ if (strncmp((char *)buf, ELFMAG, SELFMAG) == 0) {
+ if (*((Elf32_Half *) (buf + ELFDLOFF)) == ELFDLMAG) {
return LD_ELFDLOBJECT;
} else {
return LD_ELFOBJECT;
}
}
- if( buf[0] == 0x4c && buf[1] == 0x01 ) {
+ if (buf[0] == 0x4c && buf[1] == 0x01) {
/* I386MAGIC */
return LD_COFFOBJECT;
}
- if( buf[0] == 0x01 && buf[1] == 0xdf ) {
+ if (buf[0] == 0x01 && buf[1] == 0xdf) {
/* XCOFFMAGIC */
return LD_COFFOBJECT;
- }
- if( buf[0] == 0x0d && buf[1] == 0x01 ) {
+ }
+ if (buf[0] == 0x0d && buf[1] == 0x01) {
/* ZCOFFMAGIC (LynxOS) */
return LD_COFFOBJECT;
}
- if( buf[0] == 0x00 && buf[1] == 0x86 && buf[2] == 0x01 && buf[3] == 0x07) {
- /* AOUTMAGIC */
- return LD_AOUTOBJECT;
+ if (buf[0] == 0x00 && buf[1] == 0x86 && buf[2] == 0x01 && buf[3] == 0x07) {
+ /* AOUTMAGIC */
+ return LD_AOUTOBJECT;
}
- if (buf[0] == 0x07 && buf[1] == 0x01 && (buf[2] == 0x64 || buf[2] == 0x86))
- {
- /* AOUTMAGIC, (Linux OMAGIC, old impure format, also used by OS/2 */
- return LD_AOUTOBJECT;
+ if (buf[0] == 0x07 && buf[1] == 0x01
+ && (buf[2] == 0x64 || buf[2] == 0x86)) {
+ /* AOUTMAGIC, (Linux OMAGIC, old impure format, also used by OS/2 */
+ return LD_AOUTOBJECT;
}
- if (buf[0] == 0x07 && buf[1] == 0x01 && buf[2] == 0x00 && buf[3] == 0x00)
- {
- /* AOUTMAGIC, BSDI */
- return LD_AOUTOBJECT;
+ if (buf[0] == 0x07 && buf[1] == 0x01 && buf[2] == 0x00 && buf[3] == 0x00) {
+ /* AOUTMAGIC, BSDI */
+ return LD_AOUTOBJECT;
}
- if ((buf[0] == 0xc0 && buf[1] == 0x86) || /* big endian form */
- (buf[3] == 0xc0 && buf[2] == 0x86)) { /* little endian form */
- /* i386 shared object */
- return LD_AOUTDLOBJECT;
+ if ((buf[0] == 0xc0 && buf[1] == 0x86) || /* big endian form */
+ (buf[3] == 0xc0 && buf[2] == 0x86)) { /* little endian form */
+ /* i386 shared object */
+ return LD_AOUTDLOBJECT;
}
return LD_UNKNOWN;
}
+static int offsetbias = 0; /* offset into archive */
-static int offsetbias=0; /* offset into archive */
/*
* _LoaderFileToMem() loads the contents of a file into memory using
* the most efficient method for a platform.
*/
void *
-_LoaderFileToMem(int fd, unsigned long offset,int size, char *label)
+_LoaderFileToMem(int fd, unsigned long offset, int size, char *label)
{
#ifdef UseMMAP
- unsigned long ret;
+ unsigned long ret;
+
# ifdef MmapPageAlign
unsigned long pagesize;
unsigned long new_size;
@@ -437,7 +474,8 @@ _LoaderFileToMem(int fd, unsigned long offset,int size, char *label)
# define MMAP_PROT (PROT_READ|PROT_WRITE|PROT_EXEC)
# ifdef DEBUGMEM
- ErrorF("_LoaderFileToMem(%d,%u(%u),%d,%s)",fd,offset,offsetbias,size,label);
+ ErrorF("_LoaderFileToMem(%d,%u(%u),%d,%s)", fd, offset, offsetbias, size,
+ label);
# endif
# ifdef MmapPageAlign
pagesize = getpagesize();
@@ -446,81 +484,84 @@ _LoaderFileToMem(int fd, unsigned long offset,int size, char *label)
new_off = (offset + offsetbias) / pagesize;
new_off *= pagesize;
new_off_bias = (offset + offsetbias) - new_off;
- if ((new_off_bias + size) > new_size) new_size += pagesize;
- ret = (unsigned long) mmap(0,new_size,MMAP_PROT,MAP_PRIVATE
-# ifdef __x86_64__
- | MAP_32BIT
+ if ((new_off_bias + size) > new_size)
+ new_size += pagesize;
+ ret = (unsigned long)mmap(0, new_size, MMAP_PROT, MAP_PRIVATE
+# ifdef __AMD64__
+ | MAP_32BIT
# endif
- ,
- fd,new_off);
- if(ret == -1)
- FatalError("mmap() failed: %s\n", strerror(errno) );
+ , fd, new_off);
+ if (ret == -1)
+ FatalError("mmap() failed: %s\n", strerror(errno));
return (void *)(ret + new_off_bias);
# else
- ret = (unsigned long) mmap(0,size,MMAP_PROT,MAP_PRIVATE
-# ifdef __x86_64__
- | MAP_32BIT
+ ret = (unsigned long)mmap(0, size, MMAP_PROT, MAP_PRIVATE
+# ifdef __AMD64__
+ | MAP_32BIT
# endif
- ,
- fd,offset + offsetbias);
- if(ret == -1)
- FatalError("mmap() failed: %s\n", strerror(errno) );
+ , fd, offset + offsetbias);
+ if (ret == -1)
+ FatalError("mmap() failed: %s\n", strerror(errno));
return (void *)ret;
# endif
#else
char *ptr;
# ifdef DEBUGMEM
- ErrorF("_LoaderFileToMem(%d,%u(%u),%d,%s)",fd,offset,offsetbias,size,label);
+ ErrorF("_LoaderFileToMem(%d,%u(%u),%d,%s)", fd, offset, offsetbias, size,
+ label);
# endif
- if(size == 0){
+ if (size == 0) {
# ifdef DEBUGMEM
- ErrorF("=NULL\n",ptr);
+ ErrorF("=NULL\n", ptr);
# endif
return NULL;
}
-
# ifndef __UNIXOS2__
- if( (ptr=xf86loadercalloc(size,1)) == NULL )
- FatalError("_LoaderFileToMem() malloc failed\n" );
+ if ((ptr = xf86loadercalloc(size, 1)) == NULL)
+ FatalError("_LoaderFileToMem() malloc failed\n");
# else
- if( (ptr=os2ldcalloc(size,1)) == NULL )
- FatalError("_LoaderFileToMem() malloc failed\n" );
+ if ((ptr = os2ldcalloc(size, 1)) == NULL)
+ FatalError("_LoaderFileToMem() malloc failed\n");
# endif
# if defined(linux) && defined(__ia64__)
{
unsigned long page_size = getpagesize();
unsigned long round;
- round = (unsigned long)ptr & (page_size-1);
- mprotect(ptr - round, (size+round+page_size-1) & ~(page_size-1),
- PROT_READ|PROT_WRITE|PROT_EXEC);
+ round = (unsigned long)ptr & (page_size - 1);
+ mprotect(ptr - round,
+ (size + round + page_size - 1) & ~(page_size - 1),
+ PROT_READ | PROT_WRITE | PROT_EXEC);
}
# endif
- if(lseek(fd,offset+offsetbias,SEEK_SET)<0)
- FatalError("\n_LoaderFileToMem() lseek() failed: %s\n",strerror(errno));
+ if (lseek(fd, offset + offsetbias, SEEK_SET) < 0)
+ FatalError("\n_LoaderFileToMem() lseek() failed: %s\n",
+ strerror(errno));
- if(read(fd,ptr,size)!=size)
- FatalError("\n_LoaderFileToMem() read() failed: %s\n",strerror(errno));
+ if (read(fd, ptr, size) != size)
+ FatalError("\n_LoaderFileToMem() read() failed: %s\n",
+ strerror(errno));
# if (defined(linux) || defined(__NetBSD__) || defined(__OpenBSD__)) \
- && defined(__powerpc__)
+ && defined(__powerpc__)
/*
* Keep the instruction cache in sync with changes in the
* main memory.
*/
- {
- int i;
- for (i = 0; i < size; i += 16)
- ppc_flush_icache(ptr+i);
- ppc_flush_icache(ptr+size-1);
- }
+ {
+ int i;
+
+ for (i = 0; i < size; i += 16)
+ ppc_flush_icache(ptr + i);
+ ppc_flush_icache(ptr + size - 1);
+ }
# endif
# ifdef DEBUGMEM
- ErrorF("=%lx\n",ptr);
+ ErrorF("=%lx\n", ptr);
# endif
return (void *)ptr;
@@ -535,25 +576,26 @@ _LoaderFreeFileMem(void *addr, int size)
{
#if defined (UseMMAP) && defined (MmapPageAlign)
unsigned long pagesize = getpagesize();
- memType i_addr = (memType)addr;
+ memType i_addr = (memType) addr;
unsigned long new_size;
#endif
#ifdef DEBUGMEM
- ErrorF("_LoaderFreeFileMem(%x,%d)\n",addr,size);
+ ErrorF("_LoaderFreeFileMem(%x,%d)\n", addr, size);
#endif
#ifdef UseMMAP
# if defined (MmapPageAlign)
- i_addr /= pagesize;
- i_addr *= pagesize;
+ i_addr /= pagesize;
+ i_addr *= pagesize;
new_size = (size + pagesize - 1) / pagesize;
new_size *= pagesize;
- if (((memType)addr - i_addr + size) > new_size) new_size += pagesize;
- munmap((void *)i_addr,new_size);
+ if (((memType) addr - i_addr + size) > new_size)
+ new_size += pagesize;
+ munmap((void *)i_addr, new_size);
# else
- munmap((void *)addr,size);
+ munmap((void *)addr, size);
# endif
#else
- if(size == 0)
+ if (size == 0)
return;
xf86loaderfree(addr);
@@ -565,43 +607,44 @@ _LoaderFreeFileMem(void *addr, int size)
int
_LoaderFileRead(int fd, unsigned int offset, void *buf, int size)
{
- if(lseek(fd,offset+offsetbias,SEEK_SET)<0)
- FatalError("_LoaderFileRead() lseek() failed: %s\n", strerror(errno) );
+ if (lseek(fd, offset + offsetbias, SEEK_SET) < 0)
+ FatalError("_LoaderFileRead() lseek() failed: %s\n", strerror(errno));
- if(read(fd,buf,size)!=size)
- FatalError("_LoaderFileRead() read() failed: %s\n", strerror(errno) );
+ if (read(fd, buf, size) != size)
+ FatalError("_LoaderFileRead() read() failed: %s\n", strerror(errno));
return size;
}
-static loaderPtr listHead = (loaderPtr) 0 ;
+static loaderPtr listHead = (loaderPtr) 0;
static loaderPtr
_LoaderListPush()
{
- loaderPtr item = xf86loadercalloc(1, sizeof (struct _loader));
- item->next = listHead ;
- listHead = item;
+ loaderPtr item = xf86loadercalloc(1, sizeof(struct _loader));
- return item;
+ item->next = listHead;
+ listHead = item;
+
+ return item;
}
static loaderPtr
_LoaderListPop(int handle)
{
- loaderPtr item=listHead;
- loaderPtr *bptr=&listHead; /* pointer to previous node */
+ loaderPtr item = listHead;
+ loaderPtr *bptr = &listHead; /* pointer to previous node */
- while(item) {
- if( item->handle == handle ) {
- *bptr=item->next; /* remove this from the list */
+ while (item) {
+ if (item->handle == handle) {
+ *bptr = item->next; /* remove this from the list */
return item;
- }
- bptr=&(item->next);
- item=item->next;
}
+ bptr = &(item->next);
+ item = item->next;
+ }
- return 0;
+ return 0;
}
/*
@@ -612,30 +655,30 @@ _LoaderListPop(int handle)
char *
_LoaderHandleToName(int handle)
{
- loaderPtr item=listHead;
- loaderPtr aritem=NULL;
- loaderPtr lastitem=NULL;
+ loaderPtr item = listHead;
+ loaderPtr aritem = NULL;
+ loaderPtr lastitem = NULL;
- if ( handle < 0 ) {
+ if (handle < 0) {
return "(built-in)";
- }
- while(item) {
- if( item->handle == handle ) {
- if( strchr(item->name,':') == NULL )
- aritem=item;
+ }
+ while (item) {
+ if (item->handle == handle) {
+ if (strchr(item->name, ':') == NULL)
+ aritem = item;
else
- lastitem=item;
- }
- item=item->next;
+ lastitem = item;
}
+ item = item->next;
+ }
- if( aritem )
- return aritem->name;
+ if (aritem)
+ return aritem->name;
- if( lastitem )
- return lastitem->name;
+ if (lastitem)
+ return lastitem->name;
- return 0;
+ return 0;
}
/*
@@ -646,23 +689,23 @@ _LoaderHandleToName(int handle)
char *
_LoaderHandleToCanonicalName(int handle)
{
- loaderPtr item=listHead;
- loaderPtr lastitem=NULL;
+ loaderPtr item = listHead;
+ loaderPtr lastitem = NULL;
- if ( handle < 0 ) {
+ if (handle < 0) {
return "(built-in)";
- }
- while(item) {
- if( item->handle == handle ) {
- lastitem=item;
+ }
+ while (item) {
+ if (item->handle == handle) {
+ lastitem = item;
}
- item=item->next;
- }
+ item = item->next;
+ }
- if( lastitem )
- return lastitem->cname;
+ if (lastitem)
+ return lastitem->cname;
- return NULL;
+ return NULL;
}
/*
@@ -673,30 +716,30 @@ _LoaderHandleToCanonicalName(int handle)
char *
_LoaderModuleToName(int module)
{
- loaderPtr item=listHead;
- loaderPtr aritem=NULL;
- loaderPtr lastitem=NULL;
+ loaderPtr item = listHead;
+ loaderPtr aritem = NULL;
+ loaderPtr lastitem = NULL;
- if ( module < 0 ) {
+ if (module < 0) {
return "(built-in)";
- }
- while(item) {
- if( item->module == module ) {
- if( strchr(item->name,':') == NULL )
- aritem=item;
+ }
+ while (item) {
+ if (item->module == module) {
+ if (strchr(item->name, ':') == NULL)
+ aritem = item;
else
- lastitem=item;
+ lastitem = item;
}
- item=item->next;
- }
+ item = item->next;
+ }
- if( aritem )
- return aritem->name;
+ if (aritem)
+ return aritem->name;
- if( lastitem )
- return lastitem->name;
+ if (lastitem)
+ return lastitem->name;
- return 0;
+ return 0;
}
/*
@@ -705,28 +748,28 @@ _LoaderModuleToName(int module)
*/
int
_LoaderAddressToSection(const unsigned long address, const char **module,
- const char ** section)
+ const char **section)
{
- loaderPtr item=listHead;
+ loaderPtr item = listHead;
- while(item) {
- if( (*section=item->funcs->AddressToSection(item->private, address)) != NULL ) {
- *module=_LoaderModuleToName(item->module);
- return 1;
+ while (item) {
+ if ((*section =
+ item->funcs->AddressToSection(item->private, address)) != NULL) {
+ *module = _LoaderModuleToName(item->module);
+ return 1;
}
- item=item->next;
- }
+ item = item->next;
+ }
- return 0;
+ return 0;
}
-
/*
* Add a list of symbols to the referenced list.
*/
static void
-AppendSymbol(symlist *list, const char *sym)
+AppendSymbol(symlist * list, const char *sym)
{
list->list = xnfrealloc(list->list, (list->num + 1) * sizeof(char **));
list->list[list->num] = sym;
@@ -734,7 +777,7 @@ AppendSymbol(symlist *list, const char *sym)
}
static void
-AppendSymList(symlist *list, const char **syms)
+AppendSymList(symlist * list, const char **syms)
{
while (*syms) {
AppendSymbol(list, *syms);
@@ -743,7 +786,7 @@ AppendSymList(symlist *list, const char **syms)
}
static int
-SymInList(symlist *list, char *sym)
+SymInList(symlist * list, char *sym)
{
int i;
@@ -760,12 +803,12 @@ LoaderVRefSymbols(const char *sym0, va_list args)
const char *s;
if (sym0 == NULL)
- return;
+ return;
s = sym0;
do {
- AppendSymbol(&refList, s);
- s = va_arg(args, const char *);
+ AppendSymbol(&refList, s);
+ s = va_arg(args, const char *);
} while (s != NULL);
}
@@ -877,112 +920,110 @@ _LoaderHandleUnresolved(char *symbol, char *module)
symbol, module);
}
}
- return(fatalsym);
+ return (fatalsym);
}
/*
* Handle an archive.
*/
void *
-ARCHIVELoadModule(loaderPtr modrec, int arfd, LOOKUP **ppLookup)
+ARCHIVELoadModule(loaderPtr modrec, int arfd, LOOKUP ** ppLookup)
{
loaderPtr tmp = NULL;
void *ret = NULL;
- unsigned char magic[SARMAG];
- struct ar_hdr hdr;
+ unsigned char magic[SARMAG];
+ struct ar_hdr hdr;
+
#if defined(__powerpc__) && defined(Lynx)
- struct fl_hdr fhdr;
- char name[255];
- int namlen;
+ struct fl_hdr fhdr;
+ char name[255];
+ int namlen;
#endif
- unsigned int size;
- unsigned int offset;
- int arnamesize, modnamesize;
- char *slash, *longname;
- char *nametable = NULL;
- int nametablelen = 0;
+ unsigned int size;
+ unsigned int offset;
+ int arnamesize, modnamesize;
+ char *slash, *longname;
+ char *nametable = NULL;
+ int nametablelen = 0;
LOOKUP *lookup_ret, *p;
- LOOKUP *myLookup = NULL; /* Does realloc behave if ptr == 0? */
+ LOOKUP *myLookup = NULL; /* Does realloc behave if ptr == 0? */
int modtype;
int i;
int numsyms = 0;
- int resetoff;
/* lookup_ret = xf86loadermalloc(sizeof (LOOKUP *)); */
- arnamesize=strlen(modrec->name);
+ arnamesize = strlen(modrec->name);
#if !(defined(__powerpc__) && defined(Lynx))
- read(arfd,magic,SARMAG);
+ read(arfd, magic, SARMAG);
- if(strncmp((const char *)magic,ARMAG,SARMAG) != 0 ) {
- ErrorF("ARCHIVELoadModule: wrong magic!!\n" );
+ if (strncmp((const char *)magic, ARMAG, SARMAG) != 0) {
+ ErrorF("ARCHIVELoadModule: wrong magic!!\n");
return NULL;
}
- resetoff=SARMAG;
#else
- read(arfd,&fhdr,FL_HSZ);
+ read(arfd, &fhdr, FL_HSZ);
- if(strncmp(fhdr.fl_magic,AIAMAG,SAIAMAG) != 0 ) {
- ErrorF("ARCHIVELoadModule: wrong magic!!\n" );
+ if (strncmp(fhdr.fl_magic, AIAMAG, SAIAMAG) != 0) {
+ ErrorF("ARCHIVELoadModule: wrong magic!!\n");
return NULL;
}
- resetoff=FL_HSZ;
#endif /* __powerpc__ && Lynx */
#ifdef DEBUGAR
- ErrorF("Looking for archive members starting at offset %o\n", offset );
+ ErrorF("Looking for archive members starting at offset %o\n", offset);
#endif
- while( read(arfd,&hdr,sizeof(struct ar_hdr)) ) {
+ while (read(arfd, &hdr, sizeof(struct ar_hdr))) {
longname = NULL;
- sscanf(hdr.ar_size,"%d",&size);
+ sscanf(hdr.ar_size, "%u", &size);
#if defined(__powerpc__) && defined(Lynx)
- sscanf(hdr.ar_namlen,"%d",&namlen);
- name[0]=hdr.ar_name[0];
- name[1]=hdr.ar_name[1];
- read(arfd,&name[2],namlen);
- name[namlen]='\0';
- offset=lseek(arfd,0,SEEK_CUR);
- if( offset&0x1 ) /* odd value */
- offset=lseek(arfd,1,SEEK_CUR); /* make it an even boundary */
+ sscanf(hdr.ar_namlen, "%d", &namlen);
+ name[0] = hdr.ar_name[0];
+ name[1] = hdr.ar_name[1];
+ read(arfd, &name[2], namlen);
+ name[namlen] = '\0';
+ offset = lseek(arfd, 0, SEEK_CUR);
+ if (offset & 0x1) /* odd value */
+ offset = lseek(arfd, 1, SEEK_CUR); /* make it an even boundary */
#endif
- offset=lseek(arfd,0,SEEK_CUR);
+ offset = lseek(arfd, 0, SEEK_CUR);
/* Check for a Symbol Table */
- if( (hdr.ar_name[0] == '/' && hdr.ar_name[1] == ' ') ||
+ if ((hdr.ar_name[0] == '/' && hdr.ar_name[1] == ' ') ||
#if defined(__powerpc__) && defined(Lynx)
namlen == 0 ||
#endif
- strncmp(hdr.ar_name, "__.SYMDEF", 9) == 0 ) {
+ strncmp(hdr.ar_name, "__.SYMDEF", 9) == 0) {
/* If the file name is NULL, then it is a symbol table */
#ifdef DEBUGAR
ErrorF("Symbol Table Member '%16.16s', size %d, offset %d\n",
- hdr.ar_name, size, offset );
- ErrorF("Symbol table size %d\n", size );
+ hdr.ar_name, size, offset);
+ ErrorF("Symbol table size %d\n", size);
#endif
- offset=lseek(arfd,offset+size,SEEK_SET);
- if( offset&0x1 ) /* odd value */
- offset=lseek(arfd,1,SEEK_CUR); /* make it an even boundary */
+ offset = lseek(arfd, offset + size, SEEK_SET);
+ if (offset & 0x1) /* odd value */
+ offset = lseek(arfd, 1, SEEK_CUR); /* make it an even boundary */
continue;
}
/* Check for a String Table */
- if( hdr.ar_name[0] == '/' && hdr.ar_name[1] == '/') {
+ if (hdr.ar_name[0] == '/' && hdr.ar_name[1] == '/') {
/* If the file name is '/', then it is a string table */
#ifdef DEBUGAR
ErrorF("String Table Member '%16.16s', size %d, offset %d\n",
- hdr.ar_name, size, offset );
- ErrorF("String table size %d\n", size );
+ hdr.ar_name, size, offset);
+ ErrorF("String table size %d\n", size);
#endif
nametablelen = size;
- nametable=(char *)xf86loadermalloc(nametablelen);
+ nametable = (char *)xf86loadermalloc(nametablelen);
read(arfd, nametable, size);
- offset=lseek(arfd,0,SEEK_CUR);
+ offset = lseek(arfd, 0, SEEK_CUR);
/* offset=lseek(arfd,offset+size,SEEK_SET); */
- if( offset&0x1 ) /* odd value */
- offset=lseek(arfd,1,SEEK_CUR); /* make it an even boundary */
+ if (offset & 0x1) /* odd value */
+ offset = lseek(arfd, 1, SEEK_CUR); /* make it an even boundary */
continue;
}
@@ -990,50 +1031,50 @@ ARCHIVELoadModule(loaderPtr modrec, int arfd, LOOKUP **ppLookup)
/* SYS V r4 style long member name */
int nameoffset = atol(&hdr.ar_name[1]);
char *membername;
+
if (!nametable) {
- ErrorF( "Missing string table whilst processing %s\n",
- modrec->name ) ;
+ ErrorF("Missing string table whilst processing %s\n",
+ modrec->name);
offsetbias = 0;
return NULL;
}
if (nameoffset > nametablelen) {
- ErrorF( "Invalid string table offset (%s) whilst processing %s\n",
- hdr.ar_name, modrec->name ) ;
+ ErrorF("Invalid string table offset (%s) whilst processing %s\n", hdr.ar_name, modrec->name);
offsetbias = 0;
xf86loaderfree(nametable);
return NULL;
}
membername = nametable + nameoffset;
- slash=strchr(membername,'/');
+ slash = strchr(membername, '/');
if (slash)
*slash = '\0';
longname = xf86loadermalloc(arnamesize + strlen(membername) + 2);
- strcpy(longname,modrec->name);
- strcat(longname,":");
- strcat(longname,membername);
+ strcpy(longname, modrec->name);
+ strcat(longname, ":");
+ strcat(longname, membername);
} else if (hdr.ar_name[0] == '#' && hdr.ar_name[1] == '1' &&
hdr.ar_name[2] == '/') {
/* BSD 4.4 style long member name */
- if (sscanf(hdr.ar_name+3, "%d", &modnamesize) != 1) {
+ if (sscanf(hdr.ar_name + 3, "%d", &modnamesize) != 1) {
ErrorF("Bad archive member %s\n", hdr.ar_name);
offsetbias = 0;
return NULL;
}
/* allocate space for fully qualified name */
longname = xf86loadermalloc(arnamesize + modnamesize + 2);
- strcpy(longname,modrec->name);
- strcat(longname,":");
- i = read(arfd, longname+modnamesize+1, modnamesize);
+ strcpy(longname, modrec->name);
+ strcat(longname, ":");
+ i = read(arfd, longname + modnamesize + 1, modnamesize);
if (i != modnamesize) {
- ErrorF("Bad archive member %d\n", hdr.ar_name);
+ ErrorF("Bad archive member %s\n", hdr.ar_name);
xf86loaderfree(longname);
offsetbias = 0;
return NULL;
- }
+ }
longname[i] = '\0';
offset += i;
size -= i;
- } else {
+ } else {
/* Regular archive member */
#ifdef DEBUGAR
ErrorF("Member '%16.16s', size %d, offset %x\n",
@@ -1042,87 +1083,85 @@ ARCHIVELoadModule(loaderPtr modrec, int arfd, LOOKUP **ppLookup)
#else
name,
#endif
- size, offset );
+ size, offset);
#endif
- slash=strchr(hdr.ar_name,'/');
+ slash = strchr(hdr.ar_name, '/');
if (slash == NULL) {
/* BSD format without trailing slash */
- slash = strchr(hdr.ar_name,' ');
- }
+ slash = strchr(hdr.ar_name, ' ');
+ }
/* SM: Make sure we do not overwrite other parts of struct */
-
- if((slash - hdr.ar_name) > sizeof(hdr.ar_name))
- slash = hdr.ar_name + sizeof(hdr.ar_name) -1;
- *slash='\000';
+
+ if ((slash - hdr.ar_name) > sizeof(hdr.ar_name))
+ slash = hdr.ar_name + sizeof(hdr.ar_name) - 1;
+ *slash = '\000';
}
- if( (modtype=_GetModuleType(arfd,offset)) < 0 ) {
- ErrorF( "%s is an unrecognized module type\n", hdr.ar_name ) ;
- offsetbias=0;
+ if ((modtype = _GetModuleType(arfd, offset)) < 0) {
+ ErrorF("%s is an unrecognized module type\n", hdr.ar_name);
+ offsetbias = 0;
if (nametable)
xf86loaderfree(nametable);
return NULL;
}
- tmp=_LoaderListPush();
+ tmp = _LoaderListPush();
tmp->handle = modrec->handle;
tmp->module = moduleseq++;
tmp->cname = xf86loadermalloc(strlen(modrec->cname) + 1);
strcpy(tmp->cname, modrec->cname);
- tmp->funcs=&funcs[modtype];
+ tmp->funcs = &funcs[modtype];
if (longname == NULL) {
- modnamesize=strlen(hdr.ar_name);
- tmp->name=(char *)xf86loadermalloc(arnamesize+modnamesize+2 );
- strcpy(tmp->name,modrec->name);
- strcat(tmp->name,":");
- strcat(tmp->name,hdr.ar_name);
-
+ modnamesize = strlen(hdr.ar_name);
+ tmp->name =
+ (char *)xf86loadermalloc(arnamesize + modnamesize + 2);
+ strcpy(tmp->name, modrec->name);
+ strcat(tmp->name, ":");
+ strcat(tmp->name, hdr.ar_name);
+
} else {
tmp->name = longname;
}
- offsetbias=offset;
+ offsetbias = offset;
- if((tmp->private = funcs[modtype].LoadModule(tmp, arfd,
- &lookup_ret))
- == NULL) {
- ErrorF( "Failed to load %s\n", hdr.ar_name ) ;
- offsetbias=0;
+ if ((tmp->private = funcs[modtype].LoadModule(tmp, arfd, &lookup_ret))
+ == NULL) {
+ ErrorF("Failed to load %s\n", hdr.ar_name);
+ offsetbias = 0;
if (nametable)
xf86loaderfree(nametable);
return NULL;
}
- offset=lseek(arfd,offset+size,SEEK_SET);
- if( offset&0x1 ) /* odd value */
- lseek(arfd,1,SEEK_CUR); /* make it an even boundary */
+ offset = lseek(arfd, offset + size, SEEK_SET);
+ if (offset & 0x1) /* odd value */
+ lseek(arfd, 1, SEEK_CUR); /* make it an even boundary */
- if (tmp->private == (void *) -1L) {
+ if (tmp->private == (void *)-1L) {
ErrorF("Skipping \"%s\": No symbols found\n", tmp->name);
continue;
- }
- else
+ } else
ret = tmp->private;
/* Add the lookup table returned from funcs.LoadModule to the
* one we're going to return.
*/
- for (i = 0, p = lookup_ret; p && p->symName; i++, p++)
- ;
+ for (i = 0, p = lookup_ret; p && p->symName; i++, p++) ;
if (i) {
myLookup = xf86loaderrealloc(myLookup, (numsyms + i + 1)
- * sizeof (LOOKUP));
+ * sizeof(LOOKUP));
if (!myLookup)
- continue; /* Oh well! */
+ continue; /* Oh well! */
- memcpy(&(myLookup[numsyms]), lookup_ret, i * sizeof (LOOKUP));
+ memcpy(&(myLookup[numsyms]), lookup_ret, i * sizeof(LOOKUP));
numsyms += i;
myLookup[numsyms].symName = 0;
}
xf86loaderfree(lookup_ret);
}
/* xf86loaderfree(lookup_ret); */
- offsetbias=0;
+ offsetbias = 0;
*ppLookup = myLookup;
if (nametable)
@@ -1141,9 +1180,9 @@ ARCHIVELoadModule(loaderPtr modrec, int arfd, LOOKUP **ppLookup)
LoaderRelocPtr
_LoaderGetRelocations(void *mod)
{
- loader_funcs *formatrec = (loader_funcs *)mod;
+ loader_funcs *formatrec = (loader_funcs *) mod;
- return &(formatrec->pRelocs);
+ return &(formatrec->pRelocs);
}
/*
@@ -1154,13 +1193,13 @@ int
LoaderOpen(const char *module, const char *cname, int handle,
int *errmaj, int *errmin, int *wasLoaded)
{
- loaderPtr tmp ;
- int new_handle, modtype ;
+ loaderPtr tmp;
+ int new_handle, modtype;
int fd;
LOOKUP *pLookup;
#if defined(DEBUG)
- ErrorF("LoaderOpen(%s)\n", module );
+ ErrorF("LoaderOpen(%s)\n", module);
#endif
/*
@@ -1171,26 +1210,26 @@ LoaderOpen(const char *module, const char *cname, int handle,
*/
if (handle >= 0) {
tmp = listHead;
- while ( tmp ) {
+ while (tmp) {
#ifdef DEBUGLIST
- ErrorF("strcmp(%x(%s),{%x} %x(%s))\n", module,module,&(tmp->name),
- tmp->name,tmp->name );
+ ErrorF("strcmp(%x(%s),{%x} %x(%s))\n", module, module,
+ &(tmp->name), tmp->name, tmp->name);
#endif
- if ( ! strcmp( module, tmp->name )) {
+ if (!strcmp(module, tmp->name)) {
refCount[tmp->handle]++;
if (wasLoaded)
*wasLoaded = 1;
xf86MsgVerb(X_INFO, 2, "Reloading %s\n", module);
return tmp->handle;
}
- tmp = tmp->next ;
+ tmp = tmp->next;
}
}
/*
* OK, it's a new one. Add it.
*/
- xf86Msg(X_INFO, "Loading %s\n", module ) ;
+ xf86Msg(X_INFO, "Loading %s\n", module);
if (wasLoaded)
*wasLoaded = 0;
@@ -1198,54 +1237,62 @@ LoaderOpen(const char *module, const char *cname, int handle,
* Find a free handle.
*/
new_handle = 1;
- while ( freeHandles[new_handle] && new_handle < MAX_HANDLE )
- new_handle ++ ;
-
- if ( new_handle == MAX_HANDLE ) {
- xf86Msg(X_ERROR, "Out of loader space\n" ) ; /* XXX */
- if(errmaj) *errmaj = LDR_NOSPACE;
- if(errmin) *errmin = LDR_NOSPACE;
- return -1 ;
+ while (freeHandles[new_handle] && new_handle < MAX_HANDLE)
+ new_handle++;
+
+ if (new_handle == MAX_HANDLE) {
+ xf86Msg(X_ERROR, "Out of loader space\n"); /* XXX */
+ if (errmaj)
+ *errmaj = LDR_NOSPACE;
+ if (errmin)
+ *errmin = LDR_NOSPACE;
+ return -1;
}
- freeHandles[new_handle] = HANDLE_USED ;
+ freeHandles[new_handle] = HANDLE_USED;
refCount[new_handle] = 1;
- if( (fd=open(module, O_RDONLY)) < 0 ) {
- xf86Msg(X_ERROR, "Unable to open %s\n", module );
- freeHandles[new_handle] = HANDLE_FREE ;
- if(errmaj) *errmaj = LDR_NOMODOPEN;
- if(errmin) *errmin = errno;
- return -1 ;
+ if ((fd = open(module, O_RDONLY)) < 0) {
+ xf86Msg(X_ERROR, "Unable to open %s\n", module);
+ freeHandles[new_handle] = HANDLE_FREE;
+ if (errmaj)
+ *errmaj = LDR_NOMODOPEN;
+ if (errmin)
+ *errmin = errno;
+ return -1;
}
- if( (modtype=_GetModuleType(fd,0)) < 0 ) {
- xf86Msg(X_ERROR, "%s is an unrecognized module type\n", module ) ;
- freeHandles[new_handle] = HANDLE_FREE ;
- if(errmaj) *errmaj = LDR_UNKTYPE;
- if(errmin) *errmin = LDR_UNKTYPE;
+ if ((modtype = _GetModuleType(fd, 0)) < 0) {
+ xf86Msg(X_ERROR, "%s is an unrecognized module type\n", module);
+ freeHandles[new_handle] = HANDLE_FREE;
+ if (errmaj)
+ *errmaj = LDR_UNKTYPE;
+ if (errmin)
+ *errmin = LDR_UNKTYPE;
return -1;
}
- tmp=_LoaderListPush();
+ tmp = _LoaderListPush();
tmp->name = xf86loadermalloc(strlen(module) + 1);
strcpy(tmp->name, module);
tmp->cname = xf86loadermalloc(strlen(cname) + 1);
strcpy(tmp->cname, cname);
tmp->handle = new_handle;
tmp->module = moduleseq++;
- tmp->funcs=&funcs[modtype];
+ tmp->funcs = &funcs[modtype];
- if((tmp->private = funcs[modtype].LoadModule(tmp,fd, &pLookup)) == NULL) {
- xf86Msg(X_ERROR, "Failed to load %s\n", module ) ;
+ if ((tmp->private = funcs[modtype].LoadModule(tmp, fd, &pLookup)) == NULL) {
+ xf86Msg(X_ERROR, "Failed to load %s\n", module);
_LoaderListPop(new_handle);
- freeHandles[new_handle] = HANDLE_FREE ;
- if(errmaj) *errmaj = LDR_NOLOAD;
- if(errmin) *errmin = LDR_NOLOAD;
+ freeHandles[new_handle] = HANDLE_FREE;
+ if (errmaj)
+ *errmaj = LDR_NOLOAD;
+ if (errmin)
+ *errmin = LDR_NOLOAD;
return -1;
}
- if (tmp->private != (void *) -1L) {
+ if (tmp->private != (void *)-1L) {
LoaderAddSymbols(new_handle, tmp->module, pLookup);
xf86loaderfree(pLookup);
}
@@ -1273,16 +1320,17 @@ LoaderSymbol(const char *sym)
{
int i;
itemPtr item = NULL;
+
for (i = 0; i < numloaders; i++)
funcs[i].ResolveSymbols(&funcs[i]);
item = (itemPtr) LoaderHashFind(sym);
- if ( item )
- return item->address ;
+ if (item)
+ return item->address;
else
#ifdef DLOPEN_SUPPORT
- return(DLFindSymbol(sym));
+ return (DLFindSymbol(sym));
#else
return NULL;
#endif
@@ -1292,36 +1340,37 @@ int
LoaderResolveSymbols(void)
{
int i;
- for(i=0;i<numloaders;i++)
+
+ for (i = 0; i < numloaders; i++)
funcs[i].ResolveSymbols(&funcs[i]);
return 0;
}
int
-LoaderCheckUnresolved(int delay_flag )
+LoaderCheckUnresolved(int delay_flag)
{
- int i,ret=0;
- LoaderResolveOptions delayFlag = delay_flag;
+ int i, ret = 0;
+ LoaderResolveOptions delayFlag = (LoaderResolveOptions)delay_flag;
- LoaderResolveSymbols();
+ LoaderResolveSymbols();
- if (delayFlag == LD_RESOLV_NOW) {
- if (check_unresolved_sema > 0)
- check_unresolved_sema--;
- else
- xf86Msg(X_WARNING, "LoaderCheckUnresolved: not enough "
- "MAGIC_DONT_CHECK_UNRESOLVED\n");
- }
+ if (delayFlag == LD_RESOLV_NOW) {
+ if (check_unresolved_sema > 0)
+ check_unresolved_sema--;
+ else
+ xf86Msg(X_WARNING, "LoaderCheckUnresolved: not enough "
+ "MAGIC_DONT_CHECK_UNRESOLVED\n");
+ }
- if (!check_unresolved_sema || delayFlag == LD_RESOLV_FORCE)
- for(i=0;i<numloaders;i++)
- if (funcs[i].CheckForUnresolved(&funcs[i]))
- ret=1;
+ if (!check_unresolved_sema || delayFlag == LD_RESOLV_FORCE)
+ for (i = 0; i < numloaders; i++)
+ if (funcs[i].CheckForUnresolved(&funcs[i]))
+ ret = 1;
- if (fatalReqSym)
- FatalError("Some required symbols were unresolved\n");
+ if (fatalReqSym)
+ FatalError("Some required symbols were unresolved\n");
- return ret;
+ return ret;
}
void xf86LoaderTrap(void);
@@ -1334,59 +1383,60 @@ xf86LoaderTrap(void)
void
LoaderDefaultFunc(void)
{
- ErrorF("\n\n\tThis should not happen!\n"
- "\tAn unresolved function was called!\n");
+ ErrorF("\n\n\tThis should not happen!\n"
+ "\tAn unresolved function was called!\n");
- xf86LoaderTrap();
-
- FatalError("\n");
+ xf86LoaderTrap();
+
+ FatalError("\n");
}
int
LoaderUnload(int handle)
{
- loaderRec fakeHead ;
- loaderPtr tmp = & fakeHead ;
+ loaderRec fakeHead;
+ loaderPtr tmp = &fakeHead;
- if ( handle < 0 || handle > MAX_HANDLE )
+ if (handle < 0 || handle > MAX_HANDLE)
return -1;
- /*
- * check the reference count, only free it if it goes to zero
- */
- if (--refCount[handle])
+ /*
+ * check the reference count, only free it if it goes to zero
+ */
+ if (--refCount[handle])
return 0;
- /*
- * find the loaderRecs associated with this handle.
- */
-
- while( (tmp=_LoaderListPop(handle)) != NULL ) {
- if( strchr(tmp->name,':') == NULL ) {
- /* It is not a member of an archive */
- xf86Msg(X_INFO, "Unloading %s\n", tmp->name ) ;
+ /*
+ * find the loaderRecs associated with this handle.
+ */
+
+ while ((tmp = _LoaderListPop(handle)) != NULL) {
+ if (strchr(tmp->name, ':') == NULL) {
+ /* It is not a member of an archive */
+ xf86Msg(X_INFO, "Unloading %s\n", tmp->name);
}
tmp->funcs->LoaderUnload(tmp->private);
xf86loaderfree(tmp->name);
xf86loaderfree(tmp->cname);
xf86loaderfree(tmp);
- }
-
- freeHandles[handle] = HANDLE_FREE ;
+ }
+
+ freeHandles[handle] = HANDLE_FREE;
-return 0;
+ return 0;
}
void
LoaderDuplicateSymbol(const char *symbol, const int handle)
{
ErrorF("Duplicate symbol %s in %s\n", symbol,
- listHead ? listHead->name : "(built-in)");
+ listHead ? listHead->name : "(built-in)");
ErrorF("Also defined in %s\n", _LoaderHandleToName(handle));
FatalError("Module load failure\n");
}
/* GDB Sync function */
-void _loader_debug_state()
+void
+_loader_debug_state()
{
}
@@ -1395,18 +1445,17 @@ unsigned long LoaderOptions = 0;
void
LoaderResetOptions(void)
{
- LoaderOptions = 0;
+ LoaderOptions = 0;
}
void
LoaderSetOptions(unsigned long opts)
{
- LoaderOptions |= opts;
+ LoaderOptions |= opts;
}
void
LoaderClearOptions(unsigned long opts)
{
- LoaderOptions &= ~opts;
+ LoaderOptions &= ~opts;
}
-
diff --git a/hw/xfree86/loader/loader.h b/hw/xfree86/loader/loader.h
index a814544b8..f48aadb02 100644
--- a/hw/xfree86/loader/loader.h
+++ b/hw/xfree86/loader/loader.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loader.h,v 1.25 2001/02/22 23:17:09 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loader.h,v 1.28 2003/11/06 18:38:14 tsi Exp $ */
/*
*
@@ -22,6 +22,33 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
+/*
+ * Copyright (c) 1997-2001 by The XFree86 Project, 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 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).
+ */
+
#ifndef _LOADER_H
#define _LOADER_H
@@ -30,18 +57,14 @@
#if defined(Lynx) && defined(sun)
#define const /**/
#endif
-
#if (defined(__i386__) || defined(__ix86)) && !defined(i386)
#define i386
#endif
-
#include <X11/Xosdefs.h>
#include <X11/Xfuncproto.h>
#include <X11/Xmd.h>
-
/* For LOOKUP definition */
#include "sym.h"
-
#define LD_UNKNOWN -1
#define LD_ARCHIVE 0
#define LD_ELFOBJECT 1
@@ -50,12 +73,9 @@
#define LD_AOUTOBJECT 4
#define LD_AOUTDLOBJECT 5
#define LD_ELFDLOBJECT 6
-
#define LD_PROCESSED_ARCHIVE -1
-
/* #define UNINIT_SECTION */
#define HANDLE_IN_HASH_ENTRY
-
/*
* COFF Section nmumbers
*/
@@ -63,18 +83,15 @@
#define N_DATA 2
#define N_BSS 3
#define N_COMMENT 4
-
#define TestFree(a) if (a) { xfree (a); a = NULL; }
-
#define HASHDIV 10
#define HASHSIZE (1<<HASHDIV)
-
-typedef struct _elf_reloc *ELFRelocPtr;
-typedef struct _elf_COMMON *ELFCommonPtr;
-typedef struct _coff_reloc *COFFRelocPtr;
+typedef struct _elf_reloc *ELFRelocPtr;
+typedef struct _elf_COMMON *ELFCommonPtr;
+typedef struct _coff_reloc *COFFRelocPtr;
typedef struct _coff_COMMON *COFFCommonPtr;
-typedef struct AOUT_RELOC *AOUTRelocPtr;
-typedef struct AOUT_COMMON *AOUTCommonPtr;
+typedef struct AOUT_RELOC *AOUTRelocPtr;
+typedef struct AOUT_COMMON *AOUTCommonPtr;
typedef struct _LoaderReloc {
int modtype;
@@ -86,52 +103,52 @@ typedef struct _LoaderReloc {
typedef struct _loader_item *itemPtr;
typedef struct _loader_item {
- char *name ;
- void *address ;
- itemPtr next ;
- int handle ;
- int module ;
- itemPtr exports;
+ char *name;
+ void *address;
+ itemPtr next;
+ int handle;
+ int module;
+ itemPtr exports;
#if defined(__powerpc__)
- /*
- * PowerPC file formats require special routines in some circumstances
- * to assist in the linking process. See the specific loader for
- * more details.
- */
- union {
- unsigned short plt[8]; /* ELF */
- unsigned short glink[14]; /* XCOFF */
- } code ;
+ /*
+ * PowerPC file formats require special routines in some circumstances
+ * to assist in the linking process. See the specific loader for
+ * more details.
+ */
+ union {
+ unsigned short plt[8]; /* ELF */
+ unsigned short glink[14]; /* XCOFF */
+ } code;
#endif
- } itemRec ;
+} itemRec;
/* The following structures provide an interface to GDB (note that GDB
has copies of the definitions - if you change anything here make
sure that the changes are also made to GDB */
-typedef struct {
- char *name; /* Name of this symbol */
- unsigned int namelen; /* Name of this module */
- void *addr; /* Start address of the .text section */
+typedef struct {
+ char *name; /* Name of this symbol */
+ unsigned int namelen; /* Name of this module */
+ void *addr; /* Start address of the .text section */
} LDRCommon, *LDRCommonPtr;
-typedef struct x_LDRModuleRec{
- unsigned int version; /* Version of this struct */
- char *name; /* Name of this module */
- unsigned int namelen; /* Length of name */
- void *text; /* Start address of the .text section */
- void *data; /* Start address of the .data section */
- void *rodata; /* Start address of the .rodata section */
- void *bss; /* Start address of the .bss section */
- LDRCommonPtr commons; /* List of commmon symbols */
- int commonslen; /* Number of common symbols */
- struct x_LDRModuleRec *next; /* Next module record in chain */
+typedef struct x_LDRModuleRec {
+ unsigned int version; /* Version of this struct */
+ char *name; /* Name of this module */
+ unsigned int namelen; /* Length of name */
+ void *text; /* Start address of the .text section */
+ void *data; /* Start address of the .data section */
+ void *rodata; /* Start address of the .rodata section */
+ void *bss; /* Start address of the .bss section */
+ LDRCommonPtr commons; /* List of commmon symbols */
+ int commonslen; /* Number of common symbols */
+ struct x_LDRModuleRec *next; /* Next module record in chain */
} LDRModuleRec, *LDRModulePtr;
-extern char DebuggerPresent;
-extern LDRModulePtr ModList;
-extern LDRCommonPtr ldrCommons;
-extern int nCommons;
+extern char DebuggerPresent;
+extern LDRModulePtr ModList;
+extern LDRCommonPtr ldrCommons;
+extern int nCommons;
/*
* The loader uses loader specific alloc/calloc/free functions that
@@ -172,41 +189,41 @@ typedef struct _loader *loaderPtr;
* _loader_funcs hold the entry points for a module format.
*/
-typedef void * (*LoadModuleProcPtr)(loaderPtr modrec, int fd, LOOKUP **);
-typedef void (*ResolveSymbolsProcPtr)(void *);
-typedef int (*CheckForUnresolvedProcPtr)(void *);
-typedef char * (*AddressToSectionProcPtr)(void *, unsigned long);
-typedef void (*LoaderUnloadProcPtr)(void *);
+typedef void *(*LoadModuleProcPtr) (loaderPtr modrec, int fd, LOOKUP **);
+typedef void (*ResolveSymbolsProcPtr) (void *);
+typedef int (*CheckForUnresolvedProcPtr) (void *);
+typedef char *(*AddressToSectionProcPtr) (void *, unsigned long);
+typedef void (*LoaderUnloadProcPtr) (void *);
typedef struct _loader_funcs {
- LoadModuleProcPtr LoadModule;
- ResolveSymbolsProcPtr ResolveSymbols;
- CheckForUnresolvedProcPtr CheckForUnresolved;
- AddressToSectionProcPtr AddressToSection;
- LoaderUnloadProcPtr LoaderUnload;
- LoaderRelocRec pRelocs; /* type specific relocations */
+ LoadModuleProcPtr LoadModule;
+ ResolveSymbolsProcPtr ResolveSymbols;
+ CheckForUnresolvedProcPtr CheckForUnresolved;
+ AddressToSectionProcPtr AddressToSection;
+ LoaderUnloadProcPtr LoaderUnload;
+ LoaderRelocRec pRelocs; /* type specific relocations */
} loader_funcs;
/* Each module loaded has a loaderRec */
typedef struct _loader {
- int handle; /* Unique id used to remove symbols from
- this module when it is unloaded */
- int module; /* Unique id to identify compilation units */
- char *name;
- char *cname;
- void *private; /* format specific data */
- loader_funcs *funcs; /* funcs for operating on this module */
- loaderPtr next;
+ int handle; /* Unique id used to remove symbols from
+ * this module when it is unloaded */
+ int module; /* Unique id to identify compilation units */
+ char *name;
+ char *cname;
+ void *private; /* format specific data */
+ loader_funcs *funcs; /* funcs for operating on this module */
+ loaderPtr next;
} loaderRec;
/* Compiled-in version information */
typedef struct {
- INT32 xf86Version;
- INT32 ansicVersion;
- INT32 videodrvVersion;
- INT32 xinputVersion;
- INT32 extensionVersion;
- INT32 fontVersion;
+ int xf86Version;
+ int ansicVersion;
+ int videodrvVersion;
+ int xinputVersion;
+ int extensionVersion;
+ int fontVersion;
} ModuleVersions;
extern ModuleVersions LoaderVersionInfo;
@@ -217,6 +234,7 @@ extern unsigned long LoaderOptions;
void LoaderAddSymbols(int, int, LOOKUP *);
void LoaderDefaultFunc(void);
void LoaderDuplicateSymbol(const char *, const int);
+
#if 0
void LoaderFixups(void);
#endif
@@ -232,7 +250,8 @@ void LoaderPrintItem(itemPtr);
void LoaderPrintSymbol(unsigned long);
void LoaderDumpSymbols(void);
char *_LoaderModuleToName(int);
-int _LoaderAddressToSection(const unsigned long, const char **, const char **);
+int _LoaderAddressToSection(const unsigned long, const char **,
+ const char **);
int LoaderOpen(const char *, const char *, int, int *, int *, int *);
int LoaderHandleOpen(int);
@@ -251,8 +270,8 @@ LoaderRelocPtr _LoaderGetRelocations(void *);
/*
* object to name lookup routines
*/
-char * _LoaderHandleToName(int handle);
-char * _LoaderHandleToCanonicalName(int handle);
+char *_LoaderHandleToName(int handle);
+char *_LoaderHandleToCanonicalName(int handle);
/*
* Entry points for the different loader types
diff --git a/hw/xfree86/loader/loaderProcs.h b/hw/xfree86/loader/loaderProcs.h
index ff6c64b07..d2779812f 100644
--- a/hw/xfree86/loader/loaderProcs.h
+++ b/hw/xfree86/loader/loaderProcs.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loaderProcs.h,v 1.19 2002/07/30 18:36:18 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loaderProcs.h,v 1.21 2003/10/15 16:29:04 dawes Exp $ */
/*
*
@@ -22,6 +22,32 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
+/*
+ * Copyright (c) 1997-2002 by The XFree86 Project, 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 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).
+ */
#ifndef _LOADERPROCS_H
#define _LOADERPROCS_H
@@ -31,24 +57,23 @@
#include "fontmod.h"
typedef struct module_desc {
- struct module_desc *child;
- struct module_desc *sib;
- struct module_desc *parent;
- struct module_desc *demand_next;
- char *name;
- char *filename;
- char *identifier;
- XID client_id;
- int in_use;
- int handle;
- ModuleSetupProc SetupProc;
- ModuleTearDownProc TearDownProc;
- void *TearDownData; /* returned from SetupProc */
- const char *path;
- const XF86ModuleVersionInfo *VersionInfo;
+ struct module_desc *child;
+ struct module_desc *sib;
+ struct module_desc *parent;
+ struct module_desc *demand_next;
+ char *name;
+ char *filename;
+ char *identifier;
+ XID client_id;
+ int in_use;
+ int handle;
+ ModuleSetupProc SetupProc;
+ ModuleTearDownProc TearDownProc;
+ void *TearDownData; /* returned from SetupProc */
+ const char *path;
+ const XF86ModuleVersionInfo *VersionInfo;
} ModuleDesc, *ModuleDescPtr;
-
/*
* Extenal API for the loader
*/
@@ -64,17 +89,16 @@ ModuleDescPtr LoadSubModule(ModuleDescPtr, const char *,
const char **, const char **, pointer,
const XF86ModReqInfo *, int *, int *);
ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent);
-void LoadFont (FontModule *);
-void UnloadModule (ModuleDescPtr);
-void UnloadSubModule (ModuleDescPtr);
-void UnloadDriver (ModuleDescPtr);
-void FreeModuleDesc (ModuleDescPtr mod);
-ModuleDescPtr NewModuleDesc (const char *);
-ModuleDescPtr AddSibling (ModuleDescPtr head, ModuleDescPtr new);
+void LoadFont(FontModule *);
+void UnloadModule(ModuleDescPtr);
+void UnloadSubModule(ModuleDescPtr);
+void UnloadDriver(ModuleDescPtr);
+void FreeModuleDesc(ModuleDescPtr mod);
+ModuleDescPtr NewModuleDesc(const char *);
+ModuleDescPtr AddSibling(ModuleDescPtr head, ModuleDescPtr new);
void LoaderSetPath(const char *path);
void LoaderSortExtensions(void);
-
void LoaderVReqSymLists(const char **, va_list args);
void LoaderVReqSymbols(const char *, va_list args);
void LoaderVRefSymLists(const char **, va_list args);
@@ -92,5 +116,4 @@ void LoaderClearOptions(unsigned long);
/* Options for LoaderSetOptions */
#define LDR_OPT_ABI_MISMATCH_NONFATAL 0x0001
-
#endif /* _LOADERPROCS_H */
diff --git a/hw/xfree86/loader/loadext.c b/hw/xfree86/loader/loadext.c
index 206c8296a..ffc98b243 100644
--- a/hw/xfree86/loader/loadext.c
+++ b/hw/xfree86/loader/loadext.c
@@ -1,6 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadext.c,v 1.6 2000/02/08 17:19:19 dawes Exp $ */
-
-/* Copyright 2000 by The XFree86 Project, Inc */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadext.c,v 1.8 2003/10/15 16:29:04 dawes Exp $ */
+/*
+ * Copyright (c) 2000 by The XFree86 Project, 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 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).
+ */
/* Maybe this file belongs elsewhere? */
@@ -12,58 +36,56 @@
ExtensionModule *ExtensionModuleList = NULL;
static int numExtensionModules = 0;
-
static ExtensionModule *
NewExtensionModule(void)
{
- ExtensionModule *save = ExtensionModuleList;
- int n;
-
- /* Sanity check */
- if (!ExtensionModuleList)
- numExtensionModules = 0;
-
- n = numExtensionModules + 1;
- ExtensionModuleList = xrealloc(ExtensionModuleList,
- (n + 1) * sizeof(ExtensionModule));
- if (ExtensionModuleList == NULL) {
- ExtensionModuleList = save;
- return NULL;
- } else {
- numExtensionModules++;
- ExtensionModuleList[numExtensionModules].name = NULL;
- return ExtensionModuleList + (numExtensionModules - 1);
- }
+ ExtensionModule *save = ExtensionModuleList;
+ int n;
+
+ /* Sanity check */
+ if (!ExtensionModuleList)
+ numExtensionModules = 0;
+
+ n = numExtensionModules + 1;
+ ExtensionModuleList = xrealloc(ExtensionModuleList,
+ (n + 1) * sizeof(ExtensionModule));
+ if (ExtensionModuleList == NULL) {
+ ExtensionModuleList = save;
+ return NULL;
+ } else {
+ numExtensionModules++;
+ ExtensionModuleList[numExtensionModules].name = NULL;
+ return ExtensionModuleList + (numExtensionModules - 1);
+ }
}
void
-LoadExtension(ExtensionModule *e, Bool builtin)
+LoadExtension(ExtensionModule * e, Bool builtin)
{
- ExtensionModule *newext;
+ ExtensionModule *newext;
- if (e == NULL || e->name == NULL)
- return;
+ if (e == NULL || e->name == NULL)
+ return;
- if (!(newext = NewExtensionModule()))
- return;
+ if (!(newext = NewExtensionModule()))
+ return;
- if (builtin)
- xf86MsgVerb(X_INFO, 2, "Initializing built-in extension %s\n",
- e->name);
- else
- xf86MsgVerb(X_INFO, 2, "Loading extension %s\n", e->name);
+ if (builtin)
+ xf86MsgVerb(X_INFO, 2, "Initializing built-in extension %s\n",
+ e->name);
+ else
+ xf86MsgVerb(X_INFO, 2, "Loading extension %s\n", e->name);
- newext->name = e->name;
- newext->initFunc = e->initFunc;
- newext->disablePtr = e->disablePtr;
- newext->setupFunc = e->setupFunc;
- newext->initDependencies = e->initDependencies;
+ newext->name = e->name;
+ newext->initFunc = e->initFunc;
+ newext->disablePtr = e->disablePtr;
+ newext->setupFunc = e->setupFunc;
+ newext->initDependencies = e->initDependencies;
- if (e->setupFunc != NULL)
- e->setupFunc();
+ if (e->setupFunc != NULL)
+ e->setupFunc();
}
-
/*
* Sort ExtensionModuleList according to the initialisation order
* dependencies. The code for this is taken from BSD's tsort,
@@ -105,21 +127,20 @@ LoadExtension(ExtensionModule *e, Bool builtin)
* SUCH DAMAGE.
*/
-
-#define NF_MARK 0x1 /* marker for cycle detection */
-#define NF_ACYCLIC 0x2 /* this node is cycle free */
-#define NF_NODEST 0x4 /* Unreachable */
+#define NF_MARK 0x1 /* marker for cycle detection */
+#define NF_ACYCLIC 0x2 /* this node is cycle free */
+#define NF_NODEST 0x4 /* Unreachable */
typedef struct node_str NODE;
struct node_str {
- NODE **n_prevp; /* pointer to previous node's n_next */
- NODE *n_next; /* next node in graph */
- NODE **n_arcs; /* array of arcs to other nodes */
- int n_narcs; /* number of arcs in n_arcs[] */
- int n_arcsize; /* size of n_arcs[] array */
- int n_refcnt; /* # of arcs pointing to this node */
- int n_flags; /* NF_* */
- const char *n_name; /* name of this node */
+ NODE **n_prevp; /* pointer to previous node's n_next */
+ NODE *n_next; /* next node in graph */
+ NODE **n_arcs; /* array of arcs to other nodes */
+ int n_narcs; /* number of arcs in n_arcs[] */
+ int n_arcsize; /* size of n_arcs[] array */
+ int n_refcnt; /* # of arcs pointing to this node */
+ int n_flags; /* NF_* */
+ const char *n_name; /* name of this node */
};
static NODE *graph = NULL, **cycle_buf = NULL, **longest_cycle = NULL;
@@ -130,32 +151,31 @@ static NODE *sorted = NULL, *last = NULL;
static NODE *
get_node(const char *name)
{
- NODE *n;
+ NODE *n;
- for (n = graph; n && n->n_name && strcmp(n->n_name, name); n = n->n_next)
- ;
- if (n)
- return (n);
+ for (n = graph; n && n->n_name && strcmp(n->n_name, name);
+ n = n->n_next) ;
+ if (n)
+ return (n);
- n = xnfalloc(sizeof(NODE));
+ n = xnfalloc(sizeof(NODE));
- n->n_narcs = 0;
- n->n_arcsize = 0;
- n->n_arcs = NULL;
- n->n_refcnt = 0;
- n->n_flags = 0;
- n->n_name = name;
+ n->n_narcs = 0;
+ n->n_arcsize = 0;
+ n->n_arcs = NULL;
+ n->n_refcnt = 0;
+ n->n_flags = 0;
+ n->n_name = name;
- /* Add to linked list. */
- if ((n->n_next = graph) != NULL)
- graph->n_prevp = &n->n_next;
- n->n_prevp = &graph;
- graph = n;
+ /* Add to linked list. */
+ if ((n->n_next = graph) != NULL)
+ graph->n_prevp = &n->n_next;
+ n->n_prevp = &graph;
+ graph = n;
- return (n);
+ return (n);
}
-
/*
* add an arc from node s1 to node s2 in the graph. If s1 or s2 are not in
* the graph, then add them.
@@ -163,35 +183,35 @@ get_node(const char *name)
static void
add_arc(const char *s1, const char *s2)
{
- NODE *n1;
- NODE *n2;
- int bsize, i;
-
- n1 = get_node(s1);
-
- if (!strcmp(s1, s2))
- return;
-
- n2 = get_node(s2);
-
- /*
- * Check if this arc is already here.
- */
- for (i = 0; i < n1->n_narcs; i++)
- if (n1->n_arcs[i] == n2)
- return;
- /*
- * Add it.
- */
- if (n1->n_narcs == n1->n_arcsize) {
- if (!n1->n_arcsize)
- n1->n_arcsize = 10;
- bsize = n1->n_arcsize * sizeof(*n1->n_arcs) * 2;
- n1->n_arcs = xnfrealloc(n1->n_arcs, bsize);
- n1->n_arcsize = bsize / sizeof(*n1->n_arcs);
- }
- n1->n_arcs[n1->n_narcs++] = n2;
- ++n2->n_refcnt;
+ NODE *n1;
+ NODE *n2;
+ int bsize, i;
+
+ n1 = get_node(s1);
+
+ if (!strcmp(s1, s2))
+ return;
+
+ n2 = get_node(s2);
+
+ /*
+ * Check if this arc is already here.
+ */
+ for (i = 0; i < n1->n_narcs; i++)
+ if (n1->n_arcs[i] == n2)
+ return;
+ /*
+ * Add it.
+ */
+ if (n1->n_narcs == n1->n_arcsize) {
+ if (!n1->n_arcsize)
+ n1->n_arcsize = 10;
+ bsize = n1->n_arcsize * sizeof(*n1->n_arcs) * 2;
+ n1->n_arcs = xnfrealloc(n1->n_arcs, bsize);
+ n1->n_arcsize = bsize / sizeof(*n1->n_arcs);
+ }
+ n1->n_arcs[n1->n_narcs++] = n2;
+ ++n2->n_refcnt;
}
/*
@@ -200,220 +220,214 @@ add_arc(const char *s1, const char *s2)
static void
clear_cycle(void)
{
- NODE *n;
+ NODE *n;
- for (n = graph; n != NULL; n = n->n_next)
- n->n_flags &= ~NF_NODEST;
+ for (n = graph; n != NULL; n = n->n_next)
+ n->n_flags &= ~NF_NODEST;
}
/* print node and remove from graph (does not actually free node) */
static void
-remove_node(NODE *n)
+remove_node(NODE * n)
{
- NODE **np;
- NODE *newnode;
- int i;
+ NODE **np;
+ NODE *newnode;
+ int i;
#ifdef DEBUG
- ErrorF("%s\n", n->n_name);
+ ErrorF("%s\n", n->n_name);
#endif
- newnode = xnfalloc(sizeof(NODE));
- memcpy(newnode, n, sizeof(NODE));
- if (last)
- last->n_next = newnode;
- else
- sorted = newnode;
- last = newnode;
- newnode->n_next = NULL;
-
- for (np = n->n_arcs, i = n->n_narcs; --i >= 0; np++)
- --(*np)->n_refcnt;
- n->n_narcs = 0;
- *n->n_prevp = n->n_next;
- if (n->n_next)
- n->n_next->n_prevp = n->n_prevp;
+ newnode = xnfalloc(sizeof(NODE));
+ memcpy(newnode, n, sizeof(NODE));
+ if (last)
+ last->n_next = newnode;
+ else
+ sorted = newnode;
+ last = newnode;
+ newnode->n_next = NULL;
+
+ for (np = n->n_arcs, i = n->n_narcs; --i >= 0; np++)
+ --(*np)->n_refcnt;
+ n->n_narcs = 0;
+ *n->n_prevp = n->n_next;
+ if (n->n_next)
+ n->n_next->n_prevp = n->n_prevp;
}
-
static void
-free_nodes(NODE *nodelist)
+free_nodes(NODE * nodelist)
{
- NODE *n, *nextnode;
+ NODE *n, *nextnode;
- for (n = nodelist; n;) {
- nextnode = n->n_next;
- xfree(n);
- n = nextnode;
- }
+ for (n = nodelist; n;) {
+ nextnode = n->n_next;
+ xfree(n);
+ n = nextnode;
+ }
}
-
/* look for the longest? cycle from node from to node to. */
static int
-find_cycle(NODE *from, NODE *to, int longest_len, int depth)
+find_cycle(NODE * from, NODE * to, int longest_len, int depth)
{
- NODE **np;
- int i, len;
-
- /*
- * avoid infinite loops and ignore portions of the graph known
- * to be acyclic
- */
- if (from->n_flags & (NF_NODEST|NF_MARK|NF_ACYCLIC))
- return (0);
- from->n_flags |= NF_MARK;
-
- for (np = from->n_arcs, i = from->n_narcs; --i >= 0; np++) {
- cycle_buf[depth] = *np;
- if (*np == to) {
- if (depth + 1 > longest_len) {
- longest_len = depth + 1;
- memcpy((char *)longest_cycle,
- (char *)cycle_buf,
- longest_len * sizeof(NODE *));
- }
- } else {
- if ((*np)->n_flags & (NF_MARK|NF_ACYCLIC|NF_NODEST))
- continue;
- len = find_cycle(*np, to, longest_len, depth + 1);
+ NODE **np;
+ int i, len;
+
+ /*
+ * avoid infinite loops and ignore portions of the graph known
+ * to be acyclic
+ */
+ if (from->n_flags & (NF_NODEST | NF_MARK | NF_ACYCLIC))
+ return (0);
+ from->n_flags |= NF_MARK;
+
+ for (np = from->n_arcs, i = from->n_narcs; --i >= 0; np++) {
+ cycle_buf[depth] = *np;
+ if (*np == to) {
+ if (depth + 1 > longest_len) {
+ longest_len = depth + 1;
+ memcpy((char *)longest_cycle,
+ (char *)cycle_buf, longest_len * sizeof(NODE *));
+ }
+ } else {
+ if ((*np)->n_flags & (NF_MARK | NF_ACYCLIC | NF_NODEST))
+ continue;
+ len = find_cycle(*np, to, longest_len, depth + 1);
#ifdef DEBUG
- ErrorF("%*s %s->%s %d\n", depth, "",
- from->n_name, to->n_name, len);
+ ErrorF("%*s %s->%s %d\n", depth, "",
+ from->n_name, to->n_name, len);
#endif
- if (len == 0)
- (*np)->n_flags |= NF_NODEST;
+ if (len == 0)
+ (*np)->n_flags |= NF_NODEST;
- if (len > longest_len)
- longest_len = len;
+ if (len > longest_len)
+ longest_len = len;
- if (len > 0 && !longest)
- break;
- }
+ if (len > 0 && !longest)
+ break;
}
- from->n_flags &= ~NF_MARK;
- return (longest_len);
+ }
+ from->n_flags &= ~NF_MARK;
+ return (longest_len);
}
-
/* do topological sort on graph */
static void
tsort(void)
{
- NODE *n, *next;
- int cnt, i;
-
- while (graph != NULL) {
- /*
- * Keep getting rid of simple cases until there are none left,
- * if there are any nodes still in the graph, then there is
- * a cycle in it.
- */
- do {
- for (cnt = 0, n = graph; n != NULL; n = next) {
- next = n->n_next;
- if (n->n_refcnt == 0) {
- remove_node(n);
- ++cnt;
- }
- }
- } while (graph != NULL && cnt);
-
- if (graph == NULL)
- break;
-
- if (!cycle_buf) {
- /*
- * Allocate space for two cycle logs - one to be used
- * as scratch space, the other to save the longest
- * cycle.
- */
- for (cnt = 0, n = graph; n != NULL; n = n->n_next)
- ++cnt;
- cycle_buf = xnfalloc(sizeof(NODE *) * cnt);
- longest_cycle = xnfalloc(sizeof(NODE *) * cnt);
- if (cycle_buf == NULL || longest_cycle == NULL)
- return;
+ NODE *n, *next;
+ int cnt, i;
+
+ while (graph != NULL) {
+ /*
+ * Keep getting rid of simple cases until there are none left,
+ * if there are any nodes still in the graph, then there is
+ * a cycle in it.
+ */
+ do {
+ for (cnt = 0, n = graph; n != NULL; n = next) {
+ next = n->n_next;
+ if (n->n_refcnt == 0) {
+ remove_node(n);
+ ++cnt;
}
- for (n = graph; n != NULL; n = n->n_next)
- if (!(n->n_flags & NF_ACYCLIC)) {
- if ((cnt = find_cycle(n, n, 0, 0))) {
- ErrorF("tsort: cycle in data");
- for (i = 0; i < cnt; i++)
- ErrorF("%s",
- longest_cycle[i]->n_name);
- remove_node(n);
- clear_cycle();
- break;
- } else {
- /* to avoid further checks */
- n->n_flags |= NF_ACYCLIC;
- clear_cycle();
- }
- }
-
- if (n == NULL)
- ErrorF("tsort: internal error -- could not find cycle");
+ }
+ } while (graph != NULL && cnt);
+
+ if (graph == NULL)
+ break;
+
+ if (!cycle_buf) {
+ /*
+ * Allocate space for two cycle logs - one to be used
+ * as scratch space, the other to save the longest
+ * cycle.
+ */
+ for (cnt = 0, n = graph; n != NULL; n = n->n_next)
+ ++cnt;
+ cycle_buf = xnfalloc(sizeof(NODE *) * cnt);
+ longest_cycle = xnfalloc(sizeof(NODE *) * cnt);
+ if (cycle_buf == NULL || longest_cycle == NULL)
+ return;
}
- if (cycle_buf)
- xfree(cycle_buf);
- if (longest_cycle)
- xfree(longest_cycle);
- if (graph)
- free_nodes(graph);
+ for (n = graph; n != NULL; n = n->n_next)
+ if (!(n->n_flags & NF_ACYCLIC)) {
+ if ((cnt = find_cycle(n, n, 0, 0))) {
+ ErrorF("tsort: cycle in data");
+ for (i = 0; i < cnt; i++)
+ ErrorF("%s", longest_cycle[i]->n_name);
+ remove_node(n);
+ clear_cycle();
+ break;
+ } else {
+ /* to avoid further checks */
+ n->n_flags |= NF_ACYCLIC;
+ clear_cycle();
+ }
+ }
+
+ if (n == NULL)
+ ErrorF("tsort: internal error -- could not find cycle");
+ }
+ if (cycle_buf)
+ xfree(cycle_buf);
+ if (longest_cycle)
+ xfree(longest_cycle);
+ if (graph)
+ free_nodes(graph);
}
void
LoaderSortExtensions()
{
- int i, j;
- ExtensionModule *ext, *newList;
- NODE *node;
-
- graph = NULL;
- longest = 0;
- sorted = NULL;
- last = NULL;
- cycle_buf = NULL;
- longest_cycle = NULL;
-
- /*
- * Parse list and build the graph. Enter them in reverse order
- * because tsort() will reverse those that have no depedencies.
- */
- for (i = numExtensionModules - 1; i >= 0; i--) {
- ext = &ExtensionModuleList[i];
- add_arc(ext->name, ext->name);
+ int i, j;
+ ExtensionModule *ext, *newList;
+ NODE *node;
+
+ graph = NULL;
+ longest = 0;
+ sorted = NULL;
+ last = NULL;
+ cycle_buf = NULL;
+ longest_cycle = NULL;
+
+ /*
+ * Parse list and build the graph. Enter them in reverse order
+ * because tsort() will reverse those that have no depedencies.
+ */
+ for (i = numExtensionModules - 1; i >= 0; i--) {
+ ext = &ExtensionModuleList[i];
+ add_arc(ext->name, ext->name);
#ifdef DEBUG
- ErrorF("Extension %s:\n", ext->name);
+ ErrorF("Extension %s:\n", ext->name);
#endif
- if (ext->initDependencies)
- for (j = 0; ext->initDependencies[j]; j++) {
- add_arc(ext->initDependencies[j], ext->name);
+ if (ext->initDependencies)
+ for (j = 0; ext->initDependencies[j]; j++) {
+ add_arc(ext->initDependencies[j], ext->name);
#ifdef DEBUG
- ErrorF("\t%s\n", ext->initDependencies[j]);
+ ErrorF("\t%s\n", ext->initDependencies[j]);
#endif
- }
- }
- tsort();
- newList = xnfalloc((numExtensionModules + 1) * sizeof(ExtensionModule));
- i = 0;
- for (node = sorted; node; node = node->n_next) {
- for (j = 0; j < numExtensionModules; j++)
- if (!strcmp(node->n_name, ExtensionModuleList[j].name))
- break;
- if (j != numExtensionModules)
- newList[i++] = ExtensionModuleList[j];
- }
- if (sorted)
- free_nodes(sorted);
- newList[i].name = NULL;
- xfree(ExtensionModuleList);
- ExtensionModuleList = newList;
+ }
+ }
+ tsort();
+ newList = xnfalloc((numExtensionModules + 1) * sizeof(ExtensionModule));
+ i = 0;
+ for (node = sorted; node; node = node->n_next) {
+ for (j = 0; j < numExtensionModules; j++)
+ if (!strcmp(node->n_name, ExtensionModuleList[j].name))
+ break;
+ if (j != numExtensionModules)
+ newList[i++] = ExtensionModuleList[j];
+ }
+ if (sorted)
+ free_nodes(sorted);
+ newList[i].name = NULL;
+ xfree(ExtensionModuleList);
+ ExtensionModuleList = newList;
#ifdef DEBUG
- for (i = 0; ExtensionModuleList[i].name; i++)
- ErrorF("Extension %s\n", ExtensionModuleList[i].name);
+ for (i = 0; ExtensionModuleList[i].name; i++)
+ ErrorF("Extension %s\n", ExtensionModuleList[i].name);
#endif
}
-
diff --git a/hw/xfree86/loader/loadfont.c b/hw/xfree86/loader/loadfont.c
index 8ab5d0d6e..6886692da 100644
--- a/hw/xfree86/loader/loadfont.c
+++ b/hw/xfree86/loader/loadfont.c
@@ -1,4 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadfont.c,v 1.2 1998/12/13 12:42:41 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadfont.c,v 1.4 2003/10/15 16:29:04 dawes Exp $ */
+/*
+ * Copyright (c) 1998 by The XFree86 Project, 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 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).
+ */
/* Maybe this file belongs in lib/font/fontfile/module/ ? */
@@ -10,44 +36,42 @@
FontModule *FontModuleList = NULL;
static int numFontModules = 0;
-
static FontModule *
NewFontModule(void)
{
- FontModule *save = FontModuleList;
- int n;
-
- /* Sanity check */
- if (!FontModuleList)
- numFontModules = 0;
-
- n = numFontModules + 1;
- FontModuleList = xrealloc(FontModuleList, (n + 1) * sizeof(FontModule));
- if (FontModuleList == NULL) {
- FontModuleList = save;
- return NULL;
- } else {
- numFontModules++;
- FontModuleList[numFontModules].name = NULL;
- return FontModuleList + (numFontModules - 1);
- }
+ FontModule *save = FontModuleList;
+ int n;
+
+ /* Sanity check */
+ if (!FontModuleList)
+ numFontModules = 0;
+
+ n = numFontModules + 1;
+ FontModuleList = xrealloc(FontModuleList, (n + 1) * sizeof(FontModule));
+ if (FontModuleList == NULL) {
+ FontModuleList = save;
+ return NULL;
+ } else {
+ numFontModules++;
+ FontModuleList[numFontModules].name = NULL;
+ return FontModuleList + (numFontModules - 1);
+ }
}
void
-LoadFont(FontModule *f)
+LoadFont(FontModule * f)
{
- FontModule *newfont;
+ FontModule *newfont;
- if (f == NULL)
- return;
+ if (f == NULL)
+ return;
- if (!(newfont = NewFontModule()))
- return;
+ if (!(newfont = NewFontModule()))
+ return;
- xf86MsgVerb(X_INFO, 2, "Loading font %s\n", f->name);
+ xf86MsgVerb(X_INFO, 2, "Loading font %s\n", f->name);
- newfont->name = f->name;
- newfont->initFunc = f->initFunc;
- newfont->module = f->module;
+ newfont->name = f->name;
+ newfont->initFunc = f->initFunc;
+ newfont->module = f->module;
}
-
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index deba80643..733f6feb1 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadmod.c,v 1.68 2002/07/30 18:36:18 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/loadmod.c,v 1.73 2003/11/03 05:11:51 tsi Exp $ */
/*
*
@@ -22,8 +22,32 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-
-/* This file is best viewed with tab stops set to 4 spaces */
+/*
+ * Copyright (c) 1997-2002 by The XFree86 Project, 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 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).
+ */
#include "os.h"
/* For stat() and related stuff */
@@ -48,50 +72,51 @@
extern int check_unresolved_sema;
typedef struct _pattern {
- const char * pattern;
- regex_t rex;
+ const char *pattern;
+ regex_t rex;
} PatternRec, *PatternPtr;
/* Prototypes for static functions */
-static char *FindModule (const char *, const char *, const char **, PatternPtr);
-static Bool CheckVersion (const char *, XF86ModuleVersionInfo *,
- const XF86ModReqInfo *);
-static void UnloadModuleOrDriver (ModuleDescPtr mod);
+static char *FindModule(const char *, const char *, const char **,
+ PatternPtr);
+static Bool CheckVersion(const char *, XF86ModuleVersionInfo *,
+ const XF86ModReqInfo *);
+static void UnloadModuleOrDriver(ModuleDescPtr mod);
static char *LoaderGetCanonicalName(const char *, PatternPtr);
static void RemoveChild(ModuleDescPtr);
ModuleVersions LoaderVersionInfo = {
- XF86_VERSION_CURRENT,
- ABI_ANSIC_VERSION,
- ABI_VIDEODRV_VERSION,
- ABI_XINPUT_VERSION,
- ABI_EXTENSION_VERSION,
- ABI_FONT_VERSION
+ XF86_VERSION_CURRENT,
+ ABI_ANSIC_VERSION,
+ ABI_VIDEODRV_VERSION,
+ ABI_XINPUT_VERSION,
+ ABI_EXTENSION_VERSION,
+ ABI_FONT_VERSION
};
#if 0
void
-LoaderFixups (void)
+LoaderFixups(void)
{
- /* Need to call LRS here because the frame buffers get loaded last,
- * and the drivers depend on them. */
+ /* Need to call LRS here because the frame buffers get loaded last,
+ * and the drivers depend on them. */
- LoaderResolveSymbols ();
+ LoaderResolveSymbols();
}
#endif
static void
FreeStringList(char **paths)
{
- char **p;
+ char **p;
- if (!paths)
- return;
+ if (!paths)
+ return;
- for (p = paths; *p; p++)
- xfree(*p);
+ for (p = paths; *p; p++)
+ xfree(*p);
- xfree(paths);
+ xfree(paths);
}
static char **defaultPathList = NULL;
@@ -104,90 +129,89 @@ static char **defaultPathList = NULL;
static char **
InitPathList(const char *path)
{
- char *fullpath = NULL;
- char *elem = NULL;
- char **list = NULL, **save = NULL;
- int len;
- int addslash;
- int n = 0;
-
- if (!path)
- return defaultPathList;
-
- fullpath = xstrdup(path);
- if (!fullpath)
- return NULL;
- elem = strtok(fullpath, ",");
- while (elem) {
- /* Only allow fully specified paths */
+ char *fullpath = NULL;
+ char *elem = NULL;
+ char **list = NULL, **save = NULL;
+ int len;
+ int addslash;
+ int n = 0;
+
+ if (!path)
+ return defaultPathList;
+
+ fullpath = xstrdup(path);
+ if (!fullpath)
+ return NULL;
+ elem = strtok(fullpath, ",");
+ while (elem) {
+ /* Only allow fully specified paths */
#ifndef __UNIXOS2__
- if (*elem == '/')
+ if (*elem == '/')
#else
- if (*elem == '/' || (strlen(elem) > 2 && isalpha(elem[0]) &&
- elem[1] == ':' && elem[2] == '/'))
+ if (*elem == '/' || (strlen(elem) > 2 && isalpha(elem[0]) &&
+ elem[1] == ':' && elem[2] == '/'))
#endif
- {
- len = strlen(elem);
- addslash = (elem[len - 1] != '/');
- if (addslash)
- len++;
- save = list;
- list = xrealloc(list, (n + 2) * sizeof(char *));
- if (!list) {
- if (save) {
- save[n] = NULL;
- FreeStringList(save);
- }
- xfree(fullpath);
- return NULL;
- }
- list[n] = xalloc(len + 1);
- if (!list[n]) {
- FreeStringList(list);
- xfree(fullpath);
- return NULL;
- }
- strcpy(list[n], elem);
- if (addslash) {
- list[n][len - 1] = '/';
- list[n][len] = '\0';
- }
- n++;
+ {
+ len = strlen(elem);
+ addslash = (elem[len - 1] != '/');
+ if (addslash)
+ len++;
+ save = list;
+ list = xrealloc(list, (n + 2) * sizeof(char *));
+ if (!list) {
+ if (save) {
+ save[n] = NULL;
+ FreeStringList(save);
}
- elem = strtok(NULL, ",");
+ xfree(fullpath);
+ return NULL;
+ }
+ list[n] = xalloc(len + 1);
+ if (!list[n]) {
+ FreeStringList(list);
+ xfree(fullpath);
+ return NULL;
+ }
+ strcpy(list[n], elem);
+ if (addslash) {
+ list[n][len - 1] = '/';
+ list[n][len] = '\0';
+ }
+ n++;
}
- if (list)
- list[n] = NULL;
- return list;
+ elem = strtok(NULL, ",");
+ }
+ if (list)
+ list[n] = NULL;
+ return list;
}
static void
FreePathList(char **pathlist)
{
- if (pathlist && pathlist != defaultPathList)
- FreeStringList(pathlist);
+ if (pathlist && pathlist != defaultPathList)
+ FreeStringList(pathlist);
}
void
LoaderSetPath(const char *path)
{
- if (!path)
- return;
+ if (!path)
+ return;
- defaultPathList = InitPathList(path);
+ defaultPathList = InitPathList(path);
}
/* Standard set of module subdirectories to search, in order of preference */
-static const char *stdSubdirs[] =
-{
- "drivers/",
- "input/",
- "multimedia/",
- "extensions/",
- "fonts/",
- "internal/",
- "",
- NULL
+static const char *stdSubdirs[] = {
+ "drivers/",
+ "input/",
+ "multimedia/",
+ "extensions/",
+ "fonts/",
+ "internal/",
+ "",
+ NULL
};
/*
@@ -195,519 +219,529 @@ static const char *stdSubdirs[] =
* These are regular expressions (suitable for use with POSIX regex(3)).
*/
static PatternRec stdPatterns[] = {
- { "^lib(.*)\\.so$", },
- { "^lib(.*)\\.a$", },
- { "(.*)_drv\\.so$", },
- { "(.*)_drv\\.o$", },
- { "(.*)\\.so$", },
- { "(.*)\\.a$", },
- { "(.*)\\.o$", },
- { NULL, }
+ {"^lib(.*)\\.so$",},
+ {"^lib(.*)\\.a$",},
+ {"(.*)_drv\\.so$",},
+ {"(.*)_drv\\.o$",},
+ {"(.*)\\.so$",},
+ {"(.*)\\.a$",},
+ {"(.*)\\.o$",},
+ {NULL,}
};
static PatternPtr
InitPatterns(const char **patternlist)
{
- char errmsg[80];
- int i, e;
- PatternPtr patterns = NULL;
- PatternPtr p = NULL;
- static int firstTime = 1;
- const char **s;
-
- if (firstTime) {
- /* precompile stdPatterns */
- firstTime = 0;
- for (p = stdPatterns; p->pattern; p++)
- if ((e = regcomp(&p->rex, p->pattern, REG_EXTENDED)) != 0) {
- regerror(e, &p->rex, errmsg, sizeof(errmsg));
- FatalError("InitPatterns: regcomp error for `%s': %s\n",
- p->pattern, errmsg);
- }
+ char errmsg[80];
+ int i, e;
+ PatternPtr patterns = NULL;
+ PatternPtr p = NULL;
+ static int firstTime = 1;
+ const char **s;
+
+ if (firstTime) {
+ /* precompile stdPatterns */
+ firstTime = 0;
+ for (p = stdPatterns; p->pattern; p++)
+ if ((e = regcomp(&p->rex, p->pattern, REG_EXTENDED)) != 0) {
+ regerror(e, &p->rex, errmsg, sizeof(errmsg));
+ FatalError("InitPatterns: regcomp error for `%s': %s\n",
+ p->pattern, errmsg);
+ }
+ }
+
+ if (patternlist) {
+ for (i = 0, s = patternlist; *s; i++, s++)
+ if (*s == DEFAULT_LIST)
+ i += sizeof(stdPatterns) / sizeof(stdPatterns[0]) - 1 - 1;
+ patterns = xalloc((i + 1) * sizeof(PatternRec));
+ if (!patterns) {
+ return NULL;
}
-
- if (patternlist) {
- for (i = 0, s = patternlist; *s; i++, s++)
- if (*s == DEFAULT_LIST)
- i += sizeof(stdPatterns) / sizeof(stdPatterns[0]) - 1 - 1;
- patterns = xalloc((i + 1) * sizeof(PatternRec));
- if (!patterns) {
- return NULL;
+ for (i = 0, s = patternlist; *s; i++, s++)
+ if (*s != DEFAULT_LIST) {
+ p = patterns + i;
+ p->pattern = *s;
+ if ((e = regcomp(&p->rex, p->pattern, REG_EXTENDED)) != 0) {
+ regerror(e, &p->rex, errmsg, sizeof(errmsg));
+ ErrorF("InitPatterns: regcomp error for `%s': %s\n",
+ p->pattern, errmsg);
+ i--;
}
- for (i = 0, s = patternlist; *s; i++, s++)
- if (*s != DEFAULT_LIST) {
- p = patterns + i;
- p->pattern = *s;
- if ((e = regcomp(&p->rex, p->pattern, REG_EXTENDED)) != 0) {
- regerror(e, &p->rex, errmsg, sizeof(errmsg));
- ErrorF("InitPatterns: regcomp error for `%s': %s\n",
- p->pattern, errmsg);
- i--;
- }
- } else {
- for (p = stdPatterns; p->pattern; p++, i++)
- patterns[i] = *p;
- if (p != stdPatterns)
- i--;
- }
- patterns[i].pattern = NULL;
- } else
- patterns = stdPatterns;
- return patterns;
+ } else {
+ for (p = stdPatterns; p->pattern; p++, i++)
+ patterns[i] = *p;
+ if (p != stdPatterns)
+ i--;
+ }
+ patterns[i].pattern = NULL;
+ } else
+ patterns = stdPatterns;
+ return patterns;
}
static void
FreePatterns(PatternPtr patterns)
{
- if (patterns && patterns != stdPatterns)
- xfree(patterns);
+ if (patterns && patterns != stdPatterns)
+ xfree(patterns);
}
static const char **
InitSubdirs(const char **subdirlist)
{
- int i;
- char **subdirs = NULL;
- const char **s, **stmp = NULL;
+ int i;
+ const char **tmp_subdirlist = NULL;
+ char **subdirs = NULL;
+ const char **s, **stmp = NULL;
const char *osname;
const char *slash;
int oslen = 0, len;
Bool indefault;
if (subdirlist == NULL) {
- subdirlist = xalloc(2 * sizeof(char *));
- if (subdirlist == NULL)
- return NULL;
- subdirlist[0] = DEFAULT_LIST;
- subdirlist[1] = NULL;
- }
-
+ subdirlist = tmp_subdirlist = xalloc(2 * sizeof(char *));
+ if (subdirlist == NULL)
+ return NULL;
+ subdirlist[0] = DEFAULT_LIST;
+ subdirlist[1] = NULL;
+ }
+
LoaderGetOS(&osname, NULL, NULL, NULL);
oslen = strlen(osname);
{
- /* Count number of entries and check for invalid paths */
- for (i = 0, s = subdirlist; *s; i++, s++) {
- if (*s == DEFAULT_LIST) {
- i += sizeof(stdSubdirs) / sizeof(stdSubdirs[0]) - 1 - 1;
- } else {
- /*
- * Path validity check. Don't allow absolute paths, or
- * paths containing "..". To catch absolute paths on
- * platforms that use driver letters, don't allow the ':'
- * character to appear at all.
- */
- if (**s == '/' || **s == '\\' || strchr(*s, ':') ||
- strstr(*s, "..")) {
- xf86Msg(X_ERROR, "InitSubdirs: Bad subdir: \"%s\"\n", *s);
- return NULL;
- }
- }
+ /* Count number of entries and check for invalid paths */
+ for (i = 0, s = subdirlist; *s; i++, s++) {
+ if (*s == DEFAULT_LIST) {
+ i += sizeof(stdSubdirs) / sizeof(stdSubdirs[0]) - 1 - 1;
+ } else {
+ /*
+ * Path validity check. Don't allow absolute paths, or
+ * paths containing "..". To catch absolute paths on
+ * platforms that use driver letters, don't allow the ':'
+ * character to appear at all.
+ */
+ if (**s == '/' || **s == '\\' || strchr(*s, ':') ||
+ strstr(*s, "..")) {
+ xf86Msg(X_ERROR, "InitSubdirs: Bad subdir: \"%s\"\n", *s);
+ if (tmp_subdirlist)
+ xfree(tmp_subdirlist);
+ return NULL;
}
- subdirs = xalloc((i * 2 + 1) * sizeof(char *));
- if (!subdirs)
- return NULL;
- i = 0;
- s = subdirlist;
+ }
+ }
+ subdirs = xalloc((i * 2 + 1) * sizeof(char *));
+ if (!subdirs) {
+ if (tmp_subdirlist)
+ xfree(tmp_subdirlist);
+ return NULL;
+ }
+ i = 0;
+ s = subdirlist;
+ indefault = FALSE;
+ while (*s) {
+ if (*s == DEFAULT_LIST) {
+ /* Divert to the default list */
+ indefault = TRUE;
+ stmp = ++s;
+ s = stdSubdirs;
+ }
+ len = strlen(*s);
+ if (**s && (*s)[len - 1] != '/') {
+ slash = "/";
+ len++;
+ } else
+ slash = "";
+ len += oslen + 2;
+ if (!(subdirs[i] = xalloc(len))) {
+ while (--i >= 0)
+ xfree(subdirs[i]);
+ xfree(subdirs);
+ if (tmp_subdirlist)
+ xfree(tmp_subdirlist);
+ return NULL;
+ }
+ /* tack on the OS name */
+ sprintf(subdirs[i], "%s%s%s/", *s, slash, osname);
+ i++;
+ /* path as given */
+ subdirs[i] = xstrdup(*s);
+ i++;
+ s++;
+ if (indefault && !s) {
+ /* revert back to the main list */
indefault = FALSE;
- while (*s) {
- if (*s == DEFAULT_LIST) {
- /* Divert to the default list */
- indefault = TRUE;
- stmp = ++s;
- s = stdSubdirs;
- }
- len = strlen(*s);
- if (**s && (*s)[len - 1] != '/') {
- slash = "/";
- len++;
- } else
- slash = "";
- len += oslen + 2;
- if (!(subdirs[i] = xalloc(len)))
- return NULL;
- /* tack on the OS name */
- sprintf(subdirs[i], "%s%s%s/", *s, slash, osname);
- i++;
- /* path as given */
- subdirs[i] = xstrdup(*s);
- i++;
- s++;
- if (indefault && !s) {
- /* revert back to the main list */
- indefault = FALSE;
- s = stmp;
- }
- }
- subdirs[i] = NULL;
+ s = stmp;
+ }
}
- return (const char **)subdirs;
+ subdirs[i] = NULL;
+ }
+ if (tmp_subdirlist)
+ xfree(tmp_subdirlist);
+ return (const char **)subdirs;
}
static void
FreeSubdirs(const char **subdirs)
{
- const char **s;
+ const char **s;
- if (subdirs) {
- for (s = subdirs; *s; s++)
- xfree(*s);
- xfree(subdirs);
- }
+ if (subdirs) {
+ for (s = subdirs; *s; s++)
+ xfree(*s);
+ xfree(subdirs);
+ }
}
static char *
-FindModule (const char *module, const char *dir, const char **subdirlist,
- PatternPtr patterns)
+FindModule(const char *module, const char *dir, const char **subdirlist,
+ PatternPtr patterns)
{
- char buf[PATH_MAX + 1];
- char *dirpath = NULL;
- char *name = NULL;
- struct stat stat_buf;
- int len, dirlen;
- char *fp;
- DIR *d;
- const char **subdirs = NULL;
- PatternPtr p = NULL;
- const char **s;
- struct dirent *dp;
- regmatch_t match[2];
-
- subdirs = InitSubdirs(subdirlist);
- if (!subdirs)
- return NULL;
+ char buf[PATH_MAX + 1];
+ char *dirpath = NULL;
+ char *name = NULL;
+ struct stat stat_buf;
+ int len, dirlen;
+ char *fp;
+ DIR *d;
+ const char **subdirs = NULL;
+ PatternPtr p = NULL;
+ const char **s;
+ struct dirent *dp;
+ regmatch_t match[2];
+
+ subdirs = InitSubdirs(subdirlist);
+ if (!subdirs)
+ return NULL;
#ifndef __EMX__
- dirpath = (char *)dir;
+ dirpath = (char *)dir;
#else
- dirpath = xalloc(strlen(dir) + 10);
- strcpy(dirpath, (char *) __XOS2RedirRoot (dir));
+ dirpath = xalloc(strlen(dir) + 10);
+ strcpy(dirpath, (char *)__XOS2RedirRoot(dir));
#endif
- if (strlen(dirpath) > PATH_MAX)
- return NULL;
- /*xf86Msg(X_INFO,"OS2DIAG: FindModule: dirpath=%s\n",dirpath);*/
-
- for (s = subdirs; *s; s++) {
- if ((dirlen = strlen(dirpath) + strlen(*s)) > PATH_MAX)
- continue;
- strcpy(buf, dirpath);
- strcat(buf, *s);
- /*xf86Msg(X_INFO,"OS2DIAG: FindModule: buf=%s\n",buf);*/
- fp = buf + dirlen;
- if (stat(buf, &stat_buf) == 0 && S_ISDIR(stat_buf.st_mode) &&
- (d = opendir(buf))) {
- if (buf[dirlen - 1] != '/') {
- buf[dirlen++] = '/';
- fp++;
- }
- while ((dp = readdir(d))) {
- if (dirlen + strlen(dp->d_name) + 1 > PATH_MAX)
- continue;
- strcpy(fp, dp->d_name);
- if (!(stat(buf, &stat_buf) == 0 && S_ISREG(stat_buf.st_mode)))
- continue;
- for (p = patterns; p->pattern; p++) {
- if (regexec(&p->rex, dp->d_name, 2, match, 0) == 0 &&
- match[1].rm_so != -1) {
- len = match[1].rm_eo - match[1].rm_so;
- if (len == strlen(module) &&
- strncmp(module, dp->d_name + match[1].rm_so, len) == 0) {
- /*xf86Msg(X_INFO,"OS2DIAG: matching %s\n",buf);*/
- name = buf;
- break;
- }
- }
- }
- if (name)
- break;
+ if (strlen(dirpath) > PATH_MAX)
+ return NULL;
+ /*xf86Msg(X_INFO,"OS2DIAG: FindModule: dirpath=%s\n",dirpath); */
+
+ for (s = subdirs; *s; s++) {
+ if ((dirlen = strlen(dirpath) + strlen(*s)) > PATH_MAX)
+ continue;
+ strcpy(buf, dirpath);
+ strcat(buf, *s);
+ /*xf86Msg(X_INFO,"OS2DIAG: FindModule: buf=%s\n",buf); */
+ fp = buf + dirlen;
+ if (stat(buf, &stat_buf) == 0 && S_ISDIR(stat_buf.st_mode) &&
+ (d = opendir(buf))) {
+ if (buf[dirlen - 1] != '/') {
+ buf[dirlen++] = '/';
+ fp++;
+ }
+ while ((dp = readdir(d))) {
+ if (dirlen + strlen(dp->d_name) + 1 > PATH_MAX)
+ continue;
+ strcpy(fp, dp->d_name);
+ if (!(stat(buf, &stat_buf) == 0 && S_ISREG(stat_buf.st_mode)))
+ continue;
+ for (p = patterns; p->pattern; p++) {
+ if (regexec(&p->rex, dp->d_name, 2, match, 0) == 0 &&
+ match[1].rm_so != -1) {
+ len = match[1].rm_eo - match[1].rm_so;
+ if (len == strlen(module) &&
+ strncmp(module, dp->d_name + match[1].rm_so,
+ len) == 0) {
+ /*xf86Msg(X_INFO,"OS2DIAG: matching %s\n",buf); */
+ name = buf;
+ break;
}
- closedir(d);
- if (name)
- break;
+ }
}
+ if (name)
+ break;
+ }
+ closedir(d);
+ if (name)
+ break;
}
- FreeSubdirs(subdirs);
- if (dirpath != dir)
- xfree(dirpath);
-
- if (name) {
- return xstrdup(name);
- }
- return NULL;
+ }
+ FreeSubdirs(subdirs);
+ if (dirpath != dir)
+ xfree(dirpath);
+
+ if (name) {
+ return xstrdup(name);
+ }
+ return NULL;
}
char **
LoaderListDirs(const char **subdirlist, const char **patternlist)
{
- char buf[PATH_MAX + 1];
- char **pathlist;
- char **elem;
- const char **subdirs;
- const char **s;
- PatternPtr patterns;
- PatternPtr p;
- DIR *d;
- struct dirent *dp;
- regmatch_t match[2];
- struct stat stat_buf;
- int len, dirlen;
- char *fp;
- char **listing = NULL;
- char **save;
- int n = 0;
-
- if (!(pathlist = InitPathList(NULL)))
- return NULL;
- if (!(subdirs = InitSubdirs(subdirlist))) {
- FreePathList(pathlist);
- return NULL;
- }
- if (!(patterns = InitPatterns(patternlist))) {
- FreePathList(pathlist);
- FreeSubdirs(subdirs);
- return NULL;
- }
+ char buf[PATH_MAX + 1];
+ char **pathlist;
+ char **elem;
+ const char **subdirs;
+ const char **s;
+ PatternPtr patterns;
+ PatternPtr p;
+ DIR *d;
+ struct dirent *dp;
+ regmatch_t match[2];
+ struct stat stat_buf;
+ int len, dirlen;
+ char *fp;
+ char **listing = NULL;
+ char **save;
+ int n = 0;
+
+ if (!(pathlist = InitPathList(NULL)))
+ return NULL;
+ if (!(subdirs = InitSubdirs(subdirlist))) {
+ FreePathList(pathlist);
+ return NULL;
+ }
+ if (!(patterns = InitPatterns(patternlist))) {
+ FreePathList(pathlist);
+ FreeSubdirs(subdirs);
+ return NULL;
+ }
- for (elem = pathlist; *elem; elem++) {
- for (s = subdirs; *s; s++) {
- if ((dirlen = strlen(*elem) + strlen(*s)) > PATH_MAX)
- continue;
- strcpy(buf, *elem);
- strcat(buf, *s);
- fp = buf + dirlen;
- if (stat(buf, &stat_buf) == 0 && S_ISDIR(stat_buf.st_mode) &&
- (d = opendir(buf))) {
- if (buf[dirlen - 1] != '/') {
- buf[dirlen++] = '/';
- fp++;
- }
- while ((dp = readdir(d))) {
- if (dirlen + strlen(dp->d_name) > PATH_MAX)
- continue;
- strcpy(fp, dp->d_name);
- if (!(stat(buf, &stat_buf) == 0 &&
- S_ISREG(stat_buf.st_mode)))
- continue;
- for (p = patterns; p->pattern; p++) {
- if (regexec(&p->rex, dp->d_name, 2, match, 0) == 0 &&
- match[1].rm_so != -1) {
- len = match[1].rm_eo - match[1].rm_so;
- save = listing;
- listing = xrealloc(listing,
- (n + 2) * sizeof(char *));
- if (!listing) {
- if (save) {
- save[n] = NULL;
- FreeStringList(save);
- }
- FreePathList(pathlist);
- FreeSubdirs(subdirs);
- FreePatterns(patterns);
- return NULL;
- }
- listing[n] = xalloc(len + 1);
- if (!listing[n]) {
- FreeStringList(listing);
- FreePathList(pathlist);
- FreeSubdirs(subdirs);
- FreePatterns(patterns);
- return NULL;
- }
- strncpy(listing[n], dp->d_name + match[1].rm_so,
- len);
- listing[n][len] = '\0';
- n++;
- break;
- }
- }
+ for (elem = pathlist; *elem; elem++) {
+ for (s = subdirs; *s; s++) {
+ if ((dirlen = strlen(*elem) + strlen(*s)) > PATH_MAX)
+ continue;
+ strcpy(buf, *elem);
+ strcat(buf, *s);
+ fp = buf + dirlen;
+ if (stat(buf, &stat_buf) == 0 && S_ISDIR(stat_buf.st_mode) &&
+ (d = opendir(buf))) {
+ if (buf[dirlen - 1] != '/') {
+ buf[dirlen++] = '/';
+ fp++;
+ }
+ while ((dp = readdir(d))) {
+ if (dirlen + strlen(dp->d_name) > PATH_MAX)
+ continue;
+ strcpy(fp, dp->d_name);
+ if (!(stat(buf, &stat_buf) == 0 &&
+ S_ISREG(stat_buf.st_mode)))
+ continue;
+ for (p = patterns; p->pattern; p++) {
+ if (regexec(&p->rex, dp->d_name, 2, match, 0) == 0 &&
+ match[1].rm_so != -1) {
+ len = match[1].rm_eo - match[1].rm_so;
+ save = listing;
+ listing = xrealloc(listing,
+ (n + 2) * sizeof(char *));
+ if (!listing) {
+ if (save) {
+ save[n] = NULL;
+ FreeStringList(save);
}
- closedir(d);
+ FreePathList(pathlist);
+ FreeSubdirs(subdirs);
+ FreePatterns(patterns);
+ return NULL;
+ }
+ listing[n] = xalloc(len + 1);
+ if (!listing[n]) {
+ FreeStringList(listing);
+ FreePathList(pathlist);
+ FreeSubdirs(subdirs);
+ FreePatterns(patterns);
+ return NULL;
+ }
+ strncpy(listing[n], dp->d_name + match[1].rm_so,
+ len);
+ listing[n][len] = '\0';
+ n++;
+ break;
}
+ }
}
+ closedir(d);
+ }
}
- if (listing)
- listing[n] = NULL;
- return listing;
+ }
+ if (listing)
+ listing[n] = NULL;
+ return listing;
}
void
LoaderFreeDirList(char **list)
{
- FreeStringList(list);
+ FreeStringList(list);
}
-
static Bool
-CheckVersion (const char *module, XF86ModuleVersionInfo *data,
- const XF86ModReqInfo *req)
+CheckVersion(const char *module, XF86ModuleVersionInfo * data,
+ const XF86ModReqInfo * req)
{
- int vercode[4];
- char verstr[4];
- long ver = data->xf86version;
- int errtype = 0;
-
- xf86Msg (X_INFO, "Module %s: vendor=\"%s\"\n",
- data->modname ? data->modname : "UNKNOWN!",
- data->vendor ? data->vendor : "UNKNOWN!");
-
- if (ver > (4 << 24)) {
- /* 4.0.x and earlier */
- verstr[1] = verstr[3] = 0;
- verstr[2] = (ver & 0x1f) ? (ver & 0x1f) + 'a' - 1 : 0;
- ver >>= 5;
- verstr[0] = (ver & 0x1f) ? (ver & 0x1f) + 'A' - 1 : 0;
- ver >>= 5;
- vercode[2] = ver & 0x7f;
- ver >>= 7;
- vercode[1] = ver & 0x7f;
- ver >>= 7;
- vercode[0] = ver;
- xf86ErrorF("\tcompiled for %d.%d", vercode[0], vercode[1]);
- if (vercode[2] != 0)
- xf86ErrorF(".%d", vercode[2]);
- xf86ErrorF("%s%s, module version = %d.%d.%d\n", verstr, verstr + 2,
- data->majorversion, data->minorversion, data->patchlevel);
- } else {
- vercode[0] = ver / 10000000;
- vercode[1] = (ver / 100000) % 100;
- vercode[2] = (ver / 1000) % 100;
- vercode[3] = ver % 1000;
- xf86ErrorF("\tcompiled for %d.%d.%d", vercode[0], vercode[1],
- vercode[2]);
- if (vercode[3] != 0)
- xf86ErrorF(".%d", vercode[3]);
- xf86ErrorF(", module version = %d.%d.%d\n", data->majorversion,
- data->minorversion, data->patchlevel);
- }
+ int vercode[4];
+ char verstr[4];
+ long ver = data->xf86version;
+ MessageType errtype;
+
+ xf86Msg(X_INFO, "Module %s: vendor=\"%s\"\n",
+ data->modname ? data->modname : "UNKNOWN!",
+ data->vendor ? data->vendor : "UNKNOWN!");
+
+ if (ver > (4 << 24)) {
+ /* 4.0.x and earlier */
+ verstr[1] = verstr[3] = 0;
+ verstr[2] = (ver & 0x1f) ? (ver & 0x1f) + 'a' - 1 : 0;
+ ver >>= 5;
+ verstr[0] = (ver & 0x1f) ? (ver & 0x1f) + 'A' - 1 : 0;
+ ver >>= 5;
+ vercode[2] = ver & 0x7f;
+ ver >>= 7;
+ vercode[1] = ver & 0x7f;
+ ver >>= 7;
+ vercode[0] = ver;
+ xf86ErrorF("\tcompiled for %d.%d", vercode[0], vercode[1]);
+ if (vercode[2] != 0)
+ xf86ErrorF(".%d", vercode[2]);
+ xf86ErrorF("%s%s, module version = %d.%d.%d\n", verstr, verstr + 2,
+ data->majorversion, data->minorversion, data->patchlevel);
+ } else {
+ vercode[0] = ver / 10000000;
+ vercode[1] = (ver / 100000) % 100;
+ vercode[2] = (ver / 1000) % 100;
+ vercode[3] = ver % 1000;
+ xf86ErrorF("\tcompiled for %d.%d.%d", vercode[0], vercode[1],
+ vercode[2]);
+ if (vercode[3] != 0)
+ xf86ErrorF(".%d", vercode[3]);
+ xf86ErrorF(", module version = %d.%d.%d\n", data->majorversion,
+ data->minorversion, data->patchlevel);
+ }
if (data->moduleclass)
- xf86ErrorFVerb(2, "\tModule class: %s\n", data->moduleclass);
-
- ver = -1;
- if (data->abiclass) {
- int abimaj, abimin;
- int vermaj, vermin;
-
- if (!strcmp(data->abiclass, ABI_CLASS_ANSIC))
- ver = LoaderVersionInfo.ansicVersion;
- else if (!strcmp(data->abiclass, ABI_CLASS_VIDEODRV))
- ver = LoaderVersionInfo.videodrvVersion;
- else if (!strcmp(data->abiclass, ABI_CLASS_XINPUT))
- ver = LoaderVersionInfo.xinputVersion;
- else if (!strcmp(data->abiclass, ABI_CLASS_EXTENSION))
- ver = LoaderVersionInfo.extensionVersion;
- else if (!strcmp(data->abiclass, ABI_CLASS_FONT))
- ver = LoaderVersionInfo.fontVersion;
-
- abimaj = GET_ABI_MAJOR(data->abiversion);
- abimin = GET_ABI_MINOR(data->abiversion);
- xf86ErrorFVerb(2, "\tABI class: %s, version %d.%d\n",
- data->abiclass, abimaj, abimin);
- if (ver != -1) {
- vermaj = GET_ABI_MAJOR(ver);
- vermin = GET_ABI_MINOR(ver);
- if (abimaj != vermaj) {
- if (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL)
- errtype = X_WARNING;
- else
- errtype = X_ERROR;
- xf86MsgVerb(errtype, 0,
- "module ABI major version (%d) doesn't"
- " match the server's version (%d)\n",
- abimaj, vermaj);
- if (!(LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL))
- return FALSE;
- } else if (abimin > vermin) {
- if (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL)
- errtype = X_WARNING;
- else
- errtype = X_ERROR;
- xf86MsgVerb(errtype, 0,
- "module ABI minor version (%d) is "
- "newer than the server's version "
- "(%d)\n", abimin, vermin);
- if (!(LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL))
- return FALSE;
- }
- }
+ xf86ErrorFVerb(2, "\tModule class: %s\n", data->moduleclass);
+
+ ver = -1;
+ if (data->abiclass) {
+ int abimaj, abimin;
+ int vermaj, vermin;
+
+ if (!strcmp(data->abiclass, ABI_CLASS_ANSIC))
+ ver = LoaderVersionInfo.ansicVersion;
+ else if (!strcmp(data->abiclass, ABI_CLASS_VIDEODRV))
+ ver = LoaderVersionInfo.videodrvVersion;
+ else if (!strcmp(data->abiclass, ABI_CLASS_XINPUT))
+ ver = LoaderVersionInfo.xinputVersion;
+ else if (!strcmp(data->abiclass, ABI_CLASS_EXTENSION))
+ ver = LoaderVersionInfo.extensionVersion;
+ else if (!strcmp(data->abiclass, ABI_CLASS_FONT))
+ ver = LoaderVersionInfo.fontVersion;
+
+ abimaj = GET_ABI_MAJOR(data->abiversion);
+ abimin = GET_ABI_MINOR(data->abiversion);
+ xf86ErrorFVerb(2, "\tABI class: %s, version %d.%d\n",
+ data->abiclass, abimaj, abimin);
+ if (ver != -1) {
+ vermaj = GET_ABI_MAJOR(ver);
+ vermin = GET_ABI_MINOR(ver);
+ if (abimaj != vermaj) {
+ if (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL)
+ errtype = X_WARNING;
+ else
+ errtype = X_ERROR;
+ xf86MsgVerb(errtype, 0,
+ "module ABI major version (%d) doesn't"
+ " match the server's version (%d)\n",
+ abimaj, vermaj);
+ if (!(LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL))
+ return FALSE;
+ } else if (abimin > vermin) {
+ if (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL)
+ errtype = X_WARNING;
+ else
+ errtype = X_ERROR;
+ xf86MsgVerb(errtype, 0,
+ "module ABI minor version (%d) is "
+ "newer than the server's version "
+ "(%d)\n", abimin, vermin);
+ if (!(LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL))
+ return FALSE;
+ }
}
-
- /* Check against requirements that the caller has specified */
- if (req) {
- if (req->majorversion != MAJOR_UNSPEC) {
- if (data->majorversion != req->majorversion) {
- xf86MsgVerb(X_WARNING, 2, "module major version (%d) "
- "doesn't match required major version (%d)\n",
- data->majorversion, req->majorversion);
- return FALSE;
- } else if (req->minorversion != MINOR_UNSPEC) {
- if (data->minorversion < req->minorversion) {
- xf86MsgVerb(X_WARNING, 2, "module minor version (%d) "
- "is less than the required minor version (%d)\n",
- data->minorversion, req->minorversion);
- return FALSE;
- } else if (data->minorversion == req->minorversion &&
- req->patchlevel != PATCH_UNSPEC) {
- if (data->patchlevel < req->patchlevel) {
- xf86MsgVerb(X_WARNING, 2, "module patch level (%d) "
- "is less than the required patch level (%d)\n",
- data->patchlevel, req->patchlevel);
- return FALSE;
- }
- }
- }
- }
- if (req->moduleclass) {
- if (!data->moduleclass ||
- strcmp(req->moduleclass, data->moduleclass)) {
- xf86MsgVerb(X_WARNING, 2, "Module class (%s) doesn't match "
- "the required class (%s)\n",
- data->moduleclass ? data->moduleclass : "<NONE>",
- req->moduleclass);
- return FALSE;
- }
- } else if (req->abiclass != ABI_CLASS_NONE) {
- if (!data->abiclass || strcmp(req->abiclass, data->moduleclass)) {
- xf86MsgVerb(X_WARNING, 2, "ABI class (%s) doesn't match the "
- "required ABI class (%s)\n",
- data->abiclass ? data->abiclass : "<NONE>",
- req->abiclass);
- return FALSE;
- }
- }
- if ((req->abiclass != ABI_CLASS_NONE) &&
- req->abiversion != ABI_VERS_UNSPEC) {
- int reqmaj, reqmin, maj, min;
- reqmaj = GET_ABI_MAJOR(req->abiversion);
- reqmin = GET_ABI_MINOR(req->abiversion);
- maj = GET_ABI_MAJOR(data->abiversion);
- min = GET_ABI_MINOR(data->abiversion);
- if (maj != reqmaj) {
- xf86MsgVerb(X_WARNING, 2, "ABI major version (%d) doesn't "
- "match the required ABI major version (%d)\n",
- maj, reqmaj);
- return FALSE;
- }
- /* XXX Maybe this should be the other way around? */
- if (min > reqmin) {
- xf86MsgVerb(X_WARNING, 2, "module ABI minor version (%d) "
- "is new than that available (%d)\n",
- min, reqmin);
- return FALSE;
- }
+ }
+
+ /* Check against requirements that the caller has specified */
+ if (req) {
+ if (req->majorversion != MAJOR_UNSPEC) {
+ if (data->majorversion != req->majorversion) {
+ xf86MsgVerb(X_WARNING, 2, "module major version (%d) "
+ "doesn't match required major version (%d)\n",
+ data->majorversion, req->majorversion);
+ return FALSE;
+ } else if (req->minorversion != MINOR_UNSPEC) {
+ if (data->minorversion < req->minorversion) {
+ xf86MsgVerb(X_WARNING, 2, "module minor version (%d) "
+ "is less than the required minor version (%d)\n",
+ data->minorversion, req->minorversion);
+ return FALSE;
+ } else if (data->minorversion == req->minorversion &&
+ req->patchlevel != PATCH_UNSPEC) {
+ if (data->patchlevel < req->patchlevel) {
+ xf86MsgVerb(X_WARNING, 2, "module patch level (%d) "
+ "is less than the required patch level (%d)\n",
+ data->patchlevel, req->patchlevel);
+ return FALSE;
+ }
}
+ }
}
-
-#ifdef NOTYET
- if (data->checksum)
- {
- /* verify the checksum field */
- /* TO BE DONE */
+ if (req->moduleclass) {
+ if (!data->moduleclass ||
+ strcmp(req->moduleclass, data->moduleclass)) {
+ xf86MsgVerb(X_WARNING, 2, "Module class (%s) doesn't match "
+ "the required class (%s)\n",
+ data->moduleclass ? data->moduleclass : "<NONE>",
+ req->moduleclass);
+ return FALSE;
+ }
+ } else if (req->abiclass != ABI_CLASS_NONE) {
+ if (!data->abiclass || strcmp(req->abiclass, data->moduleclass)) {
+ xf86MsgVerb(X_WARNING, 2, "ABI class (%s) doesn't match the "
+ "required ABI class (%s)\n",
+ data->abiclass ? data->abiclass : "<NONE>",
+ req->abiclass);
+ return FALSE;
+ }
}
- else
- {
- ErrorF ("\t*** Checksum field is 0 - this module is untrusted!\n");
+ if ((req->abiclass != ABI_CLASS_NONE) &&
+ req->abiversion != ABI_VERS_UNSPEC) {
+ int reqmaj, reqmin, maj, min;
+
+ reqmaj = GET_ABI_MAJOR(req->abiversion);
+ reqmin = GET_ABI_MINOR(req->abiversion);
+ maj = GET_ABI_MAJOR(data->abiversion);
+ min = GET_ABI_MINOR(data->abiversion);
+ if (maj != reqmaj) {
+ xf86MsgVerb(X_WARNING, 2, "ABI major version (%d) doesn't "
+ "match the required ABI major version (%d)\n",
+ maj, reqmaj);
+ return FALSE;
+ }
+ /* XXX Maybe this should be the other way around? */
+ if (min > reqmin) {
+ xf86MsgVerb(X_WARNING, 2, "module ABI minor version (%d) "
+ "is new than that available (%d)\n", min, reqmin);
+ return FALSE;
+ }
}
+ }
+#ifdef NOTYET
+ if (data->checksum) {
+ /* verify the checksum field */
+ /* TO BE DONE */
+ } else {
+ ErrorF("\t*** Checksum field is 0 - this module is untrusted!\n");
+ }
#endif
return TRUE;
}
@@ -715,69 +749,69 @@ CheckVersion (const char *module, XF86ModuleVersionInfo *data,
ModuleDescPtr
LoadSubModule(ModuleDescPtr parent, const char *module,
const char **subdirlist, const char **patternlist,
- pointer options, const XF86ModReqInfo *modreq,
+ pointer options, const XF86ModReqInfo * modreq,
int *errmaj, int *errmin)
{
- ModuleDescPtr submod;
+ ModuleDescPtr submod;
- xf86MsgVerb(X_INFO, 3, "Loading sub module \"%s\"\n", module);
+ xf86MsgVerb(X_INFO, 3, "Loading sub module \"%s\"\n", module);
- /* Absolute module paths are not allowed here */
+ /* Absolute module paths are not allowed here */
#ifndef __UNIXOS2__
- if (module[0] == '/')
+ if (module[0] == '/')
#else
- if (isalpha (module[0]) && module[1] == ':' && module[2] == '/')
+ if (isalpha(module[0]) && module[1] == ':' && module[2] == '/')
#endif
- {
- xf86Msg(X_ERROR,
- "LoadSubModule: Absolute module path not permitted: \"%s\"\n",
- module);
- if (errmaj)
- *errmaj = LDR_BADUSAGE;
- if (errmin)
- *errmin = 0;
- return NULL;
- }
-
- submod = LoadModule (module, NULL, subdirlist, patternlist, options,
- modreq, errmaj, errmin);
- if (submod) {
- parent->child = AddSibling (parent->child, submod);
- submod->parent = parent;
- }
- return submod;
+ {
+ xf86Msg(X_ERROR,
+ "LoadSubModule: Absolute module path not permitted: \"%s\"\n",
+ module);
+ if (errmaj)
+ *errmaj = LDR_BADUSAGE;
+ if (errmin)
+ *errmin = 0;
+ return NULL;
+ }
+
+ submod = LoadModule(module, NULL, subdirlist, patternlist, options,
+ modreq, errmaj, errmin);
+ if (submod) {
+ parent->child = AddSibling(parent->child, submod);
+ submod->parent = parent;
+ }
+ return submod;
}
ModuleDescPtr
DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent)
{
- ModuleDescPtr ret;
+ ModuleDescPtr ret;
- if (!mod)
- return NULL;
+ if (!mod)
+ return NULL;
- ret = NewModuleDesc(mod->name);
- if (ret == NULL)
- return NULL;
+ ret = NewModuleDesc(mod->name);
+ if (ret == NULL)
+ return NULL;
- if (LoaderHandleOpen(mod->handle) == -1)
- return NULL;
+ if (LoaderHandleOpen(mod->handle) == -1)
+ return NULL;
- ret->filename = xstrdup(mod->filename);
- ret->identifier = mod->identifier;
- ret->client_id = mod->client_id;
- ret->in_use = mod->in_use;
- ret->handle = mod->handle;
- ret->SetupProc = mod->SetupProc;
- ret->TearDownProc = mod->TearDownProc;
- ret->TearDownData = NULL;
- ret->path = mod->path;
- ret->child = DuplicateModule(mod->child, ret);
- ret->sib = DuplicateModule(mod->sib, parent);
- ret->parent = parent;
- ret->VersionInfo = mod->VersionInfo;
-
- return ret;
+ ret->filename = xstrdup(mod->filename);
+ ret->identifier = mod->identifier;
+ ret->client_id = mod->client_id;
+ ret->in_use = mod->in_use;
+ ret->handle = mod->handle;
+ ret->SetupProc = mod->SetupProc;
+ ret->TearDownProc = mod->TearDownProc;
+ ret->TearDownData = NULL;
+ ret->path = mod->path;
+ ret->child = DuplicateModule(mod->child, ret);
+ ret->sib = DuplicateModule(mod->sib, parent);
+ ret->parent = parent;
+ ret->VersionInfo = mod->VersionInfo;
+
+ return ret;
}
/*
@@ -819,241 +853,227 @@ DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent)
*/
ModuleDescPtr
-LoadModule (const char *module, const char *path, const char **subdirlist,
- const char **patternlist, pointer options,
- const XF86ModReqInfo * modreq,
- int *errmaj, int *errmin)
+LoadModule(const char *module, const char *path, const char **subdirlist,
+ const char **patternlist, pointer options,
+ const XF86ModReqInfo * modreq, int *errmaj, int *errmin)
{
- XF86ModuleData *initdata = NULL;
- char **pathlist = NULL;
- char *found = NULL;
- char *name = NULL;
- char **path_elem = NULL;
- char *p = NULL;
- ModuleDescPtr ret = NULL;
- int wasLoaded = 0;
- PatternPtr patterns = NULL;
- int noncanonical = 0;
- char *m = NULL;
-
- /*xf86Msg(X_INFO,"OS2DIAG: LoadModule: %s\n",module);*/
- xf86MsgVerb(X_INFO, 3, "LoadModule: \"%s\"", module);
-
- patterns = InitPatterns(patternlist);
- name = LoaderGetCanonicalName(module, patterns);
- noncanonical = (name && strcmp(module, name) != 0);
- if (noncanonical)
- {
- xf86ErrorFVerb(3, " (%s)\n", name);
- xf86MsgVerb(X_WARNING, 1,
- "LoadModule: given non-canonical module name \"%s\"\n",
- module);
- m = name;
- }
- else
- {
- xf86ErrorFVerb(3, "\n");
- m = (char *)module;
- }
- if (!name) {
- if (errmaj)
- *errmaj = LDR_BADUSAGE;
- if (errmin)
- *errmin = 0;
- goto LoadModule_fail;
- }
- ret = NewModuleDesc (name);
- if (!ret) {
- if (errmaj)
- *errmaj = LDR_NOMEM;
- if (errmin)
- *errmin = 0;
- goto LoadModule_fail;
- }
-
- pathlist = InitPathList(path);
- if (!pathlist) {
- /* This could be a malloc failure too */
- if (errmaj)
- *errmaj = LDR_BADUSAGE;
- if (errmin)
- *errmin = 1;
- goto LoadModule_fail;
- }
-
- /*
- * if the module name is not a full pathname, we need to
- * check the elements in the path
- */
+ XF86ModuleData *initdata = NULL;
+ char **pathlist = NULL;
+ char *found = NULL;
+ char *name = NULL;
+ char **path_elem = NULL;
+ char *p = NULL;
+ ModuleDescPtr ret = NULL;
+ int wasLoaded = 0;
+ PatternPtr patterns = NULL;
+ int noncanonical = 0;
+ char *m = NULL;
+
+ /*xf86Msg(X_INFO,"OS2DIAG: LoadModule: %s\n",module); */
+ xf86MsgVerb(X_INFO, 3, "LoadModule: \"%s\"", module);
+
+ patterns = InitPatterns(patternlist);
+ name = LoaderGetCanonicalName(module, patterns);
+ noncanonical = (name && strcmp(module, name) != 0);
+ if (noncanonical) {
+ xf86ErrorFVerb(3, " (%s)\n", name);
+ xf86MsgVerb(X_WARNING, 1,
+ "LoadModule: given non-canonical module name \"%s\"\n",
+ module);
+ m = name;
+ } else {
+ xf86ErrorFVerb(3, "\n");
+ m = (char *)module;
+ }
+ if (!name) {
+ if (errmaj)
+ *errmaj = LDR_BADUSAGE;
+ if (errmin)
+ *errmin = 0;
+ goto LoadModule_fail;
+ }
+ ret = NewModuleDesc(name);
+ if (!ret) {
+ if (errmaj)
+ *errmaj = LDR_NOMEM;
+ if (errmin)
+ *errmin = 0;
+ goto LoadModule_fail;
+ }
+
+ pathlist = InitPathList(path);
+ if (!pathlist) {
+ /* This could be a malloc failure too */
+ if (errmaj)
+ *errmaj = LDR_BADUSAGE;
+ if (errmin)
+ *errmin = 1;
+ goto LoadModule_fail;
+ }
+
+ /*
+ * if the module name is not a full pathname, we need to
+ * check the elements in the path
+ */
#ifndef __UNIXOS2__
- if (module[0] == '/')
- found = xstrdup(module);
+ if (module[0] == '/')
+ found = xstrdup(module);
#else
- /* accept a drive name here */
- if (isalpha (module[0]) && module[1] == ':' && module[2] == '/')
- found = xstrdup(module);
+ /* accept a drive name here */
+ if (isalpha(module[0]) && module[1] == ':' && module[2] == '/')
+ found = xstrdup(module);
#endif
- path_elem = pathlist;
- while (!found && *path_elem != NULL)
- {
- found = FindModule (m, *path_elem, subdirlist, patterns);
- path_elem++;
- /*
- * When the module name isn't the canonical name, search for the
- * former if no match was found for the latter.
- */
- if (!*path_elem && m == name)
- {
- path_elem = pathlist;
- m = (char *)module;
- }
- }
-
- /*
- * did we find the module?
- */
- if (!found)
- {
- xf86Msg (X_WARNING, "Warning, couldn't open module %s\n",
- module);
- if (errmaj)
- *errmaj = LDR_NOENT;
- if (errmin)
- *errmin = 0;
- goto LoadModule_fail;
- }
- ret->handle = LoaderOpen (found, name, 0, errmaj, errmin, &wasLoaded);
- if (ret->handle < 0)
- goto LoadModule_fail;
-
- ret->filename = xstrdup(found);
-
+ path_elem = pathlist;
+ while (!found && *path_elem != NULL) {
+ found = FindModule(m, *path_elem, subdirlist, patterns);
+ path_elem++;
/*
- * now check if the special data object <modulename>ModuleData is
- * present.
+ * When the module name isn't the canonical name, search for the
+ * former if no match was found for the latter.
*/
- p = xalloc (strlen (name) + strlen ("ModuleData") + 1);
- if (!p) {
- if (errmaj)
- *errmaj = LDR_NOMEM;
- if (errmin)
- *errmin = 0;
- goto LoadModule_fail;
+ if (!*path_elem && m == name) {
+ path_elem = pathlist;
+ m = (char *)module;
}
- strcpy (p, name);
- strcat (p, "ModuleData");
- initdata = LoaderSymbol (p);
- if (initdata)
- {
- ModuleSetupProc setup;
- ModuleTearDownProc teardown;
- XF86ModuleVersionInfo *vers;
-
- vers = initdata->vers;
- setup = initdata->setup;
- teardown = initdata->teardown;
-
- if (!wasLoaded) {
- if (vers) {
- if (!CheckVersion (module, vers, modreq)) {
- if (errmaj)
- *errmaj = LDR_MISMATCH;
- if (errmin)
- *errmin = 0;
- goto LoadModule_fail;
- }
- } else {
- xf86Msg(X_ERROR,
- "LoadModule: Module %s does not supply"
- " version information\n", module);
- if (errmaj)
- *errmaj = LDR_INVALID;
- if (errmin)
- *errmin = 0;
- goto LoadModule_fail;
- }
+ }
+
+ /*
+ * did we find the module?
+ */
+ if (!found) {
+ xf86Msg(X_WARNING, "Warning, couldn't open module %s\n", module);
+ if (errmaj)
+ *errmaj = LDR_NOENT;
+ if (errmin)
+ *errmin = 0;
+ goto LoadModule_fail;
+ }
+ ret->handle = LoaderOpen(found, name, 0, errmaj, errmin, &wasLoaded);
+ if (ret->handle < 0)
+ goto LoadModule_fail;
+
+ ret->filename = xstrdup(found);
+
+ /*
+ * now check if the special data object <modulename>ModuleData is
+ * present.
+ */
+ p = xalloc(strlen(name) + strlen("ModuleData") + 1);
+ if (!p) {
+ if (errmaj)
+ *errmaj = LDR_NOMEM;
+ if (errmin)
+ *errmin = 0;
+ goto LoadModule_fail;
+ }
+ strcpy(p, name);
+ strcat(p, "ModuleData");
+ initdata = LoaderSymbol(p);
+ if (initdata) {
+ ModuleSetupProc setup;
+ ModuleTearDownProc teardown;
+ XF86ModuleVersionInfo *vers;
+
+ vers = initdata->vers;
+ setup = initdata->setup;
+ teardown = initdata->teardown;
+
+ if (!wasLoaded) {
+ if (vers) {
+ if (!CheckVersion(module, vers, modreq)) {
+ if (errmaj)
+ *errmaj = LDR_MISMATCH;
+ if (errmin)
+ *errmin = 0;
+ goto LoadModule_fail;
}
- if (setup)
- ret->SetupProc = setup;
- if (teardown)
- ret->TearDownProc = teardown;
- ret->path = path;
- ret->VersionInfo = vers;
- }
- else
- {
- /* No initdata is OK for external modules */
- if (options == EXTERN_MODULE)
- goto LoadModule_exit;
-
- /* no initdata, fail the load */
- xf86Msg (X_ERROR, "LoadModule: Module %s does not have a %s "
- "data object.\n", module, p);
+ } else {
+ xf86Msg(X_ERROR,
+ "LoadModule: Module %s does not supply"
+ " version information\n", module);
if (errmaj)
- *errmaj = LDR_INVALID;
+ *errmaj = LDR_INVALID;
if (errmin)
- *errmin = 0;
+ *errmin = 0;
goto LoadModule_fail;
+ }
}
- if (ret->SetupProc)
- {
- ret->TearDownData = ret->SetupProc (ret, options, errmaj, errmin);
- if (!ret->TearDownData)
- {
- goto LoadModule_fail;
- }
- }
- else if (options)
- {
- xf86Msg (X_WARNING, "Module Options present, but no SetupProc "
- "available for %s\n", module);
+ if (setup)
+ ret->SetupProc = setup;
+ if (teardown)
+ ret->TearDownProc = teardown;
+ ret->path = path;
+ ret->VersionInfo = vers;
+ } else {
+ /* No initdata is OK for external modules */
+ if (options == EXTERN_MODULE)
+ goto LoadModule_exit;
+
+ /* no initdata, fail the load */
+ xf86Msg(X_ERROR, "LoadModule: Module %s does not have a %s "
+ "data object.\n", module, p);
+ if (errmaj)
+ *errmaj = LDR_INVALID;
+ if (errmin)
+ *errmin = 0;
+ goto LoadModule_fail;
+ }
+ if (ret->SetupProc) {
+ ret->TearDownData = ret->SetupProc(ret, options, errmaj, errmin);
+ if (!ret->TearDownData) {
+ goto LoadModule_fail;
}
- goto LoadModule_exit;
+ } else if (options) {
+ xf86Msg(X_WARNING, "Module Options present, but no SetupProc "
+ "available for %s\n", module);
+ }
+ goto LoadModule_exit;
LoadModule_fail:
- UnloadModule (ret);
- ret = NULL;
+ UnloadModule(ret);
+ ret = NULL;
LoadModule_exit:
- FreePathList(pathlist);
- FreePatterns(patterns);
- TestFree (found);
- TestFree (name);
- TestFree (p);
-
- /*
- * If you need to do something to keep the
- * instruction cache in sync with the main
- * memory before jumping to that code, you may
- * do it here.
- */
+ FreePathList(pathlist);
+ FreePatterns(patterns);
+ TestFree(found);
+ TestFree(name);
+ TestFree(p);
+
+ /*
+ * If you need to do something to keep the
+ * instruction cache in sync with the main
+ * memory before jumping to that code, you may
+ * do it here.
+ */
#ifdef __alpha__
- istream_mem_barrier();
+ istream_mem_barrier();
#endif
- return ret;
+ return ret;
}
ModuleDescPtr
-LoadDriver (const char *module, const char *path, int handle, pointer options,
- int *errmaj, int *errmin)
+LoadDriver(const char *module, const char *path, int handle, pointer options,
+ int *errmaj, int *errmin)
{
-return LoadModule (module, path, NULL, NULL, options, NULL, errmaj, errmin);
+ return LoadModule(module, path, NULL, NULL, options, NULL, errmaj,
+ errmin);
}
void
-UnloadModule (ModuleDescPtr mod)
+UnloadModule(ModuleDescPtr mod)
{
- UnloadModuleOrDriver (mod);
+ UnloadModuleOrDriver(mod);
}
void
-UnloadDriver (ModuleDescPtr mod)
+UnloadDriver(ModuleDescPtr mod)
{
- UnloadModuleOrDriver (mod);
+ UnloadModuleOrDriver(mod);
}
static void
-UnloadModuleOrDriver (ModuleDescPtr mod)
+UnloadModuleOrDriver(ModuleDescPtr mod)
{
if (mod == NULL || mod->name == NULL)
return;
@@ -1061,18 +1081,18 @@ UnloadModuleOrDriver (ModuleDescPtr mod)
xf86MsgVerb(X_INFO, 3, "UnloadModule: \"%s\"\n", mod->name);
if ((mod->TearDownProc) && (mod->TearDownData))
- mod->TearDownProc (mod->TearDownData);
- LoaderUnload (mod->handle);
+ mod->TearDownProc(mod->TearDownData);
+ LoaderUnload(mod->handle);
if (mod->child)
- UnloadModuleOrDriver (mod->child);
+ UnloadModuleOrDriver(mod->child);
if (mod->sib)
- UnloadModuleOrDriver (mod->sib);
- TestFree (mod->name);
- TestFree (mod->filename);
- xfree (mod);
+ UnloadModuleOrDriver(mod->sib);
+ TestFree(mod->name);
+ TestFree(mod->filename);
+ xfree(mod);
#ifdef __alpha__
- istream_mem_barrier();
+ istream_mem_barrier();
#endif
}
@@ -1085,69 +1105,67 @@ UnloadSubModule(ModuleDescPtr mod)
xf86MsgVerb(X_INFO, 3, "UnloadSubModule: \"%s\"\n", mod->name);
if ((mod->TearDownProc) && (mod->TearDownData))
- mod->TearDownProc (mod->TearDownData);
- LoaderUnload (mod->handle);
+ mod->TearDownProc(mod->TearDownData);
+ LoaderUnload(mod->handle);
RemoveChild(mod);
if (mod->child)
- UnloadModuleOrDriver (mod->child);
+ UnloadModuleOrDriver(mod->child);
- TestFree (mod->name);
- TestFree (mod->filename);
- xfree (mod);
+ TestFree(mod->name);
+ TestFree(mod->filename);
+ xfree(mod);
}
void
-FreeModuleDesc (ModuleDescPtr head)
+FreeModuleDesc(ModuleDescPtr head)
{
- ModuleDescPtr sibs, prev;
+ ModuleDescPtr sibs, prev;
- /*
- * only free it if it's not marked as in use. In use means that it may
- * be unloaded someday, and UnloadModule or UnloadDriver will free it
- */
- if (head->in_use)
- return;
- if (head->child)
- FreeModuleDesc (head->child);
- sibs = head;
- while (sibs)
- {
- prev = sibs;
- sibs = sibs->sib;
- TestFree (prev->name);
- xfree (prev);
- }
+ /*
+ * only free it if it's not marked as in use. In use means that it may
+ * be unloaded someday, and UnloadModule or UnloadDriver will free it
+ */
+ if (head->in_use)
+ return;
+ if (head->child)
+ FreeModuleDesc(head->child);
+ sibs = head;
+ while (sibs) {
+ prev = sibs;
+ sibs = sibs->sib;
+ TestFree(prev->name);
+ xfree(prev);
+ }
}
ModuleDescPtr
-NewModuleDesc (const char *name)
+NewModuleDesc(const char *name)
{
- ModuleDescPtr mdp = xalloc (sizeof (ModuleDesc));
-
- if (mdp)
- {
- mdp->child = NULL;
- mdp->sib = NULL;
- mdp->parent = NULL;
- mdp->demand_next = NULL;
- mdp->name = xstrdup (name);
- mdp->filename = NULL;
- mdp->identifier = NULL;
- mdp->client_id = 0;
- mdp->in_use = 0;
- mdp->handle = -1;
- mdp->SetupProc = NULL;
- mdp->TearDownProc = NULL;
- mdp->TearDownData = NULL;
- }
-
- return (mdp);
+ ModuleDescPtr mdp = xalloc(sizeof(ModuleDesc));
+
+ if (mdp) {
+ mdp->child = NULL;
+ mdp->sib = NULL;
+ mdp->parent = NULL;
+ mdp->demand_next = NULL;
+ mdp->name = xstrdup(name);
+ mdp->filename = NULL;
+ mdp->identifier = NULL;
+ mdp->client_id = 0;
+ mdp->in_use = 0;
+ mdp->handle = -1;
+ mdp->SetupProc = NULL;
+ mdp->TearDownProc = NULL;
+ mdp->TearDownData = NULL;
+ }
+
+ return (mdp);
}
ModuleDescPtr
-AddSibling (ModuleDescPtr head, ModuleDescPtr new)
+AddSibling(ModuleDescPtr head, ModuleDescPtr new)
{
new->sib = head;
return (new);
@@ -1155,142 +1173,140 @@ AddSibling (ModuleDescPtr head, ModuleDescPtr new)
}
static void
-RemoveChild (ModuleDescPtr child)
+RemoveChild(ModuleDescPtr child)
{
- ModuleDescPtr mdp;
- ModuleDescPtr prevsib;
- ModuleDescPtr parent;
+ ModuleDescPtr mdp;
+ ModuleDescPtr prevsib;
+ ModuleDescPtr parent;
- if (!child->parent)
- return;
-
- parent = child->parent;
- if (parent->child == child) {
- parent->child = child->sib;
- return;
- }
+ if (!child->parent)
+ return;
- prevsib = parent->child;
- mdp = prevsib->sib;
- while (mdp && mdp != child) {
- prevsib = mdp;
- mdp = mdp->sib;
- }
- if (mdp == child)
- prevsib->sib = child->sib;
+ parent = child->parent;
+ if (parent->child == child) {
+ parent->child = child->sib;
return;
+ }
+
+ prevsib = parent->child;
+ mdp = prevsib->sib;
+ while (mdp && mdp != child) {
+ prevsib = mdp;
+ mdp = mdp->sib;
+ }
+ if (mdp == child)
+ prevsib->sib = child->sib;
+ return;
}
void
LoaderErrorMsg(const char *name, const char *modname, int errmaj, int errmin)
{
- const char *msg;
-
- switch (errmaj) {
- case LDR_NOERROR:
- msg = "no error";
- break;
- case LDR_NOMEM:
- msg = "out of memory";
- break;
- case LDR_NOENT:
- msg = "module does not exist";
- break;
- case LDR_NOSUBENT:
- msg = "a required submodule could not be loaded";
- break;
- case LDR_NOSPACE:
- msg = "too many modules";
- break;
- case LDR_NOMODOPEN:
- msg = "open failed";
- break;
- case LDR_UNKTYPE:
- msg = "unknown module type";
- break;
- case LDR_NOLOAD:
- msg = "loader failed";
- break;
- case LDR_ONCEONLY:
- msg = "once-only module";
- break;
- case LDR_NOPORTOPEN:
- msg = "port open failed";
- break;
- case LDR_NOHARDWARE:
- msg = "no hardware found";
- break;
- case LDR_MISMATCH:
- msg = "module requirement mismatch";
- break;
- case LDR_BADUSAGE:
- msg = "invalid argument(s) to LoadModule()";
- break;
- case LDR_INVALID:
- msg = "invalid module";
- break;
- case LDR_BADOS:
- msg = "module doesn't support this OS";
- break;
- case LDR_MODSPECIFIC:
- msg = "module-specific error";
- break;
- default:
- msg = "uknown error";
- }
- if (name)
- xf86Msg(X_ERROR, "%s: Failed to load module \"%s\" (%s, %d)\n",
- name, modname, msg, errmin);
- else
- xf86Msg(X_ERROR, "Failed to load module \"%s\" (%s, %d)\n",
- modname, msg, errmin);
+ const char *msg;
+
+ switch (errmaj) {
+ case LDR_NOERROR:
+ msg = "no error";
+ break;
+ case LDR_NOMEM:
+ msg = "out of memory";
+ break;
+ case LDR_NOENT:
+ msg = "module does not exist";
+ break;
+ case LDR_NOSUBENT:
+ msg = "a required submodule could not be loaded";
+ break;
+ case LDR_NOSPACE:
+ msg = "too many modules";
+ break;
+ case LDR_NOMODOPEN:
+ msg = "open failed";
+ break;
+ case LDR_UNKTYPE:
+ msg = "unknown module type";
+ break;
+ case LDR_NOLOAD:
+ msg = "loader failed";
+ break;
+ case LDR_ONCEONLY:
+ msg = "once-only module";
+ break;
+ case LDR_NOPORTOPEN:
+ msg = "port open failed";
+ break;
+ case LDR_NOHARDWARE:
+ msg = "no hardware found";
+ break;
+ case LDR_MISMATCH:
+ msg = "module requirement mismatch";
+ break;
+ case LDR_BADUSAGE:
+ msg = "invalid argument(s) to LoadModule()";
+ break;
+ case LDR_INVALID:
+ msg = "invalid module";
+ break;
+ case LDR_BADOS:
+ msg = "module doesn't support this OS";
+ break;
+ case LDR_MODSPECIFIC:
+ msg = "module-specific error";
+ break;
+ default:
+ msg = "uknown error";
+ }
+ if (name)
+ xf86Msg(X_ERROR, "%s: Failed to load module \"%s\" (%s, %d)\n",
+ name, modname, msg, errmin);
+ else
+ xf86Msg(X_ERROR, "Failed to load module \"%s\" (%s, %d)\n",
+ modname, msg, errmin);
}
-
/* Given a module path or file name, return the module's canonical name */
static char *
LoaderGetCanonicalName(const char *modname, PatternPtr patterns)
{
- char *str;
- const char *s;
- int len;
- PatternPtr p;
- regmatch_t match[2];
-
- /* Strip off any leading path */
- s = strrchr(modname, '/');
- if (s == NULL)
- s = modname;
- else
- s++;
-
- /* Find the first regex that is matched */
- for (p = patterns; p->pattern; p++)
- if (regexec(&p->rex, s, 2, match, 0) == 0 &&
- match[1].rm_so != -1) {
- len = match[1].rm_eo - match[1].rm_so;
- str = xalloc(len + 1);
- if (!str)
- return NULL;
- strncpy(str, s + match[1].rm_so, len);
- str[len] = '\0';
- return str;
- }
+ char *str;
+ const char *s;
+ int len;
+ PatternPtr p;
+ regmatch_t match[2];
+
+ /* Strip off any leading path */
+ s = strrchr(modname, '/');
+ if (s == NULL)
+ s = modname;
+ else
+ s++;
+
+ /* Find the first regex that is matched */
+ for (p = patterns; p->pattern; p++)
+ if (regexec(&p->rex, s, 2, match, 0) == 0 && match[1].rm_so != -1) {
+ len = match[1].rm_eo - match[1].rm_so;
+ str = xalloc(len + 1);
+ if (!str)
+ return NULL;
+ strncpy(str, s + match[1].rm_so, len);
+ str[len] = '\0';
+ return str;
+ }
- /* If there is no match, return the whole name minus the leading path */
- return xstrdup(s);
+ /* If there is no match, return the whole name minus the leading path */
+ return xstrdup(s);
}
/*
* Return the module version information.
*/
unsigned long
-LoaderGetModuleVersion (ModuleDescPtr mod)
+LoaderGetModuleVersion(ModuleDescPtr mod)
{
if (!mod || !mod->VersionInfo)
- return 0;
+ return 0;
return MODULE_VERSION_NUMERIC(mod->VersionInfo->majorversion,
- mod->VersionInfo->minorversion,
- mod->VersionInfo->patchlevel);
+ mod->VersionInfo->minorversion,
+ mod->VersionInfo->patchlevel);
}
diff --git a/hw/xfree86/loader/misym.c b/hw/xfree86/loader/misym.c
index 989978330..c2bf47587 100644
--- a/hw/xfree86/loader/misym.c
+++ b/hw/xfree86/loader/misym.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/misym.c,v 1.35 2002/09/16 18:06:11 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/misym.c,v 1.38 2003/10/15 16:29:04 dawes Exp $ */
/*
*
@@ -22,6 +22,34 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
+
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
#include "sym.h"
#include "misc.h"
#include "mi.h"
@@ -49,132 +77,133 @@
extern miPointerSpriteFuncRec miSpritePointerFuncs;
LOOKUP miLookupTab[] = {
- SYMFUNC(miClearToBackground)
- SYMFUNC(miSendGraphicsExpose)
- SYMFUNC(miModifyPixmapHeader)
- SYMFUNC(miHandleValidateExposures)
- SYMFUNC(miSetShape)
- SYMFUNC(miChangeBorderWidth)
- SYMFUNC(miShapedWindowIn)
- SYMFUNC(miRectIn)
- SYMFUNC(miZeroClipLine)
- SYMFUNC(miZeroDashLine)
- SYMFUNC(miClearDrawable)
- SYMFUNC(miPolyPoint)
- SYMFUNC(miStepDash)
- SYMFUNC(miEmptyBox)
- SYMFUNC(miEmptyData)
- SYMFUNC(miIntersect)
- SYMFUNC(miRegionAppend)
- SYMFUNC(miRegionCopy)
- SYMFUNC(miRegionDestroy)
- SYMFUNC(miRegionEmpty)
- SYMFUNC(miRegionExtents)
- SYMFUNC(miRegionInit)
- SYMFUNC(miRegionNotEmpty)
- SYMFUNC(miRegionReset)
- SYMFUNC(miRegionUninit)
- SYMFUNC(miRegionValidate)
- SYMFUNC(miTranslateRegion)
- SYMFUNC(miHandleExposures)
- SYMFUNC(miPolyFillRect)
- SYMFUNC(miPolyFillArc)
- SYMFUNC(miImageGlyphBlt)
- SYMFUNC(miPolyGlyphBlt)
- SYMFUNC(miFillPolygon)
- SYMFUNC(miFillConvexPoly)
- SYMFUNC(miPolySegment)
- SYMFUNC(miZeroLine)
- SYMFUNC(miWideLine)
- SYMFUNC(miWideDash)
- SYMFUNC(miZeroPolyArc)
- SYMFUNC(miPolyArc)
- SYMFUNC(miCreateGCOps)
- SYMFUNC(miDestroyGCOps)
- SYMFUNC(miComputeCompositeClip)
- SYMFUNC(miChangeGC)
- SYMFUNC(miCopyGC)
- SYMFUNC(miDestroyGC)
- SYMFUNC(miChangeClip)
- SYMFUNC(miDestroyClip)
- SYMFUNC(miCopyClip)
- SYMFUNC(miPolyRectangle)
- SYMFUNC(miPolyText8)
- SYMFUNC(miPolyText16)
- SYMFUNC(miImageText8)
- SYMFUNC(miImageText16)
- SYMFUNC(miRegionCreate)
- SYMFUNC(miPaintWindow)
- SYMFUNC(miZeroArcSetup)
- SYMFUNC(miFillArcSetup)
- SYMFUNC(miFillArcSliceSetup)
- SYMFUNC(miFindMaxBand)
- SYMFUNC(miClipSpans)
- SYMFUNC(miAllocateGCPrivateIndex)
- SYMFUNC(miScreenInit)
- SYMFUNC(miGetScreenPixmap)
- SYMFUNC(miSetScreenPixmap)
- SYMFUNC(miPointerCurrentScreen)
- SYMFUNC(miRectAlloc)
- SYMFUNC(miInitializeBackingStore)
- SYMFUNC(miInitializeBanking)
- SYMFUNC(miModifyBanking)
- SYMFUNC(miCopyPlane)
- SYMFUNC(miCopyArea)
- SYMFUNC(miCreateScreenResources)
- SYMFUNC(miGetImage)
- SYMFUNC(miPutImage)
- SYMFUNC(miPushPixels)
- SYMFUNC(miPointerInitialize)
- SYMFUNC(miPointerPosition)
- SYMFUNC(miRecolorCursor)
- SYMFUNC(miPointerWarpCursor)
- SYMFUNC(miDCInitialize)
- SYMFUNC(miRectsToRegion)
- SYMFUNC(miPointInRegion)
- SYMFUNC(miInverse)
- SYMFUNC(miSubtract)
- SYMFUNC(miUnion)
- SYMFUNC(miPolyBuildEdge)
- SYMFUNC(miPolyBuildPoly)
- SYMFUNC(miRoundJoinClip)
- SYMFUNC(miRoundCapClip)
- SYMFUNC(miSetZeroLineBias)
- SYMFUNC(miResolveColor)
- SYMFUNC(miInitializeColormap)
- SYMFUNC(miInstallColormap)
- SYMFUNC(miUninstallColormap)
- SYMFUNC(miListInstalledColormaps)
- SYMFUNC(miExpandDirectColors)
- SYMFUNC(miCreateDefColormap)
- SYMFUNC(miClearVisualTypes)
- SYMFUNC(miSetVisualTypes)
- SYMFUNC(miSetVisualTypesAndMasks)
- SYMFUNC(miGetDefaultVisualMask)
- SYMFUNC(miSetPixmapDepths)
- SYMFUNC(miInitVisuals)
- SYMFUNC(miWindowExposures)
- SYMFUNC(miSegregateChildren)
- SYMFUNC(miClipNotify)
- SYMFUNC(miHookInitVisuals)
- SYMFUNC(miPointerAbsoluteCursor)
- SYMFUNC(miPointerGetMotionEvents)
- SYMFUNC(miPointerGetMotionBufferSize)
- SYMFUNC(miOverlayCopyUnderlay)
- SYMFUNC(miOverlaySetTransFunction)
- SYMFUNC(miOverlayCollectUnderlayRegions)
- SYMFUNC(miInitOverlay)
- SYMFUNC(miOverlayComputeCompositeClip)
- SYMFUNC(miOverlayGetPrivateClips)
- SYMFUNC(miOverlaySetRootClip)
- SYMVAR(miZeroLineScreenIndex)
- SYMVAR(miSpritePointerFuncs)
- SYMVAR(miPointerScreenIndex)
- SYMVAR(miInstalledMaps)
- SYMVAR(miInitVisualsProc)
+ SYMFUNC(miClearToBackground)
+ SYMFUNC(miSendGraphicsExpose)
+ SYMFUNC(miModifyPixmapHeader)
+ SYMFUNC(miHandleValidateExposures)
+ SYMFUNC(miSetShape)
+ SYMFUNC(miChangeBorderWidth)
+ SYMFUNC(miShapedWindowIn)
+ SYMFUNC(miRectIn)
+ SYMFUNC(miZeroClipLine)
+ SYMFUNC(miZeroDashLine)
+ SYMFUNC(miClearDrawable)
+ SYMFUNC(miPolyPoint)
+ SYMFUNC(miStepDash)
+ SYMFUNC(miEmptyBox)
+ SYMFUNC(miEmptyData)
+ SYMFUNC(miIntersect)
+ SYMFUNC(miRegionAppend)
+ SYMFUNC(miRegionCopy)
+ SYMFUNC(miRegionDestroy)
+ SYMFUNC(miRegionEmpty)
+ SYMFUNC(miRegionExtents)
+ SYMFUNC(miRegionInit)
+ SYMFUNC(miRegionNotEmpty)
+ SYMFUNC(miRegionEqual)
+ SYMFUNC(miRegionReset)
+ SYMFUNC(miRegionUninit)
+ SYMFUNC(miRegionValidate)
+ SYMFUNC(miTranslateRegion)
+ SYMFUNC(miHandleExposures)
+ SYMFUNC(miPolyFillRect)
+ SYMFUNC(miPolyFillArc)
+ SYMFUNC(miImageGlyphBlt)
+ SYMFUNC(miPolyGlyphBlt)
+ SYMFUNC(miFillPolygon)
+ SYMFUNC(miFillConvexPoly)
+ SYMFUNC(miPolySegment)
+ SYMFUNC(miZeroLine)
+ SYMFUNC(miWideLine)
+ SYMFUNC(miWideDash)
+ SYMFUNC(miZeroPolyArc)
+ SYMFUNC(miPolyArc)
+ SYMFUNC(miCreateGCOps)
+ SYMFUNC(miDestroyGCOps)
+ SYMFUNC(miComputeCompositeClip)
+ SYMFUNC(miChangeGC)
+ SYMFUNC(miCopyGC)
+ SYMFUNC(miDestroyGC)
+ SYMFUNC(miChangeClip)
+ SYMFUNC(miDestroyClip)
+ SYMFUNC(miCopyClip)
+ SYMFUNC(miPolyRectangle)
+ SYMFUNC(miPolyText8)
+ SYMFUNC(miPolyText16)
+ SYMFUNC(miImageText8)
+ SYMFUNC(miImageText16)
+ SYMFUNC(miRegionCreate)
+ SYMFUNC(miPaintWindow)
+ SYMFUNC(miZeroArcSetup)
+ SYMFUNC(miFillArcSetup)
+ SYMFUNC(miFillArcSliceSetup)
+ SYMFUNC(miFindMaxBand)
+ SYMFUNC(miClipSpans)
+ SYMFUNC(miAllocateGCPrivateIndex)
+ SYMFUNC(miScreenInit)
+ SYMFUNC(miGetScreenPixmap)
+ SYMFUNC(miSetScreenPixmap)
+ SYMFUNC(miPointerCurrentScreen)
+ SYMFUNC(miRectAlloc)
+ SYMFUNC(miInitializeBackingStore)
+ SYMFUNC(miInitializeBanking)
+ SYMFUNC(miModifyBanking)
+ SYMFUNC(miCopyPlane)
+ SYMFUNC(miCopyArea)
+ SYMFUNC(miCreateScreenResources)
+ SYMFUNC(miGetImage)
+ SYMFUNC(miPutImage)
+ SYMFUNC(miPushPixels)
+ SYMFUNC(miPointerInitialize)
+ SYMFUNC(miPointerPosition)
+ SYMFUNC(miRecolorCursor)
+ SYMFUNC(miPointerWarpCursor)
+ SYMFUNC(miDCInitialize)
+ SYMFUNC(miRectsToRegion)
+ SYMFUNC(miPointInRegion)
+ SYMFUNC(miInverse)
+ SYMFUNC(miSubtract)
+ SYMFUNC(miUnion)
+ SYMFUNC(miPolyBuildEdge)
+ SYMFUNC(miPolyBuildPoly)
+ SYMFUNC(miRoundJoinClip)
+ SYMFUNC(miRoundCapClip)
+ SYMFUNC(miSetZeroLineBias)
+ SYMFUNC(miResolveColor)
+ SYMFUNC(miInitializeColormap)
+ SYMFUNC(miInstallColormap)
+ SYMFUNC(miUninstallColormap)
+ SYMFUNC(miListInstalledColormaps)
+ SYMFUNC(miExpandDirectColors)
+ SYMFUNC(miCreateDefColormap)
+ SYMFUNC(miClearVisualTypes)
+ SYMFUNC(miSetVisualTypes)
+ SYMFUNC(miSetVisualTypesAndMasks)
+ SYMFUNC(miGetDefaultVisualMask)
+ SYMFUNC(miSetPixmapDepths)
+ SYMFUNC(miInitVisuals)
+ SYMFUNC(miWindowExposures)
+ SYMFUNC(miSegregateChildren)
+ SYMFUNC(miClipNotify)
+ SYMFUNC(miHookInitVisuals)
+ SYMFUNC(miPointerAbsoluteCursor)
+ SYMFUNC(miPointerGetMotionEvents)
+ SYMFUNC(miPointerGetMotionBufferSize)
+ SYMFUNC(miOverlayCopyUnderlay)
+ SYMFUNC(miOverlaySetTransFunction)
+ SYMFUNC(miOverlayCollectUnderlayRegions)
+ SYMFUNC(miInitOverlay)
+ SYMFUNC(miOverlayComputeCompositeClip)
+ SYMFUNC(miOverlayGetPrivateClips)
+ SYMFUNC(miOverlaySetRootClip)
+ SYMVAR(miZeroLineScreenIndex)
+ SYMVAR(miSpritePointerFuncs)
+ SYMVAR(miPointerScreenIndex)
+ SYMVAR(miInstalledMaps)
+ SYMVAR(miInitVisualsProc)
#ifdef RENDER
- SYMVAR(miGlyphExtents)
+ SYMVAR(miGlyphExtents)
#endif
- { 0, 0 },
+ {0, 0}
};
diff --git a/hw/xfree86/loader/os.c b/hw/xfree86/loader/os.c
index e2e710077..49f9c0d84 100644
--- a/hw/xfree86/loader/os.c
+++ b/hw/xfree86/loader/os.c
@@ -1,4 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/os.c,v 1.2 2002/05/31 18:46:00 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/os.c,v 1.4 2003/10/15 16:29:04 dawes Exp $ */
+
+/*
+ * Copyright (c) 1999-2002 by The XFree86 Project, 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 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).
+ */
#include "loaderProcs.h"
@@ -35,15 +62,13 @@
#define OSNAME "unknown"
#endif
-
/* Return the OS name, and run-time OS version */
void
LoaderGetOS(const char **name, int *major, int *minor, int *teeny)
{
- if (name)
- *name = OSNAME;
-
- /* reporting runtime versions isn't supported yet */
-}
+ if (name)
+ *name = OSNAME;
+ /* reporting runtime versions isn't supported yet */
+}
diff --git a/hw/xfree86/loader/sym.h b/hw/xfree86/loader/sym.h
index 6ad38aa49..e937b9f08 100644
--- a/hw/xfree86/loader/sym.h
+++ b/hw/xfree86/loader/sym.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/sym.h,v 1.6 2000/10/24 00:06:55 anderson Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/sym.h,v 1.7 2003/10/15 16:29:04 dawes Exp $ */
/*
*
@@ -31,11 +31,11 @@
* added to the symbol table.
*/
-typedef void (*funcptr)(void);
+typedef void (*funcptr) (void);
typedef struct {
- char *symName;
- funcptr offset;
+ char *symName;
+ funcptr offset;
} LOOKUP;
#define SYMFUNC( func ) { #func, (funcptr)&func },
diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index 8e8bdadfc..b2823c2e5 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/xf86sym.c,v 1.227.2.1 2003/03/13 04:10:47 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/loader/xf86sym.c,v 1.242 2003/10/27 20:51:16 herrb Exp $ */
/*
*
@@ -22,6 +22,32 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
#define INCLUDE_DEPRECATED 1
@@ -70,12 +96,6 @@
#endif
#endif
-#ifdef __FreeBSD__
-/* XXX used in drmOpen(). This should change to use a less os-specific
- * method. */
-int sysctlbyname(const char*, void *, size_t *, void *, size_t);
-#endif
-
#if defined(__alpha__)
# ifdef linux
extern unsigned long _bus_base(void);
@@ -87,7 +107,7 @@ extern unsigned int _inw(unsigned short port);
extern unsigned int _inl(unsigned short port);
# endif
-# ifdef __FreeBSD__
+# ifdef __FreeBSD__
# include <sys/types.h>
extern void outb(u_int32_t port, u_int8_t val);
extern void outw(u_int32_t port, u_int16_t val);
@@ -97,25 +117,38 @@ extern u_int16_t inw(u_int32_t port);
extern u_int32_t inl(u_int32_t port);
# endif
-extern void* __divl(long, long);
-extern void* __reml(long, long);
-extern void* __divlu(long, long);
-extern void* __remlu(long, long);
-extern void* __divq(long, long);
-extern void* __divqu(long, long);
-extern void* __remq(long, long);
-extern void* __remqu(long, long);
+extern void *__divl(long, long);
+extern void *__reml(long, long);
+extern void *__divlu(long, long);
+extern void *__remlu(long, long);
+extern void *__divq(long, long);
+extern void *__divqu(long, long);
+extern void *__remq(long, long);
+extern void *__remqu(long, long);
+#endif
+
+#if defined(__sparc__) && defined(__FreeBSD__)
+extern float _Qp_qtos(unsigned int *);
+extern double _Qp_qtod(unsigned int *);
+extern unsigned long long _Qp_qtoux(unsigned int *);
+extern void _Qp_dtoq(unsigned int *, double);
+extern void _Qp_uitoq(unsigned int *, unsigned int);
#endif
#if defined(__GNUC__)
+#ifndef __UNIXOS2__
extern long __div64(long, long);
+#endif
extern long __divdf3(long, long);
extern long __divdi3(long, long);
extern long __divsf3(long, long);
extern long __divsi3(long, long);
extern long __moddi3(long, long);
extern long __modsi3(long, long);
+
+#ifndef __UNIXOS2__
extern long __mul64(long, long);
+#endif
extern long __muldf3(long, long);
extern long __muldi3(long, long);
extern long __mulsf3(long, long);
@@ -124,14 +157,19 @@ extern long __udivdi3(long, long);
extern long __udivsi3(long, long);
extern long __umoddi3(long, long);
extern long __umodsi3(long, long);
+
+#ifndef __UNIXOS2__
#pragma weak __div64
+#endif
#pragma weak __divdf3
#pragma weak __divdi3
#pragma weak __divsf3
#pragma weak __divsi3
#pragma weak __moddi3
#pragma weak __modsi3
+#ifndef __UNIXOS2__
#pragma weak __mul64
+#endif
#pragma weak __muldf3
#pragma weak __muldi3
#pragma weak __mulsf3
@@ -199,935 +237,912 @@ extern unsigned short ldw_brx(volatile unsigned char *, int);
LOOKUP xfree86LookupTab[] = {
- /* Public OSlib functions */
- SYMFUNC(xf86ReadBIOS)
- SYMFUNC(xf86EnableIO)
- SYMFUNC(xf86DisableIO)
- SYMFUNC(xf86DisableInterrupts)
- SYMFUNC(xf86EnableInterrupts)
- SYMFUNC(xf86LinearVidMem)
- SYMFUNC(xf86CheckMTRR)
- SYMFUNC(xf86MapVidMem)
- SYMFUNC(xf86UnMapVidMem)
- SYMFUNC(xf86MapReadSideEffects)
- SYMFUNC(xf86GetPciDomain)
- SYMFUNC(xf86MapDomainMemory)
- SYMFUNC(xf86MapDomainIO)
- SYMFUNC(xf86ReadDomainMemory)
- SYMFUNC(xf86UDelay)
- SYMFUNC(xf86IODelay)
- SYMFUNC(xf86SlowBcopy)
+ /* Public OSlib functions */
+ SYMFUNC(xf86ReadBIOS)
+ SYMFUNC(xf86EnableIO)
+ SYMFUNC(xf86DisableIO)
+ SYMFUNC(xf86DisableInterrupts)
+ SYMFUNC(xf86EnableInterrupts)
+ SYMFUNC(xf86LinearVidMem)
+ SYMFUNC(xf86CheckMTRR)
+ SYMFUNC(xf86MapVidMem)
+ SYMFUNC(xf86UnMapVidMem)
+ SYMFUNC(xf86MapReadSideEffects)
+ SYMFUNC(xf86GetPciDomain)
+ SYMFUNC(xf86MapDomainMemory)
+ SYMFUNC(xf86MapDomainIO)
+ SYMFUNC(xf86ReadDomainMemory)
+ SYMFUNC(xf86UDelay)
+ SYMFUNC(xf86IODelay)
+ SYMFUNC(xf86SlowBcopy)
#ifdef __alpha__
- SYMFUNC(xf86SlowBCopyToBus)
- SYMFUNC(xf86SlowBCopyFromBus)
+ SYMFUNC(xf86SlowBCopyToBus)
+ SYMFUNC(xf86SlowBCopyFromBus)
#endif
- SYMFUNC(xf86BusToMem)
- SYMFUNC(xf86MemToBus)
- SYMFUNC(xf86OpenSerial)
- SYMFUNC(xf86SetSerial)
- SYMFUNC(xf86SetSerialSpeed)
- SYMFUNC(xf86ReadSerial)
- SYMFUNC(xf86WriteSerial)
- SYMFUNC(xf86CloseSerial)
- SYMFUNC(xf86GetErrno)
- SYMFUNC(xf86WaitForInput)
- SYMFUNC(xf86SerialSendBreak)
- SYMFUNC(xf86FlushInput)
- SYMFUNC(xf86SetSerialModemState)
- SYMFUNC(xf86GetSerialModemState)
- SYMFUNC(xf86SerialModemSetBits)
- SYMFUNC(xf86SerialModemClearBits)
- SYMFUNC(xf86LoadKernelModule)
- SYMFUNC(xf86OSMouseInit)
- SYMFUNC(xf86OSKbdPreInit)
- SYMFUNC(xf86AgpGARTSupported)
- SYMFUNC(xf86GetAGPInfo)
- SYMFUNC(xf86AcquireGART)
- SYMFUNC(xf86ReleaseGART)
- SYMFUNC(xf86AllocateGARTMemory)
- SYMFUNC(xf86BindGARTMemory)
- SYMFUNC(xf86UnbindGARTMemory)
- SYMFUNC(xf86EnableAGP)
- SYMFUNC(xf86SoundKbdBell)
- SYMFUNC(xf86GARTCloseScreen)
+ SYMFUNC(xf86BusToMem)
+ SYMFUNC(xf86MemToBus)
+ SYMFUNC(xf86OpenSerial)
+ SYMFUNC(xf86SetSerial)
+ SYMFUNC(xf86SetSerialSpeed)
+ SYMFUNC(xf86ReadSerial)
+ SYMFUNC(xf86WriteSerial)
+ SYMFUNC(xf86CloseSerial)
+ SYMFUNC(xf86GetErrno)
+ SYMFUNC(xf86WaitForInput)
+ SYMFUNC(xf86SerialSendBreak)
+ SYMFUNC(xf86FlushInput)
+ SYMFUNC(xf86SetSerialModemState)
+ SYMFUNC(xf86GetSerialModemState)
+ SYMFUNC(xf86SerialModemSetBits)
+ SYMFUNC(xf86SerialModemClearBits)
+ SYMFUNC(xf86LoadKernelModule)
+ SYMFUNC(xf86OSMouseInit)
+ SYMFUNC(xf86OSKbdPreInit)
+ SYMFUNC(xf86AgpGARTSupported)
+ SYMFUNC(xf86GetAGPInfo)
+ SYMFUNC(xf86AcquireGART)
+ SYMFUNC(xf86ReleaseGART)
+ SYMFUNC(xf86AllocateGARTMemory)
+ SYMFUNC(xf86BindGARTMemory)
+ SYMFUNC(xf86UnbindGARTMemory)
+ SYMFUNC(xf86EnableAGP)
+ SYMFUNC(xf86SoundKbdBell)
+ SYMFUNC(xf86GARTCloseScreen)
#ifdef XINPUT
-/* XISB routines (Merged from Metrolink tree) */
- SYMFUNC(XisbNew)
- SYMFUNC(XisbFree)
- SYMFUNC(XisbRead)
- SYMFUNC(XisbWrite)
- SYMFUNC(XisbTrace)
- SYMFUNC(XisbBlockDuration)
+ /* XISB routines (Merged from Metrolink tree) */
+ SYMFUNC(XisbNew)
+ SYMFUNC(XisbFree)
+ SYMFUNC(XisbRead)
+ SYMFUNC(XisbWrite)
+ SYMFUNC(XisbTrace)
+ SYMFUNC(XisbBlockDuration)
#endif
- /* xf86Bus.c */
- SYMFUNC(xf86CheckPciSlot)
- SYMFUNC(xf86ClaimPciSlot)
- SYMFUNC(xf86GetPciVideoInfo)
- SYMFUNC(xf86GetPciEntity)
- SYMFUNC(xf86GetPciConfigInfo)
- SYMFUNC(xf86SetPciVideo)
- SYMFUNC(xf86ClaimIsaSlot)
- SYMFUNC(xf86ClaimFbSlot)
- SYMFUNC(xf86ClaimNoSlot)
- SYMFUNC(xf86ParsePciBusString)
- SYMFUNC(xf86ComparePciBusString)
- SYMFUNC(xf86FormatPciBusNumber)
- SYMFUNC(xf86ParseIsaBusString)
- SYMFUNC(xf86EnableAccess)
- SYMFUNC(xf86SetCurrentAccess)
- SYMFUNC(xf86IsPrimaryPci)
- SYMFUNC(xf86IsPrimaryIsa)
- SYMFUNC(xf86CheckPciGAType)
- SYMFUNC(xf86PrintResList)
- SYMFUNC(xf86AddResToList)
- SYMFUNC(xf86JoinResLists)
- SYMFUNC(xf86DupResList)
- SYMFUNC(xf86FreeResList)
- SYMFUNC(xf86ClaimFixedResources)
- SYMFUNC(xf86AddEntityToScreen)
- SYMFUNC(xf86SetEntityInstanceForScreen)
- SYMFUNC(xf86RemoveEntityFromScreen)
- SYMFUNC(xf86GetEntityInfo)
- SYMFUNC(xf86GetNumEntityInstances)
- SYMFUNC(xf86GetDevFromEntity)
- SYMFUNC(xf86GetPciInfoForEntity)
- SYMFUNC(xf86SetEntityFuncs)
- SYMFUNC(xf86DeallocateResourcesForEntity)
- SYMFUNC(xf86RegisterResources)
- SYMFUNC(xf86CheckPciMemBase)
- SYMFUNC(xf86SetAccessFuncs)
- SYMFUNC(xf86IsEntityPrimary)
- SYMFUNC(xf86FixPciResource)
- SYMFUNC(xf86SetOperatingState)
- SYMFUNC(xf86EnterServerState)
- SYMFUNC(xf86GetBlock)
- SYMFUNC(xf86GetSparse)
- SYMFUNC(xf86ReallocatePciResources)
- SYMFUNC(xf86ChkConflict)
- SYMFUNC(xf86IsPciDevPresent)
- SYMFUNC(xf86FindScreenForEntity)
- SYMFUNC(xf86FindPciDeviceVendor)
- SYMFUNC(xf86FindPciClass)
+ /* xf86Bus.c */
+ SYMFUNC(xf86CheckPciSlot)
+ SYMFUNC(xf86ClaimPciSlot)
+ SYMFUNC(xf86GetPciVideoInfo)
+ SYMFUNC(xf86GetPciEntity)
+ SYMFUNC(xf86GetPciConfigInfo)
+ SYMFUNC(xf86SetPciVideo)
+ SYMFUNC(xf86ClaimIsaSlot)
+ SYMFUNC(xf86ClaimFbSlot)
+ SYMFUNC(xf86ClaimNoSlot)
+ SYMFUNC(xf86ParsePciBusString)
+ SYMFUNC(xf86ComparePciBusString)
+ SYMFUNC(xf86FormatPciBusNumber)
+ SYMFUNC(xf86ParseIsaBusString)
+ SYMFUNC(xf86EnableAccess)
+ SYMFUNC(xf86SetCurrentAccess)
+ SYMFUNC(xf86IsPrimaryPci)
+ SYMFUNC(xf86IsPrimaryIsa)
+ SYMFUNC(xf86CheckPciGAType)
+ SYMFUNC(xf86PrintResList)
+ SYMFUNC(xf86AddResToList)
+ SYMFUNC(xf86JoinResLists)
+ SYMFUNC(xf86DupResList)
+ SYMFUNC(xf86FreeResList)
+ SYMFUNC(xf86ClaimFixedResources)
+ SYMFUNC(xf86AddEntityToScreen)
+ SYMFUNC(xf86SetEntityInstanceForScreen)
+ SYMFUNC(xf86RemoveEntityFromScreen)
+ SYMFUNC(xf86GetEntityInfo)
+ SYMFUNC(xf86GetNumEntityInstances)
+ SYMFUNC(xf86GetDevFromEntity)
+ SYMFUNC(xf86GetPciInfoForEntity)
+ SYMFUNC(xf86SetEntityFuncs)
+ SYMFUNC(xf86DeallocateResourcesForEntity)
+ SYMFUNC(xf86RegisterResources)
+ SYMFUNC(xf86CheckPciMemBase)
+ SYMFUNC(xf86SetAccessFuncs)
+ SYMFUNC(xf86IsEntityPrimary)
+ SYMFUNC(xf86FixPciResource)
+ SYMFUNC(xf86SetOperatingState)
+ SYMFUNC(xf86EnterServerState)
+ SYMFUNC(xf86GetBlock)
+ SYMFUNC(xf86GetSparse)
+ SYMFUNC(xf86ReallocatePciResources)
+ SYMFUNC(xf86ChkConflict)
+ SYMFUNC(xf86IsPciDevPresent)
+ SYMFUNC(xf86FindScreenForEntity)
+ SYMFUNC(xf86FindPciDeviceVendor)
+ SYMFUNC(xf86FindPciClass)
#ifdef INCLUDE_DEPRECATED
- SYMFUNC(xf86EnablePciBusMaster)
+ SYMFUNC(xf86EnablePciBusMaster)
#endif
- SYMFUNC(xf86RegisterStateChangeNotificationCallback)
- SYMFUNC(xf86DeregisterStateChangeNotificationCallback)
- SYMFUNC(xf86NoSharedResources)
+ SYMFUNC(xf86RegisterStateChangeNotificationCallback)
+ SYMFUNC(xf86DeregisterStateChangeNotificationCallback)
+ SYMFUNC(xf86NoSharedResources)
#ifdef async
- SYMFUNC(xf86QueueAsyncEvent)
+ SYMFUNC(xf86QueueAsyncEvent)
#endif
- /* Shared Accel Accessor Functions */
- SYMFUNC(xf86GetLastScrnFlag)
- SYMFUNC(xf86SetLastScrnFlag)
- SYMFUNC(xf86IsEntityShared)
- SYMFUNC(xf86SetEntityShared)
- SYMFUNC(xf86IsEntitySharable)
- SYMFUNC(xf86SetEntitySharable)
- SYMFUNC(xf86IsPrimInitDone)
- SYMFUNC(xf86SetPrimInitDone)
- SYMFUNC(xf86ClearPrimInitDone)
- SYMFUNC(xf86AllocateEntityPrivateIndex)
- SYMFUNC(xf86GetEntityPrivate)
-
- /* xf86Configure.c */
- SYMFUNC(xf86AddDeviceToConfigure)
-
- /* xf86Cursor.c */
- SYMFUNC(xf86GetPointerScreenFuncs)
+ /* Shared Accel Accessor Functions */
+ SYMFUNC(xf86GetLastScrnFlag)
+ SYMFUNC(xf86SetLastScrnFlag)
+ SYMFUNC(xf86IsEntityShared)
+ SYMFUNC(xf86SetEntityShared)
+ SYMFUNC(xf86IsEntitySharable)
+ SYMFUNC(xf86SetEntitySharable)
+ SYMFUNC(xf86IsPrimInitDone)
+ SYMFUNC(xf86SetPrimInitDone)
+ SYMFUNC(xf86ClearPrimInitDone)
+ SYMFUNC(xf86AllocateEntityPrivateIndex)
+ SYMFUNC(xf86GetEntityPrivate)
+
+ /* xf86Configure.c */
+ SYMFUNC(xf86AddDeviceToConfigure)
+
+ /* xf86Cursor.c */
+ SYMFUNC(xf86GetPointerScreenFuncs)
- /* xf86DGA.c */
- /* For drivers */
- SYMFUNC(DGAInit)
- /* For extmod */
- SYMFUNC(DGAAvailable)
- SYMFUNC(DGAActive)
- SYMFUNC(DGASetMode)
- SYMFUNC(DGASetInputMode)
- SYMFUNC(DGASelectInput)
- SYMFUNC(DGAGetViewportStatus)
- SYMFUNC(DGASetViewport)
- SYMFUNC(DGAInstallCmap)
- SYMFUNC(DGASync)
- SYMFUNC(DGAFillRect)
- SYMFUNC(DGABlitRect)
- SYMFUNC(DGABlitTransRect)
- SYMFUNC(DGAGetModes)
- SYMFUNC(DGAGetOldDGAMode)
- SYMFUNC(DGAGetModeInfo)
- SYMFUNC(DGAChangePixmapMode)
- SYMFUNC(DGACreateColormap)
- SYMFUNC(DGAOpenFramebuffer)
- SYMFUNC(DGACloseFramebuffer)
+ /* xf86DGA.c */
+ /* For drivers */
+ SYMFUNC(DGAInit)
+ /* For extmod */
+ SYMFUNC(DGAAvailable)
+ SYMFUNC(DGAActive)
+ SYMFUNC(DGASetMode)
+ SYMFUNC(DGASetInputMode)
+ SYMFUNC(DGASelectInput)
+ SYMFUNC(DGAGetViewportStatus)
+ SYMFUNC(DGASetViewport)
+ SYMFUNC(DGAInstallCmap)
+ SYMFUNC(DGASync)
+ SYMFUNC(DGAFillRect)
+ SYMFUNC(DGABlitRect)
+ SYMFUNC(DGABlitTransRect)
+ SYMFUNC(DGAGetModes)
+ SYMFUNC(DGAGetOldDGAMode)
+ SYMFUNC(DGAGetModeInfo)
+ SYMFUNC(DGAChangePixmapMode)
+ SYMFUNC(DGACreateColormap)
+ SYMFUNC(DGAOpenFramebuffer)
+ SYMFUNC(DGACloseFramebuffer)
- /* xf86DPMS.c */
- SYMFUNC(xf86DPMSInit)
+ /* xf86DPMS.c */
+ SYMFUNC(xf86DPMSInit)
- /* xf86Events.c */
- SYMFUNC(SetTimeSinceLastInputEvent)
- SYMFUNC(xf86AddInputHandler)
- SYMFUNC(xf86RemoveInputHandler)
- SYMFUNC(xf86DisableInputHandler)
- SYMFUNC(xf86EnableInputHandler)
- SYMFUNC(xf86AddEnabledDevice)
- SYMFUNC(xf86RemoveEnabledDevice)
- SYMFUNC(xf86InterceptSignals)
- SYMFUNC(xf86EnableVTSwitch)
+ /* xf86Events.c */
+ SYMFUNC(SetTimeSinceLastInputEvent)
+ SYMFUNC(xf86AddInputHandler)
+ SYMFUNC(xf86RemoveInputHandler)
+ SYMFUNC(xf86DisableInputHandler)
+ SYMFUNC(xf86EnableInputHandler)
+ SYMFUNC(xf86AddEnabledDevice)
+ SYMFUNC(xf86RemoveEnabledDevice)
+ SYMFUNC(xf86InterceptSignals)
+ SYMFUNC(xf86EnableVTSwitch)
- /* xf86Helper.c */
- SYMFUNC(xf86AddDriver)
- SYMFUNC(xf86AddInputDriver)
- SYMFUNC(xf86DeleteDriver)
- SYMFUNC(xf86DeleteInput)
- SYMFUNC(xf86AllocateInput)
- SYMFUNC(xf86AllocateScreen)
- SYMFUNC(xf86DeleteScreen)
- SYMFUNC(xf86AllocateScrnInfoPrivateIndex)
- SYMFUNC(xf86AddPixFormat)
- SYMFUNC(xf86SetDepthBpp)
- SYMFUNC(xf86PrintDepthBpp)
- SYMFUNC(xf86SetWeight)
- SYMFUNC(xf86SetDefaultVisual)
- SYMFUNC(xf86SetGamma)
- SYMFUNC(xf86SetDpi)
- SYMFUNC(xf86SetBlackWhitePixels)
- SYMFUNC(xf86EnableDisableFBAccess)
- SYMFUNC(xf86VDrvMsgVerb)
- SYMFUNC(xf86DrvMsgVerb)
- SYMFUNC(xf86DrvMsg)
- SYMFUNC(xf86MsgVerb)
- SYMFUNC(xf86Msg)
- SYMFUNC(xf86ErrorFVerb)
- SYMFUNC(xf86ErrorF)
- SYMFUNC(xf86TokenToString)
- SYMFUNC(xf86StringToToken)
- SYMFUNC(xf86ShowClocks)
- SYMFUNC(xf86PrintChipsets)
- SYMFUNC(xf86MatchDevice)
- SYMFUNC(xf86MatchPciInstances)
- SYMFUNC(xf86MatchIsaInstances)
- SYMFUNC(xf86GetVerbosity)
- SYMFUNC(xf86GetVisualName)
- SYMFUNC(xf86GetPix24)
- SYMFUNC(xf86GetDepth)
- SYMFUNC(xf86GetWeight)
- SYMFUNC(xf86GetGamma)
- SYMFUNC(xf86GetFlipPixels)
- SYMFUNC(xf86GetServerName)
- SYMFUNC(xf86ServerIsExiting)
- SYMFUNC(xf86ServerIsOnlyDetecting)
- SYMFUNC(xf86ServerIsOnlyProbing)
- SYMFUNC(xf86ServerIsResetting)
- SYMFUNC(xf86CaughtSignal)
- SYMFUNC(xf86GetVidModeAllowNonLocal)
- SYMFUNC(xf86GetVidModeEnabled)
- SYMFUNC(xf86GetModInDevAllowNonLocal)
- SYMFUNC(xf86GetModInDevEnabled)
- SYMFUNC(xf86GetAllowMouseOpenFail)
- SYMFUNC(xf86CommonSpecialKey)
- SYMFUNC(xf86IsPc98)
- SYMFUNC(xf86DisableRandR)
- SYMFUNC(xf86GetVersion)
- SYMFUNC(xf86GetModuleVersion)
- SYMFUNC(xf86GetClocks)
- SYMFUNC(xf86SetPriority)
- SYMFUNC(xf86LoadDrvSubModule)
- SYMFUNC(xf86LoadSubModule)
- SYMFUNC(xf86LoadOneModule)
- SYMFUNC(xf86UnloadSubModule)
- SYMFUNC(xf86LoaderCheckSymbol)
- SYMFUNC(xf86LoaderRefSymLists)
- SYMFUNC(xf86LoaderRefSymbols)
- SYMFUNC(xf86LoaderReqSymLists)
- SYMFUNC(xf86LoaderReqSymbols)
- SYMFUNC(xf86SetBackingStore)
- SYMFUNC(xf86SetSilkenMouse)
- /* SYMFUNC(xf86NewSerialNumber) */
- SYMFUNC(xf86FindXvOptions)
- SYMFUNC(xf86GetOS)
- SYMFUNC(xf86ConfigPciEntity)
- SYMFUNC(xf86ConfigIsaEntity)
- SYMFUNC(xf86ConfigFbEntity)
- SYMFUNC(xf86ConfigActivePciEntity)
- SYMFUNC(xf86ConfigActiveIsaEntity)
- SYMFUNC(xf86ConfigPciEntityInactive)
- SYMFUNC(xf86ConfigIsaEntityInactive)
- SYMFUNC(xf86IsScreenPrimary)
- SYMFUNC(xf86RegisterRootWindowProperty)
- SYMFUNC(xf86IsUnblank)
- SYMFUNC(xf86AddModuleInfo)
- SYMFUNC(xf86DeleteModuleInfo)
+ /* xf86Helper.c */
+ SYMFUNC(xf86AddDriver)
+ SYMFUNC(xf86AddInputDriver)
+ SYMFUNC(xf86DeleteDriver)
+ SYMFUNC(xf86DeleteInput)
+ SYMFUNC(xf86AllocateInput)
+ SYMFUNC(xf86AllocateScreen)
+ SYMFUNC(xf86DeleteScreen)
+ SYMFUNC(xf86AllocateScrnInfoPrivateIndex)
+ SYMFUNC(xf86AddPixFormat)
+ SYMFUNC(xf86SetDepthBpp)
+ SYMFUNC(xf86PrintDepthBpp)
+ SYMFUNC(xf86SetWeight)
+ SYMFUNC(xf86SetDefaultVisual)
+ SYMFUNC(xf86SetGamma)
+ SYMFUNC(xf86SetDpi)
+ SYMFUNC(xf86SetBlackWhitePixels)
+ SYMFUNC(xf86EnableDisableFBAccess)
+ SYMFUNC(xf86VDrvMsgVerb)
+ SYMFUNC(xf86DrvMsgVerb)
+ SYMFUNC(xf86DrvMsg)
+ SYMFUNC(xf86MsgVerb)
+ SYMFUNC(xf86Msg)
+ SYMFUNC(xf86ErrorFVerb)
+ SYMFUNC(xf86ErrorF)
+ SYMFUNC(xf86TokenToString)
+ SYMFUNC(xf86StringToToken)
+ SYMFUNC(xf86ShowClocks)
+ SYMFUNC(xf86PrintChipsets)
+ SYMFUNC(xf86MatchDevice)
+ SYMFUNC(xf86MatchPciInstances)
+ SYMFUNC(xf86MatchIsaInstances)
+ SYMFUNC(xf86GetVerbosity)
+ SYMFUNC(xf86GetVisualName)
+ SYMFUNC(xf86GetPix24)
+ SYMFUNC(xf86GetDepth)
+ SYMFUNC(xf86GetWeight)
+ SYMFUNC(xf86GetGamma)
+ SYMFUNC(xf86GetFlipPixels)
+ SYMFUNC(xf86GetServerName)
+ SYMFUNC(xf86ServerIsExiting)
+ SYMFUNC(xf86ServerIsOnlyDetecting)
+ SYMFUNC(xf86ServerIsOnlyProbing)
+ SYMFUNC(xf86ServerIsResetting)
+ SYMFUNC(xf86CaughtSignal)
+ SYMFUNC(xf86GetVidModeAllowNonLocal)
+ SYMFUNC(xf86GetVidModeEnabled)
+ SYMFUNC(xf86GetModInDevAllowNonLocal)
+ SYMFUNC(xf86GetModInDevEnabled)
+ SYMFUNC(xf86GetAllowMouseOpenFail)
+ SYMFUNC(xf86CommonSpecialKey)
+ SYMFUNC(xf86IsPc98)
+ SYMFUNC(xf86DisableRandR)
+ SYMFUNC(xf86GetVersion)
+ SYMFUNC(xf86GetModuleVersion)
+ SYMFUNC(xf86GetClocks)
+ SYMFUNC(xf86SetPriority)
+ SYMFUNC(xf86LoadDrvSubModule)
+ SYMFUNC(xf86LoadSubModule)
+ SYMFUNC(xf86LoadOneModule)
+ SYMFUNC(xf86UnloadSubModule)
+ SYMFUNC(xf86LoaderCheckSymbol)
+ SYMFUNC(xf86LoaderRefSymLists)
+ SYMFUNC(xf86LoaderRefSymbols)
+ SYMFUNC(xf86LoaderReqSymLists)
+ SYMFUNC(xf86LoaderReqSymbols)
+ SYMFUNC(xf86SetBackingStore)
+ SYMFUNC(xf86SetSilkenMouse)
+ /* SYMFUNC(xf86NewSerialNumber) */
+ SYMFUNC(xf86FindXvOptions)
+ SYMFUNC(xf86GetOS)
+ SYMFUNC(xf86ConfigPciEntity)
+ SYMFUNC(xf86ConfigIsaEntity)
+ SYMFUNC(xf86ConfigFbEntity)
+ SYMFUNC(xf86ConfigActivePciEntity)
+ SYMFUNC(xf86ConfigActiveIsaEntity)
+ SYMFUNC(xf86ConfigPciEntityInactive)
+ SYMFUNC(xf86ConfigIsaEntityInactive)
+ SYMFUNC(xf86IsScreenPrimary)
+ SYMFUNC(xf86RegisterRootWindowProperty)
+ SYMFUNC(xf86IsUnblank)
+ SYMFUNC(xf86AddModuleInfo)
+ SYMFUNC(xf86DeleteModuleInfo)
#if defined(__sparc__) && !defined(__OpenBSD__)
- /* xf86sbusBus.c */
- SYMFUNC(xf86MatchSbusInstances)
- SYMFUNC(xf86GetSbusInfoForEntity)
- SYMFUNC(xf86GetEntityForSbusInfo)
- SYMFUNC(xf86SbusUseBuiltinMode)
- SYMFUNC(xf86MapSbusMem)
- SYMFUNC(xf86UnmapSbusMem)
- SYMFUNC(xf86SbusHideOsHwCursor)
- SYMFUNC(xf86SbusSetOsHwCursorCmap)
- SYMFUNC(xf86SbusHandleColormaps)
- SYMFUNC(sparcPromInit)
- SYMFUNC(sparcPromClose)
- SYMFUNC(sparcPromGetProperty)
- SYMFUNC(sparcPromGetBool)
+ /* xf86sbusBus.c */
+ SYMFUNC(xf86MatchSbusInstances)
+ SYMFUNC(xf86GetSbusInfoForEntity)
+ SYMFUNC(xf86GetEntityForSbusInfo)
+ SYMFUNC(xf86SbusUseBuiltinMode)
+ SYMFUNC(xf86MapSbusMem)
+ SYMFUNC(xf86UnmapSbusMem)
+ SYMFUNC(xf86SbusHideOsHwCursor)
+ SYMFUNC(xf86SbusSetOsHwCursorCmap)
+ SYMFUNC(xf86SbusHandleColormaps)
+ SYMFUNC(sparcPromInit)
+ SYMFUNC(sparcPromClose)
+ SYMFUNC(sparcPromGetProperty)
+ SYMFUNC(sparcPromGetBool)
#endif
- /* xf86Init.c */
- SYMFUNC(xf86GetPixFormat)
- SYMFUNC(xf86GetBppFromDepth)
+ /* xf86Init.c */
+ SYMFUNC(xf86GetPixFormat)
+ SYMFUNC(xf86GetBppFromDepth)
- /* xf86Mode.c */
- SYMFUNC(xf86GetNearestClock)
- SYMFUNC(xf86ModeStatusToString)
- SYMFUNC(xf86LookupMode)
- SYMFUNC(xf86CheckModeForMonitor)
- SYMFUNC(xf86InitialCheckModeForDriver)
- SYMFUNC(xf86CheckModeForDriver)
- SYMFUNC(xf86ValidateModes)
- SYMFUNC(xf86DeleteMode)
- SYMFUNC(xf86PruneDriverModes)
- SYMFUNC(xf86SetCrtcForModes)
- SYMFUNC(xf86PrintModes)
- SYMFUNC(xf86ShowClockRanges)
+ /* xf86Mode.c */
+ SYMFUNC(xf86GetNearestClock)
+ SYMFUNC(xf86ModeStatusToString)
+ SYMFUNC(xf86LookupMode)
+ SYMFUNC(xf86CheckModeForMonitor)
+ SYMFUNC(xf86InitialCheckModeForDriver)
+ SYMFUNC(xf86CheckModeForDriver)
+ SYMFUNC(xf86ValidateModes)
+ SYMFUNC(xf86DeleteMode)
+ SYMFUNC(xf86PruneDriverModes)
+ SYMFUNC(xf86SetCrtcForModes)
+ SYMFUNC(xf86PrintModes)
+ SYMFUNC(xf86ShowClockRanges)
- /* xf86Option.c */
- SYMFUNC(xf86CollectOptions)
- SYMFUNC(xf86CollectInputOptions)
- /* Merging of XInput stuff */
- SYMFUNC(xf86AddNewOption)
- SYMFUNC(xf86SetBoolOption)
- SYMFUNC(xf86NewOption)
- SYMFUNC(xf86NextOption)
- SYMFUNC(xf86OptionListCreate)
- SYMFUNC(xf86OptionListMerge)
- SYMFUNC(xf86OptionListFree)
- SYMFUNC(xf86OptionName)
- SYMFUNC(xf86OptionValue)
- SYMFUNC(xf86OptionListReport)
- SYMFUNC(xf86SetIntOption)
- SYMFUNC(xf86SetRealOption)
- SYMFUNC(xf86SetStrOption)
- SYMFUNC(xf86ReplaceIntOption)
- SYMFUNC(xf86ReplaceStrOption)
- SYMFUNC(xf86ReplaceBoolOption)
- SYMFUNC(xf86FindOption)
- SYMFUNC(xf86FindOptionValue)
- SYMFUNC(xf86MarkOptionUsed)
- SYMFUNC(xf86MarkOptionUsedByName)
- SYMFUNC(xf86CheckIfOptionUsed)
- SYMFUNC(xf86CheckIfOptionUsedByName)
- SYMFUNC(xf86ShowUnusedOptions)
- SYMFUNC(xf86ProcessOptions)
- SYMFUNC(xf86TokenToOptinfo)
- SYMFUNC(xf86TokenToOptName)
- SYMFUNC(xf86IsOptionSet)
- SYMFUNC(xf86GetOptValString)
- SYMFUNC(xf86GetOptValInteger)
- SYMFUNC(xf86GetOptValULong)
- SYMFUNC(xf86GetOptValReal)
- SYMFUNC(xf86GetOptValFreq)
- SYMFUNC(xf86GetOptValBool)
- SYMFUNC(xf86ReturnOptValBool)
- SYMFUNC(xf86NameCmp)
- SYMFUNC(xf86InitValuatorAxisStruct)
- SYMFUNC(xf86InitValuatorDefaults)
-
+ /* xf86Option.c */
+ SYMFUNC(xf86CollectOptions)
+ SYMFUNC(xf86CollectInputOptions)
+ /* Merging of XInput stuff */
+ SYMFUNC(xf86AddNewOption)
+ SYMFUNC(xf86NewOption)
+ SYMFUNC(xf86NextOption)
+ SYMFUNC(xf86OptionListCreate)
+ SYMFUNC(xf86OptionListMerge)
+ SYMFUNC(xf86OptionListFree)
+ SYMFUNC(xf86OptionName)
+ SYMFUNC(xf86OptionValue)
+ SYMFUNC(xf86OptionListReport)
+ SYMFUNC(xf86SetIntOption)
+ SYMFUNC(xf86SetRealOption)
+ SYMFUNC(xf86SetStrOption)
+ SYMFUNC(xf86SetBoolOption)
+ SYMFUNC(xf86CheckIntOption)
+ SYMFUNC(xf86CheckRealOption)
+ SYMFUNC(xf86CheckStrOption)
+ SYMFUNC(xf86CheckBoolOption)
+ SYMFUNC(xf86ReplaceIntOption)
+ SYMFUNC(xf86ReplaceRealOption)
+ SYMFUNC(xf86ReplaceStrOption)
+ SYMFUNC(xf86ReplaceBoolOption)
+ SYMFUNC(xf86FindOption)
+ SYMFUNC(xf86FindOptionValue)
+ SYMFUNC(xf86MarkOptionUsed)
+ SYMFUNC(xf86MarkOptionUsedByName)
+ SYMFUNC(xf86CheckIfOptionUsed)
+ SYMFUNC(xf86CheckIfOptionUsedByName)
+ SYMFUNC(xf86ShowUnusedOptions)
+ SYMFUNC(xf86ProcessOptions)
+ SYMFUNC(xf86TokenToOptinfo)
+ SYMFUNC(xf86TokenToOptName)
+ SYMFUNC(xf86IsOptionSet)
+ SYMFUNC(xf86GetOptValString)
+ SYMFUNC(xf86GetOptValInteger)
+ SYMFUNC(xf86GetOptValULong)
+ SYMFUNC(xf86GetOptValReal)
+ SYMFUNC(xf86GetOptValFreq)
+ SYMFUNC(xf86GetOptValBool)
+ SYMFUNC(xf86ReturnOptValBool)
+ SYMFUNC(xf86NameCmp)
+ SYMFUNC(xf86InitValuatorAxisStruct)
+ SYMFUNC(xf86InitValuatorDefaults)
- /* xf86fbman.c */
- SYMFUNC(xf86InitFBManager)
- SYMFUNC(xf86InitFBManagerArea)
- SYMFUNC(xf86InitFBManagerRegion)
- SYMFUNC(xf86RegisterFreeBoxCallback)
- SYMFUNC(xf86FreeOffscreenArea)
- SYMFUNC(xf86AllocateOffscreenArea)
- SYMFUNC(xf86AllocateLinearOffscreenArea)
- SYMFUNC(xf86ResizeOffscreenArea)
- SYMFUNC(xf86FBManagerRunning)
- SYMFUNC(xf86QueryLargestOffscreenArea)
- SYMFUNC(xf86PurgeUnlockedOffscreenAreas)
- SYMFUNC(xf86RegisterOffscreenManager)
- SYMFUNC(xf86AllocateOffscreenLinear)
- SYMFUNC(xf86ResizeOffscreenLinear)
- SYMFUNC(xf86QueryLargestOffscreenLinear)
- SYMFUNC(xf86FreeOffscreenLinear)
+ /* xf86fbman.c */
+ SYMFUNC(xf86InitFBManager)
+ SYMFUNC(xf86InitFBManagerArea)
+ SYMFUNC(xf86InitFBManagerRegion)
+ SYMFUNC(xf86InitFBManagerLinear)
+ SYMFUNC(xf86RegisterFreeBoxCallback)
+ SYMFUNC(xf86FreeOffscreenArea)
+ SYMFUNC(xf86AllocateOffscreenArea)
+ SYMFUNC(xf86AllocateLinearOffscreenArea)
+ SYMFUNC(xf86ResizeOffscreenArea)
+ SYMFUNC(xf86FBManagerRunning)
+ SYMFUNC(xf86QueryLargestOffscreenArea)
+ SYMFUNC(xf86PurgeUnlockedOffscreenAreas)
+ SYMFUNC(xf86RegisterOffscreenManager)
+ SYMFUNC(xf86AllocateOffscreenLinear)
+ SYMFUNC(xf86ResizeOffscreenLinear)
+ SYMFUNC(xf86QueryLargestOffscreenLinear)
+ SYMFUNC(xf86FreeOffscreenLinear)
+ /* xf86cmap.c */
+ SYMFUNC(xf86HandleColormaps)
- /* xf86cmap.c */
- SYMFUNC(xf86HandleColormaps)
+ /* xf86xv.c */
+ SYMFUNC(xf86XVScreenInit)
+ SYMFUNC(xf86XVRegisterGenericAdaptorDriver)
+ SYMFUNC(xf86XVListGenericAdaptors)
+ SYMFUNC(xf86XVRegisterOffscreenImages)
+ SYMFUNC(xf86XVQueryOffscreenImages)
+ SYMFUNC(xf86XVAllocateVideoAdaptorRec)
+ SYMFUNC(xf86XVFreeVideoAdaptorRec)
+ SYMFUNC(xf86XVFillKeyHelper)
+ SYMFUNC(xf86XVClipVideoHelper)
+ SYMFUNC(xf86XVCopyYUV12ToPacked)
+ SYMFUNC(xf86XVCopyPacked)
- /* xf86xv.c */
- SYMFUNC(xf86XVScreenInit)
- SYMFUNC(xf86XVRegisterGenericAdaptorDriver)
- SYMFUNC(xf86XVListGenericAdaptors)
- SYMFUNC(xf86XVRegisterOffscreenImages)
- SYMFUNC(xf86XVQueryOffscreenImages)
- SYMFUNC(xf86XVAllocateVideoAdaptorRec)
- SYMFUNC(xf86XVFreeVideoAdaptorRec)
- SYMFUNC(xf86XVFillKeyHelper)
- SYMFUNC(xf86XVClipVideoHelper)
+ /* xf86xvmc.c */
+ SYMFUNC(xf86XvMCScreenInit)
+ SYMFUNC(xf86XvMCCreateAdaptorRec)
+ SYMFUNC(xf86XvMCDestroyAdaptorRec)
- /* xf86xvmc.c */
- SYMFUNC(xf86XvMCScreenInit)
-
- /* xf86VidMode.c */
- SYMFUNC(VidModeExtensionInit)
+ /* xf86VidMode.c */
+ SYMFUNC(VidModeExtensionInit)
#ifdef XF86VIDMODE
- SYMFUNC(VidModeGetCurrentModeline)
- SYMFUNC(VidModeGetFirstModeline)
- SYMFUNC(VidModeGetNextModeline)
- SYMFUNC(VidModeDeleteModeline)
- SYMFUNC(VidModeZoomViewport)
- SYMFUNC(VidModeGetViewPort)
- SYMFUNC(VidModeSetViewPort)
- SYMFUNC(VidModeSwitchMode)
- SYMFUNC(VidModeLockZoom)
- SYMFUNC(VidModeGetMonitor)
- SYMFUNC(VidModeGetNumOfClocks)
- SYMFUNC(VidModeGetClocks)
- SYMFUNC(VidModeCheckModeForMonitor)
- SYMFUNC(VidModeCheckModeForDriver)
- SYMFUNC(VidModeSetCrtcForMode)
- SYMFUNC(VidModeAddModeline)
- SYMFUNC(VidModeGetDotClock)
- SYMFUNC(VidModeGetNumOfModes)
- SYMFUNC(VidModeSetGamma)
- SYMFUNC(VidModeGetGamma)
- SYMFUNC(VidModeCreateMode)
- SYMFUNC(VidModeCopyMode)
- SYMFUNC(VidModeGetModeValue)
- SYMFUNC(VidModeSetModeValue)
- SYMFUNC(VidModeGetMonitorValue)
- SYMFUNC(VidModeSetGammaRamp)
- SYMFUNC(VidModeGetGammaRamp)
- SYMFUNC(VidModeGetGammaRampSize)
+ SYMFUNC(VidModeGetCurrentModeline)
+ SYMFUNC(VidModeGetFirstModeline)
+ SYMFUNC(VidModeGetNextModeline)
+ SYMFUNC(VidModeDeleteModeline)
+ SYMFUNC(VidModeZoomViewport)
+ SYMFUNC(VidModeGetViewPort)
+ SYMFUNC(VidModeSetViewPort)
+ SYMFUNC(VidModeSwitchMode)
+ SYMFUNC(VidModeLockZoom)
+ SYMFUNC(VidModeGetMonitor)
+ SYMFUNC(VidModeGetNumOfClocks)
+ SYMFUNC(VidModeGetClocks)
+ SYMFUNC(VidModeCheckModeForMonitor)
+ SYMFUNC(VidModeCheckModeForDriver)
+ SYMFUNC(VidModeSetCrtcForMode)
+ SYMFUNC(VidModeAddModeline)
+ SYMFUNC(VidModeGetDotClock)
+ SYMFUNC(VidModeGetNumOfModes)
+ SYMFUNC(VidModeSetGamma)
+ SYMFUNC(VidModeGetGamma)
+ SYMFUNC(VidModeCreateMode)
+ SYMFUNC(VidModeCopyMode)
+ SYMFUNC(VidModeGetModeValue)
+ SYMFUNC(VidModeSetModeValue)
+ SYMFUNC(VidModeGetMonitorValue)
+ SYMFUNC(VidModeSetGammaRamp)
+ SYMFUNC(VidModeGetGammaRamp)
+ SYMFUNC(VidModeGetGammaRampSize)
#endif
- /* xf86MiscExt.c */
+ /* xf86Versions.c */
+ SYMFUNC(xf86GetBuiltinInterfaceVersion)
+ SYMFUNC(xf86RegisterBuiltinInterfaceVersion)
+
+ /* xf86MiscExt.c */
#ifdef XF86MISC
- SYMFUNC(MiscExtGetMouseSettings)
- SYMFUNC(MiscExtGetMouseValue)
- SYMFUNC(MiscExtSetMouseValue)
- SYMFUNC(MiscExtSetMouseDevice)
- SYMFUNC(MiscExtGetKbdSettings)
- SYMFUNC(MiscExtGetKbdValue)
- SYMFUNC(MiscExtSetKbdValue)
- SYMFUNC(MiscExtSetGrabKeysState)
- SYMFUNC(MiscExtCreateStruct)
- SYMFUNC(MiscExtDestroyStruct)
- SYMFUNC(MiscExtApply)
- SYMFUNC(MiscExtGetFilePaths)
+ SYMFUNC(MiscExtGetMouseSettings)
+ SYMFUNC(MiscExtGetMouseValue)
+ SYMFUNC(MiscExtSetMouseValue)
+ SYMFUNC(MiscExtSetMouseDevice)
+ SYMFUNC(MiscExtGetKbdSettings)
+ SYMFUNC(MiscExtGetKbdValue)
+ SYMFUNC(MiscExtSetKbdValue)
+ SYMFUNC(MiscExtSetGrabKeysState)
+ SYMFUNC(MiscExtCreateStruct)
+ SYMFUNC(MiscExtDestroyStruct)
+ SYMFUNC(MiscExtApply)
+ SYMFUNC(MiscExtGetFilePaths)
+ SYMFUNC(MiscExtPassMessage)
#endif
- /* Misc */
- SYMFUNC(GetTimeInMillis)
+ /* Misc */
+ SYMFUNC(GetTimeInMillis)
- /* xf86Xinput.c */
+ /* xf86Xinput.c */
#ifdef XINPUT
- SYMFUNC(xf86ProcessCommonOptions)
- SYMFUNC(xf86IsCorePointer)
- SYMFUNC(xf86PostMotionEvent)
- SYMFUNC(xf86PostProximityEvent)
- SYMFUNC(xf86PostButtonEvent)
- SYMFUNC(xf86PostKeyEvent)
- SYMFUNC(xf86PostKeyboardEvent)
- SYMFUNC(xf86GetMotionEvents)
- SYMFUNC(xf86MotionHistoryAllocate)
- SYMFUNC(xf86FirstLocalDevice)
- SYMFUNC(xf86eqEnqueue)
+ SYMFUNC(xf86ProcessCommonOptions)
+ SYMFUNC(xf86IsCorePointer)
+ SYMFUNC(xf86PostMotionEvent)
+ SYMFUNC(xf86PostProximityEvent)
+ SYMFUNC(xf86PostButtonEvent)
+ SYMFUNC(xf86PostKeyEvent)
+ SYMFUNC(xf86PostKeyboardEvent)
+ SYMFUNC(xf86GetMotionEvents)
+ SYMFUNC(xf86MotionHistoryAllocate)
+ SYMFUNC(xf86FirstLocalDevice)
+ SYMFUNC(xf86eqEnqueue)
/* The following segment merged from Metrolink tree */
- SYMFUNC(xf86XInputSetScreen)
- SYMFUNC(xf86ScaleAxis)
- SYMFUNC(xf86XInputSetSendCoreEvents)
+ SYMFUNC(xf86XInputSetScreen)
+ SYMFUNC(xf86ScaleAxis)
+ SYMFUNC(xf86XInputSetSendCoreEvents)
/* End merged segment */
#endif
- SYMFUNC(DPMSGet)
- SYMFUNC(DPMSSet)
- SYMFUNC(DPMSSupported)
+ SYMFUNC(DPMSGet)
+ SYMFUNC(DPMSSet)
+ SYMFUNC(DPMSSupported)
/* xf86Debug.c */
#ifdef BUILDDEBUG
- SYMFUNC(xf86Break1)
- SYMFUNC(xf86Break2)
- SYMFUNC(xf86Break3)
- SYMFUNC(xf86SPTimestamp)
- SYMFUNC(xf86STimestamp)
+ SYMFUNC(xf86Break1)
+ SYMFUNC(xf86Break2)
+ SYMFUNC(xf86Break3)
+ SYMFUNC(xf86SPTimestamp)
+ SYMFUNC(xf86STimestamp)
#endif
-
-#if 0 /* we want to move the hw stuff in a module */
- SYMFUNC(xf86dactopel)
- SYMFUNC(xf86dactocomm)
- SYMFUNC(xf86getdaccomm)
- SYMFUNC(xf86setdaccomm)
- SYMFUNC(xf86setdaccommbit)
- SYMFUNC(xf86clrdaccommbit)
- SYMFUNC(s3IBMRGB_Probe)
- SYMFUNC(s3IBMRGB_Init)
- SYMFUNC(s3InIBMRGBIndReg)
- SYMFUNC(Ti3025SetClock)
- SYMFUNC(Ti3026SetClock)
- SYMFUNC(Ti3030SetClock)
- SYMFUNC(AltICD2061SetClock)
- SYMFUNC(SC11412SetClock)
- SYMFUNC(ICS2595SetClock)
- SYMFUNC(Att409SetClock)
- SYMFUNC(Chrontel8391SetClock)
- SYMFUNC(IBMRGBSetClock)
- SYMFUNC(ICS5342SetClock)
- SYMFUNC(S3TrioSetClock)
- SYMFUNC(S3Trio64V2SetClock)
- SYMFUNC(S3gendacSetClock)
- SYMFUNC(STG1703SetClock)
- SYMFUNC(ET6000SetClock)
- SYMFUNC(S3AuroraSetClock)
- SYMFUNC(commonCalcClock)
- SYMFUNC(xf86writepci)
- SYMFUNC(dacOutTi3026IndReg)
- SYMFUNC(dacInTi3026IndReg)
- SYMFUNC(s3OutIBMRGBIndReg)
- SYMFUNC(CirrusFindClock)
- SYMFUNC(CirrusSetClock)
- SYMFUNC(STG1703getIndex)
- SYMFUNC(STG1703setIndex)
- SYMFUNC(STG1703magic)
- SYMFUNC(gendacMNToClock)
- SYMFUNC(Et4000AltICD2061SetClock)
- SYMFUNC(ET4000stg1703SetClock)
- SYMFUNC(ET4000gendacSetClock)
-#endif
-
- SYMFUNC(pciFindFirst)
- SYMFUNC(pciFindNext)
- SYMFUNC(pciWriteByte)
- SYMFUNC(pciWriteWord)
- SYMFUNC(pciWriteLong)
- SYMFUNC(pciReadByte)
- SYMFUNC(pciReadWord)
- SYMFUNC(pciReadLong)
- SYMFUNC(pciSetBitsLong)
- SYMFUNC(pciTag)
- SYMFUNC(pciBusAddrToHostAddr)
- SYMFUNC(pciHostAddrToBusAddr)
- SYMFUNC(xf86MapPciMem)
- SYMFUNC(xf86scanpci)
- SYMFUNC(xf86ReadPciBIOS)
- SYMFUNC(AllocatePixmapPrivateIndex)
- SYMFUNC(AllocatePixmapPrivate)
+ SYMFUNC(pciFindFirst)
+ SYMFUNC(pciFindNext)
+ SYMFUNC(pciWriteByte)
+ SYMFUNC(pciWriteWord)
+ SYMFUNC(pciWriteLong)
+ SYMFUNC(pciReadByte)
+ SYMFUNC(pciReadWord)
+ SYMFUNC(pciReadLong)
+ SYMFUNC(pciSetBitsLong)
+ SYMFUNC(pciTag)
+ SYMFUNC(pciBusAddrToHostAddr)
+ SYMFUNC(pciHostAddrToBusAddr)
+ SYMFUNC(xf86MapPciMem)
+ SYMFUNC(xf86scanpci)
+ SYMFUNC(xf86ReadPciBIOS)
- /* Loader functions */
- SYMFUNC(LoaderDefaultFunc)
- SYMFUNC(LoadSubModule)
- SYMFUNC(DuplicateModule)
- SYMFUNC(LoaderErrorMsg)
- SYMFUNC(LoaderCheckUnresolved)
- SYMFUNC(LoadExtension)
- SYMFUNC(LoadFont)
- SYMFUNC(LoaderReqSymbols)
- SYMFUNC(LoaderReqSymLists)
- SYMFUNC(LoaderRefSymbols)
- SYMFUNC(LoaderRefSymLists)
- SYMFUNC(UnloadSubModule)
- SYMFUNC(LoaderSymbol)
- SYMFUNC(LoaderListDirs)
- SYMFUNC(LoaderFreeDirList)
- SYMFUNC(LoaderGetOS)
+ /* Loader functions */
+ SYMFUNC(LoaderDefaultFunc)
+ SYMFUNC(LoadSubModule)
+ SYMFUNC(DuplicateModule)
+ SYMFUNC(LoaderErrorMsg)
+ SYMFUNC(LoaderCheckUnresolved)
+ SYMFUNC(LoadExtension)
+ SYMFUNC(LoadFont)
+ SYMFUNC(LoaderReqSymbols)
+ SYMFUNC(LoaderReqSymLists)
+ SYMFUNC(LoaderRefSymbols)
+ SYMFUNC(LoaderRefSymLists)
+ SYMFUNC(UnloadSubModule)
+ SYMFUNC(LoaderSymbol)
+ SYMFUNC(LoaderListDirs)
+ SYMFUNC(LoaderFreeDirList)
+ SYMFUNC(LoaderGetOS)
- /*
- * these here are our own interfaces to libc functions
- */
- SYMFUNC(xf86abort)
- SYMFUNC(xf86abs)
- SYMFUNC(xf86acos)
- SYMFUNC(xf86asin)
- SYMFUNC(xf86atan)
- SYMFUNC(xf86atan2)
- SYMFUNC(xf86atof)
- SYMFUNC(xf86atoi)
- SYMFUNC(xf86atol)
- SYMFUNC(xf86bsearch)
- SYMFUNC(xf86ceil)
- SYMFUNC(xf86calloc)
- SYMFUNC(xf86clearerr)
- SYMFUNC(xf86close)
- SYMFUNC(xf86cos)
- SYMFUNC(xf86exit)
- SYMFUNC(xf86exp)
- SYMFUNC(xf86fabs)
- SYMFUNC(xf86fclose)
- SYMFUNC(xf86feof)
- SYMFUNC(xf86ferror)
- SYMFUNC(xf86fflush)
- SYMFUNC(xf86fgetc)
- SYMFUNC(xf86fgetpos)
- SYMFUNC(xf86fgets)
- SYMFUNC(xf86finite)
- SYMFUNC(xf86floor)
- SYMFUNC(xf86fmod)
- SYMFUNC(xf86fopen)
- SYMFUNC(xf86fprintf)
- SYMFUNC(xf86fputc)
- SYMFUNC(xf86fputs)
- SYMFUNC(xf86fread)
- SYMFUNC(xf86free)
- SYMFUNC(xf86freopen)
- SYMFUNC(xf86frexp)
- SYMFUNC(xf86fscanf)
- SYMFUNC(xf86fseek)
- SYMFUNC(xf86fsetpos)
- SYMFUNC(xf86ftell)
- SYMFUNC(xf86fwrite)
- SYMFUNC(xf86getc)
- SYMFUNC(xf86getenv)
- SYMFUNC(xf86getpagesize)
- SYMFUNC(xf86hypot)
- SYMFUNC(xf86ioctl)
- SYMFUNC(xf86isalnum)
- SYMFUNC(xf86isalpha)
- SYMFUNC(xf86iscntrl)
- SYMFUNC(xf86isdigit)
- SYMFUNC(xf86isgraph)
- SYMFUNC(xf86islower)
- SYMFUNC(xf86isprint)
- SYMFUNC(xf86ispunct)
- SYMFUNC(xf86isspace)
- SYMFUNC(xf86isupper)
- SYMFUNC(xf86isxdigit)
- SYMFUNC(xf86labs)
- SYMFUNC(xf86ldexp)
- SYMFUNC(xf86log)
- SYMFUNC(xf86log10)
- SYMFUNC(xf86lseek)
- SYMFUNC(xf86malloc)
- SYMFUNC(xf86memchr)
- SYMFUNC(xf86memcmp)
- SYMFUNC(xf86memcpy)
- /*
- * Some compilers generate calls to memcpy to handle structure copies
- * or run-time initializations.
- */
- SYMFUNCALIAS("memcpy",xf86memcpy)
- SYMFUNC(xf86memset)
- /*
- * Some compilers generate calls to memset to handle aggregate
- * initializations.
- */
- SYMFUNCALIAS("memset",xf86memset)
- SYMFUNC(xf86memmove)
- SYMFUNC(xf86mmap)
- SYMFUNC(xf86modf)
- SYMFUNC(xf86munmap)
- SYMFUNC(xf86open)
- SYMFUNC(xf86perror)
- SYMFUNC(xf86pow)
- SYMFUNC(xf86printf)
- SYMFUNC(xf86qsort)
- SYMFUNC(xf86read)
- SYMFUNC(xf86realloc)
- SYMFUNC(xf86remove)
- SYMFUNC(xf86rename)
- SYMFUNC(xf86rewind)
- SYMFUNC(xf86setbuf)
- SYMFUNC(xf86setvbuf)
- SYMFUNC(xf86sin)
- SYMFUNC(xf86snprintf)
- SYMFUNC(xf86sprintf)
- SYMFUNC(xf86sqrt)
- SYMFUNC(xf86sscanf)
- SYMFUNC(xf86strcat)
- SYMFUNC(xf86strcmp)
- SYMFUNC(xf86strcasecmp)
- SYMFUNC(xf86strcpy)
- SYMFUNC(xf86strcspn)
- SYMFUNC(xf86strerror)
- SYMFUNC(xf86strlen)
- SYMFUNC(xf86strncasecmp)
- SYMFUNC(xf86strncat)
- SYMFUNC(xf86strncmp)
- SYMFUNC(xf86strncpy)
- SYMFUNC(xf86strpbrk)
- SYMFUNC(xf86strchr)
- SYMFUNC(xf86strrchr)
- SYMFUNC(xf86strspn)
- SYMFUNC(xf86strstr)
- SYMFUNC(xf86strtod)
- SYMFUNC(xf86strtok)
- SYMFUNC(xf86strtol)
- SYMFUNC(xf86strtoul)
- SYMFUNC(xf86tan)
- SYMFUNC(xf86tmpfile)
- SYMFUNC(xf86tolower)
- SYMFUNC(xf86toupper)
- SYMFUNC(xf86ungetc)
- SYMFUNC(xf86vfprintf)
- SYMFUNC(xf86vsnprintf)
- SYMFUNC(xf86vsprintf)
- SYMFUNC(xf86write)
-
-/* non-ANSI C functions */
- SYMFUNC(xf86opendir)
- SYMFUNC(xf86closedir)
- SYMFUNC(xf86readdir)
- SYMFUNC(xf86rewinddir)
- SYMFUNC(xf86ffs)
- SYMFUNC(xf86strdup)
- SYMFUNC(xf86bzero)
- SYMFUNC(xf86usleep)
- SYMFUNC(xf86execl)
+ /*
+ * These are our own interfaces to libc functions.
+ */
+ SYMFUNC(xf86abort)
+ SYMFUNC(xf86abs)
+ SYMFUNC(xf86acos)
+ SYMFUNC(xf86asin)
+ SYMFUNC(xf86atan)
+ SYMFUNC(xf86atan2)
+ SYMFUNC(xf86atof)
+ SYMFUNC(xf86atoi)
+ SYMFUNC(xf86atol)
+ SYMFUNC(xf86bsearch)
+ SYMFUNC(xf86ceil)
+ SYMFUNC(xf86calloc)
+ SYMFUNC(xf86clearerr)
+ SYMFUNC(xf86close)
+ SYMFUNC(xf86cos)
+ SYMFUNC(xf86exit)
+ SYMFUNC(xf86exp)
+ SYMFUNC(xf86fabs)
+ SYMFUNC(xf86fclose)
+ SYMFUNC(xf86feof)
+ SYMFUNC(xf86ferror)
+ SYMFUNC(xf86fflush)
+ SYMFUNC(xf86fgetc)
+ SYMFUNC(xf86fgetpos)
+ SYMFUNC(xf86fgets)
+ SYMFUNC(xf86finite)
+ SYMFUNC(xf86floor)
+ SYMFUNC(xf86fmod)
+ SYMFUNC(xf86fopen)
+ SYMFUNC(xf86fprintf)
+ SYMFUNC(xf86fputc)
+ SYMFUNC(xf86fputs)
+ SYMFUNC(xf86fread)
+ SYMFUNC(xf86free)
+ SYMFUNC(xf86freopen)
+ SYMFUNC(xf86frexp)
+ SYMFUNC(xf86fscanf)
+ SYMFUNC(xf86fseek)
+ SYMFUNC(xf86fsetpos)
+ SYMFUNC(xf86ftell)
+ SYMFUNC(xf86fwrite)
+ SYMFUNC(xf86getc)
+ SYMFUNC(xf86getenv)
+ SYMFUNC(xf86getpagesize)
+ SYMFUNC(xf86hypot)
+ SYMFUNC(xf86ioctl)
+ SYMFUNC(xf86isalnum)
+ SYMFUNC(xf86isalpha)
+ SYMFUNC(xf86iscntrl)
+ SYMFUNC(xf86isdigit)
+ SYMFUNC(xf86isgraph)
+ SYMFUNC(xf86islower)
+ SYMFUNC(xf86isprint)
+ SYMFUNC(xf86ispunct)
+ SYMFUNC(xf86isspace)
+ SYMFUNC(xf86isupper)
+ SYMFUNC(xf86isxdigit)
+ SYMFUNC(xf86labs)
+ SYMFUNC(xf86ldexp)
+ SYMFUNC(xf86log)
+ SYMFUNC(xf86log10)
+ SYMFUNC(xf86lseek)
+ SYMFUNC(xf86malloc)
+ SYMFUNC(xf86memchr)
+ SYMFUNC(xf86memcmp)
+ SYMFUNC(xf86memcpy)
+ /*
+ * Some compilers generate calls to memcpy to handle structure copies
+ * or run-time initializations.
+ */
+ SYMFUNCALIAS("memcpy", xf86memcpy)
+ SYMFUNC(xf86memset)
+ /*
+ * Some compilers generate calls to memset to handle aggregate
+ * initializations.
+ */
+ SYMFUNCALIAS("memset", xf86memset)
+ SYMFUNC(xf86memmove)
+ SYMFUNC(xf86mmap)
+ SYMFUNC(xf86modf)
+ SYMFUNC(xf86munmap)
+ SYMFUNC(xf86open)
+ SYMFUNC(xf86perror)
+ SYMFUNC(xf86pow)
+ SYMFUNC(xf86printf)
+ SYMFUNC(xf86qsort)
+ SYMFUNC(xf86read)
+ SYMFUNC(xf86realloc)
+ SYMFUNC(xf86remove)
+ SYMFUNC(xf86rename)
+ SYMFUNC(xf86rewind)
+ SYMFUNC(xf86setbuf)
+ SYMFUNC(xf86setvbuf)
+ SYMFUNC(xf86sin)
+ SYMFUNC(xf86snprintf)
+ SYMFUNC(xf86sprintf)
+ SYMFUNC(xf86sqrt)
+ SYMFUNC(xf86sscanf)
+ SYMFUNC(xf86strcat)
+ SYMFUNC(xf86strcmp)
+ SYMFUNC(xf86strcasecmp)
+ SYMFUNC(xf86strcpy)
+ SYMFUNC(xf86strcspn)
+ SYMFUNC(xf86strerror)
+ SYMFUNC(xf86strlcat)
+ SYMFUNC(xf86strlcpy)
+ SYMFUNC(xf86strlen)
+ SYMFUNC(xf86strncasecmp)
+ SYMFUNC(xf86strncat)
+ SYMFUNC(xf86strncmp)
+ SYMFUNC(xf86strncpy)
+ SYMFUNC(xf86strpbrk)
+ SYMFUNC(xf86strchr)
+ SYMFUNC(xf86strrchr)
+ SYMFUNC(xf86strspn)
+ SYMFUNC(xf86strstr)
+ SYMFUNC(xf86strtod)
+ SYMFUNC(xf86strtok)
+ SYMFUNC(xf86strtol)
+ SYMFUNC(xf86strtoul)
+ SYMFUNC(xf86tan)
+ SYMFUNC(xf86tmpfile)
+ SYMFUNC(xf86tolower)
+ SYMFUNC(xf86toupper)
+ SYMFUNC(xf86ungetc)
+ SYMFUNC(xf86vfprintf)
+ SYMFUNC(xf86vsnprintf)
+ SYMFUNC(xf86vsprintf)
+ SYMFUNC(xf86write)
- SYMFUNC(xf86getsecs)
- SYMFUNC(xf86fpossize) /* for returning sizeof(fpos_t) */
+ /* non-ANSI C functions */
+ SYMFUNC(xf86opendir)
+ SYMFUNC(xf86closedir)
+ SYMFUNC(xf86readdir)
+ SYMFUNC(xf86rewinddir)
+ SYMFUNC(xf86ffs)
+ SYMFUNC(xf86strdup)
+ SYMFUNC(xf86bzero)
+ SYMFUNC(xf86usleep)
+ SYMFUNC(xf86execl)
- /* These provide for DRI support. */
- SYMFUNC(xf86stat)
- SYMFUNC(xf86fstat)
- SYMFUNC(xf86access)
- SYMFUNC(xf86geteuid)
- SYMFUNC(xf86getegid)
- SYMFUNC(xf86getpid)
- SYMFUNC(xf86mknod)
- SYMFUNC(xf86chmod)
- SYMFUNC(xf86chown)
- SYMFUNC(xf86sleep)
- SYMFUNC(xf86mkdir)
- SYMFUNC(xf86shmget)
- SYMFUNC(xf86shmat)
- SYMFUNC(xf86shmdt)
- SYMFUNC(xf86shmctl)
+ SYMFUNC(xf86getsecs)
+ SYMFUNC(xf86fpossize) /* for returning sizeof(fpos_t) */
+
+ /* Some of these were added for DRI support. */
+ SYMFUNC(xf86stat)
+ SYMFUNC(xf86fstat)
+ SYMFUNC(xf86access)
+ SYMFUNC(xf86geteuid)
+ SYMFUNC(xf86getegid)
+ SYMFUNC(xf86getpid)
+ SYMFUNC(xf86mknod)
+ SYMFUNC(xf86chmod)
+ SYMFUNC(xf86chown)
+ SYMFUNC(xf86sleep)
+ SYMFUNC(xf86mkdir)
+ SYMFUNC(xf86shmget)
+ SYMFUNC(xf86shmat)
+ SYMFUNC(xf86shmdt)
+ SYMFUNC(xf86shmctl)
#ifdef HAS_GLIBC_SIGSETJMP
- SYMFUNC(xf86setjmp)
- SYMFUNC(xf86setjmp0)
+ SYMFUNC(xf86setjmp)
+ SYMFUNC(xf86setjmp0)
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
- SYMFUNCALIAS("xf86setjmp1",__sigsetjmp)
+ SYMFUNCALIAS("xf86setjmp1", __sigsetjmp)
#else
- SYMFUNC(xf86setjmp1) /* For libc5 */
+ SYMFUNC(xf86setjmp1) /* For libc5 */
#endif
#else
- SYMFUNCALIAS("xf86setjmp",setjmp)
- SYMFUNCALIAS("xf86setjmp0",setjmp)
- SYMFUNC(xf86setjmp1)
+ SYMFUNCALIAS("xf86setjmp", setjmp)
+ SYMFUNCALIAS("xf86setjmp0", setjmp)
+ SYMFUNC(xf86setjmp1)
#endif
- SYMFUNCALIAS("xf86longjmp",longjmp)
- SYMFUNC(xf86getjmptype)
- SYMFUNC(xf86setjmp1_arg2)
- SYMFUNC(xf86setjmperror)
+ SYMFUNCALIAS("xf86longjmp", longjmp)
+ SYMFUNC(xf86getjmptype)
+ SYMFUNC(xf86setjmp1_arg2)
+ SYMFUNC(xf86setjmperror)
#ifdef XF86DRI
- /* These may have more general uses, but
- for now, they are only used by the DRI.
- Loading them only when the DRI is built
- may make porting (the non-DRI portions
- of the X server) easier. */
- SYMFUNC(xf86InstallSIGIOHandler)
- SYMFUNC(xf86RemoveSIGIOHandler)
+ /*
+ * These may have more general uses, but for now, they are only used
+ * by the DRI. Loading them only when the DRI is built may make porting
+ * (the non-DRI portions of the X server) easier.
+ */
+ SYMFUNC(xf86InstallSIGIOHandler)
+ SYMFUNC(xf86RemoveSIGIOHandler)
# if defined(__alpha__) && defined(linux)
- SYMFUNC(_bus_base)
+ SYMFUNC(_bus_base)
# endif
#endif
- SYMFUNC(xf86BlockSIGIO)
- SYMFUNC(xf86UnblockSIGIO)
-
+ SYMFUNC(xf86BlockSIGIO)
+ SYMFUNC(xf86UnblockSIGIO)
+
#if defined(__alpha__)
- SYMFUNC(__divl)
- SYMFUNC(__reml)
- SYMFUNC(__divlu)
- SYMFUNC(__remlu)
- SYMFUNC(__divq)
- SYMFUNC(__divqu)
- SYMFUNC(__remq)
- SYMFUNC(__remqu)
+ SYMFUNC(__divl)
+ SYMFUNC(__reml)
+ SYMFUNC(__divlu)
+ SYMFUNC(__remlu)
+ SYMFUNC(__divq)
+ SYMFUNC(__divqu)
+ SYMFUNC(__remq)
+ SYMFUNC(__remqu)
# ifdef linux
- SYMFUNC(_outw)
- SYMFUNC(_outb)
- SYMFUNC(_outl)
- SYMFUNC(_inb)
- SYMFUNC(_inw)
- SYMFUNC(_inl)
- SYMFUNC(_alpha_outw)
- SYMFUNC(_alpha_outb)
- SYMFUNC(_alpha_outl)
- SYMFUNC(_alpha_inb)
- SYMFUNC(_alpha_inw)
- SYMFUNC(_alpha_inl)
+ SYMFUNC(_outw)
+ SYMFUNC(_outb)
+ SYMFUNC(_outl)
+ SYMFUNC(_inb)
+ SYMFUNC(_inw)
+ SYMFUNC(_inl)
+ SYMFUNC(_alpha_outw)
+ SYMFUNC(_alpha_outb)
+ SYMFUNC(_alpha_outl)
+ SYMFUNC(_alpha_inb)
+ SYMFUNC(_alpha_inw)
+ SYMFUNC(_alpha_inl)
# else
- SYMFUNC(outw)
- SYMFUNC(outb)
- SYMFUNC(outl)
- SYMFUNC(inb)
- SYMFUNC(inw)
- SYMFUNC(inl)
+ SYMFUNC(outw)
+ SYMFUNC(outb)
+ SYMFUNC(outl)
+ SYMFUNC(inb)
+ SYMFUNC(inw)
+ SYMFUNC(inl)
# endif
- SYMFUNC(xf86ReadMmio32)
- SYMFUNC(xf86ReadMmio16)
- SYMFUNC(xf86ReadMmio8)
- SYMFUNC(xf86WriteMmio32)
- SYMFUNC(xf86WriteMmio16)
- SYMFUNC(xf86WriteMmio8)
- SYMFUNC(xf86WriteMmioNB32)
- SYMFUNC(xf86WriteMmioNB16)
- SYMFUNC(xf86WriteMmioNB8)
+ SYMFUNC(xf86ReadMmio32)
+ SYMFUNC(xf86ReadMmio16)
+ SYMFUNC(xf86ReadMmio8)
+ SYMFUNC(xf86WriteMmio32)
+ SYMFUNC(xf86WriteMmio16)
+ SYMFUNC(xf86WriteMmio8)
+ SYMFUNC(xf86WriteMmioNB32)
+ SYMFUNC(xf86WriteMmioNB16)
+ SYMFUNC(xf86WriteMmioNB8)
#endif
#if defined(sun) && defined(SVR4)
- SYMFUNC(inb)
- SYMFUNC(inw)
- SYMFUNC(inl)
- SYMFUNC(outb)
- SYMFUNC(outw)
- SYMFUNC(outl)
+ SYMFUNC(inb)
+ SYMFUNC(inw)
+ SYMFUNC(inl)
+ SYMFUNC(outb)
+ SYMFUNC(outw)
+ SYMFUNC(outl)
#endif
#if defined(__powerpc__) && !defined(__OpenBSD__)
- SYMFUNC(inb)
- SYMFUNC(inw)
- SYMFUNC(inl)
- SYMFUNC(outb)
- SYMFUNC(outw)
- SYMFUNC(outl)
+ SYMFUNC(inb)
+ SYMFUNC(inw)
+ SYMFUNC(inl)
+ SYMFUNC(outb)
+ SYMFUNC(outw)
+ SYMFUNC(outl)
# if defined(NO_INLINE) || defined(Lynx)
- SYMFUNC(mem_barrier)
- SYMFUNC(ldl_u)
- SYMFUNC(eieio)
- SYMFUNC(ldl_brx)
- SYMFUNC(ldw_brx)
- SYMFUNC(stl_brx)
- SYMFUNC(stw_brx)
- SYMFUNC(ldq_u)
- SYMFUNC(ldw_u)
- SYMFUNC(stl_u)
- SYMFUNC(stq_u)
- SYMFUNC(stw_u)
- SYMFUNC(write_mem_barrier)
+ SYMFUNC(mem_barrier)
+ SYMFUNC(ldl_u)
+ SYMFUNC(eieio)
+ SYMFUNC(ldl_brx)
+ SYMFUNC(ldw_brx)
+ SYMFUNC(stl_brx)
+ SYMFUNC(stw_brx)
+ SYMFUNC(ldq_u)
+ SYMFUNC(ldw_u)
+ SYMFUNC(stl_u)
+ SYMFUNC(stq_u)
+ SYMFUNC(stw_u)
+ SYMFUNC(write_mem_barrier)
# endif
# if defined(Lynx)
- SYMFUNC(_restf14)
- SYMFUNC(_restf17)
- SYMFUNC(_restf18)
- SYMFUNC(_restf19)
- SYMFUNC(_restf20)
- SYMFUNC(_restf22)
- SYMFUNC(_restf23)
- SYMFUNC(_restf24)
- SYMFUNC(_restf25)
- SYMFUNC(_restf26)
- SYMFUNC(_restf27)
- SYMFUNC(_restf28)
- SYMFUNC(_restf29)
- SYMFUNC(_savef14)
- SYMFUNC(_savef17)
- SYMFUNC(_savef18)
- SYMFUNC(_savef19)
- SYMFUNC(_savef20)
- SYMFUNC(_savef22)
- SYMFUNC(_savef23)
- SYMFUNC(_savef24)
- SYMFUNC(_savef25)
- SYMFUNC(_savef26)
- SYMFUNC(_savef27)
- SYMFUNC(_savef28)
- SYMFUNC(_savef29)
+ SYMFUNC(_restf14)
+ SYMFUNC(_restf17)
+ SYMFUNC(_restf18)
+ SYMFUNC(_restf19)
+ SYMFUNC(_restf20)
+ SYMFUNC(_restf22)
+ SYMFUNC(_restf23)
+ SYMFUNC(_restf24)
+ SYMFUNC(_restf25)
+ SYMFUNC(_restf26)
+ SYMFUNC(_restf27)
+ SYMFUNC(_restf28)
+ SYMFUNC(_restf29)
+ SYMFUNC(_savef14)
+ SYMFUNC(_savef17)
+ SYMFUNC(_savef18)
+ SYMFUNC(_savef19)
+ SYMFUNC(_savef20)
+ SYMFUNC(_savef22)
+ SYMFUNC(_savef23)
+ SYMFUNC(_savef24)
+ SYMFUNC(_savef25)
+ SYMFUNC(_savef26)
+ SYMFUNC(_savef27)
+ SYMFUNC(_savef28)
+ SYMFUNC(_savef29)
# endif
# if PPCIO_DEBUG
- SYMFUNC(debug_inb)
- SYMFUNC(debug_inw)
- SYMFUNC(debug_inl)
- SYMFUNC(debug_outb)
- SYMFUNC(debug_outw)
- SYMFUNC(debug_outl)
+ SYMFUNC(debug_inb)
+ SYMFUNC(debug_inw)
+ SYMFUNC(debug_inl)
+ SYMFUNC(debug_outb)
+ SYMFUNC(debug_outw)
+ SYMFUNC(debug_outl)
# endif
#endif
#if defined(__GNUC__)
- SYMFUNC(__div64)
- SYMFUNC(__divdf3)
- SYMFUNC(__divdi3)
- SYMFUNC(__divsf3)
- SYMFUNC(__divsi3)
- SYMFUNC(__moddi3)
- SYMFUNC(__modsi3)
- SYMFUNC(__mul64)
- SYMFUNC(__muldf3)
- SYMFUNC(__muldi3)
- SYMFUNC(__mulsf3)
- SYMFUNC(__mulsi3)
- SYMFUNC(__udivdi3)
- SYMFUNC(__udivsi3)
- SYMFUNC(__umoddi3)
- SYMFUNC(__umodsi3)
+#ifndef __UNIXOS2__
+ SYMFUNC(__div64)
+#endif
+ SYMFUNC(__divdf3)
+ SYMFUNC(__divdi3)
+ SYMFUNC(__divsf3)
+ SYMFUNC(__divsi3)
+ SYMFUNC(__moddi3)
+ SYMFUNC(__modsi3)
+#ifndef __UNIXOS2__
+ SYMFUNC(__mul64)
+#endif
+ SYMFUNC(__muldf3)
+ SYMFUNC(__muldi3)
+ SYMFUNC(__mulsf3)
+ SYMFUNC(__mulsi3)
+ SYMFUNC(__udivdi3)
+ SYMFUNC(__udivsi3)
+ SYMFUNC(__umoddi3)
+ SYMFUNC(__umodsi3)
#endif
#if defined(__ia64__)
- SYMFUNC(_outw)
- SYMFUNC(_outb)
- SYMFUNC(_outl)
- SYMFUNC(_inb)
- SYMFUNC(_inw)
- SYMFUNC(_inl)
+ SYMFUNC(_outw)
+ SYMFUNC(_outb)
+ SYMFUNC(_outl)
+ SYMFUNC(_inb)
+ SYMFUNC(_inw)
+ SYMFUNC(_inl)
#endif
#if defined(__arm__)
- SYMFUNC(outw)
- SYMFUNC(outb)
- SYMFUNC(outl)
- SYMFUNC(inb)
- SYMFUNC(inw)
- SYMFUNC(inl)
+ SYMFUNC(outw)
+ SYMFUNC(outb)
+ SYMFUNC(outl)
+ SYMFUNC(inb)
+ SYMFUNC(inw)
+ SYMFUNC(inl)
#endif
#ifdef __FreeBSD__
- SYMFUNC(sysctlbyname)
+#if defined(__sparc__)
+ SYMFUNC(_Qp_qtos)
+ SYMFUNC(_Qp_qtod)
+ SYMFUNC(_Qp_qtoux)
+ SYMFUNC(_Qp_uitoq)
+ SYMFUNC(_Qp_dtoq)
+#endif
#endif
-/*
- * and now some variables
- */
+ /* Some variables. */
- SYMVAR(xf86stdin)
- SYMVAR(xf86stdout)
- SYMVAR(xf86stderr)
- SYMVAR(xf86errno)
- SYMVAR(xf86HUGE_VAL)
+ SYMVAR(xf86stdin)
+ SYMVAR(xf86stdout)
+ SYMVAR(xf86stderr)
+ SYMVAR(xf86errno)
+ SYMVAR(xf86HUGE_VAL)
- /* General variables (from xf86.h) */
- SYMVAR(xf86ScreenIndex)
- SYMVAR(xf86PixmapIndex)
- SYMVAR(xf86Screens)
- SYMVAR(byte_reversed)
- SYMVAR(xf86inSuspend)
- /* debugging variables */
+ /* General variables (from xf86.h) */
+ SYMVAR(xf86ScreenIndex)
+ SYMVAR(xf86PixmapIndex)
+ SYMVAR(xf86Screens)
+ SYMVAR(byte_reversed)
+ SYMVAR(xf86inSuspend)
+ /* debugging variables */
#ifdef BUILDDEBUG
- SYMVAR(xf86p8bit)
- SYMVAR(xf86DummyVar1)
- SYMVAR(xf86DummyVar2)
- SYMVAR(xf86DummyVar3)
+ SYMVAR(xf86p8bit)
+ SYMVAR(xf86DummyVar1)
+ SYMVAR(xf86DummyVar2)
+ SYMVAR(xf86DummyVar3)
#endif
#ifdef async
- SYMVAR(xf86CurrentScreen)
+ SYMVAR(xf86CurrentScreen)
#endif
- /* predefined resource lists from xf86Bus.h */
- SYMVAR(resVgaExclusive)
- SYMVAR(resVgaShared)
- SYMVAR(resVgaMemShared)
- SYMVAR(resVgaIoShared)
- SYMVAR(resVgaUnusedExclusive)
- SYMVAR(resVgaUnusedShared)
- SYMVAR(resVgaSparseExclusive)
- SYMVAR(resVgaSparseShared)
- SYMVAR(res8514Exclusive)
- SYMVAR(res8514Shared)
- SYMVAR(PciAvoid)
+ /* predefined resource lists from xf86Bus.h */
+ SYMVAR(resVgaExclusive)
+ SYMVAR(resVgaShared)
+ SYMVAR(resVgaMemShared)
+ SYMVAR(resVgaIoShared)
+ SYMVAR(resVgaUnusedExclusive)
+ SYMVAR(resVgaUnusedShared)
+ SYMVAR(resVgaSparseExclusive)
+ SYMVAR(resVgaSparseShared)
+ SYMVAR(res8514Exclusive)
+ SYMVAR(res8514Shared)
+ SYMVAR(PciAvoid)
#if defined(__powerpc__) && (!defined(NO_INLINE) || defined(Lynx))
- SYMVAR(ioBase)
+ SYMVAR(ioBase)
#endif
- /* Globals from xf86Globals.c and xf86Priv.h */
- SYMVAR(xf86ConfigDRI)
+ /* Globals from xf86Globals.c and xf86Priv.h */
+ SYMVAR(xf86ConfigDRI)
- /* Globals from xf86Configure.c */
- SYMVAR(ConfiguredMonitor)
+ /* Globals from xf86Configure.c */
+ SYMVAR(ConfiguredMonitor)
- /* Pci.c */
- SYMVAR(pciNumBuses)
-
- { 0, 0 },
+ /* Pci.c */
+ SYMVAR(pciNumBuses)
+ {0, 0}
};
diff --git a/hw/xfree86/os-support/assyntax.h b/hw/xfree86/os-support/assyntax.h
index 3ae8a7940..191c7e49e 100644
--- a/hw/xfree86/os-support/assyntax.h
+++ b/hw/xfree86/os-support/assyntax.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/assyntax.h,v 3.12 1999/12/27 00:39:46 robin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/assyntax.h,v 3.13 2003/08/24 17:37:03 dawes Exp $ */
#ifndef __ASSYNTAX_H__
#define __ASSYNTAX_H__
@@ -23,6 +23,33 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
+/*
+ * Copyright (c) 1993-1999 by The XFree86 Project, 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 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).
+ */
+
/* $XConsortium: assyntax.h /main/5 1996/02/21 17:50:49 kaleb $ */
/*
diff --git a/hw/xfree86/os-support/bsd/alpha_video.c b/hw/xfree86/os-support/bsd/alpha_video.c
index d3aa25961..aa3313dc3 100644
--- a/hw/xfree86/os-support/bsd/alpha_video.c
+++ b/hw/xfree86/os-support/bsd/alpha_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/alpha_video.c,v 1.2.2.1 2003/05/09 02:30:43 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/alpha_video.c,v 1.5 2003/04/03 16:50:04 dawes Exp $ */
/*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
@@ -215,7 +215,7 @@ checkDevMem(Bool warn)
/* Try the aperture driver first */
if ((fd = open(DEV_APERTURE, O_RDWR)) >= 0) {
/* Try to map a page at the VGA address */
- base = mmap((caddr_t)0, 4096, PROT_READ|PROT_WRITE,
+ base = mmap((caddr_t)0, 4096, PROT_READ | PROT_WRITE,
MAP_FLAGS, fd, (off_t)0xA0000 + BUS_BASE);
if (base != MAP_FAILED) {
@@ -235,7 +235,7 @@ checkDevMem(Bool warn)
#endif
if ((fd = open(DEV_MEM, O_RDWR)) >= 0) {
/* Try to map a page at the VGA address */
- base = mmap((caddr_t)0, 4096, PROT_READ|PROT_WRITE,
+ base = mmap((caddr_t)0, 4096, PROT_READ | PROT_WRITE,
MAP_FLAGS, fd, (off_t)0xA0000 + BUS_BASE);
if (base != MAP_FAILED) {
@@ -308,8 +308,10 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
FatalError("xf86MapVidMem: failed to open %s (%s)\n",
DEV_MEM, strerror(errno));
}
- base = mmap((caddr_t)0, Size, PROT_READ|PROT_WRITE,
- MAP_FLAGS, devMemFd, (off_t)Base + BUS_BASE_BWX);
+ base = mmap((caddr_t)0, Size,
+ (flags & VIDMEM_READONLY) ?
+ PROT_READ : (PROT_READ | PROT_WRITE),
+ MAP_FLAGS, devMemFd, (off_t)Base + BUS_BASE_BWX);
if (base == MAP_FAILED)
{
FatalError("%s: could not mmap %s [s=%x,a=%x] (%s)\n",
@@ -325,9 +327,11 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
FatalError("%s: Address 0x%x outside allowable range\n",
"xf86MapVidMem", Base);
}
- base = mmap(0, Size, PROT_READ|PROT_WRITE, MAP_FLAGS,
- xf86Info.screenFd,
- (unsigned long)Base + BUS_BASE);
+ base = mmap(0, Size,
+ (flags & VIDMEM_READONLY) ?
+ PROT_READ : (PROT_READ | PROT_WRITE),
+ MAP_FLAGS, xf86Info.screenFd,
+ (unsigned long)Base + BUS_BASE);
if (base == MAP_FAILED)
{
FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)\n",
diff --git a/hw/xfree86/os-support/bsd/arm_video.c b/hw/xfree86/os-support/bsd/arm_video.c
index 96abe2ea4..36943add1 100644
--- a/hw/xfree86/os-support/bsd/arm_video.c
+++ b/hw/xfree86/os-support/bsd/arm_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/arm_video.c,v 1.1 2002/08/06 13:08:38 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/arm_video.c,v 1.2 2003/03/14 13:46:03 tsi Exp $ */
/*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
@@ -135,7 +135,7 @@ checkDevMem(Bool warn)
if ((fd = open(DEV_MEM, O_RDWR)) >= 0)
{
/* Try to map a page at the VGA address */
- base = mmap((caddr_t)0, 4096, PROT_READ|PROT_WRITE,
+ base = mmap((caddr_t)0, 4096, PROT_READ | PROT_WRITE,
MAP_FLAGS, fd, (off_t)0xA0000 + BUS_BASE);
if (base != MAP_FAILED)
@@ -190,8 +190,10 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
FatalError("xf86MapVidMem: failed to open %s (%s)\n",
DEV_MEM, strerror(errno));
}
- base = mmap((caddr_t)0, Size, PROT_READ|PROT_WRITE,
- MAP_FLAGS, devMemFd, (off_t)Base + BUS_BASE_BWX);
+ base = mmap((caddr_t)0, Size,
+ (flags & VIDMEM_READONLY) ?
+ PROT_READ : (PROT_READ | PROT_WRITE),
+ MAP_FLAGS, devMemFd, (off_t)Base + BUS_BASE_BWX);
if (base == MAP_FAILED)
{
FatalError("%s: could not mmap %s [s=%x,a=%x] (%s)\n",
@@ -207,9 +209,11 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
FatalError("%s: Address 0x%x outside allowable range\n",
"xf86MapVidMem", Base);
}
- base = mmap(0, Size, PROT_READ|PROT_WRITE, MAP_FLAGS,
- xf86Info.screenFd,
- (unsigned long)Base - 0xA0000);
+ base = mmap(0, Size,
+ (flags & VIDMEM_READONLY) ?
+ PROT_READ : (PROT_READ | PROT_WRITE),
+ MAP_FLAGS, xf86Info.screenFd,
+ (unsigned long)Base - 0xA0000);
if (base == MAP_FAILED)
{
FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)\n",
@@ -353,7 +357,7 @@ xf86MapInfoMap(struct memAccess *memInfoP, pointer Base, unsigned long Size)
if((memInfoP->regionVirtBase =
mmap((caddr_t)0,
Size,
- PROT_READ|PROT_WRITE,
+ PROT_READ | PROT_WRITE,
MAP_SHARED,
xf86Info.screenFd,
(unsigned long)mapInfoP->u.map_info_mmap.map_offset))
@@ -485,7 +489,7 @@ xf86EnableIO()
if ((fd = open("/dev/ttyC0", O_RDWR)) >= 0) {
/* Try to map a page at the pccons I/O space */
- base = (pointer)mmap((caddr_t)0, 65536, PROT_READ|PROT_WRITE,
+ base = (pointer)mmap((caddr_t)0, 65536, PROT_READ | PROT_WRITE,
MAP_FLAGS, fd, (off_t)0x0000);
if (base != (pointer)-1) {
@@ -571,7 +575,7 @@ int ScreenNum;
#ifdef USE_ARC_MMAP
if ((fd = open("/dev/ttyC0", O_RDWR)) >= 0) {
/* Try to map a page at the pccons I/O space */
- base = (pointer)mmap((caddr_t)0, 65536, PROT_READ|PROT_WRITE,
+ base = (pointer)mmap((caddr_t)0, 65536, PROT_READ | PROT_WRITE,
MAP_FLAGS, fd, (off_t)0x0000);
if (base != (pointer)-1) {
@@ -613,7 +617,7 @@ int ScreenNum;
if (devMemFd >= 0 && useDevMem)
{
- base = (pointer)mmap((caddr_t)0, 0x400, PROT_READ|PROT_WRITE,
+ base = (pointer)mmap((caddr_t)0, 0x400, PROT_READ | PROT_WRITE,
MAP_FLAGS, devMemFd, (off_t)DEV_MEM_IOBASE);
if (base != (pointer)-1)
diff --git a/hw/xfree86/os-support/bsd/bsdResource.c b/hw/xfree86/os-support/bsd/bsdResource.c
index f999561cf..6c675b5da 100644
--- a/hw/xfree86/os-support/bsd/bsdResource.c
+++ b/hw/xfree86/os-support/bsd/bsdResource.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c,v 1.8 2002/05/22 21:38:29 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsdResource.c,v 1.9 2003/10/02 13:30:06 eich Exp $ */
/* Resource information code */
@@ -18,7 +18,7 @@ resRange PciAvoid[] = {_PCI_AVOID_PC_STYLE, _END};
#ifdef INCLUDE_XF86_NO_DOMAIN
-#if defined(__alpha__) || defined(__sparc64__)
+#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__)
resPtr
xf86BusAccWindowsFromOS(void)
diff --git a/hw/xfree86/os-support/bsd/bsd_axp.c b/hw/xfree86/os-support/bsd/bsd_axp.c
index c38ac073c..91367078e 100644
--- a/hw/xfree86/os-support/bsd/bsd_axp.c
+++ b/hw/xfree86/os-support/bsd/bsd_axp.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_axp.c,v 1.2 2002/10/29 23:19:13 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_axp.c,v 1.3 2003/10/07 22:33:37 herrb Exp $ */
#include "X.h"
#include "os.h"
@@ -23,9 +23,9 @@ axpDevice bsdGetAXP(void);
typedef struct {
char *name;
int type;
-} AXP;
+} _AXP;
-static AXP axpList[] = {
+static _AXP axpList[] = {
{"apecs",APECS},
{"pyxis",PYXIS},
{"cia",CIA},
diff --git a/hw/xfree86/os-support/bsd/bsd_init.c b/hw/xfree86/os-support/bsd/bsd_init.c
index 236b6ffbb..e4927d91a 100644
--- a/hw/xfree86/os-support/bsd/bsd_init.c
+++ b/hw/xfree86/os-support/bsd/bsd_init.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c,v 3.19 2002/05/05 18:54:02 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c,v 3.22 2003/10/07 23:14:55 herrb Exp $ */
/*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
@@ -38,8 +38,10 @@
static Bool KeepTty = FALSE;
static int devConsoleFd = -1;
+#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
static int VTnum = -1;
static int initialVT = -1;
+#endif
#ifdef PCCONS_SUPPORT
/* Stock 0.1 386bsd pccons console driver interface */
@@ -146,10 +148,10 @@ void
xf86OpenConsole()
{
int i, fd = -1;
- int result;
- struct utsname uts;
xf86ConsOpen_t *driver;
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ int result;
+ struct utsname uts;
vtmode_t vtmode;
#endif
@@ -158,7 +160,7 @@ xf86OpenConsole()
/* check if we are run with euid==0 */
if (geteuid() != 0)
{
- FatalError("xf86OpenConsole: Server must be suid root\n");
+ FatalError("xf86OpenConsole: Server must be suid root");
}
if (!KeepTty)
@@ -196,7 +198,7 @@ xf86OpenConsole()
strcat(cons_drivers, supported_drivers[i]);
}
FatalError(
- "%s: No console driver found\n\tSupported drivers: %s\n\t%s\n",
+ "%s: No console driver found\n\tSupported drivers: %s\n\t%s",
"xf86OpenConsole", cons_drivers, CHECK_DRIVER_MSG);
}
#if 0 /* stdin is already closed in OsInit() */
@@ -211,7 +213,7 @@ xf86OpenConsole()
case PCCONS:
if (ioctl (xf86Info.consoleFd, CONSOLE_X_MODE_ON, 0) < 0)
{
- FatalError("%s: CONSOLE_X_MODE_ON failed (%s)\n%s\n",
+ FatalError("%s: CONSOLE_X_MODE_ON failed (%s)\n%s",
"xf86OpenConsole", strerror(errno),
CHECK_DRIVER_MSG);
}
@@ -280,18 +282,18 @@ acquire_vt:
vtmode.frsig = SIGUSR1;
if (ioctl(xf86Info.consoleFd, VT_SETMODE, &vtmode) < 0)
{
- FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
+ FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed");
}
#if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
if (ioctl(xf86Info.consoleFd, KDENABIO, 0) < 0)
{
- FatalError("xf86OpenConsole: KDENABIO failed (%s)\n",
+ FatalError("xf86OpenConsole: KDENABIO failed (%s)",
strerror(errno));
}
#endif
if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0)
{
- FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed\n");
+ FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed");
}
break;
#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
@@ -335,7 +337,7 @@ xf86OpenPccons()
if (ioctl(fd, CONSOLE_X_MODE_OFF, 0) < 0)
{
FatalError(
- "%s: CONSOLE_X_MODE_OFF failed (%s)\n%s\n%s\n",
+ "%s: CONSOLE_X_MODE_OFF failed (%s)\n%s\n%s",
"xf86OpenPccons",
strerror(errno),
"Was expecting pccons driver with X support",
@@ -425,11 +427,11 @@ xf86OpenSyscons()
{
if (syscons_version >= 0x100)
{
- FatalError("%s: Cannot find a free VT\n",
+ FatalError("%s: Cannot find a free VT",
"xf86OpenSyscons");
}
/* Should no longer reach here */
- FatalError("%s: %s %s\n\t%s %s\n",
+ FatalError("%s: %s %s\n\t%s %s",
"xf86OpenSyscons",
"syscons versions prior to 1.0 require",
"either the",
@@ -448,18 +450,18 @@ xf86OpenSyscons()
#endif
if ((fd = open(vtname, SYSCONS_CONSOLE_MODE, 0)) < 0)
{
- FatalError("xf86OpenSyscons: Cannot open %s (%s)\n",
+ FatalError("xf86OpenSyscons: Cannot open %s (%s)",
vtname, strerror(errno));
}
if (ioctl(fd, VT_GETMODE, &vtmode) < 0)
{
- FatalError("xf86OpenSyscons: VT_GETMODE failed\n");
+ FatalError("xf86OpenSyscons: VT_GETMODE failed");
}
xf86Info.consType = SYSCONS;
xf86Msg(X_PROBED, "Using syscons driver with X support");
if (syscons_version >= 0x100)
{
- xf86ErrorF(" (version %d.%d)\n", syscons_version >> 8,
+ xf86ErrorF(" (version %ld.%ld)\n", syscons_version >> 8,
syscons_version & 0xFF);
}
else
@@ -513,7 +515,7 @@ xf86OpenPcvt()
{
if(ioctl(fd, VT_GETMODE, &vtmode) < 0)
{
- FatalError("%s: VT_GETMODE failed\n%s%s\n%s\n",
+ FatalError("%s: VT_GETMODE failed\n%s%s\n%s",
"xf86OpenPcvt",
"Found pcvt driver but X11 seems to be",
" not supported.", CHECK_DRIVER_MSG);
@@ -552,7 +554,7 @@ xf86OpenPcvt()
}
else
{
- FatalError("%s: Cannot find a free VT\n",
+ FatalError("%s: Cannot find a free VT",
"xf86OpenPcvt");
}
}
@@ -562,12 +564,12 @@ xf86OpenPcvt()
sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1);
if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0)
{
- FatalError("xf86OpenPcvt: Cannot open %s (%s)\n",
+ FatalError("xf86OpenPcvt: Cannot open %s (%s)",
vtname, strerror(errno));
}
if (ioctl(fd, VT_GETMODE, &vtmode) < 0)
{
- FatalError("xf86OpenPcvt: VT_GETMODE failed\n");
+ FatalError("xf86OpenPcvt: VT_GETMODE failed");
}
xf86Info.consType = PCVT;
#ifdef WSCONS_SUPPORT
@@ -614,7 +616,7 @@ xf86OpenWScons()
}
if (fd != -1) {
if (ioctl(fd, WSDISPLAYIO_SMODE, &mode) < 0) {
- FatalError("%s: WSDISPLAYIO_MODE_MAPPED failed (%s)\n%s\n",
+ FatalError("%s: WSDISPLAYIO_MODE_MAPPED failed (%s)\n%s",
"xf86OpenConsole", strerror(errno),
CHECK_DRIVER_MSG);
}
@@ -652,7 +654,7 @@ xf86CloseConsole()
#if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
if (ioctl(xf86Info.consoleFd, KDDISABIO, 0) < 0)
{
- xf86FatalError("xf86CloseConsole: KDDISABIO failed (%s)\n",
+ xf86FatalError("xf86CloseConsole: KDDISABIO failed (%s)",
strerror(errno));
}
#endif
@@ -676,7 +678,7 @@ xf86CloseConsole()
close(xf86Info.consoleFd);
if ((xf86Info.consoleFd = open("/dev/console",O_RDONLY,0)) <0)
{
- xf86FatalError("xf86CloseConsole: Cannot open /dev/console (%s)\n",
+ xf86FatalError("xf86CloseConsole: Cannot open /dev/console (%s)",
strerror(errno));
}
}
diff --git a/hw/xfree86/os-support/bsd/bsd_kbd.c b/hw/xfree86/os-support/bsd/bsd_kbd.c
index 20d8b04d4..0d586ef72 100644
--- a/hw/xfree86/os-support/bsd/bsd_kbd.c
+++ b/hw/xfree86/os-support/bsd/bsd_kbd.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c,v 1.5 2003/02/17 15:11:56 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c,v 1.8 2003/11/04 03:16:58 tsi Exp $ */
/*
* Copyright (c) 2002 by The XFree86 Project, Inc.
@@ -33,7 +33,7 @@ static KbdProtocolRec protocols[] = {
#ifdef WSCONS_SUPPORT
{"wskbd", PROT_WSCONS },
#endif
- { NULL, PROT_UNKNOWN }
+ { NULL, PROT_UNKNOWN_KBD }
};
typedef struct {
@@ -143,8 +143,10 @@ static int
KbdOn(InputInfoPtr pInfo, int what)
{
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
+#if defined(SYSCONS_SUPPORT) || defined(PCCONS_SUPPORT) || defined(PCVT_SUPPORT)
BsdKbdPrivPtr priv = (BsdKbdPrivPtr) pKbd->private;
struct termios nTty;
+#endif
#ifdef WSCONS_SUPPORT
int option;
#endif
@@ -406,7 +408,7 @@ OpenKeyboard(InputInfoPtr pInfo)
{
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
int i;
- KbdProtocolId prot = PROT_UNKNOWN;
+ KbdProtocolId prot = PROT_UNKNOWN_KBD;
char *s;
s = xf86SetStrOption(pInfo->options, "Protocol", NULL);
diff --git a/hw/xfree86/os-support/bsd/bsd_mouse.c b/hw/xfree86/os-support/bsd/bsd_mouse.c
index f681d90d9..943bb9855 100644
--- a/hw/xfree86/os-support/bsd/bsd_mouse.c
+++ b/hw/xfree86/os-support/bsd/bsd_mouse.c
@@ -1,7 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_mouse.c,v 1.24 2003/02/15 05:37:59 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_mouse.c,v 1.26 2003/10/10 20:56:05 herrb Exp $ */
/*
- * Copyright 1999 by The XFree86 Project, Inc.
+ * Copyright (c) 1999-2003 by The XFree86 Project, 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 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).
*/
#include "X.h"
@@ -45,6 +68,20 @@
static void usbSigioReadInput (int fd, void *closure);
#endif
+#if defined(__FreeBSD__)
+/* These are for FreeBSD */
+#define DEFAULT_MOUSE_DEV "/dev/mouse"
+#define DEFAULT_SYSMOUSE_DEV "/dev/sysmouse"
+#define DEFAULT_PS2_DEV "/dev/psm0"
+
+static const char *mouseDevs[] = {
+ DEFAULT_MOUSE_DEV,
+ DEFAULT_SYSMOUSE_DEV,
+ DEFAULT_PS2_DEV,
+ NULL
+};
+#endif
+
static int
SupportedInterfaces(void)
{
@@ -196,6 +233,98 @@ SetSysMouseRes(InputInfoPtr pInfo, const char *protocol, int rate, int res)
}
#endif
+#if defined(__FreeBSD__)
+
+#define MOUSED_PID_FILE "/var/run/moused.pid"
+
+/*
+ * Try to check if moused is running. DEFAULT_SYSMOUSE_DEV is useless without
+ * it. There doesn't seem to be a better way of checking.
+ */
+static Bool
+MousedRunning(void)
+{
+ FILE *f = NULL;
+ unsigned int pid;
+
+ if ((f = fopen(MOUSED_PID_FILE, "r")) != NULL) {
+ if (fscanf(f, "%u", &pid) == 1 && pid > 0) {
+ if (kill(pid, 0) == 0) {
+ fclose(f);
+ return TRUE;
+ }
+ }
+ fclose(f);
+ }
+ return FALSE;
+}
+
+static const char *
+FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
+{
+ int fd = -1;
+ const char **pdev, *dev = NULL;
+ Bool devMouse = FALSE;
+ struct stat devMouseStat;
+ struct stat sb;
+
+ for (pdev = mouseDevs; *pdev; pdev++) {
+ SYSCALL (fd = open(*pdev, O_RDWR | O_NONBLOCK));
+ if (fd == -1) {
+#ifdef DEBUG
+ ErrorF("Cannot open %s (%s)\n", *pdev, strerror(errno));
+#endif
+ } else {
+ /*
+ * /dev/mouse is held until checks for matches with other devices
+ * are done. This is so that when it points to /dev/sysmouse,
+ * the test for whether /dev/sysmouse is usable can be made.
+ */
+ if (!strcmp(*pdev, DEFAULT_MOUSE_DEV)) {
+ if (fstat(fd, &devMouseStat) == 0)
+ devMouse = TRUE;
+ close(fd);
+ continue;
+ } else if (!strcmp(*pdev, DEFAULT_SYSMOUSE_DEV)) {
+ /* Check if /dev/mouse is the same as /dev/sysmouse. */
+ if (devMouse && fstat(fd, &sb) == 0 &&
+ devMouseStat.st_dev == sb.st_dev &&
+ devMouseStat.st_ino == sb.st_ino) {
+ /* If the same, use /dev/sysmouse. */
+ devMouse = FALSE;
+ }
+ close(fd);
+ if (MousedRunning())
+ break;
+ else {
+#ifdef DEBUG
+ ErrorF("moused isn't running\n");
+#endif
+ }
+ } else {
+ close(fd);
+ break;
+ }
+ }
+ }
+
+ if (*pdev)
+ dev = *pdev;
+ else if (devMouse)
+ dev = DEFAULT_MOUSE_DEV;
+
+ if (dev) {
+ /* Set the Device option. */
+ pInfo->conf_idev->commonOptions =
+ xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", dev);
+ xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
+ pInfo->name, dev);
+ }
+
+ return *pdev;
+}
+#endif
+
#if defined(WSCONS_SUPPORT)
#define NUMEVENTS 64
@@ -502,11 +631,11 @@ usbPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
#ifdef USB_NEW_HID
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
hid_input, &pUsbMse->loc_x, pUsbMse->iid) < 0) {
- xf86Msg(X_WARNING, "%s: no x locator\n");
+ xf86Msg(X_WARNING, "%s: no x locator\n", pInfo->name);
}
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y),
hid_input, &pUsbMse->loc_y, pUsbMse->iid) < 0) {
- xf86Msg(X_WARNING, "%s: no y locator\n");
+ xf86Msg(X_WARNING, "%s: no y locator\n", pInfo->name);
}
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL),
hid_input, &pUsbMse->loc_z, pUsbMse->iid) < 0) {
@@ -514,11 +643,11 @@ usbPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
#else
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
hid_input, &pUsbMse->loc_x) < 0) {
- xf86Msg(X_WARNING, "%s: no x locator\n");
+ xf86Msg(X_WARNING, "%s: no x locator\n", pInfo->name);
}
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y),
hid_input, &pUsbMse->loc_y) < 0) {
- xf86Msg(X_WARNING, "%s: no y locator\n");
+ xf86Msg(X_WARNING, "%s: no y locator\n", pInfo->name);
}
if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL),
hid_input, &pUsbMse->loc_z) < 0) {
@@ -589,6 +718,9 @@ xf86OSMouseInit(int flags)
p->SetBMRes = SetSysMouseRes;
p->SetMiscRes = SetSysMouseRes;
#endif
+#if defined(__FreeBSD__)
+ p->FindDevice = FindDevice;
+#endif
p->PreInit = bsdMousePreInit;
return p;
}
diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c
index 3c056ce55..75c8f8200 100644
--- a/hw/xfree86/os-support/bsd/i386_video.c
+++ b/hw/xfree86/os-support/bsd/i386_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c,v 1.2 2002/09/10 15:53:31 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c,v 1.5 2003/10/07 23:14:55 herrb Exp $ */
/*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
@@ -62,11 +62,11 @@
#ifdef __OpenBSD__
#define SYSCTL_MSG "\tCheck that you have set 'machdep.allowaperture=1'\n"\
"\tin /etc/sysctl.conf and reboot your machine\n" \
- "\trefer to xf86(4) for details\n"
+ "\trefer to xf86(4) for details"
#define SYSCTL_MSG2 \
"Check that you have set 'machdep.allowaperture=2'\n" \
"\tin /etc/sysctl.conf and reboot your machine\n" \
- "\trefer to xf86(4) for details\n"
+ "\trefer to xf86(4) for details"
#endif
/***************************************************************************/
@@ -114,7 +114,7 @@ checkDevMem(Bool warn)
if ((fd = open(DEV_MEM, O_RDWR)) >= 0)
{
/* Try to map a page at the VGA address */
- base = mmap((caddr_t)0, 4096, PROT_READ|PROT_WRITE,
+ base = mmap((caddr_t)0, 4096, PROT_READ | PROT_WRITE,
MAP_FLAGS, fd, (off_t)0xA0000);
if (base != MAP_FAILED)
@@ -147,7 +147,7 @@ checkDevMem(Bool warn)
if ((fd = open(DEV_APERTURE, O_RDWR)) >= 0)
{
/* Try to map a page at the VGA address */
- base = mmap((caddr_t)0, 4096, PROT_READ|PROT_WRITE,
+ base = mmap((caddr_t)0, 4096, PROT_READ | PROT_WRITE,
MAP_FLAGS, fd, (off_t)0xA0000);
if (base != MAP_FAILED)
@@ -220,14 +220,16 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
{
if (devMemFd < 0)
{
- FatalError("xf86MapVidMem: failed to open %s (%s)\n",
+ FatalError("xf86MapVidMem: failed to open %s (%s)",
DEV_MEM, strerror(errno));
}
- base = mmap((caddr_t)0, Size, PROT_READ|PROT_WRITE,
- MAP_FLAGS, devMemFd, (off_t)Base);
+ base = mmap((caddr_t)0, Size,
+ (flags & VIDMEM_READONLY) ?
+ PROT_READ : (PROT_READ | PROT_WRITE),
+ MAP_FLAGS, devMemFd, (off_t)Base);
if (base == MAP_FAILED)
{
- FatalError("%s: could not mmap %s [s=%x,a=%x] (%s)\n",
+ FatalError("%s: could not mmap %s [s=%lx,a=%lx] (%s)",
"xf86MapVidMem", DEV_MEM, Size, Base,
strerror(errno));
}
@@ -237,16 +239,18 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
/* else, mmap /dev/vga */
if ((unsigned long)Base < 0xA0000 || (unsigned long)Base >= 0xC0000)
{
- FatalError("%s: Address 0x%x outside allowable range\n",
+ FatalError("%s: Address 0x%lx outside allowable range",
"xf86MapVidMem", Base);
}
- base = mmap(0, Size, PROT_READ|PROT_WRITE, MAP_FLAGS,
- xf86Info.screenFd,
- (unsigned long)Base - 0xA0000
+ base = mmap(0, Size,
+ (flags & VIDMEM_READONLY) ?
+ PROT_READ : (PROT_READ | PROT_WRITE),
+ MAP_FLAGS, xf86Info.screenFd,
+ (unsigned long)Base - 0xA0000
);
if (base == MAP_FAILED)
{
- FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)\n",
+ FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)",
strerror(errno));
}
return(base);
@@ -284,7 +288,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
if ((long)ptr == -1)
{
xf86Msg(X_WARNING,
- "xf86ReadBIOS: %s mmap[s=%x,a=%x,o=%x] failed (%s)\n",
+ "xf86ReadBIOS: %s mmap[s=%x,a=%lx,o=%lx] failed (%s)\n",
DEV_MEM, Len, Base, Offset, strerror(errno));
#ifdef __OpenBSD__
if (Base < 0xa0000) {
@@ -324,7 +328,7 @@ xf86EnableIO()
if (i386_iopl(TRUE) < 0)
{
#ifndef __OpenBSD__
- FatalError("%s: Failed to set IOPL for extended I/O\n",
+ FatalError("%s: Failed to set IOPL for extended I/O",
"xf86EnableIO");
#else
FatalError("%s: Failed to set IOPL for extended I/O\n%s",
@@ -362,7 +366,7 @@ xf86EnableIO()
if ((IoFd = open("/dev/io", O_RDWR)) == -1)
{
FatalError("xf86EnableIO: "
- "Failed to open /dev/io for extended I/O\n");
+ "Failed to open /dev/io for extended I/O");
}
return;
}
@@ -435,7 +439,7 @@ xf86SetTVOut(int mode)
#endif /* PCCONS_SUPPORT */
default:
- FatalError("Xf86SetTVOut: Unsupported console\n");
+ FatalError("Xf86SetTVOut: Unsupported console");
break;
}
return;
@@ -460,7 +464,7 @@ xf86SetRGBOut()
#endif /* PCCONS_SUPPORT */
default:
- FatalError("Xf86SetTVOut: Unsupported console\n");
+ FatalError("Xf86SetTVOut: Unsupported console");
break;
}
return;
diff --git a/hw/xfree86/os-support/bsd/ppc_video.c b/hw/xfree86/os-support/bsd/ppc_video.c
index 4ec7045e8..3e4ff9ee7 100644
--- a/hw/xfree86/os-support/bsd/ppc_video.c
+++ b/hw/xfree86/os-support/bsd/ppc_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/ppc_video.c,v 1.3 2002/11/09 17:28:08 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/ppc_video.c,v 1.6 2003/10/07 23:14:55 herrb Exp $ */
/*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
@@ -44,7 +44,11 @@
/* Video Memory Mapping section */
/***************************************************************************/
+#ifndef __OpenBSD__
#define DEV_MEM "/dev/mem"
+#else
+#define DEV_MEM "/dev/xf86"
+#endif
static pointer ppcMapVidMem(int, unsigned long, unsigned long, int flags);
static void ppcUnmapVidMem(int, pointer, unsigned long);
@@ -71,9 +75,12 @@ ppcMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
Base, Size, fd);
#endif
- base = mmap(0, Size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, Base);
+ base = mmap(0, Size,
+ (flags & VIDMEM_READONLY) ?
+ PROT_READ : (PROT_READ | PROT_WRITE),
+ MAP_SHARED, fd, Base);
if (base == MAP_FAILED)
- FatalError("%s: could not mmap screen [s=%x,a=%x] (%s)\n",
+ FatalError("%s: could not mmap screen [s=%x,a=%x] (%s)",
"xf86MapVidMem", Size, Base, strerror(errno));
return base;
@@ -93,9 +100,9 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
static int kmem = -1;
if (kmem == -1) {
- kmem = open("/dev/xf86", 2);
+ kmem = open(DEV_MEM, 2);
if (kmem == -1) {
- FatalError("xf86ReadBIOS: open /dev/xf86\n");
+ FatalError("xf86ReadBIOS: open %s", DEV_MEM);
}
}
diff --git a/hw/xfree86/os-support/bsd/sparc64_video.c b/hw/xfree86/os-support/bsd/sparc64_video.c
index 877550154..fe301acf5 100644
--- a/hw/xfree86/os-support/bsd/sparc64_video.c
+++ b/hw/xfree86/os-support/bsd/sparc64_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/sparc64_video.c,v 1.1 2002/08/06 13:08:39 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/sparc64_video.c,v 1.3 2003/10/07 23:14:55 herrb Exp $ */
/*
* Copyright 1992 by Rich Murphey <Rich@Rice.edu>
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
@@ -66,9 +66,12 @@ sparc64MapVidMem(int ScreenNum, unsigned long Base, unsigned long Size,
Base, Size, fd);
#endif
- base = mmap(0, Size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, Base);
+ base = mmap(0, Size,
+ (flags & VIDMEM_READONLY) ?
+ PROT_READ : (PROT_READ | PROT_WRITE),
+ MAP_SHARED, fd, Base);
if (base == MAP_FAILED)
- FatalError("%s: could not mmap screen [s=%x,a=%x] (%s)\n",
+ FatalError("%s: could not mmap screen [s=%x,a=%x] (%s)",
"xf86MapVidMem", Size, Base, strerror(errno));
return base;
}
diff --git a/hw/xfree86/os-support/bus/460gxPCI.c b/hw/xfree86/os-support/bus/460gxPCI.c
index 4840fd144..3b16f401a 100644
--- a/hw/xfree86/os-support/bus/460gxPCI.c
+++ b/hw/xfree86/os-support/bus/460gxPCI.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/460gxPCI.c,v 1.2 2003/01/10 22:05:45 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/460gxPCI.c,v 1.4 2003/08/29 21:08:06 tsi Exp $ */
/*
* Copyright (C) 2002-2003 The XFree86 Project, Inc. All Rights Reserved.
*
@@ -122,7 +122,7 @@ Control460GXBridge(int bus, CARD16 mask, CARD16 value)
* host bridges.
*/
static void
-Get460GXBridgeBusses(int bus, int *primary, int *secondary, int *subordinate)
+Get460GXBridgeBuses(int bus, int *primary, int *secondary, int *subordinate)
{
pciConfigPtr pPCI = Verify460GXBus(bus);
int i;
@@ -217,7 +217,7 @@ xf86PreScan460GX(void)
/* First look for a 460GX's primary host bridge */
tag = PCI_MAKE_TAG(0, 0x10, 0);
- if (pciReadLong(tag, PCI_ID_REG) != DEVID(INTEL, 460GX_SAC)) {
+ if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
cbn_460gx = -1;
return FALSE;
}
@@ -239,7 +239,7 @@ xf86PreScan460GX(void)
}
tag = PCI_MAKE_TAG(cbn_460gx, 0, 0);
- if (pciReadLong(tag, PCI_ID_REG) != DEVID(INTEL, 460GX_SAC)) {
+ if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
/* Sanity check failed */
cbn_460gx = -1;
return TRUE;
@@ -253,7 +253,8 @@ xf86PreScan460GX(void)
for (i = 0, devno = 0x10; devno <= 0x17; i++, devno++) {
tag = PCI_MAKE_TAG(cbn_460gx, devno, 0);
- if (pciReadLong(tag, PCI_ID_REG) != DEVID(INTEL, 460GX_SAC)) {
+ if (pciReadLong(tag, PCI_ID_REG) !=
+ DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
/* Sanity check failed */
cbn_460gx = -1;
return TRUE;
@@ -272,8 +273,8 @@ xf86PreScan460GX(void)
tag = PCI_MAKE_TAG(cbn_460gx, devno, 1);
tmp = pciReadLong(tag, PCI_ID_REG);
switch (tmp) {
- case DEVID(INTEL, 460GX_PXB):
- case DEVID(INTEL, 460GX_WXB):
+ case DEVID(VENDOR_INTEL, CHIP_460GX_PXB):
+ case DEVID(VENDOR_INTEL, CHIP_460GX_WXB):
if (cbdevs_460gx & (1 << devno)) {
/* Sanity check failed */
cbn_460gx = -1;
@@ -289,7 +290,7 @@ xf86PreScan460GX(void)
has_err_460gx[i] = 1;
break;
- case DEVID(INTEL, 460GX_GXB_1):
+ case DEVID(VENDOR_INTEL, CHIP_460GX_GXB_1):
if (cbdevs_460gx & (1 << devno)) {
/* Sanity check failed */
cbn_460gx = -1;
@@ -323,7 +324,7 @@ xf86PreScan460GX(void)
}
/*
- * The 460GX spec says that any access to busses higher than CBN will be
+ * The 460GX spec says that any access to buses higher than CBN will be
* master-aborted. It seems possible however that this is not the case in
* all 460GX implementations. For now, limit the bus scan to CBN, unless
* we have already found a higher bus number.
@@ -353,7 +354,7 @@ xf86PostScan460GX(void)
/* Set up our extra bus functions */
BusFuncs_460gx = *(pciBusInfo[0]->funcs);
BusFuncs_460gx.pciControlBridge = Control460GXBridge;
- BusFuncs_460gx.pciGetBridgeBusses = Get460GXBridgeBusses;
+ BusFuncs_460gx.pciGetBridgeBuses = Get460GXBridgeBuses;
BusFuncs_460gx.pciGetBridgeResources = Get460GXBridgeResources;
/*
diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c
index c7777827d..a0b639143 100644
--- a/hw/xfree86/os-support/bus/Pci.c
+++ b/hw/xfree86/os-support/bus/Pci.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c,v 1.71.2.2 2003/05/06 17:00:45 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.c,v 1.81 2003/09/24 02:43:34 dawes Exp $ */
/*
* Pci.c - New server PCI access functions
*
@@ -19,8 +19,6 @@
* pciWriteByte() - Write an 8 bit value to a device's cfg space
* pciSetBitsLong() - Write a 32 bit value against a mask
* pciSetBitsByte() - Write an 8 bit value against a mask
- * pciLongFunc() - Return pointer to the requested low level
- * function
* pciTag() - Return tag for a given PCI bus, device, &
* function
* pciBusAddrToHostAddr() - Convert a PCI address to a host address
@@ -170,6 +168,33 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
+/*
+ * Copyright (c) 1999-2003 by The XFree86 Project, 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 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).
+ */
+
#include <errno.h>
#include <signal.h>
#include "Xarch.h"
@@ -376,7 +401,7 @@ pciSetBitsLong(PCITAG tag, int offset, CARD32 mask, CARD32 val)
pciInit();
if ((bus >= 0) && (bus < pciNumBuses) && pciBusInfo[bus] &&
- pciBusInfo[bus]->funcs->pciReadLong) {
+ pciBusInfo[bus]->funcs->pciSetBitsLong) {
(*pciBusInfo[bus]->funcs->pciSetBitsLong)(tag, offset, mask, val);
}
}
@@ -393,27 +418,6 @@ pciSetBitsByte(PCITAG tag, int offset, CARD8 mask, CARD8 val)
pciSetBitsLong(tag, aligned_offset, tmp_mask, tmp_val);
}
-pointer
-pciLongFunc(PCITAG tag, pciFunc func)
-{
- int bus = PCI_BUS_FROM_TAG(tag);
-
- pciInit();
-
- if ((bus < 0) || (bus > pciNumBuses) || !pciBusInfo[bus] ||
- !pciBusInfo[bus]->funcs->pciReadLong) return NULL;
-
- switch (func) {
- case WRITE:
- return (void *)pciBusInfo[bus]->funcs->pciWriteLong;
- case READ:
- return (void *)pciBusInfo[bus]->funcs->pciReadLong;
- case SET_BITS:
- return (void *)pciBusInfo[bus]->funcs->pciSetBitsLong;
- }
- return NULL;
-}
-
ADDRESS
pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr)
{
@@ -551,11 +555,7 @@ pciGetBaseSize(PCITAG tag, int index, Bool destructive, Bool *min)
}
/* I/O maps can be no larger than 8 bits */
-#if defined(Lynx) && defined(__powerpc__)
- if (PCI_MAP_IS_IO(addr1) && bits > 8)
-#else
if ((index < 6) && PCI_MAP_IS_IO(addr1) && bits > 8)
-#endif
bits = 8;
/* ROM maps can be no larger than 24 bits */
if (index == 6 && bits > 24)
@@ -569,6 +569,8 @@ pciTag(int busnum, int devnum, int funcnum)
return(PCI_MAKE_TAG(busnum,devnum,funcnum));
}
+#if defined(PCI_MFDEV_SUPPORT) || defined(PowerMAX_OS)
+
Bool
pciMfDev(int busnum, int devnum)
{
@@ -579,7 +581,7 @@ pciMfDev(int busnum, int devnum)
tag0 = PCI_MAKE_TAG(busnum, devnum, 0);
id0 = pciReadLong(tag0, PCI_ID_REG);
- if (id0 == 0xffffffff)
+ if ((CARD16)(id0 + 1) <= (CARD16)1UL)
return FALSE;
val = pciReadLong(tag0, PCI_HEADER_MISC) & 0x00ff0000;
@@ -594,10 +596,15 @@ pciMfDev(int busnum, int devnum)
*/
tag1 = PCI_MAKE_TAG(busnum, devnum, 1);
id1 = pciReadLong(tag1, PCI_ID_REG);
- if (id1 == 0xffffffff || id1 == 0x00000000)
+ if ((CARD16)(id1 + 1) <= (CARD16)1UL)
+ return FALSE;
+
+ /* Vendor IDs should match */
+ if ((id0 ^ id1) & 0x0000ffff)
return FALSE;
if ((id0 != id1) ||
+ /* Note the following test is valid for header types 0, 1 and 2 */
(pciReadLong(tag0, PCI_MAP_REG_START) !=
pciReadLong(tag1, PCI_MAP_REG_START)))
return TRUE;
@@ -605,6 +612,8 @@ pciMfDev(int busnum, int devnum)
return FALSE;
}
+#endif
+
/*
* Generic find/read/write functions
*/
@@ -678,6 +687,7 @@ pciGenFindNext(void)
* No more devices for this bus. Next bus please
*/
if (speculativeProbe) {
+ NextSpeculativeBus:
xfree(pciBusInfo[pciBusNum]);
pciBusInfo[pciBusNum] = NULL;
speculativeProbe = FALSE;
@@ -715,7 +725,7 @@ pciGenFindNext(void)
#endif
pciDeviceTag = PCI_MAKE_TAG(pciBusNum, pciDevNum, pciFuncNum);
inProbe = TRUE;
- devid = pciReadLong(pciDeviceTag, 0);
+ devid = pciReadLong(pciDeviceTag, PCI_ID_REG);
inProbe = FALSE;
#ifdef DEBUGPCI
ErrorF("pciGenFindNext: pciDeviceTag = 0x%lx, devid = 0x%lx\n", pciDeviceTag, devid);
@@ -723,18 +733,36 @@ pciGenFindNext(void)
if ((CARD16)(devid + 1U) <= (CARD16)1UL)
continue; /* Nobody home. Next device please */
+ /*
+ * Some devices mis-decode configuration cycles in such a way as to
+ * create phantom buses.
+ */
+ if (speculativeProbe && (pciDevNum == 0) && (pciFuncNum == 0) &&
+ (PCI_BUS_NO_DOMAIN(pciBusNum) > 0)) {
+ for (;;) {
+ if (++pciDevNum >= pciBusInfo[pciBusNum]->numDevices)
+ goto NextSpeculativeBus;
+ if (devid !=
+ pciReadLong(PCI_MAKE_TAG(pciBusNum, pciDevNum, 0),
+ PCI_ID_REG))
+ break;
+ }
+
+ pciDevNum = 0;
+ }
+
if (pciNumBuses <= pciBusNum)
pciNumBuses = pciBusNum + 1;
speculativeProbe = FALSE;
previousBus = pciBusNum;
+#ifdef PCI_BRIDGE_SUPPORT
/*
* Before checking for a specific devid, look for enabled
* PCI to PCI bridge devices. If one is found, create and
* initialize a bus info record (if one does not already exist).
*/
-#ifdef PCI_BRIDGE_SUPPORT
tmp = pciReadLong(pciDeviceTag, PCI_CLASS_REG);
base_class = PCI_CLASS_EXTRACT(tmp);
sub_class = PCI_SUBCLASS_EXTRACT(tmp);
@@ -754,7 +782,7 @@ pciGenFindNext(void)
(sub_class != PCI_SUBCLASS_BRIDGE_CARDBUS))
xf86Msg(X_WARNING,
"pciGenFindNext: primary bus mismatch on PCI"
- " bridge 0x%08x (0x%02x, 0x%02x)\n",
+ " bridge 0x%08lx (0x%02x, 0x%02x)\n",
pciDeviceTag, pciBusNum, pri_bus);
pri_bus = pciBusNum;
}
@@ -970,12 +998,6 @@ xf86scanpci(int flags)
for (i = 0; i < 17; i++) /* PCI hdr plus 1st dev spec dword */
devp->cfgspc.dwords[i] = pciReadLong(tag, i * sizeof(CARD32));
-#ifdef ARCH_PCI_HOST_BRIDGE
- if ((devp->pci_base_class == PCI_CLASS_BRIDGE) &&
- (devp->pci_sub_class == PCI_SUBCLASS_BRIDGE_HOST))
- ARCH_PCI_HOST_BRIDGE(devp);
-#endif
-
/* Some broken devices don't implement this field... */
if (devp->pci_header_type == 0xff)
devp->pci_header_type = 0;
@@ -1115,7 +1137,7 @@ xf86MapPciMem(int ScreenNum, int Flags, PCITAG Tag, ADDRESS Base,
base = xf86MapDomainMemory(ScreenNum, Flags, Tag, hostbase, Size);
if (!base) {
FatalError("xf86MapPciMem: Could not mmap PCI memory "
- "[base=0x%x,hostbase=0x%x,size=%x] (%s)\n",
+ "[base=0x%lx,hostbase=0x%lx,size=%lx] (%s)\n",
Base, hostbase, Size, strerror(errno));
}
/*
@@ -1165,8 +1187,8 @@ handlePciBIOS(PCITAG Tag, int basereg,
savebase = pciReadLong(Tag, PCI_MAP_REG_START+(b_reg<<2));
xf86MsgVerb(X_INFO,5,"xf86ReadPciBios: modifying membase[%i]"
" for device %i:%i:%i\n", basereg,
- PCI_BUS_FROM_TAG(Tag), PCI_DEV_FROM_TAG(Tag),
- PCI_FUNC_FROM_TAG(Tag));
+ (int)PCI_BUS_FROM_TAG(Tag), (int)PCI_DEV_FROM_TAG(Tag),
+ (int)PCI_FUNC_FROM_TAG(Tag));
pciWriteLong(Tag, PCI_MAP_REG_START + (b_reg << 2),
(CARD32)~0);
}
@@ -1275,7 +1297,7 @@ readPciBios(PCITAG Tag, CARD8* tmp, ADDRESS hostbase, pointer args)
}
if ((rd->Offset) > (image_length)) {
xf86Msg(X_WARNING,"xf86ReadPciBios: requesting data past "
- "end of BIOS %i > %i\n",(rd->Offset) , (image_length));
+ "end of BIOS %li > %i\n",(rd->Offset) , (image_length));
} else {
if ((rd->Offset + rd->Len) > (image_length)) {
rd->Len = (image_length) - rd->Offset;
@@ -1299,7 +1321,7 @@ getPciBIOSTypes(PCITAG Tag, CARD8* tmp, ADDRESS hostbase, pointer arg)
/* We found a PCI BIOS Image. Now we collect the types type */
do {
unsigned short data_off = tmp[0x18] | (tmp[0x19] << 8);
- unsigned char data[16];
+ unsigned char data[0x16];
unsigned int i_length;
if ((xf86ReadDomainMemory(Tag, hostbase + data_off, sizeof(data), data)
@@ -1359,22 +1381,20 @@ HandlePciBios(PCITAG Tag, int basereg,
if (!num) return 0;
#define PCI_ENA (PCI_CMD_MEM_ENABLE | PCI_CMD_IO_ENABLE)
- Acc1 = ((ReadProcPtr)(pciLongFunc(Tag,READ)))(Tag,PCI_CMD_STAT_REG);
- ((WriteProcPtr)(pciLongFunc(Tag,WRITE)))(Tag,
- PCI_CMD_STAT_REG,(Acc1 & ~PCI_ENA));
+ Acc1 = pciReadLong(Tag, PCI_CMD_STAT_REG);
+ pciWriteLong(Tag, PCI_CMD_STAT_REG, (Acc1 & ~PCI_ENA));
for (i = 0; i < num; i++) {
- Acc2 = ((ReadProcPtr)(pciLongFunc(pTag[i],READ)))(pTag[i],PCI_CMD_STAT_REG);
- ((WriteProcPtr)(pciLongFunc(pTag[i],WRITE)))(pTag[i],
- PCI_CMD_STAT_REG,(Acc2 | PCI_ENA));
+ Acc2 = pciReadLong(pTag[i], PCI_CMD_STAT_REG);
+ pciWriteLong(pTag[i], PCI_CMD_STAT_REG, (Acc2 | PCI_ENA));
n = handlePciBIOS(pTag[i],0,func,ptr);
- ((WriteProcPtr)(pciLongFunc(pTag[i],WRITE)))(pTag[i],PCI_CMD_STAT_REG,Acc2);
+ pciWriteLong(pTag[i], PCI_CMD_STAT_REG, Acc2);
if (n)
break;
}
- ((WriteProcPtr)(pciLongFunc(Tag,WRITE)))(Tag,PCI_CMD_STAT_REG,Acc1);
+ pciWriteLong(Tag, PCI_CMD_STAT_REG, Acc1);
return n;
}
diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h
index 8fb421b34..74ca95baf 100644
--- a/hw/xfree86/os-support/bus/Pci.h
+++ b/hw/xfree86/os-support/bus/Pci.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h,v 1.36.2.1 2003/03/21 22:29:59 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h,v 1.44 2003/11/07 23:57:47 dawes Exp $ */
/*
* Copyright 1998 by Concurrent Computer Corporation
*
@@ -69,6 +69,33 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
+/*
+ * Copyright (c) 1999-2003 by The XFree86 Project, 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 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).
+ */
+
/*
* This file has the private Pci definitions. The public ones are imported
@@ -98,7 +125,7 @@
#endif
#define DEVID(vendor, device) \
- ((CARD32)((PCI_CHIP_##device << 16) | PCI_VENDOR_##vendor))
+ ((CARD32)((PCI_##device << 16) | PCI_##vendor))
#ifndef PCI_DOM_MASK
# define PCI_DOM_MASK 0x0ffu
@@ -228,11 +255,14 @@
# define ARCH_PCI_INIT linuxPciInit
# define INCLUDE_XF86_MAP_PCI_MEM
# define INCLUDE_XF86_NO_DOMAIN
+# elif defined(FreeBSD)
+# define ARCH_PCI_INIT freebsdPciInit
+# define INCLUDE_XF86_MAP_PCI_MEM
+# define INCLUDE_XF86_NO_DOMAIN
# endif
# define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper
#elif defined(__i386__)
# define ARCH_PCI_INIT ix86PciInit
-# define ARCH_PCI_HOST_BRIDGE ix86PciHostBridge
# define INCLUDE_XF86_MAP_PCI_MEM
# define INCLUDE_XF86_NO_DOMAIN
# if defined(linux)
@@ -289,14 +319,20 @@
# elif defined(sun)
# define ARCH_PCI_INIT sparcPciInit
# define INCLUDE_XF86_MAP_PCI_MEM
-# elif defined(__OpenBSD__) && defined(__sparc64__)
+# elif (defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__sparc64__)
# define ARCH_PCI_INIT freebsdPciInit
# define INCLUDE_XF86_MAP_PCI_MEM
# define INCLUDE_XF86_NO_DOMAIN
# endif
-# define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge
-#elif defined(__x86_64__)
-# define ARCH_PCI_INIT ix86PciInit
+# if !defined(__FreeBSD__)
+# define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge
+# endif
+#elif defined(__AMD64__)
+# if defined(__FreeBSD__)
+# define ARCH_PCI_INIT freebsdPciInit
+# else
+# define ARCH_PCI_INIT ix86PciInit
+# endif
# define INCLUDE_XF86_MAP_PCI_MEM
# define INCLUDE_XF86_NO_DOMAIN
# if defined(linux)
@@ -313,10 +349,6 @@ extern void ARCH_PCI_INIT(void);
extern void ARCH_PCI_OS_INIT(void);
#endif
-#if defined(ARCH_PCI_HOST_BRIDGE)
-extern void ARCH_PCI_HOST_BRIDGE(pciConfigPtr pPCI);
-#endif
-
#if defined(ARCH_PCI_PCI_BRIDGE)
extern void ARCH_PCI_PCI_BRIDGE(pciConfigPtr pPCI);
#endif
@@ -344,7 +376,7 @@ typedef struct pci_bus_funcs {
* to be performed generically.
*/
CARD16 (*pciControlBridge)(int, CARD16, CARD16);
- void (*pciGetBridgeBusses)(int, int *, int *, int *);
+ void (*pciGetBridgeBuses)(int, int *, int *, int *);
/* Use pointer's to avoid #include recursion */
void (*pciGetBridgeResources)(int, pointer *, pointer *, pointer *);
} pciBusFuncs_t, *pciBusFuncs_p;
diff --git a/hw/xfree86/os-support/bus/Sbus.c b/hw/xfree86/os-support/bus/Sbus.c
index c730c1559..57262efa2 100644
--- a/hw/xfree86/os-support/bus/Sbus.c
+++ b/hw/xfree86/os-support/bus/Sbus.c
@@ -20,7 +20,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Sbus.c,v 1.2 2001/10/28 03:34:01 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Sbus.c,v 1.4 2003/10/02 13:30:06 eich Exp $ */
#include <fcntl.h>
#include <stdio.h>
@@ -170,6 +170,8 @@ promIsP1275(void)
promP1275 = TRUE;
else
promP1275 = FALSE;
+#elif defined(__FreeBSD__)
+ promP1275 = TRUE;
#else
#error Missing promIsP1275() function for this OS
#endif
@@ -554,6 +556,9 @@ pointer
xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size)
{
pointer ret;
+ unsigned long pagemask = xf86getpagesize() - 1;
+ unsigned long off = offset & ~pagemask;
+ unsigned long len = ((offset + size + pagemask) & ~pagemask) - off;
if (psdp->fd == -1) {
psdp->fd = open(psdp->device, O_RDWR);
@@ -562,22 +567,26 @@ xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size)
} else if (psdp->fd < 0)
return NULL;
- ret = (pointer) mmap (NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE,
- psdp->fd, offset);
+ ret = (pointer) mmap (NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE,
+ psdp->fd, off);
if (ret == (pointer) -1) {
- ret = (pointer) mmap (NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED,
- psdp->fd, offset);
+ ret = (pointer) mmap (NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED,
+ psdp->fd, off);
}
if (ret == (pointer) -1)
return NULL;
- return ret;
+ return (char *)ret + (offset - off);
}
void
xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr, unsigned long size)
{
- munmap (addr, size);
+ unsigned long mask = xf86getpagesize() - 1;
+ unsigned long base = (unsigned long)addr & ~mask;
+ unsigned long len = (((unsigned long)addr + size + mask) & ~mask) - base;
+
+ munmap ((pointer)base, len);
}
/* Tell OS that we are driving the HW cursor ourselves. */
diff --git a/hw/xfree86/os-support/bus/e8870PCI.c b/hw/xfree86/os-support/bus/e8870PCI.c
index 829de03c0..adbd189f1 100644
--- a/hw/xfree86/os-support/bus/e8870PCI.c
+++ b/hw/xfree86/os-support/bus/e8870PCI.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/e8870PCI.c,v 1.1 2003/02/23 20:26:49 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/e8870PCI.c,v 1.2 2003/07/17 15:08:22 tsi Exp $ */
/*
* Copyright (C) 2002-2003 The XFree86 Project, Inc. All Rights Reserved.
*
@@ -40,7 +40,7 @@ xf86PreScanE8870(void)
/* Look for an E8870's Hub interface */
tag = PCI_MAKE_TAG(0, 0x1E, 0);
- if (pciReadLong(tag, PCI_ID_REG) != DEVID(INTEL, 82801_P2P))
+ if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_82801_P2P))
return FALSE;
/* XXX Fill me in... */
diff --git a/hw/xfree86/os-support/bus/freebsdPci.c b/hw/xfree86/os-support/bus/freebsdPci.c
index c3e621daf..06baa69ea 100644
--- a/hw/xfree86/os-support/bus/freebsdPci.c
+++ b/hw/xfree86/os-support/bus/freebsdPci.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/freebsdPci.c,v 1.5 2002/08/27 22:07:07 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/freebsdPci.c,v 1.6 2003/10/02 13:30:07 eich Exp $ */
/*
* Copyright 1998 by Concurrent Computer Corporation
*
@@ -84,7 +84,7 @@ static pciBusInfo_t freebsdPci0 = {
/* bridge */ NULL
};
-#if !defined(__OpenBSD__)
+#if !defined(__OpenBSD__) && !defined(__FreeBSD__)
#if X_BYTE_ORDER == X_BIG_ENDIAN
#ifdef __sparc__
#ifndef ASI_PL
diff --git a/hw/xfree86/os-support/bus/ix86Pci.c b/hw/xfree86/os-support/bus/ix86Pci.c
index e07f5497c..b135d0b73 100644
--- a/hw/xfree86/os-support/bus/ix86Pci.c
+++ b/hw/xfree86/os-support/bus/ix86Pci.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/ix86Pci.c,v 1.18 2003/01/27 00:01:44 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/ix86Pci.c,v 1.25 2003/09/24 02:43:34 dawes Exp $ */
/*
* ix86Pci.c - x86 PCI driver
*
@@ -109,6 +109,33 @@
* (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) 1999-2003 by The XFree86 Project, 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 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).
+ */
+
#include <stdio.h>
#include "compiler.h"
#include "xf86.h"
@@ -318,8 +345,9 @@ void ix86PciSelectCfgmech(void)
xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n");
xf86MsgVerb(X_INFO, 3,
- "PCI: stages = 0x%02x, oldVal1 = 0x%08x, mode1Res1"
- " = 0x%08x\n", stages, oldVal1, mode1Res1);
+ "PCI: stages = 0x%02x, oldVal1 = 0x%08lx, mode1Res1"
+ " = 0x%08lx\n", stages, (unsigned long)oldVal1,
+ (unsigned long)mode1Res1);
return;
}
@@ -372,9 +400,10 @@ void ix86PciSelectCfgmech(void)
xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n");
xf86MsgVerb(X_INFO, 3,
- "PCI: stages = 0x%02x, oldVal1 = 0x%08x,\n"
- "\tmode1Res1 = 0x%08x, mode1Res2 = 0x%08x\n",
- stages, oldVal1, mode1Res1, mode1Res2);
+ "PCI: stages = 0x%02x, oldVal1 = 0x%08lx,\n"
+ "\tmode1Res1 = 0x%08lx, mode1Res2 = 0x%08lx\n",
+ stages, (unsigned long)oldVal1,
+ (unsigned long)mode1Res1, (unsigned long)mode1Res2);
return;
}
@@ -388,9 +417,10 @@ void ix86PciSelectCfgmech(void)
}
xf86MsgVerb(X_INFO, 3, "PCI: Standard check for type 1 failed.\n");
- xf86MsgVerb(X_INFO, 3, "PCI: stages = 0x%02x, oldVal1 = 0x%08x,\n"
- "\tmode1Res1 = 0x%08x, mode1Res2 = 0x%08x\n",
- stages, oldVal1, mode1Res1, mode1Res2);
+ xf86MsgVerb(X_INFO, 3, "PCI: stages = 0x%02x, oldVal1 = 0x%08lx,\n"
+ "\tmode1Res1 = 0x%08lx, mode1Res2 = 0x%08lx\n",
+ stages, (unsigned long)oldVal1, (unsigned long)mode1Res1,
+ (unsigned long)mode1Res2);
/* Try config type 2 */
oldVal2 = inb(PCI_CFGMECH2_ENABLE_REG);
@@ -656,35 +686,3 @@ ix86PciInit()
pciBusInfo[0] = NULL;
}
}
-
-#ifdef ARCH_PCI_HOST_BRIDGE
-
-/*
- * A small table of host bridges that limit the number of PCI buses to less
- * than the maximum of 256.
- */
-static struct {
- CARD32 devid;
- int maxpcibus;
-} host_bridges[] = {
- { DEVID(ALI_2, M1541), 128},
- { DEVID(VIA, APOLLOVP1), 64},
- { DEVID(VIA, APOLLOPRO133X), 64},
- { DEVID(INTEL, 430HX_BRIDGE), 16},
- { DEVID(INTEL, 440BX_BRIDGE), 32},
-};
-#define NUM_BRIDGES (sizeof(host_bridges) / sizeof(host_bridges[0]))
-
-void ARCH_PCI_HOST_BRIDGE(pciConfigPtr pPCI)
-{
- int i;
-
- for (i = 0; i < NUM_BRIDGES; i++) {
- if (pPCI->pci_device_vendor == host_bridges[i].devid) {
- pciMaxBusNum = host_bridges[i].maxpcibus;
- break;
- }
- }
-}
-
-#endif /* ARCH_PCI_HOST_BRIDGE */
diff --git a/hw/xfree86/os-support/bus/netbsdPci.c b/hw/xfree86/os-support/bus/netbsdPci.c
index 637bd7021..9c46ee3d3 100644
--- a/hw/xfree86/os-support/bus/netbsdPci.c
+++ b/hw/xfree86/os-support/bus/netbsdPci.c
@@ -1,5 +1,6 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/netbsdPci.c,v 1.4 2003/08/24 17:37:04 dawes Exp $ */
/*
- * Copyright (C) 1994-2002 The XFree86 Project, Inc. All Rights Reserved.
+ * 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
@@ -25,7 +26,6 @@
* use or other dealings in this Software without prior written
* authorization from the XFree86 Project.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/netbsdPci.c,v 1.2 2002/08/27 22:07:07 tsi Exp $ */
#include <sys/types.h>
#include <sys/mman.h>
@@ -60,10 +60,6 @@ static pciBusInfo_t netbsdPci0 = {
/* numDevices */ 32,
/* secondary */ FALSE,
/* primary_bus */ 0,
-#ifdef PowerMAX_OS
-/* io_base */ 0,
-/* io_size */ 0,
-#endif
/* funcs */ &netbsdFuncs0,
/* pciBusPriv */ NULL,
/* bridge */ NULL
@@ -72,6 +68,7 @@ static pciBusInfo_t netbsdPci0 = {
void
netbsdPciInit()
{
+ struct pciio_businfo pci_businfo;
devpci = open("/dev/pci0", O_RDWR);
if (devpci == -1)
@@ -81,6 +78,10 @@ netbsdPciInit()
pciBusInfo[0] = &netbsdPci0;
pciFindFirstFP = pciGenFindFirst;
pciFindNextFP = pciGenFindNext;
+ /* use businfo to get the number of devs */
+ if (ioctl(devpci, PCI_IOC_BUSINFO, &pci_businfo) != 0)
+ FatalError("netbsdPciInit: not a PCI bus device");
+ netbsdPci0.numDevices = pci_businfo.maxdevs;
}
static CARD32
diff --git a/hw/xfree86/os-support/bus/sparcPci.c b/hw/xfree86/os-support/bus/sparcPci.c
index 24bbec44c..2ada6fd47 100644
--- a/hw/xfree86/os-support/bus/sparcPci.c
+++ b/hw/xfree86/os-support/bus/sparcPci.c
@@ -1,6 +1,6 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/sparcPci.c,v 1.12 2003/01/02 18:11:32 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/sparcPci.c,v 1.14 2003/08/24 17:37:04 dawes Exp $ */
/*
- * Copyright (C) 2001 The XFree86 Project, Inc. All Rights Reserved.
+ * Copyright (C) 2001-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
@@ -852,7 +852,7 @@ simbaVerifyBus(int bus)
pciConfigPtr pPCI;
if ((bus < 0) || (bus >= pciNumBuses) ||
!pciBusInfo[bus] || !(pPCI = pciBusInfo[bus]->bridge) ||
- (pPCI->pci_device_vendor != DEVID(SUN, SIMBA)))
+ (pPCI->pci_device_vendor != DEVID(VENDOR_SUN, CHIP_SIMBA)))
return NULL;
return pPCI;
@@ -1012,7 +1012,7 @@ void ARCH_PCI_PCI_BRIDGE(pciConfigPtr pPCI)
pciBusInfo_t *pBusInfo;
CARD16 pcicommand;
- if (pPCI->pci_device_vendor != DEVID(SUN, SIMBA))
+ if (pPCI->pci_device_vendor != DEVID(VENDOR_SUN, CHIP_SIMBA))
return;
pBusInfo = pPCI->businfo;
diff --git a/hw/xfree86/os-support/bus/xf86Pci.h b/hw/xfree86/os-support/bus/xf86Pci.h
index 3ffc7d544..f2b5c0727 100644
--- a/hw/xfree86/os-support/bus/xf86Pci.h
+++ b/hw/xfree86/os-support/bus/xf86Pci.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Pci.h,v 1.36.2.1 2003/03/21 22:29:59 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Pci.h,v 1.39 2003/08/24 17:37:05 dawes Exp $ */
/*
* Copyright 1998 by Concurrent Computer Corporation
*
@@ -69,6 +69,33 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
+/*
+ * Copyright (c) 1999-2003 by The XFree86 Project, 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 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).
+ */
+
/*
* This file contains just the public interface to the PCI code.
@@ -638,12 +665,6 @@ typedef struct pci_device {
} pciDevice, *pciConfigPtr;
typedef enum {
- WRITE,
- READ,
- SET_BITS
-} pciFunc;
-
-typedef enum {
PCI_MEM,
PCI_MEM_SIZE,
PCI_MEM_SPARSE_BASE,
@@ -744,7 +765,6 @@ void pciWriteWord(PCITAG tag, int offset, CARD16 val);
void pciWriteByte(PCITAG tag, int offset, CARD8 val);
void pciSetBitsLong(PCITAG tag, int offset, CARD32 mask, CARD32 val);
void pciSetBitsByte(PCITAG tag, int offset, CARD8 mask, CARD8 val);
-pointer pciLongFunc(PCITAG tag, pciFunc func);
ADDRESS pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr);
ADDRESS pciHostAddrToBusAddr(PCITAG tag, PciAddrType type, ADDRESS addr);
PCITAG pciTag(int busnum, int devnum, int funcnum);
diff --git a/hw/xfree86/os-support/bus/xf86Sbus.h b/hw/xfree86/os-support/bus/xf86Sbus.h
index 5c8acfd4b..1f5f03bd2 100644
--- a/hw/xfree86/os-support/bus/xf86Sbus.h
+++ b/hw/xfree86/os-support/bus/xf86Sbus.h
@@ -20,7 +20,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Sbus.h,v 1.5 2002/05/22 21:38:30 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Sbus.h,v 1.6 2003/10/02 13:30:07 eich Exp $ */
#ifndef _XF86_SBUS_H
#define _XF86_SBUS_H
@@ -35,7 +35,13 @@
#elif defined(__OpenBSD__) && defined(__sparc64__)
/* XXX */
#elif defined(CSRG_BASED)
+#if defined(__FreeBSD__)
+#include <sys/types.h>
+#include <sys/fbio.h>
+#include <dev/ofw/openpromio.h>
+#else
#include <machine/fbio.h>
+#endif
#else
#include <sun/fbio.h>
#endif
diff --git a/hw/xfree86/os-support/bus/zx1PCI.c b/hw/xfree86/os-support/bus/zx1PCI.c
index dc4d062f3..b5a483560 100644
--- a/hw/xfree86/os-support/bus/zx1PCI.c
+++ b/hw/xfree86/os-support/bus/zx1PCI.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/zx1PCI.c,v 1.1 2003/02/23 20:26:49 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/zx1PCI.c,v 1.5 2003/11/06 18:38:14 tsi Exp $ */
/*
* Copyright (C) 2002-2003 The XFree86 Project, Inc. All Rights Reserved.
*
@@ -97,6 +97,8 @@
#define LBA_PORT5_CNTRL 0x1228U
#define LBA_PORT6_CNTRL 0x1230U
#define LBA_PORT7_CNTRL 0x1238U
+#define LBA_ROPE_RESET 0x01UL
+#define LBA_CLEAR_ERROR 0x10UL
#define LBA_HARD_FAIL 0x40UL
#define ROPE_PAGE_CONTROL 0x1418U
@@ -326,7 +328,8 @@ ControlZX1Bridge(int bus, CARD16 mask, CARD16 value)
}
/* Move on to master abort failure enablement */
- tmp1 = MIO_QUAD((ropenum << 3) + LBA_PORT0_CNTRL);
+ tmp1 = MIO_QUAD((ropenum << 3) + LBA_PORT0_CNTRL) &
+ ~(LBA_ROPE_RESET | LBA_CLEAR_ERROR);
if ((tmp1 & LBA_HARD_FAIL) || (tmp2 & IOA_HARD_FAIL)) {
current |= PCI_PCI_BRIDGE_MASTER_ABORT_EN;
if ((mask & PCI_PCI_BRIDGE_MASTER_ABORT_EN) &&
@@ -388,14 +391,15 @@ GetZX1BridgeResources(int bus,
static CARD32
zx1FakeReadLong(PCITAG tag, int offset)
{
- FatalError("zx1FakeReadLong(0x%X, 0x%X) called\n", tag, offset);
+ FatalError("zx1FakeReadLong(0x%lX, 0x%X) called\n",
+ (unsigned long)tag, offset);
}
static void
zx1FakeWriteLong(PCITAG tag, int offset, CARD32 val)
{
- FatalError("zx1FakeWriteLong(0x%X, 0x%X, 0x%08X) called\n",
- tag, offset, val);
+ FatalError("zx1FakeWriteLong(0x%lX, 0x%X, 0x%08X) called\n",
+ (unsigned long)tag, offset, val);
}
static void
@@ -458,8 +462,10 @@ xf86PreScanZX1(void)
return FALSE;
/* Look for ZX1's SBA and IOC */
- if ((MIO_LONG(MIO_FUNCTION0 + PCI_ID_REG) != DEVID(HP, ZX1_SBA)) ||
- (MIO_LONG(MIO_FUNCTION1 + PCI_ID_REG) != DEVID(HP, ZX1_IOC))) {
+ if ((MIO_LONG(MIO_FUNCTION0 + PCI_ID_REG) !=
+ DEVID(VENDOR_HP, CHIP_ZX1_SBA)) ||
+ (MIO_LONG(MIO_FUNCTION1 + PCI_ID_REG) !=
+ DEVID(VENDOR_HP, CHIP_ZX1_IOC))) {
xf86UnMapVidMem(-1, pZX1mio, mapSize);
pZX1mio = NULL;
return FALSE;
@@ -513,7 +519,8 @@ xf86PreScanZX1(void)
if (zx1_ropemap[i] == i) {
/* Prevent hard-fails */
- zx1_lbacntl[i] = MIO_QUAD((i << 3) + LBA_PORT0_CNTRL);
+ zx1_lbacntl[i] = MIO_QUAD((i << 3) + LBA_PORT0_CNTRL) &
+ ~(LBA_ROPE_RESET | LBA_CLEAR_ERROR);
if (zx1_lbacntl[i] & LBA_HARD_FAIL)
MIO_QUAD((i << 3) + LBA_PORT0_CNTRL) =
zx1_lbacntl[i] & ~LBA_HARD_FAIL;
@@ -521,8 +528,10 @@ xf86PreScanZX1(void)
/* Poke for an ioa */
tmp = IOA_LONG(i, PCI_ID_REG);
switch ((CARD32)tmp) {
- case DEVID(HP, ELROY): /* Expected vendor/device id's */
- case DEVID(HP, ZX1_LBA):
+ case DEVID(VENDOR_HP, CHIP_ELROY):
+ case DEVID(VENDOR_HP, CHIP_ZX1_LBA): /* Mercury */
+ case DEVID(VENDOR_HP, CHIP_ZX1_AGP8): /* QuickSilver */
+ /* Expected vendor/device IDs */
zx1_busno[i] =
(unsigned int)IOA_BYTE(i, IOA_SECONDARY_BUS);
zx1_subno[i] =
@@ -900,9 +909,9 @@ xf86PostScanZX1(void)
ppPCI = ppPCI2 = xf86scanpci(0); /* Recursion is only apparent */
while ((pPCI = *ppPCI2++)) {
switch (pPCI->pci_device_vendor) {
- case DEVID(HP, ZX1_SBA):
- case DEVID(HP, ZX1_IOC):
- case DEVID(HP, ZX1_LBA):
+ case DEVID(VENDOR_HP, CHIP_ZX1_SBA):
+ case DEVID(VENDOR_HP, CHIP_ZX1_IOC):
+ case DEVID(VENDOR_HP, CHIP_ZX1_LBA):
xfree(pPCI); /* Remove it */
continue;
@@ -975,7 +984,7 @@ xf86PostScanZX1(void)
pPCI->tag = PCI_MAKE_TAG(zx1_fakebus, 0, 0);
pPCI->busnum = zx1_fakebus;
/* pPCI->devnum = pPCI->funcnum = 0; */
- pPCI->pci_device_vendor = DEVID(HP, ZX1_SBA);
+ pPCI->pci_device_vendor = DEVID(VENDOR_HP, CHIP_ZX1_SBA);
pPCI->pci_base_class = PCI_CLASS_BRIDGE;
/* pPCI->pci_sub_class = PCI_SUBCLASS_BRIDGE_HOST; */
pPCI->fakeDevice = TRUE;
@@ -1009,7 +1018,7 @@ xf86PostScanZX1(void)
pPCI->devnum = i | 0x10;
/* pPCI->funcnum = 0; */
pPCI->tag = PCI_MAKE_TAG(zx1_fakebus, pPCI->devnum, 0);
- pPCI->pci_device_vendor = DEVID(HP, ZX1_LBA);
+ pPCI->pci_device_vendor = DEVID(VENDOR_HP, CHIP_ZX1_LBA);
pPCI->pci_base_class = PCI_CLASS_BRIDGE;
pPCI->pci_sub_class = PCI_SUBCLASS_BRIDGE_PCI;
pPCI->pci_header_type = 1;
diff --git a/hw/xfree86/os-support/int10Defines.h b/hw/xfree86/os-support/int10Defines.h
index d99ea8672..77d2f4db9 100644
--- a/hw/xfree86/os-support/int10Defines.h
+++ b/hw/xfree86/os-support/int10Defines.h
@@ -1,4 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/int10Defines.h,v 1.3 2001/06/30 21:54:03 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/int10Defines.h,v 1.4 2003/08/24 17:37:03 dawes Exp $ */
+/*
+ * Copyright (c) 2000-2001 by The XFree86 Project, 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 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).
+ */
#ifndef _INT10DEFINES_H_
#define _INT10DEFINES_H_ 1
diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c
index 4ef765451..11fe19f67 100644
--- a/hw/xfree86/os-support/linux/int10/linux.c
+++ b/hw/xfree86/os-support/linux/int10/linux.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c,v 1.29 2002/10/16 21:13:47 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c,v 1.31 2003/09/24 02:43:35 dawes Exp $ */
/*
* linux specific part of the int10 module
* Copyright 1999 Egbert Eich
@@ -123,7 +123,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
ErrorF("Mapping sys bios area\n");
#endif
if ((sysMem = mmap((void *)(SYS_BIOS), BIOS_SIZE,
- PROT_READ | PROT_WRITE | PROT_EXEC,
+ PROT_READ | PROT_EXEC,
MAP_SHARED | MAP_FIXED, fd, SYS_BIOS))
== MAP_FAILED) {
xf86DrvMsg(screen, X_ERROR, "Cannot map SYS BIOS\n");
@@ -238,7 +238,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
for (cs = V_BIOS; cs < SYS_BIOS; cs += V_BIOS_SIZE)
if (xf86ReadBIOS(cs, 0, (pointer)cs, V_BIOS_SIZE) < V_BIOS_SIZE)
xf86DrvMsg(screen, X_WARNING,
- "Unable to retrieve all of segment 0x%06X.\n", cs);
+ "Unable to retrieve all of segment 0x%06lX.\n", cs);
#ifdef DEBUG
ErrorF("done\n");
#endif
@@ -250,13 +250,13 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
&& !(initPrimary(options))) {
if (bios.bus == BUS_ISA && bios.location.legacy) {
xf86DrvMsg(screen, X_CONFIG,
- "Overriding BIOS location: 0x%lx\n",
+ "Overriding BIOS location: 0x%x\n",
bios.location.legacy);
cs = bios.location.legacy >> 4;
bios_base = (unsigned char *)(cs << 4);
if (!int10_check_bios(screen, cs, bios_base)) {
xf86DrvMsg(screen, X_ERROR,
- "No V_BIOS at specified address 0x%x\n",cs << 4);
+ "No V_BIOS at specified address 0x%lx\n",cs << 4);
goto error3;
}
} else {
@@ -286,7 +286,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
}
}
- xf86DrvMsg(screen, X_INFO, "Primary V_BIOS segment is: 0x%x\n", cs);
+ xf86DrvMsg(screen, X_INFO, "Primary V_BIOS segment is: 0x%lx\n", cs);
pInt->BIOSseg = cs;
set_return_trap(pInt);
@@ -345,7 +345,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
bios_base = (unsigned char *)(cs << 4);
if (!int10_check_bios(screen, cs, bios_base)) {
xf86DrvMsg(screen,X_ERROR,"No V_BIOS found "
- "on override address 0x%x\n",bios_base);
+ "on override address %p\n",bios_base);
goto error3;
}
} else {
@@ -365,7 +365,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
}
}
}
- xf86DrvMsg(screen,X_INFO,"Primary V_BIOS segment is: 0x%x\n",cs);
+ xf86DrvMsg(screen,X_INFO,"Primary V_BIOS segment is: 0x%lx\n",cs);
pInt->BIOSseg = cs;
break;
default:
diff --git a/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c b/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c
index 6203cc3c3..dc737ac47 100644
--- a/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c
+++ b/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c
@@ -1,3 +1,5 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c,v 1.3 2003/11/03 05:36:33 tsi Exp $ */
+
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86_ansic.h"
@@ -173,7 +175,7 @@ vm86_GP_fault(xf86Int10InfoPtr pInt)
case 0x0f:
xf86DrvMsg(pInt->scrnIndex, X_ERROR,
- "CPU 0x0f Trap at CS:EIP=0x%4.4x:0x%8.8x\n", X86_CS, X86_EIP);
+ "CPU 0x0f Trap at CS:EIP=0x%4.4x:0x%8.8lx\n", X86_CS, X86_EIP);
goto op0ferr;
default:
diff --git a/hw/xfree86/os-support/linux/lnx_agp.c b/hw/xfree86/os-support/linux/lnx_agp.c
index 13e423433..acac20bce 100644
--- a/hw/xfree86/os-support/linux/lnx_agp.c
+++ b/hw/xfree86/os-support/linux/lnx_agp.c
@@ -7,7 +7,7 @@
* Copyright © 2001 The XFree86 Project, Inc.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c,v 3.10 2002/12/12 18:29:11 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c,v 3.12 2003/09/24 02:43:35 dawes Exp $ */
#include "X.h"
#include "xf86.h"
@@ -18,7 +18,7 @@
#if defined(linux)
#include <asm/ioctl.h>
#include <linux/agpgart.h>
-#elif defined(__FreeBSD__) || defined(__NetBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/ioctl.h>
#include <sys/agpio.h>
#endif
@@ -263,14 +263,14 @@ xf86BindGARTMemory(int screenNum, int key, unsigned long offset)
if (offset % AGP_PAGE_SIZE != 0) {
xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: "
- "offset (0x%x) is not page-aligned (%d)\n",
+ "offset (0x%lx) is not page-aligned (%d)\n",
offset, AGP_PAGE_SIZE);
return FALSE;
}
pageOffset = offset / AGP_PAGE_SIZE;
xf86DrvMsgVerb(screenNum, X_INFO, 3,
- "xf86BindGARTMemory: bind key %d at 0x%08x "
+ "xf86BindGARTMemory: bind key %d at 0x%08lx "
"(pgoffset %d)\n", key, offset, pageOffset);
bind.pg_start = pageOffset;
@@ -279,7 +279,7 @@ xf86BindGARTMemory(int screenNum, int key, unsigned long offset)
if (ioctl(gartFd, AGPIOC_BIND, &bind) != 0) {
xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: "
"binding of gart memory with key %d\n"
- "\tat offset 0x%x failed (%s)\n",
+ "\tat offset 0x%lx failed (%s)\n",
key, offset, strerror(errno));
return FALSE;
}
@@ -332,8 +332,8 @@ xf86EnableAGP(int screenNum, CARD32 mode)
setup.agp_mode = mode;
if (ioctl(gartFd, AGPIOC_SETUP, &setup) != 0) {
xf86DrvMsg(screenNum, X_WARNING, "xf86EnableAGP: "
- "AGPIOC_SETUP with mode %d failed (%s)\n",
- mode, strerror(errno));
+ "AGPIOC_SETUP with mode %ld failed (%s)\n",
+ (unsigned long)mode, strerror(errno));
return FALSE;
}
diff --git a/hw/xfree86/os-support/linux/lnx_io.c b/hw/xfree86/os-support/linux/lnx_io.c
index 741b9a279..7631a1ff0 100644
--- a/hw/xfree86/os-support/linux/lnx_io.c
+++ b/hw/xfree86/os-support/linux/lnx_io.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c,v 3.24 2002/10/20 21:45:27 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c,v 3.26 2003/11/17 22:20:41 dawes Exp $ */
/*
* Copyright 1992 by Orest Zborowski <obz@Kodak.com>
* Copyright 1993 by David Dawes <dawes@xfree86.org>
@@ -67,6 +67,7 @@ xf86GetKbdLeds()
* from util-linux-2.9t package */
#include <linux/kd.h>
+#include <linux/version.h>
#ifdef __sparc__
#include <asm/param.h>
#include <asm/kbio.h>
@@ -142,12 +143,7 @@ KIOCSRATE_ioctl_ok(int rate, int delay) {
#undef rate
-#if NeedFunctionPrototypes
void xf86SetKbdRepeat(char rad)
-#else
-void xf86SetKbdRepeat(rad)
-char rad;
-#endif
{
#ifdef __sparc__
int rate = 500; /* Default rate */
diff --git a/hw/xfree86/os-support/linux/lnx_kbd.c b/hw/xfree86/os-support/linux/lnx_kbd.c
index f2d508c04..ba18f28a1 100644
--- a/hw/xfree86/os-support/linux/lnx_kbd.c
+++ b/hw/xfree86/os-support/linux/lnx_kbd.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c,v 1.2 2003/02/17 15:11:57 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c,v 1.5 2003/11/04 03:14:39 tsi Exp $ */
/*
* Copyright (c) 2002 by The XFree86 Project, Inc.
@@ -27,7 +27,7 @@
static KbdProtocolRec protocols[] = {
{"standard", PROT_STD },
- { NULL, PROT_UNKNOWN }
+ { NULL, PROT_UNKNOWN_KBD }
};
extern Bool VTSwitchEnabled;
@@ -93,12 +93,20 @@ GetKbdLeds(InputInfoPtr pInfo)
/* kbd rate stuff based on kbdrate.c from Rik Faith <faith@cs.unc.edu> et.al.
* from util-linux-2.9t package */
-
+#include <linux/kd.h>
+#include <linux/version.h>
#ifdef __sparc__
#include <asm/param.h>
#include <asm/kbio.h>
#endif
+/* Deal with spurious kernel header change */
+#if defined(LINUX_VERSION_CODE) && defined(KERNEL_VERSION)
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,42)
+# define rate period
+# endif
+#endif
+
static int
KDKBDREP_ioctl_ok(int rate, int delay) {
#if defined(KDKBDREP) && !defined(__sparc__)
@@ -160,6 +168,8 @@ KIOCSRATE_ioctl_ok(int rate, int delay) {
#endif /* KIOCSRATE */
}
+#undef rate
+
static void
SetKbdRepeat(InputInfoPtr pInfo, char rad)
{
@@ -436,7 +446,7 @@ OpenKeyboard(InputInfoPtr pInfo)
{
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
int i;
- KbdProtocolId prot = PROT_UNKNOWN;
+ KbdProtocolId prot = PROT_UNKNOWN_KBD;
char *s;
s = xf86SetStrOption(pInfo->options, "Protocol", NULL);
diff --git a/hw/xfree86/os-support/linux/lnx_mouse.c b/hw/xfree86/os-support/linux/lnx_mouse.c
index 8bc7e6331..3d0d30f52 100644
--- a/hw/xfree86/os-support/linux/lnx_mouse.c
+++ b/hw/xfree86/os-support/linux/lnx_mouse.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_mouse.c,v 1.1 1999/05/17 13:17:18 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_mouse.c,v 1.2 2003/10/08 14:58:30 dawes Exp $ */
/*
* Copyright 1999 by The XFree86 Project, Inc.
@@ -8,6 +8,10 @@
#include "xf86.h"
#include "xf86Xinput.h"
#include "xf86OSmouse.h"
+#include "xf86_OSlib.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
static int
SupportedInterfaces(void)
@@ -15,6 +19,172 @@ SupportedInterfaces(void)
return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO;
}
+static const char *
+DefaultProtocol(void)
+{
+ return "Auto";
+}
+
+#define DEFAULT_MOUSE_DEV "/dev/mouse"
+#define DEFAULT_PS2_DEV "/dev/psaux"
+#define DEFAULT_GPM_DATA_DEV "/dev/gpmdata"
+#define DEFAULT_GPM_CTL_DEV "/dev/gpmdata"
+
+static const char *mouseDevs[] = {
+ DEFAULT_MOUSE_DEV,
+ DEFAULT_PS2_DEV,
+ DEFAULT_GPM_DATA_DEV,
+ NULL
+};
+
+typedef enum {
+ MOUSE_PROTO_UNKNOWN = 0,
+ MOUSE_PROTO_SERIAL,
+ MOUSE_PROTO_PS2,
+ MOUSE_PROTO_MSC,
+ MOUSE_PROTO_GPM
+} protocolTypes;
+
+static struct {
+ protocolTypes proto;
+ const char *name;
+} devproto[] = {
+ { MOUSE_PROTO_UNKNOWN, NULL },
+ { MOUSE_PROTO_PS2, "PS/2" },
+ { MOUSE_PROTO_MSC, "MouseSystems" },
+ { MOUSE_PROTO_GPM, "GPM" }
+};
+
+static const char *
+FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
+{
+ int fd = -1;
+ const char **pdev;
+
+ for (pdev = mouseDevs; *pdev; pdev++) {
+ SYSCALL (fd = open(*pdev, O_RDWR | O_NONBLOCK | O_EXCL));
+ if (fd == -1) {
+#ifdef DEBUG
+ ErrorF("Cannot open %s (%s)\n", *pdev, strerror(errno));
+#endif
+ } else
+ break;
+ }
+
+ if (*pdev) {
+ close(fd);
+ /* Set the Device option. */
+ pInfo->conf_idev->commonOptions =
+ xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", *pdev);
+ xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
+ pInfo->name, *pdev);
+ }
+
+ return *pdev;
+}
+
+static const char *
+GuessProtocol(InputInfoPtr pInfo, int flags)
+{
+ int fd = -1;
+ const char *dev;
+ char *realdev;
+ struct stat sbuf;
+ int i;
+ int proto = MOUSE_PROTO_UNKNOWN;
+
+ dev = xf86SetStrOption(pInfo->conf_idev->commonOptions, "Device", NULL);
+ if (!dev) {
+#ifdef DEBUG
+ ErrorF("xf86SetStrOption failed to return the device name\n");
+#endif
+ return NULL;
+ }
+ /* Look at the device name to guess the protocol. */
+ realdev = NULL;
+ if (strcmp(dev, DEFAULT_MOUSE_DEV) == 0) {
+ if (lstat(dev, &sbuf) != 0) {
+#ifdef DEBUG
+ ErrorF("lstat failed for %s (%s)\n", dev, strerror(errno));
+#endif
+ return NULL;
+ }
+ if (S_ISLNK(sbuf.st_mode)) {
+ realdev = xnfalloc(PATH_MAX + 1);
+ i = readlink(dev, realdev, PATH_MAX);
+ if (i <= 0) {
+#ifdef DEBUG
+ ErrorF("readlink failed for %s (%s)\n", dev, strerror(errno));
+#endif
+ xfree(realdev);
+ return NULL;
+ }
+ realdev[i] = '\0';
+ }
+ }
+ if (!realdev)
+ realdev = xnfstrdup(dev);
+ else {
+ /* If realdev doesn't contain a '/' then prepend "/dev/" */
+ if (!strchr(realdev, '/')) {
+ char *tmp = xnfalloc(strlen(realdev) + 5 + 1);
+ sprintf(tmp, "/dev/%s", realdev);
+ xfree(realdev);
+ realdev = tmp;
+ }
+ }
+
+ if (strcmp(realdev, DEFAULT_PS2_DEV) == 0)
+ proto = MOUSE_PROTO_PS2;
+ else if (strcmp(realdev, DEFAULT_GPM_DATA_DEV) == 0)
+ proto = MOUSE_PROTO_MSC;
+ else if (strcmp(realdev, DEFAULT_GPM_CTL_DEV) == 0)
+ proto = MOUSE_PROTO_GPM;
+ xfree(realdev);
+ /*
+ * If the protocol can't be guessed from the device name,
+ * try to characterise it.
+ */
+ if (proto == MOUSE_PROTO_UNKNOWN) {
+ SYSCALL (fd = open(dev, O_RDWR | O_NONBLOCK | O_EXCL));
+ if (isatty(fd)) {
+ /* Serial PnP has already failed, so give up. */
+ } else {
+ if (fstat(fd, &sbuf) != 0) {
+#ifdef DEBUG
+ ErrorF("fstat failed for %s (%s)\n", dev, strerror(errno));
+#endif
+ close(fd);
+ return NULL;
+ }
+ if (S_ISFIFO(sbuf.st_mode)) {
+ /* Assume GPM data in MSC format. */
+ proto = MOUSE_PROTO_MSC;
+ } else {
+ /* Default to PS/2 */
+ proto = MOUSE_PROTO_PS2;
+ }
+ }
+ close(fd);
+ }
+ if (proto == MOUSE_PROTO_UNKNOWN) {
+ xf86Msg(X_ERROR, "%s: GuessProtocol: Cannot find mouse protocol.\n",
+ pInfo->name);
+ return NULL;
+ } else {
+ for (i = 0; i < sizeof(devproto)/sizeof(devproto[0]); i++) {
+ if (devproto[i].proto == proto) {
+ xf86Msg(X_INFO,
+ "%s: GuessProtocol: "
+ "setting mouse protocol to \"%s\"\n",
+ pInfo->name, devproto[i].name);
+ return devproto[i].name;
+ }
+ }
+ }
+ return NULL;
+}
+
OSMouseInfoPtr
xf86OSMouseInit(int flags)
{
@@ -24,6 +194,9 @@ xf86OSMouseInit(int flags)
if (!p)
return NULL;
p->SupportedInterfaces = SupportedInterfaces;
+ p->DefaultProtocol = DefaultProtocol;
+ p->FindDevice = FindDevice;
+ p->GuessProtocol = GuessProtocol;
return p;
}
diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
index 107d5595e..ad3a17fa2 100644
--- a/hw/xfree86/os-support/linux/lnx_video.c
+++ b/hw/xfree86/os-support/linux/lnx_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c,v 3.64 2003/02/17 15:29:22 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c,v 3.68 2003/09/24 02:43:35 dawes Exp $ */
/*
* Copyright 1992 by Orest Zborowski <obz@Kodak.com>
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
@@ -407,6 +407,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
pointer base;
int fd;
int mapflags = MAP_SHARED;
+ int prot;
memType realBase, alignOff;
realBase = Base & ~(getpagesize() - 1);
@@ -429,25 +430,31 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
mapflags |= MAP_NONCACHED;
#endif
-#if defined(__ia64__)
+#if 0
/* this will disappear when people upgrade their kernels */
- if ((fd = open(DEV_MEM, O_RDWR|O_SYNC)) < 0)
+ fd = open(DEV_MEM,
+ ((flags & VIDMEM_READONLY) ? O_RDONLY : O_RDWR) | O_SYNC);
#else
- if ((fd = open(DEV_MEM, O_RDWR)) < 0)
+ fd = open(DEV_MEM, (flags & VIDMEM_READONLY) ? O_RDONLY : O_RDWR);
#endif
+ if (fd < 0)
{
FatalError("xf86MapVidMem: failed to open " DEV_MEM " (%s)\n",
strerror(errno));
}
+
+ if (flags & VIDMEM_READONLY)
+ prot = PROT_READ;
+ else
+ prot = PROT_READ | PROT_WRITE;
+
/* This requires linux-0.99.pl10 or above */
- base = mmap((caddr_t)0, Size + alignOff,
- PROT_READ|PROT_WRITE,
- mapflags, fd,
+ base = mmap((caddr_t)0, Size + alignOff, prot, mapflags, fd,
(off_t)(off_t)realBase + BUS_BASE);
close(fd);
if (base == MAP_FAILED) {
FatalError("xf86MapVidMem: Could not mmap framebuffer"
- " (0x%08x,0x%x) (%s)\n", Base, Size,
+ " (0x%08lx,0x%lx) (%s)\n", Base, Size,
strerror(errno));
}
#ifdef DEBUG
@@ -500,7 +507,7 @@ xf86EnableIO(void)
fd = open("/dev/mem", O_RDWR);
if (ioBase == NULL) {
ioBase = (volatile unsigned char *)mmap(0, 0x20000,
- PROT_READ|PROT_WRITE, MAP_SHARED, fd,
+ PROT_READ | PROT_WRITE, MAP_SHARED, fd,
ioBase_phys);
/* Should this be fatal or just a warning? */
#if 0
@@ -656,7 +663,7 @@ static unsigned long msb_set = 0;
static pointer
mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
{
- int fd;
+ int fd, prot;
unsigned long ret, rets = 0;
static Bool was_here = FALSE;
@@ -675,7 +682,8 @@ mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size, int flags
xf86ReadMmio32 = readSparse32;
}
- if ((fd = open(DEV_MEM, O_RDWR)) < 0) {
+ fd = open(DEV_MEM, (flags & VIDMEM_READONLY) ? O_RDONLY : O_RDWR);
+ if (fd < 0) {
FatalError("xf86MapVidMem: failed to open " DEV_MEM " (%s)\n",
strerror(errno));
}
@@ -685,14 +693,18 @@ mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size, int flags
Base, Size, flags);
#endif
+ if (flags & VIDMEM_READONLY)
+ prot = PROT_READ;
+ else
+ prot = PROT_READ | PROT_WRITE;
+
/* This requirers linux-0.99.pl10 or above */
/*
* Always do DENSE mmap, since read32/write32 currently require it.
*/
ret = (unsigned long)mmap((caddr_t)(DENSE_BASE + Base), Size,
- PROT_READ | PROT_WRITE,
- MAP_SHARED, fd,
+ prot, MAP_SHARED, fd,
(off_t) (bus_base + Base));
/*
@@ -706,8 +718,7 @@ mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size, int flags
((flags & VIDMEM_FRAMEBUFFER) && (flags & VIDMEM_SPARSE)))
{
rets = (unsigned long)mmap((caddr_t)(SPARSE_BASE + (Base << 5)),
- Size << 5, PROT_READ | PROT_WRITE,
- MAP_SHARED, fd,
+ Size << 5, prot, MAP_SHARED, fd,
(off_t) _bus_base_sparse() + (Base << 5));
}
@@ -968,7 +979,7 @@ static pointer
mapVidMemJensen(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
{
pointer base;
- int fd;
+ int fd, prot;
xf86WriteMmio8 = writeSparseJensen8;
xf86WriteMmio16 = writeSparseJensen16;
@@ -980,14 +991,20 @@ mapVidMemJensen(int ScreenNum, unsigned long Base, unsigned long Size, int flags
xf86ReadMmio16 = readSparseJensen16;
xf86ReadMmio32 = readSparseJensen32;
- if ((fd = open(DEV_MEM, O_RDWR)) < 0) {
+ fd = open(DEV_MEM, (flags & VIDMEM_READONLY) ? O_RDONLY : O_RDWR);
+ if (fd < 0) {
FatalError("xf86MapVidMem: failed to open " DEV_MEM " (%s)\n",
strerror(errno));
}
+
+ if (flags & VIDMEM_READONLY)
+ prot = PROT_READ;
+ else
+ prot = PROT_READ | PROT_WRITE;
+
/* This requires linux-0.99.pl10 or above */
base = mmap((caddr_t)0, JENSEN_SHIFT(Size),
- PROT_READ|PROT_WRITE,
- MAP_SHARED, fd,
+ prot, MAP_SHARED, fd,
(off_t)(JENSEN_SHIFT((off_t)Base) + _bus_base_sparse()));
close(fd);
if (base == MAP_FAILED) {
diff --git a/hw/xfree86/os-support/misc/Delay.c b/hw/xfree86/os-support/misc/Delay.c
index 7d5dad40b..b5de1d899 100644
--- a/hw/xfree86/os-support/misc/Delay.c
+++ b/hw/xfree86/os-support/misc/Delay.c
@@ -1,5 +1,8 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/Delay.c,v 3.3 2000/12/08 20:13:38 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/Delay.c,v 3.4 2003/03/25 04:18:23 dawes Exp $ */
+#ifdef __UNIXOS2__
+#define I_NEED_OS2_H
+#endif
#include "X.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/os-support/misc/SlowBcopy.c b/hw/xfree86/os-support/misc/SlowBcopy.c
index f705e0f42..98546b688 100644
--- a/hw/xfree86/os-support/misc/SlowBcopy.c
+++ b/hw/xfree86/os-support/misc/SlowBcopy.c
@@ -4,7 +4,7 @@
for Alpha Linux
*******************************************************************************/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/SlowBcopy.c,v 1.5 2001/11/19 15:44:18 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/SlowBcopy.c,v 1.6 2003/04/07 16:23:39 eich Exp $ */
/*
* Create a dependency that should be immune from the effect of register
@@ -26,6 +26,9 @@
void
xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len)
{
+#if defined(__ia64__)
+ outb(0x80, 0x00);
+#endif
while(len--)
{
*dst++ = *src++;
diff --git a/hw/xfree86/os-support/sco/VTsw_sco.c b/hw/xfree86/os-support/sco/VTsw_sco.c
index d06bd3949..899c3820b 100644
--- a/hw/xfree86/os-support/sco/VTsw_sco.c
+++ b/hw/xfree86/os-support/sco/VTsw_sco.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/VTsw_sco.c,v 1.3 2001/06/30 22:41:49 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/VTsw_sco.c,v 1.4 2003/07/07 15:34:27 eich Exp $ */
/*
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
* Copyright 1993 by David McCullough <davidm@stallion.oz.au>
@@ -72,6 +72,7 @@ xf86VTSwitchAway()
{
ev_flush();
ev_suspend();
+
sco_ledstatus = ioctl(xf86Info.consoleFd, KDGETLED, &sco_ledstate);
xf86Info.vtRequestsPending = FALSE;
@@ -97,7 +98,7 @@ xf86VTSwitchTo()
return(FALSE);
} else {
if (sco_ledstatus >= 0) {
- ioctl (xf86Info.consoleFd, KDSETLED, &sco_ledstate);
+ ioctl (xf86Info.consoleFd, KDSETLED, sco_ledstate);
}
sco_ledstatus = -1;
diff --git a/hw/xfree86/os-support/sco/sco_video.c b/hw/xfree86/os-support/sco/sco_video.c
index eb4b80c48..3c00f5564 100644
--- a/hw/xfree86/os-support/sco/sco_video.c
+++ b/hw/xfree86/os-support/sco/sco_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_video.c,v 3.8 2002/06/03 21:22:10 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sco/sco_video.c,v 3.9 2003/03/14 13:46:07 tsi Exp $ */
/*
* Copyright 2001 by J. Kean Johnston <jkj@sco.com>
*
@@ -112,7 +112,7 @@ mapVidMemMMAP(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
unsigned long realBase, alignOff;
pointer base;
- fd = open (DEV_MEM, O_RDWR);
+ fd = open (DEV_MEM, (flags & VIDMEM_READONLY) ? O_RDONLY : O_RDWR);
if (fd < 0) {
FatalError("xf86MapVidMem: failed to open %s (%s)\n", DEV_MEM,
strerror(errno));
@@ -126,8 +126,9 @@ mapVidMemMMAP(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
ErrorF("base: %lx, realBase: %lx, alignOff: %lx\n", Base,realBase,alignOff);
#endif
- base = mmap((caddr_t)0, Size + alignOff, PROT_READ|PROT_WRITE,
- MAP_SHARED, fd, (off_t)realBase);
+ base = mmap((caddr_t)0, Size + alignOff,
+ (flags & VIDMEM_READONLY) ? PROT_READ : (PROT_READ | PROT_WRITE),
+ MAP_SHARED, fd, (off_t)realBase);
close(fd);
if (base == MAP_FAILED) {
FatalError("xf86MapVidMem: Could not mmap framebuffer (0x%08x,0x%x) (%s)\n",
diff --git a/hw/xfree86/os-support/shared/agp_noop.c b/hw/xfree86/os-support/shared/agp_noop.c
index c1100e67b..5da36fa19 100644
--- a/hw/xfree86/os-support/shared/agp_noop.c
+++ b/hw/xfree86/os-support/shared/agp_noop.c
@@ -1,10 +1,39 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/agp_noop.c,v 1.5 2003/08/24 17:37:05 dawes Exp $ */
+/*
+ * Copyright (c) 2000-2003 by The XFree86 Project, 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 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).
+ */
+
/*
* Abstraction of the AGP GART interface. Stubs for platforms without
* AGP GART support.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/agp_noop.c,v 1.3 2001/05/19 00:26:46 dawes Exp $ */
-
+#ifdef __UNIXOS2__
+# define I_NEED_OS2_H
+#endif
#include "X.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/os-support/shared/at_scancode.c b/hw/xfree86/os-support/shared/at_scancode.c
index a1529579f..821e116ab 100644
--- a/hw/xfree86/os-support/shared/at_scancode.c
+++ b/hw/xfree86/os-support/shared/at_scancode.c
@@ -1,7 +1,29 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/at_scancode.c,v 1.1 2002/10/11 01:40:37 dawes Exp $ */
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/at_scancode.c,v 1.4 2003/08/24 17:37:05 dawes Exp $ */
/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
+ * Copyright (c) 2002-2003 by The XFree86 Project, 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 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).
*/
#include "xf86.h"
@@ -21,6 +43,34 @@ ATScancode(InputInfoPtr pInfo, int *scanCode)
case KEY_Prefix1:
pKbd->scanPrefix = *scanCode; /* special prefixes */
return TRUE;
+ case 0x59: *scanCode = KEY_0x59; break;
+ case 0x5a: *scanCode = KEY_0x5A; break;
+ case 0x5b: *scanCode = KEY_0x5B; break;
+ case 0x5c: *scanCode = KEY_KP_Equal; break; /* Keypad Equal */
+ case 0x5d: *scanCode = KEY_0x5D; break;
+ case 0x5e: *scanCode = KEY_0x5E; break;
+ case 0x5f: *scanCode = KEY_0x5F; break;
+ case 0x62: *scanCode = KEY_0x62; break;
+ case 0x63: *scanCode = KEY_0x63; break;
+ case 0x64: *scanCode = KEY_0x64; break;
+ case 0x65: *scanCode = KEY_0x65; break;
+ case 0x66: *scanCode = KEY_0x66; break;
+ case 0x67: *scanCode = KEY_0x67; break;
+ case 0x68: *scanCode = KEY_0x68; break;
+ case 0x69: *scanCode = KEY_0x69; break;
+ case 0x6a: *scanCode = KEY_0x6A; break;
+ case 0x6b: *scanCode = KEY_0x6B; break;
+ case 0x6c: *scanCode = KEY_0x6C; break;
+ case 0x6d: *scanCode = KEY_0x6D; break;
+ case 0x6e: *scanCode = KEY_0x6E; break;
+ case 0x6f: *scanCode = KEY_0x6F; break;
+ case 0x70: *scanCode = KEY_0x70; break;
+ case 0x71: *scanCode = KEY_0x71; break;
+ case 0x72: *scanCode = KEY_0x72; break;
+ case 0x73: *scanCode = KEY_0x73; break;
+ case 0x74: *scanCode = KEY_0x74; break;
+ case 0x75: *scanCode = KEY_0x75; break;
+ case 0x76: *scanCode = KEY_0x76; break;
}
break;
case KEY_Prefix0:
diff --git a/hw/xfree86/os-support/shared/kbd.c b/hw/xfree86/os-support/shared/kbd.c
index 0ebf729ac..213e8bd62 100644
--- a/hw/xfree86/os-support/shared/kbd.c
+++ b/hw/xfree86/os-support/shared/kbd.c
@@ -1,7 +1,29 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/kbd.c,v 1.2 2003/02/17 15:11:59 dawes Exp $ */
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/kbd.c,v 1.3 2003/08/24 17:37:05 dawes Exp $ */
/*
- * Copyright (c) 2001 by The XFree86 Project, Inc.
+ * Copyright (c) 2001-2003 by The XFree86 Project, 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 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).
*/
#include "xf86OSKbd.h"
diff --git a/hw/xfree86/os-support/shared/kmod_noop.c b/hw/xfree86/os-support/shared/kmod_noop.c
index 80f487593..ae6852ed9 100644
--- a/hw/xfree86/os-support/shared/kmod_noop.c
+++ b/hw/xfree86/os-support/shared/kmod_noop.c
@@ -1,3 +1,30 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/kmod_noop.c,v 1.2 2003/08/24 17:37:05 dawes Exp $ */
+/*
+ * Copyright (c) 2000 by The XFree86 Project, 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 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).
+ */
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/os-support/shared/libc_wrapper.c b/hw/xfree86/os-support/shared/libc_wrapper.c
index e72997cc3..b6aa8fb29 100644
--- a/hw/xfree86/os-support/shared/libc_wrapper.c
+++ b/hw/xfree86/os-support/shared/libc_wrapper.c
@@ -1,6 +1,6 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c,v 1.88.2.2 2003/03/13 21:49:53 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c,v 1.102 2003/11/19 03:52:58 dawes Exp $ */
/*
- * Copyright 1997 by The XFree86 Project, Inc.
+ * 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
@@ -27,6 +27,9 @@
#undef __STRICT_ANSI__
#endif
#include <X.h>
+#ifdef __UNIXOS2__
+#define I_NEED_OS2_H
+#endif
#include <Xmd.h>
#include <Xos.h>
#include <sys/types.h>
@@ -251,6 +254,18 @@ xf86strlen(const char* s)
return (xf86size_t)strlen(s);
}
+xf86size_t
+xf86strlcat(char *dest, const char *src, xf86size_t size)
+{
+ return(strlcat(dest, src, size));
+}
+
+xf86size_t
+xf86strlcpy(char *dest, const char *src, xf86size_t size)
+{
+ return strlcpy(dest, src, size);
+}
+
char*
xf86strncat(char* dest, const char* src, xf86size_t n)
{
@@ -481,7 +496,7 @@ xf86mmap(void *start, xf86size_t length, int prot,
if (flags & XF86_MAP_FIXED) f |= MAP_FIXED;
if (flags & XF86_MAP_SHARED) f |= MAP_SHARED;
if (flags & XF86_MAP_PRIVATE) f |= MAP_PRIVATE;
-#ifdef __x86_64__
+#if defined(__AMD64__) && defined(linux)
if (flags & XF86_MAP_32BIT) f |= MAP_32BIT;
#endif
if (prot & XF86_PROT_EXEC) p |= PROT_EXEC;
@@ -655,7 +670,7 @@ static void _xf86checkhndl(XF86FILE_priv* f,const char *func)
{
if (!f || f->magic != XF86FILE_magic ||
!f->filehnd || !f->fname) {
- FatalError("libc_wrapper error: passed invalid FILE handle to %s\n",
+ FatalError("libc_wrapper error: passed invalid FILE handle to %s",
func);
exit(42);
}
@@ -1088,7 +1103,7 @@ xf86setvbuf(XF86FILE* f, char *buf, int mode, xf86size_t size)
vbufmode = _IOLBF;
break;
default:
- FatalError("libc_wrapper error: mode in setvbuf incorrect\n");
+ FatalError("libc_wrapper error: mode in setvbuf incorrect");
exit(42);
}
@@ -1298,7 +1313,7 @@ static void
_xf86checkdirhndl(XF86DIR_priv* f,const char *func)
{
if (!f || f->magic != XF86DIR_magic || !f->dir || !f->dirent) {
- FatalError("libc_wrapper error: passed invalid DIR handle to %s\n",
+ FatalError("libc_wrapper error: passed invalid DIR handle to %s",
func);
exit(42);
}
@@ -1550,8 +1565,12 @@ int
xf86finite(double x)
{
#ifndef QNX4
+#ifndef __UNIXOS2__
return(finite(x));
#else
+ return(isfinite(x));
+#endif /* __UNIXOS2__ */
+#else
/* XXX Replace this with something that really works. */
return 1;
#endif
@@ -1810,7 +1829,7 @@ xf86getpagesize()
pagesize = PAGE_SIZE;
#endif
if (pagesize == -1)
- FatalError("xf86getpagesize: Cannot determine page size\n");
+ FatalError("xf86getpagesize: Cannot determine page size");
return pagesize;
}
@@ -1859,22 +1878,18 @@ xf86GetErrno ()
-#ifdef NEED_SNPRINTF
-#include "snprintf.c"
-#endif
-
#ifdef HAVE_SYSV_IPC
int
xf86shmget(xf86key_t key, int size, int xf86shmflg)
{
- int shmflg = xf86shmflg & 0777;
+ int shmflg;
+
+ /* This copies the permissions (SHM_R, SHM_W for u, g, o). */
+ shmflg = xf86shmflg & 0777;
if (key == XF86IPC_PRIVATE) key = IPC_PRIVATE;
-
- if (xf86shmflg & XF86SHM_R) shmflg |= SHM_R;
- if (xf86shmflg & XF86SHM_W) shmflg |= SHM_W;
if (xf86shmflg & XF86IPC_CREAT) shmflg |= IPC_CREAT;
if (xf86shmflg & XF86IPC_EXCL) shmflg |= IPC_EXCL;
if (xf86shmflg & XF86IPC_NOWAIT) shmflg |= IPC_NOWAIT;
@@ -1967,7 +1982,7 @@ int
xf86setjmp(xf86jmp_buf env)
{
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
- return __sigsetjmp(env, xf86setjmp1_arg2());
+ return __sigsetjmp((void *)env, xf86setjmp1_arg2());
#else
return xf86setjmp1(env, xf86setjmp1_arg2());
#endif
@@ -1976,7 +1991,7 @@ xf86setjmp(xf86jmp_buf env)
int
xf86setjmp0(xf86jmp_buf env)
{
- FatalError("setjmp: type 0 called instead of type %d\n", xf86getjmptype());
+ FatalError("setjmp: type 0 called instead of type %d", xf86getjmptype());
}
#if !defined(__GLIBC__) || (__GLIBC__ < 2) /* libc5 */
@@ -1995,7 +2010,7 @@ xf86setjmp1(xf86jmp_buf env, int arg2)
int
xf86setjmp1(xf86jmp_buf env, int arg2)
{
- FatalError("setjmp: type 1 called instead of type %d\n", xf86getjmptype());
+ FatalError("setjmp: type 1 called instead of type %d", xf86getjmptype());
}
#endif /* HAS_GLIBC_SIGSETJMP */
@@ -2009,7 +2024,7 @@ xf86setjmp1_arg2()
int
xf86setjmperror(xf86jmp_buf env)
{
- FatalError("setjmp: don't know how to handle setjmp() type %d\n",
+ FatalError("setjmp: don't know how to handle setjmp() type %d",
xf86getjmptype());
}
diff --git a/hw/xfree86/os-support/shared/pm_noop.c b/hw/xfree86/os-support/shared/pm_noop.c
index fc02b3a20..b5f4941bc 100644
--- a/hw/xfree86/os-support/shared/pm_noop.c
+++ b/hw/xfree86/os-support/shared/pm_noop.c
@@ -1,4 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/pm_noop.c,v 1.1 2000/02/13 03:36:11 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/pm_noop.c,v 1.2 2003/08/24 17:37:06 dawes Exp $ */
+/*
+ * Copyright (c) 2000 by The XFree86 Project, 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 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).
+ */
/* Stubs for the OS-support layer power-management functions. */
diff --git a/hw/xfree86/os-support/shared/posix_tty.c b/hw/xfree86/os-support/shared/posix_tty.c
index a4f487025..1812729c0 100644
--- a/hw/xfree86/os-support/shared/posix_tty.c
+++ b/hw/xfree86/os-support/shared/posix_tty.c
@@ -1,6 +1,6 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/posix_tty.c,v 3.28 2003/02/17 15:11:59 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/posix_tty.c,v 3.30 2003/08/24 17:37:06 dawes Exp $ */
/*
- * Copyright 1993-1999 by The XFree86 Project, Inc.
+ * Copyright 1993-2003 by The XFree86 Project, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -127,12 +127,7 @@ xf86OpenSerial (pointer options)
return (-1);
}
-#ifndef Lynx
- SYSCALL (fd = open (dev, O_RDWR | O_NONBLOCK | O_EXCL));
-#else
- /* O_EXCL yields an EEXIST on LynxOS */
SYSCALL (fd = open (dev, O_RDWR | O_NONBLOCK));
-#endif
if (fd == -1)
{
xf86Msg (X_ERROR,
diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c
index 077c566a6..fbab2a517 100644
--- a/hw/xfree86/os-support/shared/sigio.c
+++ b/hw/xfree86/os-support/shared/sigio.c
@@ -1,3 +1,5 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/sigio.c,v 1.16 2003/09/04 00:21:17 dawes Exp $ */
+
/* sigio.c -- Support for SIGIO handler installation and removal
* Created: Thu Jun 3 15:39:18 1999 by faith@precisioninsight.com
*
@@ -24,12 +26,34 @@
* DEALINGS IN THE SOFTWARE.
*
* Authors: Rickard E. (Rik) Faith <faith@valinux.com>
+ */
+/*
+ * Copyright (c) 2002 by The XFree86 Project, Inc.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/sigio.c,v 1.14 2002/05/05 19:18:14 herrb Exp $
- *
+ * 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).
*/
-
#ifdef XFree86Server
# include "X.h"
# include "xf86.h"
@@ -151,6 +175,7 @@ xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure)
fprintf(stderr,"fcntl(%d, F_SETOWN): %s\n",
fd, strerror(errno));
#endif
+ xf86UnblockSIGIO(blocked);
return 0;
}
sigemptyset(&sa.sa_mask);
diff --git a/hw/xfree86/os-support/shared/sigiostubs.c b/hw/xfree86/os-support/shared/sigiostubs.c
index 0fdebda1d..51f98f2a4 100644
--- a/hw/xfree86/os-support/shared/sigiostubs.c
+++ b/hw/xfree86/os-support/shared/sigiostubs.c
@@ -1,6 +1,35 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/sigiostubs.c,v 1.2 1999/10/14 04:25:01 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/sigiostubs.c,v 1.4 2003/08/24 17:37:06 dawes Exp $ */
+/*
+ * Copyright (c) 1999-2003 by The XFree86 Project, 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 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).
+ */
#ifdef XFree86Server
+#ifdef __UNIXOS2__
+# define I_NEED_OS2_H
+#endif
# include "X.h"
# include "xf86.h"
# include "xf86drm.h"
diff --git a/hw/xfree86/os-support/shared/stdPci.c b/hw/xfree86/os-support/shared/stdPci.c
index b21acabcc..fd60ec509 100644
--- a/hw/xfree86/os-support/shared/stdPci.c
+++ b/hw/xfree86/os-support/shared/stdPci.c
@@ -1,5 +1,34 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/stdPci.c,v 3.2 1999/12/06 03:55:13 robin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/stdPci.c,v 3.4 2003/08/24 17:37:06 dawes Exp $ */
+/*
+ * Copyright (c) 1999-2003 by The XFree86 Project, 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 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).
+ */
+#ifdef __UNIXOS2__
+# define I_NEED_OS2_H
+#endif
#include "X.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/os-support/shared/stdResource.c b/hw/xfree86/os-support/shared/stdResource.c
index 5aae4ae9d..df781c371 100644
--- a/hw/xfree86/os-support/shared/stdResource.c
+++ b/hw/xfree86/os-support/shared/stdResource.c
@@ -1,7 +1,36 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/stdResource.c,v 1.20 2002/01/25 21:56:20 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/stdResource.c,v 1.22 2003/08/24 17:37:06 dawes Exp $ */
+/*
+ * Copyright (c) 1999-2003 by The XFree86 Project, 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 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).
+ */
/* Standard resource information code */
+#ifdef __UNIXOS2__
+# define I_NEED_OS2_H
+#endif
#include "X.h"
#include "xf86.h"
#include "xf86Priv.h"
@@ -11,6 +40,9 @@
#include "xf86_OSlib.h"
#include "xf86Resources.h"
+#ifdef __UNIXOS2__
+# undef ADDRESS
+#endif
/* Avoid Imakefile changes */
#include "bus/Pci.h"
diff --git a/hw/xfree86/os-support/shared/vidmem.c b/hw/xfree86/os-support/shared/vidmem.c
index 872cd7aa9..aed735680 100644
--- a/hw/xfree86/os-support/shared/vidmem.c
+++ b/hw/xfree86/os-support/shared/vidmem.c
@@ -1,9 +1,35 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/vidmem.c,v 1.15 2001/10/28 03:34:02 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/vidmem.c,v 1.17 2003/08/24 17:37:06 dawes Exp $ */
/*
- * Copyright 1993-1999 by The XFree86 Project, Inc
+ * Copyright (c) 1993-2003 by The XFree86 Project, 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 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).
*/
+
+#ifdef __UNIXOS2__
+# define I_NEED_OS2_H
+#endif
#include "X.h"
#include "input.h"
#include "scrnintstr.h"
diff --git a/hw/xfree86/os-support/shared/xf86Axp.c b/hw/xfree86/os-support/shared/xf86Axp.c
index 24d31db59..42edbc53c 100644
--- a/hw/xfree86/os-support/shared/xf86Axp.c
+++ b/hw/xfree86/os-support/shared/xf86Axp.c
@@ -1,4 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/xf86Axp.c,v 1.2 2000/11/06 21:57:11 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/shared/xf86Axp.c,v 1.3 2003/08/24 17:37:06 dawes Exp $ */
+/*
+ * Copyright (c) 2000 by The XFree86 Project, 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 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).
+ */
#include "xf86Axp.h"
diff --git a/hw/xfree86/os-support/solaris/sun_bios.c b/hw/xfree86/os-support/solaris/sun_bios.c
index d1c79888b..e93e0e9dd 100644
--- a/hw/xfree86/os-support/solaris/sun_bios.c
+++ b/hw/xfree86/os-support/solaris/sun_bios.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_bios.c,v 1.2 2001/10/28 03:34:02 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_bios.c,v 1.3 2003/11/07 13:45:27 tsi Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
@@ -71,7 +71,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
{
if (!xf86LinearVidMem())
FatalError("xf86ReadBIOS: Could not mmap BIOS"
- " [a=%x]\n", Base);
+ " [a=%lx]\n", Base);
sprintf(solx86_vtname, apertureDevName);
}
@@ -86,7 +86,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
if (ptr == MAP_FAILED)
{
xf86Msg(X_WARNING, "xf86ReadBIOS: %s mmap failed "
- "[0x%05x, 0x%04x]\n",
+ "[0x%08lx, 0x%04x]\n",
solx86_vtname, Base, mlen);
close(fd);
return -1;
diff --git a/hw/xfree86/os-support/solaris/sun_kbd.c b/hw/xfree86/os-support/solaris/sun_kbd.c
index 7e4998817..058f1109a 100644
--- a/hw/xfree86/os-support/solaris/sun_kbd.c
+++ b/hw/xfree86/os-support/solaris/sun_kbd.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_kbd.c,v 1.1 2001/05/28 02:42:31 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_kbd.c,v 1.2 2003/10/09 11:44:00 pascal Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
* Copyright 1993 by David Dawes <dawes@XFree86.org>
@@ -29,6 +29,7 @@
static int sun_otranslation = -1;
static int sun_odirect = -1;
+int sun_ktype;
int
xf86GetKbdLeds()
@@ -53,7 +54,7 @@ xf86SetKbdRepeat(char rad)
void
xf86KbdInit()
{
- int ktype, klayout;
+ int klayout;
if (xf86Info.kbdFd < 0) {
xf86Info.kbdFd = open("/dev/kbd", O_RDWR|O_NONBLOCK);
@@ -66,7 +67,7 @@ xf86KbdInit()
* broken (IMO) - DWH 8/21/99
*/
- if (ioctl(xf86Info.kbdFd, KIOCTYPE, &ktype) < 0)
+ if (ioctl(xf86Info.kbdFd, KIOCTYPE, &sun_ktype) < 0)
FatalError("Unable to determine keyboard type: %d\n", errno);
if (ioctl(xf86Info.kbdFd, KIOCLAYOUT, &klayout) < 0)
diff --git a/hw/xfree86/os-support/solaris/sun_kbdEv.c b/hw/xfree86/os-support/solaris/sun_kbdEv.c
index ff4ef3288..f6481af29 100644
--- a/hw/xfree86/os-support/solaris/sun_kbdEv.c
+++ b/hw/xfree86/os-support/solaris/sun_kbdEv.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_kbdEv.c,v 1.4 2001/11/08 04:15:33 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_kbdEv.c,v 1.6 2003/10/09 11:44:00 pascal Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
* Copyright 1993 by David Dawes <dawes@xfree86.org>
@@ -41,8 +41,11 @@
#endif
#include <sys/vuid_event.h>
+#include <sys/kbd.h>
#include "atKeynames.h"
+extern int sun_ktype;
+
#ifdef XKB
extern Bool noXkbExtension;
#endif
@@ -105,7 +108,7 @@ static OsTimerPtr sunTimer = NULL;
* type.
*/
static unsigned char map[256] = {
-#if defined(i368) || defined(__i386) || defined(__i386__)
+#if defined(i386) || defined(__i386) || defined(__i386__)
KEY_NOTUSED, /* 0 */
KEY_Tilde, /* 1 */
KEY_1, /* 2 */
@@ -374,6 +377,248 @@ static unsigned char map[256] = {
/* The rest default to KEY_UNKNOWN */
};
+#if defined(KB_USB)
+static unsigned char usbmap[256] = {
+/*
+ * partially taken from ../bsd/bsd_KbdMap.c
+ *
+ * added keycodes for Sun special keys (left function keys, audio control)
+ */
+ /* 0 */ KEY_NOTUSED,
+ /* 1 */ KEY_NOTUSED,
+ /* 2 */ KEY_NOTUSED,
+ /* 3 */ KEY_NOTUSED,
+ /* 4 */ KEY_A,
+ /* 5 */ KEY_B,
+ /* 6 */ KEY_C,
+ /* 7 */ KEY_D,
+ /* 8 */ KEY_E,
+ /* 9 */ KEY_F,
+ /* 10 */ KEY_G,
+ /* 11 */ KEY_H,
+ /* 12 */ KEY_I,
+ /* 13 */ KEY_J,
+ /* 14 */ KEY_K,
+ /* 15 */ KEY_L,
+ /* 16 */ KEY_M,
+ /* 17 */ KEY_N,
+ /* 18 */ KEY_O,
+ /* 19 */ KEY_P,
+ /* 20 */ KEY_Q,
+ /* 21 */ KEY_R,
+ /* 22 */ KEY_S,
+ /* 23 */ KEY_T,
+ /* 24 */ KEY_U,
+ /* 25 */ KEY_V,
+ /* 26 */ KEY_W,
+ /* 27 */ KEY_X,
+ /* 28 */ KEY_Y,
+ /* 29 */ KEY_Z,
+ /* 30 */ KEY_1, /* 1 !*/
+ /* 31 */ KEY_2, /* 2 @ */
+ /* 32 */ KEY_3, /* 3 # */
+ /* 33 */ KEY_4, /* 4 $ */
+ /* 34 */ KEY_5, /* 5 % */
+ /* 35 */ KEY_6, /* 6 ^ */
+ /* 36 */ KEY_7, /* 7 & */
+ /* 37 */ KEY_8, /* 8 * */
+ /* 38 */ KEY_9, /* 9 ( */
+ /* 39 */ KEY_0, /* 0 ) */
+ /* 40 */ KEY_Enter, /* Return */
+ /* 41 */ KEY_Escape, /* Escape */
+ /* 42 */ KEY_BackSpace, /* Backspace Delete */
+ /* 43 */ KEY_Tab, /* Tab */
+ /* 44 */ KEY_Space, /* Space */
+ /* 45 */ KEY_Minus, /* - _ */
+ /* 46 */ KEY_Equal, /* = + */
+ /* 47 */ KEY_LBrace, /* [ { */
+ /* 48 */ KEY_RBrace, /* ] } */
+ /* 49 */ KEY_BSlash, /* \ | */
+ /* 50 */ KEY_BSlash, /* \ _ # ~ on some keyboards */
+ /* 51 */ KEY_SemiColon, /* ; : */
+ /* 52 */ KEY_Quote, /* ' " */
+ /* 53 */ KEY_Tilde, /* ` ~ */
+ /* 54 */ KEY_Comma, /* , < */
+ /* 55 */ KEY_Period, /* . > */
+ /* 56 */ KEY_Slash, /* / ? */
+ /* 57 */ KEY_CapsLock, /* Caps Lock */
+ /* 58 */ KEY_F1, /* F1 */
+ /* 59 */ KEY_F2, /* F2 */
+ /* 60 */ KEY_F3, /* F3 */
+ /* 61 */ KEY_F4, /* F4 */
+ /* 62 */ KEY_F5, /* F5 */
+ /* 63 */ KEY_F6, /* F6 */
+ /* 64 */ KEY_F7, /* F7 */
+ /* 65 */ KEY_F8, /* F8 */
+ /* 66 */ KEY_F9, /* F9 */
+ /* 67 */ KEY_F10, /* F10 */
+ /* 68 */ KEY_F11, /* F11 */
+ /* 69 */ KEY_F12, /* F12 */
+ /* 70 */ KEY_Print, /* PrintScrn SysReq */
+ /* 71 */ KEY_ScrollLock, /* Scroll Lock */
+ /* 72 */ KEY_Pause, /* Pause Break */
+ /* 73 */ KEY_Insert, /* Insert XXX Help on some Mac Keyboards */
+ /* 74 */ KEY_Home, /* Home */
+ /* 75 */ KEY_PgUp, /* Page Up */
+ /* 76 */ KEY_Delete, /* Delete */
+ /* 77 */ KEY_End, /* End */
+ /* 78 */ KEY_PgDown, /* Page Down */
+ /* 79 */ KEY_Right, /* Right Arrow */
+ /* 80 */ KEY_Left, /* Left Arrow */
+ /* 81 */ KEY_Down, /* Down Arrow */
+ /* 82 */ KEY_Up, /* Up Arrow */
+ /* 83 */ KEY_NumLock, /* Num Lock */
+ /* 84 */ KEY_KP_Divide, /* Keypad / */
+ /* 85 */ KEY_KP_Multiply, /* Keypad * */
+ /* 86 */ KEY_KP_Minus, /* Keypad - */
+ /* 87 */ KEY_KP_Plus, /* Keypad + */
+ /* 88 */ KEY_KP_Enter, /* Keypad Enter */
+ /* 89 */ KEY_KP_1, /* Keypad 1 End */
+ /* 90 */ KEY_KP_2, /* Keypad 2 Down */
+ /* 91 */ KEY_KP_3, /* Keypad 3 Pg Down */
+ /* 92 */ KEY_KP_4, /* Keypad 4 Left */
+ /* 93 */ KEY_KP_5, /* Keypad 5 */
+ /* 94 */ KEY_KP_6, /* Keypad 6 */
+ /* 95 */ KEY_KP_7, /* Keypad 7 Home */
+ /* 96 */ KEY_KP_8, /* Keypad 8 Up */
+ /* 97 */ KEY_KP_9, /* KEypad 9 Pg Up */
+ /* 98 */ KEY_KP_0, /* Keypad 0 Ins */
+ /* 99 */ KEY_KP_Decimal, /* Keypad . Del */
+ /* 100 */ KEY_Less, /* < > on some keyboards */
+ /* 101 */ KEY_Menu, /* Menu */
+ /* 102 */ KEY_Power, /* Sun: Power */
+ /* 103 */ KEY_KP_Equal, /* Keypad = on Mac keyboards */
+ /* 104 */ KEY_NOTUSED,
+ /* 105 */ KEY_NOTUSED,
+ /* 106 */ KEY_NOTUSED,
+ /* 107 */ KEY_NOTUSED,
+ /* 108 */ KEY_NOTUSED,
+ /* 109 */ KEY_NOTUSED,
+ /* 110 */ KEY_NOTUSED,
+ /* 111 */ KEY_NOTUSED,
+ /* 112 */ KEY_NOTUSED,
+ /* 113 */ KEY_NOTUSED,
+ /* 114 */ KEY_NOTUSED,
+ /* 115 */ KEY_NOTUSED,
+ /* 116 */ KEY_L7, /* Sun: Open */
+ /* 117 */ KEY_Help, /* Sun: Help */
+ /* 118 */ KEY_L3, /* Sun: Props */
+ /* 119 */ KEY_L5, /* Sun: Front */
+ /* 120 */ KEY_L1, /* Sun: Stop */
+ /* 121 */ KEY_L2, /* Sun: Again */
+ /* 122 */ KEY_L4, /* Sun: Undo */
+ /* 123 */ KEY_L10, /* Sun: Cut */
+ /* 124 */ KEY_L6, /* Sun: Copy */
+ /* 125 */ KEY_L8, /* Sun: Paste */
+ /* 126 */ KEY_L9, /* Sun: Find */
+ /* 127 */ KEY_Mute, /* Sun: AudioMute */
+ /* 128 */ KEY_AudioRaise, /* Sun: AudioRaise */
+ /* 129 */ KEY_AudioLower, /* Sun: AudioLower */
+ /* 130 */ KEY_NOTUSED,
+ /* 131 */ KEY_NOTUSED,
+ /* 132 */ KEY_NOTUSED,
+ /* 133 */ KEY_NOTUSED,
+ /* 134 */ KEY_NOTUSED,
+ /* 135 */ KEY_NOTUSED,
+ /* 136 */ KEY_NOTUSED,
+ /* 137 */ KEY_NOTUSED,
+ /* 138 */ KEY_NOTUSED,
+ /* 139 */ KEY_NOTUSED,
+ /* 140 */ KEY_NOTUSED,
+ /* 141 */ KEY_NOTUSED,
+ /* 142 */ KEY_NOTUSED,
+ /* 143 */ KEY_NOTUSED,
+ /* 144 */ KEY_NOTUSED,
+ /* 145 */ KEY_NOTUSED,
+ /* 146 */ KEY_NOTUSED,
+ /* 147 */ KEY_NOTUSED,
+ /* 148 */ KEY_NOTUSED,
+ /* 149 */ KEY_NOTUSED,
+ /* 150 */ KEY_NOTUSED,
+ /* 151 */ KEY_NOTUSED,
+ /* 152 */ KEY_NOTUSED,
+ /* 153 */ KEY_NOTUSED,
+ /* 154 */ KEY_NOTUSED,
+ /* 155 */ KEY_NOTUSED,
+ /* 156 */ KEY_NOTUSED,
+ /* 157 */ KEY_NOTUSED,
+ /* 158 */ KEY_NOTUSED,
+ /* 159 */ KEY_NOTUSED,
+ /* 160 */ KEY_NOTUSED,
+ /* 161 */ KEY_NOTUSED,
+ /* 162 */ KEY_NOTUSED,
+ /* 163 */ KEY_NOTUSED,
+ /* 164 */ KEY_NOTUSED,
+ /* 165 */ KEY_NOTUSED,
+ /* 166 */ KEY_NOTUSED,
+ /* 167 */ KEY_NOTUSED,
+ /* 168 */ KEY_NOTUSED,
+ /* 169 */ KEY_NOTUSED,
+ /* 170 */ KEY_NOTUSED,
+ /* 171 */ KEY_NOTUSED,
+ /* 172 */ KEY_NOTUSED,
+ /* 173 */ KEY_NOTUSED,
+ /* 174 */ KEY_NOTUSED,
+ /* 175 */ KEY_NOTUSED,
+ /* 176 */ KEY_NOTUSED,
+ /* 177 */ KEY_NOTUSED,
+ /* 178 */ KEY_NOTUSED,
+ /* 179 */ KEY_NOTUSED,
+ /* 180 */ KEY_NOTUSED,
+ /* 181 */ KEY_NOTUSED,
+ /* 182 */ KEY_NOTUSED,
+ /* 183 */ KEY_NOTUSED,
+ /* 184 */ KEY_NOTUSED,
+ /* 185 */ KEY_NOTUSED,
+ /* 186 */ KEY_NOTUSED,
+ /* 187 */ KEY_NOTUSED,
+ /* 188 */ KEY_NOTUSED,
+ /* 189 */ KEY_NOTUSED,
+ /* 190 */ KEY_NOTUSED,
+ /* 191 */ KEY_NOTUSED,
+ /* 192 */ KEY_NOTUSED,
+ /* 193 */ KEY_NOTUSED,
+ /* 194 */ KEY_NOTUSED,
+ /* 195 */ KEY_NOTUSED,
+ /* 196 */ KEY_NOTUSED,
+ /* 197 */ KEY_NOTUSED,
+ /* 198 */ KEY_NOTUSED,
+ /* 199 */ KEY_NOTUSED,
+ /* 200 */ KEY_NOTUSED,
+ /* 201 */ KEY_NOTUSED,
+ /* 202 */ KEY_NOTUSED,
+ /* 203 */ KEY_NOTUSED,
+ /* 204 */ KEY_NOTUSED,
+ /* 205 */ KEY_NOTUSED,
+ /* 206 */ KEY_NOTUSED,
+ /* 207 */ KEY_NOTUSED,
+ /* 208 */ KEY_NOTUSED,
+ /* 209 */ KEY_NOTUSED,
+ /* 210 */ KEY_NOTUSED,
+ /* 211 */ KEY_NOTUSED,
+ /* 212 */ KEY_NOTUSED,
+ /* 213 */ KEY_NOTUSED,
+ /* 214 */ KEY_NOTUSED,
+ /* 215 */ KEY_NOTUSED,
+ /* 216 */ KEY_NOTUSED,
+ /* 217 */ KEY_NOTUSED,
+ /* 218 */ KEY_NOTUSED,
+ /* 219 */ KEY_NOTUSED,
+ /* 220 */ KEY_NOTUSED,
+ /* 221 */ KEY_NOTUSED,
+ /* 222 */ KEY_NOTUSED,
+ /* 223 */ KEY_NOTUSED,
+ /* 224 */ KEY_LCtrl, /* Left Control */
+ /* 225 */ KEY_ShiftL, /* Left Shift */
+ /* 226 */ KEY_Alt, /* Left Alt */
+ /* 227 */ KEY_LMeta, /* Left Meta */
+ /* 228 */ KEY_RCtrl, /* Right Control */
+ /* 229 */ KEY_ShiftR, /* Right Shift */
+ /* 230 */ KEY_AltLang, /* Right Alt, AKA AltGr */
+ /* 231 */ KEY_RMeta, /* Right Meta */
+};
+
+#endif /* KB_USB */
/*
* sunPostKbdEvent --
* Translate the raw hardware Firm_event into an XEvent, and tell DIX
@@ -404,7 +649,12 @@ sunPostKbdEvent(Firm_event *event)
* and now get some special keysequences
*/
- keycode = map[event->id];
+#if defined(KB_USB)
+ if(sun_ktype == KB_USB)
+ keycode = usbmap[event->id];
+ else
+#endif
+ keycode = map[event->id];
if ((ModifierDown(ControlMask | AltMask)) ||
(ModifierDown(ControlMask | AltLangMask)))
diff --git a/hw/xfree86/os-support/sysv/sysv_video.c b/hw/xfree86/os-support/sysv/sysv_video.c
index ab604e95a..c0460f524 100644
--- a/hw/xfree86/os-support/sysv/sysv_video.c
+++ b/hw/xfree86/os-support/sysv/sysv_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sysv/sysv_video.c,v 3.20 2000/10/28 01:42:29 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sysv/sysv_video.c,v 3.21 2003/03/14 13:46:08 tsi Exp $ */
/*
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
@@ -144,13 +144,16 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
int fd;
#if defined(SVR4)
- if ((fd = open(DEV_MEM, O_RDWR)) < 0)
+ fd = open(DEV_MEM, (flags & VIDMEM_READONLY) ? O_RDONLY : O_RDWR);
+ if (fd < 0)
{
FatalError("xf86MapVidMem: failed to open %s (%s)\n",
DEV_MEM, strerror(errno));
}
- base = mmap((caddr_t)0, Size, PROT_READ|PROT_WRITE,
- MAP_SHARED, fd, (off_t)Base);
+ base = mmap((caddr_t)0, Size,
+ (flags & VIDMEM_READONLY) ?
+ PROT_READ : (PROT_READ | PROT_WRITE),
+ MAP_SHARED, fd, (off_t)Base);
close(fd);
if (base == MAP_FAILED)
{
diff --git a/hw/xfree86/os-support/xf86OSKbd.h b/hw/xfree86/os-support/xf86OSKbd.h
index e63d7759c..917b11526 100644
--- a/hw/xfree86/os-support/xf86OSKbd.h
+++ b/hw/xfree86/os-support/xf86OSKbd.h
@@ -1,7 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86OSKbd.h,v 1.3 2003/02/17 15:11:55 dawes Exp $ */
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86OSKbd.h,v 1.6 2003/11/03 05:11:51 tsi Exp $ */
/*
- * Copyright (c) 2002 by The XFree86 Project, Inc.
+ * Copyright (c) 2002-2003 by The XFree86 Project, 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 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).
+ *
* Author: Ivan Pascal.
*/
@@ -81,7 +104,7 @@ typedef enum {
PROT_XQUEUE,
PROT_WSCONS,
PROT_USB,
- PROT_UNKNOWN
+ PROT_UNKNOWN_KBD
} KbdProtocolId;
typedef struct {
@@ -90,3 +113,21 @@ typedef struct {
} KbdProtocolRec;
Bool xf86OSKbdPreInit(InputInfoPtr pInfo);
+
+/* Adjust this when the kbd interface changes. */
+
+/*
+ * History:
+ *
+ * 1.0.0 - Initial version.
+ */
+
+#define OS_KBD_VERSION_MAJOR 1
+#define OS_KBD_VERSION_MINOR 0
+#define OS_KBD_VERSION_PATCH 0
+
+#define OS_KBD_VERSION_CURRENT \
+ BUILTIN_INTERFACE_VERSION_NUMERIC(OS_KBD_VERSION_MAJOR, \
+ OS_KBD_VERSION_MINOR, \
+ OS_KBD_VERSION_PATCH)
+
diff --git a/hw/xfree86/os-support/xf86OSmouse.h b/hw/xfree86/os-support/xf86OSmouse.h
index a4486b987..ee6313a3b 100644
--- a/hw/xfree86/os-support/xf86OSmouse.h
+++ b/hw/xfree86/os-support/xf86OSmouse.h
@@ -1,7 +1,29 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86OSmouse.h,v 1.20 2002/12/17 20:55:23 dawes Exp $ */
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86OSmouse.h,v 1.24 2003/11/03 05:11:51 tsi Exp $ */
/*
- * Copyright (c) 1997-1999 by The XFree86 Project, Inc.
+ * Copyright (c) 1999-2003 by The XFree86 Project, 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 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).
*/
/* Public interface to OS-specific mouse support. */
@@ -22,6 +44,36 @@
* specific protocol names that are
* supported for this class. */
+/* Mouse Protocol IDs. */
+typedef enum {
+ PROT_UNKNOWN = -2,
+ PROT_UNSUP = -1, /* protocol is not supported */
+ PROT_MS = 0,
+ PROT_MSC,
+ PROT_MM,
+ PROT_LOGI,
+ PROT_LOGIMAN,
+ PROT_MMHIT,
+ PROT_GLIDE,
+ PROT_IMSERIAL,
+ PROT_THINKING,
+ PROT_ACECAD,
+ PROT_VALUMOUSESCROLL,
+ PROT_PS2,
+ PROT_GENPS2,
+ PROT_IMPS2,
+ PROT_EXPPS2,
+ PROT_THINKPS2,
+ PROT_MMPS2,
+ PROT_GLIDEPS2,
+ PROT_NETPS2,
+ PROT_NETSCPS2,
+ PROT_BM,
+ PROT_AUTO,
+ PROT_SYSMOUSE,
+ PROT_NUMPROTOS /* This must always be last. */
+} MouseProtocolID;
+
struct _MouseDevRec;
typedef int (*GetInterfaceTypesProc)(void);
@@ -33,10 +85,9 @@ typedef const char *(*DefaultProtocolProc)(void);
typedef const char *(*SetupAutoProc)(InputInfoPtr pInfo, int *protoPara);
typedef void (*SetResProc)(InputInfoPtr pInfo, const char* protocol, int rate,
int res);
-typedef void (*checkMovementsProc)(InputInfoPtr,int, int);
-typedef void (*autoProbeProc)(InputInfoPtr, Bool, Bool);
-typedef Bool (*collectDataProc)(struct _MouseDevRec *, unsigned char);
-typedef Bool (*dataGoodProc)(struct _MouseDevRec *);
+typedef const char *(*FindDeviceProc)(InputInfoPtr pInfo, const char *protocol,
+ int flags);
+typedef const char *(*GuessProtocolProc)(InputInfoPtr pInfo, int flags);
/*
* OSMouseInfoRec is used to pass information from the OSMouse layer to the
@@ -52,6 +103,8 @@ typedef struct {
SetResProc SetPS2Res;
SetResProc SetBMRes;
SetResProc SetMiscRes;
+ FindDeviceProc FindDevice;
+ GuessProtocolProc GuessProtocol;
} OSMouseInfoRec, *OSMouseInfoPtr;
/*
@@ -78,7 +131,11 @@ typedef struct {
* auto-detection. It returns the name of the detected protocol,
* or NULL when detection fails. It may also adjust one or more
* of the "protoPara" values for the detected protocol by setting
- * then to something other than -1.
+ * then to something other than -1. SetupAuto gets called in two
+ * ways. The first is before any devices have been opened. This
+ * can be used when the protocol "Auto" always maps to a single
+ * protocol type. The second is with the device open, allowing
+ * OS-specific probing to be done.
*
* SetPS2Res: Set the resolution and sample rate for MSE_PS2 and MSE_XPS2
* protocol types.
@@ -86,15 +143,62 @@ typedef struct {
* SetBMRes: Set the resolution and sample rate for MSE_BM protocol types.
*
* SetMiscRes: Set the resolution and sample rate for MSE_MISC protocol types.
+ *
+ * FindDevice: This function gets called when no Device has been specified
+ * in the config file. OS-specific methods may be used to guess
+ * which input device to use. This function is called after the
+ * pre-open attempts at protocol discovery are done, but before
+ * the device is open. I.e., after the first SetupAuto() call,
+ * after the DefaultProtocol() call, but before the PreInit()
+ * call. Available protocol information may be used in locating
+ * the default input device.
+ *
+ * GuessProtocol: A last resort attempt at guessing the mouse protocol by
+ * whatever OS-specific means might be available. OS-independent
+ * things should be in the mouse driver. This function gets
+ * called after the mouse driver's OS-independent methods have
+ * failed.
*/
extern OSMouseInfoPtr xf86OSMouseInit(int flags);
+/* Adjust this when the mouse interface changes. */
+
+/*
+ * History:
+ *
+ * 1.0.0 - Everything up to when versioning was started.
+ * 1.1.0 - FindDevice and GuessProtocol added to OSMouseInfoRec
+ *
+ */
+
+#define OS_MOUSE_VERSION_MAJOR 1
+#define OS_MOUSE_VERSION_MINOR 1
+#define OS_MOUSE_VERSION_PATCH 0
+
+#define OS_MOUSE_VERSION_CURRENT \
+ BUILTIN_INTERFACE_VERSION_NUMERIC(OS_MOUSE_VERSION_MAJOR, \
+ OS_MOUSE_VERSION_MINOR, \
+ OS_MOUSE_VERSION_PATCH)
+
+#define HAVE_GUESS_PROTOCOL \
+ (xf86GetBuiltinInterfaceVersion(BUILTIN_IF_OSMOUSE, 0) >= \
+ BUILTIN_INTERFACE_VERSION_NUMERIC(1, 1, 0))
+
+#define HAVE_FIND_DEVICE \
+ (xf86GetBuiltinInterfaceVersion(BUILTIN_IF_OSMOUSE, 0) >= \
+ BUILTIN_INTERFACE_VERSION_NUMERIC(1, 1, 0))
+
/*
* Mouse device record. This is shared by the mouse driver and the OSMouse
* layer.
*/
+typedef void (*checkMovementsProc)(InputInfoPtr,int, int);
+typedef void (*autoProbeProc)(InputInfoPtr, Bool, Bool);
+typedef Bool (*collectDataProc)(struct _MouseDevRec *, unsigned char);
+typedef Bool (*dataGoodProc)(struct _MouseDevRec *);
+
typedef void (*PostMseEventProc)(InputInfoPtr pInfo, int buttons,
int dx, int dy, int dz, int dw);
typedef void (*MouseCommonOptProc)(InputInfoPtr pInfo);
@@ -106,8 +210,8 @@ typedef struct _MouseDevRec {
DeviceIntPtr device;
const char * mseDevice;
const char * protocol;
- int protocolID;
- int oldProtocolID; /* hack */
+ MouseProtocolID protocolID;
+ MouseProtocolID oldProtocolID; /* hack */
int class;
int mseModel;
int baudRate;
diff --git a/hw/xfree86/os-support/xf86OSpriv.h b/hw/xfree86/os-support/xf86OSpriv.h
index c3224aeeb..865738c40 100644
--- a/hw/xfree86/os-support/xf86OSpriv.h
+++ b/hw/xfree86/os-support/xf86OSpriv.h
@@ -1,4 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86OSpriv.h,v 1.5 2000/10/28 01:42:24 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86OSpriv.h,v 1.6 2003/08/24 17:37:03 dawes Exp $ */
+/*
+ * Copyright (c) 1999-2000 by The XFree86 Project, 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 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).
+ */
#ifndef _XF86OSPRIV_H
#define _XF86OSPRIV_H
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index b35186724..4d3205eb4 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h,v 3.90 2002/05/31 18:46:00 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h,v 3.95 2003/11/17 22:20:40 dawes Exp $ */
/*
* Copyright 1990, 1991 by Thomas Roell, Dinkelscherben, Germany
* Copyright 1992 by David Dawes <dawes@XFree86.org>
@@ -10,7 +10,7 @@
* Copyright 1993 by David Wexelblat <dwex@XFree86.org>
* Copyright 1994, 1996 by Holger Veit <Holger.Veit@gmd.de>
* Copyright 1997 by Takis Psarogiannakopoulos <takis@dpmms.cam.ac.uk>
- * Copyright 1994-1998 by The XFree86 Project, Inc
+ * 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
@@ -92,10 +92,6 @@ extern int xf86getpagesize(void);
extern int xf86GetErrno(void);
typedef unsigned long xf86size_t;
typedef signed long xf86ssize_t;
-#ifdef NEED_SNPRINTF
-extern int snprintf(char *str, size_t size, const char *format, ...);
-extern int vsnprintf(char *str, size_t size, const char *format, va_list ap);
-#endif
#endif
#include <stdio.h>
@@ -106,7 +102,7 @@ extern int vsnprintf(char *str, size_t size, const char *format, va_list ap);
/* SYSV386 (SVR3, SVR4) - But not Solaris8 */
/**************************************************************************/
#if (defined(SYSV) || defined(SVR4)) && \
- !defined(DGUX) && \
+ !defined(DGUX) && !defined(sgi) && \
!defined(__SOL8__) && \
(!defined(sun) || defined(i386))
# ifdef SCO325
@@ -180,11 +176,11 @@ extern int vsnprintf(char *str, size_t size, const char *format, va_list ap);
# if defined(SCO)
# include <sys/vtkd.h>
# include <sys/console.h>
-# include <sys/keyboard.h>
+# include <sys/scankbd.h>
# include <sys/vid.h>
-# define LED_CAP 0x01
-# define LED_NUM 0x02
-# define LED_SCR 0x04
+# define LED_CAP CLKED
+# define LED_NUM NLKED
+# define LED_SCR SLKED
# elif defined(HAS_USL_VTS)
# include <sys/at_ansi.h>
# include <sys/kd.h>
@@ -675,6 +671,17 @@ extern char* __XOS2RedirRoot(char*);
#endif /* __GNU__ */
/**************************************************************************/
+/* IRIX */
+/**************************************************************************/
+#if defined(sgi)
+
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#endif
+
+/**************************************************************************/
/* Generic */
/**************************************************************************/
@@ -721,9 +728,7 @@ extern int sys_nerr;
#if defined(ISC) || defined(Lynx)
#define rint(x) RInt(x)
double RInt(
-#if NeedFunctionPrototypes
double x
-#endif
);
#endif
diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
index 4f067d5e0..09d3f2861 100644
--- a/hw/xfree86/os-support/xf86_OSproc.h
+++ b/hw/xfree86/os-support/xf86_OSproc.h
@@ -8,7 +8,7 @@
* Copyright 1993 by Vrije Universiteit, The Netherlands
* Copyright 1993 by David Wexelblat <dwex@XFree86.org>
* Copyright 1994, 1996 by Holger Veit <Holger.Veit@gmd.de>
- * Copyright 1994-1999 by The XFree86 Project, Inc
+ * 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
@@ -64,7 +64,7 @@
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h,v 3.55 2002/01/25 21:56:17 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h,v 3.57 2003/10/07 23:14:54 herrb Exp $ */
#ifndef _XF86_OSPROC_H
#define _XF86_OSPROC_H
@@ -125,6 +125,7 @@ extern void xf86WrapperInit(void);
#define xf86FatalError(a, b) \
if (dispatchException & DE_TERMINATE) { \
ErrorF(a, b); \
+ ErrorF("\n"); \
return; \
} else FatalError(a, b)
diff --git a/hw/xfree86/os-support/xf86_ansic.h b/hw/xfree86/os-support/xf86_ansic.h
index 03fa33417..733a5543d 100644
--- a/hw/xfree86/os-support/xf86_ansic.h
+++ b/hw/xfree86/os-support/xf86_ansic.h
@@ -1,5 +1,6 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h,v 3.53 2003/10/28 18:36:37 tsi Exp $ */
/*
- * Copyright 1997-2000 by The XFree86 Project, Inc
+ * 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
@@ -22,8 +23,6 @@
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h,v 3.49.2.1 2003/03/13 04:10:49 tsi Exp $ */
-
#ifndef _XF86_ANSIC_H
#define _XF86_ANSIC_H
@@ -240,6 +239,8 @@ extern int xf86strcasecmp(const char*,const char*);
extern char* xf86strcpy(char*,const char*);
extern xf86size_t xf86strcspn(const char*,const char*);
extern char* xf86strerror(int);
+extern xf86size_t xf86strlcat(char*,const char*,xf86size_t);
+extern xf86size_t xf86strlcpy(char*,const char*,xf86size_t);
extern xf86size_t xf86strlen(const char*);
extern char* xf86strncat(char *, const char *, xf86size_t);
extern int xf86strncmp(const char*,const char*,xf86size_t);
diff --git a/hw/xfree86/os-support/xf86_libc.h b/hw/xfree86/os-support/xf86_libc.h
index b97599ed5..61eb93d8b 100644
--- a/hw/xfree86/os-support/xf86_libc.h
+++ b/hw/xfree86/os-support/xf86_libc.h
@@ -1,6 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h,v 3.56 2003/02/22 06:00:39 dawes Exp $ */
-
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h,v 3.60 2003/10/26 12:17:17 herrb Exp $ */
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
/*
* This file is an attempt to make developing code for the new loadable module
@@ -71,7 +95,11 @@ struct xf86stat {
typedef int xf86key_t;
/* setjmp/longjmp */
+#if defined(__ia64__)
+typedef int xf86jmp_buf[1024] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */
+#else
typedef int xf86jmp_buf[1024];
+#endif
/* for setvbuf */
#define XF86_IONBF 1
@@ -348,6 +376,10 @@ typedef int xf86jmp_buf[1024];
#define strcspn(ccp1,ccp2) xf86strcspn(ccp1,ccp2)
#undef strerror
#define strerror(i) xf86strerror(i)
+#undef strlcat
+#define strlcat(cp,ccp,I) xf86strlcat(cp,ccp,I)
+#undef strlcpy
+#define strlcpy(cp,ccp,I) xf86strlcpy(cp,ccp,I)
#undef strlen
#define strlen(ccp) xf86strlen(ccp)
#undef strncmp
@@ -385,11 +417,11 @@ typedef int xf86jmp_buf[1024];
#undef ungetc
#define ungetc(i,FP) xf86ungetc(i,FP)
#undef vfprinf
-#define vfprintf xf86vfprintf
+#define vfprintf(p,f,a) xf86vfprintf(p,f,a)
#undef vsnprintf
-#define vsnprintf xf86vsnprintf
+#define vsnprintf(s,n,f,a) xf86vsnprintf(s,n,f,a)
#undef vsprintf
-#define vsprintf xf86vsprintf
+#define vsprintf(s,f,a) xf86vsprintf(s,f,a)
/* XXX Disable assert as if NDEBUG was defined */
/* Some X headers defined this away too */
#undef assert
diff --git a/hw/xfree86/parser/Configint.h b/hw/xfree86/parser/Configint.h
index 43605dac3..1659d1be4 100644
--- a/hw/xfree86/parser/Configint.h
+++ b/hw/xfree86/parser/Configint.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Configint.h,v 1.20 2002/03/04 16:11:06 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Configint.h,v 1.21 2003/08/24 17:37:07 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2002 by The XFree86 Project, 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 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).
+ */
+
/*
* These definitions are used through out the configuration file parser, but
diff --git a/hw/xfree86/parser/Device.c b/hw/xfree86/parser/Device.c
index e929641c9..9bfe4d1b9 100644
--- a/hw/xfree86/parser/Device.c
+++ b/hw/xfree86/parser/Device.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Device.c,v 1.26 2003/01/04 20:20:22 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Device.c,v 1.27 2003/08/24 17:37:07 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
/* View/edit this file with tab stops set to 4 */
diff --git a/hw/xfree86/parser/Files.c b/hw/xfree86/parser/Files.c
index 4be58b512..816a16c94 100644
--- a/hw/xfree86/parser/Files.c
+++ b/hw/xfree86/parser/Files.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Files.c,v 1.15 2003/01/04 20:20:22 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Files.c,v 1.16 2003/08/24 17:37:07 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
/* View/edit this file with tab stops set to 4 */
diff --git a/hw/xfree86/parser/Flags.c b/hw/xfree86/parser/Flags.c
index dfd3ab0bd..e6326a74e 100644
--- a/hw/xfree86/parser/Flags.c
+++ b/hw/xfree86/parser/Flags.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Flags.c,v 1.22 2003/01/04 20:20:22 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Flags.c,v 1.23 2003/08/24 17:37:07 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
/* View/edit this file with tab stops set to 4 */
diff --git a/hw/xfree86/parser/Input.c b/hw/xfree86/parser/Input.c
index f5387b384..6e38bdd15 100644
--- a/hw/xfree86/parser/Input.c
+++ b/hw/xfree86/parser/Input.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Input.c,v 1.13 2003/01/04 20:20:22 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Input.c,v 1.14 2003/08/24 17:37:07 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
/* View/edit this file with tab stops set to 4 */
diff --git a/hw/xfree86/parser/Keyboard.c b/hw/xfree86/parser/Keyboard.c
index 68cbaf3c0..cca3ce412 100644
--- a/hw/xfree86/parser/Keyboard.c
+++ b/hw/xfree86/parser/Keyboard.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Keyboard.c,v 1.15 2003/01/04 20:20:22 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Keyboard.c,v 1.17 2003/08/24 17:37:07 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
/* View/edit this file with tab stops set to 4 */
@@ -101,8 +128,8 @@ xf86parseKeyboardSection (void)
if (xf86getSubToken (&(ptr->inp_comment)) != STRING)
Error (QUOTE_MSG, "Protocol");
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
- xf86configStrdup("Protocol"),
- val.str);
+ xf86configStrdup("Protocol"),
+ val.str);
break;
case AUTOREPEAT:
if (xf86getSubToken (&(ptr->inp_comment)) != NUMBER)
@@ -117,7 +144,7 @@ xf86parseKeyboardSection (void)
xf86conffree(s1);
xf86conffree(s2);
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
- xf86configStrdup("AutoRepeat"), s);
+ xf86configStrdup("AutoRepeat"), s);
break;
case XLEDS:
if (xf86getSubToken (&(ptr->inp_comment)) != NUMBER)
diff --git a/hw/xfree86/parser/Layout.c b/hw/xfree86/parser/Layout.c
index cd351c9c6..9907d29c8 100644
--- a/hw/xfree86/parser/Layout.c
+++ b/hw/xfree86/parser/Layout.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Layout.c,v 1.23 2003/01/04 20:20:23 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Layout.c,v 1.24 2003/08/24 17:37:07 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
/* View/edit this file with tab stops set to 4 */
diff --git a/hw/xfree86/parser/Module.c b/hw/xfree86/parser/Module.c
index 1d61da9a6..33b591d88 100644
--- a/hw/xfree86/parser/Module.c
+++ b/hw/xfree86/parser/Module.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Module.c,v 1.11 2003/01/04 20:20:23 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Module.c,v 1.12 2003/08/24 17:37:08 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
/* View/edit this file with tab stops set to 4 */
diff --git a/hw/xfree86/parser/Monitor.c b/hw/xfree86/parser/Monitor.c
index 939b621ea..942b199d2 100644
--- a/hw/xfree86/parser/Monitor.c
+++ b/hw/xfree86/parser/Monitor.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Monitor.c,v 1.27 2003/01/04 20:20:23 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Monitor.c,v 1.28 2003/08/24 17:37:08 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
/* View/edit this file with tab stops set to 4 */
diff --git a/hw/xfree86/parser/Pointer.c b/hw/xfree86/parser/Pointer.c
index fac4260a4..8b373c562 100644
--- a/hw/xfree86/parser/Pointer.c
+++ b/hw/xfree86/parser/Pointer.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Pointer.c,v 1.12 2003/01/04 20:20:23 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Pointer.c,v 1.13 2003/08/24 17:37:08 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
/* View/edit this file with tab stops set to 4 */
diff --git a/hw/xfree86/parser/Screen.c b/hw/xfree86/parser/Screen.c
index af8c407a9..e3bf18048 100644
--- a/hw/xfree86/parser/Screen.c
+++ b/hw/xfree86/parser/Screen.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Screen.c,v 1.24 2003/01/04 20:20:23 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Screen.c,v 1.28 2003/11/07 23:41:41 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
/* View/edit this file with tab stops set to 4 */
@@ -61,6 +88,7 @@ xf86parseDisplaySubSection (void)
ptr->disp_black.red = ptr->disp_black.green = ptr->disp_black.blue = -1;
ptr->disp_white.red = ptr->disp_white.green = ptr->disp_white.blue = -1;
+ ptr->disp_frameX0 = ptr->disp_frameY0 = -1;
while ((token = xf86getToken (DisplayTab)) != ENDSUBSECTION)
{
switch (token)
@@ -338,7 +366,7 @@ xf86printScreenSection (FILE * cf, XF86ConfScreenPtr ptr)
fprintf (cf, "\tSubSection \"Display\"\n");
if (dptr->disp_comment)
fprintf (cf, "%s", dptr->disp_comment);
- if (dptr->disp_frameX0 != 0 || dptr->disp_frameY0 != 0)
+ if (dptr->disp_frameX0 >= 0 || dptr->disp_frameY0 >= 0)
{
fprintf (cf, "\t\tViewport %d %d\n",
dptr->disp_frameX0, dptr->disp_frameY0);
@@ -479,17 +507,20 @@ xf86validateScreen (XF86ConfigPtr p)
screen->scrn_identifier = screen->scrn_obso_driver;
monitor = xf86findMonitor (screen->scrn_monitor_str, p->conf_monitor_lst);
- if (!monitor)
- {
- xf86validationError (UNDEFINED_MONITOR_MSG,
- screen->scrn_monitor_str, screen->scrn_identifier);
- return (FALSE);
- }
- else
+ if (screen->scrn_monitor_str)
{
- screen->scrn_monitor = monitor;
- if (!xf86validateMonitor(p, screen))
+ if (!monitor)
+ {
+ xf86validationError (UNDEFINED_MONITOR_MSG,
+ screen->scrn_monitor_str, screen->scrn_identifier);
return (FALSE);
+ }
+ else
+ {
+ screen->scrn_monitor = monitor;
+ if (!xf86validateMonitor(p, screen))
+ return (FALSE);
+ }
}
device = xf86findDevice (screen->scrn_device_str, p->conf_device_lst);
@@ -541,15 +572,3 @@ xf86findScreen (const char *ident, XF86ConfScreenPtr p)
return (NULL);
}
-XF86ConfDisplayPtr
-xf86findDisplay (int depth, XF86ConfDisplayPtr p)
-{
- while (p)
- {
- if (depth == p->disp_depth)
- return (p);
-
- p = p->list.next;
- }
- return (NULL);
-}
diff --git a/hw/xfree86/parser/Vendor.c b/hw/xfree86/parser/Vendor.c
index f2e98872c..fbbb2e00f 100644
--- a/hw/xfree86/parser/Vendor.c
+++ b/hw/xfree86/parser/Vendor.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Vendor.c,v 1.16 2003/01/04 20:20:23 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Vendor.c,v 1.17 2003/08/24 17:37:08 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
/* View/edit this file with tab stops set to 4 */
diff --git a/hw/xfree86/parser/Video.c b/hw/xfree86/parser/Video.c
index b899f0d3d..de65c415e 100644
--- a/hw/xfree86/parser/Video.c
+++ b/hw/xfree86/parser/Video.c
@@ -1,3 +1,4 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Video.c,v 1.13 2003/08/24 17:37:08 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -25,7 +26,32 @@
* in this Software without prior written authorization from Metro Link.
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Video.c,v 1.12 2003/01/04 20:20:23 paulo Exp $ */
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
/* View/edit this file with tab stops set to 4 */
diff --git a/hw/xfree86/parser/configProcs.h b/hw/xfree86/parser/configProcs.h
index a2440540d..522cf5c2f 100644
--- a/hw/xfree86/parser/configProcs.h
+++ b/hw/xfree86/parser/configProcs.h
@@ -1,4 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/configProcs.h,v 1.16 2001/08/06 20:51:15 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/configProcs.h,v 1.17 2003/08/24 17:37:08 dawes Exp $ */
+/*
+ * Copyright (c) 1997-2001 by The XFree86 Project, 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 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).
+ */
/* Private procs. Public procs are in xf86Parser.h and xf86Optrec.h */
diff --git a/hw/xfree86/parser/read.c b/hw/xfree86/parser/read.c
index cd7bbf10b..2a5afeb27 100644
--- a/hw/xfree86/parser/read.c
+++ b/hw/xfree86/parser/read.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/read.c,v 1.23 2003/01/04 20:20:23 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/read.c,v 1.24 2003/08/24 17:37:08 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
/* View/edit this file with tab stops set to 4 */
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index 4d8167622..4dc2e0dd1 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/scan.c,v 1.24 2003/01/04 20:20:23 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/scan.c,v 1.30 2003/11/03 05:11:52 tsi Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
/* View/edit this file with tab stops set to 4 */
@@ -65,7 +92,8 @@
static int StringToToken (char *, xf86ConfigSymTabRec *);
static FILE *configFile = NULL;
-static int configStart = 0; /* start of the current token */
+static const char **builtinConfig = NULL;
+static int builtinIndex = 0;
static int configPos = 0; /* current readers position */
static int configLineNo = 0; /* linenumber */
static char *configBuf, *configRBuf; /* buffer for lines */
@@ -160,12 +188,24 @@ xf86getToken (xf86ConfigSymTabRec * tab)
again:
if (!c)
{
- if (fgets (configBuf, CONFIG_BUF_LEN - 1, configFile) == NULL)
+ char *ret;
+ if (configFile)
+ ret = fgets (configBuf, CONFIG_BUF_LEN - 1, configFile);
+ else {
+ if (builtinConfig[builtinIndex] == NULL)
+ ret = NULL;
+ else {
+ ret = strncpy(configBuf, builtinConfig[builtinIndex],
+ CONFIG_BUF_LEN);
+ builtinIndex++;
+ }
+ }
+ if (ret == NULL)
{
return (pushToken = EOF_TOKEN);
}
configLineNo++;
- configStart = configPos = 0;
+ configPos = 0;
eol_seen = 1;
}
@@ -205,16 +245,13 @@ again:
/* GJA -- handle '-' and ',' * Be careful: "-hsync" is a keyword. */
else if ((c == ',') && !isalpha (configBuf[configPos]))
{
- configStart = configPos;
return COMMA;
}
else if ((c == '-') && !isalpha (configBuf[configPos]))
{
- configStart = configPos;
return DASH;
}
- configStart = configPos;
/*
* Numbers are returned immediately ...
*/
@@ -359,7 +396,6 @@ xf86tokenString (void)
return configRBuf;
}
-#if 1
int
xf86pathIsAbsolute(const char *path)
{
@@ -367,7 +403,7 @@ xf86pathIsAbsolute(const char *path)
return 1;
#ifdef __UNIXOS2__
if (path && (path[0] == '\\' || (path[1] == ':')))
- return 0;
+ return 1;
#endif
return 0;
}
@@ -649,7 +685,6 @@ xf86openConfigFile(const char *path, const char *cmdline, const char *projroot)
int cmdlineUsed = 0;
configFile = NULL;
- configStart = 0; /* start of the current token */
configPos = 0; /* current readers position */
configLineNo = 0; /* linenumber */
pushToken = LOCK_TOKEN;
@@ -692,178 +727,6 @@ xf86openConfigFile(const char *path, const char *cmdline, const char *projroot)
return configPath;
}
-#else
-/*
- * xf86openConfigFile --
- *
- * Formerly findConfigFile(). This function take a pointer to a location
- * in which to place the actual name of the file that was opened.
- * This function uses the global character array xf86ConfigFile
- * This function returns the following results.
- *
- * 0 unable to open the config file
- * 1 file opened and ready to read
- *
- */
-
-int
-xf86openConfigFile (char *filename)
-{
-#define MAXPTRIES 6
- char *home = NULL;
- char *xconfig = NULL;
- char *xwinhome = NULL;
- char *configPaths[MAXPTRIES];
- int pcount = 0, idx;
-
-/*
- * First open if necessary the config file.
- * If the -xf86config flag was used, use the name supplied there (root only).
- * If $XF86CONFIG is a pathname, use it as the name of the config file (root)
- * If $XF86CONFIG is set but doesn't contain a '/', append it to 'XF86Config'
- * and search the standard places (root only).
- * If $XF86CONFIG is not set, just search the standard places.
- */
- configFile = NULL;
- configStart = 0; /* start of the current token */
- configPos = 0; /* current readers position */
- configLineNo = 0; /* linenumber */
- pushToken = LOCK_TOKEN;
- while (!configFile)
- {
-
- /*
- * configPaths[0] is used as a buffer for -xf86config
- * and $XF86CONFIG if it contains a path
- * configPaths[1...MAXPTRIES-1] is used to store the paths of each of
- * the other attempts
- */
- for (pcount = idx = 0; idx < MAXPTRIES; idx++)
- configPaths[idx] = NULL;
-
- /*
- * First check if the -xf86config option was used.
- */
- configPaths[pcount] = xf86confmalloc (PATH_MAX);
- if (xf86ConfigFile[0])
- {
- strcpy (configPaths[pcount], xf86ConfigFile);
- if ((configFile = fopen (configPaths[pcount], "r")) != 0)
- break;
- else
- return 0;
- }
- /*
- * Check if XF86CONFIG is set.
- */
-#ifndef __UNIXOS2__
- if (getuid () == 0
- && (xconfig = getenv ("XF86CONFIG")) != 0
- && strchr (xconfig, '/'))
-#else
- /* no root available, and filenames start with drive letter */
- if ((xconfig = getenv ("XF86CONFIG")) != 0
- && isalpha (xconfig[0])
- && xconfig[1] == ':')
-#endif
- {
- strcpy (configPaths[pcount], xconfig);
- if ((configFile = fopen (configPaths[pcount], "r")) != 0)
- break;
- else
- return 0;
- }
-
-#ifndef __UNIXOS2__
- /*
- * ~/XF86Config ...
- */
- if (getuid () == 0 && (home = getenv ("HOME")) != NULL)
- {
- configPaths[++pcount] = xf86confmalloc (PATH_MAX);
- strcpy (configPaths[pcount], home);
- strcat (configPaths[pcount], "/" XCONFIGFILE);
- if (xconfig)
- strcat (configPaths[pcount], xconfig);
- if ((configFile = fopen (configPaths[pcount], "r")) != 0)
- break;
- }
-
- /*
- * /etc/XF86Config
- */
- configPaths[++pcount] = xf86confmalloc (PATH_MAX);
- strcpy (configPaths[pcount], "/etc/" XCONFIGFILE);
- if (xconfig)
- strcat (configPaths[pcount], xconfig);
- if ((configFile = fopen (configPaths[pcount], "r")) != 0)
- break;
-
- /*
- * $(XCONFIGDIR)/XF86Config.<hostname>
- */
-
- configPaths[++pcount] = xf86confmalloc (PATH_MAX);
- if (getuid () == 0 && (xwinhome = getenv ("XWINHOME")) != NULL)
- sprintf (configPaths[pcount], "%s/lib/X11/" XCONFIGFILE, xwinhome);
- else
- strcpy (configPaths[pcount], XCONFIGDIR "/" XCONFIGFILE);
- if (getuid () == 0 && xconfig)
- strcat (configPaths[pcount], xconfig);
- strcat (configPaths[pcount], ".");
- gethostname (configPaths[pcount] + strlen (configPaths[pcount]),
- MAXHOSTNAMELEN);
- if ((configFile = fopen (configPaths[pcount], "r")) != 0)
- break;
-#endif /* !__UNIXOS2__ */
-
- /*
- * $(XCONFIGDIR)/XF86Config
- */
- configPaths[++pcount] = xf86confmalloc (PATH_MAX);
-#ifndef __UNIXOS2__
- if (getuid () == 0 && xwinhome)
- sprintf (configPaths[pcount], "%s/lib/X11/" XCONFIGFILE, xwinhome);
- else
- strcpy (configPaths[pcount], XCONFIGDIR "/" XCONFIGFILE);
- if (getuid () == 0 && xconfig)
- strcat (configPaths[pcount], xconfig);
-#else
- /*
- * we explicitly forbid numerous config files everywhere for OS/2;
- * users should consider them lucky to have one in a standard place
- * and another one with the -xf86config option
- */
- xwinhome = getenv ("X11ROOT"); /* get drive letter */
- if (!xwinhome) {
- fprintf (stderr,"X11ROOT environment variable not set\n");
- exit(2);
- }
- strcpy (configPaths[pcount], __XOS2RedirRoot ("/XFree86/lib/X11/XConfig"));
-#endif
-
- if ((configFile = fopen (configPaths[pcount], "r")) != 0)
- break;
-
- return 0;
- }
- configBuf = xf86confmalloc (CONFIG_BUF_LEN);
- configRBuf = xf86confmalloc (CONFIG_BUF_LEN);
- configPath = xf86confmalloc (PATH_MAX);
-
- strcpy (configPath, configPaths[pcount]);
-
- if (filename)
- strcpy (filename, configPaths[pcount]);
- for (idx = 0; idx <= pcount; idx++)
- if (configPaths[idx] != NULL)
- xf86conffree (configPaths[idx]);
-
- configBuf[0] = '\0'; /* sanity ... */
-
- return 1;
-}
-#endif
void
xf86closeConfigFile (void)
@@ -875,8 +738,24 @@ xf86closeConfigFile (void)
xf86conffree (configBuf);
configBuf = NULL;
- fclose (configFile);
- configFile = NULL;
+ if (configFile) {
+ fclose (configFile);
+ configFile = NULL;
+ } else {
+ builtinConfig = NULL;
+ builtinIndex = 0;
+ }
+}
+
+void
+xf86setBuiltinConfig(const char *config[])
+{
+ builtinConfig = config;
+ configPath = xf86configStrdup("<builtin configuration>");
+ configBuf = xf86confmalloc (CONFIG_BUF_LEN);
+ configRBuf = xf86confmalloc (CONFIG_BUF_LEN);
+ configBuf[0] = '\0'; /* sanity ... */
+
}
void
@@ -884,16 +763,6 @@ xf86parseError (char *format,...)
{
va_list ap;
-#if 0
- fprintf (stderr, "Parse error on line %d of section %s in file %s\n",
- configLineNo, configSection, configPath);
- fprintf (stderr, "\t");
- va_start (ap, format);
- vfprintf (stderr, format, ap);
- va_end (ap);
-
- fprintf (stderr, "\n");
-#else
ErrorF ("Parse error on line %d of section %s in file %s\n\t",
configLineNo, configSection, configPath);
va_start (ap, format);
@@ -901,8 +770,6 @@ xf86parseError (char *format,...)
va_end (ap);
ErrorF ("\n");
-#endif
-
}
void
@@ -910,16 +777,6 @@ xf86parseWarning (char *format,...)
{
va_list ap;
-#if 0
- fprintf (stderr, "Parse warning on line %d of section %s in file %s\n",
- configLineNo, configSection, configPath);
- fprintf (stderr, "\t");
- va_start (ap, format);
- vfprintf (stderr, format, ap);
- va_end (ap);
-
- fprintf (stderr, "\n");
-#else
ErrorF ("Parse warning on line %d of section %s in file %s\n\t",
configLineNo, configSection, configPath);
va_start (ap, format);
@@ -927,7 +784,6 @@ xf86parseWarning (char *format,...)
va_end (ap);
ErrorF ("\n");
-#endif
}
void
@@ -935,23 +791,12 @@ xf86validationError (char *format,...)
{
va_list ap;
-#if 0
- fprintf (stderr, "Data incomplete in file %s\n",
- configPath);
- fprintf (stderr, "\t");
- va_start (ap, format);
- vfprintf (stderr, format, ap);
- va_end (ap);
-
- fprintf (stderr, "\n");
-#else
ErrorF ("Data incomplete in file %s\n\t", configPath);
va_start (ap, format);
VErrorF (format, ap);
va_end (ap);
ErrorF ("\n");
-#endif
}
void
diff --git a/hw/xfree86/parser/write.c b/hw/xfree86/parser/write.c
index 1d7472a5c..e096c6247 100644
--- a/hw/xfree86/parser/write.c
+++ b/hw/xfree86/parser/write.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/write.c,v 1.17 2002/09/17 18:54:16 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/write.c,v 1.18 2003/08/24 17:37:08 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
/* View/edit this file with tab stops set to 4 */
diff --git a/hw/xfree86/parser/xf86Optrec.h b/hw/xfree86/parser/xf86Optrec.h
index 25f91a037..d7a1e7ae5 100644
--- a/hw/xfree86/parser/xf86Optrec.h
+++ b/hw/xfree86/parser/xf86Optrec.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/xf86Optrec.h,v 1.10 2001/06/30 04:00:24 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/xf86Optrec.h,v 1.11 2003/08/24 17:37:08 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2001 by The XFree86 Project, 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 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).
+ */
+
/*
* This file contains the Option Record that is passed between the Parser,
diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h
index ae89005a4..1a30d17a8 100644
--- a/hw/xfree86/parser/xf86Parser.h
+++ b/hw/xfree86/parser/xf86Parser.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/xf86Parser.h,v 1.30 2002/09/16 18:06:16 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/xf86Parser.h,v 1.33 2003/10/08 14:58:30 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
/*
* This file contains the external interfaces for the XFree86 configuration
@@ -417,6 +444,7 @@ xf86ConfigSymTabRec, *xf86ConfigSymTabPtr;
*/
extern const char *xf86openConfigFile (const char *, const char *,
const char *);
+extern void xf86setBuiltinConfig(const char *config[]);
extern XF86ConfigPtr xf86readConfigFile (void);
extern void xf86closeConfigFile (void);
extern void xf86freeConfig (XF86ConfigPtr p);
@@ -427,7 +455,6 @@ XF86ConfMonitorPtr xf86findMonitor(const char *ident, XF86ConfMonitorPtr p);
XF86ConfModesPtr xf86findModes(const char *ident, XF86ConfModesPtr p);
XF86ConfModeLinePtr xf86findModeLine(const char *ident, XF86ConfModeLinePtr p);
XF86ConfScreenPtr xf86findScreen(const char *ident, XF86ConfScreenPtr p);
-XF86ConfDisplayPtr xf86findDisplay(int depth, XF86ConfDisplayPtr p);
XF86ConfInputPtr xf86findInput(const char *ident, XF86ConfInputPtr p);
XF86ConfInputPtr xf86findInputByDriver(const char *driver, XF86ConfInputPtr p);
XF86ConfVendorPtr xf86findVendor(const char *name, XF86ConfVendorPtr list);
diff --git a/hw/xfree86/parser/xf86tokens.h b/hw/xfree86/parser/xf86tokens.h
index eb8eab766..387773dc0 100644
--- a/hw/xfree86/parser/xf86tokens.h
+++ b/hw/xfree86/parser/xf86tokens.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/xf86tokens.h,v 1.19 2003/01/04 20:20:23 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/xf86tokens.h,v 1.20 2003/08/24 17:37:09 dawes Exp $ */
/*
*
* Copyright (c) 1997 Metro Link Incorporated
@@ -26,6 +26,33 @@
* in this Software without prior written authorization from Metro Link.
*
*/
+/*
+ * Copyright (c) 1997-2003 by The XFree86 Project, 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 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).
+ */
+
#ifndef _xf86_tokens_h
#define _xf86_tokens_h
diff --git a/hw/xfree86/ramdac/BT.c b/hw/xfree86/ramdac/BT.c
index 9ddd3b20b..3b42ecb13 100644
--- a/hw/xfree86/ramdac/BT.c
+++ b/hw/xfree86/ramdac/BT.c
@@ -23,7 +23,7 @@
*
* BT RAMDAC routines.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/ramdac/BT.c,v 1.7 2000/10/20 12:57:27 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/ramdac/BT.c,v 1.8 2003/09/24 02:43:35 dawes Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -107,7 +107,7 @@ BTramdacProbe(ScrnInfoPtr pScrn, RamDacSupportedInfoRecPtr ramdacs/*, RamDacRecP
return NULL;
} else {
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
- "Attached RAMDAC is %s\n", BTramdacDeviceInfo[BTramdac_ID&0xFFFF]);
+ "Attached RAMDAC is %s\n", BTramdacDeviceInfo[BTramdac_ID&0xFFFF].DeviceName);
}
for (i=0;ramdacs[i].token != -1;i++) {
diff --git a/hw/xfree86/ramdac/IBM.c b/hw/xfree86/ramdac/IBM.c
index d62a9ba56..34562e297 100644
--- a/hw/xfree86/ramdac/IBM.c
+++ b/hw/xfree86/ramdac/IBM.c
@@ -23,7 +23,7 @@
*
* IBM RAMDAC routines.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/ramdac/IBM.c,v 1.12 2003/02/17 16:08:29 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/ramdac/IBM.c,v 1.13 2003/09/24 02:43:35 dawes Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -282,7 +282,7 @@ IBMramdacProbe(ScrnInfoPtr pScrn, RamDacSupportedInfoRecPtr ramdacs/* , RamDacRe
return NULL;
} else {
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
- "Attached RAMDAC is %s\n", IBMramdacDeviceInfo[IBMramdac_ID&0xFFFF]);
+ "Attached RAMDAC is %s\n", IBMramdacDeviceInfo[IBMramdac_ID&0xFFFF].DeviceName);
}
for (i=0;ramdacs[i].token != -1;i++) {
diff --git a/hw/xfree86/ramdac/TI.c b/hw/xfree86/ramdac/TI.c
index 267a13f9f..5e466b707 100644
--- a/hw/xfree86/ramdac/TI.c
+++ b/hw/xfree86/ramdac/TI.c
@@ -24,7 +24,7 @@
* Modified from IBM.c to support TI RAMDAC routines
* by Jens Owen, <jens@tungstengraphics.com>.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/ramdac/TI.c,v 1.7 2003/02/17 16:08:29 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/ramdac/TI.c,v 1.8 2003/09/24 02:43:35 dawes Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -318,7 +318,7 @@ TIramdacProbe(ScrnInfoPtr pScrn, RamDacSupportedInfoRecPtr ramdacs)
return NULL;
} else {
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
- "Attached RAMDAC is %s\n", TIramdacDeviceInfo[TIramdac_ID&0xFFFF]);
+ "Attached RAMDAC is %s\n", TIramdacDeviceInfo[TIramdac_ID&0xFFFF].DeviceName);
}
for (i=0;ramdacs[i].token != -1;i++) {
diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c
index e911f8066..41b623a6a 100644
--- a/hw/xfree86/ramdac/xf86HWCurs.c
+++ b/hw/xfree86/ramdac/xf86HWCurs.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/ramdac/xf86HWCurs.c,v 1.12 2003/02/13 20:28:41 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/ramdac/xf86HWCurs.c,v 1.13 2003/03/04 21:21:15 mvojkovi Exp $ */
#include "misc.h"
#include "xf86.h"
@@ -191,6 +191,13 @@ xf86RecolorCursor(ScreenPtr pScreen, CursorPtr pCurs, Bool displayed)
pScreen->devPrivates[xf86CursorScreenIndex].ptr;
xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr;
+#ifdef ARGB_CURSOR
+ /* recoloring isn't applicable to ARGB cursors and drivers
+ shouldn't have to ignore SetCursorColors requests */
+ if (pCurs->bits->argb)
+ return;
+#endif
+
if (ScreenPriv->PalettedCursor) {
xColorItem sourceColor, maskColor;
ColormapPtr pmap = ScreenPriv->pInstalledMap;
diff --git a/hw/xfree86/ramdac/xf86RamDac.c b/hw/xfree86/ramdac/xf86RamDac.c
index 7db16e394..b45be814d 100644
--- a/hw/xfree86/ramdac/xf86RamDac.c
+++ b/hw/xfree86/ramdac/xf86RamDac.c
@@ -23,7 +23,7 @@
*
* Generic RAMDAC access routines.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/ramdac/xf86RamDac.c,v 1.6 2000/09/26 15:57:21 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/ramdac/xf86RamDac.c,v 1.7 2003/11/03 05:11:53 tsi Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -69,8 +69,6 @@ RamDacHelperDestroyInfoRec(RamDacHelperRecPtr infoRec)
Bool
RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPriv)
{
- RamDacHWRecPtr ramdacHWPtr;
- RamDacRegRecPtr ramdacReg;
RamDacScreenRecPtr ramdacScrPtr;
/*
@@ -78,10 +76,8 @@ RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPriv)
*/
if (!RamDacGetRec(pScrn))
return FALSE;
- ramdacHWPtr = RAMDACHWPTR(pScrn);
- ramdacReg = &ramdacHWPtr->ModeReg;
- ramdacScrPtr = ((RamDacScreenRecPtr)
- (pScrn)->privates[RamDacGetScreenIndex()].ptr);
+ ramdacScrPtr =
+ ((RamDacScreenRecPtr) (pScrn)->privates[RamDacGetScreenIndex()].ptr);
ramdacScrPtr->RamDacRec = ramdacPriv;
return(TRUE);
@@ -100,8 +96,6 @@ RamDacGetRecPrivate()
Bool
RamDacGetRec(ScrnInfoPtr scrp)
{
- RamDacRegRecPtr regp;
-
RamDacGetRecPrivate();
/*
* New privates are always set to NULL, so we can check if the allocation
@@ -116,8 +110,6 @@ RamDacGetRec(ScrnInfoPtr scrp)
xnfcalloc(sizeof(RamDacHWRec), 1);
scrp->privates[RamDacScreenPrivateIndex].ptr =
xnfcalloc(sizeof(RamDacScreenRec), 1);
- /* Does this really belong here? */
- regp = &((RamDacHWRecPtr)scrp->privates[RamDacHWPrivateIndex].ptr)->ModeReg;
return TRUE;
}
diff --git a/hw/xfree86/scanpci/extrapci.ids b/hw/xfree86/scanpci/extrapci.ids
index 926e1a75f..32d96cec8 100644
--- a/hw/xfree86/scanpci/extrapci.ids
+++ b/hw/xfree86/scanpci/extrapci.ids
@@ -14,7 +14,7 @@
# changes/additions that aren't XFree86-specific to the pciids
# project (http://pciids.sf.net/).
#
-# $XFree86: xc/programs/Xserver/hw/xfree86/etc/extrapci.ids,v 1.7 2003/02/06 04:18:09 dawes Exp $
+# $XFree86: xc/programs/Xserver/hw/xfree86/etc/extrapci.ids,v 1.10 2003/10/30 15:29:32 tsi Exp $
#
# Vendors, devices and subsystems. Please keep sorted.
@@ -32,14 +32,13 @@
# xyzw "
# 20ce New Chipset Description
+103c "
+ 12b4 zx1 QuickSilver AGP8x LBA
+
1102 "
0002 "
C 0401
-# Intel(R) 852GM/855GM, 865G
-8086 "
- 3580 852GM/852GME/855GM/855GME Chipset Host-Hub Bridge
- 3582 852GM/852GME/855GM/855GME Chipset Graphics Controller
- 2570 865G Chipset Host-Hub Bridge
- 2572 865G Chipset Graphics Controller
-
+126f "
+ 0730 SM731 Cougar3DR
+
diff --git a/hw/xfree86/scanpci/pci.ids b/hw/xfree86/scanpci/pci.ids
index a6bb2fa1c..0d6a460f3 100644
--- a/hw/xfree86/scanpci/pci.ids
+++ b/hw/xfree86/scanpci/pci.ids
@@ -7,7 +7,7 @@
# so if you have anything to contribute, please visit the home page or
# send a diff -u against the most recent pci.ids to pci-ids@ucw.cz.
#
-# Daily snapshot on Tue 2003-02-25 11:00:06
+# Daily snapshot on Wed 2003-05-14 10:00:04
#
# Vendors, devices and subsystems. Please keep sorted.
@@ -126,7 +126,7 @@
0020 53c1010 Ultra3 SCSI Adapter
1de1 1020 DC-390U3W
0021 53c1010 66MHz Ultra3 SCSI Adapter
- 0030 53c1030
+ 0030 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI
1028 1010 LSI U320 SCSI Controller
0040 53c1035
008f 53c875J
@@ -161,6 +161,7 @@
0017 PROTO-3 PCI Prototyping board
9100 INI-9100/9100W SCSI Host
1002 ATI Technologies Inc
+ 4136 Radeon IGP 320 M
# New support forthcoming in XFree86 4.3.0
4144 Radeon R300 AD [Radeon 9500 Pro]
# New support forthcoming in XFree86 4.3.0
@@ -305,16 +306,18 @@
4c67 Radeon R250 Lg [Radeon Mobility 9000 M9]
4d46 Rage Mobility M4 AGP
4d4c Rage Mobility M4 AGP
- 4e44 Radeon R300 ND [Radeon 9700]
- 4e45 Radeon R300 NE [Radeon 9700]
+ 4e44 Radeon R300 ND [Radeon 9700 Pro]
+ 4e45 Radeon R300 NE [Radeon 9500 Pro]
+ 1002 0002 Radeon R300 NE [Radeon 9500 Pro]
4e46 Radeon R300 NF [Radeon 9700]
# Update: This is FireGL X1, not Radeon 9700
4e47 Radeon R300 NG [FireGL X1]
-# Update
+ 4e48 Radeon R350 [Radeon 9800]
4e64 Radeon R300 [Radeon 9700 Pro] (Secondary)
- 4e65 Radeon R300 [Radeon 9700] (Secondary)
+ 4e65 Radeon R300 [Radeon 9500 Pro] (Secondary)
4e66 Radeon R300 [Radeon 9700] (Secondary)
4e67 Radeon R300 [FireGL X1] (Secondary)
+ 4e68 Radeon R350 [Radeon 9800] (Secondary)
5041 Rage 128 PA/PRO
5042 Rage 128 PB/PRO AGP 2x
5043 Rage 128 PC/PRO AGP 4x
@@ -438,6 +441,7 @@
1002 0088 Xpert 99
5345 Rage 128 SE/4x
5346 Rage 128 SF/4x AGP 2x
+ 1002 0048 RAGE 128 16MB VGA TVOUT AMC PAL
5347 Rage 128 SG/4x AGP 4x
5348 Rage 128 SH
534b Rage 128 SK/4x
@@ -468,7 +472,9 @@
1002 5654 Mach64VT Reference
5655 264VT3 [Mach64 VT3]
5656 264VT4 [Mach64 VT4]
- 700f U1/A3 AGP Bridge [IGP 320M]
+ 700f PCI Bridge [IGP 320M]
+ 7010 PCI Bridge [IGP 340M]
+ cab2 RS200/RS200M AGP Bridge [IGP 340M]
1003 ULSI Systems
0201 US201
1004 VLSI Technology Inc
@@ -574,6 +580,7 @@
0014 DECchip 21041 [Tulip Pass 3]
1186 0100 DE-530+
0016 DGLPB [OPPO]
+ 0017 PV-PCI Graphics Controller (ZLXp-L)
0019 DECchip 21142/43
1011 500a DE500A Fast Ethernet
1011 500b DE500B Fast Ethernet
@@ -977,13 +984,15 @@
1028 00d0 PowerEdge Expandable RAID Controller 3/Si
0005 PowerEdge Expandable RAID Controller 3/Di
0006 PowerEdge Expandable RAID Controller 3/Di
- 0007 Remote Assistant Card 3
- 0008 PowerEdge Expandable RAID Controller 3/Di
+ 0007 Remote Access Controller:DRAC III
+ 0008 Remote Access Controller
+ 0009 BMC/SMIC device not present
000a PowerEdge Expandable RAID Controller 3
1028 0106 PowerEdge Expandable RAID Controller 3/Di
1028 011b PowerEdge Expandable RAID Controller 3/Di
1028 0121 PowerEdge Expandable RAID Controller 3/Di
- 000c Embedded Systems Management Device 4
+ 000c Remote Access Controller:ERA or ERA/O
+ 000d BMC/SMIC device
000e PowerEdge Expandable RAID Controller
000f PowerEdge Expandable RAID Controller 4/Di
1029 Siemens Nixdorf IS
@@ -993,6 +1002,7 @@
102b Matrox Graphics, Inc.
# DJ: I've a suspicion that 0010 is a duplicate of 0d10.
0010 MGA-I [Impression?]
+ 0100 MGA 1064SG [Mystique]
0518 MGA-II [Athena]
0519 MGA 2064W [Millennium]
051a MGA 1064SG [Mystique]
@@ -1225,6 +1235,7 @@
0635 635 Host
0645 SiS645 Host & Memory & AGP Controller
0646 SiS645DX Host & Memory & AGP Controller
+ 0648 SiS 645xx
0650 650 Host
0651 SiS651 Host
0730 730 Host
@@ -1232,6 +1243,7 @@
0735 735 Host
0740 740 Host
0745 745 Host
+ 0755 SiS 755 Host Bridge
0900 SiS900 10/100 Ethernet
1039 0900 SiS900 10/100 Ethernet Adapter
0961 SiS961 [MuTIOL Media IO]
@@ -1268,14 +1280,14 @@
1092 4910 SpeedStar A70
1092 4920 SpeedStar A70
1569 6326 SiS6326 GUI Accelerator
- 7001 SiS7001 USB Controller
+ 7001 USB 1.0 Controller
1039 7000 Onboard USB Controller
- 7002 SiS7002 USB 2.0
+ 7002 USB 2.0 Controller
1509 7002 Onboard USB Controller
7007 FireWire Controller
- 7012 SiS7012 PCI Audio Accelerator
+ 7012 Sound Controller
7013 Intel 537 [56k Winmodem]
- 7016 SiS7016 10/100 Ethernet Adapter
+ 7016 10/100 Ethernet Adapter
1039 7016 SiS7016 10/100 Ethernet Adapter
7018 SiS PCI Audio Accelerator
1014 01b6 SiS PCI Audio Accelerator
@@ -1352,8 +1364,8 @@
1040 Accelgraphics Inc.
1041 Computrend
1042 Micron
- 1000 FDC 37C665
- 1001 37C922
+ 1000 PC Tech RZ1000
+ 1001 PC Tech RZ1001
3000 Samurai_0
3010 Samurai_1
3020 Samurai_IDE
@@ -1616,6 +1628,7 @@
105a 4d39 Fasttrak66
1275 20275
3376 PDC20376
+ 1043 809e A7V8X motherboard
4d30 20267
105a 4d33 Ultra100
105a 4d39 Fasttrak100
@@ -1628,6 +1641,7 @@
4d68 20268
105a 4d68 Ultra100TX2
4d69 20269
+ 105a 4d68 Ultra133TX2
5275 PDC20276 IDE
105a 0275 SuperTrak SX6000 IDE
5300 DC5300
@@ -1672,6 +1686,7 @@
13cc 0009 Barco Metheus 5 Megapixel, Dual Head
13cc 000a Barco Metheus 5 Megapixel, Dual Head
5348 Revolution 4
+ 105d 0037 Revolution IV-FP AGP (For SGI 1600SW)
105e Vtech Computers Ltd
105f Infotronic America Inc
1060 United Microelectronics [UMC]
@@ -1810,6 +1825,7 @@
2100 QLA2100 64-bit Fibre Channel Adapter
1077 0001 QLA2100 64-bit Fibre Channel Adapter
2200 QLA2200
+ 1077 0002 QLA2200
2300 QLA2300 64-bit FC-AL Adapter
2312 QLA2312 Fibre Channel Adapter
1078 Cyrix Corporation
@@ -1961,6 +1977,7 @@
c831 PCI-GPIB bridge
1094 First International Computers [FIC]
1095 CMD Technology Inc
+ 0240 Adaptec AAR-1210SA SATA HostRAID Controller
0640 PCI0640
0643 PCI0643
0646 PCI0646
@@ -2109,6 +2126,7 @@
10a3 Everex Systems Inc
10a4 Globe Manufacturing Sales
10a5 Smart Link Ltd.
+ 3052 SmartPCI562 56K Modem
5449 SmartPCI561 modem
10a6 Informtech Industrial Ltd.
10a7 Benchmarq Microelectronics
@@ -2124,6 +2142,7 @@
0007 RPCEX
0008 DiVO VIP
0009 Alteon Gigabit Ethernet
+ 10a9 8002 Acenic Gigabit Ethernet
0010 AMP Video I/O
0011 GRIP
0012 SGH PSHAC GSN
@@ -2135,6 +2154,7 @@
1006 Dual JPEG 4
1007 Dual JPEG 5
1008 Cesium
+ 100a IOC4 I/O controller
2001 Fibre Channel
2002 ASDE
8001 O2 1394
@@ -2209,6 +2229,7 @@
d84d 4078 EX-4078 2S(16C552) RS-232+1P
9054 PCI <-> IOBus Bridge
10b5 2455 Wessex Techology PHIL-PCI
+ 12d9 0002 PCI Prosody Card rev 1.5
9060 9060
906d 9060SD
125c 0640 Aries 16000P
@@ -2216,6 +2237,7 @@
9080 9080
10b5 9080 9080 [real subsystem ID not set]
129d 0002 Aculab PCI Prosidy card
+ 12d9 0002 PCI Prosody Card
10b6 Madge Networks
0001 Smart 16/4 PCI Ringnode
0002 Smart 16/4 PCI Ringnode Mk2
@@ -2243,6 +2265,7 @@
1001 Collage 155 ATM Server Adapter
10b7 3Com Corporation
0001 3c985 1000BaseSX (SX/TX)
+ 0910 3C910-A01
1006 MINI PCI type 3B Data Fax Modem
1007 Mini PCI 56k Winmodem
10b7 615c Mini PCI 56K Modem
@@ -2423,6 +2446,7 @@
5251 M5251 P1394 OHCI 1.0 Controller
5253 M5253 P1394 OHCI 1.1 Controller
5261 M5261 Ethernet Controller
+ 5450 Lucent Technologies Soft Modem AMR
5451 M5451 PCI AC-Link Controller Audio Device
1014 0506 ThinkPad R30
5453 M5453 PCI AC-Link Controller Modem Device
@@ -2568,6 +2592,7 @@
1043 0201 AGP-V3800 SDRAM
1043 0205 PCI-V3800
1043 4000 AGP-V3800PRO
+ 1048 0c21 Synergy II
1092 4804 Viper V770
1092 4a00 Viper V770
1092 4a02 Viper V770 Ultra
@@ -2656,6 +2681,7 @@
0153 NV15GL [Quadro2 Pro]
0170 NV17 [GeForce4 MX 460]
0171 NV17 [GeForce4 MX 440]
+ 10b0 0002 Gainward Pro/600 TV
1462 8661 G4MX440-VTP
1462 8730 MX440SES-T (MS-8873)
147b 8f00 Abit Siluro GeForce4MX440
@@ -2870,6 +2896,8 @@
1102 8040 CT4760 SBLive!
1102 8051 CT4850 SBLive! Value
1102 8061 SBLive! Player 5.1
+ 1102 8064 SB Live! 5.1 Model SB0100
+ 1102 8065 SBLive! 5.1 Digital Model SB0220
0004 SB Audigy
1102 0051 SB0090 Audigy Player
1102 0053 SB0090 Audigy Player/OEM
@@ -2882,7 +2910,7 @@
1102 0040 SB Audigy MIDI/Game Port
7004 [SB Live! Value] Input device controller
8064 SB0100 [SBLive! 5.1 OEM]
- 8938 ES1371
+ 8938 Ectiva EV1938
1103 Triones Technologies, Inc.
0003 HPT343
# Revisions: 01=HPT366, 03=HPT370, 04=HPT370A, 05=HPT372
@@ -2893,6 +2921,7 @@
0006 HPT302
0007 HPT371
0008 HPT374
+ 0009 HPT372N
1104 RasterOps Corp.
1105 Sigma Designs, Inc.
1105 REALmagic Xcard MPEG 1/2/3/4 DVD Decoder
@@ -2909,10 +2938,13 @@
0391 VT8371 [KX133]
0501 VT8501 [Apollo MVP4]
0505 VT82C505
- 0561 VT82C561
- 0571 VT82C586/B/686A/B PIPC Bus Master IDE
+# Shares chip with :0576. The VT82C576M has :1571 instead of :0561.
+ 0561 VT82C576MV
+ 0571 VT82C586A/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE
+ 1019 0985 P6VXA Motherboard
1043 8052 VT8233A Bus Master ATA100/66/33 IDE
- 1106 0571 VT8235 Bus Master ATA133/100/66/33 IDE
+ 1043 808c A7V8X motherboard
+ 1106 0571 VT82C586/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE
1179 0001 Magnia Z310
1458 5002 GA-7VAX Mainboard
0576 VT82C576 3V [Apollo Master]
@@ -2927,8 +2959,11 @@
0598 VT82C598 [Apollo MVP3]
0601 VT8601 [Apollo ProMedia]
0605 VT8605 [ProSavage PM133]
+ 1043 802c CUV4X mainboard
0680 VT82C680 [Apollo P6]
0686 VT82C686 [Apollo Super South]
+ 1019 0985 P6VXA Motherboard
+ 1043 802c CUV4X mainboard
1043 8033 A7V Mainboard
1043 803e A7V-E Mainboard
1043 8040 A7M266 Mainboard
@@ -2938,6 +2973,7 @@
1179 0001 Magnia Z310
147b a702 KG7-Lite Mainboard
0691 VT82C693A/694x [Apollo PRO133x]
+ 1019 0985 P6VXA Motherboard
1179 0001 Magnia Z310
1458 0691 VT82C691 Apollo Pro System Controller
0693 VT82C693 [Apollo Pro Plus]
@@ -2945,10 +2981,12 @@
0926 VT82C926 [Amazon]
1000 VT82C570MV
1106 VT82C570MV
- 1571 VT82C416MV
+ 1571 VT82C576M/VT82C586
1595 VT82C595/97 [Apollo VP2/97]
3038 USB
0925 1234 USB Controller
+ 1019 0985 P6VXA Motherboard
+ 1043 808c A7V8X motherboard
1179 0001 Magnia Z310
3040 VT82C586B ACPI
3043 VT86C100A [Rhine]
@@ -2959,6 +2997,7 @@
3050 VT82C596 Power Management
3051 VT82C596 Power Management
3057 VT82C686 [Apollo Super ACPI]
+ 1019 0985 P6VXA Motherboard
1043 8033 A7V Mainboard
1043 803e A7V-E Mainboard
1043 8040 A7M266 Mainboard
@@ -2966,16 +3005,19 @@
1179 0001 Magnia Z310
3058 VT82C686 AC97 Audio Controller
0e11 b194 Soundmax integrated digital audio
+ 1019 0985 P6VXA Motherboard
1106 4511 Onboard Audio on EP7KXA
1458 7600 Onboard Audio
1462 3091 MS-6309 Onboard Audio
15dd 7609 Onboard Audio
- 3059 VT8233 AC97 Audio Controller
+ 3059 VT8233/A/8235 AC97 Audio Controller
+ 1043 8095 A7V8X Motherboard (Realtek ALC650 codec)
1458 a002 GA-7VAX Onboard Audio (Realtek ALC650)
3065 VT6102 [Rhine-II]
1106 0102 VT6102 [Rhine II] Embeded Ethernet Controller on VT8235
1186 1400 DFE-530TX rev A
1186 1401 DFE-530TX rev B
+ 13b9 1421 LD-10/100AL PCI Fast Ethernet Adapter (rev.B)
3068 Intel 537 [AC97 Modem]
3074 VT8233 PCI to ISA Bridge
1043 8052 VT8233A
@@ -2987,11 +3029,12 @@
3102 VT8662 Host Bridge
3103 VT8615 Host Bridge
3104 USB 2.0
+ 1043 808c A7V8X motherboard
1458 5004 GA-7VAX Mainboard
3106 VT6105 [Rhine-III]
3109 VT8233C PCI to ISA Bridge
3112 VT8361 [KLE133] Host Bridge
- 3116 VT8375 [KM266] Host Bridge
+ 3116 VT8375 [KM266/KL266] Host Bridge
# found on EPIA M6000/9000 mainboard
3122 VT8623 [Apollo CLE266] integrated CastleRock graphics
# found on EPIA M6000/9000 mainboard
@@ -3003,8 +3046,10 @@
3156 P/KN266 Host Bridge
3168 VT8374 P4X400 Host Controller/AGP Bridge
3177 VT8235 ISA Bridge
+ 1043 808c A7V8X motherboard
1458 5001 GA-7VAX Mainboard
3189 VT8377 [KT400 AGP] Host Bridge
+ 1043 807f A7V8X motherboard
1458 5000 GA-7VAX Mainboard
5030 VT82C596 ACPI [Apollo PRO]
6100 VT85C100A [Rhine II]
@@ -3016,6 +3061,7 @@
8596 VT82C596 [Apollo PRO AGP]
8597 VT82C597 [Apollo VP3 AGP]
8598 VT82C598/694x [Apollo MVP3/Pro133x AGP]
+ 1019 0985 P6VXA Motherboard
8601 VT8601 [Apollo ProMedia AGP]
8605 VT8605 [PM133 AGP]
8691 VT82C691 [Apollo Pro]
@@ -3043,6 +3089,12 @@
110a Siemens Nixdorf AG
0002 Pirahna 2-port
0005 Tulip controller, power management, switch extender
+ 0006 FSC PINC (I/O-APIC)
+ 0015 FSC Multiprocessor Interrupt Controller
+ 001d FSC Copernicus Management Controller
+ 007b FSC Remote Service Controller, mailbox device
+ 007c FSC Remote Service Controller, shared memory device
+ 007d FSC Remote Service Controller, SMIC device
2102 DSCC4 WAN adapter
4942 FPGA I-Bus Tracer for MBD
6120 SZB6120
@@ -3461,6 +3513,7 @@
0001 Motion TPEG Recorder/Player with audio
1166 ServerWorks
0005 CNB20-LE Host Bridge
+ 0006 CNB20HE Host Bridge
0007 CNB20-LE Host Bridge
0008 CNB20HE Host Bridge
0009 CNB20LE Host Bridge
@@ -3733,6 +3786,7 @@
0443 LT WinModem
0444 LT WinModem
0445 LT WinModem
+ 8086 2203 PRO/100+ MiniPCI (probably an Ambit U98.003.C.00 combo card)
0446 LT WinModem
0447 LT WinModem
0448 WinModem 56k
@@ -4164,6 +4218,7 @@
1668 0414 HWP01170-01 802.11b PCI Wireless Adapter
1737 3874 WMP11 Wireless 802.11b PCI Adapter
8086 2513 Wireless 802.11b MiniPCI Adapter
+ 3890 D-Links DWL-g650 A1
8130 HMP8130 NTSC/PAL Video Decoder
8131 HMP8131 NTSC/PAL Video Decoder
1261 Matsushita-Kotobuki Electronics Industries, Ltd.
@@ -4199,6 +4254,7 @@
1273 Hughes Network Systems
0002 DirecPC
1274 Ensoniq
+ 1171 ES1373 [AudioPCI] (also Creative Labs CT5803)
1371 ES1371 [AudioPCI-97]
0e11 0024 AudioPCI on Motherboard Compaq Deskpro
0e11 b1a7 ES1371, ES1373 AudioPCI
@@ -4268,6 +4324,7 @@
1277 Comstream
1278 Transtech Parallel Systems Ltd.
0701 TPE3/TM3 PowerPC Node
+ 0710 TPE5 PowerPC PCI board
1279 Transmeta Corporation
0295 Northbridge
0395 LongRun Northbridge
@@ -4463,6 +4520,7 @@
12ae 0001 Gigabit Ethernet-SX (Universal)
1410 0104 Gigabit Ethernet-SX PCI Adapter
0002 AceNIC Gigabit Ethernet (Copper)
+ 10a9 8002 Acenic Gigabit Ethernet
12ae 0002 Gigabit Ethernet-T (3C986-T)
12af TDK USA Corp
12b0 Jorge Scientific Corp
@@ -4557,11 +4615,14 @@
00a0 ITNT2
12d3 Vingmed Sound A/S
12d4 Ulticom (Formerly DGM&S)
+ 0200 T1 Card
12d5 Equator Technologies
12d6 Analogic Corp
12d7 Biotronic SRL
12d8 Pericom Semiconductor
12d9 Aculab PLC
+ 0002 PCI Prosody
+ 0004 cPCI Prosody
12da True Time Inc.
12db Annapolis Micro Systems, Inc
12dc Symicron Computer Communication Ltd.
@@ -4679,6 +4740,7 @@
0036 PCI-DAS64/M2/16
0037 PCI-DAS64/M3/16
004c PCI-DAS1000
+ 004d PCI-QUAD04
1308 Jato Technologies Inc.
0001 NetCelerator Adapter
1308 0001 NetCelerator Adapter
@@ -4766,6 +4828,7 @@
1331 Radisys Corp.
1332 Micro Memory
5415 MM-5415CN PCI Memory Module with Battery Backup
+ 5425 MM-5425CN PCI 64/66 Memory Module with Battery Backup
1334 Redcreek Communications, Inc
1335 Videomail, Inc
1337 Third Planet Publishing
@@ -4875,6 +4938,7 @@
1384 Reality Simulation Systems Inc
1385 Netgear
4100 802.11b Wireless Adapter (MA301)
+ 4105 MA311 802.11b wireless adapter
620a GA620
622a GA622
630a GA630
@@ -5011,7 +5075,7 @@
13e6 Argosy research Inc
13e7 NAC Incorporated
13e8 Chip Express Corporation
-13e9 Chip Express Corporation
+13e9 Intraserver Technology Inc
13ea Dallas Semiconductor
13eb Hauppauge Computer Works Inc
13ec Zydacron Inc
@@ -5036,6 +5100,7 @@
1043 8077 CMI8738 6-channel audio controller
1043 80e2 CMI8738 6ch-MX
13f6 0111 CMI8738/C3DX PCI Audio Device
+ 1681 a000 Gamesurround MUSE XL
0211 CM8738
13f7 Wildfire Communications
13f8 Ad Lib Multimedia Inc
@@ -5191,6 +5256,7 @@
146a IFR
146b Parascan Technologies Ltd
146c Ruby Tech Corp.
+ 1430 FE-1430TX Fast Ethernet PCI Adapter
146d Tachyon, INC.
146e Williams Electronics Games, Inc.
146f Multi Dimensional Consulting Inc
@@ -5241,6 +5307,7 @@
149b SEIKO Instruments Inc
149c OVISLINK Corp.
149d NEWTEK Inc
+ 0001 Video Toaster for PC
149e Mapletree Networks Inc.
149f LECTRON Co Ltd
14a0 SOFTING GmBH
@@ -5383,6 +5450,9 @@
0e11 009a NC7770 Gigabit Server Adapter (PCI-X, 10/100/1000-T)
0e11 00c1 NC6770 Gigabit Server Adapter (PCI-X, 1000-SX)
1028 0121 Broadcom BCM5701 1000Base-T
+ 10a9 8010 SGI IO9 Gigabit Ethernet (Copper)
+ 10a9 8011 SGI Gigabit Ethernet (Copper)
+ 10a9 8012 SGI Gigabit Ethernet (Fiber)
10b7 1004 3C996-SX 1000Base-SX
10b7 1006 3C996B-T 1000Base-T
10b7 1007 3C1000-T 1000Base-T
@@ -5400,6 +5470,7 @@
1647 NetXtreme BCM5703 Gigabit Ethernet
0e11 0099 NC7780 1000BaseTX
0e11 009a NC7770 1000BaseTX
+ 10a9 8010 SGI IO9 Gigabit Ethernet (Copper)
14e4 0009 BCM5703 1000BaseTX
14e4 000a BCM5703 1000BaseSX
14e4 000b BCM5703 1000BaseTX
@@ -5417,6 +5488,7 @@
165d NetXtreme BCM5705M Gigabit Ethernet
1696 NetXtreme BCM5782 Gigabit Ethernet
14e4 000d NetXtreme BCM5782 1000Base-T
+ 169c NetXtreme BCM5788 Gigabit Ethernet
16a6 NetXtreme BCM5702 Gigabit Ethernet
0e11 00bb NC7760 Gigabit Server Adapter (PCI-X, 10/100/1000-T)
1028 0126 BCM5702 1000Base-T
@@ -5442,7 +5514,9 @@
4211 BCM4211 iLine10 HomePNA 2.0 + V.90 56k modem
4212 BCM4212 v.90 56k modem
4301 BCM4301 802.11b
+ 4320 BCM94306 802.11g
4401 BCM4401 100Base-T
+ 1043 80a8 A7V8X motherboard
4402 BCM4402 Integrated 10/100BaseT
4410 BCM4413 iLine32 HomePNA 2.0
4411 BCM4413 V.90 56k modem
@@ -5531,6 +5605,9 @@
122d 4302 Dell MP3930V-W(C) MiniPCI
1610 ADSL AccessRunner PCI Arbitration Device
1611 AccessRunner PCI ADSL Interface Device
+ 1620 ADSL AccessRunner V2 PCI Arbitration Device
+ 1621 AccessRunner V2 PCI ADSL Interface Device
+ 1622 AccessRunner V2 PCI ADSL Yukon WAN Adapter
1803 HCF 56k Modem
0e11 0023 623-LAN Grizzly
0e11 0043 623-LAN Yogi
@@ -5945,6 +6022,7 @@
1638 Standard Microsystems Corp [SMC]
1100 SMC2602W EZConnect / Addtron AWA-100
163c Smart Link Ltd.
+ 3052 SmartLink SmartPCI562 56K Modem
5449 SmartPCI561 Modem
1657 Brocade Communications Systems, Inc.
165a Epix Inc
@@ -5958,6 +6036,8 @@
16ab Global Sun Technology Inc
1102 PCMCIA-to-PCI Wireless Network Bridge
16be Creatix Polymedia GmbH
+16ca CENATEK Inc
+ 0001 Rocket Drive DL
16ec U.S. Robotics
3685 Wireless Access PCI Adapter Model 022415
16f6 VideoTele.com, Inc.
@@ -6011,6 +6091,8 @@
2020 DC-390
690c 690c
dc29 DC290
+1fc0 Tumsan Oy
+ 0300 E2200 Dual E1/Rawpipe Card
2000 Smart Link Ltd.
2001 Temporal Research Ltd
2003 Smart Link Ltd.
@@ -6029,6 +6111,8 @@
0013 HiNT HC4 PCI to ISDN bridge, Multimedia audio controller
0014 HiNT HC4 PCI to ISDN bridge, Network controller
0021 HB1-SE33 PCI-PCI Bridge
+ 101a E.Band [AudioTrak Inca88]
+ 101b E.Band [AudioTrak Inca88]
8011 VXPro II Chipset
3388 8011 VXPro II Chipset CPU to PCI Bridge
8012 VXPro II Chipset
@@ -6259,7 +6343,7 @@
8d01 86C380 [ProSavageDDR K4M266]
8d02 VT8636A [ProSavage KN133] AGP4X VGA Controller (TwisterK)
8d03 VT8751 [ProSavageDDR P4M266]
- 8d04 [ProSavageDDR K4M266]
+ 8d04 VT8375 [ProSavage8 KM266/KL266]
9102 86C410 Savage 2000
1092 5932 Viper II Z200
1092 5934 Viper II Z200
@@ -6271,6 +6355,7 @@
1092 5a57 Viper II Z200
ca00 SonicVibes
544c Teralogic Inc
+ 0350 TL880-based HDTV/ATSC tuner
5455 Technische University Berlin
4458 S5933
5519 Cnet Technologies, Inc.
@@ -6377,15 +6462,20 @@
103e 82801BD PRO/100 VM (MOB) Ethernet Controller
1040 536EP Data Fax Modem
16be 1040 V.9X DSP Data Fax Modem
+ 1043 PRO/Wireless LAN 2100 3B Mini PCI Adapter
1059 82551QM Ethernet Controller
1130 82815 815 Chipset Host Bridge and Memory Controller Hub
1025 1016 Travelmate 612 TX
1043 8027 TUSL2-C Mainboard
104d 80df Vaio PCG-FX403
+ 8086 4532 D815EEA2 mainboard
+ 8086 4557 D815EGEW Mainboard
1131 82815 815 Chipset AGP Bridge
1132 82815 CGC [Chipset Graphics Controller]
1025 1016 Travelmate 612 TX
104d 80df Vaio PCG-FX403
+ 8086 4532 D815EEA2 Mainboard
+ 8086 4557 D815EGEW Mainboard
1161 82806AA PCI64 Hub Advanced Programmable Interrupt Controller
8086 1161 82806AA PCI64 Hub APIC
1162 Xscale 80200 Big Endian Companion Chip
@@ -6626,22 +6716,28 @@
1025 1016 Travelmate 612 TX
104d 80df Vaio PCG-FX403
147b 0507 TH7II-RAID
+ 8086 4532 D815EEA2 mainboard
+ 8086 4557 D815EGEW Mainboard
2443 82801BA/BAM SMBus
1014 01c6 Netvista A40/A40p
1025 1016 Travelmate 612 TX
1043 8027 TUSL2-C Mainboard
104d 80df Vaio PCG-FX403
147b 0507 TH7II-RAID
+ 8086 4532 D815EEA2 mainboard
+ 8086 4557 D815EGEW Mainboard
2444 82801BA/BAM USB (Hub #2)
1025 1016 Travelmate 612 TX
104d 80df Vaio PCG-FX403
147b 0507 TH7II-RAID
+ 8086 4532 D815EEA2 mainboard
2445 82801BA/BAM AC'97 Audio
1014 01c6 Netvista A40/A40p
1025 1016 Travelmate 612 TX
104d 80df Vaio PCG-FX403
1462 3370 STAC9721 AC
147b 0507 TH7II-RAID
+ 8086 4557 D815EGEW Mainboard
2446 Intel 537 [82801BA/BAM AC'97 Modem]
1025 1016 Travelmate 612 TX
104d 80df Vaio PCG-FX403
@@ -6660,8 +6756,12 @@
1014 023d EtherExpress PRO/100 VE
1014 0244 EtherExpress PRO/100 VE
1014 0245 EtherExpress PRO/100 VE
+ 1014 0265 PRO/100 VE Desktop Connection
+ 1014 0267 PRO/100 VE Desktop Connection
+ 1014 026a PRO/100 VE Desktop Connection
109f 315d EtherExpress PRO/100 VE
109f 3181 EtherExpress PRO/100 VE
+ 1179 ff01 PRO/100 VE Network Connection
1186 7801 EtherExpress PRO/100 VE
144d 2602 HomePNA 1M CNR
8086 3010 EtherExpress PRO/100 VE
@@ -6680,8 +6780,10 @@
1014 01c6 Netvista A40/A40p
1043 8027 TUSL2-C Mainboard
147b 0507 TH7II-RAID
+ 8086 4532 D815EEA2 mainboard
+ 8086 4557 D815EGEW Mainboard
244c 82801BAM ISA Bridge (LPC)
- 244e 82801BA/CA/DB PCI Bridge
+ 244e 82801BA/CA/DB/EB PCI Bridge
2450 82801E ISA Bridge (LPC)
2452 82801E USB
2453 82801E SMBus
@@ -6689,13 +6791,13 @@
245b 82801E IDE U100
245d 82801E Ethernet Controller 1
245e 82801E PCI Bridge
- 2480 82801CA ISA Bridge (LPC)
+ 2480 82801CA LPC Interface Controller
2482 82801CA/CAM USB (Hub #1)
1014 0220 ThinkPad A/T/X Series
104d 80e7 VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
15d9 3480 P4DP6
8086 1958 vpr Matrix 170B4
- 2483 82801CA/CAM SMBus
+ 2483 82801CA/CAM SMBus Controller
1014 0220 ThinkPad A/T/X Series
104d 80e7 VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
15d9 3480 P4DP6
@@ -6705,13 +6807,13 @@
104d 80e7 VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
15d9 3480 P4DP6
8086 1958 vpr Matrix 170B4
- 2485 82801CA/CAM AC'97 Audio
+ 2485 82801CA/CAM AC'97 Audio Controller
1014 0222 ThinkPad T23 (2647-4MG) or A30p (2653-64G)
1014 0508 ThinkPad T30
1014 051c ThinkPad A/T/X Series
104d 80e7 VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
144d c006 vpr Matrix 170B4
- 2486 82801CA/CAM AC'97 Modem
+ 2486 82801CA/CAM AC'97 Modem Controller
1014 0223 ThinkPad A/T/X Series
1014 0503 ThinkPad R31 2656BBG
1014 051a ThinkPad A/T/X Series
@@ -6729,26 +6831,40 @@
1014 0220 ThinkPad A/T/X Series
104d 80e7 VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
8086 1958 vpr Matrix 170B4
- 248b 82801CA IDE U100
+ 248b 82801CA Ultra ATA Storage Controller
15d9 3480 P4DP6
248c 82801CAM ISA Bridge (LPC)
- 24c0 82801DB ISA Bridge (LPC)
+ 24c0 82801DB LPC Interface Controller
1462 5800 845PE Max (MS-6580)
24c2 82801DB USB (Hub #1)
1462 5800 845PE Max (MS-6580)
- 24c3 82801DB SMBus
+ 24c3 82801DB/DBM SMBus Controller
1462 5800 845PE Max (MS-6580)
24c4 82801DB USB (Hub #2)
1462 5800 845PE Max (MS-6580)
- 24c5 82801DB AC'97 Audio
+ 24c5 82801DB AC'97 Audio Controller
1462 5800 845PE Max (MS-6580)
- 24c6 82801DB AC'97 Modem
+ 24c6 82801DB AC'97 Modem Controller
24c7 82801DB USB (Hub #3)
1462 5800 845PE Max (MS-6580)
- 24cb 82801DB ICH4 IDE
+ 24ca 82801DBM Ultra ATA Storage Controller
+ 24cb 82801DB Ultra ATA Storage Controller
1462 5800 845PE Max (MS-6580)
- 24cd 82801DB USB EHCI Controller
+ 24cc 82801DBM LPC Interface Controller
+ 24cd 82801DB USB2
1462 3981 845PE Max (MS-6580) Onboard USB EHCI Controller
+ 24d0 82801EB LPC Interface Controller
+ 24d1 82801EB Ultra ATA Storage Controller
+ 24d2 82801EB USB
+ 24d3 82801EB SMBus Controller
+ 24d4 82801EB USB
+ 24d5 82801EB AC'97 Audio Controller
+ 24d6 82801EB AC'97 Modem Controller
+ 24d7 82801EB USB
+ 24db 82801EB Ultra ATA Storage Controller
+ 24dc 82801EB LPC Interface Controller
+ 24dd 82801EB USB2
+ 24de 82801EB USB
2500 82820 820 (Camino) Chipset Host Bridge (MCH)
1028 0095 Precision Workstation 220 Chipset
1043 801c P3C-2000 system chipset
@@ -6764,21 +6880,39 @@
2532 82850 850 (Tehama) Chipset AGP Bridge
2533 82860 860 (Wombat) Chipset AGP Bridge
2534 82860 860 (Wombat) Chipset PCI Bridge
- 2540 e7500 [Plumas] DRAM Controller
+ 2540 E7500 Memory Controller Hub
15d9 3480 P4DP6
- 2541 e7500 [Plumas] DRAM Controller Error Reporting
+ 2541 E7000 Series Host RASUM Controller
15d9 3480 P4DP6
- 2543 e7500 [Plumas] HI_B Virtual PCI Bridge (F0)
- 2544 e7500 [Plumas] HI_B Virtual PCI Bridge (F1)
- 2545 e7500 [Plumas] HI_C Virtual PCI Bridge (F0)
- 2546 e7500 [Plumas] HI_C Virtual PCI Bridge (F1)
- 2547 e7500 [Plumas] HI_D Virtual PCI Bridge (F0)
- 2548 e7500 [Plumas] HI_D Virtual PCI Bridge (F1)
+ 2543 E7000 Series Hub Interface B PCI-to-PCI Bridge
+ 2544 E7000 Series Hub Interface B RASUM Controller
+ 2545 E7000 Series Hub Interface C PCI-to-PCI Bridge
+ 2546 E7000 Series Hub Interface C RASUM Controller
+ 2547 E7000 Series Hub Interface D PCI-to-PCI Bridge
+ 2548 E7000 Series Hub Interface D RASUM Controller
+ 254c E7501 Memory Controller Hub
+ 2550 E7505 Memory Controller Hub
+ 2551 E7000 Series RAS Controller
+ 2552 E7000 Series Processor to AGP Controller
+ 2553 E7000 Series Hub Interface B PCI-to-PCI Bridge
+ 2554 E7000 Series Hub Interface B PCI-to-PCI Bridge RAS Controller
+ 255d E7205 Memory Controller Hub
2560 82845G/GL [Brookdale-G] Chipset Host Bridge
1462 5800 845PE Max (MS-6580)
2561 82845G/GL [Brookdale-G] Chipset AGP Bridge
2562 82845G/GL [Brookdale-G] Chipset Integrated Graphics Device
+ 2570 82865G/PE/P Processor to I/O Controller
+ 2571 82865G/PE/P Processor to AGP Controller
+ 2572 82865G Integrated Graphics Device
+ 2573 82865G/PE/P Processor to PCI to CSA Bridge
+ 2576 82864G/PE/P Processor to I/O Memory Interface
+ 2578 82875P Memory Controller Hub
+ 2579 82875P Processor to AGP Controller
+ 257b 82875P Processor to PCI to CSA Bridge
+ 257e 82875P Processor to I/O Memory Interface
3092 Integrated RAID
+ 3340 82855PM Processor to I/O Controller
+ 3341 82855PM Processor to AGP Controller
3575 82830 830 Chipset Host Bridge
1014 021d ThinkPad A/T/X Series
104d 80e7 VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP
@@ -6786,6 +6920,8 @@
3577 82830 CGC [Chipset Graphics Controller]
1014 0513 ThinkPad A/T/X Series
3578 82830 830 Chipset Host Bridge
+ 3580 82852/855GM Host Bridge
+ 3582 82852/855GM Integrated Graphics Device
5200 EtherExpress PRO/100 Intelligent Server
5201 EtherExpress PRO/100 Intelligent Server
8086 0001 EtherExpress PRO/100 Server Ethernet Adapter
@@ -6801,6 +6937,7 @@
7113 82371AB/EB/MB PIIX4 ACPI
7120 82810 GMCH [Graphics Memory Controller Hub]
7121 82810 CGC [Chipset Graphics Controller]
+ 8086 4341 Cayman (CA810) Mainboard
7122 82810 DC-100 GMCH [Graphics Memory Controller Hub]
7123 82810 DC-100 CGC [Chipset Graphics Controller]
7124 82810E DC-133 GMCH [Graphics Memory Controller Hub]
@@ -6889,9 +7026,6 @@
5478 AIC-7850
5575 AVA-2930
5578 AIC-7855
- 5647 ANA-7711 TCP Offload Engine
- 9004 7710 ANA-7711F TCP Offload Engine - Optical
- 9004 7711 ANA-7711LP TCP Offload Engine - Copper
5675 AIC-755x
5678 AIC-7856
5775 AIC-755x
@@ -6933,6 +7067,8 @@
7478 AHA-2944/2944W / AIC-7874
7578 AHA-3944/3944W / AIC-7875
7678 AHA-4944W/UW / AIC-7876
+ 7710 ANA-7711F Network Accelerator Card (NAC) - Optical
+ 7711 ANA-7711C Network Accelerator Card (NAC) - Copper
7778 AIC-787x
7810 AIC-7810
7815 AIC-7815 RAID+Memory Controller IC
@@ -7038,11 +7174,18 @@
8014 ASC-29320LP U320
801e AIC-7901A U320
801f AIC-7902 U320
+ 8080 ASC-29320A U320 w/HostRAID
+ 808f AIC-7901 U320 w/HostRAID
8090 ASC-39320 U320 w/HostRAID
8091 ASC-39320D U320 w/HostRAID
8092 ASC-29320 U320 w/HostRAID
8093 ASC-29320B U320 w/HostRAID
8094 ASC-29320LP U320 w/HostRAID
+ 8095 ASC-39320(B) U320 w/HostRAID
+ 8096 ASC-39320A U320 w/HostRAID
+ 8097 ASC-29320ALP U320 w/HostRAID
+ 809c ASC-39320D(B) U320 w/HostRAID
+ 809d AIC-7902(B) U320 w/HostRAID
809e AIC-7901A U320 w/HostRAID
809f AIC-7902 U320 w/HostRAID
907f Atronics
diff --git a/hw/xfree86/scanpci/pciid2c.pl b/hw/xfree86/scanpci/pciid2c.pl
index a43bc5be6..71586d421 100644
--- a/hw/xfree86/scanpci/pciid2c.pl
+++ b/hw/xfree86/scanpci/pciid2c.pl
@@ -10,9 +10,34 @@
#
# Copyright © 2002 by The XFree86 Project, 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 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).
+#
+
+#
# Author: David Dawes
#
-# $XFree86: xc/programs/Xserver/hw/xfree86/scanpci/pciid2c.pl,v 1.2 2002/12/23 16:45:19 tsi Exp $
+# $XFree86: xc/programs/Xserver/hw/xfree86/scanpci/pciid2c.pl,v 1.3 2003/08/24 17:37:10 dawes Exp $
#
if (@ARGV[0]) {
diff --git a/hw/xfree86/scanpci/xf86PciData.h b/hw/xfree86/scanpci/xf86PciData.h
index 0fa21b6db..2253de8e5 100644
--- a/hw/xfree86/scanpci/xf86PciData.h
+++ b/hw/xfree86/scanpci/xf86PciData.h
@@ -1,6 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/scanpci/xf86PciData.h,v 1.2 2002/07/15 20:46:02 dawes Exp $ */
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/scanpci/xf86PciData.h,v 1.3 2003/08/24 17:37:10 dawes Exp $ */
+/*
+ * Copyright (c) 2000-2002 by The XFree86 Project, 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 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).
+ */
#ifndef PCI_DATA_H_
#define PCI_DATA_H_
diff --git a/hw/xfree86/scanpci/xf86PciStdIds.h b/hw/xfree86/scanpci/xf86PciStdIds.h
index 58403ccf7..ff8f3d14a 100644
--- a/hw/xfree86/scanpci/xf86PciStdIds.h
+++ b/hw/xfree86/scanpci/xf86PciStdIds.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/scanpci/xf86PciStdIds.h,v 1.10 2003/02/26 16:33:03 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/scanpci/xf86PciStdIds.h,v 1.14 2003/10/30 15:26:34 tsi Exp $ */
/*
* THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT
@@ -189,7 +189,7 @@ static const char pci_device_1000_0020[] = "53c1010 Ultra3 SCSI Adapter";
static const char pci_subsys_1000_0020_1de1_1020[] = "DC-390U3W";
#endif
static const char pci_device_1000_0021[] = "53c1010 66MHz Ultra3 SCSI Adapter";
-static const char pci_device_1000_0030[] = "53c1030";
+static const char pci_device_1000_0030[] = "53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI";
#endif
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1000_0030_1028_1010[] = "LSI U320 SCSI Controller";
@@ -253,6 +253,7 @@ static const char pci_device_1001_0017[] = "PROTO-3 PCI Prototyping board";
static const char pci_device_1001_9100[] = "INI-9100/9100W SCSI Host";
#endif
static const char pci_vendor_1002[] = "ATI Technologies Inc";
+static const char pci_device_1002_4136[] = "Radeon IGP 320 M";
static const char pci_device_1002_4144[] = "Radeon R300 AD [Radeon 9500 Pro]";
static const char pci_device_1002_4145[] = "Radeon R300 AE [Radeon 9500 Pro]";
static const char pci_device_1002_4146[] = "Radeon R300 AF [Radeon 9500 Pro]";
@@ -537,14 +538,19 @@ static const char pci_device_1002_4c66[] = "Radeon R250 Lf [Radeon Mobility 9000
static const char pci_device_1002_4c67[] = "Radeon R250 Lg [Radeon Mobility 9000 M9]";
static const char pci_device_1002_4d46[] = "Rage Mobility M4 AGP";
static const char pci_device_1002_4d4c[] = "Rage Mobility M4 AGP";
-static const char pci_device_1002_4e44[] = "Radeon R300 ND [Radeon 9700]";
-static const char pci_device_1002_4e45[] = "Radeon R300 NE [Radeon 9700]";
+static const char pci_device_1002_4e44[] = "Radeon R300 ND [Radeon 9700 Pro]";
+static const char pci_device_1002_4e45[] = "Radeon R300 NE [Radeon 9500 Pro]";
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1002_4e45_1002_0002[] = "Radeon R300 NE [Radeon 9500 Pro]";
+#endif
static const char pci_device_1002_4e46[] = "Radeon R300 NF [Radeon 9700]";
static const char pci_device_1002_4e47[] = "Radeon R300 NG [FireGL X1]";
+static const char pci_device_1002_4e48[] = "Radeon R350 [Radeon 9800]";
static const char pci_device_1002_4e64[] = "Radeon R300 [Radeon 9700 Pro] (Secondary)";
-static const char pci_device_1002_4e65[] = "Radeon R300 [Radeon 9700] (Secondary)";
+static const char pci_device_1002_4e65[] = "Radeon R300 [Radeon 9500 Pro] (Secondary)";
static const char pci_device_1002_4e66[] = "Radeon R300 [Radeon 9700] (Secondary)";
static const char pci_device_1002_4e67[] = "Radeon R300 [FireGL X1] (Secondary)";
+static const char pci_device_1002_4e68[] = "Radeon R350 [Radeon 9800] (Secondary)";
static const char pci_device_1002_5041[] = "Rage 128 PA/PRO";
static const char pci_device_1002_5042[] = "Rage 128 PB/PRO AGP 2x";
static const char pci_device_1002_5043[] = "Rage 128 PC/PRO AGP 4x";
@@ -789,6 +795,9 @@ static const char pci_subsys_1002_524c_1002_0088[] = "Xpert 99";
#endif
static const char pci_device_1002_5345[] = "Rage 128 SE/4x";
static const char pci_device_1002_5346[] = "Rage 128 SF/4x AGP 2x";
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1002_5346_1002_0048[] = "RAGE 128 16MB VGA TVOUT AMC PAL";
+#endif
static const char pci_device_1002_5347[] = "Rage 128 SG/4x AGP 4x";
static const char pci_device_1002_5348[] = "Rage 128 SH";
static const char pci_device_1002_534b[] = "Rage 128 SK/4x";
@@ -847,7 +856,9 @@ static const char pci_subsys_1002_5654_1002_5654[] = "Mach64VT Reference";
#endif
static const char pci_device_1002_5655[] = "264VT3 [Mach64 VT3]";
static const char pci_device_1002_5656[] = "264VT4 [Mach64 VT4]";
-static const char pci_device_1002_700f[] = "U1/A3 AGP Bridge [IGP 320M]";
+static const char pci_device_1002_700f[] = "PCI Bridge [IGP 320M]";
+static const char pci_device_1002_7010[] = "PCI Bridge [IGP 340M]";
+static const char pci_device_1002_cab2[] = "RS200/RS200M AGP Bridge [IGP 340M]";
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_1003[] = "ULSI Systems";
static const char pci_device_1003_0201[] = "US201";
@@ -1021,6 +1032,7 @@ static const char pci_device_1011_0014[] = "DECchip 21041 [Tulip Pass 3]";
static const char pci_subsys_1011_0014_1186_0100[] = "DE-530+";
#endif
static const char pci_device_1011_0016[] = "DGLPB [OPPO]";
+static const char pci_device_1011_0017[] = "PV-PCI Graphics Controller (ZLXp-L)";
static const char pci_device_1011_0019[] = "DECchip 21142/43";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1011_0019_1011_500a[] = "DE500A Fast Ethernet";
@@ -1716,8 +1728,9 @@ static const char pci_subsys_1028_0004_1028_00d0[] = "PowerEdge Expandable RAID
#endif
static const char pci_device_1028_0005[] = "PowerEdge Expandable RAID Controller 3/Di";
static const char pci_device_1028_0006[] = "PowerEdge Expandable RAID Controller 3/Di";
-static const char pci_device_1028_0007[] = "Remote Assistant Card 3";
-static const char pci_device_1028_0008[] = "PowerEdge Expandable RAID Controller 3/Di";
+static const char pci_device_1028_0007[] = "Remote Access Controller:DRAC III";
+static const char pci_device_1028_0008[] = "Remote Access Controller";
+static const char pci_device_1028_0009[] = "BMC/SMIC device not present";
static const char pci_device_1028_000a[] = "PowerEdge Expandable RAID Controller 3";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1028_000a_1028_0106[] = "PowerEdge Expandable RAID Controller 3/Di";
@@ -1728,7 +1741,8 @@ static const char pci_subsys_1028_000a_1028_011b[] = "PowerEdge Expandable RAID
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1028_000a_1028_0121[] = "PowerEdge Expandable RAID Controller 3/Di";
#endif
-static const char pci_device_1028_000c[] = "Embedded Systems Management Device 4";
+static const char pci_device_1028_000c[] = "Remote Access Controller:ERA or ERA/O";
+static const char pci_device_1028_000d[] = "BMC/SMIC device";
static const char pci_device_1028_000e[] = "PowerEdge Expandable RAID Controller";
static const char pci_device_1028_000f[] = "PowerEdge Expandable RAID Controller 4/Di";
#ifdef VENDOR_INCLUDE_NONVIDEO
@@ -1741,6 +1755,7 @@ static const char pci_device_102a_0010[] = "ASPEN";
#endif
static const char pci_vendor_102b[] = "Matrox Graphics, Inc.";
static const char pci_device_102b_0010[] = "MGA-I [Impression?]";
+static const char pci_device_102b_0100[] = "MGA 1064SG [Mystique]";
static const char pci_device_102b_0518[] = "MGA-II [Athena]";
static const char pci_device_102b_0519[] = "MGA 2064W [Millennium]";
static const char pci_device_102b_051a[] = "MGA 1064SG [Mystique]";
@@ -2244,6 +2259,7 @@ static const char pci_device_1039_0633[] = "633 Host";
static const char pci_device_1039_0635[] = "635 Host";
static const char pci_device_1039_0645[] = "SiS645 Host & Memory & AGP Controller";
static const char pci_device_1039_0646[] = "SiS645DX Host & Memory & AGP Controller";
+static const char pci_device_1039_0648[] = "SiS 645xx";
static const char pci_device_1039_0650[] = "650 Host";
static const char pci_device_1039_0651[] = "SiS651 Host";
static const char pci_device_1039_0730[] = "730 Host";
@@ -2251,6 +2267,7 @@ static const char pci_device_1039_0733[] = "733 Host";
static const char pci_device_1039_0735[] = "735 Host";
static const char pci_device_1039_0740[] = "740 Host";
static const char pci_device_1039_0745[] = "745 Host";
+static const char pci_device_1039_0755[] = "SiS 755 Host Bridge";
static const char pci_device_1039_0900[] = "SiS900 10/100 Ethernet";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1039_0900_1039_0900[] = "SiS900 10/100 Ethernet Adapter";
@@ -2309,18 +2326,18 @@ static const char pci_subsys_1039_6326_1092_4920[] = "SpeedStar A70";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1039_6326_1569_6326[] = "SiS6326 GUI Accelerator";
#endif
-static const char pci_device_1039_7001[] = "SiS7001 USB Controller";
+static const char pci_device_1039_7001[] = "USB 1.0 Controller";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1039_7001_1039_7000[] = "Onboard USB Controller";
#endif
-static const char pci_device_1039_7002[] = "SiS7002 USB 2.0";
+static const char pci_device_1039_7002[] = "USB 2.0 Controller";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1039_7002_1509_7002[] = "Onboard USB Controller";
#endif
static const char pci_device_1039_7007[] = "FireWire Controller";
-static const char pci_device_1039_7012[] = "SiS7012 PCI Audio Accelerator";
+static const char pci_device_1039_7012[] = "Sound Controller";
static const char pci_device_1039_7013[] = "Intel 537 [56k Winmodem]";
-static const char pci_device_1039_7016[] = "SiS7016 10/100 Ethernet Adapter";
+static const char pci_device_1039_7016[] = "10/100 Ethernet Adapter";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1039_7016_1039_7016[] = "SiS7016 10/100 Ethernet Adapter";
#endif
@@ -2472,6 +2489,7 @@ static const char pci_device_103c_1229[] = "zx1 System Bus Adapter";
static const char pci_device_103c_122a[] = "zx1 I/O Controller";
static const char pci_device_103c_122e[] = "zx1 Local Bus Adapter";
static const char pci_device_103c_1290[] = "Auxiliary Diva Serial Port";
+static const char pci_device_103c_12b4[] = "zx1 QuickSilver AGP8x LBA";
static const char pci_device_103c_2910[] = "E2910A PCIBus Exerciser";
static const char pci_device_103c_2925[] = "E2925A 32 Bit, 33 MHzPCI Exerciser & Analyzer";
#ifdef VENDOR_INCLUDE_NONVIDEO
@@ -2488,8 +2506,8 @@ static const char pci_vendor_1041[] = "Computrend";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_1042[] = "Micron";
-static const char pci_device_1042_1000[] = "FDC 37C665";
-static const char pci_device_1042_1001[] = "37C922";
+static const char pci_device_1042_1000[] = "PC Tech RZ1000";
+static const char pci_device_1042_1001[] = "PC Tech RZ1001";
static const char pci_device_1042_3000[] = "Samurai_0";
static const char pci_device_1042_3010[] = "Samurai_1";
static const char pci_device_1042_3020[] = "Samurai_IDE";
@@ -2974,6 +2992,9 @@ static const char pci_subsys_105a_0d38_105a_4d39[] = "Fasttrak66";
#endif
static const char pci_device_105a_1275[] = "20275";
static const char pci_device_105a_3376[] = "PDC20376";
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_105a_3376_1043_809e[] = "A7V8X motherboard";
+#endif
static const char pci_device_105a_4d30[] = "20267";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_105a_4d30_105a_4d33[] = "Ultra100";
@@ -3000,6 +3021,9 @@ static const char pci_device_105a_4d68[] = "20268";
static const char pci_subsys_105a_4d68_105a_4d68[] = "Ultra100TX2";
#endif
static const char pci_device_105a_4d69[] = "20269";
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_105a_4d69_105a_4d68[] = "Ultra133TX2";
+#endif
static const char pci_device_105a_5275[] = "PDC20276 IDE";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_105a_5275_105a_0275[] = "SuperTrak SX6000 IDE";
@@ -3111,6 +3135,9 @@ static const char pci_subsys_105d_493d_13cc_0009[] = "Barco Metheus 5 Megapixel,
static const char pci_subsys_105d_493d_13cc_000a[] = "Barco Metheus 5 Megapixel, Dual Head";
#endif
static const char pci_device_105d_5348[] = "Revolution 4";
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_105d_5348_105d_0037[] = "Revolution IV-FP AGP (For SGI 1600SW)";
+#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_105e[] = "Vtech Computers Ltd";
#endif
@@ -3328,6 +3355,9 @@ static const char pci_device_1077_2100[] = "QLA2100 64-bit Fibre Channel Adapter
static const char pci_subsys_1077_2100_1077_0001[] = "QLA2100 64-bit Fibre Channel Adapter";
#endif
static const char pci_device_1077_2200[] = "QLA2200";
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1077_2200_1077_0002[] = "QLA2200";
+#endif
static const char pci_device_1077_2300[] = "QLA2300 64-bit FC-AL Adapter";
static const char pci_device_1077_2312[] = "QLA2312 Fibre Channel Adapter";
#endif
@@ -3540,6 +3570,7 @@ static const char pci_vendor_1094[] = "First International Computers [FIC]";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_1095[] = "CMD Technology Inc";
+static const char pci_device_1095_0240[] = "Adaptec AAR-1210SA SATA HostRAID Controller";
static const char pci_device_1095_0640[] = "PCI0640";
static const char pci_device_1095_0643[] = "PCI0643";
static const char pci_device_1095_0646[] = "PCI0646";
@@ -3926,6 +3957,7 @@ static const char pci_vendor_10a4[] = "Globe Manufacturing Sales";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_10a5[] = "Smart Link Ltd.";
+static const char pci_device_10a5_3052[] = "SmartPCI562 56K Modem";
static const char pci_device_10a5_5449[] = "SmartPCI561 modem";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
@@ -3949,6 +3981,9 @@ static const char pci_device_10a9_0006[] = "HPCEX";
static const char pci_device_10a9_0007[] = "RPCEX";
static const char pci_device_10a9_0008[] = "DiVO VIP";
static const char pci_device_10a9_0009[] = "Alteon Gigabit Ethernet";
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_10a9_0009_10a9_8002[] = "Acenic Gigabit Ethernet";
+#endif
static const char pci_device_10a9_0010[] = "AMP Video I/O";
static const char pci_device_10a9_0011[] = "GRIP";
static const char pci_device_10a9_0012[] = "SGH PSHAC GSN";
@@ -3960,6 +3995,7 @@ static const char pci_device_10a9_1005[] = "Dual JPEG 3";
static const char pci_device_10a9_1006[] = "Dual JPEG 4";
static const char pci_device_10a9_1007[] = "Dual JPEG 5";
static const char pci_device_10a9_1008[] = "Cesium";
+static const char pci_device_10a9_100a[] = "IOC4 I/O controller";
static const char pci_device_10a9_2001[] = "Fibre Channel";
static const char pci_device_10a9_2002[] = "ASDE";
static const char pci_device_10a9_8001[] = "O2 1394";
@@ -4130,6 +4166,9 @@ static const char pci_device_10b5_9054[] = "PCI <-> IOBus Bridge";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_10b5_9054_10b5_2455[] = "Wessex Techology PHIL-PCI";
#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_10b5_9054_12d9_0002[] = "PCI Prosody Card rev 1.5";
+#endif
static const char pci_device_10b5_9060[] = "9060";
static const char pci_device_10b5_906d[] = "9060SD";
#ifdef INIT_SUBSYS_INFO
@@ -4143,6 +4182,9 @@ static const char pci_subsys_10b5_9080_10b5_9080[] = "9080 [real subsystem ID no
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_10b5_9080_129d_0002[] = "Aculab PCI Prosidy card";
#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_10b5_9080_12d9_0002[] = "PCI Prosody Card";
+#endif
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_10b6[] = "Madge Networks";
@@ -4200,6 +4242,7 @@ static const char pci_device_10b6_1001[] = "Collage 155 ATM Server Adapter";
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_10b7[] = "3Com Corporation";
static const char pci_device_10b7_0001[] = "3c985 1000BaseSX (SX/TX)";
+static const char pci_device_10b7_0910[] = "3C910-A01";
static const char pci_device_10b7_1006[] = "MINI PCI type 3B Data Fax Modem";
static const char pci_device_10b7_1007[] = "Mini PCI 56k Winmodem";
#ifdef INIT_SUBSYS_INFO
@@ -4491,6 +4534,7 @@ static const char pci_device_10b8_1001[] = "FDC 37C922";
static const char pci_device_10b8_a011[] = "83C170QF";
static const char pci_device_10b8_b106[] = "SMC34C90";
#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_10b9[] = "ALi Corporation";
static const char pci_device_10b9_0111[] = "C-Media CMI8738/C3DX Audio Device (OEM)";
#ifdef INIT_SUBSYS_INFO
@@ -4561,6 +4605,7 @@ static const char pci_device_10b9_5249[] = "M5249 HTT to PCI Bridge";
static const char pci_device_10b9_5251[] = "M5251 P1394 OHCI 1.0 Controller";
static const char pci_device_10b9_5253[] = "M5253 P1394 OHCI 1.1 Controller";
static const char pci_device_10b9_5261[] = "M5261 Ethernet Controller";
+static const char pci_device_10b9_5450[] = "Lucent Technologies Soft Modem AMR";
static const char pci_device_10b9_5451[] = "M5451 PCI AC-Link Controller Audio Device";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_10b9_5451_1014_0506[] = "ThinkPad R30";
@@ -4576,6 +4621,7 @@ static const char pci_device_10b9_7101[] = "M7101 PMU";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_10b9_7101_10b9_7101[] = "ALI M7101 Power Management Controller";
#endif
+#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_10ba[] = "Mitsubishi Electric Corp.";
static const char pci_device_10ba_0301[] = "AccelGraphics AccelECLIPSE";
@@ -4895,6 +4941,9 @@ static const char pci_subsys_10de_0028_1043_0205[] = "PCI-V3800";
static const char pci_subsys_10de_0028_1043_4000[] = "AGP-V3800PRO";
#endif
#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_10de_0028_1048_0c21[] = "Synergy II";
+#endif
+#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_10de_0028_1092_4804[] = "Viper V770";
#endif
#ifdef INIT_SUBSYS_INFO
@@ -5099,6 +5148,9 @@ static const char pci_device_10de_0153[] = "NV15GL [Quadro2 Pro]";
static const char pci_device_10de_0170[] = "NV17 [GeForce4 MX 460]";
static const char pci_device_10de_0171[] = "NV17 [GeForce4 MX 440]";
#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_10de_0171_10b0_0002[] = "Gainward Pro/600 TV";
+#endif
+#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_10de_0171_1462_8661[] = "G4MX440-VTP";
#endif
#ifdef INIT_SUBSYS_INFO
@@ -5490,6 +5542,12 @@ static const char pci_subsys_1102_0002_1102_8051[] = "CT4850 SBLive! Value";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1102_0002_1102_8061[] = "SBLive! Player 5.1";
#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1102_0002_1102_8064[] = "SB Live! 5.1 Model SB0100";
+#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1102_0002_1102_8065[] = "SBLive! 5.1 Digital Model SB0220";
+#endif
static const char pci_device_1102_0004[] = "SB Audigy";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1102_0004_1102_0051[] = "SB0090 Audigy Player";
@@ -5512,7 +5570,7 @@ static const char pci_subsys_1102_7003_1102_0040[] = "SB Audigy MIDI/Game Port";
#endif
static const char pci_device_1102_7004[] = "[SB Live! Value] Input device controller";
static const char pci_device_1102_8064[] = "SB0100 [SBLive! 5.1 OEM]";
-static const char pci_device_1102_8938[] = "ES1371";
+static const char pci_device_1102_8938[] = "Ectiva EV1938";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_1103[] = "Triones Technologies, Inc.";
@@ -5528,6 +5586,7 @@ static const char pci_device_1103_0005[] = "HPT372A";
static const char pci_device_1103_0006[] = "HPT302";
static const char pci_device_1103_0007[] = "HPT371";
static const char pci_device_1103_0008[] = "HPT374";
+static const char pci_device_1103_0009[] = "HPT372N";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_1104[] = "RasterOps Corp.";
@@ -5538,6 +5597,7 @@ static const char pci_device_1105_1105[] = "REALmagic Xcard MPEG 1/2/3/4 DVD Dec
static const char pci_device_1105_8300[] = "REALmagic Hollywood Plus DVD Decoder";
static const char pci_device_1105_8400[] = "EM840x REALmagic DVD/MPEG-2 Audio/Video Decoder";
#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_1106[] = "VIA Technologies, Inc.";
static const char pci_device_1106_0102[] = "Embedded VIA Ethernet Controller";
static const char pci_device_1106_0130[] = "VT6305 1394.A Controller";
@@ -5557,13 +5617,19 @@ static const char pci_subsys_1106_0305_147b_a401[] = "KT7/KT7-RAID/KT7A/KT7A-RAI
static const char pci_device_1106_0391[] = "VT8371 [KX133]";
static const char pci_device_1106_0501[] = "VT8501 [Apollo MVP4]";
static const char pci_device_1106_0505[] = "VT82C505";
-static const char pci_device_1106_0561[] = "VT82C561";
-static const char pci_device_1106_0571[] = "VT82C586/B/686A/B PIPC Bus Master IDE";
+static const char pci_device_1106_0561[] = "VT82C576MV";
+static const char pci_device_1106_0571[] = "VT82C586A/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE";
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1106_0571_1019_0985[] = "P6VXA Motherboard";
+#endif
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1106_0571_1043_8052[] = "VT8233A Bus Master ATA100/66/33 IDE";
#endif
#ifdef INIT_SUBSYS_INFO
-static const char pci_subsys_1106_0571_1106_0571[] = "VT8235 Bus Master ATA133/100/66/33 IDE";
+static const char pci_subsys_1106_0571_1043_808c[] = "A7V8X motherboard";
+#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1106_0571_1106_0571[] = "VT82C586/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE";
#endif
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1106_0571_1179_0001[] = "Magnia Z310";
@@ -5589,9 +5655,18 @@ static const char pci_device_1106_0597[] = "VT82C597 [Apollo VP3]";
static const char pci_device_1106_0598[] = "VT82C598 [Apollo MVP3]";
static const char pci_device_1106_0601[] = "VT8601 [Apollo ProMedia]";
static const char pci_device_1106_0605[] = "VT8605 [ProSavage PM133]";
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1106_0605_1043_802c[] = "CUV4X mainboard";
+#endif
static const char pci_device_1106_0680[] = "VT82C680 [Apollo P6]";
static const char pci_device_1106_0686[] = "VT82C686 [Apollo Super South]";
#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1106_0686_1019_0985[] = "P6VXA Motherboard";
+#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1106_0686_1043_802c[] = "CUV4X mainboard";
+#endif
+#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1106_0686_1043_8033[] = "A7V Mainboard";
#endif
#ifdef INIT_SUBSYS_INFO
@@ -5617,6 +5692,9 @@ static const char pci_subsys_1106_0686_147b_a702[] = "KG7-Lite Mainboard";
#endif
static const char pci_device_1106_0691[] = "VT82C693A/694x [Apollo PRO133x]";
#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1106_0691_1019_0985[] = "P6VXA Motherboard";
+#endif
+#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1106_0691_1179_0001[] = "Magnia Z310";
#endif
#ifdef INIT_SUBSYS_INFO
@@ -5627,13 +5705,19 @@ static const char pci_device_1106_0698[] = "VT82C693A [Apollo Pro133 AGP]";
static const char pci_device_1106_0926[] = "VT82C926 [Amazon]";
static const char pci_device_1106_1000[] = "VT82C570MV";
static const char pci_device_1106_1106[] = "VT82C570MV";
-static const char pci_device_1106_1571[] = "VT82C416MV";
+static const char pci_device_1106_1571[] = "VT82C576M/VT82C586";
static const char pci_device_1106_1595[] = "VT82C595/97 [Apollo VP2/97]";
static const char pci_device_1106_3038[] = "USB";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1106_3038_0925_1234[] = "USB Controller";
#endif
#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1106_3038_1019_0985[] = "P6VXA Motherboard";
+#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1106_3038_1043_808c[] = "A7V8X motherboard";
+#endif
+#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1106_3038_1179_0001[] = "Magnia Z310";
#endif
static const char pci_device_1106_3040[] = "VT82C586B ACPI";
@@ -5652,6 +5736,9 @@ static const char pci_device_1106_3050[] = "VT82C596 Power Management";
static const char pci_device_1106_3051[] = "VT82C596 Power Management";
static const char pci_device_1106_3057[] = "VT82C686 [Apollo Super ACPI]";
#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1106_3057_1019_0985[] = "P6VXA Motherboard";
+#endif
+#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1106_3057_1043_8033[] = "A7V Mainboard";
#endif
#ifdef INIT_SUBSYS_INFO
@@ -5667,9 +5754,14 @@ static const char pci_subsys_1106_3057_1043_8042[] = "A7V133/A7V133-C Mainboard"
static const char pci_subsys_1106_3057_1179_0001[] = "Magnia Z310";
#endif
static const char pci_device_1106_3058[] = "VT82C686 AC97 Audio Controller";
+#endif
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1106_3058_0e11_b194[] = "Soundmax integrated digital audio";
#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1106_3058_1019_0985[] = "P6VXA Motherboard";
+#endif
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1106_3058_1106_4511[] = "Onboard Audio on EP7KXA";
#endif
@@ -5682,7 +5774,10 @@ static const char pci_subsys_1106_3058_1462_3091[] = "MS-6309 Onboard Audio";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1106_3058_15dd_7609[] = "Onboard Audio";
#endif
-static const char pci_device_1106_3059[] = "VT8233 AC97 Audio Controller";
+static const char pci_device_1106_3059[] = "VT8233/A/8235 AC97 Audio Controller";
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1106_3059_1043_8095[] = "A7V8X Motherboard (Realtek ALC650 codec)";
+#endif
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1106_3059_1458_a002[] = "GA-7VAX Onboard Audio (Realtek ALC650)";
#endif
@@ -5696,6 +5791,9 @@ static const char pci_subsys_1106_3065_1186_1400[] = "DFE-530TX rev A";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1106_3065_1186_1401[] = "DFE-530TX rev B";
#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1106_3065_13b9_1421[] = "LD-10/100AL PCI Fast Ethernet Adapter (rev.B)";
+#endif
static const char pci_device_1106_3068[] = "Intel 537 [AC97 Modem]";
static const char pci_device_1106_3074[] = "VT8233 PCI to ISA Bridge";
#ifdef INIT_SUBSYS_INFO
@@ -5714,12 +5812,15 @@ static const char pci_device_1106_3102[] = "VT8662 Host Bridge";
static const char pci_device_1106_3103[] = "VT8615 Host Bridge";
static const char pci_device_1106_3104[] = "USB 2.0";
#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1106_3104_1043_808c[] = "A7V8X motherboard";
+#endif
+#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1106_3104_1458_5004[] = "GA-7VAX Mainboard";
#endif
static const char pci_device_1106_3106[] = "VT6105 [Rhine-III]";
static const char pci_device_1106_3109[] = "VT8233C PCI to ISA Bridge";
static const char pci_device_1106_3112[] = "VT8361 [KLE133] Host Bridge";
-static const char pci_device_1106_3116[] = "VT8375 [KM266] Host Bridge";
+static const char pci_device_1106_3116[] = "VT8375 [KM266/KL266] Host Bridge";
static const char pci_device_1106_3122[] = "VT8623 [Apollo CLE266] integrated CastleRock graphics";
static const char pci_device_1106_3123[] = "VT8623 [Apollo CLE266]";
static const char pci_device_1106_3128[] = "VT8753 [P4X266 AGP]";
@@ -5730,10 +5831,16 @@ static const char pci_device_1106_3156[] = "P/KN266 Host Bridge";
static const char pci_device_1106_3168[] = "VT8374 P4X400 Host Controller/AGP Bridge";
static const char pci_device_1106_3177[] = "VT8235 ISA Bridge";
#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1106_3177_1043_808c[] = "A7V8X motherboard";
+#endif
+#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1106_3177_1458_5001[] = "GA-7VAX Mainboard";
#endif
static const char pci_device_1106_3189[] = "VT8377 [KT400 AGP] Host Bridge";
#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1106_3189_1043_807f[] = "A7V8X motherboard";
+#endif
+#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_1106_3189_1458_5000[] = "GA-7VAX Mainboard";
#endif
static const char pci_device_1106_5030[] = "VT82C596 ACPI [Apollo PRO]";
@@ -5746,6 +5853,9 @@ static const char pci_device_1106_8501[] = "VT8501 [Apollo MVP4 AGP]";
static const char pci_device_1106_8596[] = "VT82C596 [Apollo PRO AGP]";
static const char pci_device_1106_8597[] = "VT82C597 [Apollo VP3 AGP]";
static const char pci_device_1106_8598[] = "VT82C598/694x [Apollo MVP3/Pro133x AGP]";
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_1106_8598_1019_0985[] = "P6VXA Motherboard";
+#endif
static const char pci_device_1106_8601[] = "VT8601 [Apollo ProMedia AGP]";
static const char pci_device_1106_8605[] = "VT8605 [PM133 AGP]";
static const char pci_device_1106_8691[] = "VT82C691 [Apollo Pro]";
@@ -5757,6 +5867,7 @@ static const char pci_device_1106_b102[] = "VT8362 AGP Bridge";
static const char pci_device_1106_b103[] = "VT8615 AGP Bridge";
static const char pci_device_1106_b112[] = "VT8361 [KLE133] AGP Bridge";
static const char pci_device_1106_b168[] = "VT8235 PCI Bridge";
+#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_1107[] = "Stratus Computers";
static const char pci_device_1107_0576[] = "VIA VT82C570MV [Apollo] (Wrong vendor ID!)";
@@ -5780,6 +5891,12 @@ static const char pci_device_1109_1400[] = "EM110TX [EX110TX]";
static const char pci_vendor_110a[] = "Siemens Nixdorf AG";
static const char pci_device_110a_0002[] = "Pirahna 2-port";
static const char pci_device_110a_0005[] = "Tulip controller, power management, switch extender";
+static const char pci_device_110a_0006[] = "FSC PINC (I/O-APIC)";
+static const char pci_device_110a_0015[] = "FSC Multiprocessor Interrupt Controller";
+static const char pci_device_110a_001d[] = "FSC Copernicus Management Controller";
+static const char pci_device_110a_007b[] = "FSC Remote Service Controller, mailbox device";
+static const char pci_device_110a_007c[] = "FSC Remote Service Controller, shared memory device";
+static const char pci_device_110a_007d[] = "FSC Remote Service Controller, SMIC device";
static const char pci_device_110a_2102[] = "DSCC4 WAN adapter";
static const char pci_device_110a_4942[] = "FPGA I-Bus Tracer for MBD";
static const char pci_device_110a_6120[] = "SZB6120";
@@ -6578,6 +6695,7 @@ static const char pci_device_1165_0001[] = "Motion TPEG Recorder/Player with aud
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_1166[] = "ServerWorks";
static const char pci_device_1166_0005[] = "CNB20-LE Host Bridge";
+static const char pci_device_1166_0006[] = "CNB20HE Host Bridge";
static const char pci_device_1166_0007[] = "CNB20-LE Host Bridge";
static const char pci_device_1166_0008[] = "CNB20HE Host Bridge";
static const char pci_device_1166_0009[] = "CNB20LE Host Bridge";
@@ -7179,6 +7297,11 @@ static const char pci_subsys_11c1_0442_1668_0440[] = "LT WinModem 56k Data+Fax+V
static const char pci_device_11c1_0443[] = "LT WinModem";
static const char pci_device_11c1_0444[] = "LT WinModem";
static const char pci_device_11c1_0445[] = "LT WinModem";
+#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_11c1_0445_8086_2203[] = "PRO/100+ MiniPCI (probably an Ambit U98.003.C.00 combo card)";
+#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_device_11c1_0446[] = "LT WinModem";
static const char pci_device_11c1_0447[] = "LT WinModem";
static const char pci_device_11c1_0448[] = "WinModem 56k";
@@ -8157,6 +8280,7 @@ static const char pci_subsys_1260_3873_1737_3874[] = "WMP11 Wireless 802.11b PCI
static const char pci_subsys_1260_3873_8086_2513[] = "Wireless 802.11b MiniPCI Adapter";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
+static const char pci_device_1260_3890[] = "D-Links DWL-g650 A1";
static const char pci_device_1260_8130[] = "HMP8130 NTSC/PAL Video Decoder";
static const char pci_device_1260_8131[] = "HMP8131 NTSC/PAL Video Decoder";
#endif
@@ -8213,6 +8337,7 @@ static const char pci_vendor_126f[] = "Silicon Motion, Inc.";
static const char pci_device_126f_0710[] = "SM710 LynxEM";
static const char pci_device_126f_0712[] = "SM712 LynxEM+";
static const char pci_device_126f_0720[] = "SM720 Lynx3DM";
+static const char pci_device_126f_0730[] = "SM731 Cougar3DR";
static const char pci_device_126f_0810[] = "SM810 LynxE";
static const char pci_device_126f_0811[] = "SM811 LynxE";
static const char pci_device_126f_0820[] = "SM820 Lynx3D";
@@ -8232,6 +8357,7 @@ static const char pci_device_1273_0002[] = "DirecPC";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_1274[] = "Ensoniq";
+static const char pci_device_1274_1171[] = "ES1373 [AudioPCI] (also Creative Labs CT5803)";
static const char pci_device_1274_1371[] = "ES1371 [AudioPCI-97]";
#endif
#ifdef INIT_SUBSYS_INFO
@@ -8463,6 +8589,7 @@ static const char pci_vendor_1277[] = "Comstream";
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_1278[] = "Transtech Parallel Systems Ltd.";
static const char pci_device_1278_0701[] = "TPE3/TM3 PowerPC Node";
+static const char pci_device_1278_0710[] = "TPE5 PowerPC PCI board";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_1279[] = "Transmeta Corporation";
@@ -8971,6 +9098,9 @@ static const char pci_subsys_12ae_0001_1410_0104[] = "Gigabit Ethernet-SX PCI Ad
#endif
static const char pci_device_12ae_0002[] = "AceNIC Gigabit Ethernet (Copper)";
#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_12ae_0002_10a9_8002[] = "Acenic Gigabit Ethernet";
+#endif
+#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_12ae_0002_12ae_0002[] = "Gigabit Ethernet-T (3C986-T)";
#endif
#endif
@@ -9208,6 +9338,7 @@ static const char pci_vendor_12d3[] = "Vingmed Sound A/S";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_12d4[] = "Ulticom (Formerly DGM&S)";
+static const char pci_device_12d4_0200[] = "T1 Card";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_12d5[] = "Equator Technologies";
@@ -9223,6 +9354,8 @@ static const char pci_vendor_12d8[] = "Pericom Semiconductor";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_12d9[] = "Aculab PLC";
+static const char pci_device_12d9_0002[] = "PCI Prosody";
+static const char pci_device_12d9_0004[] = "cPCI Prosody";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_12da[] = "True Time Inc.";
@@ -9516,6 +9649,7 @@ static const char pci_device_1307_0035[] = "PCI-DAS64/M1/16";
static const char pci_device_1307_0036[] = "PCI-DAS64/M2/16";
static const char pci_device_1307_0037[] = "PCI-DAS64/M3/16";
static const char pci_device_1307_004c[] = "PCI-DAS1000";
+static const char pci_device_1307_004d[] = "PCI-QUAD04";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_1308[] = "Jato Technologies Inc.";
@@ -9683,6 +9817,7 @@ static const char pci_vendor_1331[] = "Radisys Corp.";
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_1332[] = "Micro Memory";
static const char pci_device_1332_5415[] = "MM-5415CN PCI Memory Module with Battery Backup";
+static const char pci_device_1332_5425[] = "MM-5425CN PCI 64/66 Memory Module with Battery Backup";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_1334[] = "Redcreek Communications, Inc";
@@ -9940,6 +10075,7 @@ static const char pci_vendor_1384[] = "Reality Simulation Systems Inc";
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_1385[] = "Netgear";
static const char pci_device_1385_4100[] = "802.11b Wireless Adapter (MA301)";
+static const char pci_device_1385_4105[] = "MA311 802.11b wireless adapter";
static const char pci_device_1385_620a[] = "GA620";
static const char pci_device_1385_622a[] = "GA622";
static const char pci_device_1385_630a[] = "GA630";
@@ -10283,7 +10419,7 @@ static const char pci_vendor_13e7[] = "NAC Incorporated";
static const char pci_vendor_13e8[] = "Chip Express Corporation";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
-static const char pci_vendor_13e9[] = "Chip Express Corporation";
+static const char pci_vendor_13e9[] = "Intraserver Technology Inc";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_13ea[] = "Dallas Semiconductor";
@@ -10346,6 +10482,9 @@ static const char pci_subsys_13f6_0111_1043_80e2[] = "CMI8738 6ch-MX";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_13f6_0111_13f6_0111[] = "CMI8738/C3DX PCI Audio Device";
#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_13f6_0111_1681_a000[] = "Gamesurround MUSE XL";
+#endif
static const char pci_device_13f6_0211[] = "CM8738";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
@@ -10739,6 +10878,7 @@ static const char pci_vendor_146b[] = "Parascan Technologies Ltd";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_146c[] = "Ruby Tech Corp.";
+static const char pci_device_146c_1430[] = "FE-1430TX Fast Ethernet PCI Adapter";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_146d[] = "Tachyon, INC.";
@@ -10887,6 +11027,7 @@ static const char pci_vendor_149c[] = "OVISLINK Corp.";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_149d[] = "NEWTEK Inc";
+static const char pci_device_149d_0001[] = "Video Toaster for PC";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_149e[] = "Mapletree Networks Inc.";
@@ -11240,6 +11381,15 @@ static const char pci_subsys_14e4_1645_1028_0121[] = "Broadcom BCM5701 1000Base-
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_14e4_1645_10a9_8010[] = "SGI IO9 Gigabit Ethernet (Copper)";
+#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_14e4_1645_10a9_8011[] = "SGI Gigabit Ethernet (Copper)";
+#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_14e4_1645_10a9_8012[] = "SGI Gigabit Ethernet (Fiber)";
+#endif
+#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_14e4_1645_10b7_1004[] = "3C996-SX 1000Base-SX";
#endif
#ifdef INIT_SUBSYS_INFO
@@ -11295,6 +11445,9 @@ static const char pci_subsys_14e4_1647_0e11_009a[] = "NC7770 1000BaseTX";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_14e4_1647_10a9_8010[] = "SGI IO9 Gigabit Ethernet (Copper)";
+#endif
+#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_14e4_1647_14e4_0009[] = "BCM5703 1000BaseTX";
#endif
#ifdef INIT_SUBSYS_INFO
@@ -11341,6 +11494,7 @@ static const char pci_device_14e4_1696[] = "NetXtreme BCM5782 Gigabit Ethernet";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_14e4_1696_14e4_000d[] = "NetXtreme BCM5782 1000Base-T";
#endif
+static const char pci_device_14e4_169c[] = "NetXtreme BCM5788 Gigabit Ethernet";
static const char pci_device_14e4_16a6[] = "NetXtreme BCM5702 Gigabit Ethernet";
#endif
#ifdef INIT_SUBSYS_INFO
@@ -11406,7 +11560,11 @@ static const char pci_device_14e4_4210[] = "BCM4210 iLine10 HomePNA 2.0";
static const char pci_device_14e4_4211[] = "BCM4211 iLine10 HomePNA 2.0 + V.90 56k modem";
static const char pci_device_14e4_4212[] = "BCM4212 v.90 56k modem";
static const char pci_device_14e4_4301[] = "BCM4301 802.11b";
+static const char pci_device_14e4_4320[] = "BCM94306 802.11g";
static const char pci_device_14e4_4401[] = "BCM4401 100Base-T";
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_14e4_4401_1043_80a8[] = "A7V8X motherboard";
+#endif
static const char pci_device_14e4_4402[] = "BCM4402 Integrated 10/100BaseT";
static const char pci_device_14e4_4410[] = "BCM4413 iLine32 HomePNA 2.0";
static const char pci_device_14e4_4411[] = "BCM4413 V.90 56k modem";
@@ -11589,6 +11747,9 @@ static const char pci_subsys_14f1_1456_122d_4302[] = "Dell MP3930V-W(C) MiniPCI"
#endif
static const char pci_device_14f1_1610[] = "ADSL AccessRunner PCI Arbitration Device";
static const char pci_device_14f1_1611[] = "AccessRunner PCI ADSL Interface Device";
+static const char pci_device_14f1_1620[] = "ADSL AccessRunner V2 PCI Arbitration Device";
+static const char pci_device_14f1_1621[] = "AccessRunner V2 PCI ADSL Interface Device";
+static const char pci_device_14f1_1622[] = "AccessRunner V2 PCI ADSL Yukon WAN Adapter";
static const char pci_device_14f1_1803[] = "HCF 56k Modem";
#endif
#ifdef INIT_SUBSYS_INFO
@@ -12640,6 +12801,7 @@ static const char pci_device_1638_1100[] = "SMC2602W EZConnect / Addtron AWA-100
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_163c[] = "Smart Link Ltd.";
+static const char pci_device_163c_3052[] = "SmartLink SmartPCI562 56K Modem";
static const char pci_device_163c_5449[] = "SmartPCI561 Modem";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
@@ -12671,6 +12833,10 @@ static const char pci_device_16ab_1102[] = "PCMCIA-to-PCI Wireless Network Bridg
static const char pci_vendor_16be[] = "Creatix Polymedia GmbH";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
+static const char pci_vendor_16ca[] = "CENATEK Inc";
+static const char pci_device_16ca_0001[] = "Rocket Drive DL";
+#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_16ec[] = "U.S. Robotics";
static const char pci_device_16ec_3685[] = "Wireless Access PCI Adapter Model 022415";
#endif
@@ -12779,6 +12945,10 @@ static const char pci_device_1de1_690c[] = "690c";
static const char pci_device_1de1_dc29[] = "DC290";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
+static const char pci_vendor_1fc0[] = "Tumsan Oy";
+static const char pci_device_1fc0_0300[] = "E2200 Dual E1/Rawpipe Card";
+#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_2000[] = "Smart Link Ltd.";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
@@ -12823,6 +12993,8 @@ static const char pci_vendor_3388[] = "Hint Corp";
static const char pci_device_3388_0013[] = "HiNT HC4 PCI to ISDN bridge, Multimedia audio controller";
static const char pci_device_3388_0014[] = "HiNT HC4 PCI to ISDN bridge, Network controller";
static const char pci_device_3388_0021[] = "HB1-SE33 PCI-PCI Bridge";
+static const char pci_device_3388_101a[] = "E.Band [AudioTrak Inca88]";
+static const char pci_device_3388_101b[] = "E.Band [AudioTrak Inca88]";
static const char pci_device_3388_8011[] = "VXPro II Chipset";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_3388_8011_3388_8011[] = "VXPro II Chipset CPU to PCI Bridge";
@@ -13232,7 +13404,7 @@ static const char pci_device_5333_8c2f[] = "SuperSavage IX/C DDR";
static const char pci_device_5333_8d01[] = "86C380 [ProSavageDDR K4M266]";
static const char pci_device_5333_8d02[] = "VT8636A [ProSavage KN133] AGP4X VGA Controller (TwisterK)";
static const char pci_device_5333_8d03[] = "VT8751 [ProSavageDDR P4M266]";
-static const char pci_device_5333_8d04[] = "[ProSavageDDR K4M266]";
+static const char pci_device_5333_8d04[] = "VT8375 [ProSavage8 KM266/KL266]";
static const char pci_device_5333_9102[] = "86C410 Savage 2000";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_5333_9102_1092_5932[] = "Viper II Z200";
@@ -13261,6 +13433,7 @@ static const char pci_subsys_5333_9102_1092_5a57[] = "Viper II Z200";
static const char pci_device_5333_ca00[] = "SonicVibes";
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_544c[] = "Teralogic Inc";
+static const char pci_device_544c_0350[] = "TL880-based HDTV/ATSC tuner";
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const char pci_vendor_5455[] = "Technische University Berlin";
@@ -13472,6 +13645,7 @@ static const char pci_device_8086_1040[] = "536EP Data Fax Modem";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_1040_16be_1040[] = "V.9X DSP Data Fax Modem";
#endif
+static const char pci_device_8086_1043[] = "PRO/Wireless LAN 2100 3B Mini PCI Adapter";
static const char pci_device_8086_1059[] = "82551QM Ethernet Controller";
static const char pci_device_8086_1130[] = "82815 815 Chipset Host Bridge and Memory Controller Hub";
#ifdef INIT_SUBSYS_INFO
@@ -13483,6 +13657,12 @@ static const char pci_subsys_8086_1130_1043_8027[] = "TUSL2-C Mainboard";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_1130_104d_80df[] = "Vaio PCG-FX403";
#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_8086_1130_8086_4532[] = "D815EEA2 mainboard";
+#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_8086_1130_8086_4557[] = "D815EGEW Mainboard";
+#endif
static const char pci_device_8086_1131[] = "82815 815 Chipset AGP Bridge";
static const char pci_device_8086_1132[] = "82815 CGC [Chipset Graphics Controller]";
#ifdef INIT_SUBSYS_INFO
@@ -13491,6 +13671,12 @@ static const char pci_subsys_8086_1132_1025_1016[] = "Travelmate 612 TX";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_1132_104d_80df[] = "Vaio PCG-FX403";
#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_8086_1132_8086_4532[] = "D815EEA2 Mainboard";
+#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_8086_1132_8086_4557[] = "D815EGEW Mainboard";
+#endif
static const char pci_device_8086_1161[] = "82806AA PCI64 Hub Advanced Programmable Interrupt Controller";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_1161_8086_1161[] = "82806AA PCI64 Hub APIC";
@@ -14098,6 +14284,12 @@ static const char pci_subsys_8086_2442_104d_80df[] = "Vaio PCG-FX403";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2442_147b_0507[] = "TH7II-RAID";
#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_8086_2442_8086_4532[] = "D815EEA2 mainboard";
+#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_8086_2442_8086_4557[] = "D815EGEW Mainboard";
+#endif
static const char pci_device_8086_2443[] = "82801BA/BAM SMBus";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2443_1014_01c6[] = "Netvista A40/A40p";
@@ -14114,6 +14306,12 @@ static const char pci_subsys_8086_2443_104d_80df[] = "Vaio PCG-FX403";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2443_147b_0507[] = "TH7II-RAID";
#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_8086_2443_8086_4532[] = "D815EEA2 mainboard";
+#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_8086_2443_8086_4557[] = "D815EGEW Mainboard";
+#endif
static const char pci_device_8086_2444[] = "82801BA/BAM USB (Hub #2)";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2444_1025_1016[] = "Travelmate 612 TX";
@@ -14124,6 +14322,9 @@ static const char pci_subsys_8086_2444_104d_80df[] = "Vaio PCG-FX403";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2444_147b_0507[] = "TH7II-RAID";
#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_8086_2444_8086_4532[] = "D815EEA2 mainboard";
+#endif
static const char pci_device_8086_2445[] = "82801BA/BAM AC'97 Audio";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2445_1014_01c6[] = "Netvista A40/A40p";
@@ -14140,6 +14341,9 @@ static const char pci_subsys_8086_2445_1462_3370[] = "STAC9721 AC";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2445_147b_0507[] = "TH7II-RAID";
#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_8086_2445_8086_4557[] = "D815EGEW Mainboard";
+#endif
static const char pci_device_8086_2446[] = "Intel 537 [82801BA/BAM AC'97 Modem]";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2446_1025_1016[] = "Travelmate 612 TX";
@@ -14189,12 +14393,24 @@ static const char pci_subsys_8086_2449_1014_0244[] = "EtherExpress PRO/100 VE";
static const char pci_subsys_8086_2449_1014_0245[] = "EtherExpress PRO/100 VE";
#endif
#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_8086_2449_1014_0265[] = "PRO/100 VE Desktop Connection";
+#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_8086_2449_1014_0267[] = "PRO/100 VE Desktop Connection";
+#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_8086_2449_1014_026a[] = "PRO/100 VE Desktop Connection";
+#endif
+#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2449_109f_315d[] = "EtherExpress PRO/100 VE";
#endif
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2449_109f_3181[] = "EtherExpress PRO/100 VE";
#endif
#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_8086_2449_1179_ff01[] = "PRO/100 VE Network Connection";
+#endif
+#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2449_1186_7801[] = "EtherExpress PRO/100 VE";
#endif
#ifdef INIT_SUBSYS_INFO
@@ -14244,8 +14460,14 @@ static const char pci_subsys_8086_244b_1043_8027[] = "TUSL2-C Mainboard";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_244b_147b_0507[] = "TH7II-RAID";
#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_8086_244b_8086_4532[] = "D815EEA2 mainboard";
+#endif
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_8086_244b_8086_4557[] = "D815EGEW Mainboard";
+#endif
static const char pci_device_8086_244c[] = "82801BAM ISA Bridge (LPC)";
-static const char pci_device_8086_244e[] = "82801BA/CA/DB PCI Bridge";
+static const char pci_device_8086_244e[] = "82801BA/CA/DB/EB PCI Bridge";
static const char pci_device_8086_2450[] = "82801E ISA Bridge (LPC)";
static const char pci_device_8086_2452[] = "82801E USB";
static const char pci_device_8086_2453[] = "82801E SMBus";
@@ -14253,7 +14475,7 @@ static const char pci_device_8086_2459[] = "82801E Ethernet Controller 0";
static const char pci_device_8086_245b[] = "82801E IDE U100";
static const char pci_device_8086_245d[] = "82801E Ethernet Controller 1";
static const char pci_device_8086_245e[] = "82801E PCI Bridge";
-static const char pci_device_8086_2480[] = "82801CA ISA Bridge (LPC)";
+static const char pci_device_8086_2480[] = "82801CA LPC Interface Controller";
static const char pci_device_8086_2482[] = "82801CA/CAM USB (Hub #1)";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2482_1014_0220[] = "ThinkPad A/T/X Series";
@@ -14267,7 +14489,7 @@ static const char pci_subsys_8086_2482_15d9_3480[] = "P4DP6";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2482_8086_1958[] = "vpr Matrix 170B4";
#endif
-static const char pci_device_8086_2483[] = "82801CA/CAM SMBus";
+static const char pci_device_8086_2483[] = "82801CA/CAM SMBus Controller";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2483_1014_0220[] = "ThinkPad A/T/X Series";
#endif
@@ -14293,7 +14515,7 @@ static const char pci_subsys_8086_2484_15d9_3480[] = "P4DP6";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2484_8086_1958[] = "vpr Matrix 170B4";
#endif
-static const char pci_device_8086_2485[] = "82801CA/CAM AC'97 Audio";
+static const char pci_device_8086_2485[] = "82801CA/CAM AC'97 Audio Controller";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2485_1014_0222[] = "ThinkPad T23 (2647-4MG) or A30p (2653-64G)";
#endif
@@ -14309,7 +14531,7 @@ static const char pci_subsys_8086_2485_104d_80e7[] = "VAIO PCG-GR214EP/GR214MP/G
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2485_144d_c006[] = "vpr Matrix 170B4";
#endif
-static const char pci_device_8086_2486[] = "82801CA/CAM AC'97 Modem";
+static const char pci_device_8086_2486[] = "82801CA/CAM AC'97 Modem Controller";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2486_1014_0223[] = "ThinkPad A/T/X Series";
#endif
@@ -14357,12 +14579,12 @@ static const char pci_subsys_8086_248a_104d_80e7[] = "VAIO PCG-GR214EP/GR214MP/G
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_248a_8086_1958[] = "vpr Matrix 170B4";
#endif
-static const char pci_device_8086_248b[] = "82801CA IDE U100";
+static const char pci_device_8086_248b[] = "82801CA Ultra ATA Storage Controller";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_248b_15d9_3480[] = "P4DP6";
#endif
static const char pci_device_8086_248c[] = "82801CAM ISA Bridge (LPC)";
-static const char pci_device_8086_24c0[] = "82801DB ISA Bridge (LPC)";
+static const char pci_device_8086_24c0[] = "82801DB LPC Interface Controller";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_24c0_1462_5800[] = "845PE Max (MS-6580)";
#endif
@@ -14370,7 +14592,7 @@ static const char pci_device_8086_24c2[] = "82801DB USB (Hub #1)";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_24c2_1462_5800[] = "845PE Max (MS-6580)";
#endif
-static const char pci_device_8086_24c3[] = "82801DB SMBus";
+static const char pci_device_8086_24c3[] = "82801DB/DBM SMBus Controller";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_24c3_1462_5800[] = "845PE Max (MS-6580)";
#endif
@@ -14378,23 +14600,37 @@ static const char pci_device_8086_24c4[] = "82801DB USB (Hub #2)";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_24c4_1462_5800[] = "845PE Max (MS-6580)";
#endif
-static const char pci_device_8086_24c5[] = "82801DB AC'97 Audio";
+static const char pci_device_8086_24c5[] = "82801DB AC'97 Audio Controller";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_24c5_1462_5800[] = "845PE Max (MS-6580)";
#endif
-static const char pci_device_8086_24c6[] = "82801DB AC'97 Modem";
+static const char pci_device_8086_24c6[] = "82801DB AC'97 Modem Controller";
static const char pci_device_8086_24c7[] = "82801DB USB (Hub #3)";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_24c7_1462_5800[] = "845PE Max (MS-6580)";
#endif
-static const char pci_device_8086_24cb[] = "82801DB ICH4 IDE";
+static const char pci_device_8086_24ca[] = "82801DBM Ultra ATA Storage Controller";
+static const char pci_device_8086_24cb[] = "82801DB Ultra ATA Storage Controller";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_24cb_1462_5800[] = "845PE Max (MS-6580)";
#endif
-static const char pci_device_8086_24cd[] = "82801DB USB EHCI Controller";
+static const char pci_device_8086_24cc[] = "82801DBM LPC Interface Controller";
+static const char pci_device_8086_24cd[] = "82801DB USB2";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_24cd_1462_3981[] = "845PE Max (MS-6580) Onboard USB EHCI Controller";
#endif
+static const char pci_device_8086_24d0[] = "82801EB LPC Interface Controller";
+static const char pci_device_8086_24d1[] = "82801EB Ultra ATA Storage Controller";
+static const char pci_device_8086_24d2[] = "82801EB USB";
+static const char pci_device_8086_24d3[] = "82801EB SMBus Controller";
+static const char pci_device_8086_24d4[] = "82801EB USB";
+static const char pci_device_8086_24d5[] = "82801EB AC'97 Audio Controller";
+static const char pci_device_8086_24d6[] = "82801EB AC'97 Modem Controller";
+static const char pci_device_8086_24d7[] = "82801EB USB";
+static const char pci_device_8086_24db[] = "82801EB Ultra ATA Storage Controller";
+static const char pci_device_8086_24dc[] = "82801EB LPC Interface Controller";
+static const char pci_device_8086_24dd[] = "82801EB USB2";
+static const char pci_device_8086_24de[] = "82801EB USB";
static const char pci_device_8086_2500[] = "82820 820 (Camino) Chipset Host Bridge (MCH)";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2500_1028_0095[] = "Precision Workstation 220 Chipset";
@@ -14418,29 +14654,45 @@ static const char pci_device_8086_2531[] = "82860 860 (Wombat) Chipset Host Brid
static const char pci_device_8086_2532[] = "82850 850 (Tehama) Chipset AGP Bridge";
static const char pci_device_8086_2533[] = "82860 860 (Wombat) Chipset AGP Bridge";
static const char pci_device_8086_2534[] = "82860 860 (Wombat) Chipset PCI Bridge";
-static const char pci_device_8086_2540[] = "e7500 [Plumas] DRAM Controller";
+static const char pci_device_8086_2540[] = "E7500 Memory Controller Hub";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2540_15d9_3480[] = "P4DP6";
#endif
-static const char pci_device_8086_2541[] = "e7500 [Plumas] DRAM Controller Error Reporting";
+static const char pci_device_8086_2541[] = "E7000 Series Host RASUM Controller";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2541_15d9_3480[] = "P4DP6";
#endif
-static const char pci_device_8086_2543[] = "e7500 [Plumas] HI_B Virtual PCI Bridge (F0)";
-static const char pci_device_8086_2544[] = "e7500 [Plumas] HI_B Virtual PCI Bridge (F1)";
-static const char pci_device_8086_2545[] = "e7500 [Plumas] HI_C Virtual PCI Bridge (F0)";
-static const char pci_device_8086_2546[] = "e7500 [Plumas] HI_C Virtual PCI Bridge (F1)";
-static const char pci_device_8086_2547[] = "e7500 [Plumas] HI_D Virtual PCI Bridge (F0)";
-static const char pci_device_8086_2548[] = "e7500 [Plumas] HI_D Virtual PCI Bridge (F1)";
+static const char pci_device_8086_2543[] = "E7000 Series Hub Interface B PCI-to-PCI Bridge";
+static const char pci_device_8086_2544[] = "E7000 Series Hub Interface B RASUM Controller";
+static const char pci_device_8086_2545[] = "E7000 Series Hub Interface C PCI-to-PCI Bridge";
+static const char pci_device_8086_2546[] = "E7000 Series Hub Interface C RASUM Controller";
+static const char pci_device_8086_2547[] = "E7000 Series Hub Interface D PCI-to-PCI Bridge";
+static const char pci_device_8086_2548[] = "E7000 Series Hub Interface D RASUM Controller";
+static const char pci_device_8086_254c[] = "E7501 Memory Controller Hub";
+static const char pci_device_8086_2550[] = "E7505 Memory Controller Hub";
+static const char pci_device_8086_2551[] = "E7000 Series RAS Controller";
+static const char pci_device_8086_2552[] = "E7000 Series Processor to AGP Controller";
+static const char pci_device_8086_2553[] = "E7000 Series Hub Interface B PCI-to-PCI Bridge";
+static const char pci_device_8086_2554[] = "E7000 Series Hub Interface B PCI-to-PCI Bridge RAS Controller";
+static const char pci_device_8086_255d[] = "E7205 Memory Controller Hub";
static const char pci_device_8086_2560[] = "82845G/GL [Brookdale-G] Chipset Host Bridge";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_2560_1462_5800[] = "845PE Max (MS-6580)";
#endif
static const char pci_device_8086_2561[] = "82845G/GL [Brookdale-G] Chipset AGP Bridge";
static const char pci_device_8086_2562[] = "82845G/GL [Brookdale-G] Chipset Integrated Graphics Device";
-static const char pci_device_8086_2570[] = "865G Chipset Host-Hub Bridge";
-static const char pci_device_8086_2572[] = "865G Chipset Graphics Controller";
+static const char pci_device_8086_2570[] = "82865G/PE/P Processor to I/O Controller";
+static const char pci_device_8086_2571[] = "82865G/PE/P Processor to AGP Controller";
+static const char pci_device_8086_2572[] = "82865G Integrated Graphics Device";
+static const char pci_device_8086_2573[] = "82865G/PE/P Processor to PCI to CSA Bridge";
+static const char pci_device_8086_2576[] = "82864G/PE/P Processor to I/O Memory Interface";
+static const char pci_device_8086_2578[] = "82875P Memory Controller Hub";
+static const char pci_device_8086_2579[] = "82875P Processor to AGP Controller";
+static const char pci_device_8086_257b[] = "82875P Processor to PCI to CSA Bridge";
+static const char pci_device_8086_257e[] = "82875P Processor to I/O Memory Interface";
static const char pci_device_8086_3092[] = "Integrated RAID";
+static const char pci_device_8086_3340[] = "82855PM Processor to I/O Controller";
+static const char pci_device_8086_3341[] = "82855PM Processor to AGP Controller";
static const char pci_device_8086_3575[] = "82830 830 Chipset Host Bridge";
#ifdef INIT_SUBSYS_INFO
static const char pci_subsys_8086_3575_1014_021d[] = "ThinkPad A/T/X Series";
@@ -14454,8 +14706,8 @@ static const char pci_device_8086_3577[] = "82830 CGC [Chipset Graphics Controll
static const char pci_subsys_8086_3577_1014_0513[] = "ThinkPad A/T/X Series";
#endif
static const char pci_device_8086_3578[] = "82830 830 Chipset Host Bridge";
-static const char pci_device_8086_3580[] = "852GM/852GME/855GM/855GME Chipset Host-Hub Bridge";
-static const char pci_device_8086_3582[] = "852GM/852GME/855GM/855GME Chipset Graphics Controller";
+static const char pci_device_8086_3580[] = "82852/855GM Host Bridge";
+static const char pci_device_8086_3582[] = "82852/855GM Integrated Graphics Device";
static const char pci_device_8086_5200[] = "EtherExpress PRO/100 Intelligent Server";
static const char pci_device_8086_5201[] = "EtherExpress PRO/100 Intelligent Server";
#ifdef INIT_SUBSYS_INFO
@@ -14473,6 +14725,9 @@ static const char pci_device_8086_7112[] = "82371AB/EB/MB PIIX4 USB";
static const char pci_device_8086_7113[] = "82371AB/EB/MB PIIX4 ACPI";
static const char pci_device_8086_7120[] = "82810 GMCH [Graphics Memory Controller Hub]";
static const char pci_device_8086_7121[] = "82810 CGC [Chipset Graphics Controller]";
+#ifdef INIT_SUBSYS_INFO
+static const char pci_subsys_8086_7121_8086_4341[] = "Cayman (CA810) Mainboard";
+#endif
static const char pci_device_8086_7122[] = "82810 DC-100 GMCH [Graphics Memory Controller Hub]";
static const char pci_device_8086_7123[] = "82810 DC-100 CGC [Chipset Graphics Controller]";
static const char pci_device_8086_7124[] = "82810E DC-133 GMCH [Graphics Memory Controller Hub]";
@@ -14603,13 +14858,6 @@ static const char pci_device_9004_5475[] = "AIC-755x";
static const char pci_device_9004_5478[] = "AIC-7850";
static const char pci_device_9004_5575[] = "AVA-2930";
static const char pci_device_9004_5578[] = "AIC-7855";
-static const char pci_device_9004_5647[] = "ANA-7711 TCP Offload Engine";
-#ifdef INIT_SUBSYS_INFO
-static const char pci_subsys_9004_5647_9004_7710[] = "ANA-7711F TCP Offload Engine - Optical";
-#endif
-#ifdef INIT_SUBSYS_INFO
-static const char pci_subsys_9004_5647_9004_7711[] = "ANA-7711LP TCP Offload Engine - Copper";
-#endif
static const char pci_device_9004_5675[] = "AIC-755x";
static const char pci_device_9004_5678[] = "AIC-7856";
static const char pci_device_9004_5775[] = "AIC-755x";
@@ -14683,6 +14931,8 @@ static const char pci_device_9004_7378[] = "AHA-3985 / AIC-7873";
static const char pci_device_9004_7478[] = "AHA-2944/2944W / AIC-7874";
static const char pci_device_9004_7578[] = "AHA-3944/3944W / AIC-7875";
static const char pci_device_9004_7678[] = "AHA-4944W/UW / AIC-7876";
+static const char pci_device_9004_7710[] = "ANA-7711F Network Accelerator Card (NAC) - Optical";
+static const char pci_device_9004_7711[] = "ANA-7711C Network Accelerator Card (NAC) - Copper";
static const char pci_device_9004_7778[] = "AIC-787x";
static const char pci_device_9004_7810[] = "AIC-7810";
static const char pci_device_9004_7815[] = "AIC-7815 RAID+Memory Controller IC";
@@ -14884,11 +15134,18 @@ static const char pci_device_9005_8013[] = "ASC-29320B U320";
static const char pci_device_9005_8014[] = "ASC-29320LP U320";
static const char pci_device_9005_801e[] = "AIC-7901A U320";
static const char pci_device_9005_801f[] = "AIC-7902 U320";
+static const char pci_device_9005_8080[] = "ASC-29320A U320 w/HostRAID";
+static const char pci_device_9005_808f[] = "AIC-7901 U320 w/HostRAID";
static const char pci_device_9005_8090[] = "ASC-39320 U320 w/HostRAID";
static const char pci_device_9005_8091[] = "ASC-39320D U320 w/HostRAID";
static const char pci_device_9005_8092[] = "ASC-29320 U320 w/HostRAID";
static const char pci_device_9005_8093[] = "ASC-29320B U320 w/HostRAID";
static const char pci_device_9005_8094[] = "ASC-29320LP U320 w/HostRAID";
+static const char pci_device_9005_8095[] = "ASC-39320(B) U320 w/HostRAID";
+static const char pci_device_9005_8096[] = "ASC-39320A U320 w/HostRAID";
+static const char pci_device_9005_8097[] = "ASC-29320ALP U320 w/HostRAID";
+static const char pci_device_9005_809c[] = "ASC-39320D(B) U320 w/HostRAID";
+static const char pci_device_9005_809d[] = "AIC-7902(B) U320 w/HostRAID";
static const char pci_device_9005_809e[] = "AIC-7901A U320 w/HostRAID";
static const char pci_device_9005_809f[] = "AIC-7902 U320 w/HostRAID";
#endif
@@ -15478,6 +15735,10 @@ static const pciSubsystemInfo pci_ss_info_1002_4c59_104d_80e7 =
{0x104d, 0x80e7, pci_subsys_1002_4c59_104d_80e7, 0};
#undef pci_ss_info_104d_80e7
#define pci_ss_info_104d_80e7 pci_ss_info_1002_4c59_104d_80e7
+static const pciSubsystemInfo pci_ss_info_1002_4e45_1002_0002 =
+ {0x1002, 0x0002, pci_subsys_1002_4e45_1002_0002, 0};
+#undef pci_ss_info_1002_0002
+#define pci_ss_info_1002_0002 pci_ss_info_1002_4e45_1002_0002
static const pciSubsystemInfo pci_ss_info_1002_5044_1002_0028 =
{0x1002, 0x0028, pci_subsys_1002_5044_1002_0028, 0};
#undef pci_ss_info_1002_0028
@@ -15734,6 +15995,10 @@ static const pciSubsystemInfo pci_ss_info_1002_524c_1002_0088 =
{0x1002, 0x0088, pci_subsys_1002_524c_1002_0088, 0};
#undef pci_ss_info_1002_0088
#define pci_ss_info_1002_0088 pci_ss_info_1002_524c_1002_0088
+static const pciSubsystemInfo pci_ss_info_1002_5346_1002_0048 =
+ {0x1002, 0x0048, pci_subsys_1002_5346_1002_0048, 0};
+#undef pci_ss_info_1002_0048
+#define pci_ss_info_1002_0048 pci_ss_info_1002_5346_1002_0048
static const pciSubsystemInfo pci_ss_info_1002_534d_1002_0008 =
{0x1002, 0x0008, pci_subsys_1002_534d_1002_0008, 0};
#undef pci_ss_info_1002_0008
@@ -17523,6 +17788,10 @@ static const pciSubsystemInfo pci_ss_info_105a_0d38_105a_4d39 =
{0x105a, 0x4d39, pci_subsys_105a_0d38_105a_4d39, 0};
#undef pci_ss_info_105a_4d39
#define pci_ss_info_105a_4d39 pci_ss_info_105a_0d38_105a_4d39
+static const pciSubsystemInfo pci_ss_info_105a_3376_1043_809e =
+ {0x1043, 0x809e, pci_subsys_105a_3376_1043_809e, 0};
+#undef pci_ss_info_1043_809e
+#define pci_ss_info_1043_809e pci_ss_info_105a_3376_1043_809e
static const pciSubsystemInfo pci_ss_info_105a_4d30_105a_4d33 =
{0x105a, 0x4d33, pci_subsys_105a_4d30_105a_4d33, 0};
#undef pci_ss_info_105a_4d33
@@ -17551,6 +17820,10 @@ static const pciSubsystemInfo pci_ss_info_105a_4d68_105a_4d68 =
{0x105a, 0x4d68, pci_subsys_105a_4d68_105a_4d68, 0};
#undef pci_ss_info_105a_4d68
#define pci_ss_info_105a_4d68 pci_ss_info_105a_4d68_105a_4d68
+static const pciSubsystemInfo pci_ss_info_105a_4d69_105a_4d68 =
+ {0x105a, 0x4d68, pci_subsys_105a_4d69_105a_4d68, 0};
+#undef pci_ss_info_105a_4d68
+#define pci_ss_info_105a_4d68 pci_ss_info_105a_4d69_105a_4d68
static const pciSubsystemInfo pci_ss_info_105a_5275_105a_0275 =
{0x105a, 0x0275, pci_subsys_105a_5275_105a_0275, 0};
#undef pci_ss_info_105a_0275
@@ -17676,6 +17949,10 @@ static const pciSubsystemInfo pci_ss_info_105d_493d_13cc_000a =
{0x13cc, 0x000a, pci_subsys_105d_493d_13cc_000a, 0};
#undef pci_ss_info_13cc_000a
#define pci_ss_info_13cc_000a pci_ss_info_105d_493d_13cc_000a
+static const pciSubsystemInfo pci_ss_info_105d_5348_105d_0037 =
+ {0x105d, 0x0037, pci_subsys_105d_5348_105d_0037, 0};
+#undef pci_ss_info_105d_0037
+#define pci_ss_info_105d_0037 pci_ss_info_105d_5348_105d_0037
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo pci_ss_info_1073_0004_1073_0004 =
{0x1073, 0x0004, pci_subsys_1073_0004_1073_0004, 0};
@@ -17735,6 +18012,10 @@ static const pciSubsystemInfo pci_ss_info_1077_2100_1077_0001 =
{0x1077, 0x0001, pci_subsys_1077_2100_1077_0001, 0};
#undef pci_ss_info_1077_0001
#define pci_ss_info_1077_0001 pci_ss_info_1077_2100_1077_0001
+static const pciSubsystemInfo pci_ss_info_1077_2200_1077_0002 =
+ {0x1077, 0x0002, pci_subsys_1077_2200_1077_0002, 0};
+#undef pci_ss_info_1077_0002
+#define pci_ss_info_1077_0002 pci_ss_info_1077_2200_1077_0002
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo pci_ss_info_108d_0004_108d_0004 =
@@ -18173,6 +18454,12 @@ static const pciSubsystemInfo pci_ss_info_109e_0879_14f1_1722 =
#undef pci_ss_info_14f1_1722
#define pci_ss_info_14f1_1722 pci_ss_info_109e_0879_14f1_1722
#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciSubsystemInfo pci_ss_info_10a9_0009_10a9_8002 =
+ {0x10a9, 0x8002, pci_subsys_10a9_0009_10a9_8002, 0};
+#undef pci_ss_info_10a9_8002
+#define pci_ss_info_10a9_8002 pci_ss_info_10a9_0009_10a9_8002
+#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo pci_ss_info_10b4_1b1d_10b4_237e =
{0x10b4, 0x237e, pci_subsys_10b4_1b1d_10b4_237e, 0};
#undef pci_ss_info_10b4_237e
@@ -18319,6 +18606,10 @@ static const pciSubsystemInfo pci_ss_info_10b5_9054_10b5_2455 =
{0x10b5, 0x2455, pci_subsys_10b5_9054_10b5_2455, 0};
#undef pci_ss_info_10b5_2455
#define pci_ss_info_10b5_2455 pci_ss_info_10b5_9054_10b5_2455
+static const pciSubsystemInfo pci_ss_info_10b5_9054_12d9_0002 =
+ {0x12d9, 0x0002, pci_subsys_10b5_9054_12d9_0002, 0};
+#undef pci_ss_info_12d9_0002
+#define pci_ss_info_12d9_0002 pci_ss_info_10b5_9054_12d9_0002
static const pciSubsystemInfo pci_ss_info_10b5_906d_125c_0640 =
{0x125c, 0x0640, pci_subsys_10b5_906d_125c_0640, 0};
#undef pci_ss_info_125c_0640
@@ -18331,6 +18622,10 @@ static const pciSubsystemInfo pci_ss_info_10b5_9080_129d_0002 =
{0x129d, 0x0002, pci_subsys_10b5_9080_129d_0002, 0};
#undef pci_ss_info_129d_0002
#define pci_ss_info_129d_0002 pci_ss_info_10b5_9080_129d_0002
+static const pciSubsystemInfo pci_ss_info_10b5_9080_12d9_0002 =
+ {0x12d9, 0x0002, pci_subsys_10b5_9080_12d9_0002, 0};
+#undef pci_ss_info_12d9_0002
+#define pci_ss_info_12d9_0002 pci_ss_info_10b5_9080_12d9_0002
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo pci_ss_info_10b6_0002_10b6_0002 =
@@ -18678,6 +18973,7 @@ static const pciSubsystemInfo pci_ss_info_10b8_0006_13a2_8006 =
#undef pci_ss_info_13a2_8006
#define pci_ss_info_13a2_8006 pci_ss_info_10b8_0006_13a2_8006
#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo pci_ss_info_10b9_0111_10b9_0111 =
{0x10b9, 0x0111, pci_subsys_10b9_0111_10b9_0111, 0};
#undef pci_ss_info_10b9_0111
@@ -18710,6 +19006,7 @@ static const pciSubsystemInfo pci_ss_info_10b9_7101_10b9_7101 =
{0x10b9, 0x7101, pci_subsys_10b9_7101_10b9_7101, 0};
#undef pci_ss_info_10b9_7101
#define pci_ss_info_10b9_7101 pci_ss_info_10b9_7101_10b9_7101
+#endif
static const pciSubsystemInfo pci_ss_info_10c8_0004_1014_00ba =
{0x1014, 0x00ba, pci_subsys_10c8_0004_1014_00ba, 0};
#undef pci_ss_info_1014_00ba
@@ -18946,6 +19243,10 @@ static const pciSubsystemInfo pci_ss_info_10de_0028_1043_4000 =
{0x1043, 0x4000, pci_subsys_10de_0028_1043_4000, 0};
#undef pci_ss_info_1043_4000
#define pci_ss_info_1043_4000 pci_ss_info_10de_0028_1043_4000
+static const pciSubsystemInfo pci_ss_info_10de_0028_1048_0c21 =
+ {0x1048, 0x0c21, pci_subsys_10de_0028_1048_0c21, 0};
+#undef pci_ss_info_1048_0c21
+#define pci_ss_info_1048_0c21 pci_ss_info_10de_0028_1048_0c21
static const pciSubsystemInfo pci_ss_info_10de_0028_1092_4804 =
{0x1092, 0x4804, pci_subsys_10de_0028_1092_4804, 0};
#undef pci_ss_info_1092_4804
@@ -19178,6 +19479,10 @@ static const pciSubsystemInfo pci_ss_info_10de_0152_1048_0c56 =
{0x1048, 0x0c56, pci_subsys_10de_0152_1048_0c56, 0};
#undef pci_ss_info_1048_0c56
#define pci_ss_info_1048_0c56 pci_ss_info_10de_0152_1048_0c56
+static const pciSubsystemInfo pci_ss_info_10de_0171_10b0_0002 =
+ {0x10b0, 0x0002, pci_subsys_10de_0171_10b0_0002, 0};
+#undef pci_ss_info_10b0_0002
+#define pci_ss_info_10b0_0002 pci_ss_info_10de_0171_10b0_0002
static const pciSubsystemInfo pci_ss_info_10de_0171_1462_8661 =
{0x1462, 0x8661, pci_subsys_10de_0171_1462_8661, 0};
#undef pci_ss_info_1462_8661
@@ -19403,6 +19708,14 @@ static const pciSubsystemInfo pci_ss_info_1102_0002_1102_8061 =
{0x1102, 0x8061, pci_subsys_1102_0002_1102_8061, 0};
#undef pci_ss_info_1102_8061
#define pci_ss_info_1102_8061 pci_ss_info_1102_0002_1102_8061
+static const pciSubsystemInfo pci_ss_info_1102_0002_1102_8064 =
+ {0x1102, 0x8064, pci_subsys_1102_0002_1102_8064, 0};
+#undef pci_ss_info_1102_8064
+#define pci_ss_info_1102_8064 pci_ss_info_1102_0002_1102_8064
+static const pciSubsystemInfo pci_ss_info_1102_0002_1102_8065 =
+ {0x1102, 0x8065, pci_subsys_1102_0002_1102_8065, 0};
+#undef pci_ss_info_1102_8065
+#define pci_ss_info_1102_8065 pci_ss_info_1102_0002_1102_8065
static const pciSubsystemInfo pci_ss_info_1102_0004_1102_0051 =
{0x1102, 0x0051, pci_subsys_1102_0004_1102_0051, 0};
#undef pci_ss_info_1102_0051
@@ -19434,6 +19747,7 @@ static const pciSubsystemInfo pci_ss_info_1103_0004_1103_0005 =
#undef pci_ss_info_1103_0005
#define pci_ss_info_1103_0005 pci_ss_info_1103_0004_1103_0005
#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo pci_ss_info_1106_0305_1043_8033 =
{0x1043, 0x8033, pci_subsys_1106_0305_1043_8033, 0};
#undef pci_ss_info_1043_8033
@@ -19450,10 +19764,18 @@ static const pciSubsystemInfo pci_ss_info_1106_0305_147b_a401 =
{0x147b, 0xa401, pci_subsys_1106_0305_147b_a401, 0};
#undef pci_ss_info_147b_a401
#define pci_ss_info_147b_a401 pci_ss_info_1106_0305_147b_a401
+static const pciSubsystemInfo pci_ss_info_1106_0571_1019_0985 =
+ {0x1019, 0x0985, pci_subsys_1106_0571_1019_0985, 0};
+#undef pci_ss_info_1019_0985
+#define pci_ss_info_1019_0985 pci_ss_info_1106_0571_1019_0985
static const pciSubsystemInfo pci_ss_info_1106_0571_1043_8052 =
{0x1043, 0x8052, pci_subsys_1106_0571_1043_8052, 0};
#undef pci_ss_info_1043_8052
#define pci_ss_info_1043_8052 pci_ss_info_1106_0571_1043_8052
+static const pciSubsystemInfo pci_ss_info_1106_0571_1043_808c =
+ {0x1043, 0x808c, pci_subsys_1106_0571_1043_808c, 0};
+#undef pci_ss_info_1043_808c
+#define pci_ss_info_1043_808c pci_ss_info_1106_0571_1043_808c
static const pciSubsystemInfo pci_ss_info_1106_0571_1106_0571 =
{0x1106, 0x0571, pci_subsys_1106_0571_1106_0571, 0};
#undef pci_ss_info_1106_0571
@@ -19478,6 +19800,18 @@ static const pciSubsystemInfo pci_ss_info_1106_0596_1458_0596 =
{0x1458, 0x0596, pci_subsys_1106_0596_1458_0596, 0};
#undef pci_ss_info_1458_0596
#define pci_ss_info_1458_0596 pci_ss_info_1106_0596_1458_0596
+static const pciSubsystemInfo pci_ss_info_1106_0605_1043_802c =
+ {0x1043, 0x802c, pci_subsys_1106_0605_1043_802c, 0};
+#undef pci_ss_info_1043_802c
+#define pci_ss_info_1043_802c pci_ss_info_1106_0605_1043_802c
+static const pciSubsystemInfo pci_ss_info_1106_0686_1019_0985 =
+ {0x1019, 0x0985, pci_subsys_1106_0686_1019_0985, 0};
+#undef pci_ss_info_1019_0985
+#define pci_ss_info_1019_0985 pci_ss_info_1106_0686_1019_0985
+static const pciSubsystemInfo pci_ss_info_1106_0686_1043_802c =
+ {0x1043, 0x802c, pci_subsys_1106_0686_1043_802c, 0};
+#undef pci_ss_info_1043_802c
+#define pci_ss_info_1043_802c pci_ss_info_1106_0686_1043_802c
static const pciSubsystemInfo pci_ss_info_1106_0686_1043_8033 =
{0x1043, 0x8033, pci_subsys_1106_0686_1043_8033, 0};
#undef pci_ss_info_1043_8033
@@ -19510,6 +19844,10 @@ static const pciSubsystemInfo pci_ss_info_1106_0686_147b_a702 =
{0x147b, 0xa702, pci_subsys_1106_0686_147b_a702, 0};
#undef pci_ss_info_147b_a702
#define pci_ss_info_147b_a702 pci_ss_info_1106_0686_147b_a702
+static const pciSubsystemInfo pci_ss_info_1106_0691_1019_0985 =
+ {0x1019, 0x0985, pci_subsys_1106_0691_1019_0985, 0};
+#undef pci_ss_info_1019_0985
+#define pci_ss_info_1019_0985 pci_ss_info_1106_0691_1019_0985
static const pciSubsystemInfo pci_ss_info_1106_0691_1179_0001 =
{0x1179, 0x0001, pci_subsys_1106_0691_1179_0001, 0};
#undef pci_ss_info_1179_0001
@@ -19522,6 +19860,14 @@ static const pciSubsystemInfo pci_ss_info_1106_3038_0925_1234 =
{0x0925, 0x1234, pci_subsys_1106_3038_0925_1234, 0};
#undef pci_ss_info_0925_1234
#define pci_ss_info_0925_1234 pci_ss_info_1106_3038_0925_1234
+static const pciSubsystemInfo pci_ss_info_1106_3038_1019_0985 =
+ {0x1019, 0x0985, pci_subsys_1106_3038_1019_0985, 0};
+#undef pci_ss_info_1019_0985
+#define pci_ss_info_1019_0985 pci_ss_info_1106_3038_1019_0985
+static const pciSubsystemInfo pci_ss_info_1106_3038_1043_808c =
+ {0x1043, 0x808c, pci_subsys_1106_3038_1043_808c, 0};
+#undef pci_ss_info_1043_808c
+#define pci_ss_info_1043_808c pci_ss_info_1106_3038_1043_808c
static const pciSubsystemInfo pci_ss_info_1106_3038_1179_0001 =
{0x1179, 0x0001, pci_subsys_1106_3038_1179_0001, 0};
#undef pci_ss_info_1179_0001
@@ -19538,6 +19884,10 @@ static const pciSubsystemInfo pci_ss_info_1106_3043_1186_1400 =
{0x1186, 0x1400, pci_subsys_1106_3043_1186_1400, 0};
#undef pci_ss_info_1186_1400
#define pci_ss_info_1186_1400 pci_ss_info_1106_3043_1186_1400
+static const pciSubsystemInfo pci_ss_info_1106_3057_1019_0985 =
+ {0x1019, 0x0985, pci_subsys_1106_3057_1019_0985, 0};
+#undef pci_ss_info_1019_0985
+#define pci_ss_info_1019_0985 pci_ss_info_1106_3057_1019_0985
static const pciSubsystemInfo pci_ss_info_1106_3057_1043_8033 =
{0x1043, 0x8033, pci_subsys_1106_3057_1043_8033, 0};
#undef pci_ss_info_1043_8033
@@ -19558,10 +19908,16 @@ static const pciSubsystemInfo pci_ss_info_1106_3057_1179_0001 =
{0x1179, 0x0001, pci_subsys_1106_3057_1179_0001, 0};
#undef pci_ss_info_1179_0001
#define pci_ss_info_1179_0001 pci_ss_info_1106_3057_1179_0001
+#endif
static const pciSubsystemInfo pci_ss_info_1106_3058_0e11_b194 =
{0x0e11, 0xb194, pci_subsys_1106_3058_0e11_b194, 0};
#undef pci_ss_info_0e11_b194
#define pci_ss_info_0e11_b194 pci_ss_info_1106_3058_0e11_b194
+#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciSubsystemInfo pci_ss_info_1106_3058_1019_0985 =
+ {0x1019, 0x0985, pci_subsys_1106_3058_1019_0985, 0};
+#undef pci_ss_info_1019_0985
+#define pci_ss_info_1019_0985 pci_ss_info_1106_3058_1019_0985
static const pciSubsystemInfo pci_ss_info_1106_3058_1106_4511 =
{0x1106, 0x4511, pci_subsys_1106_3058_1106_4511, 0};
#undef pci_ss_info_1106_4511
@@ -19578,6 +19934,10 @@ static const pciSubsystemInfo pci_ss_info_1106_3058_15dd_7609 =
{0x15dd, 0x7609, pci_subsys_1106_3058_15dd_7609, 0};
#undef pci_ss_info_15dd_7609
#define pci_ss_info_15dd_7609 pci_ss_info_1106_3058_15dd_7609
+static const pciSubsystemInfo pci_ss_info_1106_3059_1043_8095 =
+ {0x1043, 0x8095, pci_subsys_1106_3059_1043_8095, 0};
+#undef pci_ss_info_1043_8095
+#define pci_ss_info_1043_8095 pci_ss_info_1106_3059_1043_8095
static const pciSubsystemInfo pci_ss_info_1106_3059_1458_a002 =
{0x1458, 0xa002, pci_subsys_1106_3059_1458_a002, 0};
#undef pci_ss_info_1458_a002
@@ -19594,6 +19954,10 @@ static const pciSubsystemInfo pci_ss_info_1106_3065_1186_1401 =
{0x1186, 0x1401, pci_subsys_1106_3065_1186_1401, 0};
#undef pci_ss_info_1186_1401
#define pci_ss_info_1186_1401 pci_ss_info_1106_3065_1186_1401
+static const pciSubsystemInfo pci_ss_info_1106_3065_13b9_1421 =
+ {0x13b9, 0x1421, pci_subsys_1106_3065_13b9_1421, 0};
+#undef pci_ss_info_13b9_1421
+#define pci_ss_info_13b9_1421 pci_ss_info_1106_3065_13b9_1421
static const pciSubsystemInfo pci_ss_info_1106_3074_1043_8052 =
{0x1043, 0x8052, pci_subsys_1106_3074_1043_8052, 0};
#undef pci_ss_info_1043_8052
@@ -19606,18 +19970,35 @@ static const pciSubsystemInfo pci_ss_info_1106_3099_1043_807f =
{0x1043, 0x807f, pci_subsys_1106_3099_1043_807f, 0};
#undef pci_ss_info_1043_807f
#define pci_ss_info_1043_807f pci_ss_info_1106_3099_1043_807f
+static const pciSubsystemInfo pci_ss_info_1106_3104_1043_808c =
+ {0x1043, 0x808c, pci_subsys_1106_3104_1043_808c, 0};
+#undef pci_ss_info_1043_808c
+#define pci_ss_info_1043_808c pci_ss_info_1106_3104_1043_808c
static const pciSubsystemInfo pci_ss_info_1106_3104_1458_5004 =
{0x1458, 0x5004, pci_subsys_1106_3104_1458_5004, 0};
#undef pci_ss_info_1458_5004
#define pci_ss_info_1458_5004 pci_ss_info_1106_3104_1458_5004
+static const pciSubsystemInfo pci_ss_info_1106_3177_1043_808c =
+ {0x1043, 0x808c, pci_subsys_1106_3177_1043_808c, 0};
+#undef pci_ss_info_1043_808c
+#define pci_ss_info_1043_808c pci_ss_info_1106_3177_1043_808c
static const pciSubsystemInfo pci_ss_info_1106_3177_1458_5001 =
{0x1458, 0x5001, pci_subsys_1106_3177_1458_5001, 0};
#undef pci_ss_info_1458_5001
#define pci_ss_info_1458_5001 pci_ss_info_1106_3177_1458_5001
+static const pciSubsystemInfo pci_ss_info_1106_3189_1043_807f =
+ {0x1043, 0x807f, pci_subsys_1106_3189_1043_807f, 0};
+#undef pci_ss_info_1043_807f
+#define pci_ss_info_1043_807f pci_ss_info_1106_3189_1043_807f
static const pciSubsystemInfo pci_ss_info_1106_3189_1458_5000 =
{0x1458, 0x5000, pci_subsys_1106_3189_1458_5000, 0};
#undef pci_ss_info_1458_5000
#define pci_ss_info_1458_5000 pci_ss_info_1106_3189_1458_5000
+static const pciSubsystemInfo pci_ss_info_1106_8598_1019_0985 =
+ {0x1019, 0x0985, pci_subsys_1106_8598_1019_0985, 0};
+#undef pci_ss_info_1019_0985
+#define pci_ss_info_1019_0985 pci_ss_info_1106_8598_1019_0985
+#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
#endif
static const pciSubsystemInfo pci_ss_info_1113_1211_103c_1207 =
@@ -20321,6 +20702,12 @@ static const pciSubsystemInfo pci_ss_info_11c1_0442_1668_0440 =
{0x1668, 0x0440, pci_subsys_11c1_0442_1668_0440, 0};
#undef pci_ss_info_1668_0440
#define pci_ss_info_1668_0440 pci_ss_info_11c1_0442_1668_0440
+#endif
+static const pciSubsystemInfo pci_ss_info_11c1_0445_8086_2203 =
+ {0x8086, 0x2203, pci_subsys_11c1_0445_8086_2203, 0};
+#undef pci_ss_info_8086_2203
+#define pci_ss_info_8086_2203 pci_ss_info_11c1_0445_8086_2203
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo pci_ss_info_11c1_0448_1014_0131 =
{0x1014, 0x0131, pci_subsys_11c1_0448_1014_0131, 0};
#undef pci_ss_info_1014_0131
@@ -21467,6 +21854,10 @@ static const pciSubsystemInfo pci_ss_info_12ae_0001_1410_0104 =
{0x1410, 0x0104, pci_subsys_12ae_0001_1410_0104, 0};
#undef pci_ss_info_1410_0104
#define pci_ss_info_1410_0104 pci_ss_info_12ae_0001_1410_0104
+static const pciSubsystemInfo pci_ss_info_12ae_0002_10a9_8002 =
+ {0x10a9, 0x8002, pci_subsys_12ae_0002_10a9_8002, 0};
+#undef pci_ss_info_10a9_8002
+#define pci_ss_info_10a9_8002 pci_ss_info_12ae_0002_10a9_8002
static const pciSubsystemInfo pci_ss_info_12ae_0002_12ae_0002 =
{0x12ae, 0x0002, pci_subsys_12ae_0002_12ae_0002, 0};
#undef pci_ss_info_12ae_0002
@@ -21827,6 +22218,10 @@ static const pciSubsystemInfo pci_ss_info_13f6_0111_13f6_0111 =
{0x13f6, 0x0111, pci_subsys_13f6_0111_13f6_0111, 0};
#undef pci_ss_info_13f6_0111
#define pci_ss_info_13f6_0111 pci_ss_info_13f6_0111_13f6_0111
+static const pciSubsystemInfo pci_ss_info_13f6_0111_1681_a000 =
+ {0x1681, 0xa000, pci_subsys_13f6_0111_1681_a000, 0};
+#undef pci_ss_info_1681_a000
+#define pci_ss_info_1681_a000 pci_ss_info_13f6_0111_1681_a000
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo pci_ss_info_1415_9501_15ed_2000 =
@@ -21965,6 +22360,18 @@ static const pciSubsystemInfo pci_ss_info_14e4_1645_1028_0121 =
#undef pci_ss_info_1028_0121
#define pci_ss_info_1028_0121 pci_ss_info_14e4_1645_1028_0121
#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciSubsystemInfo pci_ss_info_14e4_1645_10a9_8010 =
+ {0x10a9, 0x8010, pci_subsys_14e4_1645_10a9_8010, 0};
+#undef pci_ss_info_10a9_8010
+#define pci_ss_info_10a9_8010 pci_ss_info_14e4_1645_10a9_8010
+static const pciSubsystemInfo pci_ss_info_14e4_1645_10a9_8011 =
+ {0x10a9, 0x8011, pci_subsys_14e4_1645_10a9_8011, 0};
+#undef pci_ss_info_10a9_8011
+#define pci_ss_info_10a9_8011 pci_ss_info_14e4_1645_10a9_8011
+static const pciSubsystemInfo pci_ss_info_14e4_1645_10a9_8012 =
+ {0x10a9, 0x8012, pci_subsys_14e4_1645_10a9_8012, 0};
+#undef pci_ss_info_10a9_8012
+#define pci_ss_info_10a9_8012 pci_ss_info_14e4_1645_10a9_8012
static const pciSubsystemInfo pci_ss_info_14e4_1645_10b7_1004 =
{0x10b7, 0x1004, pci_subsys_14e4_1645_10b7_1004, 0};
#undef pci_ss_info_10b7_1004
@@ -22033,6 +22440,10 @@ static const pciSubsystemInfo pci_ss_info_14e4_1647_0e11_009a =
#undef pci_ss_info_0e11_009a
#define pci_ss_info_0e11_009a pci_ss_info_14e4_1647_0e11_009a
#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciSubsystemInfo pci_ss_info_14e4_1647_10a9_8010 =
+ {0x10a9, 0x8010, pci_subsys_14e4_1647_10a9_8010, 0};
+#undef pci_ss_info_10a9_8010
+#define pci_ss_info_10a9_8010 pci_ss_info_14e4_1647_10a9_8010
static const pciSubsystemInfo pci_ss_info_14e4_1647_14e4_0009 =
{0x14e4, 0x0009, pci_subsys_14e4_1647_14e4_0009, 0};
#undef pci_ss_info_14e4_0009
@@ -22159,6 +22570,10 @@ static const pciSubsystemInfo pci_ss_info_14e4_16c7_14e4_000a =
{0x14e4, 0x000a, pci_subsys_14e4_16c7_14e4_000a, 0};
#undef pci_ss_info_14e4_000a
#define pci_ss_info_14e4_000a pci_ss_info_14e4_16c7_14e4_000a
+static const pciSubsystemInfo pci_ss_info_14e4_4401_1043_80a8 =
+ {0x1043, 0x80a8, pci_subsys_14e4_4401_1043_80a8, 0};
+#undef pci_ss_info_1043_80a8
+#define pci_ss_info_1043_80a8 pci_ss_info_14e4_4401_1043_80a8
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
#endif
@@ -22888,6 +23303,14 @@ static const pciSubsystemInfo pci_ss_info_8086_1130_104d_80df =
{0x104d, 0x80df, pci_subsys_8086_1130_104d_80df, 0};
#undef pci_ss_info_104d_80df
#define pci_ss_info_104d_80df pci_ss_info_8086_1130_104d_80df
+static const pciSubsystemInfo pci_ss_info_8086_1130_8086_4532 =
+ {0x8086, 0x4532, pci_subsys_8086_1130_8086_4532, 0};
+#undef pci_ss_info_8086_4532
+#define pci_ss_info_8086_4532 pci_ss_info_8086_1130_8086_4532
+static const pciSubsystemInfo pci_ss_info_8086_1130_8086_4557 =
+ {0x8086, 0x4557, pci_subsys_8086_1130_8086_4557, 0};
+#undef pci_ss_info_8086_4557
+#define pci_ss_info_8086_4557 pci_ss_info_8086_1130_8086_4557
static const pciSubsystemInfo pci_ss_info_8086_1132_1025_1016 =
{0x1025, 0x1016, pci_subsys_8086_1132_1025_1016, 0};
#undef pci_ss_info_1025_1016
@@ -22896,6 +23319,14 @@ static const pciSubsystemInfo pci_ss_info_8086_1132_104d_80df =
{0x104d, 0x80df, pci_subsys_8086_1132_104d_80df, 0};
#undef pci_ss_info_104d_80df
#define pci_ss_info_104d_80df pci_ss_info_8086_1132_104d_80df
+static const pciSubsystemInfo pci_ss_info_8086_1132_8086_4532 =
+ {0x8086, 0x4532, pci_subsys_8086_1132_8086_4532, 0};
+#undef pci_ss_info_8086_4532
+#define pci_ss_info_8086_4532 pci_ss_info_8086_1132_8086_4532
+static const pciSubsystemInfo pci_ss_info_8086_1132_8086_4557 =
+ {0x8086, 0x4557, pci_subsys_8086_1132_8086_4557, 0};
+#undef pci_ss_info_8086_4557
+#define pci_ss_info_8086_4557 pci_ss_info_8086_1132_8086_4557
static const pciSubsystemInfo pci_ss_info_8086_1161_8086_1161 =
{0x8086, 0x1161, pci_subsys_8086_1161_8086_1161, 0};
#undef pci_ss_info_8086_1161
@@ -23632,6 +24063,14 @@ static const pciSubsystemInfo pci_ss_info_8086_2442_147b_0507 =
{0x147b, 0x0507, pci_subsys_8086_2442_147b_0507, 0};
#undef pci_ss_info_147b_0507
#define pci_ss_info_147b_0507 pci_ss_info_8086_2442_147b_0507
+static const pciSubsystemInfo pci_ss_info_8086_2442_8086_4532 =
+ {0x8086, 0x4532, pci_subsys_8086_2442_8086_4532, 0};
+#undef pci_ss_info_8086_4532
+#define pci_ss_info_8086_4532 pci_ss_info_8086_2442_8086_4532
+static const pciSubsystemInfo pci_ss_info_8086_2442_8086_4557 =
+ {0x8086, 0x4557, pci_subsys_8086_2442_8086_4557, 0};
+#undef pci_ss_info_8086_4557
+#define pci_ss_info_8086_4557 pci_ss_info_8086_2442_8086_4557
static const pciSubsystemInfo pci_ss_info_8086_2443_1014_01c6 =
{0x1014, 0x01c6, pci_subsys_8086_2443_1014_01c6, 0};
#undef pci_ss_info_1014_01c6
@@ -23652,6 +24091,14 @@ static const pciSubsystemInfo pci_ss_info_8086_2443_147b_0507 =
{0x147b, 0x0507, pci_subsys_8086_2443_147b_0507, 0};
#undef pci_ss_info_147b_0507
#define pci_ss_info_147b_0507 pci_ss_info_8086_2443_147b_0507
+static const pciSubsystemInfo pci_ss_info_8086_2443_8086_4532 =
+ {0x8086, 0x4532, pci_subsys_8086_2443_8086_4532, 0};
+#undef pci_ss_info_8086_4532
+#define pci_ss_info_8086_4532 pci_ss_info_8086_2443_8086_4532
+static const pciSubsystemInfo pci_ss_info_8086_2443_8086_4557 =
+ {0x8086, 0x4557, pci_subsys_8086_2443_8086_4557, 0};
+#undef pci_ss_info_8086_4557
+#define pci_ss_info_8086_4557 pci_ss_info_8086_2443_8086_4557
static const pciSubsystemInfo pci_ss_info_8086_2444_1025_1016 =
{0x1025, 0x1016, pci_subsys_8086_2444_1025_1016, 0};
#undef pci_ss_info_1025_1016
@@ -23664,6 +24111,10 @@ static const pciSubsystemInfo pci_ss_info_8086_2444_147b_0507 =
{0x147b, 0x0507, pci_subsys_8086_2444_147b_0507, 0};
#undef pci_ss_info_147b_0507
#define pci_ss_info_147b_0507 pci_ss_info_8086_2444_147b_0507
+static const pciSubsystemInfo pci_ss_info_8086_2444_8086_4532 =
+ {0x8086, 0x4532, pci_subsys_8086_2444_8086_4532, 0};
+#undef pci_ss_info_8086_4532
+#define pci_ss_info_8086_4532 pci_ss_info_8086_2444_8086_4532
static const pciSubsystemInfo pci_ss_info_8086_2445_1014_01c6 =
{0x1014, 0x01c6, pci_subsys_8086_2445_1014_01c6, 0};
#undef pci_ss_info_1014_01c6
@@ -23684,6 +24135,10 @@ static const pciSubsystemInfo pci_ss_info_8086_2445_147b_0507 =
{0x147b, 0x0507, pci_subsys_8086_2445_147b_0507, 0};
#undef pci_ss_info_147b_0507
#define pci_ss_info_147b_0507 pci_ss_info_8086_2445_147b_0507
+static const pciSubsystemInfo pci_ss_info_8086_2445_8086_4557 =
+ {0x8086, 0x4557, pci_subsys_8086_2445_8086_4557, 0};
+#undef pci_ss_info_8086_4557
+#define pci_ss_info_8086_4557 pci_ss_info_8086_2445_8086_4557
static const pciSubsystemInfo pci_ss_info_8086_2446_1025_1016 =
{0x1025, 0x1016, pci_subsys_8086_2446_1025_1016, 0};
#undef pci_ss_info_1025_1016
@@ -23744,6 +24199,18 @@ static const pciSubsystemInfo pci_ss_info_8086_2449_1014_0245 =
{0x1014, 0x0245, pci_subsys_8086_2449_1014_0245, 0};
#undef pci_ss_info_1014_0245
#define pci_ss_info_1014_0245 pci_ss_info_8086_2449_1014_0245
+static const pciSubsystemInfo pci_ss_info_8086_2449_1014_0265 =
+ {0x1014, 0x0265, pci_subsys_8086_2449_1014_0265, 0};
+#undef pci_ss_info_1014_0265
+#define pci_ss_info_1014_0265 pci_ss_info_8086_2449_1014_0265
+static const pciSubsystemInfo pci_ss_info_8086_2449_1014_0267 =
+ {0x1014, 0x0267, pci_subsys_8086_2449_1014_0267, 0};
+#undef pci_ss_info_1014_0267
+#define pci_ss_info_1014_0267 pci_ss_info_8086_2449_1014_0267
+static const pciSubsystemInfo pci_ss_info_8086_2449_1014_026a =
+ {0x1014, 0x026a, pci_subsys_8086_2449_1014_026a, 0};
+#undef pci_ss_info_1014_026a
+#define pci_ss_info_1014_026a pci_ss_info_8086_2449_1014_026a
static const pciSubsystemInfo pci_ss_info_8086_2449_109f_315d =
{0x109f, 0x315d, pci_subsys_8086_2449_109f_315d, 0};
#undef pci_ss_info_109f_315d
@@ -23752,6 +24219,10 @@ static const pciSubsystemInfo pci_ss_info_8086_2449_109f_3181 =
{0x109f, 0x3181, pci_subsys_8086_2449_109f_3181, 0};
#undef pci_ss_info_109f_3181
#define pci_ss_info_109f_3181 pci_ss_info_8086_2449_109f_3181
+static const pciSubsystemInfo pci_ss_info_8086_2449_1179_ff01 =
+ {0x1179, 0xff01, pci_subsys_8086_2449_1179_ff01, 0};
+#undef pci_ss_info_1179_ff01
+#define pci_ss_info_1179_ff01 pci_ss_info_8086_2449_1179_ff01
static const pciSubsystemInfo pci_ss_info_8086_2449_1186_7801 =
{0x1186, 0x7801, pci_subsys_8086_2449_1186_7801, 0};
#undef pci_ss_info_1186_7801
@@ -23816,6 +24287,14 @@ static const pciSubsystemInfo pci_ss_info_8086_244b_147b_0507 =
{0x147b, 0x0507, pci_subsys_8086_244b_147b_0507, 0};
#undef pci_ss_info_147b_0507
#define pci_ss_info_147b_0507 pci_ss_info_8086_244b_147b_0507
+static const pciSubsystemInfo pci_ss_info_8086_244b_8086_4532 =
+ {0x8086, 0x4532, pci_subsys_8086_244b_8086_4532, 0};
+#undef pci_ss_info_8086_4532
+#define pci_ss_info_8086_4532 pci_ss_info_8086_244b_8086_4532
+static const pciSubsystemInfo pci_ss_info_8086_244b_8086_4557 =
+ {0x8086, 0x4557, pci_subsys_8086_244b_8086_4557, 0};
+#undef pci_ss_info_8086_4557
+#define pci_ss_info_8086_4557 pci_ss_info_8086_244b_8086_4557
static const pciSubsystemInfo pci_ss_info_8086_2482_1014_0220 =
{0x1014, 0x0220, pci_subsys_8086_2482_1014_0220, 0};
#undef pci_ss_info_1014_0220
@@ -24024,6 +24503,10 @@ static const pciSubsystemInfo pci_ss_info_8086_5201_8086_0001 =
{0x8086, 0x0001, pci_subsys_8086_5201_8086_0001, 0};
#undef pci_ss_info_8086_0001
#define pci_ss_info_8086_0001 pci_ss_info_8086_5201_8086_0001
+static const pciSubsystemInfo pci_ss_info_8086_7121_8086_4341 =
+ {0x8086, 0x4341, pci_subsys_8086_7121_8086_4341, 0};
+#undef pci_ss_info_8086_4341
+#define pci_ss_info_8086_4341 pci_ss_info_8086_7121_8086_4341
static const pciSubsystemInfo pci_ss_info_8086_7190_0e11_0500 =
{0x0e11, 0x0500, pci_subsys_8086_7190_0e11_0500, 0};
#undef pci_ss_info_0e11_0500
@@ -24089,14 +24572,6 @@ static const pciSubsystemInfo pci_ss_info_9004_5078_9004_7850 =
{0x9004, 0x7850, pci_subsys_9004_5078_9004_7850, 0};
#undef pci_ss_info_9004_7850
#define pci_ss_info_9004_7850 pci_ss_info_9004_5078_9004_7850
-static const pciSubsystemInfo pci_ss_info_9004_5647_9004_7710 =
- {0x9004, 0x7710, pci_subsys_9004_5647_9004_7710, 0};
-#undef pci_ss_info_9004_7710
-#define pci_ss_info_9004_7710 pci_ss_info_9004_5647_9004_7710
-static const pciSubsystemInfo pci_ss_info_9004_5647_9004_7711 =
- {0x9004, 0x7711, pci_subsys_9004_5647_9004_7711, 0};
-#undef pci_ss_info_9004_7711
-#define pci_ss_info_9004_7711 pci_ss_info_9004_5647_9004_7711
static const pciSubsystemInfo pci_ss_info_9004_6075_9004_7560 =
{0x9004, 0x7560, pci_subsys_9004_6075_9004_7560, 0};
#undef pci_ss_info_9004_7560
@@ -24499,6 +24974,7 @@ static const pciSubsystemInfo *pci_ss_list_1000_1960[] = {
#define pci_ss_list_1001_0016 NULL
#define pci_ss_list_1001_0017 NULL
#define pci_ss_list_1001_9100 NULL
+#define pci_ss_list_1002_4136 NULL
#define pci_ss_list_1002_4144 NULL
#define pci_ss_list_1002_4145 NULL
#define pci_ss_list_1002_4146 NULL
@@ -24674,13 +25150,18 @@ static const pciSubsystemInfo *pci_ss_list_1002_4c59[] = {
#define pci_ss_list_1002_4d46 NULL
#define pci_ss_list_1002_4d4c NULL
#define pci_ss_list_1002_4e44 NULL
-#define pci_ss_list_1002_4e45 NULL
+static const pciSubsystemInfo *pci_ss_list_1002_4e45[] = {
+ &pci_ss_info_1002_4e45_1002_0002,
+ NULL
+};
#define pci_ss_list_1002_4e46 NULL
#define pci_ss_list_1002_4e47 NULL
+#define pci_ss_list_1002_4e48 NULL
#define pci_ss_list_1002_4e64 NULL
#define pci_ss_list_1002_4e65 NULL
#define pci_ss_list_1002_4e66 NULL
#define pci_ss_list_1002_4e67 NULL
+#define pci_ss_list_1002_4e68 NULL
#define pci_ss_list_1002_5041 NULL
#define pci_ss_list_1002_5042 NULL
#define pci_ss_list_1002_5043 NULL
@@ -24818,7 +25299,10 @@ static const pciSubsystemInfo *pci_ss_list_1002_524c[] = {
NULL
};
#define pci_ss_list_1002_5345 NULL
-#define pci_ss_list_1002_5346 NULL
+static const pciSubsystemInfo *pci_ss_list_1002_5346[] = {
+ &pci_ss_info_1002_5346_1002_0048,
+ NULL
+};
#define pci_ss_list_1002_5347 NULL
#define pci_ss_list_1002_5348 NULL
#define pci_ss_list_1002_534b NULL
@@ -24860,6 +25344,8 @@ static const pciSubsystemInfo *pci_ss_list_1002_5654[] = {
#define pci_ss_list_1002_5655 NULL
#define pci_ss_list_1002_5656 NULL
#define pci_ss_list_1002_700f NULL
+#define pci_ss_list_1002_7010 NULL
+#define pci_ss_list_1002_cab2 NULL
#define pci_ss_list_1003_0201 NULL
#define pci_ss_list_1004_0005 NULL
#define pci_ss_list_1004_0006 NULL
@@ -24964,6 +25450,7 @@ static const pciSubsystemInfo *pci_ss_list_1011_0014[] = {
NULL
};
#define pci_ss_list_1011_0016 NULL
+#define pci_ss_list_1011_0017 NULL
static const pciSubsystemInfo *pci_ss_list_1011_0019[] = {
&pci_ss_info_1011_0019_1011_500a,
&pci_ss_info_1011_0019_1011_500b,
@@ -25429,6 +25916,7 @@ static const pciSubsystemInfo *pci_ss_list_1028_0004[] = {
#define pci_ss_list_1028_0006 NULL
#define pci_ss_list_1028_0007 NULL
#define pci_ss_list_1028_0008 NULL
+#define pci_ss_list_1028_0009 NULL
static const pciSubsystemInfo *pci_ss_list_1028_000a[] = {
&pci_ss_info_1028_000a_1028_0106,
&pci_ss_info_1028_000a_1028_011b,
@@ -25436,11 +25924,13 @@ static const pciSubsystemInfo *pci_ss_list_1028_000a[] = {
NULL
};
#define pci_ss_list_1028_000c NULL
+#define pci_ss_list_1028_000d NULL
#define pci_ss_list_1028_000e NULL
#define pci_ss_list_1028_000f NULL
#define pci_ss_list_102a_0000 NULL
#define pci_ss_list_102a_0010 NULL
#define pci_ss_list_102b_0010 NULL
+#define pci_ss_list_102b_0100 NULL
#define pci_ss_list_102b_0518 NULL
#define pci_ss_list_102b_0519 NULL
static const pciSubsystemInfo *pci_ss_list_102b_051a[] = {
@@ -25698,6 +26188,7 @@ static const pciSubsystemInfo *pci_ss_list_1039_0300[] = {
#define pci_ss_list_1039_0635 NULL
#define pci_ss_list_1039_0645 NULL
#define pci_ss_list_1039_0646 NULL
+#define pci_ss_list_1039_0648 NULL
#define pci_ss_list_1039_0650 NULL
#define pci_ss_list_1039_0651 NULL
#define pci_ss_list_1039_0730 NULL
@@ -25705,6 +26196,7 @@ static const pciSubsystemInfo *pci_ss_list_1039_0300[] = {
#define pci_ss_list_1039_0735 NULL
#define pci_ss_list_1039_0740 NULL
#define pci_ss_list_1039_0745 NULL
+#define pci_ss_list_1039_0755 NULL
static const pciSubsystemInfo *pci_ss_list_1039_0900[] = {
&pci_ss_info_1039_0900_1039_0900,
NULL
@@ -25841,6 +26333,7 @@ static const pciSubsystemInfo *pci_ss_list_103c_1048[] = {
#define pci_ss_list_103c_122a NULL
#define pci_ss_list_103c_122e NULL
#define pci_ss_list_103c_1290 NULL
+#define pci_ss_list_103c_12b4 NULL
#define pci_ss_list_103c_2910 NULL
#define pci_ss_list_103c_2925 NULL
#define pci_ss_list_1042_1000 NULL
@@ -26117,7 +26610,10 @@ static const pciSubsystemInfo *pci_ss_list_105a_0d38[] = {
NULL
};
#define pci_ss_list_105a_1275 NULL
-#define pci_ss_list_105a_3376 NULL
+static const pciSubsystemInfo *pci_ss_list_105a_3376[] = {
+ &pci_ss_info_105a_3376_1043_809e,
+ NULL
+};
static const pciSubsystemInfo *pci_ss_list_105a_4d30[] = {
&pci_ss_info_105a_4d30_105a_4d33,
&pci_ss_info_105a_4d30_105a_4d39,
@@ -26137,7 +26633,10 @@ static const pciSubsystemInfo *pci_ss_list_105a_4d68[] = {
&pci_ss_info_105a_4d68_105a_4d68,
NULL
};
-#define pci_ss_list_105a_4d69 NULL
+static const pciSubsystemInfo *pci_ss_list_105a_4d69[] = {
+ &pci_ss_info_105a_4d69_105a_4d68,
+ NULL
+};
static const pciSubsystemInfo *pci_ss_list_105a_5275[] = {
&pci_ss_info_105a_5275_105a_0275,
NULL
@@ -26187,7 +26686,10 @@ static const pciSubsystemInfo *pci_ss_list_105d_493d[] = {
&pci_ss_info_105d_493d_13cc_000a,
NULL
};
-#define pci_ss_list_105d_5348 NULL
+static const pciSubsystemInfo *pci_ss_list_105d_5348[] = {
+ &pci_ss_info_105d_5348_105d_0037,
+ NULL
+};
#define pci_ss_list_1060_0001 NULL
#define pci_ss_list_1060_0002 NULL
#define pci_ss_list_1060_0101 NULL
@@ -26324,7 +26826,10 @@ static const pciSubsystemInfo *pci_ss_list_1077_2100[] = {
&pci_ss_info_1077_2100_1077_0001,
NULL
};
-#define pci_ss_list_1077_2200 NULL
+static const pciSubsystemInfo *pci_ss_list_1077_2200[] = {
+ &pci_ss_info_1077_2200_1077_0002,
+ NULL
+};
#define pci_ss_list_1077_2300 NULL
#define pci_ss_list_1077_2312 NULL
#endif
@@ -26457,6 +26962,7 @@ static const pciSubsystemInfo *pci_ss_list_108d_0019[] = {
#define pci_ss_list_1093_b091 NULL
#define pci_ss_list_1093_c801 NULL
#define pci_ss_list_1093_c831 NULL
+#define pci_ss_list_1095_0240 NULL
#define pci_ss_list_1095_0640 NULL
#define pci_ss_list_1095_0643 NULL
#define pci_ss_list_1095_0646 NULL
@@ -26609,6 +27115,7 @@ static const pciSubsystemInfo *pci_ss_list_109e_0879[] = {
#define pci_ss_list_109e_8230 NULL
#define pci_ss_list_109e_8472 NULL
#define pci_ss_list_109e_8474 NULL
+#define pci_ss_list_10a5_3052 NULL
#define pci_ss_list_10a5_5449 NULL
#define pci_ss_list_10a8_0000 NULL
#define pci_ss_list_10a9_0001 NULL
@@ -26619,7 +27126,11 @@ static const pciSubsystemInfo *pci_ss_list_109e_0879[] = {
#define pci_ss_list_10a9_0006 NULL
#define pci_ss_list_10a9_0007 NULL
#define pci_ss_list_10a9_0008 NULL
-#define pci_ss_list_10a9_0009 NULL
+#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciSubsystemInfo *pci_ss_list_10a9_0009[] = {
+ &pci_ss_info_10a9_0009_10a9_8002,
+ NULL
+};
#define pci_ss_list_10a9_0010 NULL
#define pci_ss_list_10a9_0011 NULL
#define pci_ss_list_10a9_0012 NULL
@@ -26631,10 +27142,12 @@ static const pciSubsystemInfo *pci_ss_list_109e_0879[] = {
#define pci_ss_list_10a9_1006 NULL
#define pci_ss_list_10a9_1007 NULL
#define pci_ss_list_10a9_1008 NULL
+#define pci_ss_list_10a9_100a NULL
#define pci_ss_list_10a9_2001 NULL
#define pci_ss_list_10a9_2002 NULL
#define pci_ss_list_10a9_8001 NULL
#define pci_ss_list_10a9_8002 NULL
+#endif
#define pci_ss_list_10aa_0000 NULL
#define pci_ss_list_10ad_0001 NULL
#define pci_ss_list_10ad_0003 NULL
@@ -26702,6 +27215,7 @@ static const pciSubsystemInfo *pci_ss_list_10b5_9050[] = {
};
static const pciSubsystemInfo *pci_ss_list_10b5_9054[] = {
&pci_ss_info_10b5_9054_10b5_2455,
+ &pci_ss_info_10b5_9054_12d9_0002,
NULL
};
#define pci_ss_list_10b5_9060 NULL
@@ -26713,6 +27227,7 @@ static const pciSubsystemInfo *pci_ss_list_10b5_906d[] = {
static const pciSubsystemInfo *pci_ss_list_10b5_9080[] = {
&pci_ss_info_10b5_9080_10b5_9080,
&pci_ss_info_10b5_9080_129d_0002,
+ &pci_ss_info_10b5_9080_12d9_0002,
NULL
};
#endif
@@ -26759,6 +27274,7 @@ static const pciSubsystemInfo *pci_ss_list_10b6_000c[] = {
#define pci_ss_list_10b6_1001 NULL
#endif
#define pci_ss_list_10b7_0001 NULL
+#define pci_ss_list_10b7_0910 NULL
#define pci_ss_list_10b7_1006 NULL
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo *pci_ss_list_10b7_1007[] = {
@@ -26926,6 +27442,7 @@ static const pciSubsystemInfo *pci_ss_list_10b8_0006[] = {
#define pci_ss_list_10b8_a011 NULL
#define pci_ss_list_10b8_b106 NULL
#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo *pci_ss_list_10b9_0111[] = {
&pci_ss_info_10b9_0111_10b9_0111,
NULL
@@ -26995,6 +27512,7 @@ static const pciSubsystemInfo *pci_ss_list_10b9_5229[] = {
#define pci_ss_list_10b9_5251 NULL
#define pci_ss_list_10b9_5253 NULL
#define pci_ss_list_10b9_5261 NULL
+#define pci_ss_list_10b9_5450 NULL
static const pciSubsystemInfo *pci_ss_list_10b9_5451[] = {
&pci_ss_info_10b9_5451_1014_0506,
NULL
@@ -27010,6 +27528,7 @@ static const pciSubsystemInfo *pci_ss_list_10b9_7101[] = {
&pci_ss_info_10b9_7101_10b9_7101,
NULL
};
+#endif
#define pci_ss_list_10ba_0301 NULL
#define pci_ss_list_10bd_0e34 NULL
#define pci_ss_list_10c3_1100 NULL
@@ -27123,6 +27642,7 @@ static const pciSubsystemInfo *pci_ss_list_10de_0028[] = {
&pci_ss_info_10de_0028_1043_0201,
&pci_ss_info_10de_0028_1043_0205,
&pci_ss_info_10de_0028_1043_4000,
+ &pci_ss_info_10de_0028_1048_0c21,
&pci_ss_info_10de_0028_1092_4804,
&pci_ss_info_10de_0028_1092_4a00,
&pci_ss_info_10de_0028_1092_4a02,
@@ -27239,6 +27759,7 @@ static const pciSubsystemInfo *pci_ss_list_10de_0152[] = {
#define pci_ss_list_10de_0153 NULL
#define pci_ss_list_10de_0170 NULL
static const pciSubsystemInfo *pci_ss_list_10de_0171[] = {
+ &pci_ss_info_10de_0171_10b0_0002,
&pci_ss_info_10de_0171_1462_8661,
&pci_ss_info_10de_0171_1462_8730,
&pci_ss_info_10de_0171_147b_8f00,
@@ -27441,6 +27962,8 @@ static const pciSubsystemInfo *pci_ss_list_1102_0002[] = {
&pci_ss_info_1102_0002_1102_8040,
&pci_ss_info_1102_0002_1102_8051,
&pci_ss_info_1102_0002_1102_8061,
+ &pci_ss_info_1102_0002_1102_8064,
+ &pci_ss_info_1102_0002_1102_8065,
NULL
};
static const pciSubsystemInfo *pci_ss_list_1102_0004[] = {
@@ -27476,12 +27999,14 @@ static const pciSubsystemInfo *pci_ss_list_1103_0004[] = {
#define pci_ss_list_1103_0006 NULL
#define pci_ss_list_1103_0007 NULL
#define pci_ss_list_1103_0008 NULL
+#define pci_ss_list_1103_0009 NULL
#endif
#define pci_ss_list_1105_1105 NULL
#define pci_ss_list_1105_8300 NULL
#define pci_ss_list_1105_8400 NULL
#define pci_ss_list_1106_0102 NULL
#define pci_ss_list_1106_0130 NULL
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo *pci_ss_list_1106_0305[] = {
&pci_ss_info_1106_0305_1043_8033,
&pci_ss_info_1106_0305_1043_803e,
@@ -27494,7 +28019,9 @@ static const pciSubsystemInfo *pci_ss_list_1106_0305[] = {
#define pci_ss_list_1106_0505 NULL
#define pci_ss_list_1106_0561 NULL
static const pciSubsystemInfo *pci_ss_list_1106_0571[] = {
+ &pci_ss_info_1106_0571_1019_0985,
&pci_ss_info_1106_0571_1043_8052,
+ &pci_ss_info_1106_0571_1043_808c,
&pci_ss_info_1106_0571_1106_0571,
&pci_ss_info_1106_0571_1179_0001,
&pci_ss_info_1106_0571_1458_5002,
@@ -27515,9 +28042,14 @@ static const pciSubsystemInfo *pci_ss_list_1106_0596[] = {
#define pci_ss_list_1106_0597 NULL
#define pci_ss_list_1106_0598 NULL
#define pci_ss_list_1106_0601 NULL
-#define pci_ss_list_1106_0605 NULL
+static const pciSubsystemInfo *pci_ss_list_1106_0605[] = {
+ &pci_ss_info_1106_0605_1043_802c,
+ NULL
+};
#define pci_ss_list_1106_0680 NULL
static const pciSubsystemInfo *pci_ss_list_1106_0686[] = {
+ &pci_ss_info_1106_0686_1019_0985,
+ &pci_ss_info_1106_0686_1043_802c,
&pci_ss_info_1106_0686_1043_8033,
&pci_ss_info_1106_0686_1043_803e,
&pci_ss_info_1106_0686_1043_8040,
@@ -27529,6 +28061,7 @@ static const pciSubsystemInfo *pci_ss_list_1106_0686[] = {
NULL
};
static const pciSubsystemInfo *pci_ss_list_1106_0691[] = {
+ &pci_ss_info_1106_0691_1019_0985,
&pci_ss_info_1106_0691_1179_0001,
&pci_ss_info_1106_0691_1458_0691,
NULL
@@ -27542,6 +28075,8 @@ static const pciSubsystemInfo *pci_ss_list_1106_0691[] = {
#define pci_ss_list_1106_1595 NULL
static const pciSubsystemInfo *pci_ss_list_1106_3038[] = {
&pci_ss_info_1106_3038_0925_1234,
+ &pci_ss_info_1106_3038_1019_0985,
+ &pci_ss_info_1106_3038_1043_808c,
&pci_ss_info_1106_3038_1179_0001,
NULL
};
@@ -27556,6 +28091,7 @@ static const pciSubsystemInfo *pci_ss_list_1106_3043[] = {
#define pci_ss_list_1106_3050 NULL
#define pci_ss_list_1106_3051 NULL
static const pciSubsystemInfo *pci_ss_list_1106_3057[] = {
+ &pci_ss_info_1106_3057_1019_0985,
&pci_ss_info_1106_3057_1043_8033,
&pci_ss_info_1106_3057_1043_803e,
&pci_ss_info_1106_3057_1043_8040,
@@ -27565,6 +28101,7 @@ static const pciSubsystemInfo *pci_ss_list_1106_3057[] = {
};
static const pciSubsystemInfo *pci_ss_list_1106_3058[] = {
&pci_ss_info_1106_3058_0e11_b194,
+ &pci_ss_info_1106_3058_1019_0985,
&pci_ss_info_1106_3058_1106_4511,
&pci_ss_info_1106_3058_1458_7600,
&pci_ss_info_1106_3058_1462_3091,
@@ -27572,6 +28109,7 @@ static const pciSubsystemInfo *pci_ss_list_1106_3058[] = {
NULL
};
static const pciSubsystemInfo *pci_ss_list_1106_3059[] = {
+ &pci_ss_info_1106_3059_1043_8095,
&pci_ss_info_1106_3059_1458_a002,
NULL
};
@@ -27579,6 +28117,7 @@ static const pciSubsystemInfo *pci_ss_list_1106_3065[] = {
&pci_ss_info_1106_3065_1106_0102,
&pci_ss_info_1106_3065_1186_1400,
&pci_ss_info_1106_3065_1186_1401,
+ &pci_ss_info_1106_3065_13b9_1421,
NULL
};
#define pci_ss_list_1106_3068 NULL
@@ -27596,6 +28135,7 @@ static const pciSubsystemInfo *pci_ss_list_1106_3099[] = {
#define pci_ss_list_1106_3102 NULL
#define pci_ss_list_1106_3103 NULL
static const pciSubsystemInfo *pci_ss_list_1106_3104[] = {
+ &pci_ss_info_1106_3104_1043_808c,
&pci_ss_info_1106_3104_1458_5004,
NULL
};
@@ -27612,10 +28152,12 @@ static const pciSubsystemInfo *pci_ss_list_1106_3104[] = {
#define pci_ss_list_1106_3156 NULL
#define pci_ss_list_1106_3168 NULL
static const pciSubsystemInfo *pci_ss_list_1106_3177[] = {
+ &pci_ss_info_1106_3177_1043_808c,
&pci_ss_info_1106_3177_1458_5001,
NULL
};
static const pciSubsystemInfo *pci_ss_list_1106_3189[] = {
+ &pci_ss_info_1106_3189_1043_807f,
&pci_ss_info_1106_3189_1458_5000,
NULL
};
@@ -27628,7 +28170,10 @@ static const pciSubsystemInfo *pci_ss_list_1106_3189[] = {
#define pci_ss_list_1106_8501 NULL
#define pci_ss_list_1106_8596 NULL
#define pci_ss_list_1106_8597 NULL
-#define pci_ss_list_1106_8598 NULL
+static const pciSubsystemInfo *pci_ss_list_1106_8598[] = {
+ &pci_ss_info_1106_8598_1019_0985,
+ NULL
+};
#define pci_ss_list_1106_8601 NULL
#define pci_ss_list_1106_8605 NULL
#define pci_ss_list_1106_8691 NULL
@@ -27640,6 +28185,7 @@ static const pciSubsystemInfo *pci_ss_list_1106_3189[] = {
#define pci_ss_list_1106_b103 NULL
#define pci_ss_list_1106_b112 NULL
#define pci_ss_list_1106_b168 NULL
+#endif
#define pci_ss_list_1107_0576 NULL
#define pci_ss_list_1108_0100 NULL
#define pci_ss_list_1108_0101 NULL
@@ -27652,6 +28198,12 @@ static const pciSubsystemInfo *pci_ss_list_1106_3189[] = {
#define pci_ss_list_1109_1400 NULL
#define pci_ss_list_110a_0002 NULL
#define pci_ss_list_110a_0005 NULL
+#define pci_ss_list_110a_0006 NULL
+#define pci_ss_list_110a_0015 NULL
+#define pci_ss_list_110a_001d NULL
+#define pci_ss_list_110a_007b NULL
+#define pci_ss_list_110a_007c NULL
+#define pci_ss_list_110a_007d NULL
#define pci_ss_list_110a_2102 NULL
#define pci_ss_list_110a_4942 NULL
#define pci_ss_list_110a_6120 NULL
@@ -28049,6 +28601,7 @@ static const pciSubsystemInfo *pci_ss_list_1163_2000[] = {
};
#define pci_ss_list_1165_0001 NULL
#define pci_ss_list_1166_0005 NULL
+#define pci_ss_list_1166_0006 NULL
#define pci_ss_list_1166_0007 NULL
#define pci_ss_list_1166_0008 NULL
#define pci_ss_list_1166_0009 NULL
@@ -28266,7 +28819,10 @@ static const pciSubsystemInfo *pci_ss_list_11c1_0442[] = {
};
#define pci_ss_list_11c1_0443 NULL
#define pci_ss_list_11c1_0444 NULL
-#define pci_ss_list_11c1_0445 NULL
+static const pciSubsystemInfo *pci_ss_list_11c1_0445[] = {
+ &pci_ss_info_11c1_0445_8086_2203,
+ NULL
+};
#define pci_ss_list_11c1_0446 NULL
#define pci_ss_list_11c1_0447 NULL
static const pciSubsystemInfo *pci_ss_list_11c1_0448[] = {
@@ -28625,6 +29181,7 @@ static const pciSubsystemInfo *pci_ss_list_1260_3873[] = {
&pci_ss_info_1260_3873_8086_2513,
NULL
};
+#define pci_ss_list_1260_3890 NULL
#define pci_ss_list_1260_8130 NULL
#define pci_ss_list_1260_8131 NULL
#endif
@@ -28640,11 +29197,13 @@ static const pciSubsystemInfo *pci_ss_list_1266_1910[] = {
#define pci_ss_list_126f_0710 NULL
#define pci_ss_list_126f_0712 NULL
#define pci_ss_list_126f_0720 NULL
+#define pci_ss_list_126f_0730 NULL
#define pci_ss_list_126f_0810 NULL
#define pci_ss_list_126f_0811 NULL
#define pci_ss_list_126f_0820 NULL
#define pci_ss_list_126f_0910 NULL
#define pci_ss_list_1273_0002 NULL
+#define pci_ss_list_1274_1171 NULL
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo *pci_ss_list_1274_1371[] = {
&pci_ss_info_1274_1371_0e11_0024,
@@ -28716,6 +29275,7 @@ static const pciSubsystemInfo *pci_ss_list_1274_5880[] = {
};
#endif
#define pci_ss_list_1278_0701 NULL
+#define pci_ss_list_1278_0710 NULL
#define pci_ss_list_1279_0295 NULL
#define pci_ss_list_1279_0395 NULL
#define pci_ss_list_1279_0396 NULL
@@ -28896,6 +29456,7 @@ static const pciSubsystemInfo *pci_ss_list_12ae_0001[] = {
NULL
};
static const pciSubsystemInfo *pci_ss_list_12ae_0002[] = {
+ &pci_ss_info_12ae_0002_10a9_8002,
&pci_ss_info_12ae_0002_12ae_0002,
NULL
};
@@ -28969,6 +29530,9 @@ static const pciSubsystemInfo *pci_ss_list_12d2_0018[] = {
#define pci_ss_list_12d2_0029 NULL
#define pci_ss_list_12d2_002c NULL
#define pci_ss_list_12d2_00a0 NULL
+#define pci_ss_list_12d4_0200 NULL
+#define pci_ss_list_12d9_0002 NULL
+#define pci_ss_list_12d9_0004 NULL
#define pci_ss_list_12e0_0010 NULL
#define pci_ss_list_12e0_0020 NULL
#define pci_ss_list_12e0_0030 NULL
@@ -29052,6 +29616,7 @@ static const pciSubsystemInfo *pci_ss_list_12eb_8803[] = {
#define pci_ss_list_1307_0036 NULL
#define pci_ss_list_1307_0037 NULL
#define pci_ss_list_1307_004c NULL
+#define pci_ss_list_1307_004d NULL
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo *pci_ss_list_1308_0001[] = {
&pci_ss_info_1308_0001_1308_0001,
@@ -29109,6 +29674,7 @@ static const pciSubsystemInfo *pci_ss_list_131f_2030[] = {
#define pci_ss_list_131f_2062 NULL
#endif
#define pci_ss_list_1332_5415 NULL
+#define pci_ss_list_1332_5425 NULL
#define pci_ss_list_134a_0001 NULL
#define pci_ss_list_134a_0002 NULL
#define pci_ss_list_134d_7890 NULL
@@ -29149,6 +29715,7 @@ static const pciSubsystemInfo *pci_ss_list_134d_7891[] = {
#define pci_ss_list_135e_7801 NULL
#define pci_ss_list_135e_8001 NULL
#define pci_ss_list_1385_4100 NULL
+#define pci_ss_list_1385_4105 NULL
#define pci_ss_list_1385_620a NULL
#define pci_ss_list_1385_622a NULL
#define pci_ss_list_1385_630a NULL
@@ -29213,6 +29780,7 @@ static const pciSubsystemInfo *pci_ss_list_13f6_0111[] = {
&pci_ss_info_13f6_0111_1043_8077,
&pci_ss_info_13f6_0111_1043_80e2,
&pci_ss_info_13f6_0111_13f6_0111,
+ &pci_ss_info_13f6_0111_1681_a000,
NULL
};
#define pci_ss_list_13f6_0211 NULL
@@ -29262,7 +29830,9 @@ static const pciSubsystemInfo *pci_ss_list_1415_9511[] = {
#define pci_ss_list_144a_9113 NULL
#define pci_ss_list_144a_9114 NULL
#define pci_ss_list_145f_0001 NULL
+#define pci_ss_list_146c_1430 NULL
#define pci_ss_list_148d_1003 NULL
+#define pci_ss_list_149d_0001 NULL
#define pci_ss_list_14af_7102 NULL
#define pci_ss_list_14b3_0000 NULL
#define pci_ss_list_14b5_0200 NULL
@@ -29338,6 +29908,9 @@ static const pciSubsystemInfo *pci_ss_list_14e4_1645[] = {
&pci_ss_info_14e4_1645_0e11_009a,
&pci_ss_info_14e4_1645_0e11_00c1,
&pci_ss_info_14e4_1645_1028_0121,
+ &pci_ss_info_14e4_1645_10a9_8010,
+ &pci_ss_info_14e4_1645_10a9_8011,
+ &pci_ss_info_14e4_1645_10a9_8012,
&pci_ss_info_14e4_1645_10b7_1004,
&pci_ss_info_14e4_1645_10b7_1006,
&pci_ss_info_14e4_1645_10b7_1007,
@@ -29359,6 +29932,7 @@ static const pciSubsystemInfo *pci_ss_list_14e4_1646[] = {
static const pciSubsystemInfo *pci_ss_list_14e4_1647[] = {
&pci_ss_info_14e4_1647_0e11_0099,
&pci_ss_info_14e4_1647_0e11_009a,
+ &pci_ss_info_14e4_1647_10a9_8010,
&pci_ss_info_14e4_1647_14e4_0009,
&pci_ss_info_14e4_1647_14e4_000a,
&pci_ss_info_14e4_1647_14e4_000b,
@@ -29382,6 +29956,7 @@ static const pciSubsystemInfo *pci_ss_list_14e4_1696[] = {
&pci_ss_info_14e4_1696_14e4_000d,
NULL
};
+#define pci_ss_list_14e4_169c NULL
static const pciSubsystemInfo *pci_ss_list_14e4_16a6[] = {
&pci_ss_info_14e4_16a6_0e11_00bb,
&pci_ss_info_14e4_16a6_1028_0126,
@@ -29417,7 +29992,11 @@ static const pciSubsystemInfo *pci_ss_list_14e4_16c7[] = {
#define pci_ss_list_14e4_4211 NULL
#define pci_ss_list_14e4_4212 NULL
#define pci_ss_list_14e4_4301 NULL
-#define pci_ss_list_14e4_4401 NULL
+#define pci_ss_list_14e4_4320 NULL
+static const pciSubsystemInfo *pci_ss_list_14e4_4401[] = {
+ &pci_ss_info_14e4_4401_1043_80a8,
+ NULL
+};
#define pci_ss_list_14e4_4402 NULL
#define pci_ss_list_14e4_4410 NULL
#define pci_ss_list_14e4_4411 NULL
@@ -29507,6 +30086,9 @@ static const pciSubsystemInfo *pci_ss_list_14f1_1456[] = {
};
#define pci_ss_list_14f1_1610 NULL
#define pci_ss_list_14f1_1611 NULL
+#define pci_ss_list_14f1_1620 NULL
+#define pci_ss_list_14f1_1621 NULL
+#define pci_ss_list_14f1_1622 NULL
static const pciSubsystemInfo *pci_ss_list_14f1_1803[] = {
&pci_ss_info_14f1_1803_0e11_0023,
&pci_ss_info_14f1_1803_0e11_0043,
@@ -29661,11 +30243,13 @@ static const pciSubsystemInfo *pci_ss_list_1522_0100[] = {
#define pci_ss_list_1629_1003 NULL
#define pci_ss_list_1629_2002 NULL
#define pci_ss_list_1638_1100 NULL
+#define pci_ss_list_163c_3052 NULL
#define pci_ss_list_163c_5449 NULL
#define pci_ss_list_165a_c100 NULL
#define pci_ss_list_165a_d200 NULL
#define pci_ss_list_165a_d300 NULL
#define pci_ss_list_16ab_1102 NULL
+#define pci_ss_list_16ca_0001 NULL
#define pci_ss_list_16ec_3685 NULL
#define pci_ss_list_173b_03e8 NULL
#ifdef VENDOR_INCLUDE_NONVIDEO
@@ -29703,10 +30287,13 @@ static const pciSubsystemInfo *pci_ss_list_1813_4100[] = {
#define pci_ss_list_1de1_2020 NULL
#define pci_ss_list_1de1_690c NULL
#define pci_ss_list_1de1_dc29 NULL
+#define pci_ss_list_1fc0_0300 NULL
#define pci_ss_list_2348_2010 NULL
#define pci_ss_list_3388_0013 NULL
#define pci_ss_list_3388_0014 NULL
#define pci_ss_list_3388_0021 NULL
+#define pci_ss_list_3388_101a NULL
+#define pci_ss_list_3388_101b NULL
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo *pci_ss_list_3388_8011[] = {
&pci_ss_info_3388_8011_3388_8011,
@@ -29963,6 +30550,7 @@ static const pciSubsystemInfo *pci_ss_list_5333_9102[] = {
NULL
};
#define pci_ss_list_5333_ca00 NULL
+#define pci_ss_list_544c_0350 NULL
#define pci_ss_list_5455_4458 NULL
#define pci_ss_list_5544_0001 NULL
#define pci_ss_list_5555_0003 NULL
@@ -30082,17 +30670,22 @@ static const pciSubsystemInfo *pci_ss_list_8086_1040[] = {
&pci_ss_info_8086_1040_16be_1040,
NULL
};
+#define pci_ss_list_8086_1043 NULL
#define pci_ss_list_8086_1059 NULL
static const pciSubsystemInfo *pci_ss_list_8086_1130[] = {
&pci_ss_info_8086_1130_1025_1016,
&pci_ss_info_8086_1130_1043_8027,
&pci_ss_info_8086_1130_104d_80df,
+ &pci_ss_info_8086_1130_8086_4532,
+ &pci_ss_info_8086_1130_8086_4557,
NULL
};
#define pci_ss_list_8086_1131 NULL
static const pciSubsystemInfo *pci_ss_list_8086_1132[] = {
&pci_ss_info_8086_1132_1025_1016,
&pci_ss_info_8086_1132_104d_80df,
+ &pci_ss_info_8086_1132_8086_4532,
+ &pci_ss_info_8086_1132_8086_4557,
NULL
};
static const pciSubsystemInfo *pci_ss_list_8086_1161[] = {
@@ -30352,6 +30945,8 @@ static const pciSubsystemInfo *pci_ss_list_8086_2442[] = {
&pci_ss_info_8086_2442_1025_1016,
&pci_ss_info_8086_2442_104d_80df,
&pci_ss_info_8086_2442_147b_0507,
+ &pci_ss_info_8086_2442_8086_4532,
+ &pci_ss_info_8086_2442_8086_4557,
NULL
};
static const pciSubsystemInfo *pci_ss_list_8086_2443[] = {
@@ -30360,12 +30955,15 @@ static const pciSubsystemInfo *pci_ss_list_8086_2443[] = {
&pci_ss_info_8086_2443_1043_8027,
&pci_ss_info_8086_2443_104d_80df,
&pci_ss_info_8086_2443_147b_0507,
+ &pci_ss_info_8086_2443_8086_4532,
+ &pci_ss_info_8086_2443_8086_4557,
NULL
};
static const pciSubsystemInfo *pci_ss_list_8086_2444[] = {
&pci_ss_info_8086_2444_1025_1016,
&pci_ss_info_8086_2444_104d_80df,
&pci_ss_info_8086_2444_147b_0507,
+ &pci_ss_info_8086_2444_8086_4532,
NULL
};
static const pciSubsystemInfo *pci_ss_list_8086_2445[] = {
@@ -30374,6 +30972,7 @@ static const pciSubsystemInfo *pci_ss_list_8086_2445[] = {
&pci_ss_info_8086_2445_104d_80df,
&pci_ss_info_8086_2445_1462_3370,
&pci_ss_info_8086_2445_147b_0507,
+ &pci_ss_info_8086_2445_8086_4557,
NULL
};
static const pciSubsystemInfo *pci_ss_list_8086_2446[] = {
@@ -30396,8 +30995,12 @@ static const pciSubsystemInfo *pci_ss_list_8086_2449[] = {
&pci_ss_info_8086_2449_1014_023d,
&pci_ss_info_8086_2449_1014_0244,
&pci_ss_info_8086_2449_1014_0245,
+ &pci_ss_info_8086_2449_1014_0265,
+ &pci_ss_info_8086_2449_1014_0267,
+ &pci_ss_info_8086_2449_1014_026a,
&pci_ss_info_8086_2449_109f_315d,
&pci_ss_info_8086_2449_109f_3181,
+ &pci_ss_info_8086_2449_1179_ff01,
&pci_ss_info_8086_2449_1186_7801,
&pci_ss_info_8086_2449_144d_2602,
&pci_ss_info_8086_2449_8086_3010,
@@ -30420,6 +31023,8 @@ static const pciSubsystemInfo *pci_ss_list_8086_244b[] = {
&pci_ss_info_8086_244b_1014_01c6,
&pci_ss_info_8086_244b_1043_8027,
&pci_ss_info_8086_244b_147b_0507,
+ &pci_ss_info_8086_244b_8086_4532,
+ &pci_ss_info_8086_244b_8086_4557,
NULL
};
#define pci_ss_list_8086_244c NULL
@@ -30515,14 +31120,28 @@ static const pciSubsystemInfo *pci_ss_list_8086_24c7[] = {
&pci_ss_info_8086_24c7_1462_5800,
NULL
};
+#define pci_ss_list_8086_24ca NULL
static const pciSubsystemInfo *pci_ss_list_8086_24cb[] = {
&pci_ss_info_8086_24cb_1462_5800,
NULL
};
+#define pci_ss_list_8086_24cc NULL
static const pciSubsystemInfo *pci_ss_list_8086_24cd[] = {
&pci_ss_info_8086_24cd_1462_3981,
NULL
};
+#define pci_ss_list_8086_24d0 NULL
+#define pci_ss_list_8086_24d1 NULL
+#define pci_ss_list_8086_24d2 NULL
+#define pci_ss_list_8086_24d3 NULL
+#define pci_ss_list_8086_24d4 NULL
+#define pci_ss_list_8086_24d5 NULL
+#define pci_ss_list_8086_24d6 NULL
+#define pci_ss_list_8086_24d7 NULL
+#define pci_ss_list_8086_24db NULL
+#define pci_ss_list_8086_24dc NULL
+#define pci_ss_list_8086_24dd NULL
+#define pci_ss_list_8086_24de NULL
static const pciSubsystemInfo *pci_ss_list_8086_2500[] = {
&pci_ss_info_8086_2500_1028_0095,
&pci_ss_info_8086_2500_1043_801c,
@@ -30558,6 +31177,13 @@ static const pciSubsystemInfo *pci_ss_list_8086_2541[] = {
#define pci_ss_list_8086_2546 NULL
#define pci_ss_list_8086_2547 NULL
#define pci_ss_list_8086_2548 NULL
+#define pci_ss_list_8086_254c NULL
+#define pci_ss_list_8086_2550 NULL
+#define pci_ss_list_8086_2551 NULL
+#define pci_ss_list_8086_2552 NULL
+#define pci_ss_list_8086_2553 NULL
+#define pci_ss_list_8086_2554 NULL
+#define pci_ss_list_8086_255d NULL
static const pciSubsystemInfo *pci_ss_list_8086_2560[] = {
&pci_ss_info_8086_2560_1462_5800,
NULL
@@ -30565,8 +31191,17 @@ static const pciSubsystemInfo *pci_ss_list_8086_2560[] = {
#define pci_ss_list_8086_2561 NULL
#define pci_ss_list_8086_2562 NULL
#define pci_ss_list_8086_2570 NULL
+#define pci_ss_list_8086_2571 NULL
#define pci_ss_list_8086_2572 NULL
+#define pci_ss_list_8086_2573 NULL
+#define pci_ss_list_8086_2576 NULL
+#define pci_ss_list_8086_2578 NULL
+#define pci_ss_list_8086_2579 NULL
+#define pci_ss_list_8086_257b NULL
+#define pci_ss_list_8086_257e NULL
#define pci_ss_list_8086_3092 NULL
+#define pci_ss_list_8086_3340 NULL
+#define pci_ss_list_8086_3341 NULL
static const pciSubsystemInfo *pci_ss_list_8086_3575[] = {
&pci_ss_info_8086_3575_1014_021d,
&pci_ss_info_8086_3575_104d_80e7,
@@ -30596,7 +31231,10 @@ static const pciSubsystemInfo *pci_ss_list_8086_5201[] = {
#define pci_ss_list_8086_7112 NULL
#define pci_ss_list_8086_7113 NULL
#define pci_ss_list_8086_7120 NULL
-#define pci_ss_list_8086_7121 NULL
+static const pciSubsystemInfo *pci_ss_list_8086_7121[] = {
+ &pci_ss_info_8086_7121_8086_4341,
+ NULL
+};
#define pci_ss_list_8086_7122 NULL
#define pci_ss_list_8086_7123 NULL
#define pci_ss_list_8086_7124 NULL
@@ -30691,11 +31329,6 @@ static const pciSubsystemInfo *pci_ss_list_9004_5078[] = {
#define pci_ss_list_9004_5478 NULL
#define pci_ss_list_9004_5575 NULL
#define pci_ss_list_9004_5578 NULL
-static const pciSubsystemInfo *pci_ss_list_9004_5647[] = {
- &pci_ss_info_9004_5647_9004_7710,
- &pci_ss_info_9004_5647_9004_7711,
- NULL
-};
#define pci_ss_list_9004_5675 NULL
#define pci_ss_list_9004_5678 NULL
#define pci_ss_list_9004_5775 NULL
@@ -30743,6 +31376,8 @@ static const pciSubsystemInfo *pci_ss_list_9004_6915[] = {
#define pci_ss_list_9004_7478 NULL
#define pci_ss_list_9004_7578 NULL
#define pci_ss_list_9004_7678 NULL
+#define pci_ss_list_9004_7710 NULL
+#define pci_ss_list_9004_7711 NULL
#define pci_ss_list_9004_7778 NULL
#define pci_ss_list_9004_7810 NULL
static const pciSubsystemInfo *pci_ss_list_9004_7815[] = {
@@ -30891,11 +31526,18 @@ static const pciSubsystemInfo *pci_ss_list_9005_8011[] = {
#define pci_ss_list_9005_8014 NULL
#define pci_ss_list_9005_801e NULL
#define pci_ss_list_9005_801f NULL
+#define pci_ss_list_9005_8080 NULL
+#define pci_ss_list_9005_808f NULL
#define pci_ss_list_9005_8090 NULL
#define pci_ss_list_9005_8091 NULL
#define pci_ss_list_9005_8092 NULL
#define pci_ss_list_9005_8093 NULL
#define pci_ss_list_9005_8094 NULL
+#define pci_ss_list_9005_8095 NULL
+#define pci_ss_list_9005_8096 NULL
+#define pci_ss_list_9005_8097 NULL
+#define pci_ss_list_9005_809c NULL
+#define pci_ss_list_9005_809d NULL
#define pci_ss_list_9005_809e NULL
#define pci_ss_list_9005_809f NULL
#endif
@@ -31258,6 +31900,9 @@ static const pciSubsystemInfo *pci_ss_list_1014[] = {
&pci_ss_info_1014_0245,
&pci_ss_info_1014_0258,
&pci_ss_info_1014_0259,
+ &pci_ss_info_1014_0265,
+ &pci_ss_info_1014_0267,
+ &pci_ss_info_1014_026a,
&pci_ss_info_1014_0277,
&pci_ss_info_1014_0279,
&pci_ss_info_1014_028c,
@@ -31298,6 +31943,7 @@ static const pciSubsystemInfo *pci_ss_list_1014[] = {
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo *pci_ss_list_1019[] = {
&pci_ss_info_1019_0970,
+ &pci_ss_info_1019_0985,
&pci_ss_info_1019_7018,
NULL
};
@@ -31635,6 +32281,7 @@ static const pciSubsystemInfo *pci_ss_list_1043[] = {
&pci_ss_info_1043_800b,
&pci_ss_info_1043_801c,
&pci_ss_info_1043_8027,
+ &pci_ss_info_1043_802c,
&pci_ss_info_1043_8033,
&pci_ss_info_1043_803e,
&pci_ss_info_1043_8040,
@@ -31645,6 +32292,10 @@ static const pciSubsystemInfo *pci_ss_list_1043[] = {
&pci_ss_info_1043_8064,
&pci_ss_info_1043_8077,
&pci_ss_info_1043_807f,
+ &pci_ss_info_1043_808c,
+ &pci_ss_info_1043_8095,
+ &pci_ss_info_1043_809e,
+ &pci_ss_info_1043_80a8,
&pci_ss_info_1043_80ad,
&pci_ss_info_1043_80e2,
NULL
@@ -31701,6 +32352,7 @@ static const pciSubsystemInfo *pci_ss_list_1048[] = {
&pci_ss_info_1048_0c10,
&pci_ss_info_1048_0c18,
&pci_ss_info_1048_0c1b,
+ &pci_ss_info_1048_0c21,
&pci_ss_info_1048_0c3a,
&pci_ss_info_1048_0c56,
&pci_ss_info_1048_1500,
@@ -31805,6 +32457,7 @@ static const pciSubsystemInfo *pci_ss_list_105d[] = {
&pci_ss_info_105d_000b,
&pci_ss_info_105d_0018,
&pci_ss_info_105d_002a,
+ &pci_ss_info_105d_0037,
&pci_ss_info_105d_003a,
&pci_ss_info_105d_092f,
NULL
@@ -31855,6 +32508,7 @@ static const pciSubsystemInfo *pci_ss_list_1073[] = {
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo *pci_ss_list_1077[] = {
&pci_ss_info_1077_0001,
+ &pci_ss_info_1077_0002,
NULL
};
#endif
@@ -32042,7 +32696,15 @@ static const pciSubsystemInfo *pci_ss_list_109f[] = {
#define pci_ss_list_10a6 NULL
#define pci_ss_list_10a7 NULL
#define pci_ss_list_10a8 NULL
-#define pci_ss_list_10a9 NULL
+#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciSubsystemInfo *pci_ss_list_10a9[] = {
+ &pci_ss_info_10a9_8002,
+ &pci_ss_info_10a9_8010,
+ &pci_ss_info_10a9_8011,
+ &pci_ss_info_10a9_8012,
+ NULL
+};
+#endif
#define pci_ss_list_10aa NULL
#define pci_ss_list_10ab NULL
#define pci_ss_list_10ac NULL
@@ -32052,6 +32714,7 @@ static const pciSubsystemInfo *pci_ss_list_109f[] = {
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo *pci_ss_list_10b0[] = {
&pci_ss_info_10b0_0001,
+ &pci_ss_info_10b0_0002,
NULL
};
#endif
@@ -32163,6 +32826,7 @@ static const pciSubsystemInfo *pci_ss_list_10b8[] = {
NULL
};
#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo *pci_ss_list_10b9[] = {
&pci_ss_info_10b9_0111,
&pci_ss_info_10b9_1521,
@@ -32172,6 +32836,7 @@ static const pciSubsystemInfo *pci_ss_list_10b9[] = {
&pci_ss_info_10b9_7101,
NULL
};
+#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo *pci_ss_list_10ba[] = {
&pci_ss_info_10ba_0e00,
@@ -32383,6 +33048,8 @@ static const pciSubsystemInfo *pci_ss_list_1102[] = {
&pci_ss_info_1102_8040,
&pci_ss_info_1102_8051,
&pci_ss_info_1102_8061,
+ &pci_ss_info_1102_8064,
+ &pci_ss_info_1102_8065,
NULL
};
#endif
@@ -32395,6 +33062,7 @@ static const pciSubsystemInfo *pci_ss_list_1103[] = {
#endif
#define pci_ss_list_1104 NULL
#define pci_ss_list_1105 NULL
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo *pci_ss_list_1106[] = {
&pci_ss_info_1106_0000,
&pci_ss_info_1106_0100,
@@ -32404,6 +33072,7 @@ static const pciSubsystemInfo *pci_ss_list_1106[] = {
&pci_ss_info_1106_4511,
NULL
};
+#endif
#define pci_ss_list_1107 NULL
#define pci_ss_list_1108 NULL
#ifdef VENDOR_INCLUDE_NONVIDEO
@@ -32673,6 +33342,7 @@ static const pciSubsystemInfo *pci_ss_list_1179[] = {
&pci_ss_info_1179_0203,
&pci_ss_info_1179_0204,
&pci_ss_info_1179_ff00,
+ &pci_ss_info_1179_ff01,
NULL
};
#endif
@@ -33322,6 +33992,7 @@ static const pciSubsystemInfo *pci_ss_list_12be[] = {
#define pci_ss_list_12d8 NULL
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciSubsystemInfo *pci_ss_list_12d9[] = {
+ &pci_ss_info_12d9_0002,
&pci_ss_info_12d9_000a,
NULL
};
@@ -33628,7 +34299,12 @@ static const pciSubsystemInfo *pci_ss_list_13a2[] = {
#define pci_ss_list_13b6 NULL
#define pci_ss_list_13b7 NULL
#define pci_ss_list_13b8 NULL
-#define pci_ss_list_13b9 NULL
+#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciSubsystemInfo *pci_ss_list_13b9[] = {
+ &pci_ss_info_13b9_1421,
+ NULL
+};
+#endif
#define pci_ss_list_13ba NULL
#define pci_ss_list_13bb NULL
#define pci_ss_list_13bc NULL
@@ -34749,6 +35425,7 @@ static const pciSubsystemInfo *pci_ss_list_1668[] = {
static const pciSubsystemInfo *pci_ss_list_1681[] = {
&pci_ss_info_1681_0040,
&pci_ss_info_1681_0050,
+ &pci_ss_info_1681_a000,
&pci_ss_info_1681_a011,
NULL
};
@@ -34762,6 +35439,7 @@ static const pciSubsystemInfo *pci_ss_list_16be[] = {
NULL
};
#endif
+#define pci_ss_list_16ca NULL
#define pci_ss_list_16ec NULL
#define pci_ss_list_16f6 NULL
#ifdef VENDOR_INCLUDE_NONVIDEO
@@ -34856,6 +35534,7 @@ static const pciSubsystemInfo *pci_ss_list_1de1[] = {
NULL
};
#endif
+#define pci_ss_list_1fc0 NULL
#define pci_ss_list_2000 NULL
#define pci_ss_list_2001 NULL
#define pci_ss_list_2003 NULL
@@ -35115,6 +35794,8 @@ static const pciSubsystemInfo *pci_ss_list_8086[] = {
&pci_ss_info_8086_425a,
&pci_ss_info_8086_4341,
&pci_ss_info_8086_4343,
+ &pci_ss_info_8086_4532,
+ &pci_ss_info_8086_4557,
&pci_ss_info_8086_4649,
&pci_ss_info_8086_464a,
&pci_ss_info_8086_4d4f,
@@ -35149,8 +35830,6 @@ static const pciSubsystemInfo *pci_ss_list_9004[] = {
&pci_ss_info_9004_0020,
&pci_ss_info_9004_0028,
&pci_ss_info_9004_7560,
- &pci_ss_info_9004_7710,
- &pci_ss_info_9004_7711,
&pci_ss_info_9004_7815,
&pci_ss_info_9004_7840,
&pci_ss_info_9004_7850,
@@ -36247,6 +36926,15 @@ static const pciDeviceInfo pci_dev_info_1001_9100 = {
0
};
#endif
+static const pciDeviceInfo pci_dev_info_1002_4136 = {
+ 0x4136, pci_device_1002_4136,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1002_4136,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_1002_4144 = {
0x4144, pci_device_1002_4144,
#ifdef INIT_SUBSYS_INFO
@@ -36814,6 +37502,15 @@ static const pciDeviceInfo pci_dev_info_1002_4e47 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_1002_4e48 = {
+ 0x4e48, pci_device_1002_4e48,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1002_4e48,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_1002_4e64 = {
0x4e64, pci_device_1002_4e64,
#ifdef INIT_SUBSYS_INFO
@@ -36850,6 +37547,15 @@ static const pciDeviceInfo pci_dev_info_1002_4e67 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_1002_4e68 = {
+ 0x4e68, pci_device_1002_4e68,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1002_4e68,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_1002_5041 = {
0x5041, pci_device_1002_5041,
#ifdef INIT_SUBSYS_INFO
@@ -37471,6 +38177,24 @@ static const pciDeviceInfo pci_dev_info_1002_700f = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_1002_7010 = {
+ 0x7010, pci_device_1002_7010,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1002_7010,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_1002_cab2 = {
+ 0xcab2, pci_device_1002_cab2,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1002_cab2,
+#else
+ NULL,
+#endif
+ 0
+};
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo pci_dev_info_1003_0201 = {
0x0201, pci_device_1003_0201,
@@ -38060,6 +38784,15 @@ static const pciDeviceInfo pci_dev_info_1011_0016 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_1011_0017 = {
+ 0x0017, pci_device_1011_0017,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1011_0017,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_1011_0019 = {
0x0019, pci_device_1011_0019,
#ifdef INIT_SUBSYS_INFO
@@ -40392,6 +41125,15 @@ static const pciDeviceInfo pci_dev_info_1028_0008 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_1028_0009 = {
+ 0x0009, pci_device_1028_0009,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1028_0009,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_1028_000a = {
0x000a, pci_device_1028_000a,
#ifdef INIT_SUBSYS_INFO
@@ -40410,6 +41152,15 @@ static const pciDeviceInfo pci_dev_info_1028_000c = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_1028_000d = {
+ 0x000d, pci_device_1028_000d,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1028_000d,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_1028_000e = {
0x000e, pci_device_1028_000e,
#ifdef INIT_SUBSYS_INFO
@@ -40457,6 +41208,15 @@ static const pciDeviceInfo pci_dev_info_102b_0010 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_102b_0100 = {
+ 0x0100, pci_device_102b_0100,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_102b_0100,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_102b_0518 = {
0x0518, pci_device_102b_0518,
#ifdef INIT_SUBSYS_INFO
@@ -41282,6 +42042,15 @@ static const pciDeviceInfo pci_dev_info_1039_0646 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_1039_0648 = {
+ 0x0648, pci_device_1039_0648,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1039_0648,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_1039_0650 = {
0x0650, pci_device_1039_0650,
#ifdef INIT_SUBSYS_INFO
@@ -41345,6 +42114,15 @@ static const pciDeviceInfo pci_dev_info_1039_0745 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_1039_0755 = {
+ 0x0755, pci_device_1039_0755,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1039_0755,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_1039_0900 = {
0x0900, pci_device_1039_0900,
#ifdef INIT_SUBSYS_INFO
@@ -41867,6 +42645,15 @@ static const pciDeviceInfo pci_dev_info_103c_1290 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_103c_12b4 = {
+ 0x12b4, pci_device_103c_12b4,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_103c_12b4,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_103c_2910 = {
0x2910, pci_device_103c_2910,
#ifdef INIT_SUBSYS_INFO
@@ -45310,6 +46097,15 @@ static const pciDeviceInfo pci_dev_info_1093_c831 = {
};
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo pci_dev_info_1095_0240 = {
+ 0x0240, pci_device_1095_0240,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1095_0240,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_1095_0640 = {
0x0640, pci_device_1095_0640,
#ifdef INIT_SUBSYS_INFO
@@ -45584,6 +46380,15 @@ static const pciDeviceInfo pci_dev_info_109e_8474 = {
0
};
#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo pci_dev_info_10a5_3052 = {
+ 0x3052, pci_device_10a5_3052,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_10a5_3052,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_10a5_5449 = {
0x5449, pci_device_10a5_5449,
#ifdef INIT_SUBSYS_INFO
@@ -45786,6 +46591,15 @@ static const pciDeviceInfo pci_dev_info_10a9_1008 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_10a9_100a = {
+ 0x100a, pci_device_10a9_100a,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_10a9_100a,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_10a9_2001 = {
0x2001, pci_device_10a9_2001,
#ifdef INIT_SUBSYS_INFO
@@ -46187,6 +47001,15 @@ static const pciDeviceInfo pci_dev_info_10b7_0001 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_10b7_0910 = {
+ 0x0910, pci_device_10b7_0910,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_10b7_0910,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_10b7_1006 = {
0x1006, pci_device_10b7_1006,
#ifdef INIT_SUBSYS_INFO
@@ -46721,6 +47544,7 @@ static const pciDeviceInfo pci_dev_info_10b8_b106 = {
0
};
#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo pci_dev_info_10b9_0111 = {
0x0111, pci_device_10b9_0111,
#ifdef INIT_SUBSYS_INFO
@@ -47180,6 +48004,15 @@ static const pciDeviceInfo pci_dev_info_10b9_5261 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_10b9_5450 = {
+ 0x5450, pci_device_10b9_5450,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_10b9_5450,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_10b9_5451 = {
0x5451, pci_device_10b9_5451,
#ifdef INIT_SUBSYS_INFO
@@ -47261,6 +48094,7 @@ static const pciDeviceInfo pci_dev_info_10b9_7101 = {
#endif
0
};
+#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo pci_dev_info_10ba_0301 = {
0x0301, pci_device_10ba_0301,
@@ -49144,6 +49978,15 @@ static const pciDeviceInfo pci_dev_info_1103_0008 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_1103_0009 = {
+ 0x0009, pci_device_1103_0009,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1103_0009,
+#else
+ NULL,
+#endif
+ 0
+};
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo pci_dev_info_1105_1105 = {
@@ -49174,6 +50017,7 @@ static const pciDeviceInfo pci_dev_info_1105_8400 = {
0
};
#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo pci_dev_info_1106_0102 = {
0x0102, pci_device_1106_0102,
#ifdef INIT_SUBSYS_INFO
@@ -49894,6 +50738,7 @@ static const pciDeviceInfo pci_dev_info_1106_b168 = {
#endif
0
};
+#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo pci_dev_info_1107_0576 = {
0x0576, pci_device_1107_0576,
@@ -50009,6 +50854,60 @@ static const pciDeviceInfo pci_dev_info_110a_0005 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_110a_0006 = {
+ 0x0006, pci_device_110a_0006,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_110a_0006,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_110a_0015 = {
+ 0x0015, pci_device_110a_0015,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_110a_0015,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_110a_001d = {
+ 0x001d, pci_device_110a_001d,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_110a_001d,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_110a_007b = {
+ 0x007b, pci_device_110a_007b,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_110a_007b,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_110a_007c = {
+ 0x007c, pci_device_110a_007c,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_110a_007c,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_110a_007d = {
+ 0x007d, pci_device_110a_007d,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_110a_007d,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_110a_2102 = {
0x2102, pci_device_110a_2102,
#ifdef INIT_SUBSYS_INFO
@@ -52132,6 +53031,15 @@ static const pciDeviceInfo pci_dev_info_1166_0005 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_1166_0006 = {
+ 0x0006, pci_device_1166_0006,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1166_0006,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_1166_0007 = {
0x0007, pci_device_1166_0007,
#ifdef INIT_SUBSYS_INFO
@@ -54782,6 +55690,15 @@ static const pciDeviceInfo pci_dev_info_1260_3873 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_1260_3890 = {
+ 0x3890, pci_device_1260_3890,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1260_3890,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_1260_8130 = {
0x8130, pci_device_1260_8130,
#ifdef INIT_SUBSYS_INFO
@@ -54868,6 +55785,15 @@ static const pciDeviceInfo pci_dev_info_126f_0720 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_126f_0730 = {
+ 0x0730, pci_device_126f_0730,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_126f_0730,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_126f_0810 = {
0x0810, pci_device_126f_0810,
#ifdef INIT_SUBSYS_INFO
@@ -54916,6 +55842,15 @@ static const pciDeviceInfo pci_dev_info_1273_0002 = {
};
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo pci_dev_info_1274_1171 = {
+ 0x1171, pci_device_1274_1171,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1274_1171,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_1274_1371 = {
0x1371, pci_device_1274_1371,
#ifdef INIT_SUBSYS_INFO
@@ -54954,6 +55889,15 @@ static const pciDeviceInfo pci_dev_info_1278_0701 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_1278_0710 = {
+ 0x0710, pci_device_1278_0710,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1278_0710,
+#else
+ NULL,
+#endif
+ 0
+};
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo pci_dev_info_1279_0295 = {
@@ -55634,6 +56578,37 @@ static const pciDeviceInfo pci_dev_info_12d2_00a0 = {
0
};
#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo pci_dev_info_12d4_0200 = {
+ 0x0200, pci_device_12d4_0200,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_12d4_0200,
+#else
+ NULL,
+#endif
+ 0
+};
+#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo pci_dev_info_12d9_0002 = {
+ 0x0002, pci_device_12d9_0002,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_12d9_0002,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_12d9_0004 = {
+ 0x0004, pci_device_12d9_0004,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_12d9_0004,
+#else
+ NULL,
+#endif
+ 0
+};
+#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo pci_dev_info_12e0_0010 = {
0x0010, pci_device_12e0_0010,
#ifdef INIT_SUBSYS_INFO
@@ -56027,6 +57002,15 @@ static const pciDeviceInfo pci_dev_info_1307_004c = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_1307_004d = {
+ 0x004d, pci_device_1307_004d,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1307_004d,
+#else
+ NULL,
+#endif
+ 0
+};
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo pci_dev_info_1308_0001 = {
@@ -56462,6 +57446,15 @@ static const pciDeviceInfo pci_dev_info_1332_5415 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_1332_5425 = {
+ 0x5425, pci_device_1332_5425,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1332_5425,
+#else
+ NULL,
+#endif
+ 0
+};
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo pci_dev_info_134a_0001 = {
@@ -56789,6 +57782,15 @@ static const pciDeviceInfo pci_dev_info_1385_4100 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_1385_4105 = {
+ 0x4105, pci_device_1385_4105,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1385_4105,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_1385_620a = {
0x620a, pci_device_1385_620a,
#ifdef INIT_SUBSYS_INFO
@@ -57494,6 +58496,17 @@ static const pciDeviceInfo pci_dev_info_145f_0001 = {
};
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo pci_dev_info_146c_1430 = {
+ 0x1430, pci_device_146c_1430,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_146c_1430,
+#else
+ NULL,
+#endif
+ 0
+};
+#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo pci_dev_info_148d_1003 = {
0x1003, pci_device_148d_1003,
#ifdef INIT_SUBSYS_INFO
@@ -57505,6 +58518,17 @@ static const pciDeviceInfo pci_dev_info_148d_1003 = {
};
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo pci_dev_info_149d_0001 = {
+ 0x0001, pci_device_149d_0001,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_149d_0001,
+#else
+ NULL,
+#endif
+ 0
+};
+#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo pci_dev_info_14af_7102 = {
0x7102, pci_device_14af_7102,
#ifdef INIT_SUBSYS_INFO
@@ -58016,6 +59040,15 @@ static const pciDeviceInfo pci_dev_info_14e4_1696 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_14e4_169c = {
+ 0x169c, pci_device_14e4_169c,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_14e4_169c,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_14e4_16a6 = {
0x16a6, pci_device_14e4_16a6,
#ifdef INIT_SUBSYS_INFO
@@ -58097,6 +59130,15 @@ static const pciDeviceInfo pci_dev_info_14e4_4301 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_14e4_4320 = {
+ 0x4320, pci_device_14e4_4320,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_14e4_4320,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_14e4_4401 = {
0x4401, pci_device_14e4_4401,
#ifdef INIT_SUBSYS_INFO
@@ -58497,6 +59539,33 @@ static const pciDeviceInfo pci_dev_info_14f1_1611 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_14f1_1620 = {
+ 0x1620, pci_device_14f1_1620,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_14f1_1620,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_14f1_1621 = {
+ 0x1621, pci_device_14f1_1621,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_14f1_1621,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_14f1_1622 = {
+ 0x1622, pci_device_14f1_1622,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_14f1_1622,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_14f1_1803 = {
0x1803, pci_device_14f1_1803,
#ifdef INIT_SUBSYS_INFO
@@ -59491,6 +60560,15 @@ static const pciDeviceInfo pci_dev_info_1638_1100 = {
};
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo pci_dev_info_163c_3052 = {
+ 0x3052, pci_device_163c_3052,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_163c_3052,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_163c_5449 = {
0x5449, pci_device_163c_5449,
#ifdef INIT_SUBSYS_INFO
@@ -59542,6 +60620,17 @@ static const pciDeviceInfo pci_dev_info_16ab_1102 = {
};
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo pci_dev_info_16ca_0001 = {
+ 0x0001, pci_device_16ca_0001,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_16ca_0001,
+#else
+ NULL,
+#endif
+ 0
+};
+#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo pci_dev_info_16ec_3685 = {
0x3685, pci_device_16ec_3685,
#ifdef INIT_SUBSYS_INFO
@@ -59780,6 +60869,17 @@ static const pciDeviceInfo pci_dev_info_1de1_dc29 = {
};
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo pci_dev_info_1fc0_0300 = {
+ 0x0300, pci_device_1fc0_0300,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_1fc0_0300,
+#else
+ NULL,
+#endif
+ 0
+};
+#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo pci_dev_info_2348_2010 = {
0x2010, pci_device_2348_2010,
#ifdef INIT_SUBSYS_INFO
@@ -59818,6 +60918,24 @@ static const pciDeviceInfo pci_dev_info_3388_0021 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_3388_101a = {
+ 0x101a, pci_device_3388_101a,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_3388_101a,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_3388_101b = {
+ 0x101b, pci_device_3388_101b,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_3388_101b,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_3388_8011 = {
0x8011, pci_device_3388_8011,
#ifdef INIT_SUBSYS_INFO
@@ -61102,6 +62220,17 @@ static const pciDeviceInfo pci_dev_info_5333_ca00 = {
0
};
#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo pci_dev_info_544c_0350 = {
+ 0x0350, pci_device_544c_0350,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_544c_0350,
+#else
+ NULL,
+#endif
+ 0
+};
+#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo pci_dev_info_5455_4458 = {
0x4458, pci_device_5455_4458,
#ifdef INIT_SUBSYS_INFO
@@ -61590,6 +62719,15 @@ static const pciDeviceInfo pci_dev_info_8086_1040 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_8086_1043 = {
+ 0x1043, pci_device_8086_1043,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_1043,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_8086_1059 = {
0x1059, pci_device_8086_1059,
#ifdef INIT_SUBSYS_INFO
@@ -62427,6 +63565,15 @@ static const pciDeviceInfo pci_dev_info_8086_24c7 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_8086_24ca = {
+ 0x24ca, pci_device_8086_24ca,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_24ca,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_8086_24cb = {
0x24cb, pci_device_8086_24cb,
#ifdef INIT_SUBSYS_INFO
@@ -62436,6 +63583,15 @@ static const pciDeviceInfo pci_dev_info_8086_24cb = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_8086_24cc = {
+ 0x24cc, pci_device_8086_24cc,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_24cc,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_8086_24cd = {
0x24cd, pci_device_8086_24cd,
#ifdef INIT_SUBSYS_INFO
@@ -62445,6 +63601,114 @@ static const pciDeviceInfo pci_dev_info_8086_24cd = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_8086_24d0 = {
+ 0x24d0, pci_device_8086_24d0,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_24d0,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_24d1 = {
+ 0x24d1, pci_device_8086_24d1,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_24d1,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_24d2 = {
+ 0x24d2, pci_device_8086_24d2,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_24d2,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_24d3 = {
+ 0x24d3, pci_device_8086_24d3,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_24d3,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_24d4 = {
+ 0x24d4, pci_device_8086_24d4,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_24d4,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_24d5 = {
+ 0x24d5, pci_device_8086_24d5,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_24d5,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_24d6 = {
+ 0x24d6, pci_device_8086_24d6,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_24d6,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_24d7 = {
+ 0x24d7, pci_device_8086_24d7,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_24d7,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_24db = {
+ 0x24db, pci_device_8086_24db,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_24db,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_24dc = {
+ 0x24dc, pci_device_8086_24dc,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_24dc,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_24dd = {
+ 0x24dd, pci_device_8086_24dd,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_24dd,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_24de = {
+ 0x24de, pci_device_8086_24de,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_24de,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_8086_2500 = {
0x2500, pci_device_8086_2500,
#ifdef INIT_SUBSYS_INFO
@@ -62616,6 +63880,69 @@ static const pciDeviceInfo pci_dev_info_8086_2548 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_8086_254c = {
+ 0x254c, pci_device_8086_254c,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_254c,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_2550 = {
+ 0x2550, pci_device_8086_2550,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_2550,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_2551 = {
+ 0x2551, pci_device_8086_2551,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_2551,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_2552 = {
+ 0x2552, pci_device_8086_2552,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_2552,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_2553 = {
+ 0x2553, pci_device_8086_2553,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_2553,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_2554 = {
+ 0x2554, pci_device_8086_2554,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_2554,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_255d = {
+ 0x255d, pci_device_8086_255d,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_255d,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_8086_2560 = {
0x2560, pci_device_8086_2560,
#ifdef INIT_SUBSYS_INFO
@@ -62652,6 +63979,15 @@ static const pciDeviceInfo pci_dev_info_8086_2570 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_8086_2571 = {
+ 0x2571, pci_device_8086_2571,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_2571,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_8086_2572 = {
0x2572, pci_device_8086_2572,
#ifdef INIT_SUBSYS_INFO
@@ -62661,6 +63997,60 @@ static const pciDeviceInfo pci_dev_info_8086_2572 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_8086_2573 = {
+ 0x2573, pci_device_8086_2573,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_2573,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_2576 = {
+ 0x2576, pci_device_8086_2576,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_2576,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_2578 = {
+ 0x2578, pci_device_8086_2578,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_2578,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_2579 = {
+ 0x2579, pci_device_8086_2579,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_2579,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_257b = {
+ 0x257b, pci_device_8086_257b,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_257b,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_257e = {
+ 0x257e, pci_device_8086_257e,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_257e,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_8086_3092 = {
0x3092, pci_device_8086_3092,
#ifdef INIT_SUBSYS_INFO
@@ -62670,6 +64060,24 @@ static const pciDeviceInfo pci_dev_info_8086_3092 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_8086_3340 = {
+ 0x3340, pci_device_8086_3340,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_3340,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_8086_3341 = {
+ 0x3341, pci_device_8086_3341,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_8086_3341,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_8086_3575 = {
0x3575, pci_device_8086_3575,
#ifdef INIT_SUBSYS_INFO
@@ -63440,15 +64848,6 @@ static const pciDeviceInfo pci_dev_info_9004_5578 = {
#endif
0
};
-static const pciDeviceInfo pci_dev_info_9004_5647 = {
- 0x5647, pci_device_9004_5647,
-#ifdef INIT_SUBSYS_INFO
- pci_ss_list_9004_5647,
-#else
- NULL,
-#endif
- 0
-};
static const pciDeviceInfo pci_dev_info_9004_5675 = {
0x5675, pci_device_9004_5675,
#ifdef INIT_SUBSYS_INFO
@@ -63674,6 +65073,24 @@ static const pciDeviceInfo pci_dev_info_9004_7678 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_9004_7710 = {
+ 0x7710, pci_device_9004_7710,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_9004_7710,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_9004_7711 = {
+ 0x7711, pci_device_9004_7711,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_9004_7711,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_9004_7778 = {
0x7778, pci_device_9004_7778,
#ifdef INIT_SUBSYS_INFO
@@ -64243,6 +65660,24 @@ static const pciDeviceInfo pci_dev_info_9005_801f = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_9005_8080 = {
+ 0x8080, pci_device_9005_8080,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_9005_8080,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_9005_808f = {
+ 0x808f, pci_device_9005_808f,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_9005_808f,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_9005_8090 = {
0x8090, pci_device_9005_8090,
#ifdef INIT_SUBSYS_INFO
@@ -64288,6 +65723,51 @@ static const pciDeviceInfo pci_dev_info_9005_8094 = {
#endif
0
};
+static const pciDeviceInfo pci_dev_info_9005_8095 = {
+ 0x8095, pci_device_9005_8095,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_9005_8095,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_9005_8096 = {
+ 0x8096, pci_device_9005_8096,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_9005_8096,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_9005_8097 = {
+ 0x8097, pci_device_9005_8097,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_9005_8097,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_9005_809c = {
+ 0x809c, pci_device_9005_809c,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_9005_809c,
+#else
+ NULL,
+#endif
+ 0
+};
+static const pciDeviceInfo pci_dev_info_9005_809d = {
+ 0x809d, pci_device_9005_809d,
+#ifdef INIT_SUBSYS_INFO
+ pci_ss_list_9005_809d,
+#else
+ NULL,
+#endif
+ 0
+};
static const pciDeviceInfo pci_dev_info_9005_809e = {
0x809e, pci_device_9005_809e,
#ifdef INIT_SUBSYS_INFO
@@ -64862,6 +66342,7 @@ static const pciDeviceInfo *pci_dev_list_1001[] = {
};
#endif
static const pciDeviceInfo *pci_dev_list_1002[] = {
+ &pci_dev_info_1002_4136,
&pci_dev_info_1002_4144,
&pci_dev_info_1002_4145,
&pci_dev_info_1002_4146,
@@ -64925,10 +66406,12 @@ static const pciDeviceInfo *pci_dev_list_1002[] = {
&pci_dev_info_1002_4e45,
&pci_dev_info_1002_4e46,
&pci_dev_info_1002_4e47,
+ &pci_dev_info_1002_4e48,
&pci_dev_info_1002_4e64,
&pci_dev_info_1002_4e65,
&pci_dev_info_1002_4e66,
&pci_dev_info_1002_4e67,
+ &pci_dev_info_1002_4e68,
&pci_dev_info_1002_5041,
&pci_dev_info_1002_5042,
&pci_dev_info_1002_5043,
@@ -64998,6 +66481,8 @@ static const pciDeviceInfo *pci_dev_list_1002[] = {
&pci_dev_info_1002_5655,
&pci_dev_info_1002_5656,
&pci_dev_info_1002_700f,
+ &pci_dev_info_1002_7010,
+ &pci_dev_info_1002_cab2,
NULL
};
#ifdef VENDOR_INCLUDE_NONVIDEO
@@ -65094,6 +66579,7 @@ static const pciDeviceInfo *pci_dev_list_1011[] = {
&pci_dev_info_1011_000f,
&pci_dev_info_1011_0014,
&pci_dev_info_1011_0016,
+ &pci_dev_info_1011_0017,
&pci_dev_info_1011_0019,
&pci_dev_info_1011_001a,
&pci_dev_info_1011_0021,
@@ -65402,8 +66888,10 @@ static const pciDeviceInfo *pci_dev_list_1028[] = {
&pci_dev_info_1028_0006,
&pci_dev_info_1028_0007,
&pci_dev_info_1028_0008,
+ &pci_dev_info_1028_0009,
&pci_dev_info_1028_000a,
&pci_dev_info_1028_000c,
+ &pci_dev_info_1028_000d,
&pci_dev_info_1028_000e,
&pci_dev_info_1028_000f,
NULL
@@ -65418,6 +66906,7 @@ static const pciDeviceInfo *pci_dev_list_102a[] = {
#endif
static const pciDeviceInfo *pci_dev_list_102b[] = {
&pci_dev_info_102b_0010,
+ &pci_dev_info_102b_0100,
&pci_dev_info_102b_0518,
&pci_dev_info_102b_0519,
&pci_dev_info_102b_051a,
@@ -65543,6 +67032,7 @@ static const pciDeviceInfo *pci_dev_list_1039[] = {
&pci_dev_info_1039_0635,
&pci_dev_info_1039_0645,
&pci_dev_info_1039_0646,
+ &pci_dev_info_1039_0648,
&pci_dev_info_1039_0650,
&pci_dev_info_1039_0651,
&pci_dev_info_1039_0730,
@@ -65550,6 +67040,7 @@ static const pciDeviceInfo *pci_dev_list_1039[] = {
&pci_dev_info_1039_0735,
&pci_dev_info_1039_0740,
&pci_dev_info_1039_0745,
+ &pci_dev_info_1039_0755,
&pci_dev_info_1039_0900,
&pci_dev_info_1039_0961,
&pci_dev_info_1039_0962,
@@ -65613,6 +67104,7 @@ static const pciDeviceInfo *pci_dev_list_103c[] = {
&pci_dev_info_103c_122a,
&pci_dev_info_103c_122e,
&pci_dev_info_103c_1290,
+ &pci_dev_info_103c_12b4,
&pci_dev_info_103c_2910,
&pci_dev_info_103c_2925,
NULL
@@ -66213,6 +67705,7 @@ static const pciDeviceInfo *pci_dev_list_1093[] = {
#define pci_dev_list_1094 NULL
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo *pci_dev_list_1095[] = {
+ &pci_dev_info_1095_0240,
&pci_dev_info_1095_0640,
&pci_dev_info_1095_0643,
&pci_dev_info_1095_0646,
@@ -66269,6 +67762,7 @@ static const pciDeviceInfo *pci_dev_list_109e[] = {
#define pci_dev_list_10a4 NULL
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo *pci_dev_list_10a5[] = {
+ &pci_dev_info_10a5_3052,
&pci_dev_info_10a5_5449,
NULL
};
@@ -66303,6 +67797,7 @@ static const pciDeviceInfo *pci_dev_list_10a9[] = {
&pci_dev_info_10a9_1006,
&pci_dev_info_10a9_1007,
&pci_dev_info_10a9_1008,
+ &pci_dev_info_10a9_100a,
&pci_dev_info_10a9_2001,
&pci_dev_info_10a9_2002,
&pci_dev_info_10a9_8001,
@@ -66388,6 +67883,7 @@ static const pciDeviceInfo *pci_dev_list_10b6[] = {
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo *pci_dev_list_10b7[] = {
&pci_dev_info_10b7_0001,
+ &pci_dev_info_10b7_0910,
&pci_dev_info_10b7_1006,
&pci_dev_info_10b7_1007,
&pci_dev_info_10b7_3390,
@@ -66455,6 +67951,7 @@ static const pciDeviceInfo *pci_dev_list_10b8[] = {
NULL
};
#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo *pci_dev_list_10b9[] = {
&pci_dev_info_10b9_0111,
&pci_dev_info_10b9_1435,
@@ -66507,6 +68004,7 @@ static const pciDeviceInfo *pci_dev_list_10b9[] = {
&pci_dev_info_10b9_5251,
&pci_dev_info_10b9_5253,
&pci_dev_info_10b9_5261,
+ &pci_dev_info_10b9_5450,
&pci_dev_info_10b9_5451,
&pci_dev_info_10b9_5453,
&pci_dev_info_10b9_5455,
@@ -66518,6 +68016,7 @@ static const pciDeviceInfo *pci_dev_list_10b9[] = {
&pci_dev_info_10b9_7101,
NULL
};
+#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo *pci_dev_list_10ba[] = {
&pci_dev_info_10ba_0301,
@@ -66897,6 +68396,7 @@ static const pciDeviceInfo *pci_dev_list_1103[] = {
&pci_dev_info_1103_0006,
&pci_dev_info_1103_0007,
&pci_dev_info_1103_0008,
+ &pci_dev_info_1103_0009,
NULL
};
#endif
@@ -66909,6 +68409,7 @@ static const pciDeviceInfo *pci_dev_list_1105[] = {
NULL
};
#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo *pci_dev_list_1106[] = {
&pci_dev_info_1106_0102,
&pci_dev_info_1106_0130,
@@ -66992,6 +68493,7 @@ static const pciDeviceInfo *pci_dev_list_1106[] = {
&pci_dev_info_1106_b168,
NULL
};
+#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo *pci_dev_list_1107[] = {
&pci_dev_info_1107_0576,
@@ -67021,6 +68523,12 @@ static const pciDeviceInfo *pci_dev_list_1109[] = {
static const pciDeviceInfo *pci_dev_list_110a[] = {
&pci_dev_info_110a_0002,
&pci_dev_info_110a_0005,
+ &pci_dev_info_110a_0006,
+ &pci_dev_info_110a_0015,
+ &pci_dev_info_110a_001d,
+ &pci_dev_info_110a_007b,
+ &pci_dev_info_110a_007c,
+ &pci_dev_info_110a_007d,
&pci_dev_info_110a_2102,
&pci_dev_info_110a_4942,
&pci_dev_info_110a_6120,
@@ -67469,6 +68977,7 @@ static const pciDeviceInfo *pci_dev_list_1165[] = {
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo *pci_dev_list_1166[] = {
&pci_dev_info_1166_0005,
+ &pci_dev_info_1166_0006,
&pci_dev_info_1166_0007,
&pci_dev_info_1166_0008,
&pci_dev_info_1166_0009,
@@ -68223,6 +69732,7 @@ static const pciDeviceInfo *pci_dev_list_125d[] = {
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo *pci_dev_list_1260[] = {
&pci_dev_info_1260_3873,
+ &pci_dev_info_1260_3890,
&pci_dev_info_1260_8130,
&pci_dev_info_1260_8131,
NULL
@@ -68258,6 +69768,7 @@ static const pciDeviceInfo *pci_dev_list_126f[] = {
&pci_dev_info_126f_0710,
&pci_dev_info_126f_0712,
&pci_dev_info_126f_0720,
+ &pci_dev_info_126f_0730,
&pci_dev_info_126f_0810,
&pci_dev_info_126f_0811,
&pci_dev_info_126f_0820,
@@ -68275,6 +69786,7 @@ static const pciDeviceInfo *pci_dev_list_1273[] = {
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo *pci_dev_list_1274[] = {
+ &pci_dev_info_1274_1171,
&pci_dev_info_1274_1371,
&pci_dev_info_1274_5000,
&pci_dev_info_1274_5880,
@@ -68287,6 +69799,7 @@ static const pciDeviceInfo *pci_dev_list_1274[] = {
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo *pci_dev_list_1278[] = {
&pci_dev_info_1278_0701,
+ &pci_dev_info_1278_0710,
NULL
};
#endif
@@ -68515,12 +70028,23 @@ static const pciDeviceInfo *pci_dev_list_12d2[] = {
NULL
};
#define pci_dev_list_12d3 NULL
-#define pci_dev_list_12d4 NULL
+#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo *pci_dev_list_12d4[] = {
+ &pci_dev_info_12d4_0200,
+ NULL
+};
+#endif
#define pci_dev_list_12d5 NULL
#define pci_dev_list_12d6 NULL
#define pci_dev_list_12d7 NULL
#define pci_dev_list_12d8 NULL
-#define pci_dev_list_12d9 NULL
+#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo *pci_dev_list_12d9[] = {
+ &pci_dev_info_12d9_0002,
+ &pci_dev_info_12d9_0004,
+ NULL
+};
+#endif
#define pci_dev_list_12da NULL
#define pci_dev_list_12db NULL
#define pci_dev_list_12dc NULL
@@ -68621,6 +70145,7 @@ static const pciDeviceInfo *pci_dev_list_1307[] = {
&pci_dev_info_1307_0036,
&pci_dev_info_1307_0037,
&pci_dev_info_1307_004c,
+ &pci_dev_info_1307_004d,
NULL
};
#endif
@@ -68730,6 +70255,7 @@ static const pciDeviceInfo *pci_dev_list_131f[] = {
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo *pci_dev_list_1332[] = {
&pci_dev_info_1332_5415,
+ &pci_dev_info_1332_5425,
NULL
};
#endif
@@ -68862,6 +70388,7 @@ static const pciDeviceInfo *pci_dev_list_135e[] = {
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo *pci_dev_list_1385[] = {
&pci_dev_info_1385_4100,
+ &pci_dev_info_1385_4105,
&pci_dev_info_1385_620a,
&pci_dev_info_1385_622a,
&pci_dev_info_1385_630a,
@@ -69257,7 +70784,12 @@ static const pciDeviceInfo *pci_dev_list_145f[] = {
#define pci_dev_list_1469 NULL
#define pci_dev_list_146a NULL
#define pci_dev_list_146b NULL
-#define pci_dev_list_146c NULL
+#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo *pci_dev_list_146c[] = {
+ &pci_dev_info_146c_1430,
+ NULL
+};
+#endif
#define pci_dev_list_146d NULL
#define pci_dev_list_146e NULL
#define pci_dev_list_146f NULL
@@ -69311,7 +70843,12 @@ static const pciDeviceInfo *pci_dev_list_148d[] = {
#define pci_dev_list_149a NULL
#define pci_dev_list_149b NULL
#define pci_dev_list_149c NULL
-#define pci_dev_list_149d NULL
+#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo *pci_dev_list_149d[] = {
+ &pci_dev_info_149d_0001,
+ NULL
+};
+#endif
#define pci_dev_list_149e NULL
#define pci_dev_list_149f NULL
#define pci_dev_list_14a0 NULL
@@ -69470,6 +71007,7 @@ static const pciDeviceInfo *pci_dev_list_14e4[] = {
&pci_dev_info_14e4_1653,
&pci_dev_info_14e4_165d,
&pci_dev_info_14e4_1696,
+ &pci_dev_info_14e4_169c,
&pci_dev_info_14e4_16a6,
&pci_dev_info_14e4_16a7,
&pci_dev_info_14e4_16a8,
@@ -69479,6 +71017,7 @@ static const pciDeviceInfo *pci_dev_list_14e4[] = {
&pci_dev_info_14e4_4211,
&pci_dev_info_14e4_4212,
&pci_dev_info_14e4_4301,
+ &pci_dev_info_14e4_4320,
&pci_dev_info_14e4_4401,
&pci_dev_info_14e4_4402,
&pci_dev_info_14e4_4410,
@@ -69544,6 +71083,9 @@ static const pciDeviceInfo *pci_dev_list_14f1[] = {
&pci_dev_info_14f1_1456,
&pci_dev_info_14f1_1610,
&pci_dev_info_14f1_1611,
+ &pci_dev_info_14f1_1620,
+ &pci_dev_info_14f1_1621,
+ &pci_dev_info_14f1_1622,
&pci_dev_info_14f1_1803,
&pci_dev_info_14f1_1815,
&pci_dev_info_14f1_2003,
@@ -70012,6 +71554,7 @@ static const pciDeviceInfo *pci_dev_list_1638[] = {
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo *pci_dev_list_163c[] = {
+ &pci_dev_info_163c_3052,
&pci_dev_info_163c_5449,
NULL
};
@@ -70037,6 +71580,12 @@ static const pciDeviceInfo *pci_dev_list_16ab[] = {
#endif
#define pci_dev_list_16be NULL
#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo *pci_dev_list_16ca[] = {
+ &pci_dev_info_16ca_0001,
+ NULL
+};
+#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo *pci_dev_list_16ec[] = {
&pci_dev_info_16ec_3685,
NULL
@@ -70129,6 +71678,12 @@ static const pciDeviceInfo *pci_dev_list_1de1[] = {
NULL
};
#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo *pci_dev_list_1fc0[] = {
+ &pci_dev_info_1fc0_0300,
+ NULL
+};
+#endif
#define pci_dev_list_2000 NULL
#define pci_dev_list_2001 NULL
#define pci_dev_list_2003 NULL
@@ -70152,6 +71707,8 @@ static const pciDeviceInfo *pci_dev_list_3388[] = {
&pci_dev_info_3388_0013,
&pci_dev_info_3388_0014,
&pci_dev_info_3388_0021,
+ &pci_dev_info_3388_101a,
+ &pci_dev_info_3388_101b,
&pci_dev_info_3388_8011,
&pci_dev_info_3388_8012,
&pci_dev_info_3388_8013,
@@ -70378,7 +71935,12 @@ static const pciDeviceInfo *pci_dev_list_5333[] = {
&pci_dev_info_5333_ca00,
NULL
};
-#define pci_dev_list_544c NULL
+#ifdef VENDOR_INCLUDE_NONVIDEO
+static const pciDeviceInfo *pci_dev_list_544c[] = {
+ &pci_dev_info_544c_0350,
+ NULL
+};
+#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
static const pciDeviceInfo *pci_dev_list_5455[] = {
&pci_dev_info_5455_4458,
@@ -70471,6 +72033,7 @@ static const pciDeviceInfo *pci_dev_list_8086[] = {
&pci_dev_info_8086_103d,
&pci_dev_info_8086_103e,
&pci_dev_info_8086_1040,
+ &pci_dev_info_8086_1043,
&pci_dev_info_8086_1059,
&pci_dev_info_8086_1130,
&pci_dev_info_8086_1131,
@@ -70564,8 +72127,22 @@ static const pciDeviceInfo *pci_dev_list_8086[] = {
&pci_dev_info_8086_24c5,
&pci_dev_info_8086_24c6,
&pci_dev_info_8086_24c7,
+ &pci_dev_info_8086_24ca,
&pci_dev_info_8086_24cb,
+ &pci_dev_info_8086_24cc,
&pci_dev_info_8086_24cd,
+ &pci_dev_info_8086_24d0,
+ &pci_dev_info_8086_24d1,
+ &pci_dev_info_8086_24d2,
+ &pci_dev_info_8086_24d3,
+ &pci_dev_info_8086_24d4,
+ &pci_dev_info_8086_24d5,
+ &pci_dev_info_8086_24d6,
+ &pci_dev_info_8086_24d7,
+ &pci_dev_info_8086_24db,
+ &pci_dev_info_8086_24dc,
+ &pci_dev_info_8086_24dd,
+ &pci_dev_info_8086_24de,
&pci_dev_info_8086_2500,
&pci_dev_info_8086_2501,
&pci_dev_info_8086_250b,
@@ -70585,12 +72162,28 @@ static const pciDeviceInfo *pci_dev_list_8086[] = {
&pci_dev_info_8086_2546,
&pci_dev_info_8086_2547,
&pci_dev_info_8086_2548,
+ &pci_dev_info_8086_254c,
+ &pci_dev_info_8086_2550,
+ &pci_dev_info_8086_2551,
+ &pci_dev_info_8086_2552,
+ &pci_dev_info_8086_2553,
+ &pci_dev_info_8086_2554,
+ &pci_dev_info_8086_255d,
&pci_dev_info_8086_2560,
&pci_dev_info_8086_2561,
&pci_dev_info_8086_2562,
&pci_dev_info_8086_2570,
+ &pci_dev_info_8086_2571,
&pci_dev_info_8086_2572,
+ &pci_dev_info_8086_2573,
+ &pci_dev_info_8086_2576,
+ &pci_dev_info_8086_2578,
+ &pci_dev_info_8086_2579,
+ &pci_dev_info_8086_257b,
+ &pci_dev_info_8086_257e,
&pci_dev_info_8086_3092,
+ &pci_dev_info_8086_3340,
+ &pci_dev_info_8086_3341,
&pci_dev_info_8086_3575,
&pci_dev_info_8086_3576,
&pci_dev_info_8086_3577,
@@ -70693,7 +72286,6 @@ static const pciDeviceInfo *pci_dev_list_9004[] = {
&pci_dev_info_9004_5478,
&pci_dev_info_9004_5575,
&pci_dev_info_9004_5578,
- &pci_dev_info_9004_5647,
&pci_dev_info_9004_5675,
&pci_dev_info_9004_5678,
&pci_dev_info_9004_5775,
@@ -70719,6 +72311,8 @@ static const pciDeviceInfo *pci_dev_list_9004[] = {
&pci_dev_info_9004_7478,
&pci_dev_info_9004_7578,
&pci_dev_info_9004_7678,
+ &pci_dev_info_9004_7710,
+ &pci_dev_info_9004_7711,
&pci_dev_info_9004_7778,
&pci_dev_info_9004_7810,
&pci_dev_info_9004_7815,
@@ -70787,11 +72381,18 @@ static const pciDeviceInfo *pci_dev_list_9005[] = {
&pci_dev_info_9005_8014,
&pci_dev_info_9005_801e,
&pci_dev_info_9005_801f,
+ &pci_dev_info_9005_8080,
+ &pci_dev_info_9005_808f,
&pci_dev_info_9005_8090,
&pci_dev_info_9005_8091,
&pci_dev_info_9005_8092,
&pci_dev_info_9005_8093,
&pci_dev_info_9005_8094,
+ &pci_dev_info_9005_8095,
+ &pci_dev_info_9005_8096,
+ &pci_dev_info_9005_8097,
+ &pci_dev_info_9005_809c,
+ &pci_dev_info_9005_809d,
&pci_dev_info_9005_809e,
&pci_dev_info_9005_809f,
NULL
@@ -71461,7 +73062,9 @@ static const pciVendorInfo pciVendorInfoList[] = {
#ifdef VENDOR_INCLUDE_NONVIDEO
{0x10b8, pci_vendor_10b8, pci_dev_list_10b8},
#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
{0x10b9, pci_vendor_10b9, pci_dev_list_10b9},
+#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
{0x10ba, pci_vendor_10ba, pci_dev_list_10ba},
#endif
@@ -71682,7 +73285,9 @@ static const pciVendorInfo pciVendorInfoList[] = {
#ifdef VENDOR_INCLUDE_NONVIDEO
{0x1105, pci_vendor_1105, pci_dev_list_1105},
#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
{0x1106, pci_vendor_1106, pci_dev_list_1106},
+#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
{0x1107, pci_vendor_1107, pci_dev_list_1107},
#endif
@@ -75465,6 +77070,9 @@ static const pciVendorInfo pciVendorInfoList[] = {
{0x16be, pci_vendor_16be, pci_dev_list_16be},
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
+ {0x16ca, pci_vendor_16ca, pci_dev_list_16ca},
+#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
{0x16ec, pci_vendor_16ec, pci_dev_list_16ec},
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
@@ -75540,6 +77148,9 @@ static const pciVendorInfo pciVendorInfoList[] = {
{0x1de1, pci_vendor_1de1, pci_dev_list_1de1},
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
+ {0x1fc0, pci_vendor_1fc0, pci_dev_list_1fc0},
+#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
{0x2000, pci_vendor_2000, pci_dev_list_2000},
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
@@ -76387,7 +77998,9 @@ static const pciVendorSubsysInfo pciVendorSubsysInfoList[] = {
#ifdef VENDOR_INCLUDE_NONVIDEO
{0x10b8, pci_vendor_10b8, pci_ss_list_10b8},
#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
{0x10b9, pci_vendor_10b9, pci_ss_list_10b9},
+#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
{0x10ba, pci_vendor_10ba, pci_ss_list_10ba},
#endif
@@ -76608,7 +78221,9 @@ static const pciVendorSubsysInfo pciVendorSubsysInfoList[] = {
#ifdef VENDOR_INCLUDE_NONVIDEO
{0x1105, pci_vendor_1105, pci_ss_list_1105},
#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
{0x1106, pci_vendor_1106, pci_ss_list_1106},
+#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
{0x1107, pci_vendor_1107, pci_ss_list_1107},
#endif
@@ -80391,6 +82006,9 @@ static const pciVendorSubsysInfo pciVendorSubsysInfoList[] = {
{0x16be, pci_vendor_16be, pci_ss_list_16be},
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
+ {0x16ca, pci_vendor_16ca, pci_ss_list_16ca},
+#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
{0x16ec, pci_vendor_16ec, pci_ss_list_16ec},
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
@@ -80466,6 +82084,9 @@ static const pciVendorSubsysInfo pciVendorSubsysInfoList[] = {
{0x1de1, pci_vendor_1de1, pci_ss_list_1de1},
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
+ {0x1fc0, pci_vendor_1fc0, pci_ss_list_1fc0},
+#endif
+#ifdef VENDOR_INCLUDE_NONVIDEO
{0x2000, pci_vendor_2000, pci_ss_list_2000},
#endif
#ifdef VENDOR_INCLUDE_NONVIDEO
diff --git a/hw/xfree86/scanpci/xf86PciStr.h b/hw/xfree86/scanpci/xf86PciStr.h
index 4704a0c31..bb36d510a 100644
--- a/hw/xfree86/scanpci/xf86PciStr.h
+++ b/hw/xfree86/scanpci/xf86PciStr.h
@@ -1,9 +1,31 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/scanpci/xf86PciStr.h,v 1.1 2002/07/15 20:46:04 dawes Exp $ */
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/scanpci/xf86PciStr.h,v 1.2 2003/08/24 17:37:10 dawes Exp $ */
/*
- * Copyright © 2002 by The XFree86 Project, Inc
+ * Copyright (c) 2002 by The XFree86 Project, 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 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).
*/
-
+
/*
* Structs used to hold the pre-parsed pci.ids data. These are private
* to the scanpci and pcidata modules.
diff --git a/hw/xfree86/scanpci/xf86ScanPci.c b/hw/xfree86/scanpci/xf86ScanPci.c
index 0370a6e5f..534c8973f 100644
--- a/hw/xfree86/scanpci/xf86ScanPci.c
+++ b/hw/xfree86/scanpci/xf86ScanPci.c
@@ -1,14 +1,37 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/scanpci/xf86ScanPci.c,v 1.12 2002/07/15 20:46:04 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/scanpci/xf86ScanPci.c,v 1.14 2003/09/23 05:21:46 dawes Exp $ */
/*
* Display the Subsystem Vendor Id and Subsystem Id in order to identify
* the cards installed in this computer
*
- * Copyright 1995-2002 by The XFree86 Project, Inc.
- *
* A lot of this comes from Robin Cutshaw's scanpci
*
*/
-
+/*
+ * Copyright (c) 1995-2002 by The XFree86 Project, 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 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).
+ */
/*
* This file is used to build both the scanpci and pcidata modules.
@@ -167,7 +190,8 @@ ScanPciFindPciNamesByDevice(unsigned short vendor, unsigned short device,
return 2;
}
for (k = 0; pciVendorInfoList[k].VendorName; k++) {
- if (svendor == pciVendorInfoList[k].VendorID) {
+ if (svendor &&
+ svendor == pciVendorInfoList[k].VendorID) {
if (svname) {
*svname = pciVendorInfoList[k].VendorName;
}
diff --git a/hw/xfree86/scanpci/xf86ScanPci.h b/hw/xfree86/scanpci/xf86ScanPci.h
index 8dba8937d..3a154174a 100644
--- a/hw/xfree86/scanpci/xf86ScanPci.h
+++ b/hw/xfree86/scanpci/xf86ScanPci.h
@@ -1,6 +1,30 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/scanpci/xf86ScanPci.h,v 1.2 2002/07/15 20:46:04 dawes Exp $ */
-
-
+/* $XFree86: xc/programs/Xserver/hw/xfree86/scanpci/xf86ScanPci.h,v 1.3 2003/08/24 17:37:10 dawes Exp $ */
+/*
+ * Copyright (c) 2000-2002 by The XFree86 Project, 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 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).
+ */
#ifndef SCANPCI_H_
#define SCANPCI_H_
diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c
index 065885abc..093f35b30 100644
--- a/hw/xfree86/shadowfb/shadow.c
+++ b/hw/xfree86/shadowfb/shadow.c
@@ -6,7 +6,7 @@
Pre-fb-write callbacks and RENDER support - Nolan Leake (nolan@vmware.com)
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/shadowfb/shadow.c,v 1.18.2.1 2003/04/15 20:32:29 sven Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/shadowfb/shadow.c,v 1.21 2003/11/10 18:22:38 tsi Exp $ */
#include "X.h"
#include "Xproto.h"
@@ -372,7 +372,7 @@ ShadowCopyWindow(
RegionRec rgnDst;
if (pPriv->vtSema) {
- REGION_INIT(pWin->drawable.pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pWin->drawable.pScreen, &rgnDst);
REGION_COPY(pWin->drawable.pScreen, &rgnDst, prgn);
REGION_TRANSLATE(pWin->drawable.pScreen, &rgnDst,
@@ -646,7 +646,11 @@ ShadowFillSpans(
}
box.y2++;
- TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC);
+
+ if(!pGC->miTranslate) {
+ TRANSLATE_BOX(box, pDraw);
+ }
+ TRIM_BOX(box, pGC);
if(BOX_NOT_EMPTY(box)) {
if(pPriv->preRefresh)
@@ -698,7 +702,11 @@ ShadowSetSpans(
}
box.y2++;
- TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC);
+
+ if(!pGC->miTranslate) {
+ TRANSLATE_BOX(box, pDraw);
+ }
+ TRIM_BOX(box, pGC);
if(BOX_NOT_EMPTY(box)) {
if(pPriv->preRefresh)
@@ -1779,9 +1787,15 @@ ShadowPushPixels(
SHADOW_GC_OP_PROLOGUE(pGC);
if(IS_VISIBLE(pDraw)) {
- box.x1 = xOrg + pDraw->x;
+ box.x1 = xOrg;
+ box.y1 = yOrg;
+
+ if(!pGC->miTranslate) {
+ box.x1 += pDraw->x;
+ box.y1 += pDraw->y;
+ }
+
box.x2 = box.x1 + dx;
- box.y1 = yOrg + pDraw->y;
box.y2 = box.y1 + dy;
TRIM_BOX(box, pGC);
diff --git a/hw/xfree86/utils/kbd_mode/sun-kbd_mode.c b/hw/xfree86/utils/kbd_mode/sun-kbd_mode.c
index 6e81fd247..e70fb2db7 100644
--- a/hw/xfree86/utils/kbd_mode/sun-kbd_mode.c
+++ b/hw/xfree86/utils/kbd_mode/sun-kbd_mode.c
@@ -27,7 +27,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/hw/sun/kbd_mode.c,v 3.11 2002/10/23 16:23:36 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/sun/kbd_mode.c,v 3.12 2003/10/07 21:39:43 herrb Exp $ */
/*
static char sccsid[] = "@(#)kbd_mode.c 7.1 87/04/13";
@@ -65,7 +65,8 @@ static char sccsid[] = "@(#)kbd_mode.c 7.1 87/04/13";
#include <stdlib.h>
#include <unistd.h>
-static void die(), usage();
+static void die(char*);
+static void usage(void);
static int kbd_fd;
int
@@ -125,15 +126,14 @@ main(argc, argv)
}
static void
-die(msg)
- char *msg;
+die(char *msg)
{
fprintf(stderr, "%s\n", msg);
exit(1);
}
static void
-usage()
+usage(void)
{
int translate;
diff --git a/hw/xfree86/utils/pcitweak/pcitweak.c b/hw/xfree86/utils/pcitweak/pcitweak.c
index 42a9f9712..7ef1150b0 100644
--- a/hw/xfree86/utils/pcitweak/pcitweak.c
+++ b/hw/xfree86/utils/pcitweak/pcitweak.c
@@ -1,11 +1,36 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/etc/pcitweak.c,v 1.17 2003/08/24 17:37:01 dawes Exp $ */
/*
- * pcitweak.c
+ * Copyright (c) 1999-2002 by The XFree86 Project, 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 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 1999 by The XFree86 Project, Inc.
+ * 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).
+ */
+
+/*
+ * pcitweak.c
*
* Author: David Dawes <dawes@xfree86.org>
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/etc/pcitweak.c,v 1.16 2002/12/14 04:41:13 dawes Exp $ */
#include "X.h"
#include "os.h"
diff --git a/hw/xfree86/utils/pcitweak/pcitweak.man.pre b/hw/xfree86/utils/pcitweak/pcitweak.man.pre
index f4bd8d405..14cfa885f 100644
--- a/hw/xfree86/utils/pcitweak/pcitweak.man.pre
+++ b/hw/xfree86/utils/pcitweak/pcitweak.man.pre
@@ -1,4 +1,4 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/etc/pcitweak.man,v 3.3 2001/01/27 18:20:56 dawes Exp $
+.\" $XFree86: xc/programs/Xserver/hw/xfree86/etc/pcitweak.man,v 3.4 2003/05/29 21:48:09 herrb Exp $
.TH PCITWEAK 1 __vendorversion__
.SH NAME
pcitweak - read/write PCI config space
@@ -21,7 +21,7 @@ pcitweak - read/write PCI config space
.SH DESCRIPTION
.I Pcitweak
is a utility that can be used to examine or change registers in the PCI
-configuration space. On most platfoms
+configuration space. On most platforms
.I pcitweak
can only be run by the root user.
.SH OPTIONS
diff --git a/hw/xfree86/utils/xorgcfg/card-cfg.c b/hw/xfree86/utils/xorgcfg/card-cfg.c
index a96797f1c..5299025f1 100644
--- a/hw/xfree86/utils/xorgcfg/card-cfg.c
+++ b/hw/xfree86/utils/xorgcfg/card-cfg.c
@@ -26,7 +26,7 @@
*
* Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/card-cfg.c,v 1.11 2001/11/01 19:08:58 paulo Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/card-cfg.c,v 1.12 2003/11/03 05:11:58 tsi Exp $
*/
#include "xf86config.h"
@@ -368,7 +368,7 @@ CardModel(XF86SetupInfo *info)
static Widget model;
if (first) {
- Widget label, viewport;
+ Widget viewport;
first = 0;
@@ -376,7 +376,7 @@ CardModel(XF86SetupInfo *info)
model = XtCreateWidget("cardModel", formWidgetClass,
configp, NULL, 0);
- label = XtCreateManagedWidget("label", labelWidgetClass,
+ (void) XtCreateManagedWidget("label", labelWidgetClass,
model, NULL, 0);
filter = XtVaCreateManagedWidget("filter", asciiTextWidgetClass,
model,
diff --git a/hw/xfree86/utils/xorgcfg/config.c b/hw/xfree86/utils/xorgcfg/config.c
index 929999f9e..8c2da3d9b 100644
--- a/hw/xfree86/utils/xorgcfg/config.c
+++ b/hw/xfree86/utils/xorgcfg/config.c
@@ -26,7 +26,7 @@
*
* Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/config.c,v 1.8 2002/10/21 04:18:36 paulo Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/config.c,v 1.9 2003/11/03 05:11:58 tsi Exp $
*/
#include "config.h"
@@ -106,7 +106,7 @@ void
StartConfig(void)
{
static int first = 1;
- Widget pane, top, label, bottom, cancel;
+ Widget pane, top, bottom, cancel;
const char *filename;
if (!first)
@@ -144,7 +144,7 @@ StartConfig(void)
shell, NULL, 0);
top = XtCreateManagedWidget("top", formWidgetClass,
pane, NULL, 0);
- label = XtCreateManagedWidget("label", labelWidgetClass,
+ (void) XtCreateManagedWidget("label", labelWidgetClass,
top, NULL, 0);
ident_widget = XtVaCreateManagedWidget("identifier", asciiTextWidgetClass,
top,
@@ -199,11 +199,11 @@ ConfigError(void)
static int first = 1;
if (first) {
- Widget label, command;
+ Widget command;
errcurrent = XtCreateWidget("error", formWidgetClass,
configp, NULL, 0);
- label = XtCreateManagedWidget("label", labelWidgetClass,
+ (void) XtCreateManagedWidget("label", labelWidgetClass,
errcurrent, NULL, 0);
command = XtCreateManagedWidget("command", commandWidgetClass,
errcurrent, NULL, 0);
diff --git a/hw/xfree86/utils/xorgcfg/config.h b/hw/xfree86/utils/xorgcfg/config.h
index 34b8d7e52..6d1193a3d 100644
--- a/hw/xfree86/utils/xorgcfg/config.h
+++ b/hw/xfree86/utils/xorgcfg/config.h
@@ -26,7 +26,7 @@
*
* Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/config.h,v 1.16 2002/05/31 18:46:03 dawes Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/config.h,v 1.17 2003/06/10 17:03:55 dawes Exp $
*/
#include <X11/IntrinsicP.h>
@@ -97,6 +97,7 @@
#define CONFIG_ACCESSX 3
extern int config_mode;
+#ifndef __UNIXOS2__
#define CONFPATH "%A," "%R," \
"/etc/X11/%R," "%P/etc/X11/%R," \
"%E," "%F," \
@@ -113,6 +114,26 @@ extern int config_mode;
"%P/etc/X11/%X," \
"%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
"%P/lib/X11/%X"
+#else
+#define CONFPATH "%&"XF86CONFIGDIR"/%R," "%&"XF86CONFIGDIR"/%X," \
+ "%A," "%R," \
+ "/etc/X11/%R," "%P/etc/X11/%R," \
+ "%E," "%F," \
+ "/etc/X11/%F," "%P/etc/X11/%F," \
+ "%D/%X," \
+ "/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
+ "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
+ "%P/etc/X11/%X," \
+ "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
+ "%P/lib/X11/%X"
+#define USER_CONFPATH "%&"XF86CONFIGDIR"/%X," "%&"XF86CONFIGDIR"/%X," \
+ "/etc/X11/%S," "%P/etc/X11/%S," \
+ "/etc/X11/%G," "%P/etc/X11/%G," \
+ "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
+ "%P/etc/X11/%X," \
+ "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
+ "%P/lib/X11/%X"
+#endif
/*
* Types
diff --git a/hw/xfree86/utils/xorgcfg/expert.c b/hw/xfree86/utils/xorgcfg/expert.c
index b9890b32b..a3dfcbe2d 100644
--- a/hw/xfree86/utils/xorgcfg/expert.c
+++ b/hw/xfree86/utils/xorgcfg/expert.c
@@ -26,7 +26,7 @@
*
* Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/expert.c,v 1.14 2003/02/07 05:46:53 paulo Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/expert.c,v 1.15 2003/11/03 05:11:58 tsi Exp $
*/
#include "config.h"
@@ -498,12 +498,12 @@ CreateFiles(TreeNode *files)
static void
CreateFilesField(TreeNode *node, char *name, char *value)
{
- Widget box, label, text;
+ Widget box, text;
box = XtVaCreateManagedWidget(name, boxWidgetClass, tree,
XtNtreeParent, node->node, NULL, 0);
node->node = box;
- label = XtVaCreateManagedWidget("label", labelWidgetClass, box,
+ (void) XtVaCreateManagedWidget("label", labelWidgetClass, box,
XtNlabel, name, NULL, 0);
text = XtVaCreateManagedWidget("value", asciiTextWidgetClass, box,
XtNeditType, XawtextEdit, XtNstring, value,
@@ -542,7 +542,6 @@ static void
CreateFontPath(TreeNode *fontpath, char *path)
{
TreeNode *prev = NULL, *node;
- Widget w;
if (path == NULL) {
if (XF86Font_path) {
@@ -568,7 +567,7 @@ CreateFontPath(TreeNode *fontpath, char *path)
for (s = strtok(path, ","); s != NULL; s = strtok(NULL, ",")) {
node = NewNode(fontpath, NULL, NULL, fontpath->node, NULL);
node->destroy = FontPathChanged;
- w = CreateFontPathField(node, s, False);
+ (void) CreateFontPathField(node, s, False);
if (fontpath->child == NULL)
fontpath->child = node;
else
@@ -579,7 +578,7 @@ CreateFontPath(TreeNode *fontpath, char *path)
}
node = NewNode(fontpath, NULL, NULL, fontpath->node, NULL);
- w = CreateFontPathField(node, "", True);
+ (void) CreateFontPathField(node, "", True);
if (fontpath->child == NULL)
fontpath->child = node;
else
@@ -719,7 +718,6 @@ static void
CreateModulePath(TreeNode *modulepath, char *path)
{
TreeNode *prev = NULL, *node;
- Widget w;
if (path == NULL) {
if (XF86Module_path) {
@@ -745,7 +743,7 @@ CreateModulePath(TreeNode *modulepath, char *path)
for (s = strtok(path, ","); s != NULL; s = strtok(NULL, ",")) {
node = NewNode(modulepath, NULL, NULL, modulepath->node, NULL);
node->destroy = ModulePathChanged;
- w = CreateModulePathField(node, s, False);
+ (void) CreateModulePathField(node, s, False);
if (modulepath->child == NULL)
modulepath->child = node;
else
@@ -756,7 +754,7 @@ CreateModulePath(TreeNode *modulepath, char *path)
}
node = NewNode(modulepath, NULL, NULL, modulepath->node, NULL);
- w = CreateModulePathField(node, "", True);
+ (void) CreateModulePathField(node, "", True);
if (modulepath->child == NULL)
modulepath->child = node;
else
@@ -2130,7 +2128,7 @@ CreateMonitorModes(TreeNode *parent, XF86ConfModesLinkPtr lnk)
static void
CreateMonitorModesField(TreeNode *node, Bool addnew)
{
- Widget box, command, label;
+ Widget box, command;
box = XtVaCreateWidget("modes", formWidgetClass, tree,
XtNtreeParent, node->treeParent, NULL, 0);
@@ -2142,7 +2140,7 @@ CreateMonitorModesField(TreeNode *node, Bool addnew)
command = XtCreateManagedWidget("remove", commandWidgetClass, box,
NULL, 0);
XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node);
- label = XtVaCreateManagedWidget("mode", labelWidgetClass, box,
+ (void) XtVaCreateManagedWidget("mode", labelWidgetClass, box,
XtNlabel, lnk->ml_modes_str, NULL, 0);
}
else {
@@ -2983,7 +2981,7 @@ CreateScreenAdaptor(TreeNode *parent, XF86ConfAdaptorLinkPtr lnk)
static void
CreateScreenAdaptorField(TreeNode *node, Bool addnew)
{
- Widget box, command, label;
+ Widget box, command;
box = XtVaCreateWidget("adaptor", formWidgetClass, tree,
XtNtreeParent, node->treeParent, NULL, 0);
@@ -2995,7 +2993,7 @@ CreateScreenAdaptorField(TreeNode *node, Bool addnew)
command = XtCreateManagedWidget("remove", commandWidgetClass, box,
NULL, 0);
XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node);
- label = XtVaCreateManagedWidget("label", labelWidgetClass, box,
+ (void) XtVaCreateManagedWidget("label", labelWidgetClass, box,
XtNlabel, lnk->al_adaptor_str, NULL, 0);
}
else {
@@ -3756,7 +3754,7 @@ CreateAdjacency(TreeNode *parent, XF86ConfAdjacencyPtr adj)
static void
CreateAdjacencyField(TreeNode *node, Bool addnew)
{
- Widget box, command, label, sme;
+ Widget box, command, sme;
XF86ConfScreenPtr ptr = XF86Config->conf_screen_lst;
box = XtVaCreateWidget("adjacency", formWidgetClass, tree,
@@ -3786,7 +3784,7 @@ CreateAdjacencyField(TreeNode *node, Bool addnew)
command = XtCreateManagedWidget("remove", commandWidgetClass, box,
NULL, 0);
XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node);
- label = XtVaCreateManagedWidget("label", labelWidgetClass, box,
+ (void) XtVaCreateManagedWidget("label", labelWidgetClass, box,
XtNlabel, adj->adj_screen->scrn_identifier,
NULL, 0);
diff --git a/hw/xfree86/utils/xorgcfg/help.c b/hw/xfree86/utils/xorgcfg/help.c
index 2b25e8ede..2ae68a082 100644
--- a/hw/xfree86/utils/xorgcfg/help.c
+++ b/hw/xfree86/utils/xorgcfg/help.c
@@ -26,7 +26,7 @@
*
* Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/help.c,v 1.7 2002/06/06 21:03:32 paulo Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/help.c,v 1.8 2003/11/03 05:11:58 tsi Exp $
*/
#include <X11/IntrinsicP.h>
@@ -205,11 +205,11 @@ typedef struct _Html_Item Html_Item;
typedef struct _Html_TagInfo {
char *name;
- int entity : 1; /* it changes the type of the text */
- int nest : 1; /* does not close tags automatically */
- int end : 1; /* need a close markup */
- int adnl : 1; /* add newline before/after tag contents */
- int para : 1; /* changes the paragraph formatting */
+ unsigned int entity : 1; /* it changes the type of the text */
+ unsigned int nest : 1; /* does not close tags automatically */
+ unsigned int end : 1; /* need a close markup */
+ unsigned int adnl : 1; /* add newline before/after tag contents */
+ unsigned int para : 1; /* changes the paragraph formatting */
unsigned long mask; /* enforce use of attributes of this tag-info */
unsigned long xlfd_mask;
void (*parse_args)(Html_Parser*, Html_Item*);
diff --git a/hw/xfree86/utils/xorgcfg/loadmod.c b/hw/xfree86/utils/xorgcfg/loadmod.c
index a53bffa01..e3f4e9f47 100644
--- a/hw/xfree86/utils/xorgcfg/loadmod.c
+++ b/hw/xfree86/utils/xorgcfg/loadmod.c
@@ -26,7 +26,7 @@
*
* Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/loadmod.c,v 1.14.2.1 2003/03/13 04:10:50 tsi Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/loadmod.c,v 1.18 2003/06/12 14:12:38 eich Exp $
*/
#ifdef USE_MODULES
@@ -67,6 +67,7 @@ Bool xf86LoaderCheckSymbol(const char*);
void xf86LoaderRefSymLists(const char **, ...);
void xf86LoaderReqSymLists(const char **, ...);
void xf86Msg(int, const char*, ...);
+void xf86MsgVerb(int, int, const char*, ...);
void xf86PrintChipsets(const char*, const char*, SymTabPtr);
void xf86ErrorFVerb(int verb, const char *format, ...);
pciVideoPtr *xf86GetPciVideoInfo(void);
@@ -77,6 +78,7 @@ void *xf86LoadDrvSubModule(DriverPtr drv, const char*);
void xf86DrvMsg(int, int, const char*, ...);
pciConfigPtr *xf86GetPciConfigInfo(void);
Bool xf86IsPrimaryPci(pcVideoPtr*);
+Bool xf86CheckPciSlot(int bus, int device, int func);
#endif
extern char *loaderPath, **loaderList, **ploaderList;
@@ -180,7 +182,7 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86memchr)
SYMFUNC(xf86memcmp)
SYMFUNC(xf86memcpy)
-#if (defined(__powerpc__) && (defined(Lynx) || defined(linux))) || defined(__sparc__) || defined(__ia64__) || defined (__x86_64__)
+#if (defined(__powerpc__) && (defined(Lynx) || defined(linux))) || defined(__sparc__) || defined(__ia64__) || defined (__AMD64__)
/*
* Some PPC, SPARC, and IA64 compilers generate calls to memcpy to handle
* structure copies. This causes a problem both here and in shared
@@ -301,6 +303,7 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86LoaderRefSymLists)
SYMFUNC(xf86LoaderReqSymLists)
SYMFUNC(xf86Msg)
+ SYMFUNC(xf86MsgVerb)
SYMFUNC(ErrorF)
SYMFUNC(xf86PrintChipsets)
SYMFUNC(xf86ErrorFVerb)
@@ -313,6 +316,10 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86DrvMsg)
SYMFUNC(xf86GetPciConfigInfo)
SYMFUNC(xf86IsPrimaryPci)
+ SYMFUNC(xf86CheckPciSlot)
+ SYMFUNC(XNFalloc)
+ SYMFUNC(XNFrealloc)
+ SYMFUNC(XNFcalloc)
{0,0}
};
@@ -502,9 +509,20 @@ xf86cfgCheckModule(void)
numFontModules = 0;
fonts = FontModuleList;
if (fonts) {
+ Bool dup = FALSE;
while (fonts->name) {
- if (strcmp(fonts->name, *ploaderList) == 0)
+ if (strcasecmp(fonts->name, *ploaderList) == 0) {
pfont_module = fonts;
+ /* HACK:
+ * fonts->names points into modules.
+ * Duplicate string of all remaining names to survive
+ * unloading. Since new fonts are appended to list
+ * this will only happen once per renderer.
+ */
+ dup = TRUE;
+ }
+ if (dup)
+ fonts->name = strdup(fonts->name);
++numFontModules;
++fonts;
}
@@ -655,4 +673,10 @@ xf86IsPrimaryPci(pciVideoPtr pPci)
{
return (True);
}
+
+Bool
+xf86CheckPciSlot(int bus, int device, int func)
+{
+ return (False);
+}
#endif
diff --git a/hw/xfree86/utils/xorgcfg/monitor-cfg.c b/hw/xfree86/utils/xorgcfg/monitor-cfg.c
index 430833381..6ed095416 100644
--- a/hw/xfree86/utils/xorgcfg/monitor-cfg.c
+++ b/hw/xfree86/utils/xorgcfg/monitor-cfg.c
@@ -26,7 +26,7 @@
*
* Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c,v 1.7 2001/03/24 01:17:20 paulo Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/monitor-cfg.c,v 1.8 2003/09/11 10:08:38 eich Exp $
*/
#include "xf86config.h"
@@ -69,6 +69,10 @@ static char *hmodes[] = {
"Monitor that can do 1280x1024 @ 60 Hz",
"Monitor that can do 1280x1024 @ 74 Hz",
"Monitor that can do 1280x1024 @ 76 Hz",
+ "Monitor that can do 1280x1024 @ 85 Hz",
+ "Monitor that can do 1600x1200 @ 85 Hz",
+ "Monitor that can do 1920x1440 @ 85 Hz",
+ "Monitor that can do 2048x1536 @ 85 Hz"
};
static char *hmodes_trans[] = {
@@ -82,6 +86,10 @@ static char *hmodes_trans[] = {
"31.5 - 64.3",
"31.5 - 79.0",
"31.5 - 82.0",
+ "31.5 - 92.0",
+ "31.5 - 108.0",
+ "31.5 - 128.5",
+ "31.5 - 137.0"
};
static char *vmodes [] = { "50 - 70", "50 - 90", "50 - 100", "40 - 150", };
diff --git a/hw/xfree86/utils/xorgcfg/mouse-cfg.c b/hw/xfree86/utils/xorgcfg/mouse-cfg.c
index 761da248a..17a1c0caf 100644
--- a/hw/xfree86/utils/xorgcfg/mouse-cfg.c
+++ b/hw/xfree86/utils/xorgcfg/mouse-cfg.c
@@ -26,7 +26,7 @@
*
* Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/mouse-cfg.c,v 1.10 2003/02/15 05:37:58 paulo Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/mouse-cfg.c,v 1.12 2003/11/03 05:11:58 tsi Exp $
*/
#include "xf86config.h"
@@ -55,6 +55,9 @@ static struct MouseProtocol {
char *name;
int type;
} protocols[] = {
+#ifdef __UNIXOS2__
+ {"OS2Mouse", MTYPE_AUTOMOUSE},
+#endif
#ifdef SCO
{"OsMouse", MTYPE_AUTOMOUSE},
#endif
@@ -322,7 +325,7 @@ MouseDeviceAndProtocol(XF86SetupInfo *info)
int i;
if (first) {
- Widget label, viewport;
+ Widget viewport;
struct dirent *ent;
DIR *dir;
char **list;
@@ -359,7 +362,7 @@ MouseDeviceAndProtocol(XF86SetupInfo *info)
}
}
- label = XtCreateManagedWidget("labelD", labelWidgetClass,
+ (void) XtCreateManagedWidget("labelD", labelWidgetClass,
mouse_dp, NULL, 0);
text = XtVaCreateManagedWidget("device", asciiTextWidgetClass,
mouse_dp,
@@ -376,7 +379,7 @@ MouseDeviceAndProtocol(XF86SetupInfo *info)
XtAddCallback(listD, XtNcallback, MouseDeviceCallback, (XtPointer)text);
/* PROTOCOL */
- label = XtCreateManagedWidget("labelP", labelWidgetClass,
+ (void) XtCreateManagedWidget("labelP", labelWidgetClass,
mouse_dp, NULL, 0);
viewport = XtCreateManagedWidget("viewportP", viewportWidgetClass,
mouse_dp, NULL, 0);
diff --git a/hw/xfree86/utils/xorgcfg/screen-cfg.c b/hw/xfree86/utils/xorgcfg/screen-cfg.c
index 5aa71188a..9390afc6d 100644
--- a/hw/xfree86/utils/xorgcfg/screen-cfg.c
+++ b/hw/xfree86/utils/xorgcfg/screen-cfg.c
@@ -26,7 +26,7 @@
*
* Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/screen-cfg.c,v 1.12 2002/11/18 05:24:18 paulo Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/screen-cfg.c,v 1.14 2003/11/03 05:11:58 tsi Exp $
*/
#include "xf86config.h"
@@ -73,6 +73,8 @@ static char *standard_modes[] = {
"1800x1400",
"512x384",
"1400x1050",
+ "2048x1536",
+ "1920x1440",
};
static char **modes;
@@ -519,6 +521,8 @@ ScreenDialog(XF86SetupInfo *info)
XtMapWidget(ccw);
}
}
+#else
+ (void)labelRotate;
#endif
if (rotate == CW) {
XtVaSetValues(cw, XtNstate, True, NULL, 0);
diff --git a/hw/xfree86/utils/xorgcfg/stubs.c b/hw/xfree86/utils/xorgcfg/stubs.c
index 5962908d1..6496bc868 100644
--- a/hw/xfree86/utils/xorgcfg/stubs.c
+++ b/hw/xfree86/utils/xorgcfg/stubs.c
@@ -26,7 +26,7 @@
*
* Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/stubs.c,v 1.3 2002/11/09 11:12:53 herrb Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/stubs.c,v 1.4 2003/03/25 04:18:25 dawes Exp $
*/
#include <stdio.h>
@@ -36,6 +36,11 @@
/*
* Implementation
*/
+
+#ifdef __UNIXOS2__
+static char dummy;
+#endif
+
#if !defined(USE_MODULES)
/* these are defined in libdummy.a */
int
diff --git a/hw/xfree86/utils/xorgcfg/text-mode.c b/hw/xfree86/utils/xorgcfg/text-mode.c
index ef4da2877..2011d1abd 100644
--- a/hw/xfree86/utils/xorgcfg/text-mode.c
+++ b/hw/xfree86/utils/xorgcfg/text-mode.c
@@ -26,7 +26,7 @@
*
* Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/text-mode.c,v 1.22 2003/02/16 05:23:45 paulo Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/text-mode.c,v 1.26 2003/11/14 02:40:22 dawes Exp $
*/
#include <stdio.h>
@@ -46,7 +46,15 @@
#include "xf86config.h"
#include "loader.h"
-#define XKB_RULES_DIR "/usr/X11R6/lib/X11/xkb/rules"
+#ifndef PROJECT_ROOT
+#define PROJECT_ROOT "/usr/X11R6"
+#endif
+
+#ifndef __UNIXOS2__
+#define XKB_RULES_DIR PROJECT_ROOT "/lib/X11/xkb/rules"
+#else
+#define XKB_RULES_DIR XF86CONFIGDIR "/xkb/rules"
+#endif
#define CONTROL_A 1
#define CONTROL_D 4
@@ -196,7 +204,11 @@ TextMode(void)
"This program will create the XF86Config file, based on "
"menu selections you make.\n"
"\n"
+#ifndef __UNIXOS2__
"The XF86Config file usually resides in /usr/X11R6/etc/X11 "
+#else
+ "The XF86Config file usually resides in "XF86CONFIGDIR" "
+#endif
"or /etc/X11. A sample XF86Config file is supplied with "
"XFree86; it is configured for a standard VGA card and "
"monitor with 640x480 resolution. This program will ask for "
@@ -285,7 +297,11 @@ WriteXF86Config(void)
refresh();
xf86config = DialogInput("Write XF86Config", "Write configuration to file:",
10, 60, XF86Config_path ? XF86Config_path :
+#ifndef __UNIXOS2__
"/etc/X11/XF86Config", " Ok ", " Cancel ", 0);
+#else
+ XF86CONFIGDIR"/XF86Config", " Ok ", " Cancel ", 0);
+#endif
if (xf86config == NULL)
return (-1);
@@ -301,7 +317,7 @@ WriteXF86Config(void)
XtCalloc(1, sizeof(XF86ConfModuleRec));
XF86Config->conf_modules->mod_comment =
- XtNewString("\t# Load \"freetype\"\n"
+ XtNewString("\tLoad \"freetype\"\n"
"\t# Load \"xtt\"\n");
for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) {
@@ -330,6 +346,9 @@ WriteXF86Config(void)
}
static char *protocols[] = {
+#ifdef __UNIXOS2__
+ "OS2Mouse",
+#endif
#ifdef SCO
"OsMouse",
#endif
@@ -521,6 +540,8 @@ MouseConfig(void)
str = "/dev/wsmouse";
#elif defined(__FreeBSD__)
str = "/dev/sysmouse";
+#elif defined(__UNIXOS2__)
+ str = "mouse$";
#else
str = "/dev/mouse";
#endif
@@ -805,6 +826,10 @@ static char *hsync[] = {
"31.5 - 64.3; Monitor that can do 1280x1024 @ 60 Hz",
"31.5 - 79.0; Monitor that can do 1280x1024 @ 74 Hz",
"31.5 - 82.0; Monitor that can do 1280x1024 @ 76 Hz",
+ "31.5 - 92.0; Monitor that can do 1280x1024 @ 85 Hz",
+ "31.5 - 108.0; Monitor that can do 1600x1200 @ 85 Hz",
+ "31.5 - 128.5; Monitor that can do 1920x1440 @ 85 Hz",
+ "31.5 - 137.0; Monitor that can do 2048x1536 @ 85 Hz"
};
static char *vrefresh[] = {
@@ -1358,6 +1383,9 @@ static char *depths[] = {
};
static char *modes[] = {
+ "2048x1536",
+ "1920x1440",
+ "1800x1400",
"1600x1200",
"1400x1050",
"1280x1024",
diff --git a/hw/xfree86/utils/xorgcfg/vidmode.c b/hw/xfree86/utils/xorgcfg/vidmode.c
index d28ac0899..3a51310d9 100644
--- a/hw/xfree86/utils/xorgcfg/vidmode.c
+++ b/hw/xfree86/utils/xorgcfg/vidmode.c
@@ -26,7 +26,7 @@
*
* Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/vidmode.c,v 1.7 2001/07/07 23:00:43 paulo Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/vidmode.c,v 1.8 2003/11/03 05:11:58 tsi Exp $
*/
/*
@@ -130,11 +130,10 @@ static Bool autoflag;
static xf86cfgVidmode *vidtune;
static XF86VidModeModeLine modeline, orig_modeline;
static int dot_clock, hsync_rate, vsync_rate, hitError;
-static Bool S3Specials;
-static int invert_vclk, blank1, blank2, early_sc, screenno;
+static int screenno;
static int (*XtErrorFunc)(Display*, XErrorEvent*);
-static Widget labels[VSYNC + 1], values[VSYNC + 1], repeater, monitor,
- monitorb, add, text, vesab, vesap, forceshell, testshell, addshell;
+static Widget values[VSYNC + 1], repeater, monitor,
+ monitorb, add, text, vesap, forceshell, testshell, addshell;
static int MajorVersion, MinorVersion, EventBase, ErrorBase;
static XtIntervalId timeout;
@@ -449,7 +448,7 @@ VideoModeInitialize(void)
vtune = XtCreateWidget("vidtune", formWidgetClass,
work, NULL, 0);
- vesab = XtVaCreateManagedWidget("vesaB", menuButtonWidgetClass, vtune,
+ (void) XtVaCreateManagedWidget("vesaB", menuButtonWidgetClass, vtune,
XtNmenuName, "vesaP", NULL, 0);
vesap = XtCreatePopupShell("vesaP", simpleMenuWidgetClass, vtune, NULL, 0);
for (i = 0; i < sizeof(vesamodes) / sizeof(vesamodes[0]); i++) {
@@ -556,7 +555,7 @@ VideoModeInitialize(void)
form = XtCreateManagedWidget("form", formWidgetClass, vtune, NULL, 0);
for (i = 2; i < VSYNC + 1; i++) {
- labels[i] = XtCreateManagedWidget(names[i], labelWidgetClass,
+ (void) XtCreateManagedWidget(names[i], labelWidgetClass,
form, NULL, 0);
values[i] = XtCreateManagedWidget(vnames[i], labelWidgetClass,
form, NULL, 0);
@@ -888,15 +887,6 @@ GetModeLine(Bool save)
if (save)
memcpy(&orig_modeline, &modeline, sizeof(XF86VidModeModeLine));
UpdateSyncRates(False);
- if (modeline.privsize != 0 && modeline.private != NULL) {
- S3Specials = True;
- invert_vclk = modeline.private[1];
- blank1 = modeline.private[2] & 7;
- blank2 = (modeline.private[2] >> 4) & 7;
- early_sc = modeline.private[3];
- }
- else
- S3Specials = False;
return (True);
}
diff --git a/hw/xfree86/utils/xorgcfg/xf86config.c b/hw/xfree86/utils/xorgcfg/xf86config.c
index b2b0b871c..cb4054a5e 100644
--- a/hw/xfree86/utils/xorgcfg/xf86config.c
+++ b/hw/xfree86/utils/xorgcfg/xf86config.c
@@ -26,7 +26,7 @@
*
* Author: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/xf86config.c,v 1.5 2001/03/27 20:25:30 paulo Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/xf86config.c,v 1.6 2003/11/03 05:11:59 tsi Exp $
*/
#include "xf86config.h"
@@ -206,7 +206,10 @@ xf86removeMonitor(XF86ConfigPtr config, XF86ConfMonitorPtr monitor)
while (scr != NULL) {
if (scr->scrn_monitor == monitor) {
xf86removeScreen(config, scr);
+ if (scr == psc)
scr = psc = config->conf_screen_lst;
+ else
+ scr = psc;
continue;
}
psc = scr;
diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c
index 18e8032e1..07659d943 100644
--- a/hw/xfree86/vbe/vbe.c
+++ b/hw/xfree86/vbe/vbe.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/vbe/vbe.c,v 1.1 2003/02/17 17:06:45 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/vbe/vbe.c,v 1.3 2003/11/03 05:11:53 tsi Exp $ */
/*
* XFree86 vbe module
@@ -106,11 +106,13 @@ VBEExtendedInit(xf86Int10InfoPtr pInt, int entityIndex, int Flags)
}
xf86DrvMsgVerb(screen, X_INFO, 4,
- "VbeVersion is %d, OemStringPtr is 0x%08x,\n"
- "\tOemVendorNamePtr is 0x%08x, OemProductNamePtr is 0x%08x,\n"
- "\tOemProductRevPtr is 0x%08x\n",
- vbe->VbeVersion, vbe->OemStringPtr, vbe->OemVendorNamePtr,
- vbe->OemProductNamePtr, vbe->OemProductRevPtr);
+ "VbeVersion is %d, OemStringPtr is 0x%08lx,\n"
+ "\tOemVendorNamePtr is 0x%08lx, OemProductNamePtr is 0x%08lx,\n"
+ "\tOemProductRevPtr is 0x%08lx\n",
+ vbe->VbeVersion, (unsigned long)vbe->OemStringPtr,
+ (unsigned long)vbe->OemVendorNamePtr,
+ (unsigned long)vbe->OemProductNamePtr,
+ (unsigned long)vbe->OemProductRevPtr);
xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE Version %i.%i\n",
VERSION(vbe->VbeVersion));
@@ -341,7 +343,7 @@ VBEGetVBEInfo(vbeInfoPtr pVbe)
VbeInfoBlock *block = NULL;
int i, pStr, pModes;
char *str;
- CARD16 major, minor, *modes;
+ CARD16 major, *modes;
bzero(pVbe->memory, sizeof(VbeInfoBlock));
@@ -378,7 +380,6 @@ VBEGetVBEInfo(vbeInfoPtr pVbe)
block->VESAVersion = *(CARD16*)(((char*)pVbe->memory) + 4);
major = (unsigned)block->VESAVersion >> 8;
- minor = block->VESAVersion & 0xff;
pStr = *(CARD32*)(((char*)pVbe->memory) + 6);
str = xf86int10Addr(pVbe->pInt10, FARP(pStr));
diff --git a/hw/xfree86/vbe/vbe.h b/hw/xfree86/vbe/vbe.h
index 5bca184f5..30756119d 100644
--- a/hw/xfree86/vbe/vbe.h
+++ b/hw/xfree86/vbe/vbe.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/vbe/vbe.h,v 1.1 2003/02/17 17:06:45 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/vbe/vbe.h,v 1.3 2003/11/14 14:58:45 tsi Exp $ */
/*
* XFree86 vbe module
@@ -60,7 +60,11 @@ typedef struct vbeControllerInfoBlock {
CARD8 OemData[256];
} vbeControllerInfoRec, *vbeControllerInfoPtr;
-#pragma pack()
+#ifdef __GNUC__
+#pragma pack() /* All GCC versions recognise this syntax */
+#else
+#pragma pack(0)
+#endif
#ifndef __GNUC__
#define __attribute__(a)
@@ -237,8 +241,8 @@ typedef enum {
} vbeScanwidthCommand;
#define VBESetLogicalScanline(pVbe, width) \
- VBESetGetLogicalScanlineLength(pVbe, SCANWID_SET, \
- width, NULL, NULL, NULL)
+ VBESetGetLogicalScanlineLength(pVbe, SCANWID_SET, width, \
+ NULL, NULL, NULL)
#define VBESetLogicalScanlineBytes(pVbe, width) \
VBESetGetLogicalScanlineLength(pVbe, SCANWID_SET_BYTES, width, \
NULL, NULL, NULL)
@@ -246,8 +250,8 @@ typedef enum {
VBESetGetLogicalScanlineLength(pVbe, SCANWID_GET, 0, \
pixels, bytes, max)
#define VBEGetMaxLogicalScanline(pVbe, pixels, bytes, max) \
- VBESetGetLogicalScanlineLength(pVbe, SCANWID_GET_MAX, \
- NULL, pixels, bytes, max)
+ VBESetGetLogicalScanlineLength(pVbe, SCANWID_GET_MAX, 0, \
+ pixels, bytes, max)
Bool VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe,
vbeScanwidthCommand command, int width,
int *pixels, int *bytes, int *max);
diff --git a/hw/xfree86/vbe/vbeModes.c b/hw/xfree86/vbe/vbeModes.c
index 4d4f1bfac..ae16d7b75 100644
--- a/hw/xfree86/vbe/vbeModes.c
+++ b/hw/xfree86/vbe/vbeModes.c
@@ -27,7 +27,7 @@
*
* Authors: David Dawes <dawes@xfree86.org>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/vbe/vbeModes.c,v 1.1 2003/02/17 17:06:45 dawes Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/vbe/vbeModes.c,v 1.4 2003/11/06 18:38:14 tsi Exp $
*/
#include "xf86.h"
@@ -120,7 +120,7 @@ static DisplayModePtr
CheckMode(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock *vbe, int id,
int flags)
{
- CARD16 major, minor;
+ CARD16 major;
VbeModeInfoBlock *mode;
DisplayModePtr pMode, p;
VbeModeInfoData *data;
@@ -128,7 +128,6 @@ CheckMode(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock *vbe, int id,
ModeStatus status = MODE_OK;
major = (unsigned)(vbe->VESAVersion >> 8);
- minor = vbe->VESAVersion & 0xff;
if ((mode = VBEGetModeInfo(pVbe, id)) == NULL)
return NULL;
@@ -193,7 +192,7 @@ CheckMode(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock *vbe, int id,
xf86ErrorFVerb(DEBUG_VERB,
" WinBSegment: 0x%x\n", mode->WinBSegment);
xf86ErrorFVerb(DEBUG_VERB,
- " WinFuncPtr: 0x%x\n", mode->WinFuncPtr);
+ " WinFuncPtr: 0x%lx\n", (unsigned long)mode->WinFuncPtr);
xf86ErrorFVerb(DEBUG_VERB,
" BytesPerScanline: %d\n", mode->BytesPerScanline);
xf86ErrorFVerb(DEBUG_VERB,
@@ -236,7 +235,8 @@ CheckMode(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock *vbe, int id,
" DirectColorModeInfo: %d\n", mode->DirectColorModeInfo);
if (major >= 2) {
xf86ErrorFVerb(DEBUG_VERB,
- " PhysBasePtr: 0x%x\n", mode->PhysBasePtr);
+ " PhysBasePtr: 0x%lx\n",
+ (unsigned long)mode->PhysBasePtr);
if (major >= 3) {
xf86ErrorFVerb(DEBUG_VERB,
" LinBytesPerScanLine: %d\n", mode->LinBytesPerScanLine);
@@ -261,7 +261,7 @@ CheckMode(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock *vbe, int id,
xf86ErrorFVerb(DEBUG_VERB,
" LinRsvdFieldPosition: %d\n", mode->LinRsvdFieldPosition);
xf86ErrorFVerb(DEBUG_VERB,
- " MaxPixelClock: %d\n", mode->MaxPixelClock);
+ " MaxPixelClock: %ld\n", (unsigned long)mode->MaxPixelClock);
}
}
diff --git a/hw/xfree86/vgahw/vgaHW.c b/hw/xfree86/vgahw/vgaHW.c
index e598d91a2..e1fd9716a 100644
--- a/hw/xfree86/vgahw/vgaHW.c
+++ b/hw/xfree86/vgahw/vgaHW.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/vgahw/vgaHW.c,v 1.57 2003/02/24 21:29:36 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/vgahw/vgaHW.c,v 1.58 2003/11/03 05:11:53 tsi Exp $ */
/*
*
@@ -221,14 +221,12 @@ stdWriteFCR(vgaHWPtr hwp, CARD8 value)
static void
stdWriteAttr(vgaHWPtr hwp, CARD8 index, CARD8 value)
{
- CARD8 tmp;
-
if (hwp->paletteEnabled)
index &= ~0x20;
else
index |= 0x20;
- tmp = inb(hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET);
+ (void) inb(hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET);
outb(hwp->PIOOffset + VGA_ATTR_INDEX, index);
outb(hwp->PIOOffset + VGA_ATTR_DATA_W, value);
}
@@ -236,14 +234,12 @@ stdWriteAttr(vgaHWPtr hwp, CARD8 index, CARD8 value)
static CARD8
stdReadAttr(vgaHWPtr hwp, CARD8 index)
{
- CARD8 tmp;
-
if (hwp->paletteEnabled)
index &= ~0x20;
else
index |= 0x20;
- tmp = inb(hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET);
+ (void) inb(hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET);
outb(hwp->PIOOffset + VGA_ATTR_INDEX, index);
return inb(hwp->PIOOffset + VGA_ATTR_DATA_R);
}
@@ -263,9 +259,7 @@ stdReadMiscOut(vgaHWPtr hwp)
static void
stdEnablePalette(vgaHWPtr hwp)
{
- CARD8 tmp;
-
- tmp = inb(hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET);
+ (void) inb(hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET);
outb(hwp->PIOOffset + VGA_ATTR_INDEX, 0x00);
hwp->paletteEnabled = TRUE;
}
@@ -273,9 +267,7 @@ stdEnablePalette(vgaHWPtr hwp)
static void
stdDisablePalette(vgaHWPtr hwp)
{
- CARD8 tmp;
-
- tmp = inb(hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET);
+ (void) inb(hwp->IOBase + hwp->PIOOffset + VGA_IN_STAT_1_OFFSET);
outb(hwp->PIOOffset + VGA_ATTR_INDEX, 0x20);
hwp->paletteEnabled = FALSE;
}
@@ -436,14 +428,12 @@ mmioWriteFCR(vgaHWPtr hwp, CARD8 value)
static void
mmioWriteAttr(vgaHWPtr hwp, CARD8 index, CARD8 value)
{
- CARD8 tmp;
-
if (hwp->paletteEnabled)
index &= ~0x20;
else
index |= 0x20;
- tmp = minb(hwp->IOBase + VGA_IN_STAT_1_OFFSET);
+ (void) minb(hwp->IOBase + VGA_IN_STAT_1_OFFSET);
moutb(VGA_ATTR_INDEX, index);
moutb(VGA_ATTR_DATA_W, value);
}
@@ -451,14 +441,12 @@ mmioWriteAttr(vgaHWPtr hwp, CARD8 index, CARD8 value)
static CARD8
mmioReadAttr(vgaHWPtr hwp, CARD8 index)
{
- CARD8 tmp;
-
if (hwp->paletteEnabled)
index &= ~0x20;
else
index |= 0x20;
- tmp = minb(hwp->IOBase + VGA_IN_STAT_1_OFFSET);
+ (void) minb(hwp->IOBase + VGA_IN_STAT_1_OFFSET);
moutb(VGA_ATTR_INDEX, index);
return minb(VGA_ATTR_DATA_R);
}
@@ -478,9 +466,7 @@ mmioReadMiscOut(vgaHWPtr hwp)
static void
mmioEnablePalette(vgaHWPtr hwp)
{
- CARD8 tmp;
-
- tmp = minb(hwp->IOBase + VGA_IN_STAT_1_OFFSET);
+ (void) minb(hwp->IOBase + VGA_IN_STAT_1_OFFSET);
moutb(VGA_ATTR_INDEX, 0x00);
hwp->paletteEnabled = TRUE;
}
@@ -488,9 +474,7 @@ mmioEnablePalette(vgaHWPtr hwp)
static void
mmioDisablePalette(vgaHWPtr hwp)
{
- CARD8 tmp;
-
- tmp = minb(hwp->IOBase + VGA_IN_STAT_1_OFFSET);
+ (void) minb(hwp->IOBase + VGA_IN_STAT_1_OFFSET);
moutb(VGA_ATTR_INDEX, 0x20);
hwp->paletteEnabled = FALSE;
}
diff --git a/hw/xfree86/x86emu/fpu.c b/hw/xfree86/x86emu/fpu.c
index 08aea4229..0f679bde6 100644
--- a/hw/xfree86/x86emu/fpu.c
+++ b/hw/xfree86/x86emu/fpu.c
@@ -36,6 +36,7 @@
* emulation of the FPU instructions.
*
****************************************************************************/
+/* $XFree86: xc/extras/x86emu/src/x86emu/fpu.c,v 1.2 2003/10/22 20:03:06 tsi Exp $ */
#include "x86emu/x86emui.h"
@@ -95,8 +96,8 @@ static char *x86emu_fpu_op_d9_tab1[] = {
void x86emuOp_esc_coprocess_d9(u8 X86EMU_UNUSED(op1))
{
int mod, rl, rh;
- uint destoffset;
- u8 stkelem;
+ uint destoffset = 0;
+ u8 stkelem = 0;
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
@@ -289,6 +290,9 @@ void x86emuOp_esc_coprocess_d9(u8 X86EMU_UNUSED(op1))
}
}
}
+#else
+ (void)destoffset;
+ (void)stkelem;
#endif /* X86EMU_FPU_PRESENT */
DECODE_CLEAR_SEGOVR();
END_OF_INSTR_NO_TRACE();
@@ -322,8 +326,8 @@ char *x86emu_fpu_op_da_tab[] = {
void x86emuOp_esc_coprocess_da(u8 X86EMU_UNUSED(op1))
{
int mod, rl, rh;
- uint destoffset;
- u8 stkelem;
+ uint destoffset = 0;
+ u8 stkelem = 0;
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
@@ -379,6 +383,9 @@ void x86emuOp_esc_coprocess_da(u8 X86EMU_UNUSED(op1))
break;
}
}
+#else
+ (void)destoffset;
+ (void)stkelem;
#endif
DECODE_CLEAR_SEGOVR();
END_OF_INSTR_NO_TRACE();
@@ -403,7 +410,7 @@ char *x86emu_fpu_op_db_tab[] = {
void x86emuOp_esc_coprocess_db(u8 X86EMU_UNUSED(op1))
{
int mod, rl, rh;
- uint destoffset;
+ uint destoffset = 0;
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
@@ -499,6 +506,8 @@ void x86emuOp_esc_coprocess_db(u8 X86EMU_UNUSED(op1))
break;
}
}
+#else
+ (void)destoffset;
#endif
DECODE_CLEAR_SEGOVR();
END_OF_INSTR_NO_TRACE();
@@ -530,8 +539,8 @@ char *x86emu_fpu_op_dc_tab[] = {
void x86emuOp_esc_coprocess_dc(u8 X86EMU_UNUSED(op1))
{
int mod, rl, rh;
- uint destoffset;
- u8 stkelem;
+ uint destoffset = 0;
+ u8 stkelem = 0;
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
@@ -613,6 +622,9 @@ void x86emuOp_esc_coprocess_dc(u8 X86EMU_UNUSED(op1))
break;
}
}
+#else
+ (void)destoffset;
+ (void)stkelem;
#endif
DECODE_CLEAR_SEGOVR();
END_OF_INSTR_NO_TRACE();
@@ -640,8 +652,8 @@ static char *x86emu_fpu_op_dd_tab[] = {
void x86emuOp_esc_coprocess_dd(u8 X86EMU_UNUSED(op1))
{
int mod, rl, rh;
- uint destoffset;
- u8 stkelem;
+ uint destoffset = 0;
+ u8 stkelem = 0;
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
@@ -713,6 +725,9 @@ void x86emuOp_esc_coprocess_dd(u8 X86EMU_UNUSED(op1))
break;
}
}
+#else
+ (void)destoffset;
+ (void)stkelem;
#endif
DECODE_CLEAR_SEGOVR();
END_OF_INSTR_NO_TRACE();
@@ -747,8 +762,8 @@ static char *x86emu_fpu_op_de_tab[] =
void x86emuOp_esc_coprocess_de(u8 X86EMU_UNUSED(op1))
{
int mod, rl, rh;
- uint destoffset;
- u8 stkelem;
+ uint destoffset = 0;
+ u8 stkelem = 0;
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
@@ -832,6 +847,9 @@ void x86emuOp_esc_coprocess_de(u8 X86EMU_UNUSED(op1))
break;
}
}
+#else
+ (void)destoffset;
+ (void)stkelem;
#endif
DECODE_CLEAR_SEGOVR();
END_OF_INSTR_NO_TRACE();
@@ -866,8 +884,8 @@ static char *x86emu_fpu_op_df_tab[] = {
void x86emuOp_esc_coprocess_df(u8 X86EMU_UNUSED(op1))
{
int mod, rl, rh;
- uint destoffset;
- u8 stkelem;
+ uint destoffset = 0;
+ u8 stkelem = 0;
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
@@ -939,6 +957,9 @@ void x86emuOp_esc_coprocess_df(u8 X86EMU_UNUSED(op1))
break;
}
}
+#else
+ (void)destoffset;
+ (void)stkelem;
#endif
DECODE_CLEAR_SEGOVR();
END_OF_INSTR_NO_TRACE();
diff --git a/hw/xfree86/x86emu/ops.c b/hw/xfree86/x86emu/ops.c
index 3714070dd..94041f6c8 100644
--- a/hw/xfree86/x86emu/ops.c
+++ b/hw/xfree86/x86emu/ops.c
@@ -70,7 +70,7 @@
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/src/x86emu/ops.c,v 1.7 2002/07/15 16:49:10 dawes Exp $ */
+/* $XFree86: xc/extras/x86emu/src/x86emu/ops.c,v 1.9 2003/10/22 20:03:06 tsi Exp $ */
#include "x86emu/x86emui.h"
@@ -4538,7 +4538,11 @@ static void x86emuOp_push_byte_IMM(u8 X86EMU_UNUSED(op1))
imm = (s8)fetch_byte_imm();
DECODE_PRINTF2("PUSH\t%d\n", imm);
TRACE_AND_STEP();
- push_word(imm);
+ if (M.x86.mode & SYSMODE_PREFIX_DATA) {
+ push_long((s32)imm);
+ } else {
+ push_word(imm);
+ }
DECODE_CLEAR_SEGOVR();
END_OF_INSTR();
}
@@ -9417,11 +9421,9 @@ Handles opcode 0xd5
****************************************************************************/
static void x86emuOp_aad(u8 X86EMU_UNUSED(op1))
{
- u8 a;
-
START_OF_INSTR();
DECODE_PRINTF("AAD\n");
- a = fetch_byte_imm();
+ (void) fetch_byte_imm();
TRACE_AND_STEP();
M.x86.R_AX = aad_word(M.x86.R_AX);
DECODE_CLEAR_SEGOVR();
diff --git a/hw/xfree86/x86emu/ops2.c b/hw/xfree86/x86emu/ops2.c
index ae295f782..55f361677 100644
--- a/hw/xfree86/x86emu/ops2.c
+++ b/hw/xfree86/x86emu/ops2.c
@@ -37,7 +37,7 @@
* instructions.
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/src/x86emu/ops2.c,v 1.5 2002/07/15 16:49:10 dawes Exp $ */
+/* $XFree86: xc/extras/x86emu/src/x86emu/ops2.c,v 1.6 2003/10/22 20:03:06 tsi Exp $ */
#include "x86emu/x86emui.h"
@@ -145,6 +145,7 @@ static void x86emuOp2_long_jump(u8 op2)
break;
}
DECODE_PRINTF(name);
+ (void)name;
target = (s16) fetch_word_imm();
target += (s16) M.x86.R_IP;
DECODE_PRINTF2("%04x\n", target);
@@ -237,6 +238,7 @@ static void x86emuOp2_set_byte(u8 op2)
break;
}
DECODE_PRINTF(name);
+ (void)name;
FETCH_DECODE_MODRM(mod, rh, rl);
switch (mod) {
case 0:
diff --git a/hw/xfree86/x86emu/x86emu/fpu_regs.h b/hw/xfree86/x86emu/x86emu/fpu_regs.h
index 56e9a04d7..b975b87e0 100644
--- a/hw/xfree86/x86emu/x86emu/fpu_regs.h
+++ b/hw/xfree86/x86emu/x86emu/fpu_regs.h
@@ -35,14 +35,13 @@
* Description: Header file for FPU register definitions.
*
****************************************************************************/
+/* $XFree86: xc/extras/x86emu/include/x86emu/fpu_regs.h,v 1.3 2003/10/28 16:01:40 tsi Exp $ */
#ifndef __X86EMU_FPU_REGS_H
#define __X86EMU_FPU_REGS_H
#ifdef X86_FPU_SUPPORT
-#pragma pack(1)
-
/* Basic 8087 register can hold any of the following values: */
union x86_fpu_reg_u {
@@ -87,8 +86,6 @@ struct x86_fpu_registers {
short x86_fpu_tos, x86_fpu_bos;
};
-#pragma pack()
-
/*
* There are two versions of the following macro.
*
diff --git a/hw/xfree86/x86emu/x86emu/regs.h b/hw/xfree86/x86emu/x86emu/regs.h
index 12426278d..3a4580138 100644
--- a/hw/xfree86/x86emu/x86emu/regs.h
+++ b/hw/xfree86/x86emu/x86emu/regs.h
@@ -35,15 +35,13 @@
* Description: Header file for x86 register definitions.
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/include/x86emu/regs.h,v 1.4 2002/09/16 18:05:18 eich Exp $ */
+/* $XFree86: xc/extras/x86emu/include/x86emu/regs.h,v 1.6 2003/10/28 16:01:40 tsi Exp $ */
#ifndef __X86EMU_REGS_H
#define __X86EMU_REGS_H
/*---------------------- Macros and type definitions ----------------------*/
-#pragma pack(1)
-
/*
* General EAX, EBX, ECX, EDX type registers. Note that for
* portability, and speed, the issue of byte swapping is not addressed
@@ -305,8 +303,6 @@ typedef struct {
X86EMU_regs x86;
} X86EMU_sysEnv;
-#pragma pack()
-
/*----------------------------- Global Variables --------------------------*/
#ifdef __cplusplus
diff --git a/hw/xfree86/x86emu/x86emu/types.h b/hw/xfree86/x86emu/x86emu/types.h
index 847ce835d..3a0dc17fc 100644
--- a/hw/xfree86/x86emu/x86emu/types.h
+++ b/hw/xfree86/x86emu/x86emu/types.h
@@ -36,7 +36,7 @@
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/include/x86emu/types.h,v 1.5 2002/07/23 14:22:45 tsi Exp $ */
+/* $XFree86: xc/extras/x86emu/include/x86emu/types.h,v 1.7 2003/07/07 15:34:21 eich Exp $ */
#ifndef __X86EMU_TYPES_H
#define __X86EMU_TYPES_H
@@ -70,12 +70,13 @@
/* Taken from Xmd.h */
#undef NUM32
-#if defined(__alpha) || defined(__alpha__) || \
+#if defined (_LP64) || \
+ defined(__alpha) || defined(__alpha__) || \
defined(__ia64__) || defined(ia64) || \
defined(__sparc64__) || \
defined(__s390x__) || \
(defined(__hppa__) && defined(__LP64)) || \
- defined(__x86_64__) || defined(x86_64) || \
+ defined(__AMD64__) || defined(AMD64) || \
(defined(__sgi) && (_MIPS_SZLONG == 64))
#define NUM32 int
#else
diff --git a/hw/xfree86/xaa/xaaBitBlt.c b/hw/xfree86/xaa/xaaBitBlt.c
index 015b539e5..83850767a 100644
--- a/hw/xfree86/xaa/xaaBitBlt.c
+++ b/hw/xfree86/xaa/xaaBitBlt.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaBitBlt.c,v 1.3 1998/12/06 06:08:39 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaBitBlt.c,v 1.4 2003/11/10 18:22:39 tsi Exp $ */
/*
This is a lighter version of cfbBitBlt. We calculate the boxes
@@ -161,7 +161,7 @@ XAABitBlt(
/* Check to see if the region is empty */
if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2) {
- REGION_INIT(pGC->pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pGC->pScreen, &rgnDst);
} else {
REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1);
}
diff --git a/hw/xfree86/xaa/xaaCpyPlane.c b/hw/xfree86/xaa/xaaCpyPlane.c
index 74dcdfd31..d3d1c8a5c 100644
--- a/hw/xfree86/xaa/xaaCpyPlane.c
+++ b/hw/xfree86/xaa/xaaCpyPlane.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaCpyPlane.c,v 1.13 2001/10/01 13:44:15 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaCpyPlane.c,v 1.14 2003/11/10 18:22:40 tsi Exp $ */
/*
A CopyPlane function that handles bitmap->screen copies and
@@ -186,7 +186,7 @@ XAAPushPixelsSolidColorExpansion(
if(!pClipBoxes) return;
} else pClipBoxes = (BoxPtr)infoRec->PreAllocMem;
- nboxes = XAAGetRectClipBoxes(pGC->pCompositeClip, pClipBoxes, 1, &TheRect);
+ nboxes = XAAGetRectClipBoxes(pGC, pClipBoxes, 1, &TheRect);
pbox = pClipBoxes;
while(nboxes--) {
diff --git a/hw/xfree86/xaa/xaaCpyWin.c b/hw/xfree86/xaa/xaaCpyWin.c
index 1c5ecf38e..b77be1ad6 100644
--- a/hw/xfree86/xaa/xaaCpyWin.c
+++ b/hw/xfree86/xaa/xaaCpyWin.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaCpyWin.c,v 1.3 2003/02/17 16:08:29 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaCpyWin.c,v 1.4 2003/11/10 18:22:40 tsi Exp $ */
#include "misc.h"
#include "xf86.h"
@@ -47,7 +47,7 @@ XAACopyWindow(
pwinRoot = WindowTable[pScreen->myNum];
- REGION_INIT(pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pScreen, &rgnDst);
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
diff --git a/hw/xfree86/xaa/xaaFillPoly.c b/hw/xfree86/xaa/xaaFillPoly.c
index 164887afe..5566f51e6 100644
--- a/hw/xfree86/xaa/xaaFillPoly.c
+++ b/hw/xfree86/xaa/xaaFillPoly.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaFillPoly.c,v 1.15 2001/10/28 03:34:04 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaFillPoly.c,v 1.16 2003/03/23 03:41:44 mvojkovi Exp $ */
/*
* Copyright 1996 The XFree86 Project
@@ -770,7 +770,11 @@ XAAFillPolygonStippled(
pCache = (*infoRec->CacheMono8x8Pattern)(
infoRec->pScrn, patx, paty);
patx = pCache->x; paty = pCache->y;
- }
+ } else {
+ pCache = &(infoRec->ScratchCacheInfoRec);
+ pCache->pat0 = patx;
+ pCache->pat1 = paty;
+ }
RectFunc = Mono8x8PatternRectHelper;
}
diff --git a/hw/xfree86/xaa/xaaFillRect.c b/hw/xfree86/xaa/xaaFillRect.c
index 1d9cd54c1..cda56e327 100644
--- a/hw/xfree86/xaa/xaaFillRect.c
+++ b/hw/xfree86/xaa/xaaFillRect.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaFillRect.c,v 1.15 2001/12/13 18:01:51 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaFillRect.c,v 1.16 2003/11/10 18:22:40 tsi Exp $ */
#include "misc.h"
#include "xf86.h"
@@ -1018,7 +1018,7 @@ XAAClipAndRenderRects(
int
XAAGetRectClipBoxes(
- RegionPtr prgnClip,
+ GCPtr pGC,
BoxPtr pboxClippedBase,
int nrectFill,
xRectangle *prectInit
@@ -1026,7 +1026,7 @@ XAAGetRectClipBoxes(
int Right, Bottom;
BoxPtr pextent, pboxClipped = pboxClippedBase;
xRectangle *prect = prectInit;
-
+ RegionPtr prgnClip = pGC->pCompositeClip;
if (REGION_NUM_RECTS(prgnClip) == 1) {
pextent = REGION_RECTS(prgnClip);
diff --git a/hw/xfree86/xaa/xaaImage.c b/hw/xfree86/xaa/xaaImage.c
index 6da601faf..c3db7ff57 100644
--- a/hw/xfree86/xaa/xaaImage.c
+++ b/hw/xfree86/xaa/xaaImage.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaImage.c,v 1.20 2000/09/25 23:56:14 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaImage.c,v 1.21 2003/11/10 18:22:41 tsi Exp $ */
#include "misc.h"
#include "xf86.h"
@@ -444,8 +444,7 @@ XAAPutImage(
if(!pClipBoxes) return;
} else pClipBoxes = (BoxPtr)infoRec->PreAllocMem;
- nboxes =
- XAAGetRectClipBoxes(pGC->pCompositeClip, pClipBoxes, 1, &TheRect);
+ nboxes = XAAGetRectClipBoxes(pGC, pClipBoxes, 1, &TheRect);
pbox = pClipBoxes;
if(format == XYBitmap) {
diff --git a/hw/xfree86/xaa/xaaNonTEText.c b/hw/xfree86/xaa/xaaNonTEText.c
index 914631b58..e1c57588a 100644
--- a/hw/xfree86/xaa/xaaNonTEText.c
+++ b/hw/xfree86/xaa/xaaNonTEText.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaNonTEText.c,v 1.12 2000/04/07 19:11:10 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaNonTEText.c,v 1.14 2003/11/14 21:54:51 dawes Exp $ */
/********************************************************************
diff --git a/hw/xfree86/xaa/xaaOverlay.c b/hw/xfree86/xaa/xaaOverlay.c
index 9651ca6a3..d527b7c15 100644
--- a/hw/xfree86/xaa/xaaOverlay.c
+++ b/hw/xfree86/xaa/xaaOverlay.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaOverlay.c,v 1.14 2002/12/10 04:18:20 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaOverlay.c,v 1.15 2003/11/10 18:22:41 tsi Exp $ */
#include "misc.h"
#include "xf86.h"
@@ -57,7 +57,7 @@ XAACopyWindow8_32(
if(doUnderlay)
freeReg = miOverlayCollectUnderlayRegions(pWin, &borderClip);
- REGION_INIT(pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pScreen, &rgnDst);
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
diff --git a/hw/xfree86/xaa/xaaOverlayDF.c b/hw/xfree86/xaa/xaaOverlayDF.c
index 82a2011a4..5cce3e7ed 100644
--- a/hw/xfree86/xaa/xaaOverlayDF.c
+++ b/hw/xfree86/xaa/xaaOverlayDF.c
@@ -3,7 +3,7 @@
Written by Mark Vojkovich
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaOverlayDF.c,v 1.1 1999/03/28 15:33:03 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaOverlayDF.c,v 1.2 2003/11/10 18:22:41 tsi Exp $ */
#include "misc.h"
@@ -355,7 +355,7 @@ XAAOverCopyWindow(
infoRec->ScratchGC.alu = GXcopy;
infoRec->ScratchGC.planemask = ~0;
- REGION_INIT(pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pScreen, &rgnDst);
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
@@ -388,7 +388,7 @@ XAAOverCopyWindow(
REGION_UNINIT(pScreen, &rgnDst);
if(pWin->drawable.depth == 8) {
- REGION_INIT(pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pScreen, &rgnDst);
miSegregateChildren(pWin, &rgnDst, pScrn->depth);
if(REGION_NOTEMPTY(pScreen, &rgnDst)) {
REGION_INTERSECT(pScreen, &rgnDst, &rgnDst, prgnSrc);
diff --git a/hw/xfree86/xaa/xaaPCache.c b/hw/xfree86/xaa/xaaPCache.c
index e6163b33a..c7756ba93 100644
--- a/hw/xfree86/xaa/xaaPCache.c
+++ b/hw/xfree86/xaa/xaaPCache.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c,v 1.30 2000/09/25 23:56:14 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c,v 1.33 2003/11/03 05:11:54 tsi Exp $ */
#include "misc.h"
#include "xf86.h"
@@ -321,13 +321,11 @@ ConvertAllPartialsTo8x8(
Bool DoMono = (infoRec->PixmapCacheFlags & CACHE_MONO_8x8);
CacheLinkPtr pLink = ListPartial;
CacheLinkPtr MonoList = *ListMono, ColorList = *ListColor;
- int MonosPerColor = 1;
if(DoColor && DoMono) {
/* we assume color patterns take more space than color ones */
if(MonoH > ColorH) ColorH = MonoH;
if(MonoW > ColorW) ColorW = MonoW;
- MonosPerColor = (ColorH/MonoH) * (ColorW/MonoW);
}
/* Break up the area into as many Color and Mono slots as we can */
@@ -763,6 +761,7 @@ XAAInitPixmapCache(
1) Don't take up more than half the memory.
2) Don't bother if you can't get at least four.
3) Don't make more than MAX_512.
+ 4) Don't have any of there are no 256x256s.
256x256 -
1) Don't take up more than a quarter of the memory enless there
@@ -786,6 +785,13 @@ XAAInitPixmapCache(
else Target256 = ntotal >> 4;
if(Target256 < 4) Target256 = 0;
+ if(Num512 && Num256 < 4) {
+ while(Num512 && Num256 < Target256) {
+ SubdivideList(&List512, &List256);
+ Num256 += 4; Num512--;
+ }
+ }
+
if(!Num512) { /* no room */
} else if((Num512 < 4) || (!Target512)) {
while(Num512) {
@@ -2044,7 +2050,7 @@ XAAWriteColor8x8PatternToCache(
nw = w;
memcpy(dstPtr, srcPtr, w * Bpp);
while (nw != 8) {
- memcpy(dstPtr + (nw * Bpp), srcPtr, nw * Bpp);
+ memcpy(dstPtr + (nw * Bpp), dstPtr, nw * Bpp);
nw <<= 1;
}
}
diff --git a/hw/xfree86/xaa/xaaPict.c b/hw/xfree86/xaa/xaaPict.c
index 4b7e3d0f0..fecbbcfa0 100644
--- a/hw/xfree86/xaa/xaaPict.c
+++ b/hw/xfree86/xaa/xaaPict.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaPict.c,v 1.17 2002/12/10 04:17:21 dawes Exp $
+ * $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaPict.c,v 1.18 2003/04/23 18:35:34 eich Exp $
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -432,10 +432,11 @@ XAAComposite (CARD8 op,
xSrc, ySrc, xMask, yMask, xDst, yDst,
width, height))
{
- if(pSrc->pDrawable->type == DRAWABLE_WINDOW ||
+ if((pSrc->pDrawable->type == DRAWABLE_WINDOW ||
pDst->pDrawable->type == DRAWABLE_WINDOW ||
IS_OFFSCREEN_PIXMAP(pSrc->pDrawable) ||
- IS_OFFSCREEN_PIXMAP(pDst->pDrawable)) {
+ IS_OFFSCREEN_PIXMAP(pDst->pDrawable))
+ && infoRec->pScrn->vtSema) {
SYNC_CHECK(pDst->pDrawable);
}
(*GetPictureScreen(pScreen)->Composite) (op,
@@ -666,10 +667,11 @@ XAAGlyphs (CARD8 op,
!(*infoRec->Glyphs)(op, pSrc, pDst, maskFormat,
xSrc, ySrc, nlist, list, glyphs))
{
- if((pSrc->pDrawable->type == DRAWABLE_WINDOW) ||
+ if(((pSrc->pDrawable->type == DRAWABLE_WINDOW) ||
(pDst->pDrawable->type == DRAWABLE_WINDOW) ||
IS_OFFSCREEN_PIXMAP(pSrc->pDrawable) ||
- IS_OFFSCREEN_PIXMAP(pDst->pDrawable)) {
+ IS_OFFSCREEN_PIXMAP(pDst->pDrawable))
+ && infoRec->pScrn->vtSema) {
SYNC_CHECK(pDst->pDrawable);
}
(*GetPictureScreen(pScreen)->Glyphs) (op, pSrc, pDst, maskFormat,
diff --git a/hw/xfree86/xaa/xaaStateChange.c b/hw/xfree86/xaa/xaaStateChange.c
index 512c6a260..b27a54e81 100644
--- a/hw/xfree86/xaa/xaaStateChange.c
+++ b/hw/xfree86/xaa/xaaStateChange.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaStateChange.c,v 3.2 2003/02/04 01:44:07 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaStateChange.c,v 3.3 2003/08/22 19:27:31 eich Exp $ */
#include "misc.h"
#include "xf86.h"
@@ -1670,8 +1670,9 @@ XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
XAA_STATE_WRAP(CopyWindow);
XAA_STATE_WRAP(SaveAreas);
XAA_STATE_WRAP(RestoreAreas);
+#ifdef RENDER
XAA_STATE_WRAP(SetupForCPUToScreenAlphaTexture);
XAA_STATE_WRAP(SetupForCPUToScreenTexture);
-
+#endif
return TRUE;
}
diff --git a/hw/xfree86/xaa/xaaStipple.c b/hw/xfree86/xaa/xaaStipple.c
index 8037a3eaf..862f50ba0 100644
--- a/hw/xfree86/xaa/xaaStipple.c
+++ b/hw/xfree86/xaa/xaaStipple.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaStipple.c,v 1.11 2001/10/28 03:34:04 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaStipple.c,v 1.12 2003/08/04 22:18:31 mvojkovi Exp $ */
#include "xaa.h"
#include "xaalocal.h"
@@ -762,20 +762,28 @@ StippleOver32(
){
CARD32* srcp;
CARD32 bits;
- int bitsleft, shift;
+ int bitsleft, shift, usable;
while(dwords--) {
- bitsleft = width - offset;
- srcp = src + (offset >> 5);
- shift = offset & 31;
-
- if(bitsleft < 32)
- bits = SHIFT_L(*src,bitsleft) |
- (SHIFT_R(*srcp,shift) & XAAShiftMasks[bitsleft]);
- else if(shift)
- bits = SHIFT_R(*srcp,shift) | SHIFT_L(srcp[1],32-shift);
- else
- bits = *srcp;
+ bitsleft = width - offset;
+ srcp = src + (offset >> 5);
+ shift = offset & 31;
+ usable = 32 - shift;
+
+ if(bitsleft < 32) {
+ if(bitsleft <= usable) {
+ bits = SHIFT_L(*src,bitsleft) |
+ (SHIFT_R(*srcp,shift) & XAAShiftMasks[bitsleft]);
+ } else {
+ bits = SHIFT_L(*src,bitsleft) |
+ (SHIFT_L(srcp[1],usable) & XAAShiftMasks[bitsleft]) |
+ (SHIFT_R(*srcp,shift) & XAAShiftMasks[usable]);
+ }
+ }
+ else if(shift)
+ bits = SHIFT_R(*srcp,shift) | SHIFT_L(srcp[1],usable);
+ else
+ bits = *srcp;
#ifdef TRIPLE_BITS
if(dwords >= 2) {
@@ -805,20 +813,28 @@ StippleOver32_Inverted(
){
CARD32* srcp;
CARD32 bits;
- int bitsleft, shift;
+ int bitsleft, shift, usable;
while(dwords--) {
- bitsleft = width - offset;
- srcp = src + (offset >> 5);
- shift = offset & 31;
-
- if(bitsleft < 32)
- bits = SHIFT_L(*src,bitsleft) |
- (SHIFT_R(*srcp,shift) & XAAShiftMasks[bitsleft]);
- else if(shift)
- bits = SHIFT_R(*srcp,shift) | SHIFT_L(srcp[1],32-shift);
- else
- bits = *srcp;
+ bitsleft = width - offset;
+ srcp = src + (offset >> 5);
+ shift = offset & 31;
+ usable = 32 - shift;
+
+ if(bitsleft < 32) {
+ if(bitsleft <= usable) {
+ bits = SHIFT_L(*src,bitsleft) |
+ (SHIFT_R(*srcp,shift) & XAAShiftMasks[bitsleft]);
+ } else {
+ bits = SHIFT_L(*src,bitsleft) |
+ (SHIFT_L(srcp[1],usable) & XAAShiftMasks[bitsleft]) |
+ (SHIFT_R(*srcp,shift) & XAAShiftMasks[usable]);
+ }
+ }
+ else if(shift)
+ bits = SHIFT_R(*srcp,shift) | SHIFT_L(srcp[1],usable);
+ else
+ bits = *srcp;
bits = ~bits;
diff --git a/hw/xfree86/xaa/xaaWideLine.c b/hw/xfree86/xaa/xaaWideLine.c
index 7425f9d20..f999b425f 100644
--- a/hw/xfree86/xaa/xaaWideLine.c
+++ b/hw/xfree86/xaa/xaaWideLine.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaWideLine.c,v 1.10 2001/11/16 16:47:56 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaWideLine.c,v 1.11 2003/07/16 01:38:48 dawes Exp $ */
/*
@@ -32,7 +32,7 @@ Original mi code written by Keith Packard.
#include "X.h"
#include "windowstr.h"
#include "gcstruct.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "miwideline.h"
#include "mi.h"
#include "xf86str.h"
diff --git a/hw/xfree86/xaa/xaalocal.h b/hw/xfree86/xaa/xaalocal.h
index 0c239c234..4504deffd 100644
--- a/hw/xfree86/xaa/xaalocal.h
+++ b/hw/xfree86/xaa/xaalocal.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaalocal.h,v 1.36 2003/02/17 16:08:29 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaalocal.h,v 1.37 2003/11/10 18:22:41 tsi Exp $ */
#ifndef _XAALOCAL_H
#define _XAALOCAL_H
@@ -1485,7 +1485,7 @@ void XAAMoveDWORDS(
int
XAAGetRectClipBoxes(
- RegionPtr prgnClip,
+ GCPtr pGC,
BoxPtr pboxClippedBase,
int nrectFill,
xRectangle *prectInit
diff --git a/hw/xfree86/xf4bpp/emulTile.c b/hw/xfree86/xf4bpp/emulTile.c
index a2d24f4d9..650c448b8 100644
--- a/hw/xfree86/xf4bpp/emulTile.c
+++ b/hw/xfree86/xf4bpp/emulTile.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/emulTile.c,v 1.3 1999/06/06 08:48:54 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/emulTile.c,v 1.4 2003/11/03 05:11:56 tsi Exp $ */
/*
* Copyright IBM Corporation 1987,1988,1989
*
@@ -178,7 +178,6 @@ register int x0, y0, w, h ;
int xSrc ;
int ySrc ;
{
-ScreenPtr pScreen ;
int xOffset ;
int yOffset ;
int width, height;
@@ -186,7 +185,6 @@ int width, height;
TRACE( ( "xf4bppTileRect(pTile=x%x,alu=x%x,planes=x%02x,x0=%d,y0=%d,w=%d,h=%d,xSrc=%d,ySrc=%d\n",
pTile, alu, planes, x0, y0, w, h, xSrc, ySrc ) ) ;
- pScreen = pTile->drawable.pScreen ;
switch ( alu ) {
case GXclear: /* 0x0 Zero 0 */
case GXinvert: /* 0xa NOT dst */
diff --git a/hw/xfree86/xf4bpp/mfbfillarc.c b/hw/xfree86/xf4bpp/mfbfillarc.c
index 14c2ccb66..4c4d8eab6 100644
--- a/hw/xfree86/xf4bpp/mfbfillarc.c
+++ b/hw/xfree86/xf4bpp/mfbfillarc.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/mfbfillarc.c,v 1.5 2003/02/18 21:29:59 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/mfbfillarc.c,v 1.6 2003/11/03 05:11:56 tsi Exp $ */
/************************************************************
Copyright (c) 1989 X Consortium
@@ -244,16 +244,16 @@ xf4bppPolyFillArcSolid
xArc *parcs
)
{
- mfbPrivGC *priv;
register xArc *arc;
register int i;
BoxRec box;
RegionPtr cclip;
+#if 0
+ mfbPrivGC *priv;
int rop;
priv = (mfbPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr;
rop = priv->rop;
-#if 0
if ((rop == RROP_NOP) || !(pGC->planemask & 1))
#else
if ( !(pGC->planemask & 0x0F))
diff --git a/hw/xfree86/xf4bpp/mfbimggblt.c b/hw/xfree86/xf4bpp/mfbimggblt.c
index cb2e63125..a5d5b5b37 100644
--- a/hw/xfree86/xf4bpp/mfbimggblt.c
+++ b/hw/xfree86/xf4bpp/mfbimggblt.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/mfbimggblt.c,v 1.7 2003/02/18 21:29:59 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/mfbimggblt.c,v 1.9 2003/11/17 22:20:42 dawes Exp $ */
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
/***********************************************************
@@ -101,7 +101,6 @@ xoff, pdst, pglyph, and tmpSrc seem like the right things, though.
/* Forward declarations -- GJA */
static void doImageGlyphBlt(
-#if NeedFunctionPrototypes
DrawablePtr,
GC *,
int,
@@ -110,7 +109,6 @@ static void doImageGlyphBlt(
CharInfoPtr *,
unsigned char *,
ExtentInfoRec *
-#endif
);
void
@@ -352,7 +350,9 @@ doImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase,infop)
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 = (TEXTPOS *)ALLOCATE_LOCAL(nglyph * sizeof(TEXTPOS))))
return;
@@ -452,7 +452,9 @@ doImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase,infop)
glyphCol = (leftEdge - ppos[i].xpos) -
(pci->metrics.leftSideBearing);
+#if GETLEFTBITS_ALIGNMENT > 1
getWidth = w + glyphCol;
+#endif
xoff = xchar + (leftEdge - ppos[i].xpos);
if (xoff > PLST)
{
diff --git a/hw/xfree86/xf4bpp/mfbline.c b/hw/xfree86/xf4bpp/mfbline.c
index dc85e3d92..c2717599f 100644
--- a/hw/xfree86/xf4bpp/mfbline.c
+++ b/hw/xfree86/xf4bpp/mfbline.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/mfbline.c,v 1.4 2002/01/25 21:56:22 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/mfbline.c,v 1.6 2003/11/17 22:20:42 dawes Exp $ */
/***********************************************************
Copyright (c) 1987 X Consortium
@@ -92,9 +92,7 @@ actual clipping.
*/
#ifdef POLYSEGMENT
static void DoV16SegmentSS(
-#if NeedFunctionPrototypes
DrawablePtr, GCPtr, int, xSegment*
-#endif
);
void
@@ -113,9 +111,7 @@ xf4bppSegmentSS (pDrawable, pGC, nseg, pSeg)
#else
static void DoV16LineSS(
-#if NeedFunctionPrototypes
DrawablePtr, GCPtr, int, int, DDXPointPtr
-#endif
);
void
@@ -182,13 +178,14 @@ DoV16LineSS (pDrawable, pGC, mode, npt, pptInit)
register int y1, y2;
register int x1, x2;
RegionPtr cclip;
- int alu;
+#ifndef POLYSEGMENT
+ int alu = pGC->alu; /* GJA */
+#endif
if (!(pGC->planemask & 0x0F))
return;
cclip = pGC->pCompositeClip;
- alu = pGC->alu; /* GJA */
pboxInit = REGION_RECTS(cclip);
nboxInit = REGION_NUM_RECTS(cclip);
@@ -499,9 +496,7 @@ DoV16LineSS (pDrawable, pGC, mode, npt, pptInit)
#ifdef POLYSEGMENT
static void DoV16SegmentSD(
-#if NeedFunctionPrototypes
DrawablePtr, GCPtr, int, xSegment*
-#endif
);
void
@@ -520,9 +515,7 @@ xf4bppSegmentSD (pDrawable, pGC, nseg, pSeg)
#else
static void DoV16LineSD(
-#if NeedFunctionPrototypes
DrawablePtr, GCPtr, int, int, DDXPointPtr
-#endif
);
void
@@ -803,10 +796,7 @@ dontStep: ;
(y2 < pbox->y2))
{
unsigned long _mask;
- int ink;
- ink = fgink;
- if (dashIndex & 1) ink = bgink;
_mask = mask[x2 & PIM];
addrl = mfbScanline(addrl, x2, y2, nlwidth);
UPDRW(addrl,_mask);
diff --git a/hw/xfree86/xf4bpp/ppcCpArea.c b/hw/xfree86/xf4bpp/ppcCpArea.c
index e5202c267..86b7d6f6c 100644
--- a/hw/xfree86/xf4bpp/ppcCpArea.c
+++ b/hw/xfree86/xf4bpp/ppcCpArea.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/ppcCpArea.c,v 1.5 2000/09/26 15:57:21 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/ppcCpArea.c,v 1.7 2003/11/10 18:22:42 tsi Exp $ */
/*
* Copyright IBM Corporation 1987,1988,1989
*
@@ -71,31 +71,19 @@ vga16DoBitblt
unsigned long planemask
)
{
- CARD32 *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 */
-
- MROP_DECLARE_REG()
-
int careful;
- MROP_INITIALIZE(alu,planemask);
-
- cfbGetLongWidthAndPointer (pSrc, widthSrc, psrcBase)
-
- cfbGetLongWidthAndPointer (pDst, widthDst, pdstBase)
+ widthSrc = cfbGetLongWidth(pSrc);
+ widthDst = cfbGetLongWidth(pDst);
/* XXX we have to err on the side of safety when both are windows,
* because we don't know if IncludeInferiors is being used.
@@ -114,7 +102,6 @@ vga16DoBitblt
if (careful && (pptSrc->y < pbox->y1))
{
/* walk source botttom to top */
- ydir = -1;
widthSrc = -widthSrc;
widthDst = -widthDst;
@@ -151,17 +138,9 @@ vga16DoBitblt
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 */
@@ -199,11 +178,6 @@ vga16DoBitblt
pptSrc = pptNew2;
}
}
- else
- {
- /* walk source left to right */
- xdir = 1;
- }
while(nbox--)
{
@@ -424,7 +398,7 @@ int dstx, dsty;
/* Check to see if the region is empty */
if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2)
{
- REGION_INIT(pGC->pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pGC->pScreen, &rgnDst);
}
else
{
diff --git a/hw/xfree86/xf4bpp/ppcFillRct.c b/hw/xfree86/xf4bpp/ppcFillRct.c
index 7e1c866ef..af1ecb95e 100644
--- a/hw/xfree86/xf4bpp/ppcFillRct.c
+++ b/hw/xfree86/xf4bpp/ppcFillRct.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/ppcFillRct.c,v 1.5 2003/02/18 21:29:59 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/ppcFillRct.c,v 1.6 2003/11/03 05:11:57 tsi Exp $ */
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
/***********************************************************
@@ -82,18 +82,10 @@ xf4bppPolyFillRect(pDrawable, pGC, nrectFill, prectInit)
int numRects;
int n;
int xorg, yorg;
- mfbPrivGC *priv;
-/* int alu; */
-/* mfbFillAreaProcPtr pfn; */
-/* PixmapPtr ppix; */
if (!(pGC->planemask & 0x0F)) /* GJA */
return;
- priv = (mfbPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr;
-/* alu = priv->ropFillArea; */
-/* pfn = priv->FillArea; */
-/* ppix = pGC->pRotatedPixmap; */
prgnClip = pGC->pCompositeClip;
prect = prectInit;
diff --git a/hw/xfree86/xf4bpp/ppcGCstr.h b/hw/xfree86/xf4bpp/ppcGCstr.h
index 5f863fa73..341e17534 100644
--- a/hw/xfree86/xf4bpp/ppcGCstr.h
+++ b/hw/xfree86/xf4bpp/ppcGCstr.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/ppcGCstr.h,v 1.3 2003/02/18 21:29:59 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/ppcGCstr.h,v 1.4 2003/11/17 22:20:42 dawes Exp $ */
/*
* Copyright IBM Corporation 1987,1988,1989
*
@@ -79,17 +79,13 @@ typedef ppcPrivGC *ppcPrivGCPtr ;
/* ppcCReduce.c */
void xf4bppGetReducedColorRrop(
-#if NeedFunctionPrototypes
GCPtr,
int,
ppcReducedRrop *
-#endif
);
/* vgaGC.c */
void xf4bppChangeGCtype(
-#if NeedFunctionPrototypes
GCPtr,
ppcPrivGCPtr
-#endif
);
diff --git a/hw/xfree86/xf4bpp/ppcIO.c b/hw/xfree86/xf4bpp/ppcIO.c
index 43cc7bd33..f6999c561 100644
--- a/hw/xfree86/xf4bpp/ppcIO.c
+++ b/hw/xfree86/xf4bpp/ppcIO.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/ppcIO.c,v 1.5 2001/10/28 03:34:06 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/ppcIO.c,v 1.6 2003/11/03 05:11:57 tsi Exp $ */
/*
Copyright (c) 1990 X Consortium
@@ -77,7 +77,7 @@ static VisualRec vgaVisuals[] = {
} ;
#endif
-int
+void
xf4bppNeverCalled()
{
FatalError("xf4bppNeverCalled was nevertheless called\n");
diff --git a/hw/xfree86/xf4bpp/ppcPixFS.c b/hw/xfree86/xf4bpp/ppcPixFS.c
index 261c8e809..c009d696e 100644
--- a/hw/xfree86/xf4bpp/ppcPixFS.c
+++ b/hw/xfree86/xf4bpp/ppcPixFS.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/ppcPixFS.c,v 1.4 2001/08/01 00:44:56 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/ppcPixFS.c,v 1.5 2003/11/03 05:11:57 tsi Exp $ */
/*
* Copyright IBM Corporation 1987,1988,1989
*
@@ -126,16 +126,16 @@ xf4bppSolidPixmapFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted )
return ;
n = nInit * miFindMaxBand(pGC->pCompositeClip) ;
- if ( !( pwidth = (int *) ALLOCATE_LOCAL( n * sizeof( int ) ) ) )
+ if ( !( pwidthFree = (int *) ALLOCATE_LOCAL( n * sizeof( int ) ) ) )
return ;
- pwidthFree = pwidth ;
+ pwidth = pwidthFree ;
- if ( !( ppt = (DDXPointRec *)
+ if ( !( pptFree = (DDXPointRec *)
ALLOCATE_LOCAL( n * sizeof( DDXPointRec ) ) ) ) {
DEALLOCATE_LOCAL( pwidth ) ;
return ;
}
- pptFree = ppt ;
+ ppt = pptFree ;
n = miClipSpans( pGC->pCompositeClip, pptInit, pwidthInit, nInit,
ppt, pwidth, fSorted ) ;
@@ -260,8 +260,8 @@ int fSorted ;
if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.alu ) == GXnoop )
return ;
- SETSPANPTRS( nInit, n, pwidthInit, pwidth, pptInit,
- ppt, pwidthFree, pptFree, fSorted ) ;
+ SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
+ pptFree, pwidth, ppt, fSorted ) ;
pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.planemask ;
fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.fgPixel ;
@@ -359,8 +359,8 @@ int fSorted ;
if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.alu ) == GXnoop )
return ;
- SETSPANPTRS( nInit, n, pwidthInit, pwidth, pptInit,
- ppt, pwidthFree, pptFree, fSorted ) ;
+ SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
+ pptFree, pwidth, ppt, fSorted ) ;
fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.fgPixel ;
bg = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.bgPixel ;
@@ -462,8 +462,8 @@ int fSorted ;
if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.alu ) == GXnoop )
return ;
- SETSPANPTRS( nInit, n, pwidthInit, pwidth, pptInit,
- ppt, pwidthFree, pptFree, fSorted ) ;
+ SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
+ pptFree, pwidth, ppt, fSorted ) ;
/* the following code is for 8 bits per pixel addressable memory only */
pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.planemask ;
diff --git a/hw/xfree86/xf4bpp/ppcPntWin.c b/hw/xfree86/xf4bpp/ppcPntWin.c
index e61fed342..f52343fc9 100644
--- a/hw/xfree86/xf4bpp/ppcPntWin.c
+++ b/hw/xfree86/xf4bpp/ppcPntWin.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/ppcPntWin.c,v 1.3 1999/06/06 08:49:01 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/ppcPntWin.c,v 1.4 2003/11/17 22:20:42 dawes Exp $ */
/*
* Copyright IBM Corporation 1987,1988,1989
*
@@ -80,18 +80,14 @@ SOFTWARE.
/* NOTE: These functions only work for visuals up to 31-bits deep */
static void xf4bppPaintWindowSolid(
-#if NeedFunctionPrototypes
WindowPtr,
RegionPtr,
int
-#endif
);
static void xf4bppPaintWindowTile(
-#if NeedFunctionPrototypes
WindowPtr,
RegionPtr,
int
-#endif
);
void
diff --git a/hw/xfree86/xf4bpp/ppcWinFS.c b/hw/xfree86/xf4bpp/ppcWinFS.c
index 29d466f00..fc38cdcfe 100644
--- a/hw/xfree86/xf4bpp/ppcWinFS.c
+++ b/hw/xfree86/xf4bpp/ppcWinFS.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/ppcWinFS.c,v 1.3 1999/06/06 08:49:02 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/ppcWinFS.c,v 1.4 2003/11/03 05:11:57 tsi Exp $ */
/*
* Copyright IBM Corporation 1987,1988,1989
*
@@ -98,16 +98,16 @@ xf4bppSolidWindowFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted )
return ;
n = nInit * miFindMaxBand( pGC->pCompositeClip ) ;
- if ( !( pwidth = (int *) ALLOCATE_LOCAL( n * sizeof( int ) ) ) )
+ if ( !( pwidthFree = (int *) ALLOCATE_LOCAL( n * sizeof( int ) ) ) )
return ;
- pwidthFree = pwidth ;
+ pwidth = pwidthFree ;
- if ( !( ppt = (DDXPointRec *)
+ if ( !( pptFree = (DDXPointRec *)
ALLOCATE_LOCAL( n * sizeof( DDXPointRec ) ) ) ) {
DEALLOCATE_LOCAL( pwidth ) ;
return ;
}
- pptFree = ppt ;
+ ppt = pptFree ;
n = miClipSpans( pGC->pCompositeClip, pptInit, pwidthInit, nInit,
ppt, pwidth, fSorted ) ;
@@ -164,8 +164,8 @@ int fSorted ;
if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.alu ) == GXnoop )
return ;
- SETSPANPTRS( nInit, n, pwidthInit, pwidth, pptInit,
- ppt, pwidthFree, pptFree, fSorted ) ;
+ SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
+ pptFree, pwidth, ppt, fSorted ) ;
pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.planemask ;
fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.fgPixel ;
@@ -216,8 +216,8 @@ int fSorted ;
if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.alu ) == GXnoop )
return ;
- SETSPANPTRS( nInit, n, pwidthInit, pwidth, pptInit,
- ppt, pwidthFree, pptFree, fSorted ) ;
+ SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
+ pptFree, pwidth, ppt, fSorted ) ;
pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.planemask ;
fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.fgPixel ;
@@ -261,8 +261,8 @@ int fSorted ;
if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr )->colorRrop.alu ) == GXnoop )
return ;
- SETSPANPTRS( nInit, n, pwidthInit, pwidth, pptInit,
- ppt, pwidthFree, pptFree, fSorted ) ;
+ SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit,
+ pptFree, pwidth, ppt, fSorted ) ;
xSrc = pGC->patOrg.x + pDrawable->x ;
ySrc = pGC->patOrg.y + pDrawable->y ;
diff --git a/hw/xfree86/xf4bpp/vgaBitBlt.c b/hw/xfree86/xf4bpp/vgaBitBlt.c
index 53eb3b314..660cc356b 100644
--- a/hw/xfree86/xf4bpp/vgaBitBlt.c
+++ b/hw/xfree86/xf4bpp/vgaBitBlt.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/vgaBitBlt.c,v 1.4 2002/01/25 21:56:22 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/vgaBitBlt.c,v 1.6 2003/11/17 22:20:42 dawes Exp $ */
/* GJA -- span move routines */
@@ -101,33 +101,23 @@ static unsigned char rmasktab[] = {
}
static void aligned_blit(
-#if NeedFunctionPrototypes
WindowPtr, int, int, int, int, int, int, int, int
-#endif
);
static void aligned_blit_center(
-#if NeedFunctionPrototypes
WindowPtr, int, int, int, int, int, int
-#endif
);
static void shift(
-#if NeedFunctionPrototypes
WindowPtr, int, int, int, int, int, int, int
-#endif
);
static void shift_thin_rect(
-#if NeedFunctionPrototypes
WindowPtr, int, int, int, int, int, int, int
-#endif
);
static void shift_center(
-#if NeedFunctionPrototypes
WindowPtr, int, int, int, int, int, int, int
-#endif
);
void xf4bppBitBlt(pWin,alu,writeplanes,x0,y0,x1,y1,w,h)
@@ -535,13 +525,10 @@ int h;
int pad;
int htmp, wtmp; /* Temporaries for indices over height and width */
volatile unsigned char tmp; /* Temporary result of the shifts */
- int bs;
int bytecnt;
volatile unsigned char *sp, *dp;
- bs = (x1 - x0) & WMASK;
-
if ( l1 ) {
bytecnt = (w - (WORDSZ - l1) - r1) >> WSHIFT;
sp = SMEM( ((x0 + (WORDSZ - l1)) >> WSHIFT), y0);
diff --git a/hw/xfree86/xf4bpp/vgaImages.c b/hw/xfree86/xf4bpp/vgaImages.c
index 66c2c14e0..4357e4d8a 100644
--- a/hw/xfree86/xf4bpp/vgaImages.c
+++ b/hw/xfree86/xf4bpp/vgaImages.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/vgaImages.c,v 1.4 2002/01/25 21:56:22 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/vgaImages.c,v 1.5 2003/11/03 05:11:57 tsi Exp $ */
/*
* Copyright IBM Corporation 1987,1988,1989
*
@@ -117,10 +117,7 @@ register unsigned char tmp1;
default:
break ;
}
-#ifndef PC98_EGC
- if ( invert_existing_data )
- xf4bppFillSolid( pWin, VGA_ALLPLANES, GXinvert, planes, x, y, w, h ) ;
-#endif
+
#ifdef PC98_EGC
/* Setup EGC Registers */
switch(data_rotate_value) {
@@ -153,6 +150,8 @@ register unsigned char tmp1;
outw(EGC_FGC, 0x0000);
tmp1 = 0;
#else
+ if ( invert_existing_data )
+ xf4bppFillSolid( pWin, VGA_ALLPLANES, GXinvert, planes, x, y, w, h ) ;
/* Setup VGA Registers */
SetVideoSequencer( Mask_MapIndex, planes & VGA_ALLPLANES ) ;
/* Set Raster Op */
@@ -205,6 +204,7 @@ if ( invert_source_data )
SetVideoGraphics( Bit_MaskIndex, currMask ) ;
/* Read To Load vga Data Latches */
tmp = *( (VgaMemoryPtr) dst ) ;
+ (void) tmp;
*( (VgaMemoryPtr) dst ) = ~ *src ;
if ( currMask & RightmostBit ) {
currMask = LeftmostBit ;
@@ -256,6 +256,7 @@ else /* invert_source_data == FALSE */
SetVideoGraphics( Bit_MaskIndex, currMask ) ; /* GJA */
/* Read To Load vga Data Latches */
tmp = *( (VgaMemoryPtr) dst ) ;
+ (void) tmp;
*( (VgaMemoryPtr) dst ) = *src ;
if ( currMask & RightmostBit ) {
currMask = LeftmostBit ;
diff --git a/hw/xfree86/xf4bpp/vgaSolid.c b/hw/xfree86/xf4bpp/vgaSolid.c
index ceb39ef77..b3711f852 100644
--- a/hw/xfree86/xf4bpp/vgaSolid.c
+++ b/hw/xfree86/xf4bpp/vgaSolid.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/vgaSolid.c,v 1.5 2002/01/25 21:56:22 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/vgaSolid.c,v 1.6 2003/11/03 05:11:57 tsi Exp $ */
/*
* Copyright IBM Corporation 1987,1988,1989
*
@@ -117,7 +117,7 @@ register const unsigned int notZero = ((unsigned char)(~0x0));
register int tmp ;
#define SINGLE_STORE \
- tmp = *( (VgaMemoryPtr) destination ) ; \
+ tmp = *( (VgaMemoryPtr) destination ) ; (void)tmp; \
( *( (VgaMemoryPtr) destination ) = notZero ) ; \
destination++; stop_count-- ;
@@ -282,6 +282,7 @@ if ((tmp = x0 & 07)) {
for ( tmp = ly;
tmp-- ; ) {
tmp3 = *( (VgaMemoryPtr) dst ) ;
+ (void)tmp3;
*( (VgaMemoryPtr) dst ) = tmp2 ;
dst += BYTES_PER_LINE(pWin);
}
@@ -293,6 +294,7 @@ if ((tmp = x0 & 07)) {
for ( tmp = ly;
tmp-- ; ) {
tmp3 = *( (VgaMemoryPtr) dst ) ;
+ (void)tmp3;
*( (VgaMemoryPtr) dst ) = tmp2 ;
dst += BYTES_PER_LINE(pWin);
}
@@ -333,6 +335,7 @@ if ((tmp = BIT_OFFSET(lx))) { /* x0 Now Is Byte Aligned */
for ( tmp = ly;
tmp-- ; ) {
tmp3 = *( (VgaMemoryPtr) dst ) ;
+ (void)tmp3;
*( (VgaMemoryPtr) dst ) = tmp2 ;
dst += BYTES_PER_LINE(pWin);
}
@@ -344,6 +347,7 @@ if ((tmp = BIT_OFFSET(lx))) { /* x0 Now Is Byte Aligned */
for ( tmp = ly;
tmp-- ; ) {
tmp3 = *( (VgaMemoryPtr) dst ) ;
+ (void)tmp3;
*( (VgaMemoryPtr) dst ) = tmp2 ;
dst += BYTES_PER_LINE(pWin) ;
}
diff --git a/hw/xfree86/xf4bpp/vgaStipple.c b/hw/xfree86/xf4bpp/vgaStipple.c
index a4f3cef6b..f5ace74d0 100644
--- a/hw/xfree86/xf4bpp/vgaStipple.c
+++ b/hw/xfree86/xf4bpp/vgaStipple.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/vgaStipple.c,v 1.5 2002/01/25 21:56:22 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/vgaStipple.c,v 1.6 2003/11/03 05:11:57 tsi Exp $ */
/*
* Copyright IBM Corporation 1987,1988,1989
*
@@ -388,7 +388,9 @@ if ((byte_cnt = ROW_OFFSET(w))) { /* Fill The Center Of The Box */
tmp2-- ;
dst++ ) {
register unsigned bitPattern ;
+#ifndef PC98_EGC
register VideoAdapterObject tmp3 ;
+#endif
/*
* For Each Time Pattern Repeats In Y
*/
@@ -408,6 +410,7 @@ if ((byte_cnt = ROW_OFFSET(w))) { /* Fill The Center Of The Box */
#ifndef PC98_EGC
/* Read To Save */
tmp3 = *( (VgaMemoryPtr) xDst) ;
+ (void)tmp3;
#endif
/* Write Pattern */
*( (VgaMemoryPtr) xDst ) = bitPattern ;
diff --git a/hw/xfree86/xf4bpp/xf4bpp.h b/hw/xfree86/xf4bpp/xf4bpp.h
index f9141e5e1..59458a258 100644
--- a/hw/xfree86/xf4bpp/xf4bpp.h
+++ b/hw/xfree86/xf4bpp/xf4bpp.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/xf4bpp.h,v 1.8 2003/02/18 21:29:59 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/xf4bpp.h,v 1.10 2003/11/17 22:20:42 dawes Exp $ */
#ifndef __XF4BPP_H__
@@ -15,58 +15,45 @@
/* ppcArea.c */
void xf4bppFillArea(
-#if NeedFunctionPrototypes
WindowPtr,
int,
BoxPtr,
GCPtr
-#endif
);
/* ppcBStore.c */
void xf4bppSaveAreas(
-#if NeedFunctionPrototypes
PixmapPtr,
RegionPtr,
int,
int,
WindowPtr
-#endif
);
void xf4bppRestoreAreas(
-#if NeedFunctionPrototypes
PixmapPtr,
RegionPtr,
int,
int,
WindowPtr
-#endif
);
/* ppcClip.c */
void xf4bppDestroyClip(
-#if NeedFunctionPrototypes
GCPtr
-#endif
);
void xf4bppChangeClip(
-#if NeedFunctionPrototypes
GCPtr,
int,
pointer,
int
-#endif
);
void xf4bppCopyClip(
-#if NeedFunctionPrototypes
GCPtr,
GCPtr
-#endif
);
/* ppcCpArea.c */
RegionPtr xf4bppCopyArea(
-#if NeedFunctionPrototypes
DrawablePtr,
DrawablePtr,
GCPtr,
@@ -76,145 +63,115 @@ RegionPtr xf4bppCopyArea(
int,
int,
int
-#endif
);
/* ppcDepth.c */
Bool xf4bppDepthOK(
-#if NeedFunctionPrototypes
DrawablePtr,
int
-#endif
);
/* ppcFillRct.c */
void xf4bppPolyFillRect(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
xRectangle *
-#endif
);
/* ppcWindowFS.c */
void xf4bppSolidWindowFS(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
DDXPointPtr,
int *,
int
-#endif
);
void xf4bppStippleWindowFS(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
DDXPointPtr,
int *,
int
-#endif
);
void xf4bppOpStippleWindowFS(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
DDXPointPtr,
int *,
int
-#endif
);
void xf4bppTileWindowFS(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
DDXPointPtr,
int *,
int
-#endif
);
/* xf4bppPixmapFS.c */
void xf4bppSolidPixmapFS(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
DDXPointPtr,
int *,
int
-#endif
);
void xf4bppStipplePixmapFS(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
DDXPointPtr,
int *,
int
-#endif
);
void xf4bppOpStipplePixmapFS(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
DDXPointPtr,
int *,
int
-#endif
);
void xf4bppTilePixmapFS(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
DDXPointPtr,
int *,
int
-#endif
);
/* ppcGC.c */
Bool xf4bppCreateGC(
-#if NeedFunctionPrototypes
GCPtr
-#endif
);
void xf4bppDestroyGC(
-#if NeedFunctionPrototypes
GC *
-#endif
);
void xf4bppValidateGC(
-#if NeedFunctionPrototypes
GCPtr,
unsigned long,
DrawablePtr
-#endif
);
/* ppcGetSp.c */
void xf4bppGetSpans(
-#if NeedFunctionPrototypes
DrawablePtr,
int,
DDXPointPtr,
int *,
int,
char *
-#endif
);
/* ppcImg.c */
void xf4bppGetImage(
-#if NeedFunctionPrototypes
DrawablePtr,
int,
int,
@@ -223,110 +180,86 @@ void xf4bppGetImage(
unsigned int,
unsigned long,
char *
-#endif
);
/* ppcLine.c */
void xf4bppScrnZeroLine(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
int,
DDXPointPtr
-#endif
);
void xf4bppScrnZeroDash(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
int,
DDXPointPtr
-#endif
);
void xf4bppScrnZeroSegs(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
xSegment *
-#endif
);
/* ppcPixmap.c */
PixmapPtr xf4bppCreatePixmap(
-#if NeedFunctionPrototypes
ScreenPtr,
int,
int,
int
-#endif
);
PixmapPtr xf4bppCopyPixmap(
-#if NeedFunctionPrototypes
PixmapPtr
-#endif
);
/* ppcPntWin.c */
void xf4bppPaintWindow(
-#if NeedFunctionPrototypes
WindowPtr,
RegionPtr,
int
-#endif
);
/* ppcPolyPnt.c */
void xf4bppPolyPoint(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
int,
xPoint *
-#endif
);
/* ppcPolyRec.c */
void xf4bppPolyRectangle(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
xRectangle *
-#endif
);
/* ppcQuery.c */
void xf4bppQueryBestSize(
-#if NeedFunctionPrototypes
int,
unsigned short *,
unsigned short *,
ScreenPtr
-#endif
);
/* ppcRslvC.c */
void xf4bppResolveColor(
-#if NeedFunctionPrototypes
unsigned short *,
unsigned short *,
unsigned short *,
VisualPtr
-#endif
);
Bool xf4bppInitializeColormap(
-#if NeedFunctionPrototypes
ColormapPtr
-#endif
);
/* ppcSetSp.c */
void xf4bppSetSpans(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
char *,
@@ -334,45 +267,33 @@ void xf4bppSetSpans(
int *,
int,
int
-#endif
);
/* ppcWindow.c */
void xf4bppCopyWindow(
-#if NeedFunctionPrototypes
WindowPtr,
DDXPointRec,
RegionPtr
-#endif
);
Bool xf4bppPositionWindow(
-#if NeedFunctionPrototypes
WindowPtr,
int,
int
-#endif
);
Bool xf4bppUnrealizeWindow(
-#if NeedFunctionPrototypes
WindowPtr,
int,
int
-#endif
);
Bool xf4bppDestroyWindow(
-#if NeedFunctionPrototypes
WindowPtr
-#endif
);
Bool xf4bppCreateWindowForXYhardware(
-#if NeedFunctionPrototypes
WindowPtr
-#endif
);
/* emulOpStip.c */
void xf4bppOpaqueStipple(
-#if NeedFunctionPrototypes
WindowPtr,
PixmapPtr,
unsigned long int,
@@ -385,12 +306,10 @@ void xf4bppOpaqueStipple(
int,
int,
int
-#endif
);
/* emulRepAre.c */
void xf4bppReplicateArea(
-#if NeedFunctionPrototypes
WindowPtr,
int,
int,
@@ -399,12 +318,10 @@ void xf4bppReplicateArea(
int,
int,
int
-#endif
);
/* emulTile.c */
void xf4bppTileRect(
-#if NeedFunctionPrototypes
WindowPtr,
PixmapPtr,
const int,
@@ -415,20 +332,16 @@ void xf4bppTileRect(
int,
int,
int
-#endif
);
/* vgaGC.c */
Mask xf4bppChangeWindowGC(
-#if NeedFunctionPrototypes
GCPtr,
Mask
-#endif
);
/* vgaBitBlt.c */
void xf4bppBitBlt(
-#if NeedFunctionPrototypes
WindowPtr,
int,
int,
@@ -438,12 +351,10 @@ void xf4bppBitBlt(
int,
int,
int
-#endif
);
/* vgaImages.c */
void xf4bppDrawColorImage(
-#if NeedFunctionPrototypes
WindowPtr,
int,
int,
@@ -453,10 +364,8 @@ void xf4bppDrawColorImage(
int,
const int,
const unsigned long int
-#endif
);
void xf4bppReadColorImage(
-#if NeedFunctionPrototypes
WindowPtr,
int,
int,
@@ -464,12 +373,10 @@ void xf4bppReadColorImage(
int,
unsigned char *,
int
-#endif
);
/* vgaLine.c */
void xf4bppHorzLine(
-#if NeedFunctionPrototypes
WindowPtr,
unsigned long int,
int,
@@ -477,10 +384,8 @@ void xf4bppHorzLine(
int,
int,
int
-#endif
);
void xf4bppVertLine(
-#if NeedFunctionPrototypes
WindowPtr,
unsigned long int,
int,
@@ -488,10 +393,8 @@ void xf4bppVertLine(
int,
int,
int
-#endif
);
void xf4bppBresLine(
-#if NeedFunctionPrototypes
WindowPtr,
unsigned long int,
int,
@@ -505,12 +408,10 @@ void xf4bppBresLine(
int,
int,
unsigned long int
-#endif
);
/* vgaStipple.c */
void xf4bppFillStipple(
-#if NeedFunctionPrototypes
WindowPtr,
const PixmapPtr,
unsigned long int,
@@ -522,12 +423,10 @@ void xf4bppFillStipple(
int,
const int,
const int
-#endif
);
/* vgaSolid.c */
void xf4bppFillSolid(
-#if NeedFunctionPrototypes
WindowPtr,
unsigned long int,
const int,
@@ -536,12 +435,10 @@ void xf4bppFillSolid(
const int,
int,
const int
-#endif
);
/* offscreen.c */
void xf4bppOffBitBlt(
-#if NeedFunctionPrototypes
WindowPtr,
const int,
const int,
@@ -551,10 +448,8 @@ void xf4bppOffBitBlt(
int,
int,
int
-#endif
);
void xf4bppOffDrawColorImage(
-#if NeedFunctionPrototypes
WindowPtr,
int,
int,
@@ -564,10 +459,8 @@ void xf4bppOffDrawColorImage(
int,
const int,
const unsigned long int
-#endif
);
void xf4bppOffReadColorImage(
-#if NeedFunctionPrototypes
WindowPtr,
int,
int,
@@ -575,10 +468,8 @@ void xf4bppOffReadColorImage(
int,
unsigned char *,
int
-#endif
);
void xf4bppOffFillSolid(
-#if NeedFunctionPrototypes
WindowPtr,
unsigned long int,
const int,
@@ -587,10 +478,8 @@ void xf4bppOffFillSolid(
const int,
int,
const int
-#endif
);
void xf4bppOffDrawMonoImage(
-#if NeedFunctionPrototypes
WindowPtr,
unsigned char *,
int,
@@ -600,10 +489,8 @@ void xf4bppOffDrawMonoImage(
unsigned long int,
int,
unsigned long int
-#endif
);
void xf4bppOffFillStipple(
-#if NeedFunctionPrototypes
WindowPtr,
const PixmapPtr,
unsigned long int,
@@ -615,12 +502,10 @@ void xf4bppOffFillStipple(
int,
const int,
const int
-#endif
);
/* mfbimggblt.c */
void xf4bppImageGlyphBlt(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
@@ -628,24 +513,18 @@ void xf4bppImageGlyphBlt(
unsigned int,
CharInfoPtr *,
pointer
-#endif
);
/* wm3.c */
int wm3_set_regs(
-#if NeedFunctionPrototypes
GC *
-#endif
);
/* ppcIO.c */
-int xf4bppNeverCalled(
-#if NeedFunctionPrototypes
+void xf4bppNeverCalled(
void
-#endif
);
Bool xf4bppScreenInit(
-#if NeedFunctionPrototypes
ScreenPtr,
pointer,
int,
@@ -653,68 +532,54 @@ Bool xf4bppScreenInit(
int,
int,
int
-#endif
);
/* mfbfillarc.c */
void xf4bppPolyFillArc(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
xArc *
-#endif
);
/* mfbzerarc.c */
void xf4bppZeroPolyArc(
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
xArc *
-#endif
);
/* mfbline.c */
void xf4bppSegmentSS (
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
xSegment *
-#endif
);
void xf4bppLineSS (
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
int,
DDXPointPtr
-#endif
);
void xf4bppSegmentSD (
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
xSegment *
-#endif
);
void xf4bppLineSD (
-#if NeedFunctionPrototypes
DrawablePtr,
GCPtr,
int,
int,
DDXPointPtr
-#endif
);
/* mfbbres.c */
void xf4bppBresS(
-#if NeedFunctionPrototypes
PixelType *,
int,
int,
@@ -726,12 +591,10 @@ void xf4bppBresS(
int,
int,
int
-#endif
);
/* mfbbresd.c */
void xf4bppBresD(
-#if NeedFunctionPrototypes
DrawablePtr,
int, int,
int *,
@@ -743,60 +606,47 @@ void xf4bppBresD(
int, int, int, int, int, int,
int, int,
int, int
-#endif
);
/* mfbhrzvert.c */
void xf4bppHorzS(
-#if NeedFunctionPrototypes
PixelType *,
int,
int,
int,
int
-#endif
);
void xf4bppVertS(
-#if NeedFunctionPrototypes
PixelType *,
int,
int,
int,
int
-#endif
);
#ifdef PC98_EGC
/* egc_asm.s */
unsigned char getbits_x(
-#if NeedFunctionPrototypes
int,
unsigned int,
pointer,
unsigned int
-#endif
);
void wcopyr(
-#if NeedFunctionPrototypes
pointer,
pointer,
int,
pointer
-#endif
);
void wcopyl(
-#if NeedFunctionPrototypes
pointer,
pointer,
int,
pointer
-#endif
);
unsigned long int read8Z(
-#if NeedFunctionPrototypes
pointer
-#endif
);
#endif /* PC98_EGC */
diff --git a/hw/xfree86/xf8_16bpp/cfbwindow.c b/hw/xfree86/xf8_16bpp/cfbwindow.c
index 3ad8a5809..757b0dc49 100644
--- a/hw/xfree86/xf8_16bpp/cfbwindow.c
+++ b/hw/xfree86/xf8_16bpp/cfbwindow.c
@@ -4,7 +4,7 @@
Written by Mark Vojkovich (mvojkovi@ucsd.edu)
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_16bpp/cfbwindow.c,v 1.4 2003/02/17 16:08:30 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_16bpp/cfbwindow.c,v 1.5 2003/11/10 18:22:42 tsi Exp $ */
#include "X.h"
#include "scrnintstr.h"
@@ -70,7 +70,7 @@ cfb8_16CopyWindow(
int i, nbox, dx, dy;
WindowPtr pRoot = WindowTable[pScreen->myNum];
- REGION_INIT(pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pScreen, &rgnDst);
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
@@ -99,7 +99,7 @@ cfb8_16CopyWindow(
REGION_UNINIT(pScreen, &rgnDst);
if(pWin->drawable.depth == 8) {
- REGION_INIT(pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pScreen, &rgnDst);
miSegregateChildren(pWin, &rgnDst, pScrn->depth);
if(REGION_NOTEMPTY(pScreen, &rgnDst)) {
REGION_INTERSECT(pScreen, &rgnDst, &rgnDst, prgnSrc);
diff --git a/hw/xfree86/xf8_32bpp/cfb8_32.h b/hw/xfree86/xf8_32bpp/cfb8_32.h
index 733051ae0..30bc1a0fa 100644
--- a/hw/xfree86/xf8_32bpp/cfb8_32.h
+++ b/hw/xfree86/xf8_32bpp/cfb8_32.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfb8_32.h,v 1.5 2000/03/02 02:32:52 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfb8_32.h,v 1.6 2003/07/16 01:38:50 dawes Exp $ */
#ifndef _CFB8_32_H
#define _CFB8_32_H
@@ -57,8 +57,7 @@ cfbDoBitblt8To32(
int rop,
RegionPtr prgnDst,
DDXPointPtr pptSrc,
- unsigned long planemask,
- unsigned long bitPlane
+ unsigned long planemask
);
void
@@ -68,8 +67,7 @@ cfbDoBitblt32To8(
int rop,
RegionPtr prgnDst,
DDXPointPtr pptSrc,
- unsigned long planemask,
- unsigned long bitPlane
+ unsigned long planemask
);
@@ -177,8 +175,7 @@ cfbDoBitblt8To8GXcopy(
int rop,
RegionPtr prgnDst,
DDXPointPtr pptSrc,
- unsigned long pm,
- unsigned long bitPlane
+ unsigned long pm
);
void
@@ -188,8 +185,7 @@ cfbDoBitblt24To24GXcopy(
int rop,
RegionPtr prgnDst,
DDXPointPtr pptSrc,
- unsigned long pm,
- unsigned long bitPlane
+ unsigned long pm
);
Bool cfb8_32CreateWindow(WindowPtr pWin);
diff --git a/hw/xfree86/xf8_32bpp/cfbbstore.c b/hw/xfree86/xf8_32bpp/cfbbstore.c
index 919fabf5f..581efb4f6 100644
--- a/hw/xfree86/xf8_32bpp/cfbbstore.c
+++ b/hw/xfree86/xf8_32bpp/cfbbstore.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfbbstore.c,v 1.2 1999/01/31 12:22:17 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfbbstore.c,v 1.3 2003/07/16 01:38:50 dawes Exp $ */
#define PSZ 8
#include "cfb.h"
@@ -49,7 +49,7 @@ cfb8_32SaveAreas(
pScrPix = (PixmapPtr) pScreen->devPrivate;
cfbDoBitblt32To8((DrawablePtr) pScrPix, (DrawablePtr)pPixmap,
- GXcopy, prgnSave, pPtsInit, ~0L, 0);
+ GXcopy, prgnSave, pPtsInit, ~0L);
DEALLOCATE_LOCAL (pPtsInit);
}
@@ -95,7 +95,7 @@ cfb8_32RestoreAreas(
GXcopy, prgnRestore, pPtsInit, ~0);
} else {
cfbDoBitblt8To32((DrawablePtr)pPixmap, (DrawablePtr) pScrPix,
- GXcopy, prgnRestore, pPtsInit, ~0L, 0);
+ GXcopy, prgnRestore, pPtsInit, ~0L);
}
DEALLOCATE_LOCAL (pPtsInit);
diff --git a/hw/xfree86/xf8_32bpp/cfbcpyarea.c b/hw/xfree86/xf8_32bpp/cfbcpyarea.c
index 752e56db8..53af8f7d8 100644
--- a/hw/xfree86/xf8_32bpp/cfbcpyarea.c
+++ b/hw/xfree86/xf8_32bpp/cfbcpyarea.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfbcpyarea.c,v 1.5 2000/02/29 00:17:16 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfbcpyarea.c,v 1.6 2003/07/16 01:38:50 dawes Exp $ */
#include "X.h"
#include "Xmd.h"
@@ -67,8 +67,7 @@ cfbDoBitblt8To32(
int rop,
RegionPtr prgnDst,
DDXPointPtr pptSrc,
- unsigned long pm,
- unsigned long bitPlane
+ unsigned long pm
){
BoxPtr pbox = REGION_RECTS(prgnDst);
int nbox = REGION_NUM_RECTS(prgnDst);
@@ -184,8 +183,7 @@ cfbDoBitblt32To8(
int rop,
RegionPtr prgnDst,
DDXPointPtr pptSrc,
- unsigned long pm,
- unsigned long bitPlane
+ unsigned long pm
){
BoxPtr pbox = REGION_RECTS(prgnDst);
int nbox = REGION_NUM_RECTS(prgnDst);
@@ -394,7 +392,15 @@ cfb8_32DoBitBlt(
DrawablePtr pDst,
RegionPtr prgnDst,
DDXPointPtr pptSrc,
- void (*DoBlt)()
+ void (*DoBlt)(
+ unsigned char *SrcPtr,
+ int SrcPitch,
+ unsigned char *DstPtr,
+ int DstPitch,
+ int nbox,
+ DDXPointPtr pptSrc,
+ BoxPtr pbox,
+ int xdir, int ydir)
){
int nbox, careful, SrcPitch, DstPitch;
BoxPtr pbox, pboxTmp, pboxNext, pboxBase, pboxNew1, pboxNew2;
@@ -519,8 +525,7 @@ cfbDoBitblt8To8GXcopy(
int rop,
RegionPtr prgnDst,
DDXPointPtr pptSrc,
- unsigned long pm,
- unsigned long bitPlane
+ unsigned long pm
){
cfb8_32DoBitBlt(pSrc, pDst, prgnDst, pptSrc, Do8To8Blt);
}
@@ -533,8 +538,7 @@ cfbDoBitblt24To24GXcopy(
int rop,
RegionPtr prgnDst,
DDXPointPtr pptSrc,
- unsigned long pm,
- unsigned long bitPlane
+ unsigned long pm
){
cfb8_32DoBitBlt(pSrc, pDst, prgnDst, pptSrc, Do24To24Blt);
}
diff --git a/hw/xfree86/xf8_32bpp/cfbgcunder.c b/hw/xfree86/xf8_32bpp/cfbgcunder.c
index d263b8b9e..d01b2b5cb 100644
--- a/hw/xfree86/xf8_32bpp/cfbgcunder.c
+++ b/hw/xfree86/xf8_32bpp/cfbgcunder.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfbgcunder.c,v 1.5 2001/12/14 19:59:52 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfbgcunder.c,v 1.6 2003/07/16 01:38:50 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -66,6 +66,7 @@ SOFTWARE.
#include "cfbmskbits.h"
#include "cfb8bit.h"
+#include "cfb8_32.h"
#ifdef WriteBitGroup
# define useTEGlyphBlt cfbImageGlyphBlt8
@@ -217,9 +218,9 @@ static GCOps cfbNonTEOps = {
};
static GCOps *
-cfb32MatchCommon_Underlay (pGC, devPriv)
- GCPtr pGC;
- cfbPrivGCPtr devPriv;
+cfb32MatchCommon_Underlay(
+ GCPtr pGC,
+ cfbPrivGCPtr devPriv)
{
if (pGC->lineWidth != 0)
return 0;
diff --git a/hw/xfree86/xf8_32bpp/cfbimage.c b/hw/xfree86/xf8_32bpp/cfbimage.c
index 1e8550851..e737e025e 100644
--- a/hw/xfree86/xf8_32bpp/cfbimage.c
+++ b/hw/xfree86/xf8_32bpp/cfbimage.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfbimage.c,v 1.2 2000/02/25 00:21:40 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfbimage.c,v 1.3 2003/07/16 01:38:50 dawes Exp $ */
#include "X.h"
#include "windowstr.h"
@@ -63,7 +63,7 @@ cfb8_32GetImage (
box.y2 = h;
REGION_INIT(pScreen, &rgnDst, &box, 1);
cfbDoBitblt32To8(pDraw, (DrawablePtr)pPixmap, GXcopy, &rgnDst,
- &ptSrc, planemask, 0);
+ &ptSrc, planemask);
REGION_UNINIT(pScreen, &rgnDst);
FreeScratchPixmapHeader(pPixmap);
}
diff --git a/hw/xfree86/xf8_32bpp/cfbscrinit.c b/hw/xfree86/xf8_32bpp/cfbscrinit.c
index ce2b8ae8f..7f123d36a 100644
--- a/hw/xfree86/xf8_32bpp/cfbscrinit.c
+++ b/hw/xfree86/xf8_32bpp/cfbscrinit.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfbscrinit.c,v 1.11 2001/04/14 21:17:49 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfbscrinit.c,v 1.12 2003/07/16 01:38:50 dawes Exp $ */
#include "X.h"
@@ -76,6 +76,20 @@ cfb8_32AllocatePrivates(ScreenPtr pScreen)
return TRUE;
}
+static void DestroyColormapNoop(
+ ColormapPtr pColormap)
+{
+ /* NOOP */
+}
+
+static void StoreColorsNoop(
+ ColormapPtr pColormap,
+ int ndef,
+ xColorItem * pdef)
+{
+ /* NOOP */
+}
+
static Bool
cfb8_32SetupScreen(
ScreenPtr pScreen,
@@ -108,11 +122,11 @@ cfb8_32SetupScreen(
pScreen->UnrealizeFont = mfbUnrealizeFont;
pScreen->CreateGC = cfb8_32CreateGC;
pScreen->CreateColormap = miInitializeColormap;
- pScreen->DestroyColormap = (void (*)())NoopDDA;
+ pScreen->DestroyColormap = DestroyColormapNoop;
pScreen->InstallColormap = miInstallColormap;
pScreen->UninstallColormap = miUninstallColormap;
pScreen->ListInstalledColormaps = miListInstalledColormaps;
- pScreen->StoreColors = (void (*)())NoopDDA;
+ pScreen->StoreColors = StoreColorsNoop;
pScreen->ResolveColor = miResolveColor;
pScreen->BitmapToRegion = mfbPixmapToRegion;
diff --git a/hw/xfree86/xf8_32bpp/cfbwindow.c b/hw/xfree86/xf8_32bpp/cfbwindow.c
index 518166f41..c18b54399 100644
--- a/hw/xfree86/xf8_32bpp/cfbwindow.c
+++ b/hw/xfree86/xf8_32bpp/cfbwindow.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfbwindow.c,v 1.7 2003/02/17 16:08:30 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfbwindow.c,v 1.9 2003/11/10 18:22:43 tsi Exp $ */
#include "X.h"
@@ -67,7 +67,7 @@ cfb8_32CopyWindow(pWin, ptOldOrg, prgnSrc)
if(doUnderlay)
freeReg = miOverlayCollectUnderlayRegions(pWin, &borderClip);
- REGION_INIT(pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pScreen, &rgnDst);
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
@@ -92,10 +92,10 @@ cfb8_32CopyWindow(pWin, ptOldOrg, prgnSrc)
if(doUnderlay)
cfbDoBitblt24To24GXcopy((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot,
- GXcopy, &rgnDst, pptSrc, ~0, 0);
+ GXcopy, &rgnDst, pptSrc, ~0);
else
cfbDoBitblt8To8GXcopy((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot,
- GXcopy, &rgnDst, pptSrc, ~0, 0);
+ GXcopy, &rgnDst, pptSrc, ~0);
DEALLOCATE_LOCAL(pptSrc);
REGION_UNINIT(pScreen, &rgnDst);
diff --git a/hw/xfree86/xf8_32wid/cfbwindow.c b/hw/xfree86/xf8_32wid/cfbwindow.c
index 74db57649..b7ac739b3 100644
--- a/hw/xfree86/xf8_32wid/cfbwindow.c
+++ b/hw/xfree86/xf8_32wid/cfbwindow.c
@@ -7,7 +7,7 @@
Mark Vojkovich's work.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32wid/cfbwindow.c,v 1.2 2001/10/28 03:34:09 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32wid/cfbwindow.c,v 1.3 2003/11/10 18:22:43 tsi Exp $ */
#include "X.h"
#include "scrnintstr.h"
@@ -98,7 +98,7 @@ cfb8_32WidCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
BoxPtr pbox;
int i, nbox, dx, dy, other_bpp;
- REGION_INIT(pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pScreen, &rgnDst);
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
@@ -136,7 +136,7 @@ cfb8_32WidCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
else
other_bpp = 8;
- REGION_INIT(pScreen, &rgnOther, NullBox, 0);
+ REGION_NULL(pScreen, &rgnOther);
SegregateChildrenBpp(pWin, &rgnOther, 0,
other_bpp, pWin->drawable.bitsPerPixel);
pPixChildren = NULL;
@@ -162,7 +162,7 @@ cfb8_32WidCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
ppt->y = pbox->y1 + dy;
}
- REGION_INIT(pScreen, &rgnPixmap, NullBox, 0);
+ REGION_NULL(pScreen, &rgnPixmap);
REGION_COPY(pScreen, &rgnPixmap, &rgnOther);
REGION_TRANSLATE(pScreen, &rgnPixmap, -(rgnOther.extents.x1), -(rgnOther.extents.y1));
diff --git a/hw/xnest/Args.c b/hw/xnest/Args.c
index 197d6cbe1..488179d01 100644
--- a/hw/xnest/Args.c
+++ b/hw/xnest/Args.c
@@ -12,6 +12,8 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Args.c,v 1.2 2003/11/16 05:05:20 dawes Exp $ */
+
#include "X.h"
#include "Xproto.h"
#include "screenint.h"
@@ -45,10 +47,8 @@ int xnestNumScreens = 0;
Bool xnestDoDirectColormaps = False;
Window xnestParentWindow = 0;
-int ddxProcessArgument (argc, argv, i)
- int argc;
- char *argv[] ;
- int i;
+int
+ddxProcessArgument (int argc, char *argv[], int i)
{
if (!strcmp(argv[i], "-display")) {
if (++i < argc) {
diff --git a/hw/xnest/Args.h b/hw/xnest/Args.h
index 25e5cf8e8..dc2ac9de0 100644
--- a/hw/xnest/Args.h
+++ b/hw/xnest/Args.h
@@ -12,6 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Args.h,v 1.2 2003/11/16 05:05:20 dawes Exp $ */
#ifndef XNESTARGC_H
#define XNESTARGS_H
@@ -34,5 +35,6 @@ extern Bool xnestUserBorderWidth;
extern char *xnestWindowName;
extern int xnestNumScreens;
extern Bool xnestDoDirectColormaps;
+extern Window xnestParentWindow;
#endif /* XNESTARGS_H */
diff --git a/hw/xnest/Color.c b/hw/xnest/Color.c
index 61b560800..ae5ded5e3 100644
--- a/hw/xnest/Color.c
+++ b/hw/xnest/Color.c
@@ -12,6 +12,8 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Color.c,v 1.4 2003/11/16 05:05:20 dawes Exp $ */
+
#include "X.h"
#include "Xproto.h"
#include "scrnintstr.h"
@@ -32,8 +34,8 @@ is" without express or implied warranty.
static ColormapPtr InstalledMaps[MAXSCREENS];
-Bool xnestCreateColormap(pCmap)
- ColormapPtr pCmap;
+Bool
+xnestCreateColormap(ColormapPtr pCmap)
{
VisualPtr pVisual;
XColor *colors;
@@ -118,8 +120,8 @@ Bool xnestCreateColormap(pCmap)
return True;
}
-void xnestDestroyColormap (pCmap)
- ColormapPtr pCmap;
+void
+xnestDestroyColormap(ColormapPtr pCmap)
{
XFreeColormap(xnestDisplay, xnestColormap(pCmap));
xfree(pCmap->devPriv);
@@ -128,9 +130,8 @@ void xnestDestroyColormap (pCmap)
#define SEARCH_PREDICATE \
(xnestWindow(pWin) != None && wColormap(pWin) == icws->cmapIDs[i])
-static int xnestCountInstalledColormapWindows(pWin, ptr)
- WindowPtr pWin;
- pointer ptr;
+static int
+xnestCountInstalledColormapWindows(WindowPtr pWin, pointer ptr)
{
xnestInstalledColormapWindows *icws = (xnestInstalledColormapWindows *)ptr;
int i;
@@ -144,9 +145,8 @@ static int xnestCountInstalledColormapWindows(pWin, ptr)
return WT_WALKCHILDREN;
}
-static int xnestGetInstalledColormapWindows(pWin, ptr)
- WindowPtr pWin;
- pointer ptr;
+static int
+xnestGetInstalledColormapWindows(WindowPtr pWin, pointer ptr)
{
xnestInstalledColormapWindows *icws = (xnestInstalledColormapWindows *)ptr;
int i;
@@ -163,9 +163,8 @@ static int xnestGetInstalledColormapWindows(pWin, ptr)
static Window *xnestOldInstalledColormapWindows = NULL;
static int xnestNumOldInstalledColormapWindows = 0;
-static Bool xnestSameInstalledColormapWindows(windows, numWindows)
- Window *windows;
- int numWindows;
+static Bool
+xnestSameInstalledColormapWindows(Window *windows, int numWindows)
{
if (xnestNumOldInstalledColormapWindows != numWindows)
return False;
@@ -183,8 +182,8 @@ static Bool xnestSameInstalledColormapWindows(windows, numWindows)
return True;
}
-void xnestSetInstalledColormapWindows(pScreen)
- ScreenPtr pScreen;
+void
+xnestSetInstalledColormapWindows(ScreenPtr pScreen)
{
xnestInstalledColormapWindows icws;
int numWindows;
@@ -262,8 +261,8 @@ void xnestSetInstalledColormapWindows(pScreen)
if (icws.windows) xfree(icws.windows);
}
-void xnestSetScreenSaverColormapWindow(pScreen)
- ScreenPtr pScreen;
+void
+xnestSetScreenSaverColormapWindow(ScreenPtr pScreen)
{
if (xnestOldInstalledColormapWindows)
xfree(xnestOldInstalledColormapWindows);
@@ -288,8 +287,8 @@ void xnestSetScreenSaverColormapWindow(pScreen)
xnestDirectUninstallColormaps(pScreen);
}
-void xnestDirectInstallColormaps(pScreen)
- ScreenPtr pScreen;
+void
+xnestDirectInstallColormaps(ScreenPtr pScreen)
{
int i, n;
Colormap pCmapIDs[MAXCMAPS];
@@ -307,8 +306,8 @@ void xnestDirectInstallColormaps(pScreen)
}
}
-void xnestDirectUninstallColormaps(pScreen)
- ScreenPtr pScreen;
+void
+xnestDirectUninstallColormaps(ScreenPtr pScreen)
{
int i, n;
Colormap pCmapIDs[MAXCMAPS];
@@ -326,8 +325,8 @@ void xnestDirectUninstallColormaps(pScreen)
}
}
-void xnestInstallColormap(pCmap)
- ColormapPtr pCmap;
+void
+xnestInstallColormap(ColormapPtr pCmap)
{
int index;
ColormapPtr pOldCmap;
@@ -351,8 +350,8 @@ void xnestInstallColormap(pCmap)
}
}
-void xnestUninstallColormap(pCmap)
- ColormapPtr pCmap;
+void
+xnestUninstallColormap(ColormapPtr pCmap)
{
int index;
ColormapPtr pCurCmap;
@@ -373,9 +372,8 @@ void xnestUninstallColormap(pCmap)
static Bool xnestInstalledDefaultColormap = False;
-int xnestListInstalledColormaps(pScreen, pCmapIDs)
- ScreenPtr pScreen;
- Colormap *pCmapIDs;
+int
+xnestListInstalledColormaps(ScreenPtr pScreen, Colormap *pCmapIDs)
{
if (xnestInstalledDefaultColormap) {
*pCmapIDs = InstalledMaps[pScreen->myNum]->mid;
@@ -385,10 +383,8 @@ int xnestListInstalledColormaps(pScreen, pCmapIDs)
return 0;
}
-void xnestStoreColors(pCmap, nColors, pColors)
- ColormapPtr pCmap;
- int nColors;
- xColorItem *pColors;
+void
+xnestStoreColors(ColormapPtr pCmap, int nColors, xColorItem *pColors)
{
if (pCmap->pVisual->class & DynamicClass)
#ifdef _XSERVER64
@@ -413,11 +409,9 @@ void xnestStoreColors(pCmap, nColors, pColors)
#endif
}
-void xnestResolveColor(pRed, pGreen, pBlue, pVisual)
- unsigned short *pRed;
- unsigned short *pGreen;
- unsigned short *pBlue;
- VisualPtr pVisual;
+void
+xnestResolveColor(unsigned short *pRed, unsigned short *pGreen,
+ unsigned short *pBlue, VisualPtr pVisual)
{
int shift;
unsigned int lim;
@@ -465,8 +459,8 @@ void xnestResolveColor(pRed, pGreen, pBlue, pVisual)
}
}
-Bool xnestCreateDefaultColormap(pScreen)
- ScreenPtr pScreen;
+Bool
+xnestCreateDefaultColormap(ScreenPtr pScreen)
{
VisualPtr pVisual;
ColormapPtr pCmap;
diff --git a/hw/xnest/Color.h b/hw/xnest/Color.h
index 6ba6cd97a..0b3c22581 100644
--- a/hw/xnest/Color.h
+++ b/hw/xnest/Color.h
@@ -12,6 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Color.h,v 1.2 2003/11/16 05:05:20 dawes Exp $ */
#ifndef XNESTCOLOR_H
#define XNESTCOLOR_H
@@ -40,17 +41,18 @@ typedef struct {
#define xnestPixel(pixel) (pixel)
-Bool xnestCreateColormap();
-void xnestDestroyColormap ();
-void xnestSetInstalledColormapWindows();
-void xnestSetScreenSaverColormapWindow();
-void xnestDirectInstallColormaps();
-void xnestDirectUninstallColormaps();
-void xnestInstallColormap();
-void xnestUninstallColormap();
-int xnestListInstalledColormaps();
-void xnestStoreColors();
-void xnestResolveColor();
-Bool xnestCreateDefaultColormap();
+Bool xnestCreateColormap(ColormapPtr pCmap);
+void xnestDestroyColormap(ColormapPtr pCmap);
+void xnestSetInstalledColormapWindows(ScreenPtr pScreen);
+void xnestSetScreenSaverColormapWindow(ScreenPtr pScreen);
+void xnestDirectInstallColormaps(ScreenPtr pScreen);
+void xnestDirectUninstallColormaps(ScreenPtr pScreen);
+void xnestInstallColormap(ColormapPtr pCmap);
+void xnestUninstallColormap(ColormapPtr pCmap);
+int xnestListInstalledColormaps(ScreenPtr pScreen, Colormap *pCmapIDs);
+void xnestStoreColors(ColormapPtr pCmap, int nColors, xColorItem *pColors);
+void xnestResolveColor(unsigned short *pRed, unsigned short *pGreen,
+ unsigned short *pBlue, VisualPtr pVisual);
+Bool xnestCreateDefaultColormap(ScreenPtr pScreen);
#endif /* XNESTCOLOR_H */
diff --git a/hw/xnest/Cursor.c b/hw/xnest/Cursor.c
index c20ec940a..52ba867cf 100644
--- a/hw/xnest/Cursor.c
+++ b/hw/xnest/Cursor.c
@@ -12,7 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
-/* $XFree86: xc/programs/Xserver/hw/xnest/Cursor.c,v 1.3 2002/11/23 19:27:50 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xnest/Cursor.c,v 1.4 2003/11/16 05:05:20 dawes Exp $ */
#include "X.h"
#include "Xproto.h"
@@ -33,9 +33,8 @@ is" without express or implied warranty.
#include "Keyboard.h"
#include "Args.h"
-void xnestConstrainCursor(pScreen, pBox)
- ScreenPtr pScreen;
- BoxPtr pBox;
+void
+xnestConstrainCursor(ScreenPtr pScreen, BoxPtr pBox)
{
#ifdef _XSERVER64
Window64 wroot;
@@ -71,18 +70,15 @@ void xnestConstrainCursor(pScreen, pBox)
}
}
-void xnestCursorLimits(pScreen, pCursor, pHotBox, pTopLeftBox)
- ScreenPtr pScreen;
- CursorPtr pCursor;
- BoxPtr pHotBox;
- BoxPtr pTopLeftBox;
+void
+xnestCursorLimits(ScreenPtr pScreen, CursorPtr pCursor, BoxPtr pHotBox,
+ BoxPtr pTopLeftBox)
{
*pTopLeftBox = *pHotBox;
}
-Bool xnestDisplayCursor(pScreen, pCursor)
- ScreenPtr pScreen;
- CursorPtr pCursor;
+Bool
+xnestDisplayCursor(ScreenPtr pScreen, CursorPtr pCursor)
{
XDefineCursor(xnestDisplay,
xnestDefaultWindows[pScreen->myNum],
@@ -90,9 +86,8 @@ Bool xnestDisplayCursor(pScreen, pCursor)
return True;
}
-Bool xnestRealizeCursor(pScreen, pCursor)
- ScreenPtr pScreen;
- CursorPtr pCursor;
+Bool
+xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
{
XImage *ximage;
Pixmap source, mask;
@@ -171,19 +166,16 @@ Bool xnestRealizeCursor(pScreen, pCursor)
return True;
}
-Bool xnestUnrealizeCursor(pScreen, pCursor)
- ScreenPtr pScreen;
- CursorPtr pCursor;
+Bool
+xnestUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
{
XFreeCursor(xnestDisplay, xnestCursor(pCursor, pScreen));
xfree(xnestCursorPriv(pCursor, pScreen));
return True;
}
-void xnestRecolorCursor(pScreen, pCursor, displayed)
- ScreenPtr pScreen;
- CursorPtr pCursor;
- Bool displayed;
+void
+xnestRecolorCursor(ScreenPtr pScreen, CursorPtr pCursor, Bool displayed)
{
XColor fg_color, bg_color;
@@ -200,10 +192,8 @@ void xnestRecolorCursor(pScreen, pCursor, displayed)
&fg_color, &bg_color);
}
-Bool xnestSetCursorPosition(pScreen, x, y, generateEvent)
- ScreenPtr pScreen;
- int x, y;
- Bool generateEvent;
+Bool
+xnestSetCursorPosition(ScreenPtr pScreen, int x, int y, Bool generateEvent)
{
int i;
diff --git a/hw/xnest/Display.c b/hw/xnest/Display.c
index d8cefcc6f..1a8703063 100644
--- a/hw/xnest/Display.c
+++ b/hw/xnest/Display.c
@@ -12,7 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
-/* $XFree86: xc/programs/Xserver/hw/xnest/Display.c,v 3.4 2001/10/28 03:34:10 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xnest/Display.c,v 3.5 2003/11/16 05:05:20 dawes Exp $ */
#include <X11/X.h>
@@ -51,14 +51,12 @@ XlibGC xnestBitmapGC;
Window xnestConfineWindow;
unsigned long xnestEventMask;
-void xnestOpenDisplay(argc, argv)
- int argc;
- char *argv[];
+void
+xnestOpenDisplay(int argc, char *argv[])
{
XVisualInfo vi;
long mask;
int i, j;
- extern Window xnestParentWindow;
if (!xnestDoFullGeneration) return;
@@ -183,7 +181,8 @@ void xnestOpenDisplay(argc, argv)
DefaultScreen(xnestDisplay)));
}
-void xnestCloseDisplay()
+void
+xnestCloseDisplay()
{
if (!xnestDoFullGeneration || !xnestDisplay) return;
diff --git a/hw/xnest/Display.h b/hw/xnest/Display.h
index 14ed0bb0a..044f8f131 100644
--- a/hw/xnest/Display.h
+++ b/hw/xnest/Display.h
@@ -12,7 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
-/* $XFree86: xc/programs/Xserver/hw/xnest/Display.h,v 1.6 2001/01/17 22:36:55 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xnest/Display.h,v 1.7 2003/11/16 05:05:20 dawes Exp $ */
#ifndef XNESTCOMMON_H
#define XNESTCOMMON_H
@@ -41,7 +41,7 @@ extern XlibGC xnestBitmapGC;
extern Window xnestConfineWindow;
extern unsigned long xnestEventMask;
-void xnestOpenDisplay();
-void xnestCloseDisplay();
+void xnestOpenDisplay(int argc, char *argv[]);
+void xnestCloseDisplay(void);
#endif /* XNESTCOMMON_H */
diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c
index 729296f22..1b7b3935f 100644
--- a/hw/xnest/Events.c
+++ b/hw/xnest/Events.c
@@ -12,7 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
-/* $XFree86: xc/programs/Xserver/hw/xnest/Events.c,v 1.2 2001/08/01 00:44:57 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xnest/Events.c,v 1.3 2003/11/16 05:05:20 dawes Exp $ */
#include "X.h"
#define NEED_EVENTS
@@ -28,6 +28,7 @@ is" without express or implied warranty.
#include "Xnest.h"
+#include "Args.h"
#include "Color.h"
#include "Display.h"
#include "Screen.h"
@@ -36,40 +37,40 @@ is" without express or implied warranty.
CARD32 lastEventTime = 0;
-void ProcessInputEvents()
+void
+ProcessInputEvents()
{
mieqProcessInputEvents();
}
-int TimeSinceLastInputEvent()
+int
+TimeSinceLastInputEvent()
{
if (lastEventTime == 0)
lastEventTime = GetTimeInMillis();
return GetTimeInMillis() - lastEventTime;
}
-void SetTimeSinceLastInputEvent()
+void
+SetTimeSinceLastInputEvent()
{
lastEventTime = GetTimeInMillis();
}
-static Bool xnestExposurePredicate(display, event, args)
- Display *display;
- XEvent *event;
- char *args;
+static Bool
+xnestExposurePredicate(Display *display, XEvent *event, char *args)
{
return (event->type == Expose || event->type == ProcessedExpose);
}
-static Bool xnestNotExposurePredicate(display, event, args)
- Display *display;
- XEvent *event;
- char *args;
+static Bool
+xnestNotExposurePredicate(Display *display, XEvent *event, char *args)
{
return !xnestExposurePredicate(display, event, args);
}
-void xnestCollectExposures()
+void
+xnestCollectExposures()
{
XEvent X;
WindowPtr pWin;
@@ -92,12 +93,12 @@ void xnestCollectExposures()
}
}
-void xnestCollectEvents()
+void
+xnestCollectEvents()
{
XEvent X;
xEvent x;
ScreenPtr pScreen;
- extern Window xnestParentWindow;
while (XCheckIfEvent(xnestDisplay, &X, xnestNotExposurePredicate, NULL)) {
switch (X.type) {
diff --git a/hw/xnest/Events.h b/hw/xnest/Events.h
index dfb44acf5..ed0fbb830 100644
--- a/hw/xnest/Events.h
+++ b/hw/xnest/Events.h
@@ -12,6 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Events.h,v 1.2 2003/11/16 05:05:20 dawes Exp $ */
#ifndef XNESTEVENTS_H
#define XNESTEVENTS_H
@@ -22,7 +23,8 @@ is" without express or implied warranty.
extern CARD32 lastEventTime;
-void xnestCollectExposures();
-void xnestCollectEvents();
+void SetTimeSinceLastInputEvent(void);
+void xnestCollectExposures(void);
+void xnestCollectEvents(void);
#endif /* XNESTEVENTS_H */
diff --git a/hw/xnest/Font.c b/hw/xnest/Font.c
index b30cf45bf..f70848854 100644
--- a/hw/xnest/Font.c
+++ b/hw/xnest/Font.c
@@ -12,13 +12,13 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
-/* $XFree86: xc/programs/Xserver/hw/xnest/Font.c,v 3.5 2001/01/17 22:36:55 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xnest/Font.c,v 3.7 2003/11/16 05:05:20 dawes Exp $ */
#include "X.h"
#include "Xatom.h"
#include "Xproto.h"
#include "misc.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "font.h"
#include "fontstruct.h"
#include "scrnintstr.h"
@@ -30,9 +30,8 @@ is" without express or implied warranty.
int xnestFontPrivateIndex;
-Bool xnestRealizeFont(pScreen, pFont)
- ScreenPtr pScreen;
- FontPtr pFont;
+Bool
+xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont)
{
pointer priv;
Atom name_atom, value_atom;
@@ -75,9 +74,8 @@ Bool xnestRealizeFont(pScreen, pFont)
}
-Bool xnestUnrealizeFont(pScreen, pFont)
- ScreenPtr pScreen;
- FontPtr pFont;
+Bool
+xnestUnrealizeFont(ScreenPtr pScreen, FontPtr pFont)
{
if (xnestFontPriv(pFont)) {
if (xnestFontStruct(pFont))
diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c
index 0816957de..972849d9a 100644
--- a/hw/xnest/GC.c
+++ b/hw/xnest/GC.c
@@ -12,7 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
-/* $XFree86: xc/programs/Xserver/hw/xnest/GC.c,v 3.6 2001/10/28 03:34:11 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xnest/GC.c,v 3.7 2003/11/16 05:05:20 dawes Exp $ */
#include "X.h"
#include "Xproto.h"
@@ -68,8 +68,8 @@ static GCOps xnestOps = {
xnestPushPixels
};
-Bool xnestCreateGC(pGC)
- GCPtr pGC;
+Bool
+xnestCreateGC(GCPtr pGC)
{
pGC->clientClipType = CT_NONE;
pGC->clientClip = NULL;
@@ -87,18 +87,15 @@ Bool xnestCreateGC(pGC)
return True;
}
-void xnestValidateGC(pGC, changes, pDrawable)
- GCPtr pGC;
- unsigned long changes;
- DrawablePtr pDrawable;
+void
+xnestValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
{
pGC->lastWinOrg.x = pDrawable->x;
pGC->lastWinOrg.y = pDrawable->y;
}
-void xnestChangeGC(pGC, mask)
- GC *pGC;
- unsigned long mask;
+void
+xnestChangeGC(GCPtr pGC, unsigned long mask)
{
XGCValues values;
@@ -182,25 +179,20 @@ void xnestChangeGC(pGC, mask)
XChangeGC(xnestDisplay, xnestGC(pGC), mask, &values);
}
-void xnestCopyGC(pGCSrc, mask, pGCDst)
- GCPtr pGCSrc;
- unsigned long mask;
- GCPtr pGCDst;
+void
+xnestCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst)
{
XCopyGC(xnestDisplay, xnestGC(pGCSrc), mask, xnestGC(pGCDst));
}
-void xnestDestroyGC(pGC)
- GC *pGC;
+void
+xnestDestroyGC(GCPtr pGC)
{
XFreeGC(xnestDisplay, xnestGC(pGC));
}
-void xnestChangeClip(pGC, type, pValue, nRects)
- GCPtr pGC;
- int type;
- pointer pValue;
- int nRects;
+void
+xnestChangeClip(GCPtr pGC, int type, pointer pValue, int nRects)
{
int i, size;
BoxPtr pBox;
@@ -296,8 +288,8 @@ void xnestChangeClip(pGC, type, pValue, nRects)
xnestGCPriv(pGC)->nClipRects = nRects;
}
-void xnestDestroyClip(pGC)
- GCPtr pGC;
+void
+xnestDestroyClip(GCPtr pGC)
{
xnestDestroyClipHelper(pGC);
@@ -308,8 +300,8 @@ void xnestDestroyClip(pGC)
xnestGCPriv(pGC)->nClipRects = 0;
}
-void xnestDestroyClipHelper(pGC)
- GCPtr pGC;
+void
+xnestDestroyClipHelper(GCPtr pGC)
{
switch (pGC->clientClipType)
{
@@ -323,9 +315,8 @@ void xnestDestroyClipHelper(pGC)
}
}
-void xnestCopyClip(pGCDst, pGCSrc)
- GCPtr pGCSrc;
- GCPtr pGCDst;
+void
+xnestCopyClip(GCPtr pGCDst, GCPtr pGCSrc)
{
RegionPtr pRgn;
diff --git a/hw/xnest/GCOps.c b/hw/xnest/GCOps.c
index 3af24c35a..b43695c96 100644
--- a/hw/xnest/GCOps.c
+++ b/hw/xnest/GCOps.c
@@ -12,11 +12,11 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
-/* $XFree86: xc/programs/Xserver/hw/xnest/GCOps.c,v 3.4 2001/01/17 22:36:55 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xnest/GCOps.c,v 3.6 2003/11/16 05:05:20 dawes Exp $ */
#include "X.h"
#include "Xproto.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "fontstruct.h"
#include "gcstruct.h"
#include "scrnintstr.h"
@@ -35,45 +35,30 @@ is" without express or implied warranty.
#include "Drawable.h"
#include "Visual.h"
-void xnestFillSpans(pDrawable, pGC, nSpans, pPoints, pWidths, fSorted)
- DrawablePtr pDrawable;
- GCPtr pGC;
- int nSpans;
- xPoint *pPoints;
- int *pWidths;
- int fSorted;
+void
+xnestFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nSpans, xPoint *pPoints,
+ int *pWidths, int fSorted)
{
ErrorF("xnest warning: function xnestFillSpans not implemented\n");
}
-void xnestSetSpans(pDrawable, pGC, pSrc, pPoints, pWidths, nSpans, fSorted)
- DrawablePtr pDrawable;
- GCPtr pGC;
- unsigned char * pSrc;
- xPoint *pPoints;
- int *pWidths;
- int nSpans;
- int fSorted;
+void
+xnestSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *pSrc,
+ xPoint *pPoints, int *pWidths, int nSpans, int fSorted)
{
ErrorF("xnest warning: function xnestSetSpans not implemented\n");
}
-void xnestGetSpans(pDrawable, maxWidth, pPoints, pWidths, nSpans, pBuffer)
- DrawablePtr pDrawable;
- int maxWidth;
- xPoint *pPoints;
- int *pWidths;
- int nSpans;
- int *pBuffer;
+void
+xnestGetSpans(DrawablePtr pDrawable, int maxWidth, DDXPointPtr pPoints,
+ int *pWidths, int nSpans, char *pBuffer)
{
ErrorF("xnest warning: function xnestGetSpans not implemented\n");
}
-void xnestQueryBestSize(class, pWidth, pHeight, pScreen)
- int class;
- short *pWidth;
- short *pHeight;
- ScreenPtr pScreen;
+void
+xnestQueryBestSize(int class, unsigned short *pWidth, unsigned short *pHeight,
+ ScreenPtr pScreen)
{
unsigned int width, height;
@@ -88,13 +73,9 @@ void xnestQueryBestSize(class, pWidth, pHeight, pScreen)
*pHeight = height;
}
-void xnestPutImage(pDrawable, pGC, depth, x, y, w, h, leftPad, format, pImage)
- DrawablePtr pDrawable;
- GCPtr pGC;
- int depth, x, y, w, h;
- int leftPad;
- unsigned int format;
- unsigned char *pImage;
+void
+xnestPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
+ int w, int h, int leftPad, int format, char *pImage)
{
XImage *ximage;
@@ -111,12 +92,10 @@ void xnestPutImage(pDrawable, pGC, depth, x, y, w, h, leftPad, format, pImage)
}
}
-void xnestGetImage(pDrawable, x, y, w, h, format, planeMask, pImage)
- DrawablePtr pDrawable;
- int x, y, w, h;
- unsigned int format;
- unsigned long planeMask;
- unsigned char *pImage;
+void
+xnestGetImage(DrawablePtr pDrawable, int x, int y, int w, int h,
+ unsigned int format, unsigned long planeMask,
+ char *pImage)
{
XImage *ximage;
int length;
@@ -133,16 +112,14 @@ void xnestGetImage(pDrawable, x, y, w, h, format, planeMask, pImage)
}
}
-static Bool xnestBitBlitPredicate(display, event, args)
- Display *display;
- XEvent *event;
- char *args;
+static Bool
+xnestBitBlitPredicate(Display *display, XEvent *event, char *args)
{
return (event->type == GraphicsExpose || event->type == NoExpose);
}
-RegionPtr xnestBitBlitHelper(pGC)
- GC *pGC;
+static RegionPtr
+xnestBitBlitHelper(GCPtr pGC)
{
if (!pGC->graphicsExposures)
return NullRegion;
@@ -183,14 +160,10 @@ RegionPtr xnestBitBlitHelper(pGC)
}
}
-RegionPtr xnestCopyArea(pSrcDrawable, pDstDrawable,
- pGC, srcx, srcy, width, height, dstx, dsty)
- DrawablePtr pSrcDrawable;
- DrawablePtr pDstDrawable;
- GC *pGC;
- int srcx, srcy;
- int width, height;
- int dstx, dsty;
+RegionPtr
+xnestCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
+ GCPtr pGC, int srcx, int srcy, int width, int height,
+ int dstx, int dsty)
{
XCopyArea(xnestDisplay,
xnestDrawable(pSrcDrawable), xnestDrawable(pDstDrawable),
@@ -199,15 +172,10 @@ RegionPtr xnestCopyArea(pSrcDrawable, pDstDrawable,
return xnestBitBlitHelper(pGC);
}
-RegionPtr xnestCopyPlane(pSrcDrawable, pDstDrawable,
- pGC, srcx, srcy, width, height, dstx, dsty, plane)
- DrawablePtr pSrcDrawable;
- DrawablePtr pDstDrawable;
- GC *pGC;
- int srcx, srcy;
- int width, height;
- int dstx, dsty;
- unsigned long plane;
+RegionPtr
+xnestCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
+ GCPtr pGC, int srcx, int srcy, int width, int height,
+ int dstx, int dsty, unsigned long plane)
{
XCopyPlane(xnestDisplay,
xnestDrawable(pSrcDrawable), xnestDrawable(pDstDrawable),
@@ -216,96 +184,71 @@ RegionPtr xnestCopyPlane(pSrcDrawable, pDstDrawable,
return xnestBitBlitHelper(pGC);
}
-void xnestPolyPoint(pDrawable, pGC, mode, nPoints, pPoints)
- DrawablePtr pDrawable;
- GCPtr pGC;
- int mode;
- int nPoints;
- XPoint *pPoints;
+void
+xnestPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int nPoints,
+ DDXPointPtr pPoints)
{
XDrawPoints(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC),
- pPoints, nPoints, mode);
+ (XPoint *)pPoints, nPoints, mode);
}
-void xnestPolylines(pDrawable, pGC, mode, nPoints, pPoints)
- DrawablePtr pDrawable;
- GCPtr pGC;
- int mode;
- int nPoints;
- XPoint *pPoints;
+void
+xnestPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int nPoints,
+ DDXPointPtr pPoints)
{
XDrawLines(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC),
- pPoints, nPoints, mode);
+ (XPoint *)pPoints, nPoints, mode);
}
-void xnestPolySegment(pDrawable, pGC, nSegments, pSegments)
- DrawablePtr pDrawable;
- GCPtr pGC;
- int nSegments;
- XSegment *pSegments;
+void
+xnestPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nSegments,
+ xSegment *pSegments)
{
XDrawSegments(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC),
- pSegments, nSegments);
+ (XSegment *)pSegments, nSegments);
}
-void xnestPolyRectangle(pDrawable, pGC, nRectangles, pRectangles)
- DrawablePtr pDrawable;
- GCPtr pGC;
- int nRectangles;
- XRectangle *pRectangles;
+void
+xnestPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nRectangles,
+ xRectangle *pRectangles)
{
XDrawRectangles(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC),
- pRectangles, nRectangles);
+ (XRectangle *)pRectangles, nRectangles);
}
-void xnestPolyArc(pDrawable, pGC, nArcs, pArcs)
- DrawablePtr pDrawable;
- GCPtr pGC;
- int nArcs;
- XArc *pArcs;
+void
+xnestPolyArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs, xArc *pArcs)
{
XDrawArcs(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC),
- pArcs, nArcs);
+ (XArc *)pArcs, nArcs);
}
-void xnestFillPolygon(pDrawable, pGC, shape, mode, nPoints, pPoints)
- DrawablePtr pDrawable;
- GCPtr pGC;
- int shape;
- int mode;
- int nPoints;
- XPoint *pPoints;
+void
+xnestFillPolygon(DrawablePtr pDrawable, GCPtr pGC, int shape, int mode,
+ int nPoints, DDXPointPtr pPoints)
{
XFillPolygon(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC),
- pPoints, nPoints, shape, mode);
+ (XPoint *)pPoints, nPoints, shape, mode);
}
-void xnestPolyFillRect(pDrawable, pGC, nRectangles, pRectangles)
- DrawablePtr pDrawable;
- GCPtr pGC;
- int nRectangles;
- XRectangle *pRectangles;
+void
+xnestPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nRectangles,
+ xRectangle *pRectangles)
{
XFillRectangles(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC),
- pRectangles, nRectangles);
+ (XRectangle *)pRectangles, nRectangles);
}
-void xnestPolyFillArc(pDrawable, pGC, nArcs, pArcs)
- DrawablePtr pDrawable;
- GCPtr pGC;
- int nArcs;
- XArc *pArcs;
+void
+xnestPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs, xArc *pArcs)
{
XFillArcs(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC),
- pArcs, nArcs);
+ (XArc *)pArcs, nArcs);
}
-int xnestPolyText8(pDrawable, pGC, x, y, count, string)
- DrawablePtr pDrawable;
- GCPtr pGC;
- int x, y;
- int count;
- char *string;
+int
+xnestPolyText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count,
+ char *string)
{
int width;
@@ -317,73 +260,55 @@ int xnestPolyText8(pDrawable, pGC, x, y, count, string)
return width + x;
}
-int xnestPolyText16(pDrawable, pGC, x, y, count, string)
- DrawablePtr pDrawable;
- GCPtr pGC;
- int x, y;
- int count;
- XChar2b *string;
+int
+xnestPolyText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count,
+ unsigned short *string)
{
int width;
XDrawString16(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC),
- x, y, string, count);
+ x, y, (XChar2b *)string, count);
- width = XTextWidth16(xnestFontStruct(pGC->font), string, count);
+ width = XTextWidth16(xnestFontStruct(pGC->font), (XChar2b *)string, count);
return width + x;
}
-void xnestImageText8(pDrawable, pGC, x, y, count, string)
- DrawablePtr pDrawable;
- GCPtr pGC;
- int x, y;
- int count;
- char *string;
+void
+xnestImageText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count,
+ char *string)
{
XDrawImageString(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC),
x, y, string, count);
}
-void xnestImageText16(pDrawable, pGC, x, y, count, string)
- DrawablePtr pDrawable;
- GCPtr pGC;
- int x, y;
- int count;
- XChar2b *string;
+void
+xnestImageText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count,
+ unsigned short *string)
{
XDrawImageString16(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC),
- x, y, string, count);
+ x, y, (XChar2b *)string, count);
}
-void xnestImageGlyphBlt(pDrawable, pGC, x, y, nGlyphs, pCharInfo, pGlyphBase)
- DrawablePtr pDrawable;
- GC pGC;
- int x, y;
- int nGlyphs;
- CharInfoPtr pCharInfo;
- char pGlyphBase;
+void
+xnestImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
+ unsigned int nGlyphs, CharInfoPtr *pCharInfo,
+ pointer pGlyphBase)
{
ErrorF("xnest warning: function xnestImageGlyphBlt not implemented\n");
}
-void xnestPolyGlyphBlt(pDrawable, pGC, x, y, nGlyphs, pCharInfo, pGlyphBase)
- DrawablePtr pDrawable;
- GC pGC;
- int x, y;
- int nGlyphs;
- CharInfoPtr pCharInfo;
- char pGlyphBase;
+void
+xnestPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
+ unsigned int nGlyphs, CharInfoPtr *pCharInfo,
+ pointer pGlyphBase)
{
ErrorF("xnest warning: function xnestPolyGlyphBlt not implemented\n");
}
-void xnestPushPixels(pDrawable, pGC, pBitmap, width, height, x, y)
- DrawablePtr pDrawable;
- GC pGC;
- PixmapPtr pBitmap;
- int width, height;
- int x, y;
+void
+xnestPushPixels(GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDst,
+ int width, int height, int x, int y)
{
ErrorF("xnest warning: function xnestPushPixels not implemented\n");
}
diff --git a/hw/xnest/GCOps.h b/hw/xnest/GCOps.h
index 3d4f3d2d4..722dde470 100644
--- a/hw/xnest/GCOps.h
+++ b/hw/xnest/GCOps.h
@@ -12,32 +12,59 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/GCOps.h,v 1.2 2003/11/16 05:05:20 dawes Exp $ */
#ifndef XNESTGCOPS_H
#define XNESTGCOPS_H
-void xnestFillSpans();
-void xnestSetSpans();
-void xnestGetSpans();
-void xnestPutImage();
-void xnestGetImage();
-RegionPtr xnestCopyArea();
-RegionPtr xnestCopyPlane();
-void xnestQueryBestSize();
-void xnestPolyPoint();
-void xnestPolylines();
-void xnestPolySegment();
-void xnestPolyRectangle();
-void xnestPolyArc();
-void xnestFillPolygon();
-void xnestPolyFillRect();
-void xnestPolyFillArc();
-int xnestPolyText8();
-int xnestPolyText16();
-void xnestImageText8();
-void xnestImageText16();
-void xnestImageGlyphBlt();
-void xnestPolyGlyphBlt();
-void xnestPushPixels();
+void xnestFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nSpans,
+ xPoint *pPoints, int *pWidths, int fSorted);
+void xnestSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *pSrc,
+ xPoint *pPoints, int *pWidths, int nSpans, int fSorted);
+void xnestGetSpans(DrawablePtr pDrawable, int maxWidth, DDXPointPtr pPoints,
+ int *pWidths, int nSpans, char *pBuffer);
+void xnestQueryBestSize(int class, unsigned short *pWidth,
+ unsigned short *pHeight, ScreenPtr pScreen);
+void xnestPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
+ int w, int h, int leftPad, int format, char *pImage);
+void xnestGetImage(DrawablePtr pDrawable, int x, int y, int w, int h,
+ unsigned int format, unsigned long planeMask,
+ char *pImage);
+RegionPtr xnestCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
+ GCPtr pGC, int srcx, int srcy, int width, int height,
+ int dstx, int dsty);
+RegionPtr xnestCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
+ GCPtr pGC, int srcx, int srcy, int width, int height,
+ int dstx, int dsty, unsigned long plane);
+void xnestPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int nPoints,
+ DDXPointPtr pPoints);
+void xnestPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int nPoints,
+ DDXPointPtr pPoints);
+void xnestPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nSegments,
+ xSegment *pSegments);
+void xnestPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nRectangles,
+ xRectangle *pRectangles);
+void xnestPolyArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs, xArc *pArcs);
+void xnestFillPolygon(DrawablePtr pDrawable, GCPtr pGC, int shape, int mode,
+ int nPoints, DDXPointPtr pPoints);
+void xnestPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nRectangles,
+ xRectangle *pRectangles);
+void xnestPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs, xArc *pArcs);
+int xnestPolyText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count,
+ char *string);
+int xnestPolyText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count,
+ unsigned short *string);
+void xnestImageText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count,
+ char *string);
+void xnestImageText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count,
+ unsigned short *string);
+void xnestImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
+ unsigned int nGlyphs, CharInfoPtr *pCharInfo,
+ pointer pGlyphBase);
+void xnestPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
+ unsigned int nGlyphs, CharInfoPtr *pCharInfo,
+ pointer pGlyphBase);
+void xnestPushPixels(GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable,
+ int width, int height, int x, int y);
#endif /* XNESTGCOPS_H */
diff --git a/hw/xnest/GetTime.c b/hw/xnest/GetTime.c
index 5fdef2a12..3db9b8596 100644
--- a/hw/xnest/GetTime.c
+++ b/hw/xnest/GetTime.c
@@ -28,12 +28,14 @@ other dealings in this Software without prior written authorization
from the X Consortium.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/GetTime.c,v 1.2 2003/11/16 05:05:20 dawes Exp $ */
#include "Xos.h"
+#include "os.h"
#include <time.h>
-long
+CARD32
GetTimeInMillis()
{
struct timeval tp;
diff --git a/hw/xnest/Handlers.c b/hw/xnest/Handlers.c
index d65116b0d..693c7296b 100644
--- a/hw/xnest/Handlers.c
+++ b/hw/xnest/Handlers.c
@@ -12,7 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
-/* $XFree86: xc/programs/Xserver/hw/xnest/Handlers.c,v 1.2 2001/08/01 00:44:57 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xnest/Handlers.c,v 1.3 2003/11/16 05:05:20 dawes Exp $ */
#include "X.h"
#include "Xproto.h"
@@ -29,18 +29,15 @@ is" without express or implied warranty.
#include "Events.h"
#include "Handlers.h"
-void xnestBlockHandler(blockData, pTimeout, pReadMask)
- pointer blockData;
- pointer pTimeout;
- pointer pReadMask;
+void
+xnestBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadMask)
{
xnestCollectExposures();
XFlush(xnestDisplay);
}
-void xnestWakeupHandler(result, pReadMask)
- int result;
- pointer pReadMask;
+void
+xnestWakeupHandler(pointer blockData, int result, pointer pReadMask)
{
xnestCollectEvents();
}
diff --git a/hw/xnest/Handlers.h b/hw/xnest/Handlers.h
index b33e9890d..ae92352d1 100644
--- a/hw/xnest/Handlers.h
+++ b/hw/xnest/Handlers.h
@@ -12,11 +12,13 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Handlers.h,v 1.2 2003/11/16 05:05:20 dawes Exp $ */
#ifndef XNESTHANDLERS_H
#define XNESTHANDLERS_H
-void xnestBlockHandler();
-void xnestWakeupHandler();
+void xnestBlockHandler(pointer blockData, OSTimePtr pTimeout,
+ pointer pReadMask);
+void xnestWakeupHandler(pointer blockData, int result, pointer pReadMask);
#endif /* XNESTHANDLERS_H */
diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c
index 665aec182..6b3c4f19f 100644
--- a/hw/xnest/Init.c
+++ b/hw/xnest/Init.c
@@ -12,7 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
-/* $XFree86: xc/programs/Xserver/hw/xnest/Init.c,v 3.24 2003/01/15 02:34:14 torrey Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xnest/Init.c,v 3.25 2003/11/16 05:05:20 dawes Exp $ */
#include "X.h"
#include "Xproto.h"
@@ -37,13 +37,14 @@ is" without express or implied warranty.
#include "Drawable.h"
#include "XNGC.h"
#include "XNFont.h"
+#ifdef DPMSExtension
+#include "dpmsproc.h"
+#endif
Bool xnestDoFullGeneration = True;
-void InitOutput(screenInfo, argc, argv)
- ScreenInfo *screenInfo;
- int argc;
- char *argv[];
+void
+InitOutput(ScreenInfo *screenInfo, int argc, char *argv[])
{
int i, j;
@@ -83,9 +84,8 @@ void InitOutput(screenInfo, argc, argv)
xnestDoFullGeneration = xnestFullGeneration;
}
-void InitInput(argc, argv)
- int argc;
- char *argv[];
+void
+InitInput(int argc, char *argv[])
{
pointer ptr, kbd;
@@ -163,18 +163,19 @@ int SelectWaitTime = 10000; /* usec */
*
***************************************************************/
-void DPMSSet (level)
- int level;
+void
+DPMSSet(int level)
{
}
-int DPMSGet (level)
- int* level;
+int
+DPMSGet(int *level)
{
return -1;
}
-Bool DPMSSupported ()
+Bool
+DPMSSupported()
{
return FALSE;
}
diff --git a/hw/xnest/Keyboard.c b/hw/xnest/Keyboard.c
index 107caee90..eb9291878 100644
--- a/hw/xnest/Keyboard.c
+++ b/hw/xnest/Keyboard.c
@@ -12,7 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
-/* $XFree86: xc/programs/Xserver/hw/xnest/Keyboard.c,v 1.8 2001/10/28 03:34:11 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xnest/Keyboard.c,v 1.10 2003/11/16 05:05:20 dawes Exp $ */
#define NEED_EVENTS
#include "X.h"
@@ -36,31 +36,26 @@ is" without express or implied warranty.
#include <X11/extensions/XKBsrv.h>
#include <X11/extensions/XKBconfig.h>
-extern Bool XkbQueryExtension(
-#if NeedFunctionPrototypes
+extern Bool
+XkbQueryExtension(
Display * /* dpy */,
int * /* opcodeReturn */,
int * /* eventBaseReturn */,
int * /* errorBaseReturn */,
int * /* majorRtrn */,
int * /* minorRtrn */
-#endif
);
extern XkbDescPtr XkbGetKeyboard(
-#if NeedFunctionPrototypes
Display * /* dpy */,
unsigned int /* which */,
unsigned int /* deviceSpec */
-#endif
);
extern Status XkbGetControls(
-#if NeedFunctionPrototypes
Display * /* dpy */,
unsigned long /* which */,
XkbDescPtr /* desc */
-#endif
);
#ifndef XKB_BASE_DIRECTORY
@@ -85,21 +80,16 @@ extern Status XkbGetControls(
#define XKB_DFLT_KB_OPTIONS NULL
#endif
-extern Bool noXkbExtension;
#endif
-void xnestBell(volume, pDev, ctrl, cls)
- int volume;
- DeviceIntPtr pDev;
- pointer ctrl;
- int cls;
+void
+xnestBell(int volume, DeviceIntPtr pDev, pointer ctrl, int cls)
{
XBell(xnestDisplay, volume);
}
-void xnestChangeKeyboardControl(pDev, ctrl)
- DeviceIntPtr pDev;
- KeybdCtrl *ctrl;
+void
+xnestChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl)
{
#if 0
unsigned long value_mask;
@@ -136,10 +126,8 @@ void xnestChangeKeyboardControl(pDev, ctrl)
#endif
}
-int xnestKeyboardProc(pDev, onoff, argc, argv)
- DevicePtr pDev;
- int onoff, argc;
- char *argv[];
+int
+xnestKeyboardProc(DeviceIntPtr pDev, int onoff)
{
XModifierKeymap *modifier_keymap;
KeySym *keymap;
@@ -202,7 +190,7 @@ XkbError:
memmove((char *) defaultKeyboardControl.autoRepeats,
(char *) values.auto_repeats, sizeof(values.auto_repeats));
- InitKeyboardDeviceStruct(pDev, &keySyms, modmap,
+ InitKeyboardDeviceStruct(&pDev->public, &keySyms, modmap,
xnestBell, xnestChangeKeyboardControl);
#ifdef XKB
} else {
@@ -260,9 +248,9 @@ XkbError:
}
XkbSetRulesDflts(rules, model, layout, variants, options);
- XkbInitKeyboardDeviceStruct((pointer)pDev, &names, &keySyms, modmap,
+ XkbInitKeyboardDeviceStruct(pDev, &names, &keySyms, modmap,
xnestBell, xnestChangeKeyboardControl);
- XkbDDXChangeControls((pointer)pDev, xkb->ctrls, xkb->ctrls);
+ XkbDDXChangeControls(pDev, xkb->ctrls, xkb->ctrls);
XkbFreeKeyboard(xkb, 0, False);
}
#endif
@@ -288,9 +276,8 @@ XkbError:
return Success;
}
-Bool LegalModifier(key, pDev)
- unsigned int key;
- DevicePtr pDev;
+Bool
+LegalModifier(unsigned int key, DevicePtr pDev)
{
return TRUE;
}
diff --git a/hw/xnest/Keyboard.h b/hw/xnest/Keyboard.h
index 44feb300d..5f8dc3cb4 100644
--- a/hw/xnest/Keyboard.h
+++ b/hw/xnest/Keyboard.h
@@ -12,6 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Keyboard.h,v 1.2 2003/11/16 05:05:20 dawes Exp $ */
#ifndef XNESTKEYBOARD_H
#define XNESTKEYBOARD_H
@@ -19,8 +20,8 @@ is" without express or implied warranty.
#define XNEST_KEYBOARD_EVENT_MASK \
(KeyPressMask | KeyReleaseMask | FocusChangeMask | KeymapStateMask)
-void xnestBell();
-void xnestChangeKeyboardControl();
-int xnestKeyboardProc();
+void xnestBell(int volume, DeviceIntPtr pDev, pointer ctrl, int cls);
+void xnestChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl);
+int xnestKeyboardProc(DeviceIntPtr pDev, int onoff);
#endif /* XNESTKEYBOARD_H */
diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c
index f93dcac52..b82dfa49b 100644
--- a/hw/xnest/Pixmap.c
+++ b/hw/xnest/Pixmap.c
@@ -12,11 +12,11 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
-/* $XFree86: xc/programs/Xserver/hw/xnest/Pixmap.c,v 3.6 2003/01/10 13:29:40 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xnest/Pixmap.c,v 3.8 2003/11/16 05:05:20 dawes Exp $ */
#include "X.h"
#include "Xproto.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "pixmapstr.h"
#include "scrnintstr.h"
#include "regionstr.h"
@@ -34,11 +34,8 @@ is" without express or implied warranty.
int xnestPixmapPrivateIndex;
#endif
-PixmapPtr xnestCreatePixmap(pScreen, width, height, depth)
- ScreenPtr pScreen;
- int width;
- int height;
- int depth;
+PixmapPtr
+xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth)
{
PixmapPtr pPixmap;
@@ -75,8 +72,8 @@ PixmapPtr xnestCreatePixmap(pScreen, width, height, depth)
return pPixmap;
}
-Bool xnestDestroyPixmap(pPixmap)
- PixmapPtr pPixmap;
+Bool
+xnestDestroyPixmap(PixmapPtr pPixmap)
{
if(--pPixmap->refcnt)
return TRUE;
@@ -85,8 +82,8 @@ Bool xnestDestroyPixmap(pPixmap)
return TRUE;
}
-RegionPtr xnestPixmapToRegion(pPixmap)
- PixmapPtr pPixmap;
+RegionPtr
+xnestPixmapToRegion(PixmapPtr pPixmap)
{
XImage *ximage;
register RegionPtr pReg, pTmpReg;
diff --git a/hw/xnest/Pointer.c b/hw/xnest/Pointer.c
index 741989652..1af5f02ec 100644
--- a/hw/xnest/Pointer.c
+++ b/hw/xnest/Pointer.c
@@ -12,9 +12,12 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Pointer.c,v 1.2 2003/11/16 05:05:20 dawes Exp $ */
+
#include "X.h"
#include "Xproto.h"
#include "screenint.h"
+#include "inputstr.h"
#include "input.h"
#include "misc.h"
#include "scrnintstr.h"
@@ -28,18 +31,15 @@ is" without express or implied warranty.
#include "Pointer.h"
#include "Args.h"
-void xnestChangePointerControl(pDev, ctrl)
- DeviceIntPtr pDev;
- PtrCtrl *ctrl;
+void
+xnestChangePointerControl(DeviceIntPtr pDev, PtrCtrl *ctrl)
{
XChangePointerControl(xnestDisplay, True, True,
ctrl->num, ctrl->den, ctrl->threshold);
}
-int xnestPointerProc(pDev, onoff, argc, argv)
- DevicePtr pDev;
- int onoff, argc;
- char *argv[];
+int
+xnestPointerProc(DeviceIntPtr pDev, int onoff)
{
CARD8 map[MAXBUTTONS];
int nmap;
@@ -51,7 +51,7 @@ int xnestPointerProc(pDev, onoff, argc, argv)
nmap = XGetPointerMapping(xnestDisplay, map, MAXBUTTONS);
for (i = 0; i <= nmap; i++)
map[i] = i; /* buttons are already mapped */
- InitPointerDeviceStruct(pDev, map, nmap,
+ InitPointerDeviceStruct(&pDev->public, map, nmap,
miPointerGetMotionEvents,
xnestChangePointerControl,
miPointerGetMotionBufferSize());
diff --git a/hw/xnest/Pointer.h b/hw/xnest/Pointer.h
index 2fced12e2..0b06e5021 100644
--- a/hw/xnest/Pointer.h
+++ b/hw/xnest/Pointer.h
@@ -12,6 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Pointer.h,v 1.2 2003/11/16 05:05:20 dawes Exp $ */
#ifndef XNESTPOINTER_H
#define XNESTPOINTER_H
@@ -22,7 +23,7 @@ is" without express or implied warranty.
(ButtonPressMask | ButtonReleaseMask | PointerMotionMask | \
EnterWindowMask | LeaveWindowMask)
-void xnestChangePointerControl();
-int xnestPointerProc();
+void xnestChangePointerControl(DeviceIntPtr pDev, PtrCtrl *ctrl);
+int xnestPointerProc(DeviceIntPtr pDev, int onoff);
#endif /* XNESTPOINTER_H */
diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c
index bef6a75dd..686884555 100644
--- a/hw/xnest/Screen.c
+++ b/hw/xnest/Screen.c
@@ -12,7 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
-/* $XFree86: xc/programs/Xserver/hw/xnest/Screen.c,v 3.11 2003/01/10 13:29:40 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xnest/Screen.c,v 3.13 2003/11/16 05:05:20 dawes Exp $ */
#include "X.h"
#include "Xproto.h"
@@ -20,6 +20,7 @@ is" without express or implied warranty.
#include "dix.h"
#include "mi.h"
#include "mibstore.h"
+#include "micmap.h"
#include "colormapst.h"
#include "resource.h"
@@ -39,17 +40,19 @@ is" without express or implied warranty.
#include "mipointer.h"
#include "Args.h"
-extern Window xnestParentWindow;
-
Window xnestDefaultWindows[MAXSCREENS];
Window xnestScreenSaverWindows[MAXSCREENS];
+#ifdef GLXEXT
+extern void GlxWrapInitVisuals(miInitVisualsProcPtr *);
+#endif
+
#ifdef PIXPRIV
int xnestScreenGeneration = -1;
#endif
-ScreenPtr xnestScreen(window)
- Window window;
+ScreenPtr
+xnestScreen(Window window)
{
int i;
@@ -60,8 +63,8 @@ ScreenPtr xnestScreen(window)
return NULL;
}
-static int offset(mask)
- unsigned long mask;
+static int
+offset(unsigned long mask)
{
int count;
@@ -71,9 +74,8 @@ static int offset(mask)
return count;
}
-static Bool xnestSaveScreen(pScreen, what)
- ScreenPtr pScreen;
- int what;
+static Bool
+xnestSaveScreen(ScreenPtr pScreen, int what)
{
if (xnestSoftwareScreenSaver)
return False;
@@ -105,17 +107,13 @@ static Bool xnestSaveScreen(pScreen, what)
}
static Bool
-xnestCursorOffScreen (ppScreen, x, y)
- ScreenPtr *ppScreen;
- int *x, *y;
+xnestCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y)
{
return FALSE;
}
static void
-xnestCrossScreen (pScreen, entering)
- ScreenPtr pScreen;
- Bool entering;
+xnestCrossScreen(ScreenPtr pScreen, Bool entering)
{
}
@@ -126,11 +124,8 @@ static miPointerScreenFuncRec xnestPointerCursorFuncs =
miPointerWarpCursor
};
-Bool xnestOpenScreen(index, pScreen, argc, argv)
- int index;
- register ScreenPtr pScreen;
- int argc;
- char *argv[];
+Bool
+xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
{
VisualPtr visuals;
DepthPtr depths;
@@ -140,6 +135,8 @@ Bool xnestOpenScreen(index, pScreen, argc, argv)
XSetWindowAttributes attributes;
XWindowAttributes gattributes;
XSizeHints sizeHints;
+ VisualID defaultVisual;
+ int rootDepth;
if (!(AllocateWindowPrivate(pScreen, xnestWindowPrivateIndex,
sizeof(xnestPrivWin)) &&
@@ -168,7 +165,6 @@ Bool xnestOpenScreen(index, pScreen, argc, argv)
numDepths = 1;
for (i = 0; i < xnestNumVisuals; i++) {
- visuals[numVisuals].vid = FakeClientID(0);
visuals[numVisuals].class = xnestVisuals[i].class;
visuals[numVisuals].bitsPerRGBValue = xnestVisuals[i].bits_per_rgb;
visuals[numVisuals].ColormapEntries = xnestVisuals[i].colormap_size;
@@ -179,7 +175,26 @@ Bool xnestOpenScreen(index, pScreen, argc, argv)
visuals[numVisuals].offsetRed = offset(xnestVisuals[i].red_mask);
visuals[numVisuals].offsetGreen = offset(xnestVisuals[i].green_mask);
visuals[numVisuals].offsetBlue = offset(xnestVisuals[i].blue_mask);
-
+
+ /* Check for and remove duplicates. */
+ for (j = 0; j < numVisuals; j++) {
+ if (visuals[numVisuals].class == visuals[j].class &&
+ visuals[numVisuals].bitsPerRGBValue == visuals[j].bitsPerRGBValue &&
+ visuals[numVisuals].ColormapEntries == visuals[j].ColormapEntries &&
+ visuals[numVisuals].nplanes == visuals[j].nplanes &&
+ visuals[numVisuals].redMask == visuals[j].redMask &&
+ visuals[numVisuals].greenMask == visuals[j].greenMask &&
+ visuals[numVisuals].blueMask == visuals[j].blueMask &&
+ visuals[numVisuals].offsetRed == visuals[j].offsetRed &&
+ visuals[numVisuals].offsetGreen == visuals[j].offsetGreen &&
+ visuals[numVisuals].offsetBlue == visuals[j].offsetBlue)
+ break;
+ }
+ if (j < numVisuals)
+ break;
+
+ visuals[numVisuals].vid = FakeClientID(0);
+
depthIndex = UNDEFINED;
for (j = 0; j < numDepths; j++)
if (depths[j].depth == xnestVisuals[i].depth) {
@@ -204,6 +219,21 @@ Bool xnestOpenScreen(index, pScreen, argc, argv)
numVisuals++;
}
+ visuals = (VisualPtr)xrealloc(visuals, numVisuals * sizeof(VisualRec));
+
+ defaultVisual = visuals[xnestDefaultVisualIndex].vid;
+ rootDepth = visuals[xnestDefaultVisualIndex].nplanes;
+
+#ifdef GLXEXT
+ {
+ miInitVisualsProcPtr proc = NULL;
+
+ GlxWrapInitVisuals(&proc);
+ /* GlxInitVisuals ignores the last three arguments. */
+ proc(&visuals, &depths, &numVisuals, &numDepths,
+ &rootDepth, &defaultVisual, 0, 0, 0);
+ }
+#endif
if (xnestParentWindow != 0) {
XGetWindowAttributes(xnestDisplay, xnestParentWindow, &gattributes);
@@ -214,9 +244,9 @@ Bool xnestOpenScreen(index, pScreen, argc, argv)
/* myNum */
/* id */
miScreenInit(pScreen, NULL, xnestWidth, xnestHeight, 1, 1, xnestWidth,
- visuals[xnestDefaultVisualIndex].nplanes, /* rootDepth */
+ rootDepth,
numDepths, depths,
- visuals[xnestDefaultVisualIndex].vid, /* root visual */
+ defaultVisual, /* root visual */
numVisuals, visuals);
miInitializeBackingStore(pScreen);
@@ -257,8 +287,8 @@ Bool xnestOpenScreen(index, pScreen, argc, argv)
pScreen->SaveScreen = xnestSaveScreen;
pScreen->GetImage = xnestGetImage;
pScreen->GetSpans = xnestGetSpans;
- pScreen->PointerNonInterestBox = (void (*)()) 0;
- pScreen->SourceValidate = (void (*)()) 0;
+ pScreen->PointerNonInterestBox = NULL;
+ pScreen->SourceValidate = NULL;
/* Window Procedures */
@@ -268,7 +298,7 @@ Bool xnestOpenScreen(index, pScreen, argc, argv)
pScreen->ChangeWindowAttributes = xnestChangeWindowAttributes;
pScreen->RealizeWindow = xnestRealizeWindow;
pScreen->UnrealizeWindow = xnestUnrealizeWindow;
- pScreen->PostValidateTree = (void (*)()) 0;
+ pScreen->PostValidateTree = NULL;
pScreen->WindowExposures = xnestWindowExposures;
pScreen->PaintWindowBackground = xnestPaintWindowBackground;
pScreen->PaintWindowBorder = xnestPaintWindowBorder;
@@ -282,12 +312,12 @@ Bool xnestOpenScreen(index, pScreen, argc, argv)
/* Backing store procedures */
- pScreen->SaveDoomedAreas = (void (*)()) 0;
- pScreen->RestoreAreas = (RegionPtr (*)()) 0;
- pScreen->ExposeCopy = (void (*)()) 0;
- pScreen->TranslateBackingStore = (RegionPtr (*)()) 0;
- pScreen->ClearBackingStore = (RegionPtr (*)()) 0;
- pScreen->DrawGuarantee = (void (*)()) 0;
+ pScreen->SaveDoomedAreas = NULL;
+ pScreen->RestoreAreas = NULL;
+ pScreen->ExposeCopy = NULL;
+ pScreen->TranslateBackingStore = NULL;
+ pScreen->ClearBackingStore = NULL;
+ pScreen->DrawGuarantee = NULL;
/* Font procedures */
@@ -322,10 +352,10 @@ Bool xnestOpenScreen(index, pScreen, argc, argv)
/* OS layer procedures */
- pScreen->BlockHandler = (void (*)())NoopDDA;
- pScreen->WakeupHandler = (void (*)())NoopDDA;
- pScreen->blockData = (pointer)0;
- pScreen->wakeupData = (pointer)0;
+ pScreen->BlockHandler = (ScreenBlockHandlerProcPtr)NoopDDA;
+ pScreen->WakeupHandler = (ScreenWakeupHandlerProcPtr)NoopDDA;
+ pScreen->blockData = NULL;
+ pScreen->wakeupData = NULL;
if (!miScreenDevPrivateInit(pScreen, xnestWidth, NULL))
return FALSE;
@@ -397,9 +427,8 @@ Bool xnestOpenScreen(index, pScreen, argc, argv)
return True;
}
-Bool xnestCloseScreen(index, pScreen)
- int index;
- ScreenPtr pScreen;
+Bool
+xnestCloseScreen(int index, ScreenPtr pScreen)
{
int i;
diff --git a/hw/xnest/Screen.h b/hw/xnest/Screen.h
index 7c8115d8a..96260435b 100644
--- a/hw/xnest/Screen.h
+++ b/hw/xnest/Screen.h
@@ -12,6 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Screen.h,v 1.2 2003/11/16 05:05:20 dawes Exp $ */
#ifndef XNESTSCREEN_H
#define XNESTSCREEN_H
@@ -19,8 +20,8 @@ is" without express or implied warranty.
extern Window xnestDefaultWindows[MAXSCREENS];
extern Window xnestScreenSaverWindows[MAXSCREENS];
-ScreenPtr xnestScreen();
-Bool xnestOpenScreen();
-Bool xnestCloseScreen();
+ScreenPtr xnestScreen(Window window);
+Bool xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]);
+Bool xnestCloseScreen(int index, ScreenPtr pScreen);
#endif /* XNESTSCREEN_H */
diff --git a/hw/xnest/TestExt.c b/hw/xnest/TestExt.c
index 7f5a5907d..f153b5b2c 100644
--- a/hw/xnest/TestExt.c
+++ b/hw/xnest/TestExt.c
@@ -12,7 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
-/* $XFree86: xc/programs/Xserver/hw/xnest/TestExt.c,v 3.5 2001/08/27 17:41:00 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xnest/TestExt.c,v 3.6 2003/11/16 05:05:20 dawes Exp $ */
#include <X11/X.h>
#include <X11/Xproto.h>
@@ -26,12 +26,12 @@ is" without express or implied warranty.
#include "mipointer.h"
#define XTestSERVER_SIDE
#include "xtestext1.h"
+#include "xtest1dd.h"
extern CARD32 lastEventTime;
-void XTestGetPointerPos(fmousex, fmousey)
- short *fmousex;
- short *fmousey;
+void
+XTestGetPointerPos(short *fmousex, short *fmousey)
{
int x,y;
@@ -40,20 +40,15 @@ void XTestGetPointerPos(fmousex, fmousey)
*fmousey = y;
}
-void XTestJumpPointer(jx, jy, dev_type)
- int jx;
- int jy;
- int dev_type;
+void
+XTestJumpPointer(int jx, int jy, int dev_type)
{
miPointerAbsoluteCursor(jx, jy, GetTimeInMillis());
}
-void XTestGenerateEvent(dev_type, keycode, keystate, mousex, mousey)
- int dev_type;
- int keycode;
- int keystate;
- int mousex;
- int mousey;
+void
+XTestGenerateEvent(int dev_type, int keycode, int keystate, int mousex,
+ int mousey)
{
/*
xEvent tevent;
diff --git a/hw/xnest/Visual.c b/hw/xnest/Visual.c
index d512dba95..bcf7881eb 100644
--- a/hw/xnest/Visual.c
+++ b/hw/xnest/Visual.c
@@ -12,6 +12,8 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Visual.c,v 1.2 2003/11/16 05:05:20 dawes Exp $ */
+
#include "X.h"
#include "Xproto.h"
#include "scrnintstr.h"
@@ -23,8 +25,8 @@ is" without express or implied warranty.
#include "Display.h"
#include "Visual.h"
-Visual *xnestVisual(pVisual)
- VisualPtr pVisual;
+Visual *
+xnestVisual(VisualPtr pVisual)
{
int i;
@@ -41,9 +43,8 @@ Visual *xnestVisual(pVisual)
return NULL;
}
-Visual *xnestVisualFromID(pScreen, visual)
- ScreenPtr pScreen;
- VisualID visual;
+Visual *
+xnestVisualFromID(ScreenPtr pScreen, VisualID visual)
{
int i;
@@ -54,8 +55,8 @@ Visual *xnestVisualFromID(pScreen, visual)
return NULL;
}
-Colormap xnestDefaultVisualColormap(visual)
- Visual *visual;
+Colormap
+xnestDefaultVisualColormap(Visual *visual)
{
int i;
diff --git a/hw/xnest/Visual.h b/hw/xnest/Visual.h
index 818393178..14e0085dc 100644
--- a/hw/xnest/Visual.h
+++ b/hw/xnest/Visual.h
@@ -12,13 +12,14 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Visual.h,v 1.2 2003/11/16 05:05:20 dawes Exp $ */
#ifndef XNESTVISUAL_H
#define XNESTVISUAL_H
-Visual *xnestVisual();
-Visual *xnestVisualFromID();
-Colormap xnestDefaultVisualColormap();
+Visual *xnestVisual(VisualPtr pVisual);
+Visual *xnestVisualFromID(ScreenPtr pScreen, VisualID visual);
+Colormap xnestDefaultVisualColormap(Visual *visual);
#define xnestDefaultVisual(pScreen) \
xnestVisualFromID((pScreen), (pScreen)->rootVisual)
diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c
index a5dfc2de1..14ddac082 100644
--- a/hw/xnest/Window.c
+++ b/hw/xnest/Window.c
@@ -12,7 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
-/* $XFree86: xc/programs/Xserver/hw/xnest/Window.c,v 3.7 2001/10/28 03:34:11 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xnest/Window.c,v 3.8 2003/11/16 05:05:20 dawes Exp $ */
#include "X.h"
#include "Xproto.h"
@@ -39,9 +39,8 @@ is" without express or implied warranty.
int xnestWindowPrivateIndex;
-static int xnestFindWindowMatch(pWin, ptr)
- WindowPtr pWin;
- pointer ptr;
+static int
+xnestFindWindowMatch(WindowPtr pWin, pointer ptr)
{
xnestWindowMatch *wm = (xnestWindowMatch *)ptr;
if (wm->window == xnestWindow(pWin)) {
@@ -52,8 +51,8 @@ static int xnestFindWindowMatch(pWin, ptr)
return WT_WALKCHILDREN;
}
-WindowPtr xnestWindowPtr(window)
- Window window;
+WindowPtr
+xnestWindowPtr(Window window)
{
xnestWindowMatch wm;
int i;
@@ -69,8 +68,8 @@ WindowPtr xnestWindowPtr(window)
return wm.pWin;
}
-Bool xnestCreateWindow(pWin)
- WindowPtr pWin;
+Bool
+xnestCreateWindow(WindowPtr pWin)
{
unsigned long mask;
XSetWindowAttributes attributes;
@@ -143,8 +142,8 @@ Bool xnestCreateWindow(pWin)
return True;
}
-Bool xnestDestroyWindow(pWin)
- WindowPtr pWin;
+Bool
+xnestDestroyWindow(WindowPtr pWin)
{
if (pWin->nextSib)
xnestWindowPriv(pWin->nextSib)->sibling_above =
@@ -164,9 +163,8 @@ Bool xnestDestroyWindow(pWin)
return True;
}
-Bool xnestPositionWindow(pWin, x, y)
- WindowPtr pWin;
- int x, y;
+Bool
+xnestPositionWindow(WindowPtr pWin, int x, int y)
{
xnestConfigureWindow(pWin,
CWParent |
@@ -177,9 +175,8 @@ Bool xnestPositionWindow(pWin, x, y)
return True;
}
-void xnestConfigureWindow(pWin, mask)
- WindowPtr pWin;
- unsigned int mask;
+void
+xnestConfigureWindow(WindowPtr pWin, unsigned int mask)
{
unsigned int valuemask;
XWindowChanges values;
@@ -267,9 +264,8 @@ void xnestConfigureWindow(pWin, mask)
}
}
-Bool xnestChangeWindowAttributes(pWin, mask)
- WindowPtr pWin;
- unsigned long mask;
+Bool
+xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
{
XSetWindowAttributes attributes;
@@ -360,8 +356,8 @@ Bool xnestChangeWindowAttributes(pWin, mask)
return True;
}
-Bool xnestRealizeWindow(pWin)
- WindowPtr pWin;
+Bool
+xnestRealizeWindow(WindowPtr pWin)
{
xnestConfigureWindow(pWin, CWStackingOrder);
#ifdef SHAPE
@@ -372,18 +368,16 @@ Bool xnestRealizeWindow(pWin)
return True;
}
-Bool xnestUnrealizeWindow(pWin)
- WindowPtr pWin;
+Bool
+xnestUnrealizeWindow(WindowPtr pWin)
{
XUnmapWindow(xnestDisplay, xnestWindow(pWin));
return True;
}
-void xnestPaintWindowBackground(pWin, pRegion, what)
- WindowPtr pWin;
- RegionPtr pRegion;
- int what;
+void
+xnestPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what)
{
int i;
BoxPtr pBox;
@@ -400,24 +394,19 @@ void xnestPaintWindowBackground(pWin, pRegion, what)
False);
}
-void xnestPaintWindowBorder(pWin, pRegion, what)
- WindowPtr pWin;
- RegionPtr pRegion;
- int what;
+void
+xnestPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what)
{
xnestConfigureWindow(pWin, CWBorderWidth);
}
-void xnestCopyWindow(pWin, oldOrigin, oldRegion)
- WindowPtr pWin;
- xPoint oldOrigin;
- RegionPtr oldRegion;
+void
+xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion)
{
}
-void xnestClipNotify(pWin, dx, dy)
- WindowPtr pWin;
- int dx, dy;
+void
+xnestClipNotify(WindowPtr pWin, int dx, int dy)
{
xnestConfigureWindow(pWin, CWStackingOrder);
#ifdef SHAPE
@@ -425,17 +414,14 @@ void xnestClipNotify(pWin, dx, dy)
#endif /* SHAPE */
}
-static Bool xnestWindowExposurePredicate(display, event, ptr)
- Display *display;
- XEvent *event;
- XPointer ptr;
+static Bool
+xnestWindowExposurePredicate(Display *display, XEvent *event, XPointer ptr)
{
return (event->type == Expose && event->xexpose.window == *(Window *)ptr);
}
-void xnestWindowExposures(pWin, pRgn, other_exposed)
- WindowPtr pWin;
- RegionPtr pRgn, other_exposed;
+void
+xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed)
{
XEvent event;
Window window;
@@ -463,8 +449,8 @@ void xnestWindowExposures(pWin, pRgn, other_exposed)
}
#ifdef SHAPE
-static Bool xnestRegionEqual(pReg1, pReg2)
- RegionPtr pReg1, pReg2;
+static Bool
+xnestRegionEqual(RegionPtr pReg1, RegionPtr pReg2)
{
BoxPtr pBox1, pBox2;
unsigned int n1, n2;
@@ -488,8 +474,8 @@ static Bool xnestRegionEqual(pReg1, pReg2)
return True;
}
-void xnestShapeWindow(pWin)
- WindowPtr pWin;
+void
+xnestShapeWindow(WindowPtr pWin)
{
Region reg;
BoxPtr pBox;
diff --git a/hw/xnest/XNCursor.h b/hw/xnest/XNCursor.h
index 5bf362e77..7d9426d72 100644
--- a/hw/xnest/XNCursor.h
+++ b/hw/xnest/XNCursor.h
@@ -12,7 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
-/* $XFree86: xc/programs/Xserver/hw/xnest/XNCursor.h,v 1.2 2002/11/23 19:27:50 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xnest/XNCursor.h,v 1.3 2003/11/16 05:05:20 dawes Exp $ */
#ifndef XNESTCURSOR_H
#define XNESTCURSOR_H
@@ -27,12 +27,14 @@ typedef struct {
#define xnestCursor(pCursor, pScreen) \
(xnestCursorPriv(pCursor, pScreen)->cursor)
-void xnestConstrainCursor();
-void xnestCursorLimits();
-Bool xnestDisplayCursor();
-Bool xnestRealizeCursor();
-Bool xnestUnrealizeCursor();
-void xnestRecolorCursor();
-Bool xnestSetCursorPosition();
+void xnestConstrainCursor(ScreenPtr pScreen, BoxPtr pBox);
+void xnestCursorLimits(ScreenPtr pScreen, CursorPtr pCursor, BoxPtr pHotBox,
+ BoxPtr pTopLeftBox);
+Bool xnestDisplayCursor(ScreenPtr pScreen, CursorPtr pCursor);
+Bool xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor);
+Bool xnestUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor);
+void xnestRecolorCursor(ScreenPtr pScreen, CursorPtr pCursor, Bool displayed);
+Bool xnestSetCursorPosition(ScreenPtr pScreen, int x, int y,
+ Bool generateEvent);
#endif /* XNESTCURSOR_H */
diff --git a/hw/xnest/XNFont.h b/hw/xnest/XNFont.h
index 2885517ac..34d236f3b 100644
--- a/hw/xnest/XNFont.h
+++ b/hw/xnest/XNFont.h
@@ -12,6 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/XNFont.h,v 1.2 2003/11/16 05:05:20 dawes Exp $ */
#ifndef XNESTFONT_H
@@ -30,7 +31,7 @@ extern int xnestFontPrivateIndex;
#define xnestFont(pFont) (xnestFontStruct(pFont)->fid)
-Bool xnestRealizeFont();
-Bool xnestUnrealizeFont();
+Bool xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont);
+Bool xnestUnrealizeFont(ScreenPtr pScreen, FontPtr pFont);
#endif /* XNESTFONT_H */
diff --git a/hw/xnest/XNGC.h b/hw/xnest/XNGC.h
index fe2d77de3..bbec67120 100644
--- a/hw/xnest/XNGC.h
+++ b/hw/xnest/XNGC.h
@@ -12,6 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/XNGC.h,v 1.2 2003/11/16 05:05:20 dawes Exp $ */
#ifndef XNESTGC_H
#define XNESTGC_H
@@ -30,14 +31,14 @@ extern int xnestGCPrivateIndex;
#define xnestGC(pGC) (xnestGCPriv(pGC)->gc)
-Bool xnestCreateGC();
-void xnestValidateGC();
-void xnestChangeGC();
-void xnestCopyGC();
-void xnestDestroyGC();
-void xnestChangeClip();
-void xnestDestroyClip();
-void xnestDestroyClipHelper();
-void xnestCopyClip();
+Bool xnestCreateGC(GCPtr pGC);
+void xnestValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable);
+void xnestChangeGC(GCPtr pGC, unsigned long mask);
+void xnestCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst);
+void xnestDestroyGC(GCPtr pGC);
+void xnestChangeClip(GCPtr pGC, int type, pointer pValue, int nRects);
+void xnestDestroyClip(GCPtr pGC);
+void xnestDestroyClipHelper(GCPtr pGC);
+void xnestCopyClip(GCPtr pGCDst, GCPtr pGCSrc);
#endif /* XNESTGC_H */
diff --git a/hw/xnest/XNPixmap.h b/hw/xnest/XNPixmap.h
index 1657ae449..4e4d9c40c 100644
--- a/hw/xnest/XNPixmap.h
+++ b/hw/xnest/XNPixmap.h
@@ -12,7 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
-/* $XFree86: xc/programs/Xserver/hw/xnest/XNPixmap.h,v 1.3 2003/01/10 13:29:40 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xnest/XNPixmap.h,v 1.4 2003/11/16 05:05:20 dawes Exp $ */
#ifndef XNESTPIXMAP_H
#define XNESTPIXMAP_H
@@ -37,8 +37,9 @@ typedef struct {
#define xnestSharePixmap(pPixmap) ((pPixmap)->refcnt++)
-PixmapPtr xnestCreatePixmap();
-Bool xnestDestroyPixmap();
-RegionPtr xnestPixmapToRegion();
+PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height,
+ int depth);
+Bool xnestDestroyPixmap(PixmapPtr pPixmap);
+RegionPtr xnestPixmapToRegion(PixmapPtr pPixmap);
#endif /* XNESTPIXMAP_H */
diff --git a/hw/xnest/XNWindow.h b/hw/xnest/XNWindow.h
index 28d95941e..8b5f39115 100644
--- a/hw/xnest/XNWindow.h
+++ b/hw/xnest/XNWindow.h
@@ -12,6 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/XNWindow.h,v 1.4 2003/11/16 05:05:20 dawes Exp $ */
#ifndef XNESTWINDOW_H
#define XNESTWINDOW_H
@@ -57,23 +58,22 @@ extern int xnestWindowPrivateIndex;
#define CWParent CWSibling
#define CWStackingOrder CWStackMode
-extern WindowPtr *WindowTable;
-
-WindowPtr xnestWindowPtr();
-Bool xnestCreateWindow();
-Bool xnestDestroyWindow();
-Bool xnestPositionWindow();
-void xnestConfigureWindow();
-Bool xnestChangeWindowAttributes();
-Bool xnestRealizeWindow();
-Bool xnestUnrealizeWindow();
-void xnestPaintWindowBackground();
-void xnestPaintWindowBorder();
-void xnestCopyWindow();
-void xnestClipNotify();
-void xnestWindowExposures();
+WindowPtr xnestWindowPtr(Window window);
+Bool xnestCreateWindow(WindowPtr pWin);
+Bool xnestDestroyWindow(WindowPtr pWin);
+Bool xnestPositionWindow(WindowPtr pWin, int x, int y);
+void xnestConfigureWindow(WindowPtr pWin, unsigned int mask);
+Bool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
+Bool xnestRealizeWindow(WindowPtr pWin);
+Bool xnestUnrealizeWindow(WindowPtr pWin);
+void xnestPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what);
+void xnestPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what);
+void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion);
+void xnestClipNotify(WindowPtr pWin, int dx, int dy);
+void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn,
+ RegionPtr other_exposed);
#ifdef SHAPE
-void xnestShapeWindow();
+void xnestShapeWindow(WindowPtr pWin);
#endif /* SHAPE */
#endif /* XNESTWINDOW_H */
diff --git a/hw/xnest/Xnest.man.pre b/hw/xnest/Xnest.man.pre
index 474569a47..488489189 100644
--- a/hw/xnest/Xnest.man.pre
+++ b/hw/xnest/Xnest.man.pre
@@ -25,7 +25,7 @@
.\" other dealings in this Software without prior written authorization
.\" from the X Consortium.
.\"
-.\" $XFree86: xc/programs/Xserver/hw/xnest/Xnest.man,v 1.6 2001/01/27 18:21:00 dawes Exp $
+.\" $XFree86: xc/programs/Xserver/hw/xnest/Xnest.man,v 1.7 2003/10/24 17:22:33 dawes Exp $
.\"
.TH XNEST 1 __xorgversion__
.SH NAME
@@ -102,7 +102,7 @@ saver is software generated since \fIXnest\fP does not control any
actual hardware. However, it is treated as a hardware screen saver
within the sample server code.
.TP 4
-.B \-geometry \fIW+H+X+Y\fP
+.B \-geometry \fIWxH+X+Y\fP
This option specifies geometry parameters for the top level
\fIXnest\fP windows. These windows corresponds to the root windows of
the nested server. The width and height specified with this option
diff --git a/hw/xnest/os2Stub.c b/hw/xnest/os2Stub.c
index b770f546f..15282d206 100644
--- a/hw/xnest/os2Stub.c
+++ b/hw/xnest/os2Stub.c
@@ -26,7 +26,7 @@
*
*/
-/* $XFree86: xc/programs/Xserver/hw/xnest/os2Stub.c,v 3.1 2002/05/31 18:46:04 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xnest/os2Stub.c,v 3.2 2003/11/06 03:25:46 dawes Exp $ */
/* This below implements select() for calls in xnest. It has been */
/* somewhat optimized for improved performance, but assumes a few */
@@ -111,7 +111,7 @@ if(FirstTime){
}
rc = DosResetEventSem(hPipeSem, &postCount); */ /* Done in xtrans code for servers*/
-fprintf(stderr, "Client select() done first-time stuff, sem handle %d.\n",hPipeSem);
+ /*fprintf(stderr, "Client select() done first-time stuff, sem handle %d.\n",hPipeSem);*/
FirstTime = FALSE;
}
@@ -153,7 +153,7 @@ fprintf(stderr, "Client select() done first-time stuff, sem handle %d.\n",hPipeS
}
else if (np == -1) { return(-1); }
while(!any_ready){
- rc = DosWaitEventSem(hPipeSem, timeout_ms);
+ rc = DosWaitEventSem(hPipeSem, 1L);
/* if(rc) fprintf(stderr,"Sem-wait timeout, rc = %d\n",rc); */
if(rc == 640) {
return(0);
@@ -191,7 +191,8 @@ fprintf(stderr, "Client select() done first-time stuff, sem handle %d.\n",hPipeS
while (!any_ready && timeout_ms){
- rc = DosWaitEventSem(hPipeSem, 10L);
+ rc = DosWaitEventSem(hPipeSem, 1L);
+ if (rc==640) return(0);
if(rc == 0){
np = os2_check_pipes(&sd,readfds,writefds);
if(np > 0){
diff --git a/hw/xwin/InitInput.c b/hw/xwin/InitInput.c
index a9f69aad5..de84a7aee 100644
--- a/hw/xwin/InitInput.c
+++ b/hw/xwin/InitInput.c
@@ -26,9 +26,10 @@
from The Open Group.
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/InitInput.c,v 1.12 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/InitInput.c,v 1.13 2003/07/29 21:25:15 dawes Exp $ */
#include "win.h"
+#include "../../Xext/xf86miscproc.h"
CARD32 g_c32LastInputEventTime = 0;
@@ -117,6 +118,34 @@ InitInput (int argc, char *argv[])
AddEnabledDevice (g_fdMessageQueue);
}
+#if 0
+ {
+ MiscExtReturn ret;
+ pointer kbd;
+
+#if 0
+ if ((kbd = MiscExtCreateStruct(MISC_KEYBOARD)) == (pointer) 0)
+ return BadAlloc;
+#else
+ kbd = MiscExtCreateStruct (MISC_KEYBOARD);
+#endif
+
+ MiscExtSetKbdValue(kbd, MISC_KBD_TYPE, 0);
+ MiscExtSetKbdValue(kbd, MISC_KBD_RATE, 0);
+ MiscExtSetKbdValue(kbd, MISC_KBD_DELAY, 0);
+ MiscExtSetKbdValue(kbd, MISC_KBD_SERVNUMLOCK, 0);
+
+ switch ((ret = MiscExtApply (kbd, MISC_KEYBOARD)))
+ {
+ case MISC_RET_SUCCESS: break;
+ case MISC_RET_BADVAL:
+ case MISC_RET_BADKBDTYPE:
+ default:
+ ErrorF ("Unexpected return from MiscExtApply(KEYBOARD) = %d\n", ret);
+ }
+ }
+#endif
+
#if CYGDEBUG
ErrorF ("InitInput - returning\n");
#endif
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index c434e58d1..3202ae8d9 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -26,11 +26,11 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/InitOutput.c,v 1.32 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/InitOutput.c,v 1.35 2003/10/08 11:13:02 eich Exp $ */
#include "win.h"
#include "winconfig.h"
-
+#include "winprefs.h"
/*
* General global variables
@@ -47,11 +47,16 @@ int g_iPixmapPrivateIndex = -1;
int g_iWindowPrivateIndex = -1;
unsigned long g_ulServerGeneration = 0;
Bool g_fInitializedDefaultScreens = FALSE;
-FILE *g_pfLog = NULL;
DWORD g_dwEnginesSupported = 0;
HINSTANCE g_hInstance = 0;
HWND g_hDlgDepthChange = NULL;
+HWND g_hDlgExit = NULL;
Bool g_fCalledSetLocale = FALSE;
+Bool g_fCalledXInitThreads = FALSE;
+int g_iLogVerbose = 4;
+char * g_pszLogFile = WIN_LOG_FNAME;
+Bool g_fLogInited = FALSE;
+const char * g_pszQueryHost = NULL;
/*
@@ -151,6 +156,7 @@ winInitializeDefaultScreens (void)
g_ScreenInfo[i].fClipboard = FALSE;
g_ScreenInfo[i].fLessPointer = FALSE;
g_ScreenInfo[i].fScrollbars = FALSE;
+ g_ScreenInfo[i].fNoTrayIcon = FALSE;
g_ScreenInfo[i].iE3BTimeout = WIN_E3B_OFF;
g_ScreenInfo[i].dwWidth_mm = (dwWidth / WIN_DEFAULT_DPI)
* 25.4;
@@ -177,6 +183,10 @@ ddxGiveUp()
ErrorF ("ddxGiveUp\n");
#endif
+ /* Notify the worker threads we're exiting */
+ winDeinitClipboard ();
+ winDeinitMultiWindowWM ();
+
/* Close our handle to our message queue */
if (g_fdMessageQueue != WIN_FD_INVALID)
{
@@ -187,15 +197,11 @@ ddxGiveUp()
g_fdMessageQueue = WIN_FD_INVALID;
}
- /* Close the log file handle */
- if (g_pfLog != NULL)
- {
- /* Close log file */
- fclose (g_pfLog);
-
- /* Set the file handle to invalid */
- g_pfLog = NULL;
- }
+ if (!g_fLogInited) {
+ LogInit(g_pszLogFile, NULL);
+ g_fLogInited = TRUE;
+ }
+ LogClose();
/*
* At this point we aren't creating any new screens, so
@@ -239,12 +245,15 @@ OsVendorInit (void)
#ifdef DDXOSVERRORF
if (!OsVendorVErrorFProc)
OsVendorVErrorFProc = OsVendorVErrorF;
-
- /* Open log file if not yet open */
- if (g_pfLog == NULL)
- g_pfLog = fopen (WIN_LOG_FNAME, "w");
#endif
+ if (!g_fLogInited) {
+ LogInit(g_pszLogFile, NULL);
+ g_fLogInited = TRUE;
+ }
+ LogSetParameter(XLOG_FLUSH, 1);
+ LogSetParameter(XLOG_VERBOSITY, g_iLogVerbose);
+
/* Add a default screen if no screens were specified */
if (g_iNumScreens == 0)
{
@@ -328,6 +337,12 @@ ddxUseMsg (void)
"\tMoreover, if the window has decorations, one can now resize\n"
"\tit.\n");
+ ErrorF ("-[no]trayicon\n"
+ "\tDo not create a tray icon. Default is to create one\n"
+ "\ticon per screen. You can globally disable tray icons with\n"
+ "\t-notrayicon, then enable it for specific screens with\n"
+ "\t-trayicon for those screens.\n");
+
ErrorF ("-clipupdates num_boxes\n"
"\tUse a clipping region to constrain shadow update blits to\n"
"\tthe updated region when num_boxes, or more, are in the\n"
@@ -393,10 +408,6 @@ ddxProcessArgument (int argc, char *argv[], int i)
* that are generated before OsInit () is called.
*/
OsVendorVErrorFProc = OsVendorVErrorF;
-
- /* Open log file if not yet open */
- if (g_pfLog == NULL)
- g_pfLog = fopen (WIN_LOG_FNAME, "w");
#endif
s_fBeenHere = TRUE;
@@ -761,6 +772,8 @@ ddxProcessArgument (int argc, char *argv[], int i)
return 1;
}
+
+
/*
* Look for the '-clipboard' argument
*/
@@ -1106,6 +1119,58 @@ ddxProcessArgument (int argc, char *argv[], int i)
}
/*
+ * Look for the '-notrayicon' argument
+ */
+ if (strcmp (argv[i], "-notrayicon") == 0)
+ {
+ /* Is this parameter attached to a screen or is it global? */
+ if (-1 == g_iLastScreen)
+ {
+ int j;
+
+ /* Parameter is for all screens */
+ for (j = 0; j < MAXSCREENS; j++)
+ {
+ g_ScreenInfo[j].fNoTrayIcon = TRUE;
+ }
+ }
+ else
+ {
+ /* Parameter is for a single screen */
+ g_ScreenInfo[g_iLastScreen].fNoTrayIcon = TRUE;
+ }
+
+ /* Indicate that we have processed this argument */
+ return 1;
+ }
+
+ /*
+ * Look for the '-trayicon' argument
+ */
+ if (strcmp (argv[i], "-trayicon") == 0)
+ {
+ /* Is this parameter attached to a screen or is it global? */
+ if (-1 == g_iLastScreen)
+ {
+ int j;
+
+ /* Parameter is for all screens */
+ for (j = 0; j < MAXSCREENS; j++)
+ {
+ g_ScreenInfo[j].fNoTrayIcon = FALSE;
+ }
+ }
+ else
+ {
+ /* Parameter is for a single screen */
+ g_ScreenInfo[g_iLastScreen].fNoTrayIcon = FALSE;
+ }
+
+ /* Indicate that we have processed this argument */
+ return 1;
+ }
+
+ /*
* Look for the '-fp' argument
*/
if (IS_OPTION ("-fp"))
@@ -1126,6 +1191,16 @@ ddxProcessArgument (int argc, char *argv[], int i)
}
/*
+ * Look for the '-query' argument
+ */
+ if (IS_OPTION ("-query"))
+ {
+ CHECK_ARGS (1);
+ g_pszQueryHost = argv[++i];
+ return 0; /* Let DIX parse this again */
+ }
+
+ /*
* Look for the '-xf86config' argument
*/
if (IS_OPTION ("-xf86config"))
@@ -1145,6 +1220,26 @@ ddxProcessArgument (int argc, char *argv[], int i)
return 2;
}
+ /*
+ * Look for the '-logfile' argument
+ */
+ if (IS_OPTION ("-logfile"))
+ {
+ CHECK_ARGS (1);
+ g_pszLogFile = argv[++i];
+ return 2;
+ }
+
+ /*
+ * Look for the '-logverbose' argument
+ */
+ if (IS_OPTION ("-logverbose"))
+ {
+ CHECK_ARGS (1);
+ g_iLogVerbose = atoi(argv[++i]);
+ return 2;
+ }
+
return 0;
}
@@ -1255,6 +1350,8 @@ InitOutput (ScreenInfo *screenInfo, int argc, char *argv[])
}
}
+ LoadPreferences();
+
#if CYGDEBUG || YES
ErrorF ("InitOutput - Returning.\n");
#endif
diff --git a/hw/xwin/XWin.man b/hw/xwin/XWin.man
index 09bdcd235..fe78047c4 100644
--- a/hw/xwin/XWin.man
+++ b/hw/xwin/XWin.man
@@ -1,4 +1,4 @@
-.\" $XFree86: xc/programs/Xserver/hw/xwin/XWin.man,v 1.6 2002/10/17 08:18:21 alanh Exp $
+.\" $XFree86: xc/programs/Xserver/hw/xwin/XWin.man,v 1.7 2003/10/02 13:30:09 eich Exp $
.TH XWIN 1 __vendorversion__
.SH NAME
XWin \- X Server for the Cygwin environment on Microsoft Windows
@@ -87,7 +87,7 @@ Ctrl+Alt+Backspace exits the X Server
Alt+F4 exits the X Server
.SH "SEE ALSO"
.PP
-X(__miscmansuffix__), Xserver(1), xdm(1), xinit(1)
+X(__miscmansuffix__), Xserver(1), xdm(1), xinit(1), XWinrc(5)
.SH BUGS
.I XWin
and this man page still have many limitations. Some of the more obvious
diff --git a/hw/xwin/XWin.rc b/hw/xwin/XWin.rc
index 73533ba4e..7b5708af2 100644
--- a/hw/xwin/XWin.rc
+++ b/hw/xwin/XWin.rc
@@ -27,7 +27,7 @@
*
* Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/XWin.rc,v 1.1 2002/10/17 08:18:21 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/XWin.rc,v 1.2 2003/07/29 21:25:15 dawes Exp $ */
#include "resource.h"
@@ -36,8 +36,10 @@
* Dialogs
*/
+/* Depth_Change */
+
DEPTH_CHANGE_BOX DIALOG DISCARDABLE 32, 32, 180, 100
-STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | DS_CENTER
FONT 8, "MS Sans Serif"
CAPTION "Cygwin/XFree86"
BEGIN
@@ -48,10 +50,35 @@ BEGIN
END
+/* Exit */
+
+EXIT_DIALOG DIALOG DISCARDABLE 32, 32, 180, 70
+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTER
+FONT 8, "MS Sans Serif"
+CAPTION "Cygwin/XFree86 - Exit?"
+BEGIN
+ PUSHBUTTON "E&xit", IDOK, 55, 48, 30, 14
+ DEFPUSHBUTTON "&Cancel", IDCANCEL, 95, 48, 30, 14
+ CTEXT "Exiting will close all screens running on this display.", IDC_STATIC, 7, 12, 166, 8
+ CTEXT "Proceed with shutdown of this display/server?", IDC_STATIC, 7, 24, 166, 8
+END
+
+
/*
* Menus
*/
+IDM_TRAYICON_MENU MENU DISCARDABLE
+BEGIN
+ POPUP "TRAYICON_MENU"
+ BEGIN
+ MENUITEM "&Hide Root Window", ID_APP_HIDE_ROOT
+ MENUITEM "&Show Root Window", ID_APP_SHOW_ROOT
+ MENUITEM SEPARATOR
+ MENUITEM "E&xit", ID_APP_EXIT
+ END
+END
+
/*
* Icons
diff --git a/hw/xwin/win.h b/hw/xwin/win.h
index 684e98cc1..6ecf5ada0 100644
--- a/hw/xwin/win.h
+++ b/hw/xwin/win.h
@@ -31,7 +31,7 @@
* Harold L Hunt II
* Kensuke Matsuzaki
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/win.h,v 1.34 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/win.h,v 1.38 2003/10/08 11:13:02 eich Exp $ */
#ifndef _WIN_H_
#define _WIN_H_
@@ -93,8 +93,14 @@
| (1 << ( 8 - 1)))
#define WIN_CHECK_DEPTH YES
+/*
+ * Timer IDs for WM_TIMER
+ */
+#define WIN_E3B_TIMER_ID 1
+#define WIN_POLLING_MOUSE_TIMER_ID 2
+
+
#define WIN_E3B_OFF -1
-#define WIN_E3B_TIMER_ID 1
#define WIN_FD_INVALID -1
#define WIN_SERVER_NONE 0x0L /* 0 */
@@ -144,7 +150,6 @@
#include "pixmapstr.h"
#include "pixmap.h"
#include "region.h"
-#include "regionstr.h"
#include "gcstruct.h"
#include "colormap.h"
#include "colormapst.h"
@@ -184,6 +189,15 @@
/*
+ * Define Windows constants
+ */
+
+#define WM_TRAYICON (WM_USER + 1000)
+#define WM_INIT_SYS_MENU (WM_USER + 1001)
+#define WM_GIVEUP (WM_USER + 1002)
+
+
+/*
* Multi-Window Window Manager header
*/
@@ -222,7 +236,7 @@ if (fDebugProcMsg) \
#define DEBUG_MSG(str,...)
#endif
-#if CYGDEBUG || YES
+#if CYGDEBUG
#define DEBUG_FN_NAME(str) PTSTR szFunctionName = str
#else
#define DEBUG_FN_NAME(str)
@@ -387,6 +401,7 @@ typedef struct
Bool fClipboard;
Bool fLessPointer;
Bool fScrollbars;
+ Bool fNoTrayIcon;
int iE3BTimeout;
/* Windows (Alt+F4) and Unix (Ctrl+Alt+Backspace) Killkey */
Bool fUseWinKillKey;
@@ -422,6 +437,9 @@ typedef struct _winPrivScreenRec
DWORD dwModeKeyStates;
+ /* Handle to icons that must be freed */
+ HICON hiconNotifyIcon;
+
/* Clipboard support */
pthread_t ptClipboardProc;
@@ -482,7 +500,11 @@ typedef struct _winPrivScreenRec
/* Privates used by multi-window server */
pthread_t ptWMProc;
+ pthread_t ptXMsgProc;
void *pWMInfo;
+ Bool fWindowOrderChanged;
+ Bool fRestacking;
+ Bool fRootWindowShown;
/* Privates used for any module running in a seperate thread */
pthread_mutex_t pmServerStarted;
@@ -531,6 +553,12 @@ typedef struct _winPrivScreenRec
} winPrivScreenRec;
+typedef struct {
+ pointer value;
+ XID id;
+} WindowIDPairRec, *WindowIDPairPtr;
+
+
/*
* Extern declares for general global variables
*/
@@ -549,6 +577,10 @@ extern CARD32 g_c32LastInputEventTime;
extern DWORD g_dwEnginesSupported;
extern HINSTANCE g_hInstance;
extern HWND g_hDlgDepthChange;
+extern HWND g_hDlgExit;
+extern int g_copyROP[];
+extern int g_patternROP[];
+extern const char * g_pszQueryHost;
/*
@@ -703,6 +735,13 @@ winInitClipboard (pthread_t *ptClipboardProc,
pthread_mutex_t *ppmServerStarted,
DWORD dwScreen);
+/*
+ * winclipboardthread.c
+ */
+
+void
+winDeinitClipboard ();
+
/*
* wincmap.c
@@ -772,6 +811,18 @@ winCrossScreen (ScreenPtr pScreen, Bool fEntering);
/*
+ * windialogs.c
+ */
+
+void
+winDisplayExitDialog (winPrivScreenPtr pScreenPriv);
+
+
+void
+winDisplayDepthChangeDialog (winPrivScreenPtr pScreenPriv);
+
+
+/*
* winengine.c
*/
@@ -1377,6 +1428,33 @@ winSetShapePRootless (WindowPtr pWindow);
/*
+ * winmultiwindowicons.c
+ */
+
+HICON
+winXIconToHICON (WindowPtr pWin);
+
+void
+winUpdateIcon (Window id);
+
+
+/*
+ * winmultiwindowshape.c
+ */
+
+#ifdef SHAPE
+void
+winReshapeMultiWindow (WindowPtr pWin);
+
+void
+winSetShapeMultiWindow (WindowPtr pWindow);
+
+void
+winUpdateRgnMultiWindow (WindowPtr pWindow);
+#endif
+
+
+/*
* winmultiwindowwindow.c
*/
@@ -1404,10 +1482,42 @@ winReparentWindowMultiWindow (WindowPtr pWin, WindowPtr pPriorParent);
void
winRestackWindowMultiWindow (WindowPtr pWin, WindowPtr pOldNextSib);
-#ifdef SHAPE
void
-winSetShapeMultiWindow (WindowPtr pWindow);
-#endif
+winReorderWindowsMultiWindow (ScreenPtr pScreen);
+
+void
+winMoveXWindow (WindowPtr pWin, int x, int y);
+
+void
+winResizeXWindow (WindowPtr pWin, int w, int h);
+
+XID
+winGetWindowID (WindowPtr pWin);
+
+
+/*
+ * winmultiwindowwndproc.c
+ */
+
+LRESULT CALLBACK
+winTopLevelWindowProc (HWND hwnd, UINT message,
+ WPARAM wParam, LPARAM lParam);
+
+
+/*
+ * wintrayicon.c
+ */
+
+void
+winInitNotifyIcon (winPrivScreenPtr pScreenPriv);
+
+void
+winDeleteNotifyIcon (winPrivScreenPtr pScreenPriv);
+
+LRESULT
+winHandleIconMessage (HWND hwnd, UINT message,
+ WPARAM wParam, LPARAM lParam,
+ winPrivScreenPtr pScreenPriv);
/*
diff --git a/hw/xwin/winblock.c b/hw/xwin/winblock.c
index 45d509fea..cc057eed6 100644
--- a/hw/xwin/winblock.c
+++ b/hw/xwin/winblock.c
@@ -27,7 +27,7 @@
*
* Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winblock.c,v 1.6 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winblock.c,v 1.7 2003/07/29 21:25:16 dawes Exp $ */
#include "win.h"
@@ -68,9 +68,13 @@ winBlockHandler_ProcessMessages:
/* Process all messages on our queue */
while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
{
- if (g_hDlgDepthChange == 0 || !IsDialogMessage (g_hDlgDepthChange, &msg))
+ if ((g_hDlgDepthChange == 0
+ || !IsDialogMessage (g_hDlgDepthChange, &msg))
+ && (g_hDlgExit == 0
+ || !IsDialogMessage (g_hDlgExit, &msg)))
{
DispatchMessage (&msg);
}
}
+ winReorderWindowsMultiWindow ((ScreenPtr)pBlockData);
}
diff --git a/hw/xwin/winclipboard.h b/hw/xwin/winclipboard.h
index 6e6cf44a9..8f9bae789 100644
--- a/hw/xwin/winclipboard.h
+++ b/hw/xwin/winclipboard.h
@@ -27,7 +27,7 @@
*
* Authors: Harold Hunt
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winclipboard.h,v 1.1 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winclipboard.h,v 1.3 2003/10/02 13:30:10 eich Exp $ */
#ifndef _WINCLIPBOARD_H_
@@ -119,6 +119,8 @@ winClipboardUNIXtoDOS (unsigned char **ppszData, int iLength);
void *
winClipboardProc (void *pArg);
+void
+winDeinitClipboard ();
/*
* winclipboardunicode.c
diff --git a/hw/xwin/winclipboardinit.c b/hw/xwin/winclipboardinit.c
index 22c068c48..a1f7b0b6d 100644
--- a/hw/xwin/winclipboardinit.c
+++ b/hw/xwin/winclipboardinit.c
@@ -27,7 +27,7 @@
*
* Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winclipboardinit.c,v 1.1 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winclipboardinit.c,v 1.2 2003/07/29 21:25:16 dawes Exp $ */
#include "winclipboard.h"
diff --git a/hw/xwin/winclipboardtextconv.c b/hw/xwin/winclipboardtextconv.c
index f97681c5f..09ef40076 100644
--- a/hw/xwin/winclipboardtextconv.c
+++ b/hw/xwin/winclipboardtextconv.c
@@ -27,7 +27,7 @@
*
* Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winclipboardtextconv.c,v 1.1 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winclipboardtextconv.c,v 1.2 2003/07/29 21:25:16 dawes Exp $ */
#include "win.h"
#include <stdio.h>
diff --git a/hw/xwin/winclipboardthread.c b/hw/xwin/winclipboardthread.c
index ce4590b98..06a985533 100644
--- a/hw/xwin/winclipboardthread.c
+++ b/hw/xwin/winclipboardthread.c
@@ -27,7 +27,7 @@
*
* Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winclipboardthread.c,v 1.1 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winclipboardthread.c,v 1.3 2003/10/02 13:30:10 eich Exp $ */
#include "winclipboard.h"
@@ -43,6 +43,7 @@ extern Bool g_fCalledSetLocale;
*/
static jmp_buf g_jmpEntry;
+static Bool g_shutdown = FALSE;
/*
@@ -79,7 +80,6 @@ winClipboardProc (void *pArg)
int iRetries;
Bool fUnicodeSupport;
char szDisplay[512];
- int i;
ClipboardProcArgPtr pProcArg = (ClipboardProcArgPtr) pArg;
ErrorF ("winClipboardProc - Hello\n");
@@ -93,7 +93,7 @@ winClipboardProc (void *pArg)
ErrorF ("winClipboardProc - Calling pthread_mutex_lock ()\n");
- /* Grab our garbage mutex to satisfy pthread_cond_wait */
+ /* Grab the server started mutex - pause until we get it */
iReturn = pthread_mutex_lock (pProcArg->ppmServerStarted);
if (iReturn != 0)
{
@@ -129,11 +129,6 @@ winClipboardProc (void *pArg)
/* Flag that we have called setlocale */
g_fCalledSetLocale = TRUE;
- /* Release the garbage mutex */
- pthread_mutex_unlock (pProcArg->ppmServerStarted);
-
- ErrorF ("winClipboardProc - pthread_mutex_unlock () returned.\n");
-
/* Allow multiple threads to access Xlib */
if (XInitThreads () == 0)
{
@@ -143,6 +138,11 @@ winClipboardProc (void *pArg)
ErrorF ("winClipboardProc - XInitThreads () returned.\n");
+ /* Release the server started mutex */
+ pthread_mutex_unlock (pProcArg->ppmServerStarted);
+
+ ErrorF ("winClipboardProc - pthread_mutex_unlock () returned.\n");
+
/* Set jump point for Error exits */
iReturn = setjmp (g_jmpEntry);
@@ -155,6 +155,12 @@ winClipboardProc (void *pArg)
iReturn);
pthread_exit (NULL);
}
+ else if (g_shutdown)
+ {
+ /* Shutting down, the X server severed out connection! */
+ ErrorF ("winClipboardProc - Detected shutdown in progress\n");
+ pthread_exit (NULL);
+ }
else if (iReturn == WIN_JMP_ERROR_IO)
{
ErrorF ("winClipboardProc - setjmp returned and hwnd: %08x\n", hwnd);
@@ -163,13 +169,12 @@ winClipboardProc (void *pArg)
/* Initialize retry count */
iRetries = 0;
-#if 0
- /* Setup the display connection string x */
- snprintf (szDisplay, 512, "127.0.0.1:%s.%d", display, pProcArg->dwScreen);
-#else
/* Setup the display connection string x */
- snprintf (szDisplay, 512, ":%s.%d", display, pProcArg->dwScreen);
-#endif
+ snprintf (szDisplay,
+ 512,
+ "127.0.0.1:%s.%d",
+ display,
+ (int) pProcArg->dwScreen);
/* Print the display connection string */
ErrorF ("winClipboardProc - DISPLAY=%s\n", szDisplay);
@@ -434,14 +439,18 @@ winClipboardErrorHandler (Display *pDisplay, XErrorEvent *pErr)
sizeof (pszErrorMsg));
ErrorF ("winClipboardErrorHandler - ERROR: \n\t%s\n", pszErrorMsg);
- if (pErr->error_code==BadWindow
- || pErr->error_code==BadMatch
- || pErr->error_code==BadDrawable)
+ if (pErr->error_code == BadWindow
+ || pErr->error_code == BadMatch
+ || pErr->error_code == BadDrawable)
{
+#if 0
pthread_exit (NULL);
+#endif
}
+#if 0
pthread_exit (NULL);
+#endif
return 0;
}
@@ -461,3 +470,15 @@ winClipboardIOErrorHandler (Display *pDisplay)
return 0;
}
+
+
+/*
+ * Notify the clipboard thread we're exiting and not to reconnect
+ */
+
+void
+winDeinitClipboard ()
+{
+ ErrorF ("winDeinitClipboard - Noting shutdown in progress\n");
+ g_shutdown = TRUE;
+}
diff --git a/hw/xwin/winclipboardunicode.c b/hw/xwin/winclipboardunicode.c
index fdbcb8e69..9eb2b0d87 100644
--- a/hw/xwin/winclipboardunicode.c
+++ b/hw/xwin/winclipboardunicode.c
@@ -27,7 +27,7 @@
*
* Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winclipboardunicode.c,v 1.1 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winclipboardunicode.c,v 1.2 2003/07/29 21:25:16 dawes Exp $ */
#include "win.h"
diff --git a/hw/xwin/winclipboardwndproc.c b/hw/xwin/winclipboardwndproc.c
index d27bb4861..c577d060e 100644
--- a/hw/xwin/winclipboardwndproc.c
+++ b/hw/xwin/winclipboardwndproc.c
@@ -27,7 +27,7 @@
*
* Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winclipboardwndproc.c,v 1.1 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winclipboardwndproc.c,v 1.2 2003/07/29 21:25:16 dawes Exp $ */
#include "winclipboard.h"
diff --git a/hw/xwin/winclipboardxevents.c b/hw/xwin/winclipboardxevents.c
index a09c7c185..8b3a56489 100644
--- a/hw/xwin/winclipboardxevents.c
+++ b/hw/xwin/winclipboardxevents.c
@@ -27,7 +27,7 @@
*
* Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winclipboardxevents.c,v 1.1 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winclipboardxevents.c,v 1.3 2003/10/02 13:30:10 eich Exp $ */
#include "winclipboard.h"
@@ -81,11 +81,12 @@ winClipboardFlushXEvents (HWND hwnd,
case ClientMessage:
if (event.xclient.data.l[0] == atomDeleteWindow)
{
- ErrorF ("\nReceived WM_DELETE_WINDOW\n\n");
+ ErrorF ("\nwinClipboardFlushXEvents - Received "
+ "WM_DELETE_WINDOW\n\n");
fReturn = FALSE;
}
else
- ErrorF ("\nUnknown ClientMessage\n\n");
+ ErrorF ("\nwinClipboardFlushXEvents - Unknown ClientMessage\n\n");
break;
case SelectionClear:
@@ -98,7 +99,8 @@ winClipboardFlushXEvents (HWND hwnd,
CurrentTime);
if (iReturn == BadAtom || iReturn == BadWindow)
{
- ErrorF ("SelectionClear - XConvertSelection () failed\n");
+ ErrorF ("winClipboardFlushXEvents - SelectionClear - "
+ "XConvertSelection () failed\n");
pthread_exit (NULL);
}
break;
@@ -146,7 +148,8 @@ winClipboardFlushXEvents (HWND hwnd,
(XEvent *) &eventSelection);
if (iReturn == BadValue || iReturn == BadWindow)
{
- ErrorF ("SelectionRequest - XSendEvent () failed\n");
+ ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
+ "XSendEvent () failed\n");
pthread_exit (NULL);
}
@@ -176,7 +179,8 @@ winClipboardFlushXEvents (HWND hwnd,
|| iReturn == BadValue
|| iReturn == BadWindow)
{
- ErrorF ("SelectionRequest - XChangeProperty failed: %d\n",
+ ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
+ "XChangeProperty failed: %d\n",
iReturn);
}
@@ -201,7 +205,8 @@ winClipboardFlushXEvents (HWND hwnd,
(XEvent *) &eventSelection);
if (iReturn == BadValue || iReturn == BadWindow)
{
- ErrorF ("SelectionRequest - XSendEvent () failed\n");
+ ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
+ "XSendEvent () failed\n");
}
break;
}
@@ -209,7 +214,8 @@ winClipboardFlushXEvents (HWND hwnd,
/* Access the clipboard */
if (!OpenClipboard (hwnd))
{
- ErrorF ("SelectionRequest - OpenClipboard () failed: %08x\n",
+ ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
+ "OpenClipboard () failed: %08x\n",
GetLastError ());
pthread_exit (NULL);
}
@@ -235,7 +241,8 @@ winClipboardFlushXEvents (HWND hwnd,
hGlobal = GetClipboardData (CF_TEXT);
if (!hGlobal)
{
- ErrorF ("SelectionRequest - GetClipboardData () failed: %08x\n",
+ ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
+ "GetClipboardData () failed: %08x\n",
GetLastError ());
pthread_exit (NULL);
}
@@ -283,8 +290,8 @@ winClipboardFlushXEvents (HWND hwnd,
&xtpText);
if (iReturn == XNoMemory || iReturn == XLocaleNotSupported)
{
- ErrorF ("SelectionRequest - Xutf8TextListToTextProperty "
- "failed: %d\n",
+ ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
+ "Xutf8TextListToTextProperty failed: %d\n",
iReturn);
exit(1);
}
@@ -324,7 +331,8 @@ winClipboardFlushXEvents (HWND hwnd,
|| iReturn == BadMatch || iReturn == BadValue
|| iReturn == BadWindow)
{
- ErrorF ("SelectionRequest - XChangeProperty failed: %d\n",
+ ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
+ "XChangeProperty failed: %d\n",
iReturn);
pthread_exit (NULL);
}
@@ -359,7 +367,8 @@ winClipboardFlushXEvents (HWND hwnd,
(XEvent *) &eventSelection);
if (iReturn == BadValue || iReturn == BadWindow)
{
- ErrorF ("SelectionRequest - XSendEvent () failed\n");
+ ErrorF ("winClipboardFlushXEvents - SelectionRequest - "
+ "XSendEvent () failed\n");
pthread_exit (NULL);
}
break;
@@ -379,7 +388,7 @@ winClipboardFlushXEvents (HWND hwnd,
pszAtomName = XGetAtomName (pDisplay,
event.xselection.selection);
- ErrorF ("SelectionNotify - ATOM: %s\n",
+ ErrorF ("winClipboardFlushXEvents - SelectionNotify - ATOM: %s\n",
pszAtomName);
XFree (pszAtomName);
@@ -406,13 +415,15 @@ winClipboardFlushXEvents (HWND hwnd,
if(event.xselection.target == XA_STRING)
{
#if 0
- ErrorF ("SelectionNotify XA_STRING\n");
+ ErrorF ("winClipboardFlushXEvents - SelectionNotify - "
+ "XA_STRING\n");
#endif
return fReturn;
}
else if (event.xselection.target == atomUTF8String)
{
- ErrorF ("SelectionNotify UTF8\n");
+ ErrorF ("winClipboardFlushXEvents - SelectionNotify "
+ "UTF8\n");
iReturn = XConvertSelection (pDisplay,
event.xselection.selection,
XA_STRING,
@@ -421,15 +432,16 @@ winClipboardFlushXEvents (HWND hwnd,
CurrentTime);
if (iReturn == BadAtom || iReturn == BadWindow)
{
- ErrorF ("SelectionNotify - XConvertSelection () "
- "failed\n");
+ ErrorF ("winClipboardFlushXEvents - SelectionNotify "
+ "- XConvertSelection () failed\n");
pthread_exit (NULL);
}
return fReturn;
}
else if (event.xselection.target == atomCompoundText)
{
- ErrorF ("SelectionNotify CompoundText\n");
+ ErrorF ("winClipboardFlushXEvents - SelectionNotify "
+ "CompoundText\n");
iReturn = XConvertSelection (pDisplay,
event.xselection.selection,
atomUTF8String,
@@ -438,15 +450,15 @@ winClipboardFlushXEvents (HWND hwnd,
CurrentTime);
if (iReturn == BadAtom || iReturn == BadWindow)
{
- ErrorF ("SelectionNotify - XConvertSelection () "
- "failed\n");
+ ErrorF ("winClipboardFlushXEvents - SelectionNotify "
+ "- XConvertSelection () failed\n");
pthread_exit (NULL);
}
return fReturn;
}
else
{
- ErrorF("Unknown format\n");
+ ErrorF ("winClipboardFlushXEvents - Unknown format\n");
return fReturn;
}
}
@@ -481,7 +493,8 @@ winClipboardFlushXEvents (HWND hwnd,
&pszReturnData);
if (iReturn != Success)
{
- ErrorF ("SelectionNotify - XGetWindowProperty () failed\n");
+ ErrorF ("winClipboardFlushXEvents - SelectionNotify - "
+ "XGetWindowProperty () failed\n");
pthread_exit (NULL);
}
@@ -523,7 +536,8 @@ winClipboardFlushXEvents (HWND hwnd,
&pszReturnData);
if (iReturn != Success)
{
- ErrorF ("SelectionNotify - XGetWindowProperty () failed\n");
+ ErrorF ("winClipboardFlushXEvents - SelectionNotify - "
+ "XGetWindowProperty () failed\n");
pthread_exit (NULL);
}
@@ -591,14 +605,16 @@ winClipboardFlushXEvents (HWND hwnd,
/* Access the Windows clipboard */
if (!OpenClipboard (hwnd))
{
- ErrorF ("OpenClipboard () failed: %08x\n", GetLastError ());
+ ErrorF ("winClipboardFlushXEvents - OpenClipboard () failed: "
+ "%08x\n", GetLastError ());
pthread_exit (NULL);
}
/* Take ownership of the Window clipboard */
if (!EmptyClipboard ())
{
- ErrorF ("EmptyClipboard () failed: %08x\n", GetLastError ());
+ ErrorF ("winClipboardFlushXEvents - EmptyClipboard () failed: "
+ "%08x\n", GetLastError ());
pthread_exit (NULL);
}
@@ -613,7 +629,8 @@ winClipboardFlushXEvents (HWND hwnd,
pszGlobalData = GlobalLock (hGlobal);
if (pszGlobalData == NULL)
{
- ErrorF ("Could not lock global memory for clipboard transfer\n");
+ ErrorF ("winClipboardFlushXEvents - Could not lock global "
+ "memory for clipboard transfer\n");
pthread_exit (NULL);
}
@@ -655,7 +672,9 @@ winClipboardFlushXEvents (HWND hwnd,
/* Release the clipboard */
if (!CloseClipboard ())
{
- ErrorF ("CloseClipboard () failed: %08x\n", GetLastError ());
+ ErrorF ("winClipboardFlushXEvents - CloseClipboard () failed: "
+ "%08x\n",
+ GetLastError ());
pthread_exit (NULL);
}
@@ -669,8 +688,9 @@ winClipboardFlushXEvents (HWND hwnd,
pszAtomName = XGetAtomName (pDisplay,
event.xselection.selection);
- ErrorF ("SelectionNotify - Could not reassert ownership "
- "of selection ATOM: %s\n", pszAtomName);
+ ErrorF ("winClipboardFlushXEvents - SelectionNotify - "
+ "Could not reassert ownership of selection ATOM: %s\n",
+ pszAtomName);
XFree (pszAtomName);
pszAtomName = NULL;
pthread_exit (NULL);
@@ -695,7 +715,8 @@ winClipboardFlushXEvents (HWND hwnd,
iWindow, CurrentTime);
if (iReturn == BadAtom || iReturn == BadWindow)
{
- ErrorF ("Could not reassert ownership of selection\n");
+ ErrorF ("winClipboardFlushXEvents - Could not reassert "
+ "ownership of selection\n");
pthread_exit (NULL);
}
#endif
diff --git a/hw/xwin/winconfig.c b/hw/xwin/winconfig.c
index bc336527c..b42b1d6bf 100644
--- a/hw/xwin/winconfig.c
+++ b/hw/xwin/winconfig.c
@@ -27,7 +27,7 @@
*
* Authors: Alexander Gottwald
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winconfig.c,v 1.1 2002/10/17 08:18:22 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winconfig.c,v 1.4 2003/10/08 11:13:02 eich Exp $ */
#include "win.h"
#include "winconfig.h"
@@ -112,11 +112,10 @@ static Bool GetBoolValue (OptionInfoPtr p, const char *s);
Bool
winReadConfigfile ()
{
- Bool retval = TRUE;
- const char *filename;
-
- MessageType from = X_DEFAULT;
- char *xf86ConfigFile = NULL;
+ Bool retval = TRUE;
+ const char *filename;
+ MessageType from = X_DEFAULT;
+ char *xf86ConfigFile = NULL;
if (g_cmdline.configFile)
{
@@ -146,16 +145,7 @@ winReadConfigfile ()
}
xf86closeConfigFile ();
- winMsg (X_NONE, "Markers: ");
- winMsg (X_PROBED, "probed, ");
- winMsg (X_CONFIG, "from config file, ");
- winMsg (X_DEFAULT, "default setting,\n ");
- winMsg (X_CMDLINE, "from command line, ");
- winMsg (X_NOTICE, "notice, ");
- winMsg (X_INFO, "informational,\n ");
- winMsg (X_WARNING, "warning, ");
- winMsg (X_ERROR, "error, ");
- winMsg (X_UNKNOWN, "unknown.\n");
+ LogPrintMarkers();
/* set options from data structure */
@@ -213,9 +203,46 @@ winReadConfigfile ()
/* Set the keyboard configuration */
+typedef struct {
+ unsigned int winlayout;
+ int winkbtype;
+ char *xkbmodel;
+ char *xkblayout;
+ char *xkbvariant;
+ char *xkboptions;
+ char *layoutname;
+} WinKBLayoutRec, *WinKBLayoutPtr;
+
+WinKBLayoutRec winKBLayouts[] = {
+ { 0x405, -1, "pc105", "cz", NULL, NULL, "Czech"},
+ { 0x406, -1, "pc105", "dk", NULL, NULL, "Danish"},
+ { 0x407, -1, "pc105", "de", NULL, NULL, "German (Germany)"},
+ {0x10407, -1, "pc105", "de", NULL, NULL, "German (Germany, IBM)"},
+ { 0x807, -1, "pc105", "de_CH", NULL, NULL, "German (Switzerland)"},
+ {0x10409, -1, "pc105", "dvorak", NULL, NULL, "English (USA, Dvorak)"},
+ {0x20409, -1, "pc105", "us_intl", NULL, NULL, "English (USA, International)"},
+ { 0x809, -1, "pc105", "gb", NULL, NULL, "English (United Kingdom)"},
+ { 0x40a, -1, "pc105", "es", NULL, NULL, "Spanish (Spain, Traditional Sort)"},
+ { 0x40b, -1, "pc105", "fi", NULL, NULL, "Finnish"},
+ { 0x40c, -1, "pc105", "fr", NULL, NULL, "French (Standard)"},
+ { 0x80c, -1, "pc105", "be", NULL, NULL, "French (Belgian)"},
+ { 0x410, -1, "pc105", "it", NULL, NULL, "Italian"},
+ { 0x411, -1, "jp", "jp", NULL, NULL, "Japanese"},
+ { 0x414, -1, "pc105", "no", NULL, NULL, "Norwegian"},
+ { 0x416, -1, "pc105", "pt", NULL, NULL, "Portuguese (Brazil, ABNT)"},
+ {0x10416, -1, "abnt2", "br", NULL, NULL, "Portuguese (Brazil, ABNT2)"},
+ { 0x816, -1, "pc105", "pt", NULL, NULL, "Portuguese (Portugal)"},
+ { 0x41d, -1, "pc105", "se", NULL, NULL, "Swedish (Sweden)"},
+ { -1, -1, NULL, NULL, NULL, NULL, NULL}
+};
+
+
Bool
winConfigKeyboard (DeviceIntPtr pDevice)
{
+ char layoutName[KL_NAMELENGTH];
+ unsigned int layoutNum;
+ int keyboardType;
XF86ConfInputPtr kbd = NULL;
XF86ConfInputPtr input_list = NULL;
MessageType from = X_DEFAULT;
@@ -237,6 +264,44 @@ winConfigKeyboard (DeviceIntPtr pDevice)
g_winInfo.xkb.variant = NULL;
g_winInfo.xkb.options = NULL;
# endif /* PC98 */
+
+
+
+ keyboardType = GetKeyboardType (0);
+ if (keyboardType > 0 && GetKeyboardLayoutName (layoutName))
+ {
+ WinKBLayoutPtr pLayout;
+
+ layoutNum = strtoul (layoutName, (char **)NULL, 16);
+ if ((layoutNum & 0xffff) == 0x411) {
+ /* The japanese layouts know a lot of different IMEs which all have
+ different layout numbers set. Map them to a single entry.
+ Same might apply for chinese, korean and other symbol languages
+ too */
+ layoutNum = (layoutNum & 0xffff);
+ }
+ winMsg (X_DEFAULT, "winConfigKeyboard - Layout: \"%s\" (%08x) \n",
+ layoutName, layoutNum);
+
+ for (pLayout = winKBLayouts; pLayout->winlayout != -1; pLayout++)
+ {
+ if (pLayout->winlayout != layoutNum)
+ continue;
+ if (pLayout->winkbtype > 0 && pLayout->winkbtype != keyboardType)
+ continue;
+
+ winMsg (X_DEFAULT,
+ "Using preset keyboard for \"%s\" (%s), type \"%d\"\n",
+ pLayout->layoutname, layoutName, keyboardType);
+
+ g_winInfo.xkb.model = pLayout->xkbmodel;
+ g_winInfo.xkb.layout = pLayout->xkblayout;
+ g_winInfo.xkb.variant = pLayout->xkbvariant;
+ g_winInfo.xkb.options = pLayout->xkboptions;
+ break;
+ }
+ }
+
g_winInfo.xkb.initialMap = NULL;
g_winInfo.xkb.keymap = NULL;
g_winInfo.xkb.types = NULL;
@@ -265,7 +330,7 @@ winConfigKeyboard (DeviceIntPtr pDevice)
{
/* Check if device name matches requested name */
if (g_cmdline.keyboard && winNameCompare (input_list->inp_identifier,
- g_cmdline.keyboard))
+ g_cmdline.keyboard))
continue;
kbd = input_list;
}
@@ -416,7 +481,7 @@ winConfigMouse (DeviceIntPtr pDevice)
{
/* Check if device name matches requested name */
if (g_cmdline.mouse && winNameCompare (input_list->inp_identifier,
- g_cmdline.mouse))
+ g_cmdline.mouse))
continue;
mouse = input_list;
}
diff --git a/hw/xwin/wincreatewnd.c b/hw/xwin/wincreatewnd.c
index 3c725f248..336131c8a 100644
--- a/hw/xwin/wincreatewnd.c
+++ b/hw/xwin/wincreatewnd.c
@@ -27,7 +27,7 @@
*
* Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/wincreatewnd.c,v 1.5 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/wincreatewnd.c,v 1.7 2003/10/08 11:13:03 eich Exp $ */
#include "win.h"
#include "shellapi.h"
@@ -57,6 +57,7 @@ winCreateBoundingWindowFullScreen (ScreenPtr pScreen)
int iHeight = pScreenInfo->dwHeight;
HWND *phwnd = &pScreenPriv->hwndScreen;
WNDCLASS wc;
+ char szTitle[256];
#if CYGDEBUG
ErrorF ("winCreateBoundingWindowFullScreen\n");
@@ -75,10 +76,23 @@ winCreateBoundingWindowFullScreen (ScreenPtr pScreen)
wc.lpszClassName = WINDOW_CLASS;
RegisterClass (&wc);
+ /* Set display and screen-specific tooltip text */
+ if (g_pszQueryHost != NULL)
+ snprintf (szTitle,
+ sizeof (szTitle),
+ WINDOW_TITLE_XDMCP,
+ g_pszQueryHost);
+ else
+ snprintf (szTitle,
+ sizeof (szTitle),
+ WINDOW_TITLE,
+ display,
+ (int) pScreenInfo->dwScreen);
+
/* Create the window */
*phwnd = CreateWindowExA (WS_EX_TOPMOST, /* Extended styles */
WINDOW_CLASS, /* Class name */
- WINDOW_TITLE, /* Window name */
+ szTitle, /* Window name */
WS_POPUP,
0, /* Horizontal position */
0, /* Vertical position */
@@ -102,7 +116,7 @@ winCreateBoundingWindowFullScreen (ScreenPtr pScreen)
ShowWindow (*phwnd, SW_SHOWNORMAL);
break;
}
-
+
/* Send first paint message */
UpdateWindow (*phwnd);
@@ -128,6 +142,7 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
WNDCLASS wc;
RECT rcClient, rcWorkArea;
DWORD dwWindowStyle;
+ char szTitle[256];
ErrorF ("winCreateBoundingWindowWindowed - User w: %d h: %d\n",
pScreenInfo->dwUserWidth, pScreenInfo->dwUserHeight);
@@ -267,10 +282,23 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
iWidth, iHeight);
#endif
+ /* Set display and screen-specific tooltip text */
+ if (g_pszQueryHost != NULL)
+ snprintf (szTitle,
+ sizeof (szTitle),
+ WINDOW_TITLE_XDMCP,
+ g_pszQueryHost);
+ else
+ snprintf (szTitle,
+ sizeof (szTitle),
+ WINDOW_TITLE,
+ display,
+ (int) pScreenInfo->dwScreen);
+
/* Create the window */
*phwnd = CreateWindowExA (0, /* Extended styles */
WINDOW_CLASS, /* Class name */
- WINDOW_TITLE, /* Window name */
+ szTitle, /* Window name */
dwWindowStyle,
rcWorkArea.left, /* Horizontal position */
rcWorkArea.top, /* Vertical position */
@@ -369,7 +397,10 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
/* Show the window */
if (pScreenInfo->fMultiWindow)
- ShowWindow (*phwnd, SW_SHOWMINNOACTIVE);
+ {
+ pScreenPriv->fRootWindowShown = FALSE;
+ ShowWindow (*phwnd, SW_HIDE);
+ }
else
ShowWindow (*phwnd, SW_SHOWNORMAL);
if (!UpdateWindow (*phwnd))
diff --git a/hw/xwin/wincursor.c b/hw/xwin/wincursor.c
index cd12bb632..e7c3ba7e7 100644
--- a/hw/xwin/wincursor.c
+++ b/hw/xwin/wincursor.c
@@ -30,7 +30,7 @@
* Peter Busch
* Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/wincursor.c,v 1.5 2002/07/05 09:19:26 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/wincursor.c,v 1.6 2003/07/29 21:25:17 dawes Exp $ */
#include "win.h"
@@ -47,6 +47,21 @@ winPointerWarpCursor (ScreenPtr pScreen, int x, int y)
{
winScreenPriv(pScreen);
RECT rcClient;
+ static Bool s_fInitialWarp = TRUE;
+
+ /* Discard first warp call */
+ if (s_fInitialWarp)
+ {
+ /* First warp moves mouse to center of window, just ignore it */
+
+ /* Don't ignore subsequent warps */
+ s_fInitialWarp = FALSE;
+
+ ErrorF ("winPointerWarpCursor - Discarding first warp: %d %d\n",
+ x, y);
+
+ return;
+ }
/* Only update the Windows cursor position if we are active */
if (pScreenPriv->hwndScreen == GetForegroundWindow ())
diff --git a/hw/xwin/winengine.c b/hw/xwin/winengine.c
index aff90bdaf..d76e58628 100644
--- a/hw/xwin/winengine.c
+++ b/hw/xwin/winengine.c
@@ -27,12 +27,19 @@
*
* Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winengine.c,v 1.4 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winengine.c,v 1.5 2003/07/29 21:25:17 dawes Exp $ */
#include "win.h"
/*
+ * External global variables
+ */
+
+extern const GUID _IID_IDirectDraw4;
+
+
+/*
* Detect engines supported by current Windows version
* DirectDraw version and hardware
*/
diff --git a/hw/xwin/winerror.c b/hw/xwin/winerror.c
index c18f10dde..8a1e0df85 100644
--- a/hw/xwin/winerror.c
+++ b/hw/xwin/winerror.c
@@ -27,29 +27,21 @@
*
* Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winerror.c,v 1.4 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winerror.c,v 1.6 2003/10/02 13:30:10 eich Exp $ */
#include "win.h"
-extern FILE *g_pfLog;
-
#ifdef DDXOSVERRORF
void
OsVendorVErrorF (const char *pszFormat, va_list va_args)
{
static pthread_mutex_t s_pmPrinting = PTHREAD_MUTEX_INITIALIZER;
- /* Check we opened the log file first */
- if (g_pfLog == NULL) return;
-
/* Lock the printing mutex */
pthread_mutex_lock (&s_pmPrinting);
/* Print the error message to a log file, could be stderr */
- vfprintf (g_pfLog, pszFormat, va_args);
-
- /* Flush after every write, to make updates show up quickly */
- fflush (g_pfLog);
+ LogVWrite(0, pszFormat, va_args);
/* Unlock the printing mutex */
pthread_mutex_unlock (&s_pmPrinting);
diff --git a/hw/xwin/winfillsp.c b/hw/xwin/winfillsp.c
index faf9c67fc..9ac536274 100644
--- a/hw/xwin/winfillsp.c
+++ b/hw/xwin/winfillsp.c
@@ -26,11 +26,27 @@
*from the XFree86 Project.
*
* Authors: Harold L Hunt II
+ * Alan Hourihane <alanh@fairlite.demon.co.uk>
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winfillsp.c,v 1.9 2001/11/01 12:19:40 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winfillsp.c,v 1.10 2003/08/07 23:47:58 alanh Exp $ */
#include "win.h"
+extern void ROP16(HDC hdc, int rop);
+
+#define TRANSLATE_COLOR(color) \
+{ \
+ if (pDrawable->depth == 15) \
+ color = ((color & 0x1F) << 19) | ((color & 0x03E0) << 6) | \
+ ((color & 0xF800) >> 8); \
+ else if (pDrawable->depth == 16) \
+ color = ((color & 0x1F) << 19) | ((color & 0x07E0) << 5) | \
+ ((color & 0xF800) >> 8); \
+ else if (pDrawable->depth == 24 || pDrawable->depth == 32) \
+ color = ((color & 0xFF) << 16) | (color & 0xFF00) | \
+ ((color & 0xFF0000) >> 16); \
+}
+
/* See Porting Layer Definition - p. 54 */
void
winFillSpansNativeGDI (DrawablePtr pDrawable,
@@ -41,87 +57,57 @@ winFillSpansNativeGDI (DrawablePtr pDrawable,
int fSorted)
{
winGCPriv(pGC);
- int iSpan;
- DDXPointPtr pPoint = NULL;
- int *piWidth = 0;
HBITMAP hbmpOrig = NULL, hbmpOrigStipple = NULL;
+ HBITMAP hPenOrig = NULL;
+ HBITMAP hBitmap = NULL;
PixmapPtr pPixmap = NULL;
winPrivPixmapPtr pPixmapPriv = NULL;
- HBITMAP hbmpFilledStipple = NULL, hbmpMaskedForeground = NULL;
PixmapPtr pStipple = NULL;
winPrivPixmapPtr pStipplePriv = NULL;
PixmapPtr pTile = NULL;
winPrivPixmapPtr pTilePriv = NULL;
- HBRUSH hbrushStipple = NULL;
- HDC hdcStipple = NULL;
- BYTE *pbbitsFilledStipple = NULL;
+ HDC hdcStipple = NULL, hdcTile = NULL;
+ HPEN hPen = NULL;
int iX;
- DEBUG_FN_NAME("winFillSpans");
- DEBUGVARS;
- DEBUGPROC_MSG;
+ int fg, bg;
+ RegionPtr pClip = pGC->pCompositeClip;
+ BoxPtr pextent, pbox;
+ int nbox;
+ int extentX1, extentX2, extentY1, extentY2;
+ int fullX1, fullX2, fullY1;
+ HRGN hrgn = NULL, combined = NULL;
+
+ nbox = REGION_NUM_RECTS (pClip);
+ pbox = REGION_RECTS (pClip);
+
+ if (!nbox) return;
+
+ combined = CreateRectRgn (pbox->x1, pbox->y1, pbox->x2, pbox->y2);
+ nbox--; pbox++;
+
+ while (nbox--)
+ {
+ hrgn = CreateRectRgn (pbox->x1, pbox->y1, pbox->x2, pbox->y2);
+ CombineRgn (combined, combined, hrgn, RGN_OR);
+ DeleteObject (hrgn);
+ hrgn = NULL;
+ pbox++;
+ }
+
+ pextent = REGION_EXTENTS (pGC->pScreen, pClip);
+ extentX1 = pextent->x1;
+ extentY1 = pextent->y1;
+ extentX2 = pextent->x2;
+ extentY2 = pextent->y2;
/* Branch on the type of drawable we have */
switch (pDrawable->type)
{
case DRAWABLE_PIXMAP:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP\n");
-#if 0
- /* Branch on the raster operation type */
- switch (pGC->alu)
- {
- case GXclear:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - GXclear\n");
- break;
- case GXand:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - GXand\n");
- break;
- case GXandReverse:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - GXandReverse\n");
- break;
- case GXcopy:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - GXcopy\n");
- break;
- case GXandInverted:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - GXandInverted\n");
- break;
- case GXnoop:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - GXnoop\n");
- break;
- case GXxor:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - GXxor\n");
- break;
- case GXor:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - GXor\n");
- break;
- case GXnor:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - GXnor\n");
- break;
- case GXequiv:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - GXequiv\n");
- break;
- case GXinvert:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - GXinvert\n");
- break;
- case GXorReverse:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - GXorReverse\n");
- break;
- case GXcopyInverted:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - GXcopyInverted\n");
- break;
- case GXorInverted:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - GXorInverted\n");
- break;
- case GXnand:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - GXnand\n");
- break;
- case GXset:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - GXset\n");
- break;
- default:
- FatalError ("winFillSpans - DRAWABLE_PIXMAP - Unknown ROP\n");
- break;
- }
-#endif
+
+ SelectClipRgn (pGCPriv->hdcMem, combined);
+ DeleteObject (combined);
+ combined = NULL;
/* Get a pixmap pointer from the drawable pointer, and fetch privates */
pPixmap = (PixmapPtr) pDrawable;
@@ -131,268 +117,639 @@ winFillSpansNativeGDI (DrawablePtr pDrawable,
hbmpOrig = SelectObject (pGCPriv->hdcMem, pPixmapPriv->hBitmap);
if (hbmpOrig == NULL)
FatalError ("winFillSpans - DRAWABLE_PIXMAP - "
- "SelectObject () failed on pPixmapPriv->hBitmap\n");
+ "SelectObject () failed on\n\tpPixmapPriv->hBitmap: "
+ "%08x\n", pPixmapPriv->hBitmap);
/* Branch on the fill type */
switch (pGC->fillStyle)
{
case FillSolid:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - FillSolid %08x\n",
- pDrawable);
-
- /*
- * REMOVE - Visual verification only.
- */
- BitBlt (pGCPriv->hdc,
- pDrawable->width, pDrawable->height,
- pDrawable->width, pDrawable->height,
- pGCPriv->hdcMem,
- 0, 0,
- SRCCOPY);
- DEBUG_MSG ("FillSolid - Original bitmap");
-
- /* Enumerate spans */
- for (iSpan = 0; iSpan < iSpans; ++iSpan)
+
+ ROP16 (pGCPriv->hdcMem, pGC->alu);
+
+ if (pDrawable->depth == 1)
{
- /* Get pointers to the current span location and width */
- pPoint = pPoints + iSpan;
- piWidth = piWidths + iSpan;
-
- /* Display some useful information */
- ErrorF ("(%dx%dx%d) (%d,%d) fg: %d bg: %d w: %d\n",
- pDrawable->width, pDrawable->height, pDrawable->depth,
- pPoint->x, pPoint->y,
- pGC->fgPixel, pGC->bgPixel,
- *piWidth);
-
- /* Draw the requested line */
- MoveToEx (pGCPriv->hdcMem, pPoint->x, pPoint->y, NULL);
- LineTo (pGCPriv->hdcMem, pPoint->x + *piWidth, pPoint->y);
+ if (pGC->fgPixel == 0)
+ hPenOrig = SelectObject (pGCPriv->hdcMem,
+ GetStockObject (BLACK_PEN));
+ else
+ hPenOrig = SelectObject (pGCPriv->hdcMem,
+ GetStockObject (WHITE_PEN));
+ }
+ else
+ {
+ fg = pGC->fgPixel;
+ TRANSLATE_COLOR (fg);
+ hPen = CreatePen (PS_SOLID, 0, fg);
+ hPenOrig = SelectObject (pGCPriv->hdcMem, hPen);
+ }
+
+ while (iSpans--)
+ {
+ fullX1 = pPoints->x;
+ fullY1 = pPoints->y;
+ fullX2 = fullX1 + (int) *piWidths;
+ pPoints++;
+ piWidths++;
+
+ if (fullY1 < extentY1 || extentY2 <= fullY1)
+ continue;
+
+ if (fullX1 < extentX1)
+ fullX1 = extentX1;
+ if (fullX2 > extentX2)
+ fullX2 = extentX2;
+
+ if (fullX1 >= fullX2)
+ continue;
+
+ MoveToEx (pGCPriv->hdcMem, fullX1, fullY1, NULL);
+ LineTo (pGCPriv->hdcMem, fullX2, fullY1);
}
- /*
- * REMOVE - Visual verification only.
- */
- BitBlt (pGCPriv->hdc,
- pDrawable->width * 2, pDrawable->height,
- pDrawable->width, pDrawable->height,
- pGCPriv->hdcMem,
- 0, 0,
- SRCCOPY);
- DEBUG_MSG ("FillSolid - Filled bitmap");
-
-
- /* Push the drawable pixmap out of the GC HDC */
- SelectObject (pGCPriv->hdcMem, hbmpOrig);
- break;
+ SetROP2 (pGCPriv->hdcMem, R2_COPYPEN);
- case FillStippled:
- ErrorF ("winFillSpans - DRAWABLE_PIXMAP - FillStippled %08x\n",
- pDrawable);
+ /* Give back the Pen */
+ SelectObject (pGCPriv->hdcMem, hPenOrig);
- /*
- * FIXME: Assuming that pGC->patOrg.x = pGC->patOrg.y = 0
- */
+ if (pDrawable->depth != 1)
+ DeleteObject (hPen);
+ break;
+
+ case FillOpaqueStippled:
pStipple = pGC->stipple;
pStipplePriv = winGetPixmapPriv (pStipple);
- /* Create a memory DC to hold the stipple */
- hdcStipple = CreateCompatibleDC (pGCPriv->hdc);
+ /* Create a device-dependent bitmap for the stipple */
+ hBitmap = CreateDIBitmap (pGCPriv->hdcMem,
+ (BITMAPINFOHEADER *)pStipplePriv->pbmih,
+ CBM_INIT,
+ pStipplePriv->pbBits,
+ (BITMAPINFO *)pStipplePriv->pbmih,
+ DIB_RGB_COLORS);
- /* Create a destination sized compatible bitmap */
- hbmpFilledStipple = winCreateDIBNativeGDI (pDrawable->width,
- pDrawable->height,
- pDrawable->depth,
- &pbbitsFilledStipple,
- NULL);
+ /* Create a memory DC to hold the stipple */
+ hdcStipple = CreateCompatibleDC (pGCPriv->hdcMem);
/* Select the stipple bitmap into the stipple DC */
- hbmpOrigStipple = SelectObject (hdcStipple, hbmpFilledStipple);
+ hbmpOrigStipple = SelectObject (hdcStipple, hBitmap);
if (hbmpOrigStipple == NULL)
FatalError ("winFillSpans () - DRAWABLE_PIXMAP - FillStippled - "
- "SelectObject () failed on hbmpFilledStipple\n");
+ "SelectObject () failed on hbmpOrigStipple\n");
- /* Create a pattern brush from the original stipple */
- hbrushStipple = CreatePatternBrush (pStipplePriv->hBitmap);
+ /* Make a temporary copy of the foreground and background colors */
+ bg = pGC->bgPixel;
+ fg = pGC->fgPixel;
- /* Select the original stipple brush into the stipple DC */
- SelectObject (hdcStipple, hbrushStipple);
+ /* Translate the depth-dependent colors to Win32 COLORREFs */
+ TRANSLATE_COLOR (fg);
+ TRANSLATE_COLOR (bg);
+ SetTextColor (pGCPriv->hdcMem, fg);
+ SetBkColor (pGCPriv->hdcMem, bg);
- /* PatBlt the original stipple to the filled stipple */
- PatBlt (hdcStipple,
- 0, 0,
- pDrawable->width, pDrawable->height,
- PATCOPY);
+ while (iSpans--)
+ {
+ int width = pStipple->drawable.width;
+ fullX1 = pPoints->x;
+ fullY1 = pPoints->y;
+ fullX2 = fullX1 + (int) *piWidths;
+ pPoints++;
+ piWidths++;
+
+ if (fullY1 < extentY1 || extentY2 <= fullY1)
+ continue;
+
+ if (fullX1 < extentX1)
+ fullX1 = extentX1;
+ if (fullX2 > extentX2)
+ fullX2 = extentX2;
+
+ if (fullX1 >= fullX2)
+ continue;
+
+ for (iX = fullX1; iX < fullX2; iX += width)
+ {
+ int xoffset;
+
+ if ((iX + pStipple->drawable.width) > fullX2)
+ width = fullX2 - iX;
+ else
+ width = pStipple->drawable.width;
+
+ if (iX == fullX1)
+ xoffset = (fullX1 - (pDrawable->x + (pGC->patOrg.x % pStipple->drawable.width) - pStipple->drawable.width)) % pStipple->drawable.width;
+ else
+ xoffset = 0;
+
+ if (xoffset + width > pStipple->drawable.width)
+ width = pStipple->drawable.width - xoffset;
+
+ BitBlt (pGCPriv->hdcMem,
+ iX, fullY1,
+ width, 1,
+ hdcStipple,
+ xoffset,
+ (fullY1 - (pDrawable->y + (pGC->patOrg.y % pStipple->drawable.height) - pStipple->drawable.height)) % pStipple->drawable.height,
+ g_copyROP[pGC->alu]);
+ }
+ }
- /*
- * REMOVE - Visual verification only.
- */
- BitBlt (pGCPriv->hdc,
- pDrawable->width, 0,
- pDrawable->width, pDrawable->height,
- hdcStipple,
- 0, 0,
- SRCCOPY);
- DEBUG_MSG("Filled a drawable-sized stipple");
-
- /*
- * Mask out the bits from the drawable that are being preserved;
- * hbmpFilledStipple now contains the preserved original bits.
- */
- BitBlt (hdcStipple,
- 0, 0,
- pDrawable->width, pDrawable->height,
- pGCPriv->hdcMem,
- 0, 0,
- SRCERASE);
-
- /*
- * REMOVE - Visual verification only.
- */
- BitBlt (pGCPriv->hdc,
- pDrawable->width * 2, 0,
- pDrawable->width, pDrawable->height,
- hdcStipple,
- 0, 0,
- SRCCOPY);
- DEBUG_MSG("Preserved original bits");
-
- /*
- * Create a destination sized compatible bitmap to hold
- * the masked foreground color.
- */
- hbmpMaskedForeground = winCreateDIBNativeGDI (pDrawable->width,
- pDrawable->height,
- pDrawable->depth,
- NULL,
- NULL);
-
- /*
- * Select the masked foreground bitmap into the default memory DC;
- * this should pop the drawable bitmap out of the default DC.
- */
- if (SelectObject (pGCPriv->hdcMem, hbmpMaskedForeground) == NULL)
+ /* Clear the stipple HDC */
+ SelectObject (hdcStipple, hbmpOrigStipple);
+ DeleteDC (hdcStipple);
+
+ /* Delete the device dependent stipple bitmap */
+ DeleteObject (hBitmap);
+
+ break;
+ case FillStippled:
+
+ pStipple = pGC->stipple;
+ pStipplePriv = winGetPixmapPriv (pStipple);
+
+ /* Create a device-dependent bitmap for the stipple */
+ hBitmap = CreateDIBitmap (pGCPriv->hdcMem,
+ (BITMAPINFOHEADER *)pStipplePriv->pbmih,
+ CBM_INIT,
+ pStipplePriv->pbBits,
+ (BITMAPINFO *)pStipplePriv->pbmih,
+ DIB_RGB_COLORS);
+
+ /* Create a memory DC to hold the stipple */
+ hdcStipple = CreateCompatibleDC (pGCPriv->hdcMem);
+
+ /* Select the stipple bitmap into the stipple DC */
+ hbmpOrigStipple = SelectObject (hdcStipple, hBitmap);
+ if (hbmpOrigStipple == NULL)
FatalError ("winFillSpans () - DRAWABLE_PIXMAP - FillStippled - "
- "SelectObject () failed on hbmpMaskedForeground\n");
-
- /* Free the original drawable */
- DeleteObject (pPixmapPriv->hBitmap);
- pPixmapPriv->hBitmap = NULL;
- pPixmapPriv->pbBits = NULL;
-
- /* Select the stipple brush into the default memory DC */
- SelectObject (pGCPriv->hdcMem, hbrushStipple);
-
- /* Create the masked foreground bitmap using the original stipple */
- PatBlt (pGCPriv->hdcMem,
- 0, 0,
- pDrawable->width, pDrawable->height,
- PATCOPY);
-
- /*
- * REMOVE - Visual verification only.
- */
- BitBlt (pGCPriv->hdc,
- pDrawable->width * 3, 0,
- pDrawable->width, pDrawable->height,
- pGCPriv->hdcMem,
- 0, 0,
- SRCCOPY);
- DEBUG_MSG("Masked foreground bitmap");
-
- /*
- * Combine the masked foreground with the masked drawable;
- * hbmpFilledStipple will contain the drawable stipple filled
- * with the current foreground color
- */
- BitBlt (hdcStipple,
- 0, 0,
- pDrawable->width, pDrawable->height,
- pGCPriv->hdcMem,
- 0, 0,
- SRCPAINT);
-
- /*
- * REMOVE - Visual verification only.
+ "SelectObject () failed on hbmpOrigStipple\n");
+
+ /* Make a temporary copy of the foreground and background colors */
+ bg = pGC->bgPixel;
+ fg = pGC->fgPixel;
+
+ /* Translate the depth-dependent colors to Win32 COLORREFs */
+ TRANSLATE_COLOR (fg);
+ TRANSLATE_COLOR (bg);
+
+ /* this is fudgy, we should only invert on the last one
+ * We need to get the black/white pixels right in the
+ * colormap. But yeah ! it's working..
*/
- BitBlt (pGCPriv->hdc,
- pDrawable->width * 4, 0,
- pDrawable->width, pDrawable->height,
- hdcStipple,
- 0, 0,
- SRCCOPY);
- DEBUG_MSG("Completed stipple");
-
- /* Release the stipple DC */
- SelectObject (hdcStipple, hbmpOrig);
- DeleteDC (hdcStipple);
-
- /* Pop the stipple pattern brush out of the default mem DC */
- SelectObject (pGCPriv->hdcMem, GetStockObject (WHITE_BRUSH));
+ if (pGC->bgPixel != -1 && pGC->fgPixel != -1)
+ {
+ SetTextColor (pGCPriv->hdcMem, fg);
+ SetBkColor (pGCPriv->hdcMem, bg);
+ BitBlt (hdcStipple,
+ 0, 0,
+ pStipple->drawable.width, pStipple->drawable.height,
+ hdcStipple,
+ 0, 0,
+ 0x330008);
+ }
+ else if (pGC->bgPixel == -1)
+ {
+ SetTextColor (pGCPriv->hdcMem, fg);
+ SetBkMode (pGCPriv->hdcMem, TRANSPARENT);
+ BitBlt (hdcStipple,
+ 0, 0,
+ pStipple->drawable.width, pStipple->drawable.height,
+ hdcStipple,
+ 0, 0,
+ 0x330008);
+ }
+ else if (pGC->fgPixel == -1)
+ {
+ SetTextColor (pGCPriv->hdcMem, bg);
+ SetBkMode (pGCPriv->hdcMem, TRANSPARENT);
+#if 0
+ BitBlt (hdcStipple,
+ 0, 0,
+ pStipple->drawable.width, pStipple->drawable.height,
+ hdcStipple,
+ 0, 0,
+ 0x330008);
+#endif
+ }
- /* Destroy the original stipple pattern brush */
- DeleteObject (hbrushStipple);
+ while (iSpans--)
+ {
+ int width = pStipple->drawable.width;
+ fullX1 = pPoints->x;
+ fullY1 = pPoints->y;
+ fullX2 = fullX1 + (int) *piWidths;
+ pPoints++;
+ piWidths++;
+
+ if (fullY1 < extentY1 || extentY2 <= fullY1)
+ continue;
+
+ if (fullX1 < extentX1)
+ fullX1 = extentX1;
+ if (fullX2 > extentX2)
+ fullX2 = extentX2;
+
+ if (fullX1 >= fullX2)
+ continue;
+
+ for (iX = fullX1; iX < fullX2; iX += width)
+ {
+ int xoffset;
+
+ if ((iX + pStipple->drawable.width) > fullX2)
+ width = fullX2 - iX;
+ else
+ width = pStipple->drawable.width;
+
+ if (iX == fullX1)
+ xoffset = (fullX1 - (pDrawable->x + (pGC->patOrg.x % pStipple->drawable.width) - pStipple->drawable.width)) % pStipple->drawable.width;
+ else
+ xoffset = 0;
+
+ if (xoffset + width > pStipple->drawable.width)
+ width = pStipple->drawable.width - xoffset;
+
+ BitBlt (pGCPriv->hdcMem,
+ iX, fullY1,
+ width, 1,
+ hdcStipple,
+ xoffset,
+ (fullY1 - (pDrawable->y + (pGC->patOrg.y % pStipple->drawable.height) - pStipple->drawable.height)) % pStipple->drawable.height,
+ g_copyROP[pGC->alu]);
+ }
+ }
- /* Clear the memory DC */
- SelectObject (pGCPriv->hdcMem, hbmpOrig);
+ /* Clear the stipple HDC */
+ SelectObject (hdcStipple, hbmpOrigStipple);
+ DeleteDC (hdcStipple);
- /* Free the masked foreground bitmap */
- DeleteObject (hbmpMaskedForeground);
+ /* Delete the device dependent stipple bitmap */
+ DeleteObject (hBitmap);
- /* Point the drawable to the new bitmap */
- pPixmapPriv->hBitmap = hbmpFilledStipple;
- pPixmapPriv->pbBits = pbbitsFilledStipple;
+ /* Restore the background mode */
+ SetBkMode (pGCPriv->hdcMem, OPAQUE);
break;
case FillTiled:
- FatalError ("\nwinFillSpans - DRAWABLE_PIXMAP - FillTiled\n\n");
- break;
- case FillOpaqueStippled:
- FatalError ("winFillSpans - DRAWABLE_PIXMAP - OpaqueStippled\n");
+ /* Get a pixmap pointer from the tile pointer, and fetch privates */
+ pTile = (PixmapPtr) pGC->tile.pixmap;
+ pTilePriv = winGetPixmapPriv (pTile);
+
+ /* Create a memory DC to hold the tile */
+ hdcTile = CreateCompatibleDC (pGCPriv->hdcMem);
+
+ /* Select the tile into a DC */
+ hbmpOrig = SelectObject (hdcTile, pTilePriv->hBitmap);
+ if (hbmpOrig == NULL)
+ FatalError ("winFillSpans - DRAWABLE_PIXMAP - FillTiled - "
+ "SelectObject () failed on pTilePriv->hBitmap\n");
+
+ while (iSpans--)
+ {
+ int width = pTile->drawable.width;
+ fullX1 = pPoints->x;
+ fullY1 = pPoints->y;
+ fullX2 = fullX1 + (int) *piWidths;
+ pPoints++;
+ piWidths++;
+
+ if (fullY1 < extentY1 || extentY2 <= fullY1)
+ continue;
+
+ if (fullX1 < extentX1)
+ fullX1 = extentX1;
+ if (fullX2 > extentX2)
+ fullX2 = extentX2;
+
+ if (fullX1 >= fullX2)
+ continue;
+
+ for (iX = fullX1; iX < fullX2; iX += width)
+ {
+ int xoffset;
+
+ if ((iX + pTile->drawable.width) > fullX2)
+ width = fullX2 - iX;
+ else
+ width = pTile->drawable.width;
+
+ if (iX == fullX1)
+ xoffset = (fullX1 - (pDrawable->x + (pGC->patOrg.x % pTile->drawable.width) - pTile->drawable.width)) % pTile->drawable.width;
+ else
+ xoffset = 0;
+
+ if (xoffset + width > pTile->drawable.width)
+ width = pTile->drawable.width - xoffset;
+
+ BitBlt (pGCPriv->hdcMem,
+ iX, fullY1,
+ width, 1,
+ hdcTile,
+ xoffset,
+ (fullY1 - (pDrawable->y + (pGC->patOrg.y % pTile->drawable.height) - pTile->drawable.height)) % pTile->drawable.height,
+ g_copyROP[pGC->alu]);
+ }
+ }
+
+ /* Push the tile pixmap out of the memory HDC */
+ SelectObject (hdcTile, hbmpOrig);
+
+ /* Delete the tile */
+ DeleteDC (hdcTile);
break;
default:
- FatalError ("winFillSpans - DRAWABLE_PIXMAP - Unknown "
- "fillStyle\n");
+ ErrorF ("winFillSpans - DRAWABLE_PIXMAP - Unknown fillStyle\n");
break;
}
+
+ /* Reset clip region */
+ SelectClipRgn (pGCPriv->hdcMem, NULL);
+
+ /* Push the drawable pixmap out of the GC HDC */
+ SelectObject (pGCPriv->hdcMem, hbmpOrig);
break;
-
+
case DRAWABLE_WINDOW:
+
+ SelectClipRgn (pGCPriv->hdc, combined);
+ DeleteObject (combined);
+ combined = NULL;
+
/* Branch on fill style */
switch (pGC->fillStyle)
{
case FillSolid:
- ErrorF ("\nwinFillSpans - DRAWABLE_WINDOW - FillSolid\n\n");
- /* Enumerate spans */
- for (iSpan = 0; iSpan < iSpans; ++iSpan)
+ ROP16 (pGCPriv->hdc, pGC->alu);
+
+ if (pDrawable->depth == 1)
+ {
+ if (pGC->fgPixel == 0)
+ hPenOrig = SelectObject (pGCPriv->hdc,
+ GetStockObject (BLACK_PEN));
+ else
+ hPenOrig = SelectObject (pGCPriv->hdc,
+ GetStockObject (WHITE_PEN));
+ }
+ else
+ {
+ fg = pGC->fgPixel;
+ TRANSLATE_COLOR (fg);
+ hPen = CreatePen (PS_SOLID, 0, fg);
+ hPenOrig = SelectObject (pGCPriv->hdc, hPen);
+ }
+
+ while (iSpans--)
{
- /* Get pointers to the current span location and width */
- pPoint = pPoints + iSpan;
- piWidth = piWidths + iSpan;
-
- /* Display some useful information */
- ErrorF ("(%dx%dx%d) (%d,%d) fg: %d bg: %d w: %d\n",
- pDrawable->width, pDrawable->height, pDrawable->depth,
- pPoint->x, pPoint->y,
- pGC->fgPixel, pGC->bgPixel,
- *piWidth);
-
- /* Draw the requested line */
- MoveToEx (pGCPriv->hdc, pPoint->x, pPoint->y, NULL);
- LineTo (pGCPriv->hdc, pPoint->x + *piWidth, pPoint->y);
+ fullX1 = pPoints->x;
+ fullY1 = pPoints->y;
+ fullX2 = fullX1 + (int) *piWidths;
+ pPoints++;
+ piWidths++;
+
+ if (fullY1 < extentY1 || extentY2 <= fullY1)
+ continue;
+
+ if (fullX1 < extentX1)
+ fullX1 = extentX1;
+ if (fullX2 > extentX2)
+ fullX2 = extentX2;
+
+ if (fullX1 >= fullX2)
+ continue;
+
+ MoveToEx (pGCPriv->hdc, fullX1, fullY1, NULL);
+ LineTo (pGCPriv->hdc, fullX2, fullY1);
}
+
+ SetROP2 (pGCPriv->hdc, R2_COPYPEN);
+
+ /* Give back the Brush */
+ SelectObject (pGCPriv->hdc, hPenOrig);
+
+ if (pDrawable->depth != 1)
+ DeleteObject (hPen);
+ break;
+
+ case FillOpaqueStippled:
+
+ pStipple = pGC->stipple;
+ pStipplePriv = winGetPixmapPriv (pStipple);
+
+ /* Create a device-dependent bitmap for the stipple */
+ hBitmap = CreateDIBitmap (pGCPriv->hdc,
+ (BITMAPINFOHEADER *)pStipplePriv->pbmih,
+ CBM_INIT,
+ pStipplePriv->pbBits,
+ (BITMAPINFO *)pStipplePriv->pbmih,
+ DIB_RGB_COLORS);
+
+ /* Create a memory DC to hold the stipple */
+ hdcStipple = CreateCompatibleDC (pGCPriv->hdc);
+
+ /* Select the stipple bitmap into the stipple DC */
+ hbmpOrigStipple = SelectObject (hdcStipple, hBitmap);
+ if (hbmpOrigStipple == NULL)
+ FatalError ("winFillSpans () - DRAWABLE_PIXMAP - FillStippled - "
+ "SelectObject () failed on hbmpOrigStipple\n");
+
+ /* Make a temporary copy of the foreground and background colors */
+ bg = pGC->bgPixel;
+ fg = pGC->fgPixel;
+
+ /* Translate the depth-dependent colors to Win32 COLORREFs */
+ TRANSLATE_COLOR (fg);
+ TRANSLATE_COLOR (bg);
+ SetTextColor (pGCPriv->hdc, fg);
+ SetBkColor (pGCPriv->hdc, bg);
+
+ while (iSpans--)
+ {
+ int width = pStipple->drawable.width;
+ fullX1 = pPoints->x;
+ fullY1 = pPoints->y;
+ fullX2 = fullX1 + (int) *piWidths;
+ pPoints++;
+ piWidths++;
+
+ if (fullY1 < extentY1 || extentY2 <= fullY1)
+ continue;
+
+ if (fullX1 < extentX1)
+ fullX1 = extentX1;
+ if (fullX2 > extentX2)
+ fullX2 = extentX2;
+
+ if (fullX1 >= fullX2)
+ continue;
+
+ for (iX = fullX1; iX < fullX2; iX += width)
+ {
+ int xoffset;
+
+ if ((iX + pStipple->drawable.width) > fullX2)
+ width = fullX2 - iX;
+ else
+ width = pStipple->drawable.width;
+
+ if (iX == fullX1)
+ xoffset = (fullX1 - (pDrawable->x + (pGC->patOrg.x % pStipple->drawable.width) - pStipple->drawable.width)) % pStipple->drawable.width;
+ else
+ xoffset = 0;
+
+ if (xoffset + width > pStipple->drawable.width)
+ width = pStipple->drawable.width - xoffset;
+
+ BitBlt (pGCPriv->hdc,
+ iX, fullY1,
+ width, 1,
+ hdcStipple,
+ xoffset,
+ (fullY1 - (pDrawable->y + (pGC->patOrg.y % pStipple->drawable.height) - pStipple->drawable.height)) % pStipple->drawable.height,
+ g_copyROP[pGC->alu]);
+ }
+ }
+
+ /* Clear the stipple HDC */
+ SelectObject (hdcStipple, hbmpOrigStipple);
+ DeleteDC (hdcStipple);
+
+ /* Delete the device dependent stipple bitmap */
+ DeleteObject (hBitmap);
+
break;
case FillStippled:
- FatalError ("winFillSpans - DRAWABLE_WINDOW - FillStippled\n\n");
+ pStipple = pGC->stipple;
+ pStipplePriv = winGetPixmapPriv (pStipple);
+
+ /* Create a device-dependent bitmap for the stipple */
+ hBitmap = CreateDIBitmap (pGCPriv->hdcMem,
+ (BITMAPINFOHEADER *)pStipplePriv->pbmih,
+ CBM_INIT,
+ pStipplePriv->pbBits,
+ (BITMAPINFO *)pStipplePriv->pbmih,
+ DIB_RGB_COLORS);
+
+ /* Create a memory DC to hold the stipple */
+ hdcStipple = CreateCompatibleDC (pGCPriv->hdc);
+
+ /* Select the stipple bitmap into the stipple DC */
+ hbmpOrigStipple = SelectObject (hdcStipple, hBitmap);
+ if (hbmpOrigStipple == NULL)
+ FatalError ("winFillSpans () - DRAWABLE_PIXMAP - FillStippled - "
+ "SelectObject () failed on hbmpOrigStipple\n");
+
+ /* Make a temporary copy of the foreground and background colors */
+ bg = pGC->bgPixel;
+ fg = pGC->fgPixel;
+
+ /* Translate the depth-dependent colors to Win32 COLORREFs */
+ TRANSLATE_COLOR (fg);
+ TRANSLATE_COLOR (bg);
+
+ /* this is fudgy, we should only invert on the last one
+ * We need to get the black/white pixels right in the
+ * colormap. But yeah ! it's working..
+ */
+ if (pGC->bgPixel != -1 && pGC->fgPixel != -1)
+ {
+ SetTextColor (pGCPriv->hdc, fg);
+ SetBkColor (pGCPriv->hdc, bg);
+ BitBlt (hdcStipple,
+ 0, 0,
+ pStipple->drawable.width, pStipple->drawable.height,
+ hdcStipple,
+ 0,0,
+ 0x330008);
+ }
+ else if (pGC->bgPixel == -1)
+ {
+ SetTextColor (pGCPriv->hdc, fg);
+ SetBkMode (pGCPriv->hdc, TRANSPARENT);
+ BitBlt (hdcStipple,
+ 0, 0,
+ pStipple->drawable.width, pStipple->drawable.height,
+ hdcStipple,
+ 0,0,
+ 0x330008);
+ }
+ else if (pGC->fgPixel == -1)
+ {
+ SetTextColor (pGCPriv->hdc, bg);
+ SetBkMode (pGCPriv->hdc, TRANSPARENT);
+#if 0
+ BitBlt (hdcStipple,
+ 0, 0,
+ pStipple->drawable.width, pStipple->drawable.height,
+ hdcStipple,
+ 0, 0,
+ 0x330008);
+#endif
+ }
+
+ while (iSpans--)
+ {
+ int width = pStipple->drawable.width;
+ fullX1 = pPoints->x;
+ fullY1 = pPoints->y;
+ fullX2 = fullX1 + (int) *piWidths;
+ pPoints++;
+ piWidths++;
+
+ if (fullY1 < extentY1 || extentY2 <= fullY1)
+ continue;
+
+ if (fullX1 < extentX1)
+ fullX1 = extentX1;
+ if (fullX2 > extentX2)
+ fullX2 = extentX2;
+
+ if (fullX1 >= fullX2)
+ continue;
+
+ for (iX = fullX1; iX < fullX2; iX += width)
+ {
+ int xoffset;
+
+ if ((iX + pStipple->drawable.width) > fullX2)
+ width = fullX2 - iX;
+ else
+ width = pStipple->drawable.width;
+
+ if (iX == fullX1)
+ xoffset = (fullX1 - (pDrawable->x + (pGC->patOrg.x % pStipple->drawable.width) - pStipple->drawable.width)) % pStipple->drawable.width;
+ else
+ xoffset = 0;
+
+ if (xoffset + width > pStipple->drawable.width)
+ width = pStipple->drawable.width - xoffset;
+
+ BitBlt (pGCPriv->hdc,
+ iX, fullY1,
+ width, 1,
+ hdcStipple,
+ xoffset,
+ (fullY1 - (pDrawable->y + (pGC->patOrg.y % pStipple->drawable.height) - pStipple->drawable.height)) % pStipple->drawable.height,
+ g_copyROP[pGC->alu]);
+ }
+ }
+
+ /* Clear the stipple HDC */
+ SelectObject (hdcStipple, hbmpOrigStipple);
+ DeleteDC (hdcStipple);
+
+ /* Delete the device dependent stipple bitmap */
+ DeleteObject (hBitmap);
+
+ /* Restore the background mode */
+ SetBkMode (pGCPriv->hdc, OPAQUE);
break;
case FillTiled:
- ErrorF ("\nwinFillSpans - DRAWABLE_WINDOW - FillTiled\n\n");
/* Get a pixmap pointer from the tile pointer, and fetch privates */
pTile = (PixmapPtr) pGC->tile.pixmap;
@@ -402,136 +759,105 @@ winFillSpansNativeGDI (DrawablePtr pDrawable,
hbmpOrig = SelectObject (pGCPriv->hdcMem, pTilePriv->hBitmap);
if (hbmpOrig == NULL)
FatalError ("winFillSpans - DRAWABLE_WINDOW - FillTiled - "
- "SelectObject () failed on pTilePric->hBitmap\n");
+ "SelectObject () failed on pTilePriv->hBitmap\n");
- /* Enumerate spans */
- for (iSpan = 0; iSpan < iSpans; ++iSpan)
+ while (iSpans--)
{
- /* Get pointers to the current span location and width */
- pPoint = pPoints + iSpan;
- piWidth = piWidths + iSpan;
-
- for (iX = 0; iX < *piWidth; iX += pTile->drawable.width)
- {
- /* Blit the tile to the screen, one line at a time */
+ int width = pTile->drawable.width;
+ fullX1 = pPoints->x;
+ fullY1 = pPoints->y;
+ fullX2 = fullX1 + (int) *piWidths;
+ pPoints++;
+ piWidths++;
+
+ if (fullY1 < extentY1 || extentY2 <= fullY1)
+ continue;
+
+ if (fullX1 < extentX1)
+ fullX1 = extentX1;
+ if (fullX2 > extentX2)
+ fullX2 = extentX2;
+
+ if (fullX1 >= fullX2)
+ continue;
+
+ for (iX = fullX1; iX < fullX2; iX += width)
+ {
+ int xoffset;
+
+ if ((iX + pTile->drawable.width) > fullX2)
+ width = fullX2 - iX;
+ else
+ width = pTile->drawable.width;
+
+ if (iX == fullX1)
+ xoffset = (fullX1 - (pDrawable->x + (pGC->patOrg.x % pTile->drawable.width) - pTile->drawable.width)) % pTile->drawable.width;
+ else
+ xoffset = 0;
+
+ if (xoffset + width > pTile->drawable.width)
+ width = pTile->drawable.width - xoffset;
+
BitBlt (pGCPriv->hdc,
- pPoint->x + iX, pPoint->y,
- pTile->drawable.width, 1,
+ iX, fullY1,
+ width, 1,
pGCPriv->hdcMem,
- 0, pPoint->y % pTile->drawable.height,
- SRCCOPY);
+ xoffset,
+ (fullY1 - (pDrawable->y + (pGC->patOrg.y % pTile->drawable.height) - pTile->drawable.height)) % pTile->drawable.height,
+ g_copyROP[pGC->alu]);
}
}
-
- /* Push the drawable pixmap out of the GC HDC */
- SelectObject (pGCPriv->hdcMem, hbmpOrig);
-
-#if 0
- DEBUG_MSG("Completed tile fill");
-#endif
- break;
- case FillOpaqueStippled:
- FatalError ("winFillSpans - DRAWABLE_WINDOW - "
- "OpaqueStippled\n");
+ /* Push the tile pixmap out of the memory HDC */
+ SelectObject (pGCPriv->hdcMem, hbmpOrig);
break;
default:
- FatalError ("winFillSpans - DRAWABLE_WINDOW - Unknown "
- "fillStyle\n");
- }
-
- /* Branch on the raster operation type */
- switch (pGC->alu)
- {
- case GXclear:
- ErrorF ("winFillSpans - DRAWABLE_WINDOW - GXclear\n");
- break;
- case GXand:
- ErrorF ("winFillSpans - DRAWABLE_WINDOW - GXand\n");
- break;
- case GXandReverse:
- ErrorF ("winFillSpans - DRAWABLE_WINDOW - GXandReverse\n");
- break;
- case GXcopy:
- ErrorF ("winFillSpans - DRAWABLE_WINDOW - GXcopy\n");
- break;
- case GXandInverted:
- ErrorF ("winFillSpans - DRAWABLE_WINDOW - GXandInverted\n");
- break;
- case GXnoop:
- ErrorF ("winFillSpans - DRAWABLE_WINDOW - GXnoop\n");
- break;
- case GXxor:
- ErrorF ("winFillSpans - DRAWABLE_WINDOW - GXxor\n");
- break;
- case GXor:
- ErrorF ("winFillSpans - DRAWABLE_WINDOW - GXor\n");
- break;
- case GXnor:
- ErrorF ("winFillSpans - DRAWABLE_WINDOW - GXnor\n");
- break;
- case GXequiv:
- ErrorF ("winFillSpans - DRAWABLE_WINDOW - GXequiv\n");
- break;
- case GXinvert:
- ErrorF ("winFillSpans - DRAWABLE_WINDOW - GXinvert\n");
- break;
- case GXorReverse:
- ErrorF ("winFillSpans - DRAWABLE_WINDOW - GXorReverse\n");
- break;
- case GXcopyInverted:
- ErrorF ("winFillSpans - DRAWABLE_WINDOW - GXcopyInverted\n");
- break;
- case GXorInverted:
- ErrorF ("winFillSpans - DRAWABLE_WINDOW - GXorInverted\n");
- break;
- case GXnand:
- ErrorF ("winFillSpans - DRAWABLE_WINDOW - GXnand\n");
- break;
- case GXset:
- ErrorF ("winFillSpans - DRAWABLE_WINDOW - GXset\n");
- break;
- default:
- ErrorF ("winFillSpans - DRAWABLE_WINDOW - Unknown ROP\n");
+ ErrorF ("winFillSpans - DRAWABLE_WINDOW - Unknown fillStyle\n");
break;
}
+
+ /* Reset clip region */
+ SelectClipRgn (pGCPriv->hdc, NULL);
break;
-
- case UNDRAWABLE_WINDOW:
- FatalError ("winFillSpans - UNDRAWABLE_WINDOW\n\n");
+ case UNDRAWABLE_WINDOW:
+ /* UNDRAWABLE_WINDOW doesn't appear to get called when running xterm */
switch (pGC->fillStyle)
{
case FillSolid:
- ErrorF ("\nwinFillSpans - UNDRAWABLE_WINDOW - FillSolid\n\n");
+ ErrorF ("winFillSpans - UNDRAWABLE_WINDOW - FillSolid - "
+ "Unimplemented\n");
break;
case FillStippled:
- ErrorF ("\nwinFillSpans - UNDRAWABLE_WINDOW - FillStippled\n\n");
+ ErrorF ("winFillSpans - UNDRAWABLE_WINDOW - FillStippled - "
+ "Unimplemented\n");
break;
case FillTiled:
- ErrorF ("\nwinFillSpans - UNDRAWABLE_WINDOW - FillTiled\n\n");
+ ErrorF ("winFillSpans - UNDRAWABLE_WINDOW - FillTiled - "
+ "Unimplemented\n");
break;
case FillOpaqueStippled:
- FatalError ("winFillSpans () - UNDRAWABLE_WINDOW - "
- "OpaqueStippled\n");
+ ErrorF ("winFillSpans - UNDRAWABLE_WINDOW - OpaqueStippled - "
+ "Unimplemented\n");
break;
default:
- FatalError ("winFillSpans () - UNDRAWABLE_WINDOW - Unknown "
- "fillStyle\n");
+ ErrorF ("winFillSpans - UNDRAWABLE_WINDOW - Unknown fillStyle\n");
+ break;
}
break;
case DRAWABLE_BUFFER:
- FatalError ("winFillSpansNativeGDI - DRAWABLE_BUFFER\n");
+ /* DRAWABLE_BUFFER seems to be undocumented. */
+ ErrorF ("winFillSpans - DRAWABLE_BUFFER - Unimplemented\n");
break;
default:
- FatalError ("winFillSpansNativeGDI - Unknown drawable type\n");
+ ErrorF ("winFillSpans - Unknown drawable type\n");
break;
}
}
diff --git a/hw/xwin/winfont.c b/hw/xwin/winfont.c
index b249d8643..97bd7967b 100644
--- a/hw/xwin/winfont.c
+++ b/hw/xwin/winfont.c
@@ -27,7 +27,7 @@
*
* Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winfont.c,v 1.2 2001/06/04 13:04:41 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winfont.c,v 1.3 2003/08/07 23:47:58 alanh Exp $ */
#include "win.h"
@@ -36,7 +36,9 @@
Bool
winRealizeFontNativeGDI (ScreenPtr pScreen, FontPtr pFont)
{
+#if CYGDEBUG
ErrorF ("winRealizeFont()\n");
+#endif
return TRUE;
}
@@ -45,6 +47,8 @@ winRealizeFontNativeGDI (ScreenPtr pScreen, FontPtr pFont)
Bool
winUnrealizeFontNativeGDI (ScreenPtr pScreen, FontPtr pFont)
{
+#if CYGDEBUG
ErrorF ("winUnrealizeFont()\n");
+#endif
return TRUE;
}
diff --git a/hw/xwin/wingc.c b/hw/xwin/wingc.c
index 6ad58d8ed..a4e2a53cb 100644
--- a/hw/xwin/wingc.c
+++ b/hw/xwin/wingc.c
@@ -27,9 +27,11 @@
*
* Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/wingc.c,v 1.10 2001/10/30 15:39:09 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/wingc.c,v 1.11 2003/08/07 23:47:58 alanh Exp $ */
#include "win.h"
+void
+winPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable, int dx, int dy, int xOrg, int yOrg);
#if 0
/* GC Handling Routines */
@@ -45,8 +47,8 @@ const GCFuncs winGCFuncs = {
#else
const GCFuncs winGCFuncs = {
winValidateGCNativeGDI,
- winChangeGCNativeGDI,
- winCopyGCNativeGDI,
+ miChangeGC,
+ miCopyGC,
winDestroyGCNativeGDI,
miChangeClip,
miDestroyClip,
@@ -73,9 +75,14 @@ const GCOps winGCOps = {
miPolyText16,
miImageText8,
miImageText16,
+#if 0
+ winImageGlyphBltNativeGDI,
+ winPolyGlyphBltNativeGDI,
+#else
miImageGlyphBlt,
miPolyGlyphBlt,
- miPushPixels
+#endif
+ winPushPixels
#ifdef NEED_LINEHELPER
,NULL
#endif
@@ -91,23 +98,21 @@ winCreateGCNativeGDI (GCPtr pGC)
winPrivGCPtr pGCPriv = NULL;
winPrivScreenPtr pScreenPriv = NULL;
- ErrorF ("winCreateGCNativeGDI () depth: %d\n",
+#if 0
+ ErrorF ("winCreateGCNativeGDI - depth: %d\n",
pGC->depth);
+#endif
pGC->clientClip = NULL;
pGC->clientClipType = CT_NONE;
+ pGC->freeCompClip = FALSE;
+ pGC->pCompositeClip = 0;
pGC->ops = (GCOps *) &winGCOps;
pGC->funcs = (GCFuncs *) &winGCFuncs;
- /*
- * Setting miTranslate to 1 causes the coordinates passed to
- * FillSpans, GetSpans, and SetSpans to be screen relative, rather
- * than drawable relative.
- *
- * miTranslate was set to 0 prior to 2001-08-17.
- */
- pGC->miTranslate = 1;
+ /* We want all coordinates passed to spans functions to be screen relative */
+ pGC->miTranslate = TRUE;
/* Allocate privates for this GC */
pGCPriv = winGetGCPriv (pGC);
@@ -117,9 +122,9 @@ winCreateGCNativeGDI (GCPtr pGC)
return FALSE;
}
- /* Copy the screen DC to the local privates */
+ /* Create a new screen DC for the display window */
pScreenPriv = winGetScreenPriv (pGC->pScreen);
- pGCPriv->hdc = pScreenPriv->hdcScreen;
+ pGCPriv->hdc = GetDC (pScreenPriv->hwndScreen);
/* Allocate a memory DC for the GC */
pGCPriv->hdcMem = CreateCompatibleDC (pGCPriv->hdc);
@@ -132,7 +137,7 @@ winCreateGCNativeGDI (GCPtr pGC)
void
winChangeGCNativeGDI (GCPtr pGC, unsigned long ulChanges)
{
-#if CYGDEBUG
+#if 0
ErrorF ("winChangeGCNativeGDI () - Doing nothing\n");
#endif
}
@@ -143,225 +148,11 @@ winValidateGCNativeGDI (GCPtr pGC,
unsigned long ulChanges,
DrawablePtr pDrawable)
{
- winGCPriv(pGC);
- HBITMAP hbmpOrig = NULL;
- PixmapPtr pPixmap = NULL;
- winPrivPixmapPtr pPixmapPriv = NULL;
- RGBQUAD rgbColors[2] = {{0, 0, 0, 0}, {0, 0, 0, 0}};
- PixmapPtr pStipple = NULL;
- winPrivPixmapPtr pStipplePriv = NULL;
- int i;
- DEBUG_FN_NAME("winValidateGC");
- DEBUGVARS;
- DEBUGPROC_MSG;
-
- /* Branch on drawable type */
- switch (pDrawable->type)
- {
- case DRAWABLE_PIXMAP:
- /* Branch on the fill style */
- switch (pGC->fillStyle)
- {
- case FillSolid:
- ErrorF ("winValidateGC - DRAWABLE_PIXMAP - FillSolid\n");
-
- /* Select a stock pen */
- if (pDrawable->depth == 1 && pGC->fgPixel)
- {
- ErrorF ("winValidateGC - Selecting WHITE_PEN\n");
- SelectObject (pGCPriv->hdcMem, GetStockObject (WHITE_PEN));
- }
- else if (pDrawable->depth == 1 && !pGC->fgPixel)
- {
- ErrorF ("winValidateGC - Selecting BLACK_PEN\n");
- SelectObject (pGCPriv->hdcMem, GetStockObject (BLACK_PEN));
- }
- else if (pGC->fgPixel)
- {
- ErrorF ("winValidateGC - Selecting custom pen: %d\n",
- pGC->fgPixel);
- /*
- * FIXME: So far I've only seen a white pen selected here.
- */
-#if 1
- SelectObject (pGCPriv->hdcMem, GetStockObject (WHITE_PEN));
-#else
- /* FIXME: This leaks a pen */
- SelectObject (pGCPriv->hdcMem,
- CreatePen (PS_SOLID, 0, pGC->fgPixel));
-#endif
- }
- else
- {
- ErrorF ("winValidateGC - Selecting BLACK_PEN\n");
- SelectObject (pGCPriv->hdcMem, GetStockObject (BLACK_PEN));
- }
- break;
-
- case FillStippled:
- ErrorF ("winValidateGC - DRAWABLE_PIXMAP - FillStippled\n");
- /*
- * NOTE: Setting the brush color has no effect on DIB fills.
- * You need to set the stipple bitmap's color table instead.
- */
-#if 1
- /* Pick the white color index */
- if (pGC->fgPixel)
- i = 1;
- else
- i = 0;
-
- /* Set the white color, black is default */
- rgbColors[i].rgbRed = 255;
- rgbColors[i].rgbGreen = 255;
- rgbColors[i].rgbBlue = 255;
-
- /* Get stipple and privates pointers */
- pStipple = pGC->stipple;
- pStipplePriv = winGetPixmapPriv (pStipple);
-
- /* Select the stipple bitmap */
- hbmpOrig = SelectObject (pGCPriv->hdcMem, pStipplePriv->hBitmap);
-
- /* Set the stipple color table */
- SetDIBColorTable (pGCPriv->hdcMem, 0, 2, rgbColors);
-
- /* Pop the stipple out of the hdc */
- SelectObject (pGCPriv->hdcMem, hbmpOrig);
-
-#else
- /* Set the foreground color for the stipple fill */
- if (pGC->fgPixel == 0x1)
- {
- SetTextColor (pGCPriv->hdcMem, RGB(0x00, 0x00, 0x00));
- }
- else if (pGC->fgPixel == 0xFFFF)
- {
- SetTextColor (pGCPriv->hdcMem, RGB(0xFF, 0xFF, 0xFF));
- }
- else
- {
- SetTextColor (pGCPriv->hdcMem, RGB(0x00, 0x00, 0x00));
- }
- SetBkColor (pGCPriv->hdcMem, RGB(0x00, 0x00, 0x00));
-#endif
- break;
-
- case FillOpaqueStippled:
- FatalError ("winValidateGC - DRAWABLE_PIXMAP - "
- "FillOpaqueStippled\n");
- break;
-
- case FillTiled:
- FatalError ("winValidateGC - DRAWABLE_PIXMAP - FillTiled\n");
- break;
-
- default:
- FatalError ("winValidateGC - DRAWABLE_PIXMAP - Unknown fill "
- "style\n");
- break;
- }
- break;
-
- case DRAWABLE_WINDOW:
- /* Branch on the fill style */
- switch (pGC->fillStyle)
- {
- case FillTiled:
- ErrorF ("winValidateGC - DRAWABLE_WINDOW - FillTiled\n");
- /*
- * Do nothing here for now. Select the tile bitmap into the
- * appropriate DC in the drawing function.
- */
-
- /*
- * BEGIN REMOVE - Visual verification only.
- */
- /* Get pixmap and privates pointers for the tile */
- pPixmap = pGC->tile.pixmap;
- pPixmapPriv = winGetPixmapPriv (pPixmap);
-
- /* Push the tile into the GC's DC */
- hbmpOrig = SelectObject (pGCPriv->hdcMem, pPixmapPriv->hBitmap);
- if (hbmpOrig == NULL)
- FatalError ("winValidateGC - DRAWABLE_WINDOW - FillTiled - "
- "SelectObject () failed on pPixmapPriv->hBitmap\n");
-
- /* Blit the tile to a remote area of the screen */
- BitBlt (pGCPriv->hdc,
- 64, 64,
- pGC->tile.pixmap->drawable.width,
- pGC->tile.pixmap->drawable.height,
- pGCPriv->hdcMem,
- 0, 0,
- SRCCOPY);
- DEBUG_MSG ("Blitted the tile to a remote area of the screen");
-
- /* Pop the tile out of the GC's DC */
- SelectObject (pGCPriv->hdcMem, hbmpOrig);
- /*
- * END REMOVE - Visual verification only.
- */
- break;
-
- case FillStippled:
- FatalError ("winValidateGC - DRAWABLE_WINDOW - FillStippled\n");
- break;
-
- case FillOpaqueStippled:
- FatalError ("winValidateGC - DRAWABLE_WINDOW - "
- "FillOpaqueStippled\n");
- break;
-
- case FillSolid:
- ErrorF ("winValidateGC - DRAWABLE_WINDOW - FillSolid\n");
-
- /* Select a stock pen */
- if (pDrawable->depth == 1 && pGC->fgPixel)
- {
- ErrorF ("winValidateGC - Selecting WHITE_PEN\n");
- SelectObject (pGCPriv->hdc, GetStockObject (WHITE_PEN));
- }
- else if (pDrawable->depth == 1 && !pGC->fgPixel)
- {
- ErrorF ("winValidateGC - Selecting BLACK_PEN\n");
- SelectObject (pGCPriv->hdc, GetStockObject (BLACK_PEN));
- }
- else if (pGC->fgPixel)
- {
- ErrorF ("winValidateGC - Selecting custom pen: %d\n",
- pGC->fgPixel);
- /*
- * FIXME: So far I've only seen a white pen selected here.
- */
- SelectObject (pGCPriv->hdc, GetStockObject (WHITE_PEN));
- }
- else
- {
- ErrorF ("winValidateGC - Selecting BLACK_PEN\n");
- SelectObject (pGCPriv->hdc, GetStockObject (BLACK_PEN));
- }
- break;
-
- default:
- FatalError ("winValidateGC - DRAWABLE_WINDOW - Unknown fill "
- "style\n");
- break;
- }
- break;
-
- case UNDRAWABLE_WINDOW:
- ErrorF ("\nwinValidateGC - UNDRAWABLE_WINDOW\n\n");
- break;
-
- case DRAWABLE_BUFFER:
- FatalError ("winValidateGC - DRAWABLE_BUFFER\n");
- break;
-
- default:
- FatalError ("winValidateGC - Unknown drawable type\n");
- break;
- }
+ if ((ulChanges & (GCClipXOrigin | GCClipYOrigin | GCClipMask | GCSubwindowMode))
+ || (pDrawable->serialNumber != (pGC->serialNumber & DRAWABLE_SERIAL_BITS)))
+ {
+ miComputeCompositeClip (pGC, pDrawable);
+ }
}
@@ -378,6 +169,10 @@ void
winDestroyGCNativeGDI (GCPtr pGC)
{
winGCPriv(pGC);
+ winScreenPriv(pGC->pScreen);
+
+ if (pGC->freeCompClip)
+ REGION_DESTROY (pGC->pScreen, pGC->pCompositeClip);
/* Free the memory DC */
if (pGCPriv->hdcMem != NULL)
@@ -386,8 +181,12 @@ winDestroyGCNativeGDI (GCPtr pGC)
pGCPriv->hdcMem = NULL;
}
- /* Invalidate the screen DC pointer */
- pGCPriv->hdc = NULL;
+ /* Release the screen DC for the display window */
+ if (pGCPriv->hdc != NULL)
+ {
+ ReleaseDC (pScreenPriv->hwndScreen, pGCPriv->hdc);
+ pGCPriv->hdc = NULL;
+ }
/* Invalidate the GC privates pointer */
winSetGCPriv (pGC, NULL);
diff --git a/hw/xwin/wingetsp.c b/hw/xwin/wingetsp.c
index 637debb9e..49ba7f2fb 100644
--- a/hw/xwin/wingetsp.c
+++ b/hw/xwin/wingetsp.c
@@ -26,8 +26,9 @@
*from the XFree86 Project.
*
* Authors: Harold L Hunt II
+ * Alan Hourihane <alanh@fairlite.demon.co.uk>
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/wingetsp.c,v 1.7 2001/11/01 12:19:40 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/wingetsp.c,v 1.8 2003/08/07 23:47:58 alanh Exp $ */
#include "win.h"
@@ -46,107 +47,132 @@ winGetSpansNativeGDI (DrawablePtr pDrawable,
DDXPointPtr pPoint = NULL;
int *piWidth = NULL;
char *pDst = pDsts;
- int iBytesToCopy;
- HBITMAP hbmpWindow, hbmpOrig;
+ HBITMAP hbmpWindow, hbmpOrig, hbmpOrig1;
BYTE *pbWindow = NULL;
- HDC hdcMem;
+ HDC hdcMem, hdcMem1;
ScreenPtr pScreen = pDrawable->pScreen;
winScreenPriv(pScreen);
- int iByteWidth;
/* Branch on the drawable type */
switch (pDrawable->type)
{
case DRAWABLE_PIXMAP:
+#if 0
ErrorF ("winGetSpans - DRAWABLE_PIXMAP %08x\n",
pDrawable);
+#endif
pPixmap = (PixmapPtr) pDrawable;
pPixmapPriv = winGetPixmapPriv (pPixmap);
+ /* Open a memory HDC */
+ hdcMem1 = CreateCompatibleDC (NULL);
+ hdcMem = CreateCompatibleDC (NULL);
+
+ /* Select the drawable pixmap into a DC */
+ hbmpOrig1 = SelectObject (hdcMem1, pPixmapPriv->hBitmap);
+
+ if (hbmpOrig1 == NULL)
+ FatalError ("winGetSpans - DRAWABLE_PIXMAP - SelectObject () "
+ "failed on pPixmapPriv->hBitmap\n");
+
/* Loop through spans */
for (iSpan = 0; iSpan < iSpans; ++iSpan)
{
pPoint = pPoints + iSpan;
piWidth = piWidths + iSpan;
-
- iBytesToCopy = PixmapBytePad (*piWidth, pDrawable->depth);
+
+ hbmpWindow = winCreateDIBNativeGDI (*piWidth, 1,
+ pDrawable->depth,
+ &pbWindow,
+ NULL);
+
+ hbmpOrig = SelectObject (hdcMem, hbmpWindow);
+
+ /* Transfer the window bits to the window bitmap */
+ BitBlt (hdcMem,
+ 0, 0,
+ *piWidth, 1,
+ hdcMem1,
+ pPoint->x, pPoint->y,
+ SRCCOPY);
memcpy (pDst,
- pPixmapPriv->pbBits
- + pPixmapPriv->dwScanlineBytes * pPoint->y,
- iBytesToCopy);
+ (char*) pbWindow,
+ PixmapBytePad (*piWidth, pDrawable->depth));
+
+ /* Pop the window bitmap out of the HDC and delete the bitmap */
+ SelectObject (hdcMem, hbmpOrig);
+ DeleteObject (hbmpWindow);
+#if 0
ErrorF ("(%dx%dx%d) (%d,%d) w: %d\n",
pDrawable->width, pDrawable->height, pDrawable->depth,
pPoint->x, pPoint->y, *piWidth);
+#endif
/* Calculate offset of next bit destination */
- pDst += 4 * ((*piWidth + 31) / 32);
+ pDst += PixmapBytePad (*piWidth, pDrawable->depth);
}
+
+ /* Pop the pixmap's bitmap out of the HDC */
+ SelectObject (hdcMem1, hbmpOrig1);
+
+ /* Delete the HDCs */
+ DeleteDC (hdcMem1);
+ DeleteDC (hdcMem);
break;
case DRAWABLE_WINDOW:
+#if 0
ErrorF ("winGetSpans - DRAWABLE_WINDOW\n");
-
- /*
- * FIXME: Making huge assumption here that we are copying the
- * area behind where the cursor will be displayed. We already
- * know the size of the cursor, so this works, for now.
- */
-
- /* Create a bitmap to blit the window data to */
- hbmpWindow = winCreateDIBNativeGDI (*piWidths,
- *piWidths,
- pDrawable->depth,
- &pbWindow,
- NULL);
+#endif
/* Open a memory HDC */
hdcMem = CreateCompatibleDC (NULL);
- /* Select the window bitmap */
- hbmpOrig = SelectObject (hdcMem, hbmpWindow);
-
- /* Transfer the window bits to the window bitmap */
- BitBlt (hdcMem,
- 0, 0,
- *piWidths, *piWidths, /* FIXME: Assuming square region */
- pScreenPriv->hdcScreen,
- pPoints->x, pPoints->y,
- SRCCOPY);
-
- /* Pop the window bitmap out of the HDC */
- SelectObject (hdcMem, hbmpOrig);
-
- /* Delete the memory HDC */
- DeleteDC (hdcMem);
- hdcMem = NULL;
-
- iByteWidth = PixmapBytePad (*piWidths, pDrawable->depth);
-
/* Loop through spans */
for (iSpan = 0; iSpan < iSpans; ++iSpan)
{
pPoint = pPoints + iSpan;
piWidth = piWidths + iSpan;
- iBytesToCopy = PixmapBytePad (*piWidth, pDrawable->depth);
+ hbmpWindow = winCreateDIBNativeGDI (*piWidth, 1,
+ pDrawable->depth,
+ &pbWindow,
+ NULL);
+
+ hbmpOrig = SelectObject (hdcMem, hbmpWindow);
+
+ /* Transfer the window bits to the window bitmap */
+ BitBlt (hdcMem,
+ 0, 0,
+ *piWidth, 1,
+ pScreenPriv->hdcScreen,
+ pPoint->x, pPoint->y,
+ SRCCOPY);
memcpy (pDst,
- pbWindow + iByteWidth * (pPoint->y - pPoints->y),
- iBytesToCopy);
-
+ (char*) pbWindow,
+ PixmapBytePad (*piWidth, pDrawable->depth));
+
+ /* Pop the window bitmap out of the HDC */
+ SelectObject (hdcMem, hbmpOrig);
+
+ DeleteObject (hbmpWindow);
+
+#if 0
ErrorF ("(%dx%dx%d) (%d,%d) w: %d\n",
pDrawable->width, pDrawable->height, pDrawable->depth,
pPoint->x, pPoint->y, *piWidth);
+#endif
/* Calculate offset of next bit destination */
- pDst += 4 * ((*piWidth + 31) / 32);
+ pDst += PixmapBytePad (*piWidth, pDrawable->depth);
}
/* Delete the window bitmap */
- DeleteObject (hbmpWindow);
+ DeleteDC (hdcMem);
break;
case UNDRAWABLE_WINDOW:
diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c
index 20df053c2..95f245e57 100644
--- a/hw/xwin/winkeybd.c
+++ b/hw/xwin/winkeybd.c
@@ -30,7 +30,7 @@
* Peter Busch
* Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winkeybd.c,v 1.12 2002/10/17 08:18:22 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winkeybd.c,v 1.13 2003/07/29 21:25:17 dawes Exp $ */
#include "win.h"
@@ -649,31 +649,23 @@ void
winKeybdReleaseKeys ()
{
#if !WIN_NEW_KEYBOARD_SUPPORT
-#if 0 /* Old function that just pops modifiers */
- /* Verify that the mi input system has been initialized */
- if (g_fdMessageQueue == WIN_FD_INVALID)
- return;
-
- winSendKeyEvent (KEY_Alt, FALSE);
- winSendKeyEvent (KEY_AltLang, FALSE);
- winSendKeyEvent (KEY_LCtrl, FALSE);
- winSendKeyEvent (KEY_RCtrl, FALSE);
- winSendKeyEvent (KEY_ShiftL, FALSE);
- winSendKeyEvent (KEY_ShiftR, FALSE);
-#else /* New function that pops all keys */
int i;
/* Verify that the mi input system has been initialized */
if (g_fdMessageQueue == WIN_FD_INVALID)
return;
- /* Pop any pressed keys */
+ /* Loop through all keys */
for (i = 0; i < NUM_KEYCODES; ++i)
{
- if (g_winKeyState[i]) winSendKeyEvent (i, FALSE);
+ /* Pop key if pressed */
+ if (g_winKeyState[i])
+ winSendKeyEvent (i, FALSE);
+
+ /* Reset pressed flag for keys */
+ g_winKeyState[i] = FALSE;
}
#endif
-#endif
}
diff --git a/hw/xwin/winmsg.c b/hw/xwin/winmsg.c
index 35342c359..ce8ac4199 100644
--- a/hw/xwin/winmsg.c
+++ b/hw/xwin/winmsg.c
@@ -27,7 +27,7 @@
*
* Authors: Alexander Gottwald
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winmsg.c,v 1.1 2002/10/17 08:18:22 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winmsg.c,v 1.2 2003/10/02 13:30:10 eich Exp $ */
#include "win.h"
#include "winmsg.h"
@@ -45,26 +45,7 @@ void
winVMsg (int scrnIndex, MessageType type, int verb, const char *format,
va_list ap)
{
- const char *prefix = NULL;
-
- if (verb && verb > VERBOSE_LEVEL)
- return;
-
-#undef __msg
-#define __msg(name,string) case name: prefix = string; break;
-#undef _msg
-#define _msg(name,string) __msg(name,string)
- switch (type)
- {
- MESSAGE_STRINGS default:prefix = NULL;
- break;
- }
-#undef __msg
-#undef _msg
-
- if (prefix != NULL)
- ErrorF ("%s ", prefix);
- VErrorF (format, ap);
+ LogVMessageVerb(type, verb, format, ap);
}
@@ -73,7 +54,7 @@ winDrvMsg (int scrnIndex, MessageType type, const char *format, ...)
{
va_list ap;
va_start (ap, format);
- winVMsg (scrnIndex, type, 0, format, ap);
+ LogVMessageVerb(type, 0, format, ap);
va_end (ap);
}
@@ -83,7 +64,7 @@ winMsg (MessageType type, const char *format, ...)
{
va_list ap;
va_start (ap, format);
- winVMsg (0, type, 0, format, ap);
+ LogVMessageVerb(type, 0, format, ap);
va_end (ap);
}
@@ -94,7 +75,7 @@ winDrvMsgVerb (int scrnIndex, MessageType type, int verb, const char *format,
{
va_list ap;
va_start (ap, format);
- winVMsg (scrnIndex, type, verb, format, ap);
+ LogVMessageVerb(type, verb, format, ap);
va_end (ap);
}
@@ -104,7 +85,7 @@ winMsgVerb (MessageType type, int verb, const char *format, ...)
{
va_list ap;
va_start (ap, format);
- winVMsg (0, type, verb, format, ap);
+ LogVMessageVerb(type, verb, format, ap);
va_end (ap);
}
@@ -114,6 +95,6 @@ winErrorFVerb (int verb, const char *format, ...)
{
va_list ap;
va_start (ap, format);
- winVMsg (0, X_NONE, verb, format, ap);
+ LogVMessageVerb(X_NONE, verb, format, ap);
va_end (ap);
}
diff --git a/hw/xwin/winmsg.h b/hw/xwin/winmsg.h
index c873d4beb..16ec536b0 100644
--- a/hw/xwin/winmsg.h
+++ b/hw/xwin/winmsg.h
@@ -27,36 +27,11 @@
*
* Authors: Alexander Gottwald
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winmsg.h,v 1.1 2002/10/17 08:18:22 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winmsg.h,v 1.2 2003/10/02 13:30:10 eich Exp $ */
#ifndef __WIN_MSG_H__
#define __WIN_MSG_H__
-
-#define __msg_name(name,string) name
-#define __msg(name,string) __msg_name(name,string)
-#define _msg(name,string) __msg(name,string),
-
-#define MESSAGE_STRINGS \
- _msg(X_PROBED,"(--)" /* Value was probed */)\
- _msg(X_CONFIG,"(**)" /* Value was given in the config file */)\
- _msg(X_DEFAULT,"(==)" /* Value is a default */)\
- _msg(X_CMDLINE,"(++)" /* Value was given on the command line */)\
- _msg(X_NOTICE,"(!!)" /* Notice */) \
- _msg(X_ERROR,"(EE)" /* Error message */) \
- _msg(X_WARNING,"(WW)" /* Warning message */) \
- _msg(X_INFO,"(II)" /* Informational message */) \
- _msg(X_UNKNOWN,"(?""?)" /* Unknown, trigraph fix */) \
- _msg(X_NONE,NULL /* No prefix */) \
- __msg(X_NOT_IMPLEMENTED,"(NI)" /* Not implemented */)
-
-typedef enum
-{
- MESSAGE_STRINGS
-}
-MessageType;
-
-
/*
* Function prototypes
*/
diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c
index 57d209e2a..15e508659 100644
--- a/hw/xwin/winmultiwindowwindow.c
+++ b/hw/xwin/winmultiwindowwindow.c
@@ -26,11 +26,22 @@
*from the XFree86 Project.
*
* Authors: Kensuke Matsuzaki
+ * Earle F. Philhower, III
+ * Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winmultiwindowwindow.c,v 1.1 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winmultiwindowwindow.c,v 1.3 2003/10/02 13:30:10 eich Exp $ */
#include "win.h"
#include "dixevents.h"
+#include "winmultiwindowclass.h"
+#include "winprefs.h"
+
+
+/*
+ * External global variables
+ */
+
+extern HICON g_hiconX;
/*
@@ -46,31 +57,12 @@ winDestroyWindowsWindow (WindowPtr pWin);
static void
winUpdateWindowsWindow (WindowPtr pWin);
-static XID
-winGetWindowID (WindowPtr pWin);
-
static void
-SendConfigureNotify (WindowPtr pWin);
-
-static
-void
-winUpdateRgn (WindowPtr pWindow);
-
-#ifdef SHAPE
-static
-void
-winReshape (WindowPtr pWin);
-#endif
-
-
-/*
- * Local globals
- */
-
-static UINT s_nIDPollingMouse = 2;
+winFindWindow (pointer value, XID id, pointer cdata);
#if 0
-static BOOL s_fMoveByX = FALSE;
+static void
+winRestackXWindow (WindowPtr pWin, int smode);
#endif
@@ -78,9 +70,8 @@ static BOOL s_fMoveByX = FALSE;
* Constant defines
*/
+#define MOUSE_POLLING_INTERVAL 500
-#define MOUSE_POLLING_INTERVAL 500
-#define WIN_MULTIWINDOW_SHAPE YES
/*
* Macros
@@ -118,6 +109,7 @@ winCreateWindowMultiWindow (WindowPtr pWin)
pWinPriv->hWnd = NULL;
pWinPriv->pScreenPriv = winGetScreenPriv(pWin->drawable.pScreen);
pWinPriv->fXKilled = FALSE;
+ pWinPriv->fNeedRestore = FALSE;
return fResult;
}
@@ -191,8 +183,8 @@ winPositionWindowMultiWindow (WindowPtr pWin, int x, int y)
iBorder = wBorderWidth (pWin);
/* Get the X and Y location of the X window */
- iX = pWin->drawable.x;
- iY = pWin->drawable.y;
+ iX = pWin->drawable.x + GetSystemMetrics (SM_XVIRTUALSCREEN);
+ iY = pWin->drawable.y + GetSystemMetrics (SM_YVIRTUALSCREEN);
/* Get the height and width of the X window */
iWidth = pWin->drawable.width;
@@ -336,9 +328,10 @@ winMapWindowMultiWindow (WindowPtr pWin)
/* Refresh/redisplay the Windows window associated with this X window */
winUpdateWindowsWindow (pWin);
-#if WIN_MULTIWINDOW_SHAPE
- winReshape (pWin);
- winUpdateRgn (pWin);
+#ifdef SHAPE
+ /* Update the Windows window's shape */
+ winReshapeMultiWindow (pWin);
+ winUpdateRgnMultiWindow (pWin);
#endif
return fResult;
@@ -376,6 +369,7 @@ winRestackWindowMultiWindow (WindowPtr pWin, WindowPtr pOldNextSib)
WindowPtr pPrevWin;
UINT uFlags;
HWND hInsertAfter;
+ HWND hWnd = NULL;
winWindowPriv(pWin);
#if CYGMULTIWINDOW_DEBUG
@@ -387,6 +381,9 @@ winRestackWindowMultiWindow (WindowPtr pWin, WindowPtr pOldNextSib)
winGetScreenPriv(pWin->drawable.pScreen)->RestackWindow (pWin,
pOldNextSib);
+ if (winGetScreenPriv(pWin->drawable.pScreen)->fRestacking)
+ return;
+
/* Bail out if no window privates or window handle is invalid */
if (!pWinPriv || !pWinPriv->hWnd)
return;
@@ -409,6 +406,22 @@ winRestackWindowMultiWindow (WindowPtr pWin, WindowPtr pOldNextSib)
/* Valid sibling - get handle to insert window after */
hInsertAfter = winGetWindowPriv(pPrevWin)->hWnd;
uFlags = SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE;
+
+ hWnd = GetNextWindow (pWinPriv->hWnd, GW_HWNDPREV);
+
+ do
+ {
+ if (GetProp (hWnd, WIN_WINDOW_PROP))
+ {
+ if (hWnd == winGetWindowPriv(pPrevWin)->hWnd)
+ {
+ uFlags |= SWP_NOZORDER;
+ }
+ break;
+ }
+ hWnd = GetNextWindow (hWnd, GW_HWNDPREV);
+ }
+ while (hWnd);
}
else
{
@@ -427,966 +440,111 @@ winRestackWindowMultiWindow (WindowPtr pWin, WindowPtr pOldNextSib)
/*
- * SetShape - See Porting Layer Definition - p. 42
- */
-
-#ifdef SHAPE
-void
-winSetShapeMultiWindow (WindowPtr pWin)
-{
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winSetShapeMultiWindow - pWin: %08x\n", pWin);
-#endif
-
- /* Call any wrapped SetShape function */
- if (winGetScreenPriv(pWin->drawable.pScreen)->SetShape)
- winGetScreenPriv(pWin->drawable.pScreen)->SetShape (pWin);
-
- /*
- * NOTE: We do not currently do anything here.
- */
-
-#if WIN_MULTIWINDOW_SHAPE
- winReshape (pWin);
- winUpdateRgn (pWin);
-#endif
-
- return;
-}
-#endif
-
-
-/*
- * winUpdateRgn - Local function to update a Windows window region
- */
-
-static
-void
-winUpdateRgn (WindowPtr pWin)
-{
-#if 1
- SetWindowRgn (winGetWindowPriv(pWin)->hWnd,
- winGetWindowPriv(pWin)->hRgn, TRUE);
-#endif
-}
-
-
-/*
- * winReshape - Computes the composite clipping region for a window
+ * winCreateWindowsWindow - Create a Windows window associated with an X window
*/
-#ifdef SHAPE
-static
-void
-winReshape (WindowPtr pWin)
+static void
+winCreateWindowsWindow (WindowPtr pWin)
{
- int nRects;
- ScreenPtr pScreen = pWin->drawable.pScreen;
- RegionRec rrNewShape;
- BoxPtr pShape, pRects, pEnd;
- HRGN hRgn, hRgnRect;
+ int iX, iY;
+ int iWidth;
+ int iHeight;
+ int iBorder;
+ HWND hWnd;
+ WNDCLASS wc;
winWindowPriv(pWin);
+ HICON hIcon;
+#define CLASS_NAME_LENGTH 512
+ char pszClass[CLASS_NAME_LENGTH], pszWindowID[12];
+ char *res_name, *res_class, *res_role;
+ static int s_iWindowID = 0;
-#if CYGDEBUG
- ErrorF ("winReshape ()\n");
+#if CYGMULTIWINDOW_DEBUG
+ ErrorF ("winCreateWindowsWindow - pWin: %08x\n", pWin);
#endif
-
- /* Bail if the window is the root window */
- if (pWin->parent == NULL)
- return;
- /* Bail if the window is not top level */
- if (pWin->parent->parent != NULL)
- return;
-
- /* Bail if Windows window handle is invalid */
- if (pWinPriv->hWnd == NULL)
- return;
+ iBorder = wBorderWidth (pWin);
- /* Free any existing window region stored in the window privates */
- if (pWinPriv->hRgn != NULL)
- {
- DeleteObject (pWinPriv->hRgn);
- pWinPriv->hRgn = NULL;
- }
+ iX = pWin->drawable.x + GetSystemMetrics (SM_XVIRTUALSCREEN);
+ iY = pWin->drawable.y + GetSystemMetrics (SM_YVIRTUALSCREEN);
- /* Bail if the window has no bounding region defined */
- if (!wBoundingShape (pWin))
- return;
+ iWidth = pWin->drawable.width;
+ iHeight = pWin->drawable.height;
- REGION_INIT(pScreen, &rrNewShape, NullBox, 0);
- REGION_COPY(pScreen, &rrNewShape, wBoundingShape(pWin));
- REGION_TRANSLATE(pScreen,
- &rrNewShape,
- pWin->borderWidth,
- pWin->borderWidth);
-
- nRects = REGION_NUM_RECTS(&rrNewShape);
- pShape = REGION_RECTS(&rrNewShape);
+ /* Load default X icon in case it's not ready yet */
+ if (!g_hiconX)
+ g_hiconX = (HICON)winOverrideDefaultIcon();
- /* Don't do anything if there are no rectangles in the region */
- if (nRects > 0)
- {
- RECT rcClient;
- RECT rcWindow;
- int iOffsetX, iOffsetY;
-
- /* Get client rectangle */
- if (!GetClientRect (pWinPriv->hWnd, &rcClient))
- {
- ErrorF ("winReshape - GetClientRect failed, bailing: %d\n",
- GetLastError ());
- return;
- }
-
- /* Translate client rectangle coords to screen coords */
- /* NOTE: Only transforms top and left members */
- ClientToScreen (pWinPriv->hWnd, (LPPOINT) &rcClient);
-
- /* Get window rectangle */
- if (!GetWindowRect (pWinPriv->hWnd, &rcWindow))
- {
- ErrorF ("winReshape - GetWindowRect failed, bailing: %d\n",
- GetLastError ());
- return;
- }
-
- /* Calculate offset from window upper-left to client upper-left */
- iOffsetX = rcClient.left - rcWindow.left;
- iOffsetY = rcClient.top - rcWindow.top;
-
- /* Create initial Windows region for title bar */
- /* FIXME: Mean, nasty, ugly hack!!! */
- hRgn = CreateRectRgn (0, 0, rcWindow.right, iOffsetY);
- if (hRgn == NULL)
- {
- ErrorF ("winReshape - Initial CreateRectRgn (%d, %d, %d, %d) "
- "failed: %d\n",
- 0, 0, rcWindow.right, iOffsetY, GetLastError ());
- }
-
- /* Loop through all rectangles in the X region */
- for (pRects = pShape, pEnd = pShape + nRects; pRects < pEnd; pRects++)
- {
- /* Create a Windows region for the X rectangle */
- hRgnRect = CreateRectRgn (pRects->x1 + iOffsetX - 1,
- pRects->y1 + iOffsetY - 1,
- pRects->x2 + iOffsetX - 1,
- pRects->y2 + iOffsetY - 1);
- if (hRgnRect == NULL)
- {
- ErrorF ("winReshape - Loop CreateRectRgn (%d, %d, %d, %d) "
- "failed: %d\n"
- "\tx1: %d x2: %d xOff: %d y1: %d y2: %d yOff: %d\n",
- pRects->x1 + iOffsetX - 1,
- pRects->y1 + iOffsetY - 1,
- pRects->x2 + iOffsetX - 1,
- pRects->y2 + iOffsetY - 1,
- GetLastError (),
- pRects->x1, pRects->x2, iOffsetX,
- pRects->y1, pRects->y2, iOffsetY);
- }
-
- /* Merge the Windows region with the accumulated region */
- if (CombineRgn (hRgn, hRgn, hRgnRect, RGN_OR) == ERROR)
- {
- ErrorF ("winReshape - CombineRgn () failed: %d\n",
- GetLastError ());
- }
-
- /* Delete the temporary Windows region */
- DeleteObject (hRgnRect);
- }
-
- /* Save a handle to the composite region in the window privates */
- pWinPriv->hRgn = hRgn;
- }
-
- REGION_UNINIT(pScreen, &rrNewShape);
+ if (!g_hiconX)
+ g_hiconX = LoadIcon (g_hInstance, MAKEINTRESOURCE(IDI_XWIN));
- return;
-}
-#endif
-
-
-/*
- * winTopLevelWindowProc - Window procedure for all top-level Windows windows.
- */
-
-LRESULT CALLBACK
-winTopLevelWindowProc (HWND hwnd, UINT message,
- WPARAM wParam, LPARAM lParam)
-{
- POINT ptMouse;
- HDC hdcUpdate;
- PAINTSTRUCT ps;
- WindowPtr pWin = NULL;
- winPrivWinPtr pWinPriv = NULL;
- ScreenPtr s_pScreen = NULL;
- winPrivScreenPtr s_pScreenPriv = NULL;
- winScreenInfo *s_pScreenInfo = NULL;
- HWND hwndScreen = NULL;
- DrawablePtr pDraw = NULL;
- int iX, iY, iWidth, iHeight, iBorder;
- winWMMessageRec wmMsg;
- static Bool s_fTracking = FALSE;
- static Bool s_fCursor = TRUE;
+ /* Try and get the icon from WM_HINTS */
+ hIcon = winXIconToHICON (pWin);
- /* Check if the Windows window property for our X window pointer is valid */
- if ((pWin = GetProp (hwnd, WIN_WINDOW_PROP)) != NULL)
- {
- /* Our X window pointer is valid */
-
- /* Get pointers to the drawable and the screen */
- pDraw = &pWin->drawable;
- s_pScreen = pWin->drawable.pScreen;
-
- /* Get a pointer to our window privates */
- pWinPriv = winGetWindowPriv(pWin);
-
- /* Get pointers to our screen privates and screen info */
- s_pScreenPriv = pWinPriv->pScreenPriv;
- s_pScreenInfo = s_pScreenPriv->pScreenInfo;
-
- /* Get the handle for our screen-sized window */
- /* NOTE: This will be going away at some point, right? Harold Hunt - 2003/01/15 */
- hwndScreen = s_pScreenPriv->hwndScreen;
-
- /* */
- wmMsg.msg = 0;
- wmMsg.hwndWindow = hwnd;
- wmMsg.iWindow = (Window)GetProp (hwnd, WIN_WID_PROP);
-
-#if 1
- wmMsg.iX = pWinPriv->iX;
- wmMsg.iY = pWinPriv->iY;
- wmMsg.iWidth = pWinPriv->iWidth;
- wmMsg.iHeight = pWinPriv->iHeight;
-#else
- wmMsg.iX = pDraw.x;
- wmMsg.iY = pDraw.y;
- wmMsg.iWidth = pDraw.width;
- wmMsg.iHeight = pDraw.height;
-#endif
-
-
-#if 0
- /*
- * Print some debugging information
- */
-
- ErrorF ("hWnd %08X\n", hwnd);
- ErrorF ("pWin %08X\n", pWin);
- ErrorF ("pDraw %08X\n", pDraw);
- ErrorF ("\ttype %08X\n", pWin->drawable.type);
- ErrorF ("\tclass %08X\n", pWin->drawable.class);
- ErrorF ("\tdepth %08X\n", pWin->drawable.depth);
- ErrorF ("\tbitsPerPixel %08X\n", pWin->drawable.bitsPerPixel);
- ErrorF ("\tid %08X\n", pWin->drawable.id);
- ErrorF ("\tx %08X\n", pWin->drawable.x);
- ErrorF ("\ty %08X\n", pWin->drawable.y);
- ErrorF ("\twidth %08X\n", pWin->drawable.width);
- ErrorF ("\thenght %08X\n", pWin->drawable.height);
- ErrorF ("\tpScreen %08X\n", pWin->drawable.pScreen);
- ErrorF ("\tserialNumber %08X\n", pWin->drawable.serialNumber);
- ErrorF ("g_iWindowPrivateIndex %d\n", g_iWindowPrivateIndex);
- ErrorF ("pWinPriv %08X\n", pWinPriv);
- ErrorF ("s_pScreenPriv %08X\n", s_pScreenPriv);
- ErrorF ("s_pScreenInfo %08X\n", s_pScreenInfo);
- ErrorF ("hwndScreen %08X\n", hwndScreen);
-#endif
- }
+ /* Use default X icon if no icon loaded from WM_HINTS */
+ if (!hIcon)
+ hIcon = g_hiconX;
+ /* Set standard class name prefix so we can identify window easily */
+ strncpy (pszClass, WINDOW_CLASS_X, strlen (WINDOW_CLASS_X));
-
- /* Branch on message type */
- switch (message)
+ if (winMultiWindowGetClassHint (pWin, &res_name, &res_class))
{
- case WM_CREATE:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_CREATE\n");
-#endif
-
- /* */
- SetProp (hwnd,
- WIN_WINDOW_PROP,
- (HANDLE)((LPCREATESTRUCT) lParam)->lpCreateParams);
-
- /* */
- SetProp (hwnd,
- WIN_WID_PROP,
- (HANDLE)winGetWindowID (((LPCREATESTRUCT) lParam)->lpCreateParams));
- return 0;
-
- case WM_PAINT:
- /* Only paint if our window handle is valid */
- if (hwndScreen == NULL)
- break;
-
- /* BeginPaint gives us an hdc that clips to the invalidated region */
- hdcUpdate = BeginPaint (hwnd, &ps);
-
-#if 0
- /* NOTE: Doesn't appear to be used - Harold Hunt - 2003/01/15 */
- /* Get the dimensions of the client area */
- GetClientRect (hwnd, &rcClient);
-#endif
-
- /* Get the position and dimensions of the window */
- iBorder = wBorderWidth (pWin);
- iX = pWin->drawable.x;
- iY = pWin->drawable.y;
- iWidth = pWin->drawable.width;
- iHeight = pWin->drawable.height;
-
- /* Try to copy from the shadow buffer */
- if (!BitBlt (hdcUpdate,
- 0, 0,
- iWidth, iHeight,
- s_pScreenPriv->hdcShadow,
- iX, iY,
- SRCCOPY))
- {
- LPVOID lpMsgBuf;
-
- /* Display a fancy error message */
- FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- GetLastError (),
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
- (LPTSTR) &lpMsgBuf,
- 0, NULL);
-
- ErrorF ("winTopLevelWindowProc - BitBlt failed: %s\n",
- (LPSTR)lpMsgBuf);
- LocalFree (lpMsgBuf);
- }
-
- /* EndPaint frees the DC */
- EndPaint (hwndScreen, &ps);
- return 0;
-
-
-#if 1
- case WM_MOUSEMOVE:
- /* Unpack the client area mouse coordinates */
- ptMouse.x = GET_X_LPARAM(lParam);
- ptMouse.y = GET_Y_LPARAM(lParam);
-
- /* Translate the client area mouse coordinates to screen coordinates */
- ClientToScreen (hwnd, &ptMouse);
-
- /* We can't do anything without privates */
- if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
- break;
-
- /* Has the mouse pointer crossed screens? */
- if (s_pScreen != miPointerCurrentScreen ())
- miPointerSetNewScreen (s_pScreenInfo->dwScreen,
- ptMouse.x - s_pScreenInfo->dwXOffset,
- ptMouse.y - s_pScreenInfo->dwYOffset);
-
- /* Are we tracking yet? */
- if (!s_fTracking)
- {
- TRACKMOUSEEVENT tme;
-
- /* Setup data structure */
- ZeroMemory (&tme, sizeof (tme));
- tme.cbSize = sizeof (tme);
- tme.dwFlags = TME_LEAVE;
- tme.hwndTrack = hwnd;
-
- /* Call the tracking function */
- if (!(*g_fpTrackMouseEvent) (&tme))
- ErrorF ("winTopLevelWindowProc - _TrackMouseEvent failed\n");
-
- /* Flag that we are tracking now */
- s_fTracking = TRUE;
- }
-
- /* Hide or show the Windows mouse cursor */
- if (s_fCursor)
- {
- /* Hide Windows cursor */
- s_fCursor = FALSE;
- ShowCursor (FALSE);
- KillTimer (hwnd, s_nIDPollingMouse);
- }
-
- /* Deliver absolute cursor position to X Server */
- miPointerAbsoluteCursor (ptMouse.x - s_pScreenInfo->dwXOffset,
- ptMouse.y - s_pScreenInfo->dwYOffset,
- g_c32LastInputEventTime = GetTickCount ());
- return 0;
-
- case WM_NCMOUSEMOVE:
- /*
- * We break instead of returning 0 since we need to call
- * DefWindowProc to get the mouse cursor changes
- * and min/max/close button highlighting in Windows XP.
- * The Platform SDK says that you should return 0 if you
- * process this message, but it fails to mention that you
- * will give up any default functionality if you do return 0.
- */
-
- /* We can't do anything without privates */
- if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
- break;
-
- /* Non-client mouse movement, show Windows cursor */
- if (!s_fCursor)
- {
- s_fCursor = TRUE;
- ShowCursor (TRUE);
- SetTimer (hwnd, s_nIDPollingMouse, MOUSE_POLLING_INTERVAL, NULL);
- }
- break;
-
- case WM_MOUSELEAVE:
- /* Mouse has left our client area */
-
- /* Flag that we are no longer tracking */
- s_fTracking = FALSE;
-
- /* Show the mouse cursor, if necessary */
- if (!s_fCursor)
- {
- s_fCursor = TRUE;
- ShowCursor (TRUE);
- SetTimer (hwnd, s_nIDPollingMouse, MOUSE_POLLING_INTERVAL, NULL);
- }
- return 0;
-
- case WM_LBUTTONDBLCLK:
- case WM_LBUTTONDOWN:
- if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
- break;
- return winMouseButtonsHandle (s_pScreen, ButtonPress, Button1, wParam);
-
- case WM_LBUTTONUP:
- if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
- break;
- return winMouseButtonsHandle (s_pScreen, ButtonRelease, Button1, wParam);
-
- case WM_MBUTTONDBLCLK:
- case WM_MBUTTONDOWN:
- if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
- break;
- return winMouseButtonsHandle (s_pScreen, ButtonPress, Button2, wParam);
-
- case WM_MBUTTONUP:
- if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
- break;
- return winMouseButtonsHandle (s_pScreen, ButtonRelease, Button2, wParam);
-
- case WM_RBUTTONDBLCLK:
- case WM_RBUTTONDOWN:
- if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
- break;
- return winMouseButtonsHandle (s_pScreen, ButtonPress, Button3, wParam);
-
- case WM_RBUTTONUP:
- if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput)
- break;
- return winMouseButtonsHandle (s_pScreen, ButtonRelease, Button3, wParam);
-
-#else
-
- case WM_MOUSEMOVE:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_MOUSEMOVE*\n");
-#endif
-
- /* Unpack the client area mouse coordinates */
- ptMouse.x = GET_X_LPARAM(lParam);
- ptMouse.y = GET_Y_LPARAM(lParam);
-
- /* Translate the client area mouse coordinates to screen coordinates */
- ClientToScreen (hwnd, &ptMouse);
-
- /* Pass the message to the root window */
- SendMessage (hwndScreen, message, wParam, MAKELONG(ptMouse.x, ptMouse.y));
- return 0;
-
- case WM_NCMOUSEMOVE:
- case WM_LBUTTONDBLCLK:
- case WM_LBUTTONDOWN:
- case WM_LBUTTONUP:
- case WM_MBUTTONDBLCLK:
- case WM_MBUTTONDOWN:
- case WM_MBUTTONUP:
- case WM_RBUTTONDBLCLK:
- case WM_RBUTTONDOWN:
- case WM_RBUTTONUP:
- case WM_MOUSELEAVE:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_*BUTTON*\n");
-#endif
-
- /* Pass the message to the root window */
- SendMessage(hwndScreen, message, wParam, MAKELONG(ptMouse.x, ptMouse.y));
- return 0;
-#endif
-
- case WM_MOUSEWHEEL:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_MOUSEWHEEL\n");
-#endif
+ strncat (pszClass, "-", 1);
+ strncat (pszClass, res_name, CLASS_NAME_LENGTH - strlen (pszClass));
+ strncat (pszClass, "-", 1);
+ strncat (pszClass, res_class, CLASS_NAME_LENGTH - strlen (pszClass));
- /* Pass the message to the root window */
- SendMessage(hwndScreen, message, wParam, lParam);
- return 0;
-
- case WM_SYSKEYDOWN:
- case WM_SYSKEYUP:
- case WM_SYSDEADCHAR:
- case WM_KEYDOWN:
- case WM_KEYUP:
- case WM_DEADCHAR:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_*KEY*\n");
-#endif
-
- /* Pass the message to the root window */
- SendMessage (hwndScreen, message, wParam, lParam);
- return 0;
-
- case WM_HOTKEY:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_HOTKEY\n");
-#endif
-
- /* Pass the message to the root window */
- SendMessage (hwndScreen, message, wParam, lParam);
- return 0;
-
-
-#if 1
- case WM_ACTIVATE:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_ACTIVATE\n");
-#endif
-
- /* Pass the message to the root window */
- SendMessage (hwndScreen, message, wParam, lParam);
-
- /* Bail if inactivating */
- if (LOWORD(wParam) == WA_INACTIVE)
- return 0;
-
- /* Check if the current window is the active window in Windows */
- if (GetActiveWindow () == hwnd)
+ /* Check if a window class is provided by the WM_WINDOW_ROLE property,
+ * if not use the WM_CLASS information.
+ * For further information see:
+ * http://tronche.com/gui/x/icccm/sec-5.html
+ */
+ if (winMultiWindowGetWindowRole (pWin, &res_role) )
{
- /* Tell our Window Manager thread to raise the window */
- wmMsg.msg = WM_WM_RAISE;
- winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg);
+ strcat (pszClass, "-");
+ strcat (pszClass, res_role);
+ free (res_role);
}
-
- /* Tell our Window Manager thread to activate the window */
- wmMsg.msg = WM_WM_ACTIVATE;
- winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg);
-
- return 0;
-
- case WM_ACTIVATEAPP:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_ACTIVATEAPP\n");
-#endif
-
- /* Pass the message to the root window */
- SendMessage (hwndScreen, message, wParam, lParam);
- return 0;
-#endif
-
- case WM_CLOSE:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_CLOSE\n");
-#endif
- /* Branch on if the window was killed in X already */
- if (pWinPriv->fXKilled)
- {
- /* Window was killed, go ahead and destroy the window */
- DestroyWindow (hwnd);
- }
- else
- {
- /* Tell our Window Manager thread to kill the window */
- wmMsg.msg = WM_WM_KILL;
- winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg);
- }
- return 0;
-
- case WM_DESTROY:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_DESTROY\n");
-#endif
-
- /* Branch on if the window was killed in X already */
- if (pWinPriv && !pWinPriv->fXKilled)
- {
- ErrorF ("winTopLevelWindowProc - WM_DESTROY - WM_WM_KILL\n");
-
- /* Tell our Window Manager thread to kill the window */
- wmMsg.msg = WM_WM_KILL;
- winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg);
- }
-
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_DESTROY\n");
-#endif
- break;
-
- case WM_MOVE:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_MOVE - %d ms\n", GetTickCount ());
-#endif
-
- /* Bail if Windows window is not actually moving */
- if (pWinPriv->iX == (short) LOWORD(lParam)
- && pWinPriv->iY == (short) HIWORD(lParam))
- break;
-
- /* Get new position */
- pWinPriv->iX = (short) LOWORD(lParam);
- pWinPriv->iY = (short) HIWORD(lParam);
-
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\t(%d, %d)\n", pWinPriv->iX, pWinPriv->iY);
-#endif
-
- /* Notify the X client that its window is moving */
- if (SubStrSend(pWin, pWin->parent))
- SendConfigureNotify (pWin);
-
- /* Tell X that the window is moving */
- (s_pScreen->MoveWindow) (pWin,
- (int)(short) LOWORD(lParam) - wBorderWidth (pWin),
- (int)(short) HIWORD(lParam) - wBorderWidth (pWin),
- pWin->nextSib,
- VTMove);
- return 0;
-
- case WM_SHOWWINDOW:
- /* Bail out if the window is being hidden */
- if (!wParam)
- return 0;
-
- /* Tell X to map the window */
- MapWindow (pWin, wClient(pWin));
-
- /* */
- if (!pWin->overrideRedirect)
- {
- DWORD dwExStyle;
- DWORD dwStyle;
- RECT rcNew;
- int iDx, iDy;
-
- /* Flag that this window needs to be made active when clicked */
- SetProp (hwnd, WIN_NEEDMANAGE_PROP, (HANDLE) 1);
-
- /* Get the standard and extended window style information */
- dwExStyle = GetWindowLongPtr (hwnd, GWL_EXSTYLE);
- dwStyle = GetWindowLongPtr (hwnd, GWL_STYLE);
-
- /* */
- if (dwExStyle != WS_EX_APPWINDOW)
- {
- /* Setup a rectangle with the X window position and size */
- SetRect (&rcNew,
- pWinPriv->iX,
- pWinPriv->iY,
- pWinPriv->iX + pWinPriv->iWidth,
- pWinPriv->iY + pWinPriv->iHeight);
-
-#if 0
- ErrorF ("winTopLevelWindowProc - (%d, %d)-(%d, %d)\n",
- rcNew.left, rcNew.top,
- rcNew.right, rcNew.bottom);
-#endif
-
- /* */
- AdjustWindowRectEx (&rcNew,
- WS_POPUP | WS_SIZEBOX | WS_OVERLAPPEDWINDOW,
- FALSE,
- WS_EX_APPWINDOW);
-
- /* Calculate position deltas */
- iDx = pWinPriv->iX - rcNew.left;
- iDy = pWinPriv->iY - rcNew.top;
-
- /* Calculate new rectangle */
- rcNew.left += iDx;
- rcNew.right += iDx;
- rcNew.top += iDy;
- rcNew.bottom += iDy;
-
-#if 0
- ErrorF ("winTopLevelWindowProc - (%d, %d)-(%d, %d)\n",
- rcNew.left, rcNew.top,
- rcNew.right, rcNew.bottom);
-#endif
-
- /* Set the window extended style flags */
- SetWindowLongPtr (hwnd, GWL_EXSTYLE, WS_EX_APPWINDOW);
-
- /* Set the window standard style flags */
- SetWindowLongPtr (hwnd, GWL_STYLE, WS_POPUP | WS_SIZEBOX | WS_OVERLAPPEDWINDOW);
-
- /* Positon the Windows window */
- SetWindowPos (hwnd, HWND_TOP,
- rcNew.left, rcNew.top,
- rcNew.right - rcNew.left, rcNew.bottom - rcNew.top,
- SWP_NOMOVE | SWP_FRAMECHANGED | SWP_SHOWWINDOW | SWP_NOACTIVATE);
-
- /* Bring the Window window to the foreground */
- SetForegroundWindow (hwnd);
- }
- }
-
- /* Setup the Window Manager message */
- wmMsg.msg = WM_WM_MAP;
- wmMsg.iWidth = pWinPriv->iWidth;
- wmMsg.iHeight = pWinPriv->iHeight;
-
- /* Tell our Window Manager thread to map the window */
- winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg);
-
- /* Setup the Window Manager message */
- wmMsg.msg = WM_WM_RAISE;
-
- /* Tell our Window Manager thread to raise the window */
- winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg);
- return 0;
-
- case WM_SIZE:
- /* see dix/window.c */
-
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_SIZE - %d ms\n", GetTickCount ());
-#endif
-
- switch (wParam)
- {
- case SIZE_MINIMIZED:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tSIZE_MINIMIZED\n");
-#endif
-
- wmMsg.msg = WM_WM_LOWER;
-
- /* Tell our Window Manager thread to lower the window */
- winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg);
- break;
-
- case SIZE_RESTORED:
- case SIZE_MAXIMIZED:
- if (pWinPriv->iWidth == (short) LOWORD(lParam)
- && pWinPriv->iHeight == (short) HIWORD(lParam))
- break;
-
- /* Get the dimensions of the Windows window */
- pWinPriv->iWidth = (short) LOWORD(lParam);
- pWinPriv->iHeight = (short) HIWORD(lParam);
-
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\t(%d, %d)\n", pWinPriv->iWidth, pWinPriv->iHeight);
-#endif
-
- /* Check if resize events are redirected */
- if ((pWin->eventMask | wOtherEventMasks (pWin)) & ResizeRedirectMask)
- {
- xEvent eventT;
-
- /* Setup the X event structure */
- eventT.u.u.type = ResizeRequest;
- eventT.u.resizeRequest.window = pWin->drawable.id;
- eventT.u.resizeRequest.width = pWinPriv->iWidth;
- eventT.u.resizeRequest.height = pWinPriv->iHeight;
-
- /* */
- if (MaybeDeliverEventsToClient (pWin, &eventT, 1,
- ResizeRedirectMask,
- wClient(pWin)) == 1)
- break;
- }
-
- /* Notify the X client that its window is being resized */
- if (SubStrSend (pWin, pWin->parent))
- SendConfigureNotify (pWin);
-
- /* Tell the X server that the window is being resized */
- (s_pScreen->ResizeWindow) (pWin,
- pWinPriv->iX - wBorderWidth (pWin),
- pWinPriv->iY - wBorderWidth (pWin),
- pWinPriv->iWidth,
- pWinPriv->iHeight,
- pWin->nextSib);
-
- /* Tell X to redraw the exposed portions of the window */
- {
- RegionRec temp;
-
- /* Get the region describing the X window clip list */
- REGION_INIT(s_pScreen, &temp, NullBox, 0);
- REGION_COPY(s_pScreen, &temp, &pWin->clipList);
-
- /* Expose the clipped region */
- (*s_pScreen->WindowExposures) (pWin, &temp, NullRegion);
-
- /* Free the region */
- REGION_UNINIT(s_pScreen, &temp);
- }
- break;
-
-#if 0
- case SIZE_MAXIMIZED:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\tSIZE_MAXIMIZED\n");
-#endif
-
- /* Get the dimensions of the window */
- pWinPriv->iWidth = (int)(short) LOWORD(lParam);
- pWinPriv->iHeight = (int)(short) HIWORD(lParam);
-
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("\t(%d, %d)\n", pWinPriv->iWidth, pWinPriv->iHeight);
-#endif
-
- /* */
- if ((pWin->eventMask|wOtherEventMasks(pWin)) & ResizeRedirectMask)
- {
- xEvent eventT;
-
- eventT.u.u.type = ResizeRequest;
- eventT.u.resizeRequest.window = pWin->drawable.id;
- eventT.u.resizeRequest.width = pWinPriv->iWidth;
- eventT.u.resizeRequest.height = pWinPriv->iHeight;
- if (MaybeDeliverEventsToClient (pWin, &eventT, 1,
- ResizeRedirectMask,
- wClient(pWin)) == 1);
- }
-
-
- (s_pScreen->ResizeWindow) (pWin,
- pWinPriv->iX - wBorderWidth (pWin),
- pWinPriv->iY - wBorderWidth (pWin),
- pWinPriv->iWidth,
- pWinPriv->iHeight,
- pWin->nextSib);
- break;
-#endif
-
- default:
- break;
- }
- return 0;
-
- case WM_MOUSEACTIVATE:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_MOUSEACTIVATE\n");
-#endif
-
- /* Check if this window needs to be made active when clicked */
- if (!GetProp (pWinPriv->hWnd, WIN_NEEDMANAGE_PROP))
- {
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_MOUSEACTIVATE - MA_NOACTIVATE\n");
-#endif
-
- /* */
- return MA_NOACTIVATE;
- }
- break;
-
- case WM_TIMER:
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winTopLevelWindowProc - WM_TIMER - %d ms\n", GetTickCount ());
-#endif
-
- /* Branch on the type of timer event that fired */
- if (wParam == s_nIDPollingMouse)
- {
- POINT point;
-
- /* Get the current position of the mouse cursor */
- GetCursorPos (&point);
-
- /* Deliver absolute cursor position to X Server */
- miPointerAbsoluteCursor (point.x, point.y,
- g_c32LastInputEventTime = GetTickCount ());
- }
- else
- {
- ErrorF ("winTopLevelWindowProc - Unknown WM_TIMER\n");
- }
- return 0;
-
- default:
- break;
+ free (res_name);
+ free (res_class);
}
- return DefWindowProc (hwnd, message, wParam, lParam);
-}
-
-
-/*
- * winCreateWindowsWindow - Create a Windows window associated with an X window
- */
-
-static void
-winCreateWindowsWindow (WindowPtr pWin)
-{
- int iX, iY;
- int iWidth;
- int iHeight;
- int iBorder;
- HWND hWnd;
- WNDCLASS wc;
- winWindowPriv(pWin);
+ /* Add incrementing window ID to make unique class name */
+ sprintf (pszWindowID, "-%x", s_iWindowID++);
+ strcat (pszClass, pszWindowID);
#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winCreateWindowsWindow - pWin: %08x\n", pWin);
+ ErrorF ("winCreateWindowsWindow - Creating class: %s\n", pszClass);
#endif
- iBorder = wBorderWidth (pWin);
-
- iX = pWin->drawable.x;
- iY = pWin->drawable.y;
-
- iWidth = pWin->drawable.width;
- iHeight = pWin->drawable.height;
-
/* Setup our window class */
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = winTopLevelWindowProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = g_hInstance;
- wc.hIcon = LoadIcon (g_hInstance, MAKEINTRESOURCE(IDI_XWIN));
+ wc.hIcon = hIcon;
wc.hCursor = 0;
wc.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);
wc.lpszMenuName = NULL;
- wc.lpszClassName = WINDOW_CLASS_X;
+ wc.lpszClassName = pszClass;
RegisterClass (&wc);
/* Create the window */
- hWnd = CreateWindowExA (WS_EX_TOOLWINDOW, /* Extended styles */
- WINDOW_CLASS_X, /* Class name */
- WINDOW_TITLE_X, /* Window name */
+ hWnd = CreateWindowExA (WS_EX_TOOLWINDOW, /* Extended styles */
+ pszClass, /* Class name */
+ WINDOW_TITLE_X, /* Window name */
WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
- iX, /* Horizontal position */
- iY, /* Vertical position */
- iWidth, /* Right edge */
- iHeight, /* Bottom edge */
- (HWND) NULL, /* No parent or owner window */
- (HMENU) NULL, /* No menu */
- GetModuleHandle (NULL), /* Instance handle */
- pWin); /* ScreenPrivates */
+ iX, /* Horizontal position */
+ iY, /* Vertical position */
+ iWidth, /* Right edge */
+ iHeight, /* Bottom edge */
+ (HWND) NULL, /* No parent or owner window */
+ (HMENU) NULL, /* No menu */
+ GetModuleHandle (NULL), /* Instance handle */
+ pWin); /* ScreenPrivates */
if (hWnd == NULL)
{
ErrorF ("winCreateWindowsWindow - CreateWindowExA () failed: %d\n",
@@ -1395,7 +553,9 @@ winCreateWindowsWindow (WindowPtr pWin)
pWinPriv->hWnd = hWnd;
-
+ /* Cause the "Always On Top" to be added in main WNDPROC */
+ PostMessage (hWnd, WM_INIT_SYS_MENU, 0, 0);
+
SetProp (pWinPriv->hWnd, WIN_WID_PROP, (HANDLE) winGetWindowID(pWin));
/* Flag that this Windows window handles its own activation */
@@ -1404,7 +564,8 @@ winCreateWindowsWindow (WindowPtr pWin)
/*
- * winDestroyWindowsWindow - Destroy a Windows window associated with an X window
+ * winDestroyWindowsWindow - Destroy a Windows window associated
+ * with an X window
*/
static void
@@ -1412,21 +573,30 @@ winDestroyWindowsWindow (WindowPtr pWin)
{
MSG msg;
winWindowPriv(pWin);
+ HICON hiconClass;
+ HMODULE hInstance;
+ int iReturn;
+ char pszClass[512];
#if CYGMULTIWINDOW_DEBUG
ErrorF ("winDestroyWindowsWindow\n");
#endif
-
/* Bail out if the Windows window handle is invalid */
if (pWinPriv->hWnd == NULL)
return;
-
SetProp (pWinPriv->hWnd, WIN_WINDOW_PROP, 0);
+
+ /* Store the info we need to destroy after this window is gone */
+ hInstance = (HINSTANCE) GetClassLong (pWinPriv->hWnd, GCL_HMODULE);
+ hiconClass = (HICON) GetClassLong (pWinPriv->hWnd, GCL_HICON);
+ iReturn = GetClassName (pWinPriv->hWnd, pszClass, 512);
+ /* Destroy the Windows window */
DestroyWindow (pWinPriv->hWnd);
+ /* Null our handle to the Window so referencing it will cause an error */
pWinPriv->hWnd = NULL;
/* Process all messages on our queue */
@@ -1437,7 +607,30 @@ winDestroyWindowsWindow (WindowPtr pWin)
DispatchMessage (&msg);
}
}
-
+
+ /* Only if we were able to get the name */
+ if (iReturn)
+ {
+#if CYGMULTIWINDOW_DEBUG
+ ErrorF ("winDestroyWindowsWindow - Unregistering %s: ", pszClass);
+#endif
+ iReturn = UnregisterClass (pszClass, hInstance);
+
+#if CYGMULTIWINDOW_DEBUG
+ ErrorF ("winDestroyWindowsWindow - %d Deleting Icon: ", iReturn);
+#endif
+
+ /* Only delete if it's not the default */
+ if (hiconClass != g_hiconX &&
+ !winIconIsOverride((unsigned long)hiconClass))
+ {
+ iReturn = DestroyIcon (hiconClass);
+#if CYGMULTIWINDOW_DEBUG
+ ErrorF ("winDestroyWindowsWindow - %d\n", iReturn);
+#endif
+ }
+ }
+
#if CYGMULTIWINDOW_DEBUG
ErrorF ("-winDestroyWindowsWindow\n");
#endif
@@ -1445,7 +638,8 @@ winDestroyWindowsWindow (WindowPtr pWin)
/*
- * winUpdateWindowsWindow - Redisplay/redraw a Windows window associated with an X window
+ * winUpdateWindowsWindow - Redisplay/redraw a Windows window
+ * associated with an X window
*/
static void
@@ -1489,19 +683,57 @@ winUpdateWindowsWindow (WindowPtr pWin)
}
+/*
+ * winGetWindowID -
+ */
+XID
+winGetWindowID (WindowPtr pWin)
+{
+ WindowIDPairRec wi = {pWin, 0};
+ ClientPtr c = wClient(pWin);
+
+ /* */
+ FindClientResourcesByType (c, RT_WINDOW, winFindWindow, &wi);
+#if CYGMULTIWINDOW_DEBUG
+ ErrorF ("winGetWindowID - Window ID: %d\n", wi.id);
+#endif
+ return wi.id;
+}
+/*
+ * winMoveXWindow -
+ */
-typedef struct {
- pointer value;
- XID id;
-} WindowIDPairRec, *WindowIDPairPtr;
+void
+winMoveXWindow (WindowPtr pWin, int x, int y)
+{
+ XID *vlist = malloc(sizeof(long)*2);
+ (CARD32*)vlist[0] = x;
+ (CARD32*)vlist[1] = y;
+ ConfigureWindow (pWin, CWX | CWY, vlist, wClient(pWin));
+ free(vlist);
+}
+/*
+ * winResizeXWindow -
+ */
+
+void
+winResizeXWindow (WindowPtr pWin, int w, int h)
+{
+ XID *vlist = malloc(sizeof(long)*2);
+
+ (CARD32*)vlist[0] = w;
+ (CARD32*)vlist[1] = h;
+ ConfigureWindow (pWin, CWWidth | CWHeight, vlist, wClient(pWin));
+ free(vlist);
+}
/*
@@ -1520,55 +752,111 @@ winFindWindow (pointer value, XID id, pointer cdata)
}
+#if 0
/*
- * winGetWindowID -
+ * winRestackXWindow -
*/
-static XID
-winGetWindowID (WindowPtr pWin)
+static void
+winRestackXWindow (WindowPtr pWin, int smode)
{
- WindowIDPairRec wi = {pWin, 0};
- ClientPtr c = wClient(pWin);
-
- /* */
- FindClientResourcesByType (c, RT_WINDOW, winFindWindow, &wi);
+ XID *vlist = malloc(sizeof(unsigned long));
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winGetWindowID - Window ID: %d\n", wi.id);
-#endif
+ if (vlist == NULL)
+ {
+ ErrorF ("winRestackXWindow - malloc () failed\n");
+ return;
+ }
- return wi.id;
+ if (pWin == NULL)
+ {
+ ErrorF ("winRestackXWindow - NULL window\n");
+ free(vlist);
+ return;
+ }
+
+ *((unsigned long*)vlist) = smode;
+ ConfigureWindow (pWin, CWStackMode, vlist, wClient(pWin));
+
+ free(vlist);
}
+#endif
/*
- * SendConfigureNotify -
+ * winReorderWindowsMultiWindow -
*/
-static void
-SendConfigureNotify(WindowPtr pWin)
+void
+winReorderWindowsMultiWindow (ScreenPtr pScreen)
{
- xEvent event;
- winWindowPriv(pWin);
+ winScreenPriv(pScreen);
+ HWND hwnd = NULL;
+ WindowPtr pWin = NULL;
+ WindowPtr pWinSib = NULL;
- event.u.u.type = ConfigureNotify;
- event.u.configureNotify.window = pWin->drawable.id;
+#if CYGMULTIWINDOW_DEBUG
+ ErrorF ("winOrderWindowsMultiWindow\n");
+#endif
- if (pWin->nextSib)
- event.u.configureNotify.aboveSibling = pWin->nextSib->drawable.id;
- else
- event.u.configureNotify.aboveSibling = None;
+ pScreenPriv->fRestacking = TRUE;
- event.u.configureNotify.x = pWinPriv->iX - wBorderWidth (pWin);
- event.u.configureNotify.y = pWinPriv->iY - wBorderWidth (pWin);
+ if (pScreenPriv->fWindowOrderChanged)
+ {
+#if CYGMULTIWINDOW_DEBUG
+ ErrorF ("winOrderWindowsMultiWindow - Need to restack\n");
+#endif
+ hwnd = GetTopWindow (NULL);
- event.u.configureNotify.width = pWinPriv->iWidth;
- event.u.configureNotify.height = pWinPriv->iHeight;
+ while (hwnd)
+ {
+ if (GetProp (hwnd, WIN_WINDOW_PROP))
+ {
+ pWinSib = pWin;
+ pWin = GetProp (hwnd, WIN_WINDOW_PROP);
+
+ if (pWinSib)
+ {
+ XID *vlist = malloc (sizeof(long) * 2);
+
+ if (vlist == NULL)
+ {
+ ErrorF ("winOrderWindowsMultiWindow - malloc () "
+ "failed\n");
+ return;
+ }
+
+ ((long*)vlist)[0] = winGetWindowID (pWinSib);
+ ((long*)vlist)[1] = Below;
+
+ ConfigureWindow (pWin, CWSibling | CWStackMode,
+ vlist, wClient(pWin));
+
+ free (vlist);
+ }
+ }
+ hwnd = GetNextWindow (hwnd, GW_HWNDNEXT);
+ }
+ }
- event.u.configureNotify.borderWidth = wBorderWidth (pWin);
+ pScreenPriv->fRestacking = FALSE;
+ pScreenPriv->fWindowOrderChanged = FALSE;
+}
- event.u.configureNotify.override = pWin->overrideRedirect;
- /* */
- DeliverEvents (pWin, &event, 1, NullWindow);
+/*
+ * winMinimizeWindow - Minimize in response to WM_CHANGE_STATE
+ */
+
+void
+winMinimizeWindow (Window id)
+{
+ WindowPtr pWin;
+ winPrivWinPtr pWinPriv;
+
+ pWin = LookupIDByType (id, RT_WINDOW);
+
+ pWinPriv = winGetWindowPriv (pWin);
+
+ ShowWindow (pWinPriv->hWnd, SW_MINIMIZE);
}
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c
index ab4dd27f6..a60d36135 100644
--- a/hw/xwin/winmultiwindowwm.c
+++ b/hw/xwin/winmultiwindowwm.c
@@ -27,7 +27,7 @@
*
* Authors: Kensuke Matsuzaki
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winmultiwindowwm.c,v 1.1 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winmultiwindowwm.c,v 1.3 2003/10/02 13:30:11 eich Exp $ */
/* X headers */
#include <stdio.h>
@@ -61,7 +61,6 @@
#define WIN_CONNECT_RETRIES 5
#define WIN_CONNECT_DELAY 5
#define WIN_MSG_QUEUE_FNAME "/dev/windows"
-#define WM_WM_X_EVENT 1
#define WIN_JMP_OKAY 0
#define WIN_JMP_ERROR_IO 2
@@ -87,6 +86,7 @@ typedef struct _WMInfo {
WMMsgQueueRec wmMsgQueue;
Atom atmWmProtos;
Atom atmWmDelete;
+ Atom atmPrivMap;
} WMInfoRec, *WMInfoPtr;
typedef struct _WMProcArgRec {
@@ -95,6 +95,13 @@ typedef struct _WMProcArgRec {
pthread_mutex_t *ppmServerStarted;
} WMProcArgRec, *WMProcArgPtr;
+typedef struct _XMsgProcArgRec {
+ Display *pDisplay;
+ DWORD dwScreen;
+ WMInfoPtr pWMInfo;
+ pthread_mutex_t *ppmServerStarted;
+} XMsgProcArgRec, *XMsgProcArgPtr;
+
/*
* References to external symbols
@@ -103,6 +110,7 @@ typedef struct _WMProcArgRec {
extern char *display;
extern void ErrorF (const char* /*f*/, ...);
extern Bool g_fCalledSetLocale;
+extern Bool g_fCalledXInitThreads;
/*
@@ -113,7 +121,7 @@ static void
PushMessage (WMMsgQueuePtr pQueue, WMMsgNodePtr pNode);
static WMMsgNodePtr
-PopMessage (WMMsgQueuePtr pQueue);
+PopMessage (WMMsgQueuePtr pQueue, WMInfoPtr pWMInfo);
static Bool
InitQueue (WMMsgQueuePtr pQueue);
@@ -124,15 +132,18 @@ GetWindowName (Display * pDpy, Window iWin, char **ppName);
static int
SendXMessage (Display *pDisplay, Window iWin, Atom atmType, long nData);
+static void
+UpdateName (WMInfoPtr pWMInfo, Window iWindow);
+
static void*
winMultiWindowWMProc (void* pArg);
-static Bool
-FlushXEvents (WMInfoPtr pWMInfo);
-
static int
winMultiWindowWMErrorHandler (Display *pDisp, XErrorEvent *e);
+static void *
+winMultiWindowXMsgProc (void *pArg);
+
static void
winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg);
@@ -146,6 +157,7 @@ winMutliWindowWMIOErrorHandler (Display *pDisplay);
static int g_nQueueSize;
static jmp_buf g_jmpEntry;
+static Bool g_shutdown = FALSE;
@@ -212,7 +224,7 @@ PushMessage (WMMsgQueuePtr pQueue, WMMsgNodePtr pNode)
}
-#if 0
+#if CYGMULTIWINDOW_DEBUG
/*
* QueueSize - Return the size of the queue
*/
@@ -233,11 +245,11 @@ QueueSize (WMMsgQueuePtr pQueue)
/*
- * PopMessage -
+ * PopMessage - Pop a message from the queue
*/
static WMMsgNodePtr
-PopMessage (WMMsgQueuePtr pQueue)
+PopMessage (WMMsgQueuePtr pQueue, WMInfoPtr pWMInfo)
{
WMMsgNodePtr pNode;
@@ -339,7 +351,7 @@ InitQueue (WMMsgQueuePtr pQueue)
/*
- * GetWindowName -
+ * GetWindowName - Retrieve the title of an X Window
*/
static void
@@ -360,7 +372,9 @@ GetWindowName (Display *pDisplay, Window iWin, char **ppName)
nResult = XGetWMName (pDisplay, iWin, &xtpName);
if (!nResult || !xtpName.value || !xtpName.nitems)
{
+#if CYGMULTIWINDOW_DEBUG
ErrorF ("GetWindowName - XGetWMName failed. No name.\n");
+#endif
return;
}
@@ -375,7 +389,7 @@ GetWindowName (Display *pDisplay, Window iWin, char **ppName)
}
#if CYGMULTIWINDOW_DEBUG
- ErrorF ("XA_STRING %s\n", *ppName);
+ ErrorF ("GetWindowName - XA_STRING %s\n", *ppName);
#endif
}
else
@@ -383,7 +397,7 @@ GetWindowName (Display *pDisplay, Window iWin, char **ppName)
XmbTextPropertyToTextList (pDisplay, &xtpName, &ppList, &nNum);
/* */
- if (nNum && *ppList)
+ if (nNum && ppList && *ppList)
{
XFree (xtpName.value);
*ppName = strdup (*ppList);
@@ -391,13 +405,14 @@ GetWindowName (Display *pDisplay, Window iWin, char **ppName)
}
#if CYGMULTIWINDOW_DEBUG
- ErrorF ("%s %s\n", XGetAtomName (pDisplay, xtpName.encoding), *ppName);
+ ErrorF ("GetWindowName - %s %s\n",
+ XGetAtomName (pDisplay, xtpName.encoding), *ppName);
#endif
}
#if CYGMULTIWINDOW_DEBUG
- ErrorF ("-GetWindowName\n");
+ ErrorF ("GetWindowName - Returning\n");
#endif
}
@@ -425,6 +440,66 @@ SendXMessage (Display *pDisplay, Window iWin, Atom atmType, long nData)
/*
+ * Updates the name of a HWND according to its X WM_NAME property
+ */
+
+static void
+UpdateName (WMInfoPtr pWMInfo, Window iWindow)
+{
+ char *pszName;
+ Atom atmType;
+ int fmtRet;
+ unsigned long items, remain;
+ HWND *retHwnd, hWnd;
+ XWindowAttributes attr;
+
+ hWnd = 0;
+
+ /* See if we can get the cached HWND for this window... */
+ if (XGetWindowProperty (pWMInfo->pDisplay,
+ iWindow,
+ pWMInfo->atmPrivMap,
+ 0,
+ 1,
+ False,
+ pWMInfo->atmPrivMap,
+ &atmType,
+ &fmtRet,
+ &items,
+ &remain,
+ (unsigned char **) &retHwnd) == Success)
+ {
+ if (retHwnd)
+ {
+ hWnd = *retHwnd;
+ XFree (retHwnd);
+ }
+ }
+
+ /* Some sanity checks */
+ if (!hWnd) return;
+ if (!IsWindow (hWnd)) return;
+
+ /* Set the Windows window name */
+ GetWindowName (pWMInfo->pDisplay, iWindow, &pszName);
+ if (pszName)
+ {
+ /* Get the window attributes */
+ XGetWindowAttributes (pWMInfo->pDisplay,
+ iWindow,
+ &attr);
+ if (!attr.override_redirect)
+ {
+ SetWindowText (hWnd, pszName);
+ winUpdateIcon (iWindow);
+ }
+
+ free (pszName);
+ }
+}
+
+
+/*
* winMultiWindowWMProc
*/
@@ -447,7 +522,7 @@ winMultiWindowWMProc (void *pArg)
WMMsgNodePtr pNode;
/* Pop a message off of our queue */
- pNode = PopMessage (&pWMInfo->wmMsgQueue);
+ pNode = PopMessage (&pWMInfo->wmMsgQueue, pWMInfo);
if (pNode == NULL)
{
/* Bail if PopMessage returns without a message */
@@ -496,25 +571,17 @@ winMultiWindowWMProc (void *pArg)
#if CYGMULTIWINDOW_DEBUG
ErrorF ("\tWM_WM_MAP\n");
#endif
- {
- XWindowAttributes attr;
- char *pszName;
-#if 0
- XWMHints *pHints;
-#endif
-
- /* Get the window attributes */
- XGetWindowAttributes (pWMInfo->pDisplay,
- pNode->msg.iWindow,
- &attr);
- if (!attr.override_redirect)
- {
- /* Set the Windows window name */
- GetWindowName(pWMInfo->pDisplay, pNode->msg.iWindow, &pszName);
- SetWindowText (pNode->msg.hwndWindow, pszName);
- free (pszName);
- }
- }
+ /* Put a note as to the HWND associated with this Window */
+ XChangeProperty (pWMInfo->pDisplay,
+ pNode->msg.iWindow,
+ pWMInfo->atmPrivMap,
+ pWMInfo->atmPrivMap,
+ 32,
+ PropModeReplace,
+ (unsigned char *) &(pNode->msg.hwndWindow),
+ 1);
+ UpdateName (pWMInfo, pNode->msg.iWindow);
+ winUpdateIcon (pNode->msg.iWindow);
break;
case WM_WM_UNMAP:
@@ -523,7 +590,7 @@ winMultiWindowWMProc (void *pArg)
#endif
/* Unmap the window */
- XUnmapWindow(pWMInfo->pDisplay, pNode->msg.iWindow);
+ XUnmapWindow (pWMInfo->pDisplay, pNode->msg.iWindow);
break;
case WM_WM_KILL:
@@ -571,9 +638,17 @@ winMultiWindowWMProc (void *pArg)
CurrentTime);
break;
- case WM_WM_X_EVENT:
- /* Process all X events in the Window Manager event queue */
- FlushXEvents (pWMInfo);
+ case WM_WM_NAME_EVENT:
+ UpdateName (pWMInfo, pNode->msg.iWindow);
+ break;
+
+ case WM_WM_HINTS_EVENT:
+ winUpdateIcon (pNode->msg.iWindow);
+ break;
+
+ case WM_WM_CHANGE_STATE:
+ /* Minimize the window in Windows */
+ winMinimizeWindow (pNode->msg.iWindow);
break;
default:
@@ -605,71 +680,227 @@ winMultiWindowWMProc (void *pArg)
/*
- * FlushXEvents - Process any pending X events
+ * winMultiWindowWMErrorHandler - Our application specific error handler
*/
-static Bool
-FlushXEvents (WMInfoPtr pWMInfo)
+static int
+winMultiWindowWMErrorHandler (Display *pDisplay, XErrorEvent *pErr)
{
- XEvent event;
-
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("FlushXEvents ()\n");
-#endif
+ char pszErrorMsg[100];
- /* Process all pending events */
- while (XPending (pWMInfo->pDisplay))
+ if (pErr->request_code == X_ChangeWindowAttributes
+ && pErr->error_code == BadAccess)
{
- /* Get the next event - will not block because one is ready */
- XNextEvent (pWMInfo->pDisplay, &event);
-
+ ErrorF ("winMultiWindowWMErrorHandler - ChangeWindowAttributes "
+ "BadAccess.\n");
#if 0
- /* Branch on the event type */
- switch (event.type)
- {
- }
+ pthread_exit (NULL);
#endif
+ return 0;
}
+
+ XGetErrorText (pDisplay,
+ pErr->error_code,
+ pszErrorMsg,
+ sizeof (pszErrorMsg));
+ ErrorF ("winMultiWindowWMErrorHandler - ERROR: %s\n", pszErrorMsg);
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("-FlushXEvents ()\n");
+ if (pErr->error_code == BadWindow
+ || pErr->error_code == BadMatch
+ || pErr->error_code == BadDrawable)
+ {
+#if 0
+ pthread_exit (NULL);
#endif
+ return 0;
+ }
- return True;
+ pthread_exit (NULL);
+ return 0;
}
/*
- * winMultiWindowWMErrorHandler - Our application specific error handler
+ *
*/
-static int
-winMultiWindowWMErrorHandler (Display *pDisplay, XErrorEvent *pErr)
+static void *
+winMultiWindowXMsgProc (void *pArg)
{
- char pszErrorMsg[100];
+ winWMMessageRec msg;
+ XMsgProcArgPtr pProcArg = (XMsgProcArgPtr) pArg;
+ char pszDisplay[512];
+ int iRetries;
+ XEvent event;
+ Atom atmWmName;
+ Atom atmWmHints;
+ Atom atmWmChange;
+ int iReturn;
+ XIconSize *xis;
- if (pErr->request_code == X_ChangeWindowAttributes
- && pErr->error_code == BadAccess)
+ ErrorF ("winMultiWindowXMsgProc - Hello\n");
+
+ /* Check that argument pointer is not invalid */
+ if (pProcArg == NULL)
{
- ErrorF ("ChangeWindowAttributes BadAccess.\n");
+ ErrorF ("winMultiWindowXMsgProc - pProcArg is NULL, bailing.\n");
pthread_exit (NULL);
}
+
+ ErrorF ("winMultiWindowXMsgProc - Calling pthread_mutex_lock ()\n");
+
+ /* Grab the server started mutex - pause until we get it */
+ iReturn = pthread_mutex_lock (pProcArg->ppmServerStarted);
+ if (iReturn != 0)
+ {
+ ErrorF ("winMultiWindowXMsgProc - pthread_mutex_lock () failed: %d\n",
+ iReturn);
+ pthread_exit (NULL);
+ }
+
+ ErrorF ("winMultiWindowXMsgProc - pthread_mutex_lock () returned.\n");
+
+ /* Only call XInitThreads once for the whole process */
+ if (!g_fCalledXInitThreads)
+ {
+ /* Allow multiple threads to access Xlib */
+ if (XInitThreads () == 0)
+ {
+ ErrorF ("winMultiWindowXMsgProc - XInitThreads () failed.\n");
+ pthread_exit (NULL);
+ }
+
+ /* Flag that XInitThreads has been called */
+ g_fCalledXInitThreads = TRUE;
+
+ ErrorF ("winMultiWindowXMsgProc - XInitThreads () returned.\n");
+ }
+
+ /* Release the server started mutex */
+ pthread_mutex_unlock (pProcArg->ppmServerStarted);
+
+ ErrorF ("winMultiWindowXMsgProc - pthread_mutex_unlock () returned.\n");
+
+ /* Setup the display connection string x */
+ snprintf (pszDisplay,
+ 512, "127.0.0.1:%s.%d", display, (int)pProcArg->dwScreen);
+
+ /* Print the display connection string */
+ ErrorF ("winMultiWindowXMsgProc - DISPLAY=%s\n", pszDisplay);
- XGetErrorText (pDisplay,
- pErr->error_code,
- pszErrorMsg,
- sizeof (pszErrorMsg));
- ErrorF ("ERROR: %s\n", pszErrorMsg);
+ iRetries = 0;
- if (pErr->error_code==BadWindow
- || pErr->error_code==BadMatch
- || pErr->error_code==BadDrawable)
+ /* Open the X display */
+ do
{
+ /* Try to open the display */
+ pProcArg->pDisplay = XOpenDisplay (pszDisplay);
+ if (pProcArg->pDisplay == NULL)
+ {
+ ErrorF ("winMultiWindowXMsgProc - Could not open display, try: %d, "
+ "sleeping: %d\n\f",
+ iRetries + 1, WIN_CONNECT_DELAY);
+ ++iRetries;
+ sleep (WIN_CONNECT_DELAY);
+ continue;
+ }
+ else
+ break;
+ }
+ while (pProcArg->pDisplay == NULL && iRetries < WIN_CONNECT_RETRIES);
+
+ /* Make sure that the display opened */
+ if (pProcArg->pDisplay == NULL)
+ {
+ ErrorF ("winMultiWindowXMsgProcwinInitMultiWindowWM - "
+ "Failed opening the display, giving up.\n\f");
pthread_exit (NULL);
}
- pthread_exit (NULL);
- return 0;
+ ErrorF ("winMultiWindowXMsgProc - XOpenDisplay () returned and "
+ "successfully opened the display.\n");
+
+ /* Install our error handler */
+ XSetErrorHandler (winMultiWindowWMErrorHandler);
+ XSetIOErrorHandler (winMutliWindowWMIOErrorHandler);
+
+ XSelectInput (pProcArg->pDisplay,
+ RootWindow(pProcArg->pDisplay, pProcArg->dwScreen),
+ SubstructureNotifyMask);
+
+ /* Set up the supported icon sizes */
+ xis = XAllocIconSize ();
+ if (xis)
+ {
+ xis->min_width = xis->min_height = 16;
+ xis->max_width = xis->max_height = 48;
+ xis->width_inc = xis->height_inc = 16;
+ XSetIconSizes (pProcArg->pDisplay,
+ RootWindow (pProcArg->pDisplay, pProcArg->dwScreen),
+ xis,
+ 1);
+ XFree (xis);
+ }
+
+ atmWmName = XInternAtom (pProcArg->pDisplay,
+ "WM_NAME",
+ False);
+ atmWmHints = XInternAtom (pProcArg->pDisplay,
+ "WM_HINTS",
+ False);
+ atmWmChange = XInternAtom (pProcArg->pDisplay,
+ "WM_CHANGE_STATE",
+ False);
+
+ /* Loop until we explicitly break out */
+ while (1)
+ {
+ /* Fetch next event */
+ XNextEvent (pProcArg->pDisplay, &event);
+
+ /* Branch on event type */
+ if (event.type == CreateNotify)
+ {
+ XSelectInput (pProcArg->pDisplay,
+ event.xcreatewindow.window,
+ PropertyChangeMask);
+ }
+ else if (event.type == PropertyNotify
+ && event.xproperty.atom == atmWmName)
+ {
+ memset (&msg, 0, sizeof (msg));
+
+ msg.msg = WM_WM_NAME_EVENT;
+ msg.iWindow = event.xproperty.window;
+
+ /* Other fields ignored */
+ winSendMessageToWM (pProcArg->pWMInfo, &msg);
+ }
+ else if (event.type == PropertyNotify
+ && event.xproperty.atom == atmWmHints)
+ {
+ memset (&msg, 0, sizeof (msg));
+
+ msg.msg = WM_WM_HINTS_EVENT;
+ msg.iWindow = event.xproperty.window;
+
+ /* Other fields ignored */
+ winSendMessageToWM (pProcArg->pWMInfo, &msg);
+ }
+ else if (event.type == ClientMessage
+ && event.xclient.message_type == atmWmChange
+ && event.xclient.data.l[0] == IconicState)
+ {
+ ErrorF ("winMultiWindowXMsgProc - WM_CHANGE_STATE - IconicState\n");
+
+ memset (&msg, 0, sizeof (msg));
+
+ msg.msg = WM_WM_CHANGE_STATE;
+ msg.iWindow = event.xclient.window;
+
+ winSendMessageToWM (pProcArg->pWMInfo, &msg);
+ }
+ }
}
@@ -682,12 +913,14 @@ winMultiWindowWMErrorHandler (Display *pDisplay, XErrorEvent *pErr)
Bool
winInitWM (void **ppWMInfo,
pthread_t *ptWMProc,
+ pthread_t *ptXMsgProc,
pthread_mutex_t *ppmServerStarted,
int dwScreen)
{
- WMProcArgPtr pArg = (WMProcArgPtr)malloc (sizeof(WMProcArgRec));
- WMInfoPtr pWMInfo = (WMInfoPtr)malloc (sizeof(WMInfoRec));
-
+ WMProcArgPtr pArg = (WMProcArgPtr) malloc (sizeof(WMProcArgRec));
+ WMInfoPtr pWMInfo = (WMInfoPtr) malloc (sizeof(WMInfoRec));
+ XMsgProcArgPtr pXMsgArg = (XMsgProcArgPtr) malloc (sizeof(XMsgProcArgRec));
+
/* Bail if the input parameters are bad */
if (pArg == NULL || pWMInfo == NULL)
{
@@ -714,7 +947,18 @@ winInitWM (void **ppWMInfo,
if (pthread_create (ptWMProc, NULL, winMultiWindowWMProc, pArg))
{
/* Bail if thread creation failed */
- ErrorF ("winInitWM - pthread_create failed.\n");
+ ErrorF ("winInitWM - pthread_create failed for Window Manager.\n");
+ return FALSE;
+ }
+
+ /* Spawn the XNextEvent thread, will send messages to WM */
+ pXMsgArg->dwScreen = dwScreen;
+ pXMsgArg->pWMInfo = pWMInfo;
+ pXMsgArg->ppmServerStarted = ppmServerStarted;
+ if (pthread_create (ptXMsgProc, NULL, winMultiWindowXMsgProc, pXMsgArg))
+ {
+ /* Bail if thread creation failed */
+ ErrorF ("winInitWM - pthread_create failed on XMSG.\n");
return FALSE;
}
@@ -788,21 +1032,28 @@ winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
/* Flag that we have called setlocale */
g_fCalledSetLocale = TRUE;
- /* Release the garbage mutex */
+ /* Only call XInitThreads once for the whole process */
+ if (!g_fCalledXInitThreads)
+ {
+ /* Allow multiple threads to access Xlib */
+ if (XInitThreads () == 0)
+ {
+ ErrorF ("winInitMultiWindowWM - XInitThreads () failed.\n");
+ pthread_exit (NULL);
+ }
+
+ /* Flag that XInitThreads has been called */
+ g_fCalledXInitThreads = TRUE;
+
+ ErrorF ("winInitMultiWindowWM - XInitThreads () returned.\n");
+ }
+
+ /* Release the server started mutex */
pthread_mutex_unlock (pProcArg->ppmServerStarted);
ErrorF ("winInitMultiWindowWM - pthread_mutex_unlock () returned.\n");
- /* Allow multiple threads to access Xlib */
- if (XInitThreads () == 0)
- {
- ErrorF ("winInitMultiWindowWM - XInitThreads () failed.\n");
- pthread_exit (NULL);
- }
-
- ErrorF ("winInitMultiWindowWM - XInitThreads () returned.\n");
-
- /* Set jump point for Error exits */
+ /* Set jump point for IO Error exits */
iReturn = setjmp (g_jmpEntry);
/* Check if we should continue operations */
@@ -814,13 +1065,23 @@ winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
iReturn);
pthread_exit (NULL);
}
+ else if (g_shutdown)
+ {
+ /* Shutting down, the X server severed out connection! */
+ ErrorF ("winInitMultiWindowWM - Detected shutdown in progress\n");
+ pthread_exit (NULL);
+ }
else if (iReturn == WIN_JMP_ERROR_IO)
{
ErrorF ("winInitMultiWindowWM - setjmp returned WIN_JMP_ERROR_IO\n");
}
/* Setup the display connection string x */
- snprintf (pszDisplay, 512, "127.0.0.1:%s.%d", display, pProcArg->dwScreen);
+ snprintf (pszDisplay,
+ 512,
+ "127.0.0.1:%s.%d",
+ display,
+ (int) pProcArg->dwScreen);
/* Print the display connection string */
ErrorF ("winInitMultiWindowWM - DISPLAY=%s\n", pszDisplay);
@@ -866,6 +1127,9 @@ winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
pWMInfo->atmWmDelete = XInternAtom (pWMInfo->pDisplay,
"WM_DELETE_WINDOW",
False);
+ pWMInfo->atmPrivMap = XInternAtom (pWMInfo->pDisplay,
+ WIN_HWND_CACHE,
+ False);
}
@@ -905,3 +1169,15 @@ winMutliWindowWMIOErrorHandler (Display *pDisplay)
return 0;
}
+
+
+/*
+ * Notify the MWM thread we're exiting and not to reconnect
+ */
+
+void
+winDeinitMultiWindowWM ()
+{
+ ErrorF ("winDeinitMultiWindowWM - Noting shutdown in progress\n");
+ g_shutdown = TRUE;
+}
diff --git a/hw/xwin/winnativegdi.c b/hw/xwin/winnativegdi.c
index 5fe8b4f38..f7d8a4a1a 100644
--- a/hw/xwin/winnativegdi.c
+++ b/hw/xwin/winnativegdi.c
@@ -27,7 +27,7 @@
*
* Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winnativegdi.c,v 1.13 2002/10/17 08:18:22 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winnativegdi.c,v 1.15 2003/08/07 23:47:58 alanh Exp $ */
#include "win.h"
@@ -65,6 +65,17 @@ winCloseScreenNativeGDI (int nIndex, ScreenPtr pScreen)
ErrorF ("winCloseScreenNativeGDI - Destroying window\n");
+ /* Delete tray icon, if we have one */
+ if (!pScreenInfo->fNoTrayIcon)
+ winDeleteNotifyIcon (pScreenPriv);
+
+ /* Free the exit confirmation dialog box, if it exists */
+ if (g_hDlgExit != NULL)
+ {
+ DestroyWindow (g_hDlgExit);
+ g_hDlgExit = NULL;
+ }
+
/* Kill our window */
if (pScreenPriv->hwndScreen)
{
@@ -207,13 +218,28 @@ winAdjustVideoModeNativeGDI (ScreenPtr pScreen)
/* Query GDI for current display depth */
dwBPP = GetDeviceCaps (hdc, BITSPIXEL);
+ pScreenInfo->dwDepth = GetDeviceCaps (hdc, PLANES);
+
+ switch (pScreenInfo->dwDepth) {
+ case 24:
+ case 16:
+ case 15:
+ case 8:
+ break;
+ default:
+ if (dwBPP == 32)
+ pScreenInfo->dwDepth = 24;
+ else
+ pScreenInfo->dwDepth = dwBPP;
+ break;
+ }
/* GDI cannot change the screen depth */
if (pScreenInfo->dwBPP == WIN_DEFAULT_BPP)
{
/* No -depth parameter passed, let the user know the depth being used */
ErrorF ("winAdjustVideoModeNativeGDI - Using Windows display "
- "depth of %d bits per pixel\n", dwBPP);
+ "depth of %d bits per pixel, %d depth\n", dwBPP, pScreenInfo->dwDepth);
/* Use GDI's depth */
pScreenInfo->dwBPP = dwBPP;
diff --git a/hw/xwin/winpfbdd.c b/hw/xwin/winpfbdd.c
index 59d22247e..7cbdb5e53 100644
--- a/hw/xwin/winpfbdd.c
+++ b/hw/xwin/winpfbdd.c
@@ -30,12 +30,19 @@
* Peter Busch
* Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winpfbdd.c,v 1.17 2002/10/17 08:18:22 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winpfbdd.c,v 1.18 2003/07/29 21:25:18 dawes Exp $ */
#include "win.h"
/*
+ * External global variables
+ */
+
+extern const GUID _IID_IDirectDraw2;
+
+
+/*
* Create a DirectDraw primary surface
*/
@@ -259,6 +266,17 @@ winCloseScreenPrimaryDD (int nIndex, ScreenPtr pScreen)
pScreenPriv->pdd = NULL;
}
+ /* Delete tray icon, if we have one */
+ if (!pScreenInfo->fNoTrayIcon)
+ winDeleteNotifyIcon (pScreenPriv);
+
+ /* Free the exit confirmation dialog box, if it exists */
+ if (g_hDlgExit != NULL)
+ {
+ DestroyWindow (g_hDlgExit);
+ g_hDlgExit = NULL;
+ }
+
/* Kill our window */
if (pScreenPriv->hwndScreen)
{
diff --git a/hw/xwin/winpixmap.c b/hw/xwin/winpixmap.c
index 519acedf5..43ade059b 100644
--- a/hw/xwin/winpixmap.c
+++ b/hw/xwin/winpixmap.c
@@ -28,7 +28,7 @@
* Authors: drewry, september 1986
* Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winpixmap.c,v 1.10 2002/10/17 08:18:24 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winpixmap.c,v 1.11 2003/08/07 23:47:58 alanh Exp $ */
#include "win.h"
@@ -50,9 +50,11 @@ winCreatePixmapNativeGDI (ScreenPtr pScreen,
return NullPixmap;
}
+#if CYGDEBUG
ErrorF ("winCreatePixmap () - w %d h %d d %d bw %d\n",
iWidth, iHeight, iDepth,
PixmapBytePad (iWidth, iDepth));
+#endif
/* Setup pixmap values */
pPixmap->drawable.type = DRAWABLE_PIXMAP;
@@ -112,7 +114,9 @@ winDestroyPixmapNativeGDI (PixmapPtr pPixmap)
{
winPrivPixmapPtr pPixmapPriv = NULL;
+#if CYGDEBUG
ErrorF ("winDestroyPixmapNativeGDI ()\n");
+#endif
/* Bail early if there is not a pixmap to destroy */
if (pPixmap == NULL)
@@ -124,8 +128,10 @@ winDestroyPixmapNativeGDI (PixmapPtr pPixmap)
/* Get a handle to the pixmap privates */
pPixmapPriv = winGetPixmapPriv (pPixmap);
+#if CYGDEBUG
ErrorF ("winDestroyPixmapNativeGDI - pPixmapPriv->hBitmap: %08x\n",
pPixmapPriv->hBitmap);
+#endif
/* Decrement reference count, return if nonzero */
--pPixmap->refcnt;
diff --git a/hw/xwin/winpolyline.c b/hw/xwin/winpolyline.c
index 194ecfe46..948c34428 100644
--- a/hw/xwin/winpolyline.c
+++ b/hw/xwin/winpolyline.c
@@ -27,7 +27,7 @@
*
* Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winpolyline.c,v 1.3 2001/09/13 08:25:45 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winpolyline.c,v 1.4 2003/08/07 23:47:58 alanh Exp $ */
#include "win.h"
@@ -39,5 +39,17 @@ winPolyLineNativeGDI (DrawablePtr pDrawable,
int npt,
DDXPointPtr ppt)
{
- FatalError ("winPolyLine()\n");
+ switch (pGC->lineStyle)
+ {
+ case LineSolid:
+ if (pGC->lineWidth == 0)
+ return miZeroLine (pDrawable, pGC, mode, npt, ppt);
+ else
+ miWideLine (pDrawable, pGC, mode, npt, ppt);
+ break;
+ case LineOnOffDash:
+ case LineDoubleDash:
+ miWideDash (pDrawable, pGC, mode, npt, ppt);
+ break;
+ }
}
diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c
index 41811d253..79e985c6b 100644
--- a/hw/xwin/winscrinit.c
+++ b/hw/xwin/winscrinit.c
@@ -31,7 +31,7 @@
* Harold L Hunt II
* Kensuke Matsuzaki
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winscrinit.c,v 1.26 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winscrinit.c,v 1.28 2003/08/07 23:47:58 alanh Exp $ */
#include "win.h"
@@ -510,6 +510,11 @@ winFinishScreenInitFB (int index,
/* Set the ServerStarted flag to false */
pScreenPriv->fServerStarted = FALSE;
+ /* Set the WindowOrderChanged flag to false */
+ pScreenPriv->fWindowOrderChanged = FALSE;
+
+ pScreenPriv->fRestacking = FALSE;
+
#if CYGDEBUG || YES
if (pScreenInfo->fMultiWindow)
ErrorF ("winFinishScreenInitFB - Calling winInitWM.\n");
@@ -519,6 +524,7 @@ winFinishScreenInitFB (int index,
if (pScreenInfo->fMultiWindow
&& !winInitWM (&pScreenPriv->pWMInfo,
&pScreenPriv->ptWMProc,
+ &pScreenPriv->ptXMsgProc,
&pScreenPriv->pmServerStarted,
pScreenInfo->dwScreen))
{
@@ -584,7 +590,7 @@ winFinishScreenInitNativeGDI (int index,
int nVisuals = 0, nDepths = 0, nRootDepth = 0;
/* Ignore user input (mouse, keyboard) */
- pScreenInfo->fIgnoreInput = TRUE;
+ pScreenInfo->fIgnoreInput = FALSE;
/* Get device contexts for the screen and shadow bitmap */
pScreenPriv->hdcScreen = GetDC (pScreenPriv->hwndScreen);
@@ -616,7 +622,7 @@ winFinishScreenInitNativeGDI (int index,
NULL, /* No framebuffer */
pScreenInfo->dwWidth, pScreenInfo->dwHeight,
monitorResolution, monitorResolution,
- pScreenInfo->dwWidth,
+ pScreenInfo->dwStride,
nRootDepth, nDepths, pDepths, rootVisual,
nVisuals, pVisuals))
{
@@ -624,6 +630,8 @@ winFinishScreenInitNativeGDI (int index,
return FALSE;
}
+ pScreen->defColormap = FakeClientID(0);
+
/*
* Register our block and wakeup handlers; these procedures
* process messages in our Windows message queue; specifically,
diff --git a/hw/xwin/winsetsp.c b/hw/xwin/winsetsp.c
index 657a7af50..c0340e47b 100644
--- a/hw/xwin/winsetsp.c
+++ b/hw/xwin/winsetsp.c
@@ -26,8 +26,9 @@
*from the XFree86 Project.
*
* Authors: Harold L Hunt II
+ * Alan Hourihane <alanh@fairlite.demon.co.uk>
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winsetsp.c,v 1.7 2001/11/01 12:19:42 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winsetsp.c,v 1.8 2003/08/07 23:47:58 alanh Exp $ */
#include "win.h"
@@ -44,22 +45,37 @@ winSetSpansNativeGDI (DrawablePtr pDrawable,
winGCPriv(pGC);
PixmapPtr pPixmap = NULL;
winPrivPixmapPtr pPixmapPriv = NULL;
- int iSpan;
- int *piWidth = NULL;
- DDXPointPtr pPoint = NULL;
- char *pSrc = pSrcs;
- HDC hdcMem;
- BITMAPINFOHEADER *pbmih;
- HBITMAP hBitmap = NULL;
HBITMAP hbmpOrig = NULL;
- DEBUG_FN_NAME("winSetSpans");
- DEBUGVARS;
- DEBUGPROC_MSG;
+ BITMAPINFO bmi;
+ HRGN hrgn = NULL, combined = NULL;
+ int nbox;
+ BoxPtr pbox;
+
+ nbox = REGION_NUM_RECTS (pGC->pCompositeClip);
+ pbox = REGION_RECTS (pGC->pCompositeClip);
+
+ if (!nbox) return;
+
+ combined = CreateRectRgn (pbox->x1, pbox->y1, pbox->x2, pbox->y2);
+ nbox--; pbox++;
+ while (nbox--)
+ {
+ hrgn = CreateRectRgn (pbox->x1, pbox->y1, pbox->x2, pbox->y2);
+ CombineRgn (combined, combined, hrgn, RGN_OR);
+ DeleteObject (hrgn);
+ hrgn = NULL;
+ pbox++;
+ }
/* Branch on the drawable type */
switch (pDrawable->type)
{
case DRAWABLE_PIXMAP:
+
+ SelectClipRgn (pGCPriv->hdcMem, combined);
+ DeleteObject (combined);
+ combined = NULL;
+
pPixmap = (PixmapPtr) pDrawable;
pPixmapPriv = winGetPixmapPriv (pPixmap);
@@ -69,264 +85,87 @@ winSetSpansNativeGDI (DrawablePtr pDrawable,
FatalError ("winSetSpans - DRAWABLE_PIXMAP - SelectObject () "
"failed on pPixmapPriv->hBitmap\n");
- /* Branch on the raster operation type */
- switch (pGC->alu)
- {
- case GXclear:
- FatalError ("winSetSpans - DRAWABLE_PIXMAP - GXclear\n");
- break;
-
- case GXand:
- FatalError ("winSetSpans - DRAWABLE_PIXMAP - GXand\n");
- break;
-
- case GXandReverse:
- FatalError ("winSetSpans - DRAWABLE_PIXMAP - GXandReverse\n");
- break;
-
- case GXcopy:
- ErrorF ("winSetSpans - DRAWABLE_PIXMAP - GXcopy %08x\n",
- pDrawable);
-
- /* Loop through spans */
- for (iSpan = 0; iSpan < iSpans; ++iSpan)
- {
- piWidth = piWidths + iSpan;
- pPoint = pPoints + iSpan;
-
- /* Blast the bits to the drawable */
- SetDIBits (pGCPriv->hdcMem,
- pPixmapPriv->hBitmap,
- pPoint->y, 1,
- pSrc,
- (BITMAPINFO *) pPixmapPriv->pbmih,
- 0);
-
- /* Display some useful information */
- ErrorF ("(%dx%dx%d) (%d,%d) w: %d ps: %08x\n",
- pDrawable->width, pDrawable->height, pDrawable->depth,
- pPoint->x, pPoint->y, *piWidth, pSrc);
-
- /* Calculate offset of next bit source */
- pSrc += 4 * ((*piWidth + 31) / 32);
- }
-
- /*
- * REMOVE - Visual verification only.
- */
- BitBlt (pGCPriv->hdc,
- pDrawable->width * 2, pDrawable->height,
- pDrawable->width, pDrawable->height,
- pGCPriv->hdcMem,
- 0, 0,
- SRCCOPY);
- DEBUG_MSG ("DRAWABLE_PIXMAP - GXcopy");
- break;
-
- case GXandInverted:
- FatalError ("winSetSpans - DRAWABLE_PIXMAP - GXandInverted\n");
- break;
-
- case GXnoop:
- FatalError ("winSetSpans - DRAWABLE_PIXMAP - GXnoop\n");
- break;
-
- case GXxor:
- FatalError ("winSetSpans - DRAWABLE_PIXMAP - GXxor\n");
- break;
-
- case GXor:
- FatalError ("winSetSpans - DRAWABLE_PIXMAP - GXor\n");
- break;
-
- case GXnor:
- FatalError ("winSetSpans - DRAWABLE_PIXMAP - GXnor\n");
- break;
-
- case GXequiv:
- FatalError ("winSetSpans - DRAWABLE_PIXMAP - GXequiv\n");
- break;
-
- case GXinvert:
- ErrorF ("winSetSpans - DRAWABLE_PIXMAP - GXinvert %08x\n",
- pDrawable);
-
- /* Create a temporary DC */
- hdcMem = CreateCompatibleDC (NULL);
-
- /* Loop through spans */
- for (iSpan = 0; iSpan < iSpans; ++iSpan)
- {
- piWidth = piWidths + iSpan;
- pPoint = pPoints + iSpan;
-
- /* Create a one-line DIB for the bit data */
- hBitmap = winCreateDIBNativeGDI (*piWidth, 1, pDrawable->depth,
- NULL, (BITMAPINFO **) &pbmih);
-
- /* Select the span line line bitmap into the temporary DC */
- hbmpOrig = SelectObject (hdcMem, hBitmap);
-
- /* Blast bit data to the one-line DIB */
- SetDIBits (hdcMem, hBitmap,
- 0, 1,
- pSrc,
- (BITMAPINFO *) pbmih,
- DIB_RGB_COLORS);
-
- /* Blit the span line to the drawable */
- BitBlt (pGCPriv->hdcMem,
- pPoint->x, pPoint->y,
- *piWidth, 1,
- hdcMem,
- 0, 0,
- NOTSRCCOPY);
-
- /*
- * REMOVE - Visual verification only.
- */
- BitBlt (pGCPriv->hdc,
- pDrawable->width, pDrawable->height + pPoint->y,
- *piWidth, 1,
- hdcMem,
- 0, 0,
- SRCCOPY);
-
- /* Display some useful information */
- ErrorF ("(%dx%dx%d) (%d,%d) w: %d ps: %08x\n",
- pDrawable->width, pDrawable->height, pDrawable->depth,
- pPoint->x, pPoint->y, *piWidth, pSrc);
-
- /* Calculate offset of next bit source */
- pSrc += 4 * ((*piWidth + 31) / 32);
-
- /* Pop the span line bitmap out of the memory DC */
- SelectObject (hdcMem, hbmpOrig);
-
- /* Free the temporary bitmap */
- DeleteObject (hBitmap);
- hBitmap = NULL;
- }
-
- /*
- * REMOVE - Visual verification only.
- */
- DEBUG_MSG ("DRAWABLE_PIXMAP - GXinvert - Prior to invert");
- BitBlt (pGCPriv->hdc,
- pDrawable->width * 2, pDrawable->height,
- pDrawable->width, pDrawable->height,
- pGCPriv->hdcMem,
- 0, 0,
- SRCCOPY);
- DEBUG_MSG ("DRAWABLE_PIXMAP - GXinvert - Finished invert");
-
- /* Release the scratch DC */
- DeleteDC (hdcMem);
- break;
-
- case GXorReverse:
- FatalError ("winSetSpans - DRAWABLE_PIXMAP - GXorReverse\n");
- break;
-
- case GXcopyInverted:
- FatalError ("winSetSpans - DRAWABLE_PIXMAP - GXcopyInverted\n");
- break;
-
- case GXorInverted:
- FatalError ("winSetSpans - DRAWABLE_PIXMAP - GXorInverted\n");
- break;
-
- case GXnand:
- FatalError ("winSetSpans - DRAWABLE_PIXMAP - GXnand\n");
- break;
-
- case GXset:
- FatalError ("winSetSpans - DRAWABLE_PIXMAP - GXset\n");
- break;
-
- default:
- FatalError ("winSetSpans - DRAWABLE_PIXMAP - Unknown ROP\n");
- break;
- }
+ while (iSpans--)
+ {
+ ZeroMemory (&bmi, sizeof (BITMAPINFO));
+ bmi.bmiHeader.biSize = sizeof (BITMAPINFOHEADER);
+ bmi.bmiHeader.biWidth = *piWidths;
+ bmi.bmiHeader.biHeight = 1;
+ bmi.bmiHeader.biPlanes = 1;
+ bmi.bmiHeader.biBitCount = pDrawable->depth;
+ bmi.bmiHeader.biCompression = BI_RGB;
+
+ /* Setup color table for mono DIBs */
+ if (pDrawable->depth == 1)
+ {
+ bmi.bmiColors[1].rgbBlue = 255;
+ bmi.bmiColors[1].rgbGreen = 255;
+ bmi.bmiColors[1].rgbRed = 255;
+ }
+
+ StretchDIBits (pGCPriv->hdcMem,
+ pPoints->x, pPoints->y,
+ *piWidths, 1,
+ 0, 0,
+ *piWidths, 1,
+ pSrcs,
+ (BITMAPINFO *) &bmi,
+ DIB_RGB_COLORS,
+ g_copyROP[pGC->alu]);
+
+ pSrcs += PixmapBytePad (*piWidths, pDrawable->depth);
+ pPoints++;
+ piWidths++;
+ }
+
+ /* Reset the clip region */
+ SelectClipRgn (pGCPriv->hdcMem, NULL);
/* Push the drawable pixmap out of the GC HDC */
SelectObject (pGCPriv->hdcMem, hbmpOrig);
break;
case DRAWABLE_WINDOW:
- FatalError ("\nwinSetSpansNativeGDI - DRAWABLE_WINDOW\n\n");
-
- /* Branch on the raster operation type */
- switch (pGC->alu)
- {
- case GXclear:
- ErrorF ("winSetSpans () - DRAWABLE_WINDOW - GXclear\n");
- break;
-
- case GXand:
- ErrorF ("winSetSpans () - DRAWABLE_WINDOW - GXand\n");
- break;
-
- case GXandReverse:
- ErrorF ("winSetSpans () - DRAWABLE_WINDOW - GXandReverse\n");
- break;
-
- case GXcopy:
- ErrorF ("winSetSpans () - DRAWABLE_WINDOW - GXcopy\n");
- break;
-
- case GXandInverted:
- ErrorF ("winSetSpans () - DRAWABLE_WINDOW - GXandInverted\n");
- break;
-
- case GXnoop:
- ErrorF ("winSetSpans () - DRAWABLE_WINDOW - GXnoop\n");
- break;
-
- case GXxor:
- ErrorF ("winSetSpans () - DRAWABLE_WINDOW - GXxor\n");
- break;
-
- case GXor:
- ErrorF ("winSetSpans () - DRAWABLE_WINDOW - GXor\n");
- break;
-
- case GXnor:
- ErrorF ("winSetSpans () - DRAWABLE_WINDOW - GXnor\n");
- break;
-
- case GXequiv:
- ErrorF ("winSetSpans () - DRAWABLE_WINDOW - GXequiv\n");
- break;
-
- case GXinvert:
- ErrorF ("winSetSpans () - DRAWABLE_WINDOW - GXinvert\n");
- break;
-
- case GXorReverse:
- ErrorF ("winSetSpans () - DRAWABLE_WINDOW - GXorReverse\n");
- break;
-
- case GXcopyInverted:
- ErrorF ("winSetSpans () - DRAWABLE_WINDOW - GXcopyInverted\n");
- break;
-
- case GXorInverted:
- ErrorF ("winSetSpans () - DRAWABLE_WINDOW - GXorInverted\n");
- break;
-
- case GXnand:
- ErrorF ("winSetSpans () - DRAWABLE_WINDOW - GXnand\n");
- break;
-
- case GXset:
- ErrorF ("winSetSpans () - DRAWABLE_WINDOW - GXset\n");
- break;
- default:
- ErrorF ("winSetSpans () - DRAWABLE_WINDOW - Unknown ROP\n");
- break;
- }
+ SelectClipRgn (pGCPriv->hdc, combined);
+ DeleteObject (combined);
+ combined = NULL;
+
+ while (iSpans--)
+ {
+ ZeroMemory (&bmi, sizeof (BITMAPINFO));
+ bmi.bmiHeader.biSize = sizeof (BITMAPINFOHEADER);
+ bmi.bmiHeader.biWidth = *piWidths;
+ bmi.bmiHeader.biHeight = 1;
+ bmi.bmiHeader.biPlanes = 1;
+ bmi.bmiHeader.biBitCount = pDrawable->depth;
+ bmi.bmiHeader.biCompression = BI_RGB;
+
+ /* Setup color table for mono DIBs */
+ if (pDrawable->depth == 1)
+ {
+ bmi.bmiColors[1].rgbBlue = 255;
+ bmi.bmiColors[1].rgbGreen = 255;
+ bmi.bmiColors[1].rgbRed = 255;
+ }
+
+ StretchDIBits (pGCPriv->hdc,
+ pPoints->x, pPoints->y,
+ *piWidths, 1,
+ 0, 0,
+ *piWidths, 1,
+ pSrcs,
+ (BITMAPINFO *) &bmi,
+ DIB_RGB_COLORS,
+ g_copyROP[pGC->alu]);
+
+ pSrcs += PixmapBytePad (*piWidths, pDrawable->depth);
+ pPoints++;
+ piWidths++;
+ }
+
+ /* Reset the clip region */
+ SelectClipRgn (pGCPriv->hdc, NULL);
break;
case UNDRAWABLE_WINDOW:
diff --git a/hw/xwin/winshaddd.c b/hw/xwin/winshaddd.c
index 9c14ebf34..a409c27c6 100644
--- a/hw/xwin/winshaddd.c
+++ b/hw/xwin/winshaddd.c
@@ -30,7 +30,7 @@
* Peter Busch
* Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winshaddd.c,v 1.23 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winshaddd.c,v 1.24 2003/07/29 21:25:18 dawes Exp $ */
#include "win.h"
@@ -40,7 +40,7 @@
*/
#ifdef DEFINE_GUID
#undef DEFINE_GUID
-#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
+#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
#endif /* DEFINE_GUID */
@@ -671,6 +671,17 @@ winCloseScreenShadowDD (int nIndex, ScreenPtr pScreen)
pScreenPriv->pdd = NULL;
}
+ /* Delete tray icon, if we have one */
+ if (!pScreenInfo->fNoTrayIcon)
+ winDeleteNotifyIcon (pScreenPriv);
+
+ /* Free the exit confirmation dialog box, if it exists */
+ if (g_hDlgExit != NULL)
+ {
+ DestroyWindow (g_hDlgExit);
+ g_hDlgExit = NULL;
+ }
+
/* Kill our window */
if (pScreenPriv->hwndScreen)
{
diff --git a/hw/xwin/winshadddnl.c b/hw/xwin/winshadddnl.c
index 69396a79b..e902f31b0 100644
--- a/hw/xwin/winshadddnl.c
+++ b/hw/xwin/winshadddnl.c
@@ -30,7 +30,7 @@
* Peter Busch
* Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winshadddnl.c,v 1.24 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winshadddnl.c,v 1.26 2003/10/02 13:30:11 eich Exp $ */
#include "win.h"
@@ -40,7 +40,7 @@
*/
#ifdef DEFINE_GUID
#undef DEFINE_GUID
-#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
+#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
#endif /* DEFINE_GUID */
/*
@@ -51,6 +51,8 @@
DEFINE_GUID( IID_IDirectDraw4, 0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
#endif /* IID_IDirectDraw4 */
+#define FAIL_MSG_MAX_BLT 10
+
/*
* Create the primary surface and attach the clipper.
@@ -514,9 +516,24 @@ winShadowUpdateDDNL (ScreenPtr pScreen,
NULL);
if (FAILED (ddrval))
{
- ErrorF ("winShadowUpdateDDNL - IDirectDrawSurface4_Blt () "
- "failed: %08x\n",
- ddrval);
+ static int s_iFailCount = 0;
+
+ if (s_iFailCount < FAIL_MSG_MAX_BLT)
+ {
+ ErrorF ("winShadowUpdateDDNL - IDirectDrawSurface4_Blt () "
+ "failed: %08x\n",
+ ddrval);
+
+ ++s_iFailCount;
+
+ if (s_iFailCount == FAIL_MSG_MAX_BLT)
+ {
+ ErrorF ("winShadowUpdateDDNL - IDirectDrawSurface4_Blt "
+ "failure message maximum (%d) reached. No "
+ "more failure messages will be printed.",
+ FAIL_MSG_MAX_BLT);
+ }
+ }
}
/* Get a pointer to the next box */
@@ -650,6 +667,17 @@ winCloseScreenShadowDDNL (int nIndex, ScreenPtr pScreen)
pScreenPriv->pdd = NULL;
}
+ /* Delete tray icon, if we have one */
+ if (!pScreenInfo->fNoTrayIcon)
+ winDeleteNotifyIcon (pScreenPriv);
+
+ /* Free the exit confirmation dialog box, if it exists */
+ if (g_hDlgExit != NULL)
+ {
+ DestroyWindow (g_hDlgExit);
+ g_hDlgExit = NULL;
+ }
+
/* Kill our window */
if (pScreenPriv->hwndScreen)
{
diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c
index d2f72f20d..16b1969d7 100644
--- a/hw/xwin/winshadgdi.c
+++ b/hw/xwin/winshadgdi.c
@@ -27,7 +27,7 @@
*
* Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winshadgdi.c,v 1.22 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winshadgdi.c,v 1.23 2003/07/29 21:25:18 dawes Exp $ */
#include "win.h"
@@ -216,7 +216,7 @@ winRedrawAllProcShadowGDI (HWND hwnd, LPARAM lParam)
if (GetClassName (hwnd, strClassName, 100))
{
- if(strcmp (WINDOW_CLASS_X, strClassName) == 0)
+ if (strncmp (WINDOW_CLASS_X, strClassName, strlen (WINDOW_CLASS_X)) == 0)
{
InvalidateRect (hwnd, NULL, FALSE);
UpdateWindow (hwnd);
@@ -323,6 +323,17 @@ winAllocateFBShadowGDI (ScreenPtr pScreen)
return FALSE;
}
+ /* Look for height weirdness */
+ if (dibsection.dsBmih.biHeight < 0)
+ {
+ /* FIXME: Figure out why biHeight is sometimes negative */
+ ErrorF ("winAllocateFBShadowGDI - WEIRDNESS - biHeight "
+ "still negative: %d\n"
+ "winAllocateFBShadowGDI - WEIRDNESS - Flipping biHeight sign\n",
+ dibsection.dsBmih.biHeight);
+ dibsection.dsBmih.biHeight = -dibsection.dsBmih.biHeight;
+ }
+
/* Set screeninfo stride */
pScreenInfo->dwStride = ((dibsection.dsBmih.biSizeImage
/ dibsection.dsBmih.biHeight)
@@ -515,6 +526,17 @@ winCloseScreenShadowGDI (int nIndex, ScreenPtr pScreen)
/* Free the screen DC */
ReleaseDC (pScreenPriv->hwndScreen, pScreenPriv->hdcScreen);
+ /* Delete tray icon, if we have one */
+ if (!pScreenInfo->fNoTrayIcon)
+ winDeleteNotifyIcon (pScreenPriv);
+
+ /* Free the exit confirmation dialog box, if it exists */
+ if (g_hDlgExit != NULL)
+ {
+ DestroyWindow (g_hDlgExit);
+ g_hDlgExit = NULL;
+ }
+
/* Kill our window */
if (pScreenPriv->hwndScreen)
{
diff --git a/hw/xwin/winwakeup.c b/hw/xwin/winwakeup.c
index 37e062fa6..f311d0dc9 100644
--- a/hw/xwin/winwakeup.c
+++ b/hw/xwin/winwakeup.c
@@ -30,7 +30,7 @@
* Peter Busch
* Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winwakeup.c,v 1.6 2002/10/17 08:18:25 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winwakeup.c,v 1.7 2003/07/29 21:25:18 dawes Exp $ */
#include "win.h"
@@ -41,17 +41,23 @@ winWakeupHandler (int nScreen,
unsigned long ulResult,
pointer pReadmask)
{
+#if 0
winScreenPriv((ScreenPtr)pWakeupData);
+#endif
MSG msg;
/* Process all messages on our queue */
while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
{
- if (g_hDlgDepthChange == 0 || !IsDialogMessage (g_hDlgDepthChange, &msg))
+ if ((g_hDlgDepthChange == 0
+ || !IsDialogMessage (g_hDlgDepthChange, &msg))
+ && (g_hDlgExit == 0
+ || !IsDialogMessage (g_hDlgExit, &msg)))
{
DispatchMessage (&msg);
}
}
+ winReorderWindowsMultiWindow ((ScreenPtr)pWakeupData);
}
diff --git a/hw/xwin/winwindow.c b/hw/xwin/winwindow.c
index b2469c30a..6515c8596 100644
--- a/hw/xwin/winwindow.c
+++ b/hw/xwin/winwindow.c
@@ -28,7 +28,7 @@
* Authors: Harold L Hunt II
* Kensuke Matsuzaki
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winwindow.c,v 1.6 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winwindow.c,v 1.9 2003/11/10 18:22:44 tsi Exp $ */
#include "win.h"
@@ -41,12 +41,12 @@ winAddRgn (WindowPtr pWindow, pointer data);
static
void
-winUpdateRgn (WindowPtr pWindow);
+winUpdateRgnPRootless (WindowPtr pWindow);
#ifdef SHAPE
static
void
-winReshape (WindowPtr pWin);
+winReshapePRootless (WindowPtr pWin);
#endif
@@ -91,7 +91,84 @@ winCopyWindowNativeGDI (WindowPtr pWin,
DDXPointRec ptOldOrg,
RegionPtr prgnSrc)
{
- ErrorF ("winCopyWindowNativeGDI ()\n");
+ DDXPointPtr pptSrc;
+ DDXPointPtr ppt;
+ RegionPtr prgnDst;
+ BoxPtr pBox;
+ int dx, dy;
+ int i, nbox;
+ WindowPtr pwinRoot;
+ BoxPtr pBoxDst, pBoxSrc;
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ winScreenPriv(pScreen);
+
+#if 0
+ ErrorF ("winCopyWindow\n");
+#endif
+
+ /* Get a pointer to the root window */
+ pwinRoot = WindowTable[pWin->drawable.pScreen->myNum];
+
+ /* Create a region for the destination */
+ prgnDst = REGION_CREATE(pWin->drawable.pScreen, NULL, 1);
+
+ /* Calculate the shift from the source to the destination */
+ dx = ptOldOrg.x - pWin->drawable.x;
+ dy = ptOldOrg.y - pWin->drawable.y;
+
+ /* Translate the region from the destination to the source? */
+ REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy);
+ REGION_INTERSECT(pWin->drawable.pScreen, prgnDst, &pWin->borderClip,
+ prgnSrc);
+
+ /* Get a pointer to the first box in the region to be copied */
+ pBox = REGION_RECTS(prgnDst);
+
+ /* Get the number of boxes in the region */
+ nbox = REGION_NUM_RECTS(prgnDst);
+
+ /* Allocate source points for each box */
+ if(!(pptSrc = (DDXPointPtr )ALLOCATE_LOCAL(nbox * sizeof(DDXPointRec))))
+ return;
+
+ /* Set an iterator pointer */
+ ppt = pptSrc;
+
+ /* Calculate the source point of each box? */
+ for (i = nbox; --i >= 0; ppt++, pBox++)
+ {
+ ppt->x = pBox->x1 + dx;
+ ppt->y = pBox->y1 + dy;
+ }
+
+ /* Setup loop pointers again */
+ pBoxDst = REGION_RECTS(prgnDst);
+ ppt = pptSrc;
+
+#if 0
+ ErrorF ("winCopyWindow - x1\tx2\ty1\ty2\tx\ty\n");
+#endif
+
+ /* BitBlt each source to the destination point */
+ for (i = nbox; --i >= 0; pBoxDst++, ppt++)
+ {
+#if 0
+ ErrorF ("winCopyWindow - %d\t%d\t%d\t%d\t%d\t%d\n",
+ pBoxDst->x1, pBoxDst->x2, pBoxDst->y1, pBoxDst->y2,
+ ppt->x, ppt->y);
+#endif
+
+ BitBlt (pScreenPriv->hdcScreen,
+ pBoxDst->x1, pBoxDst->y1,
+ pBoxDst->x2 - pBoxDst->x1, pBoxDst->y2 - pBoxDst->y1,
+ pScreenPriv->hdcScreen,
+ ppt->x, ppt->y,
+ SRCCOPY);
+ }
+
+ /* Cleanup the regions, etc. */
+ DEALLOCATE_LOCAL(pptSrc);
+ REGION_DESTROY(pWin->drawable.pScreen, prgnDst);
}
@@ -153,7 +230,6 @@ winCreateWindowPRootless (WindowPtr pWin)
fResult = winGetScreenPriv(pWin->drawable.pScreen)->CreateWindow(pWin);
pWinPriv->hRgn = NULL;
- /*winUpdateRgn (pWin);*/
return fResult;
}
@@ -180,7 +256,7 @@ winDestroyWindowPRootless (WindowPtr pWin)
pWinPriv->hRgn = NULL;
}
- winUpdateRgn (pWin);
+ winUpdateRgnPRootless (pWin);
return fResult;
}
@@ -200,7 +276,7 @@ winPositionWindowPRootless (WindowPtr pWin, int x, int y)
fResult = winGetScreenPriv(pWin->drawable.pScreen)->PositionWindow(pWin, x, y);
- winUpdateRgn (pWin);
+ winUpdateRgnPRootless (pWin);
return fResult;
}
@@ -220,7 +296,7 @@ winChangeWindowAttributesPRootless (WindowPtr pWin, unsigned long mask)
fResult = winGetScreenPriv(pWin->drawable.pScreen)->ChangeWindowAttributes(pWin, mask);
- winUpdateRgn (pWin);
+ winUpdateRgnPRootless (pWin);
return fResult;
}
@@ -248,7 +324,7 @@ winUnmapWindowPRootless (WindowPtr pWin)
pWinPriv->hRgn = NULL;
}
- winUpdateRgn (pWin);
+ winUpdateRgnPRootless (pWin);
return fResult;
}
@@ -269,9 +345,9 @@ winMapWindowPRootless (WindowPtr pWin)
fResult = winGetScreenPriv(pWin->drawable.pScreen)->RealizeWindow(pWin);
- winReshape (pWin);
+ winReshapePRootless (pWin);
- winUpdateRgn (pWin);
+ winUpdateRgnPRootless (pWin);
return fResult;
}
@@ -287,8 +363,8 @@ winSetShapePRootless (WindowPtr pWin)
winGetScreenPriv(pWin->drawable.pScreen)->SetShape(pWin);
- winReshape (pWin);
- winUpdateRgn (pWin);
+ winReshapePRootless (pWin);
+ winUpdateRgnPRootless (pWin);
return;
}
@@ -366,7 +442,7 @@ winAddRgn (WindowPtr pWin, pointer data)
static
void
-winUpdateRgn (WindowPtr pWin)
+winUpdateRgnPRootless (WindowPtr pWin)
{
HRGN hRgn = CreateRectRgn (0, 0, 0, 0);
@@ -378,7 +454,7 @@ winUpdateRgn (WindowPtr pWin)
}
else
{
- ErrorF ("winUpdateRgn - CreateRectRgn failed.\n");
+ ErrorF ("winUpdateRgnPRootless - CreateRectRgn failed.\n");
}
}
@@ -386,17 +462,19 @@ winUpdateRgn (WindowPtr pWin)
#ifdef SHAPE
static
void
-winReshape (WindowPtr pWin)
+winReshapePRootless (WindowPtr pWin)
{
int nRects;
+#if 0
ScreenPtr pScreen = pWin->drawable.pScreen;
+#endif
RegionRec rrNewShape;
BoxPtr pShape, pRects, pEnd;
HRGN hRgn, hRgnRect;
winWindowPriv(pWin);
#if CYGDEBUG
- ErrorF ("winReshape ()\n");
+ ErrorF ("winReshapePRootless ()\n");
#endif
/* Bail if the window is the root window */
@@ -418,7 +496,7 @@ winReshape (WindowPtr pWin)
if (!wBoundingShape (pWin))
return;
- REGION_INIT(pScreen, &rrNewShape, NullBox, 0);
+ REGION_NULL(pScreen, &rrNewShape);
REGION_COPY(pScreen, &rrNewShape, wBoundingShape(pWin));
REGION_TRANSLATE(pScreen, &rrNewShape, pWin->borderWidth,
pWin->borderWidth);
@@ -439,13 +517,13 @@ winReshape (WindowPtr pWin)
pRects->x2, pRects->y2);
if (hRgnRect == NULL)
{
- ErrorF("winReshape - CreateRectRgn() failed\n");
+ ErrorF("winReshapePRootless - CreateRectRgn() failed\n");
}
/* Merge the Windows region with the accumulated region */
if (CombineRgn (hRgn, hRgn, hRgnRect, RGN_OR) == ERROR)
{
- ErrorF("winReshape - CombineRgn() failed\n");
+ ErrorF("winReshapePRootless - CombineRgn() failed\n");
}
/* Delete the temporary Windows region */
diff --git a/hw/xwin/winwindow.h b/hw/xwin/winwindow.h
index d828b4c70..8153b5600 100644
--- a/hw/xwin/winwindow.h
+++ b/hw/xwin/winwindow.h
@@ -27,7 +27,7 @@
*
* Authors: Kensuke Matsuzaki
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winwindow.h,v 1.1 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winwindow.h,v 1.4 2003/10/08 11:13:03 eich Exp $ */
#ifndef _WINWINDOW_H_
@@ -41,20 +41,23 @@
#endif
/* Constant strings */
-#define WINDOW_CLASS "cygwin/xfree86 rl"
-#define WINDOW_TITLE "Cygwin/XFree86 rl"
-#define WIN_SCR_PROP "cyg_screen_prop_rl"
+#define WINDOW_CLASS "cygwin/xfree86"
+#define WINDOW_TITLE "Cygwin/XFree86 - %s:%d"
+#define WINDOW_TITLE_XDMCP "Cygwin/XFree86 - %s"
+#define WIN_SCR_PROP "cyg_screen_prop rl"
#define WINDOW_CLASS_X "cygwin/xfree86 X rl"
-#define WINDOW_TITLE_X "Cygwin/XFree86 X rl"
+#define WINDOW_TITLE_X "Cygwin/XFree86 X"
#define WIN_WINDOW_PROP "cyg_window_prop_rl"
#define WIN_MSG_QUEUE_FNAME "/dev/windows"
-#define WIN_LOG_FNAME "/tmp/XWinrl.log"
+#define WIN_LOG_FNAME "/tmp/XWin.log"
#define WIN_WID_PROP "cyg_wid_prop_rl"
#define WIN_NEEDMANAGE_PROP "cyg_override_redirect_prop_rl"
+#define WIN_HWND_CACHE "cyg_privmap_rl"
#define CYGMULTIWINDOW_DEBUG NO
typedef struct _winPrivScreenRec *winPrivScreenPtr;
+
/*
* Window privates
*/
@@ -70,6 +73,8 @@ typedef struct
int iWidth;
int iHeight;
Bool fXKilled;
+ Bool fNeedRestore;
+ POINT ptRestore;
} winPrivWinRec, *winPrivWinPtr;
typedef struct _winWMMessageRec{
@@ -81,19 +86,22 @@ typedef struct _winWMMessageRec{
int iWidth, iHeight;
} winWMMessageRec, *winWMMessagePtr;
+
/*
* winrootlesswm.c
*/
-#define WM_WM_MOVE (WM_USER + 1)
-#define WM_WM_SIZE (WM_USER + 2)
-#define WM_WM_RAISE (WM_USER + 3)
-#define WM_WM_LOWER (WM_USER + 4)
-#define WM_WM_MAP (WM_USER + 5)
-#define WM_WM_UNMAP (WM_USER + 6)
-#define WM_WM_KILL (WM_USER + 7)
-#define WM_WM_ACTIVATE (WM_USER + 8)
-#define WMMSG_MSG 10
+#define WM_WM_MOVE (WM_USER + 1)
+#define WM_WM_SIZE (WM_USER + 2)
+#define WM_WM_RAISE (WM_USER + 3)
+#define WM_WM_LOWER (WM_USER + 4)
+#define WM_WM_MAP (WM_USER + 5)
+#define WM_WM_UNMAP (WM_USER + 6)
+#define WM_WM_KILL (WM_USER + 7)
+#define WM_WM_ACTIVATE (WM_USER + 8)
+#define WM_WM_NAME_EVENT (WM_USER + 9)
+#define WM_WM_HINTS_EVENT (WM_USER + 10)
+#define WM_WM_CHANGE_STATE (WM_USER + 11)
/*
@@ -106,13 +114,22 @@ winSendMessageToWM (void *pWMInfo, winWMMessagePtr msg);
Bool
winInitWM (void **ppWMInfo,
pthread_t *ptWMProc,
-#if 0
- pthread_cond_t *ppcServerStarted,
-#endif
+ pthread_t *ptXMsgProc,
pthread_mutex_t *ppmServerStarted,
-#if 0
- Bool *pfServerStarted,
-#endif
int dwScreen);
+void
+winDeinitMultiWindowWM ();
+
+void
+winMinimizeWindow (Window id);
+
+
+/*
+ * winmultiwindowicons.c
+ */
+
+void
+winUpdateIcon (Window id);
+
#endif
diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c
index 6aa29316d..5b47a212a 100644
--- a/hw/xwin/winwndproc.c
+++ b/hw/xwin/winwndproc.c
@@ -31,14 +31,18 @@
* Harold L Hunt II
* MATSUZAKI Kensuke
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winwndproc.c,v 1.24 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winwndproc.c,v 1.26 2003/10/02 13:30:11 eich Exp $ */
#include "win.h"
#include <commctrl.h>
+#include "winprefs.h"
+
+/*
+ * Global variables
+ */
+
+Bool g_fCursor = TRUE;
-BOOL CALLBACK
-winChangeDepthDlgProc (HWND hDialog, UINT message,
- WPARAM wParam, LPARAM lParam);
/*
@@ -55,7 +59,6 @@ winWindowProc (HWND hwnd, UINT message,
static ScreenPtr s_pScreen = NULL;
static HWND s_hwndLastPrivates = NULL;
static HINSTANCE s_hInstance;
- static Bool s_fCursor = TRUE;
static Bool s_fTracking = FALSE;
static unsigned long s_ulServerGeneration = 0;
int iScanCode;
@@ -90,6 +93,10 @@ winWindowProc (HWND hwnd, UINT message,
/* Branch on message type */
switch (message)
{
+ case WM_TRAYICON:
+ return winHandleIconMessage (hwnd, message, wParam, lParam,
+ s_pScreenPriv);
+
case WM_CREATE:
#if CYGDEBUG
ErrorF ("winWindowProc - WM_CREATE\n");
@@ -113,6 +120,23 @@ winWindowProc (HWND hwnd, UINT message,
/* Store the mode key states so restore doesn't try to restore them */
winStoreModeKeyStates (s_pScreen);
+
+ /* Setup tray icon */
+ if (!s_pScreenInfo->fNoTrayIcon)
+ {
+ /*
+ * NOTE: The WM_CREATE message is processed before CreateWindowEx
+ * returns, so s_pScreenPriv->hwndScreen is invalid at this point.
+ * We go ahead and copy our hwnd parameter over top of the screen
+ * privates hwndScreen so that we have a valid value for
+ * that member. Otherwise, the tray icon will disappear
+ * the first time you move the mouse over top of it.
+ */
+
+ s_pScreenPriv->hwndScreen = hwnd;
+
+ winInitNotifyIcon (s_pScreenPriv);
+ }
return 0;
case WM_DISPLAYCHANGE:
@@ -161,7 +185,7 @@ winWindowProc (HWND hwnd, UINT message,
* Shadow DirectDraw Non-Locking
* Primary DirectDraw
*
- * TrueColor --> TrueColor depth changs are non-optimal for:
+ * TrueColor --> TrueColor depth changes are non-optimal for:
* Windowed:
* Shadow GDI
*
@@ -189,45 +213,14 @@ winWindowProc (HWND hwnd, UINT message,
/* Cannot display the visual until the depth is restored */
ErrorF ("winWindowProc - Disruptive change in depth\n");
- /* Check if the dialog box already exists */
- if (g_hDlgDepthChange != NULL)
- {
- ErrorF ("winWindowProc - Dialog box already exists\n");
+ /* Display Exit dialog */
+ winDisplayDepthChangeDialog (s_pScreenPriv);
- /* Dialog box already exists, just display it */
- ShowWindow (g_hDlgDepthChange, SW_SHOWDEFAULT);
- }
- else
- {
- /*
- * Display a notification to the user that the visual
- * will not be displayed until the Windows display depth
- * is restored to the original value.
- */
- g_hDlgDepthChange = CreateDialogParam (s_hInstance,
- "DEPTH_CHANGE_BOX",
- hwnd,
- winChangeDepthDlgProc,
- (int) s_pScreenPriv);
-
- /* Show the dialog box */
- ShowWindow (g_hDlgDepthChange, SW_SHOW);
-
- ErrorF ("winWindowProc - DialogBox returned: %d\n",
- g_hDlgDepthChange);
- ErrorF ("winWindowProc - GetLastError: %d\n", GetLastError ());
-
- /* Minimize the display window */
- ShowWindow (hwnd, SW_MINIMIZE);
-
- /* Flag that we have an invalid screen depth */
- s_pScreenPriv->fBadDepth = TRUE;
-
- /*
- * TODO: Redisplay the dialog box if it is not
- * currently displayed.
- */
- }
+ /* Flag that we have an invalid screen depth */
+ s_pScreenPriv->fBadDepth = TRUE;
+
+ /* Minimize the display window */
+ ShowWindow (hwnd, SW_MINIMIZE);
}
else
{
@@ -693,17 +686,17 @@ winWindowProc (HWND hwnd, UINT message,
}
/* Hide or show the Windows mouse cursor */
- if (s_fCursor && (s_pScreenPriv->fActive || s_pScreenInfo->fLessPointer))
+ if (g_fCursor && (s_pScreenPriv->fActive || s_pScreenInfo->fLessPointer))
{
/* Hide Windows cursor */
- s_fCursor = FALSE;
+ g_fCursor = FALSE;
ShowCursor (FALSE);
}
- else if (!s_fCursor && !s_pScreenPriv->fActive
+ else if (!g_fCursor && !s_pScreenPriv->fActive
&& !s_pScreenInfo->fLessPointer)
{
/* Show Windows cursor */
- s_fCursor = TRUE;
+ g_fCursor = TRUE;
ShowCursor (TRUE);
}
@@ -728,9 +721,9 @@ winWindowProc (HWND hwnd, UINT message,
break;
/* Non-client mouse movement, show Windows cursor */
- if (!s_fCursor)
+ if (!g_fCursor)
{
- s_fCursor = TRUE;
+ g_fCursor = TRUE;
ShowCursor (TRUE);
}
break;
@@ -742,9 +735,9 @@ winWindowProc (HWND hwnd, UINT message,
s_fTracking = FALSE;
/* Show the mouse cursor, if necessary */
- if (!s_fCursor)
+ if (!g_fCursor)
{
- s_fCursor = TRUE;
+ g_fCursor = TRUE;
ShowCursor (TRUE);
}
return 0;
@@ -806,6 +799,22 @@ winWindowProc (HWND hwnd, UINT message,
/* Clear screen privates flags */
s_pScreenPriv->iE3BCachedPress = 0;
break;
+
+ case WIN_POLLING_MOUSE_TIMER_ID:
+ {
+ POINT point;
+
+ /* Get the current position of the mouse cursor */
+ GetCursorPos (&point);
+
+ /* Map from screen (-X, -Y) to root (0, 0) */
+ point.x -= GetSystemMetrics (SM_XVIRTUALSCREEN);
+ point.y -= GetSystemMetrics (SM_YVIRTUALSCREEN);
+
+ /* Deliver absolute cursor position to X Server */
+ miPointerAbsoluteCursor (point.x, point.y,
+ g_c32LastInputEventTime = GetTickCount());
+ }
}
return 0;
@@ -880,7 +889,7 @@ winWindowProc (HWND hwnd, UINT message,
&& (GetKeyState (VK_MENU) & 0x8000))
|| (s_pScreenInfo->fUseUnixKillKey && wParam == VK_BACK
&& (GetKeyState (VK_MENU) & 0x8000)
- && (GetKeyState (VK_CONTROL) & 0x8000)))
+ && (GetKeyState (VK_CONTROL) & 0x8000)))
{
/*
* Better leave this message here, just in case some unsuspecting
@@ -889,8 +898,8 @@ winWindowProc (HWND hwnd, UINT message,
*/
ErrorF ("winWindowProc - WM_*KEYDOWN - Closekey hit, quitting\n");
- /* Tell our message queue to give up */
- PostMessage (hwnd, WM_CLOSE, 0, 0);
+ /* Display Exit dialog */
+ winDisplayExitDialog (s_pScreenPriv);
return 0;
}
@@ -973,8 +982,6 @@ winWindowProc (HWND hwnd, UINT message,
return 0;
}
-
-
#if CYGDEBUG
ErrorF ("winWindowProc - WM_ACTIVATE\n");
#endif
@@ -990,10 +997,10 @@ winWindowProc (HWND hwnd, UINT message,
/* Reshow the Windows mouse cursor if we are being deactivated */
if (LOWORD(wParam) == WA_INACTIVE
- && !s_fCursor)
+ && !g_fCursor)
{
/* Show Windows cursor */
- s_fCursor = TRUE;
+ g_fCursor = TRUE;
ShowCursor (TRUE);
}
return 0;
@@ -1012,10 +1019,10 @@ winWindowProc (HWND hwnd, UINT message,
/* Reshow the Windows mouse cursor if we are being deactivated */
if (!s_pScreenPriv->fActive
- && !s_fCursor)
+ && !g_fCursor)
{
/* Show Windows cursor */
- s_fCursor = TRUE;
+ g_fCursor = TRUE;
ShowCursor (TRUE);
}
@@ -1023,109 +1030,43 @@ winWindowProc (HWND hwnd, UINT message,
(*s_pScreenPriv->pwinActivateApp) (s_pScreen);
return 0;
- case WM_CLOSE:
- /* Tell X that we are giving up */
- GiveUp (0);
- return 0;
- }
-
- return DefWindowProc (hwnd, message, wParam, lParam);
-}
-
-
-/*
- * Process messages for the dialog that is displayed for
- * disruptive screen depth changes.
- */
-
-BOOL CALLBACK
-winChangeDepthDlgProc (HWND hwndDialog, UINT message,
- WPARAM wParam, LPARAM lParam)
-{
- static winPrivScreenPtr s_pScreenPriv = NULL;
- static winScreenInfo *s_pScreenInfo = NULL;
- static ScreenPtr s_pScreen = NULL;
-
-#if CYGDEBUG
- ErrorF ("winChangeDepthDlgProc\n");
-#endif
-
- /* Branch on message type */
- switch (message)
- {
- case WM_INITDIALOG:
-#if CYGDEBUG
- ErrorF ("winChangeDepthDlgProc - WM_INITDIALOG\n");
-#endif
-
- /* Store pointers to private structures for future use */
- s_pScreenPriv = (winPrivScreenPtr) lParam;
- s_pScreenInfo = s_pScreenPriv->pScreenInfo;
- s_pScreen = s_pScreenInfo->pScreen;
-
-#if CYGDEBUG
- ErrorF ("winChangeDepthDlgProc - WM_INITDIALG - s_pScreenPriv: %08x, "
- "s_pScreenInfo: %08x, s_pScreen: %08x\n",
- s_pScreenPriv, s_pScreenInfo, s_pScreen);
-#endif
-
-#if CYGDEBUG
- ErrorF ("winChangeDepthDlgProc - WM_INITDIALOG - orig bpp: %d, "
- "last bpp: %d\n",
- s_pScreenInfo->dwBPP,
- s_pScreenPriv->dwLastWindowsBitsPixel);
-#endif
- return TRUE;
-
- case WM_DISPLAYCHANGE:
-#if CYGDEBUG
- ErrorF ("winChangeDepthDlgProc - WM_DISPLAYCHANGE - orig bpp: %d, "
- "last bpp: %d, new bpp: %d\n",
- s_pScreenInfo->dwBPP,
- s_pScreenPriv->dwLastWindowsBitsPixel,
- wParam);
-#endif
-
- /* Dismiss the dialog if the display returns to the original depth */
- if (wParam == s_pScreenInfo->dwBPP)
- {
- ErrorF ("winChangeDelthDlgProc - wParam == s_pScreenInfo->dwBPP\n");
-
- /* Depth has been restored, dismiss dialog */
- DestroyWindow (g_hDlgDepthChange);
- g_hDlgDepthChange = NULL;
-
- /* Flag that we have a valid screen depth */
- s_pScreenPriv->fBadDepth = FALSE;
- }
- return TRUE;
-
case WM_COMMAND:
switch (LOWORD (wParam))
{
- case IDOK:
- case IDCANCEL:
- ErrorF ("winChangeDepthDlgProc - WM_COMMAND - IDOK or IDCANCEL\n");
+ case ID_APP_EXIT:
+ /* Display Exit dialog */
+ winDisplayExitDialog (s_pScreenPriv);
+ return 0;
- /*
- * User dismissed the dialog, hide it until the
- * display mode is restored.
- */
- ShowWindow (g_hDlgDepthChange, SW_HIDE);
- return TRUE;
+ case ID_APP_HIDE_ROOT:
+ ShowWindow (s_pScreenPriv->hwndScreen, SW_HIDE);
+ s_pScreenPriv->fRootWindowShown = FALSE;
+ return 0;
+
+ case ID_APP_SHOW_ROOT:
+ ShowWindow (s_pScreenPriv->hwndScreen, SW_SHOW);
+ s_pScreenPriv->fRootWindowShown = TRUE;
+ return 0;
+
+ default:
+ /* It's probably one of the custom menus... */
+ return HandleCustomWM_COMMAND (0, LOWORD (wParam));
+
}
break;
- case WM_CLOSE:
- ErrorF ("winChangeDepthDlgProc - WM_CLOSE\n");
+ case WM_GIVEUP:
+ /* Tell X that we are giving up */
+ winDeinitClipboard ();
+ winDeinitMultiWindowWM ();
+ GiveUp (0);
+ return 0;
- /*
- * User dismissed the dialog, hide it until the
- * display mode is restored.
- */
- ShowWindow (g_hDlgDepthChange, SW_HIDE);
- return TRUE;
+ case WM_CLOSE:
+ /* Display Exit dialog */
+ winDisplayExitDialog (s_pScreenPriv);
+ return 0;
}
- return FALSE;
+ return DefWindowProc (hwnd, message, wParam, lParam);
}
diff --git a/ilbm/ilbm.h b/ilbm/ilbm.h
index 1df8eff68..cb4ee6be4 100644
--- a/ilbm/ilbm.h
+++ b/ilbm/ilbm.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/ilbm/ilbm.h,v 3.2 1998/04/05 16:42:23 robin Exp $ */
+/* $XFree86: xc/programs/Xserver/ilbm/ilbm.h,v 3.3 2003/11/17 22:20:43 dawes Exp $ */
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
/***********************************************************
@@ -74,18 +74,15 @@ extern int ilbmScreenPrivateIndex;
/* ilbmbitblt.c */
extern void ilbmDoBitblt(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
extern RegionPtr ilbmBitBlt(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
GCPtr /*pGC*/,
@@ -97,11 +94,9 @@ extern RegionPtr ilbmBitBlt(
int /*dsty*/,
void (*doBitBlt)(),
unsigned long /*planemask*/
-#endif
);
extern RegionPtr ilbmCopyArea(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrcDrawable*/,
DrawablePtr /*pDstDrawable*/,
GCPtr/*pGC*/,
@@ -111,11 +106,9 @@ extern RegionPtr ilbmCopyArea(
int /*height*/,
int /*dstx*/,
int /*dsty*/
-#endif
);
extern RegionPtr ilbmCopyPlane(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrcDrawable*/,
DrawablePtr /*pDstDrawable*/,
GCPtr/*pGC*/,
@@ -126,83 +119,69 @@ extern RegionPtr ilbmCopyPlane(
int /*dstx*/,
int /*dsty*/,
unsigned long /*plane*/
-#endif
);
extern void ilbmCopy1ToN(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
/* ilbmbltC.c */
extern void ilbmDoBitbltCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
/* ilbmbltCI.c */
extern void ilbmDoBitbltCopyInverted(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
/* ilbmbltG.c */
extern void ilbmDoBitbltGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
/* ilbmbltO.c */
extern void ilbmDoBitbltOr(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
/* ilbmbltX.c */
extern void ilbmDoBitbltXor(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
/* ilbmbres.c */
extern void ilbmBresS(
-#if NeedFunctionPrototypes
PixelType * /*addrl*/,
int /*nlwidth*/,
int /*sizeDst*/,
@@ -217,12 +196,10 @@ extern void ilbmBresS(
int /*e2*/,
int /*len*/,
unsigned char * /*rrops*/
-#endif
);
/* ilbmbresd.c */
extern void ilbmBresD(
-#if NeedFunctionPrototypes
int * /*pdashIndex*/,
unsigned char * /*pDash*/,
int /*numInDashList*/,
@@ -243,254 +220,202 @@ extern void ilbmBresD(
int /*len*/,
unsigned char * /*rrops*/,
unsigned char * /*bgrrops*/
-#endif
);
/* ilbmbstore.c */
extern void ilbmSaveAreas(
-#if NeedFunctionPrototypes
PixmapPtr /*pPixmap*/,
RegionPtr /*prgnSave*/,
int /*xorg*/,
int /*yorg*/,
WindowPtr /*pWin*/
-#endif
);
extern void ilbmRestoreAreas(
-#if NeedFunctionPrototypes
PixmapPtr /*pPixmap*/,
RegionPtr /*prgnRestore*/,
int /*xorg*/,
int /*yorg*/,
WindowPtr /*pWin*/
-#endif
);
/* ilbmclip.c */
extern RegionPtr ilbmPixmapToRegion(
-#if NeedFunctionPrototypes
PixmapPtr /*pPix*/
-#endif
);
/* ilbmcmap.c */
extern Bool ilbmInitializeColormap(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/
-#endif
);
extern void ilbmResolveColor(
-#if NeedFunctionPrototypes
unsigned short * /*pred*/,
unsigned short * /*pgreen*/,
unsigned short * /*pblue*/,
VisualPtr /*pVisual*/
-#endif
);
extern Bool ilbmSetVisualTypes(
-#if NeedFunctionPrototypes
int /*depth*/,
int /*visuals*/,
int /*bitsPerRGB*/
-#endif
);
/* ilbmfillarc.c */
extern void ilbmPolyFillArcSolid(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
int /*narcs*/,
xArc * /*parcs*/
-#endif
);
/* ilbmfillrct.c */
extern void ilbmPolyFillRect(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nrectFill*/,
xRectangle * /*prectInit*/
-#endif
);
/* ilbmply1rct.c */
extern void ilbmFillPolygonSolid(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
int /*shape*/,
int /*count*/,
DDXPointPtr /*ptsIn*/
-#endif
);
/* ilbmfillsp.c */
extern void ilbmSolidFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void ilbmStippleFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void ilbmTileFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void ilbmUnnaturalTileFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void ilbmUnnaturalStippleFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void ilbmOpaqueStippleFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void ilbmUnnaturalOpaqueStippleFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
/* ilbmfont.c */
extern Bool ilbmRealizeFont(
-#if NeedFunctionPrototypes
ScreenPtr /*pscr*/,
FontPtr /*pFont*/
-#endif
);
extern Bool ilbmUnrealizeFont(
-#if NeedFunctionPrototypes
ScreenPtr /*pscr*/,
FontPtr /*pFont*/
-#endif
);
/* ilbmgc.c */
extern Bool ilbmCreateGC(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/
-#endif
);
extern void ilbmValidateGC(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/,
unsigned long /*changes*/,
DrawablePtr /*pDrawable*/
-#endif
);
extern void ilbmDestroyGC(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/
-#endif
);
extern void ilbmReduceRop(
-#if NeedFunctionPrototypes
int /*alu*/,
Pixel /*src*/,
unsigned long /*planemask*/,
int /*depth*/,
unsigned char * /*rrops*/
-#endif
);
extern void ilbmReduceOpaqueStipple (
-#if NeedFunctionPrototypes
Pixel /*fg*/,
Pixel /*bg*/,
unsigned long /*planemask*/,
int /*depth*/,
unsigned char * /*rrops*/
-#endif
);
extern void ilbmComputeCompositeClip(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/,
DrawablePtr /*pDrawable*/
-#endif
);
/* ilbmgetsp.c */
extern void ilbmGetSpans(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*wMax*/,
DDXPointPtr /*ppt*/,
int * /*pwidth*/,
int /*nspans*/,
char * /*pdstStart*/
-#endif
);
/* ilbmhrzvert.c */
extern int ilbmHorzS(
-#if NeedFunctionPrototypes
PixelType * /*addrl*/,
int /*nlwidth*/,
int /*sizeDst*/,
@@ -499,11 +424,9 @@ extern int ilbmHorzS(
int /*y1*/,
int /*len*/,
unsigned char * /*rrops*/
-#endif
);
extern int ilbmVertS(
-#if NeedFunctionPrototypes
PixelType * /*addrl*/,
int /*nlwidth*/,
int /*sizeDst*/,
@@ -512,12 +435,10 @@ extern int ilbmVertS(
int /*y1*/,
int /*len*/,
unsigned char * /*rrops*/
-#endif
);
/* ilbmigbblak.c */
extern void ilbmImageGlyphBlt (
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*x*/,
@@ -525,14 +446,12 @@ extern void ilbmImageGlyphBlt (
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* ilbmigbwht.c */
/* ilbmimage.c */
extern void ilbmPutImage(
-#if NeedFunctionPrototypes
DrawablePtr /*dst*/,
GCPtr /*pGC*/,
int /*depth*/,
@@ -543,11 +462,9 @@ extern void ilbmPutImage(
int /*leftPad*/,
int /*format*/,
char * /*pImage*/
-#endif
);
extern void ilbmGetImage(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*sx*/,
int /*sy*/,
@@ -556,62 +473,50 @@ extern void ilbmGetImage(
unsigned int /*format*/,
unsigned long /*planeMask*/,
char * /*pdstLine*/
-#endif
);
/* ilbmline.c */
extern void ilbmLineSS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
int /*npt*/,
DDXPointPtr /*pptInit*/
-#endif
);
extern void ilbmLineSD(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
int /*npt*/,
DDXPointPtr /*pptInit*/
-#endif
);
/* ilbmmisc.c */
extern void ilbmQueryBestSize(
-#if NeedFunctionPrototypes
int /*class*/,
unsigned short * /*pwidth*/,
unsigned short * /*pheight*/,
ScreenPtr /*pScreen*/
-#endif
);
/* ilbmpntarea.c */
extern void ilbmSolidFillArea(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
unsigned char * /*rrops*/
-#endif
);
extern void ilbmStippleAreaPPW(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
PixmapPtr /*pstipple*/,
unsigned char * /*rrops*/
-#endif
);
extern void ilbmStippleArea(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
@@ -619,12 +524,10 @@ extern void ilbmStippleArea(
int /*xOff*/,
int /*yOff*/,
unsigned char * /*rrops*/
-#endif
);
/* ilbmplygblt.c */
extern void ilbmPolyGlyphBlt(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*x*/,
@@ -632,82 +535,62 @@ extern void ilbmPolyGlyphBlt(
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* ilbmpixmap.c */
extern PixmapPtr ilbmCreatePixmap(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
int /*width*/,
int /*height*/,
int /*depth*/
-#endif
);
extern Bool ilbmDestroyPixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pPixmap*/
-#endif
);
extern PixmapPtr ilbmCopyPixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pSrc*/
-#endif
);
extern void ilbmPadPixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pPixmap*/
-#endif
);
extern void ilbmXRotatePixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pPix*/,
int /*rw*/
-#endif
);
extern void ilbmYRotatePixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pPix*/,
int /*rh*/
-#endif
);
extern void ilbmCopyRotatePixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*psrcPix*/,
PixmapPtr * /*ppdstPix*/,
int /*xrot*/,
int /*yrot*/
-#endif
);
extern void ilbmPaintWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
RegionPtr /*pRegion*/,
int /*what*/
-#endif
);
/* ilbmpolypnt.c */
extern void ilbmPolyPoint(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
int /*npt*/,
xPoint * /*pptInit*/
-#endif
);
/* ilbmpushpxl.c */
extern void ilbmPushPixels(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/,
PixmapPtr /*pBitMap*/,
DrawablePtr /*pDrawable*/,
@@ -715,28 +598,22 @@ extern void ilbmPushPixels(
int /*dy*/,
int /*xOrg*/,
int /*yOrg*/
-#endif
);
/* ilbmscrclse.c */
extern Bool ilbmCloseScreen(
-#if NeedFunctionPrototypes
int /*index*/,
ScreenPtr /*pScreen*/
-#endif
);
/* ilbmscrinit.c */
extern Bool ilbmAllocatePrivates(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
int * /*pWinIndex*/,
int * /*pGCIndex*/
-#endif
);
extern Bool ilbmScreenInit(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
pointer /*pbits*/,
int /*xsize*/,
@@ -744,45 +621,35 @@ extern Bool ilbmScreenInit(
int /*dpix*/,
int /*dpiy*/,
int /*width*/
-#endif
);
extern PixmapPtr ilbmGetWindowPixmap(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/
-#endif
);
extern void ilbmSetWindowPixmap(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
PixmapPtr /*pPix*/
-#endif
);
/* ilbmseg.c */
extern void ilbmSegmentSS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nseg*/,
xSegment * /*pSeg*/
-#endif
);
extern void ilbmSegmentSD(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nseg*/,
xSegment * /*pSeg*/
-#endif
);
/* ilbmsetsp.c */
extern int ilbmSetScanline(
-#if NeedFunctionPrototypes
int /*y*/,
int /*xOrigin*/,
int /*xStart*/,
@@ -794,11 +661,9 @@ extern int ilbmSetScanline(
int /*sizeDst*/,
int /*depthDst*/,
int /*sizeSrc*/
-#endif
);
extern void ilbmSetSpans(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
char * /*psrc*/,
@@ -806,12 +671,10 @@ extern void ilbmSetSpans(
int * /*pwidth*/,
int /*nspans*/,
int /*fSorted*/
-#endif
);
/* ilbmtegblt.c */
extern void ilbmTEGlyphBlt(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*x*/,
@@ -819,35 +682,29 @@ extern void ilbmTEGlyphBlt(
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* ilbmtileC.c */
extern void ilbmTileAreaPPWCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
int /*alu*/,
PixmapPtr /*ptile*/,
unsigned long /*planemask*/
-#endif
);
/* ilbmtileG.c */
extern void ilbmTileAreaPPWGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
int /*alu*/,
PixmapPtr /*ptile*/,
unsigned long /*planemask*/
-#endif
);
extern void ilbmTileAreaCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
@@ -856,12 +713,10 @@ extern void ilbmTileAreaCopy(
int /*xOff*/,
int /*yOff*/,
unsigned long /*planemask*/
-#endif
);
/* ilbmtileG.c */
extern void ilbmTileAreaGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
@@ -870,11 +725,9 @@ extern void ilbmTileAreaGeneral(
int /*xOff*/,
int /*yOff*/,
unsigned long /*planemask*/
-#endif
);
extern void ilbmOpaqueStippleAreaPPWCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
@@ -882,12 +735,10 @@ extern void ilbmOpaqueStippleAreaPPWCopy(
PixmapPtr /*ptile*/,
unsigned char */*rropsOS*/,
unsigned long /*planemask*/
-#endif
);
/* ilbmtileG.c */
extern void ilbmOpaqueStippleAreaPPWGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
@@ -895,11 +746,9 @@ extern void ilbmOpaqueStippleAreaPPWGeneral(
PixmapPtr /*ptile*/,
unsigned char */*rropsOS*/,
unsigned long /*planemask*/
-#endif
);
extern void ilbmOpaqueStippleAreaCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
@@ -909,12 +758,10 @@ extern void ilbmOpaqueStippleAreaCopy(
int /*yOff*/,
unsigned char */*rropsOS*/,
unsigned long /*planemask*/
-#endif
);
/* ilbmtileG.c */
extern void ilbmOpaqueStippleAreaGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
@@ -924,66 +771,49 @@ extern void ilbmOpaqueStippleAreaGeneral(
int /*yOff*/,
unsigned char */*rropsOS*/,
unsigned long /*planemask*/
-#endif
);
/* ilbmwindow.c */
extern Bool ilbmCreateWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/
-#endif
);
extern Bool ilbmDestroyWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/
-#endif
);
extern Bool ilbmMapWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWindow*/
-#endif
);
extern Bool ilbmPositionWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
int /*x*/,
int /*y*/
-#endif
);
extern Bool ilbmUnmapWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWindow*/
-#endif
);
extern void ilbmCopyWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
DDXPointRec /*ptOldOrg*/,
RegionPtr /*prgnSrc*/
-#endif
);
extern Bool ilbmChangeWindowAttributes(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
unsigned long /*mask*/
-#endif
);
/* ilbmzerarc.c */
extern void ilbmZeroPolyArcSS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
int /*narcs*/,
xArc * /*parcs*/
-#endif
);
/*
diff --git a/ilbm/ilbmbitblt.c b/ilbm/ilbmbitblt.c
index 6af3108b5..b148bc00c 100644
--- a/ilbm/ilbmbitblt.c
+++ b/ilbm/ilbmbitblt.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/ilbm/ilbmbitblt.c,v 3.2 1998/03/20 21:08:00 hohndel Exp $ */
+/* $XFree86: xc/programs/Xserver/ilbm/ilbmbitblt.c,v 3.3 2003/11/10 18:22:44 tsi Exp $ */
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
/***********************************************************
@@ -307,7 +307,7 @@ ilbmBitBlt(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height,
/* Check to see if the region is empty */
if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2) {
- REGION_INIT(pGC->pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pGC->pScreen, &rgnDst);
} else {
REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1);
}
@@ -316,7 +316,7 @@ ilbmBitBlt(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height,
a full blown region. It is intersected with the
composite clip below. */
fastClip = 0;
- REGION_INIT(pGC->pScreen, &rgnDst, &fastBox,1);
+ REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1);
}
} else
REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy);
diff --git a/include/XIstubs.h b/include/XIstubs.h
index 156c4e34e..ad36bc716 100644
--- a/include/XIstubs.h
+++ b/include/XIstubs.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/XIstubs.h,v 3.1 1996/04/15 11:34:22 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/XIstubs.h,v 3.2 2003/04/27 21:31:04 herrb Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,73 +29,48 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
int
ChangeKeyboardDevice (
-#if NeedFunctionPrototypes
DeviceIntPtr /* old_dev */,
- DeviceIntPtr /* new_dev */
-#endif
- );
+ DeviceIntPtr /* new_dev */);
int
ChangePointerDevice (
-#if NeedFunctionPrototypes
DeviceIntPtr /* old_dev */,
DeviceIntPtr /* new_dev */,
unsigned char /* x */,
- unsigned char /* y */
-#endif
- );
+ unsigned char /* y */);
void
CloseInputDevice (
-#if NeedFunctionPrototypes
DeviceIntPtr /* d */,
- ClientPtr /* client */
-#endif
- );
+ ClientPtr /* client */);
void
-AddOtherInputDevices (
-#if NeedFunctionPrototypes
- void
-#endif
- );
+AddOtherInputDevices (void);
void
OpenInputDevice (
-#if NeedFunctionPrototypes
DeviceIntPtr /* dev */,
ClientPtr /* client */,
- int * /* status */
-#endif
- );
+ int * /* status */);
int
SetDeviceMode (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
DeviceIntPtr /* dev */,
- int /* mode */
-#endif
- );
+ int /* mode */);
int
SetDeviceValuators (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
DeviceIntPtr /* dev */,
int * /* valuators */,
int /* first_valuator */,
- int /* num_valuators */
-#endif
- );
+ int /* num_valuators */);
int
ChangeDeviceControl (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
DeviceIntPtr /* dev */,
- xDeviceCtl * /* control */
-#endif
- );
+ xDeviceCtl * /* control */);
#endif /* XI_STUBS_H */
diff --git a/include/bstorestr.h b/include/bstorestr.h
index e65ffd47f..694841ed0 100644
--- a/include/bstorestr.h
+++ b/include/bstorestr.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/bstorestr.h,v 1.2 2001/01/06 20:58:12 tsi Exp $*/
+/* $XFree86: xc/programs/Xserver/include/bstorestr.h,v 1.3 2003/04/27 21:31:04 herrb Exp $*/
/*
* Copyright (c) 1987 by the Regents of the University of California
*
@@ -24,43 +24,26 @@
#include "window.h"
typedef void (* BackingStoreSaveAreasProcPtr)(
-#if NeedNestedPrototypes
PixmapPtr /*pBackingPixmap*/,
RegionPtr /*pObscured*/,
int /*x*/,
int /*y*/,
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
typedef void (* BackingStoreRestoreAreasProcPtr)(
-#if NeedNestedPrototypes
PixmapPtr /*pBackingPixmap*/,
RegionPtr /*pExposed*/,
int /*x*/,
int /*y*/,
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
typedef void (* BackingStoreSetClipmaskRgnProcPtr)(
-#if NeedNestedPrototypes
GCPtr /*pBackingGC*/,
- RegionPtr /*pbackingCompositeClip*/
-#endif
-);
+ RegionPtr /*pbackingCompositeClip*/);
-typedef PixmapPtr (* BackingStoreGetImagePixmapProcPtr)( /* unused */
-#if NeedNestedPrototypes
- void
-#endif
-);
+typedef PixmapPtr (* BackingStoreGetImagePixmapProcPtr)(void);
-typedef PixmapPtr (* BackingStoreGetSpansPixmapProcPtr)( /* unused */
-#if NeedNestedPrototypes
- void
-#endif
-);
+typedef PixmapPtr (* BackingStoreGetSpansPixmapProcPtr)(void);
typedef struct _BSFuncs {
diff --git a/include/closestr.h b/include/closestr.h
index 3bcb92634..34d5931f2 100644
--- a/include/closestr.h
+++ b/include/closestr.h
@@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/programs/Xserver/include/closestr.h,v 3.4 2001/12/14 19:59:53 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/closestr.h,v 3.5 2003/11/17 22:20:43 dawes Exp $ */
#ifndef CLOSESTR_H
@@ -105,14 +105,12 @@ typedef struct _LFclosure {
typedef
int (* PolyTextPtr)(
-#if NeedNestedPrototypes
DrawablePtr /* pDraw */,
GCPtr /* pGC */,
int /* x */,
int /* y */,
int /* count */,
void * /* chars or shorts */
-#endif
);
typedef struct _PTclosure {
@@ -136,14 +134,12 @@ typedef struct _PTclosure {
typedef
void (* ImageTextPtr)(
-#if NeedNestedPrototypes
DrawablePtr /* pDraw */,
GCPtr /* pGC */,
int /* x */,
int /* y */,
int /* count */,
void * /* chars or shorts */
-#endif
);
typedef struct _ITclosure {
diff --git a/include/colormap.h b/include/colormap.h
index 2a8f87f23..f249f4f03 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/colormap.h,v 1.5 2001/12/14 19:59:53 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/colormap.h,v 1.6 2003/04/27 21:31:04 herrb Exp $ */
/*
Copyright 1987, 1998 The Open Group
@@ -79,79 +79,51 @@ typedef struct _CMEntry *EntryPtr;
typedef struct _colorResource *colorResourcePtr;
extern int CreateColormap(
-#if NeedFunctionPrototypes
Colormap /*mid*/,
ScreenPtr /*pScreen*/,
VisualPtr /*pVisual*/,
ColormapPtr* /*ppcmap*/,
int /*alloc*/,
- int /*client*/
-#endif
-);
+ int /*client*/);
extern int FreeColormap(
-#if NeedFunctionPrototypes
pointer /*pmap*/,
- XID /*mid*/
-#endif
-);
+ XID /*mid*/);
extern int TellLostMap(
-#if NeedFunctionPrototypes
WindowPtr /*pwin*/,
- pointer /* Colormap *pmid */
-#endif
-);
+ pointer /* Colormap *pmid */);
extern int TellGainedMap(
-#if NeedFunctionPrototypes
WindowPtr /*pwin*/,
- pointer /* Colormap *pmid */
-#endif
-);
+ pointer /* Colormap *pmid */);
extern int CopyColormapAndFree(
-#if NeedFunctionPrototypes
Colormap /*mid*/,
ColormapPtr /*pSrc*/,
- int /*client*/
-#endif
-);
+ int /*client*/);
extern int AllocColor(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
unsigned short* /*pred*/,
unsigned short* /*pgreen*/,
unsigned short* /*pblue*/,
Pixel* /*pPix*/,
- int /*client*/
-#endif
-);
+ int /*client*/);
extern void FakeAllocColor(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
- xColorItem * /*item*/
-#endif
-);
+ xColorItem * /*item*/);
extern void FakeFreeColor(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
- Pixel /*pixel*/
-#endif
-);
+ Pixel /*pixel*/);
typedef int (*ColorCompareProcPtr)(
-#if NeedNestedPrototypes
EntryPtr /*pent*/,
- xrgb * /*prgb*/
-#endif
-);
+ xrgb * /*prgb*/);
extern int FindColor(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
EntryPtr /*pentFirst*/,
int /*size*/,
@@ -159,40 +131,28 @@ extern int FindColor(
Pixel* /*pPixel*/,
int /*channel*/,
int /*client*/,
- ColorCompareProcPtr /*comp*/
-#endif
-);
+ ColorCompareProcPtr /*comp*/);
extern int QueryColors(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
int /*count*/,
Pixel* /*ppixIn*/,
- xrgb* /*prgbList*/
-#endif
-);
+ xrgb* /*prgbList*/);
extern int FreeClientPixels(
-#if NeedFunctionPrototypes
pointer /*pcr*/,
- XID /*fakeid*/
-#endif
-);
+ XID /*fakeid*/);
extern int AllocColorCells(
-#if NeedFunctionPrototypes
int /*client*/,
ColormapPtr /*pmap*/,
int /*colors*/,
int /*planes*/,
Bool /*contig*/,
Pixel* /*ppix*/,
- Pixel* /*masks*/
-#endif
-);
+ Pixel* /*masks*/);
extern int AllocColorPlanes(
-#if NeedFunctionPrototypes
int /*client*/,
ColormapPtr /*pmap*/,
int /*colors*/,
@@ -203,33 +163,22 @@ extern int AllocColorPlanes(
Pixel* /*pixels*/,
Pixel* /*prmask*/,
Pixel* /*pgmask*/,
- Pixel* /*pbmask*/
-#endif
-);
+ Pixel* /*pbmask*/);
extern int FreeColors(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
int /*client*/,
int /*count*/,
Pixel* /*pixels*/,
- Pixel /*mask*/
-#endif
-);
+ Pixel /*mask*/);
extern int StoreColors(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
int /*count*/,
- xColorItem* /*defs*/
-#endif
-);
+ xColorItem* /*defs*/);
extern int IsMapInstalled(
-#if NeedFunctionPrototypes
Colormap /*map*/,
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
#endif /* CMAP_H */
diff --git a/include/cursor.h b/include/cursor.h
index 82423cd9e..7509a94af 100644
--- a/include/cursor.h
+++ b/include/cursor.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/cursor.h,v 1.6 2002/09/17 01:15:14 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/cursor.h,v 1.7 2003/04/27 21:31:04 herrb Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -66,11 +66,8 @@ typedef struct _CursorMetric *CursorMetricPtr;
extern CursorPtr rootCursor;
extern int FreeCursor(
-#if NeedFunctionPrototypes
pointer /*pCurs*/,
- XID /*cid*/
-#endif
-);
+ XID /*cid*/);
/* Quartz support on Mac OS X pulls in the QuickDraw
framework whose AllocCursor function conflicts here. */
@@ -78,7 +75,6 @@ extern int FreeCursor(
#define AllocCursor Darwin_X_AllocCursor
#endif
extern CursorPtr AllocCursor(
-#if NeedFunctionPrototypes
unsigned char* /*psrcbits*/,
unsigned char* /*pmaskbits*/,
CursorMetricPtr /*cm*/,
@@ -87,12 +83,9 @@ extern CursorPtr AllocCursor(
unsigned /*foreBlue*/,
unsigned /*backRed*/,
unsigned /*backGreen*/,
- unsigned /*backBlue*/
-#endif
-);
+ unsigned /*backBlue*/);
extern CursorPtr AllocCursorARGB(
-#if NeedFunctionPrototypes
unsigned char* /*psrcbits*/,
unsigned char* /*pmaskbits*/,
CARD32* /*argb*/,
@@ -102,12 +95,9 @@ extern CursorPtr AllocCursorARGB(
unsigned /*foreBlue*/,
unsigned /*backRed*/,
unsigned /*backGreen*/,
- unsigned /*backBlue*/
-#endif
-);
+ unsigned /*backBlue*/);
extern int AllocGlyphCursor(
-#if NeedFunctionPrototypes
Font /*source*/,
unsigned int /*sourceChar*/,
Font /*mask*/,
@@ -119,67 +109,39 @@ extern int AllocGlyphCursor(
unsigned /*backGreen*/,
unsigned /*backBlue*/,
CursorPtr* /*ppCurs*/,
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
extern CursorPtr CreateRootCursor(
-#if NeedFunctionPrototypes
char* /*pfilename*/,
- unsigned int /*glyph*/
-#endif
-);
+ unsigned int /*glyph*/);
extern int ServerBitsFromGlyph(
-#if NeedFunctionPrototypes
FontPtr /*pfont*/,
unsigned int /*ch*/,
register CursorMetricPtr /*cm*/,
- unsigned char ** /*ppbits*/
-#endif
-);
+ unsigned char ** /*ppbits*/);
extern Bool CursorMetricsFromGlyph(
-#if NeedFunctionPrototypes
FontPtr /*pfont*/,
unsigned /*ch*/,
- CursorMetricPtr /*cm*/
-#endif
-);
+ CursorMetricPtr /*cm*/);
extern void CheckCursorConfinement(
-#if NeedFunctionPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
extern void NewCurrentScreen(
-#if NeedFunctionPrototypes
ScreenPtr /*newScreen*/,
int /*x*/,
- int /*y*/
-#endif
-);
+ int /*y*/);
-extern Bool PointerConfinedToScreen(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern Bool PointerConfinedToScreen(void);
extern void GetSpritePosition(
-#if NeedFunctionPrototypes
int * /*px*/,
- int * /*py*/
-#endif
-);
+ int * /*py*/);
#ifdef PANORAMIX
-extern int XineramaGetCursorScreen(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern int XineramaGetCursorScreen(void);
#endif /* PANORAMIX */
#endif /* CURSOR_H */
diff --git a/include/dix.h b/include/dix.h
index ba10a3554..a47bfd8cc 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/dix.h,v 3.26 2003/01/12 02:44:27 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/dix.h,v 3.27 2003/04/27 21:31:04 herrb Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -308,108 +308,56 @@ typedef struct _TimeStamp {
/* dispatch.c */
extern void SetInputCheck(
-#if NeedFunctionPrototypes
HWEventQueuePtr /*c0*/,
- HWEventQueuePtr /*c1*/
-#endif
-);
+ HWEventQueuePtr /*c1*/);
extern void CloseDownClient(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
-extern void UpdateCurrentTime(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void UpdateCurrentTime(void);
-extern void UpdateCurrentTimeIf(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void UpdateCurrentTimeIf(void);
-extern void InitSelections(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void InitSelections(void);
-extern void FlushClientCaches(
-#if NeedFunctionPrototypes
- XID /*id*/
-#endif
-);
+extern void FlushClientCaches(XID /*id*/);
extern int dixDestroyPixmap(
-#if NeedFunctionPrototypes
pointer /*value*/,
- XID /*pid*/
-#endif
-);
+ XID /*pid*/);
-extern void CloseDownRetainedResources(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void CloseDownRetainedResources(void);
extern void InitClient(
-#if NeedFunctionPrototypes
ClientPtr /*client*/,
int /*i*/,
- pointer /*ospriv*/
-#endif
-);
+ pointer /*ospriv*/);
extern ClientPtr NextAvailableClient(
-#if NeedFunctionPrototypes
- pointer /*ospriv*/
-#endif
-);
+ pointer /*ospriv*/);
extern void SendErrorToClient(
-#if NeedFunctionPrototypes
ClientPtr /*client*/,
unsigned int /*majorCode*/,
unsigned int /*minorCode*/,
XID /*resId*/,
- int /*errorCode*/
-#endif
-);
+ int /*errorCode*/);
extern void DeleteWindowFromAnySelections(
-#if NeedFunctionPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
extern void MarkClientException(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
extern int GetGeometry(
-#if NeedFunctionPrototypes
ClientPtr /*client*/,
- xGetGeometryReply* /* wa */
-#endif
-);
+ xGetGeometryReply* /* wa */);
extern int SendConnSetup(
-#if NeedFunctionPrototypes
ClientPtr /*client*/,
- char* /*reason*/
-#endif
-);
+ char* /*reason*/);
-extern int
-DoGetImage(
-#if NeedFunctionPrototypes
+extern int DoGetImage(
ClientPtr /*client*/,
int /*format*/,
Drawable /*drawable*/,
@@ -418,75 +366,48 @@ DoGetImage(
int /*width*/,
int /*height*/,
Mask /*planemask*/,
- xGetImageReply **/*im_return*/
-#endif
-);
+ xGetImageReply **/*im_return*/);
#ifdef LBX
-extern void IncrementClientCount(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void IncrementClientCount(void);
#endif /* LBX */
/* dixutils.c */
extern void CopyISOLatin1Lowered(
-#if NeedFunctionPrototypes
unsigned char * /*dest*/,
unsigned char * /*source*/,
- int /*length*/
-#endif
-);
+ int /*length*/);
#ifdef XCSECURITY
extern WindowPtr SecurityLookupWindow(
-#if NeedFunctionPrototypes
XID /*rid*/,
ClientPtr /*client*/,
- Mask /*access_mode*/
-#endif
-);
+ Mask /*access_mode*/);
extern pointer SecurityLookupDrawable(
-#if NeedFunctionPrototypes
XID /*rid*/,
ClientPtr /*client*/,
- Mask /*access_mode*/
-#endif
-);
+ Mask /*access_mode*/);
extern WindowPtr LookupWindow(
-#if NeedFunctionPrototypes
XID /*rid*/,
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
extern pointer LookupDrawable(
-#if NeedFunctionPrototypes
XID /*rid*/,
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
#else
extern WindowPtr LookupWindow(
-#if NeedFunctionPrototypes
XID /*rid*/,
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
extern pointer LookupDrawable(
-#if NeedFunctionPrototypes
XID /*rid*/,
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
#define SecurityLookupWindow(rid, client, access_mode) \
LookupWindow(rid, client)
@@ -497,385 +418,221 @@ extern pointer LookupDrawable(
#endif /* XCSECURITY */
extern ClientPtr LookupClient(
-#if NeedFunctionPrototypes
XID /*rid*/,
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
-extern void NoopDDA(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void NoopDDA(void);
extern int AlterSaveSetForClient(
-#if NeedFunctionPrototypes
ClientPtr /*client*/,
WindowPtr /*pWin*/,
- unsigned /*mode*/
-#endif
-);
+ unsigned /*mode*/);
extern void DeleteWindowFromAnySaveSet(
-#if NeedFunctionPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
extern void BlockHandler(
-#if NeedFunctionPrototypes
pointer /*pTimeout*/,
- pointer /*pReadmask*/
-#endif
-);
+ pointer /*pReadmask*/);
extern void WakeupHandler(
-#if NeedFunctionPrototypes
int /*result*/,
- pointer /*pReadmask*/
-#endif
-);
+ pointer /*pReadmask*/);
typedef void (* WakeupHandlerProcPtr)(
-#if NeedNestedPrototypes
pointer /* blockData */,
int /* result */,
- pointer /* pReadmask */
-#endif
-);
+ pointer /* pReadmask */);
extern Bool RegisterBlockAndWakeupHandlers(
-#if NeedFunctionPrototypes
BlockHandlerProcPtr /*blockHandler*/,
WakeupHandlerProcPtr /*wakeupHandler*/,
- pointer /*blockData*/
-#endif
-);
+ pointer /*blockData*/);
extern void RemoveBlockAndWakeupHandlers(
-#if NeedFunctionPrototypes
BlockHandlerProcPtr /*blockHandler*/,
WakeupHandlerProcPtr /*wakeupHandler*/,
- pointer /*blockData*/
-#endif
-);
+ pointer /*blockData*/);
-extern void InitBlockAndWakeupHandlers(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void InitBlockAndWakeupHandlers(void);
-extern void ProcessWorkQueue(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void ProcessWorkQueue(void);
-extern void ProcessWorkQueueZombies(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void ProcessWorkQueueZombies(void);
extern Bool QueueWorkProc(
-#if NeedFunctionPrototypes
Bool (* /*function*/)(
-#if NeedNestedPrototypes
ClientPtr /*clientUnused*/,
- pointer /*closure*/
-#endif
- ),
+ pointer /*closure*/),
ClientPtr /*client*/,
pointer /*closure*/
-#endif
);
typedef Bool (* ClientSleepProcPtr)(
-#if NeedFunctionPrototypes
ClientPtr /*client*/,
- pointer /*closure*/
-#endif
-);
+ pointer /*closure*/);
extern Bool ClientSleep(
-#if NeedFunctionPrototypes
ClientPtr /*client*/,
ClientSleepProcPtr /* function */,
- pointer /*closure*/
-#endif
-);
+ pointer /*closure*/);
#ifndef ___CLIENTSIGNAL_DEFINED___
#define ___CLIENTSIGNAL_DEFINED___
extern Bool ClientSignal(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
#endif /* ___CLIENTSIGNAL_DEFINED___ */
extern void ClientWakeup(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
extern Bool ClientIsAsleep(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
/* atom.c */
extern Atom MakeAtom(
-#if NeedFunctionPrototypes
char * /*string*/,
unsigned /*len*/,
- Bool /*makeit*/
-#endif
-);
+ Bool /*makeit*/);
extern Bool ValidAtom(
-#if NeedFunctionPrototypes
- Atom /*atom*/
-#endif
-);
+ Atom /*atom*/);
extern char *NameForAtom(
-#if NeedFunctionPrototypes
- Atom /*atom*/
-#endif
-);
+ Atom /*atom*/);
-extern void AtomError(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void AtomError(void);
-extern void FreeAllAtoms(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void FreeAllAtoms(void);
-extern void InitAtoms(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void InitAtoms(void);
/* events.c */
extern void SetMaskForEvent(
-#if NeedFunctionPrototypes
Mask /* mask */,
- int /* event */
-#endif
-);
+ int /* event */);
extern Bool IsParent(
-#if NeedFunctionPrototypes
WindowPtr /* maybeparent */,
- WindowPtr /* child */
-#endif
-);
+ WindowPtr /* child */);
-extern WindowPtr GetCurrentRootWindow(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern WindowPtr GetCurrentRootWindow(void);
-extern WindowPtr GetSpriteWindow(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern WindowPtr GetSpriteWindow(void);
-extern void NoticeEventTime(
-#if NeedFunctionPrototypes
- xEventPtr /* xE */
-#endif
-);
+extern void NoticeEventTime(xEventPtr /* xE */);
extern void EnqueueEvent(
-#if NeedFunctionPrototypes
xEventPtr /* xE */,
DeviceIntPtr /* device */,
- int /* count */
-#endif
-);
+ int /* count */);
-extern void ComputeFreezes(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void ComputeFreezes(void);
extern void CheckGrabForSyncs(
-#if NeedFunctionPrototypes
DeviceIntPtr /* dev */,
Bool /* thisMode */,
- Bool /* otherMode */
-#endif
-);
+ Bool /* otherMode */);
extern void ActivatePointerGrab(
-#if NeedFunctionPrototypes
DeviceIntPtr /* mouse */,
GrabPtr /* grab */,
TimeStamp /* time */,
- Bool /* autoGrab */
-#endif
-);
+ Bool /* autoGrab */);
extern void DeactivatePointerGrab(
-#if NeedFunctionPrototypes
- DeviceIntPtr /* mouse */
-#endif
-);
+ DeviceIntPtr /* mouse */);
extern void ActivateKeyboardGrab(
-#if NeedFunctionPrototypes
DeviceIntPtr /* keybd */,
GrabPtr /* grab */,
TimeStamp /* time */,
- Bool /* passive */
-#endif
-);
+ Bool /* passive */);
extern void DeactivateKeyboardGrab(
-#if NeedFunctionPrototypes
- DeviceIntPtr /* keybd */
-#endif
-);
+ DeviceIntPtr /* keybd */);
extern void AllowSome(
-#if NeedFunctionPrototypes
ClientPtr /* client */,
TimeStamp /* time */,
DeviceIntPtr /* thisDev */,
- int /* newState */
-#endif
-);
+ int /* newState */);
extern void ReleaseActiveGrabs(
-#if NeedFunctionPrototypes
-ClientPtr client
-#endif
-);
+ ClientPtr client);
extern int DeliverEventsToWindow(
-#if NeedFunctionPrototypes
WindowPtr /* pWin */,
xEventPtr /* pEvents */,
int /* count */,
Mask /* filter */,
GrabPtr /* grab */,
- int /* mskidx */
-#endif
-);
+ int /* mskidx */);
extern int DeliverDeviceEvents(
-#if NeedFunctionPrototypes
WindowPtr /* pWin */,
xEventPtr /* xE */,
GrabPtr /* grab */,
WindowPtr /* stopAt */,
DeviceIntPtr /* dev */,
- int /* count */
-#endif
-);
+ int /* count */);
extern void DefineInitialRootWindow(
-#if NeedFunctionPrototypes
- WindowPtr /* win */
-#endif
-);
+ WindowPtr /* win */);
extern void WindowHasNewCursor(
-#if NeedFunctionPrototypes
- WindowPtr /* pWin */
-#endif
-);
+ WindowPtr /* pWin */);
extern Bool CheckDeviceGrabs(
-#if NeedFunctionPrototypes
DeviceIntPtr /* device */,
xEventPtr /* xE */,
int /* checkFirst */,
- int /* count */
-#endif
-);
+ int /* count */);
extern void DeliverFocusedEvent(
-#if NeedFunctionPrototypes
DeviceIntPtr /* keybd */,
xEventPtr /* xE */,
WindowPtr /* window */,
- int /* count */
-#endif
-);
+ int /* count */);
extern void DeliverGrabbedEvent(
-#if NeedFunctionPrototypes
xEventPtr /* xE */,
DeviceIntPtr /* thisDev */,
Bool /* deactivateGrab */,
- int /* count */
-#endif
-);
+ int /* count */);
#ifdef XKB
extern void FixKeyState(
-#if NeedFunctionPrototypes
xEvent * /* xE */,
- DeviceIntPtr /* keybd */
-#endif
-);
+ DeviceIntPtr /* keybd */);
#endif /* XKB */
extern void RecalculateDeliverableEvents(
-#if NeedFunctionPrototypes
- WindowPtr /* pWin */
-#endif
-);
+ WindowPtr /* pWin */);
extern int OtherClientGone(
-#if NeedFunctionPrototypes
pointer /* value */,
- XID /* id */
-#endif
-);
+ XID /* id */);
extern void DoFocusEvents(
-#if NeedFunctionPrototypes
DeviceIntPtr /* dev */,
WindowPtr /* fromWin */,
WindowPtr /* toWin */,
- int /* mode */
-#endif
-);
+ int /* mode */);
extern int SetInputFocus(
-#if NeedFunctionPrototypes
ClientPtr /* client */,
DeviceIntPtr /* dev */,
Window /* focusID */,
CARD8 /* revertTo */,
Time /* ctime */,
- Bool /* followOK */
-#endif
-);
+ Bool /* followOK */);
extern int GrabDevice(
-#if NeedFunctionPrototypes
ClientPtr /* client */,
DeviceIntPtr /* dev */,
unsigned /* this_mode */,
@@ -884,69 +641,44 @@ extern int GrabDevice(
unsigned /* ownerEvents */,
Time /* ctime */,
Mask /* mask */,
- CARD8 * /* status */
-#endif
-);
+ CARD8 * /* status */);
-extern void InitEvents(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void InitEvents(void);
extern void CloseDownEvents(void);
extern void DeleteWindowFromAnyEvents(
-#if NeedFunctionPrototypes
WindowPtr /* pWin */,
- Bool /* freeResources */
-#endif
-);
+ Bool /* freeResources */);
extern Mask EventMaskForClient(
-#if NeedFunctionPrototypes
WindowPtr /* pWin */,
- ClientPtr /* client */
-#endif
-);
+ ClientPtr /* client */);
extern int DeliverEvents(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
xEventPtr /*xE*/,
int /*count*/,
- WindowPtr /*otherParent*/
-#endif
-);
+ WindowPtr /*otherParent*/);
extern void WriteEventsToClient(
-#if NeedFunctionPrototypes
ClientPtr /*pClient*/,
int /*count*/,
- xEventPtr /*events*/
-#endif
-);
+ xEventPtr /*events*/);
extern int TryClientEvents(
-#if NeedFunctionPrototypes
ClientPtr /*client*/,
xEventPtr /*pEvents*/,
int /*count*/,
Mask /*mask*/,
Mask /*filter*/,
- GrabPtr /*grab*/
-#endif
-);
+ GrabPtr /*grab*/);
-extern void WindowsRestructured(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void WindowsRestructured(void);
#ifdef RANDR
@@ -954,24 +686,13 @@ void
ScreenRestructured (ScreenPtr pScreen);
#endif
-extern void ResetClientPrivates(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void ResetClientPrivates(void);
-extern int AllocateClientPrivateIndex(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern int AllocateClientPrivateIndex(void);
extern Bool AllocateClientPrivate(
-#if NeedFunctionPrototypes
int /*index*/,
- unsigned /*amount*/
-#endif
-);
+ unsigned /*amount*/);
/*
* callback manager stuff
@@ -983,34 +704,19 @@ typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */
#endif
typedef void (*CallbackProcPtr) (
-#if NeedNestedPrototypes
- CallbackListPtr *, pointer, pointer
-#endif
-);
+ CallbackListPtr *, pointer, pointer);
typedef Bool (*AddCallbackProcPtr) (
-#if NeedNestedPrototypes
- CallbackListPtr *, CallbackProcPtr, pointer
-#endif
-);
+ CallbackListPtr *, CallbackProcPtr, pointer);
typedef Bool (*DeleteCallbackProcPtr) (
-#if NeedNestedPrototypes
- CallbackListPtr *, CallbackProcPtr, pointer
-#endif
-);
+ CallbackListPtr *, CallbackProcPtr, pointer);
typedef void (*CallCallbacksProcPtr) (
-#if NeedNestedPrototypes
- CallbackListPtr *, pointer
-#endif
-);
+ CallbackListPtr *, pointer);
typedef void (*DeleteCallbackListProcPtr) (
-#if NeedNestedPrototypes
- CallbackListPtr *
-#endif
-);
+ CallbackListPtr *);
typedef struct _CallbackProcs {
AddCallbackProcPtr AddCallback;
@@ -1020,46 +726,27 @@ typedef struct _CallbackProcs {
} CallbackFuncsRec, *CallbackFuncsPtr;
extern Bool CreateCallbackList(
-#if NeedFunctionPrototypes
CallbackListPtr * /*pcbl*/,
- CallbackFuncsPtr /*cbfuncs*/
-#endif
-);
+ CallbackFuncsPtr /*cbfuncs*/);
extern Bool AddCallback(
-#if NeedFunctionPrototypes
CallbackListPtr * /*pcbl*/,
CallbackProcPtr /*callback*/,
- pointer /*data*/
-#endif
-);
+ pointer /*data*/);
extern Bool DeleteCallback(
-#if NeedFunctionPrototypes
CallbackListPtr * /*pcbl*/,
CallbackProcPtr /*callback*/,
- pointer /*data*/
-#endif
-);
+ pointer /*data*/);
extern void CallCallbacks(
-#if NeedFunctionPrototypes
CallbackListPtr * /*pcbl*/,
- pointer /*call_data*/
-#endif
-);
+ pointer /*call_data*/);
extern void DeleteCallbackList(
-#if NeedFunctionPrototypes
- CallbackListPtr * /*pcbl*/
-#endif
-);
+ CallbackListPtr * /*pcbl*/);
-extern void InitCallbackManager(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void InitCallbackManager(void);
/*
* ServerGrabCallback stuff
diff --git a/include/dixevents.h b/include/dixevents.h
index d2c6b47f4..f80f3ab0b 100644
--- a/include/dixevents.h
+++ b/include/dixevents.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/dixevents.h,v 3.4 2001/09/04 14:03:27 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/dixevents.h,v 3.5 2003/04/27 21:31:04 herrb Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -27,44 +27,20 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef DIXEVENTS_H
#define DIXEVENTS_H
-extern void
-SetCriticalEvent(
-#if NeedFunctionPrototypes
- int /* event */
-#endif
- );
+extern void SetCriticalEvent(int /* event */);
-extern CursorPtr
-GetSpriteCursor(
-#if NeedFunctionPrototypes
- void
-#endif
- );
+extern CursorPtr GetSpriteCursor(void);
-extern int
-ProcAllowEvents(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
- );
+extern int ProcAllowEvents(ClientPtr /* client */);
-extern int
-MaybeDeliverEventsToClient(
-#if NeedFunctionPrototypes
+extern int MaybeDeliverEventsToClient(
WindowPtr /* pWin */,
xEvent * /* pEvents */,
int /* count */,
Mask /* filter */,
- ClientPtr /* dontClient */
-#endif
- );
+ ClientPtr /* dontClient */);
-extern int
-ProcWarpPointer(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
- );
+extern int ProcWarpPointer(ClientPtr /* client */);
#if 0
extern void
@@ -73,12 +49,9 @@ CoreProcessKeyboardEvent (
#else
ProcessKeyboardEvent (
#endif
-#if NeedFunctionPrototypes
xEvent * /* xE */,
DeviceIntPtr /* keybd */,
- int /* count */
-#endif
- );
+ int /* count */);
extern void
#ifdef XKB
@@ -86,129 +59,48 @@ CoreProcessPointerEvent (
#else
ProcessPointerEvent (
#endif
-#if NeedFunctionPrototypes
xEvent * /* xE */,
DeviceIntPtr /* mouse */,
- int /* count */
-#endif
- );
+ int /* count */);
#endif
-extern int
-EventSelectForWindow(
-#if NeedFunctionPrototypes
+extern int EventSelectForWindow(
WindowPtr /* pWin */,
ClientPtr /* client */,
- Mask /* mask */
-#endif
- );
+ Mask /* mask */);
-extern int
-EventSuppressForWindow(
-#if NeedFunctionPrototypes
+extern int EventSuppressForWindow(
WindowPtr /* pWin */,
ClientPtr /* client */,
Mask /* mask */,
- Bool * /* checkOptional */
-#endif
- );
+ Bool * /* checkOptional */);
-extern int
-ProcSetInputFocus(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
- );
+extern int ProcSetInputFocus(ClientPtr /* client */);
-extern int
-ProcGetInputFocus(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
- );
+extern int ProcGetInputFocus(ClientPtr /* client */);
-extern int
-ProcGrabPointer(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
- );
+extern int ProcGrabPointer(ClientPtr /* client */);
-extern int
-ProcChangeActivePointerGrab(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
- );
+extern int ProcChangeActivePointerGrab(ClientPtr /* client */);
-extern int
-ProcUngrabPointer(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
- );
+extern int ProcUngrabPointer(ClientPtr /* client */);
-extern int
-ProcGrabKeyboard(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
- );
+extern int ProcGrabKeyboard(ClientPtr /* client */);
-extern int
-ProcUngrabKeyboard(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
- );
+extern int ProcUngrabKeyboard(ClientPtr /* client */);
-extern int
-ProcQueryPointer(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
- );
+extern int ProcQueryPointer(ClientPtr /* client */);
-extern int
-ProcSendEvent(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
- );
+extern int ProcSendEvent(ClientPtr /* client */);
-extern int
-ProcUngrabKey(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
- );
+extern int ProcUngrabKey(ClientPtr /* client */);
-extern int
-ProcGrabKey(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
- );
+extern int ProcGrabKey(ClientPtr /* client */);
-extern int
-ProcGrabButton(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
- );
+extern int ProcGrabButton(ClientPtr /* client */);
-extern int
-ProcUngrabButton(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
- );
+extern int ProcUngrabButton(ClientPtr /* client */);
-extern int
-ProcRecolorCursor(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
- );
+extern int ProcRecolorCursor(ClientPtr /* client */);
#endif /* DIXEVENTS_H */
diff --git a/include/dixgrabs.h b/include/dixgrabs.h
index 5c3fc7fa0..21992e786 100644
--- a/include/dixgrabs.h
+++ b/include/dixgrabs.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/dixgrabs.h,v 3.0 1996/04/15 11:34:27 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/dixgrabs.h,v 3.1 2003/04/27 21:31:04 herrb Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -27,9 +27,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef DIXGRABS_H
#define DIXGRABS_H 1
-GrabPtr
-CreateGrab(
-#if NeedFunctionPrototypes
+extern GrabPtr CreateGrab(
int /* client */,
DeviceIntPtr /* device */,
WindowPtr /* window */,
@@ -42,38 +40,20 @@ CreateGrab(
int /* type */,
KeyCode /* keybut */,
WindowPtr /* confineTo */,
- CursorPtr /* cursor */
-#endif
- );
+ CursorPtr /* cursor */);
-int
-DeletePassiveGrab(
-#if NeedFunctionPrototypes
+extern int DeletePassiveGrab(
pointer /* value */,
- XID /* id */
-#endif
- );
+ XID /* id */);
-Bool
-GrabMatchesSecond(
-#if NeedFunctionPrototypes
+extern Bool GrabMatchesSecond(
GrabPtr /* pFirstGrab */,
- GrabPtr /* pSecondGrab */
-#endif
- );
+ GrabPtr /* pSecondGrab */);
-int
-AddPassiveGrabToList(
-#if NeedFunctionPrototypes
- GrabPtr /* pGrab */
-#endif
- );
+extern int AddPassiveGrabToList(
+ GrabPtr /* pGrab */);
-Bool
-DeletePassiveGrabFromList(
-#if NeedFunctionPrototypes
- GrabPtr /* pMinuendGrab */
-#endif
- );
+extern Bool DeletePassiveGrabFromList(
+ GrabPtr /* pMinuendGrab */);
#endif /* DIXGRABS_H */
diff --git a/include/dixstruct.h b/include/dixstruct.h
index bcf29dc04..43920540f 100644
--- a/include/dixstruct.h
+++ b/include/dixstruct.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/dixstruct.h,v 3.18 2003/01/12 02:44:27 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/dixstruct.h,v 3.20 2003/11/03 05:11:59 tsi Exp $ */
/***********************************************************
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
@@ -51,20 +51,14 @@ typedef struct {
} NewClientInfoRec;
typedef void (*ReplySwapPtr) (
-#if NeedNestedPrototypes
ClientPtr /* pClient */,
int /* size */,
- void * /* pbuf */
-#endif
-);
+ void * /* pbuf */);
extern void ReplyNotSwappd (
-#if NeedNestedPrototypes
ClientPtr /* pClient */,
int /* size */,
- void * /* pbuf */
-#endif
-);
+ void * /* pbuf */);
typedef enum {ClientStateInitial,
ClientStateAuthenticating,
@@ -95,10 +89,7 @@ typedef struct _Client {
int numSaved;
pointer screenPrivate[MAXSCREENS];
int (**requestVector) (
-#if NeedNestedPrototypes
- ClientPtr /* pClient */
-#endif
-);
+ ClientPtr /* pClient */);
CARD32 req_len; /* length of current request */
Bool big_requests; /* supports large requests */
int priority;
@@ -117,35 +108,25 @@ typedef struct _Client {
int requestLogIndex;
#endif
#ifdef LBX
- int (*readRequest)(
-#if NeedNestedPrototypes
- ClientPtr /*client*/
-#endif
-);
+ int (*readRequest)(ClientPtr /*client*/);
#endif
unsigned long replyBytesRemaining;
#ifdef XCSECURITY
XID authId;
unsigned int trustLevel;
pointer (* CheckAccess)(
-#if NeedNestedPrototypes
ClientPtr /*pClient*/,
XID /*id*/,
RESTYPE /*classes*/,
Mask /*access_mode*/,
- pointer /*resourceval*/
-#endif
-);
+ pointer /*resourceval*/);
#endif
#ifdef XAPPGROUP
struct _AppGroupRec* appgroup;
#endif
struct _FontResolution * (*fontResFunc) ( /* no need for font.h */
-#if NeedNestedPrototypes
ClientPtr /* pClient */,
- int * /* num */
-#endif
-);
+ int * /* num */);
#ifdef SMART_SCHEDULE
int smart_priority;
long smart_start_tick;
@@ -167,31 +148,21 @@ extern Bool SmartScheduleDisable;
extern Bool SmartScheduleIdle;
extern Bool SmartScheduleTimerStopped;
extern Bool SmartScheduleStartTimer(void);
-#define SMART_MAX_PRIORITY 20
-#define SMART_MIN_PRIORITY -20
+#define SMART_MAX_PRIORITY (20)
+#define SMART_MIN_PRIORITY (-20)
-extern Bool SmartScheduleInit(
-#ifdef NeedFunctionPrototypes
- void
-#endif
-);
+extern Bool SmartScheduleInit(void);
#endif
/* This prototype is used pervasively in Xext, dix */
-#if NeedFunctionPrototypes
#define DISPATCH_PROC(func) int func(ClientPtr /* client */)
-#else
-#define DISPATCH_PROC(func) int func(/* ClientPtr client */)
-#endif
typedef struct _WorkQueue {
struct _WorkQueue *next;
Bool (*function) (
-#if NeedNestedPrototypes
ClientPtr /* pClient */,
pointer /* closure */
-#endif
);
ClientPtr client;
pointer closure;
@@ -201,17 +172,10 @@ extern TimeStamp currentTime;
extern TimeStamp lastDeviceEventTime;
extern int CompareTimeStamps(
-#if NeedFunctionPrototypes
TimeStamp /*a*/,
- TimeStamp /*b*/
-#endif
-);
+ TimeStamp /*b*/);
-extern TimeStamp ClientTimeToServerTime(
-#if NeedFunctionPrototypes
- CARD32 /*c*/
-#endif
-);
+extern TimeStamp ClientTimeToServerTime(CARD32 /*c*/);
typedef struct _CallbackRec {
CallbackProcPtr proc;
@@ -230,38 +194,18 @@ typedef struct _CallbackList {
/* proc vectors */
-extern int (* InitialVector[3]) (
-#if NeedNestedPrototypes
- ClientPtr /*client*/
-#endif
-);
+extern int (* InitialVector[3]) (ClientPtr /*client*/);
-extern int (* ProcVector[256]) (
-#if NeedNestedPrototypes
- ClientPtr /*client*/
-#endif
-);
+extern int (* ProcVector[256]) (ClientPtr /*client*/);
-extern int (* SwappedProcVector[256]) (
-#if NeedNestedPrototypes
- ClientPtr /*client*/
-#endif
-);
+extern int (* SwappedProcVector[256]) (ClientPtr /*client*/);
#ifdef K5AUTH
-extern int (*k5_Vector[256])() =
-#if NeedNestedPrototypes
- ClientPtr /*client*/
-#endif
-);
+extern int (*k5_Vector[256])(ClientPtr /*client*/);
#endif
extern ReplySwapPtr ReplySwapVector[256];
-extern int ProcBadRequest(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+extern int ProcBadRequest(ClientPtr /*client*/);
#endif /* DIXSTRUCT_H */
diff --git a/include/exevents.h b/include/exevents.h
index 2ad79aa10..ea3804bd3 100644
--- a/include/exevents.h
+++ b/include/exevents.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/exevents.h,v 3.1 1996/04/15 11:34:29 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/exevents.h,v 3.2 2003/04/27 21:31:04 herrb Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -31,56 +31,34 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef EXEVENTS_H
#define EXEVENTS_H
-void
-RegisterOtherDevice (
-#if NeedFunctionPrototypes
- DeviceIntPtr /* device */
-#endif
- );
+extern void RegisterOtherDevice (
+ DeviceIntPtr /* device */);
-void
-ProcessOtherEvent (
-#if NeedFunctionPrototypes
+extern void ProcessOtherEvent (
xEventPtr /* FIXME deviceKeyButtonPointer * xE */,
DeviceIntPtr /* other */,
- int /* count */
-#endif
- );
+ int /* count */);
-int
-InitProximityClassDeviceStruct(
-#if NeedFunctionPrototypes
- DeviceIntPtr /* dev */
-#endif
- );
+extern int InitProximityClassDeviceStruct(
+ DeviceIntPtr /* dev */);
-void
-InitValuatorAxisStruct(
-#if NeedFunctionPrototypes
+extern void InitValuatorAxisStruct(
DeviceIntPtr /* dev */,
int /* axnum */,
int /* minval */,
int /* maxval */,
int /* resolution */,
int /* min_res */,
- int /* max_res */
-#endif
- );
+ int /* max_res */);
-void
-DeviceFocusEvent(
-#if NeedFunctionPrototypes
+extern void DeviceFocusEvent(
DeviceIntPtr /* dev */,
int /* type */,
int /* mode */,
int /* detail */,
- WindowPtr /* pWin */
-#endif
- );
+ WindowPtr /* pWin */);
-int
-GrabButton(
-#if NeedFunctionPrototypes
+extern int GrabButton(
ClientPtr /* client */,
DeviceIntPtr /* dev */,
BYTE /* this_device_mode */,
@@ -92,13 +70,9 @@ GrabButton(
BOOL /* ownerEvents */,
Cursor /* rcursor */,
Window /* rconfineTo */,
- Mask /* eventMask */
-#endif
- );
+ Mask /* eventMask */);
-int
-GrabKey(
-#if NeedFunctionPrototypes
+extern int GrabKey(
ClientPtr /* client */,
DeviceIntPtr /* dev */,
BYTE /* this_device_mode */,
@@ -108,96 +82,60 @@ GrabKey(
CARD8 /* key */,
Window /* grabWindow */,
BOOL /* ownerEvents */,
- Mask /* mask */
-#endif
- );
+ Mask /* mask */);
-int
-SelectForWindow(
-#if NeedFunctionPrototypes
+extern int SelectForWindow(
DeviceIntPtr /* dev */,
WindowPtr /* pWin */,
ClientPtr /* client */,
Mask /* mask */,
Mask /* exclusivemasks */,
- Mask /* validmasks */
-#endif
- );
+ Mask /* validmasks */);
-int
-AddExtensionClient (
-#if NeedFunctionPrototypes
+extern int AddExtensionClient (
WindowPtr /* pWin */,
ClientPtr /* client */,
Mask /* mask */,
- int /* mskidx */
-#endif
- );
+ int /* mskidx */);
-void
-RecalculateDeviceDeliverableEvents(
-#if NeedFunctionPrototypes
- WindowPtr /* pWin */
-#endif
- );
+extern void RecalculateDeviceDeliverableEvents(
+ WindowPtr /* pWin */);
-int
-InputClientGone(
-#if NeedFunctionPrototypes
+extern int InputClientGone(
WindowPtr /* pWin */,
- XID /* id */
-#endif
- );
+ XID /* id */);
-int
-SendEvent (
-#if NeedFunctionPrototypes
+extern int SendEvent (
ClientPtr /* client */,
DeviceIntPtr /* d */,
Window /* dest */,
Bool /* propagate */,
xEvent * /* ev */,
Mask /* mask */,
- int /* count */
-#endif
- );
+ int /* count */);
-int
-SetButtonMapping (
-#if NeedFunctionPrototypes
+extern int SetButtonMapping (
ClientPtr /* client */,
DeviceIntPtr /* dev */,
int /* nElts */,
- BYTE * /* map */
-#endif
- );
+ BYTE * /* map */);
-int
-SetModifierMapping(
-#if NeedFunctionPrototypes
+extern int SetModifierMapping(
ClientPtr /* client */,
DeviceIntPtr /* dev */,
int /* len */,
int /* rlen */,
int /* numKeyPerModifier */,
KeyCode * /* inputMap */,
- KeyClassPtr * /* k */
-#endif
- );
+ KeyClassPtr * /* k */);
-void
-SendDeviceMappingNotify(
-#if NeedFunctionPrototypes
+extern void SendDeviceMappingNotify(
CARD8 /* request, */,
KeyCode /* firstKeyCode */,
CARD8 /* count */,
- DeviceIntPtr /* dev */
-#endif
-);
+ DeviceIntPtr /* dev */);
-int
-ChangeKeyMapping(
-#if NeedFunctionPrototypes
+extern int ChangeKeyMapping(
ClientPtr /* client */,
DeviceIntPtr /* dev */,
unsigned /* len */,
@@ -205,71 +143,41 @@ ChangeKeyMapping(
KeyCode /* firstKeyCode */,
CARD8 /* keyCodes */,
CARD8 /* keySymsPerKeyCode */,
- KeySym * /* map */
-#endif
- );
+ KeySym * /* map */);
-void
-DeleteWindowFromAnyExtEvents(
-#if NeedFunctionPrototypes
+extern void DeleteWindowFromAnyExtEvents(
WindowPtr /* pWin */,
- Bool /* freeResources */
-#endif
-);
+ Bool /* freeResources */);
-void
-DeleteDeviceFromAnyExtEvents(
-#if NeedFunctionPrototypes
+extern void DeleteDeviceFromAnyExtEvents(
WindowPtr /* pWin */,
- DeviceIntPtr /* dev */
-#endif
- );
+ DeviceIntPtr /* dev */);
-int
-MaybeSendDeviceMotionNotifyHint (
-#if NeedFunctionPrototypes
+extern int MaybeSendDeviceMotionNotifyHint (
deviceKeyButtonPointer * /* pEvents */,
- Mask /* mask */
-#endif
-);
+ Mask /* mask */);
-void
-CheckDeviceGrabAndHintWindow (
-#if NeedFunctionPrototypes
+extern void CheckDeviceGrabAndHintWindow (
WindowPtr /* pWin */,
int /* type */,
deviceKeyButtonPointer * /* xE */,
GrabPtr /* grab */,
ClientPtr /* client */,
- Mask /* deliveryMask */
-#endif
- );
+ Mask /* deliveryMask */);
-Mask
-DeviceEventMaskForClient(
-#if NeedFunctionPrototypes
+extern Mask DeviceEventMaskForClient(
DeviceIntPtr /* dev */,
WindowPtr /* pWin */,
- ClientPtr /* client */
-#endif
-);
+ ClientPtr /* client */);
-void
-MaybeStopDeviceHint(
-#if NeedFunctionPrototypes
+extern void MaybeStopDeviceHint(
DeviceIntPtr /* dev */,
- ClientPtr /* client */
-#endif
- );
+ ClientPtr /* client */);
-int
-DeviceEventSuppressForWindow(
-#if NeedFunctionPrototypes
+extern int DeviceEventSuppressForWindow(
WindowPtr /* pWin */,
ClientPtr /* client */,
Mask /* mask */,
- int /* maskndx */
-#endif
- );
+ int /* maskndx */);
#endif /* EXEVENTS_H */
diff --git a/include/extension.h b/include/extension.h
index 304674fa6..6b674f07f 100644
--- a/include/extension.h
+++ b/include/extension.h
@@ -45,39 +45,22 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/include/extension.h,v 1.5 2001/12/14 19:59:54 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/extension.h,v 1.6 2003/04/27 21:31:04 herrb Exp $ */
#ifndef EXTENSION_H
#define EXTENSION_H
_XFUNCPROTOBEGIN
-extern unsigned short StandardMinorOpcode(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
-
-extern unsigned short MinorOpcodeOfRequest(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
-
-extern void InitExtensions(
-#if NeedFunctionPrototypes
- int argc,
- char **argv
-#endif
-);
+extern unsigned short StandardMinorOpcode(ClientPtr /*client*/);
+
+extern unsigned short MinorOpcodeOfRequest(ClientPtr /*client*/);
+
+extern void InitExtensions(int argc, char **argv);
extern void InitVisualWrap(void);
-extern void CloseDownExtensions(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void CloseDownExtensions(void);
_XFUNCPROTOEND
diff --git a/include/extinit.h b/include/extinit.h
index 7e577057c..107eee891 100644
--- a/include/extinit.h
+++ b/include/extinit.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/extinit.h,v 3.2 2001/08/01 00:44:58 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/include/extinit.h,v 3.3 2003/11/17 22:20:43 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -35,178 +35,132 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
void
XInputExtensionInit(
-#if NeedFunctionPrototypes
void
-#endif
);
int
ProcIDispatch (
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
int
SProcIDispatch(
-#if NeedFunctionPrototypes
ClientPtr /* client */
-#endif
);
void
SReplyIDispatch (
-#if NeedFunctionPrototypes
ClientPtr /* client */,
int /* len */,
xGrabDeviceReply * /* rep */
-#endif
);
void
SEventIDispatch (
-#if NeedFunctionPrototypes
xEvent * /* from */,
xEvent * /* to */
-#endif
);
void
SEventDeviceValuator (
-#if NeedFunctionPrototypes
deviceValuator * /* from */,
deviceValuator * /* to */
-#endif
);
void
SEventFocus (
-#if NeedFunctionPrototypes
deviceFocus * /* from */,
deviceFocus * /* to */
-#endif
);
void
SDeviceStateNotifyEvent (
-#if NeedFunctionPrototypes
deviceStateNotify * /* from */,
deviceStateNotify * /* to */
-#endif
);
void
SDeviceKeyStateNotifyEvent (
-#if NeedFunctionPrototypes
deviceKeyStateNotify * /* from */,
deviceKeyStateNotify * /* to */
-#endif
);
void
SDeviceButtonStateNotifyEvent (
-#if NeedFunctionPrototypes
deviceButtonStateNotify * /* from */,
deviceButtonStateNotify * /* to */
-#endif
);
void
SChangeDeviceNotifyEvent (
-#if NeedFunctionPrototypes
changeDeviceNotify * /* from */,
changeDeviceNotify * /* to */
-#endif
);
void
SDeviceMappingNotifyEvent (
-#if NeedFunctionPrototypes
deviceMappingNotify * /* from */,
deviceMappingNotify * /* to */
-#endif
);
void
FixExtensionEvents (
-#if NeedFunctionPrototypes
ExtensionEntry * /* extEntry */
-#endif
);
void
RestoreExtensionEvents (
-#if NeedFunctionPrototypes
void
-#endif
);
void
IResetProc(
-#if NeedFunctionPrototypes
ExtensionEntry * /* unused */
-#endif
);
void
AssignTypeAndName (
-#if NeedFunctionPrototypes
DeviceIntPtr /* dev */,
Atom /* type */,
char * /* name */
-#endif
);
void
MakeDeviceTypeAtoms (
-#if NeedFunctionPrototypes
void
-#endif
);
DeviceIntPtr
LookupDeviceIntRec (
-#if NeedFunctionPrototypes
CARD8 /* id */
-#endif
);
void
SetExclusiveAccess (
-#if NeedFunctionPrototypes
Mask /* mask */
-#endif
);
void
AllowPropagateSuppress (
-#if NeedFunctionPrototypes
Mask /* mask */
-#endif
);
Mask
GetNextExtEventMask (
-#if NeedFunctionPrototypes
void
-#endif
);
void
SetMaskForExtEvent(
-#if NeedFunctionPrototypes
Mask /* mask */,
int /* event */
-#endif
);
void
SetEventInfo(
-#if NeedFunctionPrototypes
Mask /* mask */,
int /* constant */
-#endif
);
#endif /* EXTINIT_H */
diff --git a/include/extnsionst.h b/include/extnsionst.h
index 6de9be309..0d7debe0b 100644
--- a/include/extnsionst.h
+++ b/include/extnsionst.h
@@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/include/extnsionst.h,v 3.7 2001/12/14 19:59:54 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/extnsionst.h,v 3.9 2003/07/16 01:38:52 dawes Exp $ */
#ifndef EXTENSIONSTRUCT_H
#define EXTENSIONSTRUCT_H
@@ -58,10 +58,7 @@ SOFTWARE.
typedef struct _ExtensionEntry {
int index;
void (* CloseDown)( /* called at server shutdown */
-#if NeedNestedPrototypes
- struct _ExtensionEntry * /* extension */
-#endif
-);
+ struct _ExtensionEntry * /* extension */);
char *name; /* extension name */
int base; /* base request number */
int eventBase;
@@ -72,10 +69,7 @@ typedef struct _ExtensionEntry {
char **aliases;
pointer extPrivate;
unsigned short (* MinorOpcode)( /* called for errors */
-#if NeedNestedPrototypes
- ClientPtr /* client */
-#endif
-);
+ ClientPtr /* client */);
#ifdef XCSECURITY
Bool secure; /* extension visible to untrusted clients? */
#endif
@@ -86,25 +80,21 @@ typedef struct _ExtensionEntry {
* Deal with this by casting when initializing the event's EventSwapVector[]
* entries.
*/
-typedef void (*EventSwapPtr) (
-#if NeedFunctionPrototypes
- xEvent *,
- xEvent *
-#endif
-);
+typedef void (*EventSwapPtr) (xEvent *, xEvent *);
extern EventSwapPtr EventSwapVector[128];
extern void NotImplemented ( /* FIXME: this may move to another file... */
-#if NeedFunctionPrototypes
xEvent *,
- xEvent *
-#endif
-);
-
-typedef void (* ExtensionLookupProc)( /*args indeterminate*/
-#ifdef EXTENSION_PROC_ARGS
- EXTENSION_PROC_ARGS
+ xEvent *);
+
+typedef void (* ExtensionLookupProc)(
+#ifdef EXTENSION_PROC_ARGS
+ EXTENSION_PROC_ARGS
+#else
+ /* args no longer indeterminate */
+ char *name,
+ GCPtr pGC
#endif
);
@@ -125,71 +115,38 @@ typedef struct _ScreenProcEntry {
extern ExtensionEntry *AddExtension(
-#if NeedFunctionPrototypes
char* /*name*/,
int /*NumEvents*/,
int /*NumErrors*/,
- int (* /*MainProc*/)(
-#if NeedNestedPrototypes
- ClientPtr /*client*/
-#endif
-),
- int (* /*SwappedMainProc*/)(
-#if NeedNestedPrototypes
- ClientPtr /*client*/
-#endif
-),
- void (* /*CloseDownProc*/)(
-#if NeedNestedPrototypes
- ExtensionEntry * /*extension*/
-#endif
-),
- unsigned short (* /*MinorOpcodeProc*/)(
-#if NeedNestedPrototypes
- ClientPtr /*client*/
-#endif
- )
-#endif /* NeedFunctionPrototypes */
+ int (* /*MainProc*/)(ClientPtr /*client*/),
+ int (* /*SwappedMainProc*/)(ClientPtr /*client*/),
+ void (* /*CloseDownProc*/)(ExtensionEntry * /*extension*/),
+ unsigned short (* /*MinorOpcodeProc*/)(ClientPtr /*client*/)
);
extern Bool AddExtensionAlias(
-#if NeedFunctionPrototypes
char* /*alias*/,
- ExtensionEntry * /*extension*/
-#endif
-);
+ ExtensionEntry * /*extension*/);
extern ExtensionEntry *CheckExtension(const char *extname);
extern ExtensionLookupProc LookupProc(
-#if NeedFunctionPrototypes
char* /*name*/,
- GCPtr /*pGC*/
-#endif
-);
+ GCPtr /*pGC*/);
extern Bool RegisterProc(
-#if NeedFunctionPrototypes
char* /*name*/,
GCPtr /*pGC*/,
- ExtensionLookupProc /*proc*/
-#endif
-);
+ ExtensionLookupProc /*proc*/);
extern Bool RegisterScreenProc(
-#if NeedFunctionPrototypes
char* /*name*/,
ScreenPtr /*pScreen*/,
- ExtensionLookupProc /*proc*/
-#endif
-);
+ ExtensionLookupProc /*proc*/);
extern void DeclareExtensionSecurity(
-#if NeedFunctionPrototypes
char * /*extname*/,
- Bool /*secure*/
-#endif
-);
+ Bool /*secure*/);
#endif /* EXTENSIONSTRUCT_H */
diff --git a/include/gc.h b/include/gc.h
index 8d1b31fad..a886d77b8 100644
--- a/include/gc.h
+++ b/include/gc.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/gc.h,v 1.5 2001/12/14 19:59:54 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/gc.h,v 1.6 2003/04/27 21:31:04 herrb Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -87,28 +87,19 @@ typedef struct _GC *GCPtr;
typedef struct _GCOps *GCOpsPtr;
extern void ValidateGC(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
- GCPtr /*pGC*/
-#endif
-);
+ GCPtr /*pGC*/);
extern int ChangeGC(
-#if NeedFunctionPrototypes
GCPtr/*pGC*/,
BITS32 /*mask*/,
- XID* /*pval*/
-#endif
-);
+ XID* /*pval*/);
extern int DoChangeGC(
-#if NeedFunctionPrototypes
GCPtr/*pGC*/,
BITS32 /*mask*/,
XID* /*pval*/,
- int /*fPointer*/
-#endif
-);
+ int /*fPointer*/);
typedef union {
CARD32 val;
@@ -116,117 +107,72 @@ typedef union {
} ChangeGCVal, *ChangeGCValPtr;
extern int dixChangeGC(
-#if NeedFunctionPrototypes
ClientPtr /*client*/,
GCPtr /*pGC*/,
BITS32 /*mask*/,
CARD32 * /*pval*/,
- ChangeGCValPtr /*pCGCV*/
-#endif
-);
+ ChangeGCValPtr /*pCGCV*/);
extern GCPtr CreateGC(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
BITS32 /*mask*/,
XID* /*pval*/,
- int* /*pStatus*/
-#endif
-);
+ int* /*pStatus*/);
extern int CopyGC(
-#if NeedFunctionPrototypes
GCPtr/*pgcSrc*/,
GCPtr/*pgcDst*/,
- BITS32 /*mask*/
-#endif
-);
+ BITS32 /*mask*/);
extern int FreeGC(
-#if NeedFunctionPrototypes
pointer /*pGC*/,
- XID /*gid*/
-#endif
-);
+ XID /*gid*/);
extern void SetGCMask(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/,
Mask /*selectMask*/,
- Mask /*newDataMask*/
-#endif
-);
+ Mask /*newDataMask*/);
extern GCPtr CreateScratchGC(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
- unsigned /*depth*/
-#endif
-);
+ unsigned /*depth*/);
extern void FreeGCperDepth(
-#if NeedFunctionPrototypes
- int /*screenNum*/
-#endif
-);
+ int /*screenNum*/);
extern Bool CreateGCperDepth(
-#if NeedFunctionPrototypes
- int /*screenNum*/
-#endif
-);
+ int /*screenNum*/);
extern Bool CreateDefaultStipple(
-#if NeedFunctionPrototypes
- int /*screenNum*/
-#endif
-);
+ int /*screenNum*/);
extern void FreeDefaultStipple(
-#if NeedFunctionPrototypes
- int /*screenNum*/
-#endif
-);
+ int /*screenNum*/);
extern int SetDashes(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/,
unsigned /*offset*/,
unsigned /*ndash*/,
- unsigned char* /*pdash*/
-#endif
-);
+ unsigned char* /*pdash*/);
extern int VerifyRectOrder(
-#if NeedFunctionPrototypes
int /*nrects*/,
xRectangle* /*prects*/,
- int /*ordering*/
-#endif
-);
+ int /*ordering*/);
extern int SetClipRects(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/,
int /*xOrigin*/,
int /*yOrigin*/,
int /*nrects*/,
xRectangle* /*prects*/,
- int /*ordering*/
-#endif
-);
+ int /*ordering*/);
extern GCPtr GetScratchGC(
-#if NeedFunctionPrototypes
unsigned /*depth*/,
- ScreenPtr /*pScreen*/
-#endif
-);
+ ScreenPtr /*pScreen*/);
extern void FreeScratchGC(
-#if NeedFunctionPrototypes
- GCPtr /*pGC*/
-#endif
-);
+ GCPtr /*pGC*/);
#endif /* GC_H */
diff --git a/include/gcstruct.h b/include/gcstruct.h
index 35ca1583d..43cc679b4 100644
--- a/include/gcstruct.h
+++ b/include/gcstruct.h
@@ -47,14 +47,14 @@ SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/include/gcstruct.h,v 1.6 2001/12/14 19:59:54 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/gcstruct.h,v 1.8 2003/07/16 01:38:52 dawes Exp $ */
#ifndef GCSTRUCT_H
#define GCSTRUCT_H
#include "gc.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "region.h"
#include "pixmap.h"
#include "screenint.h"
@@ -66,55 +66,34 @@ SOFTWARE.
typedef struct _GCFuncs {
void (* ValidateGC)(
-#if NeedNestedPrototypes
GCPtr /*pGC*/,
unsigned long /*stateChanges*/,
- DrawablePtr /*pDrawable*/
-#endif
-);
+ DrawablePtr /*pDrawable*/);
void (* ChangeGC)(
-#if NeedNestedPrototypes
GCPtr /*pGC*/,
- unsigned long /*mask*/
-#endif
-);
+ unsigned long /*mask*/);
void (* CopyGC)(
-#if NeedNestedPrototypes
GCPtr /*pGCSrc*/,
unsigned long /*mask*/,
- GCPtr /*pGCDst*/
-#endif
-);
+ GCPtr /*pGCDst*/);
void (* DestroyGC)(
-#if NeedNestedPrototypes
- GCPtr /*pGC*/
-#endif
-);
+ GCPtr /*pGC*/);
void (* ChangeClip)(
-#if NeedNestedPrototypes
GCPtr /*pGC*/,
int /*type*/,
pointer /*pvalue*/,
- int /*nrects*/
-#endif
-);
+ int /*nrects*/);
void (* DestroyClip)(
-#if NeedNestedPrototypes
- GCPtr /*pGC*/
-#endif
-);
+ GCPtr /*pGC*/);
void (* CopyClip)(
-#if NeedNestedPrototypes
GCPtr /*pgcDst*/,
- GCPtr /*pgcSrc*/
-#endif
-);
+ GCPtr /*pgcSrc*/);
DevUnion devPrivate;
} GCFuncs;
@@ -124,30 +103,23 @@ typedef struct _GCFuncs {
typedef struct _GCOps {
void (* FillSpans)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
- int /*fSorted*/
-#endif
-);
+ int /*fSorted*/);
void (* SetSpans)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
char * /*psrc*/,
DDXPointPtr /*ppt*/,
int * /*pwidth*/,
int /*nspans*/,
- int /*fSorted*/
-#endif
-);
+ int /*fSorted*/);
void (* PutImage)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*depth*/,
@@ -157,12 +129,9 @@ typedef struct _GCOps {
int /*h*/,
int /*leftPad*/,
int /*format*/,
- char * /*pBits*/
-#endif
-);
+ char * /*pBits*/);
RegionPtr (* CopyArea)(
-#if NeedNestedPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
GCPtr /*pGC*/,
@@ -171,12 +140,9 @@ typedef struct _GCOps {
int /*w*/,
int /*h*/,
int /*dstx*/,
- int /*dsty*/
-#endif
-);
+ int /*dsty*/);
RegionPtr (* CopyPlane)(
-#if NeedNestedPrototypes
DrawablePtr /*pSrcDrawable*/,
DrawablePtr /*pDstDrawable*/,
GCPtr /*pGC*/,
@@ -186,164 +152,117 @@ typedef struct _GCOps {
int /*height*/,
int /*dstx*/,
int /*dsty*/,
- unsigned long /*bitPlane*/
-#endif
-);
+ unsigned long /*bitPlane*/);
void (* PolyPoint)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
int /*npt*/,
- DDXPointPtr /*pptInit*/
-#endif
-);
+ DDXPointPtr /*pptInit*/);
void (* Polylines)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
int /*npt*/,
- DDXPointPtr /*pptInit*/
-#endif
-);
+ DDXPointPtr /*pptInit*/);
void (* PolySegment)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nseg*/,
- xSegment * /*pSegs*/
-#endif
-);
+ xSegment * /*pSegs*/);
void (* PolyRectangle)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nrects*/,
- xRectangle * /*pRects*/
-#endif
-);
+ xRectangle * /*pRects*/);
void (* PolyArc)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*narcs*/,
- xArc * /*parcs*/
-#endif
-);
+ xArc * /*parcs*/);
void (* FillPolygon)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*shape*/,
int /*mode*/,
int /*count*/,
- DDXPointPtr /*pPts*/
-#endif
-);
+ DDXPointPtr /*pPts*/);
void (* PolyFillRect)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nrectFill*/,
- xRectangle * /*prectInit*/
-#endif
-);
+ xRectangle * /*prectInit*/);
void (* PolyFillArc)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*narcs*/,
- xArc * /*parcs*/
-#endif
-);
+ xArc * /*parcs*/);
int (* PolyText8)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*x*/,
int /*y*/,
int /*count*/,
- char * /*chars*/
-#endif
-);
+ char * /*chars*/);
int (* PolyText16)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*x*/,
int /*y*/,
int /*count*/,
- unsigned short * /*chars*/
-#endif
-);
+ unsigned short * /*chars*/);
void (* ImageText8)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*x*/,
int /*y*/,
int /*count*/,
- char * /*chars*/
-#endif
-);
+ char * /*chars*/);
void (* ImageText16)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*x*/,
int /*y*/,
int /*count*/,
- unsigned short * /*chars*/
-#endif
-);
+ unsigned short * /*chars*/);
void (* ImageGlyphBlt)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*x*/,
int /*y*/,
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
- pointer /*pglyphBase*/
-#endif
-);
+ pointer /*pglyphBase*/);
void (* PolyGlyphBlt)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*x*/,
int /*y*/,
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
- pointer /*pglyphBase*/
-#endif
-);
+ pointer /*pglyphBase*/);
void (* PushPixels)(
-#if NeedNestedPrototypes
GCPtr /*pGC*/,
PixmapPtr /*pBitMap*/,
DrawablePtr /*pDst*/,
int /*w*/,
int /*h*/,
int /*x*/,
- int /*y*/
-#endif
-);
+ int /*y*/);
#ifdef NEED_LINEHELPER
void (* LineHelper)();
diff --git a/include/input.h b/include/input.h
index e34098f89..acf3bca1a 100644
--- a/include/input.h
+++ b/include/input.h
@@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/include/input.h,v 3.7 2001/12/14 19:59:54 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/input.h,v 3.8 2003/04/27 21:31:04 herrb Exp $ */
#ifndef INPUT_H
#define INPUT_H
@@ -84,19 +84,13 @@ typedef struct _InputClients *InputClientsPtr;
typedef struct _DeviceIntRec *DeviceIntPtr;
typedef int (*DeviceProc)(
-#if NeedNestedPrototypes
DeviceIntPtr /*device*/,
- int /*what*/
-#endif
-);
+ int /*what*/);
typedef void (*ProcessInputProc)(
-#if NeedNestedPrototypes
xEventPtr /*events*/,
DeviceIntPtr /*device*/,
- int /*count*/
-#endif
-);
+ int /*count*/);
typedef struct _DeviceRec {
pointer devicePrivate;
@@ -156,380 +150,227 @@ extern PtrCtrl defaultPointerControl;
#undef AddInputDevice
extern DevicePtr AddInputDevice(
-#if NeedFunctionPrototypes
DeviceProc /*deviceProc*/,
- Bool /*autoStart*/
-#endif
-);
+ Bool /*autoStart*/);
#define AddInputDevice(deviceProc, autoStart) \
_AddInputDevice(deviceProc, autoStart)
extern DeviceIntPtr _AddInputDevice(
-#if NeedFunctionPrototypes
DeviceProc /*deviceProc*/,
- Bool /*autoStart*/
-#endif
-);
+ Bool /*autoStart*/);
extern Bool EnableDevice(
-#if NeedFunctionPrototypes
- DeviceIntPtr /*device*/
-#endif
-);
+ DeviceIntPtr /*device*/);
extern Bool DisableDevice(
-#if NeedFunctionPrototypes
- DeviceIntPtr /*device*/
-#endif
-);
+ DeviceIntPtr /*device*/);
-extern int InitAndStartDevices(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern int InitAndStartDevices(void);
-extern void CloseDownDevices(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void CloseDownDevices(void);
extern void RemoveDevice(
-#if NeedFunctionPrototypes
- DeviceIntPtr /*dev*/
-#endif
-);
+ DeviceIntPtr /*dev*/);
-extern int NumMotionEvents(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern int NumMotionEvents(void);
#undef RegisterPointerDevice
extern void RegisterPointerDevice(
-#if NeedFunctionPrototypes
- DevicePtr /*device*/
-#endif
-);
+ DevicePtr /*device*/);
#define RegisterPointerDevice(device) \
_RegisterPointerDevice(device)
extern void _RegisterPointerDevice(
-#if NeedFunctionPrototypes
- DeviceIntPtr /*device*/
-#endif
-);
+ DeviceIntPtr /*device*/);
#undef RegisterKeyboardDevice
extern void RegisterKeyboardDevice(
-#if NeedFunctionPrototypes
- DevicePtr /*device*/
-#endif
-);
+ DevicePtr /*device*/);
#define RegisterKeyboardDevice(device) \
_RegisterKeyboardDevice(device)
extern void _RegisterKeyboardDevice(
-#if NeedFunctionPrototypes
- DeviceIntPtr /*device*/
-#endif
-);
+ DeviceIntPtr /*device*/);
-extern DevicePtr LookupKeyboardDevice(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern DevicePtr LookupKeyboardDevice(void);
-extern DevicePtr LookupPointerDevice(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern DevicePtr LookupPointerDevice(void);
extern DevicePtr LookupDevice(
-#if NeedFunctionPrototypes
- int /* id */
-#endif
-);
+ int /* id */);
extern void QueryMinMaxKeyCodes(
-#if NeedFunctionPrototypes
KeyCode* /*minCode*/,
- KeyCode* /*maxCode*/
-#endif
-);
+ KeyCode* /*maxCode*/);
extern Bool SetKeySymsMap(
-#if NeedFunctionPrototypes
KeySymsPtr /*dst*/,
- KeySymsPtr /*src*/
-#endif
-);
+ KeySymsPtr /*src*/);
extern Bool InitKeyClassDeviceStruct(
-#if NeedFunctionPrototypes
DeviceIntPtr /*device*/,
KeySymsPtr /*pKeySyms*/,
- CARD8 /*pModifiers*/[]
-#endif
-);
+ CARD8 /*pModifiers*/[]);
extern Bool InitButtonClassDeviceStruct(
-#if NeedFunctionPrototypes
DeviceIntPtr /*device*/,
int /*numButtons*/,
- CARD8* /*map*/
-#endif
-);
+ CARD8* /*map*/);
typedef int (*ValuatorMotionProcPtr)(
-#if NeedNestedPrototypes
DeviceIntPtr /*pdevice*/,
xTimecoord * /*coords*/,
unsigned long /*start*/,
unsigned long /*stop*/,
- ScreenPtr /*pScreen*/
-#endif
-);
+ ScreenPtr /*pScreen*/);
extern Bool InitValuatorClassDeviceStruct(
-#if NeedFunctionPrototypes
DeviceIntPtr /*device*/,
int /*numAxes*/,
ValuatorMotionProcPtr /* motionProc */,
int /*numMotionEvents*/,
- int /*mode*/
-#endif
-);
+ int /*mode*/);
extern Bool InitFocusClassDeviceStruct(
-#if NeedFunctionPrototypes
- DeviceIntPtr /*device*/
-#endif
-);
+ DeviceIntPtr /*device*/);
typedef void (*BellProcPtr)(
-#if NeedNestedPrototypes
int /*percent*/,
DeviceIntPtr /*device*/,
pointer /*ctrl*/,
- int
-#endif
-);
+ int);
typedef void (*KbdCtrlProcPtr)(
-#if NeedNestedPrototypes
DeviceIntPtr /*device*/,
- KeybdCtrl * /*ctrl*/
-#endif
-);
+ KeybdCtrl * /*ctrl*/);
extern Bool InitKbdFeedbackClassDeviceStruct(
-#if NeedFunctionPrototypes
DeviceIntPtr /*device*/,
BellProcPtr /*bellProc*/,
- KbdCtrlProcPtr /*controlProc*/
-#endif
-);
+ KbdCtrlProcPtr /*controlProc*/);
typedef void (*PtrCtrlProcPtr)(
-#if NeedNestedPrototypes
DeviceIntPtr /*device*/,
- PtrCtrl * /*ctrl*/
-#endif
-);
+ PtrCtrl * /*ctrl*/);
extern Bool InitPtrFeedbackClassDeviceStruct(
-#if NeedFunctionPrototypes
DeviceIntPtr /*device*/,
- PtrCtrlProcPtr /*controlProc*/
-#endif
-);
+ PtrCtrlProcPtr /*controlProc*/);
typedef void (*StringCtrlProcPtr)(
-#if NeedNestedPrototypes
DeviceIntPtr /*device*/,
- StringCtrl * /*ctrl*/
-#endif
-);
+ StringCtrl * /*ctrl*/);
extern Bool InitStringFeedbackClassDeviceStruct(
-#if NeedFunctionPrototypes
DeviceIntPtr /*device*/,
StringCtrlProcPtr /*controlProc*/,
int /*max_symbols*/,
int /*num_symbols_supported*/,
- KeySym* /*symbols*/
-#endif
-);
+ KeySym* /*symbols*/);
typedef void (*BellCtrlProcPtr)(
-#if NeedNestedPrototypes
DeviceIntPtr /*device*/,
- BellCtrl * /*ctrl*/
-#endif
-);
+ BellCtrl * /*ctrl*/);
extern Bool InitBellFeedbackClassDeviceStruct(
-#if NeedFunctionPrototypes
DeviceIntPtr /*device*/,
BellProcPtr /*bellProc*/,
- BellCtrlProcPtr /*controlProc*/
-#endif
-);
+ BellCtrlProcPtr /*controlProc*/);
typedef void (*LedCtrlProcPtr)(
-#if NeedNestedPrototypes
DeviceIntPtr /*device*/,
- LedCtrl * /*ctrl*/
-#endif
-);
+ LedCtrl * /*ctrl*/);
extern Bool InitLedFeedbackClassDeviceStruct(
-#if NeedFunctionPrototypes
DeviceIntPtr /*device*/,
- LedCtrlProcPtr /*controlProc*/
-#endif
-);
+ LedCtrlProcPtr /*controlProc*/);
typedef void (*IntegerCtrlProcPtr)(
-#if NeedNestedPrototypes
DeviceIntPtr /*device*/,
- IntegerCtrl * /*ctrl*/
-#endif
-);
+ IntegerCtrl * /*ctrl*/);
extern Bool InitIntegerFeedbackClassDeviceStruct(
-#if NeedFunctionPrototypes
DeviceIntPtr /*device*/,
- IntegerCtrlProcPtr /*controlProc*/
-#endif
-);
+ IntegerCtrlProcPtr /*controlProc*/);
extern Bool InitPointerDeviceStruct(
-#if NeedFunctionPrototypes
DevicePtr /*device*/,
CARD8* /*map*/,
int /*numButtons*/,
ValuatorMotionProcPtr /*motionProc*/,
PtrCtrlProcPtr /*controlProc*/,
- int /*numMotionEvents*/
-#endif
-);
+ int /*numMotionEvents*/);
extern Bool InitKeyboardDeviceStruct(
-#if NeedFunctionPrototypes
DevicePtr /*device*/,
KeySymsPtr /*pKeySyms*/,
CARD8 /*pModifiers*/[],
BellProcPtr /*bellProc*/,
- KbdCtrlProcPtr /*controlProc*/
-#endif
-);
+ KbdCtrlProcPtr /*controlProc*/);
extern void SendMappingNotify(
-#if NeedFunctionPrototypes
unsigned int /*request*/,
unsigned int /*firstKeyCode*/,
unsigned int /*count*/,
- ClientPtr /* client */
-#endif
-);
+ ClientPtr /* client */);
extern Bool BadDeviceMap(
-#if NeedFunctionPrototypes
BYTE* /*buff*/,
int /*length*/,
unsigned /*low*/,
unsigned /*high*/,
- XID* /*errval*/
-#endif
-);
+ XID* /*errval*/);
extern Bool AllModifierKeysAreUp(
-#if NeedFunctionPrototypes
DeviceIntPtr /*device*/,
CARD8* /*map1*/,
int /*per1*/,
CARD8* /*map2*/,
- int /*per2*/
-#endif
-);
+ int /*per2*/);
extern void NoteLedState(
-#if NeedFunctionPrototypes
DeviceIntPtr /*keybd*/,
int /*led*/,
- Bool /*on*/
-#endif
-);
+ Bool /*on*/);
extern void MaybeStopHint(
-#if NeedFunctionPrototypes
DeviceIntPtr /*device*/,
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
extern void ProcessPointerEvent(
-#if NeedFunctionPrototypes
xEventPtr /*xE*/,
DeviceIntPtr /*mouse*/,
- int /*count*/
-#endif
-);
+ int /*count*/);
extern void ProcessKeyboardEvent(
-#if NeedFunctionPrototypes
xEventPtr /*xE*/,
DeviceIntPtr /*keybd*/,
- int /*count*/
-#endif
-);
+ int /*count*/);
#ifdef XKB
extern void CoreProcessPointerEvent(
-#if NeedFunctionPrototypes
xEventPtr /*xE*/,
DeviceIntPtr /*mouse*/,
- int /*count*/
-#endif
-);
+ int /*count*/);
extern void CoreProcessKeyboardEvent(
-#if NeedFunctionPrototypes
xEventPtr /*xE*/,
DeviceIntPtr /*keybd*/,
- int /*count*/
-#endif
-);
+ int /*count*/);
#endif
extern Bool LegalModifier(
-#if NeedFunctionPrototypes
unsigned int /*key*/,
- DevicePtr /*pDev*/
-#endif
-);
+ DevicePtr /*pDev*/);
-extern void ProcessInputEvents(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void ProcessInputEvents(void);
extern void InitInput(
-#if NeedFunctionPrototypes
int /*argc*/,
- char ** /*argv*/
-#endif
-);
+ char ** /*argv*/);
#endif /* INPUT_H */
diff --git a/include/inputstr.h b/include/inputstr.h
index 045e6a2de..a8a834807 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/inputstr.h,v 1.5 2001/12/14 19:59:54 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/inputstr.h,v 1.6 2003/04/27 21:31:04 herrb Exp $ */
/************************************************************
Copyright 1987, 1998 The Open Group
@@ -265,18 +265,12 @@ typedef struct _DeviceIntRec {
Bool fromPassiveGrab;
GrabRec activeGrab;
void (*ActivateGrab) (
-#if NeedNestedPrototypes
DeviceIntPtr /*device*/,
GrabPtr /*grab*/,
TimeStamp /*time*/,
- Bool /*autoGrab*/
-#endif
-);
+ Bool /*autoGrab*/);
void (*DeactivateGrab)(
-#if NeedNestedPrototypes
- DeviceIntPtr /*device*/
-#endif
-);
+ DeviceIntPtr /*device*/);
KeyClassPtr key;
ValuatorClassPtr valuator;
ButtonClassPtr button;
diff --git a/include/misc.h b/include/misc.h
index e3761c5ba..ffa65b31e 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/misc.h,v 3.28 2001/12/14 19:59:55 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/misc.h,v 3.29 2003/04/27 21:31:04 herrb Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -238,30 +238,17 @@ typedef struct _xReq *xReqPtr;
((char *) &(dst))[1] = ((char *) &(src))[0]; }
extern void SwapLongs(
-#if NeedFunctionPrototypes
CARD32 *list,
- unsigned long count
-#endif
-);
+ unsigned long count);
extern void SwapShorts(
-#if NeedFunctionPrototypes
short *list,
- unsigned long count
-#endif
-);
+ unsigned long count);
-extern void MakePredeclaredAtoms(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void MakePredeclaredAtoms(void);
extern int Ones(
-#if NeedFunctionPrototypes
- unsigned long /*mask*/
-#endif
-);
+ unsigned long /*mask*/);
typedef struct _xPoint *DDXPointPtr;
typedef struct _Box *BoxPtr;
diff --git a/include/miscstruct.h b/include/miscstruct.h
index 7d6dec0e8..86f114792 100644
--- a/include/miscstruct.h
+++ b/include/miscstruct.h
@@ -45,13 +45,14 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/include/miscstruct.h,v 3.3 2001/12/14 19:59:55 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/miscstruct.h,v 3.5 2003/07/16 01:38:52 dawes Exp $ */
#ifndef MISCSTRUCT_H
#define MISCSTRUCT_H 1
#include "misc.h"
#include "X11/Xprotostr.h"
+#include "gc.h"
typedef xPoint DDXPointRec;
@@ -63,11 +64,17 @@ typedef union _DevUnion {
pointer ptr;
long val;
unsigned long uval;
- pointer (*fptr)(
-#if NeedFunctionPrototypes
- void
-#endif
- );
+ RegionPtr (*fptr)(
+ DrawablePtr /* pSrcDrawable */,
+ DrawablePtr /* pDstDrawable */,
+ GCPtr /* pGC */,
+ int /* srcx */,
+ int /* srcy */,
+ int /* width */,
+ int /* height */,
+ int /* dstx */,
+ int /* dsty */,
+ unsigned long /* bitPlane */);
} DevUnion;
#endif /* MISCSTRUCT_H */
diff --git a/include/opaque.h b/include/opaque.h
index 1834202ae..b5a55a60b 100644
--- a/include/opaque.h
+++ b/include/opaque.h
@@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/programs/Xserver/include/opaque.h,v 1.11 2002/10/08 23:55:22 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/opaque.h,v 1.14 2003/09/09 03:20:41 dawes Exp $ */
#ifndef OPAQUE_H
#define OPAQUE_H
@@ -74,9 +74,10 @@ extern int limitNoFile;
#endif
extern Bool permitOldBugs;
extern Bool defeatAccessControl;
-extern char* protNoListen;
+extern long maxBigRequestSize;
extern Bool blackRoot;
+extern Bool CoreDump;
#endif /* OPAQUE_H */
diff --git a/include/os.h b/include/os.h
index 6aa6e29e4..e9328c8fa 100644
--- a/include/os.h
+++ b/include/os.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/os.h,v 3.43 2002/12/24 17:42:59 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/include/os.h,v 3.54 2003/10/30 21:21:06 herrb Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -50,6 +50,7 @@ SOFTWARE.
#ifndef OS_H
#define OS_H
+
#include "misc.h"
#define ALLOCATE_LOCAL_FALLBACK(_size) Xalloc((unsigned long)(_size))
#define DEALLOCATE_LOCAL_FALLBACK(_ptr) Xfree((pointer)(_ptr))
@@ -71,7 +72,7 @@ SOFTWARE.
#define MAX_REQUEST_SIZE 65535
#endif
#ifndef MAX_BIG_REQUEST_SIZE
-#define MAX_BIG_REQUEST_SIZE 1048575
+#define MAX_BIG_REQUEST_SIZE 4194303
#endif
typedef pointer FID;
@@ -109,613 +110,259 @@ extern Bool OsDelayInitColors;
extern void (*OsVendorVErrorFProc)(const char *, va_list args);
extern int WaitForSomething(
-#if NeedFunctionPrototypes
int* /*pClientsReady*/
-#endif
);
#ifdef LBX
#define ReadRequestFromClient(client) ((client)->readRequest(client))
-extern int StandardReadRequestFromClient(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+extern int StandardReadRequestFromClient(ClientPtr /*client*/);
-extern int ClientConnectionNumber(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+extern int ClientConnectionNumber(ClientPtr /*client*/);
#else
-extern int ReadRequestFromClient(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+extern int ReadRequestFromClient(ClientPtr /*client*/);
#endif /* LBX */
extern Bool InsertFakeRequest(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/,
- char* /*data*/,
- int /*count*/
-#endif
-);
+ ClientPtr /*client*/,
+ char* /*data*/,
+ int /*count*/);
-extern void ResetCurrentRequest(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+extern void ResetCurrentRequest(ClientPtr /*client*/);
-extern void FlushAllOutput(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void FlushAllOutput(void);
-extern void FlushIfCriticalOutputPending(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void FlushIfCriticalOutputPending(void);
-extern void SetCriticalOutputPending(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void SetCriticalOutputPending(void);
-extern int WriteToClient(
-#if NeedFunctionPrototypes
- ClientPtr /*who*/,
- int /*count*/,
- char* /*buf*/
-#endif
-);
+extern int WriteToClient(ClientPtr /*who*/, int /*count*/, char* /*buf*/);
-extern void ResetOsBuffers(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void ResetOsBuffers(void);
-extern void InitConnectionLimits(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void InitConnectionLimits(void);
-extern void CreateWellKnownSockets(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void CreateWellKnownSockets(void);
-extern void ResetWellKnownSockets(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void ResetWellKnownSockets(void);
-extern void CloseWellKnownConnections(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void CloseWellKnownConnections(void);
-extern XID
-AuthorizationIDOfClient(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+extern XID AuthorizationIDOfClient(ClientPtr /*client*/);
extern char *ClientAuthorized(
-#if NeedFunctionPrototypes
ClientPtr /*client*/,
unsigned int /*proto_n*/,
char* /*auth_proto*/,
unsigned int /*string_n*/,
- char* /*auth_string*/
-#endif
-);
+ char* /*auth_string*/);
extern Bool EstablishNewConnections(
-#if NeedFunctionPrototypes
ClientPtr /*clientUnused*/,
- pointer /*closure*/
-#endif
-);
+ pointer /*closure*/);
-extern void CheckConnections(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void CheckConnections(void);
-extern void CloseDownConnection(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+extern void CloseDownConnection(ClientPtr /*client*/);
-extern void AddEnabledDevice(
-#if NeedFunctionPrototypes
- int /*fd*/
-#endif
-);
+extern void AddEnabledDevice(int /*fd*/);
-extern void RemoveEnabledDevice(
-#if NeedFunctionPrototypes
- int /*fd*/
-#endif
-);
+extern void RemoveEnabledDevice(int /*fd*/);
-extern void OnlyListenToOneClient(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+extern void OnlyListenToOneClient(ClientPtr /*client*/);
-extern void ListenToAllClients(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void ListenToAllClients(void);
-extern void IgnoreClient(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+extern void IgnoreClient(ClientPtr /*client*/);
-extern void AttendClient(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+extern void AttendClient(ClientPtr /*client*/);
-extern void MakeClientGrabImpervious(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+extern void MakeClientGrabImpervious(ClientPtr /*client*/);
-extern void MakeClientGrabPervious(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+extern void MakeClientGrabPervious(ClientPtr /*client*/);
#ifdef LBX
-extern void CloseDownFileDescriptor(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
-);
-#endif
-
-extern void AvailableClientInput(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
+extern void CloseDownFileDescriptor(ClientPtr /* client */);
#endif
-);
-extern void Error(
-#if NeedFunctionPrototypes
- char* /*str*/
-#endif
-);
+extern void AvailableClientInput(ClientPtr /* client */);
-extern CARD32 GetTimeInMillis(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern CARD32 GetTimeInMillis(void);
extern void AdjustWaitForDelay(
-#if NeedFunctionPrototypes
pointer /*waitTime*/,
- unsigned long /*newdelay*/
-#endif
-);
+ unsigned long /*newdelay*/);
typedef struct _OsTimerRec *OsTimerPtr;
typedef CARD32 (*OsTimerCallback)(
-#if NeedFunctionPrototypes
OsTimerPtr /* timer */,
CARD32 /* time */,
- pointer /* arg */
-#endif
-);
+ pointer /* arg */);
-extern void TimerInit(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void TimerInit(void);
-extern Bool TimerForce(
-#if NeedFunctionPrototypes
- OsTimerPtr /* timer */
-#endif
-);
+extern Bool TimerForce(OsTimerPtr /* timer */);
#define TimerAbsolute (1<<0)
#define TimerForceOld (1<<1)
extern OsTimerPtr TimerSet(
-#if NeedFunctionPrototypes
OsTimerPtr /* timer */,
int /* flags */,
CARD32 /* millis */,
OsTimerCallback /* func */,
- pointer /* arg */
-#endif
-);
-
-extern void TimerCheck(
-#if NeedFunctionPrototypes
- void
-#endif
-);
-
-extern void TimerCancel(
-#if NeedFunctionPrototypes
- OsTimerPtr /* pTimer */
-#endif
-);
+ pointer /* arg */);
-extern void TimerFree(
-#if NeedFunctionPrototypes
- OsTimerPtr /* pTimer */
-#endif
-);
+extern void TimerCheck(void);
+extern void TimerCancel(OsTimerPtr /* pTimer */);
+extern void TimerFree(OsTimerPtr /* pTimer */);
-extern SIGVAL AutoResetServer(
-#if NeedFunctionPrototypes
- int /*sig*/
-#endif
-);
+extern void SetScreenSaverTimer(void);
+extern void FreeScreenSaverTimer(void);
-extern SIGVAL GiveUp(
-#if NeedFunctionPrototypes
- int /*sig*/
+#ifdef DPMSExtension
+extern void SetDPMSTimers(void);
+extern void FreeDPMSTimers(void);
#endif
-);
-extern void UseMsg(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern SIGVAL AutoResetServer(int /*sig*/);
-extern void ProcessCommandLine(
-#if NeedFunctionPrototypes
- int /*argc*/,
- char* /*argv*/[]
-#endif
-);
+extern SIGVAL GiveUp(int /*sig*/);
-extern pointer Xalloc(
-#if NeedFunctionPrototypes
- unsigned long /*amount*/
-#endif
-);
+extern void UseMsg(void);
-extern pointer XNFalloc(
-#if NeedFunctionPrototypes
- unsigned long /*amount*/
-#endif
-);
+extern void ProcessCommandLine(int /*argc*/, char* /*argv*/[]);
-extern pointer Xcalloc(
-#if NeedFunctionPrototypes
- unsigned long /*amount*/
-#endif
-);
+extern int set_font_authorizations(
+ char ** /* authorizations */,
+ int * /*authlen */,
+ pointer /* client */);
-extern pointer XNFcalloc(
-#if NeedFunctionPrototypes
- unsigned long /*amount*/
+#ifndef _HAVE_XALLOC_DECLS
+#define _HAVE_XALLOC_DECLS
+extern pointer Xalloc(unsigned long /*amount*/);
+extern pointer Xcalloc(unsigned long /*amount*/);
+extern pointer Xrealloc(pointer /*ptr*/, unsigned long /*amount*/);
+extern void Xfree(pointer /*ptr*/);
#endif
-);
-extern pointer Xrealloc(
-#if NeedFunctionPrototypes
- pointer /*ptr*/,
- unsigned long /*amount*/
-#endif
-);
+extern pointer XNFalloc(unsigned long /*amount*/);
+extern pointer XNFcalloc(unsigned long /*amount*/);
+extern pointer XNFrealloc(pointer /*ptr*/, unsigned long /*amount*/);
-extern pointer XNFrealloc(
-#if NeedFunctionPrototypes
- pointer /*ptr*/,
- unsigned long /*amount*/
-#endif
-);
-
-extern void Xfree(
-#if NeedFunctionPrototypes
- pointer /*ptr*/
-#endif
-);
-
-extern void OsInitAllocator(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void OsInitAllocator(void);
extern char *Xstrdup(const char *s);
extern char *XNFstrdup(const char *s);
-typedef SIGVAL (*OsSigHandlerPtr)(
-#if NeedFunctionPrototypes
- int /* sig */
-#endif
-);
+typedef SIGVAL (*OsSigHandlerPtr)(int /* sig */);
-extern OsSigHandlerPtr OsSignal(
-#if NeedFunctionPrototypes
- int /* sig */,
- OsSigHandlerPtr /* handler */
-#endif
-);
+extern OsSigHandlerPtr OsSignal(int /* sig */, OsSigHandlerPtr /* handler */);
extern int auditTrailLevel;
-extern void AuditPrefix(
-#if NeedFunctionPrototypes
- const char *
-#endif
-);
-
-extern void AuditF(
-#if NeedVarargsPrototypes
- const char* /*f*/,
- ...
-#endif
-);
-
-extern void FatalError(
-#if NeedVarargsPrototypes
- const char* /*f*/,
- ...
-#endif
-)
-#if defined(__GNUC__) && \
- ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4)))
-__attribute((noreturn))
-#endif
-;
-
-extern void ErrorF(
-#if NeedVarargsPrototypes
- const char* /*f*/,
- ...
-#endif
-);
-
-#if NeedVarargsPrototypes
-extern void VErrorF(const char *f, va_list args);
-#endif
-
#ifdef SERVER_LOCK
-extern void LockServer(
-#if NeedFunctionPrototypes
- void
-#endif
-);
-
-extern void UnlockServer(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void LockServer(void);
+extern void UnlockServer(void);
#endif
extern int OsLookupColor(
-#if NeedFunctionPrototypes
int /*screen*/,
char * /*name*/,
unsigned /*len*/,
unsigned short * /*pred*/,
unsigned short * /*pgreen*/,
- unsigned short * /*pblue*/
-#endif
-);
+ unsigned short * /*pblue*/);
-extern void OsInit(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void OsInit(void);
-extern void OsCleanup(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void OsCleanup(Bool);
-extern void OsVendorFatalError(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void OsVendorFatalError(void);
-extern void OsVendorInit(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void OsVendorInit(void);
-extern int OsInitColors(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern int OsInitColors(void);
-void OsBlockSignals (
-#if NeedFunctionPrototypes
- void
-#endif
- );
+void OsBlockSignals (void);
-void OsReleaseSignals (
-#if NeedFunctionPrototypes
- void
-#endif
- );
+void OsReleaseSignals (void);
#if !defined(WIN32) && !defined(__UNIXOS2__)
extern int System(char *);
extern pointer Popen(char *, char *);
extern int Pclose(pointer);
+extern pointer Fopen(char *, char *);
+extern int Fclose(pointer);
#else
#define System(a) system(a)
#define Popen(a,b) popen(a,b)
#define Pclose(a) pclose(a)
+#define Fopen(a,b) fopen(a,b)
+#define Fclose(a) fclose(a)
#endif
extern void CheckUserParameters(int argc, char **argv, char **envp);
extern void CheckUserAuthorization(void);
extern int AddHost(
-#if NeedFunctionPrototypes
ClientPtr /*client*/,
int /*family*/,
unsigned /*length*/,
- pointer /*pAddr*/
-#endif
-);
+ pointer /*pAddr*/);
extern Bool ForEachHostInFamily (
-#if NeedFunctionPrototypes
int /*family*/,
Bool (* /*func*/ )(
-#if NeedNestedPrototypes
unsigned char * /* addr */,
short /* len */,
- pointer /* closure */
-#endif
- ),
- pointer /*closure*/
-#endif
-);
+ pointer /* closure */),
+ pointer /*closure*/);
extern int RemoveHost(
-#if NeedFunctionPrototypes
ClientPtr /*client*/,
int /*family*/,
unsigned /*length*/,
- pointer /*pAddr*/
-#endif
-);
+ pointer /*pAddr*/);
extern int GetHosts(
-#if NeedFunctionPrototypes
pointer * /*data*/,
int * /*pnHosts*/,
int * /*pLen*/,
- BOOL * /*pEnabled*/
-#endif
-);
+ BOOL * /*pEnabled*/);
typedef struct sockaddr * sockaddrPtr;
-extern int InvalidHost(
-#if NeedFunctionPrototypes
- sockaddrPtr /*saddr*/,
- int /*len*/
-#endif
-);
+extern int InvalidHost(sockaddrPtr /*saddr*/, int /*len*/);
-extern int LocalClient(
-#if NeedFunctionPrototypes
- ClientPtr /* client */
-#endif
-);
+extern int LocalClient(ClientPtr /* client */);
extern int LocalClientCred(ClientPtr, int *, int *);
-extern int ChangeAccessControl(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/,
- int /*fEnabled*/
-#endif
-);
+extern int ChangeAccessControl(ClientPtr /*client*/, int /*fEnabled*/);
-extern int GetAccessControl(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern int GetAccessControl(void);
-extern void AddLocalHosts(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void AddLocalHosts(void);
-extern void ResetHosts(
-#if NeedFunctionPrototypes
- char *display
-#endif
-);
+extern void ResetHosts(char *display);
-extern void EnableLocalHost(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void EnableLocalHost(void);
-extern void DisableLocalHost(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void DisableLocalHost(void);
-extern void AccessUsingXdmcp(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void AccessUsingXdmcp(void);
-extern void DefineSelf(
-#if NeedFunctionPrototypes
- int /*fd*/
-#endif
-);
+extern void DefineSelf(int /*fd*/);
-extern void AugmentSelf(
-#if NeedFunctionPrototypes
- pointer /*from*/,
- int /*len*/
-#endif
-);
+extern void AugmentSelf(pointer /*from*/, int /*len*/);
-extern void InitAuthorization(
-#if NeedFunctionPrototypes
- char * /*filename*/
-#endif
-);
+extern void InitAuthorization(char * /*filename*/);
-extern int LoadAuthorization(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+/* extern int LoadAuthorization(void); */
-extern void RegisterAuthorizations(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void RegisterAuthorizations(void);
extern XID AuthorizationToID (
unsigned short name_length,
@@ -731,21 +378,15 @@ extern int AuthorizationFromID (
char **datap);
extern XID CheckAuthorization(
-#if NeedFunctionPrototypes
unsigned int /*namelength*/,
char * /*name*/,
unsigned int /*datalength*/,
char * /*data*/,
ClientPtr /*client*/,
char ** /*reason*/
-#endif
);
-extern void ResetAuthorization(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void ResetAuthorization(void);
extern int RemoveAuthorization (
unsigned short name_length,
@@ -754,41 +395,24 @@ extern int RemoveAuthorization (
char *data);
extern int AddAuthorization(
-#if NeedFunctionPrototypes
unsigned int /*name_length*/,
char * /*name*/,
unsigned int /*data_length*/,
- char * /*data*/
-#endif
-);
+ char * /*data*/);
extern XID GenerateAuthorization(
-#if NeedFunctionPrototypes
unsigned int /* name_length */,
char * /* name */,
unsigned int /* data_length */,
char * /* data */,
unsigned int * /* data_length_return */,
- char ** /* data_return */
-#endif
-);
+ char ** /* data_return */);
#ifdef COMMANDLINE_CHALLENGED_OPERATING_SYSTEMS
-extern void ExpandCommandLine(
-#if NeedFunctionPrototypes
- int * /*pargc*/,
- char *** /*pargv*/
-#endif
-);
+extern void ExpandCommandLine(int * /*pargc*/, char *** /*pargv*/);
#endif
-extern int ddxProcessArgument(
-#if NeedFunctionPrototypes
- int /*argc*/,
- char * /*argv*/ [],
- int /*i*/
-#endif
-);
+extern int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/);
extern void ddxUseMsg(void);
@@ -796,17 +420,9 @@ extern void ddxUseMsg(void);
* idiom processing stuff
*/
-xReqPtr PeekNextRequest(
-#if NeedFunctionPrototypes
- xReqPtr req, ClientPtr client, Bool readmore
-#endif
-);
+extern xReqPtr PeekNextRequest(xReqPtr req, ClientPtr client, Bool readmore);
-void SkipRequests(
-#if NeedFunctionPrototypes
- xReqPtr req, ClientPtr client, int numskipped
-#endif
-);
+extern void SkipRequests(xReqPtr req, ClientPtr client, int numskipped);
/* int ReqLen(xReq *req, ClientPtr client)
* Given a pointer to a *complete* request, return its length in bytes.
@@ -856,4 +472,77 @@ extern void AbortDDX(void);
extern void ddxGiveUp(void);
extern int TimeSinceLastInputEvent(void);
+/* Logging. */
+typedef enum _LogParameter {
+ XLOG_FLUSH,
+ XLOG_SYNC,
+ XLOG_VERBOSITY,
+ XLOG_FILE_VERBOSITY
+} LogParameter;
+
+/* Flags for log messages. */
+typedef enum {
+ X_PROBED, /* Value was probed */
+ X_CONFIG, /* Value was given in the config file */
+ X_DEFAULT, /* Value is a default */
+ X_CMDLINE, /* Value was given on the command line */
+ X_NOTICE, /* Notice */
+ X_ERROR, /* Error message */
+ X_WARNING, /* Warning message */
+ X_INFO, /* Informational message */
+ X_NONE, /* No prefix */
+ X_NOT_IMPLEMENTED, /* Not implemented */
+ X_UNKNOWN = -1 /* unknown -- this must always be last */
+} MessageType;
+
+/* XXX Need to check which GCC versions have the format(printf) attribute. */
+#if defined(__GNUC__) && \
+ ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4)))
+#define _printf_attribute(a,b) __attribute((format(printf,a,b)))
+#else
+#define _printf_attribute(a,b) /**/
+#endif
+
+#ifdef printf
+#define printf_defined
+#undef printf
+#endif
+
+extern const char *LogInit(const char *fname, const char *backup);
+extern void LogClose(void);
+extern Bool LogSetParameter(LogParameter param, int value);
+extern void LogVWrite(int verb, const char *f, va_list args);
+extern void LogWrite(int verb, const char *f, ...) _printf_attribute(2,3);
+extern void LogVMessageVerb(MessageType type, int verb, const char *format,
+ va_list args);
+extern void LogMessageVerb(MessageType type, int verb, const char *format,
+ ...) _printf_attribute(3,4);
+extern void LogMessage(MessageType type, const char *format, ...)
+ _printf_attribute(2,3);
+extern void FreeAuditTimer(void);
+extern void AuditF(const char *f, ...) _printf_attribute(1,2);
+extern void VAuditF(const char *f, va_list args);
+extern void FatalError(const char *f, ...) _printf_attribute(1,2)
+#if defined(__GNUC__) && \
+ ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4)))
+__attribute((noreturn))
+#endif
+;
+
+extern void VErrorF(const char *f, va_list args);
+extern void ErrorF(const char *f, ...) _printf_attribute(1,2);
+extern void Error(char *str);
+extern void LogPrintMarkers(void);
+
+#if defined(NEED_SNPRINTF) && !defined(IN_MODULE)
+extern int snprintf(char *str, size_t size, const char *format, ...)
+ _printf_attribute(3,4);
+extern int vsnprintf(char *str, size_t size, const char *format, va_list ap);
+#endif
+
+#ifdef printf_defined
+#define printf xf86printf
+#undef printf_defined
+#endif
+
#endif /* OS_H */
diff --git a/include/pixmap.h b/include/pixmap.h
index 766091046..56bb675ae 100644
--- a/include/pixmap.h
+++ b/include/pixmap.h
@@ -45,6 +45,8 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/programs/Xserver/include/pixmap.h,v 1.4 2003/11/03 05:36:35 tsi Exp $ */
+
#ifndef PIXMAP_H
#define PIXMAP_H
@@ -84,40 +86,25 @@ typedef union _PixUnion {
((type == DRAWABLE_WINDOW) || (type == UNDRAWABLE_WINDOW))
extern PixmapPtr GetScratchPixmapHeader(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
int /*width*/,
int /*height*/,
int /*depth*/,
int /*bitsPerPixel*/,
int /*devKind*/,
- pointer /*pPixData*/
-#endif
-);
+ pointer /*pPixData*/);
extern void FreeScratchPixmapHeader(
-#if NeedFunctionPrototypes
- PixmapPtr /*pPixmap*/
-#endif
-);
+ PixmapPtr /*pPixmap*/);
extern Bool CreateScratchPixmapsForScreen(
-#if NeedFunctionPrototypes
- int /*scrnum*/
-#endif
-);
+ int /*scrnum*/);
extern void FreeScratchPixmapsForScreen(
-#if NeedFunctionPrototypes
- int /*scrnum*/
-#endif
-);
+ int /*scrnum*/);
extern PixmapPtr AllocatePixmap(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
- int /*pixDataSize*/
-#endif
-);
+ int /*pixDataSize*/);
#endif /* PIXMAP_H */
diff --git a/include/pixmapstr.h b/include/pixmapstr.h
index d84ae79fc..d5bc21273 100644
--- a/include/pixmapstr.h
+++ b/include/pixmapstr.h
@@ -45,12 +45,13 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/programs/Xserver/include/pixmapstr.h,v 1.3 2003/07/16 01:38:52 dawes Exp $ */
#ifndef PIXMAPSTRUCT_H
#define PIXMAPSTRUCT_H
#include "pixmap.h"
#include "screenint.h"
-#include "miscstruct.h"
+#include "regionstr.h"
typedef struct _Drawable {
unsigned char type; /* DRAWABLE_<type> */
diff --git a/include/property.h b/include/property.h
index c77b0735e..66103bc8e 100644
--- a/include/property.h
+++ b/include/property.h
@@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/include/property.h,v 1.3 2001/12/14 19:59:55 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/property.h,v 1.4 2003/04/27 21:31:04 herrb Exp $ */
#ifndef PROPERTY_H
#define PROPERTY_H
@@ -55,7 +55,6 @@ SOFTWARE.
typedef struct _Property *PropertyPtr;
extern int ChangeWindowProperty(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
Atom /*property*/,
Atom /*type*/,
@@ -63,21 +62,13 @@ extern int ChangeWindowProperty(
int /*mode*/,
unsigned long /*len*/,
pointer /*value*/,
- Bool /*sendevent*/
-#endif
-);
+ Bool /*sendevent*/);
extern int DeleteProperty(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
- Atom /*propName*/
-#endif
-);
+ Atom /*propName*/);
extern void DeleteAllWindowProperties(
-#if NeedFunctionPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
#endif /* PROPERTY_H */
diff --git a/include/regionstr.h b/include/regionstr.h
index 1ac3f2f07..b431d0b04 100644
--- a/include/regionstr.h
+++ b/include/regionstr.h
@@ -45,11 +45,13 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/include/regionstr.h,v 1.7 2001/12/14 19:59:56 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/regionstr.h,v 1.11 2003/11/10 18:22:45 tsi Exp $ */
#ifndef REGIONSTRUCT_H
#define REGIONSTRUCT_H
+typedef struct _Region RegionRec, *RegionPtr;
+
#include "miscstruct.h"
/* Return values from RectIn() */
@@ -70,10 +72,10 @@ typedef struct _RegData {
/* BoxRec rects[size]; in memory but not explicitly declared */
} RegDataRec, *RegDataPtr;
-typedef struct _Region {
+struct _Region {
BoxRec extents;
RegDataPtr data;
-} RegionRec, *RegionPtr;
+};
extern BoxRec miEmptyBox;
extern RegDataRec miEmptyData;
@@ -136,6 +138,9 @@ extern RegDataRec miBrokenData;
#define REGION_NOTEMPTY(_pScreen, _pReg) \
(*(_pScreen)->RegionNotEmpty)(_pReg)
+#define REGION_EQUAL(_pScreen, _pReg1, _pReg2) \
+ (*(_pScreen)->RegionEqual)(_pReg1, _pReg2)
+
#define REGION_BROKEN(_pScreen, _pReg) \
(*(_pScreen)->RegionBroken)(_pReg)
@@ -162,99 +167,103 @@ extern RegDataRec miBrokenData;
#else /* !NEED_SCREEN_REGIONS */
+/* Reference _pScreen macro argument and possibly check its type */
+#undef REGION_SCREEN
+#if defined(NDEBUG) && !defined(DEBUG) && !defined(BUILDDEBUG)
+
+# define REGION_SCREEN(_pScreen_) (void)(_pScreen_)
+
+#else
+
+extern volatile ScreenPtr currentRegionScreen;
+
+# define REGION_SCREEN(_pScreen_) (void)(currentRegionScreen = (_pScreen_))
+
+#endif
+
#define REGION_CREATE(_pScreen, _rect, _size) \
- miRegionCreate(_rect, _size)
+ (REGION_SCREEN(_pScreen), miRegionCreate(_rect, _size))
#define REGION_COPY(_pScreen, dst, src) \
- miRegionCopy(dst, src)
+ (REGION_SCREEN(_pScreen), miRegionCopy(dst, src))
#define REGION_DESTROY(_pScreen, _pReg) \
- miRegionDestroy(_pReg)
+ (REGION_SCREEN(_pScreen), miRegionDestroy(_pReg))
#define REGION_INTERSECT(_pScreen, newReg, reg1, reg2) \
- miIntersect(newReg, reg1, reg2)
+ (REGION_SCREEN(_pScreen), miIntersect(newReg, reg1, reg2))
#define REGION_UNION(_pScreen, newReg, reg1, reg2) \
- miUnion(newReg, reg1, reg2)
+ (REGION_SCREEN(_pScreen), miUnion(newReg, reg1, reg2))
#define REGION_SUBTRACT(_pScreen, newReg, reg1, reg2) \
- miSubtract(newReg, reg1, reg2)
+ (REGION_SCREEN(_pScreen), miSubtract(newReg, reg1, reg2))
#define REGION_INVERSE(_pScreen, newReg, reg1, invRect) \
- miInverse(newReg, reg1, invRect)
+ (REGION_SCREEN(_pScreen), miInverse(newReg, reg1, invRect))
#define REGION_TRANSLATE(_pScreen, _pReg, _x, _y) \
- miTranslateRegion(_pReg, _x, _y)
+ (REGION_SCREEN(_pScreen), miTranslateRegion(_pReg, _x, _y))
#define RECT_IN_REGION(_pScreen, _pReg, prect) \
- miRectIn(_pReg, prect)
+ (REGION_SCREEN(_pScreen), miRectIn(_pReg, prect))
#define POINT_IN_REGION(_pScreen, _pReg, _x, _y, prect) \
- miPointInRegion(_pReg, _x, _y, prect)
+ (REGION_SCREEN(_pScreen), miPointInRegion(_pReg, _x, _y, prect))
#define REGION_APPEND(_pScreen, dstrgn, rgn) \
- miRegionAppend(dstrgn, rgn)
+ (REGION_SCREEN(_pScreen), miRegionAppend(dstrgn, rgn))
#define REGION_VALIDATE(_pScreen, badreg, pOverlap) \
- miRegionValidate(badreg, pOverlap)
+ (REGION_SCREEN(_pScreen), miRegionValidate(badreg, pOverlap))
#define BITMAP_TO_REGION(_pScreen, pPix) \
(*(_pScreen)->BitmapToRegion)(pPix) /* no mi version?! */
#define RECTS_TO_REGION(_pScreen, nrects, prect, ctype) \
- miRectsToRegion(nrects, prect, ctype)
+ (REGION_SCREEN(_pScreen), miRectsToRegion(nrects, prect, ctype))
+
+#define REGION_EQUAL(_pScreen, _pReg1, _pReg2) \
+ (REGION_SCREEN(_pScreen), miRegionEqual(_pReg1, _pReg2))
#define REGION_BREAK(_pScreen, _pReg) \
- miRegionBreak(_pReg)
+ (REGION_SCREEN(_pScreen), miRegionBreak(_pReg))
#ifdef DONT_INLINE_REGION_OPS
#define REGION_INIT(_pScreen, _pReg, _rect, _size) \
- miRegionInit(_pReg, _rect, _size)
+ (REGION_SCREEN(_pScreen), miRegionInit(_pReg, _rect, _size))
#define REGION_UNINIT(_pScreen, _pReg) \
- miRegionUninit(_pReg)
+ (REGION_SCREEN(_pScreen), miRegionUninit(_pReg))
#define REGION_RESET(_pScreen, _pReg, _pBox) \
- miRegionReset(_pReg, _pBox)
+ (REGION_SCREEN(_pScreen), miRegionReset(_pReg, _pBox))
#define REGION_NOTEMPTY(_pScreen, _pReg) \
- miRegionNotEmpty(_pReg)
+ (REGION_SCREEN(_pScreen), miRegionNotEmpty(_pReg))
#define REGION_BROKEN(_pScreen, _pReg) \
- miRegionBroken(_pReg)
+ (REGION_SCREEN(_pScreen), miRegionBroken(_pReg))
#define REGION_EMPTY(_pScreen, _pReg) \
- miRegionEmpty(_pReg)
+ (REGION_SCREEN(_pScreen), miRegionEmpty(_pReg))
#define REGION_EXTENTS(_pScreen, _pReg) \
- miRegionExtents(_pReg)
+ (REGION_SCREEN(_pScreen), miRegionExtents(_pReg))
#else /* inline certain simple region ops for performance */
#define REGION_INIT(_pScreen, _pReg, _rect, _size) \
{ \
- if (_rect) \
- { \
+ REGION_SCREEN(_pScreen); \
(_pReg)->extents = *(_rect); \
(_pReg)->data = (RegDataPtr)NULL; \
- } \
- else \
- { \
- (_pReg)->extents = miEmptyBox; \
- if (((_size) > 1) && ((_pReg)->data = \
- (RegDataPtr)xalloc(REGION_SZOF(_size)))) \
- { \
- (_pReg)->data->size = (_size); \
- (_pReg)->data->numRects = 0; \
- } \
- else \
- (_pReg)->data = &miEmptyData; \
- } \
}
#define REGION_UNINIT(_pScreen, _pReg) \
{ \
+ REGION_SCREEN(_pScreen); \
if ((_pReg)->data && (_pReg)->data->size) { \
xfree((_pReg)->data); \
(_pReg)->data = NULL; \
@@ -263,16 +272,17 @@ extern RegDataRec miBrokenData;
#define REGION_RESET(_pScreen, _pReg, _pBox) \
{ \
+ REGION_SCREEN(_pScreen); \
(_pReg)->extents = *(_pBox); \
REGION_UNINIT(_pScreen, _pReg); \
(_pReg)->data = (RegDataPtr)NULL; \
}
#define REGION_NOTEMPTY(_pScreen, _pReg) \
- !REGION_NIL(_pReg)
+ (REGION_SCREEN(_pScreen), !REGION_NIL(_pReg))
#define REGION_BROKEN(_pScreen, _pReg) \
- REGION_NAR(_pReg)
+ (REGION_SCREEN(_pScreen), REGION_NAR(_pReg))
#define REGION_EMPTY(_pScreen, _pReg) \
{ \
@@ -283,155 +293,111 @@ extern RegDataRec miBrokenData;
}
#define REGION_EXTENTS(_pScreen, _pReg) \
- &(_pReg)->extents
+ (REGION_SCREEN(_pScreen), &(_pReg)->extents)
+
+#define REGION_NULL(_pScreen, _pReg) \
+{ \
+ REGION_SCREEN(_pScreen); \
+ (_pReg)->extents = miEmptyBox; \
+ (_pReg)->data = &miEmptyData; \
+}
#endif /* DONT_INLINE_REGION_OPS */
#endif /* NEED_SCREEN_REGIONS */
+#ifndef REGION_NULL
+#define REGION_NULL(_pScreen, _pReg) \
+ REGION_INIT(_pScreen, _pReg, NullBox, 1)
+#endif
+
/* moved from mi.h */
extern RegionPtr miRegionCreate(
-#if NeedFunctionPrototypes
BoxPtr /*rect*/,
- int /*size*/
-#endif
-);
+ int /*size*/);
extern void miRegionInit(
-#if NeedFunctionPrototypes
RegionPtr /*pReg*/,
BoxPtr /*rect*/,
- int /*size*/
-#endif
-);
+ int /*size*/);
extern void miRegionDestroy(
-#if NeedFunctionPrototypes
- RegionPtr /*pReg*/
-#endif
-);
+ RegionPtr /*pReg*/);
extern void miRegionUninit(
-#if NeedFunctionPrototypes
- RegionPtr /*pReg*/
-#endif
-);
+ RegionPtr /*pReg*/);
extern Bool miRegionCopy(
-#if NeedFunctionPrototypes
RegionPtr /*dst*/,
- RegionPtr /*src*/
-#endif
-);
+ RegionPtr /*src*/);
extern Bool miIntersect(
-#if NeedFunctionPrototypes
RegionPtr /*newReg*/,
RegionPtr /*reg1*/,
- RegionPtr /*reg2*/
-#endif
-);
+ RegionPtr /*reg2*/);
extern Bool miUnion(
-#if NeedFunctionPrototypes
RegionPtr /*newReg*/,
RegionPtr /*reg1*/,
- RegionPtr /*reg2*/
-#endif
-);
+ RegionPtr /*reg2*/);
extern Bool miRegionAppend(
-#if NeedFunctionPrototypes
RegionPtr /*dstrgn*/,
- RegionPtr /*rgn*/
-#endif
-);
+ RegionPtr /*rgn*/);
extern Bool miRegionValidate(
-#if NeedFunctionPrototypes
RegionPtr /*badreg*/,
- Bool * /*pOverlap*/
-#endif
-);
+ Bool * /*pOverlap*/);
extern RegionPtr miRectsToRegion(
-#if NeedFunctionPrototypes
int /*nrects*/,
xRectanglePtr /*prect*/,
- int /*ctype*/
-#endif
-);
+ int /*ctype*/);
extern Bool miSubtract(
-#if NeedFunctionPrototypes
RegionPtr /*regD*/,
RegionPtr /*regM*/,
- RegionPtr /*regS*/
-#endif
-);
+ RegionPtr /*regS*/);
extern Bool miInverse(
-#if NeedFunctionPrototypes
RegionPtr /*newReg*/,
RegionPtr /*reg1*/,
- BoxPtr /*invRect*/
-#endif
-);
+ BoxPtr /*invRect*/);
extern int miRectIn(
-#if NeedFunctionPrototypes
RegionPtr /*region*/,
- BoxPtr /*prect*/
-#endif
-);
+ BoxPtr /*prect*/);
extern void miTranslateRegion(
-#if NeedFunctionPrototypes
RegionPtr /*pReg*/,
int /*x*/,
- int /*y*/
-#endif
-);
+ int /*y*/);
extern void miRegionReset(
-#if NeedFunctionPrototypes
RegionPtr /*pReg*/,
- BoxPtr /*pBox*/
-#endif
-);
+ BoxPtr /*pBox*/);
extern Bool miRegionBreak(
-#if NeedFunctionPrototypes
- RegionPtr /*pReg*/
-#endif
-);
+ RegionPtr /*pReg*/);
extern Bool miPointInRegion(
-#if NeedFunctionPrototypes
RegionPtr /*pReg*/,
int /*x*/,
int /*y*/,
- BoxPtr /*box*/
-#endif
-);
+ BoxPtr /*box*/);
+
+extern Bool miRegionEqual(
+ RegionPtr /*pReg1*/,
+ RegionPtr /*pReg2*/);
extern Bool miRegionNotEmpty(
-#if NeedFunctionPrototypes
- RegionPtr /*pReg*/
-#endif
-);
+ RegionPtr /*pReg*/);
extern void miRegionEmpty(
-#if NeedFunctionPrototypes
- RegionPtr /*pReg*/
-#endif
-);
+ RegionPtr /*pReg*/);
extern BoxPtr miRegionExtents(
-#if NeedFunctionPrototypes
- RegionPtr /*pReg*/
-#endif
-);
+ RegionPtr /*pReg*/);
#endif /* REGIONSTRUCT_H */
diff --git a/include/resource.h b/include/resource.h
index 63d7ff25a..6517ab212 100644
--- a/include/resource.h
+++ b/include/resource.h
@@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/include/resource.h,v 1.11 2002/03/06 21:14:04 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/include/resource.h,v 1.12 2003/04/27 21:31:05 herrb Exp $ */
#ifndef RESOURCE_H
#define RESOURCE_H 1
@@ -123,60 +123,35 @@ typedef unsigned long RESTYPE;
#define BAD_RESOURCE 0xe0000000
typedef int (*DeleteType)(
-#if NeedNestedPrototypes
pointer /*value*/,
- XID /*id*/
-#endif
-);
+ XID /*id*/);
typedef void (*FindResType)(
-#if NeedNestedPrototypes
pointer /*value*/,
XID /*id*/,
- pointer /*cdata*/
-#endif
-);
+ pointer /*cdata*/);
typedef void (*FindAllRes)(
-#if NeedNestedPrototypes
pointer /*value*/,
XID /*id*/,
RESTYPE /*type*/,
- pointer /*cdata*/
-#endif
-);
+ pointer /*cdata*/);
typedef Bool (*FindComplexResType)(
-#if NeedNestedPrototypes
pointer /*value*/,
XID /*id*/,
- pointer /*cdata*/
-#endif
-);
+ pointer /*cdata*/);
extern RESTYPE CreateNewResourceType(
-#if NeedFunctionPrototypes
- DeleteType /*deleteFunc*/
-#endif
-);
+ DeleteType /*deleteFunc*/);
-extern RESTYPE CreateNewResourceClass(
-#if NeedFunctionPrototypes
-void
-#endif
-);
+extern RESTYPE CreateNewResourceClass(void);
extern Bool InitClientResources(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
extern XID FakeClientID(
-#if NeedFunctionPrototypes
- int /*client*/
-#endif
-);
+ int /*client*/);
/* Quartz support on Mac OS X uses the CarbonCore
framework whose AddResource function conflicts here. */
@@ -184,100 +159,60 @@ extern XID FakeClientID(
#define AddResource Darwin_X_AddResource
#endif
extern Bool AddResource(
-#if NeedFunctionPrototypes
XID /*id*/,
RESTYPE /*type*/,
- pointer /*value*/
-#endif
-);
+ pointer /*value*/);
extern void FreeResource(
-#if NeedFunctionPrototypes
XID /*id*/,
- RESTYPE /*skipDeleteFuncType*/
-#endif
-);
+ RESTYPE /*skipDeleteFuncType*/);
extern void FreeResourceByType(
-#if NeedFunctionPrototypes
XID /*id*/,
RESTYPE /*type*/,
- Bool /*skipFree*/
-#endif
-);
+ Bool /*skipFree*/);
extern Bool ChangeResourceValue(
-#if NeedFunctionPrototypes
XID /*id*/,
RESTYPE /*rtype*/,
- pointer /*value*/
-#endif
-);
+ pointer /*value*/);
extern void FindClientResourcesByType(
-#if NeedFunctionPrototypes
ClientPtr /*client*/,
RESTYPE /*type*/,
FindResType /*func*/,
- pointer /*cdata*/
-#endif
-);
+ pointer /*cdata*/);
extern void FindAllClientResources(
-#if NeedFunctionPrototypes
ClientPtr /*client*/,
FindAllRes /*func*/,
- pointer /*cdata*/
-#endif
-);
+ pointer /*cdata*/);
extern void FreeClientNeverRetainResources(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
extern void FreeClientResources(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
-extern void FreeAllResources(
-#if NeedFunctionPrototypes
-void
-#endif
-);
+extern void FreeAllResources(void);
extern Bool LegalNewID(
-#if NeedFunctionPrototypes
XID /*id*/,
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
extern pointer LookupIDByType(
-#if NeedFunctionPrototypes
XID /*id*/,
- RESTYPE /*rtype*/
-#endif
-);
+ RESTYPE /*rtype*/);
extern pointer LookupIDByClass(
-#if NeedFunctionPrototypes
XID /*id*/,
- RESTYPE /*classes*/
-#endif
-);
+ RESTYPE /*classes*/);
extern pointer LookupClientResourceComplex(
-#if NeedFunctionPrototypes
ClientPtr client,
RESTYPE type,
FindComplexResType func,
- pointer cdata
-#endif
-);
+ pointer cdata);
/* These are the access modes that can be passed in the last parameter
* to SecurityLookupIDByType/Class. The Security extension doesn't
@@ -295,22 +230,16 @@ extern pointer LookupClientResourceComplex(
#ifdef XCSECURITY
extern pointer SecurityLookupIDByType(
-#if NeedFunctionPrototypes
ClientPtr /*client*/,
XID /*id*/,
RESTYPE /*rtype*/,
- Mask /*access_mode*/
-#endif
-);
+ Mask /*access_mode*/);
extern pointer SecurityLookupIDByClass(
-#if NeedFunctionPrototypes
ClientPtr /*client*/,
XID /*id*/,
RESTYPE /*classes*/,
- Mask /*access_mode*/
-#endif
-);
+ Mask /*access_mode*/);
#else /* not XCSECURITY */
@@ -323,21 +252,15 @@ extern pointer SecurityLookupIDByClass(
#endif /* XCSECURITY */
extern void GetXIDRange(
-#if NeedFunctionPrototypes
int /*client*/,
Bool /*server*/,
XID * /*minp*/,
- XID * /*maxp*/
-#endif
-);
+ XID * /*maxp*/);
extern unsigned int GetXIDList(
-#if NeedFunctionPrototypes
ClientPtr /*client*/,
unsigned int /*count*/,
- XID * /*pids*/
-#endif
-);
+ XID * /*pids*/);
extern RESTYPE lastResourceType;
extern RESTYPE TypeMask;
diff --git a/include/screenint.h b/include/screenint.h
index c4ad2a627..988a7416c 100644
--- a/include/screenint.h
+++ b/include/screenint.h
@@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/include/screenint.h,v 1.5 2001/12/14 19:59:56 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/screenint.h,v 1.6 2003/04/27 21:31:05 herrb Exp $ */
#ifndef SCREENINT_H
#define SCREENINT_H
@@ -56,115 +56,57 @@ typedef struct _Visual *VisualPtr;
typedef struct _Depth *DepthPtr;
typedef struct _Screen *ScreenPtr;
-extern void ResetScreenPrivates(
-#if NeedFunctionPrototypes
- void
-#endif
-);
-
-extern int AllocateScreenPrivateIndex(
-#if NeedFunctionPrototypes
- void
-#endif
-);
-
-extern void ResetWindowPrivates(
-#if NeedFunctionPrototypes
- void
-#endif
-);
-
-extern int AllocateWindowPrivateIndex(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void ResetScreenPrivates(void);
+
+extern int AllocateScreenPrivateIndex(void);
+
+extern void ResetWindowPrivates(void);
+
+extern int AllocateWindowPrivateIndex(void);
extern Bool AllocateWindowPrivate(
-#if NeedFunctionPrototypes
ScreenPtr /* pScreen */,
int /* index */,
- unsigned /* amount */
-#endif
-);
-
-extern void ResetGCPrivates(
-#if NeedFunctionPrototypes
- void
-#endif
-);
-
-extern int AllocateGCPrivateIndex(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+ unsigned /* amount */);
+
+extern void ResetGCPrivates(void);
+
+extern int AllocateGCPrivateIndex(void);
extern Bool AllocateGCPrivate(
-#if NeedFunctionPrototypes
ScreenPtr /* pScreen */,
int /* index */,
- unsigned /* amount */
-#endif
-);
+ unsigned /* amount */);
extern int AddScreen(
-#if NeedFunctionPrototypes
Bool (* /*pfnInit*/)(
-#if NeedNestedPrototypes
int /*index*/,
ScreenPtr /*pScreen*/,
int /*argc*/,
- char ** /*argv*/
-#endif
- ),
+ char ** /*argv*/),
int /*argc*/,
- char** /*argv*/
-#endif
-);
+ char** /*argv*/);
#ifdef PIXPRIV
-extern void ResetPixmapPrivates(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void ResetPixmapPrivates(void);
-extern int AllocatePixmapPrivateIndex(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern int AllocatePixmapPrivateIndex(void);
extern Bool AllocatePixmapPrivate(
-#if NeedFunctionPrototypes
ScreenPtr /* pScreen */,
int /* index */,
- unsigned /* amount */
-#endif
-);
+ unsigned /* amount */);
#endif /* PIXPRIV */
-extern void ResetColormapPrivates(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void ResetColormapPrivates(void);
typedef struct _ColormapRec *ColormapPtr;
-typedef int (*InitCmapPrivFunc)(
-#if NeedNestedPrototypes
- ColormapPtr
-#endif
-);
+typedef int (*InitCmapPrivFunc)(ColormapPtr);
extern int AllocateColormapPrivateIndex(
-#if NeedFunctionPrototypes
- InitCmapPrivFunc /* initPrivFunc */
-#endif
-);
+ InitCmapPrivFunc /* initPrivFunc */);
#endif /* SCREENINT_H */
diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index cd4459c6e..0f1813c00 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -45,13 +45,13 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/include/scrnintstr.h,v 1.10 2001/12/14 19:59:56 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/scrnintstr.h,v 1.13 2003/07/16 01:38:53 dawes Exp $ */
#ifndef SCREENINTSTRUCT_H
#define SCREENINTSTRUCT_H
#include "screenint.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "bstore.h"
#include "colormap.h"
#include "cursor.h"
@@ -91,30 +91,20 @@ typedef struct _Depth {
*/
typedef Bool (* CloseScreenProcPtr)(
-#if NeedNestedPrototypes
int /*index*/,
- ScreenPtr /*pScreen*/
-#endif
-);
+ ScreenPtr /*pScreen*/);
typedef void (* QueryBestSizeProcPtr)(
-#if NeedNestedPrototypes
int /*class*/,
unsigned short * /*pwidth*/,
unsigned short * /*pheight*/,
- ScreenPtr /*pScreen*/
-#endif
-);
+ ScreenPtr /*pScreen*/);
typedef Bool (* SaveScreenProcPtr)(
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/,
- int /*on*/
-#endif
-);
+ int /*on*/);
typedef void (* GetImageProcPtr)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
int /*sx*/,
int /*sy*/,
@@ -122,179 +112,113 @@ typedef void (* GetImageProcPtr)(
int /*h*/,
unsigned int /*format*/,
unsigned long /*planeMask*/,
- char * /*pdstLine*/
-#endif
-);
+ char * /*pdstLine*/);
typedef void (* GetSpansProcPtr)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
int /*wMax*/,
DDXPointPtr /*ppt*/,
int* /*pwidth*/,
int /*nspans*/,
- char * /*pdstStart*/
-#endif
-);
+ char * /*pdstStart*/);
typedef void (* PointerNonInterestBoxProcPtr)(
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/,
- BoxPtr /*pBox*/
-#endif
-);
+ BoxPtr /*pBox*/);
typedef void (* SourceValidateProcPtr)(
-#if NeedNestedPrototypes
DrawablePtr /*pDrawable*/,
int /*x*/,
int /*y*/,
int /*width*/,
- int /*height*/
-#endif
-);
+ int /*height*/);
typedef Bool (* CreateWindowProcPtr)(
-#if NeedNestedPrototypes
- WindowPtr /*pWindow*/
-#endif
-);
+ WindowPtr /*pWindow*/);
typedef Bool (* DestroyWindowProcPtr)(
-#if NeedNestedPrototypes
- WindowPtr /*pWindow*/
-#endif
-);
+ WindowPtr /*pWindow*/);
typedef Bool (* PositionWindowProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWindow*/,
int /*x*/,
- int /*y*/
-#endif
-);
+ int /*y*/);
typedef Bool (* ChangeWindowAttributesProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWindow*/,
- unsigned long /*mask*/
-#endif
-);
+ unsigned long /*mask*/);
typedef Bool (* RealizeWindowProcPtr)(
-#if NeedNestedPrototypes
- WindowPtr /*pWindow*/
-#endif
-);
+ WindowPtr /*pWindow*/);
typedef Bool (* UnrealizeWindowProcPtr)(
-#if NeedNestedPrototypes
- WindowPtr /*pWindow*/
-#endif
-);
+ WindowPtr /*pWindow*/);
typedef void (* RestackWindowProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWindow*/,
- WindowPtr /*pOldNextSib*/
-#endif
-);
+ WindowPtr /*pOldNextSib*/);
typedef int (* ValidateTreeProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pParent*/,
WindowPtr /*pChild*/,
- VTKind /*kind*/
-#endif
-);
+ VTKind /*kind*/);
typedef void (* PostValidateTreeProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pParent*/,
WindowPtr /*pChild*/,
- VTKind /*kind*/
-#endif
-);
+ VTKind /*kind*/);
typedef void (* WindowExposuresProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWindow*/,
RegionPtr /*prgn*/,
- RegionPtr /*other_exposed*/
-#endif
-);
+ RegionPtr /*other_exposed*/);
typedef void (* PaintWindowProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWindow*/,
RegionPtr /*pRegion*/,
- int /*what*/
-#endif
-);
+ int /*what*/);
typedef PaintWindowProcPtr PaintWindowBackgroundProcPtr;
typedef PaintWindowProcPtr PaintWindowBorderProcPtr;
typedef void (* CopyWindowProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWindow*/,
DDXPointRec /*ptOldOrg*/,
- RegionPtr /*prgnSrc*/
-#endif
-);
+ RegionPtr /*prgnSrc*/);
typedef void (* ClearToBackgroundProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWindow*/,
int /*x*/,
int /*y*/,
int /*w*/,
int /*h*/,
- Bool /*generateExposures*/
-#endif
-);
+ Bool /*generateExposures*/);
typedef void (* ClipNotifyProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWindow*/,
int /*dx*/,
- int /*dy*/
-#endif
-);
+ int /*dy*/);
typedef PixmapPtr (* CreatePixmapProcPtr)(
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/,
int /*width*/,
int /*height*/,
- int /*depth*/
-#endif
-);
+ int /*depth*/);
typedef Bool (* DestroyPixmapProcPtr)(
-#if NeedNestedPrototypes
- PixmapPtr /*pPixmap*/
-#endif
-);
+ PixmapPtr /*pPixmap*/);
typedef void (* SaveDoomedAreasProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWindow*/,
RegionPtr /*prgnSave*/,
int /*xorg*/,
- int /*yorg*/
-#endif
-);
+ int /*yorg*/);
typedef RegionPtr (* RestoreAreasProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWindow*/,
- RegionPtr /*prgnRestore*/
-#endif
-);
+ RegionPtr /*prgnRestore*/);
typedef void (* ExposeCopyProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pSrc*/,
DrawablePtr /*pDst*/,
GCPtr /*pGC*/,
@@ -303,486 +227,301 @@ typedef void (* ExposeCopyProcPtr)(
int /*srcy*/,
int /*dstx*/,
int /*dsty*/,
- unsigned long /*plane*/
-#endif
-);
+ unsigned long /*plane*/);
typedef RegionPtr (* TranslateBackingStoreProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWindow*/,
int /*windx*/,
int /*windy*/,
RegionPtr /*oldClip*/,
int /*oldx*/,
- int /*oldy*/
-#endif
-);
+ int /*oldy*/);
typedef RegionPtr (* ClearBackingStoreProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWindow*/,
int /*x*/,
int /*y*/,
int /*w*/,
int /*h*/,
- Bool /*generateExposures*/
-#endif
-);
+ Bool /*generateExposures*/);
typedef void (* DrawGuaranteeProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWindow*/,
GCPtr /*pGC*/,
- int /*guarantee*/
-#endif
-);
+ int /*guarantee*/);
typedef Bool (* RealizeFontProcPtr)(
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/,
- FontPtr /*pFont*/
-#endif
-);
+ FontPtr /*pFont*/);
typedef Bool (* UnrealizeFontProcPtr)(
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/,
- FontPtr /*pFont*/
-#endif
-);
+ FontPtr /*pFont*/);
typedef void (* ConstrainCursorProcPtr)(
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/,
- BoxPtr /*pBox*/
-#endif
-);
+ BoxPtr /*pBox*/);
typedef void (* CursorLimitsProcPtr)(
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/,
CursorPtr /*pCursor*/,
BoxPtr /*pHotBox*/,
- BoxPtr /*pTopLeftBox*/
-#endif
-);
+ BoxPtr /*pTopLeftBox*/);
typedef Bool (* DisplayCursorProcPtr)(
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/,
- CursorPtr /*pCursor*/
-#endif
-);
+ CursorPtr /*pCursor*/);
typedef Bool (* RealizeCursorProcPtr)(
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/,
- CursorPtr /*pCursor*/
-#endif
-);
+ CursorPtr /*pCursor*/);
typedef Bool (* UnrealizeCursorProcPtr)(
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/,
- CursorPtr /*pCursor*/
-#endif
-);
+ CursorPtr /*pCursor*/);
typedef void (* RecolorCursorProcPtr)(
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/,
CursorPtr /*pCursor*/,
- Bool /*displayed*/
-#endif
-);
+ Bool /*displayed*/);
typedef Bool (* SetCursorPositionProcPtr)(
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/,
int /*x*/,
int /*y*/,
- Bool /*generateEvent*/
-#endif
-);
+ Bool /*generateEvent*/);
typedef Bool (* CreateGCProcPtr)(
-#if NeedNestedPrototypes
- GCPtr /*pGC*/
-#endif
-);
+ GCPtr /*pGC*/);
typedef Bool (* CreateColormapProcPtr)(
-#if NeedNestedPrototypes
- ColormapPtr /*pColormap*/
-#endif
-);
+ ColormapPtr /*pColormap*/);
typedef void (* DestroyColormapProcPtr)(
-#if NeedNestedPrototypes
- ColormapPtr /*pColormap*/
-#endif
-);
+ ColormapPtr /*pColormap*/);
typedef void (* InstallColormapProcPtr)(
-#if NeedNestedPrototypes
- ColormapPtr /*pColormap*/
-#endif
-);
+ ColormapPtr /*pColormap*/);
typedef void (* UninstallColormapProcPtr)(
-#if NeedNestedPrototypes
- ColormapPtr /*pColormap*/
-#endif
-);
+ ColormapPtr /*pColormap*/);
typedef int (* ListInstalledColormapsProcPtr) (
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/,
- XID* /*pmaps */
-#endif
-);
+ XID* /*pmaps */);
typedef void (* StoreColorsProcPtr)(
-#if NeedNestedPrototypes
ColormapPtr /*pColormap*/,
int /*ndef*/,
- xColorItem * /*pdef*/
-#endif
-);
+ xColorItem * /*pdef*/);
typedef void (* ResolveColorProcPtr)(
-#if NeedNestedPrototypes
unsigned short* /*pred*/,
unsigned short* /*pgreen*/,
unsigned short* /*pblue*/,
- VisualPtr /*pVisual*/
-#endif
-);
+ VisualPtr /*pVisual*/);
#ifdef NEED_SCREEN_REGIONS
typedef RegionPtr (* RegionCreateProcPtr)(
-#if NeedNestedPrototypes
BoxPtr /*rect*/,
- int /*size*/
-#endif
-);
+ int /*size*/);
typedef void (* RegionInitProcPtr)(
-#if NeedNestedPrototypes
RegionPtr /*pReg*/,
BoxPtr /*rect*/,
- int /*size*/
-#endif
-);
+ int /*size*/);
typedef Bool (* RegionCopyProcPtr)(
-#if NeedNestedPrototypes
RegionPtr /*dst*/,
- RegionPtr /*src*/
-#endif
-);
+ RegionPtr /*src*/);
typedef void (* RegionDestroyProcPtr)(
-#if NeedNestedPrototypes
- RegionPtr /*pReg*/
-#endif
-);
+ RegionPtr /*pReg*/);
typedef void (* RegionUninitProcPtr)(
-#if NeedNestedPrototypes
- RegionPtr /*pReg*/
-#endif
-);
+ RegionPtr /*pReg*/);
typedef Bool (* IntersectProcPtr)(
-#if NeedNestedPrototypes
RegionPtr /*newReg*/,
RegionPtr /*reg1*/,
- RegionPtr /*reg2*/
-#endif
-);
+ RegionPtr /*reg2*/);
typedef Bool (* UnionProcPtr)(
-#if NeedNestedPrototypes
RegionPtr /*newReg*/,
RegionPtr /*reg1*/,
- RegionPtr /*reg2*/
-#endif
-);
+ RegionPtr /*reg2*/);
typedef Bool (* SubtractProcPtr)(
-#if NeedNestedPrototypes
RegionPtr /*regD*/,
RegionPtr /*regM*/,
- RegionPtr /*regS*/
-#endif
-);
+ RegionPtr /*regS*/);
typedef Bool (* InverseProcPtr)(
-#if NeedNestedPrototypes
RegionPtr /*newReg*/,
RegionPtr /*reg1*/,
- BoxPtr /*invRect*/
-#endif
-);
+ BoxPtr /*invRect*/);
typedef void (* RegionResetProcPtr)(
-#if NeedNestedPrototypes
RegionPtr /*pReg*/,
- BoxPtr /*pBox*/
-#endif
-);
+ BoxPtr /*pBox*/);
typedef void (* TranslateRegionProcPtr)(
-#if NeedNestedPrototypes
RegionPtr /*pReg*/,
int /*x*/,
- int /*y*/
-#endif
-);
+ int /*y*/);
typedef int (* RectInProcPtr)(
-#if NeedNestedPrototypes
RegionPtr /*region*/,
- BoxPtr /*prect*/
-#endif
-);
+ BoxPtr /*prect*/);
typedef Bool (* PointInRegionProcPtr)(
-#if NeedNestedPrototypes
RegionPtr /*pReg*/,
int /*x*/,
int /*y*/,
- BoxPtr /*box*/
-#endif
-);
+ BoxPtr /*box*/);
typedef Bool (* RegionNotEmptyProcPtr)(
-#if NeedNestedPrototypes
- RegionPtr /*pReg*/
-#endif
-);
+ RegionPtr /*pReg*/);
+
+typedef Bool (* RegionEqualProcPtr)(
+ RegionPtr /*pReg1*/,
+ RegionPtr /*pReg2*/);
typedef Bool (* RegionBrokenProcPtr)(
-#if NeedNestedPrototypes
- RegionPtr /*pReg*/
-#endif
-);
+ RegionPtr /*pReg*/);
typedef Bool (* RegionBreakProcPtr)(
-#if NeedNestedPrototypes
- RegionPtr /*pReg*/
-#endif
-);
+ RegionPtr /*pReg*/);
typedef void (* RegionEmptyProcPtr)(
-#if NeedNestedPrototypes
- RegionPtr /*pReg*/
-#endif
-);
+ RegionPtr /*pReg*/);
typedef BoxPtr (* RegionExtentsProcPtr)(
-#if NeedNestedPrototypes
- RegionPtr /*pReg*/
-#endif
-);
+ RegionPtr /*pReg*/);
typedef Bool (* RegionAppendProcPtr)(
-#if NeedNestedPrototypes
RegionPtr /*dstrgn*/,
- RegionPtr /*rgn*/
-#endif
-);
+ RegionPtr /*rgn*/);
typedef Bool (* RegionValidateProcPtr)(
-#if NeedNestedPrototypes
RegionPtr /*badreg*/,
- Bool* /*pOverlap*/
-#endif
-);
+ Bool* /*pOverlap*/);
#endif /* NEED_SCREEN_REGIONS */
typedef RegionPtr (* BitmapToRegionProcPtr)(
-#if NeedNestedPrototypes
- PixmapPtr /*pPix*/
-#endif
-);
+ PixmapPtr /*pPix*/);
#ifdef NEED_SCREEN_REGIONS
typedef RegionPtr (* RectsToRegionProcPtr)(
-#if NeedNestedPrototypes
int /*nrects*/,
xRectangle* /*prect*/,
- int /*ctype*/
-#endif
-);
+ int /*ctype*/);
#endif /* NEED_SCREEN_REGIONS */
typedef void (* SendGraphicsExposeProcPtr)(
-#if NeedNestedPrototypes
ClientPtr /*client*/,
RegionPtr /*pRgn*/,
XID /*drawable*/,
int /*major*/,
- int /*minor*/
-#endif
-);
+ int /*minor*/);
typedef void (* ScreenBlockHandlerProcPtr)(
-#if NeedNestedPrototypes
int /*screenNum*/,
pointer /*blockData*/,
pointer /*pTimeout*/,
- pointer /*pReadmask*/
-#endif
-);
+ pointer /*pReadmask*/);
typedef void (* ScreenWakeupHandlerProcPtr)(
-#if NeedNestedPrototypes
int /*screenNum*/,
pointer /*wakeupData*/,
unsigned long /*result*/,
- pointer /*pReadMask*/
-#endif
-);
+ pointer /*pReadMask*/);
typedef Bool (* CreateScreenResourcesProcPtr)(
-#if NeedNestedPrototypes
- ScreenPtr /*pScreen*/
-#endif
-);
+ ScreenPtr /*pScreen*/);
typedef Bool (* ModifyPixmapHeaderProcPtr)(
-#if NeedNestedPrototypes
PixmapPtr /*pPixmap*/,
int /*width*/,
int /*height*/,
int /*depth*/,
int /*bitsPerPixel*/,
int /*devKind*/,
- pointer /*pPixData*/
-#endif
-);
+ pointer /*pPixData*/);
typedef PixmapPtr (* GetWindowPixmapProcPtr)(
-#if NeedNestedPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
typedef void (* SetWindowPixmapProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWin*/,
- PixmapPtr /*pPix*/
-#endif
-);
+ PixmapPtr /*pPix*/);
typedef PixmapPtr (* GetScreenPixmapProcPtr)(
-#if NeedNestedPrototypes
- ScreenPtr /*pScreen*/
-#endif
-);
+ ScreenPtr /*pScreen*/);
typedef void (* SetScreenPixmapProcPtr)(
-#if NeedNestedPrototypes
- PixmapPtr /*pPix*/
-#endif
-);
+ PixmapPtr /*pPix*/);
typedef void (* MarkWindowProcPtr)(
-#if NeedNestedPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
typedef Bool (* MarkOverlappedWindowsProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*parent*/,
WindowPtr /*firstChild*/,
- WindowPtr * /*pLayerWin*/
-#endif
-);
+ WindowPtr * /*pLayerWin*/);
typedef Bool (* ChangeSaveUnderProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pLayerWin*/,
- WindowPtr /*firstChild*/
-#endif
-);
+ WindowPtr /*firstChild*/);
typedef void (* PostChangeSaveUnderProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pLayerWin*/,
- WindowPtr /*firstChild*/
-#endif
-);
+ WindowPtr /*firstChild*/);
typedef void (* MoveWindowProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWin*/,
int /*x*/,
int /*y*/,
WindowPtr /*pSib*/,
- VTKind /*kind*/
-#endif
-);
+ VTKind /*kind*/);
typedef void (* ResizeWindowProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWin*/,
int /*x*/,
int /*y*/,
unsigned int /*w*/,
unsigned int /*h*/,
WindowPtr /*pSib*/
-#endif
);
typedef WindowPtr (* GetLayerWindowProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWin*/
-#endif
);
typedef void (* HandleExposuresProcPtr)(
-#if NeedNestedPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
typedef void (* ReparentWindowProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWin*/,
- WindowPtr /*pPriorParent*/
-#endif
-);
+ WindowPtr /*pPriorParent*/);
#ifdef SHAPE
typedef void (* SetShapeProcPtr)(
-#if NeedFunctionPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
#endif /* SHAPE */
typedef void (* ChangeBorderWidthProcPtr)(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
- unsigned int /*width*/
-#endif
-);
+ unsigned int /*width*/);
typedef void (* MarkUnrealizedWindowProcPtr)(
-#if NeedFunctionPrototypes
WindowPtr /*pChild*/,
WindowPtr /*pWin*/,
- Bool /*fromConfigure*/
-#endif
-);
+ Bool /*fromConfigure*/);
typedef struct _Screen {
int myNum; /* index of this instance in Screens[] */
@@ -910,6 +649,7 @@ typedef struct _Screen {
RectInProcPtr RectIn;
PointInRegionProcPtr PointInRegion;
RegionNotEmptyProcPtr RegionNotEmpty;
+ RegionEqualProcPtr RegionEqual;
RegionBrokenProcPtr RegionBroken;
RegionBreakProcPtr RegionBreak;
RegionEmptyProcPtr RegionEmpty;
@@ -986,11 +726,8 @@ typedef struct _ScreenInfo {
extern ScreenInfo screenInfo;
extern void InitOutput(
-#if NeedFunctionPrototypes
ScreenInfo * /*pScreenInfo*/,
int /*argc*/,
- char ** /*argv*/
-#endif
-);
+ char ** /*argv*/);
#endif /* SCREENINTSTRUCT_H */
diff --git a/include/servermd.h b/include/servermd.h
index 9c413b0cb..654e1411b 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/servermd.h,v 3.53 2002/05/31 18:46:04 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/servermd.h,v 3.57 2003/11/03 05:11:59 tsi Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -153,7 +153,7 @@ SOFTWARE.
#endif /* __arm32__ */
-#if defined (__hppa__)
+#if defined (hpux)
#define IMAGE_BYTE_ORDER MSBFirst
#define BITMAP_BIT_ORDER MSBFirst
@@ -165,7 +165,7 @@ SOFTWARE.
#define LARGE_INSTRUCTION_CACHE
#define PLENTIFUL_REGISTERS
-#endif /* __hppa__ */
+#endif /* hpux */
#if defined(__powerpc__)
@@ -272,20 +272,6 @@ SOFTWARE.
#endif /* ibm */
-#ifdef hpux
-
-#define IMAGE_BYTE_ORDER MSBFirst /* Values for the HP only */
-#define BITMAP_BIT_ORDER MSBFirst
-#define GLYPHPADBYTES 2 /* to match product server */
-#define GETLEFTBITS_ALIGNMENT 4 /* PA forces longs to 4 */
- /* byte boundries */
-#define AVOID_MEMORY_READ
-#define FAST_CONSTANT_OFFSET_MODE
-#define LARGE_INSTRUCTION_CACHE
-#define PLENTIFUL_REGISTERS
-
-#endif /* hpux */
-
#if defined (M4310) || defined(M4315) || defined(M4317) || defined(M4319) || defined(M4330)
#define IMAGE_BYTE_ORDER MSBFirst /* Values for Pegasus only */
@@ -403,7 +389,7 @@ SOFTWARE.
#endif /* ia64 */
-#if defined(__x86_64__) || defined(x86_64)
+#if defined(__AMD64__) || defined(AMD64)
# define IMAGE_BYTE_ORDER LSBFirst
# if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO)
@@ -422,7 +408,7 @@ SOFTWARE.
# define FAST_CONSTANT_OFFSET_MODE
/* ???? */
# define FAST_UNALIGNED_READS
-#endif /* x86_64 */
+#endif /* AMD64 */
#ifdef stellar
@@ -509,19 +495,8 @@ SOFTWARE.
#define IMAGE_BYTE_ORDER MSBFirst
#define BITMAP_BIT_ORDER MSBFirst
-
-#if (_MIPS_SZLONG == 64)
-
-# define GLYPHPADBYTES 4
-# define GETLEFTBITS_ALIGNMENT 1
-
-#else
-
-#define GLYPHPADBYTES 2
-#define GETLEFTBITS_ALIGNMENT 4
-
-#endif
-
+#define GLYPHPADBYTES 4
+#define GETLEFTBITS_ALIGNMENT 1
#define AVOID_MEMORY_READ
#define FAST_CONSTANT_OFFSET_MODE
#define LARGE_INSTRUCTION_CACHE
diff --git a/include/site.h b/include/site.h
index 36a05eb73..1c272fc3f 100644
--- a/include/site.h
+++ b/include/site.h
@@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/include/site.h,v 1.8 2001/12/19 21:37:35 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/site.h,v 1.9 2003/09/09 03:20:41 dawes Exp $ */
#ifndef SITE_H
#define SITE_H
@@ -128,4 +128,12 @@ SOFTWARE.
#define DEFAULT_ACCESS_CONTROL TRUE
#endif
+/* Default logging parameters. */
+#ifndef DEFAULT_LOG_VERBOSITY
+#define DEFAULT_LOG_VERBOSITY 0
+#endif
+#ifndef DEFAULT_LOG_FILE_VERBOSITY
+#define DEFAULT_LOG_FILE_VERBOSITY 3
+#endif
+
#endif /* SITE_H */
diff --git a/include/swaprep.h b/include/swaprep.h
index a8453db60..b6671e7d9 100644
--- a/include/swaprep.h
+++ b/include/swaprep.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/swaprep.h,v 3.0 1996/04/15 11:34:34 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/swaprep.h,v 3.1 2003/04/27 21:31:05 herrb Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -27,488 +27,268 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SWAPREP_H
#define SWAPREP_H 1
-void
-Swap32Write(
-#if NeedFunctionPrototypes
+extern void Swap32Write(
ClientPtr /* pClient */,
int /* size */,
- CARD32 * /* pbuf */
-#endif
-);
+ CARD32 * /* pbuf */);
-void
-CopySwap32Write(
-#if NeedFunctionPrototypes
+extern void CopySwap32Write(
ClientPtr /* pClient */,
int /* size */,
- CARD32 * /* pbuf */
-#endif
-);
+ CARD32 * /* pbuf */);
-void
-CopySwap16Write(
-#if NeedFunctionPrototypes
+extern void CopySwap16Write(
ClientPtr /* pClient */,
int /* size */,
- short * /* pbuf */
-#endif
-);
+ short * /* pbuf */);
-void
-SGenericReply(
-#if NeedFunctionPrototypes
+extern void SGenericReply(
ClientPtr /* pClient */,
int /* size */,
- xGenericReply * /* pRep */
-#endif
-);
+ xGenericReply * /* pRep */);
-void
-SGetWindowAttributesReply(
-#if NeedFunctionPrototypes
+extern void SGetWindowAttributesReply(
ClientPtr /* pClient */,
int /* size */,
- xGetWindowAttributesReply * /* pRep */
-#endif
-);
+ xGetWindowAttributesReply * /* pRep */);
-void
-SGetGeometryReply(
-#if NeedFunctionPrototypes
+extern void SGetGeometryReply(
ClientPtr /* pClient */,
int /* size */,
- xGetGeometryReply * /* pRep */
-#endif
-);
+ xGetGeometryReply * /* pRep */);
-void
-SQueryTreeReply(
-#if NeedFunctionPrototypes
+extern void SQueryTreeReply(
ClientPtr /* pClient */,
int /* size */,
- xQueryTreeReply * /* pRep */
-#endif
-);
+ xQueryTreeReply * /* pRep */);
-void
-SInternAtomReply(
-#if NeedFunctionPrototypes
+extern void SInternAtomReply(
ClientPtr /* pClient */,
int /* size */,
- xInternAtomReply * /* pRep */
-#endif
-);
+ xInternAtomReply * /* pRep */);
-void
-SGetAtomNameReply(
-#if NeedFunctionPrototypes
+extern void SGetAtomNameReply(
ClientPtr /* pClient */,
int /* size */,
- xGetAtomNameReply * /* pRep */
-#endif
-);
+ xGetAtomNameReply * /* pRep */);
-void
-SGetPropertyReply(
-#if NeedFunctionPrototypes
+extern void SGetPropertyReply(
ClientPtr /* pClient */,
int /* size */,
- xGetPropertyReply * /* pRep */
-#endif
-);
+ xGetPropertyReply * /* pRep */);
-void
-SListPropertiesReply(
-#if NeedFunctionPrototypes
+extern void SListPropertiesReply(
ClientPtr /* pClient */,
int /* size */,
- xListPropertiesReply * /* pRep */
-#endif
-);
+ xListPropertiesReply * /* pRep */);
-void
-SGetSelectionOwnerReply(
-#if NeedFunctionPrototypes
+extern void SGetSelectionOwnerReply(
ClientPtr /* pClient */,
int /* size */,
- xGetSelectionOwnerReply * /* pRep */
-#endif
-);
+ xGetSelectionOwnerReply * /* pRep */);
-void
-SQueryPointerReply(
-#if NeedFunctionPrototypes
+extern void SQueryPointerReply(
ClientPtr /* pClient */,
int /* size */,
- xQueryPointerReply * /* pRep */
-#endif
-);
+ xQueryPointerReply * /* pRep */);
-void
-SwapTimecoord(
-#if NeedFunctionPrototypes
- xTimecoord * /* pCoord */
-#endif
-);
+extern void SwapTimecoord(
+ xTimecoord * /* pCoord */);
-void
-SwapTimeCoordWrite(
-#if NeedFunctionPrototypes
+extern void SwapTimeCoordWrite(
ClientPtr /* pClient */,
int /* size */,
- xTimecoord * /* pRep */
-#endif
-);
+ xTimecoord * /* pRep */);
-void
-SGetMotionEventsReply(
-#if NeedFunctionPrototypes
+extern void SGetMotionEventsReply(
ClientPtr /* pClient */,
int /* size */,
- xGetMotionEventsReply * /* pRep */
-#endif
-);
+ xGetMotionEventsReply * /* pRep */);
-void
-STranslateCoordsReply(
-#if NeedFunctionPrototypes
+extern void STranslateCoordsReply(
ClientPtr /* pClient */,
int /* size */,
- xTranslateCoordsReply * /* pRep */
-#endif
-);
+ xTranslateCoordsReply * /* pRep */);
-void
-SGetInputFocusReply(
-#if NeedFunctionPrototypes
+extern void SGetInputFocusReply(
ClientPtr /* pClient */,
int /* size */,
- xGetInputFocusReply * /* pRep */
-#endif
-);
+ xGetInputFocusReply * /* pRep */);
-void
-SQueryKeymapReply(
-#if NeedFunctionPrototypes
+extern void SQueryKeymapReply(
ClientPtr /* pClient */,
int /* size */,
- xQueryKeymapReply * /* pRep */
-#endif
-);
+ xQueryKeymapReply * /* pRep */);
#ifdef LBX
-void
-SwapCharInfo(
-#if NeedFunctionPrototypes
- xCharInfo * /* pInfo */
-#endif
-);
+extern void SwapCharInfo(
+ xCharInfo * /* pInfo */);
#endif
#ifdef LBX
-void
-SwapFont(
-#if NeedFunctionPrototypes
+extern void SwapFont(
xQueryFontReply * /* pr */,
- Bool /* hasGlyphs */
-#endif
-);
+ Bool /* hasGlyphs */);
#endif
-void
-SQueryFontReply(
-#if NeedFunctionPrototypes
+extern void SQueryFontReply(
ClientPtr /* pClient */,
int /* size */,
- xQueryFontReply * /* pRep */
-#endif
-);
+ xQueryFontReply * /* pRep */);
-void
-SQueryTextExtentsReply(
-#if NeedFunctionPrototypes
+extern void SQueryTextExtentsReply(
ClientPtr /* pClient */,
int /* size */,
- xQueryTextExtentsReply * /* pRep */
-#endif
-);
+ xQueryTextExtentsReply * /* pRep */);
-void
-SListFontsReply(
-#if NeedFunctionPrototypes
+extern void SListFontsReply(
ClientPtr /* pClient */,
int /* size */,
- xListFontsReply * /* pRep */
-#endif
-);
+ xListFontsReply * /* pRep */);
-void
-SListFontsWithInfoReply(
-#if NeedFunctionPrototypes
+extern void SListFontsWithInfoReply(
ClientPtr /* pClient */,
int /* size */,
- xListFontsWithInfoReply * /* pRep */
-#endif
-);
+ xListFontsWithInfoReply * /* pRep */);
-void
-SGetFontPathReply(
-#if NeedFunctionPrototypes
+extern void SGetFontPathReply(
ClientPtr /* pClient */,
int /* size */,
- xGetFontPathReply * /* pRep */
-#endif
-);
+ xGetFontPathReply * /* pRep */);
-void
-SGetImageReply(
-#if NeedFunctionPrototypes
+extern void SGetImageReply(
ClientPtr /* pClient */,
int /* size */,
- xGetImageReply * /* pRep */
-#endif
-);
+ xGetImageReply * /* pRep */);
-void
-SListInstalledColormapsReply(
-#if NeedFunctionPrototypes
+extern void SListInstalledColormapsReply(
ClientPtr /* pClient */,
int /* size */,
- xListInstalledColormapsReply * /* pRep */
-#endif
-);
+ xListInstalledColormapsReply * /* pRep */);
-void
-SAllocColorReply(
-#if NeedFunctionPrototypes
+extern void SAllocColorReply(
ClientPtr /* pClient */,
int /* size */,
- xAllocColorReply * /* pRep */
-#endif
-);
+ xAllocColorReply * /* pRep */);
-void
-SAllocNamedColorReply(
-#if NeedFunctionPrototypes
+extern void SAllocNamedColorReply(
ClientPtr /* pClient */,
int /* size */,
- xAllocNamedColorReply * /* pRep */
-#endif
-);
+ xAllocNamedColorReply * /* pRep */);
-void
-SAllocColorCellsReply(
-#if NeedFunctionPrototypes
+extern void SAllocColorCellsReply(
ClientPtr /* pClient */,
int /* size */,
- xAllocColorCellsReply * /* pRep */
-#endif
-);
+ xAllocColorCellsReply * /* pRep */);
-void
-SAllocColorPlanesReply(
-#if NeedFunctionPrototypes
+extern void SAllocColorPlanesReply(
ClientPtr /* pClient */,
int /* size */,
- xAllocColorPlanesReply * /* pRep */
-#endif
-);
+ xAllocColorPlanesReply * /* pRep */);
-void
-SwapRGB(
-#if NeedFunctionPrototypes
- xrgb * /* prgb */
-#endif
-);
+extern void SwapRGB(
+ xrgb * /* prgb */);
-void
-SQColorsExtend(
-#if NeedFunctionPrototypes
+extern void SQColorsExtend(
ClientPtr /* pClient */,
int /* size */,
- xrgb * /* prgb */
-#endif
-);
+ xrgb * /* prgb */);
-void
-SQueryColorsReply(
-#if NeedFunctionPrototypes
+extern void SQueryColorsReply(
ClientPtr /* pClient */,
int /* size */,
- xQueryColorsReply * /* pRep */
-#endif
-);
+ xQueryColorsReply * /* pRep */);
-void
-SLookupColorReply(
-#if NeedFunctionPrototypes
+extern void SLookupColorReply(
ClientPtr /* pClient */,
int /* size */,
- xLookupColorReply * /* pRep */
-#endif
-);
+ xLookupColorReply * /* pRep */);
-void
-SQueryBestSizeReply(
-#if NeedFunctionPrototypes
+extern void SQueryBestSizeReply(
ClientPtr /* pClient */,
int /* size */,
- xQueryBestSizeReply * /* pRep */
-#endif
-);
+ xQueryBestSizeReply * /* pRep */);
-void
-SListExtensionsReply(
-#if NeedFunctionPrototypes
+extern void SListExtensionsReply(
ClientPtr /* pClient */,
int /* size */,
- xListExtensionsReply * /* pRep */
-#endif
-);
+ xListExtensionsReply * /* pRep */);
-void
-SGetKeyboardMappingReply(
-#if NeedFunctionPrototypes
+extern void SGetKeyboardMappingReply(
ClientPtr /* pClient */,
int /* size */,
- xGetKeyboardMappingReply * /* pRep */
-#endif
-);
+ xGetKeyboardMappingReply * /* pRep */);
-void
-SGetPointerMappingReply(
-#if NeedFunctionPrototypes
+extern void SGetPointerMappingReply(
ClientPtr /* pClient */,
int /* size */,
- xGetPointerMappingReply * /* pRep */
-#endif
-);
+ xGetPointerMappingReply * /* pRep */);
-void
-SGetModifierMappingReply(
-#if NeedFunctionPrototypes
+extern void SGetModifierMappingReply(
ClientPtr /* pClient */,
int /* size */,
- xGetModifierMappingReply * /* pRep */
-#endif
-);
+ xGetModifierMappingReply * /* pRep */);
-void
-SGetKeyboardControlReply(
-#if NeedFunctionPrototypes
+extern void SGetKeyboardControlReply(
ClientPtr /* pClient */,
int /* size */,
- xGetKeyboardControlReply * /* pRep */
-#endif
-);
+ xGetKeyboardControlReply * /* pRep */);
-void
-SGetPointerControlReply(
-#if NeedFunctionPrototypes
+extern void SGetPointerControlReply(
ClientPtr /* pClient */,
int /* size */,
- xGetPointerControlReply * /* pRep */
-#endif
-);
+ xGetPointerControlReply * /* pRep */);
-void
-SGetScreenSaverReply(
-#if NeedFunctionPrototypes
+extern void SGetScreenSaverReply(
ClientPtr /* pClient */,
int /* size */,
- xGetScreenSaverReply * /* pRep */
-#endif
-);
+ xGetScreenSaverReply * /* pRep */);
-void
-SLHostsExtend(
-#if NeedFunctionPrototypes
+extern void SLHostsExtend(
ClientPtr /* pClient */,
int /* size */,
- char * /* buf */
-#endif
-);
+ char * /* buf */);
-void
-SListHostsReply(
-#if NeedFunctionPrototypes
+extern void SListHostsReply(
ClientPtr /* pClient */,
int /* size */,
- xListHostsReply * /* pRep */
-#endif
-);
+ xListHostsReply * /* pRep */);
-void
-SErrorEvent(
-#if NeedFunctionPrototypes
+extern void SErrorEvent(
xError * /* from */,
- xError * /* to */
-#endif
-);
+ xError * /* to */);
-void
-SwapConnSetupInfo(
-#if NeedFunctionPrototypes
+extern void SwapConnSetupInfo(
char * /* pInfo */,
- char * /* pInfoTBase */
-#endif
-);
+ char * /* pInfoTBase */);
-void
-WriteSConnectionInfo(
-#if NeedFunctionPrototypes
+extern void WriteSConnectionInfo(
ClientPtr /* pClient */,
unsigned long /* size */,
- char * /* pInfo */
-#endif
-);
+ char * /* pInfo */);
-void
-SwapConnSetup(
-#if NeedFunctionPrototypes
+extern void SwapConnSetup(
xConnSetup * /* pConnSetup */,
- xConnSetup * /* pConnSetupT */
-#endif
-);
+ xConnSetup * /* pConnSetupT */);
-void
-SwapWinRoot(
-#if NeedFunctionPrototypes
+extern void SwapWinRoot(
xWindowRoot * /* pRoot */,
- xWindowRoot * /* pRootT */
-#endif
-);
+ xWindowRoot * /* pRootT */);
-void
-SwapVisual(
-#if NeedFunctionPrototypes
+extern void SwapVisual(
xVisualType * /* pVis */,
- xVisualType * /* pVisT */
-#endif
-);
+ xVisualType * /* pVisT */);
-void
-SwapConnSetupPrefix(
-#if NeedFunctionPrototypes
+extern void SwapConnSetupPrefix(
xConnSetupPrefix * /* pcspFrom */,
- xConnSetupPrefix * /* pcspTo */
-#endif
-);
+ xConnSetupPrefix * /* pcspTo */);
-void
-WriteSConnSetupPrefix(
-#if NeedFunctionPrototypes
+extern void WriteSConnSetupPrefix(
ClientPtr /* pClient */,
- xConnSetupPrefix * /* pcsp */
-#endif
-);
+ xConnSetupPrefix * /* pcsp */);
#undef SWAPREP_PROC
-#if NeedFunctionPrototypes
#define SWAPREP_PROC(func) void func(xEvent * /* from */, xEvent * /* to */)
-#else
-#define SWAPREP_PROC(func) void func(/* xEvent * from, xEvent * to */)
-#endif
SWAPREP_PROC(SCirculateEvent);
SWAPREP_PROC(SClientMessageEvent);
diff --git a/include/swapreq.h b/include/swapreq.h
index 5946b2261..59ba8c5be 100644
--- a/include/swapreq.h
+++ b/include/swapreq.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/include/swapreq.h,v 1.2 2001/04/05 17:42:35 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/swapreq.h,v 1.4 2003/11/17 22:20:43 dawes Exp $ */
/************************************************************
Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
@@ -29,44 +29,24 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* The first two are in misc.h */
#if 0
-void
-SwapLongs (
-#if NeedFunctionPrototypes
+extern void SwapLongs (
CARD32 * /* list */,
- unsigned long /* count */
-#endif
-);
+ unsigned long /* count */);
-void
-SwapShorts (
-#if NeedFunctionPrototypes
+extern void SwapShorts (
short * /* list */,
- unsigned long /* count */
-#endif
-);
+ unsigned long /* count */);
#endif
-void
-SwapColorItem(
-#if NeedFunctionPrototypes
- xColorItem * /* pItem */
-#endif
-);
+extern void SwapColorItem(
+ xColorItem * /* pItem */);
-void
-SwapConnClientPrefix(
-#if NeedFunctionPrototypes
- xConnClientPrefix * /* pCCP */
-#endif
-);
+extern void SwapConnClientPrefix(
+ xConnClientPrefix * /* pCCP */);
#undef SWAPREQ_PROC
-#if NeedFunctionPrototypes
#define SWAPREQ_PROC(func) int func(ClientPtr /* client */)
-#else
-#define SWAPREQ_PROC(func) int func(/* ClientPtr client */)
-#endif
SWAPREQ_PROC(SProcAllocColor);
SWAPREQ_PROC(SProcAllocColorCells);
diff --git a/include/window.h b/include/window.h
index c46714aab..0c886559e 100644
--- a/include/window.h
+++ b/include/window.h
@@ -45,6 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/programs/Xserver/include/window.h,v 1.6 2003/11/03 05:36:35 tsi Exp $ */
#ifndef WINDOW_H
#define WINDOW_H
@@ -71,65 +72,40 @@ typedef struct _BackingStore *BackingStorePtr;
typedef struct _Window *WindowPtr;
typedef int (*VisitWindowProcPtr)(
-#if NeedNestedPrototypes
WindowPtr /*pWin*/,
- pointer /*data*/
-#endif
-);
+ pointer /*data*/);
extern int TraverseTree(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
VisitWindowProcPtr /*func*/,
- pointer /*data*/
-#endif
-);
+ pointer /*data*/);
extern int WalkTree(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
VisitWindowProcPtr /*func*/,
- pointer /*data*/
-#endif
-);
+ pointer /*data*/);
extern WindowPtr AllocateWindow(
-#if NeedFunctionPrototypes
- ScreenPtr /*pScreen*/
-#endif
-);
+ ScreenPtr /*pScreen*/);
extern Bool CreateRootWindow(
-#if NeedFunctionPrototypes
- ScreenPtr /*pScreen*/
-#endif
-);
+ ScreenPtr /*pScreen*/);
extern void InitRootWindow(
-#if NeedFunctionPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
extern void ClippedRegionFromBox(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
RegionPtr /*Rgn*/,
int /*x*/,
int /*y*/,
int /*w*/,
- int /*h*/
-#endif
-);
+ int /*h*/);
extern WindowPtr RealChildHead(
-#if NeedFunctionPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
extern WindowPtr CreateWindow(
-#if NeedFunctionPrototypes
Window /*wid*/,
WindowPtr /*pParent*/,
int /*x*/,
@@ -143,23 +119,15 @@ extern WindowPtr CreateWindow(
int /*depth*/,
ClientPtr /*client*/,
VisualID /*visual*/,
- int* /*error*/
-#endif
-);
+ int* /*error*/);
extern int DeleteWindow(
-#if NeedFunctionPrototypes
pointer /*pWin*/,
- XID /*wid*/
-#endif
-);
+ XID /*wid*/);
extern void DestroySubwindows(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
/* Quartz support on Mac OS X uses the HIToolbox
framework whose ChangeWindowAttributes function conflicts here. */
@@ -167,13 +135,10 @@ extern void DestroySubwindows(
#define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes
#endif
extern int ChangeWindowAttributes(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
Mask /*vmask*/,
XID* /*vlist*/,
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
/* Quartz support on Mac OS X uses the HIToolbox
framework whose GetWindowAttributes function conflicts here. */
@@ -183,21 +148,14 @@ extern void Darwin_X_GetWindowAttributes(
#else
extern void GetWindowAttributes(
#endif
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
ClientPtr /*client*/,
- xGetWindowAttributesReply* /* wa */
-#endif
-);
+ xGetWindowAttributesReply* /* wa */);
extern RegionPtr CreateUnclippedWinSize(
-#if NeedFunctionPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
extern void GravityTranslate(
-#if NeedFunctionPrototypes
int /*x*/,
int /*y*/,
int /*oldx*/,
@@ -206,157 +164,92 @@ extern void GravityTranslate(
int /*dh*/,
unsigned /*gravity*/,
int* /*destx*/,
- int* /*desty*/
-#endif
-);
+ int* /*desty*/);
extern int ConfigureWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
Mask /*mask*/,
XID* /*vlist*/,
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
extern int CirculateWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pParent*/,
int /*direction*/,
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
extern int ReparentWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
WindowPtr /*pParent*/,
int /*x*/,
int /*y*/,
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
extern int MapWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
extern void MapSubwindows(
-#if NeedFunctionPrototypes
WindowPtr /*pParent*/,
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
extern int UnmapWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
- Bool /*fromConfigure*/
-#endif
-);
+ Bool /*fromConfigure*/);
extern void UnmapSubwindows(
-#if NeedFunctionPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
extern void HandleSaveSet(
-#if NeedFunctionPrototypes
- ClientPtr /*client*/
-#endif
-);
+ ClientPtr /*client*/);
extern Bool VisibleBoundingBoxFromPoint(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
int /*x*/,
int /*y*/,
- BoxPtr /*box*/
-#endif
-);
+ BoxPtr /*box*/);
extern Bool PointInWindowIsVisible(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
int /*x*/,
- int /*y*/
-#endif
-);
+ int /*y*/);
extern RegionPtr NotClippedByChildren(
-#if NeedFunctionPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
extern void SendVisibilityNotify(
-#if NeedFunctionPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
extern void SaveScreens(
-#if NeedFunctionPrototypes
int /*on*/,
- int /*mode*/
-#endif
-);
+ int /*mode*/);
extern WindowPtr FindWindowWithOptional(
-#if NeedFunctionPrototypes
- WindowPtr /*w*/
-#endif
-);
+ WindowPtr /*w*/);
extern void CheckWindowOptionalNeed(
-#if NeedFunctionPrototypes
- WindowPtr /*w*/
-#endif
-);
+ WindowPtr /*w*/);
extern Bool MakeWindowOptional(
-#if NeedFunctionPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
extern void DisposeWindowOptional(
-#if NeedFunctionPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
extern WindowPtr MoveWindowInStack(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
- WindowPtr /*pNextSib*/
-#endif
-);
+ WindowPtr /*pNextSib*/);
void SetWinSize(
-#if NeedFunctionPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
void SetBorderSize(
-#if NeedFunctionPrototypes
- WindowPtr /*pWin*/
-#endif
-);
+ WindowPtr /*pWin*/);
void ResizeChildrenWinSize(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
int /*dx*/,
int /*dy*/,
int /*dw*/,
- int /*dh*/
-#endif
-);
+ int /*dh*/);
#endif /* WINDOW_H */
diff --git a/include/windowstr.h b/include/windowstr.h
index 4dee291d0..2dce443d3 100644
--- a/include/windowstr.h
+++ b/include/windowstr.h
@@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/include/windowstr.h,v 1.6 2001/12/14 19:59:57 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/include/windowstr.h,v 1.7 2003/04/27 21:31:05 herrb Exp $ */
#ifndef WINDOWSTRUCT_H
#define WINDOWSTRUCT_H
@@ -188,12 +188,9 @@ typedef struct _ScreenSaverStuff {
XID wid;
char blanked;
Bool (*ExternalScreenSaver)(
-#if NeedNestedPrototypes
ScreenPtr /*pScreen*/,
int /*xstate*/,
- Bool /*force*/
-#endif
- );
+ Bool /*force*/);
} ScreenSaverStuffRec, *ScreenSaverStuffPtr;
#define SCREEN_IS_BLANKED 0
diff --git a/iplan2p4/ipl.h b/iplan2p4/ipl.h
index 631d6719a..bdc1682f5 100644
--- a/iplan2p4/ipl.h
+++ b/iplan2p4/ipl.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/iplan2p4/ipl.h,v 3.5 2001/01/30 22:06:21 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/iplan2p4/ipl.h,v 3.6 2003/11/17 22:20:43 dawes Exp $ */
/* $XConsortium: ipl.h,v 5.37 94/04/17 20:28:38 dpw Exp $ */
/************************************************************
Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA.
@@ -96,24 +96,19 @@ typedef struct {
/* ipl8bit.c */
extern int iplSetStipple(
-#if NeedFunctionPrototypes
int /*alu*/,
unsigned long /*fg*/,
unsigned long /*planemask*/
-#endif
);
extern int iplSetOpaqueStipple(
-#if NeedFunctionPrototypes
int /*alu*/,
unsigned long /*fg*/,
unsigned long /*bg*/,
unsigned long /*planemask*/
-#endif
);
extern int iplComputeClipMasks32(
-#if NeedFunctionPrototypes
BoxPtr /*pBox*/,
int /*numRects*/,
int /*x*/,
@@ -121,23 +116,19 @@ extern int iplComputeClipMasks32(
int /*w*/,
int /*h*/,
CARD32 * /*clips*/
-#endif
);
/* ipl8cppl.c */
extern void iplCopyImagePlane(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrcDrawable*/,
DrawablePtr /*pDstDrawable*/,
int /*rop*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
extern void iplCopyPlane8to1(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrcDrawable*/,
DrawablePtr /*pDstDrawable*/,
int /*rop*/,
@@ -145,12 +136,10 @@ extern void iplCopyPlane8to1(
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/,
unsigned long /*bitPlane*/
-#endif
);
/* ipl8lineCO.c */
extern int ipl8LineSS1RectCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
@@ -161,21 +150,17 @@ extern int ipl8LineSS1RectCopy(
int * /*y1p*/,
int * /*x2p*/,
int * /*y2p*/
-#endif
);
extern void ipl8LineSS1Rect(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
int /*npt*/,
DDXPointPtr /*pptInit*/
-#endif
);
extern void ipl8ClippedLineCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*x1*/,
@@ -184,12 +169,10 @@ extern void ipl8ClippedLineCopy(
int /*y2*/,
BoxPtr /*boxp*/,
Bool /*shorten*/
-#endif
);
/* ipl8lineCP.c */
extern int ipl8LineSS1RectPreviousCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
@@ -200,13 +183,10 @@ extern int ipl8LineSS1RectPreviousCopy(
int * /*y1p*/,
int * /*x2p*/,
int * /*y2p*/
-
-#endif
);
/* ipl8lineG.c */
extern int ipl8LineSS1RectGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
@@ -217,11 +197,9 @@ extern int ipl8LineSS1RectGeneral(
int * /*y1p*/,
int * /*x2p*/,
int * /*y2p*/
-#endif
);
extern void ipl8ClippedLineGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*x1*/,
@@ -230,12 +208,10 @@ extern void ipl8ClippedLineGeneral(
int /*y2*/,
BoxPtr /*boxp*/,
Bool /*shorten*/
-#endif
);
/* ipl8lineX.c */
extern int ipl8LineSS1RectXor(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
@@ -246,11 +222,9 @@ extern int ipl8LineSS1RectXor(
int * /*y1p*/,
int * /*x2p*/,
int * /*y2p*/
-#endif
);
extern void ipl8ClippedLineXor(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*x1*/,
@@ -259,70 +233,56 @@ extern void ipl8ClippedLineXor(
int /*y2*/,
BoxPtr /*boxp*/,
Bool /*shorten*/
-#endif
);
/* ipl8segC.c */
extern int ipl8SegmentSS1RectCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nseg*/,
xSegment * /*pSegInit*/
-#endif
);
/* ipl8segCS.c */
extern int ipl8SegmentSS1RectShiftCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nseg*/,
xSegment * /*pSegInit*/
-#endif
);
extern void ipl8SegmentSS1Rect(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nseg*/,
xSegment * /*pSegInit*/
-#endif
);
/* ipl8segG.c */
extern int ipl8SegmentSS1RectGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nseg*/,
xSegment * /*pSegInit*/
-#endif
);
/* iplsegX.c */
extern int ipl8SegmentSS1RectXor(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nseg*/,
xSegment * /*pSegInit*/
-#endif
);
/* iplallpriv.c */
extern Bool iplAllocatePrivates(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
int * /*window_index*/,
int * /*gc_index*/
-#endif
);
/* iplbitblt.c */
extern RegionPtr iplBitBlt(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrcDrawable*/,
DrawablePtr /*pDstDrawable*/,
GCPtr/*pGC*/,
@@ -334,22 +294,18 @@ extern RegionPtr iplBitBlt(
int /*dsty*/,
void (* /*doBitBlt*/)(),
unsigned long /*bitPlane*/
-#endif
);
extern void iplDoBitblt(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
extern RegionPtr iplCopyArea(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrcDrawable*/,
DrawablePtr /*pDstDrawable*/,
GCPtr/*pGC*/,
@@ -359,11 +315,9 @@ extern RegionPtr iplCopyArea(
int /*height*/,
int /*dstx*/,
int /*dsty*/
-#endif
);
extern void iplCopyPlane1to8(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrcDrawable*/,
DrawablePtr /*pDstDrawable*/,
int /*rop*/,
@@ -371,11 +325,9 @@ extern void iplCopyPlane1to8(
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/,
unsigned long /*bitPlane*/
-#endif
);
extern RegionPtr iplCopyPlane(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrcDrawable*/,
DrawablePtr /*pDstDrawable*/,
GCPtr /*pGC*/,
@@ -386,60 +338,50 @@ extern RegionPtr iplCopyPlane(
int /*dstx*/,
int /*dsty*/,
unsigned long /*bitPlane*/
-#endif
);
/* iplbltC.c */
extern void iplDoBitbltCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
/* iplbltG.c */
extern void iplDoBitbltGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
/* iplbltO.c */
extern void iplDoBitbltOr(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
/* iplbltX.c */
extern void iplDoBitbltXor(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/,
unsigned long /*planemask*/
-#endif
);
/* iplbres.c */
extern void iplBresS(
-#if NeedFunctionPrototypes
int /*rop*/,
unsigned short * /*and*/,
unsigned short * /*xor*/,
@@ -454,12 +396,10 @@ extern void iplBresS(
int /*e1*/,
int /*e2*/,
int /*len*/
-#endif
);
/* iplbresd.c */
extern void iplBresD(
-#if NeedFunctionPrototypes
iplRRopPtr /*rrops*/,
int * /*pdashIndex*/,
unsigned char * /*pDash*/,
@@ -477,90 +417,68 @@ extern void iplBresD(
int /*e1*/,
int /*e2*/,
int /*len*/
-#endif
);
/* iplbstore.c */
extern void iplSaveAreas(
-#if NeedFunctionPrototypes
PixmapPtr /*pPixmap*/,
RegionPtr /*prgnSave*/,
int /*xorg*/,
int /*yorg*/,
WindowPtr /*pWin*/
-#endif
);
extern void iplRestoreAreas(
-#if NeedFunctionPrototypes
PixmapPtr /*pPixmap*/,
RegionPtr /*prgnRestore*/,
int /*xorg*/,
int /*yorg*/,
WindowPtr /*pWin*/
-#endif
);
/* iplcmap.c */
extern int iplListInstalledColormaps(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
Colormap * /*pmaps*/
-#endif
);
extern void iplInstallColormap(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/
-#endif
);
extern void iplUninstallColormap(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/
-#endif
);
extern void iplResolveColor(
-#if NeedFunctionPrototypes
unsigned short * /*pred*/,
unsigned short * /*pgreen*/,
unsigned short * /*pblue*/,
VisualPtr /*pVisual*/
-#endif
);
extern Bool iplInitializeColormap(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/
-#endif
);
extern int iplExpandDirectColors(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/,
int /*ndef*/,
xColorItem * /*indefs*/,
xColorItem * /*outdefs*/
-#endif
);
extern Bool iplCreateDefColormap(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/
-#endif
);
extern Bool iplSetVisualTypes(
-#if NeedFunctionPrototypes
int /*depth*/,
int /*visuals*/,
int /*bitsPerRGB*/
-#endif
);
extern Bool iplInitVisuals(
-#if NeedFunctionPrototypes
VisualPtr * /*visualp*/,
DepthPtr * /*depthp*/,
int * /*nvisualp*/,
@@ -569,142 +487,114 @@ extern Bool iplInitVisuals(
VisualID * /*defaultVisp*/,
unsigned long /*sizes*/,
int /*bitsPerRGB*/
-#endif
);
/* iplfillarcC.c */
extern void iplPolyFillArcSolidCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
int /*narcs*/,
xArc * /*parcs*/
-#endif
);
/* iplfillarcG.c */
extern void iplPolyFillArcSolidGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
int /*narcs*/,
xArc * /*parcs*/
-#endif
);
/* iplfillrct.c */
extern void iplFillBoxTileOdd(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*n*/,
BoxPtr /*rects*/,
PixmapPtr /*tile*/,
int /*xrot*/,
int /*yrot*/
-#endif
);
extern void iplFillRectTileOdd(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nBox*/,
BoxPtr /*pBox*/
-#endif
);
extern void iplPolyFillRect(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nrectFill*/,
xRectangle * /*prectInit*/
-#endif
);
/* iplfillsp.c */
extern void iplUnnaturalTileFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void iplUnnaturalStippleFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void ipl8Stipple32FS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void ipl8OpaqueStipple32FS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
/* iplgc.c */
extern GCOpsPtr iplMatchCommon(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/,
iplPrivGCPtr /*devPriv*/
-#endif
);
extern Bool iplCreateGC(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/
-#endif
);
extern void iplValidateGC(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/,
unsigned long /*changes*/,
DrawablePtr /*pDrawable*/
-#endif
);
/* iplgetsp.c */
extern void iplGetSpans(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*wMax*/,
DDXPointPtr /*ppt*/,
int * /*pwidth*/,
int /*nspans*/,
char * /*pdstStart*/
-#endif
);
/* iplglblt8.c */
extern void iplPolyGlyphBlt8(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*x*/,
@@ -712,12 +602,10 @@ extern void iplPolyGlyphBlt8(
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* iplglrop8.c */
extern void iplPolyGlyphRop8(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*x*/,
@@ -725,12 +613,10 @@ extern void iplPolyGlyphRop8(
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* iplhrzvert.c */
extern int iplHorzS(
-#if NeedFunctionPrototypes
int /*rop*/,
unsigned short * /*and*/,
unsigned short * /*xor*/,
@@ -739,11 +625,9 @@ extern int iplHorzS(
int /*x1*/,
int /*y1*/,
int /*len*/
-#endif
);
extern int iplVertS(
-#if NeedFunctionPrototypes
int /*rop*/,
unsigned short * /*and*/,
unsigned short * /*xor*/,
@@ -752,12 +636,10 @@ extern int iplVertS(
int /*x1*/,
int /*y1*/,
int /*len*/
-#endif
);
/* ipligblt8.c */
extern void iplImageGlyphBlt8(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*x*/,
@@ -765,12 +647,10 @@ extern void iplImageGlyphBlt8(
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* iplimage.c */
extern void iplPutImage(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
int /*depth*/,
@@ -781,11 +661,9 @@ extern void iplPutImage(
int /*leftPad*/,
int /*format*/,
char * /*pImage*/
-#endif
);
extern void iplGetImage(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*sx*/,
int /*sy*/,
@@ -794,147 +672,115 @@ extern void iplGetImage(
unsigned int /*format*/,
unsigned long /*planeMask*/,
char * /*pdstLine*/
-#endif
);
/* iplline.c */
extern void iplLineSS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
int /*npt*/,
DDXPointPtr /*pptInit*/
-#endif
);
extern void iplLineSD(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
int /*npt*/,
DDXPointPtr /*pptInit*/
-#endif
);
/* iplmskbits.c */
/* iplpixmap.c */
extern PixmapPtr iplCreatePixmap(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
int /*width*/,
int /*height*/,
int /*depth*/
-#endif
);
extern Bool iplDestroyPixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pPixmap*/
-#endif
);
extern PixmapPtr iplCopyPixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pSrc*/
-#endif
);
extern void iplPadPixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pPixmap*/
-#endif
);
extern void iplXRotatePixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pPix*/,
int /*rw*/
-#endif
);
extern void iplYRotatePixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pPix*/,
int /*rh*/
-#endif
);
extern void iplCopyRotatePixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*psrcPix*/,
PixmapPtr * /*ppdstPix*/,
int /*xrot*/,
int /*yrot*/
-#endif
);
/* iplply1rctC.c */
extern void iplFillPoly1RectCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*shape*/,
int /*mode*/,
int /*count*/,
DDXPointPtr /*ptsIn*/
-#endif
);
/* iplply1rctG.c */
extern void iplFillPoly1RectGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*shape*/,
int /*mode*/,
int /*count*/,
DDXPointPtr /*ptsIn*/
-#endif
);
/* iplpntwin.c */
extern void iplPaintWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
RegionPtr /*pRegion*/,
int /*what*/
-#endif
);
extern void iplFillBoxSolid(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*nBox*/,
BoxPtr /*pBox*/,
unsigned long /*pixel*/
-#endif
);
extern void iplFillBoxTile32(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*nBox*/,
BoxPtr /*pBox*/,
PixmapPtr /*tile*/
-#endif
);
/* iplpolypnt.c */
extern void iplPolyPoint(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
int /*npt*/,
xPoint * /*pptInit*/
-#endif
);
/* iplpush8.c */
extern void iplPushPixels8(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/,
PixmapPtr /*pBitmap*/,
DrawablePtr /*pDrawable*/,
@@ -942,58 +788,46 @@ extern void iplPushPixels8(
int /*dy*/,
int /*xOrg*/,
int /*yOrg*/
-#endif
);
/* iplrctstp8.c */
extern void ipl8FillRectOpaqueStippled32(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nBox*/,
BoxPtr /*pBox*/
-#endif
);
extern void ipl8FillRectTransparentStippled32(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nBox*/,
BoxPtr /*pBox*/
-#endif
);
extern void ipl8FillRectStippledUnnatural(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nBox*/,
BoxPtr /*pBox*/
-#endif
);
/* iplrrop.c */
extern int iplReduceRasterOp(
-#if NeedFunctionPrototypes
int /*rop*/,
unsigned long /*fg*/,
unsigned long /*pm*/,
unsigned short * /*andp*/,
unsigned short * /*xorp*/
-#endif
);
/* iplscrinit.c */
extern Bool iplCloseScreen(
-#if NeedFunctionPrototypes
int /*index*/,
ScreenPtr /*pScreen*/
-#endif
);
extern Bool iplSetupScreen(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
pointer /*pbits*/,
int /*xsize*/,
@@ -1001,11 +835,9 @@ extern Bool iplSetupScreen(
int /*dpix*/,
int /*dpiy*/,
int /*width*/
-#endif
);
extern int iplFinishScreenInit(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
pointer /*pbits*/,
int /*xsize*/,
@@ -1013,11 +845,9 @@ extern int iplFinishScreenInit(
int /*dpix*/,
int /*dpiy*/,
int /*width*/
-#endif
);
extern Bool iplScreenInit(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
pointer /*pbits*/,
int /*xsize*/,
@@ -1025,44 +855,34 @@ extern Bool iplScreenInit(
int /*dpix*/,
int /*dpiy*/,
int /*width*/
-#endif
);
extern PixmapPtr iplGetScreenPixmap(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/
-#endif
);
extern void iplSetScreenPixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pPix*/
-#endif
);
/* iplseg.c */
extern void iplSegmentSS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nseg*/,
xSegment * /*pSeg*/
-#endif
);
extern void iplSegmentSD(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nseg*/,
xSegment * /*pSeg*/
-#endif
);
/* iplsetsp.c */
extern int iplSetScanline(
-#if NeedFunctionPrototypes
int /*y*/,
int /*xOrigin*/,
int /*xStart*/,
@@ -1072,11 +892,9 @@ extern int iplSetScanline(
unsigned short * /*pdstBase*/,
int /*widthDst*/,
unsigned long /*planemask*/
-#endif
);
extern void iplSetSpans(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
char * /*psrc*/,
@@ -1084,75 +902,61 @@ extern void iplSetSpans(
int * /*pwidth*/,
int /*nspans*/,
int /*fSorted*/
-#endif
);
/* iplsolidC.c */
extern void iplFillRectSolidCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nBox*/,
BoxPtr /*pBox*/
-#endif
);
extern void iplSolidSpansCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
/* iplsolidG.c */
extern void iplFillRectSolidGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nBox*/,
BoxPtr /*pBox*/
-#endif
);
extern void iplSolidSpansGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
/* iplsolidX.c */
extern void iplFillRectSolidXor(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nBox*/,
BoxPtr /*pBox*/
-#endif
);
extern void iplSolidSpansXor(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
/* iplteblt8.c */
extern void iplTEGlyphBlt8(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*xInit*/,
@@ -1160,12 +964,10 @@ extern void iplTEGlyphBlt8(
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* ipltegblt.c */
extern void iplTEGlyphBlt(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*x*/,
@@ -1173,54 +975,44 @@ extern void iplTEGlyphBlt(
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* ipltile32C.c */
extern void iplFillRectTile32Copy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nBox*/,
BoxPtr /*pBox*/
-#endif
);
extern void iplTile32FSCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
/* ipltile32G.c */
extern void iplFillRectTile32General(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nBox*/,
BoxPtr /*pBox*/
-#endif
);
extern void iplTile32FSGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
/* ipltileoddC.c */
extern void iplFillBoxTileOddCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*nBox*/,
BoxPtr /*pBox*/,
@@ -1229,11 +1021,9 @@ extern void iplFillBoxTileOddCopy(
int /*yrot*/,
int /*alu*/,
unsigned long /*planemask*/
-#endif
);
extern void iplFillSpanTileOddCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*n*/,
DDXPointPtr /*ppt*/,
@@ -1243,11 +1033,9 @@ extern void iplFillSpanTileOddCopy(
int /*yrot*/,
int /*alu*/,
unsigned long /*planemask*/
-#endif
);
extern void iplFillBoxTile32sCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*nBox*/,
BoxPtr /*pBox*/,
@@ -1256,11 +1044,9 @@ extern void iplFillBoxTile32sCopy(
int /*yrot*/,
int /*alu*/,
unsigned long /*planemask*/
-#endif
);
extern void iplFillSpanTile32sCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*n*/,
DDXPointPtr /*ppt*/,
@@ -1270,12 +1056,10 @@ extern void iplFillSpanTile32sCopy(
int /*yrot*/,
int /*alu*/,
unsigned long /*planemask*/
-#endif
);
/* ipltileoddG.c */
extern void iplFillBoxTileOddGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*nBox*/,
BoxPtr /*pBox*/,
@@ -1284,11 +1068,9 @@ extern void iplFillBoxTileOddGeneral(
int /*yrot*/,
int /*alu*/,
unsigned long /*planemask*/
-#endif
);
extern void iplFillSpanTileOddGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*n*/,
DDXPointPtr /*ppt*/,
@@ -1298,11 +1080,9 @@ extern void iplFillSpanTileOddGeneral(
int /*yrot*/,
int /*alu*/,
unsigned long /*planemask*/
-#endif
);
extern void iplFillBoxTile32sGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*nBox*/,
BoxPtr /*pBox*/,
@@ -1311,11 +1091,9 @@ extern void iplFillBoxTile32sGeneral(
int /*yrot*/,
int /*alu*/,
unsigned long /*planemask*/
-#endif
);
extern void iplFillSpanTile32sGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*n*/,
DDXPointPtr /*ppt*/,
@@ -1325,85 +1103,64 @@ extern void iplFillSpanTile32sGeneral(
int /*yrot*/,
int /*alu*/,
unsigned long /*planemask*/
-#endif
);
/* iplwindow.c */
extern Bool iplCreateWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/
-#endif
);
extern Bool iplDestroyWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/
-#endif
);
extern Bool iplMapWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWindow*/
-#endif
);
extern Bool iplPositionWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
int /*x*/,
int /*y*/
-#endif
);
extern Bool iplUnmapWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWindow*/
-#endif
);
extern void iplCopyWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
DDXPointRec /*ptOldOrg*/,
RegionPtr /*prgnSrc*/
-#endif
);
extern Bool iplChangeWindowAttributes(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
unsigned long /*mask*/
-#endif
);
/* iplzerarcC.c */
extern void iplZeroPolyArcSS8Copy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
int /*narcs*/,
xArc * /*parcs*/
-#endif
);
/* iplzerarcG.c */
extern void iplZeroPolyArcSS8General(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
int /*narcs*/,
xArc * /*parcs*/
-#endif
);
/* iplzerarcX.c */
extern void iplZeroPolyArcSS8Xor(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
int /*narcs*/,
xArc * /*parcs*/
-#endif
);
/* Common macros for extracting drawing information */
diff --git a/iplan2p4/iplbitblt.c b/iplan2p4/iplbitblt.c
index 50927e14f..27470382b 100644
--- a/iplan2p4/iplbitblt.c
+++ b/iplan2p4/iplbitblt.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/iplan2p4/iplbitblt.c,v 3.1 1998/03/20 21:08:08 hohndel Exp $ */
+/* $XFree86: xc/programs/Xserver/iplan2p4/iplbitblt.c,v 3.2 2003/11/10 18:22:45 tsi Exp $ */
/*
* ipl copy area
*/
@@ -231,7 +231,7 @@ iplBitBlt (pSrcDrawable, pDstDrawable,
/* Check to see if the region is empty */
if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2)
{
- REGION_INIT(pGC->pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pGC->pScreen, &rgnDst);
}
else
{
@@ -244,7 +244,7 @@ iplBitBlt (pSrcDrawable, pDstDrawable,
a full blown region. It is intersected with the
composite clip below. */
fastClip = 0;
- REGION_INIT(pGC->pScreen, &rgnDst, &fastBox,1);
+ REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1);
}
}
else
diff --git a/iplan2p4/iplwindow.c b/iplan2p4/iplwindow.c
index 3446b1904..39d1eff9b 100644
--- a/iplan2p4/iplwindow.c
+++ b/iplan2p4/iplwindow.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/iplan2p4/iplwindow.c,v 3.0 1996/08/18 01:55:13 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/iplan2p4/iplwindow.c,v 3.1 2003/11/10 18:22:45 tsi Exp $ */
/* $XConsortium: iplwindow.c,v 5.22 94/04/17 20:29:07 dpw Exp $ */
/***********************************************************
@@ -183,7 +183,7 @@ iplCopyWindow(pWin, ptOldOrg, prgnSrc)
pwinRoot = WindowTable[pWin->drawable.pScreen->myNum];
- REGION_INIT(pWin->drawable.pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pWin->drawable.pScreen, &rgnDst);
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
diff --git a/mfb/mfb.h b/mfb/mfb.h
index c41a2077f..01e09f195 100644
--- a/mfb/mfb.h
+++ b/mfb/mfb.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mfb/mfb.h,v 1.19 2003/02/18 21:30:01 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/mfb/mfb.h,v 1.22 2003/11/17 22:20:44 dawes Exp $ */
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
/***********************************************************
@@ -77,17 +77,14 @@ extern int InverseAlu[];
/* mfbbitblt.c */
extern void mfbDoBitblt(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/
-#endif
);
extern RegionPtr mfbCopyArea(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrcDrawable*/,
DrawablePtr /*pDstDrawable*/,
GCPtr/*pGC*/,
@@ -97,14 +94,11 @@ extern RegionPtr mfbCopyArea(
int /*height*/,
int /*dstx*/,
int /*dsty*/
-#endif
);
extern Bool mfbRegisterCopyPlaneProc(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
RegionPtr (* /*proc*/)(
-#if NeedNestedPrototypes
DrawablePtr /* pSrcDrawable */,
DrawablePtr /* pDstDrawable */,
GCPtr /* pGC */,
@@ -115,13 +109,10 @@ extern Bool mfbRegisterCopyPlaneProc(
int /* dstx */,
int /* dsty */,
unsigned long /* bitPlane */
-#endif
)
-#endif
);
extern RegionPtr mfbCopyPlane(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrcDrawable*/,
DrawablePtr /*pDstDrawable*/,
GCPtr/*pGC*/,
@@ -132,67 +123,55 @@ extern RegionPtr mfbCopyPlane(
int /*dstx*/,
int /*dsty*/,
unsigned long /*plane*/
-#endif
);
/* mfbbltC.c */
extern void mfbDoBitbltCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/
-#endif
);
/* mfbbltCI.c */
extern void mfbDoBitbltCopyInverted(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/
-#endif
);
/* mfbbltG.c */
extern void mfbDoBitbltGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/
-#endif
);
/* mfbbltO.c */
extern void mfbDoBitbltOr(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/
-#endif
);
/* mfbbltX.c */
extern void mfbDoBitbltXor(
-#if NeedFunctionPrototypes
DrawablePtr /*pSrc*/,
DrawablePtr /*pDst*/,
int /*alu*/,
RegionPtr /*prgnDst*/,
DDXPointPtr /*pptSrc*/
-#endif
);
/* mfbbres.c */
extern void mfbBresS(
-#if NeedFunctionPrototypes
int /*rop*/,
PixelType * /*addrl*/,
int /*nlwidth*/,
@@ -205,12 +184,10 @@ extern void mfbBresS(
int /*e1*/,
int /*e2*/,
int /*len*/
-#endif
);
/* mfbbresd.c */
extern void mfbBresD(
-#if NeedFunctionPrototypes
int /*fgrop*/,
int /*bgrop*/,
int * /*pdashIndex*/,
@@ -229,280 +206,220 @@ extern void mfbBresD(
int /*e1*/,
int /*e2*/,
int /*len*/
-#endif
);
/* mfbbstore.c */
extern void mfbSaveAreas(
-#if NeedFunctionPrototypes
PixmapPtr /*pPixmap*/,
RegionPtr /*prgnSave*/,
int /*xorg*/,
int /*yorg*/,
WindowPtr /*pWin*/
-#endif
);
extern void mfbRestoreAreas(
-#if NeedFunctionPrototypes
PixmapPtr /*pPixmap*/,
RegionPtr /*prgnRestore*/,
int /*xorg*/,
int /*yorg*/,
WindowPtr /*pWin*/
-#endif
);
/* mfbclip.c */
extern RegionPtr mfbPixmapToRegion(
-#if NeedFunctionPrototypes
PixmapPtr /*pPix*/
-#endif
);
/* mfbcmap.c */
extern int mfbListInstalledColormaps(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
Colormap * /*pmaps*/
-#endif
);
extern void mfbInstallColormap(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/
-#endif
);
extern void mfbUninstallColormap(
-#if NeedFunctionPrototypes
ColormapPtr /*pmap*/
-#endif
);
extern void mfbResolveColor(
-#if NeedFunctionPrototypes
unsigned short * /*pred*/,
unsigned short * /*pgreen*/,
unsigned short * /*pblue*/,
VisualPtr /*pVisual*/
-#endif
);
extern Bool mfbCreateColormap(
-#if NeedFunctionPrototypes
ColormapPtr /*pMap*/
-#endif
);
extern void mfbDestroyColormap(
-#if NeedFunctionPrototypes
ColormapPtr /*pMap*/
-#endif
);
extern Bool mfbCreateDefColormap(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/
-#endif
);
/* mfbfillarc.c */
extern void mfbPolyFillArcSolid(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
int /*narcs*/,
xArc * /*parcs*/
-#endif
);
/* mfbfillrct.c */
extern void mfbPolyFillRect(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nrectFill*/,
xRectangle * /*prectInit*/
-#endif
);
/* mfbfillsp.c */
extern void mfbBlackSolidFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void mfbWhiteSolidFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void mfbInvertSolidFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void mfbWhiteStippleFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void mfbBlackStippleFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void mfbInvertStippleFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void mfbTileFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void mfbUnnaturalTileFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
extern void mfbUnnaturalStippleFS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*nInit*/,
DDXPointPtr /*pptInit*/,
int * /*pwidthInit*/,
int /*fSorted*/
-#endif
);
/* mfbfont.c */
extern Bool mfbRealizeFont(
-#if NeedFunctionPrototypes
ScreenPtr /*pscr*/,
FontPtr /*pFont*/
-#endif
);
extern Bool mfbUnrealizeFont(
-#if NeedFunctionPrototypes
ScreenPtr /*pscr*/,
FontPtr /*pFont*/
-#endif
);
/* mfbgc.c */
extern Bool mfbCreateGC(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/
-#endif
);
extern void mfbValidateGC(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/,
unsigned long /*changes*/,
DrawablePtr /*pDrawable*/
-#endif
);
extern int mfbReduceRop(
-#if NeedFunctionPrototypes
int /*alu*/,
Pixel /*src*/
-#endif
);
/* mfbgetsp.c */
extern void mfbGetSpans(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*wMax*/,
DDXPointPtr /*ppt*/,
int * /*pwidth*/,
int /*nspans*/,
char * /*pdstStart*/
-#endif
);
/* mfbhrzvert.c */
extern void mfbHorzS(
-#if NeedFunctionPrototypes
int /*rop*/,
PixelType * /*addrl*/,
int /*nlwidth*/,
int /*x1*/,
int /*y1*/,
int /*len*/
-#endif
);
extern void mfbVertS(
-#if NeedFunctionPrototypes
int /*rop*/,
PixelType * /*addrl*/,
int /*nlwidth*/,
int /*x1*/,
int /*y1*/,
int /*len*/
-#endif
);
/* mfbigbblak.c */
extern void mfbImageGlyphBltBlack(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*x*/,
@@ -510,12 +427,10 @@ extern void mfbImageGlyphBltBlack(
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* mfbigbwht.c */
extern void mfbImageGlyphBltWhite(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*x*/,
@@ -523,12 +438,10 @@ extern void mfbImageGlyphBltWhite(
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* mfbimage.c */
extern void mfbPutImage(
-#if NeedFunctionPrototypes
DrawablePtr /*dst*/,
GCPtr /*pGC*/,
int /*depth*/,
@@ -539,11 +452,9 @@ extern void mfbPutImage(
int /*leftPad*/,
int /*format*/,
char * /*pImage*/
-#endif
);
extern void mfbGetImage(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
int /*sx*/,
int /*sy*/,
@@ -552,107 +463,88 @@ extern void mfbGetImage(
unsigned int /*format*/,
unsigned long /*planeMask*/,
char * /*pdstLine*/
-#endif
);
/* mfbline.c */
extern void mfbLineSS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
int /*npt*/,
DDXPointPtr /*pptInit*/
-#endif
);
extern void mfbLineSD(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
int /*npt*/,
DDXPointPtr /*pptInit*/
-#endif
);
/* mfbmisc.c */
extern void mfbQueryBestSize(
-#if NeedFunctionPrototypes
int /*class*/,
unsigned short * /*pwidth*/,
unsigned short * /*pheight*/,
ScreenPtr /*pScreen*/
-#endif
);
/* mfbpablack.c */
extern void mfbSolidBlackArea(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
int /*alu*/,
PixmapPtr /*nop*/
-#endif
);
extern void mfbStippleBlackArea(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
int /*alu*/,
PixmapPtr /*pstipple*/
-#endif
);
/* mfbpainv.c */
extern void mfbSolidInvertArea(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
int /*alu*/,
PixmapPtr /*nop*/
-#endif
);
extern void mfbStippleInvertArea(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
int /*alu*/,
PixmapPtr /*pstipple*/
-#endif
);
/* mfbpawhite.c */
extern void mfbSolidWhiteArea(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
int /*alu*/,
PixmapPtr /*nop*/
-#endif
);
extern void mfbStippleWhiteArea(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
int /*alu*/,
PixmapPtr /*pstipple*/
-#endif
);
-/* mfbpgbblak.c */
+
+/* mfbpgbinv.c */
extern void mfbPolyGlyphBltBlack(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*x*/,
@@ -660,12 +552,10 @@ extern void mfbPolyGlyphBltBlack(
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* mfbpgbinv.c */
extern void mfbPolyGlyphBltInvert(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*x*/,
@@ -673,12 +563,10 @@ extern void mfbPolyGlyphBltInvert(
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* mfbpgbwht.c */
extern void mfbPolyGlyphBltWhite(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*x*/,
@@ -686,119 +574,94 @@ extern void mfbPolyGlyphBltWhite(
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* mfbpixmap.c */
extern PixmapPtr mfbCreatePixmap(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
int /*width*/,
int /*height*/,
int /*depth*/
-#endif
);
extern Bool mfbDestroyPixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pPixmap*/
-#endif
);
extern PixmapPtr mfbCopyPixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pSrc*/
-#endif
);
extern void mfbPadPixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pPixmap*/
-#endif
);
extern void mfbXRotatePixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pPix*/,
int /*rw*/
-#endif
);
extern void mfbYRotatePixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*pPix*/,
int /*rh*/
-#endif
);
extern void mfbCopyRotatePixmap(
-#if NeedFunctionPrototypes
PixmapPtr /*psrcPix*/,
PixmapPtr * /*ppdstPix*/,
int /*xrot*/,
int /*yrot*/
-#endif
);
/* mfbplyblack.c */
extern void mfbFillPolyBlack(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*shape*/,
int /*mode*/,
int /*count*/,
DDXPointPtr /*ptsIn*/
-#endif
);
/* mfbplyinv.c */
extern void mfbFillPolyInvert(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*shape*/,
int /*mode*/,
int /*count*/,
DDXPointPtr /*ptsIn*/
-#endif
);
-/* mfbplywhite.c */
+
+/* mfbpntwin.c */
extern void mfbFillPolyWhite(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*shape*/,
int /*mode*/,
int /*count*/,
DDXPointPtr /*ptsIn*/
-#endif
);
/* mfbpntwin.c */
extern void mfbPaintWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
RegionPtr /*pRegion*/,
int /*what*/
-#endif
);
/* mfbpolypnt.c */
extern void mfbPolyPoint(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*mode*/,
int /*npt*/,
xPoint * /*pptInit*/
-#endif
);
/* mfbpushpxl.c */
extern void mfbSolidPP(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/,
PixmapPtr /*pBitMap*/,
DrawablePtr /*pDrawable*/,
@@ -806,11 +669,9 @@ extern void mfbSolidPP(
int /*dy*/,
int /*xOrg*/,
int /*yOrg*/
-#endif
);
extern void mfbPushPixels(
-#if NeedFunctionPrototypes
GCPtr /*pGC*/,
PixmapPtr /*pBitMap*/,
DrawablePtr /*pDrawable*/,
@@ -818,28 +679,22 @@ extern void mfbPushPixels(
int /*dy*/,
int /*xOrg*/,
int /*yOrg*/
-#endif
);
/* mfbscrclse.c */
extern Bool mfbCloseScreen(
-#if NeedFunctionPrototypes
int /*index*/,
ScreenPtr /*pScreen*/
-#endif
);
/* mfbscrinit.c */
extern Bool mfbAllocatePrivates(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
int * /*pWinIndex*/,
int * /*pGCIndex*/
-#endif
);
extern Bool mfbScreenInit(
-#if NeedFunctionPrototypes
ScreenPtr /*pScreen*/,
pointer /*pbits*/,
int /*xsize*/,
@@ -847,45 +702,35 @@ extern Bool mfbScreenInit(
int /*dpix*/,
int /*dpiy*/,
int /*width*/
-#endif
);
extern PixmapPtr mfbGetWindowPixmap(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/
-#endif
);
extern void mfbSetWindowPixmap(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
PixmapPtr /*pPix*/
-#endif
);
/* mfbseg.c */
extern void mfbSegmentSS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nseg*/,
xSegment * /*pSeg*/
-#endif
);
extern void mfbSegmentSD(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
int /*nseg*/,
xSegment * /*pSeg*/
-#endif
);
/* mfbsetsp.c */
extern void mfbSetScanline(
-#if NeedFunctionPrototypes
int /*y*/,
int /*xOrigin*/,
int /*xStart*/,
@@ -894,11 +739,9 @@ extern void mfbSetScanline(
int /*alu*/,
PixelType * /*pdstBase*/,
int /*widthDst*/
-#endif
);
extern void mfbSetSpans(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr /*pGC*/,
char * /*psrc*/,
@@ -906,12 +749,10 @@ extern void mfbSetSpans(
int * /*pwidth*/,
int /*nspans*/,
int /*fSorted*/
-#endif
);
/* mfbteblack.c */
extern void mfbTEGlyphBltBlack(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*x*/,
@@ -919,12 +760,10 @@ extern void mfbTEGlyphBltBlack(
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* mfbtewhite.c */
extern void mfbTEGlyphBltWhite(
-#if NeedFunctionPrototypes
DrawablePtr /*pDrawable*/,
GCPtr/*pGC*/,
int /*x*/,
@@ -932,97 +771,74 @@ extern void mfbTEGlyphBltWhite(
unsigned int /*nglyph*/,
CharInfoPtr * /*ppci*/,
pointer /*pglyphBase*/
-#endif
);
/* mfbtileC.c */
extern void mfbTileAreaPPWCopy(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
int /*alu*/,
PixmapPtr /*ptile*/
-#endif
);
/* mfbtileG.c */
extern void mfbTileAreaPPWGeneral(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
int /*alu*/,
PixmapPtr /*ptile*/
-#endif
);
extern void mfbTileAreaPPW(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
int /*alu*/,
PixmapPtr /*ptile*/
-#endif
);
/* mfbwindow.c */
extern Bool mfbCreateWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/
-#endif
);
extern Bool mfbDestroyWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/
-#endif
);
extern Bool mfbMapWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWindow*/
-#endif
);
extern Bool mfbPositionWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
int /*x*/,
int /*y*/
-#endif
);
extern Bool mfbUnmapWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWindow*/
-#endif
);
extern void mfbCopyWindow(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
DDXPointRec /*ptOldOrg*/,
RegionPtr /*prgnSrc*/
-#endif
);
extern Bool mfbChangeWindowAttributes(
-#if NeedFunctionPrototypes
WindowPtr /*pWin*/,
unsigned long /*mask*/
-#endif
);
/* mfbzerarc.c */
extern void mfbZeroPolyArcSS(
-#if NeedFunctionPrototypes
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
int /*narcs*/,
xArc * /*parcs*/
-#endif
);
#ifndef MFB_PROTOTYPES_ONLY
@@ -1041,13 +857,11 @@ across, but was 1024 in the hardware.)
private field of GC
*/
typedef void (*mfbFillAreaProcPtr)(
-#if NeedNestedPrototypes
DrawablePtr /*pDraw*/,
int /*nbox*/,
BoxPtr /*pbox*/,
int /*alu*/,
PixmapPtr /*nop*/
-#endif
);
typedef struct {
diff --git a/mfb/mfbbitblt.c b/mfb/mfbbitblt.c
index 601f59d54..310d492f8 100644
--- a/mfb/mfbbitblt.c
+++ b/mfb/mfbbitblt.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mfb/mfbbitblt.c,v 1.6 2001/12/14 20:00:04 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mfb/mfbbitblt.c,v 1.8 2003/11/10 18:22:45 tsi Exp $ */
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
/***********************************************************
@@ -50,7 +50,6 @@ SOFTWARE.
#include "X.h"
#include "Xprotostr.h"
-#include "miscstruct.h"
#include "regionstr.h"
#include "gcstruct.h"
#include "windowstr.h"
@@ -150,7 +149,12 @@ int dstx, dsty;
BoxRec fastBox;
int fastClip = 0; /* for fast clipping with pixmap source */
int fastExpose = 0; /* for fast exposures with pixmap source */
- void (*localDoBitBlt)();
+ void (*localDoBitBlt)(
+ DrawablePtr /*pSrc*/,
+ DrawablePtr /*pDst*/,
+ int /*alu*/,
+ RegionPtr /*prgnDst*/,
+ DDXPointPtr /*pptSrc*/);
origSource.x = srcx;
origSource.y = srcy;
@@ -314,7 +318,7 @@ int dstx, dsty;
/* Check to see if the region is empty */
if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2)
{
- REGION_INIT(pGC->pScreen, &rgnDst, NullBox, 0);
+ REGION_NULL(pGC->pScreen, &rgnDst);
}
else
{
@@ -327,7 +331,7 @@ int dstx, dsty;
a full blown region. It is intersected with the
composite clip below. */
fastClip = 0;
- REGION_INIT(pGC->pScreen, &rgnDst, &fastBox,1);
+ REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1);
}
}
else
@@ -397,7 +401,17 @@ static int copyPlaneScreenIndex = -1;
Bool
mfbRegisterCopyPlaneProc (pScreen, proc)
ScreenPtr pScreen;
- RegionPtr (*proc)();
+ RegionPtr (*proc)(
+ DrawablePtr /* pSrcDrawable */,
+ DrawablePtr /* pDstDrawable */,
+ GCPtr /* pGC */,
+ int /* srcx */,
+ int /* srcy */,
+ int /* width */,
+ int /* height */,
+ int /* dstx */,
+ int /* dsty */,
+ unsigned long /* bitPlane */);
{
if (copyPlaneGeneration != serverGeneration)
{
@@ -406,7 +420,7 @@ mfbRegisterCopyPlaneProc (pScreen, proc)
return FALSE;
copyPlaneGeneration = serverGeneration;
}
- pScreen->devPrivates[copyPlaneScreenIndex].fptr = (pointer (*)()) proc;
+ pScreen->devPrivates[copyPlaneScreenIndex].fptr = proc;
return TRUE;
}
@@ -437,12 +451,23 @@ unsigned long plane;
{
int alu;
RegionPtr prgnExposed;
- RegionPtr (*copyPlane)();
+ RegionPtr (*copyPlane)(
+ DrawablePtr /* pSrcDrawable */,
+ DrawablePtr /* pDstDrawable */,
+ GCPtr /* pGC */,
+ int /* srcx */,
+ int /* srcy */,
+ int /* width */,
+ int /* height */,
+ int /* dstx */,
+ int /* dsty */,
+ unsigned long /* bitPlane */);
+
if (pSrcDrawable->depth != 1)
{
if (copyPlaneScreenIndex >= 0 &&
- (copyPlane = (RegionPtr (*)())
+ (copyPlane =
pSrcDrawable->pScreen->devPrivates[copyPlaneScreenIndex].fptr)
)
{
diff --git a/mfb/mfbclip.c b/mfb/mfbclip.c
index 0de94b3f9..d23071cd3 100644
--- a/mfb/mfbclip.c
+++ b/mfb/mfbclip.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mfb/mfbclip.c,v 1.5 2001/12/14 20:00:05 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mfb/mfbclip.c,v 1.6 2003/07/16 01:38:55 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -47,7 +47,7 @@ SOFTWARE.
******************************************************************/
/* $Xorg: mfbclip.c,v 1.4 2001/02/09 02:05:18 xorgcvs Exp $ */
#include "X.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "pixmapstr.h"
#include "scrnintstr.h"
#include "regionstr.h"
diff --git a/mfb/mfbfillarc.c b/mfb/mfbfillarc.c
index 5484e9259..886c2852a 100644
--- a/mfb/mfbfillarc.c
+++ b/mfb/mfbfillarc.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mfb/mfbfillarc.c,v 1.5 2001/12/14 20:00:06 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mfb/mfbfillarc.c,v 1.6 2003/07/16 01:38:55 dawes Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
@@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group.
#include "X.h"
#include "Xprotostr.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "gcstruct.h"
#include "pixmapstr.h"
#include "scrnintstr.h"
@@ -39,10 +39,10 @@ in this Software without prior written authorization from The Open Group.
#include "mi.h"
static void
-mfbFillEllipseSolid(pDraw, arc, rop)
- DrawablePtr pDraw;
- xArc *arc;
- register int rop;
+mfbFillEllipseSolid(
+ DrawablePtr pDraw,
+ xArc *arc,
+ register int rop)
{
int x, y, e;
int yk, xk, ym, xm, dx, dy, xorg, yorg;
@@ -220,11 +220,11 @@ mfbFillEllipseSolid(pDraw, arc, rop)
}
static void
-mfbFillArcSliceSolidCopy(pDraw, pGC, arc, rop)
- DrawablePtr pDraw;
- GCPtr pGC;
- xArc *arc;
- register int rop;
+mfbFillArcSliceSolidCopy(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ xArc *arc,
+ register int rop)
{
register PixelType *addrl;
register int n;
diff --git a/mfb/mfbgc.c b/mfb/mfbgc.c
index 314af0b4a..1119f66f9 100644
--- a/mfb/mfbgc.c
+++ b/mfb/mfbgc.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mfb/mfbgc.c,v 1.8 2003/02/18 21:30:01 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/mfb/mfbgc.c,v 1.10 2003/07/16 03:35:16 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -656,7 +656,12 @@ struct commonOps {
int rrop;
int terminalFont;
GCOps *ops;
- void (*fillArea)();
+ void (*fillArea)(
+ DrawablePtr /*pDraw*/,
+ int /*nbox*/,
+ BoxPtr /*pbox*/,
+ int /*alu*/,
+ PixmapPtr /*nop*/);
};
static struct commonOps mfbCommonOps[] = {
@@ -677,8 +682,8 @@ static struct commonOps mfbCommonOps[] = {
#define numberCommonOps (sizeof (mfbCommonOps) / sizeof (mfbCommonOps[0]))
static GCOps *
-matchCommon (pGC)
- GCPtr pGC;
+matchCommon (
+ GCPtr pGC)
{
int i;
struct commonOps *cop;
@@ -743,6 +748,45 @@ mfbCreateGC(pGC)
return TRUE;
}
+/* some noop functions */
+static void
+mfbPolyGlyphBltNoop(
+ DrawablePtr pDrawable,
+ GCPtr pGC,
+ int x,
+ int y,
+ unsigned int nglyph,
+ CharInfoPtr * ppci,
+ pointer pglyphBase)
+{
+ /* this is a no-op function */
+}
+
+static void
+mfbNoopFS(
+ DrawablePtr pDrawable,
+ GCPtr pGC,
+ int nInit,
+ DDXPointPtr pptInit,
+ int * pwidthInit,
+ int fSorted)
+{
+ /* this is a no-op function */
+}
+
+static void
+mfbFillPolyNoop(
+ DrawablePtr pDrawable,
+ GCPtr pGC,
+ int shape,
+ int mode,
+ int count,
+ DDXPointPtr ptsIn)
+{
+ /* this is a no-op function */
+}
+
+
/* Clipping conventions
if the drawable is a window
CT_REGION ==> pCompositeClip really is the composite
@@ -1107,7 +1151,7 @@ mfbValidateGC(pGC, changes, pDrawable)
else if (rrop == RROP_INVERT)
pGC->ops->PolyGlyphBlt = mfbPolyGlyphBltInvert;
else
- pGC->ops->PolyGlyphBlt = (void (*)())NoopDDA;
+ pGC->ops->PolyGlyphBlt = mfbPolyGlyphBltNoop;
}
else
{
@@ -1144,8 +1188,8 @@ mfbValidateGC(pGC, changes, pDrawable)
pGC->ops->FillPolygon = mfbFillPolyInvert;
break;
case RROP_NOP:
- pGC->ops->FillSpans = (void (*)())NoopDDA;
- pGC->ops->FillPolygon = (void (*)())NoopDDA;
+ pGC->ops->FillSpans = mfbNoopFS;
+ pGC->ops->FillPolygon = mfbFillPolyNoop;
break;
}
}
@@ -1174,7 +1218,7 @@ mfbValidateGC(pGC, changes, pDrawable)
pGC->ops->FillSpans = mfbInvertStippleFS;
break;
case RROP_NOP:
- pGC->ops->FillSpans = (void (*)())NoopDDA;
+ pGC->ops->FillSpans = mfbNoopFS;
break;
}
}
diff --git a/mfb/mfbimggblt.c b/mfb/mfbimggblt.c
index 428e4c46b..066ca3ce7 100644
--- a/mfb/mfbimggblt.c
+++ b/mfb/mfbimggblt.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mfb/mfbimggblt.c,v 3.5 2003/02/18 21:30:01 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/mfb/mfbimggblt.c,v 3.6 2003/11/03 05:11:59 tsi Exp $ */
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
/***********************************************************
@@ -291,7 +291,9 @@ MFBIMAGEGLYPHBLT(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
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 = (TEXTPOS *)ALLOCATE_LOCAL(nglyph * sizeof(TEXTPOS))))
return;
@@ -391,7 +393,9 @@ MFBIMAGEGLYPHBLT(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
glyphCol = (leftEdge - ppos[i].xpos) -
(pci->metrics.leftSideBearing);
+#if GETLEFTBITS_ALIGNMENT > 1
getWidth = w + glyphCol;
+#endif
xoff = xchar + (leftEdge - ppos[i].xpos);
if (xoff > PLST)
{
diff --git a/mfb/mfbplygblt.c b/mfb/mfbplygblt.c
index 661590e5e..61a7297f0 100644
--- a/mfb/mfbplygblt.c
+++ b/mfb/mfbplygblt.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mfb/mfbplygblt.c,v 3.4 2001/12/14 20:00:10 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mfb/mfbplygblt.c,v 3.5 2003/11/03 05:12:00 tsi Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -248,7 +248,9 @@ MFBPOLYGLYPHBLT(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
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 = (TEXTPOS *)ALLOCATE_LOCAL(nglyph * sizeof(TEXTPOS))))
return;
@@ -341,7 +343,9 @@ MFBPOLYGLYPHBLT(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
glyphCol = (leftEdge - ppos[i].xpos) -
(pci->metrics.leftSideBearing);
+#if GETLEFTBITS_ALIGNMENT > 1
getWidth = w + glyphCol;
+#endif
xoff = xchar + (leftEdge - ppos[i].xpos);
if (xoff > PLST)
{
diff --git a/mfb/mfbtile.c b/mfb/mfbtile.c
index 05bc93722..e672f38c9 100644
--- a/mfb/mfbtile.c
+++ b/mfb/mfbtile.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mfb/mfbtile.c,v 1.3 2003/02/18 21:30:01 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/mfb/mfbtile.c,v 1.4 2003/07/16 01:38:55 dawes Exp $ */
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
/***********************************************************
@@ -220,7 +220,12 @@ mfbTileAreaPPW (pDraw, nbox, pbox, alu, ptile)
int alu;
PixmapPtr ptile;
{
- void (*f)();
+ void (*f)(
+ DrawablePtr /*pDraw*/,
+ int /*nbox*/,
+ BoxPtr /*pbox*/,
+ int /*alu*/,
+ PixmapPtr /*ptile*/);
if (alu == GXcopy)
f = mfbTileAreaPPWCopy;
diff --git a/mfb/mfbwindow.c b/mfb/mfbwindow.c
index 8107b9807..f7ff963c4 100644
--- a/mfb/mfbwindow.c
+++ b/mfb/mfbwindow.c
@@ -46,6 +46,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/programs/Xserver/mfb/mfbwindow.c,v 1.4 2003/11/03 05:36:35 tsi Exp $ */
#include "X.h"
#include "scrnintstr.h"
@@ -55,8 +56,6 @@ SOFTWARE.
#include "regionstr.h"
#include "maskbits.h"
-extern WindowPtr *WindowTable;
-
Bool
mfbCreateWindow(pWin)
register WindowPtr pWin;
diff --git a/mfb/mfbzerarc.c b/mfb/mfbzerarc.c
index 51dc727d9..1ef9f1f56 100644
--- a/mfb/mfbzerarc.c
+++ b/mfb/mfbzerarc.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mfb/mfbzerarc.c,v 3.7 2002/09/27 01:57:47 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mfb/mfbzerarc.c,v 3.8 2003/07/16 01:38:55 dawes Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
@@ -35,7 +35,7 @@ in this Software without prior written authorization from The Open Group.
#include "X.h"
#include "Xprotostr.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "gcstruct.h"
#include "pixmapstr.h"
#include "scrnintstr.h"
@@ -72,10 +72,10 @@ in this Software without prior written authorization from The Open Group.
#define DoPix(bit,base,yoff,xoff) if (mask & bit) Pixelate(base,yoff,xoff);
static void
-mfbZeroArcSS(pDraw, pGC, arc)
- DrawablePtr pDraw;
- GCPtr pGC;
- xArc *arc;
+mfbZeroArcSS(
+ DrawablePtr pDraw,
+ GCPtr pGC,
+ xArc *arc)
{
miZeroArcRec info;
Bool do360;
diff --git a/mi/miarc.c b/mi/miarc.c
index 8c86200ee..832a056c3 100644
--- a/mi/miarc.c
+++ b/mi/miarc.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mi/miarc.c,v 3.13 2002/01/12 22:20:33 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/miarc.c,v 3.14 2003/10/29 22:57:48 tsi Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -1656,7 +1656,6 @@ miGetArcPts(
xc, yc; /* the center point */
int count, i;
SppPointPtr poly;
- DDXPointRec last; /* last point on integer boundaries */
/* The spec says that positive angles indicate counterclockwise motion.
* Given our coordinate system (with 0,0 in the upper left corner),
@@ -1703,8 +1702,6 @@ miGetArcPts(
poly[cpt].x = (xc + x0);
poly[cpt].y = (yc + y0);
- last.x = ROUNDTOINT( poly[cpt + 1].x = (xc + x1) );
- last.y = ROUNDTOINT( poly[cpt + 1].y = (yc + y1) );
for(i = 2; i < count; i++)
{
diff --git a/mi/mibank.c b/mi/mibank.c
index a6e1942c2..cc2796edb 100644
--- a/mi/mibank.c
+++ b/mi/mibank.c
@@ -44,7 +44,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/mi/mibank.c,v 1.13 2003/01/01 19:16:42 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/mibank.c,v 1.15 2003/11/10 18:39:16 tsi Exp $ */
/*
* This thing originated from an idea of Edwin Goei and his bank switching
@@ -300,7 +300,7 @@ static unsigned long miBankGeneration = 0;
#define GCOP_0D_ARGS mode,
#define GCOP_1D_ARGS
-#define GCOP_2D_ARGS shape, mode,
+#define GCOP_2D_ARGS shape, mode,
#define GCOP_COMPLEX(aop, atype) \
if (nArray > 0) \
@@ -1911,7 +1911,7 @@ miBankPaintWindow(
}
else
{
- REGION_INIT(pScreen, &tmpReg, NullBox, 0);
+ REGION_NULL(pScreen, &tmpReg);
for (i = 0; i < pScreenPriv->nBanks; i++)
{
@@ -2082,7 +2082,7 @@ miBankSaveAreas(
}
else
{
- REGION_INIT(pScreen, &rgnClipped, NullBox, 0);
+ REGION_NULL(pScreen, &rgnClipped);
REGION_TRANSLATE(pScreen, prgnSave, xorg, yorg);
for (i = 0; i < pScreenPriv->nBanks; i++)
@@ -2136,7 +2136,7 @@ miBankRestoreAreas(
}
else
{
- REGION_INIT(pScreen, &rgnClipped, NullBox, 0);
+ REGION_NULL(pScreen, &rgnClipped);
for (i = 0; i < pScreenPriv->nBanks; i++)
{
diff --git a/mi/mibstore.c b/mi/mibstore.c
index f98aaebbf..e04e5410c 100644
--- a/mi/mibstore.c
+++ b/mi/mibstore.c
@@ -42,7 +42,7 @@ implied warranty.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/mi/mibstore.c,v 1.10 2001/12/14 20:00:20 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/mibstore.c,v 1.11 2003/11/10 18:22:47 tsi Exp $ */
#define NEED_EVENTS
#include "X.h"
@@ -504,8 +504,8 @@ miBSGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine)
}
ChangeGC (pGC, GCSubwindowMode, &subWindowMode);
ValidateGC ((DrawablePtr)pPixmap, pGC);
- REGION_INIT(pScreen, &Border, NullBox, 0);
- REGION_INIT(pScreen, &Inside, NullBox, 0);
+ REGION_NULL(pScreen, &Border);
+ REGION_NULL(pScreen, &Inside);
pSrcWin = (WindowPtr) pDrawable;
x = sx;
y = sy;
@@ -2584,7 +2584,7 @@ miBSAllocate(pWin)
pBackingStore->pBackingPixmap = NullPixmap;
pBackingStore->x = 0;
pBackingStore->y = 0;
- REGION_INIT( pScreen, &pBackingStore->SavedRegion, NullBox, 1);
+ REGION_NULL( pScreen, &pBackingStore->SavedRegion);
pBackingStore->viewable = (char)pWin->viewable;
pBackingStore->status = StatusNoPixmap;
pBackingStore->backgroundState = None;
@@ -3850,7 +3850,7 @@ miBSExposeCopy (pSrc, pDst, pGC, prgnExposed, srcx, srcy, dstx, dsty, plane)
(pBackingStore->status == StatusBadAlloc))
return;
- REGION_INIT( pGC->pScreen, &tempRgn, NullBox, 0);
+ REGION_NULL( pGC->pScreen, &tempRgn);
REGION_INTERSECT( pGC->pScreen, &tempRgn, prgnExposed,
&pBackingStore->SavedRegion);
REGION_SUBTRACT( pGC->pScreen, prgnExposed, prgnExposed, &tempRgn);
diff --git a/mi/micoord.h b/mi/micoord.h
index f31c88c83..ffe2e1e53 100644
--- a/mi/micoord.h
+++ b/mi/micoord.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mi/micoord.h,v 1.5 2002/05/22 21:38:31 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/micoord.h,v 1.7 2003/10/29 22:57:48 tsi Exp $ */
/*
* Copyright (C) 2000 The XFree86 Project, Inc. All Rights Reserved.
*
@@ -44,13 +44,13 @@
* forcing as to use div instead of shift. Let's be explicit.
*/
-#if defined(mips) || \
+#if defined(mips) || defined(sgi) || \
defined(sparc) || defined(__sparc64__) || \
defined(__alpha) || defined(__alpha__) || \
defined(__i386__) || defined(i386) || \
defined(__ia64__) || defined(ia64) || \
defined(__s390x__) || defined(__s390__) || \
- defined(__x86_64__) || defined(x86_64)
+ defined(__AMD64__) || defined(AMD64)
#define GetHighWord(x) (((int) (x)) >> 16)
#else
#define GetHighWord(x) (((int) (x)) / 65536)
diff --git a/mi/midash.c b/mi/midash.c
index c3dd24355..bc33b0c20 100644
--- a/mi/midash.c
+++ b/mi/midash.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mi/midash.c,v 1.4 2001/12/14 20:00:21 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/midash.c,v 1.5 2003/07/16 01:38:56 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -46,7 +46,7 @@ SOFTWARE.
******************************************************************/
/* $Xorg: midash.c,v 1.4 2001/02/09 02:05:20 xorgcvs Exp $ */
-#include "miscstruct.h"
+#include "regionstr.h"
#include "mistruct.h"
#include "mifpoly.h"
diff --git a/mi/midispcur.c b/mi/midispcur.c
index 3917a7928..ca85fc3d1 100644
--- a/mi/midispcur.c
+++ b/mi/midispcur.c
@@ -30,7 +30,7 @@ Except as contained in this notice, the name of The Open Group shall not be
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/mi/midispcur.c,v 1.9 2002/12/09 04:10:57 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/midispcur.c,v 1.10 2003/03/06 05:52:58 mvojkovi Exp $ */
#define NEED_EVENTS
# include "X.h"
@@ -379,14 +379,15 @@ miDCPutBits (
miDCCursorPtr pPriv,
GCPtr sourceGC,
GCPtr maskGC,
- int x,
- int y,
+ int x_org,
+ int y_org,
unsigned w,
unsigned h,
unsigned long source,
unsigned long mask)
{
XID gcvals[1];
+ int x, y;
if (sourceGC->fgPixel != source)
{
@@ -395,6 +396,18 @@ miDCPutBits (
}
if (sourceGC->serialNumber != pDrawable->serialNumber)
ValidateGC (pDrawable, sourceGC);
+
+ if(sourceGC->miTranslate)
+ {
+ x = pDrawable->x + x_org;
+ y = pDrawable->y + y_org;
+ }
+ else
+ {
+ x = x_org;
+ y = y_org;
+ }
+
(*sourceGC->ops->PushPixels) (sourceGC, pPriv->sourceBits, pDrawable, w, h, x, y);
if (maskGC->fgPixel != mask)
{
@@ -403,6 +416,18 @@ miDCPutBits (
}
if (maskGC->serialNumber != pDrawable->serialNumber)
ValidateGC (pDrawable, maskGC);
+
+ if(maskGC->miTranslate)
+ {
+ x = pDrawable->x + x_org;
+ y = pDrawable->y + y_org;
+ }
+ else
+ {
+ x = x_org;
+ y = y_org;
+ }
+
(*maskGC->ops->PushPixels) (maskGC, pPriv->maskBits, pDrawable, w, h, x, y);
}
diff --git a/mi/miexpose.c b/mi/miexpose.c
index ca896b9e0..07efa754c 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mi/miexpose.c,v 3.9 2001/12/14 20:00:22 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/miexpose.c,v 3.10 2003/11/10 18:22:49 tsi Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -164,7 +164,7 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
if ((RECT_IN_REGION(pscr, &pSrcWin->clipList, &TsrcBox)) == rgnIN)
return NULL;
prgnSrcClip = &rgnSrcRec;
- REGION_INIT(pscr, prgnSrcClip, NullBox, 0);
+ REGION_NULL(pscr, prgnSrcClip);
REGION_COPY(pscr, prgnSrcClip, &pSrcWin->clipList);
}
REGION_TRANSLATE(pscr, prgnSrcClip,
@@ -201,7 +201,7 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
else
{
prgnDstClip = &rgnDstRec;
- REGION_INIT(pscr, prgnDstClip, NullBox, 0);
+ REGION_NULL(pscr, prgnDstClip);
REGION_COPY(pscr, prgnDstClip,
&((WindowPtr)pDstDrawable)->clipList);
}
diff --git a/mi/mifillarc.c b/mi/mifillarc.c
index a93b9e3a2..fa37d45be 100644
--- a/mi/mifillarc.c
+++ b/mi/mifillarc.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mi/mifillarc.c,v 3.7 2001/12/14 20:00:22 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/mifillarc.c,v 3.8 2003/07/16 01:38:56 dawes Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
@@ -32,7 +32,7 @@ Author: Bob Scheifler, MIT X Consortium
#include <math.h>
#include "X.h"
#include "Xprotostr.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "gcstruct.h"
#include "pixmapstr.h"
#include "mifpoly.h"
diff --git a/mi/mioverlay.c b/mi/mioverlay.c
index 9e765b206..cdb2058b1 100644
--- a/mi/mioverlay.c
+++ b/mi/mioverlay.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mi/mioverlay.c,v 3.14 2002/10/18 00:07:13 mvojkovi Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/mioverlay.c,v 3.16 2003/11/10 18:22:49 tsi Exp $ */
#include "X.h"
#include "scrnintstr.h"
@@ -208,8 +208,8 @@ miOverlayCreateWindow(WindowPtr pWin)
pTree->visibility = VisibilityNotViewable;
pWinPriv->tree = pTree;
if(pWin->parent) {
- REGION_INIT(pScreen, &(pTree->borderClip), NullBox, 1);
- REGION_INIT(pScreen, &(pTree->clipList), NullBox, 1);
+ REGION_NULL(pScreen, &(pTree->borderClip));
+ REGION_NULL(pScreen, &(pTree->clipList));
RebuildTree(pWin);
} else {
BoxRec fullBox;
@@ -539,16 +539,14 @@ miOverlayComputeClips(
(* pScreen->ClipNotify) (tChild->pWin, dx, dy);
}
if (tChild->valdata) {
- REGION_INIT(pScreen, &tChild->valdata->borderExposed,
- NullBox, 0);
+ REGION_NULL(pScreen, &tChild->valdata->borderExposed);
if (HasParentRelativeBorder(tChild->pWin)){
REGION_SUBTRACT(pScreen,
&tChild->valdata->borderExposed,
&tChild->borderClip,
&tChild->pWin->winSize);
}
- REGION_INIT( pScreen, &tChild->valdata->exposed,
- NullBox, 0);
+ REGION_NULL(pScreen, &tChild->valdata->exposed);
}
if (tChild->firstChild) {
tChild = tChild->firstChild;
@@ -577,8 +575,8 @@ miOverlayComputeClips(
}
borderVisible = tParent->valdata->borderVisible;
- REGION_INIT( pScreen, &tParent->valdata->borderExposed, NullBox, 0);
- REGION_INIT( pScreen, &tParent->valdata->exposed, NullBox, 0);
+ REGION_NULL(pScreen, &tParent->valdata->borderExposed);
+ REGION_NULL(pScreen, &tParent->valdata->exposed);
if (HasBorder (pParent)) {
if (borderVisible) {
@@ -601,8 +599,8 @@ miOverlayComputeClips(
REGION_COPY( pScreen, &tParent->borderClip, universe);
if ((tChild = tParent->firstChild) && pParent->mapped) {
- REGION_INIT(pScreen, &childUniverse, NullBox, 0);
- REGION_INIT(pScreen, &childUnion, NullBox, 0);
+ REGION_NULL(pScreen, &childUniverse);
+ REGION_NULL(pScreen, &childUnion);
for (; tChild; tChild = tChild->nextSib) {
if (tChild->pWin->viewable)
@@ -751,9 +749,9 @@ miOverlayValidateTree(
if (!pChild) pChild = pParent->firstChild;
- REGION_INIT(pScreen, &totalClip, NullBox, 0);
- REGION_INIT(pScreen, &childClip, NullBox, 0);
- REGION_INIT(pScreen, &exposed, NullBox, 0);
+ REGION_NULL(pScreen, &totalClip);
+ REGION_NULL(pScreen, &childClip);
+ REGION_NULL(pScreen, &exposed);
newParent = pParent;
@@ -811,8 +809,8 @@ miOverlayValidateTree(
REGION_UNINIT(pScreen, &childClip);
if(!((*pPriv->InOverlay)(newParent))) {
- REGION_INIT(pScreen, &tParent->valdata->exposed, NullBox, 0);
- REGION_INIT(pScreen, &tParent->valdata->borderExposed, NullBox, 0);
+ REGION_NULL(pScreen, &tParent->valdata->exposed);
+ REGION_NULL(pScreen, &tParent->valdata->borderExposed);
}
switch (kind) {
@@ -953,8 +951,8 @@ miOverlayMoveWindow(
oldpt.x = pWin->drawable.x;
oldpt.y = pWin->drawable.y;
if (WasViewable) {
- REGION_INIT(pScreen, &overReg, NullBox, 1);
- REGION_INIT(pScreen, &underReg, NullBox, 0);
+ REGION_NULL(pScreen, &overReg);
+ REGION_NULL(pScreen, &underReg);
if(pTree) {
REGION_COPY(pScreen, &overReg, &pWin->borderClip);
REGION_COPY(pScreen, &underReg, &pTree->borderClip);
@@ -1667,7 +1665,6 @@ miOverlayChangeBorderWidth(
WindowPtr pWin,
unsigned int width
){
- WindowPtr pParent;
int oldwidth;
register ScreenPtr pScreen;
Bool WasViewable = (Bool)(pWin->viewable);
@@ -1681,7 +1678,6 @@ miOverlayChangeBorderWidth(
return;
HadBorder = HasBorder(pWin);
pScreen = pWin->drawable.pScreen;
- pParent = pWin->parent;
if (WasViewable && (width < oldwidth))
(*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL);
@@ -2029,6 +2025,7 @@ HasUnderlayChildren(WindowPtr pWin)
static Bool
CollectUnderlayChildrenRegions(WindowPtr pWin, RegionPtr pReg)
{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
WindowPtr pChild;
miOverlayTreePtr pTree;
Bool hasUnderlay;
diff --git a/mi/mipoly.c b/mi/mipoly.c
index b25ee780f..ad69d7062 100644
--- a/mi/mipoly.c
+++ b/mi/mipoly.c
@@ -1,3 +1,4 @@
+/* $XFree86: xc/programs/Xserver/mi/mipoly.c,v 1.3 2003/07/16 01:38:56 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -60,7 +61,7 @@ SOFTWARE.
#include "gcstruct.h"
#include "pixmapstr.h"
#include "mi.h"
-#include "miscstruct.h"
+#include "regionstr.h"
void
diff --git a/mi/mipolyrect.c b/mi/mipolyrect.c
index f6d170ef9..298ba2385 100644
--- a/mi/mipolyrect.c
+++ b/mi/mipolyrect.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mi/mipolyrect.c,v 1.3 2001/12/14 20:00:25 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/mipolyrect.c,v 1.4 2003/07/16 01:38:57 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -48,7 +48,7 @@ SOFTWARE.
/* $Xorg: mipolyrect.c,v 1.4 2001/02/09 02:05:21 xorgcvs Exp $ */
#include "X.h"
#include "Xprotostr.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "gcstruct.h"
#include "pixmap.h"
#include "mi.h"
diff --git a/mi/mipolyseg.c b/mi/mipolyseg.c
index 82f2983e3..cb6bb7550 100644
--- a/mi/mipolyseg.c
+++ b/mi/mipolyseg.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mi/mipolyseg.c,v 1.3 2001/12/14 20:00:26 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/mipolyseg.c,v 1.4 2003/07/16 01:38:57 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -48,7 +48,7 @@ SOFTWARE.
/* $Xorg: mipolyseg.c,v 1.4 2001/02/09 02:05:21 xorgcvs Exp $ */
#include "X.h"
#include "Xprotostr.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "gcstruct.h"
#include "pixmap.h"
#include "mi.h"
diff --git a/mi/mipolyutil.c b/mi/mipolyutil.c
index 537ac6fb4..7ffeadd86 100644
--- a/mi/mipolyutil.c
+++ b/mi/mipolyutil.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mi/mipolyutil.c,v 1.9 2001/12/14 20:00:26 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/mipolyutil.c,v 1.10 2003/07/16 01:38:57 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -46,7 +46,7 @@ SOFTWARE.
******************************************************************/
/* $Xorg: mipolyutil.c,v 1.4 2001/02/09 02:05:21 xorgcvs Exp $ */
-#include "miscstruct.h"
+#include "regionstr.h"
#include "gc.h"
#include "miscanfill.h"
#include "mipoly.h"
diff --git a/mi/mipushpxl.c b/mi/mipushpxl.c
index 462d93191..0c8d32ae6 100644
--- a/mi/mipushpxl.c
+++ b/mi/mipushpxl.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mi/mipushpxl.c,v 3.12 2001/12/14 20:00:26 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/mipushpxl.c,v 3.13 2003/07/16 01:38:57 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -50,7 +50,7 @@ SOFTWARE.
#include "gcstruct.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "../mfb/maskbits.h"
#include "mi.h"
diff --git a/mi/miregion.c b/mi/miregion.c
index 9a40e7757..ef666c321 100644
--- a/mi/miregion.c
+++ b/mi/miregion.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mi/miregion.c,v 1.8 2001/12/14 20:00:26 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/miregion.c,v 1.10 2003/07/16 01:38:57 dawes Exp $ */
/***********************************************************
Copyright 1987, 1988, 1989, 1998 The Open Group
@@ -70,7 +70,6 @@ SOFTWARE.
* *
*****************************************************************/
-#include "miscstruct.h"
#include "regionstr.h"
#include "Xprotostr.h"
#include "gc.h"
@@ -236,25 +235,27 @@ miPrintRegion(rgn)
ErrorF("\n");
return(num);
}
-
+#endif /* DEBUG */
Bool
-miRegionsEqual(reg1, reg2)
+miRegionEqual(reg1, reg2)
RegionPtr reg1;
RegionPtr reg2;
{
- int i;
+ int i, num;
BoxPtr rects1, rects2;
if (reg1->extents.x1 != reg2->extents.x1) return FALSE;
if (reg1->extents.x2 != reg2->extents.x2) return FALSE;
if (reg1->extents.y1 != reg2->extents.y1) return FALSE;
if (reg1->extents.y2 != reg2->extents.y2) return FALSE;
- if (REGION_NUM_RECTS(reg1) != REGION_NUM_RECTS(reg2)) return FALSE;
+
+ num = REGION_NUM_RECTS(reg1);
+ if (num != REGION_NUM_RECTS(reg2)) return FALSE;
rects1 = REGION_RECTS(reg1);
rects2 = REGION_RECTS(reg2);
- for (i = 0; i != REGION_NUM_RECTS(reg1); i++) {
+ for (i = 0; i != num; i++) {
if (rects1[i].x1 != rects2[i].x1) return FALSE;
if (rects1[i].x2 != rects2[i].x2) return FALSE;
if (rects1[i].y1 != rects2[i].y1) return FALSE;
@@ -263,6 +264,7 @@ miRegionsEqual(reg1, reg2)
return TRUE;
}
+#ifdef DEBUG
Bool
miValidRegion(reg)
RegionPtr reg;
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index ee199d24d..edb5f7d78 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/programs/Xserver/mi/miscrinit.c,v 3.15 2001/12/14 20:00:26 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/miscrinit.c,v 3.16 2003/04/23 21:51:53 tsi Exp $ */
#include "X.h"
#include "servermd.h"
@@ -277,6 +277,7 @@ miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,
pScreen->RectIn = miRectIn;
pScreen->PointInRegion = miPointInRegion;
pScreen->RegionNotEmpty = miRegionNotEmpty;
+ pScreen->RegionEqual = miRegionEqual;
pScreen->RegionBroken = miRegionBroken;
pScreen->RegionBreak = miRegionBreak;
pScreen->RegionEmpty = miRegionEmpty;
diff --git a/mi/mistruct.h b/mi/mistruct.h
index 28994fec5..0744b2593 100644
--- a/mi/mistruct.h
+++ b/mi/mistruct.h
@@ -45,11 +45,13 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/programs/Xserver/mi/mistruct.h,v 1.3 2003/07/16 01:38:57 dawes Exp $ */
+
#ifndef MISTRUCT_H
#define MISTRUCT_H
#include "mi.h"
-#include "miscstruct.h"
+#include "regionstr.h"
/* information about dashes */
typedef struct _miDash {
diff --git a/mi/mivalidate.h b/mi/mivalidate.h
index cca4a1b7c..c1ef15bb1 100644
--- a/mi/mivalidate.h
+++ b/mi/mivalidate.h
@@ -26,12 +26,12 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
+/* $XFree86: xc/programs/Xserver/mi/mivalidate.h,v 1.3 2003/07/16 01:38:57 dawes Exp $ */
#ifndef MIVALIDATE_H
#define MIVALIDATE_H
-#include "miscstruct.h"
#include "regionstr.h"
typedef union _Validate {
diff --git a/mi/mivaltree.c b/mi/mivaltree.c
index eb1e01e60..90ba5d98e 100644
--- a/mi/mivaltree.c
+++ b/mi/mivaltree.c
@@ -73,7 +73,7 @@ in this Software without prior written authorization from The Open Group.
* *
*****************************************************************/
-/* $XFree86: xc/programs/Xserver/mi/mivaltree.c,v 1.9 2001/12/14 20:00:27 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/mivaltree.c,v 1.10 2003/11/10 18:22:49 tsi Exp $ */
/*
* Aug '86: Susan Angebranndt -- original code
@@ -291,9 +291,8 @@ miComputeClips (
}
if (pChild->valdata)
{
- REGION_INIT(pScreen,
- &pChild->valdata->after.borderExposed,
- NullBox, 0);
+ REGION_NULL(pScreen,
+ &pChild->valdata->after.borderExposed);
if (HasParentRelativeBorder(pChild))
{
REGION_SUBTRACT(pScreen,
@@ -301,8 +300,7 @@ miComputeClips (
&pChild->borderClip,
&pChild->winSize);
}
- REGION_INIT( pScreen, &pChild->valdata->after.exposed,
- NullBox, 0);
+ REGION_NULL(pScreen, &pChild->valdata->after.exposed);
}
if (pChild->firstChild)
{
@@ -343,8 +341,8 @@ miComputeClips (
borderVisible = pParent->valdata->before.borderVisible;
resized = pParent->valdata->before.resized;
- REGION_INIT( pScreen, &pParent->valdata->after.borderExposed, NullBox, 0);
- REGION_INIT( pScreen, &pParent->valdata->after.exposed, NullBox, 0);
+ REGION_NULL(pScreen, &pParent->valdata->after.borderExposed);
+ REGION_NULL(pScreen, &pParent->valdata->after.exposed);
/*
* Since the borderClip must not be clipped by the children, we do
@@ -394,8 +392,8 @@ miComputeClips (
if ((pChild = pParent->firstChild) && pParent->mapped)
{
- REGION_INIT(pScreen, &childUniverse, NullBox, 0);
- REGION_INIT(pScreen, &childUnion, NullBox, 0);
+ REGION_NULL(pScreen, &childUniverse);
+ REGION_NULL(pScreen, &childUnion);
if ((pChild->drawable.y < pParent->lastChild->drawable.y) ||
((pChild->drawable.y == pParent->lastChild->drawable.y) &&
(pChild->drawable.x < pParent->lastChild->drawable.x)))
@@ -589,8 +587,8 @@ miValidateTree (pParent, pChild, kind)
if (pChild == NullWindow)
pChild = pParent->firstChild;
- REGION_INIT(pScreen, &childClip, NullBox, 0);
- REGION_INIT(pScreen, &exposed, NullBox, 0);
+ REGION_NULL(pScreen, &childClip);
+ REGION_NULL(pScreen, &exposed);
/*
* compute the area of the parent window occupied
@@ -598,7 +596,7 @@ miValidateTree (pParent, pChild, kind)
* is the area which can be divied up among the marked
* children in their new configuration.
*/
- REGION_INIT(pScreen, &totalClip, NullBox, 0);
+ REGION_NULL(pScreen, &totalClip);
viewvals = 0;
if (REGION_BROKEN (pScreen, &pParent->clipList) &&
!REGION_BROKEN (pScreen, &pParent->borderClip))
@@ -680,7 +678,7 @@ miValidateTree (pParent, pChild, kind)
* lower than the cost of multiple Subtracts in the
* loop below.
*/
- REGION_INIT(pScreen, &childUnion, NullBox, 0);
+ REGION_NULL(pScreen, &childUnion);
if (forward)
{
for (pWin = pChild; pWin; pWin = pWin->nextSib)
@@ -744,8 +742,8 @@ miValidateTree (pParent, pChild, kind)
REGION_UNINIT(pScreen, &childUnion);
}
- REGION_INIT( pScreen, &pParent->valdata->after.exposed, NullBox, 0);
- REGION_INIT( pScreen, &pParent->valdata->after.borderExposed, NullBox, 0);
+ REGION_NULL(pScreen, &pParent->valdata->after.exposed);
+ REGION_NULL(pScreen, &pParent->valdata->after.borderExposed);
/*
* each case below is responsible for updating the
diff --git a/mi/miwideline.c b/mi/miwideline.c
index 4eb365aca..84b4346f2 100644
--- a/mi/miwideline.c
+++ b/mi/miwideline.c
@@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/programs/Xserver/mi/miwideline.c,v 1.12 2001/12/14 20:00:28 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/miwideline.c,v 1.13 2003/07/16 01:38:57 dawes Exp $ */
/* Author: Keith Packard, MIT X Consortium */
@@ -46,7 +46,7 @@ from The Open Group.
#include "X.h"
#include "windowstr.h"
#include "gcstruct.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "miwideline.h"
#include "mi.h"
diff --git a/mi/miwindow.c b/mi/miwindow.c
index fbced41c6..9c962ee4e 100644
--- a/mi/miwindow.c
+++ b/mi/miwindow.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mi/miwindow.c,v 1.7 2001/12/14 20:00:28 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/miwindow.c,v 1.10 2003/11/10 18:22:49 tsi Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -47,7 +47,7 @@ SOFTWARE.
******************************************************************/
/* $Xorg: miwindow.c,v 1.4 2001/02/09 02:05:22 xorgcvs Exp $ */
#include "X.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "region.h"
#include "mi.h"
#include "windowstr.h"
@@ -196,7 +196,7 @@ miCheckSubSaveUnder(
{
if (!subInited)
{
- REGION_INIT(pScreen, &SubRegion, NullBox, 0);
+ REGION_NULL(pScreen, &SubRegion);
subInited = TRUE;
}
REGION_COPY(pScreen, &SubRegion, pRegion);
@@ -279,7 +279,7 @@ miChangeSaveUnder(pWin, first)
numSaveUndersViewable += deltaSaveUndersViewable;
deltaSaveUndersViewable = 0;
pScreen = pWin->drawable.pScreen;
- REGION_INIT(pScreen, &rgn, NullBox, 1);
+ REGION_NULL(pScreen, &rgn);
res = miCheckSubSaveUnder (pWin->parent,
pWin->saveUnder ? first : pWin->nextSib,
&rgn);
@@ -1076,7 +1076,6 @@ miChangeBorderWidth(pWin, width)
register WindowPtr pWin;
unsigned int width;
{
- WindowPtr pParent;
int oldwidth;
Bool anyMarked = FALSE;
register ScreenPtr pScreen;
@@ -1092,7 +1091,6 @@ miChangeBorderWidth(pWin, width)
return;
HadBorder = HasBorder(pWin);
pScreen = pWin->drawable.pScreen;
- pParent = pWin->parent;
if (WasViewable && width < oldwidth)
anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pWin, &pLayerWin);
diff --git a/mi/mizerarc.c b/mi/mizerarc.c
index 971e2cb03..e2233e78e 100644
--- a/mi/mizerarc.c
+++ b/mi/mizerarc.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/mi/mizerarc.c,v 1.6 2001/12/14 20:00:28 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/mi/mizerarc.c,v 1.7 2003/07/16 01:38:59 dawes Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
@@ -38,7 +38,7 @@ Author: Bob Scheifler, MIT X Consortium
#include <math.h>
#include "X.h"
#include "Xprotostr.h"
-#include "miscstruct.h"
+#include "regionstr.h"
#include "gcstruct.h"
#include "pixmapstr.h"
#include "mi.h"
diff --git a/miext/layer/layerinit.c b/miext/layer/layerinit.c
index dfeae6c2d..6cbca7150 100644
--- a/miext/layer/layerinit.c
+++ b/miext/layer/layerinit.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/miext/layer/layerinit.c,v 1.6 2002/11/08 22:19:42 keithp Exp $
+ * $XFree86: xc/programs/Xserver/miext/layer/layerinit.c,v 1.7 2003/11/10 18:22:49 tsi Exp $
*
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -273,7 +273,7 @@ LayerCreate (ScreenPtr pScreen,
if (pPixmap)
pPixmap->refcnt++;
}
- REGION_INIT (pScreen, &pLay->region, NullBox, 0);
+ REGION_NULL(pScreen, &pLay->region);
/*
* Hook the layer at the end of the list
*/
diff --git a/miext/layer/layerpict.c b/miext/layer/layerpict.c
index e233d0271..ef412a2c5 100644
--- a/miext/layer/layerpict.c
+++ b/miext/layer/layerpict.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/miext/layer/layerpict.c,v 1.1 2001/05/29 04:54:13 keithp Exp $
+ * $XFree86: xc/programs/Xserver/miext/layer/layerpict.c,v 1.2 2003/08/22 19:27:32 eich Exp $
*
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
*
diff --git a/miext/layer/layerstr.h b/miext/layer/layerstr.h
index 1720a536c..401dfd96f 100644
--- a/miext/layer/layerstr.h
+++ b/miext/layer/layerstr.h
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/miext/layer/layerstr.h,v 1.3 2002/11/08 22:19:42 keithp Exp $
+ * $XFree86: xc/programs/Xserver/miext/layer/layerstr.h,v 1.4 2003/08/22 19:27:32 eich Exp $
*
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -72,11 +72,11 @@ typedef struct _LayerKind {
DestroyPixmapProcPtr DestroyPixmap;
CreateGCProcPtr CreateGC;
-
+#ifdef RENDER
CompositeProcPtr Composite;
GlyphsProcPtr Glyphs;
CompositeRectsProcPtr CompositeRects;
-
+#endif
} LayerKindRec;
#define LayerWrap(orig,lay,member,func) \
@@ -194,6 +194,7 @@ layerDestroyPixmap (PixmapPtr pPixmap);
Bool
layerCreateGC (GCPtr pGC);
+#ifdef RENDER
void
layerComposite (CARD8 op,
PicturePtr pSrc,
@@ -224,7 +225,7 @@ layerCompositeRects (CARD8 op,
xRenderColor *color,
int nRect,
xRectangle *rects);
-
+#endif
void layerValidateGC(GCPtr, unsigned long, DrawablePtr);
void layerChangeGC(GCPtr, unsigned long);
void layerCopyGC(GCPtr, unsigned long, GCPtr);
diff --git a/miext/layer/layerwin.c b/miext/layer/layerwin.c
index 8160000c8..44a5df24c 100644
--- a/miext/layer/layerwin.c
+++ b/miext/layer/layerwin.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/miext/layer/layerwin.c,v 1.7 2002/11/08 22:19:42 keithp Exp $
+ * $XFree86: xc/programs/Xserver/miext/layer/layerwin.c,v 1.8 2003/11/10 18:22:49 tsi Exp $
*
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -35,16 +35,16 @@ NewLayerList (ScreenPtr pScreen, LayerPtr pLayer)
pLayList->pNext = 0;
pLayList->pLayer = pLayer;
pLayList->inheritClip = TRUE;
- REGION_INIT (pScreen, &pLayList->clipList, NullBox, 0);
- REGION_INIT (pScreen, &pLayList->borderClip, NullBox, 0);
+ REGION_NULL (pScreen, &pLayList->clipList);
+ REGION_NULL (pScreen, &pLayList->borderClip);
return pLayList;
}
static void
FreeLayerList (ScreenPtr pScreen, LayerListPtr pLayList)
{
- REGION_UNINIT (&pScreen, &pLayList->clipList);
- REGION_UNINIT (&pScreen, &pLayList->borderClip);
+ REGION_UNINIT (pScreen, &pLayList->clipList);
+ REGION_UNINIT (pScreen, &pLayList->borderClip);
xfree (pLayList);
}
diff --git a/miext/shadow/shadow.c b/miext/shadow/shadow.c
index 60a1555d8..38a92953f 100644
--- a/miext/shadow/shadow.c
+++ b/miext/shadow/shadow.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/miext/shadow/shadow.c,v 1.13 2002/12/02 20:37:23 tsi Exp $
+ * $XFree86: xc/programs/Xserver/miext/shadow/shadow.c,v 1.15 2003/11/10 18:22:51 tsi Exp $
*
* Copyright © 2000 Keith Packard
*
@@ -413,7 +413,7 @@ shadowFillSpans(
while(--i) {
ppt++;
- pwidthInit++;
+ pwidth++;
if(box.x1 > ppt->x) box.x1 = ppt->x;
if(box.x2 < (ppt->x + *pwidth))
box.x2 = ppt->x + *pwidth;
@@ -425,7 +425,11 @@ shadowFillSpans(
(*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted);
- TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC);
+ if(!pGC->miTranslate) {
+ TRANSLATE_BOX(box, pDraw);
+ }
+ TRIM_BOX(box, pGC);
+
if(BOX_NOT_EMPTY(box))
shadowDamageBox ((WindowPtr) pDraw, &box);
} else
@@ -471,7 +475,11 @@ shadowSetSpans(
(*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, pptInit,
pwidthInit, nspans, fSorted);
- TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC);
+ if(!pGC->miTranslate) {
+ TRANSLATE_BOX(box, pDraw);
+ }
+ TRIM_BOX(box, pGC);
+
if(BOX_NOT_EMPTY(box))
shadowDamageBox ((WindowPtr) pDraw, &box);
} else
@@ -1254,9 +1262,15 @@ shadowPushPixels(
if(IS_VISIBLE(pDraw)) {
BoxRec box;
- box.x1 = xOrg + pDraw->x;
+ box.x1 = xOrg;
+ box.y1 = yOrg;
+
+ if(!pGC->miTranslate) {
+ box.x1 += pDraw->x;
+ box.y1 += pDraw->y;
+ }
+
box.x2 = box.x1 + dx;
- box.y1 = yOrg + pDraw->y;
box.y2 = box.y1 + dy;
TRIM_BOX(box, pGC);
@@ -1459,7 +1473,7 @@ shadowAdd (ScreenPtr pScreen,
pBuf->pPixmap = pPixmap;
pBuf->update = update;
pBuf->window = window;
- REGION_INIT (pScreen, &pBuf->damage, NullBox, 0);
+ REGION_NULL(pScreen, &pBuf->damage);
pBuf->pNext = pScrPriv->pBuf;
pBuf->randr = randr;
pBuf->closure = 0;
diff --git a/os/WaitFor.c b/os/WaitFor.c
index 76fa67327..221296d11 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/os/WaitFor.c,v 3.38 2002/05/31 18:46:05 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/os/WaitFor.c,v 3.43 2003/10/29 04:17:22 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -112,7 +112,7 @@ struct _OsTimerRec {
};
static void DoTimer(OsTimerPtr timer, CARD32 now, OsTimerPtr *prev);
-static OsTimerPtr timers;
+static OsTimerPtr timers = NULL;
/*****************
* WaitForSomething:
@@ -131,18 +131,12 @@ static OsTimerPtr timers;
* pClientsReady is an array to store ready client->index values into.
*****************/
-static INT32 timeTilFrob = 0; /* while screen saving */
-
int
-WaitForSomething(pClientsReady)
- int *pClientsReady;
+WaitForSomething(int *pClientsReady)
{
int i;
struct timeval waittime, *wt;
INT32 timeout = 0;
-#ifdef DPMSExtension
- INT32 standbyTimeout = 0, suspendTimeout = 0, offTimeout = 0;
-#endif
fd_set clientsReadable;
fd_set clientsWritable;
int curclient;
@@ -189,138 +183,17 @@ WaitForSomething(pClientsReady)
else
{
#endif
-#ifdef DPMSExtension
- if (ScreenSaverTime > 0 || DPMSEnabled || timers)
-#else
- if (ScreenSaverTime > 0 || timers)
-#endif
- now = GetTimeInMillis();
- wt = NULL;
+ wt = NULL;
if (timers)
- {
- while (timers && (int) (timers->expires - now) <= 0)
- DoTimer(timers, now, &timers);
- if (timers)
- {
- timeout = timers->expires - now;
- waittime.tv_sec = timeout / MILLI_PER_SECOND;
- waittime.tv_usec = (timeout % MILLI_PER_SECOND) *
- (1000000 / MILLI_PER_SECOND);
- wt = &waittime;
- }
- }
- if (ScreenSaverTime > 0
-#ifdef DPMSExtension
- || (DPMSEnabled &&
- (DPMSStandbyTime > 0 || DPMSSuspendTime > 0 || DPMSOffTime > 0))
-#endif
- ) {
-#ifdef DPMSExtension
- if (ScreenSaverTime > 0)
-#endif
- timeout = (ScreenSaverTime -
- (now - lastDeviceEventTime.milliseconds));
-#ifdef DPMSExtension
- if (DPMSStandbyTime > 0)
- standbyTimeout = (DPMSStandbyTime -
- (now - lastDeviceEventTime.milliseconds));
- if (DPMSSuspendTime > 0)
- suspendTimeout = (DPMSSuspendTime -
- (now - lastDeviceEventTime.milliseconds));
- if (DPMSOffTime > 0)
- offTimeout = (DPMSOffTime -
- (now - lastDeviceEventTime.milliseconds));
-#endif /* DPMSExtension */
-
- if (
- timeout <= 0
-#ifdef DPMSExtension
- && ScreenSaverTime > 0
-#endif /* DPMSExtension */
- ) {
- INT32 timeSinceSave;
-
- timeSinceSave = -timeout;
- if (timeSinceSave >= timeTilFrob && timeTilFrob >= 0)
- {
- ResetOsBuffers(); /* not ideal, but better than nothing */
- SaveScreens(SCREEN_SAVER_ON, ScreenSaverActive);
-#ifdef DPMSExtension
- if (ScreenSaverInterval > 0 &&
- DPMSPowerLevel == DPMSModeOn)
-#else
- if (ScreenSaverInterval)
-#endif /* DPMSExtension */
- /* round up to the next ScreenSaverInterval */
- timeTilFrob = ScreenSaverInterval *
- ((timeSinceSave + ScreenSaverInterval) /
- ScreenSaverInterval);
- else
- timeTilFrob = -1;
- }
- timeout = timeTilFrob - timeSinceSave;
- }
- else
- {
- if (ScreenSaverTime > 0 && timeout > ScreenSaverTime)
- timeout = ScreenSaverTime;
- timeTilFrob = 0;
- }
-#ifdef DPMSExtension
- if (DPMSEnabled)
- {
- if (standbyTimeout > 0
- && (timeout <= 0 || timeout > standbyTimeout))
- timeout = standbyTimeout;
- if (suspendTimeout > 0
- && (timeout <= 0 || timeout > suspendTimeout))
- timeout = suspendTimeout;
- if (offTimeout > 0
- && (timeout <= 0 || timeout > offTimeout))
- timeout = offTimeout;
- }
-#endif
- if (timeout > 0 && (!wt || timeout < (int) (timers->expires - now)))
- {
- waittime.tv_sec = timeout / MILLI_PER_SECOND;
- waittime.tv_usec = (timeout % MILLI_PER_SECOND) *
- (1000000 / MILLI_PER_SECOND);
- wt = &waittime;
- }
-#ifdef DPMSExtension
- /* don't bother unless it's switched on */
- if (DPMSEnabled) {
- /*
- * If this mode's enabled, and if the time's come
- * and if we're still at a lesser mode, do it now.
- */
- if (DPMSStandbyTime > 0) {
- if (standbyTimeout <= 0) {
- if (DPMSPowerLevel < DPMSModeStandby) {
- DPMSSet(DPMSModeStandby);
- }
- }
- }
- /*
- * and ditto. Note that since these modes can have the
- * same timeouts, they can happen at the same time.
- */
- if (DPMSSuspendTime > 0) {
- if (suspendTimeout <= 0) {
- if (DPMSPowerLevel < DPMSModeSuspend) {
- DPMSSet(DPMSModeSuspend);
- }
- }
- }
- if (DPMSOffTime > 0) {
- if (offTimeout <= 0) {
- if (DPMSPowerLevel < DPMSModeOff) {
- DPMSSet(DPMSModeOff);
- }
- }
- }
- }
-#endif
+ {
+ now = GetTimeInMillis();
+ timeout = timers->expires - now;
+ if (timeout < 0)
+ timeout = 0;
+ waittime.tv_sec = timeout / MILLI_PER_SECOND;
+ waittime.tv_usec = (timeout % MILLI_PER_SECOND) *
+ (1000000 / MILLI_PER_SECOND);
+ wt = &waittime;
}
XFD_COPYSET(&AllSockets, &LastSelectMask);
#ifdef SMART_SCHEDULE
@@ -399,18 +272,42 @@ WaitForSomething(pClientsReady)
break;
}
#endif
+ if (*checkForInput[0] != *checkForInput[1])
+ return 0;
+
if (timers)
{
+ int expired = 0;
now = GetTimeInMillis();
+ if ((int) (timers->expires - now) <= 0)
+ expired = 1;
+
while (timers && (int) (timers->expires - now) <= 0)
DoTimer(timers, now, &timers);
+
+ if (expired)
+ return 0;
}
- if (*checkForInput[0] != *checkForInput[1])
- return 0;
}
else
{
fd_set tmp_set;
+
+ if (*checkForInput[0] == *checkForInput[1]) {
+ if (timers)
+ {
+ int expired = 0;
+ now = GetTimeInMillis();
+ if ((int) (timers->expires - now) <= 0)
+ expired = 1;
+
+ while (timers && (int) (timers->expires - now) <= 0)
+ DoTimer(timers, now, &timers);
+
+ if (expired)
+ return 0;
+ }
+ }
#ifdef SMART_SCHEDULE
if (someReady)
XFD_ORSET(&LastSelectMask, &ClientsWithInput, &LastSelectMask);
@@ -511,8 +408,7 @@ WaitForSomething(pClientsReady)
/*
* This is not always a macro.
*/
-ANYSET(src)
- FdMask *src;
+ANYSET(FdMask *src)
{
int i;
@@ -537,12 +433,8 @@ DoTimer(OsTimerPtr timer, CARD32 now, OsTimerPtr *prev)
}
OsTimerPtr
-TimerSet(timer, flags, millis, func, arg)
- register OsTimerPtr timer;
- int flags;
- CARD32 millis;
- OsTimerCallback func;
- pointer arg;
+TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
+ OsTimerCallback func, pointer arg)
{
register OsTimerPtr *prev;
CARD32 now = GetTimeInMillis();
@@ -573,7 +465,7 @@ TimerSet(timer, flags, millis, func, arg)
timer->expires = millis;
timer->callback = func;
timer->arg = arg;
- if (millis <= now)
+ if ((int) (millis - now) <= 0)
{
timer->next = NULL;
millis = (*timer->callback)(timer, now, timer->arg);
@@ -590,10 +482,9 @@ TimerSet(timer, flags, millis, func, arg)
}
Bool
-TimerForce(timer)
- register OsTimerPtr timer;
+TimerForce(OsTimerPtr timer)
{
- register OsTimerPtr *prev;
+ OsTimerPtr *prev;
for (prev = &timers; *prev; prev = &(*prev)->next)
{
@@ -608,10 +499,9 @@ TimerForce(timer)
void
-TimerCancel(timer)
- register OsTimerPtr timer;
+TimerCancel(OsTimerPtr timer)
{
- register OsTimerPtr *prev;
+ OsTimerPtr *prev;
if (!timer)
return;
@@ -626,8 +516,7 @@ TimerCancel(timer)
}
void
-TimerFree(timer)
- register OsTimerPtr timer;
+TimerFree(OsTimerPtr timer)
{
if (!timer)
return;
@@ -636,16 +525,16 @@ TimerFree(timer)
}
void
-TimerCheck()
+TimerCheck(void)
{
- register CARD32 now = GetTimeInMillis();
+ CARD32 now = GetTimeInMillis();
while (timers && (int) (timers->expires - now) <= 0)
DoTimer(timers, now, &timers);
}
void
-TimerInit()
+TimerInit(void)
{
OsTimerPtr timer;
@@ -655,3 +544,133 @@ TimerInit()
xfree(timer);
}
}
+
+static CARD32
+ScreenSaverTimeoutExpire(OsTimerPtr timer,CARD32 now,pointer arg)
+{
+ INT32 timeout = now - lastDeviceEventTime.milliseconds;
+
+ if (timeout < ScreenSaverTime) {
+ return ScreenSaverTime - timeout;
+ }
+
+ ResetOsBuffers(); /* not ideal, but better than nothing */
+ SaveScreens(SCREEN_SAVER_ON, ScreenSaverActive);
+
+#ifdef DPMSExtension
+ if (ScreenSaverInterval > 0 && DPMSPowerLevel == DPMSModeOn)
+#else
+ if (ScreenSaverInterval > 0)
+#endif /* DPMSExtension */
+ return ScreenSaverInterval;
+
+ return 0;
+}
+
+static OsTimerPtr ScreenSaverTimer = NULL;
+
+void
+FreeScreenSaverTimer(void)
+{
+ if (ScreenSaverTimer) {
+ TimerFree(ScreenSaverTimer);
+ ScreenSaverTimer = NULL;
+ }
+}
+
+void
+SetScreenSaverTimer(void)
+{
+ if (ScreenSaverTime > 0) {
+ ScreenSaverTimer = TimerSet(ScreenSaverTimer, 0, ScreenSaverTime,
+ ScreenSaverTimeoutExpire, NULL);
+ } else if (ScreenSaverTimer) {
+ FreeScreenSaverTimer();
+ }
+}
+
+#ifdef DPMSExtension
+
+static OsTimerPtr DPMSStandbyTimer = NULL;
+static OsTimerPtr DPMSSuspendTimer = NULL;
+static OsTimerPtr DPMSOffTimer = NULL;
+
+static CARD32
+DPMSStandbyTimerExpire(OsTimerPtr timer,CARD32 now,pointer arg)
+{
+ INT32 timeout = now - lastDeviceEventTime.milliseconds;
+
+ if (timeout < DPMSStandbyTime) {
+ return DPMSStandbyTime - timeout;
+ }
+ if (DPMSPowerLevel < DPMSModeStandby) {
+ DPMSSet(DPMSModeStandby);
+ }
+ return DPMSStandbyTime;
+}
+
+static CARD32
+DPMSSuspendTimerExpire(OsTimerPtr timer,CARD32 now,pointer arg)
+{
+ INT32 timeout = now - lastDeviceEventTime.milliseconds;
+
+ if (timeout < DPMSSuspendTime) {
+ return DPMSSuspendTime - timeout;
+ }
+ if (DPMSPowerLevel < DPMSModeSuspend) {
+ DPMSSet(DPMSModeSuspend);
+ }
+ return DPMSSuspendTime;
+}
+
+static CARD32
+DPMSOffTimerExpire(OsTimerPtr timer,CARD32 now,pointer arg)
+{
+ INT32 timeout = now - lastDeviceEventTime.milliseconds;
+
+ if (timeout < DPMSOffTime) {
+ return DPMSOffTime - timeout;
+ }
+ if (DPMSPowerLevel < DPMSModeOff) {
+ DPMSSet(DPMSModeOff);
+ }
+ return DPMSOffTime;
+}
+
+void
+FreeDPMSTimers(void)
+{
+ if (DPMSStandbyTimer) {
+ TimerFree(DPMSStandbyTimer);
+ DPMSStandbyTimer = NULL;
+ }
+ if (DPMSSuspendTimer) {
+ TimerFree(DPMSSuspendTimer);
+ DPMSSuspendTimer = NULL;
+ }
+ if (DPMSOffTimer) {
+ TimerFree(DPMSOffTimer);
+ DPMSOffTimer = NULL;
+ }
+}
+
+void
+SetDPMSTimers(void)
+{
+ if (!DPMSEnabled)
+ return;
+
+ if (DPMSStandbyTime > 0) {
+ DPMSStandbyTimer = TimerSet(DPMSStandbyTimer, 0, DPMSStandbyTime,
+ DPMSStandbyTimerExpire, NULL);
+ }
+ if (DPMSSuspendTime > 0) {
+ DPMSSuspendTimer = TimerSet(DPMSSuspendTimer, 0, DPMSSuspendTime,
+ DPMSSuspendTimerExpire, NULL);
+ }
+ if (DPMSOffTime > 0) {
+ DPMSOffTimer = TimerSet(DPMSOffTimer, 0, DPMSOffTime,
+ DPMSOffTimerExpire, NULL);
+ }
+}
+#endif
diff --git a/os/access.c b/os/access.c
index f12c5c081..77dcebe20 100644
--- a/os/access.c
+++ b/os/access.c
@@ -45,13 +45,14 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/os/access.c,v 3.42 2002/07/07 20:11:52 herrb Exp $ */
+/* $XFree86: xc/programs/Xserver/os/access.c,v 3.50 2003/11/03 05:12:00 tsi Exp $ */
#ifdef WIN32
#include <X11/Xwinsock.h>
#endif
#include <stdio.h>
+#include <stdlib.h>
#include <X11/Xtrans.h>
#include <X11/Xauth.h>
#include <X.h>
@@ -142,6 +143,19 @@ SOFTWARE.
#include <ifaddrs.h>
#endif
+/* Solaris provides an extended interface SIOCGLIFCONF. Other systems
+ * may have this as well, but the code has only been tested on Solaris
+ * so far, so we only enable it there. Other platforms may be added as
+ * needed.
+ *
+ * Test for Solaris commented out -- TSI @ UQV 2003.06.13
+ */
+#ifdef SIOCGLIFCONF
+/* #if defined(sun) */
+#define USE_SIOCGLIFCONF
+/* #endif */
+#endif
+
#endif /* WIN32 */
#ifndef PATH_MAX
@@ -170,6 +184,14 @@ SOFTWARE.
#include "extensions/security.h"
#endif
+#ifndef PATH_MAX
+#ifdef MAXPATHLEN
+#define PATH_MAX MAXPATHLEN
+#else
+#define PATH_MAX 1024
+#endif
+#endif
+
Bool defeatAccessControl = FALSE;
#define acmp(a1, a2, len) memcmp((char *)(a1), (char *)(a2), len)
@@ -189,23 +211,35 @@ static int CheckAddr(int /*family*/,
static Bool NewHost(int /*family*/,
pointer /*addr*/,
- int /*len*/);
+ int /*len*/,
+ int /* addingLocalHosts */);
+
+/* XFree86 bug #156: To keep track of which hosts were explicitly requested in
+ /etc/X<display>.hosts, we've added a requested field to the HOST struct,
+ and a LocalHostRequested variable. These default to FALSE, but are set
+ to TRUE in ResetHosts when reading in /etc/X<display>.hosts. They are
+ checked in DisableLocalHost(), which is called to disable the default
+ local host entries when stronger authentication is turned on. */
typedef struct _host {
short family;
short len;
unsigned char *addr;
struct _host *next;
+ int requested;
} HOST;
#define MakeHost(h,l) (h)=(HOST *) xalloc(sizeof *(h)+(l));\
- if((h))\
- (h)->addr=(unsigned char *) ((h) + 1);
+ if (h) { \
+ (h)->addr=(unsigned char *) ((h) + 1);\
+ (h)->requested = FALSE; \
+ }
#define FreeHost(h) xfree(h)
static HOST *selfhosts = NULL;
static HOST *validhosts = NULL;
static int AccessEnabled = DEFAULT_ACCESS_CONTROL;
static int LocalHostEnabled = FALSE;
+static int LocalHostRequested = FALSE;
static int UsingXdmcp = FALSE;
@@ -232,9 +266,12 @@ DisableLocalHost (void)
{
HOST *self;
- LocalHostEnabled = FALSE;
- for (self = selfhosts; self; self = self->next)
+ if (!LocalHostRequested) /* Fix for XFree86 bug #156 */
+ LocalHostEnabled = FALSE;
+ for (self = selfhosts; self; self = self->next) {
+ if (!self->requested) /* Fix for XFree86 bug #156 */
(void) RemoveHost ((ClientPtr)NULL, self->family, self->len, (pointer)self->addr);
+ }
}
/*
@@ -250,7 +287,7 @@ AccessUsingXdmcp (void)
}
-#if ((defined(SVR4) && !defined(DGUX) && !defined(SCO325) && !defined(sun) && !defined(NCR)) || defined(ISC)) && defined(SIOCGIFCONF)
+#if ((defined(SVR4) && !defined(DGUX) && !defined(SCO325) && !defined(sun) && !defined(NCR)) || defined(ISC)) && defined(SIOCGIFCONF) && !defined(USE_SIOCGLIFCONF)
/* Deal with different SIOCGIFCONF ioctl semantics on these OSs */
@@ -465,9 +502,13 @@ DefineSelf (int fd)
union {
struct sockaddr sa;
struct sockaddr_in in;
+#if defined(IPv6) && defined(AF_INET6)
+ struct sockaddr_in6 in6;
+#endif
} saddr;
struct sockaddr_in *inetaddr;
+ struct sockaddr_in6 *inet6addr;
struct sockaddr_in broad_addr;
#ifdef XTHREADS_NEEDS_BYNAMEPARAMS
_Xgethostbynameparams hparams;
@@ -492,9 +533,22 @@ DefineSelf (int fd)
if (hp != NULL)
{
saddr.sa.sa_family = hp->h_addrtype;
- inetaddr = (struct sockaddr_in *) (&(saddr.sa));
- acopy ( hp->h_addr, &(inetaddr->sin_addr), hp->h_length);
- len = sizeof(saddr.sa);
+ switch (hp->h_addrtype) {
+ case AF_INET:
+ inetaddr = (struct sockaddr_in *) (&(saddr.sa));
+ acopy ( hp->h_addr, &(inetaddr->sin_addr), hp->h_length);
+ len = sizeof(saddr.sa);
+ break;
+#if defined(IPv6) && defined(AF_INET6)
+ case AF_INET6:
+ inet6addr = (struct sockaddr_in6 *) (&(saddr.sa));
+ acopy ( hp->h_addr, &(inet6addr->sin6_addr), hp->h_length);
+ len = sizeof(saddr.in6);
+ break;
+#endif
+ default:
+ goto DefineLocalHost;
+ }
family = ConvertAddr ( &(saddr.sa), &len, (pointer *)&addr);
if ( family != -1 && family != FamilyLocal )
{
@@ -530,6 +584,14 @@ DefineSelf (int fd)
XdmcpRegisterBroadcastAddress ((struct sockaddr_in *)
&broad_addr);
}
+#if defined(IPv6) && defined(AF_INET6)
+ else if (family == FamilyInternet6 &&
+ !(IN6_IS_ADDR_LOOPBACK((struct in6_addr *)addr)))
+ {
+ XdmcpRegisterConnection (family, (char *)addr, len);
+ }
+#endif
+
#endif /* XDMCP */
}
}
@@ -537,6 +599,7 @@ DefineSelf (int fd)
/*
* now add a host of family FamilyLocalHost...
*/
+DefineLocalHost:
for (host = selfhosts;
host && !addrEqual(FamilyLocalHost, "", 0, host);
host = host->next);
@@ -557,6 +620,12 @@ DefineSelf (int fd)
#else
+#ifdef USE_SIOCGLIFCONF
+#define ifr_type struct lifreq
+#else
+#define ifr_type struct ifreq
+#endif
+
#ifdef VARIABLE_IFREQ
#define ifr_size(p) (sizeof (struct ifreq) + \
(p->ifr_addr.sa_len > sizeof (p->ifr_addr) ? \
@@ -567,7 +636,7 @@ DefineSelf (int fd)
#define ifr_size(p) (p->ifr_addr.sa_len + IFNAMSIZ)
#define ifraddr_size(a) (a.sa_len)
#else
-#define ifr_size(p) (sizeof (struct ifreq))
+#define ifr_size(p) (sizeof (ifr_type))
#define ifraddr_size(a) (sizeof (a))
#endif
#endif
@@ -581,8 +650,17 @@ DefineSelf (int fd)
{
#ifndef HAS_GETIFADDRS
char buf[2048], *cp, *cplim;
+ void * bufptr = buf;
+#ifdef USE_SIOCGLIFCONF
+ struct lifconf ifc;
+ register struct lifreq *ifr;
+#ifdef SIOCGLIFNUM
+ struct lifnum ifn;
+#endif
+#else
struct ifconf ifc;
register struct ifreq *ifr;
+#endif
#else
struct ifaddrs * ifap, *ifr;
#endif
@@ -621,37 +699,80 @@ DefineSelf (int fd)
}
#endif /* DNETCONN */
#ifndef HAS_GETIFADDRS
- ifc.ifc_len = sizeof (buf);
- ifc.ifc_buf = buf;
- if (ifioctl (fd, SIOCGIFCONF, (pointer) &ifc) < 0)
- Error ("Getting interface configuration (4)");
+ len = sizeof(buf);
+
+#ifdef USE_SIOCGLIFCONF
+
+#ifdef SIOCGLIFNUM
+ ifn.lifn_family = AF_UNSPEC;
+ ifn.lifn_flags = 0;
+ if (ioctl (fd, SIOCGLIFNUM, (char *) &ifn) < 0)
+ Error ("Getting interface count");
+ if (len < (ifn.lifn_count * sizeof(struct lifreq))) {
+ len = ifn.lifn_count * sizeof(struct lifreq);
+ bufptr = xalloc(len);
+ }
+#endif
+
+ ifc.lifc_family = AF_UNSPEC;
+ ifc.lifc_flags = 0;
+ ifc.lifc_len = len;
+ ifc.lifc_buf = bufptr;
+
+#define IFC_IOCTL_REQ SIOCGLIFCONF
+#define IFC_IFC_REQ ifc.lifc_req
+#define IFC_IFC_LEN ifc.lifc_len
+#define IFR_IFR_ADDR ifr->lifr_addr
+#define IFR_IFR_NAME ifr->lifr_name
+
+#else /* Use SIOCGIFCONF */
+ ifc.ifc_len = len;
+ ifc.ifc_buf = bufptr;
+
+#define IFC_IOCTL_REQ SIOCGIFCONF
#ifdef ISC
#define IFC_IFC_REQ (struct ifreq *) ifc.ifc_buf
#else
#define IFC_IFC_REQ ifc.ifc_req
#endif /* ISC */
+#define IFC_IFC_LEN ifc.ifc_len
+#define IFR_IFR_ADDR ifr->ifr_addr
+#define IFR_IFR_NAME ifr->ifr_name
+#endif
+
+ if (ifioctl (fd, IFC_IOCTL_REQ, (pointer) &ifc) < 0)
+ Error ("Getting interface configuration (4)");
- cplim = (char *) IFC_IFC_REQ + ifc.ifc_len;
+ cplim = (char *) IFC_IFC_REQ + IFC_IFC_LEN;
for (cp = (char *) IFC_IFC_REQ; cp < cplim; cp += ifr_size (ifr))
{
- ifr = (struct ifreq *) cp;
- len = ifraddr_size (ifr->ifr_addr);
+ ifr = (ifr_type *) cp;
+ len = ifraddr_size (IFR_IFR_ADDR);
+ family = ConvertAddr ((struct sockaddr *) &IFR_IFR_ADDR,
+ &len, (pointer *)&addr);
#ifdef DNETCONN
/*
* DECnet was handled up above.
*/
- if (ifr->ifr_addr.sa_family == AF_DECnet)
+ if (family == AF_DECnet)
continue;
#endif /* DNETCONN */
- family = ConvertAddr (&ifr->ifr_addr, &len, (pointer *)&addr);
if (family == -1 || family == FamilyLocal)
continue;
#ifdef DEF_SELF_DEBUG
if (family == FamilyInternet)
ErrorF("Xserver: DefineSelf(): ifname = %s, addr = %d.%d.%d.%d\n",
- ifr->ifr_name, addr[0], addr[1], addr[2], addr[3]);
+ IFR_IFR_NAME, addr[0], addr[1], addr[2], addr[3]);
+#if defined(IPv6) && defined(AF_INET6)
+ else if (family == FamilyInternet6) {
+ char cp[INET6_ADDRSTRLEN] = "";
+ inet_ntop(AF_INET6, addr, cp, sizeof(cp));
+ ErrorF("Xserver: DefineSelf(): ifname = %s, addr = %s\n",
+ IFR_IFR_NAME, cp);
+ }
+#endif
#endif /* DEF_SELF_DEBUG */
for (host = selfhosts;
host && !addrEqual (family, addr, len, host);
@@ -670,39 +791,80 @@ DefineSelf (int fd)
}
#ifdef XDMCP
{
+#ifdef USE_SIOCGLIFCONF
+ struct sockaddr_storage broad_addr;
+#else
struct sockaddr broad_addr;
+#endif
/*
* If this isn't an Internet Address, don't register it.
*/
- if (family != FamilyInternet)
+ if (family != FamilyInternet
+#if defined(IPv6) && defined(AF_INET6)
+ && family != FamilyInternet6
+#endif
+ )
continue;
/*
* ignore 'localhost' entries as they're not useful
* on the other end of the wire
*/
- if (len == 4 &&
+ if (family == FamilyInternet &&
addr[0] == 127 && addr[1] == 0 &&
addr[2] == 0 && addr[3] == 1)
continue;
+#if defined(IPv6) && defined(AF_INET6)
+ else if (family == FamilyInternet6 &&
+ IN6_IS_ADDR_LOOPBACK((struct in6_addr *)addr))
+ continue;
+#endif
XdmcpRegisterConnection (family, (char *)addr, len);
- broad_addr = ifr->ifr_addr;
+
+#if defined(IPv6) && defined(AF_INET6)
+ /* IPv6 doesn't support broadcasting, so we drop out here */
+ if (family == FamilyInternet6)
+ continue;
+#endif
+
+ broad_addr = IFR_IFR_ADDR;
+
((struct sockaddr_in *) &broad_addr)->sin_addr.s_addr =
htonl (INADDR_BROADCAST);
-#ifdef SIOCGIFBRDADDR
+#if defined(USE_SIOCGLIFCONF) && defined(SIOCGLIFBRDADDR)
+ {
+ struct lifreq broad_req;
+
+ broad_req = *ifr;
+ if (ioctl (fd, SIOCGLIFFLAGS, (char *) &broad_req) != -1 &&
+ (broad_req.lifr_flags & IFF_BROADCAST) &&
+ (broad_req.lifr_flags & IFF_UP)
+ )
+ {
+ broad_req = *ifr;
+ if (ioctl (fd, SIOCGLIFBRDADDR, &broad_req) != -1)
+ broad_addr = broad_req.lifr_broadaddr;
+ else
+ continue;
+ }
+ else
+ continue;
+ }
+
+#elif defined(SIOCGIFBRDADDR)
{
struct ifreq broad_req;
broad_req = *ifr;
- if (ifioctl (fd, SIOCGIFFLAGS, (char *) &broad_req) != -1 &&
+ if (ifioctl (fd, SIOCGIFFLAGS, (pointer) &broad_req) != -1 &&
(broad_req.ifr_flags & IFF_BROADCAST) &&
(broad_req.ifr_flags & IFF_UP)
)
{
broad_req = *ifr;
- if (ifioctl (fd, SIOCGIFBRDADDR, &broad_req) != -1)
+ if (ifioctl (fd, SIOCGIFBRDADDR, (pointer) &broad_req) != -1)
broad_addr = broad_req.ifr_addr;
else
continue;
@@ -713,13 +875,15 @@ DefineSelf (int fd)
#endif /* SIOCGIFBRDADDR */
#ifdef DEF_SELF_DEBUG
ErrorF("Xserver: DefineSelf(): ifname = %s, baddr = %s\n",
- ifr->ifr_name,
+ IFR_IFR_NAME,
inet_ntoa(((struct sockaddr_in *) &broad_addr)->sin_addr));
#endif /* DEF_SELF_DEBUG */
XdmcpRegisterBroadcastAddress ((struct sockaddr_in *) &broad_addr);
}
#endif /* XDMCP */
}
+ if (bufptr != buf)
+ free(bufptr);
#else /* HAS_GETIFADDRS */
if (getifaddrs(&ifap) < 0) {
ErrorF("Warning: getifaddrs returns %s\n", strerror(errno));
@@ -730,6 +894,7 @@ DefineSelf (int fd)
if (ifr->ifa_addr.sa_family == AF_DECnet)
continue;
#endif /* DNETCONN */
+ len = sizeof(*(ifr->ifa_addr));
family = ConvertAddr(ifr->ifa_addr, &len, (pointer *)&addr);
if (family == -1 || family == FamilyLocal)
continue;
@@ -843,7 +1008,11 @@ AddLocalHosts (void)
HOST *self;
for (self = selfhosts; self; self = self->next)
- (void) NewHost (self->family, self->addr, self->len);
+ /* Fix for XFree86 bug #156: pass addingLocal = TRUE to
+ * NewHost to tell that we are adding the default local
+ * host entries and not to flag the entries as being
+ * explicitely requested */
+ (void) NewHost (self->family, self->addr, self->len, TRUE);
}
/* Reset access control list to initial hosts */
@@ -858,15 +1027,18 @@ ResetHosts (char *display)
FILE *fd;
char *ptr;
int i, hostlen;
+#if ((defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)) && \
+ (!defined(IPv6) || !defined(AF_INET6))) || defined(DNETCONN)
union {
struct sockaddr sa;
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
- struct sockaddr_in in;
+ struct sockaddr_in in;
#endif /* TCPCONN || STREAMSCONN */
#ifdef DNETCONN
- struct sockaddr_dn dn;
+ struct sockaddr_dn dn;
+#endif
+ } saddr;
#endif
- } saddr;
#ifdef DNETCONN
struct nodeent *np;
struct dn_naddr dnaddr, *dnaddrp, *dnet_addr();
@@ -878,7 +1050,6 @@ ResetHosts (char *display)
int family = 0;
pointer addr;
int len;
- register struct hostent *hp;
AccessEnabled = defeatAccessControl ? FALSE : DEFAULT_ACCESS_CONTROL;
LocalHostEnabled = FALSE;
@@ -902,6 +1073,7 @@ ResetHosts (char *display)
{
while (fgets (ohostname, sizeof (ohostname), fd))
{
+ family = FamilyWild;
if (*ohostname == '#')
continue;
if ((ptr = strchr(ohostname, '\n')) != 0)
@@ -917,7 +1089,8 @@ ResetHosts (char *display)
if (!strncmp("local:", lhostname, 6))
{
family = FamilyLocalHost;
- NewHost(family, "", 0);
+ NewHost(family, "", 0, FALSE);
+ LocalHostRequested = TRUE; /* Fix for XFree86 bug #156 */
}
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
else if (!strncmp("inet:", lhostname, 5))
@@ -925,6 +1098,13 @@ ResetHosts (char *display)
family = FamilyInternet;
hostname = ohostname + 5;
}
+#if defined(IPv6) && defined(AF_INET6)
+ else if (!strncmp("inet6:", lhostname, 6))
+ {
+ family = FamilyInternet6;
+ hostname = ohostname + 6;
+ }
+#endif
#endif
#ifdef DNETCONN
else if (!strncmp("dnet:", lhostname, 5))
@@ -969,7 +1149,7 @@ ResetHosts (char *display)
}
if (dnaddrp)
(void) NewHost(FamilyDECnet, (pointer)dnaddrp,
- (int)(dnaddrp->a_len + sizeof(dnaddrp->a_len)));
+ (int)(dnaddrp->a_len + sizeof(dnaddrp->a_len)), FALSE);
}
else
#endif /* DNETCONN */
@@ -978,7 +1158,7 @@ ResetHosts (char *display)
{
krb5_parse_name(hostname, &princ);
XauKrb5Encode(princ, &kbuf);
- (void) NewHost(FamilyKrb5Principal, kbuf.data, kbuf.length);
+ (void) NewHost(FamilyKrb5Principal, kbuf.data, kbuf.length, FALSE);
krb5_free_principal(princ);
}
else
@@ -987,15 +1167,37 @@ ResetHosts (char *display)
if ((family == FamilyNetname) || (strchr(hostname, '@')))
{
SecureRPCInit ();
- (void) NewHost (FamilyNetname, hostname, strlen (hostname));
+ (void) NewHost (FamilyNetname, hostname, strlen (hostname), FALSE);
}
else
#endif /* SECURE_RPC */
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
{
+#if defined(IPv6) && defined(AF_INET6)
+ if ( (family == FamilyInternet) || (family == FamilyInternet6) ||
+ (family == FamilyWild) )
+ {
+ struct addrinfo *addresses;
+ struct addrinfo *a;
+ int f;
+
+ if (getaddrinfo(hostname, NULL, NULL, &addresses) == 0) {
+ for (a = addresses ; a != NULL ; a = a->ai_next) {
+ len = a->ai_addrlen;
+ f = ConvertAddr(a->ai_addr,&len,(pointer *)&addr);
+ if ( (family == f) ||
+ ((family == FamilyWild) && (f != -1)) ) {
+ NewHost(f, addr, len, FALSE);
+ }
+ }
+ freeaddrinfo(addresses);
+ }
+ }
+#else
#ifdef XTHREADS_NEEDS_BYNAMEPARAMS
_Xgethostbynameparams hparams;
#endif
+ register struct hostent *hp;
/* host name */
if ((family == FamilyInternet &&
@@ -1011,12 +1213,13 @@ ResetHosts (char *display)
/* iterate over the addresses */
for (list = hp->h_addr_list; *list; list++)
- (void) NewHost (family, (pointer)*list, len);
+ (void) NewHost (family, (pointer)*list, len, FALSE);
#else
- (void) NewHost (family, (pointer)hp->h_addr, len);
+ (void) NewHost (family, (pointer)hp->h_addr, len, FALSE);
#endif
}
}
+#endif /* IPv6 */
}
#endif /* TCPCONN || STREAMSCONN */
family = FamilyWild;
@@ -1080,6 +1283,7 @@ Bool LocalClient(ClientPtr client)
int
LocalClientCred(ClientPtr client, int *pUid, int *pGid)
{
+#if defined(HAS_GETPEEREID) || defined(SO_PEERCRED)
int fd;
XtransConnInfo ci;
#ifdef HAS_GETPEEREID
@@ -1114,6 +1318,7 @@ LocalClientCred(ClientPtr client, int *pUid, int *pGid)
if (pGid != NULL)
*pGid = peercred.gid;
return 0;
+#endif
#else
/* No system call available to get the credentials of the peer */
return -1;
@@ -1158,6 +1363,9 @@ AddHost (ClientPtr client,
break;
#endif
case FamilyInternet:
+#if defined(IPv6) && defined(AF_INET6)
+ case FamilyInternet6:
+#endif
case FamilyDECnet:
case FamilyChaos:
if ((len = CheckAddr (family, pAddr, length)) < 0)
@@ -1171,7 +1379,7 @@ AddHost (ClientPtr client,
client->errorValue = family;
return (BadValue);
}
- if (NewHost (family, pAddr, len))
+ if (NewHost (family, pAddr, len, FALSE))
return Success;
return BadAlloc;
}
@@ -1197,7 +1405,8 @@ ForEachHostInFamily (int family,
static Bool
NewHost (int family,
pointer addr,
- int len)
+ int len,
+ int addingLocalHosts)
{
register HOST *host;
@@ -1206,6 +1415,14 @@ NewHost (int family,
if (addrEqual (family, addr, len, host))
return TRUE;
}
+ if (!addingLocalHosts) { /* Fix for XFree86 bug #156 */
+ for (host = selfhosts; host; host = host->next) {
+ if (addrEqual (family, addr, len, host)) {
+ host->requested = TRUE;
+ break;
+ }
+ }
+ }
MakeHost(host,len)
if (!host)
return FALSE;
@@ -1247,6 +1464,9 @@ RemoveHost (
break;
#endif
case FamilyInternet:
+#if defined(IPv6) && defined(AF_INET6)
+ case FamilyInternet6:
+#endif
case FamilyDECnet:
case FamilyChaos:
if ((len = CheckAddr (family, pAddr, length)) < 0)
@@ -1336,6 +1556,14 @@ CheckAddr (
else
len = -1;
break;
+#if defined(IPv6) && defined(AF_INET6)
+ case FamilyInternet6:
+ if (length == sizeof (struct in6_addr))
+ len = length;
+ else
+ len = -1;
+ break;
+#endif
#endif
#ifdef DNETCONN
case FamilyDECnet:
@@ -1424,6 +1652,21 @@ ConvertAddr (
*len = sizeof (struct in_addr);
*addr = (pointer) &(((struct sockaddr_in *) saddr)->sin_addr);
return FamilyInternet;
+#if defined(IPv6) && defined(AF_INET6)
+ case AF_INET6:
+ {
+ struct sockaddr_in6 *saddr6 = (struct sockaddr_in6 *) saddr;
+ if (IN6_IS_ADDR_V4MAPPED(&(saddr6->sin6_addr))) {
+ *len = sizeof (struct in_addr);
+ *addr = (pointer) &(saddr6->sin6_addr.s6_addr[12]);
+ return FamilyInternet;
+ } else {
+ *len = sizeof (struct in6_addr);
+ *addr = (pointer) &(saddr6->sin6_addr);
+ return FamilyInternet6;
+ }
+ }
+#endif
#endif
#ifdef DNETCONN
case AF_DECnet:
diff --git a/os/auth.c b/os/auth.c
index b596aed44..a1cbc8c1f 100644
--- a/os/auth.c
+++ b/os/auth.c
@@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/programs/Xserver/os/auth.c,v 1.12 2002/12/09 02:56:03 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/os/auth.c,v 1.14 2003/08/27 19:57:21 herrb Exp $ */
/*
* authorization hooks for the server
@@ -128,30 +128,19 @@ InitAuthorization (char *file_name)
authorization_file = file_name;
}
-int
+static int
LoadAuthorization (void)
{
FILE *f;
Xauth *auth;
int i;
int count = 0;
-#if !defined(WIN32) && !defined(__UNIXOS2__)
- char *buf;
-#endif
ShouldLoadAuth = FALSE;
if (!authorization_file)
return 0;
-#if !defined(WIN32) && !defined(__UNIXOS2__)
- buf = xalloc (strlen(authorization_file) + 5);
- if (!buf)
- return -1;
- sprintf (buf, "cat %s", authorization_file);
- f = Popen (buf, "r");
- xfree (buf);
-#else
- f = fopen (authorization_file, "r");
-#endif
+
+ f = Fopen (authorization_file, "r");
if (!f)
return -1;
@@ -169,12 +158,7 @@ LoadAuthorization (void)
XauDisposeAuth (auth);
}
-#if !defined(WIN32) && !defined(__UNIXOS2__)
- if (Pclose (f) != 0)
- return -1;
-#else
- fclose (f);
-#endif
+ Fclose (f);
return count;
}
diff --git a/os/connection.c b/os/connection.c
index 46cfd4dfb..7465e7eff 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -45,7 +45,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
-/* $XFree86: xc/programs/Xserver/os/connection.c,v 3.56 2002/05/31 18:46:05 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/os/connection.c,v 3.65 2003/10/30 21:21:10 herrb Exp $ */
/*****************************************************************
* Stuff to create connections --- OS dependent
*
@@ -72,6 +72,7 @@ SOFTWARE.
#include <errno.h>
#include <signal.h>
#include <stdio.h>
+#include <stdlib.h>
#ifndef WIN32
#if defined(Lynx)
@@ -123,6 +124,7 @@ extern __const__ int _nfiles;
# endif
# endif
# endif
+# include <arpa/inet.h>
#endif
#ifdef AMTCPCONN
@@ -155,6 +157,7 @@ extern __const__ int _nfiles;
#include "colormapst.h"
#include "propertyst.h"
#include "lbxserve.h"
+#include "osdep.h"
#endif
#ifdef X_NOT_POSIX
@@ -183,8 +186,10 @@ Bool AnyClientsWriteBlocked; /* true if some client blocked on write */
Bool RunFromSmartParent; /* send SIGUSR1 to parent process */
Bool PartialNetwork; /* continue even if unable to bind all addrs */
-char *protNoListen; /* don't listen on this protocol */
static Pid_t ParentProcess;
+#ifdef __UNIXOS2__
+Pid_t GetPPID(Pid_t pid);
+#endif
static Bool debug_conns = FALSE;
@@ -210,32 +215,18 @@ XtransConnInfo *ListenTransConns = NULL;
int *ListenTransFds = NULL;
int ListenTransCount;
-static void ErrorConnMax(
-#if NeedFunctionPrototypes
-XtransConnInfo /* trans_conn */
-#endif
-);
+static void ErrorConnMax(XtransConnInfo /* trans_conn */);
#ifndef LBX
static
-#endif
void CloseDownFileDescriptor(
-#if NeedFunctionPrototypes
-#ifdef LBX
- ClientPtr client
-#else
- register OsCommPtr /*oc*/
-#endif
-#endif
+ OsCommPtr /*oc*/
);
+#endif
-#ifdef LBX
-extern int LbxFlushClient();
-#endif /* LBX */
static XtransConnInfo
-lookup_trans_conn (fd)
- int fd;
+lookup_trans_conn (int fd)
{
if (ListenTransFds)
{
@@ -251,7 +242,7 @@ lookup_trans_conn (fd)
/* Set MaxClients and lastfdesc, and allocate ConnectionTranslation */
void
-InitConnectionLimits()
+InitConnectionLimits(void)
{
lastfdesc = -1;
@@ -312,11 +303,12 @@ InitConnectionLimits()
*****************/
void
-CreateWellKnownSockets()
+CreateWellKnownSockets(void)
{
int i;
int partial;
char port[20];
+ OsSigHandlerPtr handler;
FD_ZERO(&AllSockets);
FD_ZERO(&AllClients);
@@ -333,12 +325,6 @@ CreateWellKnownSockets()
sprintf (port, "%d", atoi (display));
- if (protNoListen)
- if (_XSERVTransNoListen(protNoListen))
- {
- FatalError ("Failed to disable listen for %s", protNoListen);
- }
-
if ((_XSERVTransMakeAllCOTSServerListeners (port, &partial,
&ListenTransCount, &ListenTransConns) >= 0) &&
(ListenTransCount >= 1))
@@ -392,9 +378,20 @@ CreateWellKnownSockets()
* useful
*/
#if !defined(WIN32)
- if (OsSignal (SIGUSR1, SIG_IGN) == SIG_IGN)
+ handler = OsSignal (SIGUSR1, SIG_IGN);
+ if ( handler == SIG_IGN)
RunFromSmartParent = TRUE;
+ OsSignal(SIGUSR1, handler);
ParentProcess = getppid ();
+#ifdef __UNIXOS2__
+ /*
+ * fg030505: under OS/2, xinit is not the parent process but
+ * the "grant parent" process of the server because execvpe()
+ * presents us an additional process number;
+ * GetPPID(pid) is part of libemxfix
+ */
+ ParentProcess = GetPPID (ParentProcess);
+#endif /* __UNIXOS2__ */
if (RunFromSmartParent) {
if (ParentProcess > 1) {
kill (ParentProcess, SIGUSR1);
@@ -407,7 +404,7 @@ CreateWellKnownSockets()
}
void
-ResetWellKnownSockets ()
+ResetWellKnownSockets (void)
{
int i;
@@ -468,7 +465,7 @@ ResetWellKnownSockets ()
}
void
-CloseWellKnownConnections()
+CloseWellKnownConnections(void)
{
int i;
@@ -477,14 +474,9 @@ CloseWellKnownConnections()
}
static void
-AuthAudit (client, letin, saddr, len, proto_n, auth_proto, auth_id)
- ClientPtr client;
- Bool letin;
- struct sockaddr *saddr;
- int len;
- unsigned short proto_n;
- char *auth_proto;
- int auth_id;
+AuthAudit (ClientPtr client, Bool letin,
+ struct sockaddr *saddr, int len,
+ unsigned int proto_n, char *auth_proto, int auth_id)
{
char addr[128];
char *out = addr;
@@ -506,11 +498,19 @@ AuthAudit (client, letin, saddr, len, proto_n, auth_proto, auth_id)
break;
#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN)
case AF_INET:
- sprintf(out, "IP %s port %d",
- inet_ntoa(((struct sockaddr_in *) saddr)->sin_addr),
- ntohs(((struct sockaddr_in *) saddr)->sin_port));
+ sprintf(out, "IP %s",
+ inet_ntoa(((struct sockaddr_in *) saddr)->sin_addr));
+ break;
+#if defined(IPv6) && defined(AF_INET6)
+ case AF_INET6: {
+ char ipaddr[INET6_ADDRSTRLEN];
+ inet_ntop(AF_INET6, &((struct sockaddr_in6 *) saddr)->sin6_addr,
+ ipaddr, sizeof(ipaddr));
+ sprintf(out, "IP %s", ipaddr);
+ }
break;
#endif
+#endif
#ifdef DNETCONN
case AF_DECnet:
sprintf(out, "DN %s",
@@ -530,17 +530,18 @@ AuthAudit (client, letin, saddr, len, proto_n, auth_proto, auth_id)
default:
strcpy(out, "unknown address");
}
- if (letin)
- AuditF("client %d connected from %s\n", client->index, addr);
- else
- AuditF("client %d rejected from %s\n", client->index, addr);
+
if (proto_n)
- AuditF(" Auth name: %.*s ID: %d\n", proto_n, auth_proto, auth_id);
+ AuditF("client %d %s from %s\n Auth name: %.*s ID: %d\n",
+ client->index, letin ? "connected" : "rejected", addr,
+ (int)proto_n, auth_proto, auth_id);
+ else
+ AuditF("client %d %s from %s\n",
+ client->index, letin ? "connected" : "rejected", addr);
}
XID
-AuthorizationIDOfClient(client)
- ClientPtr client;
+AuthorizationIDOfClient(ClientPtr client)
{
if (client->osPrivate)
return ((OsCommPtr)client->osPrivate)->auth_id;
@@ -569,12 +570,11 @@ AuthorizationIDOfClient(client)
*****************************************************************/
char *
-ClientAuthorized(client, proto_n, auth_proto, string_n, auth_string)
- ClientPtr client;
- char *auth_proto, *auth_string;
- unsigned int proto_n, string_n;
+ClientAuthorized(ClientPtr client,
+ unsigned int proto_n, char *auth_proto,
+ unsigned int string_n, char *auth_string)
{
- register OsCommPtr priv;
+ OsCommPtr priv;
Xtransaddr *from = NULL;
int family;
int fromlen;
@@ -729,17 +729,15 @@ ClientAuthorized(client, proto_n, auth_proto, string_n, auth_string)
static ClientPtr
#ifdef LBX
-AllocNewConnection (trans_conn, fd, conn_time, Flush, Close, proxy)
+AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time,
+ int (*Flush)(
+ ClientPtr /*who*/, OsCommPtr /*oc*/,
+ char */*extraBuf*/, int /*extraCount*/),
+ void (*Close)(
+ ClientPtr /*client*/),
+ LbxProxyPtr proxy)
#else
-AllocNewConnection (trans_conn, fd, conn_time)
-#endif
- XtransConnInfo trans_conn;
- int fd;
- CARD32 conn_time;
-#ifdef LBX
- int (*Flush)();
- void (*Close)();
- LbxProxyPtr proxy;
+AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time)
#endif
{
OsCommPtr oc;
@@ -804,8 +802,7 @@ AllocNewConnection (trans_conn, fd, conn_time)
#ifdef LBX
int
-ClientConnectionNumber (client)
- ClientPtr client;
+ClientConnectionNumber (ClientPtr client)
{
OsCommPtr oc = (OsCommPtr) client->osPrivate;
@@ -813,9 +810,7 @@ ClientConnectionNumber (client)
}
ClientPtr
-AllocLbxClientConnection (client, proxy)
- ClientPtr client;
- LbxProxyPtr proxy;
+AllocLbxClientConnection (ClientPtr client, LbxProxyPtr proxy)
{
OsCommPtr oc = (OsCommPtr) client->osPrivate;
@@ -824,9 +819,7 @@ AllocLbxClientConnection (client, proxy)
}
void
-LbxProxyConnection (client, proxy)
- ClientPtr client;
- LbxProxyPtr proxy;
+LbxProxyConnection (ClientPtr client, LbxProxyPtr proxy)
{
OsCommPtr oc = (OsCommPtr) client->osPrivate;
@@ -848,9 +841,7 @@ LbxProxyConnection (client, proxy)
/*ARGSUSED*/
Bool
-EstablishNewConnections(clientUnused, closure)
- ClientPtr clientUnused;
- pointer closure;
+EstablishNewConnections(ClientPtr clientUnused, pointer closure)
{
fd_set readyconnections; /* set of listeners that are ready */
int curconn; /* fd of listener that's ready */
@@ -940,10 +931,9 @@ EstablishNewConnections(clientUnused, closure)
************/
static void
-ErrorConnMax(trans_conn)
-XtransConnInfo trans_conn;
+ErrorConnMax(XtransConnInfo trans_conn)
{
- register int fd = _XSERVTransGetConnectionNumber (trans_conn);
+ int fd = _XSERVTransGetConnectionNumber (trans_conn);
xConnSetupPrefix csp;
char pad[3];
struct iovec iov[3];
@@ -992,16 +982,14 @@ XtransConnInfo trans_conn;
#ifdef LBX
void
-CloseDownFileDescriptor(client)
- ClientPtr client;
+CloseDownFileDescriptor(ClientPtr client)
#else
static void
-CloseDownFileDescriptor(oc)
- register OsCommPtr oc;
+CloseDownFileDescriptor(OsCommPtr oc)
#endif
{
#ifdef LBX
- register OsCommPtr oc = (OsCommPtr) client->osPrivate;
+ OsCommPtr oc = (OsCommPtr) client->osPrivate;
#endif
int connection = oc->fd;
@@ -1040,13 +1028,13 @@ CloseDownFileDescriptor(oc)
*****************/
void
-CheckConnections()
+CheckConnections(void)
{
#ifndef WIN32
fd_mask mask;
#endif
fd_set tmask;
- register int curclient, curoff;
+ int curclient, curoff;
int i;
struct timeval notime;
int r;
@@ -1094,8 +1082,7 @@ CheckConnections()
*****************/
void
-CloseDownConnection(client)
- ClientPtr client;
+CloseDownConnection(ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
@@ -1117,8 +1104,7 @@ CloseDownConnection(client)
}
void
-AddEnabledDevice(fd)
- int fd;
+AddEnabledDevice(int fd)
{
FD_SET(fd, &EnabledDevices);
FD_SET(fd, &AllSockets);
@@ -1127,8 +1113,7 @@ AddEnabledDevice(fd)
}
void
-RemoveEnabledDevice(fd)
- int fd;
+RemoveEnabledDevice(int fd)
{
FD_CLR(fd, &EnabledDevices);
FD_CLR(fd, &AllSockets);
@@ -1147,8 +1132,7 @@ RemoveEnabledDevice(fd)
*****************/
void
-OnlyListenToOneClient(client)
- ClientPtr client;
+OnlyListenToOneClient(ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
int connection = oc->fd;
@@ -1180,7 +1164,7 @@ OnlyListenToOneClient(client)
****************/
void
-ListenToAllClients()
+ListenToAllClients(void)
{
if (GrabInProgress)
{
@@ -1198,8 +1182,7 @@ ListenToAllClients()
****************/
void
-IgnoreClient (client)
- ClientPtr client;
+IgnoreClient (ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
int connection = oc->fd;
@@ -1243,8 +1226,7 @@ IgnoreClient (client)
****************/
void
-AttendClient (client)
- ClientPtr client;
+AttendClient (ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
int connection = oc->fd;
@@ -1277,8 +1259,7 @@ AttendClient (client)
/* make client impervious to grabs; assume only executing client calls this */
void
-MakeClientGrabImpervious(client)
- ClientPtr client;
+MakeClientGrabImpervious(ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
int connection = oc->fd;
@@ -1297,8 +1278,7 @@ MakeClientGrabImpervious(client)
/* make client pervious to grabs; assume only executing client calls this */
void
-MakeClientGrabPervious(client)
- ClientPtr client;
+MakeClientGrabPervious(ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
int connection = oc->fd;
@@ -1325,61 +1305,3 @@ MakeClientGrabPervious(client)
}
}
-#ifdef AIXV3
-
-static fd_set pendingActiveClients;
-static BOOL reallyGrabbed;
-
-/****************
-* DontListenToAnybody:
-* Don't listen to requests from any clients. Continue to handle new
-* connections, but don't take any protocol requests from anybody.
-* We have to take care if there is already a grab in progress, though.
-* Undone by PayAttentionToClientsAgain. We also have to be careful
-* not to accept any more input from the currently dispatched client.
-* we do this be telling dispatch it is time to yield.
-
-* We call this when the server loses access to the glass
-* (user hot-keys away). This looks like a grab by the
-* server itself, but gets a little tricky if there is already
-* a grab in progress.
-******************/
-
-void
-DontListenToAnybody()
-{
- if (!GrabInProgress)
- {
- XFD_COPYSET(&ClientsWithInput, &SavedClientsWithInput);
- XFD_COPYSET(&AllSockets, &SavedAllSockets);
- XFD_COPYSET(&AllClients, &SavedAllClients);
- GrabInProgress = TRUE;
- reallyGrabbed = FALSE;
- }
- else
- {
- XFD_COPYSET(&AllClients, &pendingActiveClients);
- reallyGrabbed = TRUE;
- }
- FD_ZERO(&ClientsWithInput);
- XFD_UNSET(&AllSockets, &AllClients);
- FD_ZERO(&AllClients);
- isItTimeToYield = TRUE;
-}
-
-void
-PayAttentionToClientsAgain()
-{
- if (reallyGrabbed)
- {
- XFD_ORSET(&AllSockets, &AllSockets, &pendingActiveClients);
- XFD_ORSET(&AllClients, &AllClients, &pendingActiveClients);
- }
- else
- {
- ListenToAllClients();
- }
- reallyGrabbed = FALSE;
-}
-
-#endif
diff --git a/os/io.c b/os/io.c
index e97c5dab7..cf8a0343e 100644
--- a/os/io.c
+++ b/os/io.c
@@ -53,7 +53,7 @@ SOFTWARE.
* InsertFakeRequest, ResetCurrentRequest
*
*****************************************************************/
-/* $XFree86: xc/programs/Xserver/os/io.c,v 3.34 2002/05/31 18:46:05 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/os/io.c,v 3.35 2003/04/27 21:31:08 herrb Exp $ */
#if 0
#define DEBUG_COMMUNICATION
@@ -200,25 +200,22 @@ OsCommPtr AvailableInput = (OsCommPtr)NULL;
#ifdef LBX_NEED_OLD_SYMBOL_FOR_LOADABLES
#undef ReadRequestFromClient
int
-ReadRequestFromClient(client)
- ClientPtr client;
+ReadRequestFromClient(ClientPtr client)
{
return (*client->readRequest)(client);
}
#endif
int
-StandardReadRequestFromClient(client)
- ClientPtr client;
+StandardReadRequestFromClient(ClientPtr client)
#else
int
-ReadRequestFromClient(client)
- ClientPtr client;
+ReadRequestFromClient(ClientPtr client)
#endif
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
- register ConnectionInputPtr oci = oc->input;
+ ConnectionInputPtr oci = oc->input;
int fd = oc->fd;
- register unsigned int gotnow, needed;
+ unsigned int gotnow, needed;
int result;
register xReq *request;
Bool need_header;
@@ -524,21 +521,18 @@ ReadRequestFromClient(client)
**********************/
Bool
-InsertFakeRequest(client, data, count)
- ClientPtr client;
- char *data;
- int count;
+InsertFakeRequest(ClientPtr client, char *data, int count)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
- register ConnectionInputPtr oci = oc->input;
+ ConnectionInputPtr oci = oc->input;
int fd = oc->fd;
- register int gotnow, moveup;
+ int gotnow, moveup;
if (AvailableInput)
{
if (AvailableInput != oc)
{
- register ConnectionInputPtr aci = AvailableInput->input;
+ ConnectionInputPtr aci = AvailableInput->input;
if (aci->size > BUFWATERMARK)
{
xfree(aci->buffer);
@@ -601,8 +595,7 @@ InsertFakeRequest(client, data, count)
**********************/
void
-ResetCurrentRequest(client)
- ClientPtr client;
+ResetCurrentRequest(ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
register ConnectionInputPtr oci = oc->input;
@@ -685,10 +678,10 @@ ResetCurrentRequest(client)
**********************/
xReqPtr
-PeekNextRequest(req, client, readmore)
- xReqPtr req; /* request we're starting from */
- ClientPtr client; /* client whose requests we're skipping */
- Bool readmore; /* attempt to read more if next request isn't there? */
+PeekNextRequest(
+ xReqPtr req, /* request we're starting from */
+ ClientPtr client, /* client whose requests we're skipping */
+ Bool readmore) /* attempt to read more if next request isn't there? */
{
register ConnectionInputPtr oci = ((OsCommPtr)client->osPrivate)->input;
xReqPtr pnextreq;
@@ -747,10 +740,10 @@ PeekNextRequest(req, client, readmore)
CallbackListPtr SkippedRequestsCallback = NULL;
void
-SkipRequests(req, client, numskipped)
- xReqPtr req; /* last request being skipped */
- ClientPtr client; /* client whose requests we're skipping */
- int numskipped; /* how many requests we're skipping */
+SkipRequests(
+ xReqPtr req, /* last request being skipped */
+ ClientPtr client, /* client whose requests we're skipping */
+ int numskipped) /* how many requests we're skipping */
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
register ConnectionInputPtr oci = oc->input;
@@ -809,7 +802,7 @@ static int padlength[4] = {0, 3, 2, 1};
**********************/
void
-FlushAllOutput()
+FlushAllOutput(void)
{
register int index, base;
register fd_mask mask; /* raphael */
@@ -890,14 +883,14 @@ FlushAllOutput()
}
void
-FlushIfCriticalOutputPending()
+FlushIfCriticalOutputPending(void)
{
if (CriticalOutputPending)
FlushAllOutput();
}
void
-SetCriticalOutputPending()
+SetCriticalOutputPending(void)
{
CriticalOutputPending = TRUE;
}
@@ -914,13 +907,10 @@ SetCriticalOutputPending()
*****************/
int
-WriteToClient (who, count, buf)
- ClientPtr who;
- char *buf;
- int count;
+WriteToClient (ClientPtr who, int count, char *buf)
{
OsCommPtr oc = (OsCommPtr)who->osPrivate;
- register ConnectionOutputPtr oco = oc->output;
+ ConnectionOutputPtr oco = oc->output;
int padBytes;
#ifdef DEBUG_COMMUNICATION
Bool multicount = FALSE;
@@ -1061,27 +1051,20 @@ WriteToClient (who, count, buf)
#ifdef LBX_NEED_OLD_SYMBOL_FOR_LOADABLES
#undef FlushClient
int
-FlushClient(who, oc, extraBuf, extraCount)
- ClientPtr who;
- OsCommPtr oc;
- char *extraBuf;
- int extraCount;
+FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount)
{
return (*oc->Flush)(who, oc, extraBuf, extraCount);
}
#endif
int
-StandardFlushClient(who, oc, extraBuf, extraCount)
+StandardFlushClient(ClientPtr who, OsCommPtr oc,
+ char *extraBuf, int extraCount)
#else
int
-FlushClient(who, oc, extraBuf, extraCount)
+FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount)
#endif
- ClientPtr who;
- OsCommPtr oc;
- char *extraBuf;
- int extraCount; /* do not modify... returned below */
{
- register ConnectionOutputPtr oco = oc->output;
+ ConnectionOutputPtr oco = oc->output;
int connection = oc->fd;
XtransConnInfo trans_conn = oc->trans_conn;
struct iovec iov[3];
@@ -1247,9 +1230,9 @@ FlushClient(who, oc, extraBuf, extraCount)
}
ConnectionInputPtr
-AllocateInputBuffer()
+AllocateInputBuffer(void)
{
- register ConnectionInputPtr oci;
+ ConnectionInputPtr oci;
oci = (ConnectionInputPtr)xalloc(sizeof(ConnectionInput));
if (!oci)
@@ -1268,9 +1251,9 @@ AllocateInputBuffer()
}
ConnectionOutputPtr
-AllocateOutputBuffer()
+AllocateOutputBuffer(void)
{
- register ConnectionOutputPtr oco;
+ ConnectionOutputPtr oco;
oco = (ConnectionOutputPtr)xalloc(sizeof(ConnectionOutput));
if (!oco)
@@ -1290,11 +1273,10 @@ AllocateOutputBuffer()
}
void
-FreeOsBuffers(oc)
- OsCommPtr oc;
+FreeOsBuffers(OsCommPtr oc)
{
- register ConnectionInputPtr oci;
- register ConnectionOutputPtr oco;
+ ConnectionInputPtr oci;
+ ConnectionOutputPtr oco;
if (AvailableInput == oc)
AvailableInput = (OsCommPtr)NULL;
@@ -1337,10 +1319,10 @@ FreeOsBuffers(oc)
}
void
-ResetOsBuffers()
+ResetOsBuffers(void)
{
- register ConnectionInputPtr oci;
- register ConnectionOutputPtr oco;
+ ConnectionInputPtr oci;
+ ConnectionOutputPtr oco;
while ((oci = FreeInputs))
{
diff --git a/os/lbxio.c b/os/lbxio.c
index 2991681de..ae4d4355f 100644
--- a/os/lbxio.c
+++ b/os/lbxio.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/os/lbxio.c,v 3.17 2002/05/31 18:46:06 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/os/lbxio.c,v 3.18 2003/04/27 21:31:09 herrb Exp $ */
/*
Copyright 1996, 1998 The Open Group
@@ -97,9 +97,7 @@ SOFTWARE.
FD_CLR(fd, &ClientsWithInput); }
void
-SwitchClientInput (client, pending)
- ClientPtr client;
- Bool pending;
+SwitchClientInput (ClientPtr client, Bool pending)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
@@ -111,9 +109,7 @@ SwitchClientInput (client, pending)
}
void
-LbxPrimeInput(client, proxy)
- ClientPtr client;
- LbxProxyPtr proxy;
+LbxPrimeInput(ClientPtr client, LbxProxyPtr proxy)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
ConnectionInputPtr oci = oc->input;
@@ -131,8 +127,7 @@ LbxPrimeInput(client, proxy)
}
void
-AvailableClientInput (client)
- ClientPtr client;
+AvailableClientInput (ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
@@ -147,15 +142,12 @@ AvailableClientInput (client)
**********************/
Bool
-AppendFakeRequest (client, data, count)
- ClientPtr client;
- char *data;
- int count;
+AppendFakeRequest (ClientPtr client, char *data, int count)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
- register ConnectionInputPtr oci = oc->input;
+ ConnectionInputPtr oci = oc->input;
int fd = oc->fd;
- register int gotnow;
+ int gotnow;
if (!oci)
{
@@ -198,11 +190,8 @@ AppendFakeRequest (client, data, count)
}
static int
-LbxWrite(trans_conn, proxy, buf, len)
- XtransConnInfo trans_conn;
- LbxProxyPtr proxy;
- char *buf;
- int len;
+LbxWrite(XtransConnInfo trans_conn, LbxProxyPtr proxy,
+ char *buf, int len)
{
struct iovec iov;
int n;
@@ -242,10 +231,7 @@ LbxWrite(trans_conn, proxy, buf, len)
}
static Bool
-LbxAppendOutput(proxy, client, oco)
- LbxProxyPtr proxy;
- ClientPtr client;
- ConnectionOutputPtr oco;
+LbxAppendOutput(LbxProxyPtr proxy, ClientPtr client, ConnectionOutputPtr oco)
{
ConnectionOutputPtr noco = proxy->olast;
LbxClientPtr lbxClient = LbxClient(client);
@@ -317,12 +303,8 @@ LbxAppendOutput(proxy, client, oco)
}
static int
-LbxClientOutput(client, oc, extraBuf, extraCount, nocompress)
- ClientPtr client;
- OsCommPtr oc;
- char *extraBuf;
- int extraCount;
- Bool nocompress;
+LbxClientOutput(ClientPtr client, OsCommPtr oc,
+ char *extraBuf, int extraCount, Bool nocompress)
{
ConnectionOutputPtr oco;
int len;
@@ -367,8 +349,7 @@ LbxClientOutput(client, oc, extraBuf, extraCount, nocompress)
}
void
-LbxForceOutput(proxy)
- LbxProxyPtr proxy;
+LbxForceOutput(LbxProxyPtr proxy)
{
int i;
LbxClientPtr lbxClient;
@@ -388,11 +369,8 @@ LbxForceOutput(proxy)
}
int
-LbxFlushClient(who, oc, extraBuf, extraCount)
- ClientPtr who;
- OsCommPtr oc;
- char *extraBuf;
- int extraCount;
+LbxFlushClient(ClientPtr who, OsCommPtr oc,
+ char *extraBuf, int extraCount)
{
LbxProxyPtr proxy;
ConnectionOutputPtr oco;
@@ -459,17 +437,13 @@ LbxFlushClient(who, oc, extraBuf, extraCount)
}
int
-UncompressedWriteToClient (who, count, buf)
- ClientPtr who;
- char *buf;
- int count;
+UncompressedWriteToClient (ClientPtr who, int count, char *buf)
{
return LbxClientOutput(who, (OsCommPtr)who->osPrivate, buf, count, TRUE);
}
void
-LbxFreeOsBuffers(proxy)
- LbxProxyPtr proxy;
+LbxFreeOsBuffers(LbxProxyPtr proxy)
{
ConnectionOutputPtr oco;
@@ -481,12 +455,10 @@ LbxFreeOsBuffers(proxy)
}
Bool
-AllocateLargeReqBuffer(client, size)
- ClientPtr client;
- int size;
+AllocateLargeReqBuffer(ClientPtr client, int size)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
- register ConnectionInputPtr oci;
+ ConnectionInputPtr oci;
if (!(oci = oc->largereq)) {
if ((oci = FreeInputs))
@@ -522,13 +494,10 @@ AllocateLargeReqBuffer(client, size)
}
Bool
-AddToLargeReqBuffer(client, data, size)
- ClientPtr client;
- char *data;
- int size;
+AddToLargeReqBuffer(ClientPtr client, char *data, int size)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
- register ConnectionInputPtr oci = oc->largereq;
+ ConnectionInputPtr oci = oc->largereq;
if (!oci || (oci->bufcnt + size > oci->lenLastReq))
return FALSE;
@@ -540,11 +509,10 @@ AddToLargeReqBuffer(client, data, size)
static OsCommRec lbxAvailableInput;
int
-PrepareLargeReqBuffer(client)
- ClientPtr client;
+PrepareLargeReqBuffer(ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
- register ConnectionInputPtr oci = oc->largereq;
+ ConnectionInputPtr oci = oc->largereq;
if (!oci)
return client->req_len << 2;
@@ -560,7 +528,7 @@ PrepareLargeReqBuffer(client)
oci->lenLastReq = 0;
if (AvailableInput)
{
- register ConnectionInputPtr aci = AvailableInput->input;
+ ConnectionInputPtr aci = AvailableInput->input;
if (aci->size > BUFWATERMARK)
{
xfree(aci->buffer);
diff --git a/os/oscolor.c b/os/oscolor.c
index 62676f84b..f6e941fb8 100644
--- a/os/oscolor.c
+++ b/os/oscolor.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/os/oscolor.c,v 3.8 2002/05/31 18:46:06 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/os/oscolor.c,v 3.11 2003/09/24 02:43:36 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -70,10 +70,13 @@ DBM *rgb_dbm = (DBM *)NULL;
int rgb_dbm = 0;
#endif
-extern void CopyISOLatin1Lowered();
+extern void CopyISOLatin1Lowered(
+ unsigned char * /*dest*/,
+ unsigned char * /*source*/,
+ int /*length*/);
int
-OsInitColors()
+OsInitColors(void)
{
if (!rgb_dbm)
{
@@ -93,12 +96,8 @@ OsInitColors()
/*ARGSUSED*/
int
-OsLookupColor(screen, name, len, pred, pgreen, pblue)
- int screen;
- char *name;
- unsigned len;
- unsigned short *pred, *pgreen, *pblue;
-
+OsLookupColor(int screen, char *name, unsigned int len,
+ unsigned short *pred, unsigned short *pgreen, unsigned short *pblue)
{
datum dbent;
RGB rgb;
@@ -164,23 +163,23 @@ typedef struct _dbEntry {
} dbEntry;
-extern void CopyISOLatin1Lowered();
+extern void CopyISOLatin1Lowered(
+ unsigned char * /*dest*/,
+ unsigned char * /*source*/,
+ int /*length*/);
static dbEntryPtr hashTab[HASHSIZE];
static dbEntryPtr
-lookup(name, len, create)
- char *name;
- int len;
- Bool create;
+lookup(char *name, int len, Bool create)
{
unsigned int h = 0, g;
dbEntryPtr entry, *prev = NULL;
char *str = name;
if (!(name = (char*)ALLOCATE_LOCAL(len +1))) return NULL;
- CopyISOLatin1Lowered(name, str, len);
+ CopyISOLatin1Lowered((unsigned char *)name, (unsigned char *)str, len);
name[len] = '\0';
for(str = name; *str; str++) {
@@ -212,7 +211,7 @@ lookup(name, len, create)
Bool
-OsInitColors()
+OsInitColors(void)
{
FILE *rgb;
char *path;
@@ -281,12 +280,8 @@ OsInitColors()
Bool
-OsLookupColor(screen, name, len, pred, pgreen, pblue)
- int screen;
- char *name;
- unsigned len;
- unsigned short *pred, *pgreen, *pblue;
-
+OsLookupColor(int screen, char *name, unsigned int len,
+ unsigned short *pred, unsigned short *pgreen, unsigned short *pblue)
{
dbEntryPtr entry;
diff --git a/os/osdep.h b/os/osdep.h
index a1fe2bfed..a5392ffc3 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/os/osdep.h,v 3.17 2002/05/31 18:46:06 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/os/osdep.h,v 3.18 2003/04/27 21:31:09 herrb Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -215,6 +215,8 @@ extern int StandardFlushClient(
char* /*extraBuf*/,
int /*extraCount*/
);
+extern int LbxFlushClient(ClientPtr /*who*/, OsCommPtr /*oc*/,
+ char */*extraBuf*/, int /*extraCount*/);
#else
extern int FlushClient(
ClientPtr /*who*/,
diff --git a/os/osinit.c b/os/osinit.c
index 9d9fcda4e..1c56d0af7 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/os/osinit.c,v 3.27 2002/06/17 08:04:18 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/os/osinit.c,v 3.30 2003/10/29 04:17:22 dawes Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -95,7 +95,7 @@ extern void xf86WrapperInit(void);
#endif
void
-OsInit()
+OsInit(void)
{
static Bool been_here = FALSE;
static char* admpath = ADMPATH;
@@ -216,6 +216,11 @@ OsInit()
#ifdef DDXOSINIT
OsVendorInit();
#endif
+ /*
+ * No log file by default. OsVendorInit() should call LogInit() with the
+ * log file name if logging to a file is desired.
+ */
+ LogInit(NULL, NULL);
#ifdef SMART_SCHEDULE
if (!SmartScheduleDisable)
if (!SmartScheduleInit ())
@@ -226,9 +231,12 @@ OsInit()
}
void
-OsCleanup()
+OsCleanup(Bool terminating)
{
#ifdef SERVER_LOCK
- UnlockServer();
+ if (terminating)
+ {
+ UnlockServer();
+ }
#endif
}
diff --git a/os/rpcauth.c b/os/rpcauth.c
index 7ee53b52d..512b3ecb5 100644
--- a/os/rpcauth.c
+++ b/os/rpcauth.c
@@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/programs/Xserver/os/rpcauth.c,v 3.7 2001/12/14 20:00:35 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/os/rpcauth.c,v 3.8 2003/04/27 21:31:09 herrb Exp $ */
/*
* SUN-DES-1 authentication mechanism
@@ -62,9 +62,7 @@ extern bool_t xdr_opaque_auth(XDR *, struct opaque_auth *);
static enum auth_stat why;
static char *
-authdes_ezdecode(inmsg, len)
-char *inmsg;
-int len;
+authdes_ezdecode(char *inmsg, int len)
{
struct rpc_msg msg;
char cred_area[MAX_AUTH_BYTES];
@@ -136,11 +134,8 @@ CheckNetName (
static char rpc_error[MAXNETNAMELEN+50];
XID
-SecureRPCCheck (data_length, data, client, reason)
- register unsigned short data_length;
- char *data;
- ClientPtr client;
- char **reason;
+SecureRPCCheck (unsigned short data_length, char *data,
+ ClientPtr client, char **reason)
{
char *fullname;
@@ -170,10 +165,7 @@ SecureRPCInit (void)
}
int
-SecureRPCAdd (data_length, data, id)
-unsigned short data_length;
-char *data;
-XID id;
+SecureRPCAdd (unsigned short data_length, char *data, XID id)
{
if (data_length)
AddHost ((pointer) 0, FamilyNetname, data_length, data);
@@ -189,26 +181,19 @@ SecureRPCReset (void)
}
XID
-SecureRPCToID (data_length, data)
- unsigned short data_length;
- char *data;
+SecureRPCToID (unsigned short data_length, char *data)
{
return rpc_id;
}
int
-SecureRPCFromID (id, data_lenp, datap)
- XID id;
- unsigned short *data_lenp;
- char **datap;
+SecureRPCFromID (XID id, unsigned short *data_lenp, char **datap)
{
return 0;
}
int
-SecureRPCRemove (data_length, data)
- unsigned short data_length;
- char *data;
+SecureRPCRemove (unsigned short data_length, char *data)
{
return 0;
}
diff --git a/os/utils.c b/os/utils.c
index 4bbe9eb8c..e01793604 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -49,7 +49,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/os/utils.c,v 3.85 2002/12/24 17:43:00 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/os/utils.c,v 3.95 2003/10/01 18:36:38 alanh Exp $ */
#ifdef __CYGWIN__
#include <stdlib.h>
@@ -63,6 +63,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include <stdio.h>
#include "misc.h"
#include "X.h"
+#include <X11/Xtrans.h>
#include "input.h"
#include "dixfont.h"
#include "osdep.h"
@@ -135,10 +136,6 @@ Bool PanoramiXWindowExposureSent = FALSE;
Bool PanoramiXOneExposeRequest = FALSE;
#endif
-#ifdef DDXOSVERRORF
-void (*OsVendorVErrorFProc)(const char *, va_list args) = NULL;
-#endif
-
int auditTrailLevel = 1;
Bool Must_have_memory = FALSE;
@@ -154,6 +151,10 @@ extern int SelectWaitTime;
#endif
#endif
+#if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED)
+#define HAS_SAVED_IDS_AND_SETEUID
+#endif
+
#ifdef MEMBUG
#define MEM_FAIL_SCALE 100000
long Memory_fail = 0;
@@ -166,6 +167,8 @@ int userdefinedfontpath = 0;
char *dev_tty_from_init = NULL; /* since we need to parse it anyway */
+extern int dispatchExceptionAtReset;
+
OsSigHandlerPtr
OsSignal(sig, handler)
int sig;
@@ -235,7 +238,7 @@ static Bool nolock = FALSE;
* the lock file containing the PID.
*/
void
-LockServer()
+LockServer(void)
{
char tmp[PATH_MAX], pid_str[12];
int lfd, i, haslock, l_pid, t;
@@ -259,7 +262,7 @@ LockServer()
strlen(LOCK_TMP_PREFIX);
len += strlen(tmppath) + strlen(display) + strlen(LOCK_SUFFIX) + 1;
if (len > sizeof(LockFile))
- FatalError("Display name `%s' is too long\n");
+ FatalError("Display name `%s' is too long\n", display);
(void)sprintf(tmp, "%s" LOCK_TMP_PREFIX "%s" LOCK_SUFFIX, tmppath, display);
(void)sprintf(LockFile, "%s" LOCK_PREFIX "%s" LOCK_SUFFIX, tmppath, display);
@@ -372,7 +375,7 @@ LockServer()
* Remove the server lock file.
*/
void
-UnlockServer()
+UnlockServer(void)
{
if (nolock) return;
@@ -390,8 +393,7 @@ UnlockServer()
/*ARGSUSED*/
SIGVAL
-AutoResetServer (sig)
- int sig;
+AutoResetServer (int sig)
{
int olderrno = errno;
@@ -411,8 +413,7 @@ AutoResetServer (sig)
/*ARGSUSED*/
SIGVAL
-GiveUp(sig)
- int sig;
+GiveUp(int sig)
{
int olderrno = errno;
@@ -425,31 +426,9 @@ GiveUp(sig)
errno = olderrno;
}
-#ifdef __GNUC__
-static void AbortServer() __attribute__((noreturn));
-#endif
-
-static void
-AbortServer()
-{
- OsCleanup();
- AbortDDX();
- fflush(stderr);
- if (CoreDump)
- abort();
- exit (1);
-}
-
-void
-Error(str)
- char *str;
-{
- perror(str);
-}
-
#ifndef DDXTIME
CARD32
-GetTimeInMillis()
+GetTimeInMillis(void)
{
struct timeval tp;
@@ -459,9 +438,7 @@ GetTimeInMillis()
#endif
void
-AdjustWaitForDelay (waitTime, newdelay)
- pointer waitTime;
- unsigned long newdelay;
+AdjustWaitForDelay (pointer waitTime, unsigned long newdelay)
{
static struct timeval delay_val;
struct timeval **wt = (struct timeval **) waitTime;
@@ -484,7 +461,7 @@ AdjustWaitForDelay (waitTime, newdelay)
}
}
-void UseMsg()
+void UseMsg(void)
{
#if !defined(AIXrt) && !defined(AIX386)
ErrorF("use: X [:<display>] [option]\n");
@@ -558,10 +535,15 @@ void UseMsg()
ErrorF("-v screen-saver without video blanking\n");
ErrorF("-wm WhenMapped default backing-store\n");
ErrorF("-x string loads named extension at init time \n");
+ ErrorF("-maxbigreqsize set maximal bigrequest size \n");
#ifdef PANORAMIX
ErrorF("+xinerama Enable XINERAMA extension\n");
ErrorF("-xinerama Disable XINERAMA extension\n");
#endif
+#ifdef SMART_SCHEDULE
+ ErrorF("-dumbSched Disable smart scheduling, enable old behavior\n");
+ ErrorF("-schedInterval int Set scheduler interval in msec\n");
+#endif
#ifdef XDMCP
XdmcpUseMsg();
#endif
@@ -579,8 +561,8 @@ void UseMsg()
* not contain a "/" and not start with a "-".
* --kvajk
*/
-int VerifyDisplayName( d )
-char *d;
+static int
+VerifyDisplayName(const char *d)
{
if ( d == (char *)0 ) return( 0 ); /* null */
if ( *d == '\0' ) return( 0 ); /* empty */
@@ -596,10 +578,7 @@ char *d;
* argc or any of the strings pointed to by argv.
*/
void
-ProcessCommandLine ( argc, argv )
-int argc;
-char *argv[];
-
+ProcessCommandLine(int argc, char *argv[])
{
int i, skip;
@@ -817,15 +796,15 @@ char *argv[];
#endif
else if ( strcmp( argv[i], "-nolisten") == 0)
{
- if(++i < argc)
- protNoListen = argv[i];
- else
+ if(++i < argc) {
+ if (_XSERVTransNoListen(argv[i]))
+ FatalError ("Failed to disable listen for %s transport",
+ argv[i]);
+ } else
UseMsg();
}
else if ( strcmp( argv[i], "-noreset") == 0)
{
- extern char dispatchExceptionAtReset;
-
dispatchExceptionAtReset = 0;
}
else if ( strcmp( argv[i], "-p") == 0)
@@ -863,8 +842,6 @@ char *argv[];
}
else if ( strcmp( argv[i], "-terminate") == 0)
{
- extern char dispatchExceptionAtReset;
-
dispatchExceptionAtReset = DE_TERMINATE;
}
else if ( strcmp( argv[i], "-to") == 0)
@@ -884,6 +861,24 @@ char *argv[];
defaultScreenSaverBlanking = DontPreferBlanking;
else if ( strcmp( argv[i], "-wm") == 0)
defaultBackingStore = WhenMapped;
+ else if ( strcmp( argv[i], "-maxbigreqsize") == 0) {
+ if(++i < argc) {
+ int reqSizeArg = atoi(argv[i]);
+
+ /* Request size > 128MB does not make much sense... */
+ if( reqSizeArg > 0 && reqSizeArg < 128 ) {
+ maxBigRequestSize = (reqSizeArg * 1048576) - 1;
+ }
+ else
+ {
+ UseMsg();
+ }
+ }
+ else
+ {
+ UseMsg();
+ }
+ }
#ifdef PANORAMIX
else if ( strcmp( argv[i], "+xinerama") == 0){
noPanoramiXExtension = FALSE;
@@ -993,15 +988,11 @@ char *argv[];
#ifdef COMMANDLINE_CHALLENGED_OPERATING_SYSTEMS
static void
-InsertFileIntoCommandLine(resargc, resargv, prefix_argc, prefix_argv,
- filename, suffix_argc, suffix_argv)
- int *resargc;
- char ***resargv;
- int prefix_argc;
- char **prefix_argv;
- char *filename;
- int suffix_argc;
- char **suffix_argv;
+InsertFileIntoCommandLine(
+ int *resargc, char ***resargv,
+ int prefix_argc, char **prefix_argv,
+ char *filename,
+ int suffix_argc, char **suffix_argv)
{
struct stat st;
FILE *f;
@@ -1084,9 +1075,7 @@ InsertFileIntoCommandLine(resargc, resargv, prefix_argc, prefix_argv,
void
-ExpandCommandLine(pargc, pargv)
- int *pargc;
- char ***pargv;
+ExpandCommandLine(int *pargc, char ***pargv)
{
int i;
@@ -1112,42 +1101,61 @@ ExpandCommandLine(pargc, pargv)
/* Implement a simple-minded font authorization scheme. The authorization
name is "hp-hostname-1", the contents are simply the host name. */
int
-set_font_authorizations(authorizations, authlen, client)
-char **authorizations;
-int *authlen;
-pointer client;
+set_font_authorizations(char **authorizations, int *authlen, pointer client)
{
#define AUTHORIZATION_NAME "hp-hostname-1"
#if defined(TCPCONN) || defined(STREAMSCONN)
- static char result[1024];
+ static char *result = NULL;
static char *p = NULL;
if (p == NULL)
{
char hname[1024], *hnameptr;
+ unsigned int len;
+#if defined(IPv6) && defined(AF_INET6)
+ struct addrinfo hints, *ai = NULL;
+#else
struct hostent *host;
- int len;
#ifdef XTHREADS_NEEDS_BYNAMEPARAMS
_Xgethostbynameparams hparams;
#endif
+#endif
gethostname(hname, 1024);
+#if defined(IPv6) && defined(AF_INET6)
+ bzero(&hints, sizeof(hints));
+ hints.ai_flags = AI_CANONNAME;
+ if (getaddrinfo(hname, NULL, &hints, &ai) == 0) {
+ hnameptr = ai->ai_canonname;
+ } else {
+ hnameptr = hname;
+ }
+#else
host = _XGethostbyname(hname, hparams);
if (host == NULL)
hnameptr = hname;
else
hnameptr = host->h_name;
+#endif
+
+ len = strlen(hnameptr) + 1;
+ result = xalloc(len + sizeof(AUTHORIZATION_NAME) + 4);
p = result;
*p++ = sizeof(AUTHORIZATION_NAME) >> 8;
*p++ = sizeof(AUTHORIZATION_NAME) & 0xff;
- *p++ = (len = strlen(hnameptr) + 1) >> 8;
+ *p++ = (len) >> 8;
*p++ = (len & 0xff);
memmove(p, AUTHORIZATION_NAME, sizeof(AUTHORIZATION_NAME));
p += sizeof(AUTHORIZATION_NAME);
memmove(p, hnameptr, len);
p += len;
+#if defined(IPv6) && defined(AF_INET6)
+ if (ai) {
+ freeaddrinfo(ai);
+ }
+#endif
}
*authlen = p - result;
*authorizations = result;
@@ -1172,8 +1180,7 @@ pointer client;
#ifndef INTERNAL_MALLOC
void *
-Xalloc (amount)
- unsigned long amount;
+Xalloc(unsigned long amount)
{
register pointer ptr;
@@ -1201,8 +1208,7 @@ Xalloc (amount)
*****************/
void *
-XNFalloc (amount)
- unsigned long amount;
+XNFalloc(unsigned long amount)
{
register pointer ptr;
@@ -1225,8 +1231,7 @@ XNFalloc (amount)
*****************/
void *
-Xcalloc (amount)
- unsigned long amount;
+Xcalloc(unsigned long amount)
{
unsigned long *ret;
@@ -1241,8 +1246,7 @@ Xcalloc (amount)
*****************/
void *
-XNFcalloc (amount)
- unsigned long amount;
+XNFcalloc(unsigned long amount)
{
unsigned long *ret;
@@ -1259,9 +1263,7 @@ XNFcalloc (amount)
*****************/
void *
-Xrealloc (ptr, amount)
- register pointer ptr;
- unsigned long amount;
+Xrealloc(pointer ptr, unsigned long amount)
{
#ifdef MEMBUG
if (!Must_have_memory && Memory_fail &&
@@ -1292,9 +1294,7 @@ Xrealloc (ptr, amount)
*****************/
void *
-XNFrealloc (ptr, amount)
- register pointer ptr;
- unsigned long amount;
+XNFrealloc(pointer ptr, unsigned long amount)
{
if (( ptr = (pointer)Xrealloc( ptr, amount ) ) == NULL)
{
@@ -1310,15 +1310,14 @@ XNFrealloc (ptr, amount)
*****************/
void
-Xfree(ptr)
- register pointer ptr;
+Xfree(pointer ptr)
{
if (ptr)
free((char *)ptr);
}
void
-OsInitAllocator ()
+OsInitAllocator (void)
{
#ifdef MEMBUG
static int been_here;
@@ -1361,110 +1360,6 @@ XNFstrdup(const char *s)
return sd;
}
-
-void
-AuditPrefix(f)
- const char *f;
-{
- time_t tm;
- char *autime, *s;
- if (*f != ' ')
- {
- time(&tm);
- autime = ctime(&tm);
- if ((s = strchr(autime, '\n')))
- *s = '\0';
- if ((s = strrchr(argvGlobal[0], '/')))
- s++;
- else
- s = argvGlobal[0];
- ErrorF("AUDIT: %s: %d %s: ", autime, getpid(), s);
- }
-}
-
-void
-AuditF(const char * f, ...)
-{
- va_list args;
-
- AuditPrefix(f);
-
- va_start(args, f);
- VErrorF(f, args);
- va_end(args);
-}
-
-void
-FatalError(const char *f, ...)
-{
- va_list args;
- static Bool beenhere = FALSE;
-
- if (beenhere)
- ErrorF("\nFatalError re-entered, aborting\n");
- else
- ErrorF("\nFatal server error:\n");
-
- va_start(args, f);
- VErrorF(f, args);
- va_end(args);
- ErrorF("\n");
-#ifdef DDXOSFATALERROR
- if (!beenhere)
- OsVendorFatalError();
-#endif
-#ifdef ABORTONFATALERROR
- abort();
-#endif
- if (!beenhere) {
- beenhere = TRUE;
- AbortServer();
- } else
- abort();
- /*NOTREACHED*/
-}
-
-void
-VErrorF(f, args)
- const char *f;
- va_list args;
-{
-#ifdef AIXV3
- if (SyncOn)
- sync();
-#else
-#ifdef DDXOSVERRORF
- if (OsVendorVErrorFProc)
- OsVendorVErrorFProc(f, args);
- else
- vfprintf(stderr, f, args);
-#else
- vfprintf(stderr, f, args);
-#endif
-#endif /* AIXV3 */
-}
-
-void
-VFatalError(const char *msg, va_list args)
-{
- VErrorF(msg, args);
- ErrorF("\n");
-#ifdef DDXOSFATALERROR
- OsVendorFatalError();
-#endif
- AbortServer();
- /*NOTREACHED*/
-}
-
-void
-ErrorF(const char * f, ...)
-{
- va_list args;
- va_start(args, f);
- VErrorF(f, args);
- va_end(args);
-}
-
#ifdef SMART_SCHEDULE
unsigned long SmartScheduleIdleCount;
@@ -1480,7 +1375,7 @@ Bool SmartScheduleTimerStopped;
#define SMART_SCHEDULE_TIMER ITIMER_REAL
#endif
-void
+static void
SmartScheduleStopTimer (void)
{
#ifdef SMART_SCHEDULE_POSSIBLE
@@ -1512,7 +1407,7 @@ SmartScheduleStartTimer (void)
}
#ifdef SMART_SCHEDULE_POSSIBLE
-void
+static void
SmartScheduleTimer (int sig)
{
int olderrno = errno;
@@ -1624,8 +1519,7 @@ OsReleaseSignals (void)
*/
int
-System(command)
- char *command;
+System(char *command)
{
int pid, p;
#ifdef SIGCHLD
@@ -1673,9 +1567,7 @@ static struct pid {
} *pidlist;
pointer
-Popen(command, type)
- char *command;
- char *type;
+Popen(char *command, char *type)
{
struct pid *cur;
FILE *iop;
@@ -1747,9 +1639,100 @@ Popen(command, type)
return iop;
}
+/* fopen that drops privileges */
+pointer
+Fopen(char *file, char *type)
+{
+ FILE *iop;
+#ifndef HAS_SAVED_IDS_AND_SETEUID
+ struct pid *cur;
+ int pdes[2], pid;
+
+ if (file == NULL || type == NULL)
+ return NULL;
+
+ if ((*type != 'r' && *type != 'w') || type[1])
+ return NULL;
+
+ if ((cur = (struct pid *)xalloc(sizeof(struct pid))) == NULL)
+ return NULL;
+
+ if (pipe(pdes) < 0) {
+ xfree(cur);
+ return NULL;
+ }
+
+ switch (pid = fork()) {
+ case -1: /* error */
+ close(pdes[0]);
+ close(pdes[1]);
+ xfree(cur);
+ return NULL;
+ case 0: /* child */
+ setgid(getgid());
+ setuid(getuid());
+ if (*type == 'r') {
+ if (pdes[1] != 1) {
+ /* stdout */
+ dup2(pdes[1], 1);
+ close(pdes[1]);
+ }
+ close(pdes[0]);
+ } else {
+ if (pdes[0] != 0) {
+ /* stdin */
+ dup2(pdes[0], 0);
+ close(pdes[0]);
+ }
+ close(pdes[1]);
+ }
+ execl("/bin/cat", "cat", file, (char *)NULL);
+ _exit(127);
+ }
+
+ /* Avoid EINTR during stdio calls */
+ OsBlockSignals ();
+
+ /* parent */
+ if (*type == 'r') {
+ iop = fdopen(pdes[0], type);
+ close(pdes[1]);
+ } else {
+ iop = fdopen(pdes[1], type);
+ close(pdes[0]);
+ }
+
+ cur->fp = iop;
+ cur->pid = pid;
+ cur->next = pidlist;
+ pidlist = cur;
+
+#ifdef DEBUG
+ ErrorF("Popen: `%s', fp = %p\n", command, iop);
+#endif
+
+ return iop;
+#else
+ int ruid, euid;
+
+ ruid = getuid();
+ euid = geteuid();
+
+ if (seteuid(ruid) == -1) {
+ return NULL;
+ }
+ iop = fopen(file, type);
+
+ if (seteuid(euid) == -1) {
+ fclose(iop);
+ return NULL;
+ }
+ return iop;
+#endif /* HAS_SAVED_IDS_AND_SETEUID */
+}
+
int
-Pclose(iop)
- pointer iop;
+Pclose(pointer iop)
{
struct pid *cur, *last;
int pstat;
@@ -1782,6 +1765,17 @@ Pclose(iop)
return pid == -1 ? -1 : pstat;
}
+
+int
+Fclose(pointer iop)
+{
+#ifdef HAS_SAVED_IDS_AND_SETEUID
+ return fclose(iop);
+#else
+ return Pclose(iop);
+#endif
+}
+
#endif /* !WIN32 && !__UNIXOS2__ */
@@ -2007,7 +2001,7 @@ CheckUserParameters(int argc, char **argv, char **envp)
#endif /* USE_PAM */
void
-CheckUserAuthorization()
+CheckUserAuthorization(void)
{
#ifdef USE_PAM
static struct pam_conv conv = {
diff --git a/os/xalloc.c b/os/xalloc.c
index b42d91cd2..8bb46e2c9 100644
--- a/os/xalloc.c
+++ b/os/xalloc.c
@@ -26,7 +26,7 @@ dealings in this Software without prior written authorization from
Pascal Haible.
*/
-/* $XFree86: xc/programs/Xserver/os/xalloc.c,v 3.33 2002/04/04 14:05:57 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/os/xalloc.c,v 3.36 2003/11/03 05:12:00 tsi Exp $ */
/* Only used if INTERNAL_MALLOC is defined
* - otherwise xalloc() in utils.c is used
@@ -179,11 +179,13 @@ extern Bool Must_have_memory;
#define TAIL_SIZE 0
#endif
-#if defined(__alpha__) || defined(__alpha) || \
+#if defined (_LP64) || \
+ defined(__alpha__) || defined(__alpha) || \
defined(__ia64__) || defined(ia64) || \
defined(__sparc64__) || \
defined(__s390x__) || \
- defined(__x86_64__) || defined(x86_64)
+ defined(__AMD64__) || defined(AMD64) || \
+ (defined(sgi) && _MIPS_SZLONG == 64))
#define MAGIC 0x1404196414071968
#define MAGIC_FREE 0x1506196615061966
#define MAGIC2 0x2515207525182079
diff --git a/os/xdmauth.c b/os/xdmauth.c
index eb1385408..13695c13c 100644
--- a/os/xdmauth.c
+++ b/os/xdmauth.c
@@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/programs/Xserver/os/xdmauth.c,v 1.7 2002/11/05 05:50:34 keithp Exp $ */
+/* $XFree86: xc/programs/Xserver/os/xdmauth.c,v 1.9 2003/06/24 15:44:48 eich Exp $ */
/*
* XDM-AUTHENTICATION-1 (XDMCP authentication) and
@@ -58,9 +58,9 @@ static char XdmAuthenticationName[] = "XDM-AUTHENTICATION-1";
#define XdmAuthenticationNameLen (sizeof XdmAuthenticationName - 1)
static XdmAuthKeyRec rho;
-static Bool XdmAuthenticationValidator (privateData, incomingData, packet_type)
- ARRAY8Ptr privateData, incomingData;
- xdmOpCode packet_type;
+static Bool
+XdmAuthenticationValidator (ARRAY8Ptr privateData, ARRAY8Ptr incomingData,
+ xdmOpCode packet_type)
{
XdmAuthKeyPtr incoming;
@@ -79,9 +79,8 @@ static Bool XdmAuthenticationValidator (privateData, incomingData, packet_type)
}
static Bool
-XdmAuthenticationGenerator (privateData, outgoingData, packet_type)
- ARRAY8Ptr privateData, outgoingData;
- xdmOpCode packet_type;
+XdmAuthenticationGenerator (ARRAY8Ptr privateData, ARRAY8Ptr outgoingData,
+ xdmOpCode packet_type)
{
outgoingData->length = 0;
outgoingData->data = 0;
@@ -95,12 +94,11 @@ XdmAuthenticationGenerator (privateData, outgoingData, packet_type)
}
static Bool
-XdmAuthenticationAddAuth (name_len, name, data_len, data)
- int name_len, data_len;
- char *name, *data;
+XdmAuthenticationAddAuth (int name_len, char *name,
+ int data_len, char *data)
{
Bool ret;
- XdmcpUnwrap (data, &privateKey, data, data_len);
+ XdmcpUnwrap (data, (unsigned char *)&privateKey, data, data_len);
authFromXDMCP = TRUE;
ret = AddAuthorization (name_len, name, data_len, data);
authFromXDMCP = FALSE;
@@ -113,9 +111,7 @@ XdmAuthenticationAddAuth (name_len, name, data_len, data)
'A' <= c && c <= 'F' ? c - 'A' + 10 : -1)
static int
-HexToBinary (in, out, len)
- char *out, *in;
- int len;
+HexToBinary (char *in, char *out, int len)
{
int top, bottom;
@@ -138,9 +134,7 @@ HexToBinary (in, out, len)
}
void
-XdmAuthenticationInit (cookie, cookie_len)
- char *cookie;
- int cookie_len;
+XdmAuthenticationInit (char *cookie, int cookie_len)
{
bzero (privateKey.data, 8);
if (!strncmp (cookie, "0x", 2) || !strncmp (cookie, "0X", 2))
@@ -157,7 +151,7 @@ XdmAuthenticationInit (cookie, cookie_len)
}
XdmcpGenerateKey (&rho);
XdmcpRegisterAuthentication (XdmAuthenticationName, XdmAuthenticationNameLen,
- &rho,
+ (unsigned char *)&rho,
sizeof (rho),
XdmAuthenticationValidator,
XdmAuthenticationGenerator,
@@ -191,8 +185,7 @@ static Bool gotClock;
#define TwentyFiveMinutes (25 * 60)
static Bool
-XdmClientAuthCompare (a, b)
- XdmClientAuthPtr a, b;
+XdmClientAuthCompare (XdmClientAuthPtr a, XdmClientAuthPtr b)
{
int i;
@@ -205,9 +198,7 @@ XdmClientAuthCompare (a, b)
}
static void
-XdmClientAuthDecode (plain, auth)
- unsigned char *plain;
- XdmClientAuthPtr auth;
+XdmClientAuthDecode (unsigned char *plain, XdmClientAuthPtr auth)
{
int i, j;
@@ -231,8 +222,7 @@ XdmClientAuthDecode (plain, auth)
}
static void
-XdmClientAuthTimeout (now)
- long now;
+XdmClientAuthTimeout (long now)
{
XdmClientAuthPtr client, next, prev;
@@ -254,12 +244,8 @@ XdmClientAuthTimeout (now)
}
static XdmClientAuthPtr
-XdmAuthorizationValidate (plain, length, rho, xclient, reason)
- unsigned char *plain;
- int length;
- XdmAuthKeyPtr rho;
- ClientPtr xclient;
- char **reason;
+XdmAuthorizationValidate (unsigned char *plain, int length,
+ XdmAuthKeyPtr rho, ClientPtr xclient, char **reason)
{
XdmClientAuthPtr client, existing;
long now;
@@ -338,10 +324,7 @@ XdmAuthorizationValidate (plain, length, rho, xclient, reason)
}
int
-XdmAddCookie (data_length, data, id)
-unsigned short data_length;
-char *data;
-XID id;
+XdmAddCookie (unsigned short data_length, char *data, XID id)
{
XdmAuthorizationPtr new;
unsigned char *rho_bits, *key_bits;
@@ -389,11 +372,8 @@ XID id;
}
XID
-XdmCheckCookie (cookie_length, cookie, xclient, reason)
- unsigned short cookie_length;
- char *cookie;
- ClientPtr xclient;
- char **reason;
+XdmCheckCookie (unsigned short cookie_length, char *cookie,
+ ClientPtr xclient, char **reason)
{
XdmAuthorizationPtr auth;
XdmClientAuthPtr client;
@@ -406,8 +386,8 @@ XdmCheckCookie (cookie_length, cookie, xclient, reason)
if (!plain)
return (XID) -1;
for (auth = xdmAuth; auth; auth=auth->next) {
- XdmcpUnwrap (cookie, &auth->key, plain, cookie_length);
- if (client = XdmAuthorizationValidate (plain, cookie_length, &auth->rho, xclient, reason))
+ XdmcpUnwrap (cookie, (unsigned char *)&auth->key, plain, cookie_length);
+ if ((client = XdmAuthorizationValidate (plain, cookie_length, &auth->rho, xclient, reason)) != NULL)
{
client->next = xdmClients;
xdmClients = client;
@@ -441,9 +421,7 @@ XdmResetCookie (void)
}
XID
-XdmToID (cookie_length, cookie)
-unsigned short cookie_length;
-char *cookie;
+XdmToID (unsigned short cookie_length, char *cookie)
{
XdmAuthorizationPtr auth;
XdmClientAuthPtr client;
@@ -453,8 +431,8 @@ char *cookie;
if (!plain)
return (XID) -1;
for (auth = xdmAuth; auth; auth=auth->next) {
- XdmcpUnwrap (cookie, &auth->key, plain, cookie_length);
- if (client = XdmAuthorizationValidate (plain, cookie_length, &auth->rho, NULL, NULL))
+ XdmcpUnwrap (cookie, (unsigned char *)&auth->key, plain, cookie_length);
+ if ((client = XdmAuthorizationValidate (plain, cookie_length, &auth->rho, NULL, NULL)) != NULL)
{
xfree (client);
xfree (cookie);
@@ -466,10 +444,7 @@ char *cookie;
}
int
-XdmFromID (id, data_lenp, datap)
-XID id;
-unsigned short *data_lenp;
-char **datap;
+XdmFromID (XID id, unsigned short *data_lenp, char **datap)
{
XdmAuthorizationPtr auth;
@@ -484,9 +459,7 @@ char **datap;
}
int
-XdmRemoveCookie (data_length, data)
-unsigned short data_length;
-char *data;
+XdmRemoveCookie (unsigned short data_length, char *data)
{
XdmAuthorizationPtr auth, prev;
XdmAuthKeyPtr key_bits, rho_bits;
diff --git a/os/xdmcp.c b/os/xdmcp.c
index b6a5db35f..43af268e4 100644
--- a/os/xdmcp.c
+++ b/os/xdmcp.c
@@ -13,7 +13,7 @@
* without express or implied warranty.
*
*/
-/* $XFree86: xc/programs/Xserver/os/xdmcp.c,v 3.21 2002/03/11 16:22:28 keithp Exp $ */
+/* $XFree86: xc/programs/Xserver/os/xdmcp.c,v 3.28 2003/11/11 00:27:14 dawes Exp $ */
#ifdef WIN32
/* avoid conflicting definitions */
@@ -43,6 +43,7 @@
#endif
#include <stdio.h>
+#include <stdlib.h>
#include "X.h"
#include "Xmd.h"
#include "misc.h"
@@ -65,6 +66,11 @@
#ifdef XDMCP
#undef REQUEST
+
+#ifdef XDMCP_NO_IPV6
+#undef IPv6
+#endif
+
#include <X11/Xdmcp.h>
#define X_INCLUDE_NETDB_H
@@ -74,7 +80,12 @@ extern char *defaultDisplayClass;
static int xdmcpSocket, sessionSocket;
static xdmcp_states state;
+#if defined(IPv6) && defined(AF_INET6)
+static int xdmcpSocket6;
+static struct sockaddr_storage req_sockaddr;
+#else
static struct sockaddr_in req_sockaddr;
+#endif
static int req_socklen;
static CARD32 SessionID;
static CARD32 timeOutTime;
@@ -89,167 +100,133 @@ static char *xdmAuthCookie;
static XdmcpBuffer buffer;
-static struct sockaddr_in ManagerAddress;
-static struct sockaddr_in FromAddress;
+#if defined(IPv6) && defined(AF_INET6)
+
+static struct addrinfo *mgrAddr;
+static struct addrinfo *mgrAddrFirst;
+
+#define SOCKADDR_TYPE struct sockaddr_storage
+#define SOCKADDR_FAMILY(s) ((struct sockaddr *)&(s))->sa_family
+
+#ifdef BSD44SOCKETS
+#define SOCKLEN_FIELD(s) ((struct sockaddr *)&(s))->sa_len
+#define SOCKLEN_TYPE unsigned char
+#else
+#define SOCKLEN_TYPE unsigned int
+#endif
+
+#else
+
+#define SOCKADDR_TYPE struct sockaddr_in
+#define SOCKADDR_FAMILY(s) (s).sin_family
+
+#ifdef BSD44SOCKETS
+#define SOCKLEN_FIELD(s) (s).sin_len
+#define SOCKLEN_TYPE unsigned char
+#else
+#define SOCKLEN_TYPE size_t
+#endif
+
+#endif
+
+static SOCKADDR_TYPE ManagerAddress;
+static SOCKADDR_TYPE FromAddress;
+
+#ifdef SOCKLEN_FIELD
+#define ManagerAddressLen SOCKLEN_FIELD(ManagerAddress)
+#define FromAddressLen SOCKLEN_FIELD(FromAddress)
+#else
+static SOCKLEN_TYPE ManagerAddressLen, FromAddressLen;
+#endif
+
+#if defined(IPv6) && defined(AF_INET6)
+static struct multicastinfo {
+ struct multicastinfo *next;
+ struct addrinfo *ai;
+ int hops;
+} *mcastlist;
+#endif
static void XdmcpAddHost(
- struct sockaddr_in *from,
+ struct sockaddr *from,
int fromlen,
ARRAY8Ptr AuthenticationName,
ARRAY8Ptr hostname,
ARRAY8Ptr status);
static void XdmcpSelectHost(
- struct sockaddr_in *host_sockaddr,
+ struct sockaddr *host_sockaddr,
int host_len,
ARRAY8Ptr AuthenticationName);
-static void get_xdmcp_sock(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+static void get_xdmcp_sock(void);
-static void send_query_msg(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+static void send_query_msg(void);
static void recv_willing_msg(
-#if NeedFunctionPrototypes
- struct sockaddr_in */*from*/,
+ struct sockaddr */*from*/,
int /*fromlen*/,
- unsigned /*length*/
-#endif
-);
+ unsigned /*length*/);
-static void send_request_msg(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+static void send_request_msg(void);
-static void recv_accept_msg(
-#if NeedFunctionPrototypes
- unsigned /*length*/
-#endif
-);
+static void recv_accept_msg(unsigned /*length*/);
-static void recv_decline_msg(
-#if NeedFunctionPrototypes
- unsigned /*length*/
-#endif
-);
+static void recv_decline_msg(unsigned /*length*/);
-static void send_manage_msg(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+static void send_manage_msg(void);
-static void recv_refuse_msg(
-#if NeedFunctionPrototypes
- unsigned /*length*/
-#endif
-);
+static void recv_refuse_msg(unsigned /*length*/);
-static void recv_failed_msg(
-#if NeedFunctionPrototypes
- unsigned /*length*/
-#endif
-);
+static void recv_failed_msg(unsigned /*length*/);
-static void send_keepalive_msg(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+static void send_keepalive_msg(void);
-static void recv_alive_msg(
-#if NeedFunctionPrototypes
- unsigned /*length*/
-#endif
-);
+static void recv_alive_msg(unsigned /*length*/);
static void XdmcpFatal(
-#if NeedFunctionPrototypes
char */*type*/,
- ARRAY8Ptr /*status*/
-#endif
-);
-
-static void XdmcpWarning(
-#if NeedFunctionPrototypes
- char */*str*/
-#endif
-);
+ ARRAY8Ptr /*status*/);
+
+static void XdmcpWarning(char */*str*/);
static void get_manager_by_name(
-#if NeedFunctionPrototypes
int /*argc*/,
char **/*argv*/,
- int /*i*/
-#endif
-);
+ int /*i*/);
static void get_fromaddr_by_name(int /*argc*/, char **/*argv*/, int /*i*/);
-static void receive_packet(
-#if NeedFunctionPrototypes
- void
+#if defined(IPv6) && defined(AF_INET6)
+static int get_mcast_options(int /*argc*/, char **/*argv*/, int /*i*/);
#endif
-);
-static void send_packet(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+static void receive_packet(int /*socketfd*/);
-extern void XdmcpDeadSession(
-#if NeedFunctionPrototypes
- char */*reason*/
-#endif
-);
+static void send_packet(void);
-static void timeout(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern void XdmcpDeadSession(char */*reason*/);
-static void restart(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+static void timeout(void);
+
+static void restart(void);
static void XdmcpBlockHandler(
-#if NeedFunctionPrototypes
pointer /*data*/,
struct timeval **/*wt*/,
- pointer /*LastSelectMask*/
-#endif
-);
+ pointer /*LastSelectMask*/);
static void XdmcpWakeupHandler(
-#if NeedFunctionPrototypes
pointer /*data*/,
int /*i*/,
- pointer /*LastSelectMask*/
-#endif
-);
+ pointer /*LastSelectMask*/);
void XdmcpRegisterManufacturerDisplayID(
-#if NeedFunctionPrototypes
char * /*name*/,
- int /*length*/
-#endif
-);
+ int /*length*/);
-static short xdm_udp_port = XDM_UDP_PORT;
+static unsigned short xdm_udp_port = XDM_UDP_PORT;
static Bool OneSession = FALSE;
static const char *xdm_from = NULL;
@@ -258,6 +235,9 @@ XdmcpUseMsg (void)
{
ErrorF("-query host-name contact named host for XDMCP\n");
ErrorF("-broadcast broadcast for XDMCP\n");
+#if defined(IPv6) && defined(AF_INET6)
+ ErrorF("-multicast [addr [hops]] IPv6 multicast for XDMCP\n");
+#endif
ErrorF("-indirect host-name contact named host for indirect XDMCP\n");
ErrorF("-port port-num UDP port number to send messages to\n");
ErrorF("-from local-address specify the local address to connect from\n");
@@ -273,7 +253,7 @@ int
XdmcpOptions(int argc, char **argv, int i)
{
if (strcmp(argv[i], "-query") == 0) {
- get_manager_by_name(argc, argv, ++i);
+ get_manager_by_name(argc, argv, i++);
XDM_INIT_STATE = XDM_QUERY;
AccessUsingXdmcp ();
return (i + 1);
@@ -283,8 +263,16 @@ XdmcpOptions(int argc, char **argv, int i)
AccessUsingXdmcp ();
return (i + 1);
}
+#if defined(IPv6) && defined(AF_INET6)
+ if (strcmp(argv[i], "-multicast") == 0) {
+ i = get_mcast_options(argc, argv, ++i);
+ XDM_INIT_STATE = XDM_MULTICAST;
+ AccessUsingXdmcp ();
+ return (i + 1);
+ }
+#endif
if (strcmp(argv[i], "-indirect") == 0) {
- get_manager_by_name(argc, argv, ++i);
+ get_manager_by_name(argc, argv, i++);
XDM_INIT_STATE = XDM_INDIRECT;
AccessUsingXdmcp ();
return (i + 1);
@@ -294,7 +282,7 @@ XdmcpOptions(int argc, char **argv, int i)
ErrorF("Xserver: missing port number in command line\n");
exit(1);
}
- xdm_udp_port = atoi(argv[i]);
+ xdm_udp_port = (unsigned short) atoi(argv[i]);
return (i + 1);
}
if (strcmp(argv[i], "-from") == 0) {
@@ -348,6 +336,7 @@ XdmcpOptions(int argc, char **argv, int i)
#define MAX_BROADCAST 10
+/* This stays sockaddr_in since IPv6 doesn't support broadcast */
static struct sockaddr_in BroadcastAddresses[MAX_BROADCAST];
static int NumBroadcastAddresses;
@@ -478,10 +467,36 @@ XdmcpRegisterConnection (
XdmcpDisposeARRAYofARRAY8 (&ConnectionAddresses);
xdmcpGeneration = serverGeneration;
}
- if (addrlen == sizeof(struct in_addr) && xdm_from != NULL)
- {
- /* Only register the requested address */
- if (memcmp(address, &FromAddress.sin_addr, addrlen) != 0) {
+ if (xdm_from != NULL) { /* Only register the requested address */
+ const void *regAddr = address;
+ const void *fromAddr = NULL;
+ int regAddrlen = addrlen;
+
+ if (addrlen == sizeof(struct in_addr)) {
+ if (SOCKADDR_FAMILY(FromAddress) == AF_INET) {
+ fromAddr = &((struct sockaddr_in *)&FromAddress)->sin_addr;
+ }
+#if defined(IPv6) && defined(AF_INET6)
+ else if ((SOCKADDR_FAMILY(FromAddress) == AF_INET6) &&
+ IN6_IS_ADDR_V4MAPPED(
+ &((struct sockaddr_in6 *)&FromAddress)->sin6_addr)) {
+ fromAddr = &((struct sockaddr_in6 *)&FromAddress)->sin6_addr.s6_addr[12];
+ }
+#endif
+ }
+#if defined(IPv6) && defined(AF_INET6)
+ else if (addrlen == sizeof(struct in6_addr)) {
+ if (SOCKADDR_FAMILY(FromAddress) == AF_INET6) {
+ fromAddr = &((struct sockaddr_in6 *)&FromAddress)->sin6_addr;
+ } else if ((SOCKADDR_FAMILY(FromAddress) == AF_INET) &&
+ IN6_IS_ADDR_V4MAPPED((struct in6_addr *) address)) {
+ fromAddr = &((struct sockaddr_in *)&FromAddress)->sin_addr;
+ regAddr = &((struct sockaddr_in6 *)&address)->sin6_addr.s6_addr[12];
+ regAddrlen = sizeof(struct in_addr);
+ }
+ }
+#endif
+ if (fromAddr && memcmp(regAddr, fromAddr, regAddrlen) != 0) {
return;
}
}
@@ -665,6 +680,10 @@ XdmcpBlockHandler(
if (state == XDM_OFF)
return;
FD_SET(xdmcpSocket, LastSelectMask);
+#if defined(IPv6) && defined(AF_INET6)
+ if (xdmcpSocket6 >= 0)
+ FD_SET(xdmcpSocket6, LastSelectMask);
+#endif
if (timeOutTime == 0)
return;
millisToGo = timeOutTime - GetTimeInMillis();
@@ -695,9 +714,16 @@ XdmcpWakeupHandler(
{
if (FD_ISSET(xdmcpSocket, LastSelectMask))
{
- receive_packet();
+ receive_packet(xdmcpSocket);
FD_CLR(xdmcpSocket, LastSelectMask);
}
+#if defined(IPv6) && defined(AF_INET6)
+ if (xdmcpSocket6 >= 0 && FD_ISSET(xdmcpSocket6, LastSelectMask))
+ {
+ receive_packet(xdmcpSocket6);
+ FD_CLR(xdmcpSocket6, LastSelectMask);
+ }
+#endif
XFD_ANDSET(&devicesReadable, LastSelectMask, &EnabledDevices);
if (XFD_ANYSET(&devicesReadable))
{
@@ -728,10 +754,18 @@ XdmcpWakeupHandler(
static void
XdmcpSelectHost(
- struct sockaddr_in *host_sockaddr,
+ struct sockaddr *host_sockaddr,
int host_len,
ARRAY8Ptr AuthenticationName)
{
+#if defined(IPv6) && defined(AF_INET6)
+ /* Don't need list of addresses for host anymore */
+ if (mgrAddrFirst != NULL) {
+ freeaddrinfo(mgrAddrFirst);
+ mgrAddrFirst = NULL;
+ mgrAddr = NULL;
+ }
+#endif
state = XDM_START_CONNECTION;
memmove(&req_sockaddr, host_sockaddr, host_len);
req_socklen = host_len;
@@ -748,7 +782,7 @@ XdmcpSelectHost(
/*ARGSUSED*/
static void
XdmcpAddHost(
- struct sockaddr_in *from,
+ struct sockaddr *from,
int fromlen,
ARRAY8Ptr AuthenticationName,
ARRAY8Ptr hostname,
@@ -765,14 +799,18 @@ XdmcpAddHost(
ARRAY8 UnwillingMessage = { (CARD8) 14, (CARD8 *) "Host unwilling" };
static void
-receive_packet(void)
+receive_packet(int socketfd)
{
+#if defined(IPv6) && defined(AF_INET6)
+ struct sockaddr_storage from;
+#else
struct sockaddr_in from;
- int fromlen = sizeof(struct sockaddr_in);
+#endif
+ int fromlen = sizeof(from);
XdmcpHeader header;
/* read message off socket */
- if (!XdmcpFill (xdmcpSocket, &buffer, (XdmcpNetaddr) &from, &fromlen))
+ if (!XdmcpFill (socketfd, &buffer, (XdmcpNetaddr) &from, &fromlen))
return;
/* reset retransmission backoff */
@@ -786,7 +824,7 @@ receive_packet(void)
switch (header.opcode) {
case WILLING:
- recv_willing_msg(&from, fromlen, header.length);
+ recv_willing_msg((struct sockaddr *) &from, fromlen, header.length);
break;
case UNWILLING:
XdmcpFatal("Manager unwilling", &UnwillingMessage);
@@ -821,6 +859,9 @@ send_packet(void)
case XDM_QUERY:
case XDM_BROADCAST:
case XDM_INDIRECT:
+#if defined(IPv6) && defined(AF_INET6)
+ case XDM_MULTICAST:
+#endif
send_query_msg();
break;
case XDM_START_CONNECTION:
@@ -873,13 +914,34 @@ timeout(void)
}
else if (timeOutRtx >= XDM_RTX_LIMIT)
{
- ErrorF("XDM: too many retransmissions\n");
- state = XDM_AWAIT_USER_INPUT;
- timeOutTime = 0;
- timeOutRtx = 0;
+ /* Quit if "-once" specified, otherwise reset and try again. */
+ if (OneSession) {
+ dispatchException |= DE_TERMINATE;
+ ErrorF("XDM: too many retransmissions\n");
+ } else {
+ XdmcpDeadSession("too many retransmissions");
+ }
return;
}
+#if defined(IPv6) && defined(AF_INET6)
+ if (state == XDM_COLLECT_QUERY || state == XDM_COLLECT_INDIRECT_QUERY) {
+ /* Try next address */
+ for (mgrAddr = mgrAddr->ai_next; ; mgrAddr = mgrAddr->ai_next) {
+ if (mgrAddr == NULL) {
+ mgrAddr = mgrAddrFirst;
+ }
+ if (mgrAddr->ai_family == AF_INET
+ || mgrAddr->ai_family == AF_INET6)
+ break;
+ }
+#ifndef SIN6_LEN
+ ManagerAddressLen = mgrAddr->ai_addrlen;
+#endif
+ memcpy(&ManagerAddress, mgrAddr->ai_addr, mgrAddr->ai_addrlen);
+ }
+#endif
+
switch (state) {
case XDM_COLLECT_QUERY:
state = XDM_QUERY;
@@ -887,6 +949,11 @@ timeout(void)
case XDM_COLLECT_BROADCAST_QUERY:
state = XDM_BROADCAST;
break;
+#if defined(IPv6) && defined(AF_INET6)
+ case XDM_COLLECT_MULTICAST_QUERY:
+ state = XDM_MULTICAST;
+ break;
+#endif
case XDM_COLLECT_INDIRECT_QUERY:
state = XDM_INDIRECT;
break;
@@ -988,6 +1055,10 @@ get_xdmcp_sock(void)
#else
int soopts = 1;
+#if defined(IPv6) && defined(AF_INET6)
+ if ((xdmcpSocket6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0)
+ XdmcpWarning("INET6 UDP socket creation failed");
+#endif
if ((xdmcpSocket = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
XdmcpWarning("UDP socket creation failed");
#ifdef SO_BROADCAST
@@ -996,8 +1067,8 @@ get_xdmcp_sock(void)
XdmcpWarning("UDP set broadcast socket-option failed");
#endif /* SO_BROADCAST */
if (xdmcpSocket >= 0 && xdm_from != NULL) {
- if (bind(xdmcpSocket, (struct sockaddr *)&FromAddress,
- sizeof(FromAddress)) < 0) {
+ if (bind(xdmcpSocket, (struct sockaddr *)&FromAddress,
+ FromAddressLen) < 0) {
ErrorF("Xserver: failed to bind to -from address: %s\n", xdm_from);
exit(1);
}
@@ -1010,7 +1081,11 @@ send_query_msg(void)
{
XdmcpHeader header;
Bool broadcast = FALSE;
+#if defined(IPv6) && defined(AF_INET6)
+ Bool multicast = FALSE;
+#endif
int i;
+ int socketfd = xdmcpSocket;
header.version = XDM_PROTOCOL_VERSION;
switch(state){
@@ -1023,6 +1098,13 @@ send_query_msg(void)
state = XDM_COLLECT_BROADCAST_QUERY;
broadcast = TRUE;
break;
+#if defined(IPv6) && defined(AF_INET6)
+ case XDM_MULTICAST:
+ header.opcode = (CARD16) BROADCAST_QUERY;
+ state = XDM_COLLECT_MULTICAST_QUERY;
+ multicast = TRUE;
+ break;
+#endif
case XDM_INDIRECT:
header.opcode = (CARD16) INDIRECT_QUERY;
state = XDM_COLLECT_INDIRECT_QUERY;
@@ -1044,16 +1126,48 @@ send_query_msg(void)
XdmcpFlush (xdmcpSocket, &buffer, (XdmcpNetaddr) &BroadcastAddresses[i],
sizeof (struct sockaddr_in));
}
+#if defined(IPv6) && defined(AF_INET6)
+ else if (multicast)
+ {
+ struct multicastinfo *mcl;
+ struct addrinfo *ai;
+
+ for (mcl = mcastlist; mcl != NULL; mcl = mcl->next) {
+ for (ai = mcl->ai ; ai != NULL; ai = ai->ai_next) {
+ if (ai->ai_family == AF_INET) {
+ unsigned char hopflag = (unsigned char) mcl->hops;
+ socketfd = xdmcpSocket;
+ setsockopt(socketfd, IPPROTO_IP, IP_MULTICAST_TTL,
+ &hopflag, sizeof(hopflag));
+ } else if (ai->ai_family == AF_INET6) {
+ int hopflag6 = mcl->hops;
+ socketfd = xdmcpSocket6;
+ setsockopt(socketfd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS,
+ &hopflag6, sizeof(hopflag6));
+ } else {
+ continue;
+ }
+ XdmcpFlush (socketfd, &buffer,
+ (XdmcpNetaddr) ai->ai_addr, ai->ai_addrlen);
+ break;
+ }
+ }
+ }
+#endif
else
{
- XdmcpFlush (xdmcpSocket, &buffer, (XdmcpNetaddr) &ManagerAddress,
+#if defined(IPv6) && defined(AF_INET6)
+ if (SOCKADDR_FAMILY(ManagerAddress) == AF_INET6)
+ socketfd = xdmcpSocket6;
+#endif
+ XdmcpFlush (socketfd, &buffer, (XdmcpNetaddr) &ManagerAddress,
sizeof (ManagerAddress));
}
}
static void
recv_willing_msg(
- struct sockaddr_in *from,
+ struct sockaddr *from,
int fromlen,
unsigned length)
{
@@ -1077,6 +1191,9 @@ recv_willing_msg(
XdmcpSelectHost(from, fromlen, &authenticationName);
break;
case XDM_COLLECT_BROADCAST_QUERY:
+#if defined(IPv6) && defined(AF_INET6)
+ case XDM_COLLECT_MULTICAST_QUERY:
+#endif
case XDM_COLLECT_INDIRECT_QUERY:
XdmcpAddHost(from, fromlen, &authenticationName, &hostname, &status);
break;
@@ -1097,6 +1214,7 @@ send_request_msg(void)
int length;
int i;
ARRAY8 authenticationData;
+ int socketfd = xdmcpSocket;
header.version = XDM_PROTOCOL_VERSION;
header.opcode = (CARD16) REQUEST;
@@ -1136,7 +1254,12 @@ send_request_msg(void)
XdmcpDisposeARRAY8 (&authenticationData);
XdmcpWriteARRAYofARRAY8 (&buffer, &AuthorizationNames);
XdmcpWriteARRAY8 (&buffer, &ManufacturerDisplayID);
- if (XdmcpFlush (xdmcpSocket, &buffer, (XdmcpNetaddr) &req_sockaddr, req_socklen))
+#if defined(IPv6) && defined(AF_INET6)
+ if (SOCKADDR_FAMILY(req_sockaddr) == AF_INET6)
+ socketfd = xdmcpSocket6;
+#endif
+ if (XdmcpFlush (socketfd, &buffer,
+ (XdmcpNetaddr) &req_sockaddr, req_socklen))
state = XDM_AWAIT_REQUEST_RESPONSE;
}
@@ -1220,6 +1343,7 @@ static void
send_manage_msg(void)
{
XdmcpHeader header;
+ int socketfd = xdmcpSocket;
header.version = XDM_PROTOCOL_VERSION;
header.opcode = (CARD16) MANAGE;
@@ -1231,7 +1355,11 @@ send_manage_msg(void)
XdmcpWriteCARD16 (&buffer, DisplayNumber);
XdmcpWriteARRAY8 (&buffer, &DisplayClass);
state = XDM_AWAIT_MANAGE_RESPONSE;
- XdmcpFlush (xdmcpSocket, &buffer, (XdmcpNetaddr) &req_sockaddr, req_socklen);
+#if defined(IPv6) && defined(AF_INET6)
+ if (SOCKADDR_FAMILY(req_sockaddr) == AF_INET6)
+ socketfd = xdmcpSocket6;
+#endif
+ XdmcpFlush (socketfd, &buffer, (XdmcpNetaddr) &req_sockaddr, req_socklen);
}
static void
@@ -1278,6 +1406,7 @@ static void
send_keepalive_msg(void)
{
XdmcpHeader header;
+ int socketfd = xdmcpSocket;
header.version = XDM_PROTOCOL_VERSION;
header.opcode = (CARD16) KEEPALIVE;
@@ -1288,7 +1417,11 @@ send_keepalive_msg(void)
XdmcpWriteCARD32 (&buffer, SessionID);
state = XDM_AWAIT_ALIVE_RESPONSE;
- XdmcpFlush (xdmcpSocket, &buffer, (XdmcpNetaddr) &req_sockaddr, req_socklen);
+#if defined(IPv6) && defined(AF_INET6)
+ if (SOCKADDR_FAMILY(req_sockaddr) == AF_INET6)
+ socketfd = xdmcpSocket6;
+#endif
+ XdmcpFlush (socketfd, &buffer, (XdmcpNetaddr) &req_sockaddr, req_socklen);
}
static void
@@ -1340,80 +1473,206 @@ XdmcpWarning(char *str)
}
static void
-get_manager_by_name(
- int argc,
- char **argv,
- int i)
+get_addr_by_name(
+ char * argtype,
+ char * namestr,
+ int port,
+ int socktype,
+ SOCKADDR_TYPE *addr,
+ SOCKLEN_TYPE *addrlen
+#if defined(IPv6) && defined(AF_INET6)
+ ,
+ struct addrinfo **aip,
+ struct addrinfo **aifirstp
+#endif
+ )
{
+#if defined(IPv6) && defined(AF_INET6)
+ struct addrinfo *ai;
+ struct addrinfo hints;
+ char portstr[6];
+ char *pport = portstr;
+ int gaierr;
+
+ bzero(&hints, sizeof(hints));
+ hints.ai_socktype = socktype;
+
+ if (port == 0) {
+ pport = NULL;
+ } else if (port > 0 && port < 65535) {
+ sprintf(portstr, "%d", port);
+ } else {
+ ErrorF("Xserver: port out of range: %d\n", port);
+ exit(1);
+ }
+
+ if (*aifirstp != NULL) {
+ freeaddrinfo(*aifirstp);
+ *aifirstp = NULL;
+ }
+
+ if ((gaierr = getaddrinfo(namestr, pport, &hints, aifirstp)) == 0) {
+ for (ai = *aifirstp; ai != NULL; ai = ai->ai_next) {
+ if (ai->ai_family == AF_INET || ai->ai_family == AF_INET6)
+ break;
+ }
+ if ((ai == NULL) || (ai->ai_addrlen > sizeof(SOCKADDR_TYPE))) {
+ ErrorF ("Xserver: %s host %s not on supported network type\n",
+ argtype, namestr);
+ exit (1);
+ } else {
+ *aip = ai;
+ *addrlen = ai->ai_addrlen;
+ memcpy(addr, ai->ai_addr, ai->ai_addrlen);
+ }
+ } else {
+ ErrorF("Xserver: %s: %s %s\n", gai_strerror(gaierr), argtype, namestr);
+ exit(1);
+ }
+#else
struct hostent *hep;
#ifdef XTHREADS_NEEDS_BYNAMEPARAMS
_Xgethostbynameparams hparams;
#endif
- if (i == argc)
+ if (!(hep = _XGethostbyname(namestr, hparams)))
{
- ErrorF("Xserver: missing host name in command line\n");
- exit(1);
- }
- if (!(hep = _XGethostbyname(argv[i], hparams)))
- {
- ErrorF("Xserver: unknown host: %s\n", argv[i]);
+ ErrorF("Xserver: %s unknown host: %s\n", argtype, namestr);
exit(1);
}
if (hep->h_length == sizeof (struct in_addr))
{
- memmove(&ManagerAddress.sin_addr, hep->h_addr, hep->h_length);
-#ifdef BSD44SOCKETS
- ManagerAddress.sin_len = sizeof(ManagerAddress);
-#endif
- ManagerAddress.sin_family = AF_INET;
- ManagerAddress.sin_port = htons (xdm_udp_port);
+ memmove(&addr->sin_addr, hep->h_addr, hep->h_length);
+ *addrlen = sizeof(struct sockaddr_in);
+ addr->sin_family = AF_INET;
+ addr->sin_port = htons (xdm_udp_port);
}
else
{
- ErrorF ("Xserver: host on strange network %s\n", argv[i]);
+ ErrorF ("Xserver: %s host on strange network %s\n", argtype, namestr);
exit (1);
}
+#endif
}
static void
-get_fromaddr_by_name(
+get_manager_by_name(
int argc,
char **argv,
int i)
{
- struct hostent *hep;
-#ifdef XTHREADS_NEEDS_BYNAMEPARAMS
- _Xgethostbynameparams hparams;
-#endif
- if (i == argc)
+ if ((i + 1) == argc)
{
- ErrorF("Xserver: missing -from host name in command line\n");
+ ErrorF("Xserver: missing %s host name in command line\n", argv[i]);
exit(1);
}
- if (!(hep = _XGethostbyname(argv[i], hparams)))
+
+ get_addr_by_name(argv[i], argv[i+1], xdm_udp_port, SOCK_DGRAM,
+ &ManagerAddress, &ManagerAddressLen
+#if defined(IPv6) && defined(AF_INET6)
+ , &mgrAddr, &mgrAddrFirst
+#endif
+ );
+}
+
+
+static void
+get_fromaddr_by_name(
+ int argc,
+ char **argv,
+ int i)
+{
+#if defined(IPv6) && defined(AF_INET6)
+ struct addrinfo *ai = NULL;
+ struct addrinfo *aifirst = NULL;
+#endif
+ if (i == argc)
{
- ErrorF("Xserver: unknown host: %s\n", argv[i]);
+ ErrorF("Xserver: missing -from host name in command line\n");
exit(1);
}
- if (hep->h_length == sizeof (struct in_addr))
- {
- memset(&FromAddress, 0, sizeof(FromAddress));
- memmove(&FromAddress.sin_addr, hep->h_addr, hep->h_length);
-#ifdef BSD44SOCKETS
- FromAddress.sin_len = sizeof(FromAddress);
+ get_addr_by_name("-from", argv[i], 0, 0, &FromAddress, &FromAddressLen
+#if defined(IPv6) && defined(AF_INET6)
+ , &ai, &aifirst
#endif
- FromAddress.sin_family = AF_INET;
- FromAddress.sin_port = 0;
+ );
+ xdm_from = argv[i];
+}
+
+
+#if defined(IPv6) && defined(AF_INET6)
+static int
+get_mcast_options(argc, argv, i)
+ int argc, i;
+ char **argv;
+{
+ char *address = "ff02::1"; /* Default address until IANA assigns one */
+ int hopcount = 1;
+ struct addrinfo hints;
+ char portstr[6];
+ int gaierr;
+ struct addrinfo *ai, *firstai;
+
+ if ((i < argc) && (argv[i][0] != '-') && (argv[i][0] != '+')) {
+ address = argv[i++];
+ if ((i < argc) && (argv[i][0] != '-') && (argv[i][0] != '+')) {
+ hopcount = strtol(argv[i++], NULL, 10);
+ if ((hopcount < 1) || (hopcount > 255)) {
+ ErrorF("Xserver: multicast hop count out of range: %d\n",
+ hopcount);
+ exit(1);
+ }
+ }
}
- else
- {
- ErrorF ("Xserver: -from host on strange network %s\n", argv[i]);
- exit (1);
+
+ if (xdm_udp_port > 0 && xdm_udp_port < 65535) {
+ sprintf(portstr, "%d", xdm_udp_port);
+ } else {
+ ErrorF("Xserver: port out of range: %d\n", xdm_udp_port);
+ exit(1);
}
- xdm_from = argv[i];
+ bzero(&hints, sizeof(hints));
+ hints.ai_socktype = SOCK_DGRAM;
+
+ if ((gaierr = getaddrinfo(address, portstr, &hints, &firstai)) == 0) {
+ for (ai = firstai; ai != NULL; ai = ai->ai_next) {
+ if (((ai->ai_family == AF_INET) &&
+ IN_MULTICAST(((struct sockaddr_in *) ai->ai_addr)
+ ->sin_addr.s_addr))
+ || ((ai->ai_family == AF_INET6) &&
+ IN6_IS_ADDR_MULTICAST(&((struct sockaddr_in6 *) ai->ai_addr)
+ ->sin6_addr)))
+ break;
+ }
+ if (ai == NULL) {
+ ErrorF ("Xserver: address not supported multicast type %s\n",
+ address);
+ exit (1);
+ } else {
+ struct multicastinfo *mcastinfo, *mcl;
+
+ mcastinfo = malloc(sizeof(struct multicastinfo));
+ mcastinfo->next = NULL;
+ mcastinfo->ai = firstai;
+ mcastinfo->hops = hopcount;
+
+ if (mcastlist == NULL) {
+ mcastlist = mcastinfo;
+ } else {
+ for (mcl = mcastlist; mcl->next != NULL; mcl = mcl->next) {
+ /* Do nothing - just find end of list */
+ }
+ mcl->next = mcastinfo;
+ }
+ }
+ } else {
+ ErrorF("Xserver: %s: %s\n", gai_strerror(gaierr), address);
+ exit(1);
+ }
+ return i;
}
+#endif
#else
static int xdmcp_non_empty; /* avoid complaint by ranlib */
diff --git a/randr/randr.c b/randr/randr.c
index 666605e96..c0a8c4bf8 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/randr/randr.c,v 1.19 2003/02/08 03:52:30 dawes Exp $
+ * $XFree86: xc/programs/Xserver/randr/randr.c,v 1.22 2003/11/06 18:38:15 tsi Exp $
*
* Copyright © 2000, Compaq Computer Corporation,
* Copyright © 2002, Hewlett Packard, Inc.
@@ -41,13 +41,20 @@
#include "randr.h"
#include "randrproto.h"
#include "randrstr.h"
+#ifdef RENDER
#include "render.h" /* we share subpixel order information */
#include "picturestr.h"
+#endif
#include "Xfuncproto.h"
#ifdef EXTMODULE
#include "xf86_ansic.h"
#endif
+/* From render.h */
+#ifndef SubPixelUnknown
+#define SubPixelUnknown 0
+#endif
+
#define RR_VALIDATE
int RRGeneration;
int RRNScreens;
@@ -66,8 +73,10 @@ static int SProcRRQueryVersion (ClientPtr pClient);
real->mem = priv->mem; \
}
+#if 0
static CARD8 RRReqCode;
static int RRErrBase;
+#endif
static int RREventBase;
static RESTYPE ClientType, EventType; /* resource types for event masks */
static int RRClientPrivateIndex;
@@ -292,8 +301,10 @@ RRExtensionInit (void)
RRResetProc, StandardMinorOpcode);
if (!extEntry)
return;
+#if 0
RRReqCode = (CARD8) extEntry->base;
RRErrBase = extEntry->errorBase;
+#endif
RREventBase = extEntry->eventBase;
EventSwapVector[RREventBase + RRScreenChangeNotify] = (EventSwapPtr)
SRRScreenChangeNotifyEvent;
@@ -322,7 +333,11 @@ TellChanged (WindowPtr pWin, pointer value)
se.configTimestamp = pScrPriv->lastConfigTime.milliseconds;
se.root = pRoot->drawable.id;
se.window = pWin->drawable.id;
+#ifdef RENDER
se.subpixelOrder = PictureGetSubpixelOrder (pScreen);
+#else
+ se.subpixelOrder = SubPixelUnknown;
+#endif
if (pScrPriv->size >= 0)
{
pSize = &pScrPriv->pSizes[pScrPriv->size];
@@ -523,7 +538,7 @@ ProcRRGetScreenInfo (ClientPtr client)
ScreenPtr pScreen;
rrScrPrivPtr pScrPriv;
CARD8 *extra;
- int extraLen;
+ unsigned long extraLen;
REQUEST_SIZE_MATCH(xRRGetScreenInfoReq);
pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client,
@@ -645,8 +660,8 @@ ProcRRGetScreenInfo (ClientPtr client)
data8 = (CARD8 *) rates;
if (data8 - (CARD8 *) extra != extraLen)
- FatalError ("RRGetScreenInfo bad extra len %d != %d\n",
- data8 - (CARD8 *) extra, extraLen);
+ FatalError ("RRGetScreenInfo bad extra len %ld != %ld\n",
+ (unsigned long)(data8 - (CARD8 *) extra), extraLen);
rep.length = (extraLen + 3) >> 2;
}
if (client->swapped) {
diff --git a/record/record.c b/record/record.c
index 2baba3694..3657ef42b 100644
--- a/record/record.c
+++ b/record/record.c
@@ -32,7 +32,7 @@ This work benefited from earlier work done by Martha Zimet of NCD
and Jim Haggerty of Metheus.
*/
-/* $XFree86: xc/programs/Xserver/record/record.c,v 1.10 2002/09/17 01:15:14 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/record/record.c,v 1.12 2003/11/17 22:20:44 dawes Exp $ */
#define NEED_EVENTS
#include "dixstruct.h"
@@ -136,10 +136,8 @@ static int numEnabledRCAPs;
}
static int RecordDeleteContext(
-#if NeedFunctionPrototypes
pointer /*value*/,
XID /*id*/
-#endif
);
@@ -151,9 +149,7 @@ static int RecordDeleteContext(
* Proc function.
*/
typedef int (*ProcFunctionPtr)(
-#if NeedFunctionPrototypes
ClientPtr /*pClient*/
-#endif
);
/* Record client private. Generally a client only has one of these if
@@ -239,12 +235,13 @@ RecordFindContextOnAllContexts(pContext)
* data1/len1).
*/
static void
-RecordFlushReplyBuffer(pContext, data1, len1, data2, len2)
- RecordContextPtr pContext;
- pointer data1;
- int len1;
- pointer data2;
- int len2;
+RecordFlushReplyBuffer(
+ RecordContextPtr pContext,
+ pointer data1,
+ int len1,
+ pointer data2,
+ int len2
+)
{
if (!pContext->pRecordingClient || pContext->pRecordingClient->clientGone)
return;
@@ -287,13 +284,8 @@ RecordFlushReplyBuffer(pContext, data1, len1, data2, len2)
* client (after any buffered data).
*/
static void
-RecordAProtocolElement(pContext, pClient, category, data, datalen, futurelen)
- RecordContextPtr pContext;
- ClientPtr pClient;
- int category;
- pointer data;
- int datalen;
- int futurelen;
+RecordAProtocolElement(RecordContextPtr pContext, ClientPtr pClient,
+ int category, pointer data, int datalen, int futurelen)
{
CARD32 elemHeaderData[2];
int numElemHeaders = 0;
@@ -431,10 +423,11 @@ RecordAProtocolElement(pContext, pClient, category, data, datalen, futurelen)
* Side Effects: none.
*/
static RecordClientsAndProtocolPtr
-RecordFindClientOnContext(pContext, clientspec, pposition)
- RecordContextPtr pContext;
- XID clientspec;
- int *pposition;
+RecordFindClientOnContext(
+ RecordContextPtr pContext,
+ XID clientspec,
+ int *pposition
+)
{
RecordClientsAndProtocolPtr pRCAP;
@@ -932,10 +925,11 @@ RecordADeviceEvent(pcbl, nulldata, calldata)
* the recording clients.
*/
static void
-RecordFlushAllContexts(pcbl, nulldata, calldata)
- CallbackListPtr *pcbl;
- pointer nulldata;
- pointer calldata;
+RecordFlushAllContexts(
+ CallbackListPtr *pcbl,
+ pointer nulldata,
+ pointer calldata
+)
{
int eci; /* enabled context index */
RecordContextPtr pContext;
@@ -1433,9 +1427,7 @@ RecordCanonicalizeClientSpecifiers(pClientspecs, pNumClientspecs, excludespec)
* Side Effects: none.
*/
static int
-RecordPadAlign(size, align)
- int size;
- int align;
+RecordPadAlign(int size, int align)
{
return (align - (size & (align - 1))) & (align - 1);
} /* RecordPadAlign */
@@ -1633,14 +1625,14 @@ RecordAllocIntervals(psi, nIntervals)
* increased accordingly.
*/
static int
-RecordConvertRangesToIntervals(psi, pRanges, nRanges, byteoffset,
- pExtSetInfo, pnExtSetInfo)
- SetInfoPtr psi;
- xRecordRange *pRanges;
- int nRanges;
- int byteoffset;
- SetInfoPtr pExtSetInfo;
- int *pnExtSetInfo;
+RecordConvertRangesToIntervals(
+ SetInfoPtr psi,
+ xRecordRange *pRanges,
+ int nRanges,
+ int byteoffset,
+ SetInfoPtr pExtSetInfo,
+ int *pnExtSetInfo
+)
{
int i;
CARD8 *pCARD8;
@@ -2200,13 +2192,14 @@ RecordAllocRanges(pri, nRanges)
* more than the index of the last xRecordRange that was touched.
*/
static int
-RecordConvertSetToRanges(pSet, pri, byteoffset, card8, imax, pStartIndex)
- RecordSetPtr pSet;
- GetContextRangeInfoPtr pri;
- int byteoffset;
- Bool card8;
- unsigned int imax;
- int *pStartIndex;
+RecordConvertSetToRanges(
+ RecordSetPtr pSet,
+ GetContextRangeInfoPtr pri,
+ int byteoffset,
+ Bool card8,
+ unsigned int imax,
+ int *pStartIndex
+)
{
int nRanges;
RecordSetIteratePtr pIter = NULL;
@@ -2268,10 +2261,11 @@ RecordConvertSetToRanges(pSet, pri, byteoffset, card8, imax, pStartIndex)
* byteoffset is filled in with the information from pMinOpInfo.
*/
static int
-RecordConvertMinorOpInfoToRanges(pMinOpInfo, pri, byteoffset)
- RecordMinorOpPtr pMinOpInfo;
- GetContextRangeInfoPtr pri;
- int byteoffset;
+RecordConvertMinorOpInfoToRanges(
+ RecordMinorOpPtr pMinOpInfo,
+ GetContextRangeInfoPtr pri,
+ int byteoffset
+)
{
int nsets;
int start;
@@ -2722,13 +2716,11 @@ SProcRecordQueryVersion(client)
static void
-SwapCreateRegister(stuff)
- xRecordRegisterClientsReq *stuff;
+SwapCreateRegister(xRecordRegisterClientsReq *stuff)
{
register char n;
int i;
XID *pClientID;
- xRecordRange *pRange;
swapl(&stuff->context, n);
swapl(&stuff->nClients, n);
@@ -2738,7 +2730,6 @@ SwapCreateRegister(stuff)
{
swapl(pClientID, n);
}
- pRange = (xRecordRange *)pClientID;
RecordSwapRanges((xRecordRange *)pClientID, stuff->nRanges);
} /* SwapCreateRegister */
@@ -2752,7 +2743,7 @@ SProcRecordCreateContext(client)
swaps(&stuff->length, n);
REQUEST_AT_LEAST_SIZE(xRecordCreateContextReq);
- SwapCreateRegister(stuff);
+ SwapCreateRegister((pointer)stuff);
return ProcRecordCreateContext(client);
} /* SProcRecordCreateContext */
@@ -2766,7 +2757,7 @@ SProcRecordRegisterClients(client)
swaps(&stuff->length, n);
REQUEST_AT_LEAST_SIZE(xRecordRegisterClientsReq);
- SwapCreateRegister(stuff);
+ SwapCreateRegister((pointer)stuff);
return ProcRecordRegisterClients(client);
} /* SProcRecordRegisterClients */
diff --git a/record/set.c b/record/set.c
index c17e7cfab..847a1b28d 100644
--- a/record/set.c
+++ b/record/set.c
@@ -27,7 +27,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/programs/Xserver/record/set.c,v 1.7 2001/12/14 20:00:37 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/record/set.c,v 1.8 2003/11/17 22:20:44 dawes Exp $ */
/*
@@ -447,12 +447,10 @@ _RecordForceSetImplementation(setimpl)
#endif
typedef RecordSetPtr (*RecordCreateSetProcPtr)(
-#if NeedNestedPrototypes
RecordSetInterval *pIntervals,
int nIntervals,
void *pMem,
int memsize
-#endif
);
static int
diff --git a/record/set.h b/record/set.h
index ba4ffccd3..169077720 100644
--- a/record/set.h
+++ b/record/set.h
@@ -27,6 +27,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
+/* $XFree86: xc/programs/Xserver/record/set.h,v 1.3 2003/11/17 22:20:44 dawes Exp $ */
/*
A Set Abstract Data Type (ADT) for the RECORD Extension
@@ -68,22 +69,16 @@ typedef void *RecordSetIteratePtr;
*/
typedef struct {
void (*DestroySet)(
-#if NeedNestedPrototypes
RecordSetPtr pSet
-#endif
);
unsigned long (*IsMemberOfSet)(
-#if NeedNestedPrototypes
RecordSetPtr pSet,
int possible_member
-#endif
);
RecordSetIteratePtr (*IterateSet)(
-#if NeedNestedPrototypes
-RecordSetPtr pSet,
+ RecordSetPtr pSet,
RecordSetIteratePtr pIter,
RecordSetInterval *interval
-#endif
);
} RecordSetOperations;
@@ -95,12 +90,10 @@ typedef struct _RecordSetRec {
} RecordSetRec;
RecordSetPtr RecordCreateSet(
-#if NeedFunctionPrototypes
RecordSetInterval *intervals,
int nintervals,
void *pMem,
int memsize
-#endif
);
/*
RecordCreateSet creates and returns a new set having members specified
@@ -115,11 +108,9 @@ RecordSetPtr RecordCreateSet(
*/
int RecordSetMemoryRequirements(
-#if NeedFunctionPrototypes
RecordSetInterval * /*pIntervals*/,
int /*nintervals*/,
int * /*alignment*/
-#endif
);
#define RecordDestroySet(_pSet) \
diff --git a/render/animcur.c b/render/animcur.c
index 7a4e22d59..fcf6a25a7 100644
--- a/render/animcur.c
+++ b/render/animcur.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/render/animcur.c,v 1.5 2002/12/22 15:07:12 tsi Exp $
+ * $XFree86: xc/programs/Xserver/render/animcur.c,v 1.6 2003/11/03 05:12:01 tsi Exp $
*
* Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -353,7 +353,6 @@ AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *pp
CursorPtr pCursor;
int i;
AnimCurPtr ac;
- AnimCurElt *ae;
for (i = 0; i < screenInfo.numScreens; i++)
if (!GetAnimCurScreenIfSet (screenInfo.screens[i]))
@@ -386,7 +385,6 @@ AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *pp
ac = GetAnimCur (pCursor);
ac->nelt = ncursor;
ac->elts = (AnimCurElt *) (ac + 1);
- ae = ac->elts;
for (i = 0; i < ncursor; i++)
{
diff --git a/render/mipict.c b/render/mipict.c
index 3971a8f6e..0f0cf6c8b 100644
--- a/render/mipict.c
+++ b/render/mipict.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/render/mipict.c,v 1.14 2002/11/06 22:45:36 keithp Exp $
+ * $XFree86: xc/programs/Xserver/render/mipict.c,v 1.16 2003/11/10 18:22:52 tsi Exp $
*
* Copyright © 1999 Keith Packard
*
@@ -125,6 +125,7 @@ miValidatePicture (PicturePtr pPicture,
Mask mask)
{
DrawablePtr pDrawable = pPicture->pDrawable;
+ ScreenPtr pScreen = pDrawable->pScreen;
if ((mask & (CPClipXOrigin|CPClipYOrigin|CPClipMask|CPSubwindowMode)) ||
(pDrawable->serialNumber != (pPicture->serialNumber & DRAWABLE_SERIAL_BITS)))
@@ -178,7 +179,7 @@ miValidatePicture (PicturePtr pPicture,
if (freeCompClip)
{
- REGION_INTERSECT(pPicture->pScreen, pPicture->pCompositeClip,
+ REGION_INTERSECT(pScreen, pPicture->pCompositeClip,
pregWin, pPicture->clientClip);
if (freeTmpClip)
REGION_DESTROY(pScreen, pregWin);
@@ -248,7 +249,8 @@ miValidatePicture (PicturePtr pPicture,
#define BOUND(v) (INT16) ((v) < MINSHORT ? MINSHORT : (v) > MAXSHORT ? MAXSHORT : (v))
static __inline Bool
-miClipPictureReg (RegionPtr pRegion,
+miClipPictureReg (ScreenPtr pScreen,
+ RegionPtr pRegion,
RegionPtr pClip,
int dx,
int dy)
@@ -285,7 +287,8 @@ miClipPictureReg (RegionPtr pRegion,
}
static __inline Bool
-miClipPictureSrc (RegionPtr pRegion,
+miClipPictureSrc (ScreenPtr pScreen,
+ RegionPtr pRegion,
PicturePtr pPicture,
int dx,
int dy)
@@ -311,10 +314,8 @@ miClipPictureSrc (RegionPtr pRegion,
}
else
{
- return miClipPictureReg (pRegion,
- pPicture->pCompositeClip,
- dx,
- dy);
+ return miClipPictureReg (pScreen, pRegion, pPicture->pCompositeClip,
+ dx, dy);
}
}
@@ -332,6 +333,7 @@ miComputeCompositeRegion (RegionPtr pRegion,
CARD16 width,
CARD16 height)
{
+ ScreenPtr pScreen = pSrc->pDrawable->pScreen;
int v;
pRegion->extents.x1 = xDst;
@@ -345,18 +347,18 @@ miComputeCompositeRegion (RegionPtr pRegion,
if (pRegion->extents.x1 >= pRegion->extents.x2 ||
pRegion->extents.y1 >= pRegion->extents.y2)
{
- REGION_EMPTY (pDst->pDrawable->pScreen, pRegion);
+ REGION_EMPTY (pScreen, pRegion);
return TRUE;
}
/* clip against src */
- if (!miClipPictureSrc (pRegion, pSrc, xDst - xSrc, yDst - ySrc))
+ if (!miClipPictureSrc (pScreen, pRegion, pSrc, xDst - xSrc, yDst - ySrc))
{
REGION_UNINIT (pScreen, pRegion);
return FALSE;
}
if (pSrc->alphaMap)
{
- if (!miClipPictureSrc (pRegion, pSrc->alphaMap,
+ if (!miClipPictureSrc (pScreen, pRegion, pSrc->alphaMap,
xDst - (xSrc + pSrc->alphaOrigin.x),
yDst - (ySrc + pSrc->alphaOrigin.y)))
{
@@ -367,14 +369,15 @@ miComputeCompositeRegion (RegionPtr pRegion,
/* clip against mask */
if (pMask)
{
- if (!miClipPictureSrc (pRegion, pMask, xDst - xMask, yDst - yMask))
+ if (!miClipPictureSrc (pScreen, pRegion, pMask,
+ xDst - xMask, yDst - yMask))
{
REGION_UNINIT (pScreen, pRegion);
return FALSE;
}
if (pMask->alphaMap)
{
- if (!miClipPictureSrc (pRegion, pMask->alphaMap,
+ if (!miClipPictureSrc (pScreen, pRegion, pMask->alphaMap,
xDst - (xMask + pMask->alphaOrigin.x),
yDst - (yMask + pMask->alphaOrigin.y)))
{
@@ -383,14 +386,15 @@ miComputeCompositeRegion (RegionPtr pRegion,
}
}
}
- if (!miClipPictureReg (pRegion, pDst->pCompositeClip, 0, 0))
+ if (!miClipPictureReg (pScreen, pRegion, pDst->pCompositeClip, 0, 0))
{
REGION_UNINIT (pScreen, pRegion);
return FALSE;
}
if (pDst->alphaMap)
{
- if (!miClipPictureReg (pRegion, pDst->alphaMap->pCompositeClip,
+ if (!miClipPictureReg (pScreen,
+ pRegion, pDst->alphaMap->pCompositeClip,
-pDst->alphaOrigin.x,
-pDst->alphaOrigin.y))
{
@@ -467,9 +471,9 @@ miRenderPixelToColor (PictFormatPtr format,
b = (pixel >> format->direct.blue) & format->direct.blueMask;
a = (pixel >> format->direct.alpha) & format->direct.alphaMask;
color->red = miFillColor (r, Ones (format->direct.redMask));
- color->green = miFillColor (r, Ones (format->direct.greenMask));
- color->blue = miFillColor (r, Ones (format->direct.blueMask));
- color->alpha = miFillColor (r, Ones (format->direct.alphaMask));
+ color->green = miFillColor (g, Ones (format->direct.greenMask));
+ color->blue = miFillColor (b, Ones (format->direct.blueMask));
+ color->alpha = miFillColor (a, Ones (format->direct.alphaMask));
break;
case PictTypeIndexed:
pIndexed = (miIndexedPtr) (format->index.devPrivate);
diff --git a/render/picture.h b/render/picture.h
index 2c2b1b3b4..c47d51941 100644
--- a/render/picture.h
+++ b/render/picture.h
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/render/picture.h,v 1.18 2002/11/06 22:45:36 keithp Exp $
+ * $XFree86: xc/programs/Xserver/render/picture.h,v 1.21 2003/11/03 05:12:01 tsi Exp $
*
* Copyright © 2000 SuSE, Inc.
*
@@ -165,11 +165,13 @@ int PictureParseCmapPolicy (const char *name);
#ifdef WIN32
typedef __int64 xFixed_32_32;
#else
-# if defined(__alpha__) || defined(__alpha) || \
+# if defined (_LP64) || \
+ defined(__alpha__) || defined(__alpha) || \
defined(ia64) || defined(__ia64__) || \
defined(__sparc64__) || \
defined(__s390x__) || \
- defined(x86_64) || defined (__x86_64__)
+ defined(AMD64) || defined (__AMD64__) || \
+ (defined(sgi) && (_MIPS_SZLONG == 64))
typedef long xFixed_32_32;
# else
# if defined(__GNUC__) && \
diff --git a/render/render.c b/render/render.c
index a4f90ea77..0d89885c3 100644
--- a/render/render.c
+++ b/render/render.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/render/render.c,v 1.26 2003/02/14 18:15:21 dawes Exp $
+ * $XFree86: xc/programs/Xserver/render/render.c,v 1.28 2003/11/03 05:12:02 tsi Exp $
*
* Copyright © 2000 SuSE, Inc.
*
@@ -186,7 +186,9 @@ int (*SProcRenderVector[RenderNumberRequests])(ClientPtr) = {
static void
RenderResetProc (ExtensionEntry *extEntry);
+#if 0
static CARD8 RenderReqCode;
+#endif
int RenderErrBase;
int RenderClientPrivateIndex;
@@ -231,7 +233,9 @@ RenderExtensionInit (void)
RenderResetProc, StandardMinorOpcode);
if (!extEntry)
return;
+#if 0
RenderReqCode = (CARD8) extEntry->base;
+#endif
RenderErrBase = extEntry->errorBase;
}
@@ -2388,6 +2392,48 @@ PanoramiXRenderSetPictureClipRectangles (ClientPtr client)
}
static int
+PanoramiXRenderSetPictureTransform (ClientPtr client)
+{
+ REQUEST(xRenderSetPictureTransformReq);
+ int result = Success, j;
+ PanoramiXRes *pict;
+
+ REQUEST_AT_LEAST_SIZE(xRenderSetPictureTransformReq);
+
+ VERIFY_XIN_PICTURE(pict, stuff->picture, client, SecurityWriteAccess,
+ RenderErrBase + BadPicture);
+
+ FOR_NSCREENS_BACKWARD(j) {
+ stuff->picture = pict->info[j].id;
+ result = (*PanoramiXSaveRenderVector[X_RenderSetPictureTransform]) (client);
+ if(result != Success) break;
+ }
+
+ return (result);
+}
+
+static int
+PanoramiXRenderSetPictureFilter (ClientPtr client)
+{
+ REQUEST(xRenderSetPictureFilterReq);
+ int result = Success, j;
+ PanoramiXRes *pict;
+
+ REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq);
+
+ VERIFY_XIN_PICTURE(pict, stuff->picture, client, SecurityWriteAccess,
+ RenderErrBase + BadPicture);
+
+ FOR_NSCREENS_BACKWARD(j) {
+ stuff->picture = pict->info[j].id;
+ result = (*PanoramiXSaveRenderVector[X_RenderSetPictureFilter]) (client);
+ if(result != Success) break;
+ }
+
+ return (result);
+}
+
+static int
PanoramiXRenderFreePicture (ClientPtr client)
{
PanoramiXRes *pict;
@@ -2551,6 +2597,326 @@ PanoramiXRenderFillRectangles (ClientPtr client)
return result;
}
+static int
+PanoramiXRenderTrapezoids(ClientPtr client)
+{
+ PanoramiXRes *src, *dst;
+ int result = Success, j;
+ REQUEST(xRenderTrapezoidsReq);
+ char *extra;
+ int extra_len;
+
+ REQUEST_AT_LEAST_SIZE (xRenderTrapezoidsReq);
+
+ VERIFY_XIN_PICTURE (src, stuff->src, client, SecurityReadAccess,
+ RenderErrBase + BadPicture);
+ VERIFY_XIN_PICTURE (dst, stuff->dst, client, SecurityWriteAccess,
+ RenderErrBase + BadPicture);
+
+ extra_len = (client->req_len << 2) - sizeof (xRenderTrapezoidsReq);
+
+ if (extra_len &&
+ (extra = (char *) ALLOCATE_LOCAL (extra_len))) {
+ memcpy (extra, stuff + 1, extra_len);
+
+ FOR_NSCREENS_FORWARD(j) {
+ if (j) memcpy (stuff + 1, extra, extra_len);
+ if (dst->u.pict.root) {
+ int x_off = panoramiXdataPtr[j].x;
+ int y_off = panoramiXdataPtr[j].y;
+
+ if(x_off || y_off) {
+ xTrapezoid *trap = (xTrapezoid *) (stuff + 1);
+ int i = extra_len / sizeof (xTrapezoid);
+
+ while (i--) {
+ trap->top -= y_off;
+ trap->bottom -= y_off;
+ trap->left.p1.x -= x_off;
+ trap->left.p1.y -= y_off;
+ trap->left.p2.x -= x_off;
+ trap->left.p2.y -= y_off;
+ trap->right.p1.x -= x_off;
+ trap->right.p1.y -= y_off;
+ trap->right.p2.x -= x_off;
+ trap->right.p2.y -= y_off;
+ trap++;
+ }
+ }
+ }
+
+ stuff->src = src->info[j].id;
+ stuff->dst = dst->info[j].id;
+ result =
+ (*PanoramiXSaveRenderVector[X_RenderTrapezoids]) (client);
+
+ if(result != Success) break;
+ }
+
+ DEALLOCATE_LOCAL(extra);
+ }
+
+ return result;
+}
+
+static int
+PanoramiXRenderTriangles(ClientPtr client)
+{
+ PanoramiXRes *src, *dst;
+ int result = Success, j;
+ REQUEST(xRenderTrianglesReq);
+ char *extra;
+ int extra_len;
+
+ REQUEST_AT_LEAST_SIZE (xRenderTrianglesReq);
+
+ VERIFY_XIN_PICTURE (src, stuff->src, client, SecurityReadAccess,
+ RenderErrBase + BadPicture);
+ VERIFY_XIN_PICTURE (dst, stuff->dst, client, SecurityWriteAccess,
+ RenderErrBase + BadPicture);
+
+ extra_len = (client->req_len << 2) - sizeof (xRenderTrianglesReq);
+
+ if (extra_len &&
+ (extra = (char *) ALLOCATE_LOCAL (extra_len))) {
+ memcpy (extra, stuff + 1, extra_len);
+
+ FOR_NSCREENS_FORWARD(j) {
+ if (j) memcpy (stuff + 1, extra, extra_len);
+ if (dst->u.pict.root) {
+ int x_off = panoramiXdataPtr[j].x;
+ int y_off = panoramiXdataPtr[j].y;
+
+ if(x_off || y_off) {
+ xTriangle *tri = (xTriangle *) (stuff + 1);
+ int i = extra_len / sizeof (xTriangle);
+
+ while (i--) {
+ tri->p1.x -= x_off;
+ tri->p1.y -= y_off;
+ tri->p2.x -= x_off;
+ tri->p2.y -= y_off;
+ tri->p3.x -= x_off;
+ tri->p3.y -= y_off;
+ tri++;
+ }
+ }
+ }
+
+ stuff->src = src->info[j].id;
+ stuff->dst = dst->info[j].id;
+ result =
+ (*PanoramiXSaveRenderVector[X_RenderTriangles]) (client);
+
+ if(result != Success) break;
+ }
+
+ DEALLOCATE_LOCAL(extra);
+ }
+
+ return result;
+}
+
+static int
+PanoramiXRenderTriStrip(ClientPtr client)
+{
+ PanoramiXRes *src, *dst;
+ int result = Success, j;
+ REQUEST(xRenderTriStripReq);
+ char *extra;
+ int extra_len;
+
+ REQUEST_AT_LEAST_SIZE (xRenderTriStripReq);
+
+ VERIFY_XIN_PICTURE (src, stuff->src, client, SecurityReadAccess,
+ RenderErrBase + BadPicture);
+ VERIFY_XIN_PICTURE (dst, stuff->dst, client, SecurityWriteAccess,
+ RenderErrBase + BadPicture);
+
+ extra_len = (client->req_len << 2) - sizeof (xRenderTriStripReq);
+
+ if (extra_len &&
+ (extra = (char *) ALLOCATE_LOCAL (extra_len))) {
+ memcpy (extra, stuff + 1, extra_len);
+
+ FOR_NSCREENS_FORWARD(j) {
+ if (j) memcpy (stuff + 1, extra, extra_len);
+ if (dst->u.pict.root) {
+ int x_off = panoramiXdataPtr[j].x;
+ int y_off = panoramiXdataPtr[j].y;
+
+ if(x_off || y_off) {
+ xPointFixed *fixed = (xPointFixed *) (stuff + 1);
+ int i = extra_len / sizeof (xPointFixed);
+
+ while (i--) {
+ fixed->x -= x_off;
+ fixed->y -= y_off;
+ fixed++;
+ }
+ }
+ }
+
+ stuff->src = src->info[j].id;
+ stuff->dst = dst->info[j].id;
+ result =
+ (*PanoramiXSaveRenderVector[X_RenderTriStrip]) (client);
+
+ if(result != Success) break;
+ }
+
+ DEALLOCATE_LOCAL(extra);
+ }
+
+ return result;
+}
+
+static int
+PanoramiXRenderTriFan(ClientPtr client)
+{
+ PanoramiXRes *src, *dst;
+ int result = Success, j;
+ REQUEST(xRenderTriFanReq);
+ char *extra;
+ int extra_len;
+
+ REQUEST_AT_LEAST_SIZE (xRenderTriFanReq);
+
+ VERIFY_XIN_PICTURE (src, stuff->src, client, SecurityReadAccess,
+ RenderErrBase + BadPicture);
+ VERIFY_XIN_PICTURE (dst, stuff->dst, client, SecurityWriteAccess,
+ RenderErrBase + BadPicture);
+
+ extra_len = (client->req_len << 2) - sizeof (xRenderTriFanReq);
+
+ if (extra_len &&
+ (extra = (char *) ALLOCATE_LOCAL (extra_len))) {
+ memcpy (extra, stuff + 1, extra_len);
+
+ FOR_NSCREENS_FORWARD(j) {
+ if (j) memcpy (stuff + 1, extra, extra_len);
+ if (dst->u.pict.root) {
+ int x_off = panoramiXdataPtr[j].x;
+ int y_off = panoramiXdataPtr[j].y;
+
+ if(x_off || y_off) {
+ xPointFixed *fixed = (xPointFixed *) (stuff + 1);
+ int i = extra_len / sizeof (xPointFixed);
+
+ while (i--) {
+ fixed->x -= x_off;
+ fixed->y -= y_off;
+ fixed++;
+ }
+ }
+ }
+
+ stuff->src = src->info[j].id;
+ stuff->dst = dst->info[j].id;
+ result =
+ (*PanoramiXSaveRenderVector[X_RenderTriFan]) (client);
+
+ if(result != Success) break;
+ }
+
+ DEALLOCATE_LOCAL(extra);
+ }
+
+ return result;
+}
+
+#if 0 /* Not implemented yet */
+
+static int
+PanoramiXRenderColorTrapezoids(ClientPtr client)
+{
+ PanoramiXRes *src, *dst;
+ int result = Success, j;
+ REQUEST(xRenderColorTrapezoidsReq);
+ char *extra;
+ int extra_len;
+
+ REQUEST_AT_LEAST_SIZE (xRenderColorTrapezoidsReq);
+
+ VERIFY_XIN_PICTURE (dst, stuff->dst, client, SecurityWriteAccess,
+ RenderErrBase + BadPicture);
+
+ extra_len = (client->req_len << 2) - sizeof (xRenderColorTrapezoidsReq);
+
+ if (extra_len &&
+ (extra = (char *) ALLOCATE_LOCAL (extra_len))) {
+ memcpy (extra, stuff + 1, extra_len);
+
+ FOR_NSCREENS_FORWARD(j) {
+ if (j) memcpy (stuff + 1, extra, extra_len);
+ if (dst->u.pict.root) {
+ int x_off = panoramiXdataPtr[j].x;
+ int y_off = panoramiXdataPtr[j].y;
+
+ if(x_off || y_off) {
+ ....;
+ }
+ }
+
+ stuff->dst = dst->info[j].id;
+ result =
+ (*PanoramiXSaveRenderVector[X_RenderColorTrapezoids]) (client);
+
+ if(result != Success) break;
+ }
+
+ DEALLOCATE_LOCAL(extra);
+ }
+
+ return result;
+}
+
+static int
+PanoramiXRenderColorTriangles(ClientPtr client)
+{
+ PanoramiXRes *src, *dst;
+ int result = Success, j;
+ REQUEST(xRenderColorTrianglesReq);
+ char *extra;
+ int extra_len;
+
+ REQUEST_AT_LEAST_SIZE (xRenderColorTrianglesReq);
+
+ VERIFY_XIN_PICTURE (dst, stuff->dst, client, SecurityWriteAccess,
+ RenderErrBase + BadPicture);
+
+ extra_len = (client->req_len << 2) - sizeof (xRenderColorTrianglesReq);
+
+ if (extra_len &&
+ (extra = (char *) ALLOCATE_LOCAL (extra_len))) {
+ memcpy (extra, stuff + 1, extra_len);
+
+ FOR_NSCREENS_FORWARD(j) {
+ if (j) memcpy (stuff + 1, extra, extra_len);
+ if (dst->u.pict.root) {
+ int x_off = panoramiXdataPtr[j].x;
+ int y_off = panoramiXdataPtr[j].y;
+
+ if(x_off || y_off) {
+ ....;
+ }
+ }
+
+ stuff->dst = dst->info[j].id;
+ result =
+ (*PanoramiXSaveRenderVector[X_RenderColorTriangles]) (client);
+
+ if(result != Success) break;
+ }
+
+ DEALLOCATE_LOCAL(extra);
+ }
+
+ return result;
+}
+
+#endif
+
void
PanoramiXRenderInit (void)
{
@@ -2564,6 +2930,8 @@ PanoramiXRenderInit (void)
*/
ProcRenderVector[X_RenderCreatePicture] = PanoramiXRenderCreatePicture;
ProcRenderVector[X_RenderChangePicture] = PanoramiXRenderChangePicture;
+ ProcRenderVector[X_RenderSetPictureTransform] = PanoramiXRenderSetPictureTransform;
+ ProcRenderVector[X_RenderSetPictureFilter] = PanoramiXRenderSetPictureFilter;
ProcRenderVector[X_RenderSetPictureClipRectangles] = PanoramiXRenderSetPictureClipRectangles;
ProcRenderVector[X_RenderFreePicture] = PanoramiXRenderFreePicture;
ProcRenderVector[X_RenderComposite] = PanoramiXRenderComposite;
@@ -2571,6 +2939,11 @@ PanoramiXRenderInit (void)
ProcRenderVector[X_RenderCompositeGlyphs16] = PanoramiXRenderCompositeGlyphs;
ProcRenderVector[X_RenderCompositeGlyphs32] = PanoramiXRenderCompositeGlyphs;
ProcRenderVector[X_RenderFillRectangles] = PanoramiXRenderFillRectangles;
+
+ ProcRenderVector[X_RenderTrapezoids] = PanoramiXRenderTrapezoids;
+ ProcRenderVector[X_RenderTriangles] = PanoramiXRenderTriangles;
+ ProcRenderVector[X_RenderTriStrip] = PanoramiXRenderTriStrip;
+ ProcRenderVector[X_RenderTriFan] = PanoramiXRenderTriFan;
}
void
diff --git a/xkb/XKBAlloc.c b/xkb/XKBAlloc.c
index c6fd855fe..5bc7f65fc 100644
--- a/xkb/XKBAlloc.c
+++ b/xkb/XKBAlloc.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBAlloc.c,v 3.5 2001/01/17 19:41:48 dawes Exp $ */
+/* $XFree86: xc/lib/X11/XKBAlloc.c,v 3.6 2003/11/17 22:20:09 dawes Exp $ */
#ifndef XKB_IN_SERVER
@@ -55,14 +55,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/*ARGSUSED*/
Status
-#if NeedFunctionPrototypes
XkbAllocCompatMap(XkbDescPtr xkb,unsigned which,unsigned nSI)
-#else
-XkbAllocCompatMap(xkb,which,nSI)
- XkbDescPtr xkb;
- unsigned which;
- unsigned nSI;
-#endif
{
XkbCompatMapPtr compat;
XkbSymInterpretRec *prev_interpret;
@@ -109,14 +102,7 @@ XkbSymInterpretRec *prev_interpret;
void
-#if NeedFunctionPrototypes
XkbFreeCompatMap(XkbDescPtr xkb,unsigned which,Bool freeMap)
-#else
-XkbFreeCompatMap(xkb,which,freeMap)
- XkbDescPtr xkb;
- unsigned which;
- Bool freeMap;
-#endif
{
register XkbCompatMapPtr compat;
@@ -143,15 +129,7 @@ register XkbCompatMapPtr compat;
/***===================================================================***/
Status
-#if NeedFunctionPrototypes
XkbAllocNames(XkbDescPtr xkb,unsigned which,int nTotalRG,int nTotalAliases)
-#else
-XkbAllocNames(xkb,which,nTotalRG,nTotalAliases)
- XkbDescPtr xkb;
- unsigned which;
- int nTotalRG;
- int nTotalAliases;
-#endif
{
XkbNamesPtr names;
@@ -231,14 +209,7 @@ XkbNamesPtr names;
}
void
-#if NeedFunctionPrototypes
XkbFreeNames(XkbDescPtr xkb,unsigned which,Bool freeMap)
-#else
-XkbFreeNames(xkb,which,freeMap)
- XkbDescPtr xkb;
- unsigned which;
- Bool freeMap;
-#endif
{
XkbNamesPtr names;
@@ -287,13 +258,7 @@ XkbNamesPtr names;
/*ARGSUSED*/
Status
-#if NeedFunctionPrototypes
XkbAllocControls(XkbDescPtr xkb,unsigned which)
-#else
-XkbAllocControls(xkb,which)
- XkbDescPtr xkb;
- unsigned which;
-#endif
{
if (xkb==NULL)
return BadMatch;
@@ -308,14 +273,7 @@ XkbAllocControls(xkb,which)
/*ARGSUSED*/
void
-#if NeedFunctionPrototypes
XkbFreeControls(XkbDescPtr xkb,unsigned which,Bool freeMap)
-#else
-XkbFreeControls(xkb,which,freeMap)
- XkbDescPtr xkb;
- unsigned which;
- Bool freeMap;
-#endif
{
if (freeMap && (xkb!=NULL) && (xkb->ctrls!=NULL)) {
_XkbFree(xkb->ctrls);
@@ -327,12 +285,7 @@ XkbFreeControls(xkb,which,freeMap)
/***===================================================================***/
Status
-#if NeedFunctionPrototypes
XkbAllocIndicatorMaps(XkbDescPtr xkb)
-#else
-XkbAllocIndicatorMaps(xkb)
- XkbDescPtr xkb;
-#endif
{
if (xkb==NULL)
return BadMatch;
@@ -345,12 +298,7 @@ XkbAllocIndicatorMaps(xkb)
}
void
-#if NeedFunctionPrototypes
XkbFreeIndicatorMaps(XkbDescPtr xkb)
-#else
-XkbFreeIndicatorMaps(xkb)
- XkbDescPtr xkb;
-#endif
{
if ((xkb!=NULL)&&(xkb->indicators!=NULL)) {
_XkbFree(xkb->indicators);
@@ -362,11 +310,7 @@ XkbFreeIndicatorMaps(xkb)
/***====================================================================***/
XkbDescRec *
-#if NeedFunctionPrototypes
XkbAllocKeyboard(void)
-#else
-XkbAllocKeyboard()
-#endif
{
XkbDescRec *xkb;
@@ -377,14 +321,7 @@ XkbDescRec *xkb;
}
void
-#if NeedFunctionPrototypes
XkbFreeKeyboard(XkbDescPtr xkb,unsigned which,Bool freeAll)
-#else
-XkbFreeKeyboard(xkb,which,freeAll)
- XkbDescPtr xkb;
- unsigned which;
- Bool freeAll;
-#endif
{
if (xkb==NULL)
return;
@@ -412,14 +349,7 @@ XkbFreeKeyboard(xkb,which,freeAll)
/***====================================================================***/
XkbDeviceLedInfoPtr
-#if NeedFunctionPrototypes
XkbAddDeviceLedInfo(XkbDeviceInfoPtr devi,unsigned ledClass,unsigned ledId)
-#else
-XkbAddDeviceLedInfo(devi,ledClass,ledId)
- XkbDeviceInfoPtr devi;
- unsigned ledClass;
- unsigned ledId;
-#endif
{
XkbDeviceLedInfoPtr devli;
register int i;
@@ -457,13 +387,7 @@ register int i;
}
Status
-#if NeedFunctionPrototypes
XkbResizeDeviceButtonActions(XkbDeviceInfoPtr devi,unsigned newTotal)
-#else
-XkbResizeDeviceButtonActions(devi,newTotal)
- XkbDeviceInfoPtr devi;
- unsigned newTotal;
-#endif
{
XkbAction *prev_btn_acts;
@@ -497,14 +421,7 @@ XkbResizeDeviceButtonActions(devi,newTotal)
/*ARGSUSED*/
XkbDeviceInfoPtr
-#if NeedFunctionPrototypes
XkbAllocDeviceInfo(unsigned deviceSpec,unsigned nButtons,unsigned szLeds)
-#else
-XkbAllocDeviceInfo(deviceSpec,nButtons,szLeds)
- unsigned deviceSpec;
- unsigned nButtons;
- unsigned szLeds;
-#endif
{
XkbDeviceInfoPtr devi;
@@ -543,14 +460,7 @@ XkbDeviceInfoPtr devi;
void
-#if NeedFunctionPrototypes
XkbFreeDeviceInfo(XkbDeviceInfoPtr devi,unsigned which,Bool freeDevI)
-#else
-XkbFreeDeviceInfo(devi,which,freeDevI)
- XkbDeviceInfoPtr devi;
- unsigned which;
- Bool freeDevI;
-#endif
{
if (devi) {
if (freeDevI) {
diff --git a/xkb/XKBGAlloc.c b/xkb/XKBGAlloc.c
index 44a74c6a8..209631e72 100644
--- a/xkb/XKBGAlloc.c
+++ b/xkb/XKBGAlloc.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBGAlloc.c,v 3.4 2001/01/17 19:41:48 dawes Exp $ */
+/* $XFree86: xc/lib/X11/XKBGAlloc.c,v 3.5 2003/11/17 22:20:09 dawes Exp $ */
#define NEED_EVENTS
#define NEED_REPLIES
@@ -58,7 +58,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbFreeGeomLeafElems( Bool freeAll,
int first,
int count,
@@ -66,16 +65,6 @@ _XkbFreeGeomLeafElems( Bool freeAll,
unsigned short * sz_inout,
char ** elems,
unsigned int elem_sz)
-#else
-_XkbFreeGeomLeafElems(freeAll,first,count,num_inout,sz_inout,elems,elem_sz)
- Bool freeAll;
- int first;
- int count;
- unsigned short * num_inout;
- unsigned short * sz_inout;
- char ** elems;
- unsigned int elem_sz;
-#endif
{
if ((freeAll)||(*elems==NULL)) {
*num_inout= *sz_inout= 0;
@@ -106,13 +95,10 @@ _XkbFreeGeomLeafElems(freeAll,first,count,num_inout,sz_inout,elems,elem_sz)
}
typedef void (*ContentsClearFunc)(
-#if NeedFunctionPrototypes
char * /* priv */
-#endif
);
static void
-#if NeedFunctionPrototypes
_XkbFreeGeomNonLeafElems( Bool freeAll,
int first,
int count,
@@ -121,18 +107,6 @@ _XkbFreeGeomNonLeafElems( Bool freeAll,
char ** elems,
unsigned int elem_sz,
ContentsClearFunc freeFunc)
-#else
-_XkbFreeGeomNonLeafElems(freeAll,first,count,num_inout,sz_inout,elems,elem_sz,
- freeFunc)
- Bool freeAll;
- int first;
- int count;
- unsigned short * num_inout;
- unsigned short * sz_inout;
- char ** elems;
- unsigned int elem_sz;
- ContentsClearFunc freeFunc;
-#endif
{
register int i;
register char *ptr;
@@ -177,12 +151,7 @@ register char *ptr;
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearProperty(char *prop_in)
-#else
-_XkbClearProperty(prop_in)
- char * prop_in;
-#endif
{
XkbPropertyPtr prop= (XkbPropertyPtr)prop_in;
@@ -198,18 +167,10 @@ XkbPropertyPtr prop= (XkbPropertyPtr)prop_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomProperties( XkbGeometryPtr geom,
int first,
int count,
Bool freeAll)
-#else
-XkbFreeGeomProperties(geom,first,count,freeAll)
- XkbGeometryPtr geom;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomNonLeafElems(freeAll,first,count,
&geom->num_properties,&geom->sz_properties,
@@ -221,18 +182,10 @@ XkbFreeGeomProperties(geom,first,count,freeAll)
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbFreeGeomKeyAliases( XkbGeometryPtr geom,
int first,
int count,
Bool freeAll)
-#else
-XkbFreeGeomKeyAliases(geom,first,count,freeAll)
- XkbGeometryPtr geom;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomLeafElems(freeAll,first,count,
&geom->num_key_aliases,&geom->sz_key_aliases,
@@ -244,12 +197,7 @@ XkbFreeGeomKeyAliases(geom,first,count,freeAll)
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearColor(char *color_in)
-#else
-_XkbClearColor(color_in)
- char * color_in;
-#endif
{
XkbColorPtr color= (XkbColorPtr)color_in;
@@ -259,15 +207,7 @@ XkbColorPtr color= (XkbColorPtr)color_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomColors(XkbGeometryPtr geom,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomColors(geom,first,count,freeAll)
- XkbGeometryPtr geom;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomNonLeafElems(freeAll,first,count,
&geom->num_colors,&geom->sz_colors,
@@ -279,15 +219,7 @@ XkbFreeGeomColors(geom,first,count,freeAll)
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbFreeGeomPoints(XkbOutlinePtr outline,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomPoints(outline,first,count,freeAll)
- XkbOutlinePtr outline;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomLeafElems(freeAll,first,count,
&outline->num_points,&outline->sz_points,
@@ -299,12 +231,7 @@ XkbFreeGeomPoints(outline,first,count,freeAll)
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearOutline(char *outline_in)
-#else
-_XkbClearOutline(outline_in)
- char * outline_in;
-#endif
{
XkbOutlinePtr outline= (XkbOutlinePtr)outline_in;
@@ -314,15 +241,7 @@ XkbOutlinePtr outline= (XkbOutlinePtr)outline_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomOutlines(XkbShapePtr shape,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomOutlines(shape,first,count,freeAll)
- XkbShapePtr shape;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomNonLeafElems(freeAll,first,count,
&shape->num_outlines,&shape->sz_outlines,
@@ -335,12 +254,7 @@ XkbFreeGeomOutlines(shape,first,count,freeAll)
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearShape(char *shape_in)
-#else
-_XkbClearShape(shape_in)
- char * shape_in;
-#endif
{
XkbShapePtr shape= (XkbShapePtr)shape_in;
@@ -350,15 +264,7 @@ XkbShapePtr shape= (XkbShapePtr)shape_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomShapes(XkbGeometryPtr geom,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomShapes(geom,first,count,freeAll)
- XkbGeometryPtr geom;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomNonLeafElems(freeAll,first,count,
&geom->num_shapes,&geom->sz_shapes,
@@ -370,15 +276,7 @@ XkbFreeGeomShapes(geom,first,count,freeAll)
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbFreeGeomOverlayKeys(XkbOverlayRowPtr row,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomOverlayKeys(row,first,count,freeAll)
- XkbOverlayRowPtr row;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomLeafElems(freeAll,first,count,
&row->num_keys,&row->sz_keys,
@@ -390,12 +288,7 @@ XkbFreeGeomOverlayKeys(row,first,count,freeAll)
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearOverlayRow(char *row_in)
-#else
-_XkbClearOverlayRow(row_in)
- char * row_in;
-#endif
{
XkbOverlayRowPtr row= (XkbOverlayRowPtr)row_in;
@@ -405,15 +298,7 @@ XkbOverlayRowPtr row= (XkbOverlayRowPtr)row_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomOverlayRows(XkbOverlayPtr overlay,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomOverlayRows(overlay,first,count,freeAll)
- XkbOverlayPtr overlay;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomNonLeafElems(freeAll,first,count,
&overlay->num_rows,&overlay->sz_rows,
@@ -425,12 +310,7 @@ XkbFreeGeomOverlayRows(overlay,first,count,freeAll)
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearOverlay(char *overlay_in)
-#else
-_XkbClearOverlay(overlay_in)
- char * overlay_in;
-#endif
{
XkbOverlayPtr overlay= (XkbOverlayPtr)overlay_in;
@@ -440,15 +320,7 @@ XkbOverlayPtr overlay= (XkbOverlayPtr)overlay_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomOverlays(XkbSectionPtr section,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomOverlays(section,first,count,freeAll)
- XkbSectionPtr section;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomNonLeafElems(freeAll,first,count,
&section->num_overlays,&section->sz_overlays,
@@ -460,15 +332,7 @@ XkbFreeGeomOverlays(section,first,count,freeAll)
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbFreeGeomKeys(XkbRowPtr row,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomKeys(row,first,count,freeAll)
- XkbRowPtr row;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomLeafElems(freeAll,first,count,
&row->num_keys,&row->sz_keys,
@@ -480,12 +344,7 @@ XkbFreeGeomKeys(row,first,count,freeAll)
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearRow(char *row_in)
-#else
-_XkbClearRow(row_in)
- char * row_in;
-#endif
{
XkbRowPtr row= (XkbRowPtr)row_in;
@@ -495,15 +354,7 @@ XkbRowPtr row= (XkbRowPtr)row_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomRows(XkbSectionPtr section,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomRows(section,first,count,freeAll)
- XkbSectionPtr section;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomNonLeafElems(freeAll,first,count,
&section->num_rows,&section->sz_rows,
@@ -514,12 +365,7 @@ XkbFreeGeomRows(section,first,count,freeAll)
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearSection(char *section_in)
-#else
-_XkbClearSection(section_in)
- char * section_in;
-#endif
{
XkbSectionPtr section= (XkbSectionPtr)section_in;
@@ -533,15 +379,7 @@ XkbSectionPtr section= (XkbSectionPtr)section_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomSections(XkbGeometryPtr geom,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomSections(geom,first,count,freeAll)
- XkbGeometryPtr geom;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomNonLeafElems(freeAll,first,count,
&geom->num_sections,&geom->sz_sections,
@@ -553,12 +391,7 @@ XkbFreeGeomSections(geom,first,count,freeAll)
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearDoodad(char *doodad_in)
-#else
-_XkbClearDoodad(doodad_in)
- char * doodad_in;
-#endif
{
XkbDoodadPtr doodad= (XkbDoodadPtr)doodad_in;
@@ -588,14 +421,7 @@ XkbDoodadPtr doodad= (XkbDoodadPtr)doodad_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomDoodads(XkbDoodadPtr doodads,int nDoodads,Bool freeAll)
-#else
-XkbFreeGeomDoodads(doodads,nDoodads,freeAll)
- XkbDoodadPtr doodads;
- int nDoodads;
- Bool freeAll;
-#endif
{
register int i;
register XkbDoodadPtr doodad;
@@ -611,14 +437,7 @@ register XkbDoodadPtr doodad;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeometry(XkbGeometryPtr geom,unsigned which,Bool freeMap)
-#else
-XkbFreeGeometry(geom,which,freeMap)
- XkbGeometryPtr geom;
- unsigned which;
- Bool freeMap;
-#endif
{
if (geom==NULL)
return;
@@ -652,20 +471,11 @@ XkbFreeGeometry(geom,which,freeMap)
/***====================================================================***/
static Status
-#if NeedFunctionPrototypes
_XkbGeomAlloc( XPointer * old,
unsigned short * num,
unsigned short * total,
int num_new,
Size_t sz_elem)
-#else
-_XkbGeomAlloc(old,num,total,num_new,sz_elem)
- XPointer * old;
- unsigned short * num;
- unsigned short * total;
- int num_new;
- Size_t sz_elem;
-#endif
{
if (num_new<1)
return Success;
@@ -733,181 +543,91 @@ _XkbGeomAlloc(old,num,total,num_new,sz_elem)
(n),sizeof(XkbOverlayKeyRec))
Status
-#if NeedFunctionPrototypes
XkbAllocGeomProps(XkbGeometryPtr geom,int nProps)
-#else
-XkbAllocGeomProps(geom,nProps)
- XkbGeometryPtr geom;
- int nProps;
-#endif
{
return _XkbAllocProps(geom,nProps);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomColors(XkbGeometryPtr geom,int nColors)
-#else
-XkbAllocGeomColors(geom,nColors)
- XkbGeometryPtr geom;
- int nColors;
-#endif
{
return _XkbAllocColors(geom,nColors);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomKeyAliases(XkbGeometryPtr geom,int nKeyAliases)
-#else
-XkbAllocGeomKeyAliases(geom,nKeyAliases)
- XkbGeometryPtr geom;
- int nKeyAliases;
-#endif
{
return _XkbAllocKeyAliases(geom,nKeyAliases);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomShapes(XkbGeometryPtr geom,int nShapes)
-#else
-XkbAllocGeomShapes(geom,nShapes)
- XkbGeometryPtr geom;
- int nShapes;
-#endif
{
return _XkbAllocShapes(geom,nShapes);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomSections(XkbGeometryPtr geom,int nSections)
-#else
-XkbAllocGeomSections(geom,nSections)
- XkbGeometryPtr geom;
- int nSections;
-#endif
{
return _XkbAllocSections(geom,nSections);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomOverlays(XkbSectionPtr section,int nOverlays)
-#else
-XkbAllocGeomOverlays(section,nOverlays)
- XkbSectionPtr section;
- int nOverlays;
-#endif
{
return _XkbAllocOverlays(section,nOverlays);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomOverlayRows(XkbOverlayPtr overlay,int nRows)
-#else
-XkbAllocGeomOverlayRows(overlay,nRows)
- XkbOverlayPtr overlay;
- int nRows;
-#endif
{
return _XkbAllocOverlayRows(overlay,nRows);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomOverlayKeys(XkbOverlayRowPtr row,int nKeys)
-#else
-XkbAllocGeomOverlayKeys(row,nKeys)
- XkbOverlayRowPtr row;
- int nKeys;
-#endif
{
return _XkbAllocOverlayKeys(row,nKeys);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomDoodads(XkbGeometryPtr geom,int nDoodads)
-#else
-XkbAllocGeomDoodads(geom,nDoodads)
- XkbGeometryPtr geom;
- int nDoodads;
-#endif
{
return _XkbAllocDoodads(geom,nDoodads);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomSectionDoodads(XkbSectionPtr section,int nDoodads)
-#else
-XkbAllocGeomSectionDoodads(section,nDoodads)
- XkbSectionPtr section;
- int nDoodads;
-#endif
{
return _XkbAllocDoodads(section,nDoodads);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomOutlines(XkbShapePtr shape,int nOL)
-#else
-XkbAllocGeomOutlines(shape,nOL)
- XkbShapePtr shape;
- int nOL;
-#endif
{
return _XkbAllocOutlines(shape,nOL);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomRows(XkbSectionPtr section,int nRows)
-#else
-XkbAllocGeomRows(section,nRows)
- XkbSectionPtr section;
- int nRows;
-#endif
{
return _XkbAllocRows(section,nRows);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomPoints(XkbOutlinePtr ol,int nPts)
-#else
-XkbAllocGeomPoints(ol,nPts)
- XkbOutlinePtr ol;
- int nPts;
-#endif
{
return _XkbAllocPoints(ol,nPts);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomKeys(XkbRowPtr row,int nKeys)
-#else
-XkbAllocGeomKeys(row,nKeys)
- XkbRowPtr row;
- int nKeys;
-#endif
{
return _XkbAllocKeys(row,nKeys);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeometry(XkbDescPtr xkb,XkbGeometrySizesPtr sizes)
-#else
-XkbAllocGeometry(xkb,sizes)
- XkbDescPtr xkb;
- XkbGeometrySizesPtr sizes;
-#endif
{
XkbGeometryPtr geom;
Status rtrn;
@@ -952,14 +672,7 @@ BAIL:
/***====================================================================***/
XkbPropertyPtr
-#if NeedFunctionPrototypes
XkbAddGeomProperty(XkbGeometryPtr geom,char *name,char *value)
-#else
-XkbAddGeomProperty(geom,name,value)
- XkbGeometryPtr geom;
- char * name;
- char * value;
-#endif
{
register int i;
register XkbPropertyPtr prop;
@@ -997,14 +710,7 @@ register XkbPropertyPtr prop;
}
XkbKeyAliasPtr
-#if NeedFunctionPrototypes
XkbAddGeomKeyAlias(XkbGeometryPtr geom,char *aliasStr,char *realStr)
-#else
-XkbAddGeomKeyAlias(geom,aliasStr,realStr)
- XkbGeometryPtr geom;
- char * aliasStr;
- char * realStr;
-#endif
{
register int i;
register XkbKeyAliasPtr alias;
@@ -1031,14 +737,7 @@ register XkbKeyAliasPtr alias;
}
XkbColorPtr
-#if NeedFunctionPrototypes
XkbAddGeomColor(XkbGeometryPtr geom,char *spec,unsigned int pixel)
-#else
-XkbAddGeomColor(geom,spec,pixel)
- XkbGeometryPtr geom;
- char * spec;
- unsigned int pixel;
-#endif
{
register int i;
register XkbColorPtr color;
@@ -1066,13 +765,7 @@ register XkbColorPtr color;
}
XkbOutlinePtr
-#if NeedFunctionPrototypes
XkbAddGeomOutline(XkbShapePtr shape,int sz_points)
-#else
-XkbAddGeomOutline(shape,sz_points)
- XkbShapePtr shape;
- int sz_points;
-#endif
{
XkbOutlinePtr outline;
@@ -1091,14 +784,7 @@ XkbOutlinePtr outline;
}
XkbShapePtr
-#if NeedFunctionPrototypes
XkbAddGeomShape(XkbGeometryPtr geom,Atom name,int sz_outlines)
-#else
-XkbAddGeomShape(geom,name,sz_outlines)
- XkbGeometryPtr geom;
- Atom name;
- int sz_outlines;
-#endif
{
XkbShapePtr shape;
register int i;
@@ -1125,12 +811,7 @@ register int i;
}
XkbKeyPtr
-#if NeedFunctionPrototypes
XkbAddGeomKey(XkbRowPtr row)
-#else
-XkbAddGeomKey(row)
- XkbRowPtr row;
-#endif
{
XkbKeyPtr key;
if (!row)
@@ -1143,13 +824,7 @@ XkbKeyPtr key;
}
XkbRowPtr
-#if NeedFunctionPrototypes
XkbAddGeomRow(XkbSectionPtr section,int sz_keys)
-#else
-XkbAddGeomRow(section,sz_keys)
- XkbSectionPtr section;
- int sz_keys;
-#endif
{
XkbRowPtr row;
@@ -1167,20 +842,11 @@ XkbRowPtr row;
}
XkbSectionPtr
-#if NeedFunctionPrototypes
XkbAddGeomSection( XkbGeometryPtr geom,
Atom name,
int sz_rows,
int sz_doodads,
int sz_over)
-#else
-XkbAddGeomSection(geom,name,sz_rows,sz_doodads,sz_over)
- XkbGeometryPtr geom;
- Atom name;
- int sz_rows;
- int sz_doodads;
- int sz_over;
-#endif
{
register int i;
XkbSectionPtr section;
@@ -1216,14 +882,7 @@ XkbSectionPtr section;
}
XkbDoodadPtr
-#if NeedFunctionPrototypes
XkbAddGeomDoodad(XkbGeometryPtr geom,XkbSectionPtr section,Atom name)
-#else
-XkbAddGeomDoodad(geom,section,name)
- XkbGeometryPtr geom;
- XkbSectionPtr section;
- Atom name;
-#endif
{
XkbDoodadPtr old,doodad;
register int i,nDoodads;
@@ -1261,18 +920,10 @@ register int i,nDoodads;
}
XkbOverlayKeyPtr
-#if NeedFunctionPrototypes
XkbAddGeomOverlayKey( XkbOverlayPtr overlay,
XkbOverlayRowPtr row,
char * over,
char * under)
-#else
-XkbAddGeomOverlayKey(overlay,row,over,under)
- XkbOverlayPtr overlay;
- XkbOverlayRowPtr row;
- char * over;
- char * under;
-#endif
{
register int i;
XkbOverlayKeyPtr key;
@@ -1304,14 +955,7 @@ Bool found;
}
XkbOverlayRowPtr
-#if NeedFunctionPrototypes
XkbAddGeomOverlayRow(XkbOverlayPtr overlay,int row_under,int sz_keys)
-#else
-XkbAddGeomOverlayRow(overlay,row_under,sz_keys)
- XkbOverlayPtr overlay;
- int row_under;
- int sz_keys;
-#endif
{
register int i;
XkbOverlayRowPtr row;
@@ -1343,14 +987,7 @@ XkbOverlayRowPtr row;
}
XkbOverlayPtr
-#if NeedFunctionPrototypes
XkbAddGeomOverlay(XkbSectionPtr section,Atom name,int sz_rows)
-#else
-XkbAddGeomOverlay(section,name,sz_rows)
- XkbSectionPtr section;
- Atom name;
- int sz_rows;
-#endif
{
register int i;
XkbOverlayPtr overlay;
diff --git a/xkb/XKBMAlloc.c b/xkb/XKBMAlloc.c
index 29cdc3c80..20def46ba 100644
--- a/xkb/XKBMAlloc.c
+++ b/xkb/XKBMAlloc.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBMAlloc.c,v 3.11 2001/01/17 19:41:48 dawes Exp $ */
+/* $XFree86: xc/lib/X11/XKBMAlloc.c,v 3.12 2003/11/17 22:20:09 dawes Exp $ */
#ifndef XKB_IN_SERVER
@@ -54,14 +54,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/***====================================================================***/
Status
-#if NeedFunctionPrototypes
XkbAllocClientMap(XkbDescPtr xkb,unsigned which,unsigned nTotalTypes)
-#else
-XkbAllocClientMap(xkb,which,nTotalTypes)
- XkbDescPtr xkb;
- unsigned which;
- unsigned nTotalTypes;
-#endif
{
register int i;
XkbClientMapPtr map;
@@ -144,14 +137,7 @@ fprintf(stderr,"bad keycode (%d,%d) in XkbAllocClientMap\n",
}
Status
-#if NeedFunctionPrototypes
XkbAllocServerMap(XkbDescPtr xkb,unsigned which,unsigned nNewActions)
-#else
-XkbAllocServerMap(xkb,which,nNewActions)
- XkbDescPtr xkb;
- unsigned which;
- unsigned nNewActions;
-#endif
{
register int i;
XkbServerMapPtr map;
@@ -245,13 +231,7 @@ XkbServerMapPtr map;
/***====================================================================***/
Status
-#if NeedFunctionPrototypes
XkbCopyKeyType(XkbKeyTypePtr from,XkbKeyTypePtr into)
-#else
-XkbCopyKeyType(from,into)
- XkbKeyTypePtr from;
- XkbKeyTypePtr into;
-#endif
{
if ((!from)||(!into))
return BadMatch;
@@ -292,14 +272,7 @@ XkbCopyKeyType(from,into)
}
Status
-#if NeedFunctionPrototypes
XkbCopyKeyTypes(XkbKeyTypePtr from,XkbKeyTypePtr into,int num_types)
-#else
-XkbCopyKeyTypes(from,into,num_types)
- XkbKeyTypePtr from;
- XkbKeyTypePtr into;
- int num_types;
-#endif
{
register int i,rtrn;
@@ -313,20 +286,11 @@ register int i,rtrn;
}
XkbKeyTypePtr
-#if NeedFunctionPrototypes
XkbAddKeyType( XkbDescPtr xkb,
Atom name,
int map_count,
Bool want_preserve,
int num_lvls)
-#else
-XkbAddKeyType(xkb,name,map_count,want_preserve,num_lvls)
- XkbDescPtr xkb;
- Atom name;
- int map_count;
- Bool want_preserve;
- int num_lvls;
-#endif
{
register int i;
unsigned tmp;
@@ -397,20 +361,11 @@ XkbClientMapPtr map;
}
Status
-#if NeedFunctionPrototypes
XkbResizeKeyType( XkbDescPtr xkb,
int type_ndx,
int map_count,
Bool want_preserve,
int new_num_lvls)
-#else
-XkbResizeKeyType(xkb,type_ndx,map_count,want_preserve,new_num_lvls)
- XkbDescPtr xkb;
- int type_ndx;
- int map_count;
- Bool want_preserve;
- int new_num_lvls;
-#endif
{
XkbKeyTypePtr type;
KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys;
@@ -604,14 +559,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys;
}
KeySym *
-#if NeedFunctionPrototypes
XkbResizeKeySyms(XkbDescPtr xkb,int key,int needed)
-#else
-XkbResizeKeySyms(xkb,key,needed)
- XkbDescPtr xkb;
- int key;
- int needed;
-#endif
{
register int i,nSyms,nKeySyms;
unsigned nOldSyms;
@@ -666,20 +614,11 @@ KeySym *newSyms;
}
static unsigned
-#if NeedFunctionPrototypes
_ExtendRange( unsigned int old_flags,
unsigned int flag,
KeyCode newKC,
KeyCode * old_min,
unsigned char * old_num)
-#else
-_ExtendRange(old_flags,flag,newKC,old_min,old_num)
- unsigned int old_flags;
- unsigned int flag;
- KeyCode newKC;
- KeyCode * old_min;
- unsigned char * old_num;
-#endif
{
if ((old_flags&flag)==0) {
old_flags|= flag;
@@ -700,18 +639,10 @@ _ExtendRange(old_flags,flag,newKC,old_min,old_num)
}
Status
-#if NeedFunctionPrototypes
XkbChangeKeycodeRange( XkbDescPtr xkb,
int minKC,
int maxKC,
XkbChangesPtr changes)
-#else
-XkbChangeKeycodeRange(xkb,minKC,maxKC,changes)
- XkbDescPtr xkb;
- int minKC;
- int maxKC;
- XkbChangesPtr changes;
-#endif
{
int tmp;
@@ -908,14 +839,7 @@ int tmp;
}
XkbAction *
-#if NeedFunctionPrototypes
XkbResizeKeyActions(XkbDescPtr xkb,int key,int needed)
-#else
-XkbResizeKeyActions(xkb,key,needed)
- XkbDescPtr xkb;
- int key;
- int needed;
-#endif
{
register int i,nActs;
XkbAction *newActs;
@@ -965,14 +889,7 @@ XkbAction *newActs;
}
void
-#if NeedFunctionPrototypes
XkbFreeClientMap(XkbDescPtr xkb,unsigned what,Bool freeMap)
-#else
-XkbFreeClientMap(xkb,what,freeMap)
- XkbDescPtr xkb;
- unsigned what;
- Bool freeMap;
-#endif
{
XkbClientMapPtr map;
@@ -1030,14 +947,7 @@ XkbClientMapPtr map;
}
void
-#if NeedFunctionPrototypes
XkbFreeServerMap(XkbDescPtr xkb,unsigned what,Bool freeMap)
-#else
-XkbFreeServerMap(xkb,what,freeMap)
- XkbDescPtr xkb;
- unsigned what;
- Bool freeMap;
-#endif
{
XkbServerMapPtr map;
diff --git a/xkb/XKBMisc.c b/xkb/XKBMisc.c
index f3de9295e..06660ff89 100644
--- a/xkb/XKBMisc.c
+++ b/xkb/XKBMisc.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBMisc.c,v 3.5 2001/10/28 03:32:33 tsi Exp $ */
+/* $XFree86: xc/lib/X11/XKBMisc.c,v 3.6 2003/11/17 22:20:09 dawes Exp $ */
#ifndef XKB_IN_SERVER
@@ -102,14 +102,7 @@ static XkbKeyTypeRec canonicalTypes[XkbNumRequiredTypes] = {
};
Status
-#if NeedFunctionPrototypes
XkbInitCanonicalKeyTypes(XkbDescPtr xkb,unsigned which,int keypadVMod)
-#else
-XkbInitCanonicalKeyTypes(xkb,which,keypadVMod)
- XkbDescPtr xkb;
- unsigned which;
- int keypadVMod;
-#endif
{
XkbClientMapPtr map;
XkbKeyTypePtr from,to;
@@ -159,23 +152,12 @@ Status rtrn;
#define XKB_OFFSET(g,l) (((g)*groupsWidth)+(l))
int
-#if NeedFunctionPrototypes
XkbKeyTypesForCoreSymbols( XkbDescPtr xkb,
int map_width,
KeySym * core_syms,
unsigned int protected,
int * types_inout,
KeySym * xkb_syms_rtrn)
-#else
-XkbKeyTypesForCoreSymbols(xkb,map_width,core_syms,protected,types_inout,
- xkb_syms_rtrn)
- XkbDescPtr xkb;
- int map_width;
- KeySym * core_syms;
- unsigned int protected;
- int * types_inout;
- KeySym * xkb_syms_rtrn;
-#endif
{
register int i;
unsigned int empty;
@@ -340,18 +322,10 @@ int nGroups,tmp,groupsWidth;
}
static XkbSymInterpretPtr
-#if NeedFunctionPrototypes
_XkbFindMatchingInterp( XkbDescPtr xkb,
KeySym sym,
unsigned int real_mods,
unsigned int level)
-#else
-_XkbFindMatchingInterp(xkb,sym,real_mods,level)
- XkbDescPtr xkb;
- KeySym sym;
- unsigned int real_mods;
- unsigned int level;
-#endif
{
register unsigned i;
XkbSymInterpretPtr interp,rtrn;
@@ -399,14 +373,7 @@ CARD8 mods;
}
static void
-#if NeedFunctionPrototypes
_XkbAddKeyChange(KeyCode *pFirst,unsigned char *pNum,KeyCode newKey)
-#else
-_XkbAddKeyChange(pFirst,pNum,newKey)
- KeyCode * pFirst;
- unsigned char * pNum;
- KeyCode newKey;
-#endif
{
KeyCode last;
@@ -422,14 +389,7 @@ KeyCode last;
}
static void
-#if NeedFunctionPrototypes
_XkbSetActionKeyMods(XkbDescPtr xkb,XkbAction *act,unsigned mods)
-#else
-_XkbSetActionKeyMods(xkb,act,mods)
- XkbDescPtr xkb;
- XkbAction * act;
- unsigned mods;
-#endif
{
unsigned tmp;
@@ -457,14 +417,7 @@ unsigned tmp;
#define IBUF_SIZE 8
Bool
-#if NeedFunctionPrototypes
XkbApplyCompatMapToKey(XkbDescPtr xkb,KeyCode key,XkbChangesPtr changes)
-#else
-XkbApplyCompatMapToKey(xkb,key,changes)
- XkbDescPtr xkb;
- KeyCode key;
- XkbChangesPtr changes;
-#endif
{
KeySym * syms;
unsigned char explicit,mods;
@@ -613,22 +566,12 @@ unsigned changed,tmp;
}
Bool
-#if NeedFunctionPrototypes
XkbUpdateMapFromCore( XkbDescPtr xkb,
KeyCode first_key,
int num_keys,
int map_width,
KeySym * core_keysyms,
XkbChangesPtr changes)
-#else
-XkbUpdateMapFromCore(xkb,first_key,num_keys,map_width,core_keysyms,changes)
- XkbDescPtr xkb;
- KeyCode first_key;
- int num_keys;
- int map_width;
- KeySym * core_keysyms;
- XkbChangesPtr changes;
-#endif
{
register int key,last_key;
KeySym * syms;
@@ -705,22 +648,12 @@ KeySym * syms;
}
Status
-#if NeedFunctionPrototypes
XkbChangeTypesOfKey( XkbDescPtr xkb,
int key,
int nGroups,
unsigned groups,
int * newTypesIn,
XkbMapChangesPtr changes)
-#else
-XkbChangeTypesOfKey(xkb,key,nGroups,groups,newTypesIn,changes)
- XkbDescPtr xkb;
- int key;
- int nGroups;
- unsigned groups;
- int * newTypesIn;
- XkbMapChangesPtr changes;
-#endif
{
XkbKeyTypePtr pOldType,pNewType;
register int i;
@@ -839,14 +772,7 @@ int width,nOldGroups,oldWidth,newTypes[XkbNumKbdGroups];
/***====================================================================***/
Bool
-#if NeedFunctionPrototypes
XkbVirtualModsToReal(XkbDescPtr xkb,unsigned virtual_mask,unsigned *mask_rtrn)
-#else
-XkbVirtualModsToReal(xkb,virtual_mask,mask_rtrn)
- XkbDescPtr xkb;
- unsigned virtual_mask;
- unsigned * mask_rtrn;
-#endif
{
register int i,bit;
register unsigned mask;
@@ -870,14 +796,7 @@ register unsigned mask;
/***====================================================================***/
Bool
-#if NeedFunctionPrototypes
XkbUpdateActionVirtualMods(XkbDescPtr xkb,XkbAction *act,unsigned changed)
-#else
-XkbUpdateActionVirtualMods(xkb,act,changed)
- XkbDescPtr xkb;
- XkbAction * act;
- unsigned changed;
-#endif
{
unsigned int tmp;
@@ -903,18 +822,10 @@ unsigned int tmp;
}
void
-#if NeedFunctionPrototypes
XkbUpdateKeyTypeVirtualMods( XkbDescPtr xkb,
XkbKeyTypePtr type,
unsigned int changed,
XkbChangesPtr changes)
-#else
-XkbUpdateKeyTypeVirtualMods(xkb,type,changed,changes)
- XkbDescPtr xkb;
- XkbKeyTypePtr type;
- unsigned int changed;
- XkbChangesPtr changes;
-#endif
{
register unsigned int i;
unsigned int mask;
@@ -959,14 +870,7 @@ unsigned int mask;
}
Bool
-#if NeedFunctionPrototypes
XkbApplyVirtualModChanges(XkbDescPtr xkb,unsigned changed,XkbChangesPtr changes)
-#else
-XkbApplyVirtualModChanges(xkb,changed,changes)
- XkbDescPtr xkb;
- unsigned changed;
- XkbChangesPtr changes;
-#endif
{
register int i;
unsigned int checkState = 0;
diff --git a/xkb/ddxBeep.c b/xkb/ddxBeep.c
index 74352161c..bb02619f3 100644
--- a/xkb/ddxBeep.c
+++ b/xkb/ddxBeep.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/ddxBeep.c,v 3.9 2002/12/05 21:59:00 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/ddxBeep.c,v 3.10 2003/11/17 22:20:44 dawes Exp $ */
#include <stdio.h>
#define NEED_EVENTS 1
@@ -97,11 +97,7 @@ static char doesPitch = 1;
#define MAKE_ATOM(a) MakeAtom(a,sizeof(a)-1,True)
static void
-#if NeedFunctionPrototypes
_XkbDDXBeepInitAtoms(void)
-#else
-_XkbDDXBeepInitAtoms()
-#endif
{
featureOn= MAKE_ATOM(FEATURE_ON);
featureOff= MAKE_ATOM(FEATURE_OFF);
@@ -148,14 +144,7 @@ _XkbDDXBeepInitAtoms()
}
static CARD32
-#if NeedFunctionPrototypes
_XkbDDXBeepExpire(OsTimerPtr timer,CARD32 now,pointer arg)
-#else
-_XkbDDXBeepExpire(timer,now,arg)
- OsTimerPtr timer;
- CARD32 now;
- pointer arg;
-#endif
{
DeviceIntPtr dev= (DeviceIntPtr)arg;
KbdFeedbackPtr feed;
@@ -360,14 +349,7 @@ Atom name;
}
int
-#if NeedFunctionPrototypes
XkbDDXAccessXBeep(DeviceIntPtr dev,unsigned what,unsigned which)
-#else
-XkbDDXAccessXBeep(dev,what,which)
- DeviceIntPtr dev;
- unsigned what;
- unsigned which;
-#endif
{
XkbSrvInfoRec *xkbInfo= dev->key->xkbInfo;
CARD32 next;
diff --git a/xkb/ddxConfig.c b/xkb/ddxConfig.c
index 58fc138bd..2485488d2 100644
--- a/xkb/ddxConfig.c
+++ b/xkb/ddxConfig.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/ddxConfig.c,v 3.8 2002/12/20 20:18:35 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/ddxConfig.c,v 3.9 2003/11/17 22:20:45 dawes Exp $ */
#include <stdio.h>
#define NEED_EVENTS 1
@@ -40,13 +40,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/extensions/XKBconfig.h>
Bool
-#if NeedFunctionPrototypes
XkbDDXApplyConfig(XPointer cfg_in,XkbSrvInfoPtr info)
-#else
-XkbDDXApplyConfig(cfg_in,info)
- XPointer cfg_in;
- XkbSrvInfoPtr info;
-#endif
{
XkbConfigRtrnPtr rtrn;
XkbDescPtr xkb;
@@ -90,18 +84,10 @@ XkbEventCauseRec cause;
}
XPointer
-#if NeedFunctionPrototypes
XkbDDXPreloadConfig( char ** rulesRtrn,
XkbRF_VarDefsPtr defs,
XkbComponentNamesPtr names,
DeviceIntPtr dev)
-#else
-XkbDDXPreloadConfig(rulesRtrn,defs,names,dev)
- char ** rulesRtrn;
- XkbRF_VarDefsPtr defs;
- XkbComponentNamesPtr names;
- DeviceIntPtr dev;
-#endif
{
char buf[PATH_MAX];
char * dName;
diff --git a/xkb/ddxCtrls.c b/xkb/ddxCtrls.c
index 4dfb03df2..c7c8f18b8 100644
--- a/xkb/ddxCtrls.c
+++ b/xkb/ddxCtrls.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/ddxCtrls.c,v 1.3 2001/01/17 22:37:14 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/ddxCtrls.c,v 1.4 2003/11/17 22:20:45 dawes Exp $ */
#include <stdio.h>
#define NEED_EVENTS 1
@@ -38,13 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "XI.h"
void
-#if NeedFunctionPrototypes
XkbDDXKeybdCtrlProc(DeviceIntPtr dev,KeybdCtrl *ctrl)
-#else
-XkbDDXKeybdCtrlProc(dev,ctrl)
- DeviceIntPtr dev;
- KeybdCtrl * ctrl;
-#endif
{
int realRepeat;
@@ -65,12 +59,7 @@ if (xkbDebugFlags&0x4) {
int
-#if NeedFunctionPrototypes
XkbDDXUsesSoftRepeat(DeviceIntPtr pXDev)
-#else
-XkbDDXUsesSoftRepeat(pXDev)
- DeviceIntPtr pXDev;
-#endif
{
#ifndef XKB_ALWAYS_USES_SOFT_REPEAT
if (pXDev && pXDev->kbdfeed ) {
@@ -96,14 +85,7 @@ XkbDDXUsesSoftRepeat(pXDev)
}
void
-#if NeedFunctionPrototypes
XkbDDXChangeControls(DeviceIntPtr dev,XkbControlsPtr old,XkbControlsPtr new)
-#else
-XkbDDXChangeControls(dev,old,new)
- DeviceIntPtr dev;
- XkbControlsPtr old;
- XkbControlsPtr new;
-#endif
{
unsigned changed, i;
unsigned char *rep_old, *rep_new, *rep_fb;
diff --git a/xkb/ddxDevBtn.c b/xkb/ddxDevBtn.c
index 47a757823..5f5ebc9b4 100644
--- a/xkb/ddxDevBtn.c
+++ b/xkb/ddxDevBtn.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/ddxDevBtn.c,v 3.3 2001/08/23 21:49:51 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/ddxDevBtn.c,v 3.4 2003/11/17 22:20:45 dawes Exp $ */
#include <stdio.h>
#define NEED_EVENTS 1
@@ -41,14 +41,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
extern int DeviceValuator;
void
-#if NeedFunctionPrototypes
XkbDDXFakeDeviceButton(DeviceIntPtr dev,Bool press,int button)
-#else
-XkbDDXFakeDeviceButton(dev,press,button)
- DeviceIntPtr dev;
- Bool press;
- int button;
-#endif
{
int * devVal;
INT32 * evVal;
diff --git a/xkb/ddxFakeBtn.c b/xkb/ddxFakeBtn.c
index 9394c4772..9f54cae6f 100644
--- a/xkb/ddxFakeBtn.c
+++ b/xkb/ddxFakeBtn.c
@@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
+/* $XFree86: xc/programs/Xserver/xkb/ddxFakeBtn.c,v 1.2 2003/11/17 22:20:45 dawes Exp $ */
#include <stdio.h>
#define NEED_EVENTS 1
@@ -37,13 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "XI.h"
void
-#if NeedFunctionPrototypes
XkbDDXFakePointerButton(int event,int button)
-#else
-XkbDDXFakePointerButton(event,button)
- int event;
- int button;
-#endif
{
xEvent ev;
int x,y;
diff --git a/xkb/ddxFakeMtn.c b/xkb/ddxFakeMtn.c
index c92f2f1da..289fa3bfb 100644
--- a/xkb/ddxFakeMtn.c
+++ b/xkb/ddxFakeMtn.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/ddxFakeMtn.c,v 1.4 2001/01/17 22:37:14 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/ddxFakeMtn.c,v 1.6 2003/11/17 22:20:45 dawes Exp $ */
#include <stdio.h>
#define NEED_EVENTS 1
@@ -45,29 +45,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "mipointer.h"
#include "mipointrst.h"
-extern WindowPtr GetSpriteWindow(
-#if NeedFunctionPrototypes
- void
-#endif
-);
-
-extern void NewCurrentScreen(
-#if NeedFunctionPrototypes
- ScreenPtr /* newScreen */,
- int /* x */,
- int /* y */
-#endif
-);
-
void
-#if NeedFunctionPrototypes
XkbDDXFakePointerMotion(unsigned flags,int x,int y)
-#else
-XkbDDXFakePointerMotion(flags,x,y)
- unsigned flags;
- int x;
- int y;
-#endif
{
int oldX,oldY;
ScreenPtr pScreen, oldScreen;
diff --git a/xkb/ddxInit.c b/xkb/ddxInit.c
index 12dbfe838..a8c436ea2 100644
--- a/xkb/ddxInit.c
+++ b/xkb/ddxInit.c
@@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
+/* $XFree86: xc/programs/Xserver/xkb/ddxInit.c,v 1.2 2003/11/17 22:20:45 dawes Exp $ */
#include <stdio.h>
#define NEED_EVENTS 1
@@ -37,12 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "XI.h"
int
-#if NeedFunctionPrototypes
XkbDDXInitDevice(DeviceIntPtr dev)
-#else
-XkbDDXInitDevice(dev)
- DeviceIntPtr dev;
-#endif
{
return 1;
}
diff --git a/xkb/ddxKeyClick.c b/xkb/ddxKeyClick.c
index af1185f72..afd028fcd 100644
--- a/xkb/ddxKeyClick.c
+++ b/xkb/ddxKeyClick.c
@@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
+/* $XFree86: xc/programs/Xserver/xkb/ddxKeyClick.c,v 1.2 2003/11/17 22:20:45 dawes Exp $ */
#include <stdio.h>
#define NEED_EVENTS 1
@@ -37,14 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "XI.h"
void
-#if NeedFunctionPrototypes
XkbDDXKeyClick(DeviceIntPtr pXDev,int keycode,int synthetic)
-#else
-XkbDDXKeyClick(pXDev,keycode,synthetic)
- DeviceIntPtr pXDev;
- int keycode;
- int synthetic;
-#endif
{
#ifdef DEBUG
if (xkbDebugFlags)
diff --git a/xkb/ddxKillSrv.c b/xkb/ddxKillSrv.c
index 3c57f8786..9ac7d3300 100644
--- a/xkb/ddxKillSrv.c
+++ b/xkb/ddxKillSrv.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/ddxKillSrv.c,v 1.3 2002/11/23 19:27:50 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/ddxKillSrv.c,v 1.4 2003/11/17 22:20:45 dawes Exp $ */
#include <stdio.h>
#define NEED_EVENTS 1
@@ -42,14 +42,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#endif
int
-#if NeedFunctionPrototypes
XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act)
-#else
-XkbDDXTerminateServer(dev,key,act)
- DeviceIntPtr dev;
- KeyCode key;
- XkbAction *act;
-#endif
{
#ifdef XF86DDXACTIONS
xf86ProcessActionEvent(ACTION_TERMINATE, NULL);
diff --git a/xkb/ddxLEDs.c b/xkb/ddxLEDs.c
index f6ea86965..ab757c6fc 100644
--- a/xkb/ddxLEDs.c
+++ b/xkb/ddxLEDs.c
@@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
+/* $XFree86: xc/programs/Xserver/xkb/ddxLEDs.c,v 1.2 2003/11/17 22:20:45 dawes Exp $ */
#include <stdio.h>
#define NEED_EVENTS 1
@@ -37,13 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "XI.h"
void
-#if NeedFunctionPrototypes
XkbDDXUpdateIndicators(DeviceIntPtr dev,CARD32 new)
-#else
-XkbDDXUpdateIndicators(dev,new)
- DeviceIntPtr dev;
- CARD32 new;
-#endif
{
dev->kbdfeed->ctrl.leds= new;
(*dev->kbdfeed->CtrlProc)(dev,&dev->kbdfeed->ctrl);
@@ -51,16 +46,9 @@ XkbDDXUpdateIndicators(dev,new)
}
void
-#if NeedFunctionPrototypes
XkbDDXUpdateDeviceIndicators( DeviceIntPtr dev,
XkbSrvLedInfoPtr sli,
CARD32 new)
-#else
-XkbDDXUpdateDeviceIndicators(dev,sli,new)
- DeviceIntPtr dev;
- XkbSrvLedInfoPtr sli;
- CARD32 new;
-#endif
{
if (sli->fb.kf==dev->kbdfeed)
XkbDDXUpdateIndicators(dev,new);
diff --git a/xkb/ddxList.c b/xkb/ddxList.c
index 8337022a3..5101de53b 100644
--- a/xkb/ddxList.c
+++ b/xkb/ddxList.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/ddxList.c,v 3.7 2001/10/28 03:34:19 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/ddxList.c,v 3.9 2003/11/17 22:20:45 dawes Exp $ */
#include <stdio.h>
#include <ctype.h>
@@ -57,21 +57,12 @@ static char *componentDirs[_XkbListNumComponents] = {
/***====================================================================***/
-Status
-#if NeedFunctionPrototypes
+static Status
_AddListComponent( XkbSrvListInfoPtr list,
int what,
unsigned flags,
char * str,
ClientPtr client)
-#else
-_AddListComponent(list,what,flags,str,client)
- XkbSrvListInfoPtr list;
- int what;
- unsigned flags;
- char * str;
- ClientPtr client;
-#endif
{
int slen,wlen;
unsigned char * wire8;
@@ -119,18 +110,10 @@ char * tmp;
/***====================================================================***/
static Status
-#if NeedFunctionPrototypes
XkbDDXListComponent( DeviceIntPtr dev,
int what,
XkbSrvListInfoPtr list,
ClientPtr client)
-#else
-XkbDDXListComponent(dev,what,list,client)
- DeviceIntPtr dev;
- int what;
- XkbSrvListInfoPtr list;
- ClientPtr client;
-#endif
{
char *file,*map,*tmp,buf[PATH_MAX];
FILE *in;
@@ -284,14 +267,7 @@ char tmpname[32];
/* ARGSUSED */
Status
-#if NeedFunctionPrototypes
XkbDDXList(DeviceIntPtr dev,XkbSrvListInfoPtr list,ClientPtr client)
-#else
-XkbDDXList(dev,list,client)
- DeviceIntPtr dev;
- XkbSrvListInfoPtr list;
- ClientPtr client;
-#endif
{
Status status;
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
index 82129d401..9f7704c5a 100644
--- a/xkb/ddxLoad.c
+++ b/xkb/ddxLoad.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/ddxLoad.c,v 3.30 2002/05/31 18:46:06 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/ddxLoad.c,v 3.36 2003/11/17 22:20:45 dawes Exp $ */
#include <stdio.h>
#include <ctype.h>
@@ -40,6 +40,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define XKBSRV_NEED_FILE_FUNCS
#include "XKBsrv.h"
#include "XI.h"
+#include "xkb.h"
#if defined(CSRG_BASED) || defined(linux) || defined(__sgi) || defined(AIXV3) || defined(__osf__) || defined(__GNU__)
#include <paths.h>
@@ -71,8 +72,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define POST_ERROR_MSG2 "\"End of messages from xkbcomp\""
static void
-OutputDirectory (outdir)
- char* outdir;
+OutputDirectory(
+ char* outdir)
{
#ifndef WIN32
if (getuid() == 0) {
@@ -93,18 +94,10 @@ OutputDirectory (outdir)
}
Bool
-#if NeedFunctionPrototypes
XkbDDXCompileNamedKeymap( XkbDescPtr xkb,
XkbComponentNamesPtr names,
char * nameRtrn,
int nameRtrnLen)
-#else
-XkbDDXCompileNamedKeymap(xkb,names,nameRtrn,nameRtrnLen)
- XkbDescPtr xkb;
- XkbComponentNamesPtr names;
- char * nameRtrn;
- int nameRtrnLen;
-#endif
{
char cmd[PATH_MAX],file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile;
@@ -202,22 +195,12 @@ char cmd[PATH_MAX],file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile;
}
Bool
-#if NeedFunctionPrototypes
XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
XkbComponentNamesPtr names,
unsigned want,
unsigned need,
char * nameRtrn,
int nameRtrnLen)
-#else
-XkbDDXCompileKeymapByNames(xkb,names,want,need,nameRtrn,nameRtrnLen)
- XkbDescPtr xkb;
- XkbComponentNamesPtr names;
- unsigned want;
- unsigned need;
- char * nameRtrn;
- int nameRtrnLen;
-#endif
{
FILE * out;
char buf[PATH_MAX],keymap[PATH_MAX],xkm_output_dir[PATH_MAX];
@@ -387,14 +370,7 @@ int i;
}
FILE *
-#if NeedFunctionPrototypes
XkbDDXOpenConfigFile(char *mapName,char *fileNameRtrn,int fileNameRtrnLen)
-#else
-XkbDDXOpenConfigFile(mapName,fileNameRtrn,fileNameRtrnLen)
- char * mapName;
- char * fileNameRtrn;
- int fileNameRtrnLen;
-#endif
{
char buf[PATH_MAX],xkm_output_dir[PATH_MAX];
FILE * file;
@@ -413,7 +389,7 @@ FILE * file;
else if (strlen(xkm_output_dir)+strlen(mapName)+5 <= PATH_MAX)
sprintf(buf,"%s%s.xkm",xkm_output_dir,mapName);
if (buf[0] != '\0')
- file= fopen(buf,"r");
+ file= fopen(buf,"rb");
else file= NULL;
}
else file= NULL;
@@ -425,7 +401,6 @@ FILE * file;
}
unsigned
-#if NeedFunctionPrototypes
XkbDDXLoadKeymapByNames( DeviceIntPtr keybd,
XkbComponentNamesPtr names,
unsigned want,
@@ -433,16 +408,6 @@ XkbDDXLoadKeymapByNames( DeviceIntPtr keybd,
XkbFileInfo * finfoRtrn,
char * nameRtrn,
int nameRtrnLen)
-#else
-XkbDDXLoadKeymapByNames(keybd,names,want,need,finfoRtrn,nameRtrn,nameRtrnLen)
- DeviceIntPtr keybd;
- XkbComponentNamesPtr names;
- unsigned want;
- unsigned need;
- XkbFileInfo * finfoRtrn;
- char * nameRtrn;
- int nameRtrnLen;
-#endif
{
XkbDescPtr xkb;
FILE * file;
@@ -482,12 +447,12 @@ unsigned missing;
}
file= XkbDDXOpenConfigFile(nameRtrn,fileName,PATH_MAX);
if (file==NULL) {
- ErrorF("Couldn't open compiled keymap file %s\n",fileName);
+ LogMessage(X_ERROR, "Couldn't open compiled keymap file %s\n",fileName);
return 0;
}
missing= XkmReadFile(file,need,want,finfoRtrn);
if (finfoRtrn->xkb==NULL) {
- ErrorF("Error loading keymap %s\n",fileName);
+ LogMessage(X_ERROR, "Error loading keymap %s\n",fileName);
fclose(file);
(void) unlink (fileName);
return 0;
@@ -503,18 +468,10 @@ unsigned missing;
}
Bool
-#if NeedFunctionPrototypes
XkbDDXNamesFromRules( DeviceIntPtr keybd,
char * rules_name,
XkbRF_VarDefsPtr defs,
XkbComponentNamesPtr names)
-#else
-XkbDDXNamesFromRules(keybd,rules_name,defs,names)
- DeviceIntPtr keybd;
- char * rules_name;
- XkbRF_VarDefsPtr defs;
- XkbComponentNamesPtr names;
-#endif
{
char buf[PATH_MAX];
FILE * file;
diff --git a/xkb/ddxPrivate.c b/xkb/ddxPrivate.c
index 880efed4b..dd7ef4630 100644
--- a/xkb/ddxPrivate.c
+++ b/xkb/ddxPrivate.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/xkb/ddxPrivate.c,v 1.1 2002/11/20 04:49:02 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/ddxPrivate.c,v 1.3 2003/11/17 22:20:45 dawes Exp $ */
#include <stdio.h>
#define NEED_EVENTS 1
@@ -12,25 +12,15 @@
#endif
int
-#if NeedFunctionPrototypes
XkbDDXPrivate(DeviceIntPtr dev,KeyCode key,XkbAction *act)
-#else
-XkbDDXPrivate(dev,key,act)
- DeviceIntPtr dev;
- KeyCode key;
- XkbAction *act;
-#endif
{
#ifdef XF86DDXACTIONS
- XkbMessageAction *msgact = &(act->msg);
- char msgbuf[7];
- int x;
+ XkbAnyAction *xf86act = &(act->any);
+ char msgbuf[XkbAnyActionDataSize+1];
- if (msgact->type == XkbSA_XFree86Private) {
- msgbuf[0]= msgact->flags;
- for (x=0; x<5; x++)
- msgbuf[x+1] = msgact->message[x];
- msgbuf[6]= '\0';
+ if (xf86act->type == XkbSA_XFree86Private) {
+ memcpy(msgbuf, xf86act->data, XkbAnyActionDataSize);
+ msgbuf[XkbAnyActionDataSize]= '\0';
if (_XkbStrCaseCmp(msgbuf, "-vmode")==0)
xf86ProcessActionEvent(ACTION_PREV_MODE, NULL);
else if (_XkbStrCaseCmp(msgbuf, "+vmode")==0)
@@ -39,6 +29,8 @@ XkbDDXPrivate(dev,key,act)
xf86ProcessActionEvent(ACTION_DISABLEGRAB, NULL);
else if (_XkbStrCaseCmp(msgbuf, "clsgrb")==0)
xf86ProcessActionEvent(ACTION_CLOSECLIENT, NULL);
+ else
+ xf86ProcessActionEvent(ACTION_MESSAGE, (void *) msgbuf);
}
#endif
return 0;
diff --git a/xkb/ddxVT.c b/xkb/ddxVT.c
index 58de4b207..ec43f79db 100644
--- a/xkb/ddxVT.c
+++ b/xkb/ddxVT.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/ddxVT.c,v 1.3 2002/11/23 19:27:50 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/ddxVT.c,v 1.4 2003/11/17 22:20:45 dawes Exp $ */
#include <stdio.h>
#define NEED_EVENTS 1
@@ -42,14 +42,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#endif
int
-#if NeedFunctionPrototypes
XkbDDXSwitchScreen(DeviceIntPtr dev,KeyCode key,XkbAction *act)
-#else
-XkbDDXSwitchScreen(dev,key,act)
- DeviceIntPtr dev;
- KeyCode key;
- XkbAction *act;
-#endif
{
#ifdef XF86DDXACTIONS
{
diff --git a/xkb/maprules.c b/xkb/maprules.c
index 8c5ce1a42..c588ae399 100644
--- a/xkb/maprules.c
+++ b/xkb/maprules.c
@@ -24,7 +24,7 @@
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/xkbfile/maprules.c,v 3.17 2002/11/26 01:43:25 dawes Exp $ */
+/* $XFree86: xc/lib/xkbfile/maprules.c,v 3.18 2003/11/17 22:20:23 dawes Exp $ */
#include <stdio.h>
#include <ctype.h>
@@ -89,12 +89,7 @@ typedef struct {
} InputLine;
static void
-#if NeedFunctionPrototypes
InitInputLine(InputLine *line)
-#else
-InitInputLine(line)
- InputLine * line;
-#endif
{
line->line_num= 1;
line->num_line= 0;
@@ -104,12 +99,7 @@ InitInputLine(line)
}
static void
-#if NeedFunctionPrototypes
FreeInputLine(InputLine *line)
-#else
-FreeInputLine(line)
- InputLine *line;
-#endif
{
if (line->line!=line->buf)
_XkbFree(line->line);
@@ -121,13 +111,7 @@ FreeInputLine(line)
}
static int
-#if NeedFunctionPrototypes
InputLineAddChar(InputLine *line,int ch)
-#else
-InputLineAddChar(line,ch)
- InputLine * line;
- int ch;
-#endif
{
if (line->num_line>=line->sz_line) {
if (line->line==line->buf) {
@@ -148,14 +132,7 @@ InputLineAddChar(line,ch)
InputLineAddChar(l,c))
static Bool
-#if NeedFunctionPrototypes
GetInputLine(FILE *file,InputLine *line,Bool checkbang)
-#else
-GetInputLine(file,line,checkbang)
- FILE * file;
- InputLine * line;
- Bool checkbang;
-#endif
{
int ch;
Bool endOfFile,spacePending,slashPending,inComment;
@@ -279,13 +256,7 @@ typedef struct {
/***====================================================================***/
static char*
-#if NeedFunctionPrototypes
get_index(char *str, int *ndx)
-#else
-get_index(str, ndx)
- char *str;
- int *ndx;
-#endif
{
char ndx_buf[NDX_BUFF_SIZE];
char *end;
@@ -311,13 +282,7 @@ get_index(str, ndx)
}
static void
-#if NeedFunctionPrototypes
SetUpRemap(InputLine *line,RemapSpec *remap)
-#else
-SetUpRemap(line,remap)
- InputLine * line;
- RemapSpec * remap;
-#endif
{
char * tok,*str;
unsigned present, l_ndx_present, v_ndx_present;
@@ -426,13 +391,7 @@ Bool found;
}
static Bool
-#if NeedFunctionPrototypes
MatchOneOf(char *wanted,char *vals_defined)
-#else
-MatchOneOf(wanted,vals_defined)
- char * wanted;
- char * vals_defined;
-#endif
{
char *str,*next;
int want_len= strlen(wanted);
@@ -456,18 +415,10 @@ int want_len= strlen(wanted);
/***====================================================================***/
static Bool
-#if NeedFunctionPrototypes
CheckLine( InputLine * line,
RemapSpec * remap,
XkbRF_RulePtr rule,
XkbRF_GroupPtr group)
-#else
-CheckLine(line,remap,rule,group)
- InputLine * line;
- RemapSpec * remap;
- XkbRF_RulePtr rule;
- XkbRF_GroupsPtr group;
-#endif
{
char * str,*tok;
register int nread, i;
@@ -566,13 +517,7 @@ Bool append = False;
}
static char *
-#if NeedFunctionPrototypes
_Concat(char *str1,char *str2)
-#else
-_Concat(str1,str2)
- char * str1;
- char * str2;
-#endif
{
int len;
@@ -586,12 +531,7 @@ int len;
}
static void
-#if NeedFunctionPrototypes
squeeze_spaces(char *p1)
-#else
-squeeze_spaces(p1)
- char *p1;
-#endif
{
char *p2;
for (p2 = p1; *p2; p2++) {
@@ -602,13 +542,7 @@ squeeze_spaces(p1)
}
static Bool
-#if NeedFunctionPrototypes
MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs)
-#else
-MakeMultiDefs(mdefs, defs)
- XkbRF_MultiDefsPtr mdefs
- XkbRF_VarDefsPtr defs;
-#endif
{
bzero((char *)mdefs,sizeof(XkbRF_MultiDefsRec));
@@ -667,12 +601,7 @@ MakeMultiDefs(mdefs, defs)
}
static void
-#if NeedFunctionPrototypes
FreeMultiDefs(XkbRF_MultiDefsPtr defs)
-#else
-FreeMultiDefs(defs)
- XkbRF_MultiDefsPtr defs;
-#endif
{
if (defs->options) _XkbFree(defs->options);
if (defs->layout[1]) _XkbFree(defs->layout[1]);
@@ -680,13 +609,7 @@ FreeMultiDefs(defs)
}
static void
-#if NeedFunctionPrototypes
Apply(char *src, char **dst)
-#else
-Apply(src, dst)
- char *src;
- char *dst;
-#endif
{
if (src) {
if (*src == '+' || *src == '!') {
@@ -699,14 +622,8 @@ Apply(src, dst)
}
static void
-#if NeedFunctionPrototypes
XkbRF_ApplyRule( XkbRF_RulePtr rule,
XkbComponentNamesPtr names)
-#else
-XkbRF_ApplyRule(rule,names)
- XkbRF_RulePtr rule;
- XkbComponentNamesPtr names;
-#endif
{
rule->flags&= ~XkbRF_PendingMatch; /* clear the flag because it's applied */
@@ -719,16 +636,9 @@ XkbRF_ApplyRule(rule,names)
}
static Bool
-#if NeedFunctionPrototypes
CheckGroup( XkbRF_RulesPtr rules,
char * group_name,
char * name)
-#else
-XkbRF_CheckApplyRule(rules,group,name)
- XkbRF_RulesPtr rules;
- char * group_name;
- char * name;
-#endif
{
int i;
char *p;
@@ -750,18 +660,10 @@ XkbRF_CheckApplyRule(rules,group,name)
}
static int
-#if NeedFunctionPrototypes
XkbRF_CheckApplyRule( XkbRF_RulePtr rule,
XkbRF_MultiDefsPtr mdefs,
XkbComponentNamesPtr names,
XkbRF_RulesPtr rules)
-#else
-XkbRF_CheckApplyRule(rule,mdefs,names)
- XkbRF_RulePtr rule;
- XkbRF_MultiDefsPtr mdefs;
- XkbComponentNamesPtr names;
- XkbRF_RulesPtr rules;
-#endif
{
Bool pending = False;
@@ -832,12 +734,7 @@ XkbRF_CheckApplyRule(rule,mdefs,names)
}
static void
-#if NeedFunctionPrototypes
XkbRF_ClearPartialMatches(XkbRF_RulesPtr rules)
-#else
-XkbRF_ClearPartialMatches(rules)
- XkbRF_RulesPtr rules;
-#endif
{
register int i;
XkbRF_RulePtr rule;
@@ -848,13 +745,7 @@ XkbRF_RulePtr rule;
}
static void
-#if NeedFunctionPrototypes
XkbRF_ApplyPartialMatches(XkbRF_RulesPtr rules,XkbComponentNamesPtr names)
-#else
-XkbRF_ApplyPartialMatches(rules,names)
- XkbRF_RulesPtr rules;
- XkbComponentNamesPtr names;
-#endif
{
int i;
XkbRF_RulePtr rule;
@@ -867,18 +758,10 @@ XkbRF_RulePtr rule;
}
static void
-#if NeedFunctionPrototypes
XkbRF_CheckApplyRules( XkbRF_RulesPtr rules,
XkbRF_MultiDefsPtr mdefs,
XkbComponentNamesPtr names,
int flags)
-#else
-XkbRF_CheckApplyRules(rules, mdefs, names, flags)
- XkbRF_RulesPtr rules;
- XkbRF_MultiDefsPtr mdefs;
- XkbComponentNamesPtr names;
- int flags;
-#endif
{
int i;
XkbRF_RulePtr rule;
@@ -899,13 +782,7 @@ int skip;
/***====================================================================***/
static char *
-#if NeedFunctionPrototypes
XkbRF_SubstituteVars(char *name, XkbRF_MultiDefsPtr mdefs)
-#else
-XkbRF_SubstituteVars(name, mdefs)
- char * name;
- XkbRF_MultiDefsPtr mdefs;
-#endif
{
char *str, *outstr, *orig, *var;
int len, ndx;
@@ -1000,16 +877,9 @@ int len, ndx;
/***====================================================================***/
Bool
-#if NeedFunctionPrototypes
XkbRF_GetComponents( XkbRF_RulesPtr rules,
XkbRF_VarDefsPtr defs,
XkbComponentNamesPtr names)
-#else
-XkbRF_GetComponents(rules,defs,names)
- XkbRF_RulesPtr rules;
- XkbRF_VarDefsPtr defs;
- XkbComponentNamesPtr names;
-#endif
{
XkbRF_MultiDefsRec mdefs;
@@ -1042,12 +912,7 @@ XkbRF_GetComponents(rules,defs,names)
}
XkbRF_RulePtr
-#if NeedFunctionPrototypes
XkbRF_AddRule(XkbRF_RulesPtr rules)
-#else
-XkbRF_AddRule(rules)
- XkbRF_RulesPtr rules;
-#endif
{
if (rules->sz_rules<1) {
rules->sz_rules= 16;
@@ -1071,12 +936,7 @@ XkbRF_AddRule(rules)
}
XkbRF_GroupPtr
-#if NeedFunctionPrototypes
XkbRF_AddGroup(XkbRF_RulesPtr rules)
-#else
-XkbRF_AddGroup(rules)
- XkbRF_RulesPtr rules;
-#endif
{
if (rules->sz_groups<1) {
rules->sz_groups= 16;
@@ -1098,13 +958,7 @@ XkbRF_AddGroup(rules)
}
Bool
-#if NeedFunctionPrototypes
XkbRF_LoadRules(FILE *file, XkbRF_RulesPtr rules)
-#else
-XkbRF_LoadRules(file,rules)
- FILE * file;
- XkbRF_RulesPtr rules;
-#endif
{
InputLine line;
RemapSpec remap;
@@ -1137,14 +991,7 @@ XkbRF_GroupRec tgroup,*group;
}
Bool
-#if NeedFunctionPrototypes
XkbRF_LoadRulesByName(char *base,char *locale,XkbRF_RulesPtr rules)
-#else
-XkbRF_LoadRulesByName(base,locale,rules)
- char * base;
- char * locale;
- XkbRF_RulesPtr rules;
-#endif
{
FILE * file;
char buf[PATH_MAX];
@@ -1185,12 +1032,7 @@ Bool ok;
#define HEAD_EXTRA 5
XkbRF_VarDescPtr
-#if NeedFunctionPrototypes
XkbRF_AddVarDesc(XkbRF_DescribeVarsPtr vars)
-#else
-XkbRF_AddVarDesc(vars)
- XkbRF_DescribeVarsPtr vars;
-#endif
{
if (vars->sz_desc<1) {
vars->sz_desc= 16;
@@ -1212,13 +1054,7 @@ XkbRF_AddVarDesc(vars)
}
XkbRF_VarDescPtr
-#if NeedFunctionPrototypes
XkbRF_AddVarDescCopy(XkbRF_DescribeVarsPtr vars,XkbRF_VarDescPtr from)
-#else
-XkbRF_AddVarDescCopy(vars,from)
- XkbRF_DescribeVarsPtr vars;
- XkbRF_VarDescPtr from;
-#endif
{
XkbRF_VarDescPtr nd;
@@ -1230,13 +1066,7 @@ XkbRF_VarDescPtr nd;
}
XkbRF_DescribeVarsPtr
-#if NeedFunctionPrototypes
XkbRF_AddVarToDescribe(XkbRF_RulesPtr rules,char *name)
-#else
-XkbRF_AddVarToDescribe(rules,name)
- XkbRF_RulesPtr rules;
- char * name;
-#endif
{
if (rules->sz_extra<1) {
rules->num_extra= 0;
@@ -1264,13 +1094,7 @@ XkbRF_AddVarToDescribe(rules,name)
}
Bool
-#if NeedFunctionPrototypes
XkbRF_LoadDescriptions(FILE *file,XkbRF_RulesPtr rules)
-#else
-XkbRF_LoadDescriptions(file,rules)
- FILE * file;
- XkbRF_RulesPtr rules;
-#endif
{
InputLine line;
XkbRF_VarDescRec tmp;
@@ -1366,14 +1190,7 @@ int len,headingtype,extra_ndx = 0;
}
Bool
-#if NeedFunctionPrototypes
XkbRF_LoadDescriptionsByName(char *base,char *locale,XkbRF_RulesPtr rules)
-#else
-XkbRF_LoadDescriptionsByName(base,locale,rules)
- char * base;
- char * locale;
- XkbRF_RulesPtr rules;
-#endif
{
FILE * file;
char buf[PATH_MAX];
@@ -1408,15 +1225,7 @@ Bool ok;
/***====================================================================***/
XkbRF_RulesPtr
-#if NeedFunctionPrototypes
XkbRF_Load(char *base,char *locale,Bool wantDesc,Bool wantRules)
-#else
-XkbRF_Load(base,locale,wantDesc,wantRules)
- char *base;
- char *locale;
- Bool wantDesc;
- Bool wantRules;
-#endif
{
XkbRF_RulesPtr rules;
@@ -1466,12 +1275,7 @@ XkbRF_RulesPtr rules;
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
XkbRF_ClearVarDescriptions(XkbRF_DescribeVarsPtr var)
-#else
-XkbRF_ClearVarDescriptions(var)
- XkbRF_DescribeVarsPtr var;
-#endif
{
register int i;
@@ -1489,13 +1293,7 @@ register int i;
}
void
-#if NeedFunctionPrototypes
XkbRF_Free(XkbRF_RulesPtr rules,Bool freeRules)
-#else
-XkbRF_Free(rules,freeRules)
- XkbRF_RulesPtr rules;
- Bool freeRules;
-#endif
{
int i;
XkbRF_RulePtr rule;
@@ -1551,14 +1349,7 @@ XkbRF_GroupPtr group;
#ifndef XKB_IN_SERVER
Bool
-#if NeedFunctionPrototypes
XkbRF_GetNamesProp(Display *dpy,char **rf_rtrn,XkbRF_VarDefsPtr vd_rtrn)
-#else
-XkbRF_GetNamesProp(dpy,rf_rtrn,vd_rtrn)
- Display * dpy;
- char ** rf_rtrn;
- XkbRF_VarDefsPtr vd_rtrn;
-#endif
{
Atom rules_atom,actual_type;
int fmt;
@@ -1618,14 +1409,7 @@ Status rtrn;
}
Bool
-#if NeedFunctionPrototypes
XkbRF_SetNamesProp(Display *dpy,char *rules_file,XkbRF_VarDefsPtr var_defs)
-#else
-XkbRF_SetNamesProp(dpy,rules_file,var_defs)
- Display * dpy;
- char * rules_file;
- XkbRF_VarDefsPtr var_defs;
-#endif
{
int len,out;
Atom name;
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 5c3e41d48..273385ef6 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/xkb.c,v 3.18 2002/12/20 20:18:35 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/xkb.c,v 3.22 2003/11/17 22:20:45 dawes Exp $ */
#include <stdio.h>
#include "X.h"
@@ -36,6 +36,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define XKBSRV_NEED_FILE_FUNCS
#include "XKBsrv.h"
#include "extnsionst.h"
+#include "modinit.h"
+#include "xkb.h"
#include "XI.h"
@@ -155,12 +157,7 @@ RESTYPE RT_XKBCLIENT;
/***====================================================================***/
int
-#if NeedFunctionPrototypes
ProcXkbUseExtension(ClientPtr client)
-#else
-ProcXkbUseExtension(client)
- ClientPtr client;
-#endif
{
REQUEST(xkbUseExtensionReq);
xkbUseExtensionReply rep;
@@ -186,8 +183,9 @@ ProcXkbUseExtension(client)
client->vMinor= stuff->wantedMinor;
}
else if (xkbDebugFlags&0x1) {
- ErrorF("Rejecting client %d (0x%x) (wants %d.%02d, have %d.%02d)\n",
- client->index, client->clientAsMask,
+ ErrorF("Rejecting client %d (0x%lx) (wants %d.%02d, have %d.%02d)\n",
+ client->index,
+ (long)client->clientAsMask,
stuff->wantedMajor,stuff->wantedMinor,
XkbMajorVersion,XkbMinorVersion);
}
@@ -209,12 +207,7 @@ ProcXkbUseExtension(client)
/***====================================================================***/
int
-#if NeedFunctionPrototypes
ProcXkbSelectEvents(ClientPtr client)
-#else
-ProcXkbSelectEvents(client)
- ClientPtr client;
-#endif
{
unsigned legal;
DeviceIntPtr dev;
@@ -365,12 +358,7 @@ ProcXkbSelectEvents(client)
/***====================================================================***/
int
-#if NeedFunctionPrototypes
ProcXkbBell(ClientPtr client)
-#else
-ProcXkbBell(client)
- ClientPtr client;
-#endif
{
REQUEST(xkbBellReq);
DeviceIntPtr dev;
@@ -511,12 +499,7 @@ ProcXkbBell(client)
/***====================================================================***/
int
-#if NeedFunctionPrototypes
ProcXkbGetState(ClientPtr client)
-#else
-ProcXkbGetState(client)
- ClientPtr client;
-#endif
{
REQUEST(xkbGetStateReq);
DeviceIntPtr dev;
@@ -558,12 +541,7 @@ ProcXkbGetState(client)
/***====================================================================***/
int
-#if NeedFunctionPrototypes
ProcXkbLatchLockState(ClientPtr client)
-#else
-ProcXkbLatchLockState(client)
- ClientPtr client;
-#endif
{
int status;
DeviceIntPtr dev;
@@ -622,12 +600,7 @@ ProcXkbLatchLockState(client)
/***====================================================================***/
int
-#if NeedFunctionPrototypes
ProcXkbGetControls(ClientPtr client)
-#else
-ProcXkbGetControls(client)
- ClientPtr client;
-#endif
{
xkbGetControlsReply rep;
XkbControlsPtr xkb;
@@ -701,12 +674,7 @@ ProcXkbGetControls(client)
}
int
-#if NeedFunctionPrototypes
ProcXkbSetControls(ClientPtr client)
-#else
-ProcXkbSetControls(client)
- ClientPtr client;
-#endif
{
DeviceIntPtr dev;
XkbSrvInfoPtr xkbi;
@@ -875,16 +843,7 @@ ProcXkbSetControls(client)
}
int
-#if NeedFunctionPrototypes
XkbSetRepeatRate(DeviceIntPtr dev,int timeout,int interval,int major,int minor)
-#else
-XkbSetRepeatRate(dev,timeout,interval,major,minor)
- DeviceIntPtr dev;
- int timeout;
- int interval;
- int major;
- int minor;
-#endif
{
int changed= 0;
XkbControlsRec old,*xkb;
@@ -916,14 +875,7 @@ XkbControlsRec old,*xkb;
}
int
-#if NeedFunctionPrototypes
XkbGetRepeatRate(DeviceIntPtr dev,int *timeout,int *interval)
-#else
-XkbGetRepeatRate(dev,timeout,interval)
- DeviceIntPtr dev;
- int * timeout;
- int * interval;
-#endif
{
XkbControlsPtr xkb;
@@ -938,13 +890,7 @@ XkbControlsPtr xkb;
/***====================================================================***/
static int
-#if NeedFunctionPrototypes
XkbSizeKeyTypes(XkbDescPtr xkb,xkbGetMapReply *rep)
-#else
-XkbSizeKeyTypes(xkb,rep)
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
-#endif
{
XkbKeyTypeRec *type;
unsigned i,len;
@@ -969,18 +915,10 @@ XkbSizeKeyTypes(xkb,rep)
}
static char *
-#if NeedFunctionPrototypes
XkbWriteKeyTypes( XkbDescPtr xkb,
xkbGetMapReply * rep,
char * buf,
ClientPtr client)
-#else
-XkbWriteKeyTypes(xkb,rep,buf,client)
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
- char * buf;
- ClientPtr client;
-#endif
{
XkbKeyTypePtr type;
unsigned i;
@@ -1041,13 +979,7 @@ XkbWriteKeyTypes(xkb,rep,buf,client)
}
static int
-#if NeedFunctionPrototypes
XkbSizeKeySyms(XkbDescPtr xkb,xkbGetMapReply *rep)
-#else
-XkbSizeKeySyms(xkb,rep)
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
-#endif
{
XkbSymMapPtr symMap;
unsigned i,len;
@@ -1074,13 +1006,7 @@ XkbSizeKeySyms(xkb,rep)
}
static int
-#if NeedFunctionPrototypes
XkbSizeVirtualMods(XkbDescPtr xkb,xkbGetMapReply *rep)
-#else
-XkbSizeVirtualMods(xkb,rep)
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
-#endif
{
register unsigned i,nMods,bit;
@@ -1098,15 +1024,7 @@ register unsigned i,nMods,bit;
}
static char *
-#if NeedFunctionPrototypes
XkbWriteKeySyms(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,ClientPtr client)
-#else
-XkbWriteKeySyms(xkb,rep,buf,client)
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
- char * buf;
- ClientPtr client;
-#endif
{
register KeySym * pSym;
XkbSymMapPtr symMap;
@@ -1143,13 +1061,7 @@ register unsigned i;
}
static int
-#if NeedFunctionPrototypes
XkbSizeKeyActions(XkbDescPtr xkb,xkbGetMapReply *rep)
-#else
-XkbSizeKeyActions(xkb,rep)
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
-#endif
{
unsigned i,len,nActs;
register KeyCode firstKey;
@@ -1172,16 +1084,8 @@ XkbSizeKeyActions(xkb,rep)
}
static char *
-#if NeedFunctionPrototypes
XkbWriteKeyActions(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,
ClientPtr client)
-#else
-XkbWriteKeyActions(xkb,rep,buf,client)
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
- char * buf;
- ClientPtr client;
-#endif
{
unsigned i;
CARD8 * numDesc;
@@ -1211,13 +1115,7 @@ XkbWriteKeyActions(xkb,rep,buf,client)
}
static int
-#if NeedFunctionPrototypes
XkbSizeKeyBehaviors(XkbDescPtr xkb,xkbGetMapReply *rep)
-#else
-XkbSizeKeyBehaviors(xkb,rep)
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
-#endif
{
unsigned i,len,nBhvr;
XkbBehavior * bhv;
@@ -1240,16 +1138,8 @@ XkbSizeKeyBehaviors(xkb,rep)
}
static char *
-#if NeedFunctionPrototypes
XkbWriteKeyBehaviors(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,
ClientPtr client)
-#else
-XkbWriteKeyBehaviors(xkb,rep,buf,client)
- XkbDescRec *xkb;
- xkbGetMapReply *rep;
- char *buf;
- ClientPtr client;
-#endif
{
unsigned i;
xkbBehaviorWireDesc *wire;
@@ -1270,13 +1160,7 @@ XkbWriteKeyBehaviors(xkb,rep,buf,client)
}
static int
-#if NeedFunctionPrototypes
XkbSizeExplicit(XkbDescPtr xkb,xkbGetMapReply *rep)
-#else
-XkbSizeExplicit(xkb,rep)
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
-#endif
{
unsigned i,len,nRtrn;
@@ -1297,15 +1181,7 @@ XkbSizeExplicit(xkb,rep)
}
static char *
-#if NeedFunctionPrototypes
XkbWriteExplicit(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,ClientPtr client)
-#else
-XkbWriteExplicit(xkb,rep,buf,client)
- XkbDescPtr xkb;
- xkbGetMapReply *rep;
- char *buf;
- ClientPtr client;
-#endif
{
unsigned i;
char * start;
@@ -1324,13 +1200,7 @@ unsigned char * pExp;
}
static int
-#if NeedFunctionPrototypes
XkbSizeModifierMap(XkbDescPtr xkb,xkbGetMapReply *rep)
-#else
-XkbSizeModifierMap(xkb,rep)
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
-#endif
{
unsigned i,len,nRtrn;
@@ -1351,16 +1221,8 @@ XkbSizeModifierMap(xkb,rep)
}
static char *
-#if NeedFunctionPrototypes
XkbWriteModifierMap(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,
ClientPtr client)
-#else
-XkbWriteModifierMap(xkb,rep,buf,client)
- XkbDescPtr xkb;
- xkbGetMapReply *rep;
- char *buf;
- ClientPtr client;
-#endif
{
unsigned i;
char * start;
@@ -1379,13 +1241,7 @@ unsigned char * pMap;
}
static int
-#if NeedFunctionPrototypes
XkbSizeVirtualModMap(XkbDescPtr xkb,xkbGetMapReply *rep)
-#else
-XkbSizeVirtualModMap(xkb,rep)
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
-#endif
{
unsigned i,len,nRtrn;
@@ -1406,16 +1262,8 @@ XkbSizeVirtualModMap(xkb,rep)
}
static char *
-#if NeedFunctionPrototypes
XkbWriteVirtualModMap(XkbDescPtr xkb,xkbGetMapReply *rep,char *buf,
ClientPtr client)
-#else
-XkbWriteVirtualModMap(xkb,rep,buf,client)
- XkbDescPtr xkb;
- xkbGetMapReply *rep;
- char *buf;
- ClientPtr client;
-#endif
{
unsigned i;
xkbVModMapWireDesc * wire;
@@ -1434,13 +1282,7 @@ unsigned short * pMap;
}
static Status
-#if NeedFunctionPrototypes
XkbComputeGetMapReplySize(XkbDescPtr xkb,xkbGetMapReply *rep)
-#else
-XkbComputeGetMapReplySize(xkb,rep)
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
-#endif
{
int len;
@@ -1459,14 +1301,7 @@ int len;
}
static int
-#if NeedFunctionPrototypes
XkbSendMap(ClientPtr client,XkbDescPtr xkb,xkbGetMapReply *rep)
-#else
-XkbSendMap(client,xkb,rep)
- ClientPtr client;
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
-#endif
{
unsigned i,len;
char *desc,*start;
@@ -1499,8 +1334,8 @@ char *desc,*start;
if ( rep->totalVModMapKeys>0 )
desc= XkbWriteVirtualModMap(xkb,rep,desc,client);
if ((desc-start)!=(len)) {
- ErrorF("BOGUS LENGTH in write keyboard desc, expected %d, got %d\n",
- len, desc-start);
+ ErrorF("BOGUS LENGTH in write keyboard desc, expected %d, got %ld\n",
+ len, (unsigned long)(desc-start));
}
if (client->swapped) {
register int n;
@@ -1517,12 +1352,7 @@ char *desc,*start;
}
int
-#if NeedFunctionPrototypes
ProcXkbGetMap(ClientPtr client)
-#else
-ProcXkbGetMap(client)
- ClientPtr client;
-#endif
{
DeviceIntPtr dev;
xkbGetMapReply rep;
@@ -1651,22 +1481,12 @@ ProcXkbGetMap(client)
/***====================================================================***/
static int
-#if NeedFunctionPrototypes
CheckKeyTypes( ClientPtr client,
XkbDescPtr xkb,
xkbSetMapReq * req,
xkbKeyTypeWireDesc **wireRtrn,
int * nMapsRtrn,
CARD8 * mapWidthRtrn)
-#else
-CheckKeyTypes(client,xkb,req,wireRtrn,nMapsRtrn,mapWidthRtrn)
- ClientPtr client;
- XkbDescPtr xkb;
- xkbSetMapReq * req;
- xkbKeyTypeWireDesc **wireRtrn;
- int * nMapsRtrn;
- CARD8 * mapWidthRtrn;
-#endif
{
unsigned nMaps;
register unsigned i,n;
@@ -1782,7 +1602,6 @@ register xkbKeyTypeWireDesc *wire = *wireRtrn;
}
static int
-#if NeedFunctionPrototypes
CheckKeySyms( ClientPtr client,
XkbDescPtr xkb,
xkbSetMapReq * req,
@@ -1791,17 +1610,6 @@ CheckKeySyms( ClientPtr client,
CARD16 * symsPerKey,
xkbSymMapWireDesc ** wireRtrn,
int * errorRtrn)
-#else
-CheckKeySyms(client,xkb,req,nTypes,mapWidths,symsPerKey,wireRtrn,errorRtrn)
- ClientPtr client;
- XkbDescPtr xkb;
- xkbSetMapReq * req;
- int nTypes;
- CARD8 * mapWidths;
- CARD16 * symsPerKey;
- xkbSymMapWireDesc **wireRtrn;
- int * errorRtrn;
-#endif
{
register unsigned i;
XkbSymMapPtr map;
@@ -1884,7 +1692,6 @@ xkbSymMapWireDesc* wire = *wireRtrn;
}
static int
-#if NeedFunctionPrototypes
CheckKeyActions( XkbDescPtr xkb,
xkbSetMapReq * req,
int nTypes,
@@ -1892,16 +1699,6 @@ CheckKeyActions( XkbDescPtr xkb,
CARD16 * symsPerKey,
CARD8 ** wireRtrn,
int * nActsRtrn)
-#else
-CheckKeyActions(xkb,req,nTypes,mapWidths,symsPerKey,wireRtrn,nActsRtrn)
- XkbDescRec *xkb;
- xkbSetMapReq *req;
- int nTypes;
- CARD8 *mapWidths;
- CARD16 *symsPerKey;
- CARD8 **wireRtrn;
- int *nActsRtrn;
-#endif
{
int nActs;
CARD8 * wire = *wireRtrn;
@@ -1929,18 +1726,10 @@ register unsigned i;
}
static int
-#if NeedFunctionPrototypes
CheckKeyBehaviors( XkbDescPtr xkb,
xkbSetMapReq * req,
xkbBehaviorWireDesc ** wireRtrn,
int * errorRtrn)
-#else
-CheckKeyBehaviors(xkb,req,wireRtrn,errorRtrn)
- XkbDescRec *xkb;
- xkbSetMapReq *req;
- xkbBehaviorWireDesc **wireRtrn;
- int *errorRtrn;
-#endif
{
register xkbBehaviorWireDesc * wire = *wireRtrn;
register XkbServerMapPtr server = xkb->server;
@@ -1989,18 +1778,10 @@ unsigned first,last;
}
static int
-#if NeedFunctionPrototypes
CheckVirtualMods( XkbDescRec * xkb,
xkbSetMapReq * req,
CARD8 ** wireRtrn,
int * errorRtrn)
-#else
-CheckVirtualMods(xkb,req,wireRtrn,errorRtrn)
- XkbDescPtr xkb;
- xkbSetMapReq * req;
- CARD8 ** wireRtrn;
- int * errorRtrn;
-#endif
{
register CARD8 *wire = *wireRtrn;
register unsigned i,nMods,bit;
@@ -2016,18 +1797,10 @@ register unsigned i,nMods,bit;
}
static int
-#if NeedFunctionPrototypes
CheckKeyExplicit( XkbDescPtr xkb,
xkbSetMapReq * req,
CARD8 ** wireRtrn,
int * errorRtrn)
-#else
-CheckKeyExplicit(xkb,req,wireRtrn,errorRtrn)
- XkbDescPtr xkb;
- xkbSetMapReq * req;
- CARD8 ** wireRtrn;
- int * errorRtrn;
-#endif
{
register CARD8 * wire = *wireRtrn;
CARD8 * start;
@@ -2066,15 +1839,7 @@ int first,last;
}
static int
-#if NeedFunctionPrototypes
CheckModifierMap(XkbDescPtr xkb,xkbSetMapReq *req,CARD8 **wireRtrn,int *errRtrn)
-#else
-CheckModifierMap(xkb,req,wireRtrn,errRtrn)
- XkbDescPtr xkb;
- xkbSetMapReq * req;
- CARD8 ** wireRtrn;
- int * errRtrn;
-#endif
{
register CARD8 * wire = *wireRtrn;
CARD8 * start;
@@ -2109,18 +1874,10 @@ int first,last;
}
static int
-#if NeedFunctionPrototypes
CheckVirtualModMap( XkbDescPtr xkb,
xkbSetMapReq *req,
xkbVModMapWireDesc **wireRtrn,
int *errRtrn)
-#else
-CheckVirtualModMap(xkb,req,wireRtrn,errRtrn)
- XkbDescPtr xkb;
- xkbSetMapReq * req;
- xkbVModMapWireDesc ** wireRtrn;
- int * errRtrn;
-#endif
{
register xkbVModMapWireDesc * wire = *wireRtrn;
register unsigned i;
@@ -2152,18 +1909,10 @@ int first,last;
}
static char *
-#if NeedFunctionPrototypes
SetKeyTypes( XkbDescPtr xkb,
xkbSetMapReq * req,
xkbKeyTypeWireDesc * wire,
XkbChangesPtr changes)
-#else
-SetKeyTypes(xkb,req,wire,changes)
- XkbDescPtr xkb;
- xkbSetMapReq * req;
- xkbKeyTypeWireDesc *wire;
- XkbChangesPtr changes;
-#endif
{
register unsigned i;
unsigned first,last;
@@ -2245,22 +1994,12 @@ CARD8 *map;
}
static char *
-#if NeedFunctionPrototypes
SetKeySyms( ClientPtr client,
XkbDescPtr xkb,
xkbSetMapReq * req,
xkbSymMapWireDesc * wire,
XkbChangesPtr changes,
DeviceIntPtr dev)
-#else
-SetKeySyms(client,xkb,req,wire,changes,dev)
- ClientPtr client;
- XkbDescPtr xkb;
- xkbSetMapReq * req;
- xkbSymMapWireDesc * wire;
- XkbChangesPtr changes;
- DeviceIntPtr dev;
-#endif
{
register unsigned i,s;
XkbSymMapPtr oldMap;
@@ -2325,18 +2064,10 @@ unsigned first,last;
}
static char *
-#if NeedFunctionPrototypes
SetKeyActions( XkbDescPtr xkb,
xkbSetMapReq * req,
CARD8 * wire,
XkbChangesPtr changes)
-#else
-SetKeyActions(xkb,req,wire,changes)
- XkbDescPtr xkb;
- xkbSetMapReq * req;
- CARD8 * wire;
- XkbChangesPtr changes;
-#endif
{
register unsigned i,first,last;
CARD8 * nActs = wire;
@@ -2370,18 +2101,10 @@ XkbAction * newActs;
}
static char *
-#if NeedFunctionPrototypes
SetKeyBehaviors( XkbSrvInfoPtr xkbi,
xkbSetMapReq *req,
xkbBehaviorWireDesc *wire,
XkbChangesPtr changes)
-#else
-SetKeyBehaviors(xkbi,req,wire,changes)
- XkbSrvInfoPtr xkbi;
- xkbSetMapReq * req;
- xkbBehaviorWireDesc*wire;
- XkbChangesPtr changes;
-#endif
{
register unsigned i;
int maxRG = -1;
@@ -2432,16 +2155,8 @@ unsigned first,last;
}
static char *
-#if NeedFunctionPrototypes
SetVirtualMods(XkbSrvInfoPtr xkbi,xkbSetMapReq *req,CARD8 *wire,
XkbChangesPtr changes)
-#else
-SetVirtualMods(xkbi,req,wire,changes)
- XkbSrvInfoPtr xkbi;
- xkbSetMapReq * req;
- CARD8 * wire;
- XkbChangesPtr changes;
-#endif
{
register int i,bit,nMods;
XkbServerMapPtr srv = xkbi->desc->server;
@@ -2462,16 +2177,8 @@ XkbServerMapPtr srv = xkbi->desc->server;
}
static char *
-#if NeedFunctionPrototypes
SetKeyExplicit(XkbSrvInfoPtr xkbi,xkbSetMapReq *req,CARD8 *wire,
XkbChangesPtr changes)
-#else
-SetKeyExplicit(xkbi,req,wire,changes)
- XkbSrvInfoPtr xkbi;
- xkbSetMapReq * req;
- CARD8 * wire;
- XkbChangesPtr changes;
-#endif
{
register unsigned i,first,last;
XkbServerMapPtr xkb = xkbi->desc->server;
@@ -2502,18 +2209,10 @@ CARD8 * start;
}
static char *
-#if NeedFunctionPrototypes
SetModifierMap( XkbSrvInfoPtr xkbi,
xkbSetMapReq * req,
CARD8 * wire,
XkbChangesPtr changes)
-#else
-SetModifierMap(xkbi,req,wire,changes)
- XkbSrvInfoPtr xkbi;
- xkbSetMapReq * req;
- CARD8 * wire;
- XkbChangesPtr changes;
-#endif
{
register unsigned i,first,last;
XkbClientMapPtr xkb = xkbi->desc->map;
@@ -2544,18 +2243,10 @@ CARD8 * start;
}
static char *
-#if NeedFunctionPrototypes
SetVirtualModMap( XkbSrvInfoPtr xkbi,
xkbSetMapReq * req,
xkbVModMapWireDesc * wire,
XkbChangesPtr changes)
-#else
-SetVirtualModMap(xkbi,req,wire,changes)
- XkbSrvInfoPtr xkbi;
- xkbSetMapReq * req;
- xkbVModMapWireDesc *wire;
- XkbChangesPtr changes;
-#endif
{
register unsigned i,first,last;
XkbServerMapPtr srv = xkbi->desc->server;
@@ -2583,12 +2274,7 @@ XkbServerMapPtr srv = xkbi->desc->server;
}
int
-#if NeedFunctionPrototypes
ProcXkbSetMap(ClientPtr client)
-#else
-ProcXkbSetMap(client)
- ClientPtr client;
-#endif
{
DeviceIntPtr dev;
XkbSrvInfoPtr xkbi;
@@ -2779,14 +2465,8 @@ allocFailure:
/***====================================================================***/
static Status
-#if NeedFunctionPrototypes
XkbComputeGetCompatMapReplySize( XkbCompatMapPtr compat,
xkbGetCompatMapReply * rep)
-#else
-XkbComputeGetCompatMapReplySize(compat,rep)
- XkbCompatMapPtr compat;
- xkbGetCompatMapReply * rep;
-#endif
{
unsigned size,nGroups;
@@ -2805,16 +2485,9 @@ unsigned size,nGroups;
}
static int
-#if NeedFunctionPrototypes
XkbSendCompatMap( ClientPtr client,
XkbCompatMapPtr compat,
xkbGetCompatMapReply * rep)
-#else
-XkbSendCompatMap(client,compat,rep)
- ClientPtr client;
- XkbCompatMapPtr compat;
- xkbGetCompatMapReply * rep;
-#endif
{
char * data;
int size;
@@ -2878,12 +2551,7 @@ int size;
}
int
-#if NeedFunctionPrototypes
ProcXkbGetCompatMap(ClientPtr client)
-#else
-ProcXkbGetCompatMap(client)
- ClientPtr client;
-#endif
{
xkbGetCompatMapReply rep;
DeviceIntPtr dev;
@@ -2923,12 +2591,7 @@ ProcXkbGetCompatMap(client)
}
int
-#if NeedFunctionPrototypes
ProcXkbSetCompatMap(ClientPtr client)
-#else
-ProcXkbSetCompatMap(client)
- ClientPtr client;
-#endif
{
DeviceIntPtr dev;
XkbSrvInfoPtr xkbi;
@@ -3066,12 +2729,7 @@ ProcXkbSetCompatMap(client)
/***====================================================================***/
int
-#if NeedFunctionPrototypes
ProcXkbGetIndicatorState(ClientPtr client)
-#else
-ProcXkbGetIndicatorState(client)
- ClientPtr client;
-#endif
{
xkbGetIndicatorStateReply rep;
XkbSrvLedInfoPtr sli;
@@ -3108,15 +2766,9 @@ ProcXkbGetIndicatorState(client)
/***====================================================================***/
Status
-#if NeedFunctionPrototypes
XkbComputeGetIndicatorMapReplySize(
XkbIndicatorPtr indicators,
xkbGetIndicatorMapReply *rep)
-#else
-XkbComputeGetIndicatorMapReplySize(indicators,rep)
- XkbIndicatorPtr indicators;
- xkbGetIndicatorMapReply *rep;
-#endif
{
register int i,bit;
int nIndicators;
@@ -3131,16 +2783,9 @@ int nIndicators;
}
int
-#if NeedFunctionPrototypes
XkbSendIndicatorMap( ClientPtr client,
XkbIndicatorPtr indicators,
xkbGetIndicatorMapReply * rep)
-#else
-XkbSendIndicatorMap(client,indicators,rep)
- ClientPtr client;
- XkbIndicatorPtr indicators;
- xkbGetIndicatorMapReply * rep;
-#endif
{
int length;
CARD8 * map;
@@ -3195,12 +2840,7 @@ register unsigned bit;
}
int
-#if NeedFunctionPrototypes
ProcXkbGetIndicatorMap(ClientPtr client)
-#else
-ProcXkbGetIndicatorMap(client)
- ClientPtr client;
-#endif
{
xkbGetIndicatorMapReply rep;
DeviceIntPtr dev;
@@ -3228,12 +2868,7 @@ XkbIndicatorPtr leds;
}
int
-#if NeedFunctionPrototypes
ProcXkbSetIndicatorMap(ClientPtr client)
-#else
-ProcXkbSetIndicatorMap(client)
- ClientPtr client;
-#endif
{
register int i,bit;
int nIndicators,why;
@@ -3315,12 +2950,7 @@ ProcXkbSetIndicatorMap(client)
/***====================================================================***/
int
-#if NeedFunctionPrototypes
ProcXkbGetNamedIndicator(ClientPtr client)
-#else
-ProcXkbGetNamedIndicator(client)
- ClientPtr client;
-#endif
{
DeviceIntPtr dev;
xkbGetNamedIndicatorReply rep;
@@ -3427,12 +3057,7 @@ ProcXkbGetNamedIndicator(client)
}
int
-#if NeedFunctionPrototypes
ProcXkbSetNamedIndicator(ClientPtr client)
-#else
-ProcXkbSetNamedIndicator(client)
- ClientPtr client;
-#endif
{
DeviceIntPtr dev,kbd;
XkbIndicatorMapPtr map;
@@ -3543,14 +3168,7 @@ ProcXkbSetNamedIndicator(client)
/***====================================================================***/
static CARD32
-#if NeedFunctionPrototypes
_XkbCountAtoms(Atom *atoms,int maxAtoms,int *count)
-#else
-_XkbCountAtoms(atoms,maxAtoms,count)
- Atom *atoms;
- int maxAtoms;
- int *count;
-#endif
{
register unsigned int i,bit,nAtoms;
register CARD32 atomsPresent;
@@ -3567,15 +3185,7 @@ register CARD32 atomsPresent;
}
static char *
-#if NeedFunctionPrototypes
_XkbWriteAtoms(char *wire,Atom *atoms,int maxAtoms,int swap)
-#else
-_XkbWriteAtoms(wire,atoms,maxAtoms,swap)
- char *wire;
- Atom *atoms;
- int maxAtoms;
- int swap;
-#endif
{
register unsigned int i;
Atom *atm;
@@ -3595,13 +3205,7 @@ Atom *atm;
}
static Status
-#if NeedFunctionPrototypes
XkbComputeGetNamesReplySize(XkbDescPtr xkb,xkbGetNamesReply *rep)
-#else
-XkbComputeGetNamesReplySize(xkb,rep)
- XkbDescPtr xkb;
- xkbGetNamesReply * rep;
-#endif
{
register unsigned which,length;
register int i;
@@ -3706,14 +3310,7 @@ register int i;
}
static int
-#if NeedFunctionPrototypes
XkbSendNames(ClientPtr client,XkbDescPtr xkb,xkbGetNamesReply *rep)
-#else
-XkbSendNames(client,xkb,rep)
- ClientPtr client;
- XkbDescPtr xkb;
- xkbGetNamesReply * rep;
-#endif
{
register unsigned i,length,which;
char * start;
@@ -3855,8 +3452,8 @@ char * desc;
desc+= rep->nRadioGroups*4;
}
if ((desc-start)!=(length)) {
- ErrorF("BOGUS LENGTH in write names, expected %d, got %d\n",
- length, desc-start);
+ ErrorF("BOGUS LENGTH in write names, expected %d, got %ld\n",
+ length, (unsigned long)(desc-start));
}
WriteToClient(client, SIZEOF(xkbGetNamesReply), (char *)rep);
WriteToClient(client, length, start);
@@ -3865,12 +3462,7 @@ char * desc;
}
int
-#if NeedFunctionPrototypes
ProcXkbGetNames(ClientPtr client)
-#else
-ProcXkbGetNames(client)
- ClientPtr client;
-#endif
{
DeviceIntPtr dev;
XkbDescPtr xkb;
@@ -3908,15 +3500,7 @@ ProcXkbGetNames(client)
/***====================================================================***/
static CARD32 *
-#if NeedFunctionPrototypes
_XkbCheckAtoms(CARD32 *wire,int nAtoms,int swapped,Atom *pError)
-#else
-_XkbCheckAtoms(wire,nAtoms,swapped,pError)
- CARD32 *wire;
- int nAtoms;
- int swapped;
- Atom *pError;
-#endif
{
register int i;
@@ -3934,17 +3518,8 @@ register int i;
}
static CARD32 *
-#if NeedFunctionPrototypes
_XkbCheckMaskedAtoms(CARD32 *wire,int nAtoms,CARD32 present,int swapped,
Atom *pError)
-#else
-_XkbCheckMaskedAtoms(wire,nAtoms,present,swapped,pError)
- CARD32 *wire;
- int nAtoms;
- CARD32 present;
- int swapped;
- Atom *pError;
-#endif
{
register unsigned i,bit;
@@ -3965,18 +3540,10 @@ register unsigned i,bit;
}
static Atom *
-#if NeedFunctionPrototypes
_XkbCopyMaskedAtoms( Atom *wire,
Atom *dest,
int nAtoms,
CARD32 present)
-#else
-_XkbCopyMaskedAtoms(wire,dest,nAtoms,present)
- Atom *wire;
- Atom *dest;
- int nAtoms;
- CARD32 present;
-#endif
{
register int i,bit;
@@ -3989,13 +3556,7 @@ register int i,bit;
}
static Bool
-#if NeedFunctionPrototypes
_XkbCheckTypeName(Atom name,int typeNdx)
-#else
-_XkbCheckTypeName(name,typeNdx)
- Atom name;
- int typeNdx;
-#endif
{
char * str;
@@ -4007,12 +3568,7 @@ char * str;
}
int
-#if NeedFunctionPrototypes
ProcXkbSetNames(ClientPtr client)
-#else
-ProcXkbSetNames(client)
- ClientPtr client;
-#endif
{
DeviceIntPtr dev;
XkbDescRec *xkb;
@@ -4357,14 +3913,7 @@ ProcXkbSetNames(client)
#define XkbSizeCountedString(s) ((s)?((((2+strlen(s))+3)/4)*4):4)
static char *
-#if NeedFunctionPrototypes
XkbWriteCountedString(char *wire,char *str,Bool swap)
-#else
-XkbWriteCountedString(wire,str,swap)
- char * wire;
- char * str;
- Bool swap;
-#endif
{
CARD16 len,*pLen;
@@ -4381,12 +3930,7 @@ CARD16 len,*pLen;
}
static int
-#if NeedFunctionPrototypes
XkbSizeGeomProperties(XkbGeometryPtr geom)
-#else
-XkbSizeGeomProperties(geom)
- XkbGeometryPtr geom;
-#endif
{
register int i,size;
XkbPropertyPtr prop;
@@ -4399,14 +3943,7 @@ XkbPropertyPtr prop;
}
static char *
-#if NeedFunctionPrototypes
XkbWriteGeomProperties(char *wire,XkbGeometryPtr geom,Bool swap)
-#else
-XkbWriteGeomProperties(wire,geom,swap)
- char * wire;
- XkbGeometryPtr geom;
- Bool swap;
-#endif
{
register int i;
register XkbPropertyPtr prop;
@@ -4419,25 +3956,13 @@ register XkbPropertyPtr prop;
}
static int
-#if NeedFunctionPrototypes
XkbSizeGeomKeyAliases(XkbGeometryPtr geom)
-#else
-XkbSizeGeomKeyAliases(geom)
- XkbGeometryPtr geom;
-#endif
{
return geom->num_key_aliases*(2*XkbKeyNameLength);
}
static char *
-#if NeedFunctionPrototypes
XkbWriteGeomKeyAliases(char *wire,XkbGeometryPtr geom,Bool swap)
-#else
-XkbWriteGeomKeyAliases(wire,geom,swap)
- char * wire;
- XkbGeometryPtr geom;
- Bool swap;
-#endif
{
register int sz;
@@ -4450,12 +3975,7 @@ register int sz;
}
static int
-#if NeedFunctionPrototypes
XkbSizeGeomColors(XkbGeometryPtr geom)
-#else
-XkbSizeGeomColors(geom)
- XkbGeometryPtr geom;
-#endif
{
register int i,size;
register XkbColorPtr color;
@@ -4467,14 +3987,7 @@ register XkbColorPtr color;
}
static char *
-#if NeedFunctionPrototypes
XkbWriteGeomColors(char *wire,XkbGeometryPtr geom,Bool swap)
-#else
-XkbWriteGeomColors(wire,geom,swap)
- char * wire;
- XkbGeometryPtr geom;
- Bool swap;
-#endif
{
register int i;
register XkbColorPtr color;
@@ -4486,12 +3999,7 @@ register XkbColorPtr color;
}
static int
-#if NeedFunctionPrototypes
XkbSizeGeomShapes(XkbGeometryPtr geom)
-#else
-XkbSizeGeomShapes(geom)
- XkbGeometryPtr geom;
-#endif
{
register int i,size;
register XkbShapePtr shape;
@@ -4509,14 +4017,7 @@ register XkbShapePtr shape;
}
static char *
-#if NeedFunctionPrototypes
XkbWriteGeomShapes(char *wire,XkbGeometryPtr geom,Bool swap)
-#else
-XkbWriteGeomShapes(wire,geom,swap)
- char * wire;
- XkbGeometryPtr geom;
- Bool swap;
-#endif
{
int i;
XkbShapePtr shape;
@@ -4565,13 +4066,7 @@ xkbShapeWireDesc * shapeWire;
}
static int
-#if NeedFunctionPrototypes
XkbSizeGeomDoodads(int num_doodads,XkbDoodadPtr doodad)
-#else
-XkbSizeGeomDoodads(num_doodads,doodad)
- int num_doodads;
- XkbDoodadPtr doodad;
-#endif
{
register int i,size;
@@ -4589,15 +4084,7 @@ register int i,size;
}
static char *
-#if NeedFunctionPrototypes
XkbWriteGeomDoodads(char *wire,int num_doodads,XkbDoodadPtr doodad,Bool swap)
-#else
-XkbWriteGeomDoodads(wire,num_doodads,doodad,swap)
- char * wire;
- int num_doodads;
- XkbDoodadPtr doodad;
- Bool swap;
-#endif
{
register int i;
xkbDoodadWireDesc * doodadWire;
@@ -4655,7 +4142,8 @@ xkbDoodadWireDesc * doodadWire;
wire= XkbWriteCountedString(wire,doodad->logo.logo_name,swap);
break;
default:
- ErrorF("Unknown doodad type %d in XkbWriteGeomDoodads\n");
+ ErrorF("Unknown doodad type %d in XkbWriteGeomDoodads\n",
+ doodad->any.type);
ErrorF("Ignored\n");
break;
}
@@ -4664,14 +4152,7 @@ xkbDoodadWireDesc * doodadWire;
}
static char *
-#if NeedFunctionPrototypes
XkbWriteGeomOverlay(char *wire,XkbOverlayPtr ol,Bool swap)
-#else
-XkbWriteGeomOverlay(wire,ol,swap)
- char * wire;
- XkbOverlayPtr ol;
- Bool swap;
-#endif
{
register int r;
XkbOverlayRowPtr row;
@@ -4705,12 +4186,7 @@ xkbOverlayWireDesc * olWire;
}
static int
-#if NeedFunctionPrototypes
XkbSizeGeomSections(XkbGeometryPtr geom)
-#else
-XkbSizeGeomSections(geom)
- XkbGeometryPtr geom;
-#endif
{
register int i,size;
XkbSectionPtr section;
@@ -4745,14 +4221,7 @@ XkbSectionPtr section;
}
static char *
-#if NeedFunctionPrototypes
XkbWriteGeomSections(char *wire,XkbGeometryPtr geom,Bool swap)
-#else
-XkbWriteGeomSections(wire,geom,swap)
- char * wire;
- XkbGeometryPtr geom;
- Bool swap;
-#endif
{
register int i;
XkbSectionPtr section;
@@ -4833,16 +4302,9 @@ xkbSectionWireDesc * sectionWire;
}
static Status
-#if NeedFunctionPrototypes
XkbComputeGetGeometryReplySize( XkbGeometryPtr geom,
xkbGetGeometryReply * rep,
Atom name)
-#else
-XkbComputeGetGeometryReplySize(geom,rep,name)
- XkbGeometryPtr geom;
- xkbGetGeometryReply * rep;
- Atom name;
-#endif
{
int len;
@@ -4882,18 +4344,10 @@ int len;
}
static int
-#if NeedFunctionPrototypes
XkbSendGeometry( ClientPtr client,
XkbGeometryPtr geom,
xkbGetGeometryReply * rep,
Bool freeGeom)
-#else
-XkbSendGeometry(client,geom,rep,freeGeom)
- ClientPtr client;
- XkbGeometryPtr geom;
- xkbGetGeometryReply *rep;
- Bool freeGeom;
-#endif
{
char *desc,*start;
int len;
@@ -4918,8 +4372,8 @@ XkbSendGeometry(client,geom,rep,freeGeom)
if ( rep->nKeyAliases>0 )
desc = XkbWriteGeomKeyAliases(desc,geom,client->swapped);
if ((desc-start)!=(len)) {
- ErrorF("BOGUS LENGTH in XkbSendGeometry, expected %d, got %d\n",
- len, desc-start);
+ ErrorF("BOGUS LENGTH in XkbSendGeometry, expected %d, got %ld\n",
+ len, (unsigned long)(desc-start));
}
}
else {
@@ -4951,12 +4405,7 @@ XkbSendGeometry(client,geom,rep,freeGeom)
}
int
-#if NeedFunctionPrototypes
ProcXkbGetGeometry(ClientPtr client)
-#else
-ProcXkbGetGeometry(client)
- ClientPtr client;
-#endif
{
DeviceIntPtr dev;
xkbGetGeometryReply rep;
@@ -4987,13 +4436,7 @@ ProcXkbGetGeometry(client)
/***====================================================================***/
static char *
-#if NeedFunctionPrototypes
_GetCountedString(char **wire_inout,Bool swap)
-#else
-_GetCountedString(wire_inout,swap)
- char ** wire_inout;
- Bool swap;
-#endif
{
char * wire,*str;
CARD16 len,*plen;
@@ -5016,18 +4459,10 @@ CARD16 len,*plen;
}
static Status
-#if NeedFunctionPrototypes
_CheckSetDoodad( char ** wire_inout,
XkbGeometryPtr geom,
XkbSectionPtr section,
ClientPtr client)
-#else
-_CheckSetDoodad(wire_inout,geom,section,client)
- char ** wire_inout;
- XkbGeometryPtr geom;
- XkbSectionPtr section;
- ClientPtr client;
-#endif
{
char * wire;
xkbDoodadWireDesc * dWire;
@@ -5128,18 +4563,10 @@ XkbDoodadPtr doodad;
}
static Status
-#if NeedFunctionPrototypes
_CheckSetOverlay( char ** wire_inout,
XkbGeometryPtr geom,
XkbSectionPtr section,
ClientPtr client)
-#else
-_CheckSetOverlay(wire_inout,geom,section,client)
- char ** wire_inout;
- XkbGeometryPtr geom;
- XkbSectionPtr section;
- ClientPtr client;
-#endif
{
register int r;
char * wire;
@@ -5184,18 +4611,10 @@ xkbOverlayRowWireDesc * rWire;
}
static Status
-#if NeedFunctionPrototypes
_CheckSetSections( XkbGeometryPtr geom,
xkbSetGeometryReq * req,
char ** wire_inout,
ClientPtr client)
-#else
-_CheckSetSections(geom,req,wire_inout,client)
- XkbGeometryPtr geom;
- xkbSetGeometryReq * req;
- char ** wire_inout;
- ClientPtr client;
-#endif
{
Status status;
register int s;
@@ -5294,18 +4713,10 @@ XkbSectionPtr section;
}
static Status
-#if NeedFunctionPrototypes
_CheckSetShapes( XkbGeometryPtr geom,
xkbSetGeometryReq * req,
char ** wire_inout,
ClientPtr client)
-#else
-_CheckSetShapes(geom,req,wire_inout,client)
- XkbGeometryPtr geom;
- xkbSetGeometryReq * req;
- char ** wire_inout;
- ClientPtr client;
-#endif
{
register int i;
char * wire;
@@ -5367,16 +4778,9 @@ char * wire;
}
static Status
-#if NeedFunctionPrototypes
_CheckSetGeom( XkbGeometryPtr geom,
xkbSetGeometryReq * req,
ClientPtr client)
-#else
-_CheckSetGeom(geom,req,client)
- XkbGeometryPtr geom;
- xkbSetGeometryReq * req;
- ClientPtr client;
-#endif
{
register int i;
Status status;
@@ -5445,12 +4849,7 @@ char * wire;
}
int
-#if NeedFunctionPrototypes
ProcXkbSetGeometry(ClientPtr client)
-#else
-ProcXkbSetGeometry(client)
- ClientPtr client;
-#endif
{
DeviceIntPtr dev;
XkbGeometryPtr geom,old;
@@ -5516,12 +4915,7 @@ ProcXkbSetGeometry(client)
/***====================================================================***/
int
-#if NeedFunctionPrototypes
ProcXkbPerClientFlags(ClientPtr client)
-#else
-ProcXkbPerClientFlags(client)
- ClientPtr client;
-#endif
{
DeviceIntPtr dev;
xkbPerClientFlagsReply rep;
@@ -5613,14 +5007,7 @@ static unsigned char componentExprLegal[] = {
};
static char *
-#if NeedFunctionPrototypes
GetComponentSpec(unsigned char **pWire,Bool allowExpr,int *errRtrn)
-#else
-GetComponentSpec(pWire,allowExpr,errRtrn)
- unsigned char ** pWire;
- Bool allowExpr;
- int * errRtrn;
-#endif
{
int len;
register int i;
@@ -5661,12 +5048,7 @@ unsigned char *wire,*str,*tmp,*legal;
/***====================================================================***/
int
-#if NeedFunctionPrototypes
ProcXkbListComponents(ClientPtr client)
-#else
-ProcXkbListComponents(client)
- ClientPtr client;
-#endif
{
DeviceIntPtr dev;
xkbListComponentsReply rep;
@@ -5743,12 +5125,7 @@ ProcXkbListComponents(client)
/***====================================================================***/
int
-#if NeedFunctionPrototypes
ProcXkbGetKbdByName(ClientPtr client)
-#else
-ProcXkbGetKbdByName(client)
- ClientPtr client;
-#endif
{
DeviceIntPtr dev;
XkbFileInfo finfo;
@@ -6077,16 +5454,9 @@ ProcXkbGetKbdByName(client)
/***====================================================================***/
static int
-#if NeedFunctionPrototypes
ComputeDeviceLedInfoSize( DeviceIntPtr dev,
unsigned int what,
XkbSrvLedInfoPtr sli)
-#else
-ComputeDeviceLedInfoSize(dev,what,sli)
- DeviceIntPtr dev;
- unsigned int what;
- XkbSrvLedInfoPtr sli;
-#endif
{
int nNames,nMaps;
register unsigned n,bit;
@@ -6113,20 +5483,11 @@ register unsigned n,bit;
}
static int
-#if NeedFunctionPrototypes
CheckDeviceLedFBs( DeviceIntPtr dev,
int class,
int id,
xkbGetDeviceInfoReply * rep,
ClientPtr client)
-#else
-CheckDeviceLedFBs(dev,class,id,rep,client)
- DeviceIntPtr dev;
- int class;
- int id;
- xkbGetDeviceInfoReply * rep;
- ClientPtr client;
-#endif
{
int nFBs= 0;
int length= 0;
@@ -6184,14 +5545,8 @@ Bool classOk;
}
static int
-#if NeedFunctionPrototypes
SendDeviceLedInfo( XkbSrvLedInfoPtr sli,
ClientPtr client)
-#else
-SendDeviceLedInfo(sli,client)
- XkbSrvLedInfoPtr sli;
- ClientPtr client;
-#endif
{
xkbDeviceLedsWireDesc wire;
int length;
@@ -6258,20 +5613,11 @@ int length;
}
static int
-#if NeedFunctionPrototypes
SendDeviceLedFBs( DeviceIntPtr dev,
int class,
int id,
unsigned wantLength,
ClientPtr client)
-#else
-SendDeviceLedFBs(dev,class,id,wantLength,client)
- DeviceIntPtr dev;
- int class;
- int id;
- unsigned wantLength;
- ClientPtr client;
-#endif
{
int length= 0;
@@ -6307,12 +5653,7 @@ int length= 0;
}
int
-#if NeedFunctionPrototypes
ProcXkbGetDeviceInfo(ClientPtr client)
-#else
-ProcXkbGetDeviceInfo(client)
- ClientPtr client;
-#endif
{
DeviceIntPtr dev;
xkbGetDeviceInfoReply rep;
@@ -6470,20 +5811,11 @@ char * str;
}
static char *
-#if NeedFunctionPrototypes
CheckSetDeviceIndicators( char * wire,
DeviceIntPtr dev,
int num,
int * status_rtrn,
ClientPtr client)
-#else
-CheckSetDeviceIndicators(wire,dev,num,status_rtrn,client)
- char * wire;
- DeviceIntPtr dev;
- int num;
- int * status_rtrn;
- ClientPtr client;
-#endif
{
xkbDeviceLedsWireDesc * ledWire;
int i;
@@ -6557,7 +5889,6 @@ XkbSrvLedInfoPtr sli;
}
static char *
-#if NeedFunctionPrototypes
SetDeviceIndicators( char * wire,
DeviceIntPtr dev,
unsigned changed,
@@ -6565,16 +5896,6 @@ SetDeviceIndicators( char * wire,
int * status_rtrn,
ClientPtr client,
xkbExtensionDeviceNotify *ev)
-#else
-SetDeviceIndicators(wire,dev,changed,num,status_rtrn,client,ev)
- char * wire;
- DeviceIntPtr dev;
- unsigned changed;
- int num;
- ClientPtr client;
- int * status_rtrn;
- xkbExtensionDeviceNotify *ev;
-#endif
{
xkbDeviceLedsWireDesc * ledWire;
int i;
@@ -6664,12 +5985,7 @@ DeviceIntPtr kbd;
}
int
-#if NeedFunctionPrototypes
ProcXkbSetDeviceInfo(ClientPtr client)
-#else
-ProcXkbSetDeviceInfo(client)
- ClientPtr client;
-#endif
{
DeviceIntPtr dev;
unsigned change;
@@ -6756,12 +6072,7 @@ xkbExtensionDeviceNotify ed;
/***====================================================================***/
int
-#if NeedFunctionPrototypes
ProcXkbSetDebuggingFlags(ClientPtr client)
-#else
-ProcXkbSetDebuggingFlags(client)
- ClientPtr client;
-#endif
{
CARD32 newFlags,newCtrls,extraLength;
xkbSetDebuggingFlagsReply rep;
@@ -6774,16 +6085,16 @@ xkbSetDebuggingFlagsReply rep;
newCtrls= xkbDebugCtrls&(~stuff->affectCtrls);
newCtrls|= (stuff->ctrls&stuff->affectCtrls);
if (xkbDebugFlags || newFlags || stuff->msgLength) {
- ErrorF("XkbDebug: Setting debug flags to 0x%x\n",newFlags);
+ ErrorF("XkbDebug: Setting debug flags to 0x%lx\n",(long)newFlags);
if (newCtrls!=xkbDebugCtrls)
- ErrorF("XkbDebug: Setting debug controls to 0x%x\n",newCtrls);
+ ErrorF("XkbDebug: Setting debug controls to 0x%lx\n",(long)newCtrls);
}
extraLength= (stuff->length<<2)-sz_xkbSetDebuggingFlagsReq;
if (stuff->msgLength>0) {
char *msg;
if (extraLength<XkbPaddedSize(stuff->msgLength)) {
- ErrorF("XkbDebug: msgLength= %d, length= %d (should be %d)\n",
- stuff->msgLength,extraLength,
+ ErrorF("XkbDebug: msgLength= %d, length= %ld (should be %d)\n",
+ stuff->msgLength,(long)extraLength,
XkbPaddedSize(stuff->msgLength));
return BadLength;
}
@@ -6821,12 +6132,7 @@ xkbSetDebuggingFlagsReply rep;
/***====================================================================***/
static int
-#if NeedFunctionPrototypes
ProcXkbDispatch (ClientPtr client)
-#else
-ProcXkbDispatch (client)
- ClientPtr client;
-#endif
{
REQUEST(xReq);
switch (stuff->data)
@@ -6889,13 +6195,7 @@ ProcXkbDispatch (client)
}
static int
-#if NeedFunctionPrototypes
XkbClientGone(pointer data,XID id)
-#else
-XkbClientGone(data,id)
- pointer data;
- XID id;
-#endif
{
DevicePtr pXDev = (DevicePtr)data;
@@ -6907,21 +6207,12 @@ XkbClientGone(data,id)
/*ARGSUSED*/
static void
-#if NeedFunctionPrototypes
XkbResetProc(ExtensionEntry *extEntry)
-#else
-XkbResetProc(extEntry)
- ExtensionEntry *extEntry;
-#endif
{
}
void
-#if NeedFunctionPrototypes
-XkbExtensionInit(void)
-#else
-XkbExtensionInit()
-#endif
+XkbExtensionInit(INITARGS)
{
ExtensionEntry *extEntry;
diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
index b83f8b626..096ebe2e4 100644
--- a/xkb/xkbAccessX.c
+++ b/xkb/xkbAccessX.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/xkbAccessX.c,v 1.9 2001/08/23 14:33:25 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/xkbAccessX.c,v 1.10 2003/11/17 22:20:46 dawes Exp $ */
#include <stdio.h>
#include <math.h>
@@ -57,13 +57,7 @@ unsigned int XkbDfltAccessXFeedback= XkbAccessXFeedbackMask;
unsigned short XkbDfltAccessXOptions= XkbAX_AllOptionsMask & ~(XkbAX_IndicatorFBMask|XkbAX_SKReleaseFBMask|XkbAX_SKRejectFBMask);
void
-#if NeedFunctionPrototypes
AccessXComputeCurveFactor(XkbSrvInfoPtr xkbi,XkbControlsPtr ctrls)
-#else
-AccessXComputeCurveFactor(xkbi,ctrls)
- XkbSrvInfoPtr xkbi;
- XkbControlsPtr ctrls;
-#endif
{
xkbi->mouseKeysCurve= 1.0+(((double)ctrls->mk_curve)*0.001);
xkbi->mouseKeysCurveFactor= ( ((double)ctrls->mk_max_speed)/
@@ -72,12 +66,7 @@ AccessXComputeCurveFactor(xkbi,ctrls)
}
void
-#if NeedFunctionPrototypes
AccessXInit(DeviceIntPtr keybd)
-#else
-AccessXInit(keybd)
- DeviceIntPtr keybd;
-#endif
{
XkbSrvInfoPtr xkbi = keybd->key->xkbInfo;
XkbControlsPtr ctrls = xkbi->desc->ctrls;
@@ -129,18 +118,10 @@ XkbControlsPtr ctrls = xkbi->desc->ctrls;
/* */
/************************************************************************/
static void
-#if NeedFunctionPrototypes
AccessXKeyboardEvent(DeviceIntPtr keybd,
BYTE type,
BYTE keyCode,
Bool isRepeat)
-#else
-AccessXKeyboardEvent(keybd,type,keyCode,isRepeat)
- DeviceIntPtr keybd;
- BYTE type;
- BYTE keyCode;
- Bool isRepeat;
-#endif
{
xEvent xE;
@@ -171,14 +152,7 @@ xEvent xE;
/* */
/************************************************************************/
static void
-#if NeedFunctionPrototypes
AccessXKRGTurnOn(DeviceIntPtr dev,CARD16 KRGControl,xkbControlsNotify *pCN)
-#else
-AccessXKRGTurnOn(dev,KRGControl,pCN)
- DeviceIntPtr dev;
- CARD16 KRGControl;
- xkbControlsNotify *pCN;
-#endif
{
XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
XkbControlsPtr ctrls = xkbi->desc->ctrls;
@@ -210,13 +184,7 @@ XkbSrvLedInfoPtr sli;
/* */
/************************************************************************/
static void
-#if NeedFunctionPrototypes
AccessXKRGTurnOff(DeviceIntPtr dev,xkbControlsNotify *pCN)
-#else
-AccessXKRGTurnOff(dev,pCN)
- DeviceIntPtr dev;
- xkbControlsNotify *pCN;
-#endif
{
XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
XkbControlsPtr ctrls = xkbi->desc->ctrls;
@@ -250,13 +218,7 @@ XkbSrvLedInfoPtr sli;
/* */
/************************************************************************/
static void
-#if NeedFunctionPrototypes
AccessXStickyKeysTurnOn(DeviceIntPtr dev,xkbControlsNotify *pCN)
-#else
-AccessXStickyKeysTurnOn(dev,pCN)
- DeviceIntPtr dev;
- xkbControlsNotify *pCN;
-#endif
{
XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
XkbControlsPtr ctrls = xkbi->desc->ctrls;
@@ -290,13 +252,7 @@ XkbSrvLedInfoPtr sli;
/* */
/************************************************************************/
static void
-#if NeedFunctionPrototypes
AccessXStickyKeysTurnOff(DeviceIntPtr dev,xkbControlsNotify *pCN)
-#else
-AccessXStickyKeysTurnOff(dev,pCN)
- DeviceIntPtr dev;
- xkbControlsNotify *pCN;
-#endif
{
XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
XkbControlsPtr ctrls = xkbi->desc->ctrls;
@@ -326,14 +282,7 @@ XkbSrvLedInfoPtr sli;
} /* AccessXStickyKeysTurnOff */
static CARD32
-#if NeedFunctionPrototypes
AccessXKRGExpire(OsTimerPtr timer,CARD32 now,pointer arg)
-#else
-AccessXKRGExpire(timer,now,arg)
- OsTimerPtr timer;
- CARD32 now;
- pointer arg;
-#endif
{
XkbSrvInfoPtr xkbi= ((DeviceIntPtr)arg)->key->xkbInfo;
xkbControlsNotify cn;
@@ -355,14 +304,7 @@ xkbControlsNotify cn;
}
static CARD32
-#if NeedFunctionPrototypes
AccessXRepeatKeyExpire(OsTimerPtr timer,CARD32 now,pointer arg)
-#else
-AccessXRepeatKeyExpire(timer,now,arg)
- OsTimerPtr timer;
- CARD32 now;
- pointer arg;
-#endif
{
XkbSrvInfoPtr xkbi= ((DeviceIntPtr)arg)->key->xkbInfo;
KeyCode key;
@@ -376,13 +318,7 @@ KeyCode key;
}
void
-#if NeedFunctionPrototypes
AccessXCancelRepeatKey(XkbSrvInfoPtr xkbi,KeyCode key)
-#else
-AccessXCancelRepeatKey(xkbi,key)
- XkbSrvInfoPtr xkbi;
- KeyCode key;
-#endif
{
if (xkbi->repeatKey==key)
xkbi->repeatKey= 0;
@@ -390,14 +326,7 @@ AccessXCancelRepeatKey(xkbi,key)
}
static CARD32
-#if NeedFunctionPrototypes
AccessXSlowKeyExpire(OsTimerPtr timer,CARD32 now,pointer arg)
-#else
-AccessXSlowKeyExpire(timer,now,arg)
- OsTimerPtr timer;
- CARD32 now;
- pointer arg;
-#endif
{
DeviceIntPtr keybd;
XkbSrvInfoPtr xkbi;
@@ -445,14 +374,7 @@ XkbControlsPtr ctrls;
}
static CARD32
-#if NeedFunctionPrototypes
AccessXBounceKeyExpire(OsTimerPtr timer,CARD32 now,pointer arg)
-#else
-AccessXBounceKeyExpire(timer,now,arg)
- OsTimerPtr timer;
- CARD32 now;
- pointer arg;
-#endif
{
XkbSrvInfoPtr xkbi= ((DeviceIntPtr)arg)->key->xkbInfo;
@@ -461,14 +383,7 @@ XkbSrvInfoPtr xkbi= ((DeviceIntPtr)arg)->key->xkbInfo;
}
static CARD32
-#if NeedFunctionPrototypes
AccessXTimeoutExpire(OsTimerPtr timer,CARD32 now,pointer arg)
-#else
-AccessXTimeoutExpire(timer,now,arg)
- OsTimerPtr timer;
- CARD32 now;
- pointer arg;
-#endif
{
DeviceIntPtr dev = (DeviceIntPtr)arg;
XkbSrvInfoPtr xkbi= dev->key->xkbInfo;
@@ -531,16 +446,9 @@ XkbSrvLedInfoPtr sli;
/* */
/************************************************************************/
Bool
-#if NeedFunctionPrototypes
AccessXFilterPressEvent( register xEvent * xE,
register DeviceIntPtr keybd,
int count)
-#else
-AccessXFilterPressEvent(xE,keybd,count)
- register xEvent *xE;
- register DeviceIntPtr keybd;
- int count;
-#endif
{
XkbSrvInfoPtr xkbi = keybd->key->xkbInfo;
XkbControlsPtr ctrls = xkbi->desc->ctrls;
@@ -673,16 +581,9 @@ KeySym * sym = XkbKeySymsPtr(xkbi->desc,key);
/* */
/************************************************************************/
Bool
-#if NeedFunctionPrototypes
AccessXFilterReleaseEvent( register xEvent * xE,
register DeviceIntPtr keybd,
int count)
-#else
-AccessXFilterReleaseEvent(xE,keybd,count)
- register xEvent *xE;
- register DeviceIntPtr keybd;
- int count;
-#endif
{
XkbSrvInfoPtr xkbi = keybd->key->xkbInfo;
XkbControlsPtr ctrls = xkbi->desc->ctrls;
@@ -788,16 +689,9 @@ Bool ignoreKeyEvent = FALSE;
/* */
/************************************************************************/
void
-#if NeedFunctionPrototypes
ProcessPointerEvent( register xEvent * xE,
register DeviceIntPtr mouse,
int count)
-#else
-ProcessPointerEvent(xE,mouse,count)
- register xEvent *xE;
- register DeviceIntPtr mouse;
- int count;
-#endif
{
DeviceIntPtr dev = (DeviceIntPtr)LookupKeyboardDevice();
XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 7f3c47ebc..403c2fb89 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/xkbActions.c,v 3.11 2003/02/13 15:36:48 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/xkbActions.c,v 3.14 2003/11/17 22:20:46 dawes Exp $ */
#include <stdio.h>
#include <math.h>
@@ -35,28 +35,21 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "misc.h"
#include "inputstr.h"
#include "XKBsrv.h"
+#include "xkb.h"
#include <ctype.h>
#ifdef XINPUT
extern void ProcessOtherEvent(
-#if NeedFunctionPrototypes
xEvent * /* xE */,
DeviceIntPtr /* dev */,
int /* count */
-#endif
);
#endif
/***====================================================================***/
static XkbAction
-#if NeedFunctionPrototypes
_FixUpAction(XkbDescPtr xkb,XkbAction *act)
-#else
-_FixUpAction(xkb,act)
- XkbDescPtr xkb;
- XkbAction * act;
-#endif
{
static XkbAction fake;
@@ -121,14 +114,7 @@ static XkbAction fake;
}
static XkbAction
-#if NeedFunctionPrototypes
XkbGetKeyAction(XkbSrvInfoPtr xkbi,XkbStatePtr xkbState,CARD8 key)
-#else
-XkbGetKeyAction(xkbi,xkbState,key)
- XkbSrvInfoPtr xkbi;
- XkbStatePtr xkbState;
- CARD8 key;
-#endif
{
int effectiveGroup;
int col;
@@ -187,14 +173,7 @@ static XkbAction fake;
}
XkbAction
-#if NeedFunctionPrototypes
XkbGetButtonAction(DeviceIntPtr kbd,DeviceIntPtr dev,int button)
-#else
-XkbGetButtonAction(kbd,dev,button)
- DeviceIntPtr kbd;
- DeviceIntPtr dev;
- int button;
-#endif
{
XkbAction fake;
if ((dev->button)&&(dev->button->xkb_acts)) {
@@ -221,29 +200,19 @@ typedef struct _XkbFilter {
CARD32 priv;
XkbAction upAction;
int (*filter)(
-#if NeedFunctionPrototypes
XkbSrvInfoPtr /* xkbi */,
struct _XkbFilter * /* filter */,
unsigned /* keycode */,
XkbAction * /* action */
-#endif
);
struct _XkbFilter *next;
} XkbFilterRec,*XkbFilterPtr;
static int
-#if NeedFunctionPrototypes
_XkbFilterSetState( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,
unsigned keycode,
XkbAction *pAction)
-#else
-_XkbFilterSetState(xkbi,filter,keycode,pAction)
- XkbSrvInfoPtr xkbi;
- XkbFilterPtr filter;
- unsigned keycode;
- XkbAction * pAction;
-#endif
{
if (filter->keycode==0) { /* initial press */
filter->keycode = keycode;
@@ -290,18 +259,10 @@ _XkbFilterSetState(xkbi,filter,keycode,pAction)
#define NO_LATCH 3
static int
-#if NeedFunctionPrototypes
_XkbFilterLatchState( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,
unsigned keycode,
XkbAction * pAction)
-#else
-_XkbFilterLatchState(xkbi,filter,keycode,pAction)
- XkbSrvInfoPtr xkbi;
- XkbFilterPtr filter;
- unsigned keycode;
- XkbAction * pAction;
-#endif
{
if (filter->keycode==0) { /* initial press */
@@ -406,18 +367,10 @@ _XkbFilterLatchState(xkbi,filter,keycode,pAction)
}
static int
-#if NeedFunctionPrototypes
_XkbFilterLockState( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,
unsigned keycode,
XkbAction * pAction)
-#else
-_XkbFilterLockState(xkbi,filter,keycode,pAction)
- XkbSrvInfoPtr xkbi;
- XkbFilterPtr filter;
- unsigned keycode;
- XkbAction * pAction;
-#endif
{
if (pAction&&(pAction->type==XkbSA_LockGroup)) {
@@ -447,18 +400,10 @@ _XkbFilterLockState(xkbi,filter,keycode,pAction)
#define NO_ISO_LOCK 1
static int
-#if NeedFunctionPrototypes
_XkbFilterISOLock( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,
unsigned keycode,
XkbAction * pAction)
-#else
-_XkbFilterISOLock(xkbi,filter,keycode,pAction)
- XkbSrvInfoPtr xkbi;
- XkbFilterPtr filter;
- unsigned keycode;
- XkbAction * pAction;
-#endif
{
if (filter->keycode==0) { /* initial press */
@@ -541,14 +486,7 @@ _XkbFilterISOLock(xkbi,filter,keycode,pAction)
static CARD32
-#if NeedFunctionPrototypes
_XkbPtrAccelExpire(OsTimerPtr timer,CARD32 now,pointer arg)
-#else
-_XkbPtrAccelExpire(timer,now,arg)
- OsTimerPtr timer;
- CARD32 now;
- pointer arg;
-#endif
{
XkbSrvInfoPtr xkbi= (XkbSrvInfoPtr)arg;
XkbControlsPtr ctrls= xkbi->desc->ctrls;
@@ -588,18 +526,10 @@ int dx,dy;
}
static int
-#if NeedFunctionPrototypes
_XkbFilterPointerMove( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,
unsigned keycode,
XkbAction * pAction)
-#else
-_XkbFilterPointerMove(xkbi,filter,keycode,pAction)
- XkbSrvInfoPtr xkbi;
- XkbFilterPtr filter;
- unsigned keycode;
- XkbAction * pAction;
-#endif
{
int x,y;
Bool accel;
@@ -639,18 +569,10 @@ Bool accel;
}
static int
-#if NeedFunctionPrototypes
_XkbFilterPointerBtn( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,
unsigned keycode,
XkbAction * pAction)
-#else
-_XkbFilterPointerBtn(xkbi,filter,keycode,pAction)
- XkbSrvInfoPtr xkbi;
- XkbFilterPtr filter;
- unsigned keycode;
- XkbAction * pAction;
-#endif
{
if (filter->keycode==0) { /* initial press */
int button= pAction->btn.button;
@@ -751,18 +673,10 @@ _XkbFilterPointerBtn(xkbi,filter,keycode,pAction)
}
static int
-#if NeedFunctionPrototypes
_XkbFilterControls( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,
unsigned keycode,
XkbAction * pAction)
-#else
-_XkbFilterControls(xkbi,filter,keycode,pAction)
- XkbSrvInfoPtr xkbi;
- XkbFilterPtr filter;
- unsigned keycode;
- XkbAction * pAction;
-#endif
{
XkbControlsRec old;
XkbControlsPtr ctrls;
@@ -846,18 +760,10 @@ XkbEventCauseRec cause;
}
static int
-#if NeedFunctionPrototypes
_XkbFilterActionMessage(XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,
unsigned keycode,
XkbAction * pAction)
-#else
-_XkbFilterActionMessage(xkbi,filter,keycode,pAction)
- XkbSrvInfoPtr xkbi;
- XkbFilterPtr filter;
- unsigned keycode;
- XkbAction * pAction;
-#endif
{
XkbMessageAction * pMsg;
DeviceIntPtr kbd;
@@ -906,18 +812,10 @@ DeviceIntPtr kbd;
}
static int
-#if NeedFunctionPrototypes
_XkbFilterRedirectKey( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,
unsigned keycode,
XkbAction * pAction)
-#else
-_XkbFilterRedirectKey(xkbi,filter,keycode,pAction)
- XkbSrvInfoPtr xkbi;
- XkbFilterPtr filter;
- unsigned keycode;
- XkbAction * pAction;
-#endif
{
unsigned realMods;
xEvent ev;
@@ -933,13 +831,6 @@ unsigned mods,mask,oldCoreState = 0,oldCorePrevState = 0;
ev.u.keyButtonPointer.rootX = x;
ev.u.keyButtonPointer.rootY = y;
- mask= XkbSARedirectVModsMask(&pAction->redirect);
- mods= XkbSARedirectVMods(&pAction->redirect);
- if (mask) XkbVirtualModsToReal(xkbi->desc,mask,&mask);
- if (mods) XkbVirtualModsToReal(xkbi->desc,mods,&mods);
- mask|= pAction->redirect.mods_mask;
- mods|= pAction->redirect.mods;
-
if (filter->keycode==0) { /* initial press */
if ((pAction->redirect.new_key<xkbi->desc->min_key_code)||
(pAction->redirect.new_key>xkbi->desc->max_key_code)) {
@@ -955,6 +846,13 @@ unsigned mods,mask,oldCoreState = 0,oldCorePrevState = 0;
ev.u.u.type = KeyPress;
ev.u.u.detail = pAction->redirect.new_key;
+ mask= XkbSARedirectVModsMask(&pAction->redirect);
+ mods= XkbSARedirectVMods(&pAction->redirect);
+ if (mask) XkbVirtualModsToReal(xkbi->desc,mask,&mask);
+ if (mods) XkbVirtualModsToReal(xkbi->desc,mods,&mods);
+ mask|= pAction->redirect.mods_mask;
+ mods|= pAction->redirect.mods;
+
if ( mask || mods ) {
old= xkbi->state;
oldCoreState= xkbi->device->key->state;
@@ -986,6 +884,13 @@ unsigned mods,mask,oldCoreState = 0,oldCorePrevState = 0;
ev.u.u.type = KeyRelease;
ev.u.u.detail = filter->upAction.redirect.new_key;
+ mask= XkbSARedirectVModsMask(&filter->upAction.redirect);
+ mods= XkbSARedirectVMods(&filter->upAction.redirect);
+ if (mask) XkbVirtualModsToReal(xkbi->desc,mask,&mask);
+ if (mods) XkbVirtualModsToReal(xkbi->desc,mods,&mods);
+ mask|= filter->upAction.redirect.mods_mask;
+ mods|= filter->upAction.redirect.mods;
+
if ( mask || mods ) {
old= xkbi->state;
oldCoreState= xkbi->device->key->state;
@@ -1015,22 +920,14 @@ unsigned mods,mask,oldCoreState = 0,oldCorePrevState = 0;
filter->keycode= 0;
filter->active= 0;
}
- return 1;
+ return 0;
}
static int
-#if NeedFunctionPrototypes
_XkbFilterSwitchScreen( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,
unsigned keycode,
XkbAction * pAction)
-#else
-_XkbFilterSwitchScreen(xkbi,filter,keycode,pAction)
- XkbSrvInfoPtr xkbi;
- XkbFilterPtr filter;
- unsigned keycode;
- XkbAction * pAction;
-#endif
{
if (filter->keycode==0) { /* initial press */
DeviceIntPtr dev = xkbi->device;
@@ -1051,18 +948,10 @@ _XkbFilterSwitchScreen(xkbi,filter,keycode,pAction)
#ifdef XFree86Server
static int
-#if NeedFunctionPrototypes
_XkbFilterXF86Private( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,
unsigned keycode,
XkbAction * pAction)
-#else
-_XkbFilterXF86Private(xkbi,filter,keycode,pAction)
- XkbSrvInfoPtr xkbi;
- XkbFilterPtr filter;
- unsigned keycode;
- XkbAction * pAction;
-#endif
{
if (filter->keycode==0) { /* initial press */
DeviceIntPtr dev = xkbi->device;
@@ -1084,18 +973,10 @@ _XkbFilterXF86Private(xkbi,filter,keycode,pAction)
#ifdef XINPUT
static int
-#if NeedFunctionPrototypes
_XkbFilterDeviceBtn( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,
unsigned keycode,
XkbAction * pAction)
-#else
-_XkbFilterDeviceBtn(xkbi,filter,keycode,pAction)
- XkbSrvInfoPtr xkbi;
- XkbFilterPtr filter;
- unsigned keycode;
- XkbAction * pAction;
-#endif
{
DeviceIntPtr dev;
int button;
@@ -1168,9 +1049,7 @@ static XkbFilterPtr filters = NULL;
static XkbFilterPtr
_XkbNextFreeFilter(
-#if NeedFunctionPrototypes
void
-#endif
)
{
register int i;
@@ -1194,14 +1073,7 @@ register int i;
}
static int
-#if NeedFunctionPrototypes
_XkbApplyFilters(XkbSrvInfoPtr xkbi,unsigned kc,XkbAction *pAction)
-#else
-_XkbApplyFilters(xkbi,kc,pAction)
- XkbSrvInfoPtr xkbi;
- unsigned kc;
- XkbAction * pAction;
-#endif
{
register int i,send;
@@ -1214,15 +1086,7 @@ register int i,send;
}
void
-#if NeedFunctionPrototypes
XkbHandleActions(DeviceIntPtr dev,DeviceIntPtr kbd,xEvent *xE,int count)
-#else
-XkbHandleActions(dev,kbd,xE,count)
- DeviceIntPtr dev;
- DeviceIntPtr kbd;
- xEvent * xE;
- int count;
-#endif
{
int key,bit,i;
CARD8 realMods;
@@ -1414,14 +1278,7 @@ Bool xiEvent;
}
int
-#if NeedFunctionPrototypes
XkbLatchModifiers(DeviceIntPtr pXDev,CARD8 mask,CARD8 latches)
-#else
-XkbLatchModifiers(pXDev,mask,latches)
- DeviceIntPtr pXDev;
- CARD8 mask;
- CARD8 latches;
-#endif
{
XkbSrvInfoPtr xkbi;
XkbFilterPtr filter;
@@ -1448,13 +1305,7 @@ unsigned clear;
}
int
-#if NeedFunctionPrototypes
XkbLatchGroup(DeviceIntPtr pXDev,int group)
-#else
-XkbLatchGroup(pXDev,group)
- DeviceIntPtr pXDev;
- int group;
-#endif
{
XkbSrvInfoPtr xkbi;
XkbFilterPtr filter;
@@ -1476,18 +1327,10 @@ XkbAction act;
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbClearAllLatchesAndLocks( DeviceIntPtr dev,
XkbSrvInfoPtr xkbi,
Bool genEv,
XkbEventCausePtr cause)
-#else
-XkbClearAllLatchesAndLocks(dev,xkbi,genEv,cause)
- DeviceIntPtr dev;
- XkbSrvInfoPtr xkbi;
- Bool genEv;
- XkbEventCausePtr cause;
-#endif
{
XkbStateRec os;
xkbStateNotify sn;
diff --git a/xkb/xkbDflts.h b/xkb/xkbDflts.h
index 417478ef4..910616e60 100644
--- a/xkb/xkbDflts.h
+++ b/xkb/xkbDflts.h
@@ -1,5 +1,5 @@
/* $Xorg: xkbDflts.h,v 1.3 2000/08/17 19:53:47 cpqbld Exp $ */
-/* $XFree86: xc/programs/Xserver/xkb/xkbDflts.h,v 1.2 2001/10/28 03:34:20 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/xkbDflts.h,v 1.3 2003/11/17 22:20:46 dawes Exp $ */
/* This file generated automatically by xkbcomp */
/* DO NOT EDIT */
#ifndef DEFAULT_H
@@ -137,12 +137,7 @@ static XkbKeyTypeRec dflt_types[]= {
static void
-#if NeedFunctionPrototypes
initTypeNames(DPYTYPE dpy)
-#else
-initTypeNames(dpy)
-DPYTYPE dpy;
-#endif
{
dflt_types[0].name= GET_ATOM(dpy,"ONE_LEVEL");
lnames_ONE_LEVEL[0]= GET_ATOM(dpy,"Any");
@@ -502,13 +497,7 @@ static XkbIndicatorRec indicators= {
}
};
static void
-#if NeedFunctionPrototypes
initIndicatorNames(DPYTYPE dpy,XkbDescPtr xkb)
-#else
-initIndicatorNames(dpy,xkb)
- DPYTYPE dpy;
- XkbDescPtr xkb;
-#endif
{
xkb->names->indicators[ 0]= GET_ATOM(dpy,"Caps Lock");
xkb->names->indicators[ 1]= GET_ATOM(dpy,"Num Lock");
diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c
index 291674fcf..0cd1becac 100644
--- a/xkb/xkbEvents.c
+++ b/xkb/xkbEvents.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/xkbEvents.c,v 3.10 2001/10/28 03:34:20 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/xkbEvents.c,v 3.12 2003/11/17 22:20:46 dawes Exp $ */
#include <stdio.h>
#define NEED_EVENTS 1
@@ -35,17 +35,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "inputstr.h"
#include "windowstr.h"
#include "XKBsrv.h"
+#include "xkb.h"
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbSendNewKeyboardNotify(DeviceIntPtr kbd,xkbNewKeyboardNotify *pNKN)
-#else
-XkbSendNewKeyboardNotify(kbd,pNKN)
- DeviceIntPtr kbd;
- xkbNewKeyboardNotify * pNKN;
-#endif
{
register int i;
Time time;
@@ -102,13 +97,7 @@ CARD16 changed;
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbSendStateNotify(DeviceIntPtr kbd,xkbStateNotify *pSN)
-#else
-XkbSendStateNotify(kbd,pSN)
- DeviceIntPtr kbd;
- xkbStateNotify *pSN;
-#endif
{
XkbSrvInfoPtr xkbi;
XkbStatePtr state;
@@ -169,13 +158,7 @@ register CARD16 changed,bState;
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbSendMapNotify(DeviceIntPtr kbd,xkbMapNotify *pMN)
-#else
-XkbSendMapNotify(kbd,pMN)
- DeviceIntPtr kbd;
- xkbMapNotify *pMN;
-#endif
{
int i;
XkbSrvInfoPtr xkbi;
@@ -217,20 +200,11 @@ CARD16 changed;
}
int
-#if NeedFunctionPrototypes
XkbComputeControlsNotify( DeviceIntPtr kbd,
XkbControlsPtr old,
XkbControlsPtr new,
xkbControlsNotify * pCN,
Bool forceCtrlProc)
-#else
-XkbComputeControlsNotify(kbd,old,new,pCN,forceCtrlProc)
- DeviceIntPtr kbd;
- XkbControlsPtr old;
- XkbControlsPtr new;
- xkbControlsNotify *pCN;
- Bool forceCtrlProc;
-#endif
{
int i;
CARD32 changedControls;
@@ -301,13 +275,7 @@ CARD32 changedControls;
}
void
-#if NeedFunctionPrototypes
XkbSendControlsNotify(DeviceIntPtr kbd,xkbControlsNotify *pCN)
-#else
-XkbSendControlsNotify(kbd,pCN)
- DeviceIntPtr kbd;
- xkbControlsNotify *pCN;
-#endif
{
int initialized;
CARD32 changedControls, enabledControls, enabledChanges = 0;
@@ -358,14 +326,7 @@ Time time = 0;
}
void
-#if NeedFunctionPrototypes
XkbSendIndicatorNotify(DeviceIntPtr kbd,int xkbType,xkbIndicatorNotify *pEv)
-#else
-XkbSendIndicatorNotify(kbd,xkbType,pEv)
- DeviceIntPtr kbd;
- int xkbType;
- xkbIndicatorNotify *pEv;
-#endif
{
int initialized;
XkbInterestPtr interest;
@@ -414,7 +375,6 @@ CARD32 state,changed;
void
-#if NeedFunctionPrototypes
XkbHandleBell( BOOL force,
BOOL eventOnly,
DeviceIntPtr kbd,
@@ -424,18 +384,6 @@ XkbHandleBell( BOOL force,
Atom name,
WindowPtr pWin,
ClientPtr pClient)
-#else
-XkbHandleBell(force,eventOnly,kbd,percent,pCtrl,class,name,pWin,pClient)
- BOOL force;
- BOOL eventOnly;
- DeviceIntPtr kbd;
- CARD8 percent;
- pointer *pCtrl;
- CARD8 class;
- Atom name;
- WindowPtr pWin;
- ClientPtr pClient;
-#endif
{
xkbBellNotify bn;
int initialized;
@@ -511,13 +459,7 @@ XID winID = 0;
}
void
-#if NeedFunctionPrototypes
XkbSendAccessXNotify(DeviceIntPtr kbd,xkbAccessXNotify *pEv)
-#else
-XkbSendAccessXNotify(kbd,pEv)
- DeviceIntPtr kbd;
- xkbAccessXNotify *pEv;
-#endif
{
int initialized;
XkbInterestPtr interest;
@@ -562,13 +504,7 @@ CARD16 sk_delay,db_delay;
}
void
-#if NeedFunctionPrototypes
XkbSendNamesNotify(DeviceIntPtr kbd,xkbNamesNotify *pEv)
-#else
-XkbSendNamesNotify(kbd,pEv)
- DeviceIntPtr kbd;
- xkbNamesNotify *pEv;
-#endif
{
int initialized;
XkbInterestPtr interest;
@@ -617,13 +553,7 @@ CARD32 changedIndicators;
}
void
-#if NeedFunctionPrototypes
XkbSendCompatMapNotify(DeviceIntPtr kbd,xkbCompatMapNotify *pEv)
-#else
-XkbSendCompatMapNotify(kbd,pEv)
- DeviceIntPtr kbd;
- xkbCompatMapNotify *pEv;
-#endif
{
int initialized;
XkbInterestPtr interest;
@@ -671,13 +601,7 @@ CARD16 firstSI = 0, nSI = 0, nTotalSI = 0;
}
void
-#if NeedFunctionPrototypes
XkbSendActionMessage(DeviceIntPtr kbd,xkbActionMessage *pEv)
-#else
-XkbSendActionMessage(kbd,pEv)
- DeviceIntPtr kbd;
- xkbActionMessage * pEv;
-#endif
{
int initialized;
XkbSrvInfoPtr xkbi;
@@ -720,16 +644,9 @@ Time time = 0;
}
void
-#if NeedFunctionPrototypes
XkbSendExtensionDeviceNotify( DeviceIntPtr dev,
ClientPtr client,
xkbExtensionDeviceNotify * pEv)
-#else
-XkbSendExtensionDeviceNotify(dev,client,pEv)
- DeviceIntPtr dev;
- ClientPtr client;
- xkbExtensionDeviceNotify * pEv;
-#endif
{
int initialized;
XkbInterestPtr interest;
@@ -791,16 +708,9 @@ CARD16 reason, supported = 0;
}
void
-#if NeedFunctionPrototypes
XkbSendNotification( DeviceIntPtr kbd,
XkbChangesPtr pChanges,
XkbEventCausePtr cause)
-#else
-XkbSendNotification(kbd,pChanges,cause)
- DeviceIntPtr kbd;
- XkbChangesPtr pChanges;
- XkbEventCausePtr cause;
-#endif
{
XkbSrvLedInfoPtr sli;
@@ -887,14 +797,7 @@ XkbSrvLedInfoPtr sli;
/***====================================================================***/
Bool
-#if NeedFunctionPrototypes
XkbFilterEvents(ClientPtr pClient,int nEvents,xEvent *xE)
-#else
-XkbFilterEvents(pClient,nEvents,xE)
- ClientPtr pClient;
- int nEvents;
- xEvent *xE;
-#endif
{
int i, button_mask;
DeviceIntPtr pXDev = (DeviceIntPtr)LookupKeyboardDevice();
@@ -1011,13 +914,7 @@ XkbSrvInfoPtr xkbi;
/***====================================================================***/
XkbInterestPtr
-#if NeedFunctionPrototypes
XkbFindClientResource(DevicePtr inDev,ClientPtr client)
-#else
-XkbFindClientResource(inDev,client)
- DevicePtr inDev;
- ClientPtr client;
-#endif
{
DeviceIntPtr dev = (DeviceIntPtr)inDev;
XkbInterestPtr interest;
@@ -1035,14 +932,7 @@ XkbInterestPtr interest;
}
XkbInterestPtr
-#if NeedFunctionPrototypes
XkbAddClientResource(DevicePtr inDev,ClientPtr client,XID id)
-#else
-XkbAddClientResource(inDev,client,id)
- DevicePtr inDev;
- ClientPtr client;
- XID id;
-#endif
{
DeviceIntPtr dev = (DeviceIntPtr)inDev;
XkbInterestPtr interest;
@@ -1076,13 +966,7 @@ XkbInterestPtr interest;
}
int
-#if NeedFunctionPrototypes
XkbRemoveClient(DevicePtr inDev,ClientPtr client)
-#else
-XkbRemoveClient(inDev,client)
-DevicePtr inDev;
-ClientPtr client;
-#endif
{
XkbSrvInfoPtr xkbi;
DeviceIntPtr dev = (DeviceIntPtr)inDev;
@@ -1124,13 +1008,7 @@ Bool found;
}
int
-#if NeedFunctionPrototypes
XkbRemoveResourceClient(DevicePtr inDev,XID id)
-#else
-XkbRemoveResourceClient(inDev,id)
- DevicePtr inDev;
- XID id;
-#endif
{
XkbSrvInfoPtr xkbi;
DeviceIntPtr dev = (DeviceIntPtr)inDev;
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 5074b8bfb..064311d5e 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/xkbInit.c,v 3.26.2.1 2003/03/17 23:53:14 paulo Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/xkbInit.c,v 3.32 2003/11/17 22:20:46 dawes Exp $ */
#include <stdio.h>
#include <stdlib.h>
@@ -45,7 +45,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "XKBgeom.h"
#include <X11/extensions/XKMformat.h>
#include <X11/extensions/XKBfile.h>
-
+#include "xkb.h"
#define CREATE_ATOM(s) MakeAtom(s,sizeof(s)-1,1)
@@ -141,12 +141,7 @@ Bool XkbWantRulesProp= XKB_DFLT_RULES_PROP;
/***====================================================================***/
char *
-#if NeedFunctionPrototypes
XkbGetRulesDflts(XkbRF_VarDefsPtr defs)
-#else
-XkbGetRulesDflts(defs)
- XkbRF_VarDefsPtr defs;
-#endif
{
if (XkbModelDflt) defs->model= XkbModelDflt;
else defs->model= XKB_DFLT_KB_MODEL;
@@ -160,13 +155,7 @@ XkbGetRulesDflts(defs)
}
Bool
-#if NeedFunctionPrototypes
XkbWriteRulesProp(ClientPtr client, pointer closure)
-#else
-XkbWriteRulesProp(client, closure)
- ClientPtr client;
- pointer closure;
-#endif
{
int len,out;
Atom name;
@@ -232,12 +221,7 @@ char * pval;
}
void
-#if NeedFunctionPrototypes
XkbSetRulesUsed(XkbRF_VarDefsPtr defs)
-#else
-XkbSetRulesUsed(defs)
- XkbRF_VarDefsPtr defs;
-#endif
{
if (XkbModelUsed)
_XkbFree(XkbModelUsed);
@@ -257,17 +241,8 @@ XkbSetRulesUsed(defs)
}
void
-#if NeedFunctionPrototypes
XkbSetRulesDflts(char *rulesFile,char *model,char *layout,
char *variant,char *options)
-#else
-XkbSetRulesDflts(rulesFile,model,layout,variant,options)
- char * rulesFile;
- char * model;
- char * layout;
- char * variant;
- char * options;
-#endif
{
if (XkbRulesFile)
_XkbFree(XkbRulesFile);
@@ -308,13 +283,7 @@ XkbSetRulesDflts(rulesFile,model,layout,variant,options)
pointer xkbBogus = &indicators;
static Bool
-#if NeedFunctionPrototypes
XkbInitKeyTypes(XkbDescPtr xkb,SrvXkmInfo *file)
-#else
-XkbInitKeyTypes(xkb,file)
- XkbDescPtr xkb;
- SrvXkmInfo * file;
-#endif
{
if (file->xkbinfo.defined&XkmTypesMask)
return True;
@@ -330,13 +299,7 @@ XkbInitKeyTypes(xkb,file)
}
static void
-#if NeedFunctionPrototypes
XkbInitRadioGroups(XkbSrvInfoPtr xkbi,SrvXkmInfo *file)
-#else
-XkbInitRadioGroups(xkbi,file)
- XkbSrvInfoPtr xkbi;
- SrvXkmInfo * file;
-#endif
{
xkbi->nRadioGroups = 0;
xkbi->radioGroups = NULL;
@@ -345,13 +308,7 @@ XkbInitRadioGroups(xkbi,file)
static Status
-#if NeedFunctionPrototypes
XkbInitCompatStructs(XkbDescPtr xkb,SrvXkmInfo *file)
-#else
-XkbInitCompatStructs(xkb,file)
- XkbDescPtr xkb;
- SrvXkmInfo * file;
-#endif
{
register int i;
XkbCompatMapPtr compat;
@@ -378,13 +335,7 @@ XkbCompatMapPtr compat;
}
static void
-#if NeedFunctionPrototypes
XkbInitSemantics(XkbDescPtr xkb,SrvXkmInfo *file)
-#else
-XkbInitSemantics(xkb,file)
- XkbDescPtr xkb;
- SrvXkmInfo * file;
-#endif
{
XkbInitKeyTypes(xkb,file);
XkbInitCompatStructs(xkb,file);
@@ -394,13 +345,7 @@ XkbInitSemantics(xkb,file)
/***====================================================================***/
static Status
-#if NeedFunctionPrototypes
XkbInitNames(XkbSrvInfoPtr xkbi,SrvXkmInfo *file)
-#else
-XkbInitNames(xkbi,file)
- XkbSrvInfoPtr xkbi;
- SrvXkmInfo * file;
-#endif
{
XkbDescPtr xkb;
XkbNamesPtr names;
@@ -457,13 +402,7 @@ Atom unknown;
}
static Status
-#if NeedFunctionPrototypes
XkbInitIndicatorMap(XkbSrvInfoPtr xkbi,SrvXkmInfo *file)
-#else
-XkbInitIndicatorMap(xkbi,file)
- XkbSrvInfoPtr xkbi;
- SrvXkmInfo * file;
-#endif
{
XkbDescPtr xkb;
XkbIndicatorPtr map;
@@ -500,14 +439,7 @@ XkbSrvLedInfoPtr sli;
}
static Status
-#if NeedFunctionPrototypes
XkbInitControls(DeviceIntPtr pXDev,XkbSrvInfoPtr xkbi,SrvXkmInfo *file)
-#else
-XkbInitControls(pXDev,xkbi,file)
- DeviceIntPtr pXDev;
- XkbSrvInfoPtr xkbi;
- SrvXkmInfo * file;
-#endif
{
XkbDescPtr xkb;
XkbControlsPtr ctrls;
@@ -536,12 +468,7 @@ XkbControlsPtr ctrls;
}
void
-#if NeedFunctionPrototypes
XkbInitDevice(DeviceIntPtr pXDev)
-#else
-XkbInitDevice(pXDev)
- DeviceIntPtr pXDev;
-#endif
{
int i;
XkbSrvInfoPtr xkbi;
@@ -558,10 +485,11 @@ XkbEventCauseRec cause;
if ((file.file=XkbDDXOpenConfigFile(XkbInitialMap,NULL,0))!=NULL) {
XkmReadFile(file.file,0,XkmKeymapLegal,&file.xkbinfo);
if (file.xkbinfo.xkb==NULL) {
- ErrorF("Error loading keymap file %s (%s in %s)\n",
+ LogMessage(X_ERROR,
+ "Error loading keymap file %s (%s in %s)\n"
+ "\treverting to defaults\n",
XkbInitialMap, _XkbErrMessages[_XkbErrCode],
(_XkbErrLocation?_XkbErrLocation:"unknown"));
- ErrorF(" reverting to defaults\n");
fclose(file.file);
file.file= NULL;
bzero(&file.xkbinfo,sizeof(XkbFileInfo));
@@ -578,8 +506,8 @@ XkbEventCauseRec cause;
}
}
else {
- ErrorF("Error opening keymap file %s, reverting to defaults\n",
- XkbInitialMap);
+ LogMessage(X_ERROR, "Error opening keymap file %s, reverting to defaults\n",
+ XkbInitialMap);
}
}
pXDev->key->xkbInfo= xkbi= _XkbTypedCalloc(1,XkbSrvInfoRec);
@@ -667,22 +595,19 @@ XkbEventCauseRec cause;
#endif
Bool
-#if NeedFunctionPrototypes
-XkbInitKeyboardDeviceStruct( DeviceIntPtr dev,
- XkbComponentNamesPtr names,
- KeySymsPtr pSymsIn,
- CARD8 pModsIn[],
- void (*bellProc)(),
- void (*ctrlProc)())
-#else
-XkbInitKeyboardDeviceStruct( dev,names,pSymsIn,pModsIn,bellProc,ctrlProc )
- DeviceIntPtr dev;
- XkbComponentNamesPtr names;
- KeySymsPtr pSymsIn;
- CARD8 pModsIn[];
- void (*bellProc)();
- void (*ctrlProc)();
-#endif
+XkbInitKeyboardDeviceStruct(
+ DeviceIntPtr dev,
+ XkbComponentNamesPtr names,
+ KeySymsPtr pSymsIn,
+ CARD8 pModsIn[],
+ void (*bellProc)(
+ int /*percent*/,
+ DeviceIntPtr /*device*/,
+ pointer /*ctrl*/,
+ int),
+ void (*ctrlProc)(
+ DeviceIntPtr /*device*/,
+ KeybdCtrl * /*ctrl*/))
{
XkbFileInfo finfo;
KeySymsRec tmpSyms,*pSyms;
@@ -826,7 +751,7 @@ XkbRF_VarDefsRec defs;
_XkbInitFileInfo= &finfo;
}
else {
- ErrorF("Couldn't load XKB keymap, falling back to pre-XKB keymap\n");
+ LogMessage(X_ERROR, "Couldn't load XKB keymap, falling back to pre-XKB keymap\n");
}
ok= InitKeyboardDeviceStruct((DevicePtr)dev,pSyms,pMods,bellProc,ctrlProc);
if ((config!=NULL)&&(dev && dev->key && dev->key->xkbInfo))
@@ -873,12 +798,7 @@ XkbRF_VarDefsRec defs;
* default indicator feedback.
*/
int
-#if NeedFunctionPrototypes
XkbFinishDeviceInit(DeviceIntPtr pXDev)
-#else
-XkbFinishDeviceInit(pXDev)
- DeviceIntPtr pXDev;
-#endif
{
XkbSrvInfoPtr xkbi;
XkbDescPtr xkb;
@@ -920,12 +840,7 @@ XkbSrvLedInfoPtr sli;
* is part of this larger block.
*/
void
-#if NeedFunctionPrototypes
XkbFreeInfo(XkbSrvInfoPtr xkbi)
-#else
-XkbFreeInfo(xkbi)
- XkbSrvInfoPtr xkbi;
-#endif
{
if (xkbi->radioGroups) {
_XkbFree(xkbi->radioGroups);
@@ -975,14 +890,7 @@ extern unsigned int XkbDfltAccessXFeedback;
extern unsigned char XkbDfltAccessXOptions;
int
-#if NeedFunctionPrototypes
XkbProcessArguments(int argc,char *argv[],int i)
-#else
-XkbProcessArguments(argc,argv,i)
- int argc;
- char * argv[];
- int i;
-#endif
{
if (strcmp(argv[i],"-kb")==0) {
noXkbExtension= True;
@@ -996,7 +904,7 @@ XkbProcessArguments(argc,argv,i)
if(++i < argc) {
#if !defined(WIN32) && !defined(__UNIXOS2__) && !defined(__CYGWIN__)
if (getuid() != geteuid()) {
- ErrorF("-xkbdir is not available for setuid X servers\n");
+ LogMessage(X_WARNING, "-xkbdir is not available for setuid X servers\n");
return -1;
} else
#endif
@@ -1005,7 +913,7 @@ XkbProcessArguments(argc,argv,i)
XkbBaseDirectory= argv[i];
return 2;
} else {
- ErrorF("-xkbdir pathname too long\n");
+ LogMessage(X_ERROR, "-xkbdir pathname too long\n");
return -1;
}
}
@@ -1020,7 +928,7 @@ XkbProcessArguments(argc,argv,i)
XkbInitialMap= argv[i];
return 2;
} else {
- ErrorF("-xkbmap pathname too long\n");
+ LogMessage(X_ERROR, "-xkbmap pathname too long\n");
return -1;
}
}
@@ -1034,7 +942,7 @@ XkbProcessArguments(argc,argv,i)
XkbDB= argv[i];
return 2;
} else {
- ErrorF("-xkbdb pathname too long\n");
+ LogMessage(X_ERROR, "-xkbdb pathname too long\n");
return -1;
}
}
@@ -1098,11 +1006,7 @@ XkbProcessArguments(argc,argv,i)
}
void
-#if NeedFunctionPrototypes
XkbUseMsg(void)
-#else
-XkbUseMsg()
-#endif
{
ErrorF("The X Keyboard Extension adds the following arguments:\n");
ErrorF("-kb disable the X Keyboard Extension\n");
diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c
index 33cf7bd9e..f75db6918 100644
--- a/xkb/xkbLEDs.c
+++ b/xkb/xkbLEDs.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/xkbLEDs.c,v 3.6 2001/11/23 19:21:36 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/xkbLEDs.c,v 3.8 2003/11/17 22:20:46 dawes Exp $ */
#include <stdio.h>
#include <ctype.h>
@@ -37,6 +37,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "XI.h"
#include "XKBsrv.h"
+#include "xkb.h"
/***====================================================================***/
@@ -51,16 +52,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
unsigned
-#if NeedFunctionPrototypes
XkbIndicatorsToUpdate( DeviceIntPtr dev,
unsigned long state_changes,
Bool enable_changes)
-#else
-XkbIndicatorsToUpdate(dev,state_changes,enable_changes)
- DeviceIntPtr dev;
- unsigned long state_changes;
- Bool enable_changes;
-#endif
{
register unsigned update= 0;
XkbSrvLedInfoPtr sli;
@@ -96,18 +90,10 @@ XkbSrvLedInfoPtr sli;
* extent of the changes is reported in change, which must be defined.
*/
Bool
-#if NeedFunctionPrototypes
XkbApplyLEDChangeToKeyboard( XkbSrvInfoPtr xkbi,
XkbIndicatorMapPtr map,
Bool on,
XkbChangesPtr change)
-#else
-XkbApplyLEDChangeToKeyboard(xkbi,map,on,change)
- XkbSrvInfoPtr xkbi;
- XkbIndicatorMapPtr map;
- Bool on;
- XkbChangesPtr change;
-#endif
{
Bool ctrlChange,stateChange;
XkbStatePtr state;
@@ -204,18 +190,10 @@ XkbStatePtr state;
*/
void
-#if NeedFunctionPrototypes
XkbSetIndicators( DeviceIntPtr dev,
CARD32 affect,
CARD32 values,
XkbEventCausePtr cause)
-#else
-XkbSetIndicators(dev,affect,values,cause)
- DeviceIntPtr dev;
- CARD32 affect;
- CARD32 values;
- XkbEventCausePtr cause;
-#endif
{
XkbSrvLedInfoPtr sli;
XkbChangesRec changes;
@@ -258,16 +236,9 @@ unsigned side_affected;
*/
static Bool
-#if NeedFunctionPrototypes
ComputeAutoState( XkbIndicatorMapPtr map,
XkbStatePtr state,
XkbControlsPtr ctrls)
-#else
-ComputeAutoState(map,state,ctrls)
- XkbIndicatorMapPtr map;
- XkbStatePtr state;
- XkbControlsPtr ctrls;
-#endif
{
Bool on;
CARD8 mods,group;
@@ -324,20 +295,11 @@ CARD8 mods,group;
*/
void
-#if NeedFunctionPrototypes
XkbUpdateIndicators( DeviceIntPtr dev,
register CARD32 update,
Bool check_edevs,
XkbChangesPtr changes,
XkbEventCausePtr cause)
-#else
-XkbUpdateIndicators(dev,update,check_edevs,changes,cause)
- DeviceIntPtr dev;
- register CARD32 update;
- Bool check_edevs;
- XkbChangesPtr changes;
- XkbEventCausePtr cause;
-#endif
{
XkbSrvLedInfoPtr sli;
@@ -351,13 +313,7 @@ XkbSrvLedInfoPtr sli;
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbUpdateAllDeviceIndicators(XkbChangesPtr changes,XkbEventCausePtr cause)
-#else
-XkbUpdateAllDeviceIndicators(changes,cause)
- XkbChangesPtr changes;
- XkbEventCausePtr cause;
-#endif
{
DeviceIntPtr edev;
XkbSrvLedInfoPtr sli;
@@ -403,14 +359,7 @@ XkbSrvLedInfoPtr sli;
*/
void
-#if NeedFunctionPrototypes
XkbCheckIndicatorMaps(DeviceIntPtr dev,XkbSrvLedInfoPtr sli,unsigned which)
-#else
-XkbCheckIndicatorMaps(dev,sli,which)
- DeviceIntPtr dev;
- XkbSrvLedInfoPtr sli;
- unsigned which;
-#endif
{
register unsigned i,bit;
XkbIndicatorMapPtr map;
@@ -483,18 +432,10 @@ XkbDescPtr xkb;
* of the parts speicified therein are allocated.
*/
XkbSrvLedInfoPtr
-#if NeedFunctionPrototypes
XkbAllocSrvLedInfo( DeviceIntPtr dev,
KbdFeedbackPtr kf,
LedFeedbackPtr lf,
unsigned needed_parts)
-#else
-XkbAllocSrvLedInfo(dev,kf,lf,needed_parts)
- DeviceIntPtr dev;
- KbdFeedbackPtr kf;
- LedFeedbackPtr lf;
- unsigned needed_parts;
-#endif
{
XkbSrvLedInfoPtr sli;
Bool checkAccel;
@@ -581,12 +522,7 @@ Bool checkNames;
}
void
-#if NeedFunctionPrototypes
XkbFreeSrvLedInfo(XkbSrvLedInfoPtr sli)
-#else
-XkbFreeSrvLedInfo(sli)
- XkbSrvLedInfoPtr sli;
-#endif
{
if ((sli->flags&XkbSLI_IsDefault)==0) {
if (sli->maps) _XkbFree(sli->maps);
@@ -613,18 +549,10 @@ XkbFreeSrvLedInfo(sli)
*/
XkbSrvLedInfoPtr
-#if NeedFunctionPrototypes
XkbFindSrvLedInfo( DeviceIntPtr dev,
unsigned class,
unsigned id,
unsigned needed_parts)
-#else
-XkbFindSrvLedInfo(dev,class,id,needed_parts)
- DeviceIntPtr dev;
- unsigned class;
- unsigned id;
- unsigned needed_parts;
-#endif
{
XkbSrvLedInfoPtr sli;
@@ -677,22 +605,12 @@ XkbSrvLedInfoPtr sli;
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbFlushLedEvents( DeviceIntPtr dev,
DeviceIntPtr kbd,
XkbSrvLedInfoPtr sli,
xkbExtensionDeviceNotify * ed,
XkbChangesPtr changes,
XkbEventCausePtr cause)
-#else
-XkbFlushLedEvents(dev,kbd,sli,ed,changes,cause)
- DeviceIntPtr dev;
- DeviceIntPtr kbd;
- XkbSrvLedInfoPtr sli;
- xkbExtensionDeviceNotify * ed;
- XkbChangesPtr changes;
- XkbEventCausePtr cause;
-#endif
{
if (changes) {
if (changes->indicators.state_changes)
@@ -720,22 +638,12 @@ XkbFlushLedEvents(dev,kbd,sli,ed,changes,cause)
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbApplyLedNameChanges( DeviceIntPtr dev,
XkbSrvLedInfoPtr sli,
unsigned changed_names,
xkbExtensionDeviceNotify * ed,
XkbChangesPtr changes,
XkbEventCausePtr cause)
-#else
-XkbApplyLedNameChanges(dev,sli,changed_names,ed,changes,cause)
- DeviceIntPtr dev;
- XkbSrvLedInfoPtr sli;
- unsigned changed_names;
- xkbExtensionDeviceNotify * ed;
- XkbChangesPtr changes;
- XkbEventCausePtr cause;
-#endif
{
DeviceIntPtr kbd;
XkbChangesRec my_changes;
@@ -807,22 +715,12 @@ xkbExtensionDeviceNotify my_ed;
*/
void
-#if NeedFunctionPrototypes
XkbApplyLedMapChanges( DeviceIntPtr dev,
XkbSrvLedInfoPtr sli,
unsigned changed_maps,
xkbExtensionDeviceNotify * ed,
XkbChangesPtr changes,
XkbEventCausePtr cause)
-#else
-XkbApplyLedMapChanges(dev,sli,changed_maps,ed,changes,cause)
- DeviceIntPtr dev;
- XkbSrvLedInfoPtr sli;
- unsigned changed_maps;
- xkbExtensionDeviceNotify * ed;
- XkbChangesPtr changes;
- XkbEventCausePtr cause;
-#endif
{
DeviceIntPtr kbd;
XkbChangesRec my_changes;
@@ -873,22 +771,12 @@ xkbExtensionDeviceNotify my_ed;
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbApplyLedStateChanges(DeviceIntPtr dev,
XkbSrvLedInfoPtr sli,
unsigned changed_leds,
xkbExtensionDeviceNotify * ed,
XkbChangesPtr changes,
XkbEventCausePtr cause)
-#else
-XkbApplyLedStateChanges(dev,sli,changed_leds,ed,changes,cause)
- DeviceIntPtr dev;
- XkbSrvLedInfoPtr sli;
- unsigned changed_leds;
- xkbExtensionDeviceNotify * ed;
- XkbChangesPtr changes;
- XkbEventCausePtr cause;
-#endif
{
XkbSrvInfoPtr xkbi;
DeviceIntPtr kbd;
@@ -970,22 +858,12 @@ Bool kb_changed;
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbUpdateLedAutoState( DeviceIntPtr dev,
XkbSrvLedInfoPtr sli,
unsigned maps_to_check,
xkbExtensionDeviceNotify * ed,
XkbChangesPtr changes,
XkbEventCausePtr cause)
-#else
-XkbUpdateLedAutoState(dev,sli,maps_to_check,ed,changes,cause)
- DeviceIntPtr dev;
- XkbSrvLedInfoPtr sli;
- unsigned maps_to_check;
- xkbExtensionDeviceNotify * ed;
- XkbChangesPtr changes;
- XkbEventCausePtr cause;
-#endif
{
DeviceIntPtr kbd;
XkbStatePtr state;
@@ -1056,20 +934,11 @@ unsigned oldState;
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_UpdateButtonVMods( XkbDescPtr xkb,
unsigned num_btns,
XkbAction * acts,
unsigned changed,
xkbExtensionDeviceNotify * ed_inout)
-#else
-_UpdateButtonVMods(xkb,num_btns,acts,changed,ed_inout)
- XkbDescPtr xkb;
- unsigned num_btns;
- XkbAction * acts;
- unsigned changed;
- xkbExtensionDeviceNotify * ed_inout;
-#endif
{
register int i;
@@ -1090,18 +959,10 @@ register int i;
}
static void
-#if NeedFunctionPrototypes
_UpdateMapVMods( XkbDescPtr xkb,
register XkbIndicatorMapPtr map,
unsigned changed_vmods,
unsigned * changed_maps_rtrn)
-#else
-_UpdateMapVMods(xkb,map,changed_vmods,changed_maps_rtrn)
- XkbDescPtr xkb;
- register XkbIndicatorMapPtr map;
- unsigned changed_vmods;
- unsigned * changed_maps_rtrn;
-#endif
{
register int i;
@@ -1117,18 +978,10 @@ register int i;
}
static void
-#if NeedFunctionPrototypes
_UpdateDeviceVMods( DeviceIntPtr dev,
XkbDescPtr xkb,
unsigned changed,
XkbEventCausePtr cause)
-#else
-_UpdateDeviceVMods(dev,xkb,changed,cause)
- DeviceIntPtr dev;
- XkbDescPtr xkb;
- unsigned changed;
- XkbEventCausePtr cause;
-#endif
{
xkbExtensionDeviceNotify ed;
XkbSrvLedInfoPtr sli;
@@ -1188,18 +1041,10 @@ unsigned changed_maps;
}
void
-#if NeedFunctionPrototypes
XkbApplyVModChangesToAllDevices( DeviceIntPtr dev,
XkbDescPtr xkb,
unsigned changed,
XkbEventCausePtr cause)
-#else
-XkbApplyVModChangesToAllDevices(dev,xkb,changed,cause)
- DeviceIntPtr dev;
- XkbDescPtr xkb;
- unsigned changed;
- XkbEventCausePtr cause;
-#endif
{
DeviceIntPtr edev;
if (dev!=(DeviceIntPtr)LookupKeyboardDevice())
diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c
index 84af5f2f8..3a9fc11f8 100644
--- a/xkb/xkbPrKeyEv.c
+++ b/xkb/xkbPrKeyEv.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/xkbPrKeyEv.c,v 3.8 2001/01/17 22:37:15 dawes Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/xkbPrKeyEv.c,v 3.9 2003/11/17 22:20:46 dawes Exp $ */
#include <stdio.h>
#include <math.h>
@@ -41,14 +41,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbProcessKeyboardEvent(xEvent *xE,DeviceIntPtr keybd,int count)
-#else
-XkbProcessKeyboardEvent(xE,keybd,count)
- xEvent * xE;
- DeviceIntPtr keybd;
- int count;
-#endif
{
KeyClassPtr keyc = keybd->key;
XkbSrvInfoPtr xkbi;
@@ -167,14 +160,7 @@ unsigned ndx;
}
void
-#if NeedFunctionPrototypes
ProcessKeyboardEvent(xEvent *xE,DeviceIntPtr keybd,int count)
-#else
-ProcessKeyboardEvent(xE,keybd,count)
- xEvent * xE;
- DeviceIntPtr keybd;
- int count;
-#endif
{
KeyClassPtr keyc = keybd->key;
XkbSrvInfoPtr xkbi;
diff --git a/xkb/xkbPrOtherEv.c b/xkb/xkbPrOtherEv.c
index fd24283f5..0a077f4c1 100644
--- a/xkb/xkbPrOtherEv.c
+++ b/xkb/xkbPrOtherEv.c
@@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
+/* $XFree86: xc/programs/Xserver/xkb/xkbPrOtherEv.c,v 1.2 2003/11/17 22:20:46 dawes Exp $ */
#include <stdio.h>
#include <math.h>
@@ -39,24 +40,15 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "XIproto.h"
extern void ProcessOtherEvent(
-#if NeedFunctionPrototypes
xEvent * /* xE */,
DeviceIntPtr /* dev */,
int /* count */
-#endif
);
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbProcessOtherEvent(xEvent *xE,DeviceIntPtr dev,int count)
-#else
-XkbProcessOtherEvent(xE,dev,count)
- xEvent * xE;
- DeviceIntPtr dev;
- int count;
-#endif
{
Bool xkbCares,isBtn;
diff --git a/xkb/xkbSwap.c b/xkb/xkbSwap.c
index 6a5bee3b9..6f4ffe8a9 100644
--- a/xkb/xkbSwap.c
+++ b/xkb/xkbSwap.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/xkbSwap.c,v 3.2 2001/08/23 14:33:26 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/xkbSwap.c,v 3.5 2003/11/17 22:20:46 dawes Exp $ */
#include "stdio.h"
#include "X.h"
@@ -36,50 +36,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "XKBsrv.h"
#include "XKBstr.h"
#include "extnsionst.h"
-
-#if NeedFunctionPrototypes
-#define PROC_EXTERN(pfunc) extern int pfunc(ClientPtr)
-#else
-#define PROC_EXTERN(pfunc) extern int pfunc()
-#endif
-
-PROC_EXTERN(ProcXkbUseExtension);
-PROC_EXTERN(ProcXkbSelectEvents);
-PROC_EXTERN(ProcXkbBell);
-PROC_EXTERN(ProcXkbGetState);
-PROC_EXTERN(ProcXkbLatchLockState);
-PROC_EXTERN(ProcXkbGetControls);
-PROC_EXTERN(ProcXkbSetControls);
-PROC_EXTERN(ProcXkbGetMap);
-PROC_EXTERN(ProcXkbSetMap);
-PROC_EXTERN(ProcXkbGetCompatMap);
-PROC_EXTERN(ProcXkbSetCompatMap);
-PROC_EXTERN(ProcXkbGetIndicatorState);
-PROC_EXTERN(ProcXkbGetIndicatorMap);
-PROC_EXTERN(ProcXkbSetIndicatorMap);
-PROC_EXTERN(ProcXkbGetNamedIndicator);
-PROC_EXTERN(ProcXkbSetNamedIndicator);
-PROC_EXTERN(ProcXkbGetNames);
-PROC_EXTERN(ProcXkbSetNames);
-PROC_EXTERN(ProcXkbGetGeometry);
-PROC_EXTERN(ProcXkbSetGeometry);
-PROC_EXTERN(ProcXkbPerClientFlags);
-PROC_EXTERN(ProcXkbListComponents);
-PROC_EXTERN(ProcXkbGetKbdByName);
-PROC_EXTERN(ProcXkbGetDeviceInfo);
-PROC_EXTERN(ProcXkbSetDeviceInfo);
-PROC_EXTERN(ProcXkbSetDebuggingFlags);
+#include "xkb.h"
/*
* REQUEST SWAPPING
*/
static int
-#if NeedFunctionPrototypes
SProcXkbUseExtension(ClientPtr client)
-#else
-SProcXkbUseExtension(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -93,12 +56,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbSelectEvents(ClientPtr client)
-#else
-SProcXkbSelectEvents(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -177,12 +135,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbBell(ClientPtr client)
-#else
-SProcXkbBell(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -201,12 +154,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbGetState(ClientPtr client)
-#else
-SProcXkbGetState(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -219,12 +167,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbLatchLockState(ClientPtr client)
-#else
-SProcXkbLatchLockState(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -238,12 +181,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbGetControls(ClientPtr client)
-#else
-SProcXkbGetControls(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -256,12 +194,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbSetControls(ClientPtr client)
-#else
-SProcXkbSetControls(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -296,12 +229,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbGetMap(ClientPtr client)
-#else
-SProcXkbGetMap(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -317,12 +245,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbSetMap(ClientPtr client)
-#else
-SProcXkbSetMap(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -341,12 +264,7 @@ register int n;
static int
-#if NeedFunctionPrototypes
SProcXkbGetCompatMap(ClientPtr client)
-#else
-SProcXkbGetCompatMap(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -361,12 +279,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbSetCompatMap(ClientPtr client)
-#else
-SProcXkbSetCompatMap(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -381,12 +294,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbGetIndicatorState(ClientPtr client)
-#else
-SProcXkbGetIndicatorState(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -399,12 +307,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbGetIndicatorMap(ClientPtr client)
-#else
-SProcXkbGetIndicatorMap(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -418,12 +321,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbSetIndicatorMap(ClientPtr client)
-#else
-SProcXkbSetIndicatorMap(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -437,12 +335,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbGetNamedIndicator(ClientPtr client)
-#else
-SProcXkbGetNamedIndicator(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -458,12 +351,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbSetNamedIndicator(ClientPtr client)
-#else
-SProcXkbSetNamedIndicator(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -482,12 +370,7 @@ register int n;
static int
-#if NeedFunctionPrototypes
SProcXkbGetNames(ClientPtr client)
-#else
-SProcXkbGetNames(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -501,12 +384,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbSetNames(ClientPtr client)
-#else
-SProcXkbSetNames(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -523,12 +401,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbGetGeometry(ClientPtr client)
-#else
-SProcXkbGetGeometry(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -542,12 +415,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbSetGeometry(ClientPtr client)
-#else
-SProcXkbSetGeometry(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -567,12 +435,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbPerClientFlags(ClientPtr client)
-#else
-SProcXkbPerClientFlags(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -590,12 +453,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbListComponents(ClientPtr client)
-#else
-SProcXkbListComponents(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -609,12 +467,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbGetKbdByName(ClientPtr client)
-#else
-SProcXkbGetKbdByName(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -629,12 +482,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbGetDeviceInfo(ClientPtr client)
-#else
-SProcXkbGetDeviceInfo(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -650,12 +498,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbSetDeviceInfo(ClientPtr client)
-#else
-SProcXkbSetDeviceInfo(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -670,12 +513,7 @@ register int n;
}
static int
-#if NeedFunctionPrototypes
SProcXkbSetDebuggingFlags(ClientPtr client)
-#else
-SProcXkbSetDebuggingFlags(client)
- ClientPtr client;
-#endif
{
register int n;
@@ -692,12 +530,7 @@ register int n;
}
int
-#if NeedFunctionPrototypes
SProcXkbDispatch (ClientPtr client)
-#else
-SProcXkbDispatch (client)
- ClientPtr client;
-#endif
{
REQUEST(xReq);
switch (stuff->data)
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 7d81d0169..f3ba6bc17 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/xkb/xkbUtils.c,v 3.13 2001/08/23 14:33:26 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/xkb/xkbUtils.c,v 3.17 2003/11/17 22:20:46 dawes Exp $ */
#include <stdio.h>
#include <ctype.h>
@@ -40,12 +40,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define XKBSRV_NEED_FILE_FUNCS
#include "XKBsrv.h"
#include "extensions/XKBgeom.h"
+#include "xkb.h"
#ifdef MODE_SWITCH
extern Bool noKME; /* defined in os/utils.c */
#endif
- int XkbDisableLockActions = 0;
+int XkbDisableLockActions = 0;
/***====================================================================***/
@@ -60,13 +61,7 @@ extern Bool noKME; /* defined in os/utils.c */
/***====================================================================***/
DeviceIntPtr
-#if NeedFunctionPrototypes
_XkbLookupAnyDevice(int id,int *why_rtrn)
-#else
-_XkbLookupAnyDevice(id,why_rtrn)
- int id;
- int *why_rtrn;
-#endif
{
DeviceIntPtr dev = NULL;
@@ -90,13 +85,7 @@ DeviceIntPtr dev = NULL;
}
DeviceIntPtr
-#if NeedFunctionPrototypes
_XkbLookupKeyboard(int id,int *why_rtrn)
-#else
-_XkbLookupKeyboard(id,why_rtrn)
- int id;
- int *why_rtrn;
-#endif
{
DeviceIntPtr dev = NULL;
@@ -111,13 +100,7 @@ DeviceIntPtr dev = NULL;
}
DeviceIntPtr
-#if NeedFunctionPrototypes
_XkbLookupBellDevice(int id,int *why_rtrn)
-#else
-_XkbLookupBellDevice(id,why_rtrn)
- int id;
- int *why_rtrn;
-#endif
{
DeviceIntPtr dev = NULL;
@@ -132,13 +115,7 @@ DeviceIntPtr dev = NULL;
}
DeviceIntPtr
-#if NeedFunctionPrototypes
_XkbLookupLedDevice(int id,int *why_rtrn)
-#else
-_XkbLookupLedDevice(id,why_rtrn)
- int id;
- int *why_rtrn;
-#endif
{
DeviceIntPtr dev = NULL;
@@ -153,13 +130,7 @@ DeviceIntPtr dev = NULL;
}
DeviceIntPtr
-#if NeedFunctionPrototypes
_XkbLookupButtonDevice(int id,int *why_rtrn)
-#else
-_XkbLookupButtonDevice(id,why_rtrn)
- int id;
- int *why_rtrn;
-#endif
{
DeviceIntPtr dev = NULL;
@@ -174,14 +145,7 @@ DeviceIntPtr dev = NULL;
}
void
-#if NeedFunctionPrototypes
XkbSetActionKeyMods(XkbDescPtr xkb,XkbAction *act,unsigned mods)
-#else
-XkbSetActionKeyMods(xkb,act,mods)
- XkbDescPtr xkb;
- XkbAction * act;
- unsigned mods;
-#endif
{
register unsigned tmp;
@@ -203,13 +167,7 @@ register unsigned tmp;
}
unsigned
-#if NeedFunctionPrototypes
XkbMaskForVMask(XkbDescPtr xkb,unsigned vmask)
-#else
-XkbMaskForVMask(xkb,vmask)
- XkbDescPtr xkb;
- unsigned vmask;
-#endif
{
register int i,bit;
register unsigned mask;
@@ -223,20 +181,11 @@ register unsigned mask;
Bool
-#if NeedFunctionPrototypes
XkbApplyVModChanges( XkbSrvInfoPtr xkbi,
unsigned changed,
XkbChangesPtr changes,
unsigned * needChecksRtrn,
XkbEventCausePtr cause)
-#else
-XkbApplyVModChanges(xkbi,changed,changes,needChecksRtrn,cause)
- XkbSrvInfoPtr xkbi;
- unsigned changed;
- XkbChangesPtr changes;
- unsigned * needChecksRtrn;
- XkbEventCausePtr cause;
-#endif
{
XkbDescPtr xkb;
Bool check;
@@ -270,20 +219,11 @@ register unsigned i,bit;
/***====================================================================***/
-#if NeedFunctionPrototypes
void
XkbUpdateKeyTypesFromCore( DeviceIntPtr pXDev,
KeyCode first,
CARD8 num,
XkbChangesPtr changes)
-#else
-void
-XkbUpdateKeyTypesFromCore(pXDev,first,num,changes)
- DeviceIntPtr pXDev;
- KeyCode first;
- CARD8 num;
- XkbChangesPtr changes;
-#endif
{
XkbDescPtr xkb;
unsigned key,nG,explicit;
@@ -344,18 +284,10 @@ generate a NewKeyboard notify here?
}
void
-#if NeedFunctionPrototypes
XkbUpdateDescActions( XkbDescPtr xkb,
KeyCode first,
CARD8 num,
XkbChangesPtr changes)
-#else
-XkbUpdateDescActions(xkb,first,num,changes)
- XkbDescPtr xkb;
- KeyCode first;
- CARD8 num;
- XkbChangesPtr changes;
-#endif
{
register unsigned key;
@@ -410,7 +342,6 @@ register unsigned key;
return;
}
-#if NeedFunctionPrototypes
void
XkbUpdateActions( DeviceIntPtr pXDev,
KeyCode first,
@@ -418,16 +349,6 @@ XkbUpdateActions( DeviceIntPtr pXDev,
XkbChangesPtr changes,
unsigned * needChecksRtrn,
XkbEventCausePtr cause)
-#else
-void
-XkbUpdateActions(pXDev,first,num,changes,needChecksRtrn,cause)
- DeviceIntPtr pXDev;
- KeyCode first;
- CARD8 num;
- XkbChangesPtr changes;
- unsigned * needChecksRtrn;
- XkbEventCausePtr cause;
-#endif
{
XkbSrvInfoPtr xkbi;
XkbDescPtr xkb;
@@ -453,13 +374,7 @@ CARD8 * repeat;
}
void
-#if NeedFunctionPrototypes
XkbUpdateCoreDescription(DeviceIntPtr keybd,Bool resize)
-#else
-XkbUpdateCoreDescription(keybd,resize)
- DeviceIntPtr keybd;
- Bool resize;
-#endif
{
register int key,tmp;
int maxSymsPerKey,maxKeysPerMod;
@@ -517,14 +432,19 @@ CARD8 keysPerMod[XkbNumModifiers];
nGroups= XkbKeyNumGroups(xkb,key);
tmp= 0;
if (nGroups>0) {
- if ((w=XkbKeyGroupWidth(xkb,key,XkbGroup1Index))<2)
+ if ((w=XkbKeyGroupWidth(xkb,key,XkbGroup1Index))<=2)
tmp+= 2;
- else tmp+= w;
+ else tmp+= w + 2;
}
if (nGroups>1) {
- if ((w=XkbKeyGroupWidth(xkb,key,XkbGroup2Index))<2)
- tmp+= 2;
- else tmp+= w;
+ if (tmp <= 2) {
+ if ((w=XkbKeyGroupWidth(xkb,key,XkbGroup2Index))<2)
+ tmp+= 2;
+ else tmp+= w;
+ } else {
+ if ((w=XkbKeyGroupWidth(xkb,key,XkbGroup2Index))>2)
+ tmp+= w - 2;
+ }
}
if (nGroups>2)
tmp+= XkbKeyGroupWidth(xkb,key,XkbGroup3Index);
@@ -613,12 +533,17 @@ CARD8 keysPerMod[XkbNumModifiers];
pXKB+= XkbKeyGroupsWidth(xkb,key);
for (n=XkbGroup3Index;n<nGroups;n++) {
register int s;
- groupWidth= XkbKeyGroupWidth(xkb,key,XkbGroup2Index);
+ groupWidth= XkbKeyGroupWidth(xkb,key,n);
for (s=0;s<groupWidth;s++) {
pCore[nOut++]= pXKB[s];
}
pXKB+= XkbKeyGroupsWidth(xkb,key);
}
+ if (!pCore[2] && !pCore[3] && maxSymsPerKey >= 6 &&
+ (pCore[4] || pCore[5])) {
+ pCore[2] = pCore[4];
+ pCore[3] = pCore[5];
+ }
}
if (keyc->modifierMap[key]!=0) {
register unsigned bit,i,mask;
@@ -642,14 +567,7 @@ CARD8 keysPerMod[XkbNumModifiers];
}
void
-#if NeedFunctionPrototypes
XkbSetRepeatKeys(DeviceIntPtr pXDev,int key,int onoff)
-#else
-XkbSetRepeatKeys(pXDev,key,onoff)
- DeviceIntPtr pXDev;
- int key;
- int onoff;
-#endif
{
if (pXDev && pXDev->key && pXDev->key->xkbInfo) {
xkbControlsNotify cn;
@@ -672,22 +590,12 @@ XkbSetRepeatKeys(pXDev,key,onoff)
return;
}
-#if NeedFunctionPrototypes
void
XkbApplyMappingChange( DeviceIntPtr kbd,
CARD8 request,
KeyCode firstKey,
CARD8 num,
ClientPtr client)
-#else
-void
-XkbApplyMappingChange(kbd,request,firstKey,num,client)
- DeviceIntPtr kbd;
- CARD8 request;
- KeyCode firstKey;
- CARD8 num;
- ClientPtr client;
-#endif
{
XkbEventCauseRec cause;
XkbChangesRec changes;
@@ -725,13 +633,7 @@ unsigned check;
}
void
-#if NeedFunctionPrototypes
XkbDisableComputedAutoRepeats(DeviceIntPtr dev,unsigned key)
-#else
-XkbDisableComputedAutoRepeats(dev,key)
- DeviceIntPtr dev;
- unsigned key;
-#endif
{
XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
xkbMapNotify mn;
@@ -746,13 +648,7 @@ xkbMapNotify mn;
}
unsigned
-#if NeedFunctionPrototypes
XkbStateChangedFlags(XkbStatePtr old,XkbStatePtr new)
-#else
-XkbStateChangedFlags(old,new)
- XkbStatePtr old;
- XkbStatePtr new;
-#endif
{
int changed;
@@ -776,12 +672,7 @@ int changed;
}
void
-#if NeedFunctionPrototypes
XkbComputeCompatState(XkbSrvInfoPtr xkbi)
-#else
-XkbComputeCompatState(xkbi)
- XkbSrvInfoPtr xkbi;
-#endif
{
CARD16 grp_mask;
XkbStatePtr state= &xkbi->state;
@@ -799,13 +690,7 @@ XkbCompatMapPtr map;
}
unsigned
-#if NeedFunctionPrototypes
XkbAdjustGroup(int group,XkbControlsPtr ctrls)
-#else
-XkbAdjustGroup(group,ctrls)
- int group;
- XkbControlsPtr ctrls;
-#endif
{
unsigned act;
@@ -846,16 +731,11 @@ unsigned act;
}
void
-#if NeedFunctionPrototypes
XkbComputeDerivedState(XkbSrvInfoPtr xkbi)
-#else
-XkbComputeDerivedState(xkbi)
- XkbSrvInfoPtr xkbi;
-#endif
{
XkbStatePtr state= &xkbi->state;
XkbControlsPtr ctrls= xkbi->desc->ctrls;
-char grp;
+unsigned char grp;
state->mods= (state->base_mods|state->latched_mods);
state->mods|= state->locked_mods;
@@ -866,11 +746,11 @@ char grp;
grp= state->locked_group;
- if ((grp>=ctrls->num_groups) || (grp<0))
+ if (grp>=ctrls->num_groups)
state->locked_group= XkbAdjustGroup(grp,ctrls);
grp= state->locked_group+state->base_group+state->latched_group;
- if ((grp>=ctrls->num_groups) || (grp<0))
+ if (grp>=ctrls->num_groups)
state->group= XkbAdjustGroup(grp,ctrls);
else state->group= grp;
XkbComputeCompatState(xkbi);
@@ -880,18 +760,10 @@ char grp;
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbCheckSecondaryEffects( XkbSrvInfoPtr xkbi,
unsigned which,
XkbChangesPtr changes,
XkbEventCausePtr cause)
-#else
-XkbCheckSecondaryEffects(xkbi,which,changes,cause)
- XkbSrvInfoPtr xkbi;
- unsigned which;
- XkbChangesPtr changes;
- XkbEventCausePtr cause;
-#endif
{
if (which&XkbStateNotifyMask) {
XkbStateRec old;
@@ -908,13 +780,7 @@ XkbCheckSecondaryEffects(xkbi,which,changes,cause)
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbSetPhysicalLockingKey(DeviceIntPtr dev,unsigned key)
-#else
-XkbSetPhysicalLockingKey(dev,key)
- DeviceIntPtr dev;
- unsigned key;
-#endif
{
XkbDescPtr xkb;
@@ -929,20 +795,11 @@ XkbDescPtr xkb;
/***====================================================================***/
Bool
-#if NeedFunctionPrototypes
XkbEnableDisableControls( XkbSrvInfoPtr xkbi,
unsigned long change,
unsigned long newValues,
XkbChangesPtr changes,
XkbEventCausePtr cause)
-#else
-XkbEnableDisableControls(xkbi,change,newValues,changes,cause)
- XkbSrvInfoPtr xkbi;
- unsigned long change;
- unsigned long newValues;
- XkbChangesPtr changes;
- XkbEventCausePtr cause;
-#endif
{
XkbControlsPtr ctrls;
unsigned old;
@@ -987,14 +844,7 @@ XkbSrvLedInfoPtr sli;
#define MAX_TOC 16
XkbGeometryPtr
-#if NeedFunctionPrototypes
XkbLookupNamedGeometry(DeviceIntPtr dev,Atom name,Bool *shouldFree)
-#else
-XkbLookupNamedGeometry(dev,name,shouldFree)
- DeviceIntPtr dev;
- Atom name;
- Bool * shouldFree;
-#endif
{
XkbSrvInfoPtr xkbi= dev->key->xkbInfo;
XkbDescPtr xkb= xkbi->desc;
@@ -1032,14 +882,7 @@ XkbDescPtr xkb= xkbi->desc;
}
void
-#if NeedFunctionPrototypes
XkbConvertCase(register KeySym sym, KeySym *lower, KeySym *upper)
-#else
-XkbConvertCase(sym, lower, upper)
- register KeySym sym;
- KeySym *lower;
- KeySym *upper;
-#endif
{
*lower = sym;
*upper = sym;
diff --git a/xkb/xkbconfig.c b/xkb/xkbconfig.c
index c94b06feb..0e480b4df 100644
--- a/xkb/xkbconfig.c
+++ b/xkb/xkbconfig.c
@@ -24,7 +24,7 @@
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/xkbfile/xkbconfig.c,v 3.7 2001/11/30 12:11:51 eich Exp $ */
+/* $XFree86: xc/lib/xkbfile/xkbconfig.c,v 3.8 2003/11/17 22:20:23 dawes Exp $ */
#include <stdio.h>
#include <ctype.h>
@@ -63,14 +63,7 @@
static char _XkbCF_rtrn[XKBCF_MAX_STR_LEN+1];
static int
-#if NeedFunctionPrototypes
ScanIdent(FILE *file,int ch,XkbCFScanResultPtr val_rtrn)
-#else
-ScanIdent(file,ch,val_rtrn)
- FILE * file;
- int ch;
- XkbCFScanResultPtr val_rtrn;
-#endif
{
register int i;
char * str;
@@ -87,14 +80,7 @@ char * str;
}
static int
-#if NeedFunctionPrototypes
ScanString(FILE *file,int quote,XkbCFScanResultPtr val_rtrn)
-#else
-ScanString(file,quote,val_rtrn)
- FILE * file;
- int quote;
- XkbCFScanResultPtr val_rtrn;
-#endif
{
int ch,nInBuf;
@@ -153,14 +139,7 @@ int ch,nInBuf;
}
static int
-#if NeedFunctionPrototypes
ScanInteger(FILE *file,int ch,XkbCFScanResultPtr val_rtrn)
-#else
-ScanInteger(file,ch,val_rtrn)
- FILE * file;
- int ch;
- XkbCFScanResultPtr val_rtrn;
-#endif
{
int i;
@@ -174,14 +153,7 @@ int i;
}
int
-#if NeedFunctionPrototypes
XkbCFScan(FILE *file,XkbCFScanResultPtr val_rtrn,XkbConfigRtrnPtr rtrn)
-#else
-XkbCFScan(file,val_rtrn,rtrn)
- FILE * file;
- XkbCFScanResultPtr val_rtrn;
- XkbConfigRtrnPtr rtrn;
-#endif
{
int ch;
@@ -276,14 +248,7 @@ int ch;
#define _XkbCF_InitialFeedback 37
static Bool
-#if NeedFunctionPrototypes
AddCtrlByName(XkbConfigRtrnPtr rtrn,char *name,unsigned long *ctrls_rtrn)
-#else
-AddCtrlByName(rtrn,name,ctrls_rtrn)
- XkbConfigRtrnPtr rtrn;
- char * name;
- unsigned long * ctrls_rtrn;
-#endif
{
if ((_XkbStrCaseCmp(name,"repeat")==0)||
(_XkbStrCaseCmp(name,"repeatkeys")==0))
@@ -320,16 +285,9 @@ AddCtrlByName(rtrn,name,ctrls_rtrn)
}
static Bool
-#if NeedFunctionPrototypes
AddAXTimeoutOptByName( XkbConfigRtrnPtr rtrn,
char * name,
unsigned short * opts_rtrn)
-#else
-AddAXTimeoutOptByName(rtrn,name,opts_rtrn)
- XkbConfigRtrnPtr rtrn;
- char * name;
- unsigned short * opts_rtrn;
-#endif
{
if (_XkbStrCaseCmp(name,"slowkeyspress")==0)
*opts_rtrn= XkbAX_SKPressFBMask;
@@ -363,20 +321,11 @@ AddAXTimeoutOptByName(rtrn,name,opts_rtrn)
}
XkbConfigUnboundModPtr
-#if NeedFunctionPrototypes
XkbCFAddModByName( XkbConfigRtrnPtr rtrn,
int what,
char * name,
Bool merge,
XkbConfigUnboundModPtr last)
-#else
-XkbCFAddModByName(rtrn,what,name,merge,last)
- XkbConfigRtrnPtr rtrn;
- int what;
- char * name;
- Bool merge;
- XkbConfigUnboundModPtr last;
-#endif
{
if (rtrn->num_unbound_mods>=rtrn->sz_unbound_mods) {
rtrn->sz_unbound_mods+= 5;
@@ -428,13 +377,7 @@ XkbCFAddModByName(rtrn,what,name,merge,last)
}
int
-#if NeedFunctionPrototypes
XkbCFBindMods(XkbConfigRtrnPtr rtrn,XkbDescPtr xkb)
-#else
-XkbCFBindMods(rtrn,xkb)
- XkbConfigRtrnPtr rtrn;
- XkbDescPtr xkb;
-#endif
{
register int n,v;
Atom name;
@@ -468,14 +411,7 @@ int missing;
}
Bool
-#if NeedFunctionPrototypes
XkbCFApplyMods(XkbConfigRtrnPtr rtrn,int what,XkbConfigModInfoPtr info)
-#else
-XkbCFApplyMods(rtrn,what,info)
- XkbConfigRtrnPtr rtrn;
- int what;
- XkbConfigModInfoPtr info;
-#endif
{
register int n;
XkbConfigUnboundModPtr mod;
@@ -509,20 +445,11 @@ XkbConfigUnboundModPtr mod;
/*ARGSUSED*/
static Bool
-#if NeedFunctionPrototypes
DefaultParser( FILE * file,
XkbConfigFieldsPtr fields,
XkbConfigFieldPtr field,
XkbDescPtr xkb,
XkbConfigRtrnPtr rtrn)
-#else
-DefaultParser(file,fields,field,xkb,rtrn)
- FILE * file;
- XkbConfigFieldsPtr fields;
- XkbConfigFieldPtr field;
- XkbDescPtr xkb;
- XkbConfigRtrnPtr rtrn;
-#endif
{
int tok;
XkbCFScanResultRec val;
@@ -930,12 +857,7 @@ BAILOUT:
}
static Bool
-#if NeedFunctionPrototypes
DefaultCleanUp(XkbConfigRtrnPtr rtrn)
-#else
-DefaultCleanUp(rtrn)
- XkbConfigRtrnPtr rtrn;
-#endif
{
if (rtrn->keymap) _XkbFree(rtrn->keymap);
if (rtrn->keycodes) _XkbFree(rtrn->keycodes);
@@ -964,13 +886,7 @@ DefaultCleanUp(rtrn)
}
static Bool
-#if NeedFunctionPrototypes
DefaultApplyNames(XkbConfigRtrnPtr rtrn,XkbDescPtr xkb)
-#else
-DefaultApplyNames(rtrn,xkb)
- XkbConfigRtrnPtr rtrn;
- XkbDescPtr xkb;
-#endif
{
char *str;
@@ -1010,13 +926,7 @@ char *str;
}
static Bool
-#if NeedFunctionPrototypes
DefaultApplyControls(XkbConfigRtrnPtr rtrn,XkbDescPtr xkb)
-#else
-DefaultApplyControls(rtrn,xkb)
- XkbConfigRtrnPtr rtrn;
- XkbDescPtr xkb;
-#endif
{
unsigned on,off;
XkbControlsPtr ctrls;
@@ -1135,18 +1045,10 @@ unsigned int mask;
/*ARGSUSED*/
static Bool
-#if NeedFunctionPrototypes
DefaultFinish( XkbConfigFieldsPtr fields,
XkbDescPtr xkb,
XkbConfigRtrnPtr rtrn,
int what)
-#else
-DefaultFinish(fields,xkb,rtrn,what)
- XkbConfigFieldsPtr fields;
- XkbDescPtr xkb;
- XkbConfigRtrnPtr rtrn;
- int what;
-#endif
{
if ((what==XkbCF_Destroy)||(what==XkbCF_CleanUp))
return DefaultCleanUp(rtrn);
@@ -1239,12 +1141,7 @@ XkbConfigFieldsPtr XkbCFDflts= &_XkbCFDflts;
/***====================================================================***/
XkbConfigFieldsPtr
-#if NeedFunctionPrototypes
XkbCFDup(XkbConfigFieldsPtr fields)
-#else
-XkbCFDup(fields)
- XkbConfigFieldsPtr fields;
-#endif
{
XkbConfigFieldsPtr pNew;
@@ -1272,13 +1169,7 @@ XkbConfigFieldsPtr pNew;
}
XkbConfigFieldsPtr
-#if NeedFunctionPrototypes
XkbCFFree(XkbConfigFieldsPtr fields,Bool all)
-#else
-XkbCFFree(fields,all)
- XkbConfigFieldsPtr fields;
- Bool all;
-#endif
{
XkbConfigFieldsPtr next;
@@ -1299,16 +1190,9 @@ XkbConfigFieldsPtr next;
}
Bool
-#if NeedFunctionPrototypes
XkbCFApplyRtrnValues( XkbConfigRtrnPtr rtrn,
XkbConfigFieldsPtr fields,
XkbDescPtr xkb)
-#else
-XkbCFApplyRtrnValues(rtrn,fields,xkb)
- XkbConfigRtrnPtr rtrn;
- XkbConfigFieldsPtr fields;
- XkbDescPtr xkb;
-#endif
{
Bool ok;
@@ -1322,16 +1206,9 @@ Bool ok;
}
XkbConfigRtrnPrivPtr
-#if NeedFunctionPrototypes
XkbCFAddPrivate( XkbConfigRtrnPtr rtrn,
XkbConfigFieldsPtr fields,
XPointer ptr)
-#else
-XkbCFAddPrivate(rtrn,fields,ptr)
- XkbConfigRtrnPtr rtrn;
- XkbConfigFieldsPtr fields;
- XPointer ptr;
-#endif
{
XkbConfigRtrnPrivPtr priv;
@@ -1348,16 +1225,9 @@ XkbConfigRtrnPrivPtr priv;
}
void
-#if NeedFunctionPrototypes
XkbCFFreeRtrn( XkbConfigRtrnPtr rtrn,
XkbConfigFieldsPtr fields,
XkbDescPtr xkb)
-#else
-XkbCFFreeRtrn(rtrn,fields,xkb)
- XkbConfigRtrnPtr rtrn;
- XkbConfigFieldsPtr fields;
- XkbDescPtr xkb;
-#endif
{
XkbConfigRtrnPrivPtr tmp,next;
@@ -1378,18 +1248,10 @@ XkbConfigRtrnPrivPtr tmp,next;
}
Bool
-#if NeedFunctionPrototypes
XkbCFParse( FILE * file,
XkbConfigFieldsPtr fields,
XkbDescPtr xkb,
XkbConfigRtrnPtr rtrn)
-#else
-XkbCFParse(file,fields,xkb,rtrn)
- FILE * file;
- XkbConfigFieldsPtr fields;
- XkbDescPtr xkb;
- XkbConfigRtrnPtr rtrn;
-#endif
{
int tok;
XkbCFScanResultRec val;
@@ -1440,15 +1302,7 @@ BAILOUT:
/*ARGSUSED*/
void
-#if NeedFunctionPrototypes
XkbCFReportError(FILE *file,char *name,int error,int line)
-#else
-XkbCFReportError(file,name,error,line)
- FILE * file;
- char * name;
- int error;
- int line;
-#endif
{
char * msg;
diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c
index 8246390be..2a6d836aa 100644
--- a/xkb/xkbfmisc.c
+++ b/xkb/xkbfmisc.c
@@ -24,7 +24,7 @@
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/xkbfile/xkbmisc.c,v 1.4 2002/12/20 20:18:35 paulo Exp $ */
+/* $XFree86: xc/lib/xkbfile/xkbmisc.c,v 1.8 2003/11/17 22:20:24 dawes Exp $ */
#include <stdio.h>
#include <ctype.h>
@@ -55,16 +55,12 @@
#define XKBSRV_NEED_FILE_FUNCS 1
#include "XKBsrv.h"
#include <X11/extensions/XKBgeom.h>
+#include "xkb.h"
#endif
unsigned
-#if NeedFunctionPrototypes
_XkbKSCheckCase(KeySym ks)
-#else
-_XkbKSCheckCase(ks)
- KeySym ks;
-#endif
{
unsigned set,rtrn;
@@ -149,13 +145,7 @@ unsigned set,rtrn;
/***===================================================================***/
int
-#if NeedFunctionPrototypes
_XkbStrCaseCmp(char *str1,char *str2)
-#else
-_XkbStrCaseCmp(str1,str2)
- char * str1;
- char * str2;
-#endif
{
char buf1[512],buf2[512];
char c, *s;
@@ -183,20 +173,11 @@ _XkbStrCaseCmp(str1,str2)
/***===================================================================***/
Bool
-#if NeedFunctionPrototypes
XkbLookupGroupAndLevel( XkbDescPtr xkb,
int key,
int * mods_inout,
int * grp_inout,
int * lvl_rtrn)
-#else
-XkbLookupGroupAndLevel(xkb,key,mods_inout,grp_inout,lvl_rtrn)
- XkbDescPtr xkb;
- int key;
- int * mods_inout;
- int * grp_inout;
- int * lvl_rtrn;
-#endif
{
int nG,eG;
@@ -262,14 +243,7 @@ int nG,eG;
/***===================================================================***/
static Bool
-#if NeedFunctionPrototypes
XkbWriteSectionFromName(FILE *file,char *sectionName,char *name)
-#else
-XkbWriteSectionFromName(file,sectionName,name)
- FILE * file;
- char * sectionName;
- char * name;
-#endif
{
fprintf(file," xkb_%-20s { include \"%s\" };\n",sectionName,name);
return True;
@@ -280,45 +254,25 @@ XkbWriteSectionFromName(file,sectionName,name)
/* ARGSUSED */
static void
-#if NeedFunctionPrototypes
_AddIncl( FILE * file,
XkbFileInfo * result,
Bool topLevel,
Bool showImplicit,
int index,
void * priv)
-#else
-_AddIncl(file,result,topLevel,showImplicit,index,priv)
- FILE * file;
- XkbFileInfo * result;
- Bool topLevel;
- Bool showImplicit;
- int index;
- void * priv;
-#endif
{
- if ((priv)&&(strcmp(priv,"%")!=0))
+ if ((priv)&&(strcmp((char *)priv,"%")!=0))
fprintf(file," include \"%s\"\n",(char *)priv);
return;
}
Bool
-#if NeedFunctionPrototypes
XkbWriteXKBKeymapForNames( FILE * file,
XkbComponentNamesPtr names,
Display * dpy,
XkbDescPtr xkb,
unsigned want,
unsigned need)
-#else
-XkbWriteXKBKeymapForNames(file,names,dpy,xkb,want,need)
- FILE * file;
- XkbComponentNamesPtr names;
- Display * dpy;
- XkbDescPtr xkb;
- unsigned want;
- unsigned need;
-#endif
{
char * name,*tmp;
unsigned complete;
@@ -503,13 +457,7 @@ XkbFileInfo finfo;
/*ARGSUSED*/
Status
-#if NeedFunctionPrototypes
XkbMergeFile(XkbDescPtr xkb,XkbFileInfo finfo)
-#else
-XkbMergeFile(xkb,finfo)
- XkbDescPtr xkb;
- XkbFileInfo *finfo;
-#endif
{
return BadImplementation;
}
@@ -517,14 +465,7 @@ XkbMergeFile(xkb,finfo)
/***====================================================================***/
int
-#if NeedFunctionPrototypes
XkbFindKeycodeByName(XkbDescPtr xkb,char *name,Bool use_aliases)
-#else
-XkbFindKeycodeByName(xkb,name,use_aliases)
- XkbDescPtr xkb;
- char * name;
- Bool use_aliases;
-#endif
{
register int i;
@@ -557,13 +498,7 @@ register int i;
unsigned
-#if NeedFunctionPrototypes
XkbConvertGetByNameComponents(Bool toXkm,unsigned orig)
-#else
-XkbConvertGetByNameComponents(toXkm,orig)
- Bool toXkm;
- unsigned orig;
-#endif
{
unsigned rtrn;
@@ -589,13 +524,7 @@ unsigned rtrn;
}
unsigned
-#if NeedFunctionPrototypes
XkbConvertXkbComponents(Bool toXkm,unsigned orig)
-#else
-XkbConvertXkbComponents(toXkm,orig)
- Bool toXkm;
- unsigned orig;
-#endif
{
unsigned rtrn;
@@ -623,14 +552,7 @@ unsigned rtrn;
}
Bool
-#if NeedFunctionPrototypes
XkbDetermineFileType(XkbFileInfoPtr finfo,int format,int *opts_missing)
-#else
-XkbDetermineFileType(finfo,format,opts_missing)
- XkbFileInfoPtr finfo;
- int format;
- int * opts_missing;
-#endif
{
unsigned present;
XkbDescPtr xkb;
@@ -715,12 +637,7 @@ static unsigned char componentSpecLegal[] = {
};
void
-#if NeedFunctionPrototypes
XkbEnsureSafeMapName(char *name)
-#else
-XkbEnsureSafeMapName(name)
- char *name;
-#endif
{
if (name==NULL)
return;
@@ -737,13 +654,7 @@ XkbEnsureSafeMapName(name)
#define UNMATCHABLE(c) (((c)=='(')||((c)==')')||((c)=='/'))
Bool
-#if NeedFunctionPrototypes
XkbNameMatchesPattern(char *name,char *ptrn)
-#else
-XkbNameMatchesPattern(name,ptrn)
- char * name;
- char * ptrn;
-#endif
{
while (ptrn[0]!='\0') {
if (name[0]=='\0') {
diff --git a/xkb/xkbout.c b/xkb/xkbout.c
index fd7603b03..d688aca01 100644
--- a/xkb/xkbout.c
+++ b/xkb/xkbout.c
@@ -24,7 +24,7 @@
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/xkbfile/xkbout.c,v 3.9 2001/10/28 03:32:47 tsi Exp $ */
+/* $XFree86: xc/lib/xkbfile/xkbout.c,v 3.10 2003/11/17 22:20:24 dawes Exp $ */
#include <stdio.h>
#include <ctype.h>
@@ -63,15 +63,7 @@
#define VMOD_COMMENT_VALUE 2
static Bool
-#if NeedFunctionPrototypes
WriteXKBVModDecl(FILE *file,Display *dpy,XkbDescPtr xkb,int showValue)
-#else
-WriteXKBVModDecl(file,dpy,xkb,showValue)
- FILE * file;
- Display * dpy;
- XkbDescPtr xkb;
- int showValue;
-#endif
{
register int i,nMods;
Atom * vmodNames;
@@ -109,14 +101,7 @@ Atom * vmodNames;
/***====================================================================***/
static Bool
-#if NeedFunctionPrototypes
WriteXKBAction(FILE *file,XkbFileInfo *result,XkbAnyAction *action)
-#else
-WriteXKBAction(file,result,action)
- FILE * file;
- XkbFileInfo * result;
- XkbAnyAction * action;
-#endif
{
XkbDescPtr xkb;
Display * dpy;
@@ -130,22 +115,12 @@ Display * dpy;
/***====================================================================***/
Bool
-#if NeedFunctionPrototypes
XkbWriteXKBKeycodes( FILE * file,
XkbFileInfo * result,
Bool topLevel,
Bool showImplicit,
XkbFileAddOnFunc addOn,
void * priv)
-#else
-XkbWriteXKBKeycodes(file,result,topLevel,showImplicit,addOn,priv)
- FILE * file;
- XkbFileInfo * result;
- Bool topLevel;
- Bool showImplicit;
- XkbFileAddOnFunc addOn;
- void * priv;
-#endif
{
Atom kcName;
register unsigned i;
@@ -204,22 +179,12 @@ char * alternate;
}
Bool
-#if NeedFunctionPrototypes
XkbWriteXKBKeyTypes( FILE * file,
XkbFileInfo * result,
Bool topLevel,
Bool showImplicit,
XkbFileAddOnFunc addOn,
void * priv)
-#else
-XkbWriteXKBKeyTypes(file,result,topLevel,showImplicit,addOn,priv)
- FILE * file;
- XkbFileInfo * result;
- Bool topLevel;
- Bool showImplicit;
- XkbFileAddOnFunc addOn;
- void * priv;
-#endif
{
Display * dpy;
register unsigned i,n;
@@ -284,22 +249,12 @@ XkbDescPtr xkb;
}
static Bool
-#if NeedFunctionPrototypes
WriteXKBIndicatorMap( FILE * file,
XkbFileInfo * result,
Atom name,
XkbIndicatorMapPtr led,
XkbFileAddOnFunc addOn,
void * priv)
-#else
-WriteXKBIndicatorMap(file,result,name,led,addOn,priv)
- FILE * file;
- XkbFileInfo * result;
- Atom name;
- XkbIndicatorMapPtr led;
- XkbFileAddOnFunc addOn;
- void * priv;
-#endif
{
XkbDescPtr xkb;
@@ -337,22 +292,12 @@ XkbDescPtr xkb;
}
Bool
-#if NeedFunctionPrototypes
XkbWriteXKBCompatMap( FILE * file,
XkbFileInfo * result,
Bool topLevel,
Bool showImplicit,
XkbFileAddOnFunc addOn,
void * priv)
-#else
-XkbWriteXKBCompatMap(file,result,topLevel,showImplicit,addOn,priv)
- FILE * file;
- XkbFileInfo * result;
- Bool topLevel;
- Bool showImplicit;
- XkbFileAddOnFunc addOn;
- void * priv;
-#endif
{
Display * dpy;
register unsigned i;
@@ -426,22 +371,12 @@ XkbDescPtr xkb;
}
Bool
-#if NeedFunctionPrototypes
XkbWriteXKBSymbols( FILE * file,
XkbFileInfo * result,
Bool topLevel,
Bool showImplicit,
XkbFileAddOnFunc addOn,
void * priv)
-#else
-XkbWriteXKBSymbols(file,result,topLevel,showImplicit,addOn,priv)
- FILE * file;
- XkbFileInfo * result;
- Bool topLevel;
- Bool showImplicit;
- XkbFileAddOnFunc addOn;
- void * priv;
-#endif
{
Display * dpy;
register unsigned i,tmp;
@@ -638,22 +573,12 @@ Bool showActions;
}
static Bool
-#if NeedFunctionPrototypes
WriteXKBOutline( FILE * file,
XkbShapePtr shape,
XkbOutlinePtr outline,
int lastRadius,
int first,
int indent)
-#else
-WriteXKBOutline(file,shape,outline,lastRadius,first,indent)
- FILE * file;
- XkbShapePtr shape;
- XkbOutlinePtr outline;
- int lastRadius;
- int first;
- int indent;
-#endif
{
register int i;
XkbPointPtr pt;
@@ -688,20 +613,11 @@ char * iStr;
}
static Bool
-#if NeedFunctionPrototypes
WriteXKBDoodad( FILE * file,
Display * dpy,
unsigned indent,
XkbGeometryPtr geom,
XkbDoodadPtr doodad)
-#else
-WriteXKBDoodad(file,dpy,indent,geom,doodad)
- FILE * file;
- Display * dpy;
- unsigned indent;
- XkbGeometryPtr geom;
- XkbDoodadPtr doodad;
-#endif
{
register char * i_str;
XkbShapePtr shape;
@@ -789,20 +705,11 @@ XkbColorPtr color;
/*ARGSUSED*/
static Bool
-#if NeedFunctionPrototypes
WriteXKBOverlay( FILE * file,
Display * dpy,
unsigned indent,
XkbGeometryPtr geom,
XkbOverlayPtr ol)
-#else
-WriteXKBOverlay(file,dpy,indent,geom,ol)
- FILE * file;
- Display * dpy;
- unsigned indent;
- XkbGeometryPtr geom;
- XkbOverlayPtr ol;
-#endif
{
register char * i_str;
int r,k,nOut;
@@ -833,18 +740,10 @@ XkbOverlayKeyPtr key;
}
static Bool
-#if NeedFunctionPrototypes
WriteXKBSection( FILE * file,
Display * dpy,
XkbSectionPtr s,
XkbGeometryPtr geom)
-#else
-WriteXKBSection(file,dpy,s,geom)
- FILE * file;
- Display * dpy;
- XkbSectionPtr s;
- XkbGeometryPtr geom;
-#endif
{
register int i;
XkbRowPtr row;
@@ -930,22 +829,12 @@ int dfltKeyColor = 0;
}
Bool
-#if NeedFunctionPrototypes
XkbWriteXKBGeometry( FILE * file,
XkbFileInfo * result,
Bool topLevel,
Bool showImplicit,
XkbFileAddOnFunc addOn,
void * priv)
-#else
-XkbWriteXKBGeometry(file,result,topLevel,showImplicit,addOn,priv)
- FILE * file;
- XkbFileInfo * result;
- Bool topLevel;
- Bool showImplicit;
- XkbFileAddOnFunc addOn;
- void * priv;
-#endif
{
Display * dpy;
register unsigned i,n;
@@ -1048,22 +937,12 @@ XkbGeometryPtr geom;
/*ARGSUSED*/
Bool
-#if NeedFunctionPrototypes
XkbWriteXKBSemantics( FILE * file,
XkbFileInfo * result,
Bool topLevel,
Bool showImplicit,
XkbFileAddOnFunc addOn,
void * priv)
-#else
-XkbWriteXKBSemantics(file,result,topLevel,showImplicit,addOn,priv)
- FILE * file;
- XkbFileInfo * result;
- Bool topLevel;
- Bool showImplicit;
- XkbFileAddOnFunc addOn;
- void * priv;
-#endif
{
Bool ok;
@@ -1076,22 +955,12 @@ Bool ok;
/*ARGSUSED*/
Bool
-#if NeedFunctionPrototypes
XkbWriteXKBLayout( FILE * file,
XkbFileInfo * result,
Bool topLevel,
Bool showImplicit,
XkbFileAddOnFunc addOn,
void * priv)
-#else
-XkbWriteXKBLayout(file,result,topLevel,showImplicit,addOn,priv)
- FILE * file;
- XkbFileInfo * result;
- Bool topLevel;
- Bool showImplicit;
- XkbFileAddOnFunc addOn;
- void * priv;
-#endif
{
Bool ok;
XkbDescPtr xkb;
@@ -1109,22 +978,12 @@ XkbDescPtr xkb;
/*ARGSUSED*/
Bool
-#if NeedFunctionPrototypes
XkbWriteXKBKeymap( FILE * file,
XkbFileInfo * result,
Bool topLevel,
Bool showImplicit,
XkbFileAddOnFunc addOn,
void * priv)
-#else
-XkbWriteXKBKeymap(file,result,topLevel,showImplicit,addOn,priv)
- FILE * file;
- XkbFileInfo * result;
- Bool topLevel;
- Bool showImplicit;
- XkbFileAddOnFunc addOn;
- void * priv;
-#endif
{
Bool ok;
XkbDescPtr xkb;
@@ -1142,31 +1001,20 @@ XkbDescPtr xkb;
}
Bool
-#if NeedFunctionPrototypes
XkbWriteXKBFile( FILE * out,
XkbFileInfo * result,
Bool showImplicit,
XkbFileAddOnFunc addOn,
void * priv)
-#else
-XkbWriteXKBFile(out,result,showImplicit,addOn,priv)
- FILE * out;
- XkbFileInfo * result;
- Bool showImplicit;
- XkbFileAddOnFunc addOn;
- void * priv;
-#endif
{
Bool ok = False;
Bool (*func)(
-#if NeedFunctionPrototypes
FILE * /* file */,
XkbFileInfo * /* result */,
Bool /* topLevel */,
Bool /* showImplicit */,
XkbFileAddOnFunc /* addOn */,
void * /* priv */
-#endif
) = NULL;
switch (result->type) {
diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c
index d233af0b4..fc593e796 100644
--- a/xkb/xkbtext.c
+++ b/xkb/xkbtext.c
@@ -24,7 +24,7 @@
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/xkbfile/xkbtext.c,v 3.11 2002/12/21 18:49:02 paulo Exp $ */
+/* $XFree86: xc/lib/xkbfile/xkbtext.c,v 3.12 2003/11/17 22:20:24 dawes Exp $ */
#include <stdio.h>
#include <ctype.h>
@@ -64,12 +64,7 @@ static char textBuffer[BUFFER_SIZE];
static int tbNext= 0;
static char *
-#if NeedFunctionPrototypes
tbGetBuffer(unsigned size)
-#else
-tbGetBuffer(size)
- unsigned size;
-#endif
{
char *rtrn;
@@ -85,14 +80,7 @@ char *rtrn;
/***====================================================================***/
char *
-#if NeedFunctionPrototypes
XkbAtomText(Display *dpy,Atom atm,unsigned format)
-#else
-XkbAtomText(dpy,atm,format)
- Display * dpy;
- Atom atm;
- unsigned format;
-#endif
{
char *rtrn,*tmp;
@@ -124,15 +112,7 @@ char *rtrn,*tmp;
/***====================================================================***/
char *
-#if NeedFunctionPrototypes
XkbVModIndexText(Display *dpy,XkbDescPtr xkb,unsigned ndx,unsigned format)
-#else
-XkbVModIndexText(dpy,xkb,ndx,format)
- Display * dpy;
- XkbDescPtr xkb;
- unsigned ndx;
- unsigned format;
-#endif
{
register int len;
register Atom *vmodNames;
@@ -166,20 +146,11 @@ char numBuf[20];
}
char *
-#if NeedFunctionPrototypes
XkbVModMaskText( Display * dpy,
XkbDescPtr xkb,
unsigned modMask,
unsigned mask,
unsigned format)
-#else
-XkbVModMaskText(dpy,xkb,modMask,mask,format)
- Display * dpy;
- XkbDescPtr xkb;
- unsigned modMask;
- unsigned mask;
- unsigned format;
-#endif
{
register int i,bit;
int len;
@@ -258,13 +229,7 @@ static char *modNames[XkbNumModifiers] = {
};
char *
-#if NeedFunctionPrototypes
XkbModIndexText(unsigned ndx,unsigned format)
-#else
-XkbModIndexText(ndx,format)
- unsigned ndx;
- unsigned format;
-#endif
{
char * rtrn;
char buf[100];
@@ -289,13 +254,7 @@ char buf[100];
}
char *
-#if NeedFunctionPrototypes
XkbModMaskText(unsigned mask,unsigned format)
-#else
-XkbModMaskText(mask,format)
- unsigned mask;
- unsigned format;
-#endif
{
register int i,bit;
char buf[64],*rtrn;
@@ -335,13 +294,7 @@ char buf[64],*rtrn;
/*ARGSUSED*/
char *
-#if NeedFunctionPrototypes
XkbConfigText(unsigned config,unsigned format)
-#else
-XkbConfigText(config,format)
- unsigned config;
- unsigned format;
-#endif
{
static char *buf;
@@ -388,13 +341,7 @@ static char *buf;
/***====================================================================***/
char *
-#if NeedFunctionPrototypes
XkbKeysymText(KeySym sym,unsigned format)
-#else
-XkbKeysymText(sym,format)
- KeySym sym;
- unsigned format;
-#endif
{
static char buf[32],*rtrn;
@@ -417,13 +364,7 @@ static char buf[32],*rtrn;
}
char *
-#if NeedFunctionPrototypes
XkbKeyNameText(char *name,unsigned format)
-#else
-XkbKeyNameText(name,format)
- char * name;
- unsigned format;
-#endif
{
char *buf;
@@ -452,13 +393,7 @@ static char *siMatchText[5] = {
};
char *
-#if NeedFunctionPrototypes
XkbSIMatchText(unsigned type,unsigned format)
-#else
-XkbSIMatchText(type,format)
- unsigned type;
- unsigned format;
-#endif
{
static char buf[40];
char *rtrn;
@@ -492,13 +427,7 @@ static char *imWhichNames[]= {
};
char *
-#if NeedFunctionPrototypes
XkbIMWhichStateMaskText(unsigned use_which,unsigned format)
-#else
-XkbIMWhichStateMaskText(use_which,format)
- unsigned use_which;
- unsigned format;
-#endif
{
int len;
unsigned i,bit,tmp;
@@ -541,13 +470,7 @@ char * buf;
}
char *
-#if NeedFunctionPrototypes
XkbAccessXDetailText(unsigned state,unsigned format)
-#else
-XkbAccessXDetailText(state,format)
- unsigned state;
- unsigned format;
-#endif
{
char *buf,*prefix;
@@ -573,13 +496,7 @@ static char *nknNames[] = {
#define NUM_NKN (sizeof(nknNames)/sizeof(char *))
char *
-#if NeedFunctionPrototypes
XkbNKNDetailMaskText(unsigned detail,unsigned format)
-#else
-XkbNKNDetailMaskText(detail,format)
- unsigned detail;
- unsigned format;
-#endif
{
char *buf,*prefix,*suffix;
register int i;
@@ -663,13 +580,7 @@ static char *ctrlNames[] = {
};
char *
-#if NeedFunctionPrototypes
XkbControlsMaskText(unsigned ctrls,unsigned format)
-#else
-XkbControlsMaskText(ctrls,format)
- unsigned ctrls;
- unsigned format;
-#endif
{
int len;
unsigned i,bit,tmp;
@@ -716,13 +627,7 @@ char * buf;
/***====================================================================***/
char *
-#if NeedFunctionPrototypes
XkbStringText(char *str,unsigned format)
-#else
-XkbStringText(str,format)
- char * str;
- unsigned format;
-#endif
{
char * buf;
register char *in,*out;
@@ -782,13 +687,7 @@ Bool ok;
/***====================================================================***/
char *
-#if NeedFunctionPrototypes
XkbGeomFPText(int val,unsigned format)
-#else
-XkbGeomFPText(val,format)
- int val;
- unsigned format;
-#endif
{
int whole,frac;
char * buf;
@@ -808,13 +707,7 @@ char * buf;
}
char *
-#if NeedFunctionPrototypes
XkbDoodadTypeText(unsigned type,unsigned format)
-#else
-XkbDoodadTypeText(type,format)
- unsigned type;
- unsigned format;
-#endif
{
char * buf;
if (format==XkbCFile) {
@@ -854,13 +747,7 @@ static char *actionTypeNames[XkbSA_NumActions]= {
};
char *
-#if NeedFunctionPrototypes
XkbActionTypeText(unsigned type,unsigned format)
-#else
-XkbActionTypeText(type,format)
- unsigned type;
- unsigned format;
-#endif
{
static char buf[32];
char *rtrn;
@@ -880,14 +767,7 @@ char *rtrn;
/***====================================================================***/
static int
-#if NeedFunctionPrototypes
TryCopyStr(char *to,char *from,int *pLeft)
-#else
-TryCopyStr(to,from,pLeft)
- char * to;
- char * from;
- int * pLeft;
-#endif
{
register int len;
if (*pLeft>0) {
@@ -904,32 +784,14 @@ register int len;
/*ARGSUSED*/
static Bool
-#if NeedFunctionPrototypes
CopyNoActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int*sz)
-#else
-CopyNoActionArgs(dpy,xkb,action,buf,sz)
- Display * dpy;
- XkbDescPtr xkb;
- XkbAction * action;
- char * buf;
- int * sz;
-#endif
{
return True;
}
static Bool
-#if NeedFunctionPrototypes
CopyModActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
int* sz)
-#else
-CopyModActionArgs(dpy,xkb,action,buf,sz)
- Display * dpy;
- XkbDescPtr xkb;
- XkbAction * action;
- char * buf;
- int * sz;
-#endif
{
XkbModAction * act;
unsigned tmp;
@@ -956,17 +818,8 @@ unsigned tmp;
/*ARGSUSED*/
static Bool
-#if NeedFunctionPrototypes
CopyGroupActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
int *sz)
-#else
-CopyGroupActionArgs(dpy,xkb,action,buf,sz)
- Display * dpy;
- XkbDescPtr xkb;
- XkbAction * action;
- char * buf;
- int * sz;
-#endif
{
XkbGroupAction * act;
char tbuf[32];
@@ -990,16 +843,7 @@ char tbuf[32];
/*ARGSUSED*/
static Bool
-#if NeedFunctionPrototypes
CopyMovePtrArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
-#else
-CopyMovePtrArgs(dpy,xkb,action,buf,sz)
- Display * dpy;
- XkbDescPtr xkb;
- XkbAction * action;
- char * buf;
- int * sz;
-#endif
{
XkbPtrAction * act;
int x,y;
@@ -1024,16 +868,7 @@ char tbuf[32];
/*ARGSUSED*/
static Bool
-#if NeedFunctionPrototypes
CopyPtrBtnArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
-#else
-CopyPtrBtnArgs(dpy,xkb,action,buf,sz)
- Display * dpy;
- XkbDescPtr xkb;
- XkbAction * action;
- char * buf;
- int * sz;
-#endif
{
XkbPtrBtnAction * act;
char tbuf[32];
@@ -1067,17 +902,8 @@ char tbuf[32];
/*ARGSUSED*/
static Bool
-#if NeedFunctionPrototypes
CopySetPtrDfltArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
int *sz)
-#else
-CopySetPtrDfltArgs(dpy,xkb,action,buf,sz)
- Display * dpy;
- XkbDescPtr xkb;
- XkbAction * action;
- char * buf;
- int * sz;
-#endif
{
XkbPtrDfltAction * act;
char tbuf[32];
@@ -1094,16 +920,7 @@ char tbuf[32];
}
static Bool
-#if NeedFunctionPrototypes
CopyISOLockArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
-#else
-CopyISOLockArgs(dpy,xkb,action,buf,sz)
- Display * dpy;
- XkbDescPtr xkb;
- XkbAction * action;
- char * buf;
- int * sz;
-#endif
{
XkbISOAction * act;
char tbuf[64];
@@ -1165,17 +982,8 @@ char tbuf[64];
/*ARGSUSED*/
static Bool
-#if NeedFunctionPrototypes
CopySwitchScreenArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
int *sz)
-#else
-CopySwitchScreenArgs(dpy,xkb,action,buf,sz)
- Display * dpy;
- XkbDescPtr xkb;
- XkbAction * action;
- char * buf;
- int * sz;
-#endif
{
XkbSwitchScreenAction * act;
char tbuf[32];
@@ -1193,17 +1001,8 @@ char tbuf[32];
/*ARGSUSED*/
static Bool
-#if NeedFunctionPrototypes
CopySetLockControlsArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,
char *buf,int *sz)
-#else
-CopySetLockControlsArgs(dpy,xkb,action,buf,sz)
- Display * dpy;
- XkbDescPtr xkb;
- XkbAction * action;
- char * buf;
- int * sz;
-#endif
{
XkbCtrlsAction * act;
unsigned tmp;
@@ -1289,17 +1088,8 @@ char tbuf[32];
/*ARGSUSED*/
static Bool
-#if NeedFunctionPrototypes
CopyActionMessageArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
int *sz)
-#else
-CopyActionMessageArgs(dpy,xkb,action,buf,sz)
- Display * dpy;
- XkbDescPtr xkb;
- XkbAction * action;
- char * buf;
- int * sz;
-#endif
{
XkbMessageAction * act;
unsigned all;
@@ -1325,17 +1115,8 @@ char tbuf[32];
}
static Bool
-#if NeedFunctionPrototypes
CopyRedirectKeyArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
int *sz)
-#else
-CopyRedirectKeyArgs(dpy,xkb,action,buf,sz)
- Display * dpy;
- XkbDescPtr xkb;
- XkbAction * action;
- char * buf;
- int * sz;
-#endif
{
XkbRedirectKeyAction * act;
char tbuf[32],*tmp;
@@ -1381,17 +1162,8 @@ unsigned vmods,vmods_mask;
/*ARGSUSED*/
static Bool
-#if NeedFunctionPrototypes
CopyDeviceBtnArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
int *sz)
-#else
-CopyDeviceBtnArgs(dpy,xkb,action,buf,sz)
- Display * dpy;
- XkbDescPtr xkb;
- XkbAction * action;
- char * buf;
- int * sz;
-#endif
{
XkbDeviceBtnAction * act;
char tbuf[32];
@@ -1423,16 +1195,7 @@ char tbuf[32];
/*ARGSUSED*/
static Bool
-#if NeedFunctionPrototypes
CopyOtherArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
-#else
-CopyOtherArgs(dpy,xkb,action,buf,sz)
- Display * dpy;
- XkbDescPtr xkb;
- XkbAction * action;
- char * buf;
- int * sz;
-#endif
{
XkbAnyAction * act;
char tbuf[32];
@@ -1450,13 +1213,11 @@ char tbuf[32];
}
typedef Bool (*actionCopy)(
-#if NeedFunctionPrototypes
Display * /* dpy */,
XkbDescPtr /* xkb */,
XkbAction * /* action */,
char * /* buf */,
int* /* sz */
-#endif
);
static actionCopy copyActionArgs[XkbSA_NumActions] = {
CopyNoActionArgs /* NoAction */,
@@ -1484,15 +1245,7 @@ static actionCopy copyActionArgs[XkbSA_NumActions] = {
#define ACTION_SZ 256
char *
-#if NeedFunctionPrototypes
XkbActionText(Display *dpy,XkbDescPtr xkb,XkbAction *action,unsigned format)
-#else
-XkbActionText(dpy,xkb,action,format)
- Display * dpy;
- XkbDescPtr xkb;
- XkbAction * action;
- unsigned format;
-#endif
{
char buf[ACTION_SZ],*tmp;
int sz;
@@ -1520,14 +1273,7 @@ int sz;
}
char *
-#if NeedFunctionPrototypes
XkbBehaviorText(XkbDescPtr xkb,XkbBehavior *behavior,unsigned format)
-#else
-XkbBehaviorText(xkb,behavior,format)
- XkbDescPtr xkb;
- XkbBehavior * behavior;
- unsigned format;
-#endif
{
char buf[256],*tmp;
@@ -1584,12 +1330,7 @@ char buf[256],*tmp;
/***====================================================================***/
char *
-#if NeedFunctionPrototypes
XkbIndentText(unsigned size)
-#else
-XkbIndentText(size)
- unsigned size;
-#endif
{
static char buf[32];
register int i;
@@ -1611,13 +1352,7 @@ register int i;
#define PIXEL_MAX 65535
Bool
-#if NeedFunctionPrototypes
XkbLookupCanonicalRGBColor(char *def,XColor *color)
-#else
-XkbLookupCanonicalRGBColor(def,color)
- char * def;
- XColor * color;
-#endif
{
int tmp;
diff --git a/xkb/xkmread.c b/xkb/xkmread.c
index af6cc3eba..b7a08e267 100644
--- a/xkb/xkmread.c
+++ b/xkb/xkmread.c
@@ -24,7 +24,7 @@
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/xkbfile/xkmread.c,v 1.6 2002/02/13 22:09:42 herrb Exp $ */
+/* $XFree86: xc/lib/xkbfile/xkmread.c,v 1.7 2003/11/17 22:20:24 dawes Exp $ */
#include <stdio.h>
@@ -57,14 +57,7 @@
#include "XKBgeom.h"
Atom
-#if NeedFunctionPrototypes
XkbInternAtom(Display *dpy,char *str,Bool only_if_exists)
-#else
-XkbInternAtom(dpy,str,only_if_exists)
- Display * dpy;
- char * str;
- Bool only_if_exists;
-#endif
{
if (str==NULL)
return None;
@@ -78,12 +71,7 @@ XkbInternAtom(dpy,str,only_if_exists)
#endif
char *
-#if NeedFunctionPrototypes
_XkbDupString(char *str)
-#else
-_XkbDupString(str)
- char *str;
-#endif
{
char *new;
@@ -98,15 +86,7 @@ char *new;
/***====================================================================***/
static XPointer
-#if NeedFunctionPrototypes
XkmInsureSize(XPointer oldPtr,int oldCount,int *newCountRtrn,int elemSize)
-#else
-XkmInsureSize(oldPtr,oldCount,newCountRtrn,elemSize)
- XPointer oldPtr;
- int oldCount;
- int * newCountRtrn;
- int elemSize;
-#endif
{
int newCount= *newCountRtrn;
@@ -131,13 +111,7 @@ int newCount= *newCountRtrn;
#define XkmInsureTypedSize(p,o,n,t) ((p)=((t *)XkmInsureSize((char *)(p),(o),(n),sizeof(t))))
static CARD8
-#if NeedFunctionPrototypes
XkmGetCARD8(FILE *file,int *pNRead)
-#else
-XkmGetCARD8(file,pNRead)
- FILE * file;
- int * pNRead;
-#endif
{
int tmp;
tmp= getc(file);
@@ -147,13 +121,7 @@ int tmp;
}
static CARD16
-#if NeedFunctionPrototypes
XkmGetCARD16(FILE *file,int *pNRead)
-#else
-XkmGetCARD16(file,pNRead)
- FILE * file;
- int * pNRead;
-#endif
{
CARD16 val;
@@ -163,13 +131,7 @@ CARD16 val;
}
static CARD32
-#if NeedFunctionPrototypes
XkmGetCARD32(FILE *file,int *pNRead)
-#else
-XkmGetCARD32(file,pNRead)
- FILE * file;
- int * pNRead;
-#endif
{
CARD32 val;
@@ -179,13 +141,7 @@ CARD32 val;
}
static int
-#if NeedFunctionPrototypes
XkmSkipPadding(FILE *file,unsigned pad)
-#else
-XkmSkipPadding(file,pad)
- FILE * file;
- unsigned pad;
-#endif
{
register int i,nRead=0;
@@ -197,14 +153,7 @@ register int i,nRead=0;
}
static int
-#if NeedFunctionPrototypes
XkmGetCountedString(FILE *file,char *str,int max_len)
-#else
-XkmGetCountedString(file,str,max_len)
- FILE * file;
- char * str;
- int max_len;
-#endif
{
int count,nRead=0;
@@ -235,14 +184,7 @@ int count,nRead=0;
/***====================================================================***/
static int
-#if NeedFunctionPrototypes
ReadXkmVirtualMods(FILE *file,XkbFileInfo *result,XkbChangesPtr changes)
-#else
-ReadXkmVirtualMods(file,result,changes)
- FILE * file;
- XkbFileInfo * result;
- XkbChangesPtr changes;
-#endif
{
register unsigned int i,bit;
unsigned int bound,named,tmp;
@@ -286,14 +228,7 @@ XkbDescPtr xkb;
/***====================================================================***/
static int
-#if NeedFunctionPrototypes
ReadXkmKeycodes(FILE *file,XkbFileInfo *result,XkbChangesPtr changes)
-#else
-ReadXkmKeycodes(file,result,changes)
- FILE * file;
- XkbFileInfo * result;
- XkbChangesPtr changes;
-#endif
{
register int i;
unsigned minKC,maxKC,nAl;
@@ -360,14 +295,7 @@ XkbDescPtr xkb;
/***====================================================================***/
static int
-#if NeedFunctionPrototypes
ReadXkmKeyTypes(FILE *file,XkbFileInfo *result,XkbChangesPtr changes)
-#else
-ReadXkmKeyTypes(file,result,changes)
- FILE * file;
- XkbFileInfo * result;
- XkbChangesPtr changes;
-#endif
{
register unsigned i,n;
unsigned num_types;
@@ -505,14 +433,7 @@ XkbDescPtr xkb;
/***====================================================================***/
static int
-#if NeedFunctionPrototypes
ReadXkmCompatMap(FILE *file,XkbFileInfo *result,XkbChangesPtr changes)
-#else
-ReadXkmCompatMap(file,result,changes)
- FILE * file;
- XkbFileInfo * result;
- XkbChangesPtr changes;
-#endif
{
register int i;
unsigned num_si,groups;
@@ -590,14 +511,7 @@ XkbCompatMapPtr compat;
}
static int
-#if NeedFunctionPrototypes
ReadXkmIndicators(FILE *file,XkbFileInfo *result,XkbChangesPtr changes)
-#else
-ReadXkmIndicators(file,result,changes)
- FILE * file;
- XkbFileInfo * result;
- XkbChangesPtr changes;
-#endif
{
register unsigned nLEDs;
xkmIndicatorMapDesc wire;
@@ -654,15 +568,7 @@ XkbDescPtr xkb;
}
static XkbKeyTypePtr
-#if NeedFunctionPrototypes
FindTypeForKey(XkbDescPtr xkb,Atom name,unsigned width,KeySym *syms)
-#else
-FindTypeForKey(xkb,name,width,syms)
- XkbDescPtr xkb;
- Atom name;
- unsigned width;
- KeySym * syms;
-#endif
{
if ((!xkb)||(!xkb->map))
return NULL;
@@ -690,13 +596,7 @@ FindTypeForKey(xkb,name,width,syms)
}
static int
-#if NeedFunctionPrototypes
ReadXkmSymbols(FILE *file,XkbFileInfo *result)
-#else
-ReadXkmSymbols(file,result)
- FILE * file;
- XkbFileInfo * result;
-#endif
{
register int i,g,s,totalVModMaps;
xkmKeySymMapDesc wireMap;
@@ -851,19 +751,11 @@ XkbDescPtr xkb;
}
static int
-#if NeedFunctionPrototypes
ReadXkmGeomDoodad(
FILE * file,
Display * dpy,
XkbGeometryPtr geom,
XkbSectionPtr section)
-#else
-ReadXkmGeomDoodad(file,dpy,geom,section)
- FILE * file;
- Display * dpy;
- XkbGeometryPtr geom;
- XkbSectionPtr section;
-#endif
{
XkbDoodadPtr doodad;
xkmDoodadDesc doodadWire;
@@ -918,18 +810,10 @@ int nRead=0;
}
static int
-#if NeedFunctionPrototypes
ReadXkmGeomOverlay( FILE * file,
Display * dpy,
XkbGeometryPtr geom,
XkbSectionPtr section)
-#else
-ReadXkmGeomOverlay(file,dpy,geom,section)
- FILE * file;
- Display * dpy;
- XkbGeometryPtr geom;
- XkbSectionPtr section;
-#endif
{
char buf[100];
unsigned tmp;
@@ -969,16 +853,9 @@ register int r;
}
static int
-#if NeedFunctionPrototypes
ReadXkmGeomSection( FILE * file,
Display * dpy,
XkbGeometryPtr geom)
-#else
-ReadXkmGeomSection(file,dpy,geom)
- FILE * file;
- Display * dpy;
- XkbGeometryPtr geom;
-#endif
{
register int i;
XkbSectionPtr section;
@@ -1058,13 +935,7 @@ Atom nameAtom;
}
static int
-#if NeedFunctionPrototypes
ReadXkmGeometry(FILE *file,XkbFileInfo *result)
-#else
-ReadXkmGeometry(file,result)
- FILE * file;
- XkbFileInfo * result;
-#endif
{
register int i;
char buf[100];
@@ -1192,12 +1063,7 @@ XkbGeometrySizesRec sizes;
}
Bool
-#if NeedFunctionPrototypes
XkmProbe(FILE *file)
-#else
-XkmProbe(file)
- FILE * file;
-#endif
{
unsigned hdr,tmp;
int nRead=0;
@@ -1214,15 +1080,7 @@ int nRead=0;
}
Bool
-#if NeedFunctionPrototypes
XkmReadTOC(FILE *file,xkmFileInfo* file_info,int max_toc,xkmSectionInfo *toc)
-#else
-XkmReadTOC(file,file_info,max_toc,toc)
- FILE * file;
- xkmFileInfo * file_info;
- int max_toc;
- xkmSectionInfo * toc;
-#endif
{
unsigned hdr,tmp;
int nRead=0;
@@ -1255,14 +1113,7 @@ unsigned i,size_toc;
}
xkmSectionInfo *
-#if NeedFunctionPrototypes
XkmFindTOCEntry(xkmFileInfo *finfo,xkmSectionInfo *toc,unsigned type)
-#else
-XkmFindTOCEntry(finfo,toc,type)
- xkmFileInfo * finfo;
- xkmSectionInfo * toc;
- unsigned type;
-#endif
{
register int i;
@@ -1274,18 +1125,10 @@ register int i;
}
Bool
-#if NeedFunctionPrototypes
XkmReadFileSection( FILE * file,
xkmSectionInfo * toc,
XkbFileInfo * result,
unsigned * loaded_rtrn)
-#else
-XkmReadFileSection(file,toc,result,loaded_rtrn)
- FILE * file;
- xkmSectionInfo * toc;
- XkbFileInfo * result;
- unsigned * loaded_rtrn;
-#endif
{
xkmSectionInfo tmpTOC;
int nRead;
@@ -1353,13 +1196,7 @@ int nRead;
}
char *
-#if NeedFunctionPrototypes
XkmReadFileSectionName(FILE *file,xkmSectionInfo *toc)
-#else
-XkmReadFileSectionName(file,toc)
- FILE * file;
- xkmSectionInfo * toc;
-#endif
{
xkmSectionInfo tmpTOC;
char name[100];
@@ -1397,15 +1234,7 @@ char name[100];
#define MAX_TOC 16
unsigned
-#if NeedFunctionPrototypes
XkmReadFile(FILE *file,unsigned need,unsigned want,XkbFileInfo *result)
-#else
-XkmReadFile(file,need,want,result)
- FILE * file;
- unsigned need;
- unsigned want;
- XkbFileInfo * result;
-#endif
{
register unsigned i;
xkmSectionInfo toc[MAX_TOC],tmpTOC;