aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/Xext/dpms.c10
-rw-r--r--xorg-server/Xext/dpmsstubs.c10
-rw-r--r--xorg-server/Xext/panoramiX.c2
-rw-r--r--xorg-server/Xext/panoramiX.h2
-rw-r--r--xorg-server/Xext/panoramiXprocs.c4
-rw-r--r--xorg-server/Xext/security.c4
-rw-r--r--xorg-server/Xext/shm.c21
-rw-r--r--xorg-server/Xext/sync.c2
-rw-r--r--xorg-server/Xext/syncsrv.h8
-rw-r--r--xorg-server/Xext/xres.c12
-rw-r--r--xorg-server/Xext/xvdisp.c8
-rw-r--r--xorg-server/Xext/xvdix.h14
-rw-r--r--xorg-server/Xext/xvmain.c20
-rw-r--r--xorg-server/composite/compalloc.c8
-rw-r--r--xorg-server/composite/compext.c4
-rw-r--r--xorg-server/composite/compinit.c21
-rw-r--r--xorg-server/composite/compint.h3
-rw-r--r--xorg-server/composite/compoverlay.c4
-rw-r--r--xorg-server/composite/compwindow.c7
-rw-r--r--xorg-server/configure.ac14
-rw-r--r--xorg-server/dbe/dbe.c16
-rw-r--r--xorg-server/dbe/dbestruct.h12
-rw-r--r--xorg-server/dbe/midbe.c14
-rw-r--r--xorg-server/dbe/midbe.h8
-rw-r--r--xorg-server/dix/atom.c8
-rw-r--r--xorg-server/dix/colormap.c34
-rw-r--r--xorg-server/dix/cursor.c8
-rw-r--r--xorg-server/dix/devices.c2
-rw-r--r--xorg-server/dix/dispatch.c16
-rw-r--r--xorg-server/dix/dispatch.h2
-rw-r--r--xorg-server/dix/dixfonts.c6
-rw-r--r--xorg-server/dix/dixutils.c12
-rw-r--r--xorg-server/dix/extension.c8
-rw-r--r--xorg-server/dix/gc.c25
-rw-r--r--xorg-server/dix/getevents.c22
-rw-r--r--xorg-server/dix/globals.c8
-rw-r--r--xorg-server/dix/glyphcurs.c8
-rw-r--r--xorg-server/dix/grabs.c16
-rw-r--r--xorg-server/dix/inpututils.c2
-rw-r--r--xorg-server/dix/main.c8
-rw-r--r--xorg-server/dix/property.c8
-rw-r--r--xorg-server/dix/region.c22
-rw-r--r--xorg-server/dix/resource.c16
-rw-r--r--xorg-server/dix/selection.c10
-rw-r--r--xorg-server/dix/swaprep.c8
-rw-r--r--xorg-server/dix/swapreq.c8
-rw-r--r--xorg-server/dix/tables.c8
-rw-r--r--xorg-server/dix/window.c38
-rw-r--r--xorg-server/exa/exa.c2
-rw-r--r--xorg-server/exa/exa.h8
-rw-r--r--xorg-server/exa/exa_accel.c20
-rw-r--r--xorg-server/exa/exa_glyphs.c8
-rw-r--r--xorg-server/exa/exa_priv.h7
-rw-r--r--xorg-server/exa/exa_render.c4
-rw-r--r--xorg-server/exa/exa_unaccel.c11
-rw-r--r--xorg-server/fb/Makefile.am2
-rw-r--r--xorg-server/fb/fb.h338
-rw-r--r--xorg-server/fb/fb24_32.c2
-rw-r--r--xorg-server/fb/fb24_32.h2
-rw-r--r--xorg-server/fb/fbbits.c12
-rw-r--r--xorg-server/fb/fbblt.c271
-rw-r--r--xorg-server/fb/fbbltone.c320
-rw-r--r--xorg-server/fb/fbfill.c84
-rw-r--r--xorg-server/fb/fbfillrect.c2
-rw-r--r--xorg-server/fb/fbgc.c85
-rw-r--r--xorg-server/fb/fbglyph.c10
-rw-r--r--xorg-server/fb/fbline.c4
-rw-r--r--xorg-server/fb/fboverlay.c2
-rw-r--r--xorg-server/fb/fboverlay.h2
-rw-r--r--xorg-server/fb/fbpict.c16
-rw-r--r--xorg-server/fb/fbpict.h4
-rw-r--r--xorg-server/fb/fbpixmap.c6
-rw-r--r--xorg-server/fb/fbpoint.c2
-rw-r--r--xorg-server/fb/fbpush.c4
-rw-r--r--xorg-server/fb/fbrop.h12
-rw-r--r--xorg-server/fb/fbseg.c42
-rw-r--r--xorg-server/fb/fbstipple.c264
-rw-r--r--xorg-server/fb/fbtile.c163
-rw-r--r--xorg-server/fb/fbutil.c308
-rw-r--r--xorg-server/fb/wfbrename.h23
-rw-r--r--xorg-server/glamor/glamor.c1
-rw-r--r--xorg-server/glamor/glamor_fbo.c3
-rw-r--r--xorg-server/glamor/glamor_picture.c2
-rw-r--r--xorg-server/glamor/glamor_pixmap.c75
-rw-r--r--xorg-server/glamor/glamor_priv.h2
-rw-r--r--xorg-server/glx/glxbyteorder.h8
-rw-r--r--xorg-server/glx/glxcmds.c22
-rw-r--r--xorg-server/glx/glxdri2.c2
-rw-r--r--xorg-server/glx/glxscreens.c2
-rw-r--r--xorg-server/glx/glxscreens.h2
-rw-r--r--xorg-server/glx/indirect_dispatch.c6
-rw-r--r--xorg-server/glx/indirect_dispatch.h6
-rw-r--r--xorg-server/glx/indirect_dispatch_swap.c6
-rw-r--r--xorg-server/glx/indirect_program.c6
-rw-r--r--xorg-server/glx/indirect_reqsize.c6
-rw-r--r--xorg-server/glx/indirect_reqsize.h6
-rw-r--r--xorg-server/glx/indirect_size.h6
-rw-r--r--xorg-server/glx/indirect_size_get.c6
-rw-r--r--xorg-server/glx/indirect_size_get.h6
-rw-r--r--xorg-server/glx/indirect_table.c6
-rw-r--r--xorg-server/glx/indirect_table.h6
-rw-r--r--xorg-server/glx/indirect_texture_compression.c6
-rw-r--r--xorg-server/glx/indirect_util.c8
-rw-r--r--xorg-server/glx/indirect_util.h6
-rw-r--r--xorg-server/glx/rensize.c4
-rw-r--r--xorg-server/hw/dmx/config/Canvas.c2
-rw-r--r--xorg-server/hw/dmx/config/dmxprint.c2
-rw-r--r--xorg-server/hw/dmx/dmxgc.c12
-rw-r--r--xorg-server/hw/dmx/dmxpict.h2
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxcmds.c16
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxsingle.c4
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxvendor.c4
-rw-r--r--xorg-server/hw/dmx/input/ChkNotMaskEv.c2
-rw-r--r--xorg-server/hw/dmx/input/lnx-keyboard.c20
-rw-r--r--xorg-server/hw/dmx/input/lnx-ms.c2
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyr.c14
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyr.h4
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrdri.c4
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrdri.h4
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrdriext.c4
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrdriext.h4
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrglxext.c4
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrglxext.h4
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrhostglx.c4
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrhostglx.h4
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrinit.c4
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrlog.h4
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrvideo.c4
-rw-r--r--xorg-server/hw/kdrive/ephyr/hostx.c12
-rw-r--r--xorg-server/hw/kdrive/ephyr/hostx.h4
-rw-r--r--xorg-server/hw/kdrive/ephyr/os.c4
-rw-r--r--xorg-server/hw/kdrive/src/kxv.c2
-rw-r--r--xorg-server/hw/xfree86/Makefile.am2
-rw-r--r--xorg-server/hw/xfree86/common/Makefile.am4
-rw-r--r--xorg-server/hw/xfree86/common/compiler.h4
-rw-r--r--xorg-server/hw/xfree86/common/xf86AutoConfig.c8
-rw-r--r--xorg-server/hw/xfree86/common/xf86Bus.c2
-rw-r--r--xorg-server/hw/xfree86/common/xf86Config.c4
-rw-r--r--xorg-server/hw/xfree86/common/xf86Configure.c4
-rw-r--r--xorg-server/hw/xfree86/common/xf86Mode.c8
-rw-r--r--xorg-server/hw/xfree86/common/xf86Module.h4
-rw-r--r--xorg-server/hw/xfree86/common/xf86PciInfo.h2
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.c16
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.h6
-rw-r--r--xorg-server/hw/xfree86/common/xf86cmap.c4
-rw-r--r--xorg-server/hw/xfree86/common/xf86fbman.c6
-rw-r--r--xorg-server/hw/xfree86/common/xf86platformBus.c2
-rw-r--r--xorg-server/hw/xfree86/common/xf86str.h2
-rw-r--r--xorg-server/hw/xfree86/common/xf86vmode.c8
-rw-r--r--xorg-server/hw/xfree86/common/xf86xv.c2
-rw-r--r--xorg-server/hw/xfree86/common/xf86xvmc.h10
-rw-r--r--xorg-server/hw/xfree86/ddc/ddc.c10
-rw-r--r--xorg-server/hw/xfree86/ddc/edid.h8
-rw-r--r--xorg-server/hw/xfree86/ddc/print_edid.c2
-rw-r--r--xorg-server/hw/xfree86/ddc/xf86DDC.h6
-rw-r--r--xorg-server/hw/xfree86/dixmods/xkbKillSrv.c16
-rw-r--r--xorg-server/hw/xfree86/dixmods/xkbVT.c16
-rw-r--r--xorg-server/hw/xfree86/dri/dri.c4
-rw-r--r--xorg-server/hw/xfree86/dri/sarea.h10
-rw-r--r--xorg-server/hw/xfree86/dri2/Makefile.am2
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2.c62
-rw-r--r--xorg-server/hw/xfree86/dri2/pci_ids/Makefile.am11
-rw-r--r--xorg-server/hw/xfree86/dri2/pci_ids/i810_pci_ids.h4
-rw-r--r--xorg-server/hw/xfree86/dri2/pci_ids/i915_pci_ids.h15
-rw-r--r--xorg-server/hw/xfree86/dri2/pci_ids/i965_pci_ids.h115
-rw-r--r--xorg-server/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h80
-rw-r--r--xorg-server/hw/xfree86/dri2/pci_ids/r200_pci_ids.h24
-rw-r--r--xorg-server/hw/xfree86/dri2/pci_ids/r300_pci_ids.h227
-rw-r--r--xorg-server/hw/xfree86/dri2/pci_ids/r600_pci_ids.h327
-rw-r--r--xorg-server/hw/xfree86/dri2/pci_ids/radeon_pci_ids.h23
-rw-r--r--xorg-server/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h157
-rw-r--r--xorg-server/hw/xfree86/dri2/pci_ids/vmwgfx_pci_ids.h1
-rw-r--r--xorg-server/hw/xfree86/drivers/modesetting/Makefile.am6
-rw-r--r--xorg-server/hw/xfree86/drivers/modesetting/dri2.c863
-rw-r--r--xorg-server/hw/xfree86/drivers/modesetting/driver.c29
-rw-r--r--xorg-server/hw/xfree86/drivers/modesetting/driver.h44
-rw-r--r--xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.c25
-rw-r--r--xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.h31
-rw-r--r--xorg-server/hw/xfree86/drivers/modesetting/vblank.c383
-rw-r--r--xorg-server/hw/xfree86/fbdevhw/fbdevhw.c2
-rw-r--r--xorg-server/hw/xfree86/i2c/xf86i2c.c40
-rw-r--r--xorg-server/hw/xfree86/i2c/xf86i2c.h2
-rw-r--r--xorg-server/hw/xfree86/loader/loadmod.c4
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Crtc.c4
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Crtc.h10
-rw-r--r--xorg-server/hw/xfree86/modes/xf86RandR12.c4
-rw-r--r--xorg-server/hw/xfree86/modes/xf86cvt.c4
-rw-r--r--xorg-server/hw/xfree86/modes/xf86gtf.c10
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/alpha_video.c20
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/arm_video.c28
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_bell.c20
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_init.c24
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c16
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/i386_video.c22
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/ppc_video.c20
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c20
-rw-r--r--xorg-server/hw/xfree86/os-support/hurd/hurd_video.c4
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_agp.c4
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/systemd-logind.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c8
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/sigio.c6
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/sun_apm.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/xf86_OSlib.h30
-rw-r--r--xorg-server/hw/xfree86/os-support/xf86_OSproc.h28
-rw-r--r--xorg-server/hw/xfree86/parser/Configint.h18
-rw-r--r--xorg-server/hw/xfree86/parser/DRI.c8
-rw-r--r--xorg-server/hw/xfree86/parser/Device.c16
-rw-r--r--xorg-server/hw/xfree86/parser/Files.c14
-rw-r--r--xorg-server/hw/xfree86/parser/Flags.c16
-rw-r--r--xorg-server/hw/xfree86/parser/Input.c16
-rw-r--r--xorg-server/hw/xfree86/parser/Layout.c16
-rw-r--r--xorg-server/hw/xfree86/parser/Module.c16
-rw-r--r--xorg-server/hw/xfree86/parser/Monitor.c18
-rw-r--r--xorg-server/hw/xfree86/parser/Pointer.c16
-rw-r--r--xorg-server/hw/xfree86/parser/Screen.c16
-rw-r--r--xorg-server/hw/xfree86/parser/Vendor.c16
-rw-r--r--xorg-server/hw/xfree86/parser/Video.c16
-rw-r--r--xorg-server/hw/xfree86/parser/read.c22
-rw-r--r--xorg-server/hw/xfree86/parser/scan.c36
-rw-r--r--xorg-server/hw/xfree86/parser/write.c14
-rw-r--r--xorg-server/hw/xfree86/parser/xf86Optrec.h18
-rw-r--r--xorg-server/hw/xfree86/parser/xf86Parser.h18
-rw-r--r--xorg-server/hw/xfree86/parser/xf86tokens.h18
-rw-r--r--xorg-server/hw/xfree86/ramdac/IBM.c4
-rw-r--r--xorg-server/hw/xfree86/ramdac/TI.c2
-rw-r--r--xorg-server/hw/xfree86/ramdac/xf86Cursor.c6
-rw-r--r--xorg-server/hw/xfree86/ramdac/xf86HWCurs.c2
-rw-r--r--xorg-server/hw/xfree86/ramdac/xf86RamDac.h4
-rw-r--r--xorg-server/hw/xfree86/sdksyms.sh3
-rw-r--r--xorg-server/hw/xfree86/shadowfb/shadowfb.h2
-rw-r--r--xorg-server/hw/xfree86/utils/gtf/gtf.c26
-rw-r--r--xorg-server/hw/xfree86/vbe/vbe.c4
-rw-r--r--xorg-server/hw/xfree86/vbe/vbe.h4
-rw-r--r--xorg-server/hw/xfree86/vgahw/vgaHW.c8
-rw-r--r--xorg-server/hw/xfree86/vgahw/vgaHW.h2
-rw-r--r--xorg-server/hw/xfree86/x86emu/debug.c4
-rw-r--r--xorg-server/hw/xfree86/x86emu/ops.c22
-rw-r--r--xorg-server/hw/xfree86/x86emu/prim_ops.c70
-rw-r--r--xorg-server/hw/xfree86/x86emu/sys.c6
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/regs.h10
-rw-r--r--xorg-server/hw/xnest/Color.c2
-rw-r--r--xorg-server/hw/xnest/GC.c56
-rw-r--r--xorg-server/hw/xnest/XNGC.h1
-rw-r--r--xorg-server/hw/xnest/Xnest.h2
-rw-r--r--xorg-server/hw/xquartz/darwin.c8
-rw-r--r--xorg-server/hw/xquartz/darwinEvents.c4
-rw-r--r--xorg-server/hw/xwayland/xwayland.c1
-rw-r--r--xorg-server/hw/xwin/InitInput.c2
-rw-r--r--xorg-server/hw/xwin/InitOutput.c10
-rw-r--r--xorg-server/hw/xwin/ddraw.h6
-rw-r--r--xorg-server/hw/xwin/glx/glshim.c3
-rw-r--r--xorg-server/hw/xwin/win.h2
-rw-r--r--xorg-server/hw/xwin/winSetAppUserModelID.c2
-rw-r--r--xorg-server/hw/xwin/winclipboard/xevents.c3
-rw-r--r--xorg-server/hw/xwin/wincmap.c2
-rw-r--r--xorg-server/hw/xwin/winconfig.c10
-rw-r--r--xorg-server/hw/xwin/wincreatewnd.c4
-rw-r--r--xorg-server/hw/xwin/wincursor.c10
-rw-r--r--xorg-server/hw/xwin/windialogs.c12
-rw-r--r--xorg-server/hw/xwin/winlayouts.h2
-rw-r--r--xorg-server/hw/xwin/winmsgwindow.c5
-rw-r--r--xorg-server/hw/xwin/winmultiwindowicons.c4
-rw-r--r--xorg-server/hw/xwin/winmultiwindowshape.c2
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwindow.c20
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwm.c2
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwndproc.c4
-rw-r--r--xorg-server/hw/xwin/winprefs.c2
-rw-r--r--xorg-server/hw/xwin/winprefslex.l2
-rw-r--r--xorg-server/hw/xwin/winprefsyacc.y11
-rw-r--r--xorg-server/hw/xwin/winscrinit.c4
-rw-r--r--xorg-server/hw/xwin/winshaddd.c8
-rw-r--r--xorg-server/hw/xwin/winshadddnl.c8
-rw-r--r--xorg-server/hw/xwin/winshadgdi.c10
-rw-r--r--xorg-server/hw/xwin/winwin32rootlesswndproc.c2
-rw-r--r--xorg-server/hw/xwin/winwindowswm.c2
-rw-r--r--xorg-server/hw/xwin/winwndproc.c8
-rw-r--r--xorg-server/include/closure.h8
-rw-r--r--xorg-server/include/colormap.h8
-rw-r--r--xorg-server/include/colormapst.h8
-rw-r--r--xorg-server/include/cursor.h8
-rw-r--r--xorg-server/include/cursorstr.h10
-rw-r--r--xorg-server/include/dbus-core.h2
-rw-r--r--xorg-server/include/dix.h8
-rw-r--r--xorg-server/include/extension.h8
-rw-r--r--xorg-server/include/extnsionst.h10
-rw-r--r--xorg-server/include/gc.h8
-rw-r--r--xorg-server/include/gcstruct.h25
-rw-r--r--xorg-server/include/input.h8
-rw-r--r--xorg-server/include/inputstr.h14
-rw-r--r--xorg-server/include/list.h2
-rw-r--r--xorg-server/include/misc.h18
-rw-r--r--xorg-server/include/miscstruct.h8
-rw-r--r--xorg-server/include/os.h8
-rw-r--r--xorg-server/include/pixmap.h8
-rw-r--r--xorg-server/include/pixmapstr.h10
-rw-r--r--xorg-server/include/property.h8
-rw-r--r--xorg-server/include/propertyst.h10
-rw-r--r--xorg-server/include/region.h8
-rw-r--r--xorg-server/include/regionstr.h2
-rw-r--r--xorg-server/include/resource.h10
-rw-r--r--xorg-server/include/rgb.h8
-rw-r--r--xorg-server/include/screenint.h8
-rw-r--r--xorg-server/include/scrnintstr.h8
-rw-r--r--xorg-server/include/selection.h10
-rw-r--r--xorg-server/include/servermd.h10
-rw-r--r--xorg-server/include/site.h14
-rw-r--r--xorg-server/include/window.h8
-rw-r--r--xorg-server/include/windowstr.h8
-rw-r--r--xorg-server/include/xkbfile.h18
-rw-r--r--xorg-server/include/xkbsrv.h16
-rw-r--r--xorg-server/include/xkbstr.h24
-rw-r--r--xorg-server/include/xsha1.h2
-rw-r--r--xorg-server/mi/Makefile.am11
-rw-r--r--xorg-server/mi/mi.h24
-rw-r--r--xorg-server/mi/miarc.c244
-rw-r--r--xorg-server/mi/mibitblt.c30
-rw-r--r--xorg-server/mi/micopy.c5
-rw-r--r--xorg-server/mi/micursor.c68
-rw-r--r--xorg-server/mi/midash.c9
-rw-r--r--xorg-server/mi/midispcur.c4
-rw-r--r--xorg-server/mi/miexpose.c18
-rw-r--r--xorg-server/mi/mifillarc.c5
-rw-r--r--xorg-server/mi/mifillarc.h9
-rw-r--r--xorg-server/mi/mifillrct.c8
-rw-r--r--xorg-server/mi/mifpoly.h50
-rw-r--r--xorg-server/mi/mifpolycon.c249
-rw-r--r--xorg-server/mi/migc.c45
-rw-r--r--xorg-server/mi/miglblt.c8
-rw-r--r--xorg-server/mi/miinitext.c8
-rw-r--r--xorg-server/mi/mioverlay.c2
-rw-r--r--xorg-server/mi/mipointer.c19
-rw-r--r--xorg-server/mi/mipoly.c627
-rw-r--r--xorg-server/mi/mipoly.h22
-rw-r--r--xorg-server/mi/mipolycon.c235
-rw-r--r--xorg-server/mi/mipolygen.c213
-rw-r--r--xorg-server/mi/mipolypnt.c8
-rw-r--r--xorg-server/mi/mipolyrect.c8
-rw-r--r--xorg-server/mi/mipolyseg.c10
-rw-r--r--xorg-server/mi/mipolytext.c8
-rw-r--r--xorg-server/mi/mipolyutil.c369
-rw-r--r--xorg-server/mi/mipushpxl.c8
-rw-r--r--xorg-server/mi/miscrinit.c2
-rw-r--r--xorg-server/mi/mispans.c526
-rw-r--r--xorg-server/mi/mispans.h87
-rw-r--r--xorg-server/mi/mistruct.h8
-rw-r--r--xorg-server/mi/mivaltree.c20
-rw-r--r--xorg-server/mi/miwideline.c526
-rw-r--r--xorg-server/mi/miwideline.h26
-rw-r--r--xorg-server/mi/miwindow.c8
-rw-r--r--xorg-server/mi/mizerclip.c8
-rw-r--r--xorg-server/mi/mizerline.c12
-rw-r--r--xorg-server/miext/damage/damage.c2
-rw-r--r--xorg-server/miext/rootless/rootless.h2
-rw-r--r--xorg-server/miext/rootless/rootlessGC.c2
-rw-r--r--xorg-server/miext/rootless/rootlessValTree.c32
-rw-r--r--xorg-server/miext/rootless/rootlessWindow.c6
-rw-r--r--xorg-server/miext/shadow/shrotate.c2
-rw-r--r--xorg-server/miext/sync/misyncfd.c4
-rw-r--r--xorg-server/os/WaitFor.c18
-rw-r--r--xorg-server/os/access.c58
-rw-r--r--xorg-server/os/busfault.c2
-rw-r--r--xorg-server/os/connection.c18
-rw-r--r--xorg-server/os/io.c10
-rw-r--r--xorg-server/os/log.c2
-rw-r--r--xorg-server/os/oscolor.c8
-rw-r--r--xorg-server/os/osdep.h8
-rw-r--r--xorg-server/os/osinit.c14
-rw-r--r--xorg-server/os/xdmcp.c2
-rw-r--r--xorg-server/present/present.c8
-rw-r--r--xorg-server/randr/randrstr.h20
-rw-r--r--xorg-server/randr/rrprovider.c2
-rw-r--r--xorg-server/randr/rrtransform.c2
-rw-r--r--xorg-server/randr/rrtransform.h2
-rw-r--r--xorg-server/randr/rrxinerama.c2
-rw-r--r--xorg-server/record/record.c20
-rw-r--r--xorg-server/render/animcur.c2
-rw-r--r--xorg-server/render/glyph.c2
-rw-r--r--xorg-server/render/glyphstr.h2
-rw-r--r--xorg-server/render/mipict.h2
-rw-r--r--xorg-server/render/picture.c2
-rw-r--r--xorg-server/render/picture.h8
-rw-r--r--xorg-server/render/render.c4
-rw-r--r--xorg-server/xfixes/cursor.c22
-rw-r--r--xorg-server/xfixes/region.c13
-rw-r--r--xorg-server/xkb/XKBAlloc.c16
-rw-r--r--xorg-server/xkb/XKBGAlloc.c16
-rw-r--r--xorg-server/xkb/XKBMAlloc.c18
-rw-r--r--xorg-server/xkb/XKBMisc.c16
-rw-r--r--xorg-server/xkb/ddxBeep.c16
-rw-r--r--xorg-server/xkb/ddxCtrls.c16
-rw-r--r--xorg-server/xkb/ddxKillSrv.c16
-rw-r--r--xorg-server/xkb/ddxLEDs.c16
-rw-r--r--xorg-server/xkb/ddxLoad.c16
-rw-r--r--xorg-server/xkb/ddxVT.c16
-rw-r--r--xorg-server/xkb/maprules.c18
-rw-r--r--xorg-server/xkb/xkb.c18
-rw-r--r--xorg-server/xkb/xkbAccessX.c18
-rw-r--r--xorg-server/xkb/xkbActions.c16
-rw-r--r--xorg-server/xkb/xkbEvents.c16
-rw-r--r--xorg-server/xkb/xkbInit.c22
-rw-r--r--xorg-server/xkb/xkbLEDs.c44
-rw-r--r--xorg-server/xkb/xkbPrKeyEv.c16
-rw-r--r--xorg-server/xkb/xkbSwap.c16
-rw-r--r--xorg-server/xkb/xkbUtils.c16
-rw-r--r--xorg-server/xkb/xkbfmisc.c18
-rw-r--r--xorg-server/xkb/xkbgeom.h16
-rw-r--r--xorg-server/xkb/xkbout.c18
-rw-r--r--xorg-server/xkb/xkbtext.c18
-rw-r--r--xorg-server/xkb/xkmread.c18
-rw-r--r--xorg-server/xkeyboard-config/README54
413 files changed, 5855 insertions, 5462 deletions
diff --git a/xorg-server/Xext/dpms.c b/xorg-server/Xext/dpms.c
index 5f1a35d9c..cdfaa9724 100644
--- a/xorg-server/Xext/dpms.c
+++ b/xorg-server/Xext/dpms.c
@@ -14,14 +14,14 @@ all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
-BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-Except as contained in this notice, the name of Digital Equipment Corporation
+Except as contained in this notice, the name of Digital Equipment Corporation
shall not be used in advertising or otherwise to promote the sale, use or other
-dealings in this Software without prior written authorization from Digital
+dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
diff --git a/xorg-server/Xext/dpmsstubs.c b/xorg-server/Xext/dpmsstubs.c
index 80f13f5df..f05d1e9f9 100644
--- a/xorg-server/Xext/dpmsstubs.c
+++ b/xorg-server/Xext/dpmsstubs.c
@@ -14,14 +14,14 @@ all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
-BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-Except as contained in this notice, the name of Digital Equipment Corporation
+Except as contained in this notice, the name of Digital Equipment Corporation
shall not be used in advertising or otherwise to promote the sale, use or other
-dealings in this Software without prior written authorization from Digital
+dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
diff --git a/xorg-server/Xext/panoramiX.c b/xorg-server/Xext/panoramiX.c
index 4d79c4654..2bbae2f5e 100644
--- a/xorg-server/Xext/panoramiX.c
+++ b/xorg-server/Xext/panoramiX.c
@@ -427,7 +427,7 @@ XineramaReinitData(void)
/*
* PanoramiXExtensionInit():
- * Called from InitExtensions in main().
+ * Called from InitExtensions in main().
* Register PanoramiXeen Extension
* Initialize global variables.
*/
diff --git a/xorg-server/Xext/panoramiX.h b/xorg-server/Xext/panoramiX.h
index 6578dfa17..c16b9a5e2 100644
--- a/xorg-server/Xext/panoramiX.h
+++ b/xorg-server/Xext/panoramiX.h
@@ -28,7 +28,7 @@ Equipment Corporation.
/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
-/*
+/*
* PanoramiX definitions
*/
diff --git a/xorg-server/Xext/panoramiXprocs.c b/xorg-server/Xext/panoramiXprocs.c
index 0122ff3a8..413a66afb 100644
--- a/xorg-server/Xext/panoramiXprocs.c
+++ b/xorg-server/Xext/panoramiXprocs.c
@@ -509,7 +509,7 @@ PanoramiXConfigureWindow(ClientPtr client)
}
}
- /* have to go forward or you get expose events before
+ /* have to go forward or you get expose events before
ConfigureNotify events */
FOR_NSCREENS_FORWARD(j) {
stuff->window = win->info[j].id;
@@ -1037,7 +1037,7 @@ PanoramiXClearToBackground(ClientPtr client)
return result;
}
-/*
+/*
For Window to Pixmap copies you're screwed since each screen's
pixmap will look like what it sees on its screen. Unless the
screens overlap and the window lies on each, the two copies
diff --git a/xorg-server/Xext/security.c b/xorg-server/Xext/security.c
index bf2ab2e51..cce7c467d 100644
--- a/xorg-server/Xext/security.c
+++ b/xorg-server/Xext/security.c
@@ -928,12 +928,12 @@ SecurityReceive(CallbackListPtr *pcbl, void *unused, void *calldata)
* Returns: nothing.
*
* Side Effects:
- *
+ *
* If a new client is connecting, its authorization ID is copied to
* client->authID. If this is a generated authorization, its reference
* count is bumped, its timer is cancelled if it was running, and its
* trustlevel is copied to TRUSTLEVEL(client).
- *
+ *
* If a client is disconnecting and the client was using a generated
* authorization, the authorization's reference count is decremented, and
* if it is now zero, the timer for this authorization is started.
diff --git a/xorg-server/Xext/shm.c b/xorg-server/Xext/shm.c
index 4dad8b6c6..db9d47450 100644
--- a/xorg-server/Xext/shm.c
+++ b/xorg-server/Xext/shm.c
@@ -248,21 +248,20 @@ ShmDestroyPixmap(PixmapPtr pPixmap)
{
ScreenPtr pScreen = pPixmap->drawable.pScreen;
ShmScrPrivateRec *screen_priv = ShmGetScreenPriv(pScreen);
+ void *shmdesc = NULL;
Bool ret;
- if (pPixmap->refcnt == 1) {
- ShmDescPtr shmdesc;
-
- shmdesc = (ShmDescPtr) dixLookupPrivate(&pPixmap->devPrivates,
- shmPixmapPrivateKey);
- if (shmdesc)
- ShmDetachSegment((void *) shmdesc, pPixmap->drawable.id);
- }
+ if (pPixmap->refcnt == 1)
+ shmdesc = dixLookupPrivate(&pPixmap->devPrivates, shmPixmapPrivateKey);
pScreen->DestroyPixmap = screen_priv->destroyPixmap;
ret = (*pScreen->DestroyPixmap) (pPixmap);
screen_priv->destroyPixmap = pScreen->DestroyPixmap;
pScreen->DestroyPixmap = ShmDestroyPixmap;
+
+ if (shmdesc)
+ ShmDetachSegment(shmdesc, pPixmap->drawable.id);
+
return ret;
}
@@ -405,7 +404,7 @@ ProcShmAttach(ClientPtr client)
}
/* The attach was performed with root privs. We must
- * do manual checking of access rights for the credentials
+ * do manual checking of access rights for the credentials
* of the client */
if (shm_access(client, &(SHM_PERM(buf)), stuff->readOnly) == -1) {
@@ -1148,7 +1147,7 @@ ProcShmAttachFd(ClientPtr client)
fd, 0);
close(fd);
- if ((shmdesc->addr == ((char *) -1))) {
+ if (shmdesc->addr == ((char *) -1)) {
free(shmdesc);
return BadAccess;
}
@@ -1238,7 +1237,7 @@ ProcShmCreateSegment(ClientPtr client)
MAP_SHARED,
fd, 0);
- if ((shmdesc->addr == ((char *) -1))) {
+ if (shmdesc->addr == ((char *) -1)) {
close(fd);
free(shmdesc);
return BadAccess;
diff --git a/xorg-server/Xext/sync.c b/xorg-server/Xext/sync.c
index 755ed94a1..ba08cd1bb 100644
--- a/xorg-server/Xext/sync.c
+++ b/xorg-server/Xext/sync.c
@@ -2715,7 +2715,7 @@ IdleTimeBlockHandler(void *pCounter, struct timeval **wt, void *LastSelectMask)
break;
}
}
- /*
+ /*
* We've been called exactly on the idle time, but we have a
* NegativeTransition trigger which requires a transition from an
* idle time greater than this. Schedule a wakeup for the next
diff --git a/xorg-server/Xext/syncsrv.h b/xorg-server/Xext/syncsrv.h
index 8c2c00df0..a8062d1c6 100644
--- a/xorg-server/Xext/syncsrv.h
+++ b/xorg-server/Xext/syncsrv.h
@@ -30,13 +30,13 @@ and Olivetti Research Limited, Cambridge, England.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Digital or Olivetti
not be used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
diff --git a/xorg-server/Xext/xres.c b/xorg-server/Xext/xres.c
index 546b942a1..273793806 100644
--- a/xorg-server/Xext/xres.c
+++ b/xorg-server/Xext/xres.c
@@ -358,8 +358,8 @@ ResGetApproxPixmapBytes(PixmapPtr pix)
bytesPerPixel = (float)pix->drawable.bitsPerPixel / 8.0;
nPixels = pix->drawable.width * pix->drawable.height;
- /* Divide by refcnt as pixmap could be shared between clients,
- * so total pixmap mem is shared between these.
+ /* Divide by refcnt as pixmap could be shared between clients,
+ * so total pixmap mem is shared between these.
*/
return (nPixels * bytesPerPixel) / pix->refcnt;
}
@@ -375,7 +375,7 @@ ResFindResourcePixmaps(void *value, XID id, RESTYPE type, void *cdata)
*bytes += size.pixmapRefSize;
}
-static void
+static void
ResFindPixmaps(void *value, XID id, void *cdata)
{
unsigned long *bytes = (unsigned long *) cdata;
@@ -448,13 +448,13 @@ ProcXResQueryClientPixmapBytes(ClientPtr client)
FindClientResourcesByType(clients[clientID], RT_PIXMAP, ResFindPixmaps,
(void *) (&bytes));
- /*
- * Make sure win background pixmaps also held to account.
+ /*
+ * Make sure win background pixmaps also held to account.
*/
FindClientResourcesByType(clients[clientID], RT_WINDOW,
ResFindWindowPixmaps, (void *) (&bytes));
- /*
+ /*
* GC Tile & Stipple pixmaps too.
*/
FindClientResourcesByType(clients[clientID], RT_GC,
diff --git a/xorg-server/Xext/xvdisp.c b/xorg-server/Xext/xvdisp.c
index 0bdfed370..86f982ae2 100644
--- a/xorg-server/Xext/xvdisp.c
+++ b/xorg-server/Xext/xvdisp.c
@@ -4,13 +4,13 @@ and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Digital or MIT not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/Xext/xvdix.h b/xorg-server/Xext/xvdix.h
index e67a3c766..621a1e3a3 100644
--- a/xorg-server/Xext/xvdix.h
+++ b/xorg-server/Xext/xvdix.h
@@ -4,13 +4,13 @@ and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Digital or MIT not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -25,18 +25,18 @@ SOFTWARE.
#ifndef XVDIX_H
#define XVDIX_H
/*
-** File:
+** File:
**
** xvdix.h --- Xv device independent header file
**
-** Author:
+** Author:
**
** David Carver (Digital Workstation Engineering/Project Athena)
**
** Revisions:
**
** 29.08.91 Carver
-** - removed UnrealizeWindow wrapper unrealizing windows no longer
+** - removed UnrealizeWindow wrapper unrealizing windows no longer
** preempts video
**
** 11.06.91 Carver
diff --git a/xorg-server/Xext/xvmain.c b/xorg-server/Xext/xvmain.c
index bc176c852..0abf190dc 100644
--- a/xorg-server/Xext/xvmain.c
+++ b/xorg-server/Xext/xvmain.c
@@ -4,13 +4,13 @@ and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Digital or MIT not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -23,11 +23,11 @@ SOFTWARE.
******************************************************************/
/*
-** File:
+** File:
**
** xvmain.c --- Xv server extension main device independent module.
-**
-** Author:
+**
+** Author:
**
** David Carver (Digital Workstation Engineering/Project Athena)
**
@@ -58,7 +58,7 @@ SOFTWARE.
**
** 24.01.91 Carver
** - version 1.4 upgrade
-**
+**
** Notes:
**
** Port structures reference client structures in a two different
@@ -86,7 +86,7 @@ SOFTWARE.
#include "scrnintstr.h"
#include "windowstr.h"
#include "pixmapstr.h"
-#include "gc.h"
+#include "gcstruct.h"
#include "extnsionst.h"
#include "extinit.h"
#include "dixstruct.h"
@@ -915,7 +915,7 @@ XvdiSelectPortNotify(ClientPtr client, XvPortPtr pPort, BOOL onoff)
return Success;
}
- /* DIDN'T FIND IT; SO REUSE LIST ELEMENT IF ONE IS FREE OTHERWISE
+ /* DIDN'T FIND IT; SO REUSE LIST ELEMENT IF ONE IS FREE OTHERWISE
CREATE A NEW ONE AND ADD IT TO THE BEGINNING OF THE LIST */
if (!tpn) {
diff --git a/xorg-server/composite/compalloc.c b/xorg-server/composite/compalloc.c
index dfbff06ca..8daded0a5 100644
--- a/xorg-server/composite/compalloc.c
+++ b/xorg-server/composite/compalloc.c
@@ -156,7 +156,7 @@ compRedirectWindow(ClientPtr pClient, WindowPtr pWin, int update)
return BadAccess;
/*
- * Allocate per-client per-window structure
+ * Allocate per-client per-window structure
* The client *could* allocate multiple, but while supported,
* it is not expected to be common
*/
@@ -353,7 +353,7 @@ compRedirectSubwindows(ClientPtr pClient, WindowPtr pWin, int update)
if (ccw->update == CompositeRedirectManual)
return BadAccess;
/*
- * Allocate per-client per-window structure
+ * Allocate per-client per-window structure
* The client *could* allocate multiple, but while supported,
* it is not expected to be common
*/
@@ -401,7 +401,7 @@ compRedirectSubwindows(ClientPtr pClient, WindowPtr pWin, int update)
return BadAlloc;
if (ccw->update == CompositeRedirectManual) {
csw->update = CompositeRedirectManual;
- /*
+ /*
* tell damage extension that damage events for this client are
* critical output
*/
@@ -430,7 +430,7 @@ compFreeClientSubwindows(WindowPtr pWin, XID id)
*prev = ccw->next;
if (ccw->update == CompositeRedirectManual) {
- /*
+ /*
* tell damage extension that damage events for this client are
* critical output
*/
diff --git a/xorg-server/composite/compext.c b/xorg-server/composite/compext.c
index fcfc3496a..f1a825573 100644
--- a/xorg-server/composite/compext.c
+++ b/xorg-server/composite/compext.c
@@ -299,7 +299,7 @@ ProcCompositeGetOverlayWindow(ClientPtr client)
VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess);
pScreen = pWin->drawable.pScreen;
- /*
+ /*
* Create an OverlayClient structure to mark this client's
* interest in the overlay window
*/
@@ -351,7 +351,7 @@ ProcCompositeReleaseOverlayWindow(ClientPtr client)
REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq);
VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess);
- /*
+ /*
* Has client queried a reference to the overlay window
* on this screen? If not, generate an error.
*/
diff --git a/xorg-server/composite/compinit.c b/xorg-server/composite/compinit.c
index 111c16e5d..3ac075a46 100644
--- a/xorg-server/composite/compinit.c
+++ b/xorg-server/composite/compinit.c
@@ -78,6 +78,7 @@ compCloseScreen(ScreenPtr pScreen)
pScreen->PositionWindow = cs->PositionWindow;
pScreen->GetImage = cs->GetImage;
+ pScreen->GetSpans = cs->GetSpans;
pScreen->SourceValidate = cs->SourceValidate;
free(cs);
@@ -151,6 +152,21 @@ compGetImage(DrawablePtr pDrawable,
}
static void
+compGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth,
+ int nspans, char *pdstStart)
+{
+ ScreenPtr pScreen = pDrawable->pScreen;
+ CompScreenPtr cs = GetCompScreen(pScreen);
+
+ pScreen->GetSpans = cs->GetSpans;
+ if (pDrawable->type == DRAWABLE_WINDOW)
+ compPaintChildrenToWindow((WindowPtr) pDrawable);
+ (*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
+ cs->GetSpans = pScreen->GetSpans;
+ pScreen->GetSpans = compGetSpans;
+}
+
+static void
compSourceValidate(DrawablePtr pDrawable,
int x, int y,
int width, int height, unsigned int subWindowMode)
@@ -193,7 +209,7 @@ compFindVisuallessDepth(ScreenPtr pScreen, int d)
}
}
/*
- * If there isn't one, then it's gonna be hard to have
+ * If there isn't one, then it's gonna be hard to have
* an associated visual
*/
return 0;
@@ -432,6 +448,9 @@ compScreenInit(ScreenPtr pScreen)
cs->GetImage = pScreen->GetImage;
pScreen->GetImage = compGetImage;
+ cs->GetSpans = pScreen->GetSpans;
+ pScreen->GetSpans = compGetSpans;
+
cs->SourceValidate = pScreen->SourceValidate;
pScreen->SourceValidate = compSourceValidate;
diff --git a/xorg-server/composite/compint.h b/xorg-server/composite/compint.h
index 56b76c540..09241f2a2 100644
--- a/xorg-server/composite/compint.h
+++ b/xorg-server/composite/compint.h
@@ -76,7 +76,7 @@
/*
* enable this for debugging
-
+
#define COMPOSITE_DEBUG
*/
@@ -168,6 +168,7 @@ typedef struct _CompScreen {
CompOverlayClientPtr pOverlayClients;
GetImageProcPtr GetImage;
+ GetSpansProcPtr GetSpans;
SourceValidateProcPtr SourceValidate;
} CompScreenRec, *CompScreenPtr;
diff --git a/xorg-server/composite/compoverlay.c b/xorg-server/composite/compoverlay.c
index 7932dda8d..20c860d5f 100644
--- a/xorg-server/composite/compoverlay.c
+++ b/xorg-server/composite/compoverlay.c
@@ -52,7 +52,7 @@
#include "panoramiXsrv.h"
#endif
-/*
+/*
* Delete the given overlay client list element from its screen list.
*/
void
@@ -110,7 +110,7 @@ compCreateOverlayClient(ScreenPtr pScreen, ClientPtr pClient)
pOc->pNext = cs->pOverlayClients;
cs->pOverlayClients = pOc;
- /*
+ /*
* Create a resource for this element so it can be deleted
* when the client goes away.
*/
diff --git a/xorg-server/composite/compwindow.c b/xorg-server/composite/compwindow.c
index 9a6b2dae8..77bdfa23c 100644
--- a/xorg-server/composite/compwindow.c
+++ b/xorg-server/composite/compwindow.c
@@ -567,10 +567,11 @@ compCreateWindow(WindowPtr pWin)
if (pWin->parent && ret) {
CompSubwindowsPtr csw = GetCompSubwindows(pWin->parent);
CompClientWindowPtr ccw;
+ PixmapPtr parent_pixmap = (*pScreen->GetWindowPixmap)(pWin->parent);
+ PixmapPtr window_pixmap = (*pScreen->GetWindowPixmap)(pWin);
- (*pScreen->SetWindowPixmap) (pWin,
- (*pScreen->GetWindowPixmap) (pWin->
- parent));
+ if (window_pixmap != parent_pixmap)
+ (*pScreen->SetWindowPixmap) (pWin, parent_pixmap);
if (csw)
for (ccw = csw->clients; ccw; ccw = ccw->next)
compRedirectWindow(clients[CLIENT_ID(ccw->id)],
diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac
index ac68f17b6..140e33e45 100644
--- a/xorg-server/configure.ac
+++ b/xorg-server/configure.ac
@@ -26,9 +26,9 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.60)
-AC_INIT([xorg-server], 1.16.99.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2014-07-17"
-RELEASE_NAME="Baba Ghanouj"
+AC_INIT([xorg-server], 1.16.99.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2014-10-28"
+RELEASE_NAME="Chanterelle"
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
@@ -698,6 +698,7 @@ case $host_os in
CONFIG_UDEV=no
CONFIG_UDEV_KMS=no
DGA=no
+ DRM=no
DRI2=no
DRI3=no
INT10MODULE=no
@@ -1993,11 +1994,13 @@ if test "x$XORG" = xyes; then
gnu*)
XORG_OS_SUBDIR="hurd"
;;
+ cygwin*)
+ XORG_OS_SUBDIR="stub"
+ ;;
*)
XORG_OS_SUBDIR="stub"
AC_MSG_NOTICE([m4_text_wrap(m4_join([ ],
- [Your OS is unknown. Xorg currently only supports Linux,],
- [Free/Open/Net/DragonFlyBSD, Solaris/OpenSolaris, & GNU Hurd.],
+ [Your OS is unknown.],
[If you are interested in porting Xorg to your platform,],
[please email xorg@lists.freedesktop.org.]))])
;;
@@ -2553,6 +2556,7 @@ hw/xfree86/dixmods/Makefile
hw/xfree86/doc/Makefile
hw/xfree86/dri/Makefile
hw/xfree86/dri2/Makefile
+hw/xfree86/dri2/pci_ids/Makefile
hw/xfree86/drivers/Makefile
hw/xfree86/drivers/modesetting/Makefile
hw/xfree86/exa/Makefile
diff --git a/xorg-server/dbe/dbe.c b/xorg-server/dbe/dbe.c
index 8896720e7..527588c3c 100644
--- a/xorg-server/dbe/dbe.c
+++ b/xorg-server/dbe/dbe.c
@@ -1,5 +1,5 @@
/******************************************************************************
- *
+ *
* Copyright (c) 1994, 1995 Hewlett-Packard Company
*
* Permission is hereby granted, free of charge, to any person obtaining
@@ -9,10 +9,10 @@
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -20,12 +20,12 @@
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Hewlett-Packard
* Company shall not be used in advertising or otherwise to promote the
* sale, use or other dealings in this Software without prior written
* authorization from the Hewlett-Packard Company.
- *
+ *
* DIX DBE code
*
*****************************************************************************/
@@ -152,7 +152,7 @@ ProcDbeGetVersion(ClientPtr client)
* BadIDChoice - id is out of range for client; id is already in use
* BadMatch - window is not an InputOutput window;
* visual of window is not on list returned by
- * DBEGetVisualInfo;
+ * DBEGetVisualInfo;
* BadValue - invalid swap action is specified
* BadWindow - window is not a valid window
* Success
@@ -835,7 +835,7 @@ SProcDbeGetVersion(ClientPtr client)
* BadIDChoice - id is out of range for client; id is already in use
* BadMatch - window is not an InputOutput window;
* visual of window is not on list returned by
- * DBEGetVisualInfo;
+ * DBEGetVisualInfo;
* BadValue - invalid swap action is specified
* BadWindow - window is not a valid window
* Success
@@ -1058,7 +1058,7 @@ SProcDbeDispatch(ClientPtr client)
*
* TRUE - setup was successful
* FALSE - the window's background state is NONE
- *
+ *
*****************************************************************************/
static Bool
diff --git a/xorg-server/dbe/dbestruct.h b/xorg-server/dbe/dbestruct.h
index 200206652..fe2ef0af6 100644
--- a/xorg-server/dbe/dbestruct.h
+++ b/xorg-server/dbe/dbestruct.h
@@ -1,5 +1,5 @@
/******************************************************************************
- *
+ *
* Copyright (c) 1994, 1995 Hewlett-Packard Company
*
* Permission is hereby granted, free of charge, to any person obtaining
@@ -9,10 +9,10 @@
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -20,12 +20,12 @@
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Hewlett-Packard
* Company shall not be used in advertising or otherwise to promote the
* sale, use or other dealings in this Software without prior written
* authorization from the Hewlett-Packard Company.
- *
+ *
* Header file for DIX-related DBE
*
*****************************************************************************/
@@ -139,7 +139,7 @@ typedef struct _DbeWindowPrivRec {
* possibly resulting in a page swap and loss of performance. Initially we
* will use this array to store buffer IDs. For situations where we have
* more IDs than can fit in this static array, we will allocate a larger
- * array to use, possibly suffering a performance loss.
+ * array to use, possibly suffering a performance loss.
*/
XID initIDs[DBE_INIT_MAX_IDS];
diff --git a/xorg-server/dbe/midbe.c b/xorg-server/dbe/midbe.c
index 0479ecc5e..8f759107a 100644
--- a/xorg-server/dbe/midbe.c
+++ b/xorg-server/dbe/midbe.c
@@ -1,5 +1,5 @@
/******************************************************************************
- *
+ *
* Copyright (c) 1994, 1995 Hewlett-Packard Company
*
* Permission is hereby granted, free of charge, to any person obtaining
@@ -9,10 +9,10 @@
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -20,12 +20,12 @@
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Hewlett-Packard
* Company shall not be used in advertising or otherwise to promote the
* sale, use or other dealings in this Software without prior written
* authorization from the Hewlett-Packard Company.
- *
+ *
* Machine-independent DBE code
*
*****************************************************************************/
@@ -396,7 +396,7 @@ miDbeSwapBuffers(ClientPtr client, int *pNumWindows, DbeSwapInfoPtr swapInfo)
* resource deletion easier. It is not guaranteed which delete function is
* called first. Hence, we will let miDbeWinPrivDelete() free all DBE
* resources.
- *
+ *
* This function deletes/frees the following stuff associated with
* the window private:
*
@@ -443,7 +443,7 @@ miDbeWinPrivDelete(DbeWindowPrivPtr pDbeWindowPriv, XID bufId)
*
* Description:
*
- * This function was cloned from miMbxPositionWindow() in mimultibuf.c.
+ * This function was cloned from miMbxPositionWindow() in mimultibuf.c.
* This function resizes the buffer when the window is resized.
*
*****************************************************************************/
diff --git a/xorg-server/dbe/midbe.h b/xorg-server/dbe/midbe.h
index 4eed538d0..67320eabf 100644
--- a/xorg-server/dbe/midbe.h
+++ b/xorg-server/dbe/midbe.h
@@ -8,10 +8,10 @@
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -19,12 +19,12 @@
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Hewlett-Packard
* Company shall not be used in advertising or otherwise to promote the
* sale, use or other dealings in this Software without prior written
* authorization from the Hewlett-Packard Company.
- *
+ *
* Header file for users of machine-independent DBE code
*
*****************************************************************************/
diff --git a/xorg-server/dix/atom.c b/xorg-server/dix/atom.c
index 6f85968cd..22cd0dc0e 100644
--- a/xorg-server/dix/atom.c
+++ b/xorg-server/dix/atom.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/dix/colormap.c b/xorg-server/dix/colormap.c
index c1ff88e1a..4d408d5d2 100644
--- a/xorg-server/dix/colormap.c
+++ b/xorg-server/dix/colormap.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -181,11 +181,11 @@ static void FindColorInRootCmap(ColormapPtr /* pmap */ ,
#define RGBMASK(vis) (vis->redMask | vis->greenMask | vis->blueMask | ALPHAMASK(vis))
-/* GetNextBitsOrBreak(bits, mask, base) --
+/* GetNextBitsOrBreak(bits, mask, base) --
* (Suggestion: First read the macro, then read this explanation.
*
* Either generate the next value to OR in to a pixel or break out of this
- * while loop
+ * while loop
*
* This macro is used when we're trying to generate all 2^n combinations of
* bits in mask. What we're doing here is counting in binary, except that
@@ -197,11 +197,11 @@ static void FindColorInRootCmap(ColormapPtr /* pmap */ ,
* base has 1 bit set where the least significant bit of mask is set
*
* For example,if mask is 01010, base should be 0010 and we count like this:
- * 00010 (see this isn't so hard),
+ * 00010 (see this isn't so hard),
* then we add base to bits and get 0100. (bits & ~mask) is (0100 & 0100) so
* we add that to bits getting (0100 + 0100) =
* 01000 for our next value.
- * then we add 0010 to get
+ * then we add 0010 to get
* 01010 and we're done (easy as 1, 2, 3)
*/
#define GetNextBitsOrBreak(bits, mask, base) \
@@ -225,9 +225,9 @@ typedef struct _colorResource {
* fShared should only be set if refcnt == AllocPrivate, and only in red map
*/
-/**
- * Create and initialize the color map
- *
+/**
+ * Create and initialize the color map
+ *
* \param mid resource to use for this colormap
* \param alloc 1 iff all entries are allocated writable
*/
@@ -370,7 +370,7 @@ CreateColormap(Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
if (!AddResource(mid, RT_COLORMAP, (void *) pmap))
return BadAlloc;
- /*
+ /*
* Security creation/labeling check
*/
i = XaceHook(XACE_RESOURCE_ACCESS, clients[client], mid, RT_COLORMAP,
@@ -1456,7 +1456,7 @@ FreePixels(ColormapPtr pmap, int client)
}
}
-/**
+/**
* Frees all of a client's colors and cells.
*
* \param value must conform to DeleteType
@@ -1574,7 +1574,7 @@ AllocColorPlanes(int client, ColormapPtr pmap, int colors,
/* Allocate the proper pixels */
/* XXX This is sort of bad, because of contig is set, we force all
* r + g + b bits to be contiguous. Should only force contiguity
- * per mask
+ * per mask
*/
ok = AllocPseudo(client, pmap, colors, r + g + b, contig, pixels,
&mask, &ppixFirst);
@@ -1786,7 +1786,7 @@ AllocPseudo(int client, ColormapPtr pmap, int c, int r, Bool contig,
* pixels are the unique pixels. *pMask has the mask to Or with the
* unique pixels to get the rest of them.
*
- * Returns True iff all pixels could be allocated
+ * Returns True iff all pixels could be allocated
* All cells allocated will have refcnt set to AllocPrivate and shared to FALSE
* (see AllocShared for why we care)
*/
@@ -2056,7 +2056,7 @@ AllocShared(ColormapPtr pmap, Pixel * ppix, int c, int r, int g, int b,
}
/** FreeColors
- * Free colors and/or cells (probably slow for large numbers)
+ * Free colors and/or cells (probably slow for large numbers)
*/
int
FreeColors(ColormapPtr pmap, int client, int count, Pixel * pixels, Pixel mask)
@@ -2097,7 +2097,7 @@ FreeColors(ColormapPtr pmap, int client, int count, Pixel * pixels, Pixel mask)
/**
* Helper for FreeColors -- frees all combinations of *newpixels and mask bits
* which the client has allocated in channel colormap cells of pmap.
- * doesn't change newpixels if it doesn't need to
+ * doesn't change newpixels if it doesn't need to
*
* \param pmap which colormap head
* \param color which sub-map, eg, RED, BLUE, PSEUDO
diff --git a/xorg-server/dix/cursor.c b/xorg-server/dix/cursor.c
index 56c560640..1525857e3 100644
--- a/xorg-server/dix/cursor.c
+++ b/xorg-server/dix/cursor.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index 3fb7ca0fb..c4fdbe169 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -2622,7 +2622,7 @@ GetPairedDevice(DeviceIntPtr dev)
* slave.
* - MASTER_KEYBOARD: the master keyboard for this device or NULL for a
* floating slave
- * - MASTER_POINTER: the master keyboard for this device or NULL for a
+ * - MASTER_POINTER: the master pointer for this device or NULL for a
* floating slave
* - POINTER_OR_FLOAT: the master pointer for this device or the device for
* a floating slave
diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c
index 74abecd67..d844a0942 100644
--- a/xorg-server/dix/dispatch.c
+++ b/xorg-server/dix/dispatch.c
@@ -26,13 +26,13 @@ Copyright 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -364,9 +364,9 @@ Dispatch(void)
clientReady[0] = SmartScheduleClient(clientReady, nready);
nready = 1;
}
- /*****************
- * Handle events in round robin fashion, doing input between
- * each round
+ /*****************
+ * Handle events in round robin fashion, doing input between
+ * each round
*****************/
while (!dispatchException && (--nready >= 0)) {
@@ -3198,7 +3198,7 @@ ProcChangeAccessControl(ClientPtr client)
/*********************
* CloseDownRetainedResources
*
- * Find all clients that are gone and have terminated in RetainTemporary
+ * Find all clients that are gone and have terminated in RetainTemporary
* and destroy their resources.
*********************/
diff --git a/xorg-server/dix/dispatch.h b/xorg-server/dix/dispatch.h
index 3f3f3a2d9..939a6b936 100644
--- a/xorg-server/dix/dispatch.h
+++ b/xorg-server/dix/dispatch.h
@@ -26,7 +26,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/*
* This prototypes the dispatch.c module (except for functions declared in
* global headers), plus related dispatch procedures from devices.c, events.c,
- * extension.c, property.c.
+ * extension.c, property.c.
*/
#ifdef HAVE_DIX_CONFIG_H
diff --git a/xorg-server/dix/dixfonts.c b/xorg-server/dix/dixfonts.c
index 1c6442c8f..bc2732fb9 100644
--- a/xorg-server/dix/dixfonts.c
+++ b/xorg-server/dix/dixfonts.c
@@ -806,7 +806,7 @@ ListFonts(ClientPtr client, unsigned char *pattern, unsigned length,
int i;
LFclosurePtr c;
- /*
+ /*
* The right error to return here would be BadName, however the
* specification does not allow for a Name error on this request.
* Perhaps a better solution would be to return a nil list, i.e.
@@ -1057,7 +1057,7 @@ StartListFontsWithInfo(ClientPtr client, int length, unsigned char *pattern,
int i;
LFWIclosurePtr c;
- /*
+ /*
* The right error to return here would be BadName, however the
* specification does not allow for a Name error on this request.
* Perhaps a better solution would be to return a nil list, i.e.
@@ -1851,7 +1851,7 @@ GetClientResolutions(int *num)
pScreen = screenInfo.screens[0];
res.x_resolution = (pScreen->width * 25.4) / pScreen->mmWidth;
/*
- * XXX - we'll want this as long as bitmap instances are prevalent
+ * XXX - we'll want this as long as bitmap instances are prevalent
so that we can match them from scalable fonts
*/
if (res.x_resolution < 88)
diff --git a/xorg-server/dix/dixutils.c b/xorg-server/dix/dixutils.c
index cdd370bd6..205550eb4 100644
--- a/xorg-server/dix/dixutils.c
+++ b/xorg-server/dix/dixutils.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -352,7 +352,7 @@ DeleteWindowFromAnySaveSet(WindowPtr pWin)
/* No-op Don't Do Anything : sometimes we need to be able to call a procedure
* that doesn't do anything. For example, on screen with only static
* colormaps, if someone calls install colormap, it's easier to have a dummy
- * procedure to call than to check if there's a procedure
+ * procedure to call than to check if there's a procedure
*/
void
NoopDDA(void)
@@ -373,7 +373,7 @@ static Bool inHandler;
static Bool handlerDeleted;
/**
- *
+ *
* \param pTimeout DIX doesn't want to know how OS represents time
* \param pReadMask nor how it represents the det of descriptors
*/
diff --git a/xorg-server/dix/extension.c b/xorg-server/dix/extension.c
index e43291eec..56e3abc14 100644
--- a/xorg-server/dix/extension.c
+++ b/xorg-server/dix/extension.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/dix/gc.c b/xorg-server/dix/gc.c
index 88d650121..78f3be29d 100644
--- a/xorg-server/dix/gc.c
+++ b/xorg-server/dix/gc.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -87,22 +87,22 @@ ValidateGC(DrawablePtr pDraw, GC * pGC)
* specified. ddxen can call this too; they should normally pass
* NullClient for the client since any access checking should have
* already been done at a higher level.
- *
+ *
* If you have any XIDs, you must use ChangeGCXIDs:
- *
+ *
* CARD32 v[2];
* v[0] = FillTiled;
* v[1] = pid;
* ChangeGCXIDs(client, pGC, GCFillStyle|GCTile, v);
- *
+ *
* However, if you need to pass a pointer to a pixmap or font, you must
* use ChangeGC:
- *
+ *
* ChangeGCVal v[2];
* v[0].val = FillTiled;
* v[1].ptr = pPixmap;
* ChangeGC(client, pGC, GCFillStyle|GCTile, v);
- *
+ *
* If you have neither XIDs nor pointers, you can use either function,
* but ChangeGC will do less work.
*
@@ -495,7 +495,6 @@ NewGCObject(ScreenPtr pScreen, int depth)
pGC->graphicsExposures = TRUE;
pGC->clipOrg.x = 0;
pGC->clipOrg.y = 0;
- pGC->clientClipType = CT_NONE;
pGC->clientClip = (void *) NULL;
pGC->numInDashList = 2;
pGC->dash = DefaultDash;
@@ -791,7 +790,7 @@ since we can't create them without already having a GC. any code
using the tile or stipple has to set them explicitly anyway,
since the state of the scratch gc is unknown. This is OK
because ChangeGC() has to be able to deal with NULL tiles and
-stipples anyway (in case the CreateGC() call has provided a
+stipples anyway (in case the CreateGC() call has provided a
value for them -- we can't set the default tile until the
client-supplied attributes are installed, since the fgPixel
is what fills the default tile. (maybe this comment should
@@ -1033,7 +1032,7 @@ SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects,
}
/*
- sets reasonable defaults
+ sets reasonable defaults
if we can get a pre-allocated one, use it and mark it as used.
if we can't, create one out of whole cloth (The Velveteen GC -- if
you use it often enough it will become real.)
@@ -1067,7 +1066,7 @@ GetScratchGC(unsigned depth, ScreenPtr pScreen)
pGC->graphicsExposures = FALSE;
pGC->clipOrg.x = 0;
pGC->clipOrg.y = 0;
- if (pGC->clientClipType != CT_NONE)
+ if (pGC->clientClip)
(*pGC->funcs->ChangeClip) (pGC, CT_NONE, NULL, 0);
pGC->stateChanges = GCAllBits;
return pGC;
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index ffa89fad2..dd9626526 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -1248,8 +1248,8 @@ transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask)
double x, y, ox, oy;
int has_x, has_y;
- has_x = valuator_mask_fetch_double(mask, 0, &ox);
- has_y = valuator_mask_fetch_double(mask, 1, &oy);
+ has_x = valuator_mask_isset(mask, 0);
+ has_y = valuator_mask_isset(mask, 1);
if (!has_x && !has_y)
return;
@@ -1263,23 +1263,23 @@ transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask)
pixman_f_transform_invert(&invert, &dev->scale_and_transform);
transform(&invert, &ox, &oy);
-
- x = ox;
- y = oy;
}
- if (valuator_mask_isset(mask, 0))
- ox = x = valuator_mask_get_double(mask, 0);
+ if (has_x)
+ ox = valuator_mask_get_double(mask, 0);
- if (valuator_mask_isset(mask, 1))
- oy = y = valuator_mask_get_double(mask, 1);
+ if (has_y)
+ oy = valuator_mask_get_double(mask, 1);
+
+ x = ox;
+ y = oy;
transform(&dev->scale_and_transform, &x, &y);
- if (valuator_mask_isset(mask, 0) || ox != x)
+ if (has_x || ox != x)
valuator_mask_set_double(mask, 0, x);
- if (valuator_mask_isset(mask, 1) || oy != y)
+ if (has_y || oy != y)
valuator_mask_set_double(mask, 1, y);
}
diff --git a/xorg-server/dix/globals.c b/xorg-server/dix/globals.c
index eaa2afe24..f36a938f7 100644
--- a/xorg-server/dix/globals.c
+++ b/xorg-server/dix/globals.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/dix/glyphcurs.c b/xorg-server/dix/glyphcurs.c
index 54040253c..eca6a4cb8 100644
--- a/xorg-server/dix/glyphcurs.c
+++ b/xorg-server/dix/glyphcurs.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/dix/grabs.c b/xorg-server/dix/grabs.c
index e3fc38bf5..b92f1e7ce 100644
--- a/xorg-server/dix/grabs.c
+++ b/xorg-server/dix/grabs.c
@@ -28,13 +28,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
@@ -419,9 +419,9 @@ GrabSupersedesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab)
/**
* Compares two grabs and returns TRUE if the first grab matches the second
- * grab.
- *
- * A match is when
+ * grab.
+ *
+ * A match is when
* - the devices set for the grab are equal (this is optional).
* - the event types for both grabs are equal.
* - XXX
@@ -522,7 +522,7 @@ GrabsAreIdentical(GrabPtr pFirstGrab, GrabPtr pSecondGrab)
* Any previously existing grab that matches the new grab will be removed.
* Adding a new grab that would override another client's grab will result in
* a BadAccess.
- *
+ *
* @return Success or X error code on failure.
*/
int
diff --git a/xorg-server/dix/inpututils.c b/xorg-server/dix/inpututils.c
index e5bcc31f7..5c2a32d1c 100644
--- a/xorg-server/dix/inpututils.c
+++ b/xorg-server/dix/inpututils.c
@@ -239,8 +239,10 @@ build_modmap_from_modkeymap(CARD8 *modmap, KeyCode *modkeymap,
if (!modkeymap[i])
continue;
+#if MAP_LENGTH < 256
if (modkeymap[i] >= MAP_LENGTH)
return BadValue;
+#endif
if (modmap[modkeymap[i]])
return BadValue;
diff --git a/xorg-server/dix/main.c b/xorg-server/dix/main.c
index 930a85fb7..09f9504b8 100644
--- a/xorg-server/dix/main.c
+++ b/xorg-server/dix/main.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/dix/property.c b/xorg-server/dix/property.c
index 9f51cd0ff..ff7f31aa9 100644
--- a/xorg-server/dix/property.c
+++ b/xorg-server/dix/property.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/dix/region.c b/xorg-server/dix/region.c
index 15f3d01a5..ce1014ef8 100644
--- a/xorg-server/dix/region.c
+++ b/xorg-server/dix/region.c
@@ -21,20 +21,20 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
-
-Copyright 1987, 1988, 1989 by
-Digital Equipment Corporation, Maynard, Massachusetts.
+
+Copyright 1987, 1988, 1989 by
+Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -118,9 +118,9 @@ Equipment Corporation.
* there is no separate list of band start pointers.
*
* The y-x band representation does not minimize rectangles. In particular,
- * if a rectangle vertically crosses a band (the rectangle has scanlines in
+ * if a rectangle vertically crosses a band (the rectangle has scanlines in
* the y1 to y2 area spanned by the band), then the rectangle may be broken
- * down into two or more smaller rectangles stacked one atop the other.
+ * down into two or more smaller rectangles stacked one atop the other.
*
* ----------- -----------
* | | | | band 0
@@ -944,7 +944,7 @@ RegionUnionO(RegionPtr pReg,
/*-
*-----------------------------------------------------------------------
* RegionAppend --
- *
+ *
* "Append" the rgn rectangles onto the end of dstrgn, maintaining
* knowledge of YX-banding when it's easy. Otherwise, dstrgn just
* becomes a non-y-x-banded random collection of rectangles, and not
@@ -1099,7 +1099,7 @@ QuickSortRects(BoxRec rects[], int numRects)
/*-
*-----------------------------------------------------------------------
* RegionValidate --
- *
+ *
* Take a ``region'' which is a non-y-x-banded random collection of
* rectangles, and compute a nice region which is the union of all the
* rectangles.
diff --git a/xorg-server/dix/resource.c b/xorg-server/dix/resource.c
index c254244a3..26debdb00 100644
--- a/xorg-server/dix/resource.c
+++ b/xorg-server/dix/resource.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -101,7 +101,7 @@ Equipment Corporation.
* FreeAllResources, LookupIDByType, LookupIDByClass, GetXIDRange
*/
-/*
+/*
* A resource ID is a 32 bit quantity, the upper 2 bits of which are
* off-limits for client-visible resources. The next 8 bits are
* used as client ID, and the low 22 bits come from the client.
@@ -725,7 +725,7 @@ GetXIDRange(int client, Bool server, XID *minp, XID *maxp)
/**
* GetXIDList is called by the XC-MISC extension's MiscGetXIDList function.
- * This function tries to find count unused XIDs for the given client. It
+ * This function tries to find count unused XIDs for the given client. It
* puts the IDs in the array pids and returns the number found, which should
* almost always be the number requested.
*
@@ -1118,8 +1118,8 @@ FreeClientResources(ClientPtr client)
resources = clientTable[client->index].resources;
for (j = 0; j < clientTable[client->index].buckets; j++) {
/* It may seem silly to update the head of this resource list as
- we delete the members, since the entire list will be deleted any way,
- but there are some resource deletion functions "FreeClientPixels" for
+ we delete the members, since the entire list will be deleted any way,
+ but there are some resource deletion functions "FreeClientPixels" for
one which do a LookupID on another resource id (a Colormap id in this
case), so the resource list must be kept valid up to the point that
it is deleted, so every time we delete a resource, we must update the
diff --git a/xorg-server/dix/selection.c b/xorg-server/dix/selection.c
index e905b1ec2..4e994b1ec 100644
--- a/xorg-server/dix/selection.c
+++ b/xorg-server/dix/selection.c
@@ -26,13 +26,13 @@ Copyright 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -176,7 +176,7 @@ ProcSetSelectionOwner(ClientPtr client)
if (rc == Success) {
/* If the timestamp in client's request is in the past relative
to the time stamp indicating the last time the owner of the
- selection was set, do not set the selection, just return
+ selection was set, do not set the selection, just return
success. */
if (CompareTimeStamps(time, pSel->lastTimeChanged) == EARLIER)
return Success;
diff --git a/xorg-server/dix/swaprep.c b/xorg-server/dix/swaprep.c
index 559fe271e..905fef710 100644
--- a/xorg-server/dix/swaprep.c
+++ b/xorg-server/dix/swaprep.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/dix/swapreq.c b/xorg-server/dix/swapreq.c
index 0f6d49ef0..61d3ce0f4 100644
--- a/xorg-server/dix/swapreq.c
+++ b/xorg-server/dix/swapreq.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/dix/tables.c b/xorg-server/dix/tables.c
index 686cddd7d..88b372eb7 100644
--- a/xorg-server/dix/tables.c
+++ b/xorg-server/dix/tables.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/dix/window.c b/xorg-server/dix/window.c
index d43ef0370..d49276c98 100644
--- a/xorg-server/dix/window.c
+++ b/xorg-server/dix/window.c
@@ -49,13 +49,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -135,7 +135,7 @@ Equipment Corporation.
#include <X11/Xatom.h> /* must come after server includes */
/******
- * Window stuff for server
+ * Window stuff for server
*
* CreateRootWindow, CreateWindow, ChangeWindowAttributes,
* GetWindowAttributes, DeleteWindow, DestroySubWindows,
@@ -633,7 +633,7 @@ RealChildHead(WindowPtr pWin)
/*****
* CreateWindow
- * Makes a window in response to client request
+ * Makes a window in response to client request
*****/
WindowPtr
@@ -1038,10 +1038,10 @@ SetRootWindowBackground(WindowPtr pWin, ScreenPtr pScreen, Mask *index2)
/*****
* ChangeWindowAttributes
- *
+ *
* The value-mask specifies which attributes are to be changed; the
* value-list contains one value for each one bit in the mask, from least
- * to most significant bit in the mask.
+ * to most significant bit in the mask.
*****/
int
@@ -1459,8 +1459,8 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
/* We SHOULD check for an error value here XXX */
(*pScreen->ChangeWindowAttributes) (pWin, vmaskCopy);
- /*
- If the border contents have changed, redraw the border.
+ /*
+ If the border contents have changed, redraw the border.
Note that this has to be done AFTER pScreen->ChangeWindowAttributes
for the tile to be rotated, and the correct function selected.
*/
@@ -1814,7 +1814,7 @@ ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh)
/*
* IsSiblingAboveMe
- * returns Above if pSib above pMe in stack or Below otherwise
+ * returns Above if pSib above pMe in stack or Below otherwise
*/
static int
@@ -1914,7 +1914,7 @@ IOverlapAnyWindow(WindowPtr pWin, BoxPtr box)
}
/*
- * WhereDoIGoInTheStack()
+ * WhereDoIGoInTheStack()
* Given pWin and pSib and the relationshipe smode, return
* the window that pWin should go ABOVE.
* If a pSib is specified:
@@ -1922,7 +1922,7 @@ IOverlapAnyWindow(WindowPtr pWin, BoxPtr box)
* Below: pWin is placed just below pSib
* TopIf: if pSib occludes pWin, then pWin is placed
* at the top of the stack
- * BottomIf: if pWin occludes pSib, then pWin is
+ * BottomIf: if pWin occludes pSib, then pWin is
* placed at the bottom of the stack
* Opposite: if pSib occludes pWin, then pWin is placed at the
* top of the stack, else if pWin occludes pSib, then
@@ -2316,7 +2316,7 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client)
* For RaiseLowest, raises the lowest mapped child (if any) that is
* obscured by another child to the top of the stack. For LowerHighest,
* lowers the highest mapped child (if any) that is obscuring another
- * child to the bottom of the stack. Exposure processing is performed
+ * child to the bottom of the stack. Exposure processing is performed
*
******/
@@ -3243,7 +3243,7 @@ CheckWindowOptionalNeed(WindowPtr w)
return;
if (optional->userProps != NULL)
return;
- if (optional->backingBitPlanes != ~0L)
+ if (optional->backingBitPlanes != (CARD32)~0L)
return;
if (optional->backingPixel != 0)
return;
@@ -3327,9 +3327,9 @@ MakeWindowOptional(WindowPtr pWin)
* changing the window cursor (e.g. using XDefineCursor()) will not have any
* visible effect. Only when one of the device cursors is set to None again,
* this device's cursor will display the changed standard cursor.
- *
+ *
* CursorIsNone of the window struct is NOT modified if you set a device
- * cursor.
+ * cursor.
*
* Assumption: If there is a node for a device in the list, the device has a
* cursor. If the cursor is set to None, it is inherited by the parent.
@@ -3424,7 +3424,7 @@ ChangeWindowDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev, CursorPtr pCursor)
if (pOldCursor)
FreeCursor(pOldCursor, (Cursor) 0);
- /* FIXME: We SHOULD check for an error value here XXX
+ /* FIXME: We SHOULD check for an error value here XXX
(comment taken from ChangeWindowAttributes) */
(*pScreen->ChangeWindowAttributes) (pWin, CWCursor);
@@ -3491,7 +3491,7 @@ WindowSeekDeviceCursor(WindowPtr pWin,
}
/* Return True if a parent has the same device cursor set or False if
- * otherwise
+ * otherwise
*/
static Bool
WindowParentHasDeviceCursor(WindowPtr pWin,
diff --git a/xorg-server/exa/exa.c b/xorg-server/exa/exa.c
index a2995db24..51d36f3f3 100644
--- a/xorg-server/exa/exa.c
+++ b/xorg-server/exa/exa.c
@@ -719,7 +719,7 @@ ExaBlockHandler(ScreenPtr pScreen, void *pTimeout,
if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS)
return;
- /* Try and keep the offscreen memory area tidy every now and then (at most
+ /* Try and keep the offscreen memory area tidy every now and then (at most
* once per second) when the server has been idle for at least 100ms.
*/
if (pExaScr->numOffscreenAvailable > 1) {
diff --git a/xorg-server/exa/exa.h b/xorg-server/exa/exa.h
index 98d094dff..949ea3ac0 100644
--- a/xorg-server/exa/exa.h
+++ b/xorg-server/exa/exa.h
@@ -233,7 +233,7 @@ typedef struct _ExaDriver {
* @{
*/
/**
- * PrepareCopy() sets up the driver for doing a copy within video
+ * PrepareCopy() sets up the driver for doing a copy within video
* memory.
*
* @param pSrcPixmap source pixmap
@@ -471,7 +471,7 @@ typedef struct _ExaDriver {
* UploadToScreen() can aid in pixmap migration, but is most important for
* the performance of exaGlyphs() (antialiased font drawing) by allowing
* pipelining of data uploads, avoiding a sync of the card after each glyph.
- *
+ *
* @return TRUE if the driver successfully uploaded the data. FALSE
* indicates that EXA should fall back to doing the upload in software.
*
@@ -512,7 +512,7 @@ typedef struct _ExaDriver {
* migration, which is the read from framebuffer when evicting pixmaps from
* framebuffer memory. Thus, it is highly recommended, even though
* implementations are typically complicated.
- *
+ *
* @return TRUE if the driver successfully downloaded the data. FALSE
* indicates that EXA should fall back to doing the download in software.
*
@@ -704,7 +704,7 @@ typedef struct _ExaDriver {
* @{
*/
/**
- * EXA_OFFSCREEN_PIXMAPS indicates to EXA that the driver can support
+ * EXA_OFFSCREEN_PIXMAPS indicates to EXA that the driver can support
* offscreen pixmaps.
*/
#define EXA_OFFSCREEN_PIXMAPS (1 << 0)
diff --git a/xorg-server/exa/exa_accel.c b/xorg-server/exa/exa_accel.c
index 9c742bdc9..5aa7d1078 100644
--- a/xorg-server/exa/exa_accel.c
+++ b/xorg-server/exa/exa_accel.c
@@ -413,7 +413,7 @@ exaHWCopyNtoN(DrawablePtr pSrcDrawable,
if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask,
pGC->fillStyle, pGC->alu,
- pGC->clientClipType)) {
+ pGC->clientClip != NULL)) {
dstregion = RegionCreate(NullBox, 0);
RegionCopy(dstregion, srcregion);
RegionTranslate(dstregion, dst_off_x - dx - src_off_x,
@@ -771,7 +771,7 @@ exaPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSeg)
static Bool exaFillRegionSolid(DrawablePtr pDrawable, RegionPtr pRegion,
Pixel pixel, CARD32 planemask, CARD32 alu,
- unsigned int clientClipType);
+ Bool hasClientClip);
static void
exaPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrect, xRectangle *prect)
@@ -816,11 +816,11 @@ exaPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrect, xRectangle *prect)
if (((pGC->fillStyle == FillSolid || pGC->tileIsPixel) &&
exaFillRegionSolid(pDrawable, pReg, pGC->fillStyle == FillSolid ?
pGC->fgPixel : pGC->tile.pixel, pGC->planemask,
- pGC->alu, pGC->clientClipType)) ||
+ pGC->alu, pGC->clientClip != NULL)) ||
(pGC->fillStyle == FillTiled && !pGC->tileIsPixel &&
exaFillRegionTiled(pDrawable, pReg, pGC->tile.pixmap, &pGC->patOrg,
pGC->planemask, pGC->alu,
- pGC->clientClipType))) {
+ pGC->clientClip != NULL))) {
goto out;
}
}
@@ -990,7 +990,7 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
static Bool
exaFillRegionSolid(DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel,
- CARD32 planemask, CARD32 alu, unsigned int clientClipType)
+ CARD32 planemask, CARD32 alu, Bool hasClientClip)
{
ExaScreenPriv(pDrawable->pScreen);
PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable);
@@ -1013,8 +1013,7 @@ exaFillRegionSolid(DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel,
pixmaps[0].pPix = pPixmap;
pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillSolid,
alu,
- clientClipType) ? NULL :
- pRegion;
+ hasClientClip) ? NULL : pRegion;
exaDoMigration(pixmaps, 1, TRUE);
}
@@ -1074,7 +1073,7 @@ exaFillRegionSolid(DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel,
Bool
exaFillRegionTiled(DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu,
- unsigned int clientClipType)
+ Bool hasClientClip)
{
ExaScreenPriv(pDrawable->pScreen);
PixmapPtr pPixmap;
@@ -1096,7 +1095,7 @@ exaFillRegionTiled(DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
if (tileWidth == 1 && tileHeight == 1)
return exaFillRegionSolid(pDrawable, pRegion,
exaGetPixmapFirstPixel(pTile), planemask,
- alu, clientClipType);
+ alu, hasClientClip);
pPixmap = exaGetDrawablePixmap(pDrawable);
pExaPixmap = ExaGetPixmapPriv(pPixmap);
@@ -1113,8 +1112,7 @@ exaFillRegionTiled(DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
pixmaps[0].pPix = pPixmap;
pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillTiled,
alu,
- clientClipType) ? NULL :
- pRegion;
+ hasClientClip) ? NULL : pRegion;
pixmaps[1].as_dst = FALSE;
pixmaps[1].as_src = TRUE;
pixmaps[1].pPix = pTile;
diff --git a/xorg-server/exa/exa_glyphs.c b/xorg-server/exa/exa_glyphs.c
index aa71b215e..41f3694f2 100644
--- a/xorg-server/exa/exa_glyphs.c
+++ b/xorg-server/exa/exa_glyphs.c
@@ -16,7 +16,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL Red Hat
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Permission to use, copy, modify, distribute, and sell this software and its
@@ -33,7 +33,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Owen Taylor <otaylor@fishsoup.net>
@@ -318,8 +318,8 @@ exaGlyphCacheHashRemove(ExaGlyphCachePtr cache, int pos)
* are:
*
* | XXXXXXXXXX |
- * i j
- *
+ * i j
+ *
* |XXX XXXX|
* j i
*
diff --git a/xorg-server/exa/exa_priv.h b/xorg-server/exa/exa_priv.h
index 88bfd3772..ca4db720f 100644
--- a/xorg-server/exa/exa_priv.h
+++ b/xorg-server/exa/exa_priv.h
@@ -455,12 +455,11 @@ ExaCheckAddTraps(PicturePtr pPicture,
static _X_INLINE Bool
exaGCReadsDestination(DrawablePtr pDrawable, unsigned long planemask,
unsigned int fillStyle, unsigned char alu,
- unsigned int clientClipType)
+ Bool clientClip)
{
return ((alu != GXcopy && alu != GXclear && alu != GXset &&
alu != GXcopyInverted) || fillStyle == FillStippled ||
- clientClipType != CT_NONE ||
- !EXA_PM_IS_SOLID(pDrawable, planemask));
+ clientClip != FALSE || !EXA_PM_IS_SOLID(pDrawable, planemask));
}
void
@@ -470,7 +469,7 @@ Bool
exaFillRegionTiled(DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu,
- unsigned int clientClipType);
+ Bool clientClip);
void
diff --git a/xorg-server/exa/exa_render.c b/xorg-server/exa/exa_render.c
index c4edf407e..e3e552697 100644
--- a/xorg-server/exa/exa_render.c
+++ b/xorg-server/exa/exa_render.c
@@ -559,7 +559,7 @@ exaCompositeRects(CARD8 op,
box.y2 = y2 < MAXSHORT ? y2 : MAXSHORT;
/* The pixmap migration code relies on pendingDamage indicating
- * the bounds of the current rendering, so we need to force
+ * the bounds of the current rendering, so we need to force
* the actual damage into that region before we do anything, and
* (see use of DamagePendingRegion in exaCopyDirty)
*/
@@ -613,7 +613,7 @@ exaCompositeRects(CARD8 op,
/************************************************************/
if (!pMask) {
- /* Now we have to flush the damage out from pendingDamage => damage
+ /* Now we have to flush the damage out from pendingDamage => damage
* Calling DamageRegionProcessPending has that effect.
*/
diff --git a/xorg-server/exa/exa_unaccel.c b/xorg-server/exa/exa_unaccel.c
index b0c6344a5..73eada9c2 100644
--- a/xorg-server/exa/exa_unaccel.c
+++ b/xorg-server/exa/exa_unaccel.c
@@ -107,7 +107,7 @@ ExaCheckPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable)));
if (!pExaScr->prepare_access_reg || !pExaPixmap->pDamage ||
exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle,
- pGC->alu, pGC->clientClipType))
+ pGC->alu, pGC->clientClip != NULL))
exaPrepareAccess(pDrawable, EXA_PREPARE_DEST);
else
pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_DEST,
@@ -143,7 +143,7 @@ ExaCheckCopyNtoN(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
if (pExaScr->prepare_access_reg &&
!exaGCReadsDestination(pDst, pGC->planemask, pGC->fillStyle,
- pGC->alu, pGC->clientClipType) &&
+ pGC->alu, pGC->clientClip != NULL) &&
RegionInitBoxes(&reg, pbox, nbox)) {
PixmapPtr pPixmap = exaGetDrawablePixmap(pDst);
@@ -179,10 +179,9 @@ ExaFallbackPrepareReg(DrawablePtr pDrawable,
ExaScreenPriv(pScreen);
if (pExaScr->prepare_access_reg &&
- !(checkReads && exaGCReadsDestination(pDrawable,
- pGC->planemask,
- pGC->fillStyle,
- pGC->alu, pGC->clientClipType))) {
+ !(checkReads && exaGCReadsDestination(pDrawable, pGC->planemask,
+ pGC->fillStyle, pGC->alu,
+ pGC->clientClip != NULL))) {
BoxRec box;
RegionRec reg;
int xoff, yoff;
diff --git a/xorg-server/fb/Makefile.am b/xorg-server/fb/Makefile.am
index 752eabeb7..65b5d9432 100644
--- a/xorg-server/fb/Makefile.am
+++ b/xorg-server/fb/Makefile.am
@@ -44,8 +44,6 @@ libfb_la_SOURCES = \
fbseg.c \
fbsetsp.c \
fbsolid.c \
- fbstipple.c \
- fbtile.c \
fbtrap.c \
fbutil.c \
fbwindow.c
diff --git a/xorg-server/fb/fb.h b/xorg-server/fb/fb.h
index d176bb343..ab110f327 100644
--- a/xorg-server/fb/fb.h
+++ b/xorg-server/fb/fb.h
@@ -83,11 +83,7 @@
#define FB_SHIFT LOG2_BITMAP_PAD
#endif
-#if FB_SHIFT < LOG2_BITMAP_PAD
-error FB_SHIFT must be >= LOG2_BITMAP_PAD
-#endif
#define FB_UNIT (1 << FB_SHIFT)
-#define FB_HALFUNIT (1 << (FB_SHIFT-1))
#define FB_MASK (FB_UNIT - 1)
#define FB_ALLONES ((FbBits) -1)
#if GLYPHPADBYTES != 4
@@ -105,37 +101,15 @@ error FB_SHIFT must be >= LOG2_BITMAP_PAD
#define FbStipStrideToBitsStride(s) (((s) >> (FB_SHIFT - FB_STIP_SHIFT)))
#define FbBitsStrideToStipStride(s) (((s) << (FB_SHIFT - FB_STIP_SHIFT)))
#define FbFullMask(n) ((n) == FB_UNIT ? FB_ALLONES : ((((FbBits) 1) << n) - 1))
-#if FB_SHIFT == 6
-#ifdef WIN32
-typedef unsigned __int64 FbBits;
-#else
-#if defined(__alpha__) || defined(__alpha) || \
- defined(ia64) || defined(__ia64__) || \
- defined(__sparc64__) || defined(_LP64) || \
- defined(__s390x__) || \
- defined(amd64) || defined (__amd64__) || \
- defined (__powerpc64__)
-typedef unsigned long FbBits;
-#else
-typedef unsigned long long FbBits;
-#endif
-#endif
-#endif
#if FB_SHIFT == 5
typedef CARD32 FbBits;
-#endif
-
-#if FB_SHIFT == 4
-typedef CARD16 FbBits;
+#else
+#error "Unsupported FB_SHIFT"
#endif
#if LOG2_BITMAP_PAD == FB_SHIFT
typedef FbBits FbStip;
-#else
-#if LOG2_BITMAP_PAD == 5
-typedef CARD32 FbStip;
-#endif
#endif
typedef int FbStride;
@@ -264,122 +238,8 @@ extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
n >>= FB_SHIFT; \
}
-#if FB_SHIFT == 6
-#define FbDoLeftMaskByteRRop6Cases(dst,xor) \
- case (sizeof (FbBits) - 7) | (1 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 7) | (2 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 7) | (3 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 7) | (4 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 7) | (5 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 7) | (6 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 7): \
- FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
- break; \
- case (sizeof (FbBits) - 6) | (1 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 6) | (2 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 6) | (3 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 6) | (4 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 6) | (5 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 6): \
- FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
- break; \
- case (sizeof (FbBits) - 5) | (1 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 5) | (2 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 5) | (3 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 5) | (4 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 5): \
- FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
- break; \
- case (sizeof (FbBits) - 4) | (1 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 4) | (2 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- break; \
- case (sizeof (FbBits) - 4) | (3 << (FB_SHIFT - 3)): \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
- FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
- break; \
- case (sizeof (FbBits) - 4): \
- FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
- break;
-
-#define FbDoRightMaskByteRRop6Cases(dst,xor) \
- case 4: \
- FbStorePart(dst,0,CARD32,xor); \
- break; \
- case 5: \
- FbStorePart(dst,0,CARD32,xor); \
- FbStorePart(dst,4,CARD8,xor); \
- break; \
- case 6: \
- FbStorePart(dst,0,CARD32,xor); \
- FbStorePart(dst,4,CARD16,xor); \
- break; \
- case 7: \
- FbStorePart(dst,0,CARD32,xor); \
- FbStorePart(dst,4,CARD16,xor); \
- FbStorePart(dst,6,CARD8,xor); \
- break;
-#else
-#define FbDoLeftMaskByteRRop6Cases(dst,xor)
-#define FbDoRightMaskByteRRop6Cases(dst,xor)
-#endif
-
#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
switch (lb) { \
- FbDoLeftMaskByteRRop6Cases(dst,xor) \
case (sizeof (FbBits) - 3) | (1 << (FB_SHIFT - 3)): \
FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
break; \
@@ -416,7 +276,6 @@ extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
FbStorePart(dst,0,CARD16,xor); \
FbStorePart(dst,2,CARD8,xor); \
break; \
- FbDoRightMaskByteRRop6Cases(dst,xor) \
default: \
WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \
} \
@@ -470,21 +329,7 @@ extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
FbLaneCase2((n)>>2,a,(o)+2) \
}
-#define FbLaneCase8(n,a,o) \
- if ((n) == 0x0ff) { \
- *(FbBits *) ((a)+(o)) = fgxor; \
- } else { \
- FbLaneCase4((n)&15,a,o) \
- FbLaneCase4((n)>>4,a,(o)+4) \
- }
-
-#if FB_SHIFT == 6
-#define FbLaneCase(n,a) FbLaneCase8(n,(CARD8 *) (a),0)
-#endif
-
-#if FB_SHIFT == 5
#define FbLaneCase(n,a) FbLaneCase4(n,(CARD8 *) (a),0)
-#endif
/* Rotate a filled pixel value to the specified alignement */
#define FbRot24(p,b) (FbScrRight(p,b) | FbScrLeft(p,24-(b)))
@@ -497,19 +342,6 @@ extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
#define FbPrev24Stip(p) (FbRot24(p,FB_STIP_UNIT%24))
/* step a rotation value to the next/previous rotation value */
-#if FB_UNIT == 64
-#define FbNext24Rot(r) ((r) == 16 ? 0 : (r) + 8)
-#define FbPrev24Rot(r) ((r) == 0 ? 16 : (r) - 8)
-
-#if IMAGE_BYTE_ORDER == MSBFirst
-#define FbFirst24Rot(x) (((x) + 8) % 24)
-#else
-#define FbFirst24Rot(x) ((x) % 24)
-#endif
-
-#endif
-
-#if FB_UNIT == 32
#define FbNext24Rot(r) ((r) == 0 ? 16 : (r) - 8)
#define FbPrev24Rot(r) ((r) == 16 ? 0 : (r) + 8)
@@ -518,7 +350,6 @@ extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
#else
#define FbFirst24Rot(x) ((x) % 24)
#endif
-#endif
#define FbNext24RotStip(r) ((r) == 0 ? 16 : (r) - 8)
#define FbPrev24RotStip(r) ((r) == 16 ? 0 : (r) + 8)
@@ -621,7 +452,6 @@ typedef struct {
FbBits bgand, bgxor; /* for stipples */
FbBits fg, bg, pm; /* expanded and filled */
unsigned int dashLength; /* total of all dash elements */
- unsigned char evenStipple; /* stipple is even */
unsigned char bpp; /* current drawable bpp */
} FbGCPrivRec, *FbGCPrivPtr;
@@ -714,11 +544,6 @@ typedef struct {
* Accelerated tiles are power of 2 width <= FB_UNIT
*/
#define FbEvenTile(w) ((w) <= FB_UNIT && FbPowerOfTwo(w))
-/*
- * Accelerated stipples are power of 2 width and <= FB_UNIT/dstBpp
- * with dstBpp a power of 2 as well
- */
-#define FbEvenStip(w,bpp) ((w) * (bpp) <= FB_UNIT && FbPowerOfTwo(w) && FbPowerOfTwo(bpp))
/*
* fb24_32.c
@@ -925,13 +750,6 @@ fbArc24(FbBits * dst,
int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor);
extern _X_EXPORT void
-
-fbGlyph24(FbBits * dstLine,
- FbStride dstStride,
- int dstBpp, FbStip * stipple, FbBits fg, int height, int shift);
-
-extern _X_EXPORT void
-
fbPolyline24(DrawablePtr pDrawable,
GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig);
@@ -1220,9 +1038,6 @@ fbGetSpans(DrawablePtr pDrawable,
* fbglyph.c
*/
-extern _X_EXPORT Bool
- fbGlyphIn(RegionPtr pRegion, int x, int y, int width, int height);
-
extern _X_EXPORT void
fbPolyGlyphBlt(DrawablePtr pDrawable,
@@ -1283,15 +1098,6 @@ fbGetImage(DrawablePtr pDrawable,
*/
extern _X_EXPORT void
-
-fbZeroLine(DrawablePtr pDrawable,
- GCPtr pGC, int mode, int npt, DDXPointPtr ppt);
-
-extern _X_EXPORT void
- fbZeroSegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSegs);
-
-extern _X_EXPORT void
-
fbPolyLine(DrawablePtr pDrawable,
GCPtr pGC, int mode, int npt, DDXPointPtr ppt);
@@ -1339,36 +1145,12 @@ extern _X_EXPORT RegionPtr
extern _X_EXPORT void
-fbDots(FbBits * dstOrig,
- FbStride dstStride,
- int dstBpp,
- BoxPtr pBox,
- xPoint * pts,
- int npt,
- int xorg, int yorg, int xoff, int yoff, FbBits andOrig, FbBits xorOrig);
-
-extern _X_EXPORT void
-
fbPolyPoint(DrawablePtr pDrawable,
GCPtr pGC, int mode, int npt, xPoint * pptInit);
/*
* fbpush.c
*/
-extern _X_EXPORT void
-
-fbPushPattern(DrawablePtr pDrawable,
- GCPtr pGC,
- FbStip * src,
- FbStride srcStride,
- int srcX, int x, int y, int width, int height);
-
-extern _X_EXPORT void
-
-fbPushFill(DrawablePtr pDrawable,
- GCPtr pGC,
- FbStip * src,
- FbStride srcStride, int srcX, int x, int y, int width, int height);
extern _X_EXPORT void
@@ -1462,34 +1244,20 @@ typedef void FbBres(DrawablePtr pDrawable,
int signdy,
int axis, int x, int y, int e, int e1, int e3, int len);
-extern _X_EXPORT FbBres fbBresSolid, fbBresDash, fbBresFill, fbBresFillDash;
+extern _X_EXPORT void
+fbSegment(DrawablePtr pDrawable,
+ GCPtr pGC,
+ int xa, int ya, int xb, int yb, Bool drawLast, int *dashOffset);
/*
* fbsetsp.c
*/
extern _X_EXPORT void
-
fbSetSpans(DrawablePtr pDrawable,
GCPtr pGC,
char *src, DDXPointPtr ppt, int *pwidth, int nspans, int fSorted);
-extern _X_EXPORT FbBres *fbSelectBres(DrawablePtr pDrawable, GCPtr pGC);
-
-extern _X_EXPORT void
-
-fbBres(DrawablePtr pDrawable,
- GCPtr pGC,
- int dashOffset,
- int signdx,
- int signdy, int axis, int x, int y, int e, int e1, int e3, int len);
-
-extern _X_EXPORT void
-
-fbSegment(DrawablePtr pDrawable,
- GCPtr pGC,
- int xa, int ya, int xb, int yb, Bool drawLast, int *dashOffset);
-
/*
* fbsolid.c
*/
@@ -1507,104 +1275,10 @@ fbSolid24(FbBits * dst,
int dstX, int width, int height, FbBits and, FbBits xor);
/*
- * fbstipple.c
- */
-
-extern _X_EXPORT void
- fbTransparentSpan(FbBits * dst, FbBits stip, FbBits fgxor, int n);
-
-extern _X_EXPORT void
-
-fbEvenStipple(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int dstBpp,
- int width,
- int height,
- FbStip * stip,
- FbStride stipStride,
- int stipHeight,
- FbBits fgand,
- FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot);
-
-extern _X_EXPORT void
-
-fbOddStipple(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int dstBpp,
- int width,
- int height,
- FbStip * stip,
- FbStride stipStride,
- int stipWidth,
- int stipHeight,
- FbBits fgand,
- FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot);
-
-extern _X_EXPORT void
-
-fbStipple(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int dstBpp,
- int width,
- int height,
- FbStip * stip,
- FbStride stipStride,
- int stipWidth,
- int stipHeight,
- Bool even,
- FbBits fgand,
- FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot);
-
-/*
- * fbtile.c
- */
-
-extern _X_EXPORT void
-
-fbEvenTile(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int width,
- int height,
- FbBits * tile,
- FbStride tileStride,
- int tileHeight, int alu, FbBits pm, int xRot, int yRot);
-
-extern _X_EXPORT void
-
-fbOddTile(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int width,
- int height,
- FbBits * tile,
- FbStride tileStride,
- int tileWidth,
- int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot);
-
-extern _X_EXPORT void
-
-fbTile(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int width,
- int height,
- FbBits * tile,
- FbStride tileStride,
- int tileWidth,
- int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot);
-
-/*
* fbutil.c
*/
extern _X_EXPORT FbBits fbReplicatePixel(Pixel p, int bpp);
-extern _X_EXPORT void
- fbReduceRasterOp(int rop, FbBits fg, FbBits pm, FbBits * andp, FbBits * xorp);
-
#ifdef FB_ACCESS_WRAPPER
extern _X_EXPORT ReadMemoryProcPtr wfbReadMemory;
extern _X_EXPORT WriteMemoryProcPtr wfbWriteMemory;
diff --git a/xorg-server/fb/fb24_32.c b/xorg-server/fb/fb24_32.c
index ecb39510d..b95019eb6 100644
--- a/xorg-server/fb/fb24_32.c
+++ b/xorg-server/fb/fb24_32.c
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
diff --git a/xorg-server/fb/fb24_32.h b/xorg-server/fb/fb24_32.h
index b357edf38..77eef2339 100644
--- a/xorg-server/fb/fb24_32.h
+++ b/xorg-server/fb/fb24_32.h
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
diff --git a/xorg-server/fb/fbbits.c b/xorg-server/fb/fbbits.c
index ac44f3e67..d7d089c17 100644
--- a/xorg-server/fb/fbbits.c
+++ b/xorg-server/fb/fbbits.c
@@ -70,9 +70,6 @@
#define POLYSEGMENT fbPolySegment16
#define BITS CARD16
#define BITS2 CARD32
-#if FB_SHIFT == 6
-#define BITS4 FbBits
-#endif
#include "fbbits.h"
@@ -85,9 +82,6 @@
#undef POLYSEGMENT
#undef BITS
#undef BITS2
-#if FB_SHIFT == 6
-#undef BITS4
-#endif
#define BRESSOLID fbBresSolid24
#define BRESDASH fbBresDash24
@@ -155,9 +149,6 @@
#define POLYLINE fbPolyline32
#define POLYSEGMENT fbPolySegment32
#define BITS CARD32
-#if FB_SHIFT == 6
-#define BITS2 FbBits
-#endif
#include "fbbits.h"
@@ -169,6 +160,3 @@
#undef POLYLINE
#undef POLYSEGMENT
#undef BITS
-#if FB_SHIFT == 6
-#undef BITS2
-#endif
diff --git a/xorg-server/fb/fbblt.c b/xorg-server/fb/fbblt.c
index c615106d1..b4123656a 100644
--- a/xorg-server/fb/fbblt.c
+++ b/xorg-server/fb/fbblt.c
@@ -520,277 +520,12 @@ fbBlt24(FbBits * srcLine,
#endif
}
-#if FB_SHIFT == FB_STIP_SHIFT + 1
-
-/*
- * Could be generalized to FB_SHIFT > FB_STIP_SHIFT + 1 by
- * creating an ring of values stepped through for each line
- */
-
-void
-fbBltOdd(FbBits * srcLine,
- FbStride srcStrideEven,
- FbStride srcStrideOdd,
- int srcXEven,
- int srcXOdd,
- FbBits * dstLine,
- FbStride dstStrideEven,
- FbStride dstStrideOdd,
- int dstXEven,
- int dstXOdd, int width, int height, int alu, FbBits pm, int bpp)
-{
- FbBits *src;
- int leftShiftEven, rightShiftEven;
- FbBits startmaskEven, endmaskEven;
- int nmiddleEven;
-
- FbBits *dst;
- int leftShiftOdd, rightShiftOdd;
- FbBits startmaskOdd, endmaskOdd;
- int nmiddleOdd;
-
- int leftShift, rightShift;
- FbBits startmask, endmask;
- int nmiddle;
-
- int srcX, dstX;
-
- FbBits bits, bits1;
- int n;
-
- Bool destInvarient;
- Bool even;
-
- FbDeclareMergeRop();
-
- FbInitializeMergeRop(alu, pm);
- destInvarient = FbDestInvarientMergeRop();
-
- srcLine += srcXEven >> FB_SHIFT;
- dstLine += dstXEven >> FB_SHIFT;
- srcXEven &= FB_MASK;
- dstXEven &= FB_MASK;
- srcXOdd &= FB_MASK;
- dstXOdd &= FB_MASK;
-
- FbMaskBits(dstXEven, width, startmaskEven, nmiddleEven, endmaskEven);
- FbMaskBits(dstXOdd, width, startmaskOdd, nmiddleOdd, endmaskOdd);
-
- even = TRUE;
- InitializeShifts(srcXEven, dstXEven, leftShiftEven, rightShiftEven);
- InitializeShifts(srcXOdd, dstXOdd, leftShiftOdd, rightShiftOdd);
- while (height--) {
- src = srcLine;
- dst = dstLine;
- if (even) {
- srcX = srcXEven;
- dstX = dstXEven;
- startmask = startmaskEven;
- endmask = endmaskEven;
- nmiddle = nmiddleEven;
- leftShift = leftShiftEven;
- rightShift = rightShiftEven;
- srcLine += srcStrideEven;
- dstLine += dstStrideEven;
- even = FALSE;
- }
- else {
- srcX = srcXOdd;
- dstX = dstXOdd;
- startmask = startmaskOdd;
- endmask = endmaskOdd;
- nmiddle = nmiddleOdd;
- leftShift = leftShiftOdd;
- rightShift = rightShiftOdd;
- srcLine += srcStrideOdd;
- dstLine += dstStrideOdd;
- even = TRUE;
- }
- if (srcX == dstX) {
- if (startmask) {
- bits = READ(src++);
- WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), startmask));
- dst++;
- }
- n = nmiddle;
- if (destInvarient) {
- while (n--) {
- bits = READ(src++);
- WRITE(dst, FbDoDestInvarientMergeRop(bits));
- dst++;
- }
- }
- else {
- while (n--) {
- bits = READ(src++);
- WRITE(dst, FbDoMergeRop(bits, READ(dst)));
- dst++;
- }
- }
- if (endmask) {
- bits = READ(src);
- WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), endmask));
- }
- }
- else {
- bits = 0;
- if (srcX > dstX)
- bits = READ(src++);
- if (startmask) {
- bits1 = FbScrLeft(bits, leftShift);
- bits = READ(src++);
- bits1 |= FbScrRight(bits, rightShift);
- WRITE(dst, FbDoMaskMergeRop(bits1, READ(dst), startmask));
- dst++;
- }
- n = nmiddle;
- if (destInvarient) {
- while (n--) {
- bits1 = FbScrLeft(bits, leftShift);
- bits = READ(src++);
- bits1 |= FbScrRight(bits, rightShift);
- WRITE(dst, FbDoDestInvarientMergeRop(bits1));
- dst++;
- }
- }
- else {
- while (n--) {
- bits1 = FbScrLeft(bits, leftShift);
- bits = READ(src++);
- bits1 |= FbScrRight(bits, rightShift);
- WRITE(dst, FbDoMergeRop(bits1, READ(dst)));
- dst++;
- }
- }
- if (endmask) {
- bits1 = FbScrLeft(bits, leftShift);
- if (FbScrLeft(endmask, rightShift)) {
- bits = READ(src);
- bits1 |= FbScrRight(bits, rightShift);
- }
- WRITE(dst, FbDoMaskMergeRop(bits1, READ(dst), endmask));
- }
- }
- }
-}
-
-void
-fbBltOdd24(FbBits * srcLine,
- FbStride srcStrideEven,
- FbStride srcStrideOdd,
- int srcXEven,
- int srcXOdd,
- FbBits * dstLine,
- FbStride dstStrideEven,
- FbStride dstStrideOdd,
- int dstXEven, int dstXOdd, int width, int height, int alu, FbBits pm)
-{
- Bool even = TRUE;
-
- while (height--) {
- if (even) {
- fbBlt24Line(srcLine, srcXEven, dstLine, dstXEven,
- width, alu, pm, FALSE);
- srcLine += srcStrideEven;
- dstLine += dstStrideEven;
- even = FALSE;
- }
- else {
- fbBlt24Line(srcLine, srcXOdd, dstLine, dstXOdd,
- width, alu, pm, FALSE);
- srcLine += srcStrideOdd;
- dstLine += dstStrideOdd;
- even = TRUE;
- }
- }
-}
-
-#endif
-
-#if FB_STIP_SHIFT != FB_SHIFT
-void
-fbSetBltOdd(FbStip * stip,
- FbStride stipStride,
- int srcX,
- FbBits ** bits,
- FbStride * strideEven,
- FbStride * strideOdd, int *srcXEven, int *srcXOdd)
-{
- int srcAdjust;
- int strideAdjust;
-
- /*
- * bytes needed to align source
- */
- srcAdjust = (((int) stip) & (FB_MASK >> 3));
- /*
- * FbStip units needed to align stride
- */
- strideAdjust = stipStride & (FB_MASK >> FB_STIP_SHIFT);
-
- *bits = (FbBits *) ((char *) stip - srcAdjust);
- if (srcAdjust) {
- *strideEven = FbStipStrideToBitsStride(stipStride + 1);
- *strideOdd = FbStipStrideToBitsStride(stipStride);
-
- *srcXEven = srcX + (srcAdjust << 3);
- *srcXOdd = srcX + (srcAdjust << 3) - (strideAdjust << FB_STIP_SHIFT);
- }
- else {
- *strideEven = FbStipStrideToBitsStride(stipStride);
- *strideOdd = FbStipStrideToBitsStride(stipStride + 1);
-
- *srcXEven = srcX;
- *srcXOdd = srcX + (strideAdjust << FB_STIP_SHIFT);
- }
-}
-#endif
-
void
fbBltStip(FbStip * src, FbStride srcStride, /* in FbStip units, not FbBits units */
int srcX, FbStip * dst, FbStride dstStride, /* in FbStip units, not FbBits units */
int dstX, int width, int height, int alu, FbBits pm, int bpp)
{
-#if FB_STIP_SHIFT != FB_SHIFT
- if (FB_STIP_ODDSTRIDE(srcStride) || FB_STIP_ODDPTR(src) ||
- FB_STIP_ODDSTRIDE(dstStride) || FB_STIP_ODDPTR(dst)) {
- FbStride srcStrideEven, srcStrideOdd;
- FbStride dstStrideEven, dstStrideOdd;
- int srcXEven, srcXOdd;
- int dstXEven, dstXOdd;
- FbBits *s, *d;
- int sx, dx;
-
- src += srcX >> FB_STIP_SHIFT;
- srcX &= FB_STIP_MASK;
- dst += dstX >> FB_STIP_SHIFT;
- dstX &= FB_STIP_MASK;
-
- fbSetBltOdd(src, srcStride, srcX,
- &s, &srcStrideEven, &srcStrideOdd, &srcXEven, &srcXOdd);
-
- fbSetBltOdd(dst, dstStride, dstX,
- &d, &dstStrideEven, &dstStrideOdd, &dstXEven, &dstXOdd);
-
- if (bpp == 24 && !FbCheck24Pix(pm)) {
- fbBltOdd24(s, srcStrideEven, srcStrideOdd,
- srcXEven, srcXOdd,
- d, dstStrideEven, dstStrideOdd,
- dstXEven, dstXOdd, width, height, alu, pm);
- }
- else {
- fbBltOdd(s, srcStrideEven, srcStrideOdd,
- srcXEven, srcXOdd,
- d, dstStrideEven, dstStrideOdd,
- dstXEven, dstXOdd, width, height, alu, pm, bpp);
- }
- }
- else
-#endif
- {
- fbBlt((FbBits *) src, FbStipStrideToBitsStride(srcStride),
- srcX,
- (FbBits *) dst, FbStipStrideToBitsStride(dstStride),
- dstX, width, height, alu, pm, bpp, FALSE, FALSE);
- }
+ fbBlt((FbBits *) src, FbStipStrideToBitsStride(srcStride), srcX,
+ (FbBits *) dst, FbStipStrideToBitsStride(dstStride), dstX,
+ width, height, alu, pm, bpp, FALSE, FALSE);
}
diff --git a/xorg-server/fb/fbbltone.c b/xorg-server/fb/fbbltone.c
index bfcb5a263..d089a433c 100644
--- a/xorg-server/fb/fbbltone.c
+++ b/xorg-server/fb/fbbltone.c
@@ -26,6 +26,101 @@
#include "fb.h"
+/*
+ * Stipple masks are independent of bit/byte order as long
+ * as bitorder == byteorder. FB doesn't handle the case
+ * where these differ
+ */
+#define BitsMask(x,w) ((FB_ALLONES << ((x) & FB_MASK)) & \
+ (FB_ALLONES >> ((FB_UNIT - ((x) + (w))) & FB_MASK)))
+
+#define Mask(x,w) BitsMask((x)*(w),(w))
+
+#define SelMask(b,n,w) ((((b) >> n) & 1) * Mask(n,w))
+
+#define C1(b,w) \
+ (SelMask(b,0,w))
+
+#define C2(b,w) \
+ (SelMask(b,0,w) | \
+ SelMask(b,1,w))
+
+#define C4(b,w) \
+ (SelMask(b,0,w) | \
+ SelMask(b,1,w) | \
+ SelMask(b,2,w) | \
+ SelMask(b,3,w))
+
+#define C8(b,w) \
+ (SelMask(b,0,w) | \
+ SelMask(b,1,w) | \
+ SelMask(b,2,w) | \
+ SelMask(b,3,w) | \
+ SelMask(b,4,w) | \
+ SelMask(b,5,w) | \
+ SelMask(b,6,w) | \
+ SelMask(b,7,w))
+
+static const FbBits fbStipple8Bits[256] = {
+ C8(0, 4), C8(1, 4), C8(2, 4), C8(3, 4), C8(4, 4), C8(5, 4),
+ C8(6, 4), C8(7, 4), C8(8, 4), C8(9, 4), C8(10, 4), C8(11, 4),
+ C8(12, 4), C8(13, 4), C8(14, 4), C8(15, 4), C8(16, 4), C8(17, 4),
+ C8(18, 4), C8(19, 4), C8(20, 4), C8(21, 4), C8(22, 4), C8(23, 4),
+ C8(24, 4), C8(25, 4), C8(26, 4), C8(27, 4), C8(28, 4), C8(29, 4),
+ C8(30, 4), C8(31, 4), C8(32, 4), C8(33, 4), C8(34, 4), C8(35, 4),
+ C8(36, 4), C8(37, 4), C8(38, 4), C8(39, 4), C8(40, 4), C8(41, 4),
+ C8(42, 4), C8(43, 4), C8(44, 4), C8(45, 4), C8(46, 4), C8(47, 4),
+ C8(48, 4), C8(49, 4), C8(50, 4), C8(51, 4), C8(52, 4), C8(53, 4),
+ C8(54, 4), C8(55, 4), C8(56, 4), C8(57, 4), C8(58, 4), C8(59, 4),
+ C8(60, 4), C8(61, 4), C8(62, 4), C8(63, 4), C8(64, 4), C8(65, 4),
+ C8(66, 4), C8(67, 4), C8(68, 4), C8(69, 4), C8(70, 4), C8(71, 4),
+ C8(72, 4), C8(73, 4), C8(74, 4), C8(75, 4), C8(76, 4), C8(77, 4),
+ C8(78, 4), C8(79, 4), C8(80, 4), C8(81, 4), C8(82, 4), C8(83, 4),
+ C8(84, 4), C8(85, 4), C8(86, 4), C8(87, 4), C8(88, 4), C8(89, 4),
+ C8(90, 4), C8(91, 4), C8(92, 4), C8(93, 4), C8(94, 4), C8(95, 4),
+ C8(96, 4), C8(97, 4), C8(98, 4), C8(99, 4), C8(100, 4), C8(101, 4),
+ C8(102, 4), C8(103, 4), C8(104, 4), C8(105, 4), C8(106, 4), C8(107, 4),
+ C8(108, 4), C8(109, 4), C8(110, 4), C8(111, 4), C8(112, 4), C8(113, 4),
+ C8(114, 4), C8(115, 4), C8(116, 4), C8(117, 4), C8(118, 4), C8(119, 4),
+ C8(120, 4), C8(121, 4), C8(122, 4), C8(123, 4), C8(124, 4), C8(125, 4),
+ C8(126, 4), C8(127, 4), C8(128, 4), C8(129, 4), C8(130, 4), C8(131, 4),
+ C8(132, 4), C8(133, 4), C8(134, 4), C8(135, 4), C8(136, 4), C8(137, 4),
+ C8(138, 4), C8(139, 4), C8(140, 4), C8(141, 4), C8(142, 4), C8(143, 4),
+ C8(144, 4), C8(145, 4), C8(146, 4), C8(147, 4), C8(148, 4), C8(149, 4),
+ C8(150, 4), C8(151, 4), C8(152, 4), C8(153, 4), C8(154, 4), C8(155, 4),
+ C8(156, 4), C8(157, 4), C8(158, 4), C8(159, 4), C8(160, 4), C8(161, 4),
+ C8(162, 4), C8(163, 4), C8(164, 4), C8(165, 4), C8(166, 4), C8(167, 4),
+ C8(168, 4), C8(169, 4), C8(170, 4), C8(171, 4), C8(172, 4), C8(173, 4),
+ C8(174, 4), C8(175, 4), C8(176, 4), C8(177, 4), C8(178, 4), C8(179, 4),
+ C8(180, 4), C8(181, 4), C8(182, 4), C8(183, 4), C8(184, 4), C8(185, 4),
+ C8(186, 4), C8(187, 4), C8(188, 4), C8(189, 4), C8(190, 4), C8(191, 4),
+ C8(192, 4), C8(193, 4), C8(194, 4), C8(195, 4), C8(196, 4), C8(197, 4),
+ C8(198, 4), C8(199, 4), C8(200, 4), C8(201, 4), C8(202, 4), C8(203, 4),
+ C8(204, 4), C8(205, 4), C8(206, 4), C8(207, 4), C8(208, 4), C8(209, 4),
+ C8(210, 4), C8(211, 4), C8(212, 4), C8(213, 4), C8(214, 4), C8(215, 4),
+ C8(216, 4), C8(217, 4), C8(218, 4), C8(219, 4), C8(220, 4), C8(221, 4),
+ C8(222, 4), C8(223, 4), C8(224, 4), C8(225, 4), C8(226, 4), C8(227, 4),
+ C8(228, 4), C8(229, 4), C8(230, 4), C8(231, 4), C8(232, 4), C8(233, 4),
+ C8(234, 4), C8(235, 4), C8(236, 4), C8(237, 4), C8(238, 4), C8(239, 4),
+ C8(240, 4), C8(241, 4), C8(242, 4), C8(243, 4), C8(244, 4), C8(245, 4),
+ C8(246, 4), C8(247, 4), C8(248, 4), C8(249, 4), C8(250, 4), C8(251, 4),
+ C8(252, 4), C8(253, 4), C8(254, 4), C8(255, 4),
+};
+
+static const FbBits fbStipple4Bits[16] = {
+ C4(0, 8), C4(1, 8), C4(2, 8), C4(3, 8), C4(4, 8), C4(5, 8),
+ C4(6, 8), C4(7, 8), C4(8, 8), C4(9, 8), C4(10, 8), C4(11, 8),
+ C4(12, 8), C4(13, 8), C4(14, 8), C4(15, 8),
+};
+
+static const FbBits fbStipple2Bits[4] = {
+ C2(0, 16), C2(1, 16), C2(2, 16), C2(3, 16),
+};
+
+static const FbBits fbStipple1Bits[2] = {
+ C1(0, 32), C1(1, 32),
+};
+
#ifdef __clang__
/* shift overflow is intentional */
#pragma clang diagnostic ignored "-Wshift-overflow"
@@ -62,85 +157,6 @@
bits = (src < srcEnd ? READ(src++) : 0); \
}
-#define LaneCases1(n,a) case n: FbLaneCase(n,a); break
-#define LaneCases2(n,a) LaneCases1(n,a); LaneCases1(n+1,a)
-#define LaneCases4(n,a) LaneCases2(n,a); LaneCases2(n+2,a)
-#define LaneCases8(n,a) LaneCases4(n,a); LaneCases4(n+4,a)
-#define LaneCases16(n,a) LaneCases8(n,a); LaneCases8(n+8,a)
-#define LaneCases32(n,a) LaneCases16(n,a); LaneCases16(n+16,a)
-#define LaneCases64(n,a) LaneCases32(n,a); LaneCases32(n+32,a)
-#define LaneCases128(n,a) LaneCases64(n,a); LaneCases64(n+64,a)
-#define LaneCases256(n,a) LaneCases128(n,a); LaneCases128(n+128,a)
-
-#if FB_SHIFT == 6
-#define LaneCases(a) LaneCases256(0,a)
-#endif
-
-#if FB_SHIFT == 5
-#define LaneCases(a) LaneCases16(0,a)
-#endif
-
-#if FB_SHIFT == 6
-CARD8 fb8Lane[256] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
- 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
- 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
- 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
- 113, 114, 115,
- 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
- 131, 132, 133,
- 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
- 149, 150, 151,
- 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
- 167, 168, 169,
- 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
- 185, 186, 187,
- 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
- 203, 204, 205,
- 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,
- 221, 222, 223,
- 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
- 239, 240, 241,
- 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
-};
-
-CARD8 fb16Lane[256] = {
- 0x00, 0x03, 0x0c, 0x0f,
- 0x30, 0x33, 0x3c, 0x3f,
- 0xc0, 0xc3, 0xcc, 0xcf,
- 0xf0, 0xf3, 0xfc, 0xff,
-};
-
-CARD8 fb32Lane[16] = {
- 0x00, 0x0f, 0xf0, 0xff,
-};
-#endif
-
-#if FB_SHIFT == 5
-CARD8 fb8Lane[16] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
-};
-
-CARD8 fb16Lane[16] = {
- 0, 3, 12, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-CARD8 fb32Lane[16] = {
- 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-};
-#endif
-
-CARD8 *fbLaneTable[33] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- fb8Lane, 0, 0, 0, 0, 0, 0, 0,
- fb16Lane, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- fb32Lane
-};
-
void
fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
int srcX, /* bit position of source */
@@ -169,7 +185,6 @@ fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
Bool transparent; /* accelerate 0 nop */
int srcinc; /* source units consumed */
Bool endNeedsLoad = FALSE; /* need load for endmask */
- CARD8 *fbLane;
int startbyte, endbyte;
if (dstBpp == 24) {
@@ -191,7 +206,7 @@ fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
pixelsPerDst = FB_UNIT / dstBpp;
/*
- * Number of source stipple patterns in FbStip
+ * Number of source stipple patterns in FbStip
*/
unitsPerSrc = FB_STIP_UNIT / pixelsPerDst;
@@ -233,15 +248,26 @@ fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
* Get pointer to stipple mask array for this depth
*/
fbBits = 0; /* unused */
- if (pixelsPerDst <= 8)
- fbBits = fbStippleTable[pixelsPerDst];
- fbLane = 0;
- if (transparent && fgand == 0 && dstBpp >= 8)
- fbLane = fbLaneTable[dstBpp];
+ switch (pixelsPerDst) {
+ case 8:
+ fbBits = fbStipple8Bits;
+ break;
+ case 4:
+ fbBits = fbStipple4Bits;
+ break;
+ case 2:
+ fbBits = fbStipple2Bits;
+ break;
+ case 1:
+ fbBits = fbStipple1Bits;
+ break;
+ default:
+ return;
+ }
/*
- * Compute total number of destination words written, but
- * don't count endmask
+ * Compute total number of destination words written, but
+ * don't count endmask
*/
nDst = nmiddle;
if (startmask)
@@ -287,21 +313,11 @@ fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
* Consume stipple bits for startmask
*/
if (startmask) {
-#if FB_UNIT > 32
- if (pixelsPerDst == 16)
- mask = FbStipple16Bits(FbLeftStipBits(bits, 16));
- else
-#endif
- mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)];
- if (fbLane) {
- fbTransparentSpan(dst, mask & startmask, fgxor, 1);
- }
- else {
- if (mask || !transparent)
- FbDoLeftMaskByteStippleRRop(dst, mask,
- fgand, fgxor, bgand, bgxor,
- startbyte, startmask);
- }
+ mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)];
+ if (mask || !transparent)
+ FbDoLeftMaskByteStippleRRop(dst, mask,
+ fgand, fgxor, bgand, bgxor,
+ startbyte, startmask);
bits = FbStipLeft(bits, pixelsPerDst);
dst++;
n--;
@@ -314,41 +330,22 @@ fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
w -= n;
if (copy) {
while (n--) {
-#if FB_UNIT > 32
- if (pixelsPerDst == 16)
- mask = FbStipple16Bits(FbLeftStipBits(bits, 16));
- else
-#endif
- mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)];
+ mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)];
WRITE(dst, FbOpaqueStipple(mask, fgxor, bgxor));
dst++;
bits = FbStipLeft(bits, pixelsPerDst);
}
}
else {
- if (fbLane) {
- while (bits && n) {
- switch (fbLane[FbLeftStipBits(bits, pixelsPerDst)]) {
- LaneCases((CARD8 *) dst);
- }
- bits = FbStipLeft(bits, pixelsPerDst);
- dst++;
- n--;
- }
- dst += n;
- }
- else {
- while (n--) {
- left = FbLeftStipBits(bits, pixelsPerDst);
- if (left || !transparent) {
- mask = fbBits[left];
- WRITE(dst, FbStippleRRop(READ(dst), mask,
- fgand, fgxor, bgand,
- bgxor));
- }
- dst++;
- bits = FbStipLeft(bits, pixelsPerDst);
+ while (n--) {
+ left = FbLeftStipBits(bits, pixelsPerDst);
+ if (left || !transparent) {
+ mask = fbBits[left];
+ WRITE(dst, FbStippleRRop(READ(dst), mask, fgand,
+ fgxor, bgand, bgxor));
}
+ dst++;
+ bits = FbStipLeft(bits, pixelsPerDst);
}
}
if (!w)
@@ -369,21 +366,10 @@ fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
if (endNeedsLoad) {
LoadBits;
}
-#if FB_UNIT > 32
- if (pixelsPerDst == 16)
- mask = FbStipple16Bits(FbLeftStipBits(bits, 16));
- else
-#endif
- mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)];
- if (fbLane) {
- fbTransparentSpan(dst, mask & endmask, fgxor, 1);
- }
- else {
- if (mask || !transparent)
- FbDoRightMaskByteStippleRRop(dst, mask,
- fgand, fgxor, bgand, bgxor,
- endbyte, endmask);
- }
+ mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)];
+ if (mask || !transparent)
+ FbDoRightMaskByteStippleRRop(dst, mask, fgand, fgxor,
+ bgand, bgxor, endbyte, endmask);
}
dst += dstStride;
src += srcStride;
@@ -412,47 +398,6 @@ fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */
#define SelMask24(b,n,r) ((((b) >> n) & 1) * Mask24(n,r))
-/*
- * Untested for MSBFirst or FB_UNIT == 32
- */
-
-#if FB_UNIT == 64
-#define C4_24(b,r) \
- (SelMask24(b,0,r) | \
- SelMask24(b,1,r) | \
- SelMask24(b,2,r) | \
- SelMask24(b,3,r))
-
-#define FbStip24New(rot) (2 + (rot != 0))
-#define FbStip24Len 4
-
-const FbBits fbStipple24Bits[3][1 << FbStip24Len] = {
- /* rotate 0 */
- {
- C4_24(0, 0), C4_24(1, 0), C4_24(2, 0), C4_24(3, 0),
- C4_24(4, 0), C4_24(5, 0), C4_24(6, 0), C4_24(7, 0),
- C4_24(8, 0), C4_24(9, 0), C4_24(10, 0), C4_24(11, 0),
- C4_24(12, 0), C4_24(13, 0), C4_24(14, 0), C4_24(15, 0),
- },
- /* rotate 8 */
- {
- C4_24(0, 8), C4_24(1, 8), C4_24(2, 8), C4_24(3, 8),
- C4_24(4, 8), C4_24(5, 8), C4_24(6, 8), C4_24(7, 8),
- C4_24(8, 8), C4_24(9, 8), C4_24(10, 8), C4_24(11, 8),
- C4_24(12, 8), C4_24(13, 8), C4_24(14, 8), C4_24(15, 8),
- },
- /* rotate 16 */
- {
- C4_24(0, 16), C4_24(1, 16), C4_24(2, 16), C4_24(3, 16),
- C4_24(4, 16), C4_24(5, 16), C4_24(6, 16), C4_24(7, 16),
- C4_24(8, 16), C4_24(9, 16), C4_24(10, 16), C4_24(11, 16),
- C4_24(12, 16), C4_24(13, 16), C4_24(14, 16), C4_24(15, 16),
- }
-};
-
-#endif
-
-#if FB_UNIT == 32
#define C2_24(b,r) \
(SelMask24(b,0,r) | \
SelMask24(b,1,r))
@@ -478,7 +423,6 @@ const FbBits fbStipple24Bits[3][1 << FbStip24Len] = {
C2_24(0, 16), C2_24(1, 16), C2_24(2, 16), C2_24(3, 16),
}
};
-#endif
#if BITMAP_BIT_ORDER == LSBFirst
diff --git a/xorg-server/fb/fbfill.c b/xorg-server/fb/fbfill.c
index de9d6b313..05d81ab77 100644
--- a/xorg-server/fb/fbfill.c
+++ b/xorg-server/fb/fbfill.c
@@ -26,6 +26,88 @@
#include "fb.h"
+static void
+fbTile(FbBits * dst, FbStride dstStride, int dstX, int width, int height,
+ FbBits * tile, FbStride tileStride, int tileWidth, int tileHeight,
+ int alu, FbBits pm, int bpp, int xRot, int yRot)
+{
+ int tileX, tileY;
+ int widthTmp;
+ int h, w;
+ int x, y;
+
+ modulus(-yRot, tileHeight, tileY);
+ y = 0;
+ while (height) {
+ h = tileHeight - tileY;
+ if (h > height)
+ h = height;
+ height -= h;
+ widthTmp = width;
+ x = dstX;
+ modulus(dstX - xRot, tileWidth, tileX);
+ while (widthTmp) {
+ w = tileWidth - tileX;
+ if (w > widthTmp)
+ w = widthTmp;
+ widthTmp -= w;
+ fbBlt(tile + tileY * tileStride,
+ tileStride,
+ tileX,
+ dst + y * dstStride,
+ dstStride, x, w, h, alu, pm, bpp, FALSE, FALSE);
+ x += w;
+ tileX = 0;
+ }
+ y += h;
+ tileY = 0;
+ }
+}
+
+static void
+fbStipple(FbBits * dst, FbStride dstStride,
+ int dstX, int dstBpp,
+ int width, int height,
+ FbStip * stip, FbStride stipStride,
+ int stipWidth, int stipHeight,
+ FbBits fgand, FbBits fgxor,
+ FbBits bgand, FbBits bgxor,
+ int xRot, int yRot)
+{
+ int stipX, stipY, sx;
+ int widthTmp;
+ int h, w;
+ int x, y;
+
+ modulus(-yRot, stipHeight, stipY);
+ modulus(dstX / dstBpp - xRot, stipWidth, stipX);
+ y = 0;
+ while (height) {
+ h = stipHeight - stipY;
+ if (h > height)
+ h = height;
+ height -= h;
+ widthTmp = width;
+ x = dstX;
+ sx = stipX;
+ while (widthTmp) {
+ w = (stipWidth - sx) * dstBpp;
+ if (w > widthTmp)
+ w = widthTmp;
+ widthTmp -= w;
+ fbBltOne(stip + stipY * stipStride,
+ stipStride,
+ sx,
+ dst + y * dstStride,
+ dstStride, x, dstBpp, w, h, fgand, fgxor, bgand, bgxor);
+ x += w;
+ sx = 0;
+ }
+ y += h;
+ stipY = 0;
+ }
+}
+
void
fbFill(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int width, int height)
{
@@ -97,7 +179,7 @@ fbFill(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int width, int height)
fbStipple(dst + (y + dstYoff) * dstStride, dstStride,
(x + dstXoff) * dstBpp, dstBpp, width * dstBpp, height,
stip, stipStride, stipWidth, stipHeight,
- pPriv->evenStipple, fgand, fgxor, bgand, bgxor,
+ fgand, fgxor, bgand, bgxor,
pGC->patOrg.x + pDrawable->x + dstXoff,
pGC->patOrg.y + pDrawable->y - y);
fbFinishAccess(&pStip->drawable);
diff --git a/xorg-server/fb/fbfillrect.c b/xorg-server/fb/fbfillrect.c
index 64ba2b493..0075b2cdb 100644
--- a/xorg-server/fb/fbfillrect.c
+++ b/xorg-server/fb/fbfillrect.c
@@ -74,7 +74,7 @@ fbPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrect, xRectangle *prect)
}
else {
pbox = RegionRects(pClip);
- /*
+ /*
* clip the rectangle to each box in the clip region
* this is logically equivalent to calling Intersect()
*/
diff --git a/xorg-server/fb/fbgc.c b/xorg-server/fb/fbgc.c
index f4d7f3a99..19c613158 100644
--- a/xorg-server/fb/fbgc.c
+++ b/xorg-server/fb/fbgc.c
@@ -110,80 +110,6 @@ fbPadPixmap(PixmapPtr pPixmap)
fbFinishAccess(&pPixmap->drawable);
}
-/*
- * Verify that 'bits' repeats every 'len' bits
- */
-static Bool
-fbBitsRepeat(FbBits bits, int len, int width)
-{
- FbBits mask = FbBitsMask(0, len);
- FbBits orig = bits & mask;
- int i;
-
- if (width > FB_UNIT)
- width = FB_UNIT;
- for (i = 0; i < width / len; i++) {
- if ((bits & mask) != orig)
- return FALSE;
- bits = FbScrLeft(bits, len);
- }
- return TRUE;
-}
-
-/*
- * Check whether an entire bitmap line is a repetition of
- * the first 'len' bits
- */
-static Bool
-fbLineRepeat(FbBits * bits, int len, int width)
-{
- FbBits first = bits[0];
-
- if (!fbBitsRepeat(first, len, width))
- return FALSE;
- width = (width + FB_UNIT - 1) >> FB_SHIFT;
- bits++;
- while (--width)
- if (READ(bits) != first)
- return FALSE;
- return TRUE;
-}
-
-/*
- * The even stipple code wants the first FB_UNIT/bpp bits on
- * each scanline to represent the entire stipple
- */
-static Bool
-fbCanEvenStipple(PixmapPtr pStipple, int bpp)
-{
- int len = FB_UNIT / bpp;
- FbBits *bits;
- int stride;
- int stip_bpp;
- _X_UNUSED int stipXoff, stipYoff;
- int h;
-
- /* can't even stipple 24bpp drawables */
- if ((bpp & (bpp - 1)) != 0)
- return FALSE;
- /* make sure the stipple width is a multiple of the even stipple width */
- if (pStipple->drawable.width % len != 0)
- return FALSE;
- fbGetDrawable(&pStipple->drawable, bits, stride, stip_bpp, stipXoff,
- stipYoff);
- h = pStipple->drawable.height;
- /* check to see that the stipple repeats horizontally */
- while (h--) {
- if (!fbLineRepeat(bits, len, pStipple->drawable.width)) {
- fbFinishAccess(&pStipple->drawable);
- return FALSE;
- }
- bits += stride;
- }
- fbFinishAccess(&pStipple->drawable);
- return TRUE;
-}
-
void
fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
{
@@ -193,7 +119,7 @@ fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
/*
* if the client clip is different or moved OR the subwindowMode has
* changed OR the window's clip has changed since the last validation
- * we need to recompute the composite clip
+ * we need to recompute the composite clip
*/
if ((changes &
@@ -239,16 +165,7 @@ fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
fbPadPixmap(pGC->tile.pixmap);
}
if (changes & GCStipple) {
- pPriv->evenStipple = FALSE;
-
if (pGC->stipple) {
-
- /* can we do an even stipple ?? */
- if (FbEvenStip(pGC->stipple->drawable.width,
- pDrawable->bitsPerPixel) &&
- (fbCanEvenStipple(pGC->stipple, pDrawable->bitsPerPixel)))
- pPriv->evenStipple = TRUE;
-
if (pGC->stipple->drawable.width * pDrawable->bitsPerPixel <
FB_UNIT)
fbPadPixmap(pGC->stipple);
diff --git a/xorg-server/fb/fbglyph.c b/xorg-server/fb/fbglyph.c
index 4f2904c31..61cb8de33 100644
--- a/xorg-server/fb/fbglyph.c
+++ b/xorg-server/fb/fbglyph.c
@@ -29,7 +29,7 @@
#include <X11/fonts/fontstruct.h>
#include "dixfontstr.h"
-Bool
+static Bool
fbGlyphIn(RegionPtr pRegion, int x, int y, int width, int height)
{
BoxRec box;
@@ -56,11 +56,7 @@ fbGlyphIn(RegionPtr pRegion, int x, int y, int width, int height)
#define WRITE1(d,n,fg) WRITE((d) + (n), (CARD8) fg)
#define WRITE2(d,n,fg) WRITE((CARD16 *) &(d[n]), (CARD16) fg)
#define WRITE4(d,n,fg) WRITE((CARD32 *) &(d[n]), (CARD32) fg)
-#if FB_UNIT == 6 && IMAGE_BYTE_ORDER == LSBFirst
-#define WRITE8(d) WRITE((FbBits *) &(d[0]), fg)
-#else
#define WRITE8(d) WRITE4(d,0,_ABCA), WRITE4(d,4,_BCAB)
-#endif
/*
* This is a bit tricky, but it's brief. Write 12 bytes worth
@@ -69,7 +65,7 @@ fbGlyphIn(RegionPtr pRegion, int x, int y, int width, int height)
*
* a b c d a b c d a b c d bytes
* A B C A B C A B C A B C pixels
- *
+ *
* f0 f1 f2
* A B C A B C A B C A B C pixels LSB
* C A B C A B C A B C A B pixels MSB
@@ -120,7 +116,7 @@ fbGlyphIn(RegionPtr pRegion, int x, int y, int width, int height)
#define CASE(a,b,c,d) (a | (b << 1) | (c << 2) | (d << 3))
#endif
-void
+static void
fbGlyph24(FbBits * dstBits,
FbStride dstStride,
int dstBpp, FbStip * stipple, FbBits fg, int x, int height)
diff --git a/xorg-server/fb/fbline.c b/xorg-server/fb/fbline.c
index 80dc89dde..3e582e6fd 100644
--- a/xorg-server/fb/fbline.c
+++ b/xorg-server/fb/fbline.c
@@ -26,7 +26,7 @@
#include "fb.h"
-void
+static void
fbZeroLine(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt)
{
int x1, y1, x2, y2;
@@ -54,7 +54,7 @@ fbZeroLine(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt)
}
}
-void
+static void
fbZeroSegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSegs)
{
int dashOffset;
diff --git a/xorg-server/fb/fboverlay.c b/xorg-server/fb/fboverlay.c
index 6a5f0f814..1e5e6b3be 100644
--- a/xorg-server/fb/fboverlay.c
+++ b/xorg-server/fb/fboverlay.c
@@ -16,7 +16,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
diff --git a/xorg-server/fb/fboverlay.h b/xorg-server/fb/fboverlay.h
index 47727e4ee..3312145bf 100644
--- a/xorg-server/fb/fboverlay.h
+++ b/xorg-server/fb/fboverlay.h
@@ -16,7 +16,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
diff --git a/xorg-server/fb/fbpict.c b/xorg-server/fb/fbpict.c
index f9c991774..c8378ad90 100644
--- a/xorg-server/fb/fbpict.c
+++ b/xorg-server/fb/fbpict.c
@@ -82,7 +82,7 @@ fbDestroyGlyphCache(void)
}
}
-void
+static void
fbUnrealizeGlyph(ScreenPtr pScreen,
GlyphPtr pGlyph)
{
@@ -113,7 +113,7 @@ fbGlyphs(CARD8 op,
int xDst = list->xOff, yDst = list->yOff;
miCompositeSourceValidate(pSrc);
-
+
n_glyphs = 0;
for (i = 0; i < nlist; ++i)
n_glyphs += list[i].len;
@@ -122,12 +122,12 @@ fbGlyphs(CARD8 op,
glyphCache = pixman_glyph_cache_create();
pixman_glyph_cache_freeze (glyphCache);
-
+
if (n_glyphs > N_STACK_GLYPHS) {
if (!(pglyphs = malloc (n_glyphs * sizeof (pixman_glyph_t))))
goto out;
}
-
+
i = 0;
x = y = 0;
while (nlist--) {
@@ -309,17 +309,9 @@ create_bits_picture(PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
return NULL;
#ifdef FB_ACCESS_WRAPPER
-#if FB_SHIFT==5
-
pixman_image_set_accessors(image,
(pixman_read_memory_func_t) wfbReadMemory,
(pixman_write_memory_func_t) wfbWriteMemory);
-
-#else
-
-#error The pixman library only works when FbBits is 32 bits wide
-
-#endif
#endif
/* pCompositeClip is undefined for source pictures, so
diff --git a/xorg-server/fb/fbpict.h b/xorg-server/fb/fbpict.h
index 8b0f59f7a..5cb866368 100644
--- a/xorg-server/fb/fbpict.h
+++ b/xorg-server/fb/fbpict.h
@@ -72,10 +72,6 @@ fbTriangles(CARD8 op,
INT16 xSrc, INT16 ySrc, int ntris, xTriangle * tris);
extern _X_EXPORT void
-fbUnrealizeGlyph(ScreenPtr pScreen,
- GlyphPtr pGlyph);
-
-extern _X_EXPORT void
fbGlyphs(CARD8 op,
PicturePtr pSrc,
PicturePtr pDst,
diff --git a/xorg-server/fb/fbpixmap.c b/xorg-server/fb/fbpixmap.c
index 677f28af0..951a92574 100644
--- a/xorg-server/fb/fbpixmap.c
+++ b/xorg-server/fb/fbpixmap.c
@@ -132,7 +132,7 @@ if (((rx1) < (rx2)) && ((ry1) < (ry2)) && \
r++; \
}
-/* Convert bitmap clip mask into clipping region.
+/* Convert bitmap clip mask into clipping region.
* First, goes through each line and makes boxes by noting the transitions
* from 0 to 1 and 1 to 0.
* Then it coalesces the current line with the previous if they have boxes
@@ -246,8 +246,8 @@ fbPixmapToRegion(PixmapPtr pPix)
rx1, h, base + (width & FB_MASK), h + 1);
}
/* if all rectangles on this line have the same x-coords as
- * those on the previous line, then add 1 to all the previous y2s and
- * throw away all the rectangles from this line
+ * those on the previous line, then add 1 to all the previous y2s and
+ * throw away all the rectangles from this line
*/
fSame = FALSE;
if (irectPrevStart != -1) {
diff --git a/xorg-server/fb/fbpoint.c b/xorg-server/fb/fbpoint.c
index d5129d796..be7c801d5 100644
--- a/xorg-server/fb/fbpoint.c
+++ b/xorg-server/fb/fbpoint.c
@@ -35,7 +35,7 @@ typedef void (*FbDots) (FbBits * dst,
int xorg,
int yorg, int xoff, int yoff, FbBits and, FbBits xor);
-void
+static void
fbDots(FbBits * dstOrig,
FbStride dstStride,
int dstBpp,
diff --git a/xorg-server/fb/fbpush.c b/xorg-server/fb/fbpush.c
index f0a861cbe..1d1bcfd08 100644
--- a/xorg-server/fb/fbpush.c
+++ b/xorg-server/fb/fbpush.c
@@ -26,7 +26,7 @@
#include "fb.h"
-void
+static void
fbPushPattern(DrawablePtr pDrawable,
GCPtr pGC,
FbStip * src,
@@ -84,7 +84,7 @@ fbPushPattern(DrawablePtr pDrawable,
}
}
-void
+static void
fbPushFill(DrawablePtr pDrawable,
GCPtr pGC,
FbStip * src,
diff --git a/xorg-server/fb/fbrop.h b/xorg-server/fb/fbrop.h
index 4362adb37..bc12b144e 100644
--- a/xorg-server/fb/fbrop.h
+++ b/xorg-server/fb/fbrop.h
@@ -92,19 +92,9 @@ extern _X_EXPORT const FbMergeRopRec FbMergeRopBits[16];
#define fbAndStip(rop,fg,pm) fbAndT(rop,fg,pm,FbStip)
/*
- * Stippling operations;
+ * Stippling operations;
*/
-extern _X_EXPORT const FbBits fbStipple16Bits[256]; /* half of table */
-
-#define FbStipple16Bits(b) \
- (fbStipple16Bits[(b)&0xff] | fbStipple16Bits[(b) >> 8] << FB_HALFUNIT)
-extern _X_EXPORT const FbBits fbStipple8Bits[256];
-extern _X_EXPORT const FbBits fbStipple4Bits[16];
-extern _X_EXPORT const FbBits fbStipple2Bits[4];
-extern _X_EXPORT const FbBits fbStipple1Bits[2];
-extern _X_EXPORT const FbBits *const fbStippleTable[];
-
#define FbStippleRRop(dst, b, fa, fx, ba, bx) \
(FbDoRRop(dst, fa, fx) & b) | (FbDoRRop(dst, ba, bx) & ~b)
diff --git a/xorg-server/fb/fbseg.c b/xorg-server/fb/fbseg.c
index 1848387f6..c3c196ab4 100644
--- a/xorg-server/fb/fbseg.c
+++ b/xorg-server/fb/fbseg.c
@@ -33,7 +33,7 @@
((dir < 0) ? FbStipLeft(mask,bpp) : \
FbStipRight(mask,bpp)))
-void
+static void
fbBresSolid(DrawablePtr pDrawable,
GCPtr pGC,
int dashOffset,
@@ -65,12 +65,6 @@ fbBresSolid(DrawablePtr pDrawable,
if (axis == X_AXIS) {
bits = 0;
while (len--) {
- if (e >= 0) {
- WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits));
- bits = 0;
- dst += dstStride;
- e += e3;
- }
bits |= mask;
mask = fbBresShiftMask(mask, signdx, dstBpp);
if (!mask) {
@@ -80,12 +74,23 @@ fbBresSolid(DrawablePtr pDrawable,
mask = mask0;
}
e += e1;
+ if (e >= 0) {
+ if (bits) {
+ WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits));
+ bits = 0;
+ }
+ dst += dstStride;
+ e += e3;
+ }
}
if (bits)
WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, bits));
}
else {
while (len--) {
+ WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, mask));
+ dst += dstStride;
+ e += e1;
if (e >= 0) {
e += e3;
mask = fbBresShiftMask(mask, signdx, dstBpp);
@@ -94,16 +99,13 @@ fbBresSolid(DrawablePtr pDrawable,
mask = mask0;
}
}
- WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, mask));
- dst += dstStride;
- e += e1;
}
}
fbFinishAccess(pDrawable);
}
-void
+static void
fbBresDash(DrawablePtr pDrawable,
GCPtr pGC,
int dashOffset,
@@ -176,7 +178,7 @@ fbBresDash(DrawablePtr pDrawable,
fbFinishAccess(pDrawable);
}
-void
+static void
fbBresFill(DrawablePtr pDrawable,
GCPtr pGC,
int dashOffset,
@@ -216,7 +218,7 @@ fbSetFg(DrawablePtr pDrawable, GCPtr pGC, Pixel fg)
}
}
-void
+static void
fbBresFillDash(DrawablePtr pDrawable,
GCPtr pGC,
int dashOffset,
@@ -434,7 +436,7 @@ fbBresDash24RRop(DrawablePtr pDrawable,
* based on the contents of the specified GC.
*/
-FbBres *
+static FbBres *
fbSelectBres(DrawablePtr pDrawable, GCPtr pGC)
{
FbGCPrivPtr pPriv = fbGetGCPrivate(pGC);
@@ -494,18 +496,6 @@ fbSelectBres(DrawablePtr pDrawable, GCPtr pGC)
}
void
-fbBres(DrawablePtr pDrawable,
- GCPtr pGC,
- int dashOffset,
- int signdx,
- int signdy, int axis, int x1, int y1, int e, int e1, int e3, int len)
-{
- (*fbSelectBres(pDrawable, pGC)) (pDrawable, pGC, dashOffset,
- signdx, signdy, axis, x1, y1,
- e, e1, e3, len);
-}
-
-void
fbSegment(DrawablePtr pDrawable,
GCPtr pGC,
int x1, int y1, int x2, int y2, Bool drawLast, int *dashOffset)
diff --git a/xorg-server/fb/fbstipple.c b/xorg-server/fb/fbstipple.c
deleted file mode 100644
index f6c84a212..000000000
--- a/xorg-server/fb/fbstipple.c
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * Copyright © 1998 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "fb.h"
-
-/*
- * This is a slight abuse of the preprocessor to generate repetitive
- * code, the idea is to generate code for each case of a copy-mode
- * transparent stipple
- */
-#define LaneCases1(c,a) case c: \
- while (n--) { FbLaneCase(c,a); a++; } \
- break
-#define LaneCases2(c,a) LaneCases1(c,a); LaneCases1(c+1,a)
-#define LaneCases4(c,a) LaneCases2(c,a); LaneCases2(c+2,a)
-#define LaneCases8(c,a) LaneCases4(c,a); LaneCases4(c+4,a)
-#define LaneCases16(c,a) LaneCases8(c,a); LaneCases8(c+8,a)
-#define LaneCases32(c,a) LaneCases16(c,a); LaneCases16(c+16,a)
-#define LaneCases64(c,a) LaneCases32(c,a); LaneCases32(c+32,a)
-#define LaneCases128(c,a) LaneCases64(c,a); LaneCases64(c+64,a)
-#define LaneCases256(c,a) LaneCases128(c,a); LaneCases128(c+128,a)
-
-#if FB_SHIFT == 6
-#define LaneCases(a) LaneCases256(0,a)
-#endif
-
-#if FB_SHIFT == 5
-#define LaneCases(a) LaneCases16(0,a)
-#endif
-
-/*
- * Repeat a transparent stipple across a scanline n times
- */
-
-void
-fbTransparentSpan(FbBits * dst, FbBits stip, FbBits fgxor, int n)
-{
- FbStip s;
-
- s = ((FbStip) (stip) & 0x01);
- s |= ((FbStip) (stip >> 8) & 0x02);
- s |= ((FbStip) (stip >> 16) & 0x04);
- s |= ((FbStip) (stip >> 24) & 0x08);
-#if FB_SHIFT > 5
- s |= ((FbStip) (stip >> 32) & 0x10);
- s |= ((FbStip) (stip >> 40) & 0x20);
- s |= ((FbStip) (stip >> 48) & 0x40);
- s |= ((FbStip) (stip >> 56) & 0x80);
-#endif
- switch (s) {
- LaneCases(dst);
- }
-}
-
-void
-fbEvenStipple(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int dstBpp,
- int width,
- int height,
- FbStip * stip,
- FbStride stipStride,
- int stipHeight,
- FbBits fgand,
- FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot)
-{
- FbBits startmask, endmask;
- FbBits mask, and, xor;
- int nmiddle, n;
- FbStip *s, *stipEnd, bits;
- int rot, stipX, stipY;
- int pixelsPerDst;
- const FbBits *fbBits;
- Bool transparent;
- int startbyte, endbyte;
-
- /*
- * Check for a transparent stipple (stencil)
- */
- transparent = FALSE;
- if (dstBpp >= 8 && fgand == 0 && bgand == FB_ALLONES && bgxor == 0)
- transparent = TRUE;
-
- pixelsPerDst = FB_UNIT / dstBpp;
- /*
- * Adjust dest pointers
- */
- dst += dstX >> FB_SHIFT;
- dstX &= FB_MASK;
- FbMaskBitsBytes(dstX, width, fgand == 0 && bgand == 0,
- startmask, startbyte, nmiddle, endmask, endbyte);
-
- if (startmask)
- dstStride--;
- dstStride -= nmiddle;
-
- xRot *= dstBpp;
- /*
- * Compute stip start scanline and rotation parameters
- */
- stipEnd = stip + stipStride * stipHeight;
- modulus(-yRot, stipHeight, stipY);
- s = stip + stipStride * stipY;
- modulus(-xRot, FB_UNIT, stipX);
- rot = stipX;
-
- /*
- * Get pointer to stipple mask array for this depth
- */
- /* fbStippleTable covers all valid bpp (4,8,16,32) */
- fbBits = fbStippleTable[pixelsPerDst];
-
- while (height--) {
- /*
- * Extract stipple bits for this scanline;
- */
- bits = READ(s);
- s += stipStride;
- if (s == stipEnd)
- s = stip;
-#if FB_UNIT > 32
- if (pixelsPerDst == 16)
- mask = FbStipple16Bits(FbLeftStipBits(bits, 16));
- else
-#endif
- mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)];
- /*
- * Rotate into position and compute reduced rop values
- */
- mask = FbRotLeft(mask, rot);
- and = (fgand & mask) | (bgand & ~mask);
- xor = (fgxor & mask) | (bgxor & ~mask);
-
- if (transparent) {
- if (startmask) {
- fbTransparentSpan(dst, mask & startmask, fgxor, 1);
- dst++;
- }
- fbTransparentSpan(dst, mask, fgxor, nmiddle);
- dst += nmiddle;
- if (endmask)
- fbTransparentSpan(dst, mask & endmask, fgxor, 1);
- }
- else {
- /*
- * Fill scanline
- */
- if (startmask) {
- FbDoLeftMaskByteRRop(dst, startbyte, startmask, and, xor);
- dst++;
- }
- n = nmiddle;
- if (!and)
- while (n--)
- WRITE(dst++, xor);
- else {
- while (n--) {
- WRITE(dst, FbDoRRop(READ(dst), and, xor));
- dst++;
- }
- }
- if (endmask)
- FbDoRightMaskByteRRop(dst, endbyte, endmask, and, xor);
- }
- dst += dstStride;
- }
-}
-
-void
-fbOddStipple(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int dstBpp,
- int width,
- int height,
- FbStip * stip,
- FbStride stipStride,
- int stipWidth,
- int stipHeight,
- FbBits fgand,
- FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot)
-{
- int stipX, stipY, sx;
- int widthTmp;
- int h, w;
- int x, y;
-
- modulus(-yRot, stipHeight, stipY);
- modulus(dstX / dstBpp - xRot, stipWidth, stipX);
- y = 0;
- while (height) {
- h = stipHeight - stipY;
- if (h > height)
- h = height;
- height -= h;
- widthTmp = width;
- x = dstX;
- sx = stipX;
- while (widthTmp) {
- w = (stipWidth - sx) * dstBpp;
- if (w > widthTmp)
- w = widthTmp;
- widthTmp -= w;
- fbBltOne(stip + stipY * stipStride,
- stipStride,
- sx,
- dst + y * dstStride,
- dstStride, x, dstBpp, w, h, fgand, fgxor, bgand, bgxor);
- x += w;
- sx = 0;
- }
- y += h;
- stipY = 0;
- }
-}
-
-void
-fbStipple(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int dstBpp,
- int width,
- int height,
- FbStip * stip,
- FbStride stipStride,
- int stipWidth,
- int stipHeight,
- Bool even,
- FbBits fgand,
- FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot)
-{
- if (even)
- fbEvenStipple(dst, dstStride, dstX, dstBpp, width, height,
- stip, stipStride, stipHeight,
- fgand, fgxor, bgand, bgxor, xRot, yRot);
- else
- fbOddStipple(dst, dstStride, dstX, dstBpp, width, height,
- stip, stipStride, stipWidth, stipHeight,
- fgand, fgxor, bgand, bgxor, xRot, yRot);
-}
diff --git a/xorg-server/fb/fbtile.c b/xorg-server/fb/fbtile.c
deleted file mode 100644
index 785c5f0e4..000000000
--- a/xorg-server/fb/fbtile.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright © 1998 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "fb.h"
-
-/*
- * Accelerated tile fill -- tile width is a power of two not greater
- * than FB_UNIT
- */
-
-void
-fbEvenTile(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int width,
- int height,
- FbBits * tile,
- FbStride tileStride,
- int tileHeight, int alu, FbBits pm, int xRot, int yRot)
-{
- FbBits *t, *tileEnd, bits;
- FbBits startmask, endmask;
- FbBits and, xor;
- int n, nmiddle;
- int tileX, tileY;
- int rot;
- int startbyte, endbyte;
-
- dst += dstX >> FB_SHIFT;
- dstX &= FB_MASK;
- FbMaskBitsBytes(dstX, width, FbDestInvarientRop(alu, pm),
- startmask, startbyte, nmiddle, endmask, endbyte);
- if (startmask)
- dstStride--;
- dstStride -= nmiddle;
-
- /*
- * Compute tile start scanline and rotation parameters
- */
- tileEnd = tile + tileHeight * tileStride;
- modulus(-yRot, tileHeight, tileY);
- t = tile + tileY * tileStride;
- modulus(-xRot, FB_UNIT, tileX);
- rot = tileX;
-
- while (height--) {
-
- /*
- * Pick up bits for this scanline
- */
- bits = READ(t);
- t += tileStride;
- if (t >= tileEnd)
- t = tile;
- bits = FbRotLeft(bits, rot);
- and = fbAnd(alu, bits, pm);
- xor = fbXor(alu, bits, pm);
-
- if (startmask) {
- FbDoLeftMaskByteRRop(dst, startbyte, startmask, and, xor);
- dst++;
- }
- n = nmiddle;
- if (!and)
- while (n--)
- WRITE(dst++, xor);
- else
- while (n--) {
- WRITE(dst, FbDoRRop(READ(dst), and, xor));
- dst++;
- }
- if (endmask)
- FbDoRightMaskByteRRop(dst, endbyte, endmask, and, xor);
- dst += dstStride;
- }
-}
-
-void
-fbOddTile(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int width,
- int height,
- FbBits * tile,
- FbStride tileStride,
- int tileWidth,
- int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot)
-{
- int tileX, tileY;
- int widthTmp;
- int h, w;
- int x, y;
-
- modulus(-yRot, tileHeight, tileY);
- y = 0;
- while (height) {
- h = tileHeight - tileY;
- if (h > height)
- h = height;
- height -= h;
- widthTmp = width;
- x = dstX;
- modulus(dstX - xRot, tileWidth, tileX);
- while (widthTmp) {
- w = tileWidth - tileX;
- if (w > widthTmp)
- w = widthTmp;
- widthTmp -= w;
- fbBlt(tile + tileY * tileStride,
- tileStride,
- tileX,
- dst + y * dstStride,
- dstStride, x, w, h, alu, pm, bpp, FALSE, FALSE);
- x += w;
- tileX = 0;
- }
- y += h;
- tileY = 0;
- }
-}
-
-void
-fbTile(FbBits * dst,
- FbStride dstStride,
- int dstX,
- int width,
- int height,
- FbBits * tile,
- FbStride tileStride,
- int tileWidth,
- int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot)
-{
- if (FbEvenTile(tileWidth))
- fbEvenTile(dst, dstStride, dstX, width, height,
- tile, tileStride, tileHeight, alu, pm, xRot, yRot);
- else
- fbOddTile(dst, dstStride, dstX, width, height,
- tile, tileStride, tileWidth, tileHeight,
- alu, pm, bpp, xRot, yRot);
-}
diff --git a/xorg-server/fb/fbutil.c b/xorg-server/fb/fbutil.c
index 2ca80d1c9..c1d5923c4 100644
--- a/xorg-server/fb/fbutil.c
+++ b/xorg-server/fb/fbutil.c
@@ -39,84 +39,6 @@ fbReplicatePixel(Pixel p, int bpp)
return b;
}
-void
-fbReduceRasterOp(int rop, FbBits fg, FbBits pm, FbBits * andp, FbBits * xorp)
-{
- FbBits and, xor;
-
- switch (rop) {
- default:
- case GXclear: /* 0 0 0 0 */
- and = 0;
- xor = 0;
- break;
- case GXand: /* 0 0 0 1 */
- and = fg;
- xor = 0;
- break;
- case GXandReverse: /* 0 0 1 0 */
- and = fg;
- xor = fg;
- break;
- case GXcopy: /* 0 0 1 1 */
- and = 0;
- xor = fg;
- break;
- case GXandInverted: /* 0 1 0 0 */
- and = ~fg;
- xor = 0;
- break;
- case GXnoop: /* 0 1 0 1 */
- and = FB_ALLONES;
- xor = 0;
- break;
- case GXxor: /* 0 1 1 0 */
- and = FB_ALLONES;
- xor = fg;
- break;
- case GXor: /* 0 1 1 1 */
- and = ~fg;
- xor = fg;
- break;
- case GXnor: /* 1 0 0 0 */
- and = ~fg;
- xor = ~fg;
- break;
- case GXequiv: /* 1 0 0 1 */
- and = FB_ALLONES;
- xor = ~fg;
- break;
- case GXinvert: /* 1 0 1 0 */
- and = FB_ALLONES;
- xor = FB_ALLONES;
- break;
- case GXorReverse: /* 1 0 1 1 */
- and = ~fg;
- xor = FB_ALLONES;
- break;
- case GXcopyInverted: /* 1 1 0 0 */
- and = 0;
- xor = ~fg;
- break;
- case GXorInverted: /* 1 1 0 1 */
- and = fg;
- xor = ~fg;
- break;
- case GXnand: /* 1 1 1 0 */
- and = fg;
- xor = FB_ALLONES;
- break;
- case GXset: /* 1 1 1 1 */
- and = 0;
- xor = FB_ALLONES;
- break;
- }
- and |= ~pm;
- xor &= pm;
- *andp = and;
- *xorp = xor;
-}
-
#define O 0
#define I FB_ALLONES
@@ -139,233 +61,3 @@ const FbMergeRopRec FbMergeRopBits[16] = {
{O, O, O, I}, /* set 0xf 1 */
};
-/*
- * Stipple masks are independent of bit/byte order as long
- * as bitorder == byteorder. FB doesn't handle the case
- * where these differ
- */
-#define BitsMask(x,w) ((FB_ALLONES << ((x) & FB_MASK)) & \
- (FB_ALLONES >> ((FB_UNIT - ((x) + (w))) & FB_MASK)))
-
-#define Mask(x,w) BitsMask((x)*(w),(w))
-
-#define SelMask(b,n,w) ((((b) >> n) & 1) * Mask(n,w))
-
-#define C1(b,w) \
- (SelMask(b,0,w))
-
-#define C2(b,w) \
- (SelMask(b,0,w) | \
- SelMask(b,1,w))
-
-#define C4(b,w) \
- (SelMask(b,0,w) | \
- SelMask(b,1,w) | \
- SelMask(b,2,w) | \
- SelMask(b,3,w))
-
-#define C8(b,w) \
- (SelMask(b,0,w) | \
- SelMask(b,1,w) | \
- SelMask(b,2,w) | \
- SelMask(b,3,w) | \
- SelMask(b,4,w) | \
- SelMask(b,5,w) | \
- SelMask(b,6,w) | \
- SelMask(b,7,w))
-
-#if FB_UNIT == 16
-#define fbStipple16Bits 0
-#define fbStipple8Bits 0
-const FbBits fbStipple4Bits[16] = {
- C4(0, 4), C4(1, 4), C4(2, 4), C4(3, 4), C4(4, 4), C4(5, 4),
- C4(6, 4), C4(7, 4), C4(8, 4), C4(9, 4), C4(10, 4), C4(11, 4),
- C4(12, 4), C4(13, 4), C4(14, 4), C4(15, 4),
-};
-
-const FbBits fbStipple2Bits[4] = {
- C2(0, 8), C2(1, 8), C2(2, 8), C2(3, 8),
-};
-
-const FbBits fbStipple1Bits[2] = {
- C1(0, 16), C1(1, 16),
-};
-#endif
-#if FB_UNIT == 32
-#define fbStipple16Bits 0
-const FbBits fbStipple8Bits[256] = {
- C8(0, 4), C8(1, 4), C8(2, 4), C8(3, 4), C8(4, 4), C8(5, 4),
- C8(6, 4), C8(7, 4), C8(8, 4), C8(9, 4), C8(10, 4), C8(11, 4),
- C8(12, 4), C8(13, 4), C8(14, 4), C8(15, 4), C8(16, 4), C8(17, 4),
- C8(18, 4), C8(19, 4), C8(20, 4), C8(21, 4), C8(22, 4), C8(23, 4),
- C8(24, 4), C8(25, 4), C8(26, 4), C8(27, 4), C8(28, 4), C8(29, 4),
- C8(30, 4), C8(31, 4), C8(32, 4), C8(33, 4), C8(34, 4), C8(35, 4),
- C8(36, 4), C8(37, 4), C8(38, 4), C8(39, 4), C8(40, 4), C8(41, 4),
- C8(42, 4), C8(43, 4), C8(44, 4), C8(45, 4), C8(46, 4), C8(47, 4),
- C8(48, 4), C8(49, 4), C8(50, 4), C8(51, 4), C8(52, 4), C8(53, 4),
- C8(54, 4), C8(55, 4), C8(56, 4), C8(57, 4), C8(58, 4), C8(59, 4),
- C8(60, 4), C8(61, 4), C8(62, 4), C8(63, 4), C8(64, 4), C8(65, 4),
- C8(66, 4), C8(67, 4), C8(68, 4), C8(69, 4), C8(70, 4), C8(71, 4),
- C8(72, 4), C8(73, 4), C8(74, 4), C8(75, 4), C8(76, 4), C8(77, 4),
- C8(78, 4), C8(79, 4), C8(80, 4), C8(81, 4), C8(82, 4), C8(83, 4),
- C8(84, 4), C8(85, 4), C8(86, 4), C8(87, 4), C8(88, 4), C8(89, 4),
- C8(90, 4), C8(91, 4), C8(92, 4), C8(93, 4), C8(94, 4), C8(95, 4),
- C8(96, 4), C8(97, 4), C8(98, 4), C8(99, 4), C8(100, 4), C8(101, 4),
- C8(102, 4), C8(103, 4), C8(104, 4), C8(105, 4), C8(106, 4), C8(107, 4),
- C8(108, 4), C8(109, 4), C8(110, 4), C8(111, 4), C8(112, 4), C8(113, 4),
- C8(114, 4), C8(115, 4), C8(116, 4), C8(117, 4), C8(118, 4), C8(119, 4),
- C8(120, 4), C8(121, 4), C8(122, 4), C8(123, 4), C8(124, 4), C8(125, 4),
- C8(126, 4), C8(127, 4), C8(128, 4), C8(129, 4), C8(130, 4), C8(131, 4),
- C8(132, 4), C8(133, 4), C8(134, 4), C8(135, 4), C8(136, 4), C8(137, 4),
- C8(138, 4), C8(139, 4), C8(140, 4), C8(141, 4), C8(142, 4), C8(143, 4),
- C8(144, 4), C8(145, 4), C8(146, 4), C8(147, 4), C8(148, 4), C8(149, 4),
- C8(150, 4), C8(151, 4), C8(152, 4), C8(153, 4), C8(154, 4), C8(155, 4),
- C8(156, 4), C8(157, 4), C8(158, 4), C8(159, 4), C8(160, 4), C8(161, 4),
- C8(162, 4), C8(163, 4), C8(164, 4), C8(165, 4), C8(166, 4), C8(167, 4),
- C8(168, 4), C8(169, 4), C8(170, 4), C8(171, 4), C8(172, 4), C8(173, 4),
- C8(174, 4), C8(175, 4), C8(176, 4), C8(177, 4), C8(178, 4), C8(179, 4),
- C8(180, 4), C8(181, 4), C8(182, 4), C8(183, 4), C8(184, 4), C8(185, 4),
- C8(186, 4), C8(187, 4), C8(188, 4), C8(189, 4), C8(190, 4), C8(191, 4),
- C8(192, 4), C8(193, 4), C8(194, 4), C8(195, 4), C8(196, 4), C8(197, 4),
- C8(198, 4), C8(199, 4), C8(200, 4), C8(201, 4), C8(202, 4), C8(203, 4),
- C8(204, 4), C8(205, 4), C8(206, 4), C8(207, 4), C8(208, 4), C8(209, 4),
- C8(210, 4), C8(211, 4), C8(212, 4), C8(213, 4), C8(214, 4), C8(215, 4),
- C8(216, 4), C8(217, 4), C8(218, 4), C8(219, 4), C8(220, 4), C8(221, 4),
- C8(222, 4), C8(223, 4), C8(224, 4), C8(225, 4), C8(226, 4), C8(227, 4),
- C8(228, 4), C8(229, 4), C8(230, 4), C8(231, 4), C8(232, 4), C8(233, 4),
- C8(234, 4), C8(235, 4), C8(236, 4), C8(237, 4), C8(238, 4), C8(239, 4),
- C8(240, 4), C8(241, 4), C8(242, 4), C8(243, 4), C8(244, 4), C8(245, 4),
- C8(246, 4), C8(247, 4), C8(248, 4), C8(249, 4), C8(250, 4), C8(251, 4),
- C8(252, 4), C8(253, 4), C8(254, 4), C8(255, 4),
-};
-
-const FbBits fbStipple4Bits[16] = {
- C4(0, 8), C4(1, 8), C4(2, 8), C4(3, 8), C4(4, 8), C4(5, 8),
- C4(6, 8), C4(7, 8), C4(8, 8), C4(9, 8), C4(10, 8), C4(11, 8),
- C4(12, 8), C4(13, 8), C4(14, 8), C4(15, 8),
-};
-
-const FbBits fbStipple2Bits[4] = {
- C2(0, 16), C2(1, 16), C2(2, 16), C2(3, 16),
-};
-
-const FbBits fbStipple1Bits[2] = {
- C1(0, 32), C1(1, 32),
-};
-#endif
-#if FB_UNIT == 64
-const FbBits fbStipple16Bits[256] = {
- C8(0, 4), C8(1, 4), C8(2, 4), C8(3, 4), C8(4, 4), C8(5, 4),
- C8(6, 4), C8(7, 4), C8(8, 4), C8(9, 4), C8(10, 4), C8(11, 4),
- C8(12, 4), C8(13, 4), C8(14, 4), C8(15, 4), C8(16, 4), C8(17, 4),
- C8(18, 4), C8(19, 4), C8(20, 4), C8(21, 4), C8(22, 4), C8(23, 4),
- C8(24, 4), C8(25, 4), C8(26, 4), C8(27, 4), C8(28, 4), C8(29, 4),
- C8(30, 4), C8(31, 4), C8(32, 4), C8(33, 4), C8(34, 4), C8(35, 4),
- C8(36, 4), C8(37, 4), C8(38, 4), C8(39, 4), C8(40, 4), C8(41, 4),
- C8(42, 4), C8(43, 4), C8(44, 4), C8(45, 4), C8(46, 4), C8(47, 4),
- C8(48, 4), C8(49, 4), C8(50, 4), C8(51, 4), C8(52, 4), C8(53, 4),
- C8(54, 4), C8(55, 4), C8(56, 4), C8(57, 4), C8(58, 4), C8(59, 4),
- C8(60, 4), C8(61, 4), C8(62, 4), C8(63, 4), C8(64, 4), C8(65, 4),
- C8(66, 4), C8(67, 4), C8(68, 4), C8(69, 4), C8(70, 4), C8(71, 4),
- C8(72, 4), C8(73, 4), C8(74, 4), C8(75, 4), C8(76, 4), C8(77, 4),
- C8(78, 4), C8(79, 4), C8(80, 4), C8(81, 4), C8(82, 4), C8(83, 4),
- C8(84, 4), C8(85, 4), C8(86, 4), C8(87, 4), C8(88, 4), C8(89, 4),
- C8(90, 4), C8(91, 4), C8(92, 4), C8(93, 4), C8(94, 4), C8(95, 4),
- C8(96, 4), C8(97, 4), C8(98, 4), C8(99, 4), C8(100, 4), C8(101, 4),
- C8(102, 4), C8(103, 4), C8(104, 4), C8(105, 4), C8(106, 4), C8(107, 4),
- C8(108, 4), C8(109, 4), C8(110, 4), C8(111, 4), C8(112, 4), C8(113, 4),
- C8(114, 4), C8(115, 4), C8(116, 4), C8(117, 4), C8(118, 4), C8(119, 4),
- C8(120, 4), C8(121, 4), C8(122, 4), C8(123, 4), C8(124, 4), C8(125, 4),
- C8(126, 4), C8(127, 4), C8(128, 4), C8(129, 4), C8(130, 4), C8(131, 4),
- C8(132, 4), C8(133, 4), C8(134, 4), C8(135, 4), C8(136, 4), C8(137, 4),
- C8(138, 4), C8(139, 4), C8(140, 4), C8(141, 4), C8(142, 4), C8(143, 4),
- C8(144, 4), C8(145, 4), C8(146, 4), C8(147, 4), C8(148, 4), C8(149, 4),
- C8(150, 4), C8(151, 4), C8(152, 4), C8(153, 4), C8(154, 4), C8(155, 4),
- C8(156, 4), C8(157, 4), C8(158, 4), C8(159, 4), C8(160, 4), C8(161, 4),
- C8(162, 4), C8(163, 4), C8(164, 4), C8(165, 4), C8(166, 4), C8(167, 4),
- C8(168, 4), C8(169, 4), C8(170, 4), C8(171, 4), C8(172, 4), C8(173, 4),
- C8(174, 4), C8(175, 4), C8(176, 4), C8(177, 4), C8(178, 4), C8(179, 4),
- C8(180, 4), C8(181, 4), C8(182, 4), C8(183, 4), C8(184, 4), C8(185, 4),
- C8(186, 4), C8(187, 4), C8(188, 4), C8(189, 4), C8(190, 4), C8(191, 4),
- C8(192, 4), C8(193, 4), C8(194, 4), C8(195, 4), C8(196, 4), C8(197, 4),
- C8(198, 4), C8(199, 4), C8(200, 4), C8(201, 4), C8(202, 4), C8(203, 4),
- C8(204, 4), C8(205, 4), C8(206, 4), C8(207, 4), C8(208, 4), C8(209, 4),
- C8(210, 4), C8(211, 4), C8(212, 4), C8(213, 4), C8(214, 4), C8(215, 4),
- C8(216, 4), C8(217, 4), C8(218, 4), C8(219, 4), C8(220, 4), C8(221, 4),
- C8(222, 4), C8(223, 4), C8(224, 4), C8(225, 4), C8(226, 4), C8(227, 4),
- C8(228, 4), C8(229, 4), C8(230, 4), C8(231, 4), C8(232, 4), C8(233, 4),
- C8(234, 4), C8(235, 4), C8(236, 4), C8(237, 4), C8(238, 4), C8(239, 4),
- C8(240, 4), C8(241, 4), C8(242, 4), C8(243, 4), C8(244, 4), C8(245, 4),
- C8(246, 4), C8(247, 4), C8(248, 4), C8(249, 4), C8(250, 4), C8(251, 4),
- C8(252, 4), C8(253, 4), C8(254, 4), C8(255, 4),
-};
-
-const FbBits fbStipple8Bits[256] = {
- C8(0, 8), C8(1, 8), C8(2, 8), C8(3, 8), C8(4, 8), C8(5, 8),
- C8(6, 8), C8(7, 8), C8(8, 8), C8(9, 8), C8(10, 8), C8(11, 8),
- C8(12, 8), C8(13, 8), C8(14, 8), C8(15, 8), C8(16, 8), C8(17, 8),
- C8(18, 8), C8(19, 8), C8(20, 8), C8(21, 8), C8(22, 8), C8(23, 8),
- C8(24, 8), C8(25, 8), C8(26, 8), C8(27, 8), C8(28, 8), C8(29, 8),
- C8(30, 8), C8(31, 8), C8(32, 8), C8(33, 8), C8(34, 8), C8(35, 8),
- C8(36, 8), C8(37, 8), C8(38, 8), C8(39, 8), C8(40, 8), C8(41, 8),
- C8(42, 8), C8(43, 8), C8(44, 8), C8(45, 8), C8(46, 8), C8(47, 8),
- C8(48, 8), C8(49, 8), C8(50, 8), C8(51, 8), C8(52, 8), C8(53, 8),
- C8(54, 8), C8(55, 8), C8(56, 8), C8(57, 8), C8(58, 8), C8(59, 8),
- C8(60, 8), C8(61, 8), C8(62, 8), C8(63, 8), C8(64, 8), C8(65, 8),
- C8(66, 8), C8(67, 8), C8(68, 8), C8(69, 8), C8(70, 8), C8(71, 8),
- C8(72, 8), C8(73, 8), C8(74, 8), C8(75, 8), C8(76, 8), C8(77, 8),
- C8(78, 8), C8(79, 8), C8(80, 8), C8(81, 8), C8(82, 8), C8(83, 8),
- C8(84, 8), C8(85, 8), C8(86, 8), C8(87, 8), C8(88, 8), C8(89, 8),
- C8(90, 8), C8(91, 8), C8(92, 8), C8(93, 8), C8(94, 8), C8(95, 8),
- C8(96, 8), C8(97, 8), C8(98, 8), C8(99, 8), C8(100, 8), C8(101, 8),
- C8(102, 8), C8(103, 8), C8(104, 8), C8(105, 8), C8(106, 8), C8(107, 8),
- C8(108, 8), C8(109, 8), C8(110, 8), C8(111, 8), C8(112, 8), C8(113, 8),
- C8(114, 8), C8(115, 8), C8(116, 8), C8(117, 8), C8(118, 8), C8(119, 8),
- C8(120, 8), C8(121, 8), C8(122, 8), C8(123, 8), C8(124, 8), C8(125, 8),
- C8(126, 8), C8(127, 8), C8(128, 8), C8(129, 8), C8(130, 8), C8(131, 8),
- C8(132, 8), C8(133, 8), C8(134, 8), C8(135, 8), C8(136, 8), C8(137, 8),
- C8(138, 8), C8(139, 8), C8(140, 8), C8(141, 8), C8(142, 8), C8(143, 8),
- C8(144, 8), C8(145, 8), C8(146, 8), C8(147, 8), C8(148, 8), C8(149, 8),
- C8(150, 8), C8(151, 8), C8(152, 8), C8(153, 8), C8(154, 8), C8(155, 8),
- C8(156, 8), C8(157, 8), C8(158, 8), C8(159, 8), C8(160, 8), C8(161, 8),
- C8(162, 8), C8(163, 8), C8(164, 8), C8(165, 8), C8(166, 8), C8(167, 8),
- C8(168, 8), C8(169, 8), C8(170, 8), C8(171, 8), C8(172, 8), C8(173, 8),
- C8(174, 8), C8(175, 8), C8(176, 8), C8(177, 8), C8(178, 8), C8(179, 8),
- C8(180, 8), C8(181, 8), C8(182, 8), C8(183, 8), C8(184, 8), C8(185, 8),
- C8(186, 8), C8(187, 8), C8(188, 8), C8(189, 8), C8(190, 8), C8(191, 8),
- C8(192, 8), C8(193, 8), C8(194, 8), C8(195, 8), C8(196, 8), C8(197, 8),
- C8(198, 8), C8(199, 8), C8(200, 8), C8(201, 8), C8(202, 8), C8(203, 8),
- C8(204, 8), C8(205, 8), C8(206, 8), C8(207, 8), C8(208, 8), C8(209, 8),
- C8(210, 8), C8(211, 8), C8(212, 8), C8(213, 8), C8(214, 8), C8(215, 8),
- C8(216, 8), C8(217, 8), C8(218, 8), C8(219, 8), C8(220, 8), C8(221, 8),
- C8(222, 8), C8(223, 8), C8(224, 8), C8(225, 8), C8(226, 8), C8(227, 8),
- C8(228, 8), C8(229, 8), C8(230, 8), C8(231, 8), C8(232, 8), C8(233, 8),
- C8(234, 8), C8(235, 8), C8(236, 8), C8(237, 8), C8(238, 8), C8(239, 8),
- C8(240, 8), C8(241, 8), C8(242, 8), C8(243, 8), C8(244, 8), C8(245, 8),
- C8(246, 8), C8(247, 8), C8(248, 8), C8(249, 8), C8(250, 8), C8(251, 8),
- C8(252, 8), C8(253, 8), C8(254, 8), C8(255, 8),
-};
-
-const FbBits fbStipple4Bits[16] = {
- C4(0, 16), C4(1, 16), C4(2, 16), C4(3, 16), C4(4, 16), C4(5, 16),
- C4(6, 16), C4(7, 16), C4(8, 16), C4(9, 16), C4(10, 16), C4(11, 16),
- C4(12, 16), C4(13, 16), C4(14, 16), C4(15, 16),
-};
-
-const FbBits fbStipple2Bits[4] = {
- C2(0, 32), C2(1, 32), C2(2, 32), C2(3, 32),
-};
-
-#define fbStipple1Bits 0
-#endif
-const FbBits *const fbStippleTable[] = {
- 0,
- fbStipple1Bits,
- fbStipple2Bits,
- 0,
- fbStipple4Bits,
- 0,
- 0,
- 0,
- fbStipple8Bits,
-};
diff --git a/xorg-server/fb/wfbrename.h b/xorg-server/fb/wfbrename.h
index 749c6d09b..baa80f8bb 100644
--- a/xorg-server/fb/wfbrename.h
+++ b/xorg-server/fb/wfbrename.h
@@ -1,4 +1,3 @@
-#define fb16Lane wfb16Lane
#define fb24_32CopyMtoN wfb24_32CopyMtoN
#define fb24_32CreateScreenResources wfb24_32CreateScreenResources
#define fb24_32GetImage wfb24_32GetImage
@@ -7,8 +6,6 @@
#define fb24_32PutZImage wfb24_32PutZImage
#define fb24_32ReformatTile wfb24_32ReformatTile
#define fb24_32SetSpans wfb24_32SetSpans
-#define fb32Lane wfb32Lane
-#define fb8Lane wfb8Lane
#define fbAddTraps wfbAddTraps
#define fbAddTriangles wfbAddTriangles
#define fbAllocatePrivates wfbAllocatePrivates
@@ -61,8 +58,6 @@
#define fbDots24 wfbDots24
#define fbDots32 wfbDots32
#define fbDots8 wfbDots8
-#define fbEvenStipple wfbEvenStipple
-#define fbEvenTile wfbEvenTile
#define fbExpandDirectColors wfbExpandDirectColors
#define fbFill wfbFill
#define fbFillRegionSolid wfbFillRegionSolid
@@ -79,18 +74,13 @@
#define fbGlyph24 wfbGlyph24
#define fbGlyph32 wfbGlyph32
#define fbGlyph8 wfbGlyph8
-#define fbGlyphIn wfbGlyphIn
#define fbHasVisualTypes wfbHasVisualTypes
#define fbImageGlyphBlt wfbImageGlyphBlt
#define fbIn wfbIn
#define fbInitializeColormap wfbInitializeColormap
#define fbInitVisuals wfbInitVisuals
-#define fbInstallColormap wfbInstallColormap
-#define fbLaneTable wfbLaneTable
#define fbListInstalledColormaps wfbListInstalledColormaps
#define FbMergeRopBits wFbMergeRopBits
-#define fbOddStipple wfbOddStipple
-#define fbOddTile wfbOddTile
#define fbOver wfbOver
#define fbOver24 wfbOver24
#define fbOverlayCloseScreen wfbOverlayCloseScreen
@@ -133,8 +123,6 @@
#define fbQueryBestSize wfbQueryBestSize
#define fbRasterizeTrapezoid wfbRasterizeTrapezoid
#define fbRealizeFont wfbRealizeFont
-#define fbRealizeWindow wfbRealizeWindow
-#define fbReduceRasterOp wfbReduceRasterOp
#define fbReplicatePixel wfbReplicatePixel
#define fbResolveColor wfbResolveColor
#define fbScreenPrivateKeyRec wfbScreenPrivateKeyRec
@@ -148,15 +136,6 @@
#define fbSolid wfbSolid
#define fbSolid24 wfbSolid24
#define fbSolidBoxClipped wfbSolidBoxClipped
-#define fbStipple wfbStipple
-#define fbStipple1Bits wfbStipple1Bits
-#define fbStipple24Bits wfbStipple24Bits
-#define fbStipple2Bits wfbStipple2Bits
-#define fbStipple4Bits wfbStipple4Bits
-#define fbStipple8Bits wfbStipple8Bits
-#define fbStippleTable wfbStippleTable
-#define fbTile wfbTile
-#define fbTransparentSpan wfbTransparentSpan
#define fbTrapezoids wfbTrapezoids
#define fbTriangles wfbTriangles
#define fbUninstallColormap wfbUninstallColormap
@@ -164,7 +143,5 @@
#define fbUnrealizeFont wfbUnrealizeFont
#define fbValidateGC wfbValidateGC
#define fbWinPrivateKeyRec wfbWinPrivateKeyRec
-#define fbZeroLine wfbZeroLine
-#define fbZeroSegment wfbZeroSegment
#define free_pixman_pict wfb_free_pixman_pict
#define image_from_pict wfb_image_from_pict
diff --git a/xorg-server/glamor/glamor.c b/xorg-server/glamor/glamor.c
index fc24b1bdd..d228e35ad 100644
--- a/xorg-server/glamor/glamor.c
+++ b/xorg-server/glamor/glamor.c
@@ -106,6 +106,7 @@ glamor_set_pixmap_texture(PixmapPtr pixmap, unsigned int tex)
ErrorF("XXX fail to create fbo.\n");
return;
}
+ fbo->external = TRUE;
glamor_pixmap_attach_fbo(pixmap, fbo);
}
diff --git a/xorg-server/glamor/glamor_fbo.c b/xorg-server/glamor/glamor_fbo.c
index 090dfd8e7..42738268c 100644
--- a/xorg-server/glamor/glamor_fbo.c
+++ b/xorg-server/glamor/glamor_fbo.c
@@ -153,7 +153,7 @@ glamor_pixmap_fbo_cache_put(glamor_pixmap_fbo *fbo)
#else
n_format = cache_format(fbo->format);
- if (fbo->fb == 0 || n_format == -1
+ if (fbo->fb == 0 || fbo->external || n_format == -1
|| fbo->glamor_priv->fbo_cache_watermark >= FBO_CACHE_THRESHOLD) {
fbo->glamor_priv->tick += GLAMOR_CACHE_EXPIRE_MAX;
glamor_fbo_expire(fbo->glamor_priv);
@@ -237,6 +237,7 @@ glamor_create_fbo_from_tex(glamor_screen_private *glamor_priv,
fbo->tex = tex;
fbo->width = w;
fbo->height = h;
+ fbo->external = FALSE;
fbo->format = format;
fbo->glamor_priv = glamor_priv;
diff --git a/xorg-server/glamor/glamor_picture.c b/xorg-server/glamor/glamor_picture.c
index cbbc19406..bc658f801 100644
--- a/xorg-server/glamor/glamor_picture.c
+++ b/xorg-server/glamor/glamor_picture.c
@@ -45,7 +45,7 @@ glamor_upload_picture_to_texture(PicturePtr picture)
return glamor_upload_pixmap_to_texture(pixmap);
}
-/*
+/*
* We should already have drawable attached to it, if it has one.
* Then set the attached pixmap to is_picture format, and set
* the pict format.
diff --git a/xorg-server/glamor/glamor_pixmap.c b/xorg-server/glamor/glamor_pixmap.c
index 355fe4b57..947113ee9 100644
--- a/xorg-server/glamor/glamor_pixmap.c
+++ b/xorg-server/glamor/glamor_pixmap.c
@@ -774,8 +774,8 @@ _glamor_upload_bits_to_pixmap_texture(PixmapPtr pixmap, GLenum format,
return FALSE;
bits = glamor_color_convert_to_bits(bits, converted_bits, w, h,
stride, no_alpha, revert, swap_rb);
- free(converted_bits);
if (bits == NULL) {
+ free(converted_bits);
ErrorF("Failed to convert pixmap no_alpha %d,"
"revert mode %d, swap mode %d\n", no_alpha, revert, swap_rb);
return FALSE;
@@ -808,45 +808,44 @@ _glamor_upload_bits_to_pixmap_texture(PixmapPtr pixmap, GLenum format,
format, type,
x + fbo_x_off, y + fbo_y_off, w, h,
bits, pbo);
- return TRUE;
+ } else {
+ ptexcoords = texcoords_inv;
+
+ pixmap_priv_get_dest_scale(pixmap_priv, &dst_xscale, &dst_yscale);
+ glamor_set_normalize_vcoords(pixmap_priv, dst_xscale,
+ dst_yscale,
+ x, y,
+ x + w, y + h,
+ vertices);
+ /* Slow path, we need to flip y or wire alpha to 1. */
+ glamor_make_current(glamor_priv);
+ glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_FLOAT,
+ GL_FALSE, 2 * sizeof(float), vertices);
+ glEnableVertexAttribArray(GLAMOR_VERTEX_POS);
+ glVertexAttribPointer(GLAMOR_VERTEX_SOURCE, 2, GL_FLOAT,
+ GL_FALSE, 2 * sizeof(float), ptexcoords);
+ glEnableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
+
+ glamor_set_destination_pixmap_priv_nc(pixmap_priv);
+ __glamor_upload_pixmap_to_texture(pixmap, &tex,
+ format, type, 0, 0, w, h, bits, pbo);
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, tex);
+
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glUseProgram(glamor_priv->finish_access_prog[no_alpha]);
+ glUniform1i(glamor_priv->finish_access_revert[no_alpha], revert);
+ glUniform1i(glamor_priv->finish_access_swap_rb[no_alpha], swap_rb);
+
+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+
+ glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
+ glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
+ glDeleteTextures(1, &tex);
+ glBindFramebuffer(GL_FRAMEBUFFER, 0);
}
- ptexcoords = texcoords_inv;
-
- pixmap_priv_get_dest_scale(pixmap_priv, &dst_xscale, &dst_yscale);
- glamor_set_normalize_vcoords(pixmap_priv, dst_xscale,
- dst_yscale,
- x, y,
- x + w, y + h,
- vertices);
- /* Slow path, we need to flip y or wire alpha to 1. */
- glamor_make_current(glamor_priv);
- glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_FLOAT,
- GL_FALSE, 2 * sizeof(float), vertices);
- glEnableVertexAttribArray(GLAMOR_VERTEX_POS);
- glVertexAttribPointer(GLAMOR_VERTEX_SOURCE, 2, GL_FLOAT,
- GL_FALSE, 2 * sizeof(float), ptexcoords);
- glEnableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
-
- glamor_set_destination_pixmap_priv_nc(pixmap_priv);
- __glamor_upload_pixmap_to_texture(pixmap, &tex,
- format, type, 0, 0, w, h, bits, pbo);
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, tex);
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glUseProgram(glamor_priv->finish_access_prog[no_alpha]);
- glUniform1i(glamor_priv->finish_access_revert[no_alpha], revert);
- glUniform1i(glamor_priv->finish_access_swap_rb[no_alpha], swap_rb);
-
- glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
-
- glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
- glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
- glDeleteTextures(1, &tex);
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
-
if (need_free_bits)
free(bits);
return TRUE;
diff --git a/xorg-server/glamor/glamor_priv.h b/xorg-server/glamor/glamor_priv.h
index c089db895..885f12a6d 100644
--- a/xorg-server/glamor/glamor_priv.h
+++ b/xorg-server/glamor/glamor_priv.h
@@ -352,6 +352,7 @@ enum glamor_fbo_state {
* @pbo: attached pbo.
* @width: width of this fbo.
* @height: height of this fbo.
+ * @external set when the texture was not created by glamor
* @format: internal format of this fbo's texture.
* @type: internal type of this fbo's texture.
* @glamor_priv: point to glamor private data.
@@ -365,6 +366,7 @@ typedef struct glamor_pixmap_fbo {
GLuint pbo;
int width;
int height;
+ Bool external;
GLenum format;
GLenum type;
glamor_screen_private *glamor_priv;
diff --git a/xorg-server/glx/glxbyteorder.h b/xorg-server/glx/glxbyteorder.h
index 73f0f7df7..aa88b44b9 100644
--- a/xorg-server/glx/glxbyteorder.h
+++ b/xorg-server/glx/glxbyteorder.h
@@ -1,18 +1,18 @@
/*
* (C) Copyright IBM Corporation 2006, 2007
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
@@ -25,7 +25,7 @@
/**
* \file glxbyteorder.h
* Platform glue for handling byte-ordering issues in GLX protocol.
- *
+ *
* \author Ian Romanick <idr@us.ibm.com>
*/
#if !defined(__GLXBYTEORDER_H__)
diff --git a/xorg-server/glx/glxcmds.c b/xorg-server/glx/glxcmds.c
index d11c66798..8d3fa9ff7 100644
--- a/xorg-server/glx/glxcmds.c
+++ b/xorg-server/glx/glxcmds.c
@@ -233,13 +233,13 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
LEGAL_NEW_RESOURCE(gcId, client);
/*
- ** Find the display list space that we want to share.
+ ** Find the display list space that we want to share.
**
** NOTE: In a multithreaded X server, we would need to keep a reference
- ** count for each display list so that if one client detroyed a list that
- ** another client was using, the list would not really be freed until it
- ** was no longer in use. Since this sample implementation has no support
- ** for multithreaded servers, we don't do this.
+ ** count for each display list so that if one client detroyed a list that
+ ** another client was using, the list would not really be freed until it
+ ** was no longer in use. Since this sample implementation has no support
+ ** for multithreaded servers, we don't do this.
*/
if (shareList == None) {
shareglxc = 0;
@@ -992,7 +992,7 @@ __glXDisp_GetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
buf[p++] = modes->level;
assert(p == GLX_VIS_CONFIG_UNPAIRED);
- /*
+ /*
** Add token/value pairs for extensions.
*/
buf[p++] = GLX_VISUAL_CAVEAT_EXT;
@@ -1041,7 +1041,7 @@ __glXDisp_GetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
* and interface into the driver on the server-side to get GLXFBConfigs,
* so we "invent" some based on the \c __GLXvisualConfig structures that
* the driver does supply.
- *
+ *
* The reply format for both \c glXGetFBConfigs and \c glXGetFBConfigsSGIX
* is the same, so this routine pulls double duty.
*/
@@ -2253,9 +2253,9 @@ __glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc)
/* NOTE: the two pad macros have been added below; they are needed
** because the client library pads the total byte count, but not
** the per-request byte counts. The Protocol Encoding says the
- ** total byte count should not be padded, so a proposal will be
- ** made to the ARB to relax the padding constraint on the total
- ** byte count, thus preserving backward compatibility. Meanwhile,
+ ** total byte count should not be padded, so a proposal will be
+ ** made to the ARB to relax the padding constraint on the total
+ ** byte count, thus preserving backward compatibility. Meanwhile,
** the padding done below fixes a bug that did not allow
** large commands of odd sizes to be accepted by the server.
*/
@@ -2528,7 +2528,7 @@ __glXpresentCompleteNotify(WindowPtr window, CARD8 present_kind, CARD8 present_m
glx_type = GLX_FLIP_COMPLETE_INTEL;
else
glx_type = GLX_BLIT_COMPLETE_INTEL;
-
+
__glXsendSwapEvent(drawable, glx_type, ust, msc, serial);
}
diff --git a/xorg-server/glx/glxdri2.c b/xorg-server/glx/glxdri2.c
index 5a8966f74..bcd57a4a3 100644
--- a/xorg-server/glx/glxdri2.c
+++ b/xorg-server/glx/glxdri2.c
@@ -187,7 +187,7 @@ __glXdriSwapEvent(ClientPtr client, void *data, int type, CARD64 ust,
glx_type = GLX_FLIP_COMPLETE_INTEL;
break;
}
-
+
__glXsendSwapEvent(drawable, glx_type, ust, msc, sbc);
}
diff --git a/xorg-server/glx/glxscreens.c b/xorg-server/glx/glxscreens.c
index 78769f401..b0ad3b7bc 100644
--- a/xorg-server/glx/glxscreens.c
+++ b/xorg-server/glx/glxscreens.c
@@ -155,7 +155,7 @@ static const char GLServerExtensions[] =
"GL_SUN_slice_accum ";
/*
-** We have made the simplifying assuption that the same extensions are
+** We have made the simplifying assuption that the same extensions are
** supported across all screens in a multi-screen system.
*/
unsigned glxMajorVersion = SERVER_GLX_MAJOR_VERSION;
diff --git a/xorg-server/glx/glxscreens.h b/xorg-server/glx/glxscreens.h
index c8119fd21..a90587732 100644
--- a/xorg-server/glx/glxscreens.h
+++ b/xorg-server/glx/glxscreens.h
@@ -56,7 +56,7 @@ struct __GLXconfig {
/* GLX */
GLint visualID;
- GLint visualType; /**< One of the GLX X visual types. (i.e.,
+ GLint visualType; /**< One of the GLX X visual types. (i.e.,
* \c GLX_TRUE_COLOR, etc.)
*/
diff --git a/xorg-server/glx/indirect_dispatch.c b/xorg-server/glx/indirect_dispatch.c
index f6cabefc8..24784e693 100644
--- a/xorg-server/glx/indirect_dispatch.c
+++ b/xorg-server/glx/indirect_dispatch.c
@@ -3,18 +3,18 @@
/*
* (C) Copyright IBM Corporation 2005
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/xorg-server/glx/indirect_dispatch.h b/xorg-server/glx/indirect_dispatch.h
index e6e3fdacf..536be60ac 100644
--- a/xorg-server/glx/indirect_dispatch.h
+++ b/xorg-server/glx/indirect_dispatch.h
@@ -3,18 +3,18 @@
/*
* (C) Copyright IBM Corporation 2005
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/xorg-server/glx/indirect_dispatch_swap.c b/xorg-server/glx/indirect_dispatch_swap.c
index c0bb64d5d..7ebcc6330 100644
--- a/xorg-server/glx/indirect_dispatch_swap.c
+++ b/xorg-server/glx/indirect_dispatch_swap.c
@@ -3,18 +3,18 @@
/*
* (C) Copyright IBM Corporation 2005
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/xorg-server/glx/indirect_program.c b/xorg-server/glx/indirect_program.c
index d503262c2..cda139ee6 100644
--- a/xorg-server/glx/indirect_program.c
+++ b/xorg-server/glx/indirect_program.c
@@ -1,18 +1,18 @@
/*
* (C) Copyright IBM Corporation 2005, 2006
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/xorg-server/glx/indirect_reqsize.c b/xorg-server/glx/indirect_reqsize.c
index 026afb6fb..abd076604 100644
--- a/xorg-server/glx/indirect_reqsize.c
+++ b/xorg-server/glx/indirect_reqsize.c
@@ -3,18 +3,18 @@
/*
* (C) Copyright IBM Corporation 2005
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/xorg-server/glx/indirect_reqsize.h b/xorg-server/glx/indirect_reqsize.h
index 43e1e69e3..49d400c45 100644
--- a/xorg-server/glx/indirect_reqsize.h
+++ b/xorg-server/glx/indirect_reqsize.h
@@ -3,18 +3,18 @@
/*
* (C) Copyright IBM Corporation 2005
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/xorg-server/glx/indirect_size.h b/xorg-server/glx/indirect_size.h
index fec7ed393..6a3d14cc4 100644
--- a/xorg-server/glx/indirect_size.h
+++ b/xorg-server/glx/indirect_size.h
@@ -3,18 +3,18 @@
/*
* (C) Copyright IBM Corporation 2004
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/xorg-server/glx/indirect_size_get.c b/xorg-server/glx/indirect_size_get.c
index f87931193..7e81e6288 100644
--- a/xorg-server/glx/indirect_size_get.c
+++ b/xorg-server/glx/indirect_size_get.c
@@ -3,18 +3,18 @@
/*
* (C) Copyright IBM Corporation 2004
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/xorg-server/glx/indirect_size_get.h b/xorg-server/glx/indirect_size_get.h
index 9b6203669..5af11d378 100644
--- a/xorg-server/glx/indirect_size_get.h
+++ b/xorg-server/glx/indirect_size_get.h
@@ -3,18 +3,18 @@
/*
* (C) Copyright IBM Corporation 2004
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/xorg-server/glx/indirect_table.c b/xorg-server/glx/indirect_table.c
index 33e3d6a22..f0f0b83c8 100644
--- a/xorg-server/glx/indirect_table.c
+++ b/xorg-server/glx/indirect_table.c
@@ -3,18 +3,18 @@
/*
* (C) Copyright IBM Corporation 2005, 2006
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/xorg-server/glx/indirect_table.h b/xorg-server/glx/indirect_table.h
index a39dc4e3d..c0d6ee9f0 100644
--- a/xorg-server/glx/indirect_table.h
+++ b/xorg-server/glx/indirect_table.h
@@ -1,18 +1,18 @@
/*
* (C) Copyright IBM Corporation 2005, 2006
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/xorg-server/glx/indirect_texture_compression.c b/xorg-server/glx/indirect_texture_compression.c
index 2018de6ae..cda765698 100644
--- a/xorg-server/glx/indirect_texture_compression.c
+++ b/xorg-server/glx/indirect_texture_compression.c
@@ -1,18 +1,18 @@
/*
* (C) Copyright IBM Corporation 2005, 2006
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/xorg-server/glx/indirect_util.c b/xorg-server/glx/indirect_util.c
index f9d1243b1..926e57c78 100644
--- a/xorg-server/glx/indirect_util.c
+++ b/xorg-server/glx/indirect_util.c
@@ -1,18 +1,18 @@
/*
* (C) Copyright IBM Corporation 2005
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
@@ -205,7 +205,7 @@ get_decode_index(const struct __glXDispatchInfo *dispatch_info, unsigned opcode)
unsigned child_index;
/* Calculate the slice of bits used by this node.
- *
+ *
* If remaining_bits = 8 and tree[index] = 3, the mask of just the
* remaining bits is 0x00ff and the mask for the remaining bits after
* this node is 0x001f. By taking 0x00ff & ~0x001f, we get 0x00e0.
diff --git a/xorg-server/glx/indirect_util.h b/xorg-server/glx/indirect_util.h
index 0e65075bf..f5db262c0 100644
--- a/xorg-server/glx/indirect_util.h
+++ b/xorg-server/glx/indirect_util.h
@@ -1,18 +1,18 @@
/*
* (C) Copyright IBM Corporation 2005
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/xorg-server/glx/rensize.c b/xorg-server/glx/rensize.c
index bcc3a53ad..ba22d1067 100644
--- a/xorg-server/glx/rensize.c
+++ b/xorg-server/glx/rensize.c
@@ -129,12 +129,12 @@ __glXMap2fReqSize(const GLbyte * pc, Bool swap)
/**
* Calculate the size of an image.
- *
+ *
* The size of an image sent to the server from the client or sent from the
* server to the client is calculated. The size is based on the dimensions
* of the image, the type of pixel data, padding in the image, and the
* alignment requirements of the image.
- *
+ *
* \param format Format of the pixels. Same as the \c format parameter
* to \c glTexImage1D
* \param type Type of the pixel data. Same as the \c type parameter
diff --git a/xorg-server/hw/dmx/config/Canvas.c b/xorg-server/hw/dmx/config/Canvas.c
index 103103346..3662fe857 100644
--- a/xorg-server/hw/dmx/config/Canvas.c
+++ b/xorg-server/hw/dmx/config/Canvas.c
@@ -9,7 +9,7 @@
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
diff --git a/xorg-server/hw/dmx/config/dmxprint.c b/xorg-server/hw/dmx/config/dmxprint.c
index 3145fb56a..9dec52b5c 100644
--- a/xorg-server/hw/dmx/config/dmxprint.c
+++ b/xorg-server/hw/dmx/config/dmxprint.c
@@ -35,7 +35,7 @@
*
* This file provides support routines and helper functions to be used
* to pretty-print DMX configurations.
- *
+ *
* Because the DMX configuration file parsing should be capable of being
* used in a stand-alone fashion (i.e., independent from the DMX server
* source tree), no dependencies on other DMX routines are made. */
diff --git a/xorg-server/hw/dmx/dmxgc.c b/xorg-server/hw/dmx/dmxgc.c
index 2d61ea2f7..234316797 100644
--- a/xorg-server/hw/dmx/dmxgc.c
+++ b/xorg-server/hw/dmx/dmxgc.c
@@ -391,13 +391,10 @@ dmxChangeClip(GCPtr pGC, int type, void *pvalue, int nrects)
pGC->funcs->ChangeClip(pGC, type, pvalue, nrects);
/* Set the client clip on the back-end server */
- switch (pGC->clientClipType) {
- case CT_NONE:
+ if (!pGC->clientClip) {
if (dmxScreen->beDisplay)
XSetClipMask(dmxScreen->beDisplay, pGCPriv->gc, None);
- break;
-
- case CT_REGION:
+ } else {
if (dmxScreen->beDisplay) {
nRects = RegionNumRects((RegionPtr) pGC->clientClip);
pRects = malloc(nRects * sizeof(*pRects));
@@ -416,11 +413,6 @@ dmxChangeClip(GCPtr pGC, int type, void *pvalue, int nrects)
free(pRects);
}
- break;
-
- case CT_PIXMAP:
- /* Condensed down to REGION in the mi code */
- break;
}
DMX_GC_FUNC_EPILOGUE(pGC);
diff --git a/xorg-server/hw/dmx/dmxpict.h b/xorg-server/hw/dmx/dmxpict.h
index 080da3bef..f36eca373 100644
--- a/xorg-server/hw/dmx/dmxpict.h
+++ b/xorg-server/hw/dmx/dmxpict.h
@@ -34,7 +34,7 @@
/** \file
* This file provides access to the externally visible RENDER support
* functions, global variables and macros for DMX.
- *
+ *
* FIXME: Move function definitions for non-externally visible function
* to .c file. */
diff --git a/xorg-server/hw/dmx/glxProxy/glxcmds.c b/xorg-server/hw/dmx/glxProxy/glxcmds.c
index 23c3366bd..fb4d5acce 100644
--- a/xorg-server/hw/dmx/glxProxy/glxcmds.c
+++ b/xorg-server/hw/dmx/glxProxy/glxcmds.c
@@ -188,7 +188,7 @@ CreateContext(__GLXclientState * cl,
#endif
/*
- ** Find the display list space that we want to share.
+ ** Find the display list space that we want to share.
**
*/
if (shareList == None) {
@@ -1751,7 +1751,7 @@ __glXGetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
buf[p++] = pGlxVisual->stencilSize;
buf[p++] = pGlxVisual->auxBuffers;
buf[p++] = pGlxVisual->level;
- /*
+ /*
** Add token/value pairs for extensions.
*/
buf[p++] = GLX_VISUAL_CAVEAT_EXT;
@@ -3087,7 +3087,7 @@ __glXCreateWindow(__GLXclientState * cl, GLbyte * pc)
void *val;
/*
- ** Check if windowId is valid
+ ** Check if windowId is valid
*/
rc = dixLookupDrawable(&pDraw, windowId, client, M_DRAWABLE_WINDOW,
DixAddAccess);
@@ -3112,7 +3112,7 @@ __glXCreateWindow(__GLXclientState * cl, GLbyte * pc)
visId = pGlxFBConfig->associatedVisualId;
/*
- ** Check if the fbconfig supports rendering to windows
+ ** Check if the fbconfig supports rendering to windows
*/
if (!(pGlxFBConfig->drawableType & GLX_WINDOW_BIT)) {
return BadMatch;
@@ -3134,7 +3134,7 @@ __glXCreateWindow(__GLXclientState * cl, GLbyte * pc)
}
/*
- ** Check if color buffer depth of fbconfig matches depth
+ ** Check if color buffer depth of fbconfig matches depth
** of window.
*/
if (pVisual->nplanes != pDraw->depth) {
@@ -3144,7 +3144,7 @@ __glXCreateWindow(__GLXclientState * cl, GLbyte * pc)
else
/*
** The window was created with no visual that corresponds
- ** to fbconfig
+ ** to fbconfig
*/
return BadMatch;
@@ -3561,7 +3561,7 @@ __glXGetDrawableAttributes(__GLXclientState * cl, GLbyte * pc)
return __glXBadDrawable;
}
- /* if the drawable is a window or GLXWindow -
+ /* if the drawable is a window or GLXWindow -
* we need to find the base id on the back-end server
*/
if (!be_drawable) {
@@ -3723,7 +3723,7 @@ __glXChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc)
return __glXBadDrawable;
}
- /* if the drawable is a window or GLXWindow -
+ /* if the drawable is a window or GLXWindow -
* we need to find the base id on the back-end server
*/
if (!be_drawable) {
diff --git a/xorg-server/hw/dmx/glxProxy/glxsingle.c b/xorg-server/hw/dmx/glxProxy/glxsingle.c
index 679a302ea..034497315 100644
--- a/xorg-server/hw/dmx/glxProxy/glxsingle.c
+++ b/xorg-server/hw/dmx/glxProxy/glxsingle.c
@@ -233,7 +233,7 @@ __glXForwardPipe0WithReply(__GLXclientState * cl, GLbyte * pc)
dmxScreen = &dmxScreens[glxc->pScreen->myNum];
dpy = GetBackEndDisplay(cl, glxc->pScreen->myNum);
- /*
+ /*
* send the request to the first back-end server
*/
LockDisplay(dpy);
@@ -329,7 +329,7 @@ __glXForwardAllWithReply(__GLXclientState * cl, GLbyte * pc)
pc += sz_xGLXSingleReq;
buf_size = (req->length << 2) - sz_xGLXSingleReq;
- /*
+ /*
* send the request to the first back-end server(s)
*/
for (s = to_screen; s >= from_screen; s--) {
diff --git a/xorg-server/hw/dmx/glxProxy/glxvendor.c b/xorg-server/hw/dmx/glxProxy/glxvendor.c
index b475daf0f..fc8aff0cc 100644
--- a/xorg-server/hw/dmx/glxProxy/glxvendor.c
+++ b/xorg-server/hw/dmx/glxProxy/glxvendor.c
@@ -220,7 +220,7 @@ __glXVForwardPipe0WithReply(__GLXclientState * cl, GLbyte * pc)
dmxScreen = &dmxScreens[glxc->pScreen->myNum];
dpy = GetBackEndDisplay(cl, glxc->pScreen->myNum);
- /*
+ /*
* send the request to the first back-end server
*/
LockDisplay(dpy);
@@ -311,7 +311,7 @@ __glXVForwardAllWithReply(__GLXclientState * cl, GLbyte * pc)
pc += sz_xGLXVendorPrivateReq;
buf_size = (req->length << 2) - sz_xGLXVendorPrivateReq;
- /*
+ /*
* send the request to the first back-end server(s)
*/
for (s = to_screen; s >= from_screen; s--) {
diff --git a/xorg-server/hw/dmx/input/ChkNotMaskEv.c b/xorg-server/hw/dmx/input/ChkNotMaskEv.c
index bde04ae23..8411af8a7 100644
--- a/xorg-server/hw/dmx/input/ChkNotMaskEv.c
+++ b/xorg-server/hw/dmx/input/ChkNotMaskEv.c
@@ -16,7 +16,7 @@
* OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of The Open Group shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from The Open Group.
diff --git a/xorg-server/hw/dmx/input/lnx-keyboard.c b/xorg-server/hw/dmx/input/lnx-keyboard.c
index 1a4d01f36..0aa62f452 100644
--- a/xorg-server/hw/dmx/input/lnx-keyboard.c
+++ b/xorg-server/hw/dmx/input/lnx-keyboard.c
@@ -65,19 +65,19 @@
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
- * documentation, and that the names of Orest Zborowski and David Dawes
- * not be used in advertising or publicity pertaining to distribution of
+ * documentation, and that the names of Orest Zborowski and David Dawes
+ * not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission. Orest Zborowski
- * and David Dawes make no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
+ * and David Dawes make no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
* implied warranty.
*
- * OREST ZBOROWSKI AND DAVID DAWES DISCLAIMS ALL WARRANTIES WITH REGARD
- * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID DAWES BE LIABLE
- * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OREST ZBOROWSKI AND DAVID DAWES DISCLAIMS ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID DAWES BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
diff --git a/xorg-server/hw/dmx/input/lnx-ms.c b/xorg-server/hw/dmx/input/lnx-ms.c
index 210f6de22..621f0fecc 100644
--- a/xorg-server/hw/dmx/input/lnx-ms.c
+++ b/xorg-server/hw/dmx/input/lnx-ms.c
@@ -17,7 +17,7 @@
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c
index 57617107d..93a48a9cd 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyr.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyr.c
@@ -1,8 +1,8 @@
/*
* Xephyr - A kdrive X server thats runs in a host X window.
* Authored by Matthew Allum <mallum@openedhand.com>
- *
- * Copyright © 2004 Nokia
+ *
+ * Copyright © 2004 Nokia
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -313,8 +313,8 @@ ephyrShadowUpdate(ScreenPtr pScreen, shadowBufPtr pBuf)
EPHYR_LOG("slow paint");
/* FIXME: Slow Rotated/Reflected updates could be much
- * much faster efficiently updating via tranforming
- * pBuf->pDamage regions
+ * much faster efficiently updating via tranforming
+ * pBuf->pDamage regions
*/
shadowUpdateRotatePacked(pScreen, pBuf);
hostx_paint_rect(screen, 0, 0, 0, 0, screen->width, screen->height);
@@ -535,7 +535,7 @@ ephyrRandRSetConfig(ScreenPtr pScreen,
goto bail4;
}
else {
- /* Without shadow fb ( non rotated ) we need
+ /* Without shadow fb ( non rotated ) we need
* to use damage to efficiently update display
* via signal regions what to copy from 'fb'.
*/
@@ -687,7 +687,7 @@ ephyrInitScreen(ScreenPtr pScreen)
Bool
ephyrFinishInitScreen(ScreenPtr pScreen)
{
- /* FIXME: Calling this even if not using shadow.
+ /* FIXME: Calling this even if not using shadow.
* Seems harmless enough. But may be safer elsewhere.
*/
if (!shadowSetup(pScreen))
@@ -773,7 +773,7 @@ ephyrCloseScreen(ScreenPtr pScreen)
ephyrUnsetInternalDamage(pScreen);
}
-/*
+/*
* Port of Mark McLoughlin's Xnest fix for focus in + modifier bug.
* See https://bugs.freedesktop.org/show_bug.cgi?id=3030
*/
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.h b/xorg-server/hw/kdrive/ephyr/ephyr.h
index f3a3c8e7d..2395a7f7e 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyr.h
+++ b/xorg-server/hw/kdrive/ephyr/ephyr.h
@@ -1,8 +1,8 @@
/*
* Xephyr - A kdrive X server thats runs in a host X window.
* Authored by Matthew Allum <mallum@o-hand.com>
- *
- * Copyright © 2004 Nokia
+ *
+ * Copyright © 2004 Nokia
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrdri.c b/xorg-server/hw/kdrive/ephyr/ephyrdri.c
index 16678fc5b..1e34301e1 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrdri.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyrdri.c
@@ -1,8 +1,8 @@
/*
* Xephyr - A kdrive X server thats runs in a host X window.
* Authored by Matthew Allum <mallum@openedhand.com>
- *
- * Copyright © 2007 OpenedHand Ltd
+ *
+ * Copyright © 2007 OpenedHand Ltd
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrdri.h b/xorg-server/hw/kdrive/ephyr/ephyrdri.h
index 8f2d3026e..b312e62d9 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrdri.h
+++ b/xorg-server/hw/kdrive/ephyr/ephyrdri.h
@@ -1,8 +1,8 @@
/*
* Xephyr - A kdrive X server thats runs in a host X window.
* Authored by Matthew Allum <mallum@openedhand.com>
- *
- * Copyright © 2007 OpenedHand Ltd
+ *
+ * Copyright © 2007 OpenedHand Ltd
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrdriext.c b/xorg-server/hw/kdrive/ephyr/ephyrdriext.c
index 8368d1233..3d5cf7721 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrdriext.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyrdriext.c
@@ -1,8 +1,8 @@
/*
* Xephyr - A kdrive X server thats runs in a host X window.
* Authored by Matthew Allum <mallum@openedhand.com>
- *
- * Copyright © 2007 OpenedHand Ltd
+ *
+ * Copyright © 2007 OpenedHand Ltd
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrdriext.h b/xorg-server/hw/kdrive/ephyr/ephyrdriext.h
index 5808576fe..975571582 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrdriext.h
+++ b/xorg-server/hw/kdrive/ephyr/ephyrdriext.h
@@ -1,8 +1,8 @@
/*
* Xephyr - A kdrive X server thats runs in a host X window.
* Authored by Matthew Allum <mallum@openedhand.com>
- *
- * Copyright © 2007 OpenedHand Ltd
+ *
+ * Copyright © 2007 OpenedHand Ltd
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrglxext.c b/xorg-server/hw/kdrive/ephyr/ephyrglxext.c
index 632a9c474..248689e6f 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrglxext.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyrglxext.c
@@ -1,8 +1,8 @@
/*
* Xephyr - A kdrive X server thats runs in a host X window.
* Authored by Matthew Allum <mallum@openedhand.com>
- *
- * Copyright © 2007 OpenedHand Ltd
+ *
+ * Copyright © 2007 OpenedHand Ltd
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrglxext.h b/xorg-server/hw/kdrive/ephyr/ephyrglxext.h
index 053f8d303..8b4b3a248 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrglxext.h
+++ b/xorg-server/hw/kdrive/ephyr/ephyrglxext.h
@@ -1,8 +1,8 @@
/*
* Xephyr - A kdrive X server thats runs in a host X window.
* Authored by Matthew Allum <mallum@openedhand.com>
- *
- * Copyright © 2007 OpenedHand Ltd
+ *
+ * Copyright © 2007 OpenedHand Ltd
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrhostglx.c b/xorg-server/hw/kdrive/ephyr/ephyrhostglx.c
index 007524d04..0b98cce71 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrhostglx.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyrhostglx.c
@@ -1,8 +1,8 @@
/*
* Xephyr - A kdrive X server thats runs in a host X window.
* Authored by Matthew Allum <mallum@openedhand.com>
- *
- * Copyright © 2007 OpenedHand Ltd
+ *
+ * Copyright © 2007 OpenedHand Ltd
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrhostglx.h b/xorg-server/hw/kdrive/ephyr/ephyrhostglx.h
index 309d0f2f7..f1eec5f0b 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrhostglx.h
+++ b/xorg-server/hw/kdrive/ephyr/ephyrhostglx.h
@@ -1,8 +1,8 @@
/*
* Xephyr - A kdrive X server thats runs in a host X window.
* Authored by Matthew Allum <mallum@openedhand.com>
- *
- * Copyright © 2007 OpenedHand Ltd
+ *
+ * Copyright © 2007 OpenedHand Ltd
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrinit.c b/xorg-server/hw/kdrive/ephyr/ephyrinit.c
index bcfb7506d..897aa1955 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrinit.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyrinit.c
@@ -1,8 +1,8 @@
/*
* Xephyr - A kdrive X server thats runs in a host X window.
* Authored by Matthew Allum <mallum@o-hand.com>
- *
- * Copyright © 2004 Nokia
+ *
+ * Copyright © 2004 Nokia
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrlog.h b/xorg-server/hw/kdrive/ephyr/ephyrlog.h
index 0da0a2518..43679e181 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrlog.h
+++ b/xorg-server/hw/kdrive/ephyr/ephyrlog.h
@@ -1,8 +1,8 @@
/*
* Xephyr - A kdrive X server thats runs in a host X window.
* Authored by Matthew Allum <mallum@openedhand.com>
- *
- * Copyright © 2007 OpenedHand Ltd
+ *
+ * Copyright © 2007 OpenedHand Ltd
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrvideo.c b/xorg-server/hw/kdrive/ephyr/ephyrvideo.c
index ab18c7afa..56a5ff1f8 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrvideo.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyrvideo.c
@@ -1,8 +1,8 @@
/*
* Xephyr - A kdrive X server thats runs in a host X window.
* Authored by Matthew Allum <mallum@openedhand.com>
- *
- * Copyright © 2007 OpenedHand Ltd
+ *
+ * Copyright © 2007 OpenedHand Ltd
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/xorg-server/hw/kdrive/ephyr/hostx.c b/xorg-server/hw/kdrive/ephyr/hostx.c
index 056262523..8d6d5e83b 100644
--- a/xorg-server/hw/kdrive/ephyr/hostx.c
+++ b/xorg-server/hw/kdrive/ephyr/hostx.c
@@ -1,8 +1,8 @@
/*
* Xephyr - A kdrive X server thats runs in a host X window.
* Authored by Matthew Allum <mallum@o-hand.com>
- *
- * Copyright © 2004 Nokia
+ *
+ * Copyright © 2004 Nokia
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -974,15 +974,15 @@ hostx_paint_rect(KdScreenInfo *screen,
hostx_paint_debug_rect(screen, dx, dy, width, height);
}
- /*
+ /*
* If the depth of the ephyr server is less than that of the host,
* the kdrive fb does not point to the ximage data but to a buffer
* ( fb_data ), we shift the various bits from this onto the XImage
* so they match the host.
*
- * Note, This code is pretty new ( and simple ) so may break on
- * endian issues, 32 bpp host etc.
- * Not sure if 8bpp case is right either.
+ * Note, This code is pretty new ( and simple ) so may break on
+ * endian issues, 32 bpp host etc.
+ * Not sure if 8bpp case is right either.
* ... and it will be slower than the matching depth case.
*/
diff --git a/xorg-server/hw/kdrive/ephyr/hostx.h b/xorg-server/hw/kdrive/ephyr/hostx.h
index 229961e50..87acd5a50 100644
--- a/xorg-server/hw/kdrive/ephyr/hostx.h
+++ b/xorg-server/hw/kdrive/ephyr/hostx.h
@@ -1,8 +1,8 @@
/*
* Xephyr - A kdrive X server thats runs in a host X window.
* Authored by Matthew Allum <mallum@o-hand.com>
- *
- * Copyright © 2004 Nokia
+ *
+ * Copyright © 2004 Nokia
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/xorg-server/hw/kdrive/ephyr/os.c b/xorg-server/hw/kdrive/ephyr/os.c
index 56b52d143..0dbcbb883 100644
--- a/xorg-server/hw/kdrive/ephyr/os.c
+++ b/xorg-server/hw/kdrive/ephyr/os.c
@@ -1,8 +1,8 @@
/*
* Xephyr - A kdrive X server thats runs in a host X window.
* Authored by Matthew Allum <mallum@o-hand.com>
- *
- * Copyright © 2004 Nokia
+ *
+ * Copyright © 2004 Nokia
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
diff --git a/xorg-server/hw/kdrive/src/kxv.c b/xorg-server/hw/kdrive/src/kxv.c
index 163d5c1dd..369db3332 100644
--- a/xorg-server/hw/kdrive/src/kxv.c
+++ b/xorg-server/hw/kdrive/src/kxv.c
@@ -492,7 +492,7 @@ static void
KdXVCopyClip(XvPortRecPrivatePtr portPriv, GCPtr pGC)
{
/* copy the new clip if it exists */
- if ((pGC->clientClipType == CT_REGION) && pGC->clientClip) {
+ if (pGC->clientClip) {
if (!portPriv->clientClip)
portPriv->clientClip = RegionCreate(NullBox, 1);
/* Note: this is in window coordinates */
diff --git a/xorg-server/hw/xfree86/Makefile.am b/xorg-server/hw/xfree86/Makefile.am
index 30f7c8ffd..d46bf0a86 100644
--- a/xorg-server/hw/xfree86/Makefile.am
+++ b/xorg-server/hw/xfree86/Makefile.am
@@ -43,7 +43,7 @@ SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \
DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
parser ramdac shadowfb vbe vgahw \
loader dixmods dri dri2 exa modes \
- utils doc man glamor_egl
+ utils doc man glamor_egl drivers
bin_PROGRAMS = Xorg
nodist_Xorg_SOURCES = sdksyms.c
diff --git a/xorg-server/hw/xfree86/common/Makefile.am b/xorg-server/hw/xfree86/common/Makefile.am
index 7a2b4bc1e..54e7f4d0a 100644
--- a/xorg-server/hw/xfree86/common/Makefile.am
+++ b/xorg-server/hw/xfree86/common/Makefile.am
@@ -103,4 +103,8 @@ if LNXACPI
XORG_CFLAGS += -DHAVE_ACPI
endif
+if NEED_DBUS
+XORG_CFLAGS += $(DBUS_CFLAGS)
+endif
+
AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
diff --git a/xorg-server/hw/xfree86/common/compiler.h b/xorg-server/hw/xfree86/common/compiler.h
index 53251298a..1653574d3 100644
--- a/xorg-server/hw/xfree86/common/compiler.h
+++ b/xorg-server/hw/xfree86/common/compiler.h
@@ -1077,9 +1077,9 @@ extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int);
(*xf86WriteMmio16)((CARD16)(val), base, offset)
#elif defined(__powerpc__) || defined(__sparc__)
- /*
+ /*
* we provide byteswapping and no byteswapping functions here
- * with byteswapping as default,
+ * with byteswapping as default,
* drivers that don't need byteswapping should define MMIO_IS_BE
*/
#define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset)
diff --git a/xorg-server/hw/xfree86/common/xf86AutoConfig.c b/xorg-server/hw/xfree86/common/xf86AutoConfig.c
index 2b53b908a..03dad150a 100644
--- a/xorg-server/hw/xfree86/common/xf86AutoConfig.c
+++ b/xorg-server/hw/xfree86/common/xf86AutoConfig.c
@@ -9,10 +9,10 @@
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -20,12 +20,12 @@
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR 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>.
*/
diff --git a/xorg-server/hw/xfree86/common/xf86Bus.c b/xorg-server/hw/xfree86/common/xf86Bus.c
index bd3e4e37b..889294fe7 100644
--- a/xorg-server/hw/xfree86/common/xf86Bus.c
+++ b/xorg-server/hw/xfree86/common/xf86Bus.c
@@ -519,7 +519,7 @@ xf86GetDevFromEntity(int entityIndex, int instance)
}
/*
- * xf86AccessEnter() -- gets called to save the text mode VGA IO
+ * xf86AccessEnter() -- gets called to save the text mode VGA IO
* resources when reentering the server after a VT switch.
*/
void
diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c
index 5b254bafa..d42572f38 100644
--- a/xorg-server/hw/xfree86/common/xf86Config.c
+++ b/xorg-server/hw/xfree86/common/xf86Config.c
@@ -274,7 +274,7 @@ xf86ModulelistFromConfig(void ***optlist)
if (xf86configptr->conf_modules) {
/* Walk the disable list and let people know what we've parsed to
- * not be loaded
+ * not be loaded
*/
modp = xf86configptr->conf_modules->mod_disable_lst;
while (modp) {
@@ -1941,7 +1941,7 @@ configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor)
/* now add the modes found in the modes
section to the list of modes for this
monitor unless it has been added before
- because we are reusing the same section
+ because we are reusing the same section
for another screen */
if (xf86itemNotSublist((GenericListPtr) conf_monitor->mon_modeline_lst,
(GenericListPtr) modes->mon_modeline_lst)) {
diff --git a/xorg-server/hw/xfree86/common/xf86Configure.c b/xorg-server/hw/xfree86/common/xf86Configure.c
index 8dbca3a1e..cc7ff1bb5 100644
--- a/xorg-server/hw/xfree86/common/xf86Configure.c
+++ b/xorg-server/hw/xfree86/common/xf86Configure.c
@@ -679,8 +679,8 @@ DoConfigure(void)
if (primary)
continue;
/* not primary: assign it to next device of same driver */
- /*
- * NOTE: we assume that devices in DevToConfig
+ /*
+ * NOTE: we assume that devices in DevToConfig
* and xf86Screens[] have the same order except
* for the primary device which always comes first.
*/
diff --git a/xorg-server/hw/xfree86/common/xf86Mode.c b/xorg-server/hw/xfree86/common/xf86Mode.c
index 44bc55953..9a5550faf 100644
--- a/xorg-server/hw/xfree86/common/xf86Mode.c
+++ b/xorg-server/hw/xfree86/common/xf86Mode.c
@@ -1878,8 +1878,8 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
const int ntypes = sizeof(types) / sizeof(int);
int n;
- /*
- * We did not find the estimated virtual size. So now we want to
+ /*
+ * We did not find the estimated virtual size. So now we want to
* find the largest mode available, but we want to search in the
* modes in the order of "types" listed above.
*/
@@ -2033,8 +2033,8 @@ xf86PruneDriverModes(ScrnInfoPtr scrp)
/*
* 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
+ * Clear that pointer first, otherwise xf86DeleteMode might get
+ * confused
*/
scrp->modePool->prev = NULL;
xf86DeleteMode(&scrp->modePool, scrp->modePool);
diff --git a/xorg-server/hw/xfree86/common/xf86Module.h b/xorg-server/hw/xfree86/common/xf86Module.h
index b848f53f1..e68fe9cba 100644
--- a/xorg-server/hw/xfree86/common/xf86Module.h
+++ b/xorg-server/hw/xfree86/common/xf86Module.h
@@ -80,9 +80,9 @@ typedef enum {
* mask is 0xFFFF0000.
*/
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
-#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(18, 0)
+#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(19, 0)
#define ABI_XINPUT_VERSION SET_ABI_VERSION(21, 0)
-#define ABI_EXTENSION_VERSION SET_ABI_VERSION(8, 0)
+#define ABI_EXTENSION_VERSION SET_ABI_VERSION(9, 0)
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
#define MODINFOSTRING1 0xef23fdc5
diff --git a/xorg-server/hw/xfree86/common/xf86PciInfo.h b/xorg-server/hw/xfree86/common/xf86PciInfo.h
index d6450e25c..0f5430868 100644
--- a/xorg-server/hw/xfree86/common/xf86PciInfo.h
+++ b/xorg-server/hw/xfree86/common/xf86PciInfo.h
@@ -40,7 +40,7 @@
* or for non-video devices unless they're needed by a driver or elsewhere.
* A comprehensive set of PCI vendor, device and subsystem data is
* auto-generated from the ../etc/pci.ids file using the pciids2c.pl script,
- * and is used in scanpci utility. Don't modify the pci.ids file. If
+ * and is used in scanpci utility. Don't modify the pci.ids file. If
* new/corrected entries are required, add them to ../etc/extrapci.ids.
*/
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c
index 4e8060b0f..1fb5b1635 100644
--- a/xorg-server/hw/xfree86/common/xf86Xinput.c
+++ b/xorg-server/hw/xfree86/common/xf86Xinput.c
@@ -1,6 +1,6 @@
/*
* Copyright 1995-1999 by Frederic Lepied, France. <Lepied@XFree86.org>
- *
+ *
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
@@ -9,8 +9,8 @@
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Frederic Lepied makes no
* representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
+ * is provided "as is" without express or implied warranty.
+ *
* FREDERIC LEPIED DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL FREDERIC LEPIED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -315,7 +315,7 @@ ApplyTransformationMatrix(DeviceIntPtr dev)
/***********************************************************************
*
* xf86ProcessCommonOptions --
- *
+ *
* Process global options.
*
***********************************************************************
@@ -1077,7 +1077,7 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev)
OsReleaseSignals();
}
-/*
+/*
* convenient functions to post events
*/
@@ -1401,7 +1401,7 @@ xf86FirstLocalDevice(void)
return xf86InputDevs;
}
-/*
+/*
* Cx - raw data from touch screen
* to_max - scaled highest dimension
* (remember, this is of rows - 1 because of 0 origin)
@@ -1475,7 +1475,7 @@ xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum)
* Device will be moved to the off_devices list, but it will still be there
* until you really clean up after it.
* Notifies the client about an inactive device.
- *
+ *
* @param panic True if device is unrecoverable and needs to be removed.
*/
void
@@ -1493,7 +1493,7 @@ xf86DisableDevice(DeviceIntPtr dev, Bool panic)
/**
* Reactivate a device. Call this function from the driver if you just found
* out that the read error wasn't quite that bad after all.
- * Device will be re-activated, and an event sent to the client.
+ * Device will be re-activated, and an event sent to the client.
*/
void
xf86EnableDevice(DeviceIntPtr dev)
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.h b/xorg-server/hw/xfree86/common/xf86Xinput.h
index 66a64fb48..42d66d22e 100644
--- a/xorg-server/hw/xfree86/common/xf86Xinput.h
+++ b/xorg-server/hw/xfree86/common/xf86Xinput.h
@@ -1,6 +1,6 @@
/*
* Copyright 1995-1999 by Frederic Lepied, France. <Lepied@XFree86.org>
- *
+ *
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
@@ -9,8 +9,8 @@
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Frederic Lepied makes no
* representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
+ * is provided "as is" without express or implied warranty.
+ *
* FREDERIC LEPIED DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL FREDERIC LEPIED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
diff --git a/xorg-server/hw/xfree86/common/xf86cmap.c b/xorg-server/hw/xfree86/common/xf86cmap.c
index c4bae56ad..ab51f9603 100644
--- a/xorg-server/hw/xfree86/common/xf86cmap.c
+++ b/xorg-server/hw/xfree86/common/xf86cmap.c
@@ -443,7 +443,7 @@ CMapInstallColormap(ColormapPtr pmap)
(*pScreen->InstallColormap) (pmap);
pScreen->InstallColormap = CMapInstallColormap;
- /* Important. We let the lower layers, namely DGA,
+ /* Important. We let the lower layers, namely DGA,
overwrite the choice of Colormap to install */
if (GetInstalledmiColormap(pmap->pScreen))
pmap = GetInstalledmiColormap(pmap->pScreen);
@@ -958,7 +958,7 @@ CMapChangeGamma(ScrnInfoPtr pScrn, Gamma gamma)
}
if (pLink) {
- /* need to trick CMapRefreshColors() into thinking
+ /* need to trick CMapRefreshColors() into thinking
this is the currently installed map */
SetInstalledmiColormap(pScreen, pLink->cmap);
CMapReinstallMap(pLink->cmap);
diff --git a/xorg-server/hw/xfree86/common/xf86fbman.c b/xorg-server/hw/xfree86/common/xf86fbman.c
index db715bd2f..1b2cb5704 100644
--- a/xorg-server/hw/xfree86/common/xf86fbman.c
+++ b/xorg-server/hw/xfree86/common/xf86fbman.c
@@ -38,7 +38,7 @@
#include "regionstr.h"
#include "xf86fbman.h"
-/*
+/*
#define DEBUG
*/
@@ -259,7 +259,7 @@ xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen)
return (*funcs->PurgeOffscreenAreas) (pScreen);
}
-/************************************************************\
+/************************************************************\
Below is a specific implementation of an offscreen manager.
@@ -1381,7 +1381,7 @@ xf86InitFBManagerLinear(ScreenPtr pScreen, int offset, int size)
return TRUE;
}
-/* This is an implementation specific function and should
+/* This is an implementation specific function and should
disappear after the next release. People should use the
real linear functions instead */
diff --git a/xorg-server/hw/xfree86/common/xf86platformBus.c b/xorg-server/hw/xfree86/common/xf86platformBus.c
index 5ad9b7080..15988b8b1 100644
--- a/xorg-server/hw/xfree86/common/xf86platformBus.c
+++ b/xorg-server/hw/xfree86/common/xf86platformBus.c
@@ -497,7 +497,7 @@ xf86platformAddDevice(int index)
if (xf86GPUScreens[i]->PreInit &&
xf86GPUScreens[i]->PreInit(xf86GPUScreens[i], 0))
- xf86GPUScreens[i]->configured = TRUE;
+ xf86GPUScreens[i]->configured = TRUE;
if (!xf86GPUScreens[i]->configured) {
ErrorF("hotplugged device %d didn't configure\n", i);
diff --git a/xorg-server/hw/xfree86/common/xf86str.h b/xorg-server/hw/xfree86/common/xf86str.h
index 9ad1b9014..643a65db1 100644
--- a/xorg-server/hw/xfree86/common/xf86str.h
+++ b/xorg-server/hw/xfree86/common/xf86str.h
@@ -568,7 +568,7 @@ typedef struct _PciChipsets {
* In drivers that don't have a specific vendor (e.g., vga) contains the
* device ID for either the generic VGA or generic 8514 devices. This
* turns out to be the same as the subclass and programming interface
- * value (e.g., the full 24-bit class for the VGA device is 0x030000 (or
+ * value (e.g., the full 24-bit class for the VGA device is 0x030000 (or
* 0x000101) and for 8514 is 0x030001).
*/
int PCIid;
diff --git a/xorg-server/hw/xfree86/common/xf86vmode.c b/xorg-server/hw/xfree86/common/xf86vmode.c
index 2b07833ad..0ce58e365 100644
--- a/xorg-server/hw/xfree86/common/xf86vmode.c
+++ b/xorg-server/hw/xfree86/common/xf86vmode.c
@@ -17,13 +17,13 @@ included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES
+IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
-Except as contained in this notice, the name of Kaleb S. KEITHLEY
-shall not be used in advertising or otherwise to promote the sale, use
+Except as contained in this notice, the name of Kaleb S. KEITHLEY
+shall not be used in advertising or otherwise to promote the sale, use
or other dealings in this Software without prior written authorization
from Kaleb S. KEITHLEY
@@ -361,7 +361,7 @@ ProcXF86VidModeGetModeLine(ClientPtr client)
}
/*
- * Older servers sometimes had server privates that the VidMode
+ * Older servers sometimes had server privates that the VidMode
* extention made available. So to be compatiable pretend that
* there are no server privates to pass to the client
*/
diff --git a/xorg-server/hw/xfree86/common/xf86xv.c b/xorg-server/hw/xfree86/common/xf86xv.c
index 5ef5de19c..b974cd212 100644
--- a/xorg-server/hw/xfree86/common/xf86xv.c
+++ b/xorg-server/hw/xfree86/common/xf86xv.c
@@ -599,7 +599,7 @@ static void
xf86XVCopyClip(XvPortRecPrivatePtr portPriv, GCPtr pGC)
{
/* copy the new clip if it exists */
- if ((pGC->clientClipType == CT_REGION) && pGC->clientClip) {
+ if (pGC->clientClip) {
if (!portPriv->clientClip)
portPriv->clientClip = RegionCreate(NullBox, 1);
/* Note: this is in window coordinates */
diff --git a/xorg-server/hw/xfree86/common/xf86xvmc.h b/xorg-server/hw/xfree86/common/xf86xvmc.h
index aaa4e65f0..023aff526 100644
--- a/xorg-server/hw/xfree86/common/xf86xvmc.h
+++ b/xorg-server/hw/xfree86/common/xf86xvmc.h
@@ -51,7 +51,7 @@ typedef struct {
} XF86MCSurfaceInfoRec, *XF86MCSurfaceInfoPtr;
/*
- xf86XvMCCreateContextProc
+ xf86XvMCCreateContextProc
DIX will fill everything out in the context except the driver_priv.
The port_priv holds the private data specified for the port when
@@ -71,7 +71,7 @@ typedef void (*xf86XvMCDestroyContextProcPtr) (ScrnInfoPtr pScrn,
XvMCContextPtr context);
/*
- xf86XvMCCreateSurfaceProc
+ xf86XvMCCreateSurfaceProc
DIX will fill everything out in the surface except the driver_priv.
The driver may store whatever it wants in driver_priv. The driver
@@ -87,7 +87,7 @@ typedef void (*xf86XvMCDestroySurfaceProcPtr) (ScrnInfoPtr pScrn,
XvMCSurfacePtr surface);
/*
- xf86XvMCCreateSubpictureProc
+ xf86XvMCCreateSubpictureProc
DIX will fill everything out in the subpicture except the driver_priv,
num_palette_entries, entry_bytes and component_order. The driver may
@@ -122,8 +122,8 @@ typedef struct {
xf86XvMCDestroySubpictureProcPtr DestroySubpicture;
} XF86MCAdaptorRec, *XF86MCAdaptorPtr;
-/*
- xf86XvMCScreenInit
+/*
+ xf86XvMCScreenInit
Unlike Xv, the adaptor data is not copied from this structure.
This structure's data is used so it must stick around for the
diff --git a/xorg-server/hw/xfree86/ddc/ddc.c b/xorg-server/hw/xfree86/ddc/ddc.c
index 15e4beb54..29185ad8b 100644
--- a/xorg-server/hw/xfree86/ddc/ddc.c
+++ b/xorg-server/hw/xfree86/ddc/ddc.c
@@ -1,5 +1,5 @@
-/* xf86DDC.c
- *
+/* xf86DDC.c
+ *
* Copyright 1998,1999 by Egbert Eich <Egbert.Eich@Physik.TU-Darmstadt.DE>
*/
@@ -212,10 +212,10 @@ TestDDC1(ScrnInfoPtr pScrn, unsigned int (*read_DDC) (ScrnInfoPtr))
return count;
}
-/*
+/*
* read EDID record , pass it to callback function to interpret.
* callback function will store it for further use by calling
- * function; it will also decide if we need to reread it
+ * function; it will also decide if we need to reread it
*/
static unsigned char *
EDIDRead_DDC1(ScrnInfoPtr pScrn, DDC1SetSpeedProc DDCSpeed,
@@ -328,7 +328,7 @@ DDC2Init(I2CBusPtr pBus)
I2CDevPtr dev = NULL;
/*
- * Slow down the bus so that older monitors don't
+ * Slow down the bus so that older monitors don't
* miss things.
*/
pBus->RiseFallTime = 20;
diff --git a/xorg-server/hw/xfree86/ddc/edid.h b/xorg-server/hw/xfree86/ddc/edid.h
index 91565a2cf..4c2da51c1 100644
--- a/xorg-server/hw/xfree86/ddc/edid.h
+++ b/xorg-server/hw/xfree86/ddc/edid.h
@@ -1,9 +1,9 @@
/*
- * edid.h: defines to parse an EDID block
+ * edid.h: defines to parse an EDID block
*
- * This file contains all information to interpret a standard EDIC block
- * transmitted by a display device via DDC (Display Data Channel). So far
- * there is no information to deal with optional EDID blocks.
+ * This file contains all information to interpret a standard EDIC block
+ * transmitted by a display device via DDC (Display Data Channel). So far
+ * there is no information to deal with optional EDID blocks.
* DDC is a Trademark of VESA (Video Electronics Standard Association).
*
* Copyright 1998 by Egbert Eich <Egbert.Eich@Physik.TU-Darmstadt.DE>
diff --git a/xorg-server/hw/xfree86/ddc/print_edid.c b/xorg-server/hw/xfree86/ddc/print_edid.c
index 4f983f934..e16b12476 100644
--- a/xorg-server/hw/xfree86/ddc/print_edid.c
+++ b/xorg-server/hw/xfree86/ddc/print_edid.c
@@ -21,7 +21,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * print_edid.c: print out all information retrieved from display device
+ * print_edid.c: print out all information retrieved from display device
*/
#ifdef HAVE_XORG_CONFIG_H
diff --git a/xorg-server/hw/xfree86/ddc/xf86DDC.h b/xorg-server/hw/xfree86/ddc/xf86DDC.h
index 727813f07..7d81ab911 100644
--- a/xorg-server/hw/xfree86/ddc/xf86DDC.h
+++ b/xorg-server/hw/xfree86/ddc/xf86DDC.h
@@ -1,9 +1,9 @@
/* xf86DDC.h
*
- * This file contains all information to interpret a standard EDIC block
- * transmitted by a display device via DDC (Display Data Channel). So far
- * there is no information to deal with optional EDID blocks.
+ * This file contains all information to interpret a standard EDIC block
+ * transmitted by a display device via DDC (Display Data Channel). So far
+ * there is no information to deal with optional EDID blocks.
* DDC is a Trademark of VESA (Video Electronics Standard Association).
*
* Copyright 1998 by Egbert Eich <Egbert.Eich@Physik.TU-Darmstadt.DE>
diff --git a/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c b/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c
index 6dd21dd51..79cf08198 100644
--- a/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c
+++ b/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/hw/xfree86/dixmods/xkbVT.c b/xorg-server/hw/xfree86/dixmods/xkbVT.c
index 4ca4451d0..984096122 100644
--- a/xorg-server/hw/xfree86/dixmods/xkbVT.c
+++ b/xorg-server/hw/xfree86/dixmods/xkbVT.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/hw/xfree86/dri/dri.c b/xorg-server/hw/xfree86/dri/dri.c
index 5077c7c6d..ae92fc213 100644
--- a/xorg-server/hw/xfree86/dri/dri.c
+++ b/xorg-server/hw/xfree86/dri/dri.c
@@ -2292,11 +2292,11 @@ DRIAdjustFrame(ScrnInfoPtr pScrn, int x, int y)
_DRIAdjustFrame(pScrn, pDRIPriv, x, y);
}
-/*
+/*
* DRIMoveBuffersHelper swaps the regions rects in place leaving you
* a region with the rects in the order that you need to blit them,
* but it is possibly (likely) an invalid region afterwards. If you
- * need to use the region again for anything you have to call
+ * need to use the region again for anything you have to call
* REGION_VALIDATE on it, or better yet, save a copy first.
*/
diff --git a/xorg-server/hw/xfree86/dri/sarea.h b/xorg-server/hw/xfree86/dri/sarea.h
index 7a55b49d6..1bef2421e 100644
--- a/xorg-server/hw/xfree86/dri/sarea.h
+++ b/xorg-server/hw/xfree86/dri/sarea.h
@@ -1,7 +1,7 @@
/**
- * \file sarea.h
+ * \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>
@@ -11,7 +11,7 @@
* 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
@@ -19,11 +19,11 @@
* 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.
diff --git a/xorg-server/hw/xfree86/dri2/Makefile.am b/xorg-server/hw/xfree86/dri2/Makefile.am
index 502a2ee29..78e507bd3 100644
--- a/xorg-server/hw/xfree86/dri2/Makefile.am
+++ b/xorg-server/hw/xfree86/dri2/Makefile.am
@@ -1,3 +1,5 @@
+SUBDIRS=pci_ids
+
noinst_LTLIBRARIES = libdri2.la
AM_CFLAGS = \
-DHAVE_XORG_CONFIG_H \
diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c
index 6459f11b1..c8fcd6220 100644
--- a/xorg-server/hw/xfree86/dri2/dri2.c
+++ b/xorg-server/hw/xfree86/dri2/dri2.c
@@ -1410,6 +1410,59 @@ get_prime_id(void)
return -1;
}
+#include "pci_ids/pci_id_driver_map.h"
+
+static char *
+dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info)
+{
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ EntityInfoPtr pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
+ struct pci_device *pdev = NULL;
+ int i, j;
+
+ if (pEnt)
+ pdev = xf86GetPciInfoForEntity(pEnt->index);
+
+ /* For non-PCI devices, just assume that the 3D driver is named
+ * the same as the kernel driver. This is currently true for vc4
+ * and msm (freedreno).
+ */
+ if (!pdev) {
+ drmVersionPtr version = drmGetVersion(info->fd);
+ char *kernel_driver;
+
+ if (!version) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "[DRI2] Couldn't drmGetVersion() on non-PCI device, "
+ "no driver name found.\n");
+ return NULL;
+ }
+
+ kernel_driver = strndup(version->name, version->name_len);
+ drmFreeVersion(version);
+ return kernel_driver;
+ }
+
+ for (i = 0; driver_map[i].driver; i++) {
+ if (pdev->vendor_id != driver_map[i].vendor_id)
+ continue;
+
+ if (driver_map[i].num_chips_ids == -1)
+ return strdup(driver_map[i].driver);
+
+ for (j = 0; j < driver_map[i].num_chips_ids; j++) {
+ if (driver_map[i].chip_ids[j] == pdev->device_id)
+ return strdup(driver_map[i].driver);
+ }
+ }
+
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "[DRI2] No driver mapping found for PCI device "
+ "0x%04x / 0x%04x\n",
+ pdev->vendor_id, pdev->device_id);
+ return NULL;
+}
+
Bool
DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
{
@@ -1524,7 +1577,14 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
ds->driverNames = malloc(sizeof(*ds->driverNames));
if (!ds->driverNames)
goto err_out;
- ds->driverNames[0] = info->driverName;
+
+ if (info->driverName) {
+ ds->driverNames[0] = info->driverName;
+ } else {
+ ds->driverNames[0] = dri2_probe_driver_name(pScreen, info);
+ if (!ds->driverNames[0])
+ return FALSE;
+ }
}
else {
ds->numDrivers = info->numDrivers;
diff --git a/xorg-server/hw/xfree86/dri2/pci_ids/Makefile.am b/xorg-server/hw/xfree86/dri2/pci_ids/Makefile.am
new file mode 100644
index 000000000..c5111082b
--- /dev/null
+++ b/xorg-server/hw/xfree86/dri2/pci_ids/Makefile.am
@@ -0,0 +1,11 @@
+EXTRA_DIST = \
+ pci_id_driver_map.h \
+ i810_pci_ids.h \
+ i915_pci_ids.h \
+ i965_pci_ids.h \
+ r200_pci_ids.h \
+ r300_pci_ids.h \
+ r600_pci_ids.h \
+ radeon_pci_ids.h \
+ radeonsi_pci_ids.h \
+ vmwgfx_pci_ids.h
diff --git a/xorg-server/hw/xfree86/dri2/pci_ids/i810_pci_ids.h b/xorg-server/hw/xfree86/dri2/pci_ids/i810_pci_ids.h
new file mode 100644
index 000000000..7f681925d
--- /dev/null
+++ b/xorg-server/hw/xfree86/dri2/pci_ids/i810_pci_ids.h
@@ -0,0 +1,4 @@
+CHIPSET(0x7121, I810, i8xx)
+CHIPSET(0x7123, I810_DC100, i8xx)
+CHIPSET(0x7125, I810_E, i8xx)
+CHIPSET(0x1132, I815, i8xx)
diff --git a/xorg-server/hw/xfree86/dri2/pci_ids/i915_pci_ids.h b/xorg-server/hw/xfree86/dri2/pci_ids/i915_pci_ids.h
new file mode 100644
index 000000000..7d51975c3
--- /dev/null
+++ b/xorg-server/hw/xfree86/dri2/pci_ids/i915_pci_ids.h
@@ -0,0 +1,15 @@
+CHIPSET(0x3577, I830_M, "Intel(R) 830M")
+CHIPSET(0x2562, 845_G, "Intel(R) 845G")
+CHIPSET(0x3582, I855_GM, "Intel(R) 852GM/855GM")
+CHIPSET(0x2572, I865_G, "Intel(R) 865G")
+CHIPSET(0x2582, I915_G, "Intel(R) 915G")
+CHIPSET(0x258A, E7221_G, "Intel(R) E7221G (i915)")
+CHIPSET(0x2592, I915_GM, "Intel(R) 915GM")
+CHIPSET(0x2772, I945_G, "Intel(R) 945G")
+CHIPSET(0x27A2, I945_GM, "Intel(R) 945GM")
+CHIPSET(0x27AE, I945_GME, "Intel(R) 945GME")
+CHIPSET(0x29B2, Q35_G, "Intel(R) Q35")
+CHIPSET(0x29C2, G33_G, "Intel(R) G33")
+CHIPSET(0x29D2, Q33_G, "Intel(R) Q33")
+CHIPSET(0xA011, IGD_GM, "Intel(R) IGD")
+CHIPSET(0xA001, IGD_G, "Intel(R) IGD")
diff --git a/xorg-server/hw/xfree86/dri2/pci_ids/i965_pci_ids.h b/xorg-server/hw/xfree86/dri2/pci_ids/i965_pci_ids.h
new file mode 100644
index 000000000..2e04301fb
--- /dev/null
+++ b/xorg-server/hw/xfree86/dri2/pci_ids/i965_pci_ids.h
@@ -0,0 +1,115 @@
+CHIPSET(0x29A2, i965, "Intel(R) 965G")
+CHIPSET(0x2992, i965, "Intel(R) 965Q")
+CHIPSET(0x2982, i965, "Intel(R) 965G")
+CHIPSET(0x2972, i965, "Intel(R) 946GZ")
+CHIPSET(0x2A02, i965, "Intel(R) 965GM")
+CHIPSET(0x2A12, i965, "Intel(R) 965GME/GLE")
+CHIPSET(0x2A42, g4x, "Mobile Intel® GM45 Express Chipset")
+CHIPSET(0x2E02, g4x, "Intel(R) Integrated Graphics Device")
+CHIPSET(0x2E12, g4x, "Intel(R) Q45/Q43")
+CHIPSET(0x2E22, g4x, "Intel(R) G45/G43")
+CHIPSET(0x2E32, g4x, "Intel(R) G41")
+CHIPSET(0x2E42, g4x, "Intel(R) B43")
+CHIPSET(0x2E92, g4x, "Intel(R) B43")
+CHIPSET(0x0042, ilk, "Intel(R) Ironlake Desktop")
+CHIPSET(0x0046, ilk, "Intel(R) Ironlake Mobile")
+CHIPSET(0x0102, snb_gt1, "Intel(R) Sandybridge Desktop")
+CHIPSET(0x0112, snb_gt2, "Intel(R) Sandybridge Desktop")
+CHIPSET(0x0122, snb_gt2, "Intel(R) Sandybridge Desktop")
+CHIPSET(0x0106, snb_gt1, "Intel(R) Sandybridge Mobile")
+CHIPSET(0x0116, snb_gt2, "Intel(R) Sandybridge Mobile")
+CHIPSET(0x0126, snb_gt2, "Intel(R) Sandybridge Mobile")
+CHIPSET(0x010A, snb_gt1, "Intel(R) Sandybridge Server")
+CHIPSET(0x0152, ivb_gt1, "Intel(R) Ivybridge Desktop")
+CHIPSET(0x0162, ivb_gt2, "Intel(R) Ivybridge Desktop")
+CHIPSET(0x0156, ivb_gt1, "Intel(R) Ivybridge Mobile")
+CHIPSET(0x0166, ivb_gt2, "Intel(R) Ivybridge Mobile")
+CHIPSET(0x015a, ivb_gt1, "Intel(R) Ivybridge Server")
+CHIPSET(0x016a, ivb_gt2, "Intel(R) Ivybridge Server")
+CHIPSET(0x0402, hsw_gt1, "Intel(R) Haswell Desktop")
+CHIPSET(0x0412, hsw_gt2, "Intel(R) Haswell Desktop")
+CHIPSET(0x0422, hsw_gt3, "Intel(R) Haswell Desktop")
+CHIPSET(0x0406, hsw_gt1, "Intel(R) Haswell Mobile")
+CHIPSET(0x0416, hsw_gt2, "Intel(R) Haswell Mobile")
+CHIPSET(0x0426, hsw_gt3, "Intel(R) Haswell Mobile")
+CHIPSET(0x040A, hsw_gt1, "Intel(R) Haswell Server")
+CHIPSET(0x041A, hsw_gt2, "Intel(R) Haswell Server")
+CHIPSET(0x042A, hsw_gt3, "Intel(R) Haswell Server")
+CHIPSET(0x040B, hsw_gt1, "Intel(R) Haswell")
+CHIPSET(0x041B, hsw_gt2, "Intel(R) Haswell")
+CHIPSET(0x042B, hsw_gt3, "Intel(R) Haswell")
+CHIPSET(0x040E, hsw_gt1, "Intel(R) Haswell")
+CHIPSET(0x041E, hsw_gt2, "Intel(R) Haswell")
+CHIPSET(0x042E, hsw_gt3, "Intel(R) Haswell")
+CHIPSET(0x0C02, hsw_gt1, "Intel(R) Haswell Desktop")
+CHIPSET(0x0C12, hsw_gt2, "Intel(R) Haswell Desktop")
+CHIPSET(0x0C22, hsw_gt3, "Intel(R) Haswell Desktop")
+CHIPSET(0x0C06, hsw_gt1, "Intel(R) Haswell Mobile")
+CHIPSET(0x0C16, hsw_gt2, "Intel(R) Haswell Mobile")
+CHIPSET(0x0C26, hsw_gt3, "Intel(R) Haswell Mobile")
+CHIPSET(0x0C0A, hsw_gt1, "Intel(R) Haswell Server")
+CHIPSET(0x0C1A, hsw_gt2, "Intel(R) Haswell Server")
+CHIPSET(0x0C2A, hsw_gt3, "Intel(R) Haswell Server")
+CHIPSET(0x0C0B, hsw_gt1, "Intel(R) Haswell")
+CHIPSET(0x0C1B, hsw_gt2, "Intel(R) Haswell")
+CHIPSET(0x0C2B, hsw_gt3, "Intel(R) Haswell")
+CHIPSET(0x0C0E, hsw_gt1, "Intel(R) Haswell")
+CHIPSET(0x0C1E, hsw_gt2, "Intel(R) Haswell")
+CHIPSET(0x0C2E, hsw_gt3, "Intel(R) Haswell")
+CHIPSET(0x0A02, hsw_gt1, "Intel(R) Haswell Desktop")
+CHIPSET(0x0A12, hsw_gt2, "Intel(R) Haswell Desktop")
+CHIPSET(0x0A22, hsw_gt3, "Intel(R) Haswell Desktop")
+CHIPSET(0x0A06, hsw_gt1, "Intel(R) Haswell Mobile")
+CHIPSET(0x0A16, hsw_gt2, "Intel(R) Haswell Mobile")
+CHIPSET(0x0A26, hsw_gt3, "Intel(R) Haswell Mobile")
+CHIPSET(0x0A0A, hsw_gt1, "Intel(R) Haswell Server")
+CHIPSET(0x0A1A, hsw_gt2, "Intel(R) Haswell Server")
+CHIPSET(0x0A2A, hsw_gt3, "Intel(R) Haswell Server")
+CHIPSET(0x0A0B, hsw_gt1, "Intel(R) Haswell")
+CHIPSET(0x0A1B, hsw_gt2, "Intel(R) Haswell")
+CHIPSET(0x0A2B, hsw_gt3, "Intel(R) Haswell")
+CHIPSET(0x0A0E, hsw_gt1, "Intel(R) Haswell")
+CHIPSET(0x0A1E, hsw_gt2, "Intel(R) Haswell")
+CHIPSET(0x0A2E, hsw_gt3, "Intel(R) Haswell")
+CHIPSET(0x0D02, hsw_gt1, "Intel(R) Haswell Desktop")
+CHIPSET(0x0D12, hsw_gt2, "Intel(R) Haswell Desktop")
+CHIPSET(0x0D22, hsw_gt3, "Intel(R) Haswell Desktop")
+CHIPSET(0x0D06, hsw_gt1, "Intel(R) Haswell Mobile")
+CHIPSET(0x0D16, hsw_gt2, "Intel(R) Haswell Mobile")
+CHIPSET(0x0D26, hsw_gt3, "Intel(R) Haswell Mobile")
+CHIPSET(0x0D0A, hsw_gt1, "Intel(R) Haswell Server")
+CHIPSET(0x0D1A, hsw_gt2, "Intel(R) Haswell Server")
+CHIPSET(0x0D2A, hsw_gt3, "Intel(R) Haswell")
+CHIPSET(0x0D0B, hsw_gt1, "Intel(R) Haswell")
+CHIPSET(0x0D1B, hsw_gt2, "Intel(R) Haswell")
+CHIPSET(0x0D2B, hsw_gt3, "Intel(R) Haswell")
+CHIPSET(0x0D0E, hsw_gt1, "Intel(R) Haswell")
+CHIPSET(0x0D1E, hsw_gt2, "Intel(R) Haswell")
+CHIPSET(0x0D2E, hsw_gt3, "Intel(R) Haswell")
+CHIPSET(0x0F31, byt, "Intel(R) Bay Trail")
+CHIPSET(0x0F32, byt, "Intel(R) Bay Trail")
+CHIPSET(0x0F33, byt, "Intel(R) Bay Trail")
+CHIPSET(0x0157, byt, "Intel(R) Bay Trail")
+CHIPSET(0x0155, byt, "Intel(R) Bay Trail")
+CHIPSET(0x1602, bdw_gt1, "Intel(R) Broadwell GT1")
+CHIPSET(0x1606, bdw_gt1, "Intel(R) Broadwell GT1")
+CHIPSET(0x160A, bdw_gt1, "Intel(R) Broadwell GT1")
+CHIPSET(0x160B, bdw_gt1, "Intel(R) Broadwell GT1")
+CHIPSET(0x160D, bdw_gt1, "Intel(R) Broadwell GT1")
+CHIPSET(0x160E, bdw_gt1, "Intel(R) Broadwell GT1")
+CHIPSET(0x1612, bdw_gt2, "Intel(R) HD Graphics 5600 (Broadwell GT2)")
+CHIPSET(0x1616, bdw_gt2, "Intel(R) HD Graphics 5500 (Broadwell GT2)")
+CHIPSET(0x161A, bdw_gt2, "Intel(R) Broadwell GT2")
+CHIPSET(0x161B, bdw_gt2, "Intel(R) Broadwell GT2")
+CHIPSET(0x161D, bdw_gt2, "Intel(R) Broadwell GT2")
+CHIPSET(0x161E, bdw_gt2, "Intel(R) HD Graphics 5300 (Broadwell GT2)")
+CHIPSET(0x1622, bdw_gt3, "Intel(R) Iris Pro 6200 (Broadwell GT3e)")
+CHIPSET(0x1626, bdw_gt3, "Intel(R) HD Graphics 6000 (Broadwell GT3)")
+CHIPSET(0x162A, bdw_gt3, "Intel(R) Iris Pro P6300 (Broadwell GT3e)")
+CHIPSET(0x162B, bdw_gt3, "Intel(R) Iris 6100 (Broadwell GT3)")
+CHIPSET(0x162D, bdw_gt3, "Intel(R) Broadwell GT3")
+CHIPSET(0x162E, bdw_gt3, "Intel(R) Broadwell GT3")
+CHIPSET(0x22B0, chv, "Intel(R) Cherryview")
+CHIPSET(0x22B1, chv, "Intel(R) Cherryview")
+CHIPSET(0x22B2, chv, "Intel(R) Cherryview")
+CHIPSET(0x22B3, chv, "Intel(R) Cherryview")
diff --git a/xorg-server/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h b/xorg-server/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h
new file mode 100644
index 000000000..8a97c6f31
--- /dev/null
+++ b/xorg-server/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h
@@ -0,0 +1,80 @@
+#ifndef _PCI_ID_DRIVER_MAP_H_
+#define _PCI_ID_DRIVER_MAP_H_
+
+#include <stddef.h>
+
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+#endif
+
+static const int i915_chip_ids[] = {
+#define CHIPSET(chip, desc, name) chip,
+#include "pci_ids/i915_pci_ids.h"
+#undef CHIPSET
+};
+
+static const int i965_chip_ids[] = {
+#define CHIPSET(chip, family, name) chip,
+#include "pci_ids/i965_pci_ids.h"
+#undef CHIPSET
+};
+
+#ifndef DRIVER_MAP_GALLIUM_ONLY
+static const int r100_chip_ids[] = {
+#define CHIPSET(chip, name, family) chip,
+#include "pci_ids/radeon_pci_ids.h"
+#undef CHIPSET
+};
+
+static const int r200_chip_ids[] = {
+#define CHIPSET(chip, name, family) chip,
+#include "pci_ids/r200_pci_ids.h"
+#undef CHIPSET
+};
+#endif
+
+static const int r300_chip_ids[] = {
+#define CHIPSET(chip, name, family) chip,
+#include "pci_ids/r300_pci_ids.h"
+#undef CHIPSET
+};
+
+static const int r600_chip_ids[] = {
+#define CHIPSET(chip, name, family) chip,
+#include "pci_ids/r600_pci_ids.h"
+#undef CHIPSET
+};
+
+static const int radeonsi_chip_ids[] = {
+#define CHIPSET(chip, name, family) chip,
+#include "pci_ids/radeonsi_pci_ids.h"
+#undef CHIPSET
+};
+
+static const int vmwgfx_chip_ids[] = {
+#define CHIPSET(chip, name, family) chip,
+#include "pci_ids/vmwgfx_pci_ids.h"
+#undef CHIPSET
+};
+
+static const struct {
+ int vendor_id;
+ const char *driver;
+ const int *chip_ids;
+ int num_chips_ids;
+} driver_map[] = {
+ { 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) },
+ { 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) },
+#ifndef DRIVER_MAP_GALLIUM_ONLY
+ { 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) },
+ { 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) },
+#endif
+ { 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) },
+ { 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },
+ { 0x1002, "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids) },
+ { 0x10de, "nouveau", NULL, -1 },
+ { 0x15ad, "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids) },
+ { 0x0000, NULL, NULL, 0 },
+};
+
+#endif /* _PCI_ID_DRIVER_MAP_H_ */
diff --git a/xorg-server/hw/xfree86/dri2/pci_ids/r200_pci_ids.h b/xorg-server/hw/xfree86/dri2/pci_ids/r200_pci_ids.h
new file mode 100644
index 000000000..f857ca704
--- /dev/null
+++ b/xorg-server/hw/xfree86/dri2/pci_ids/r200_pci_ids.h
@@ -0,0 +1,24 @@
+CHIPSET(0x5148, R200_QH, R200)
+CHIPSET(0x514C, R200_QL, R200)
+CHIPSET(0x514D, R200_QM, R200)
+CHIPSET(0x4242, R200_BB, R200)
+
+CHIPSET(0x4966, RV250_If, RV250)
+CHIPSET(0x4967, RV250_Ig, RV250)
+CHIPSET(0x4C64, RV250_Ld, RV250)
+CHIPSET(0x4C66, RV250_Lf, RV250)
+CHIPSET(0x4C67, RV250_Lg, RV250)
+
+CHIPSET(0x4C6E, RV280_4C6E, RV280)
+CHIPSET(0x5960, RV280_5960, RV280)
+CHIPSET(0x5961, RV280_5961, RV280)
+CHIPSET(0x5962, RV280_5962, RV280)
+CHIPSET(0x5964, RV280_5964, RV280)
+CHIPSET(0x5965, RV280_5965, RV280)
+CHIPSET(0x5C61, RV280_5C61, RV280)
+CHIPSET(0x5C63, RV280_5C63, RV280)
+
+CHIPSET(0x5834, RS300_5834, RS300)
+CHIPSET(0x5835, RS300_5835, RS300)
+CHIPSET(0x7834, RS350_7834, RS300)
+CHIPSET(0x7835, RS350_7835, RS300)
diff --git a/xorg-server/hw/xfree86/dri2/pci_ids/r300_pci_ids.h b/xorg-server/hw/xfree86/dri2/pci_ids/r300_pci_ids.h
new file mode 100644
index 000000000..791026ae7
--- /dev/null
+++ b/xorg-server/hw/xfree86/dri2/pci_ids/r300_pci_ids.h
@@ -0,0 +1,227 @@
+CHIPSET(0x4144, R300_AD, R300)
+CHIPSET(0x4145, R300_AE, R300)
+CHIPSET(0x4146, R300_AF, R300)
+CHIPSET(0x4147, R300_AG, R300)
+CHIPSET(0x4E44, R300_ND, R300)
+CHIPSET(0x4E45, R300_NE, R300)
+CHIPSET(0x4E46, R300_NF, R300)
+CHIPSET(0x4E47, R300_NG, R300)
+
+CHIPSET(0x4E48, R350_NH, R350)
+CHIPSET(0x4E49, R350_NI, R350)
+CHIPSET(0x4E4B, R350_NK, R350)
+CHIPSET(0x4148, R350_AH, R350)
+CHIPSET(0x4149, R350_AI, R350)
+CHIPSET(0x414A, R350_AJ, R350)
+CHIPSET(0x414B, R350_AK, R350)
+CHIPSET(0x4E4A, R360_NJ, R350)
+
+CHIPSET(0x4150, RV350_AP, RV350)
+CHIPSET(0x4151, RV350_AQ, RV350)
+CHIPSET(0x4152, RV350_AR, RV350)
+CHIPSET(0x4153, RV350_AS, RV350)
+CHIPSET(0x4154, RV350_AT, RV350)
+CHIPSET(0x4155, RV350_AU, RV350)
+CHIPSET(0x4156, RV350_AV, RV350)
+CHIPSET(0x4E50, RV350_NP, RV350)
+CHIPSET(0x4E51, RV350_NQ, RV350)
+CHIPSET(0x4E52, RV350_NR, RV350)
+CHIPSET(0x4E53, RV350_NS, RV350)
+CHIPSET(0x4E54, RV350_NT, RV350)
+CHIPSET(0x4E56, RV350_NV, RV350)
+
+CHIPSET(0x5460, RV370_5460, RV370)
+CHIPSET(0x5462, RV370_5462, RV370)
+CHIPSET(0x5464, RV370_5464, RV370)
+CHIPSET(0x5B60, RV370_5B60, RV370)
+CHIPSET(0x5B62, RV370_5B62, RV370)
+CHIPSET(0x5B63, RV370_5B63, RV370)
+CHIPSET(0x5B64, RV370_5B64, RV370)
+CHIPSET(0x5B65, RV370_5B65, RV370)
+
+CHIPSET(0x3150, RV380_3150, RV380)
+CHIPSET(0x3151, RV380_3151, RV380)
+CHIPSET(0x3152, RV380_3152, RV380)
+CHIPSET(0x3154, RV380_3154, RV380)
+CHIPSET(0x3155, RV380_3155, RV380)
+CHIPSET(0x3E50, RV380_3E50, RV380)
+CHIPSET(0x3E54, RV380_3E54, RV380)
+
+CHIPSET(0x4A48, R420_JH, R420)
+CHIPSET(0x4A49, R420_JI, R420)
+CHIPSET(0x4A4A, R420_JJ, R420)
+CHIPSET(0x4A4B, R420_JK, R420)
+CHIPSET(0x4A4C, R420_JL, R420)
+CHIPSET(0x4A4D, R420_JM, R420)
+CHIPSET(0x4A4E, R420_JN, R420)
+CHIPSET(0x4A4F, R420_JO, R420)
+CHIPSET(0x4A50, R420_JP, R420)
+CHIPSET(0x4A54, R420_JT, R420)
+
+CHIPSET(0x5548, R423_UH, R423)
+CHIPSET(0x5549, R423_UI, R423)
+CHIPSET(0x554A, R423_UJ, R423)
+CHIPSET(0x554B, R423_UK, R423)
+CHIPSET(0x5550, R423_5550, R423)
+CHIPSET(0x5551, R423_UQ, R423)
+CHIPSET(0x5552, R423_UR, R423)
+CHIPSET(0x5554, R423_UT, R423)
+CHIPSET(0x5D57, R423_5D57, R423)
+
+CHIPSET(0x554C, R430_554C, R430)
+CHIPSET(0x554D, R430_554D, R430)
+CHIPSET(0x554E, R430_554E, R430)
+CHIPSET(0x554F, R430_554F, R430)
+CHIPSET(0x5D48, R430_5D48, R430)
+CHIPSET(0x5D49, R430_5D49, R430)
+CHIPSET(0x5D4A, R430_5D4A, R430)
+
+CHIPSET(0x5D4C, R480_5D4C, R480)
+CHIPSET(0x5D4D, R480_5D4D, R480)
+CHIPSET(0x5D4E, R480_5D4E, R480)
+CHIPSET(0x5D4F, R480_5D4F, R480)
+CHIPSET(0x5D50, R480_5D50, R480)
+CHIPSET(0x5D52, R480_5D52, R480)
+
+CHIPSET(0x4B48, R481_4B48, R481)
+CHIPSET(0x4B49, R481_4B49, R481)
+CHIPSET(0x4B4A, R481_4B4A, R481)
+CHIPSET(0x4B4B, R481_4B4B, R481)
+CHIPSET(0x4B4C, R481_4B4C, R481)
+
+CHIPSET(0x564A, RV410_564A, RV410)
+CHIPSET(0x564B, RV410_564B, RV410)
+CHIPSET(0x564F, RV410_564F, RV410)
+CHIPSET(0x5652, RV410_5652, RV410)
+CHIPSET(0x5653, RV410_5653, RV410)
+CHIPSET(0x5657, RV410_5657, RV410)
+CHIPSET(0x5E48, RV410_5E48, RV410)
+CHIPSET(0x5E4A, RV410_5E4A, RV410)
+CHIPSET(0x5E4B, RV410_5E4B, RV410)
+CHIPSET(0x5E4C, RV410_5E4C, RV410)
+CHIPSET(0x5E4D, RV410_5E4D, RV410)
+CHIPSET(0x5E4F, RV410_5E4F, RV410)
+
+CHIPSET(0x5A41, RS400_5A41, RS400)
+CHIPSET(0x5A42, RS400_5A42, RS400)
+
+CHIPSET(0x5A61, RC410_5A61, RC410)
+CHIPSET(0x5A62, RC410_5A62, RC410)
+
+CHIPSET(0x5954, RS480_5954, RS480)
+CHIPSET(0x5955, RS480_5955, RS480)
+CHIPSET(0x5974, RS482_5974, RS480)
+CHIPSET(0x5975, RS482_5975, RS480)
+
+CHIPSET(0x7100, R520_7100, R520)
+CHIPSET(0x7101, R520_7101, R520)
+CHIPSET(0x7102, R520_7102, R520)
+CHIPSET(0x7103, R520_7103, R520)
+CHIPSET(0x7104, R520_7104, R520)
+CHIPSET(0x7105, R520_7105, R520)
+CHIPSET(0x7106, R520_7106, R520)
+CHIPSET(0x7108, R520_7108, R520)
+CHIPSET(0x7109, R520_7109, R520)
+CHIPSET(0x710A, R520_710A, R520)
+CHIPSET(0x710B, R520_710B, R520)
+CHIPSET(0x710C, R520_710C, R520)
+CHIPSET(0x710E, R520_710E, R520)
+CHIPSET(0x710F, R520_710F, R520)
+
+CHIPSET(0x7140, RV515_7140, RV515)
+CHIPSET(0x7141, RV515_7141, RV515)
+CHIPSET(0x7142, RV515_7142, RV515)
+CHIPSET(0x7143, RV515_7143, RV515)
+CHIPSET(0x7144, RV515_7144, RV515)
+CHIPSET(0x7145, RV515_7145, RV515)
+CHIPSET(0x7146, RV515_7146, RV515)
+CHIPSET(0x7147, RV515_7147, RV515)
+CHIPSET(0x7149, RV515_7149, RV515)
+CHIPSET(0x714A, RV515_714A, RV515)
+CHIPSET(0x714B, RV515_714B, RV515)
+CHIPSET(0x714C, RV515_714C, RV515)
+CHIPSET(0x714D, RV515_714D, RV515)
+CHIPSET(0x714E, RV515_714E, RV515)
+CHIPSET(0x714F, RV515_714F, RV515)
+CHIPSET(0x7151, RV515_7151, RV515)
+CHIPSET(0x7152, RV515_7152, RV515)
+CHIPSET(0x7153, RV515_7153, RV515)
+CHIPSET(0x715E, RV515_715E, RV515)
+CHIPSET(0x715F, RV515_715F, RV515)
+CHIPSET(0x7180, RV515_7180, RV515)
+CHIPSET(0x7181, RV515_7181, RV515)
+CHIPSET(0x7183, RV515_7183, RV515)
+CHIPSET(0x7186, RV515_7186, RV515)
+CHIPSET(0x7187, RV515_7187, RV515)
+CHIPSET(0x7188, RV515_7188, RV515)
+CHIPSET(0x718A, RV515_718A, RV515)
+CHIPSET(0x718B, RV515_718B, RV515)
+CHIPSET(0x718C, RV515_718C, RV515)
+CHIPSET(0x718D, RV515_718D, RV515)
+CHIPSET(0x718F, RV515_718F, RV515)
+CHIPSET(0x7193, RV515_7193, RV515)
+CHIPSET(0x7196, RV515_7196, RV515)
+CHIPSET(0x719B, RV515_719B, RV515)
+CHIPSET(0x719F, RV515_719F, RV515)
+CHIPSET(0x7200, RV515_7200, RV515)
+CHIPSET(0x7210, RV515_7210, RV515)
+CHIPSET(0x7211, RV515_7211, RV515)
+
+CHIPSET(0x71C0, RV530_71C0, RV530)
+CHIPSET(0x71C1, RV530_71C1, RV530)
+CHIPSET(0x71C2, RV530_71C2, RV530)
+CHIPSET(0x71C3, RV530_71C3, RV530)
+CHIPSET(0x71C4, RV530_71C4, RV530)
+CHIPSET(0x71C5, RV530_71C5, RV530)
+CHIPSET(0x71C6, RV530_71C6, RV530)
+CHIPSET(0x71C7, RV530_71C7, RV530)
+CHIPSET(0x71CD, RV530_71CD, RV530)
+CHIPSET(0x71CE, RV530_71CE, RV530)
+CHIPSET(0x71D2, RV530_71D2, RV530)
+CHIPSET(0x71D4, RV530_71D4, RV530)
+CHIPSET(0x71D5, RV530_71D5, RV530)
+CHIPSET(0x71D6, RV530_71D6, RV530)
+CHIPSET(0x71DA, RV530_71DA, RV530)
+CHIPSET(0x71DE, RV530_71DE, RV530)
+
+CHIPSET(0x7281, RV560_7281, RV560)
+CHIPSET(0x7283, RV560_7283, RV560)
+CHIPSET(0x7287, RV560_7287, RV560)
+CHIPSET(0x7290, RV560_7290, RV560)
+CHIPSET(0x7291, RV560_7291, RV560)
+CHIPSET(0x7293, RV560_7293, RV560)
+CHIPSET(0x7297, RV560_7297, RV560)
+
+CHIPSET(0x7280, RV570_7280, RV570)
+CHIPSET(0x7288, RV570_7288, RV570)
+CHIPSET(0x7289, RV570_7289, RV570)
+CHIPSET(0x728B, RV570_728B, RV570)
+CHIPSET(0x728C, RV570_728C, RV570)
+
+CHIPSET(0x7240, R580_7240, R580)
+CHIPSET(0x7243, R580_7243, R580)
+CHIPSET(0x7244, R580_7244, R580)
+CHIPSET(0x7245, R580_7245, R580)
+CHIPSET(0x7246, R580_7246, R580)
+CHIPSET(0x7247, R580_7247, R580)
+CHIPSET(0x7248, R580_7248, R580)
+CHIPSET(0x7249, R580_7249, R580)
+CHIPSET(0x724A, R580_724A, R580)
+CHIPSET(0x724B, R580_724B, R580)
+CHIPSET(0x724C, R580_724C, R580)
+CHIPSET(0x724D, R580_724D, R580)
+CHIPSET(0x724E, R580_724E, R580)
+CHIPSET(0x724F, R580_724F, R580)
+CHIPSET(0x7284, R580_7284, R580)
+
+CHIPSET(0x793F, RS600_793F, RS600)
+CHIPSET(0x7941, RS600_7941, RS600)
+CHIPSET(0x7942, RS600_7942, RS600)
+
+CHIPSET(0x791E, RS690_791E, RS690)
+CHIPSET(0x791F, RS690_791F, RS690)
+
+CHIPSET(0x796C, RS740_796C, RS740)
+CHIPSET(0x796D, RS740_796D, RS740)
+CHIPSET(0x796E, RS740_796E, RS740)
+CHIPSET(0x796F, RS740_796F, RS740)
diff --git a/xorg-server/hw/xfree86/dri2/pci_ids/r600_pci_ids.h b/xorg-server/hw/xfree86/dri2/pci_ids/r600_pci_ids.h
new file mode 100644
index 000000000..533c9f3fc
--- /dev/null
+++ b/xorg-server/hw/xfree86/dri2/pci_ids/r600_pci_ids.h
@@ -0,0 +1,327 @@
+CHIPSET(0x9400, R600_9400, R600)
+CHIPSET(0x9401, R600_9401, R600)
+CHIPSET(0x9402, R600_9402, R600)
+CHIPSET(0x9403, R600_9403, R600)
+CHIPSET(0x9405, R600_9405, R600)
+CHIPSET(0x940A, R600_940A, R600)
+CHIPSET(0x940B, R600_940B, R600)
+CHIPSET(0x940F, R600_940F, R600)
+
+CHIPSET(0x94C0, RV610_94C0, RV610)
+CHIPSET(0x94C1, RV610_94C1, RV610)
+CHIPSET(0x94C3, RV610_94C3, RV610)
+CHIPSET(0x94C4, RV610_94C4, RV610)
+CHIPSET(0x94C5, RV610_94C5, RV610)
+CHIPSET(0x94C6, RV610_94C6, RV610)
+CHIPSET(0x94C7, RV610_94C7, RV610)
+CHIPSET(0x94C8, RV610_94C8, RV610)
+CHIPSET(0x94C9, RV610_94C9, RV610)
+CHIPSET(0x94CB, RV610_94CB, RV610)
+CHIPSET(0x94CC, RV610_94CC, RV610)
+CHIPSET(0x94CD, RV610_94CD, RV610)
+
+CHIPSET(0x9580, RV630_9580, RV630)
+CHIPSET(0x9581, RV630_9581, RV630)
+CHIPSET(0x9583, RV630_9583, RV630)
+CHIPSET(0x9586, RV630_9586, RV630)
+CHIPSET(0x9587, RV630_9587, RV630)
+CHIPSET(0x9588, RV630_9588, RV630)
+CHIPSET(0x9589, RV630_9589, RV630)
+CHIPSET(0x958A, RV630_958A, RV630)
+CHIPSET(0x958B, RV630_958B, RV630)
+CHIPSET(0x958C, RV630_958C, RV630)
+CHIPSET(0x958D, RV630_958D, RV630)
+CHIPSET(0x958E, RV630_958E, RV630)
+CHIPSET(0x958F, RV630_958F, RV630)
+
+CHIPSET(0x9500, RV670_9500, RV670)
+CHIPSET(0x9501, RV670_9501, RV670)
+CHIPSET(0x9504, RV670_9504, RV670)
+CHIPSET(0x9505, RV670_9505, RV670)
+CHIPSET(0x9506, RV670_9506, RV670)
+CHIPSET(0x9507, RV670_9507, RV670)
+CHIPSET(0x9508, RV670_9508, RV670)
+CHIPSET(0x9509, RV670_9509, RV670)
+CHIPSET(0x950F, RV670_950F, RV670)
+CHIPSET(0x9511, RV670_9511, RV670)
+CHIPSET(0x9515, RV670_9515, RV670)
+CHIPSET(0x9517, RV670_9517, RV670)
+CHIPSET(0x9519, RV670_9519, RV670)
+
+CHIPSET(0x95C0, RV620_95C0, RV620)
+CHIPSET(0x95C2, RV620_95C2, RV620)
+CHIPSET(0x95C4, RV620_95C4, RV620)
+CHIPSET(0x95C5, RV620_95C5, RV620)
+CHIPSET(0x95C6, RV620_95C6, RV620)
+CHIPSET(0x95C7, RV620_95C7, RV620)
+CHIPSET(0x95C9, RV620_95C9, RV620)
+CHIPSET(0x95CC, RV620_95CC, RV620)
+CHIPSET(0x95CD, RV620_95CD, RV620)
+CHIPSET(0x95CE, RV620_95CE, RV620)
+CHIPSET(0x95CF, RV620_95CF, RV620)
+
+CHIPSET(0x9590, RV635_9590, RV635)
+CHIPSET(0x9591, RV635_9591, RV635)
+CHIPSET(0x9593, RV635_9593, RV635)
+CHIPSET(0x9595, RV635_9595, RV635)
+CHIPSET(0x9596, RV635_9596, RV635)
+CHIPSET(0x9597, RV635_9597, RV635)
+CHIPSET(0x9598, RV635_9598, RV635)
+CHIPSET(0x9599, RV635_9599, RV635)
+CHIPSET(0x959B, RV635_959B, RV635)
+
+CHIPSET(0x9610, RS780_9610, RS780)
+CHIPSET(0x9611, RS780_9611, RS780)
+CHIPSET(0x9612, RS780_9612, RS780)
+CHIPSET(0x9613, RS780_9613, RS780)
+CHIPSET(0x9614, RS780_9614, RS780)
+CHIPSET(0x9615, RS780_9615, RS780)
+CHIPSET(0x9616, RS780_9616, RS780)
+
+CHIPSET(0x9710, RS880_9710, RS880)
+CHIPSET(0x9711, RS880_9711, RS880)
+CHIPSET(0x9712, RS880_9712, RS880)
+CHIPSET(0x9713, RS880_9713, RS880)
+CHIPSET(0x9714, RS880_9714, RS880)
+CHIPSET(0x9715, RS880_9715, RS880)
+
+CHIPSET(0x9440, RV770_9440, RV770)
+CHIPSET(0x9441, RV770_9441, RV770)
+CHIPSET(0x9442, RV770_9442, RV770)
+CHIPSET(0x9443, RV770_9443, RV770)
+CHIPSET(0x9444, RV770_9444, RV770)
+CHIPSET(0x9446, RV770_9446, RV770)
+CHIPSET(0x944A, RV770_944A, RV770)
+CHIPSET(0x944B, RV770_944B, RV770)
+CHIPSET(0x944C, RV770_944C, RV770)
+CHIPSET(0x944E, RV770_944E, RV770)
+CHIPSET(0x9450, RV770_9450, RV770)
+CHIPSET(0x9452, RV770_9452, RV770)
+CHIPSET(0x9456, RV770_9456, RV770)
+CHIPSET(0x945A, RV770_945A, RV770)
+CHIPSET(0x945B, RV770_945B, RV770)
+CHIPSET(0x945E, RV770_945E, RV770)
+CHIPSET(0x9460, RV790_9460, RV770)
+CHIPSET(0x9462, RV790_9462, RV770)
+CHIPSET(0x946A, RV770_946A, RV770)
+CHIPSET(0x946B, RV770_946B, RV770)
+CHIPSET(0x947A, RV770_947A, RV770)
+CHIPSET(0x947B, RV770_947B, RV770)
+
+CHIPSET(0x9480, RV730_9480, RV730)
+CHIPSET(0x9487, RV730_9487, RV730)
+CHIPSET(0x9488, RV730_9488, RV730)
+CHIPSET(0x9489, RV730_9489, RV730)
+CHIPSET(0x948A, RV730_948A, RV730)
+CHIPSET(0x948F, RV730_948F, RV730)
+CHIPSET(0x9490, RV730_9490, RV730)
+CHIPSET(0x9491, RV730_9491, RV730)
+CHIPSET(0x9495, RV730_9495, RV730)
+CHIPSET(0x9498, RV730_9498, RV730)
+CHIPSET(0x949C, RV730_949C, RV730)
+CHIPSET(0x949E, RV730_949E, RV730)
+CHIPSET(0x949F, RV730_949F, RV730)
+
+CHIPSET(0x9540, RV710_9540, RV710)
+CHIPSET(0x9541, RV710_9541, RV710)
+CHIPSET(0x9542, RV710_9542, RV710)
+CHIPSET(0x954E, RV710_954E, RV710)
+CHIPSET(0x954F, RV710_954F, RV710)
+CHIPSET(0x9552, RV710_9552, RV710)
+CHIPSET(0x9553, RV710_9553, RV710)
+CHIPSET(0x9555, RV710_9555, RV710)
+CHIPSET(0x9557, RV710_9557, RV710)
+CHIPSET(0x955F, RV710_955F, RV710)
+
+CHIPSET(0x94A0, RV740_94A0, RV740)
+CHIPSET(0x94A1, RV740_94A1, RV740)
+CHIPSET(0x94A3, RV740_94A3, RV740)
+CHIPSET(0x94B1, RV740_94B1, RV740)
+CHIPSET(0x94B3, RV740_94B3, RV740)
+CHIPSET(0x94B4, RV740_94B4, RV740)
+CHIPSET(0x94B5, RV740_94B5, RV740)
+CHIPSET(0x94B9, RV740_94B9, RV740)
+
+CHIPSET(0x68E0, CEDAR_68E0, CEDAR)
+CHIPSET(0x68E1, CEDAR_68E1, CEDAR)
+CHIPSET(0x68E4, CEDAR_68E4, CEDAR)
+CHIPSET(0x68E5, CEDAR_68E5, CEDAR)
+CHIPSET(0x68E8, CEDAR_68E8, CEDAR)
+CHIPSET(0x68E9, CEDAR_68E9, CEDAR)
+CHIPSET(0x68F1, CEDAR_68F1, CEDAR)
+CHIPSET(0x68F2, CEDAR_68F2, CEDAR)
+CHIPSET(0x68F8, CEDAR_68F8, CEDAR)
+CHIPSET(0x68F9, CEDAR_68F9, CEDAR)
+CHIPSET(0x68FA, CEDAR_68FA, CEDAR)
+CHIPSET(0x68FE, CEDAR_68FE, CEDAR)
+
+CHIPSET(0x68C0, REDWOOD_68C0, REDWOOD)
+CHIPSET(0x68C1, REDWOOD_68C1, REDWOOD)
+CHIPSET(0x68C7, REDWOOD_68C7, REDWOOD)
+CHIPSET(0x68C8, REDWOOD_68C8, REDWOOD)
+CHIPSET(0x68C9, REDWOOD_68C9, REDWOOD)
+CHIPSET(0x68D8, REDWOOD_68D8, REDWOOD)
+CHIPSET(0x68D9, REDWOOD_68D9, REDWOOD)
+CHIPSET(0x68DA, REDWOOD_68DA, REDWOOD)
+CHIPSET(0x68DE, REDWOOD_68DE, REDWOOD)
+
+CHIPSET(0x68A0, JUNIPER_68A0, JUNIPER)
+CHIPSET(0x68A1, JUNIPER_68A1, JUNIPER)
+CHIPSET(0x68A8, JUNIPER_68A8, JUNIPER)
+CHIPSET(0x68A9, JUNIPER_68A9, JUNIPER)
+CHIPSET(0x68B0, JUNIPER_68B0, JUNIPER)
+CHIPSET(0x68B8, JUNIPER_68B8, JUNIPER)
+CHIPSET(0x68B9, JUNIPER_68B9, JUNIPER)
+CHIPSET(0x68BA, JUNIPER_68BA, JUNIPER)
+CHIPSET(0x68BE, JUNIPER_68BE, JUNIPER)
+CHIPSET(0x68BF, JUNIPER_68BF, JUNIPER)
+
+CHIPSET(0x6880, CYPRESS_6880, CYPRESS)
+CHIPSET(0x6888, CYPRESS_6888, CYPRESS)
+CHIPSET(0x6889, CYPRESS_6889, CYPRESS)
+CHIPSET(0x688A, CYPRESS_688A, CYPRESS)
+CHIPSET(0x688C, CYPRESS_688C, CYPRESS)
+CHIPSET(0x688D, CYPRESS_688D, CYPRESS)
+CHIPSET(0x6898, CYPRESS_6898, CYPRESS)
+CHIPSET(0x6899, CYPRESS_6899, CYPRESS)
+CHIPSET(0x689B, CYPRESS_689B, CYPRESS)
+CHIPSET(0x689E, CYPRESS_689E, CYPRESS)
+
+CHIPSET(0x689C, HEMLOCK_689C, HEMLOCK)
+CHIPSET(0x689D, HEMLOCK_689D, HEMLOCK)
+
+CHIPSET(0x9802, PALM_9802, PALM)
+CHIPSET(0x9803, PALM_9803, PALM)
+CHIPSET(0x9804, PALM_9804, PALM)
+CHIPSET(0x9805, PALM_9805, PALM)
+CHIPSET(0x9806, PALM_9806, PALM)
+CHIPSET(0x9807, PALM_9807, PALM)
+CHIPSET(0x9808, PALM_9808, PALM)
+CHIPSET(0x9809, PALM_9809, PALM)
+CHIPSET(0x980A, PALM_980A, PALM)
+
+CHIPSET(0x9640, SUMO_9640, SUMO)
+CHIPSET(0x9641, SUMO_9641, SUMO)
+CHIPSET(0x9642, SUMO2_9642, SUMO2)
+CHIPSET(0x9643, SUMO2_9643, SUMO2)
+CHIPSET(0x9644, SUMO2_9644, SUMO2)
+CHIPSET(0x9645, SUMO2_9645, SUMO2)
+CHIPSET(0x9647, SUMO_9647, SUMO)
+CHIPSET(0x9648, SUMO_9648, SUMO)
+CHIPSET(0x9649, SUMO2_9649, SUMO2)
+CHIPSET(0x964a, SUMO_964A, SUMO)
+CHIPSET(0x964b, SUMO_964B, SUMO)
+CHIPSET(0x964c, SUMO_964C, SUMO)
+CHIPSET(0x964e, SUMO_964E, SUMO)
+CHIPSET(0x964f, SUMO_964F, SUMO)
+
+CHIPSET(0x6700, CAYMAN_6700, CAYMAN)
+CHIPSET(0x6701, CAYMAN_6701, CAYMAN)
+CHIPSET(0x6702, CAYMAN_6702, CAYMAN)
+CHIPSET(0x6703, CAYMAN_6703, CAYMAN)
+CHIPSET(0x6704, CAYMAN_6704, CAYMAN)
+CHIPSET(0x6705, CAYMAN_6705, CAYMAN)
+CHIPSET(0x6706, CAYMAN_6706, CAYMAN)
+CHIPSET(0x6707, CAYMAN_6707, CAYMAN)
+CHIPSET(0x6708, CAYMAN_6708, CAYMAN)
+CHIPSET(0x6709, CAYMAN_6709, CAYMAN)
+CHIPSET(0x6718, CAYMAN_6718, CAYMAN)
+CHIPSET(0x6719, CAYMAN_6719, CAYMAN)
+CHIPSET(0x671C, CAYMAN_671C, CAYMAN)
+CHIPSET(0x671D, CAYMAN_671D, CAYMAN)
+CHIPSET(0x671F, CAYMAN_671F, CAYMAN)
+
+CHIPSET(0x6720, BARTS_6720, BARTS)
+CHIPSET(0x6721, BARTS_6721, BARTS)
+CHIPSET(0x6722, BARTS_6722, BARTS)
+CHIPSET(0x6723, BARTS_6723, BARTS)
+CHIPSET(0x6724, BARTS_6724, BARTS)
+CHIPSET(0x6725, BARTS_6725, BARTS)
+CHIPSET(0x6726, BARTS_6726, BARTS)
+CHIPSET(0x6727, BARTS_6727, BARTS)
+CHIPSET(0x6728, BARTS_6728, BARTS)
+CHIPSET(0x6729, BARTS_6729, BARTS)
+CHIPSET(0x6738, BARTS_6738, BARTS)
+CHIPSET(0x6739, BARTS_6739, BARTS)
+CHIPSET(0x673E, BARTS_673E, BARTS)
+
+CHIPSET(0x6740, TURKS_6740, TURKS)
+CHIPSET(0x6741, TURKS_6741, TURKS)
+CHIPSET(0x6742, TURKS_6742, TURKS)
+CHIPSET(0x6743, TURKS_6743, TURKS)
+CHIPSET(0x6744, TURKS_6744, TURKS)
+CHIPSET(0x6745, TURKS_6745, TURKS)
+CHIPSET(0x6746, TURKS_6746, TURKS)
+CHIPSET(0x6747, TURKS_6747, TURKS)
+CHIPSET(0x6748, TURKS_6748, TURKS)
+CHIPSET(0x6749, TURKS_6749, TURKS)
+CHIPSET(0x674A, TURKS_674A, TURKS)
+CHIPSET(0x6750, TURKS_6750, TURKS)
+CHIPSET(0x6751, TURKS_6751, TURKS)
+CHIPSET(0x6758, TURKS_6758, TURKS)
+CHIPSET(0x6759, TURKS_6759, TURKS)
+CHIPSET(0x675B, TURKS_675B, TURKS)
+CHIPSET(0x675D, TURKS_675D, TURKS)
+CHIPSET(0x675F, TURKS_675F, TURKS)
+CHIPSET(0x6840, TURKS_6840, TURKS)
+CHIPSET(0x6841, TURKS_6841, TURKS)
+CHIPSET(0x6842, TURKS_6842, TURKS)
+CHIPSET(0x6843, TURKS_6843, TURKS)
+CHIPSET(0x6849, TURKS_6849, TURKS)
+CHIPSET(0x6850, TURKS_6850, TURKS)
+CHIPSET(0x6858, TURKS_6858, TURKS)
+CHIPSET(0x6859, TURKS_6859, TURKS)
+
+CHIPSET(0x6760, CAICOS_6760, CAICOS)
+CHIPSET(0x6761, CAICOS_6761, CAICOS)
+CHIPSET(0x6762, CAICOS_6762, CAICOS)
+CHIPSET(0x6763, CAICOS_6763, CAICOS)
+CHIPSET(0x6764, CAICOS_6764, CAICOS)
+CHIPSET(0x6765, CAICOS_6765, CAICOS)
+CHIPSET(0x6766, CAICOS_6766, CAICOS)
+CHIPSET(0x6767, CAICOS_6767, CAICOS)
+CHIPSET(0x6768, CAICOS_6768, CAICOS)
+CHIPSET(0x6770, CAICOS_6770, CAICOS)
+CHIPSET(0x6771, CAICOS_6771, CAICOS)
+CHIPSET(0x6772, CAICOS_6772, CAICOS)
+CHIPSET(0x6778, CAICOS_6778, CAICOS)
+CHIPSET(0x6779, CAICOS_6779, CAICOS)
+CHIPSET(0x677B, CAICOS_677B, CAICOS)
+
+CHIPSET(0x9900, ARUBA_9900, ARUBA)
+CHIPSET(0x9901, ARUBA_9901, ARUBA)
+CHIPSET(0x9903, ARUBA_9903, ARUBA)
+CHIPSET(0x9904, ARUBA_9904, ARUBA)
+CHIPSET(0x9905, ARUBA_9905, ARUBA)
+CHIPSET(0x9906, ARUBA_9906, ARUBA)
+CHIPSET(0x9907, ARUBA_9907, ARUBA)
+CHIPSET(0x9908, ARUBA_9908, ARUBA)
+CHIPSET(0x9909, ARUBA_9909, ARUBA)
+CHIPSET(0x990A, ARUBA_990A, ARUBA)
+CHIPSET(0x990B, ARUBA_990B, ARUBA)
+CHIPSET(0x990C, ARUBA_990C, ARUBA)
+CHIPSET(0x990D, ARUBA_990D, ARUBA)
+CHIPSET(0x990E, ARUBA_990E, ARUBA)
+CHIPSET(0x990F, ARUBA_990F, ARUBA)
+CHIPSET(0x9910, ARUBA_9910, ARUBA)
+CHIPSET(0x9913, ARUBA_9913, ARUBA)
+CHIPSET(0x9917, ARUBA_9917, ARUBA)
+CHIPSET(0x9918, ARUBA_9918, ARUBA)
+CHIPSET(0x9919, ARUBA_9919, ARUBA)
+CHIPSET(0x9990, ARUBA_9990, ARUBA)
+CHIPSET(0x9991, ARUBA_9991, ARUBA)
+CHIPSET(0x9992, ARUBA_9992, ARUBA)
+CHIPSET(0x9993, ARUBA_9993, ARUBA)
+CHIPSET(0x9994, ARUBA_9994, ARUBA)
+CHIPSET(0x9995, ARUBA_9995, ARUBA)
+CHIPSET(0x9996, ARUBA_9996, ARUBA)
+CHIPSET(0x9997, ARUBA_9997, ARUBA)
+CHIPSET(0x9998, ARUBA_9998, ARUBA)
+CHIPSET(0x9999, ARUBA_9999, ARUBA)
+CHIPSET(0x999A, ARUBA_999A, ARUBA)
+CHIPSET(0x999B, ARUBA_999B, ARUBA)
+CHIPSET(0x999C, ARUBA_999C, ARUBA)
+CHIPSET(0x999D, ARUBA_999D, ARUBA)
+CHIPSET(0x99A0, ARUBA_99A0, ARUBA)
+CHIPSET(0x99A2, ARUBA_99A2, ARUBA)
+CHIPSET(0x99A4, ARUBA_99A4, ARUBA)
diff --git a/xorg-server/hw/xfree86/dri2/pci_ids/radeon_pci_ids.h b/xorg-server/hw/xfree86/dri2/pci_ids/radeon_pci_ids.h
new file mode 100644
index 000000000..a9efc767d
--- /dev/null
+++ b/xorg-server/hw/xfree86/dri2/pci_ids/radeon_pci_ids.h
@@ -0,0 +1,23 @@
+CHIPSET(0x4C57, RADEON_LW, RV200)
+CHIPSET(0x4C58, RADEON_LX, RV200)
+CHIPSET(0x4C59, RADEON_LY, RV100)
+CHIPSET(0x4C5A, RADEON_LZ, RV100)
+CHIPSET(0x5144, RADEON_QD, R100)
+CHIPSET(0x5145, RADEON_QE, R100)
+CHIPSET(0x5146, RADEON_QF, R100)
+CHIPSET(0x5147, RADEON_QG, R100)
+CHIPSET(0x5159, RADEON_QY, RV100)
+CHIPSET(0x515A, RADEON_QZ, RV100)
+
+CHIPSET(0x5157, RV200_QW, RV200)
+CHIPSET(0x5158, RV200_QX, RV200)
+
+CHIPSET(0x515E, RN50_515E, UNKNOWN)
+CHIPSET(0x5969, RN50_5969, UNKNOWN)
+
+CHIPSET(0x4136, RS100_4136, RS100)
+CHIPSET(0x4336, RS100_4336, RS100)
+CHIPSET(0x4137, RS200_4137, RS200)
+CHIPSET(0x4337, RS200_4337, RS200)
+CHIPSET(0x4237, RS250_4237, RS200)
+CHIPSET(0x4437, RS250_4437, RS200)
diff --git a/xorg-server/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h b/xorg-server/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h
new file mode 100644
index 000000000..571e8633f
--- /dev/null
+++ b/xorg-server/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h
@@ -0,0 +1,157 @@
+CHIPSET(0x6780, TAHITI_6780, TAHITI)
+CHIPSET(0x6784, TAHITI_6784, TAHITI)
+CHIPSET(0x6788, TAHITI_6788, TAHITI)
+CHIPSET(0x678A, TAHITI_678A, TAHITI)
+CHIPSET(0x6790, TAHITI_6790, TAHITI)
+CHIPSET(0x6791, TAHITI_6791, TAHITI)
+CHIPSET(0x6792, TAHITI_6792, TAHITI)
+CHIPSET(0x6798, TAHITI_6798, TAHITI)
+CHIPSET(0x6799, TAHITI_6799, TAHITI)
+CHIPSET(0x679A, TAHITI_679A, TAHITI)
+CHIPSET(0x679B, TAHITI_679B, TAHITI)
+CHIPSET(0x679E, TAHITI_679E, TAHITI)
+CHIPSET(0x679F, TAHITI_679F, TAHITI)
+
+CHIPSET(0x6800, PITCAIRN_6800, PITCAIRN)
+CHIPSET(0x6801, PITCAIRN_6801, PITCAIRN)
+CHIPSET(0x6802, PITCAIRN_6802, PITCAIRN)
+CHIPSET(0x6806, PITCAIRN_6806, PITCAIRN)
+CHIPSET(0x6808, PITCAIRN_6808, PITCAIRN)
+CHIPSET(0x6809, PITCAIRN_6809, PITCAIRN)
+CHIPSET(0x6810, PITCAIRN_6810, PITCAIRN)
+CHIPSET(0x6811, PITCAIRN_6811, PITCAIRN)
+CHIPSET(0x6816, PITCAIRN_6816, PITCAIRN)
+CHIPSET(0x6817, PITCAIRN_6817, PITCAIRN)
+CHIPSET(0x6818, PITCAIRN_6818, PITCAIRN)
+CHIPSET(0x6819, PITCAIRN_6819, PITCAIRN)
+CHIPSET(0x684C, PITCAIRN_684C, PITCAIRN)
+
+CHIPSET(0x6820, VERDE_6820, VERDE)
+CHIPSET(0x6821, VERDE_6821, VERDE)
+CHIPSET(0x6822, VERDE_6822, VERDE)
+CHIPSET(0x6823, VERDE_6823, VERDE)
+CHIPSET(0x6824, VERDE_6824, VERDE)
+CHIPSET(0x6825, VERDE_6825, VERDE)
+CHIPSET(0x6826, VERDE_6826, VERDE)
+CHIPSET(0x6827, VERDE_6827, VERDE)
+CHIPSET(0x6828, VERDE_6828, VERDE)
+CHIPSET(0x6829, VERDE_6829, VERDE)
+CHIPSET(0x682A, VERDE_682A, VERDE)
+CHIPSET(0x682B, VERDE_682B, VERDE)
+CHIPSET(0x682C, VERDE_682C, VERDE)
+CHIPSET(0x682D, VERDE_682D, VERDE)
+CHIPSET(0x682F, VERDE_682F, VERDE)
+CHIPSET(0x6830, VERDE_6830, VERDE)
+CHIPSET(0x6831, VERDE_6831, VERDE)
+CHIPSET(0x6835, VERDE_6835, VERDE)
+CHIPSET(0x6837, VERDE_6837, VERDE)
+CHIPSET(0x6838, VERDE_6838, VERDE)
+CHIPSET(0x6839, VERDE_6839, VERDE)
+CHIPSET(0x683B, VERDE_683B, VERDE)
+CHIPSET(0x683D, VERDE_683D, VERDE)
+CHIPSET(0x683F, VERDE_683F, VERDE)
+
+CHIPSET(0x6600, OLAND_6600, OLAND)
+CHIPSET(0x6601, OLAND_6601, OLAND)
+CHIPSET(0x6602, OLAND_6602, OLAND)
+CHIPSET(0x6603, OLAND_6603, OLAND)
+CHIPSET(0x6604, OLAND_6604, OLAND)
+CHIPSET(0x6605, OLAND_6605, OLAND)
+CHIPSET(0x6606, OLAND_6606, OLAND)
+CHIPSET(0x6607, OLAND_6607, OLAND)
+CHIPSET(0x6608, OLAND_6608, OLAND)
+CHIPSET(0x6610, OLAND_6610, OLAND)
+CHIPSET(0x6611, OLAND_6611, OLAND)
+CHIPSET(0x6613, OLAND_6613, OLAND)
+CHIPSET(0x6620, OLAND_6620, OLAND)
+CHIPSET(0x6621, OLAND_6621, OLAND)
+CHIPSET(0x6623, OLAND_6623, OLAND)
+CHIPSET(0x6631, OLAND_6631, OLAND)
+
+CHIPSET(0x6660, HAINAN_6660, HAINAN)
+CHIPSET(0x6663, HAINAN_6663, HAINAN)
+CHIPSET(0x6664, HAINAN_6664, HAINAN)
+CHIPSET(0x6665, HAINAN_6665, HAINAN)
+CHIPSET(0x6667, HAINAN_6667, HAINAN)
+CHIPSET(0x666F, HAINAN_666F, HAINAN)
+
+CHIPSET(0x6640, BONAIRE_6640, BONAIRE)
+CHIPSET(0x6641, BONAIRE_6641, BONAIRE)
+CHIPSET(0x6646, BONAIRE_6646, BONAIRE)
+CHIPSET(0x6647, BONAIRE_6647, BONAIRE)
+CHIPSET(0x6649, BONAIRE_6649, BONAIRE)
+CHIPSET(0x6650, BONAIRE_6650, BONAIRE)
+CHIPSET(0x6651, BONAIRE_6651, BONAIRE)
+CHIPSET(0x6658, BONAIRE_6658, BONAIRE)
+CHIPSET(0x665C, BONAIRE_665C, BONAIRE)
+CHIPSET(0x665D, BONAIRE_665D, BONAIRE)
+
+CHIPSET(0x9830, KABINI_9830, KABINI)
+CHIPSET(0x9831, KABINI_9831, KABINI)
+CHIPSET(0x9832, KABINI_9832, KABINI)
+CHIPSET(0x9833, KABINI_9833, KABINI)
+CHIPSET(0x9834, KABINI_9834, KABINI)
+CHIPSET(0x9835, KABINI_9835, KABINI)
+CHIPSET(0x9836, KABINI_9836, KABINI)
+CHIPSET(0x9837, KABINI_9837, KABINI)
+CHIPSET(0x9838, KABINI_9838, KABINI)
+CHIPSET(0x9839, KABINI_9839, KABINI)
+CHIPSET(0x983A, KABINI_983A, KABINI)
+CHIPSET(0x983B, KABINI_983B, KABINI)
+CHIPSET(0x983C, KABINI_983C, KABINI)
+CHIPSET(0x983D, KABINI_983D, KABINI)
+CHIPSET(0x983E, KABINI_983E, KABINI)
+CHIPSET(0x983F, KABINI_983F, KABINI)
+
+CHIPSET(0x9850, MULLINS_9850, MULLINS)
+CHIPSET(0x9851, MULLINS_9851, MULLINS)
+CHIPSET(0x9852, MULLINS_9852, MULLINS)
+CHIPSET(0x9853, MULLINS_9853, MULLINS)
+CHIPSET(0x9854, MULLINS_9854, MULLINS)
+CHIPSET(0x9855, MULLINS_9855, MULLINS)
+CHIPSET(0x9856, MULLINS_9856, MULLINS)
+CHIPSET(0x9857, MULLINS_9857, MULLINS)
+CHIPSET(0x9858, MULLINS_9858, MULLINS)
+CHIPSET(0x9859, MULLINS_9859, MULLINS)
+CHIPSET(0x985A, MULLINS_985A, MULLINS)
+CHIPSET(0x985B, MULLINS_985B, MULLINS)
+CHIPSET(0x985C, MULLINS_985C, MULLINS)
+CHIPSET(0x985D, MULLINS_985D, MULLINS)
+CHIPSET(0x985E, MULLINS_985E, MULLINS)
+CHIPSET(0x985F, MULLINS_985F, MULLINS)
+
+CHIPSET(0x1304, KAVERI_1304, KAVERI)
+CHIPSET(0x1305, KAVERI_1305, KAVERI)
+CHIPSET(0x1306, KAVERI_1306, KAVERI)
+CHIPSET(0x1307, KAVERI_1307, KAVERI)
+CHIPSET(0x1309, KAVERI_1309, KAVERI)
+CHIPSET(0x130A, KAVERI_130A, KAVERI)
+CHIPSET(0x130B, KAVERI_130B, KAVERI)
+CHIPSET(0x130C, KAVERI_130C, KAVERI)
+CHIPSET(0x130D, KAVERI_130D, KAVERI)
+CHIPSET(0x130E, KAVERI_130E, KAVERI)
+CHIPSET(0x130F, KAVERI_130F, KAVERI)
+CHIPSET(0x1310, KAVERI_1310, KAVERI)
+CHIPSET(0x1311, KAVERI_1311, KAVERI)
+CHIPSET(0x1312, KAVERI_1312, KAVERI)
+CHIPSET(0x1313, KAVERI_1313, KAVERI)
+CHIPSET(0x1315, KAVERI_1315, KAVERI)
+CHIPSET(0x1316, KAVERI_1316, KAVERI)
+CHIPSET(0x1317, KAVERI_1317, KAVERI)
+CHIPSET(0x1318, KAVERI_1318, KAVERI)
+CHIPSET(0x131B, KAVERI_131B, KAVERI)
+CHIPSET(0x131C, KAVERI_131C, KAVERI)
+CHIPSET(0x131D, KAVERI_131D, KAVERI)
+
+CHIPSET(0x67A0, HAWAII_67A0, HAWAII)
+CHIPSET(0x67A1, HAWAII_67A1, HAWAII)
+CHIPSET(0x67A2, HAWAII_67A2, HAWAII)
+CHIPSET(0x67A8, HAWAII_67A8, HAWAII)
+CHIPSET(0x67A9, HAWAII_67A9, HAWAII)
+CHIPSET(0x67AA, HAWAII_67AA, HAWAII)
+CHIPSET(0x67B0, HAWAII_67B0, HAWAII)
+CHIPSET(0x67B1, HAWAII_67B1, HAWAII)
+CHIPSET(0x67B8, HAWAII_67B8, HAWAII)
+CHIPSET(0x67B9, HAWAII_67B9, HAWAII)
+CHIPSET(0x67BA, HAWAII_67BA, HAWAII)
+CHIPSET(0x67BE, HAWAII_67BE, HAWAII)
diff --git a/xorg-server/hw/xfree86/dri2/pci_ids/vmwgfx_pci_ids.h b/xorg-server/hw/xfree86/dri2/pci_ids/vmwgfx_pci_ids.h
new file mode 100644
index 000000000..124d75b72
--- /dev/null
+++ b/xorg-server/hw/xfree86/dri2/pci_ids/vmwgfx_pci_ids.h
@@ -0,0 +1 @@
+CHIPSET(0x0405, SVGAII, SVGAII)
diff --git a/xorg-server/hw/xfree86/drivers/modesetting/Makefile.am b/xorg-server/hw/xfree86/drivers/modesetting/Makefile.am
index e6834e283..5b08600c1 100644
--- a/xorg-server/hw/xfree86/drivers/modesetting/Makefile.am
+++ b/xorg-server/hw/xfree86/drivers/modesetting/Makefile.am
@@ -30,6 +30,7 @@ AM_CPPFLAGS = \
$(XORG_INCS) \
-I$(top_srcdir)/glamor \
-I$(srcdir)/../../ddc \
+ -I$(srcdir)/../../dri2 \
-I$(srcdir)/../../i2c \
-I$(srcdir)/../../modes \
-I$(srcdir)/../../parser \
@@ -42,10 +43,13 @@ modesetting_drv_la_LIBADD = $(UDEV_LIBS) $(DRM_LIBS)
modesetting_drv_ladir = @moduledir@/drivers
modesetting_drv_la_SOURCES = \
+ dri2.c \
driver.c \
driver.h \
drmmode_display.c \
- drmmode_display.h
+ drmmode_display.h \
+ vblank.c \
+ $(NULL)
drivermandir = $(DRIVER_MAN_DIR)
driverman_PRE = modesetting.man
diff --git a/xorg-server/hw/xfree86/drivers/modesetting/dri2.c b/xorg-server/hw/xfree86/drivers/modesetting/dri2.c
new file mode 100644
index 000000000..6c88060b0
--- /dev/null
+++ b/xorg-server/hw/xfree86/drivers/modesetting/dri2.c
@@ -0,0 +1,863 @@
+/*
+ * Copyright © 2013 Intel Corporation
+ * Copyright © 2014 Broadcom
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+/**
+ * @file dri2.c
+ *
+ * Implements generic support for DRI2 on KMS, using glamor pixmaps
+ * for color buffer management (no support for other aux buffers), and
+ * the DRM vblank ioctls.
+ *
+ * This doesn't implement pageflipping yet.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include "dix-config.h"
+#endif
+
+#include <time.h>
+#include "list.h"
+#include "xf86.h"
+#include "driver.h"
+#include "dri2.h"
+
+#ifdef GLAMOR
+#define GLAMOR_FOR_XORG 1
+#include "glamor.h"
+
+enum ms_dri2_frame_event_type {
+ MS_DRI2_QUEUE_SWAP,
+ MS_DRI2_WAIT_MSC,
+};
+
+typedef struct ms_dri2_frame_event {
+ ScreenPtr screen;
+
+ DrawablePtr drawable;
+ ClientPtr client;
+ enum ms_dri2_frame_event_type type;
+ int frame;
+ xf86CrtcPtr crtc;
+
+ struct xorg_list drawable_resource, client_resource;
+
+ /* for swaps & flips only */
+ DRI2SwapEventPtr event_complete;
+ void *event_data;
+ DRI2BufferPtr front;
+ DRI2BufferPtr back;
+} ms_dri2_frame_event_rec, *ms_dri2_frame_event_ptr;
+
+typedef struct {
+ int refcnt;
+ PixmapPtr pixmap;
+} ms_dri2_buffer_private_rec, *ms_dri2_buffer_private_ptr;
+
+static DevPrivateKeyRec ms_dri2_client_key;
+static RESTYPE frame_event_client_type, frame_event_drawable_type;
+static int ms_dri2_server_generation;
+
+struct ms_dri2_resource {
+ XID id;
+ RESTYPE type;
+ struct xorg_list list;
+};
+
+static struct ms_dri2_resource *
+ms_get_resource(XID id, RESTYPE type)
+{
+ struct ms_dri2_resource *resource;
+ void *ptr;
+
+ ptr = NULL;
+ dixLookupResourceByType(&ptr, id, type, NULL, DixWriteAccess);
+ if (ptr)
+ return ptr;
+
+ resource = malloc(sizeof(*resource));
+ if (resource == NULL)
+ return NULL;
+
+ if (!AddResource(id, type, resource)) {
+ free(resource);
+ return NULL;
+ }
+
+ resource->id = id;
+ resource->type = type;
+ xorg_list_init(&resource->list);
+ return resource;
+}
+
+static inline PixmapPtr
+get_drawable_pixmap(DrawablePtr drawable)
+{
+ ScreenPtr screen = drawable->pScreen;
+
+ if (drawable->type == DRAWABLE_PIXMAP)
+ return (PixmapPtr) drawable;
+ else
+ return screen->GetWindowPixmap((WindowPtr) drawable);
+}
+
+static PixmapPtr
+get_front_buffer(DrawablePtr drawable)
+{
+ PixmapPtr pixmap;
+
+ pixmap = get_drawable_pixmap(drawable);
+ pixmap->refcnt++;
+
+ return pixmap;
+}
+
+static DRI2Buffer2Ptr
+ms_dri2_create_buffer(DrawablePtr drawable, unsigned int attachment,
+ unsigned int format)
+{
+ ScreenPtr screen = drawable->pScreen;
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
+ DRI2Buffer2Ptr buffer;
+ PixmapPtr pixmap;
+ uint32_t size;
+ uint16_t pitch;
+ ms_dri2_buffer_private_ptr private;
+
+ buffer = calloc(1, sizeof *buffer);
+ if (buffer == NULL)
+ return NULL;
+
+ private = calloc(1, sizeof(*private));
+ if (private == NULL) {
+ free(buffer);
+ return NULL;
+ }
+
+ pixmap = NULL;
+ if (attachment == DRI2BufferFrontLeft)
+ pixmap = get_front_buffer(drawable);
+
+ if (pixmap == NULL) {
+ int pixmap_width = drawable->width;
+ int pixmap_height = drawable->height;
+ int pixmap_cpp = (format != 0) ? format : drawable->depth;
+
+ /* Assume that non-color-buffers require special
+ * device-specific handling. Mesa currently makes no requests
+ * for non-color aux buffers.
+ */
+ switch (attachment) {
+ case DRI2BufferAccum:
+ case DRI2BufferBackLeft:
+ case DRI2BufferBackRight:
+ case DRI2BufferFakeFrontLeft:
+ case DRI2BufferFakeFrontRight:
+ case DRI2BufferFrontLeft:
+ case DRI2BufferFrontRight:
+ break;
+
+ case DRI2BufferStencil:
+ case DRI2BufferDepth:
+ case DRI2BufferDepthStencil:
+ case DRI2BufferHiz:
+ default:
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "Request for DRI2 buffer attachment %d unsupported\n",
+ attachment);
+ free(private);
+ free(buffer);
+ return NULL;
+ }
+
+ pixmap = screen->CreatePixmap(screen,
+ pixmap_width,
+ pixmap_height,
+ pixmap_cpp,
+ 0);
+ if (pixmap == NULL) {
+ if (pixmap)
+ screen->DestroyPixmap(pixmap);
+ free(private);
+ free(buffer);
+ return NULL;
+ }
+ }
+
+ buffer->attachment = attachment;
+ buffer->cpp = pixmap->drawable.bitsPerPixel / 8;
+ buffer->format = format;
+ /* The buffer's flags field is unused by the client drivers in
+ * Mesa currently.
+ */
+ buffer->flags = 0;
+
+ buffer->name = glamor_name_from_pixmap(pixmap, &pitch, &size);
+ buffer->pitch = pitch;
+ if (buffer->name == -1) {
+ xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+ "Failed to get DRI2 name for pixmap\n");
+ screen->DestroyPixmap(pixmap);
+ free(private);
+ free(buffer);
+ return NULL;
+ }
+
+ buffer->driverPrivate = private;
+ private->refcnt = 1;
+ private->pixmap = pixmap;
+
+ return buffer;
+}
+
+static void
+ms_dri2_reference_buffer(DRI2Buffer2Ptr buffer)
+{
+ if (buffer) {
+ ms_dri2_buffer_private_ptr private = buffer->driverPrivate;
+ private->refcnt++;
+ }
+}
+
+static void ms_dri2_destroy_buffer(DrawablePtr drawable, DRI2Buffer2Ptr buffer)
+{
+ if (!buffer)
+ return;
+
+ if (buffer->driverPrivate) {
+ ms_dri2_buffer_private_ptr private = buffer->driverPrivate;
+ if (--private->refcnt == 0) {
+ ScreenPtr screen = private->pixmap->drawable.pScreen;
+ screen->DestroyPixmap(private->pixmap);
+ free(private);
+ free(buffer);
+ }
+ } else {
+ free(buffer);
+ }
+}
+
+static void
+ms_dri2_copy_region(DrawablePtr drawable, RegionPtr pRegion,
+ DRI2BufferPtr destBuffer, DRI2BufferPtr sourceBuffer)
+{
+ ms_dri2_buffer_private_ptr src_priv = sourceBuffer->driverPrivate;
+ ms_dri2_buffer_private_ptr dst_priv = destBuffer->driverPrivate;
+ PixmapPtr src_pixmap = src_priv->pixmap;
+ PixmapPtr dst_pixmap = dst_priv->pixmap;
+ ScreenPtr screen = drawable->pScreen;
+ DrawablePtr src = (sourceBuffer->attachment == DRI2BufferFrontLeft)
+ ? drawable : &src_pixmap->drawable;
+ DrawablePtr dst = (destBuffer->attachment == DRI2BufferFrontLeft)
+ ? drawable : &dst_pixmap->drawable;
+ RegionPtr pCopyClip;
+ GCPtr gc;
+
+ gc = GetScratchGC(dst->depth, screen);
+ if (!gc)
+ return;
+
+ pCopyClip = REGION_CREATE(screen, NULL, 0);
+ REGION_COPY(screen, pCopyClip, pRegion);
+ (*gc->funcs->ChangeClip) (gc, CT_REGION, pCopyClip, 0);
+ ValidateGC(dst, gc);
+
+ /* It's important that this copy gets submitted before the direct
+ * rendering client submits rendering for the next frame, but we
+ * don't actually need to submit right now. The client will wait
+ * for the DRI2CopyRegion reply or the swap buffer event before
+ * rendering, and we'll hit the flush callback chain before those
+ * messages are sent. We submit our batch buffers from the flush
+ * callback chain so we know that will happen before the client
+ * tries to render again.
+ */
+ gc->ops->CopyArea(src, dst, gc,
+ 0, 0,
+ drawable->width, drawable->height,
+ 0, 0);
+
+ FreeScratchGC(gc);
+}
+
+static uint64_t
+gettime_us(void)
+{
+ struct timespec tv;
+
+ if (clock_gettime(CLOCK_MONOTONIC, &tv))
+ return 0;
+
+ return (uint64_t)tv.tv_sec * 1000000 + tv.tv_nsec / 1000;
+}
+
+/**
+ * Get current frame count and frame count timestamp, based on drawable's
+ * crtc.
+ */
+static int
+ms_dri2_get_msc(DrawablePtr draw, CARD64 *ust, CARD64 *msc)
+{
+ int ret;
+ xf86CrtcPtr crtc = ms_dri2_crtc_covering_drawable(draw);
+
+ /* Drawable not displayed, make up a *monotonic* value */
+ if (crtc == NULL) {
+ *ust = gettime_us();
+ *msc = 0;
+ return TRUE;
+ }
+
+ ret = ms_get_crtc_ust_msc(crtc, ust, msc);
+
+ if (ret)
+ return FALSE;
+
+ return TRUE;
+}
+
+static XID
+get_client_id(ClientPtr client)
+{
+ XID *ptr = dixGetPrivateAddr(&client->devPrivates, &ms_dri2_client_key);
+ if (*ptr == 0)
+ *ptr = FakeClientID(client->index);
+ return *ptr;
+}
+
+/*
+ * Hook this frame event into the server resource
+ * database so we can clean it up if the drawable or
+ * client exits while the swap is pending
+ */
+static Bool
+ms_dri2_add_frame_event(ms_dri2_frame_event_ptr info)
+{
+ struct ms_dri2_resource *resource;
+
+ resource = ms_get_resource(get_client_id(info->client),
+ frame_event_client_type);
+ if (resource == NULL)
+ return FALSE;
+
+ xorg_list_add(&info->client_resource, &resource->list);
+
+ resource = ms_get_resource(info->drawable->id, frame_event_drawable_type);
+ if (resource == NULL) {
+ xorg_list_del(&info->client_resource);
+ return FALSE;
+ }
+
+ xorg_list_add(&info->drawable_resource, &resource->list);
+
+ return TRUE;
+}
+
+static void
+ms_dri2_del_frame_event(ms_dri2_frame_event_rec *info)
+{
+ xorg_list_del(&info->client_resource);
+ xorg_list_del(&info->drawable_resource);
+
+ if (info->front)
+ ms_dri2_destroy_buffer(NULL, info->front);
+ if (info->back)
+ ms_dri2_destroy_buffer(NULL, info->back);
+
+ free(info);
+}
+
+static void
+ms_dri2_blit_swap(DrawablePtr drawable,
+ DRI2BufferPtr dst,
+ DRI2BufferPtr src)
+{
+ BoxRec box;
+ RegionRec region;
+
+ box.x1 = 0;
+ box.y1 = 0;
+ box.x2 = drawable->width;
+ box.y2 = drawable->height;
+ REGION_INIT(pScreen, &region, &box, 0);
+
+ ms_dri2_copy_region(drawable, &region, dst, src);
+}
+
+static void
+ms_dri2_frame_event_handler(uint64_t msc,
+ uint64_t usec,
+ void *data)
+{
+ ms_dri2_frame_event_ptr frame_info = data;
+ DrawablePtr drawable = frame_info->drawable;
+ ScreenPtr screen = frame_info->screen;
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
+ uint32_t tv_sec = usec / 1000000;
+ uint32_t tv_usec = usec % 1000000;
+
+ if (!drawable) {
+ ms_dri2_del_frame_event(frame_info);
+ return;
+ }
+
+ switch (frame_info->type) {
+ case MS_DRI2_QUEUE_SWAP:
+ ms_dri2_blit_swap(drawable, frame_info->front, frame_info->back);
+ DRI2SwapComplete(frame_info->client, drawable, msc, tv_sec, tv_usec,
+ DRI2_BLIT_COMPLETE,
+ frame_info->client ? frame_info->event_complete : NULL,
+ frame_info->event_data);
+ break;
+
+ case MS_DRI2_WAIT_MSC:
+ if (frame_info->client)
+ DRI2WaitMSCComplete(frame_info->client, drawable,
+ msc, tv_sec, tv_usec);
+ break;
+
+ default:
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "%s: unknown vblank event (type %d) received\n", __func__,
+ frame_info->type);
+ break;
+ }
+
+ ms_dri2_del_frame_event(frame_info);
+}
+
+static void
+ms_dri2_frame_event_abort(void *data)
+{
+ ms_dri2_frame_event_ptr frame_info = data;
+
+ ms_dri2_del_frame_event(frame_info);
+}
+
+/**
+ * Request a DRM event when the requested conditions will be satisfied.
+ *
+ * We need to handle the event and ask the server to wake up the client when
+ * we receive it.
+ */
+static int
+ms_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw, CARD64 target_msc,
+ CARD64 divisor, CARD64 remainder)
+{
+ ScreenPtr screen = draw->pScreen;
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
+ modesettingPtr ms = modesettingPTR(scrn);
+ ms_dri2_frame_event_ptr wait_info;
+ drmVBlank vbl;
+ int ret;
+ xf86CrtcPtr crtc = ms_dri2_crtc_covering_drawable(draw);
+ drmmode_crtc_private_ptr drmmode_crtc;
+ CARD64 current_msc, current_ust, request_msc;
+ uint32_t seq;
+
+ /* Drawable not visible, return immediately */
+ if (!crtc)
+ goto out_complete;
+ drmmode_crtc = crtc->driver_private;
+
+ wait_info = calloc(1, sizeof(*wait_info));
+ if (!wait_info)
+ goto out_complete;
+
+ wait_info->screen = screen;
+ wait_info->drawable = draw;
+ wait_info->client = client;
+ wait_info->type = MS_DRI2_WAIT_MSC;
+
+ if (!ms_dri2_add_frame_event(wait_info)) {
+ free(wait_info);
+ wait_info = NULL;
+ goto out_complete;
+ }
+
+ /* Get current count */
+ ret = ms_get_crtc_ust_msc(crtc, &current_ust, &current_msc);
+
+ /*
+ * If divisor is zero, or current_msc is smaller than target_msc,
+ * we just need to make sure target_msc passes before waking up the
+ * client.
+ */
+ if (divisor == 0 || current_msc < target_msc) {
+ /* If target_msc already reached or passed, set it to
+ * current_msc to ensure we return a reasonable value back
+ * to the caller. This keeps the client from continually
+ * sending us MSC targets from the past by forcibly updating
+ * their count on this call.
+ */
+ seq = ms_drm_queue_alloc(crtc, wait_info,
+ ms_dri2_frame_event_handler,
+ ms_dri2_frame_event_abort);
+ if (!seq)
+ goto out_free;
+
+ if (current_msc >= target_msc)
+ target_msc = current_msc;
+ vbl.request.type = (DRM_VBLANK_ABSOLUTE |
+ DRM_VBLANK_EVENT |
+ drmmode_crtc->vblank_pipe);
+ vbl.request.sequence = ms_crtc_msc_to_kernel_msc(crtc, target_msc);
+ vbl.request.signal = (unsigned long)seq;
+
+ ret = drmWaitVBlank(ms->fd, &vbl);
+ if (ret) {
+ static int limit = 5;
+ if (limit) {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "%s:%d get vblank counter failed: %s\n",
+ __FUNCTION__, __LINE__,
+ strerror(errno));
+ limit--;
+ }
+ goto out_free;
+ }
+
+ wait_info->frame = ms_kernel_msc_to_crtc_msc(crtc, vbl.reply.sequence);
+ DRI2BlockClient(client, draw);
+ return TRUE;
+ }
+
+ /*
+ * If we get here, target_msc has already passed or we don't have one,
+ * so we queue an event that will satisfy the divisor/remainder equation.
+ */
+ vbl.request.type =
+ DRM_VBLANK_ABSOLUTE | DRM_VBLANK_EVENT | drmmode_crtc->vblank_pipe;
+
+ request_msc = current_msc - (current_msc % divisor) +
+ remainder;
+ /*
+ * If calculated remainder is larger than requested remainder,
+ * it means we've passed the last point where
+ * seq % divisor == remainder, so we need to wait for the next time
+ * that will happen.
+ */
+ if ((current_msc % divisor) >= remainder)
+ request_msc += divisor;
+
+ seq = ms_drm_queue_alloc(crtc, wait_info,
+ ms_dri2_frame_event_handler,
+ ms_dri2_frame_event_abort);
+ if (!seq)
+ goto out_free;
+
+ vbl.request.sequence = ms_crtc_msc_to_kernel_msc(crtc, request_msc);
+ vbl.request.signal = (unsigned long)seq;
+
+ ret = drmWaitVBlank(ms->fd, &vbl);
+ if (ret) {
+ static int limit = 5;
+ if (limit) {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "%s:%d get vblank counter failed: %s\n",
+ __FUNCTION__, __LINE__,
+ strerror(errno));
+ limit--;
+ }
+ goto out_free;
+ }
+
+ wait_info->frame = ms_kernel_msc_to_crtc_msc(crtc, vbl.reply.sequence);
+ DRI2BlockClient(client, draw);
+
+ return TRUE;
+
+ out_free:
+ ms_dri2_del_frame_event(wait_info);
+ out_complete:
+ DRI2WaitMSCComplete(client, draw, target_msc, 0, 0);
+ return TRUE;
+}
+
+/**
+ * ScheduleSwap is responsible for requesting a DRM vblank event for
+ * the appropriate frame, or executing the swap immediately if it
+ * doesn't need to wait.
+ *
+ * When the swap is complete, the driver should call into the server so it
+ * can send any swap complete events that have been requested.
+ */
+static int
+ms_dri2_schedule_swap(ClientPtr client, DrawablePtr draw,
+ DRI2BufferPtr front, DRI2BufferPtr back,
+ CARD64 *target_msc, CARD64 divisor,
+ CARD64 remainder, DRI2SwapEventPtr func, void *data)
+{
+ ScreenPtr screen = draw->pScreen;
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
+ modesettingPtr ms = modesettingPTR(scrn);
+ drmVBlank vbl;
+ int ret;
+ xf86CrtcPtr crtc = ms_dri2_crtc_covering_drawable(draw);
+ drmmode_crtc_private_ptr drmmode_crtc;
+ ms_dri2_frame_event_ptr frame_info = NULL;
+ uint64_t current_msc, current_ust;
+ uint64_t request_msc;
+ uint32_t seq;
+
+ /* Drawable not displayed... just complete the swap */
+ if (!crtc)
+ goto blit_fallback;
+ drmmode_crtc = crtc->driver_private;
+
+ frame_info = calloc(1, sizeof(*frame_info));
+ if (!frame_info)
+ goto blit_fallback;
+
+ frame_info->screen = screen;
+ frame_info->drawable = draw;
+ frame_info->client = client;
+ frame_info->event_complete = func;
+ frame_info->event_data = data;
+ frame_info->front = front;
+ frame_info->back = back;
+ frame_info->crtc = crtc;
+ frame_info->type = MS_DRI2_QUEUE_SWAP;
+
+ if (!ms_dri2_add_frame_event(frame_info)) {
+ free(frame_info);
+ frame_info = NULL;
+ goto blit_fallback;
+ }
+
+ ms_dri2_reference_buffer(front);
+ ms_dri2_reference_buffer(back);
+
+ ret = ms_get_crtc_ust_msc(crtc, &current_ust, &current_msc);
+
+ /*
+ * If divisor is zero, or current_msc is smaller than target_msc
+ * we just need to make sure target_msc passes before initiating
+ * the swap.
+ */
+ if (divisor == 0 || current_msc < *target_msc) {
+ /* We need to use DRM_VBLANK_NEXTONMISS to avoid unreliable
+ * timestamping later on.
+ */
+ vbl.request.type = (DRM_VBLANK_ABSOLUTE |
+ DRM_VBLANK_NEXTONMISS |
+ DRM_VBLANK_EVENT |
+ drmmode_crtc->vblank_pipe);
+
+ /* If target_msc already reached or passed, set it to
+ * current_msc to ensure we return a reasonable value back
+ * to the caller. This makes swap_interval logic more robust.
+ */
+ if (current_msc >= *target_msc)
+ *target_msc = current_msc;
+
+ seq = ms_drm_queue_alloc(crtc, frame_info,
+ ms_dri2_frame_event_handler,
+ ms_dri2_frame_event_abort);
+ if (!seq)
+ goto blit_fallback;
+
+ vbl.request.sequence = ms_crtc_msc_to_kernel_msc(crtc, *target_msc);
+ vbl.request.signal = (unsigned long)seq;
+
+ ret = drmWaitVBlank(ms->fd, &vbl);
+ if (ret) {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "divisor 0 get vblank counter failed: %s\n",
+ strerror(errno));
+ goto blit_fallback;
+ }
+
+ *target_msc = ms_kernel_msc_to_crtc_msc(crtc, vbl.reply.sequence);
+ frame_info->frame = *target_msc;
+
+ return TRUE;
+ }
+
+ /*
+ * If we get here, target_msc has already passed or we don't have one,
+ * and we need to queue an event that will satisfy the divisor/remainder
+ * equation.
+ */
+ vbl.request.type = (DRM_VBLANK_ABSOLUTE |
+ DRM_VBLANK_NEXTONMISS |
+ DRM_VBLANK_EVENT |
+ drmmode_crtc->vblank_pipe);
+
+ request_msc = current_msc - (current_msc % divisor) +
+ remainder;
+
+ /*
+ * If the calculated deadline vbl.request.sequence is smaller than
+ * or equal to current_msc, it means we've passed the last point
+ * when effective onset frame seq could satisfy
+ * seq % divisor == remainder, so we need to wait for the next time
+ * this will happen.
+
+ * This comparison takes the DRM_VBLANK_NEXTONMISS delay into account.
+ */
+ if (request_msc <= current_msc)
+ request_msc += divisor;
+
+
+ seq = ms_drm_queue_alloc(crtc, frame_info,
+ ms_dri2_frame_event_handler,
+ ms_dri2_frame_event_abort);
+ if (!seq)
+ goto blit_fallback;
+
+ vbl.request.sequence = ms_crtc_msc_to_kernel_msc(crtc, request_msc);
+ vbl.request.signal = (unsigned long)seq;
+
+ ret = drmWaitVBlank(ms->fd, &vbl);
+ if (ret) {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "final get vblank counter failed: %s\n",
+ strerror(errno));
+ goto blit_fallback;
+ }
+
+ *target_msc = ms_kernel_msc_to_crtc_msc(crtc, vbl.reply.sequence);
+ frame_info->frame = *target_msc;
+
+ return TRUE;
+
+ blit_fallback:
+ ms_dri2_blit_swap(draw, front, back);
+ DRI2SwapComplete(client, draw, 0, 0, 0, DRI2_BLIT_COMPLETE, func, data);
+ if (frame_info)
+ ms_dri2_del_frame_event(frame_info);
+ *target_msc = 0; /* offscreen, so zero out target vblank count */
+ return TRUE;
+}
+
+static int
+ms_dri2_frame_event_client_gone(void *data, XID id)
+{
+ struct ms_dri2_resource *resource = data;
+
+ while (!xorg_list_is_empty(&resource->list)) {
+ ms_dri2_frame_event_ptr info =
+ xorg_list_first_entry(&resource->list,
+ ms_dri2_frame_event_rec,
+ client_resource);
+
+ xorg_list_del(&info->client_resource);
+ info->client = NULL;
+ }
+ free(resource);
+
+ return Success;
+}
+
+static int
+ms_dri2_frame_event_drawable_gone(void *data, XID id)
+{
+ struct ms_dri2_resource *resource = data;
+
+ while (!xorg_list_is_empty(&resource->list)) {
+ ms_dri2_frame_event_ptr info =
+ xorg_list_first_entry(&resource->list,
+ ms_dri2_frame_event_rec,
+ drawable_resource);
+
+ xorg_list_del(&info->drawable_resource);
+ info->drawable = NULL;
+ }
+ free(resource);
+
+ return Success;
+}
+
+static Bool
+ms_dri2_register_frame_event_resource_types(void)
+{
+ frame_event_client_type =
+ CreateNewResourceType(ms_dri2_frame_event_client_gone,
+ "Frame Event Client");
+ if (!frame_event_client_type)
+ return FALSE;
+
+ frame_event_drawable_type =
+ CreateNewResourceType(ms_dri2_frame_event_drawable_gone,
+ "Frame Event Drawable");
+ if (!frame_event_drawable_type)
+ return FALSE;
+
+ return TRUE;
+}
+
+Bool
+ms_dri2_screen_init(ScreenPtr screen)
+{
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
+ modesettingPtr ms = modesettingPTR(scrn);
+ DRI2InfoRec info;
+
+ if (!glamor_supports_pixmap_import_export(screen)) {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "DRI2: glamor lacks support for pixmap import/export\n");
+ }
+
+ if (!xf86LoaderCheckSymbol("DRI2Version"))
+ return FALSE;
+
+ if (!dixRegisterPrivateKey(&ms_dri2_client_key,
+ PRIVATE_CLIENT, sizeof(XID)))
+ return FALSE;
+
+ if (serverGeneration != ms_dri2_server_generation) {
+ ms_dri2_server_generation = serverGeneration;
+ if (!ms_dri2_register_frame_event_resource_types()) {
+ xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+ "Cannot register DRI2 frame event resources\n");
+ return FALSE;
+ }
+ }
+
+ memset(&info, '\0', sizeof(info));
+ info.fd = ms->fd;
+ info.driverName = NULL; /* Compat field, unused. */
+ info.deviceName = drmGetDeviceNameFromFd(ms->fd);
+
+ info.version = 4;
+ info.CreateBuffer = ms_dri2_create_buffer;
+ info.DestroyBuffer = ms_dri2_destroy_buffer;
+ info.CopyRegion = ms_dri2_copy_region;
+ info.ScheduleSwap = ms_dri2_schedule_swap;
+ info.GetMSC = ms_dri2_get_msc;
+ info.ScheduleWaitMSC = ms_dri2_schedule_wait_msc;
+
+ /* These two will be filled in by dri2.c */
+ info.numDrivers = 0;
+ info.driverNames = NULL;
+
+ return DRI2ScreenInit(screen, &info);
+}
+
+void
+ms_dri2_close_screen(ScreenPtr screen)
+{
+ DRI2CloseScreen(screen);
+}
+
+#endif /* GLAMOR */
diff --git a/xorg-server/hw/xfree86/drivers/modesetting/driver.c b/xorg-server/hw/xfree86/drivers/modesetting/driver.c
index c62147a0f..592f2469b 100644
--- a/xorg-server/hw/xfree86/drivers/modesetting/driver.c
+++ b/xorg-server/hw/xfree86/drivers/modesetting/driver.c
@@ -25,7 +25,7 @@
*
*
* Original Author: Alan Hourihane <alanh@tungstengraphics.com>
- * Rewrite: Dave Airlie <airlied@redhat.com>
+ * Rewrite: Dave Airlie <airlied@redhat.com>
*
*/
@@ -788,7 +788,9 @@ PreInit(ScrnInfoPtr pScrn, int flags)
try_enable_glamor(pScrn);
- if (!ms->glamor) {
+ if (ms->glamor) {
+ xf86LoadSubModule(pScrn, "dri2");
+ } else {
Bool prefer_shadow = TRUE;
ret = drmGetCap(ms->fd, DRM_CAP_DUMB_PREFER_SHADOW, &value);
@@ -1107,6 +1109,21 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv)
if (serverGeneration == 1)
xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
+ if (!ms_vblank_screen_init(pScreen)) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Failed to initialize vblank support.\n");
+ return FALSE;
+ }
+
+#ifdef GLAMOR
+ if (ms->glamor) {
+ if (!ms_dri2_screen_init(pScreen)) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Failed to initialize the DRI2 extension.\n");
+ }
+ }
+#endif
+
return EnterVT(pScrn);
}
@@ -1172,6 +1189,14 @@ CloseScreen(ScreenPtr pScreen)
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
modesettingPtr ms = modesettingPTR(pScrn);
+#ifdef GLAMOR
+ if (ms->glamor) {
+ ms_dri2_close_screen(pScreen);
+ }
+#endif
+
+ ms_vblank_close_screen(pScreen);
+
if (ms->damage) {
DamageUnregister(ms->damage);
DamageDestroy(ms->damage);
diff --git a/xorg-server/hw/xfree86/drivers/modesetting/driver.h b/xorg-server/hw/xfree86/drivers/modesetting/driver.h
index 35f24193a..9eda1c4da 100644
--- a/xorg-server/hw/xfree86/drivers/modesetting/driver.h
+++ b/xorg-server/hw/xfree86/drivers/modesetting/driver.h
@@ -30,6 +30,7 @@
#include <errno.h>
#include <drm.h>
#include <xf86drm.h>
+#include <xf86Crtc.h>
#include <damage.h>
#include "drmmode_display.h"
@@ -42,6 +43,26 @@ typedef struct {
ScrnInfoPtr pScrn_2;
} EntRec, *EntPtr;
+typedef void (*ms_drm_handler_proc)(uint64_t frame,
+ uint64_t usec,
+ void *data);
+
+typedef void (*ms_drm_abort_proc)(void *data);
+
+/**
+ * A tracked handler for an event that will hopefully be generated by
+ * the kernel, and what to do when it is encountered.
+ */
+struct ms_drm_queue {
+ struct xorg_list list;
+ xf86CrtcPtr crtc;
+ uint32_t seq;
+ void *data;
+ ScrnInfoPtr scrn;
+ ms_drm_handler_proc handler;
+ ms_drm_abort_proc abort;
+};
+
typedef struct _modesettingRec {
int fd;
@@ -70,6 +91,8 @@ typedef struct _modesettingRec {
drmmode_rec drmmode;
+ drmEventContext event_context;
+
DamagePtr damage;
Bool dirty_enabled;
@@ -78,3 +101,24 @@ typedef struct _modesettingRec {
} modesettingRec, *modesettingPtr;
#define modesettingPTR(p) ((modesettingPtr)((p)->driverPrivate))
+
+uint32_t ms_drm_queue_alloc(xf86CrtcPtr crtc,
+ void *data,
+ ms_drm_handler_proc handler,
+ ms_drm_abort_proc abort);
+
+xf86CrtcPtr ms_dri2_crtc_covering_drawable(DrawablePtr pDraw);
+xf86CrtcPtr ms_covering_crtc(ScrnInfoPtr scrn, BoxPtr box,
+ xf86CrtcPtr desired, BoxPtr crtc_box_ret);
+
+int ms_get_crtc_ust_msc(xf86CrtcPtr crtc, CARD64 *ust, CARD64 *msc);
+
+uint32_t ms_crtc_msc_to_kernel_msc(xf86CrtcPtr crtc, uint64_t expect);
+uint64_t ms_kernel_msc_to_crtc_msc(xf86CrtcPtr crtc, uint32_t sequence);
+
+
+Bool ms_dri2_screen_init(ScreenPtr screen);
+void ms_dri2_close_screen(ScreenPtr screen);
+
+Bool ms_vblank_screen_init(ScreenPtr screen);
+void ms_vblank_close_screen(ScreenPtr screen);
diff --git a/xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.c b/xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.c
index d959837ae..ef9009e98 100644
--- a/xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -116,7 +116,7 @@ dumb_bo_unmap(int fd, struct dumb_bo *bo)
}
#endif
-static int
+int
dumb_bo_destroy(int fd, struct dumb_bo *bo)
{
struct drm_mode_destroy_dumb arg;
@@ -137,8 +137,8 @@ dumb_bo_destroy(int fd, struct dumb_bo *bo)
return 0;
}
-static struct dumb_bo *
-dumb_get_bo_from_handle(int fd, int handle, int pitch, int size)
+struct dumb_bo *
+dumb_get_bo_from_fd(int fd, int handle, int pitch, int size)
{
struct dumb_bo *bo;
int ret;
@@ -164,7 +164,7 @@ drmmode_SetSlaveBO(PixmapPtr ppix,
msPixmapPrivPtr ppriv = msGetPixmapPriv(drmmode, ppix);
ppriv->backing_bo =
- dumb_get_bo_from_handle(drmmode->fd, fd_handle, pitch, size);
+ dumb_get_bo_from_fd(drmmode->fd, fd_handle, pitch, size);
if (!ppriv->backing_bo)
return FALSE;
@@ -582,6 +582,17 @@ static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
.shadow_create = drmmode_shadow_create,
};
+static uint32_t
+drmmode_crtc_vblank_pipe(int crtc_id)
+{
+ if (crtc_id > 1)
+ return crtc_id << DRM_VBLANK_HIGH_CRTC_SHIFT;
+ else if (crtc_id > 0)
+ return DRM_VBLANK_SECONDARY;
+ else
+ return 0;
+}
+
static void
drmmode_crtc_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num)
{
@@ -596,6 +607,7 @@ drmmode_crtc_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num)
drmmode_crtc->mode_crtc =
drmModeGetCrtc(drmmode->fd, drmmode->mode_res->crtcs[num]);
drmmode_crtc->drmmode = drmmode;
+ drmmode_crtc->vblank_pipe = drmmode_crtc_vblank_pipe(num);
crtc->driver_private = drmmode_crtc;
}
@@ -1183,6 +1195,11 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
xf86DrvMsg(scrn->scrnIndex, X_INFO,
"Allocate new frame buffer %dx%d stride\n", width, height);
+ if (drmmode->triple_buffer_pixmap) {
+ screen->DestroyPixmap(drmmode->triple_buffer_pixmap);
+ drmmode->triple_buffer_pixmap = NULL;
+ }
+
old_width = scrn->virtualX;
old_height = scrn->virtualY;
old_pitch = drmmode->front_bo->pitch;
diff --git a/xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.h b/xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.h
index 438743b01..987608c55 100644
--- a/xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.h
+++ b/xorg-server/hw/xfree86/drivers/modesetting/drmmode_display.h
@@ -43,6 +43,7 @@ struct dumb_bo {
typedef struct {
int fd;
unsigned fb_id;
+ unsigned old_fb_id;
drmModeResPtr mode_res;
drmModeFBPtr mode_fb;
int cpp;
@@ -58,17 +59,42 @@ typedef struct {
Bool shadow_enable;
void *shadow_fb;
+ /**
+ * A screen-sized pixmap when we're doing triple-buffered DRI2
+ * pageflipping.
+ *
+ * One is shared between all drawables that flip to the front
+ * buffer, and it only gets reallocated when root pixmap size
+ * changes.
+ */
+ PixmapPtr triple_buffer_pixmap;
+
+ /** The GEM name for triple_buffer_pixmap */
+ uint32_t triple_buffer_name;
+
DevPrivateKeyRec pixmapPrivateKeyRec;
} drmmode_rec, *drmmode_ptr;
typedef struct {
drmmode_ptr drmmode;
drmModeCrtcPtr mode_crtc;
- int hw_id;
+ uint32_t vblank_pipe;
struct dumb_bo *cursor_bo;
unsigned rotate_fb_id;
uint16_t lut_r[256], lut_g[256], lut_b[256];
DamagePtr slave_damage;
+
+ /**
+ * @{ MSC (vblank count) handling for the PRESENT extension.
+ *
+ * The kernel's vblank counters are 32 bits and apparently full of
+ * lies, and we need to give a reliable 64-bit msc for GL, so we
+ * have to track and convert to a userland-tracked 64-bit msc.
+ */
+ int32_t vblank_offset;
+ uint32_t msc_prev;
+ uint64_t msc_high;
+ /** @} */
} drmmode_crtc_private_rec, *drmmode_crtc_private_ptr;
typedef struct {
@@ -121,6 +147,9 @@ Bool drmmode_map_cursor_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode);
void drmmode_free_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode);
void drmmode_get_default_bpp(ScrnInfoPtr pScrn, drmmode_ptr drmmmode,
int *depth, int *bpp);
+struct dumb_bo *dumb_get_bo_from_fd(int drm_fd, int fd, int pitch, int size);
+int dumb_bo_destroy(int fd, struct dumb_bo *bo);
+
#ifndef DRM_CAP_DUMB_PREFERRED_DEPTH
#define DRM_CAP_DUMB_PREFERRED_DEPTH 3
diff --git a/xorg-server/hw/xfree86/drivers/modesetting/vblank.c b/xorg-server/hw/xfree86/drivers/modesetting/vblank.c
new file mode 100644
index 000000000..5031ef8ff
--- /dev/null
+++ b/xorg-server/hw/xfree86/drivers/modesetting/vblank.c
@@ -0,0 +1,383 @@
+/*
+ * Copyright © 2013 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+/** @file vblank.c
+ *
+ * Support for tracking the DRM's vblank events.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include "dix-config.h"
+#endif
+
+#include <unistd.h>
+#include <xf86.h>
+#include <xf86Crtc.h>
+#include <poll.h>
+#include "driver.h"
+#include "drmmode_display.h"
+
+/**
+ * Tracking for outstanding events queued to the kernel.
+ *
+ * Each list entry is a struct ms_drm_queue, which has a uint32_t
+ * value generated from drm_seq that identifies the event and a
+ * reference back to the crtc/screen associated with the event. It's
+ * done this way rather than in the screen because we want to be able
+ * to drain the list of event handlers that should be called at server
+ * regen time, even though we don't close the drm fd and have no way
+ * to actually drain the kernel events.
+ */
+static struct xorg_list ms_drm_queue;
+static uint32_t ms_drm_seq;
+
+struct ms_pageflip {
+ ScreenPtr screen;
+ Bool crtc_for_msc_ust;
+};
+
+static void ms_box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b)
+{
+ dest->x1 = a->x1 > b->x1 ? a->x1 : b->x1;
+ dest->x2 = a->x2 < b->x2 ? a->x2 : b->x2;
+ if (dest->x1 >= dest->x2) {
+ dest->x1 = dest->x2 = dest->y1 = dest->y2 = 0;
+ return;
+ }
+
+ dest->y1 = a->y1 > b->y1 ? a->y1 : b->y1;
+ dest->y2 = a->y2 < b->y2 ? a->y2 : b->y2;
+ if (dest->y1 >= dest->y2)
+ dest->x1 = dest->x2 = dest->y1 = dest->y2 = 0;
+}
+
+static void ms_crtc_box(xf86CrtcPtr crtc, BoxPtr crtc_box)
+{
+ if (crtc->enabled) {
+ crtc_box->x1 = crtc->x;
+ crtc_box->x2 =
+ crtc->x + xf86ModeWidth(&crtc->mode, crtc->rotation);
+ crtc_box->y1 = crtc->y;
+ crtc_box->y2 =
+ crtc->y + xf86ModeHeight(&crtc->mode, crtc->rotation);
+ } else
+ crtc_box->x1 = crtc_box->x2 = crtc_box->y1 = crtc_box->y2 = 0;
+}
+
+static int ms_box_area(BoxPtr box)
+{
+ return (int)(box->x2 - box->x1) * (int)(box->y2 - box->y1);
+}
+
+/*
+ * Return the crtc covering 'box'. If two crtcs cover a portion of
+ * 'box', then prefer 'desired'. If 'desired' is NULL, then prefer the crtc
+ * with greater coverage
+ */
+
+xf86CrtcPtr
+ms_covering_crtc(ScrnInfoPtr scrn,
+ BoxPtr box, xf86CrtcPtr desired, BoxPtr crtc_box_ret)
+{
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+ xf86CrtcPtr crtc, best_crtc;
+ int coverage, best_coverage;
+ int c;
+ BoxRec crtc_box, cover_box;
+
+ best_crtc = NULL;
+ best_coverage = 0;
+ crtc_box_ret->x1 = 0;
+ crtc_box_ret->x2 = 0;
+ crtc_box_ret->y1 = 0;
+ crtc_box_ret->y2 = 0;
+ for (c = 0; c < xf86_config->num_crtc; c++) {
+ crtc = xf86_config->crtc[c];
+
+ /* If the CRTC is off, treat it as not covering */
+ if (!crtc->enabled)
+ continue;
+
+ ms_crtc_box(crtc, &crtc_box);
+ ms_box_intersect(&cover_box, &crtc_box, box);
+ coverage = ms_box_area(&cover_box);
+ if (coverage && crtc == desired) {
+ *crtc_box_ret = crtc_box;
+ return crtc;
+ }
+ if (coverage > best_coverage) {
+ *crtc_box_ret = crtc_box;
+ best_crtc = crtc;
+ best_coverage = coverage;
+ }
+ }
+ return best_crtc;
+}
+
+xf86CrtcPtr
+ms_dri2_crtc_covering_drawable(DrawablePtr pDraw)
+{
+ ScreenPtr pScreen = pDraw->pScreen;
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ BoxRec box, crtcbox;
+ xf86CrtcPtr crtc;
+
+ box.x1 = pDraw->x;
+ box.y1 = pDraw->y;
+ box.x2 = box.x1 + pDraw->width;
+ box.y2 = box.y1 + pDraw->height;
+
+ crtc = ms_covering_crtc(pScrn, &box, NULL, &crtcbox);
+
+ /* Make sure the CRTC is valid and this is the real front buffer */
+ if (crtc != NULL && !crtc->rotatedData)
+ return crtc;
+
+ return NULL;
+}
+
+static Bool
+ms_get_kernel_ust_msc(xf86CrtcPtr crtc,
+ uint32_t *msc, uint64_t *ust)
+{
+ ScreenPtr screen = crtc->randr_crtc->pScreen;
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
+ modesettingPtr ms = modesettingPTR(scrn);
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+ drmVBlank vbl;
+ int ret;
+
+ /* Get current count */
+ vbl.request.type = DRM_VBLANK_RELATIVE | drmmode_crtc->vblank_pipe;
+ vbl.request.sequence = 0;
+ vbl.request.signal = 0;
+ ret = drmWaitVBlank(ms->fd, &vbl);
+ if (ret) {
+ *msc = 0;
+ *ust = 0;
+ return FALSE;
+ } else {
+ *msc = vbl.reply.sequence;
+ *ust = (CARD64) vbl.reply.tval_sec * 1000000 + vbl.reply.tval_usec;
+ return TRUE;
+ }
+}
+
+/**
+ * Convert a 32-bit kernel MSC sequence number to a 64-bit local sequence
+ * number, adding in the vblank_offset and high 32 bits, and dealing
+ * with 64-bit wrapping
+ */
+uint64_t
+ms_kernel_msc_to_crtc_msc(xf86CrtcPtr crtc, uint32_t sequence)
+{
+ drmmode_crtc_private_rec *drmmode_crtc = crtc->driver_private;
+ sequence += drmmode_crtc->vblank_offset;
+
+ if ((int32_t) (sequence - drmmode_crtc->msc_prev) < -0x40000000)
+ drmmode_crtc->msc_high += 0x100000000L;
+ drmmode_crtc->msc_prev = sequence;
+ return drmmode_crtc->msc_high + sequence;
+}
+
+int
+ms_get_crtc_ust_msc(xf86CrtcPtr crtc, CARD64 *ust, CARD64 *msc)
+{
+ uint32_t kernel_msc;
+
+ if (!ms_get_kernel_ust_msc(crtc, &kernel_msc, ust))
+ return BadMatch;
+ *msc = ms_kernel_msc_to_crtc_msc(crtc, kernel_msc);
+
+ return Success;
+}
+
+#define MAX_VBLANK_OFFSET 1000
+
+/**
+ * Convert a 64-bit adjusted MSC value into a 32-bit kernel sequence number,
+ * removing the high 32 bits and subtracting out the vblank_offset term.
+ *
+ * This also updates the vblank_offset when it notices that the value should
+ * change.
+ */
+uint32_t
+ms_crtc_msc_to_kernel_msc(xf86CrtcPtr crtc, uint64_t expect)
+{
+ drmmode_crtc_private_rec *drmmode_crtc = crtc->driver_private;
+ uint64_t msc;
+ uint64_t ust;
+ int64_t diff;
+
+ if (ms_get_crtc_ust_msc(crtc, &ust, &msc) == Success) {
+ diff = expect - msc;
+
+ /* We're way off here, assume that the kernel has lost its mind
+ * and smack the vblank back to something sensible
+ */
+ if (diff < -MAX_VBLANK_OFFSET || MAX_VBLANK_OFFSET < diff) {
+ drmmode_crtc->vblank_offset += (int32_t) diff;
+ if (drmmode_crtc->vblank_offset > -MAX_VBLANK_OFFSET &&
+ drmmode_crtc->vblank_offset < MAX_VBLANK_OFFSET)
+ drmmode_crtc->vblank_offset = 0;
+ }
+ }
+ return (uint32_t) (expect - drmmode_crtc->vblank_offset);
+}
+
+/**
+ * Check for pending DRM events and process them.
+ */
+static void
+ms_drm_wakeup_handler(void *data, int err, void *mask)
+{
+ ScreenPtr screen = data;
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
+ modesettingPtr ms = modesettingPTR(scrn);
+ fd_set *read_mask = mask;
+
+ if (data == NULL || err < 0)
+ return;
+
+ if (FD_ISSET(ms->fd, read_mask))
+ drmHandleEvent(ms->fd, &ms->event_context);
+}
+
+/*
+ * Enqueue a potential drm response; when the associated response
+ * appears, we've got data to pass to the handler from here
+ */
+uint32_t
+ms_drm_queue_alloc(xf86CrtcPtr crtc,
+ void *data,
+ ms_drm_handler_proc handler,
+ ms_drm_abort_proc abort)
+{
+ ScreenPtr screen = crtc->randr_crtc->pScreen;
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
+ struct ms_drm_queue *q;
+
+ q = calloc(1, sizeof(struct ms_drm_queue));
+
+ if (!q)
+ return 0;
+ if (!ms_drm_seq)
+ ++ms_drm_seq;
+ q->seq = ms_drm_seq++;
+ q->scrn = scrn;
+ q->crtc = crtc;
+ q->data = data;
+ q->handler = handler;
+ q->abort = abort;
+
+ xorg_list_add(&q->list, &ms_drm_queue);
+
+ return q->seq;
+}
+
+/**
+ * Abort one queued DRM entry, removing it
+ * from the list, calling the abort function and
+ * freeing the memory
+ */
+static void
+ms_drm_abort_one(struct ms_drm_queue *q)
+{
+ xorg_list_del(&q->list);
+ q->abort(q->data);
+ free(q);
+}
+
+/**
+ * Abort all queued entries on a specific scrn, used
+ * when resetting the X server
+ */
+static void
+ms_drm_abort_scrn(ScrnInfoPtr scrn)
+{
+ struct ms_drm_queue *q, *tmp;
+
+ xorg_list_for_each_entry_safe(q, tmp, &ms_drm_queue, list) {
+ if (q->scrn == scrn)
+ ms_drm_abort_one(q);
+ }
+}
+
+/*
+ * General DRM kernel handler. Looks for the matching sequence number in the
+ * drm event queue and calls the handler for it.
+ */
+static void
+ms_drm_handler(int fd, uint32_t frame, uint32_t sec, uint32_t usec,
+ void *user_ptr)
+{
+ struct ms_drm_queue *q, *tmp;
+ uint32_t user_data = (uint32_t) (intptr_t) user_ptr;
+
+ xorg_list_for_each_entry_safe(q, tmp, &ms_drm_queue, list) {
+ if (q->seq == user_data) {
+ uint64_t msc;
+
+ msc = ms_kernel_msc_to_crtc_msc(q->crtc, frame);
+ xorg_list_del(&q->list);
+ q->handler(msc, (uint64_t) sec * 1000000 + usec, q->data);
+ free(q);
+ break;
+ }
+ }
+}
+
+Bool
+ms_vblank_screen_init(ScreenPtr screen)
+{
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
+ modesettingPtr ms = modesettingPTR(scrn);
+
+ xorg_list_init(&ms_drm_queue);
+
+ ms->event_context.version = DRM_EVENT_CONTEXT_VERSION;
+ ms->event_context.vblank_handler = ms_drm_handler;
+ ms->event_context.page_flip_handler = ms_drm_handler;
+
+ /* We need to re-register the DRM fd for the synchronisation
+ * feedback on every server generation, so perform the
+ * registration within ScreenInit and not PreInit.
+ */
+ AddGeneralSocket(ms->fd);
+ RegisterBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA,
+ ms_drm_wakeup_handler, screen);
+
+ return TRUE;
+}
+
+void
+ms_vblank_close_screen(ScreenPtr screen)
+{
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
+ modesettingPtr ms = modesettingPTR(scrn);
+
+ ms_drm_abort_scrn(scrn);
+
+ RemoveBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA,
+ ms_drm_wakeup_handler, screen);
+ RemoveGeneralSocket(ms->fd);
+}
diff --git a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c
index 0450822ee..8cd207961 100644
--- a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c
@@ -251,7 +251,7 @@ fbdev2xfree_timing(struct fb_var_screeninfo *var, DisplayModePtr mode)
/* open correct framebuffer device */
/**
- * Try to find the framebuffer device for a given PCI device
+ * Try to find the framebuffer device for a given PCI device
*/
static int
fbdev_open_pci(struct pci_device *pPci, char **namep)
diff --git a/xorg-server/hw/xfree86/i2c/xf86i2c.c b/xorg-server/hw/xfree86/i2c/xf86i2c.c
index 2d261d4ce..cf2cd0971 100644
--- a/xorg-server/hw/xfree86/i2c/xf86i2c.c
+++ b/xorg-server/hw/xfree86/i2c/xf86i2c.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 1998 Itai Nahshon, Michael Schimek
*
- * The original code was derived from and inspired by
+ * The original code was derived from and inspired by
* the I2C driver from the Linux kernel.
* (c) 1998 Gerd Knorr <kraxel@cs.tu-berlin.de>
*/
@@ -52,7 +52,7 @@ I2CUDelay(I2CBusPtr b, int usec)
if (usec > 0) {
X_GETTIMEOFDAY(&begin);
do {
- /* It would be nice to use {xf86}usleep,
+ /* It would be nice to use {xf86}usleep,
* but usleep (1) takes >10000 usec !
*/
X_GETTIMEOFDAY(&cur);
@@ -74,7 +74,7 @@ I2CUDelay(I2CBusPtr b, int usec)
#define RISEFALLTIME 2 /* usec, actually 300 to 1000 ns according to the i2c specs */
-/* Some devices will hold SCL low to slow down the bus or until
+/* Some devices will hold SCL low to slow down the bus or until
* ready for transmission.
*
* This condition will be noticed when the master tries to raise
@@ -206,7 +206,7 @@ I2CReadBit(I2CBusPtr b, int *psda, int timeout)
/* This is the default I2CPutByte function if not supplied by the driver.
*
* A single byte is sent to the device.
- * The function returns FALSE if a timeout occurs, you should send
+ * The function returns FALSE if a timeout occurs, you should send
* a stop condition afterwards to reset the bus.
*
* A timeout occurs,
@@ -267,7 +267,7 @@ I2CPutByte(I2CDevPtr d, I2CByte data)
* A single byte is read from the device.
* The function returns FALSE if a timeout occurs, you should send
* a stop condition afterwards to reset the bus.
- *
+ *
* A timeout occurs,
* if the slave pulls SCL to slow down the bus more than ByteTimeout usecs,
* or slows down the bus for more than b->BitTimeout usecs for each bit.
@@ -275,7 +275,7 @@ I2CPutByte(I2CDevPtr d, I2CByte data)
* ByteTimeout must be at least b->HoldTime, the other timeouts can be
* zero according to the comment on I2CRaiseSCL.
*
- * For the <last> byte in a sequence the acknowledge bit NACK (1),
+ * For the <last> byte in a sequence the acknowledge bit NACK (1),
* otherwise ACK (0) will be sent.
*/
@@ -311,11 +311,11 @@ I2CGetByte(I2CDevPtr d, I2CByte * data, Bool last)
*
* It creates the start condition, followed by the d->SlaveAddr.
* Higher level functions must call this routine rather than
- * I2CStart/PutByte because a hardware I2C master may not be able
+ * I2CStart/PutByte because a hardware I2C master may not be able
* to send a slave address without a start condition.
*
* The same timeouts apply as with I2CPutByte and additional a
- * StartTimeout, similar to the ByteTimeout but for the start
+ * StartTimeout, similar to the ByteTimeout but for the start
* condition.
*
* In case of a timeout, the bus is left in a clean idle condition.
@@ -325,7 +325,7 @@ I2CGetByte(I2CDevPtr d, I2CByte * data, Bool last)
* in the least significant byte. This is, the slave address must include the
* R/_W flag as least significant bit.
*
- * The most significant byte of the address will be sent _after_ the LSB,
+ * The most significant byte of the address will be sent _after_ the LSB,
* but only if the LSB indicates:
* a) an 11 bit address, this is LSB = 1111 0xxx.
* b) a 'general call address', this is LSB = 0000 000x - see the I2C specs
@@ -354,7 +354,7 @@ I2CAddress(I2CDevPtr d, I2CSlaveAddr addr)
* ========================================================
*/
-/* Function for probing. Just send the slave address
+/* Function for probing. Just send the slave address
* and return true if the device responds. The slave address
* must have the lsb set to reflect a read (1) or write (0) access.
* Don't expect a read- or write-only device will respond otherwise.
@@ -403,7 +403,7 @@ xf86I2CProbeAddress(I2CBusPtr b, I2CSlaveAddr addr)
*
* The functions exits immediately when an error occures,
* not proceeding any data left. However, step 3 will
- * be executed anyway to leave the bus in clean idle state.
+ * be executed anyway to leave the bus in clean idle state.
*/
static Bool
@@ -470,7 +470,7 @@ xf86I2CReadByte(I2CDevPtr d, I2CByte subaddr, I2CByte * pbyte)
return xf86I2CWriteRead(d, &subaddr, 1, pbyte, 1);
}
-/* Read bytes from subsequent registers determined by the
+/* Read bytes from subsequent registers determined by the
* sub-address of the first register.
*/
@@ -480,7 +480,7 @@ xf86I2CReadBytes(I2CDevPtr d, I2CByte subaddr, I2CByte * pbyte, int n)
return xf86I2CWriteRead(d, &subaddr, 1, pbyte, n);
}
-/* Read a word (high byte, then low byte) from one of the registers
+/* Read a word (high byte, then low byte) from one of the registers
* determined by its sub-address.
*/
@@ -511,7 +511,7 @@ xf86I2CWriteByte(I2CDevPtr d, I2CByte subaddr, I2CByte byte)
return xf86I2CWriteRead(d, wb, 2, NULL, 0);
}
-/* Write bytes to subsequent registers determined by the
+/* Write bytes to subsequent registers determined by the
* sub-address of the first register.
*/
@@ -537,7 +537,7 @@ xf86I2CWriteBytes(I2CDevPtr d, I2CByte subaddr,
return r;
}
-/* Write a word (high byte, then low byte) to one of the registers
+/* Write a word (high byte, then low byte) to one of the registers
* determined by its sub-address.
*/
@@ -553,7 +553,7 @@ xf86I2CWriteWord(I2CDevPtr d, I2CByte subaddr, unsigned short word)
return xf86I2CWriteRead(d, wb, 3, NULL, 0);
}
-/* Write a vector of bytes to not adjacent registers. This vector is,
+/* Write a vector of bytes to not adjacent registers. This vector is,
* 1st byte sub-address, 2nd byte value, 3rd byte sub-address asf.
* This function is intended to initialize devices. Note this function
* exits immediately when an error occurs, some registers may
@@ -637,7 +637,7 @@ xf86DestroyI2CDevRec(I2CDevPtr d, Bool unalloc)
/* I2C transmissions are related to an I2CDevRec you must link to a
* previously registered bus (see xf86I2CBusInit) before attempting
* to read and write data. You may call xf86I2CProbeAddress first to
- * see if the device in question is present on this bus.
+ * see if the device in question is present on this bus.
*
* xf86I2CDevInit will not allocate an I2CBusRec for you, instead you
* may enter a pointer to a statically allocated I2CDevRec or the (modified)
@@ -779,9 +779,9 @@ xf86DestroyI2CBusRec(I2CBusPtr b, Bool unalloc, Bool devs_too)
Bool
xf86I2CBusInit(I2CBusPtr b)
{
- /* 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.
+ /* 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.
*/
if (b->BusName == NULL || xf86I2CFindBus(b->scrnIndex, b->BusName) != NULL)
diff --git a/xorg-server/hw/xfree86/i2c/xf86i2c.h b/xorg-server/hw/xfree86/i2c/xf86i2c.h
index 26303ff6f..7b0ccdf70 100644
--- a/xorg-server/hw/xfree86/i2c/xf86i2c.h
+++ b/xorg-server/hw/xfree86/i2c/xf86i2c.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 1998 Itai Nahshon, Michael Schimek
*/
diff --git a/xorg-server/hw/xfree86/loader/loadmod.c b/xorg-server/hw/xfree86/loader/loadmod.c
index 7021bdd4c..fdf5bd8c9 100644
--- a/xorg-server/hw/xfree86/loader/loadmod.c
+++ b/xorg-server/hw/xfree86/loader/loadmod.c
@@ -918,7 +918,7 @@ LoadModule(const char *module, const char *path, const char **subdirlist,
goto LoadModule_fail;
}
- /*
+ /*
* if the module name is not a full pathname, we need to
* check the elements in the path
*/
@@ -938,7 +938,7 @@ LoadModule(const char *module, const char *path, const char **subdirlist,
}
}
- /*
+ /*
* did we find the module?
*/
if (!found) {
diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c
index 87ba0b74e..9d592a7eb 100644
--- a/xorg-server/hw/xfree86/modes/xf86Crtc.c
+++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c
@@ -1072,7 +1072,7 @@ xf86DefaultScreenLimits(ScrnInfoPtr scrn, int *widthp, int *heightp,
#define POSITION_UNSET -100000
/*
- * check if the user configured any outputs at all
+ * check if the user configured any outputs at all
* with either a position or a relative setting or a mode.
*/
static Bool
@@ -1736,7 +1736,7 @@ xf86ProbeOutputModes(ScrnInfoPtr scrn, int maxX, int maxY)
xf86ValidateModesReducedBlanking(scrn, default_modes);
if (sync_source == sync_config) {
- /*
+ /*
* Check output and config modes against sync range from config file
*/
xf86ValidateModesSync(scrn, output_modes, &mon_rec);
diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.h b/xorg-server/hw/xfree86/modes/xf86Crtc.h
index eebe6f472..692bf40b9 100644
--- a/xorg-server/hw/xfree86/modes/xf86Crtc.h
+++ b/xorg-server/hw/xfree86/modes/xf86Crtc.h
@@ -242,7 +242,7 @@ struct _xf86Crtc {
/**
* Desired state of this CRTC
*
- * Set when this CRTC should be driving one or more outputs
+ * Set when this CRTC should be driving one or more outputs
*/
Bool enabled;
@@ -304,7 +304,7 @@ struct _xf86Crtc {
*/
Bool cursor_argb;
/**
- * Track whether cursor is within CRTC range
+ * Track whether cursor is within CRTC range
*/
Bool cursor_in_range;
/**
@@ -608,7 +608,7 @@ struct _xf86Output {
#else
void *randr_output;
#endif
- /**
+ /**
* Desired initial panning
* Added in ABI version 2
*/
@@ -922,7 +922,7 @@ extern _X_EXPORT void
xf86CrtcSetScreenSubpixelOrder(ScreenPtr pScreen);
/*
- * Get a standard string name for a connector type
+ * Get a standard string name for a connector type
*/
extern _X_EXPORT const char *xf86ConnectorGetName(xf86ConnectorType connector);
@@ -947,7 +947,7 @@ extern _X_EXPORT Bool
* Called when anything on the screen is reconfigured.
*
* Reloads cursor images as needed, then adjusts cursor positions.
- *
+ *
* Driver should call this from crtc commit function.
*/
extern _X_EXPORT void
diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.c b/xorg-server/hw/xfree86/modes/xf86RandR12.c
index 8a04dfc2c..b1c306a88 100644
--- a/xorg-server/hw/xfree86/modes/xf86RandR12.c
+++ b/xorg-server/hw/xfree86/modes/xf86RandR12.c
@@ -1072,7 +1072,7 @@ xf86RandR12CrtcNotify(RRCrtcPtr randr_crtc)
randr_output = output->randr_output;
randr_outputs[numOutputs++] = randr_output;
/*
- * We make copies of modes, so pointer equality
+ * We make copies of modes, so pointer equality
* isn't sufficient
*/
for (j = 0; j < randr_output->numModes + randr_output->numUserModes;
@@ -1890,7 +1890,7 @@ xf86RandR14ProviderDestroy(ScreenPtr screen, RRProviderPtr provider)
{
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
-
+
if (config->randr_provider == provider) {
if (config->randr_provider->offload_sink) {
DetachOffloadGPU(screen);
diff --git a/xorg-server/hw/xfree86/modes/xf86cvt.c b/xorg-server/hw/xfree86/modes/xf86cvt.c
index 8b7bb8b03..b6c1bc81c 100644
--- a/xorg-server/hw/xfree86/modes/xf86cvt.c
+++ b/xorg-server/hw/xfree86/modes/xf86cvt.c
@@ -54,7 +54,7 @@
* likely though).
*
* About margins; i'm sure that they are to be the bit between HDisplay and
- * HBlankStart, HBlankEnd and HTotal, VDisplay and VBlankStart, VBlankEnd and
+ * HBlankStart, HBlankEnd and HTotal, VDisplay and VBlankStart, VBlankEnd and
* VTotal, where the overscan colour is shown. FB seems to call _all_ blanking
* outside sync "margin" for some reason. Since we prefer seeing proper
* blanking instead of the overscan colour, and since the Crtc* values will
@@ -154,7 +154,7 @@ xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced,
if (!Reduced) { /* simplified GTF calculation */
- /* 4) Minimum time of vertical sync + back porch interval (µs)
+ /* 4) Minimum time of vertical sync + back porch interval (µs)
* default 550.0 */
#define CVT_MIN_VSYNC_BP 550.0
diff --git a/xorg-server/hw/xfree86/modes/xf86gtf.c b/xorg-server/hw/xfree86/modes/xf86gtf.c
index 0a8078415..17c2f3255 100644
--- a/xorg-server/hw/xfree86/modes/xf86gtf.c
+++ b/xorg-server/hw/xfree86/modes/xf86gtf.c
@@ -5,11 +5,11 @@
*
* Copyright (c) 2001, Andy Ritger aritger@nvidia.com
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* o Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* o Redistributions in binary form must reproduce the above copyright
@@ -50,7 +50,7 @@
* of suitability for any purpose. The sample code contained within
* this standard may be used without restriction.
*
- *
+ *
*
* The GTF EXCEL(TM) SPREADSHEET, a sample (and the definitive)
* implementation of the GTF Timing Standard, is available at:
@@ -147,7 +147,7 @@ xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins)
* by the calculation must be halved, as the computation calculates
* the number of vertical lines per field. In either case, the
* number of lines is rounded to the nearest integer.
- *
+ *
* [V LINES RND] = IF([INT RQD?]="y", ROUND([V LINES]/2,0),
* ROUND([V LINES],0))
*/
@@ -183,7 +183,7 @@ xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins)
margins ? rint(MARGIN_PERCENT / 100.0 * v_lines_rnd) : (0.0);
/* 6. If interlace is required, then set variable [INTERLACE]=0.5:
- *
+ *
* [INTERLACE]=(IF([INT RQD?]="y",0.5,0))
*/
diff --git a/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c b/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c
index 236def6ff..b4038bd2b 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c
@@ -6,19 +6,19 @@
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
- * documentation, and that the names of Rich Murphey and David Wexelblat
- * not be used in advertising or publicity pertaining to distribution of
+ * documentation, and that the names of Rich Murphey and David Wexelblat
+ * not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission. Rich Murphey and
- * David Wexelblat make no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
+ * David Wexelblat make no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
* implied warranty.
*
- * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
- * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
- * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
+ * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
diff --git a/xorg-server/hw/xfree86/os-support/bsd/arm_video.c b/xorg-server/hw/xfree86/os-support/bsd/arm_video.c
index 3a639b8c6..dd1020e33 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/arm_video.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/arm_video.c
@@ -6,19 +6,19 @@
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
- * documentation, and that the names of Rich Murphey and David Wexelblat
- * not be used in advertising or publicity pertaining to distribution of
+ * documentation, and that the names of Rich Murphey and David Wexelblat
+ * not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission. Rich Murphey and
- * David Wexelblat make no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
+ * David Wexelblat make no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
* implied warranty.
*
- * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
- * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
- * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
+ * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
@@ -28,7 +28,7 @@
*
* Copyright 1997
* Digital Equipment Corporation. All rights reserved.
- * This software is furnished under license and may be used and copied only in
+ * This software is furnished under license and may be used and copied only in
* accordance with the following terms and conditions. Subject to these
* conditions, you may download, copy, install, use, modify and distribute
* this software in source and/or binary form. No title or ownership is
@@ -38,7 +38,7 @@
* this copyright notice and list of conditions as they appear in the
* source file.
*
- * 2) No right is granted to use any trade name, trademark, or logo of Digital
+ * 2) No right is granted to use any trade name, trademark, or logo of Digital
* Equipment Corporation. Neither the "Digital Equipment Corporation"
* name nor any trademark or logo of Digital Equipment Corporation may be
* used to endorse or promote products derived from this software without
@@ -50,9 +50,9 @@
* In no event shall DIGITAL be liable for any damages whatsoever, and in
* particular, DIGITAL shall not be liable for special, indirect,
* consequential, or incidental damages or damages for lost profits, loss
- * of revenue or loss of use, whether such damages arise in contract,
+ * of revenue or loss of use, whether such damages arise in contract,
* negligence, tort, under statute, in equity, at law or otherwise, even
- * if advised of the possibility of such damage.
+ * if advised of the possibility of such damage.
*
*/
diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c
index 1b929625e..60a19d79a 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c
@@ -53,7 +53,7 @@ bsdToXF86(int type)
}
/*
- * APM events can be requested direclty from /dev/apm
+ * APM events can be requested direclty from /dev/apm
*/
static int
bsdPMGetEventFromOS(int fd, pmEvent * events, int num)
diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_bell.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_bell.c
index f6643ee62..19d1f4882 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/bsd_bell.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_bell.c
@@ -6,19 +6,19 @@
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
- * documentation, and that the names of Rich Murphey and David Dawes
- * not be used in advertising or publicity pertaining to distribution of
+ * documentation, and that the names of Rich Murphey and David Dawes
+ * not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission. Rich Murphey and
- * David Dawes make no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
+ * David Dawes make no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
* implied warranty.
*
- * RICH MURPHEY AND DAVID DAWES DISCLAIM ALL WARRANTIES WITH REGARD TO
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID DAWES BE LIABLE FOR
- * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
- * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * RICH MURPHEY AND DAVID DAWES DISCLAIM ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID DAWES BE LIABLE FOR
+ * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c
index c9f823321..38dfde11a 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c
@@ -6,19 +6,19 @@
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
- * documentation, and that the names of Rich Murphey and David Wexelblat
- * not be used in advertising or publicity pertaining to distribution of
+ * documentation, and that the names of Rich Murphey and David Wexelblat
+ * not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission. Rich Murphey and
- * David Wexelblat make no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
+ * David Wexelblat make no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
* implied warranty.
*
- * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
- * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
- * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
+ * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
@@ -173,7 +173,7 @@ xf86OpenConsole()
if (!KeepTty) {
/*
* detaching the controlling tty solves problems of kbd character
- * loss. This is not interesting for CO driver, because it is
+ * loss. This is not interesting for CO driver, because it is
* exclusive.
*/
setpgrp(0, getpid());
@@ -631,7 +631,7 @@ int
xf86ProcessArgument(int argc, char *argv[], int i)
{
/*
- * Keep server from detaching from controlling tty. This is useful
+ * Keep server from detaching from controlling tty. This is useful
* when debugging (so the server can receive keyboard signals.
*/
if (!strcmp(argv[i], "-keeptty")) {
diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
index 32ea4892e..1756612b4 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001 The XFree86 Project, Inc. All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -8,10 +8,10 @@
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -19,7 +19,7 @@
* OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the XFree86 Project
* shall not be used in advertising or otherwise to promote the sale, use
* or other dealings in this Software without prior written authorization
@@ -86,7 +86,7 @@ bsdToXF86(int type)
}
/*
- * APM events can be requested direclty from /dev/apm
+ * APM events can be requested direclty from /dev/apm
*/
static int
bsdPMGetEventFromOS(int kq, pmEvent * events, int num)
@@ -113,9 +113,9 @@ bsdPMGetEventFromOS(int kq, pmEvent * events, int num)
/*
* If apmd(8) is running, he will get the events and handle them,
- * so, we've nothing to do here.
- * Otherwise, opening /dev/apmctl will succeed and we have to send the
- * confirmations to /dev/apmctl.
+ * so, we've nothing to do here.
+ * Otherwise, opening /dev/apmctl will succeed and we have to send the
+ * confirmations to /dev/apmctl.
*/
static pmWait
bsdPMConfirmEventToOs(int dummyfd, pmEvent event)
diff --git a/xorg-server/hw/xfree86/os-support/bsd/i386_video.c b/xorg-server/hw/xfree86/os-support/bsd/i386_video.c
index 6c3bbcb48..a38a7de27 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/i386_video.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/i386_video.c
@@ -6,19 +6,19 @@
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
- * documentation, and that the names of Rich Murphey and David Wexelblat
- * not be used in advertising or publicity pertaining to distribution of
+ * documentation, and that the names of Rich Murphey and David Wexelblat
+ * not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission. Rich Murphey and
- * David Wexelblat make no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
+ * David Wexelblat make no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
* implied warranty.
*
- * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
- * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
- * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
+ * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
@@ -238,7 +238,7 @@ xf86DisableIO()
if (amd64_iopl(FALSE) == 0) {
ExtendedEnabled = FALSE;
}
- /* Otherwise, the X server has revoqued its root uid,
+ /* Otherwise, the X server has revoqued its root uid,
and thus cannot give up IO privileges any more */
return;
diff --git a/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c b/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c
index b1cf7eb1b..5a58da19d 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c
@@ -6,19 +6,19 @@
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
- * documentation, and that the names of Rich Murphey and David Wexelblat
- * not be used in advertising or publicity pertaining to distribution of
+ * documentation, and that the names of Rich Murphey and David Wexelblat
+ * not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission. Rich Murphey and
- * David Wexelblat make no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
+ * David Wexelblat make no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
* implied warranty.
*
- * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
- * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
- * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
+ * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
diff --git a/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c b/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c
index 5bed01790..3f8cccd19 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c
@@ -6,19 +6,19 @@
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
- * documentation, and that the names of Rich Murphey and David Wexelblat
- * not be used in advertising or publicity pertaining to distribution of
+ * documentation, and that the names of Rich Murphey and David Wexelblat
+ * not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission. Rich Murphey and
- * David Wexelblat make no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
+ * David Wexelblat make no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
* implied warranty.
*
- * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
- * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
- * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
+ * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
diff --git a/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c b/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c
index 2a96393b0..ac24f1950 100644
--- a/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c
+++ b/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c
@@ -40,11 +40,11 @@
#include "xf86OSpriv.h"
/**************************************************************************
- * Video Memory Mapping section
+ * Video Memory Mapping section
***************************************************************************/
/**************************************************************************
- * I/O Permissions section
+ * I/O Permissions section
***************************************************************************/
/*
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_agp.c b/xorg-server/hw/xfree86/os-support/linux/lnx_agp.c
index e1fa3f8a7..2a28c6af8 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_agp.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_agp.c
@@ -92,8 +92,8 @@ GARTInit(int screenNum)
xf86ReleaseGART(-1);
#if defined(linux)
- /* Per Dave Jones, every effort will be made to keep the
- * agpgart interface backwards compatible, so allow all
+ /* Per Dave Jones, every effort will be made to keep the
+ * agpgart interface backwards compatible, so allow all
* future versions.
*/
if (
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c b/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c
index f5917eefb..6d1222655 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c
@@ -69,7 +69,7 @@ xf86LoadKernelModule(const char *modName)
switch (pid = fork()) {
case 0: /* child */
/* change real/effective user ID to 0/0 as we need to
- * preinstall agpgart module for some DRM modules
+ * preinstall agpgart module for some DRM modules
*/
if (setreuid(0, 0)) {
xf86Msg(X_WARNING, "LoadKernelModule: "
diff --git a/xorg-server/hw/xfree86/os-support/linux/systemd-logind.c b/xorg-server/hw/xfree86/os-support/linux/systemd-logind.c
index 73a8d55bf..49758f465 100644
--- a/xorg-server/hw/xfree86/os-support/linux/systemd-logind.c
+++ b/xorg-server/hw/xfree86/os-support/linux/systemd-logind.c
@@ -387,7 +387,7 @@ message_filter(DBusConnection * connection, DBusMessage * message, void *data)
LogMessage(X_INFO, "systemd-logind: got %s for %u:%u\n",
pause ? "pause" : "resume", major, minor);
- pdev = xf86_find_platform_device_by_devnum(major, minor);
+ pdev = xf86_find_platform_device_by_devnum(major, minor);
if (!pdev)
pInfo = systemd_logind_find_info_ptr_by_devnum(xf86InputDevs,
major, minor);
diff --git a/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c b/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c
index 254748ff6..4f4881ce2 100644
--- a/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c
+++ b/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c
@@ -2,14 +2,14 @@
for Alpha Linux
*******************************************************************************/
-/*
+/*
* Create a dependency that should be immune from the effect of register
* renaming as is commonly seen in superscalar processors. This should
* insert a minimum of 100-ns delays between reads/writes at clock rates
* up to 100 MHz---GGL
- *
- * Slowbcopy(char *src, char *dst, int count)
- *
+ *
+ * Slowbcopy(char *src, char *dst, int count)
+ *
*/
#ifdef HAVE_XORG_CONFIG_H
diff --git a/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c b/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c
index eeacee9cc..de5fb9ba4 100644
--- a/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c
+++ b/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c
@@ -22,7 +22,7 @@
*/
/*
- * Some platforms don't bother with I/O permissions,
+ * Some platforms don't bother with I/O permissions,
* or the permissions are implicit with opening/enabling the console.
*/
diff --git a/xorg-server/hw/xfree86/os-support/shared/sigio.c b/xorg-server/hw/xfree86/os-support/shared/sigio.c
index f3c153b89..45949f7a3 100644
--- a/xorg-server/hw/xfree86/os-support/shared/sigio.c
+++ b/xorg-server/hw/xfree86/os-support/shared/sigio.c
@@ -10,11 +10,11 @@
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -22,7 +22,7 @@
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
- *
+ *
* Authors: Rickard E. (Rik) Faith <faith@valinux.com>
*/
/*
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c b/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c
index 38fa5ecf2..4d4dbc105 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c
+++ b/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c
@@ -129,7 +129,7 @@ sunToXF86(int type)
}
/*
- * APM events can be requested direclty from /dev/apm
+ * APM events can be requested direclty from /dev/apm
*/
static int
sunPMGetEventFromOS(int fd, pmEvent * events, int num)
diff --git a/xorg-server/hw/xfree86/os-support/xf86_OSlib.h b/xorg-server/hw/xfree86/os-support/xf86_OSlib.h
index 9120bd7dc..3a83f348f 100644
--- a/xorg-server/hw/xfree86/os-support/xf86_OSlib.h
+++ b/xorg-server/hw/xfree86/os-support/xf86_OSlib.h
@@ -15,19 +15,19 @@
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
- * documentation, and that the names of the above listed copyright holders
- * not be used in advertising or publicity pertaining to distribution of
+ * documentation, and that the names of the above listed copyright holders
+ * not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission. The above listed
- * copyright holders make no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
+ * copyright holders make no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
* implied warranty.
*
- * THE ABOVE LISTED COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD
- * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDERS BE
- * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
- * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * THE ABOVE LISTED COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+ * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
@@ -37,7 +37,7 @@
*
* Copyright 1997
* Digital Equipment Corporation. All rights reserved.
- * This software is furnished under license and may be used and copied only in
+ * This software is furnished under license and may be used and copied only in
* accordance with the following terms and conditions. Subject to these
* conditions, you may download, copy, install, use, modify and distribute
* this software in source and/or binary form. No title or ownership is
@@ -47,7 +47,7 @@
* this copyright notice and list of conditions as they appear in the
* source file.
*
- * 2) No right is granted to use any trade name, trademark, or logo of Digital
+ * 2) No right is granted to use any trade name, trademark, or logo of Digital
* Equipment Corporation. Neither the "Digital Equipment Corporation"
* name nor any trademark or logo of Digital Equipment Corporation may be
* used to endorse or promote products derived from this software without
@@ -59,9 +59,9 @@
* In no event shall DIGITAL be liable for any damages whatsoever, and in
* particular, DIGITAL shall not be liable for special, indirect,
* consequential, or incidental damages or damages for lost profits, loss
- * of revenue or loss of use, whether such damages arise in contract,
+ * of revenue or loss of use, whether such damages arise in contract,
* negligence, tort, under statute, in equity, at law or otherwise, even
- * if advised of the possibility of such damage.
+ * if advised of the possibility of such damage.
*
*/
@@ -331,7 +331,7 @@ struct pcvtid {
/* For PATH_MAX */
#include "misc.h"
-/*
+/*
* Hack originally for ISC 2.2 POSIX headers, but may apply elsewhere,
* and it's safe, so just do it.
*/
diff --git a/xorg-server/hw/xfree86/os-support/xf86_OSproc.h b/xorg-server/hw/xfree86/os-support/xf86_OSproc.h
index 822bab2ca..fa3ff0ee3 100644
--- a/xorg-server/hw/xfree86/os-support/xf86_OSproc.h
+++ b/xorg-server/hw/xfree86/os-support/xf86_OSproc.h
@@ -14,19 +14,19 @@
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
- * documentation, and that the names of the above listed copyright holders
- * not be used in advertising or publicity pertaining to distribution of
+ * documentation, and that the names of the above listed copyright holders
+ * not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission. The above listed
- * copyright holders make no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
+ * copyright holders make no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
* implied warranty.
*
- * THE ABOVE LISTED COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD
- * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDERS BE
- * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
- * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * THE ABOVE LISTED COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD
+ * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+ * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
@@ -36,7 +36,7 @@
*
* Copyright 1997
* Digital Equipment Corporation. All rights reserved.
- * This software is furnished under license and may be used and copied only in
+ * This software is furnished under license and may be used and copied only in
* accordance with the following terms and conditions. Subject to these
* conditions, you may download, copy, install, use, modify and distribute
* this software in source and/or binary form. No title or ownership is
@@ -46,7 +46,7 @@
* this copyright notice and list of conditions as they appear in the
* source file.
*
- * 2) No right is granted to use any trade name, trademark, or logo of Digital
+ * 2) No right is granted to use any trade name, trademark, or logo of Digital
* Equipment Corporation. Neither the "Digital Equipment Corporation"
* name nor any trademark or logo of Digital Equipment Corporation may be
* used to endorse or promote products derived from this software without
@@ -58,9 +58,9 @@
* In no event shall DIGITAL be liable for any damages whatsoever, and in
* particular, DIGITAL shall not be liable for special, indirect,
* consequential, or incidental damages or damages for lost profits, loss
- * of revenue or loss of use, whether such damages arise in contract,
+ * of revenue or loss of use, whether such damages arise in contract,
* negligence, tort, under statute, in equity, at law or otherwise, even
- * if advised of the possibility of such damage.
+ * if advised of the possibility of such damage.
*
*/
diff --git a/xorg-server/hw/xfree86/parser/Configint.h b/xorg-server/hw/xfree86/parser/Configint.h
index e85322006..31035ae2d 100644
--- a/xorg-server/hw/xfree86/parser/Configint.h
+++ b/xorg-server/hw/xfree86/parser/Configint.h
@@ -1,17 +1,17 @@
/*
- *
+ *
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -19,11 +19,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2002 by The XFree86 Project, Inc.
@@ -52,7 +52,7 @@
* authorization from the copyright holder(s) and author(s).
*/
-/*
+/*
* These definitions are used through out the configuration file parser, but
* they should not be visible outside of the parser.
*/
@@ -122,7 +122,7 @@ else\
xf86parseError (__VA_ARGS__); CLEANUP (ptr); return NULL; \
} while (0)
-/*
+/*
* These are defines for error messages to promote consistency.
* error messages are preceded by the line number, section and file name,
* so these messages should be about the specific keyword and syntax in error.
diff --git a/xorg-server/hw/xfree86/parser/DRI.c b/xorg-server/hw/xfree86/parser/DRI.c
index 6be32d7ea..9ed5b9ea9 100644
--- a/xorg-server/hw/xfree86/parser/DRI.c
+++ b/xorg-server/hw/xfree86/parser/DRI.c
@@ -11,11 +11,11 @@
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -23,8 +23,8 @@
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
- *
- *
+ *
+ *
*/
#ifdef HAVE_XORG_CONFIG_H
diff --git a/xorg-server/hw/xfree86/parser/Device.c b/xorg-server/hw/xfree86/parser/Device.c
index 28c274d72..7e49843bd 100644
--- a/xorg-server/hw/xfree86/parser/Device.c
+++ b/xorg-server/hw/xfree86/parser/Device.c
@@ -1,17 +1,17 @@
-/*
- *
+/*
+ *
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -19,11 +19,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
diff --git a/xorg-server/hw/xfree86/parser/Files.c b/xorg-server/hw/xfree86/parser/Files.c
index 24940a9c2..849bf92bb 100644
--- a/xorg-server/hw/xfree86/parser/Files.c
+++ b/xorg-server/hw/xfree86/parser/Files.c
@@ -1,16 +1,16 @@
-/*
+/*
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -18,11 +18,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
diff --git a/xorg-server/hw/xfree86/parser/Flags.c b/xorg-server/hw/xfree86/parser/Flags.c
index 71b50acf7..516966508 100644
--- a/xorg-server/hw/xfree86/parser/Flags.c
+++ b/xorg-server/hw/xfree86/parser/Flags.c
@@ -1,16 +1,16 @@
-/*
+/*
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -18,11 +18,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
@@ -100,7 +100,7 @@ xf86parseFlagsSection(void)
case COMMENT:
ptr->flg_comment = xf86addComment(ptr->flg_comment, xf86_lex_val.str);
break;
- /*
+ /*
* these old keywords are turned into standard generic options.
* we fall through here on purpose
*/
diff --git a/xorg-server/hw/xfree86/parser/Input.c b/xorg-server/hw/xfree86/parser/Input.c
index 1bfe5c100..cfacd4eee 100644
--- a/xorg-server/hw/xfree86/parser/Input.c
+++ b/xorg-server/hw/xfree86/parser/Input.c
@@ -1,17 +1,17 @@
-/*
- *
+/*
+ *
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -19,11 +19,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
diff --git a/xorg-server/hw/xfree86/parser/Layout.c b/xorg-server/hw/xfree86/parser/Layout.c
index 994b31ae4..0ace5da4a 100644
--- a/xorg-server/hw/xfree86/parser/Layout.c
+++ b/xorg-server/hw/xfree86/parser/Layout.c
@@ -1,17 +1,17 @@
-/*
- *
+/*
+ *
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -19,11 +19,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
diff --git a/xorg-server/hw/xfree86/parser/Module.c b/xorg-server/hw/xfree86/parser/Module.c
index e2d9120cb..0dcf4bac4 100644
--- a/xorg-server/hw/xfree86/parser/Module.c
+++ b/xorg-server/hw/xfree86/parser/Module.c
@@ -1,17 +1,17 @@
-/*
- *
+/*
+ *
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -19,11 +19,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
diff --git a/xorg-server/hw/xfree86/parser/Monitor.c b/xorg-server/hw/xfree86/parser/Monitor.c
index 8aebce079..0a8c08178 100644
--- a/xorg-server/hw/xfree86/parser/Monitor.c
+++ b/xorg-server/hw/xfree86/parser/Monitor.c
@@ -1,17 +1,17 @@
-/*
- *
+/*
+ *
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -19,11 +19,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
@@ -553,7 +553,7 @@ xf86parseMonitorSection(void)
if ((token = xf86getSubToken(&(ptr->mon_comment))) != STRING)
Error(QUOTE_MSG, "UseModes");
- /* add to the end of the list of modes sections
+ /* add to the end of the list of modes sections
referenced here */
mptr = calloc(1, sizeof(XF86ConfModesLinkRec));
mptr->list.next = NULL;
diff --git a/xorg-server/hw/xfree86/parser/Pointer.c b/xorg-server/hw/xfree86/parser/Pointer.c
index fe60d95aa..2f9d505ff 100644
--- a/xorg-server/hw/xfree86/parser/Pointer.c
+++ b/xorg-server/hw/xfree86/parser/Pointer.c
@@ -1,17 +1,17 @@
-/*
- *
+/*
+ *
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -19,11 +19,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
diff --git a/xorg-server/hw/xfree86/parser/Screen.c b/xorg-server/hw/xfree86/parser/Screen.c
index 0e9746ae5..9d8eda277 100644
--- a/xorg-server/hw/xfree86/parser/Screen.c
+++ b/xorg-server/hw/xfree86/parser/Screen.c
@@ -1,17 +1,17 @@
-/*
- *
+/*
+ *
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -19,11 +19,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
diff --git a/xorg-server/hw/xfree86/parser/Vendor.c b/xorg-server/hw/xfree86/parser/Vendor.c
index 2c870ae7f..4f6e510bb 100644
--- a/xorg-server/hw/xfree86/parser/Vendor.c
+++ b/xorg-server/hw/xfree86/parser/Vendor.c
@@ -1,17 +1,17 @@
-/*
- *
+/*
+ *
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -19,11 +19,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
diff --git a/xorg-server/hw/xfree86/parser/Video.c b/xorg-server/hw/xfree86/parser/Video.c
index 93209c499..666b0ab9a 100644
--- a/xorg-server/hw/xfree86/parser/Video.c
+++ b/xorg-server/hw/xfree86/parser/Video.c
@@ -1,17 +1,17 @@
-/*
- *
+/*
+ *
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -19,11 +19,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
diff --git a/xorg-server/hw/xfree86/parser/read.c b/xorg-server/hw/xfree86/parser/read.c
index 22f6e6af4..327c02a4d 100644
--- a/xorg-server/hw/xfree86/parser/read.c
+++ b/xorg-server/hw/xfree86/parser/read.c
@@ -1,17 +1,17 @@
-/*
- *
+/*
+ *
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -19,11 +19,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
@@ -68,7 +68,7 @@ static xf86ConfigSymTabRec TopLevelTab[] = {
#define CLEANUP xf86freeConfig
-/*
+/*
* This function resolves name references and reports errors if the named
* objects cannot be found.
*/
@@ -221,7 +221,7 @@ xf86readConfigFile(void)
#undef CLEANUP
-/*
+/*
* adds an item to the end of the linked list. Any record whose first field
* is a GenericListRec can be cast to this type and used with this function.
* A pointer to the head of the list is returned to handle the addition of
@@ -246,7 +246,7 @@ xf86addListItem(GenericListPtr head, GenericListPtr new)
return new;
}
-/*
+/*
* Test if one chained list contains the other.
* In this case both list have the same endpoint (provided they don't loop)
*/
diff --git a/xorg-server/hw/xfree86/parser/scan.c b/xorg-server/hw/xfree86/parser/scan.c
index a6c12957b..b8a08cf5d 100644
--- a/xorg-server/hw/xfree86/parser/scan.c
+++ b/xorg-server/hw/xfree86/parser/scan.c
@@ -1,16 +1,16 @@
-/*
+/*
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -18,11 +18,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
@@ -241,7 +241,7 @@ xf86getNextLine(void)
return ret;
}
-/*
+/*
* xf86getToken --
* Read next Token from the config file. Handle the global variable
* pushToken.
@@ -251,7 +251,7 @@ xf86getToken(xf86ConfigSymTabRec * tab)
{
int c, i;
- /*
+ /*
* First check whether pushToken has a different value than LOCK_TOKEN.
* In this case rBuf[] contains a valid STRING/TOKEN/NUMBER. But in the
* oth * case the next token must be read from the input.
@@ -266,9 +266,9 @@ xf86getToken(xf86ConfigSymTabRec * tab)
c = configBuf[configPos];
- /*
+ /*
* Get start of next Token. EOF is handled,
- * whitespaces are skipped.
+ * whitespaces are skipped.
*/
again:
@@ -344,7 +344,7 @@ xf86getToken(xf86ConfigSymTabRec * tab)
return DASH;
}
- /*
+ /*
* Numbers are returned immediately ...
*/
if (isdigit(c)) {
@@ -379,7 +379,7 @@ xf86getToken(xf86ConfigSymTabRec * tab)
return NUMBER;
}
- /*
+ /*
* All Strings START with a \" ...
*/
else if (c == '\"') {
@@ -394,7 +394,7 @@ xf86getToken(xf86ConfigSymTabRec * tab)
return STRING;
}
- /*
+ /*
* ... and now we MUST have a valid token. The search is
* handled later along with the pushed tokens.
*/
@@ -414,7 +414,7 @@ xf86getToken(xf86ConfigSymTabRec * tab)
}
else {
- /*
+ /*
* Here we deal with pushed tokens. Reinitialize pushToken again. If
* the pushed token was NUMBER || STRING return them again ...
*/
@@ -428,7 +428,7 @@ xf86getToken(xf86ConfigSymTabRec * tab)
return temp;
}
- /*
+ /*
* Joop, at last we have to lookup the token ...
*/
if (tab) {
@@ -1018,7 +1018,7 @@ xf86setSection(const char *section)
configSection = strdup(section);
}
-/*
+/*
* xf86getToken --
* Lookup a string if it is actually a token in disguise.
*/
@@ -1040,7 +1040,7 @@ StringToToken(const char *str, xf86ConfigSymTabRec * tab)
return ERROR_TOKEN;
}
-/*
+/*
* Compare two names. The characters '_', ' ', and '\t' are ignored
* in the comparison.
*/
diff --git a/xorg-server/hw/xfree86/parser/write.c b/xorg-server/hw/xfree86/parser/write.c
index 472b27ba1..8792783ef 100644
--- a/xorg-server/hw/xfree86/parser/write.c
+++ b/xorg-server/hw/xfree86/parser/write.c
@@ -1,16 +1,16 @@
-/*
+/*
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -18,11 +18,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
diff --git a/xorg-server/hw/xfree86/parser/xf86Optrec.h b/xorg-server/hw/xfree86/parser/xf86Optrec.h
index ea0cb1329..dfa907989 100644
--- a/xorg-server/hw/xfree86/parser/xf86Optrec.h
+++ b/xorg-server/hw/xfree86/parser/xf86Optrec.h
@@ -1,17 +1,17 @@
-/*
- *
+/*
+ *
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -19,11 +19,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2001 by The XFree86 Project, Inc.
@@ -52,7 +52,7 @@
* authorization from the copyright holder(s) and author(s).
*/
-/*
+/*
* This file contains the Option Record that is passed between the Parser,
* and Module setup procs.
*/
diff --git a/xorg-server/hw/xfree86/parser/xf86Parser.h b/xorg-server/hw/xfree86/parser/xf86Parser.h
index 73187f33a..43e17550c 100644
--- a/xorg-server/hw/xfree86/parser/xf86Parser.h
+++ b/xorg-server/hw/xfree86/parser/xf86Parser.h
@@ -1,17 +1,17 @@
-/*
- *
+/*
+ *
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -19,11 +19,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
@@ -52,7 +52,7 @@
* authorization from the copyright holder(s) and author(s).
*/
-/*
+/*
* This file contains the external interfaces for the XFree86 configuration
* file parser.
*/
diff --git a/xorg-server/hw/xfree86/parser/xf86tokens.h b/xorg-server/hw/xfree86/parser/xf86tokens.h
index 8e15f122a..9c44970ea 100644
--- a/xorg-server/hw/xfree86/parser/xf86tokens.h
+++ b/xorg-server/hw/xfree86/parser/xf86tokens.h
@@ -1,17 +1,17 @@
-/*
- *
+/*
+ *
* Copyright (c) 1997 Metro Link Incorporated
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
+ * copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -19,11 +19,11 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of the Metro Link shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Metro Link.
- *
+ *
*/
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
@@ -62,7 +62,7 @@
/* Undefine symbols that some OSs might define */
#undef IOBASE
-/*
+/*
* Each token should have a unique value regardless of the section
* it is used in.
*/
diff --git a/xorg-server/hw/xfree86/ramdac/IBM.c b/xorg-server/hw/xfree86/ramdac/IBM.c
index 45876cfb7..6822be5f1 100644
--- a/xorg-server/hw/xfree86/ramdac/IBM.c
+++ b/xorg-server/hw/xfree86/ramdac/IBM.c
@@ -576,7 +576,7 @@ IBMramdac526LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src)
RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
int i;
- /*
+ /*
* Output the cursor data. The realize function has put the planes into
* their correct order, so we can just blast this out.
*/
@@ -591,7 +591,7 @@ IBMramdac640LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src)
RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
int i;
- /*
+ /*
* Output the cursor data. The realize function has put the planes into
* their correct order, so we can just blast this out.
*/
diff --git a/xorg-server/hw/xfree86/ramdac/TI.c b/xorg-server/hw/xfree86/ramdac/TI.c
index 2492bb531..f8081caea 100644
--- a/xorg-server/hw/xfree86/ramdac/TI.c
+++ b/xorg-server/hw/xfree86/ramdac/TI.c
@@ -21,7 +21,7 @@
*
* Authors: Alan Hourihane, <alanh@fairlite.demon.co.uk>
*
- * Modified from IBM.c to support TI RAMDAC routines
+ * Modified from IBM.c to support TI RAMDAC routines
* by Jens Owen, <jens@tungstengraphics.com>.
*/
diff --git a/xorg-server/hw/xfree86/ramdac/xf86Cursor.c b/xorg-server/hw/xfree86/ramdac/xf86Cursor.c
index fac682210..04496d531 100644
--- a/xorg-server/hw/xfree86/ramdac/xf86Cursor.c
+++ b/xorg-server/hw/xfree86/ramdac/xf86Cursor.c
@@ -332,8 +332,10 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs,
ScreenPriv->HotX = cursor->bits->xhot;
ScreenPriv->HotY = cursor->bits->yhot;
- if (!infoPtr->pScrn->vtSema)
+ if (!infoPtr->pScrn->vtSema) {
ScreenPriv->SavedCursor = cursor;
+ return;
+ }
if (infoPtr->pScrn->vtSema && xorg_list_is_empty(&pScreen->pixmap_dirty_list) &&
(ScreenPriv->ForceHWCursorCount ||
@@ -347,7 +349,7 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs,
(cursor->bits->height <= infoPtr->MaxHeight) &&
(cursor->bits->width <= infoPtr->MaxWidth) &&
(!infoPtr->UseHWCursor || (*infoPtr->UseHWCursor) (pScreen, cursor)))))) {
-
+
if (ScreenPriv->SWCursor) /* remove the SW cursor */
(*ScreenPriv->spriteFuncs->SetCursor) (pDev, pScreen,
NullCursor, x, y);
diff --git a/xorg-server/hw/xfree86/ramdac/xf86HWCurs.c b/xorg-server/hw/xfree86/ramdac/xf86HWCurs.c
index 953c86abc..be7154e0f 100644
--- a/xorg-server/hw/xfree86/ramdac/xf86HWCurs.c
+++ b/xorg-server/hw/xfree86/ramdac/xf86HWCurs.c
@@ -214,7 +214,7 @@ xf86RecolorCursor(ScreenPtr pScreen, CursorPtr pCurs, Bool displayed)
xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr;
#ifdef ARGB_CURSOR
- /* recoloring isn't applicable to ARGB cursors and drivers
+ /* recoloring isn't applicable to ARGB cursors and drivers
shouldn't have to ignore SetCursorColors requests */
if (pCurs->bits->argb)
return;
diff --git a/xorg-server/hw/xfree86/ramdac/xf86RamDac.h b/xorg-server/hw/xfree86/ramdac/xf86RamDac.h
index 50a659a22..af16b7faa 100644
--- a/xorg-server/hw/xfree86/ramdac/xf86RamDac.h
+++ b/xorg-server/hw/xfree86/ramdac/xf86RamDac.h
@@ -12,8 +12,8 @@
typedef struct _RamDacRegRec {
/* This is probably the nastiest assumption, we allocate 1024 slots for
- * ramdac registers, should be enough. I've checked IBM and TVP series
- * and they seem o.k
+ * ramdac registers, should be enough. I've checked IBM and TVP series
+ * and they seem o.k
* Then we allocate 768 entries for the DAC too. IBM640 needs 1024 -FIXME
*/
unsigned short DacRegs[0x400]; /* register set */
diff --git a/xorg-server/hw/xfree86/sdksyms.sh b/xorg-server/hw/xfree86/sdksyms.sh
index d9a44788c..2305073a0 100644
--- a/xorg-server/hw/xfree86/sdksyms.sh
+++ b/xorg-server/hw/xfree86/sdksyms.sh
@@ -216,10 +216,7 @@ cat > sdksyms.c << EOF
#include "mizerarc.h"
#include "micoord.h"
#include "mifillarc.h"
-#include "mispans.h"
-#include "miwideline.h"
#include "mistruct.h"
-#include "mifpoly.h"
#include "mioverlay.h"
diff --git a/xorg-server/hw/xfree86/shadowfb/shadowfb.h b/xorg-server/hw/xfree86/shadowfb/shadowfb.h
index bcf59f9b2..b3dd44872 100644
--- a/xorg-server/hw/xfree86/shadowfb/shadowfb.h
+++ b/xorg-server/hw/xfree86/shadowfb/shadowfb.h
@@ -26,7 +26,7 @@ extern _X_EXPORT Bool
* ShadowFBInit2 is a more featureful refinement of the original shadowfb.
* ShadowFBInit2 allows you to specify two callbacks, one to be called
* immediately before an operation that modifies the framebuffer, and another
- * to be called immediately after.
+ * to be called immediately after.
*
* Returns FALSE in the event of an error
*/
diff --git a/xorg-server/hw/xfree86/utils/gtf/gtf.c b/xorg-server/hw/xfree86/utils/gtf/gtf.c
index 15503bb35..e88387df0 100644
--- a/xorg-server/hw/xfree86/utils/gtf/gtf.c
+++ b/xorg-server/hw/xfree86/utils/gtf/gtf.c
@@ -4,11 +4,11 @@
*
* Copyright (c) 2001, Andy Ritger aritger@nvidia.com
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* o Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* o Redistributions in binary form must reproduce the above copyright
@@ -33,7 +33,7 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- *
+ *
*
* This program is based on the Generalized Timing Formula(GTF TM)
* Standard Version: 1.0, Revision: 1.0
@@ -52,7 +52,7 @@
* of suitability for any purpose. The sample code contained within
* this standard may be used without restriction.
*
- *
+ *
*
* The GTF EXCEL(TM) SPREADSHEET, a sample (and the definitive)
* implementation of the GTF Timing Standard, is available at:
@@ -77,12 +77,12 @@
* any experience with this, and 2) neither XServer modelines nor
* fbset fb.modes provide an obvious way for margin timings to be
* included in their mode descriptions (needs more investigation).
- *
+ *
* The GTF provides for computation of interlaced mode timings;
* I've implemented the computations but not enabled them, yet.
* I should probably enable and test this at some point.
*
- *
+ *
*
* TODO:
*
@@ -95,7 +95,7 @@
* o It would be nice if this were more general purpose to do things
* outside the scope of the GTF: like generate double scan mode
* timings, for example.
- *
+ *
* o Printing digits to the right of the decimal point when the
* digits are 0 annoys me.
*
@@ -191,7 +191,7 @@ print_xf86_mode(mode * m)
* to the portion of the hblank before and after the sync pulse
* by conceptually wrapping the portion of the blank after the pulse
* to infront of the visible region; ie:
- *
+ *
*
* Timing description I'm accustomed to:
*
@@ -202,7 +202,7 @@ print_xf86_mode(mode * m)
* |-------------------|_______| |_______
*
* R SS SE FL
- *
+ *
* 1: visible image
* 2: blank before sync (aka front porch)
* 3: sync pulse
@@ -216,10 +216,10 @@ print_xf86_mode(mode * m)
* But the fb.modes format is:
*
*
- * <--4--> <--------1--------> <--2--> <--3-->
+ * <--4--> <--------1--------> <--2--> <--3-->
* _________
* _______|-------------------|_______| |
- *
+ *
* The fb.modes(8) manpage refers to <4> and <2> as the left and
* right "margin" (as well as upper and lower margin in the vertical
* direction) -- note that this has nothing to do with the term
@@ -312,7 +312,7 @@ vert_refresh(int h_pixels, int v_lines, float freq, int interlaced, int margins)
* by the calculation must be halved, as the computation calculates
* the number of vertical lines per field. In either case, the
* number of lines is rounded to the nearest integer.
- *
+ *
* [V LINES RND] = IF([INT RQD?]="y", ROUND([V LINES]/2,0),
* ROUND([V LINES],0))
*/
@@ -356,7 +356,7 @@ vert_refresh(int h_pixels, int v_lines, float freq, int interlaced, int margins)
print_value(5, "[BOT MARGIN (LINES)]", bottom_margin);
/* 6. If interlace is required, then set variable [INTERLACE]=0.5:
- *
+ *
* [INTERLACE]=(IF([INT RQD?]="y",0.5,0))
*/
diff --git a/xorg-server/hw/xfree86/vbe/vbe.c b/xorg-server/hw/xfree86/vbe/vbe.c
index d41e61ba8..5ea019733 100644
--- a/xorg-server/hw/xfree86/vbe/vbe.c
+++ b/xorg-server/hw/xfree86/vbe/vbe.c
@@ -3,10 +3,10 @@
* XFree86 vbe module
* Copyright 2000 Egbert Eich
*
- * The mode query/save/set/restore functions from the vesa driver
+ * The mode query/save/set/restore functions from the vesa driver
* have been moved here.
* Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com)
- * Authors: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
+ * Authors: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
*/
#ifdef HAVE_XORG_CONFIG_H
diff --git a/xorg-server/hw/xfree86/vbe/vbe.h b/xorg-server/hw/xfree86/vbe/vbe.h
index bc3653334..c8fb4e48f 100644
--- a/xorg-server/hw/xfree86/vbe/vbe.h
+++ b/xorg-server/hw/xfree86/vbe/vbe.h
@@ -3,10 +3,10 @@
* XFree86 vbe module
* Copyright 2000 Egbert Eich
*
- * The mode query/save/set/restore functions from the vesa driver
+ * The mode query/save/set/restore functions from the vesa driver
* have been moved here.
* Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com)
- * Authors: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
+ * Authors: Paulo César Pereira de Andrade <pcpa@conectiva.com.br>
*/
#ifndef _VBE_H
diff --git a/xorg-server/hw/xfree86/vgahw/vgaHW.c b/xorg-server/hw/xfree86/vgahw/vgaHW.c
index a64f4f85d..7223fc031 100644
--- a/xorg-server/hw/xfree86/vgahw/vgaHW.c
+++ b/xorg-server/hw/xfree86/vgahw/vgaHW.c
@@ -1109,7 +1109,7 @@ vgaHWSaveColormap(ScrnInfoPtr scrninfp, vgaRegPtr save)
hwp->writeDacData(hwp, save->DAC[i]);
if (readError) {
- /*
+ /*
* save the default lookup table
*/
memmove(save->DAC, defaultDAC, 768);
@@ -1184,7 +1184,7 @@ vgaHWInit(ScrnInfoPtr scrninfp, DisplayModePtr mode)
regp = &hwp->ModeReg;
/*
- * compute correct Hsync & Vsync polarity
+ * compute correct Hsync & Vsync polarity
*/
if ((mode->Flags & (V_PHSYNC | V_NHSYNC))
&& (mode->Flags & (V_PVSYNC | V_NVSYNC))) {
@@ -1439,7 +1439,7 @@ vgaHWVBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits,
CARD32 nExtBits = (nBits < 8) ? 0 : (nBits - 8);
CARD32 ExtBitMask = ((1 << nExtBits) - 1) << 8;
- /* If width is not known nBits should be 0. In this
+ /* If width is not known nBits should be 0. In this
* case BitMask is set to 0 so we can check for it. */
CARD32 BitMask = (nBits < 7) ? 0 : ((1 << nExtBits) - 1);
int VBlankStart = (mode->CrtcVBlankStart - 1) & 0xFF;
@@ -1885,7 +1885,7 @@ vgaHWHandleColormaps(ScreenPtr pScreen)
}
/* ----------------------- DDC support ------------------------*/
-/*
+/*
* Adjust v_active, v_blank, v_sync, v_sync_end, v_blank_end, v_total
* to read out EDID at a faster rate. Allowed maximum is 25kHz with
* 20 usec v_sync active. Set positive v_sync polarity, turn off lightpen
diff --git a/xorg-server/hw/xfree86/vgahw/vgaHW.h b/xorg-server/hw/xfree86/vgahw/vgaHW.h
index 63a10f42b..b979b85a6 100644
--- a/xorg-server/hw/xfree86/vgahw/vgaHW.h
+++ b/xorg-server/hw/xfree86/vgahw/vgaHW.h
@@ -116,7 +116,7 @@ typedef struct _vgaHWRec {
= mmioreg */
void *FontInfo1; /* save area for fonts in
plane 2 */
- void *FontInfo2; /* save area for fonts in
+ void *FontInfo2; /* save area for fonts in
plane 3 */
void *TextInfo; /* save area for text */
vgaRegRec SavedReg; /* saved registers */
diff --git a/xorg-server/hw/xfree86/x86emu/debug.c b/xorg-server/hw/xfree86/x86emu/debug.c
index 1a8d1d6c4..cbea9947f 100644
--- a/xorg-server/hw/xfree86/x86emu/debug.c
+++ b/xorg-server/hw/xfree86/x86emu/debug.c
@@ -103,11 +103,11 @@ disassemble_forward(u16 seg, u16 off, int n)
* SINGLE_STEP(r,m); which disappear if DEBUG is not defined to
* the preprocessor. The TRACE_REGS macro expands to:
*
- * if (debug&DEBUG_DISASSEMBLE)
+ * if (debug&DEBUG_DISASSEMBLE)
* {just_disassemble(); goto EndOfInstruction;}
* if (debug&DEBUG_TRACE) trace_regs(r,m);
*
- * ...... and at the last line of the routine.
+ * ...... and at the last line of the routine.
*
* EndOfInstruction: end_instr();
*
diff --git a/xorg-server/hw/xfree86/x86emu/ops.c b/xorg-server/hw/xfree86/x86emu/ops.c
index b50badb28..853792e7e 100644
--- a/xorg-server/hw/xfree86/x86emu/ops.c
+++ b/xorg-server/hw/xfree86/x86emu/ops.c
@@ -5530,7 +5530,7 @@ x86emuOp_opc80_byte_RM_IMM(u8 X86EMU_UNUSED(op1))
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
- in the same format, even though the result is that the
+ in the same format, even though the result is that the
above test is done twice. */
switch (rh) {
@@ -5658,7 +5658,7 @@ x86emuOp_opc81_word_RM_IMM(u8 X86EMU_UNUSED(op1))
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
- in the same format, even though the result is that the
+ in the same format, even though the result is that the
above test is done twice. */
switch (rh) {
@@ -5690,7 +5690,7 @@ x86emuOp_opc81_word_RM_IMM(u8 X86EMU_UNUSED(op1))
}
#endif
/*
- * Know operation, decode the mod byte to find the addressing
+ * Know operation, decode the mod byte to find the addressing
* mode.
*/
switch (mod) {
@@ -5853,7 +5853,7 @@ x86emuOp_opc82_byte_RM_IMM(u8 X86EMU_UNUSED(op1))
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
- in the same format, even though the result is that the
+ in the same format, even though the result is that the
above test is done twice. */
switch (rh) {
case 0:
@@ -5977,7 +5977,7 @@ x86emuOp_opc83_word_RM_IMM(u8 X86EMU_UNUSED(op1))
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
- in the same format, even though the result is that the
+ in the same format, even though the result is that the
above test is done twice. */
switch (rh) {
case 0:
@@ -7472,7 +7472,7 @@ x86emuOp_call_far_IMM(u8 X86EMU_UNUSED(op1))
CALL_TRACE(M.x86.saved_cs, M.x86.saved_ip, farseg, faroff, "FAR ");
/* XXX
- *
+ *
* Hooked interrupt vectors calling into our "BIOS" will cause
* problems unless all intersegment stuff is checked for BIOS
* access. Check needed here. For moment, let it alone.
@@ -8688,7 +8688,7 @@ x86emuOp_opcC0_byte_RM_MEM(u8 X86EMU_UNUSED(op1))
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
- in the same format, even though the result is that the
+ in the same format, even though the result is that the
above test is done twice. */
switch (rh) {
@@ -8797,7 +8797,7 @@ x86emuOp_opcC1_word_RM_MEM(u8 X86EMU_UNUSED(op1))
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
- in the same format, even though the result is that the
+ in the same format, even though the result is that the
above test is done twice. */
switch (rh) {
@@ -9700,7 +9700,7 @@ x86emuOp_opcD2_byte_RM_CL(u8 X86EMU_UNUSED(op1))
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
- in the same format, even though the result is that the
+ in the same format, even though the result is that the
above test is done twice. */
switch (rh) {
case 0:
@@ -9795,7 +9795,7 @@ x86emuOp_opcD3_word_RM_CL(u8 X86EMU_UNUSED(op1))
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
- in the same format, even though the result is that the
+ in the same format, even though the result is that the
above test is done twice. */
switch (rh) {
case 0:
@@ -11538,7 +11538,7 @@ x86emuOp_opcFE_byte_RM(u8 X86EMU_UNUSED(op1))
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
- in the same format, even though the result is that the
+ in the same format, even though the result is that the
above test is done twice. */
switch (rh) {
diff --git a/xorg-server/hw/xfree86/x86emu/prim_ops.c b/xorg-server/hw/xfree86/x86emu/prim_ops.c
index 24f76b47f..5604c7e81 100644
--- a/xorg-server/hw/xfree86/x86emu/prim_ops.c
+++ b/xorg-server/hw/xfree86/x86emu/prim_ops.c
@@ -883,9 +883,9 @@ rcl_byte(u8 d, u8 s)
/* s is the rotate distance. It varies from 0 - 8. */
/* have
- CF B_7 B_6 B_5 B_4 B_3 B_2 B_1 B_0
+ CF B_7 B_6 B_5 B_4 B_3 B_2 B_1 B_0
- want to rotate through the carry by "s" bits. We could
+ want to rotate through the carry by "s" bits. We could
loop, but that's inefficient. So the width is 9,
and we split into three parts:
@@ -895,12 +895,12 @@ rcl_byte(u8 d, u8 s)
The new rotate is done mod 9, and given this,
for a rotation of n bits (mod 9) the new carry flag is
- then located n bits from the MSB. The low part is
+ then located n bits from the MSB. The low part is
then shifted up cnt bits, and the high part is or'd
- in. Using CAPS for new values, and lowercase for the
+ in. Using CAPS for new values, and lowercase for the
original values, this can be expressed as:
- IF n > 0
+ IF n > 0
1) CF <- b_(8-n)
2) B_(7) .. B_(n) <- b_(8-(n+1)) .. b_0
3) B_(n-1) <- cf
@@ -912,17 +912,17 @@ rcl_byte(u8 d, u8 s)
/* CF <- b_(8-n) */
cf = (d >> (8 - cnt)) & 0x1;
- /* get the low stuff which rotated
+ /* get the low stuff which rotated
into the range B_7 .. B_cnt */
/* B_(7) .. B_(n) <- b_(8-(n+1)) .. b_0 */
/* note that the right hand side done by the mask */
res = (d << cnt) & 0xff;
- /* now the high stuff which rotated around
+ /* now the high stuff which rotated around
into the positions B_cnt-2 .. B_0 */
/* B_(n-2) .. B_0 <- b_7 .. b_(8-(n-1)) */
- /* shift it downward, 7-(n-2) = 9-n positions.
- and mask off the result before or'ing in.
+ /* shift it downward, 7-(n-2) = 9-n positions.
+ and mask off the result before or'ing in.
*/
mask = (1 << (cnt - 1)) - 1;
res |= (d >> (9 - cnt)) & mask;
@@ -934,7 +934,7 @@ rcl_byte(u8 d, u8 s)
}
/* set the new carry flag, based on the variable "cf" */
CONDITIONAL_SET_FLAG(cf, F_CF);
- /* OVERFLOW is set *IFF* cnt==1, then it is the
+ /* OVERFLOW is set *IFF* cnt==1, then it is the
xor of CF and the most significant bit. Blecck. */
/* parenthesized this expression since it appears to
be causing OF to be misset */
@@ -1003,22 +1003,22 @@ rcr_byte(u8 d, u8 s)
u32 mask, cf, ocf = 0;
/* rotate right through carry */
- /*
+ /*
s is the rotate distance. It varies from 0 - 8.
- d is the byte object rotated.
+ d is the byte object rotated.
- have
+ have
- CF B_7 B_6 B_5 B_4 B_3 B_2 B_1 B_0
+ CF B_7 B_6 B_5 B_4 B_3 B_2 B_1 B_0
The new rotate is done mod 9, and given this,
for a rotation of n bits (mod 9) the new carry flag is
- then located n bits from the LSB. The low part is
+ then located n bits from the LSB. The low part is
then shifted up cnt bits, and the high part is or'd
- in. Using CAPS for new values, and lowercase for the
+ in. Using CAPS for new values, and lowercase for the
original values, this can be expressed as:
- IF n > 0
+ IF n > 0
1) CF <- b_(n-1)
2) B_(8-(n+1)) .. B_(0) <- b_(7) .. b_(n)
3) B_(8-n) <- cf
@@ -1033,7 +1033,7 @@ rcr_byte(u8 d, u8 s)
/* note hackery here. Access_flag(..) evaluates to either
0 if flag not set
non-zero if flag is set.
- doing access_flag(..) != 0 casts that into either
+ doing access_flag(..) != 0 casts that into either
0..1 in any representation of the flags register
(i.e. packed bit array or unpacked.)
*/
@@ -1044,19 +1044,19 @@ rcr_byte(u8 d, u8 s)
/* B_(8-(n+1)) .. B_(0) <- b_(7) .. b_n */
/* note that the right hand side done by the mask
- This is effectively done by shifting the
+ This is effectively done by shifting the
object to the right. The result must be masked,
- in case the object came in and was treated
+ in case the object came in and was treated
as a negative number. Needed??? */
mask = (1 << (8 - cnt)) - 1;
res = (d >> cnt) & mask;
- /* now the high stuff which rotated around
+ /* now the high stuff which rotated around
into the positions B_cnt-2 .. B_0 */
/* B_(7) .. B_(8-(n-1)) <- b_(n-2) .. b_(0) */
- /* shift it downward, 7-(n-2) = 9-n positions.
- and mask off the result before or'ing in.
+ /* shift it downward, 7-(n-2) = 9-n positions.
+ and mask off the result before or'ing in.
*/
res |= (d << (9 - cnt));
@@ -1067,7 +1067,7 @@ rcr_byte(u8 d, u8 s)
}
/* set the new carry flag, based on the variable "cf" */
CONDITIONAL_SET_FLAG(cf, F_CF);
- /* OVERFLOW is set *IFF* cnt==1, then it is the
+ /* OVERFLOW is set *IFF* cnt==1, then it is the
xor of CF and the most significant bit. Blecck. */
/* parenthesized... */
if (cnt == 1) {
@@ -1154,18 +1154,18 @@ rol_byte(u8 d, u8 s)
register unsigned int res, cnt, mask;
/* rotate left */
- /*
+ /*
s is the rotate distance. It varies from 0 - 8.
- d is the byte object rotated.
+ d is the byte object rotated.
- have
+ have
- CF B_7 ... B_0
+ CF B_7 ... B_0
The new rotate is done mod 8.
Much simpler than the "rcl" or "rcr" operations.
- IF n > 0
+ IF n > 0
1) B_(7) .. B_(n) <- b_(8-(n+1)) .. b_(0)
2) B_(n-1) .. B_(0) <- b_(7) .. b_(8-n)
*/
@@ -1256,17 +1256,17 @@ ror_byte(u8 d, u8 s)
register unsigned int res, cnt, mask;
/* rotate right */
- /*
+ /*
s is the rotate distance. It varies from 0 - 8.
- d is the byte object rotated.
+ d is the byte object rotated.
- have
+ have
- B_7 ... B_0
+ B_7 ... B_0
The rotate is done mod 8.
- IF n > 0
+ IF n > 0
1) B_(8-(n+1)) .. B_(0) <- b_(7) .. b_(n)
2) B_(7) .. B_(8-n) <- b_(n-1) .. b_(0)
*/
@@ -1279,7 +1279,7 @@ ror_byte(u8 d, u8 s)
mask = (1 << (8 - cnt)) - 1;
res |= (d >> (cnt)) & mask;
- /* set the new carry flag, Note that it is the low order
+ /* set the new carry flag, Note that it is the low order
bit of the result!!! */
CONDITIONAL_SET_FLAG(res & 0x80, F_CF);
/* OVERFLOW is set *IFF* s==1, then it is the
diff --git a/xorg-server/hw/xfree86/x86emu/sys.c b/xorg-server/hw/xfree86/x86emu/sys.c
index c514ddeea..5eba35856 100644
--- a/xorg-server/hw/xfree86/x86emu/sys.c
+++ b/xorg-server/hw/xfree86/x86emu/sys.c
@@ -183,7 +183,7 @@ RETURNS:
Byte value read from emulator memory.
REMARKS:
-Reads a byte value from the emulator memory.
+Reads a byte value from the emulator memory.
****************************************************************************/
u8 X86API
rdb(u32 addr)
@@ -241,7 +241,7 @@ addr - Emulator memory address to read
RETURNS:
Long value read from emulator memory.
REMARKS:
-Reads a long value from the emulator memory.
+Reads a long value from the emulator memory.
****************************************************************************/
u32 X86API
rdl(u32 addr)
@@ -323,7 +323,7 @@ addr - Emulator memory address to read
val - Value to store
REMARKS:
-Writes a long value to emulator memory.
+Writes a long value to emulator memory.
****************************************************************************/
void X86API
wrl(u32 addr, u32 val)
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/regs.h b/xorg-server/hw/xfree86/x86emu/x86emu/regs.h
index 3a7456e4c..c040259fa 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/regs.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/regs.h
@@ -109,7 +109,7 @@ struct i386_special_regs {
u32 FLAGS;
};
-/*
+/*
* Segment registers here represent the 16 bit quantities
* CS, DS, ES, SS.
*/
@@ -196,8 +196,8 @@ struct i386_segment_regs {
#define F_ALWAYS_ON (0x0002) /* flag bits always on */
/*
- * Define a mask for only those flag bits we will ever pass back
- * (via PUSHF)
+ * Define a mask for only those flag bits we will ever pass back
+ * (via PUSHF)
*/
#define F_MSK (FB_CF|FB_PF|FB_AF|FB_ZF|FB_SF|FB_TF|FB_IF|FB_DF|FB_OF)
@@ -279,8 +279,8 @@ typedef struct {
* Delayed flag set 3 bits (zero, signed, parity)
* reserved 6 bits
* interrupt # 8 bits instruction raised interrupt
- * BIOS video segregs 4 bits
- * Interrupt Pending 1 bits
+ * BIOS video segregs 4 bits
+ * Interrupt Pending 1 bits
* Extern interrupt 1 bits
* Halted 1 bits
*/
diff --git a/xorg-server/hw/xnest/Color.c b/xorg-server/hw/xnest/Color.c
index 95c334308..8d9d35621 100644
--- a/xorg-server/hw/xnest/Color.c
+++ b/xorg-server/hw/xnest/Color.c
@@ -239,7 +239,7 @@ xnestSetInstalledColormapWindows(ScreenPtr pScreen)
xnestNumOldInstalledColormapWindows = icws.numWindows;
#ifdef DUMB_WINDOW_MANAGERS
- /*
+ /*
This code is for dumb window managers.
This will only work with default local visual colormaps.
*/
diff --git a/xorg-server/hw/xnest/GC.c b/xorg-server/hw/xnest/GC.c
index 0ec60fcdc..96af6eb91 100644
--- a/xorg-server/hw/xnest/GC.c
+++ b/xorg-server/hw/xnest/GC.c
@@ -194,11 +194,12 @@ xnestChangeClip(GCPtr pGC, int type, void *pValue, int nRects)
BoxPtr pBox;
XRectangle *pRects;
- xnestDestroyClipHelper(pGC);
+ xnestDestroyClip(pGC);
switch (type) {
case CT_NONE:
XSetClipMask(xnestDisplay, xnestGC(pGC), None);
+ pValue = NULL;
break;
case CT_REGION:
@@ -224,11 +225,9 @@ xnestChangeClip(GCPtr pGC, int type, void *pValue, int nRects)
* Need to change into region, so subsequent uses are with
* current pixmap contents.
*/
- pGC->clientClip =
- (void *) (*pGC->pScreen->BitmapToRegion) ((PixmapPtr) pValue);
+ pGC->clientClip = (*pGC->pScreen->BitmapToRegion) ((PixmapPtr) pValue);
(*pGC->pScreen->DestroyPixmap) ((PixmapPtr) pValue);
pValue = pGC->clientClip;
- type = CT_REGION;
break;
case CT_UNSORTED:
@@ -264,65 +263,34 @@ xnestChangeClip(GCPtr pGC, int type, void *pValue, int nRects)
case CT_YSORTED:
case CT_YXSORTED:
case CT_YXBANDED:
-
- /*
- * other parts of server can only deal with CT_NONE,
- * CT_PIXMAP and CT_REGION client clips.
- */
- pGC->clientClip = (void *) RegionFromRects(nRects,
- (xRectangle *) pValue,
- type);
+ /* server clip representation is a region */
+ pGC->clientClip = RegionFromRects(nRects, (xRectangle *) pValue, type);
free(pValue);
pValue = pGC->clientClip;
- type = CT_REGION;
-
break;
}
- pGC->clientClipType = type;
pGC->clientClip = pValue;
}
void
xnestDestroyClip(GCPtr pGC)
{
- xnestDestroyClipHelper(pGC);
-
- XSetClipMask(xnestDisplay, xnestGC(pGC), None);
-
- pGC->clientClipType = CT_NONE;
- pGC->clientClip = NULL;
-}
-
-void
-xnestDestroyClipHelper(GCPtr pGC)
-{
- switch (pGC->clientClipType) {
- default:
- case CT_NONE:
- break;
-
- case CT_REGION:
+ if (pGC->clientClip) {
RegionDestroy(pGC->clientClip);
- break;
+ XSetClipMask(xnestDisplay, xnestGC(pGC), None);
+ pGC->clientClip = NULL;
}
}
void
xnestCopyClip(GCPtr pGCDst, GCPtr pGCSrc)
{
- RegionPtr pRgn;
-
- switch (pGCSrc->clientClipType) {
- default:
- case CT_NONE:
- xnestDestroyClip(pGCDst);
- break;
-
- case CT_REGION:
- pRgn = RegionCreate(NULL, 1);
+ if (pGCSrc->clientClip) {
+ RegionPtr pRgn = RegionCreate(NULL, 1);
RegionCopy(pRgn, pGCSrc->clientClip);
xnestChangeClip(pGCDst, CT_REGION, pRgn, 0);
- break;
+ } else {
+ xnestDestroyClip(pGCDst);
}
}
diff --git a/xorg-server/hw/xnest/XNGC.h b/xorg-server/hw/xnest/XNGC.h
index e2f10fb9c..974173e50 100644
--- a/xorg-server/hw/xnest/XNGC.h
+++ b/xorg-server/hw/xnest/XNGC.h
@@ -37,7 +37,6 @@ void xnestCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst);
void xnestDestroyGC(GCPtr pGC);
void xnestChangeClip(GCPtr pGC, int type, void *pValue, int nRects);
void xnestDestroyClip(GCPtr pGC);
-void xnestDestroyClipHelper(GCPtr pGC);
void xnestCopyClip(GCPtr pGCDst, GCPtr pGCSrc);
#endif /* XNESTGC_H */
diff --git a/xorg-server/hw/xnest/Xnest.h b/xorg-server/hw/xnest/Xnest.h
index adb9daf8b..37ea6e532 100644
--- a/xorg-server/hw/xnest/Xnest.h
+++ b/xorg-server/hw/xnest/Xnest.h
@@ -28,7 +28,7 @@ from the X Consortium.
*/
-/*
+/*
** Machines with a 64 bit library interface and a 32 bit server require
** name changes to protect the guilty.
*/
diff --git a/xorg-server/hw/xquartz/darwin.c b/xorg-server/hw/xquartz/darwin.c
index 29c6438a0..340343672 100644
--- a/xorg-server/hw/xquartz/darwin.c
+++ b/xorg-server/hw/xquartz/darwin.c
@@ -343,16 +343,16 @@ DarwinMouseProc(DeviceIntPtr pPointer, int what)
InitValuatorAxisStruct(pPointer, 1, axes_labels[1],
NO_AXIS_LIMITS, NO_AXIS_LIMITS,
0, 0, 0, Absolute);
- InitValuatorAxisStruct(pPointer, 2, axes_labels[2],
+ InitValuatorAxisStruct(pPointer, 2, axes_labels[2],
NO_AXIS_LIMITS, NO_AXIS_LIMITS,
1, 0, 1, Relative);
- InitValuatorAxisStruct(pPointer, 3, axes_labels[3],
+ InitValuatorAxisStruct(pPointer, 3, axes_labels[3],
NO_AXIS_LIMITS, NO_AXIS_LIMITS,
1, 0, 1, Relative);
- InitValuatorAxisStruct(pPointer, 4, axes_labels[4],
+ InitValuatorAxisStruct(pPointer, 4, axes_labels[4],
NO_AXIS_LIMITS, NO_AXIS_LIMITS,
1, 0, 1, Relative);
- InitValuatorAxisStruct(pPointer, 5, axes_labels[5],
+ InitValuatorAxisStruct(pPointer, 5, axes_labels[5],
NO_AXIS_LIMITS, NO_AXIS_LIMITS,
1, 0, 1, Relative);
diff --git a/xorg-server/hw/xquartz/darwinEvents.c b/xorg-server/hw/xquartz/darwinEvents.c
index b41c6fdac..5a5e4dad2 100644
--- a/xorg-server/hw/xquartz/darwinEvents.c
+++ b/xorg-server/hw/xquartz/darwinEvents.c
@@ -596,7 +596,7 @@ DarwinSendPointerEvents(DeviceIntPtr pDev, int ev_type, int ev_button,
QueuePointerEvents(pDev, ev_type, ev_button, POINTER_ABSOLUTE,
&valuators);
DarwinPokeEQ();
- } darwinEvents_unlock();
+ } darwinEvents_unlock();
}
void
@@ -645,7 +645,7 @@ DarwinSendScrollEvents(double scroll_x, double scroll_y) {
QueuePointerEvents(darwinPointer, MotionNotify, 0,
POINTER_RELATIVE, &valuators);
DarwinPokeEQ();
- } darwinEvents_unlock();
+ } darwinEvents_unlock();
}
/* Send the appropriate KeyPress/KeyRelease events to GetKeyboardEvents to
diff --git a/xorg-server/hw/xwayland/xwayland.c b/xorg-server/hw/xwayland/xwayland.c
index 913296947..37d6d8270 100644
--- a/xorg-server/hw/xwayland/xwayland.c
+++ b/xorg-server/hw/xwayland/xwayland.c
@@ -656,6 +656,7 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
return ret;
}
+_X_NORETURN
static void _X_ATTRIBUTE_PRINTF(1, 0)
xwl_log_handler(const char *format, va_list args)
{
diff --git a/xorg-server/hw/xwin/InitInput.c b/xorg-server/hw/xwin/InitInput.c
index 3e9ee41e6..6cd9e060a 100644
--- a/xorg-server/hw/xwin/InitInput.c
+++ b/xorg-server/hw/xwin/InitInput.c
@@ -52,7 +52,7 @@ DeviceIntPtr g_pwinKeyboard;
/*
* All of our keys generate up and down transition notifications,
* so all of our keys can be used as modifiers.
- *
+ *
* An example of a modifier is mapping the A key to the Control key.
* A has to be a legal modifier. I think.
*/
diff --git a/xorg-server/hw/xwin/InitOutput.c b/xorg-server/hw/xwin/InitOutput.c
index e86711962..fef46a94f 100644
--- a/xorg-server/hw/xwin/InitOutput.c
+++ b/xorg-server/hw/xwin/InitOutput.c
@@ -628,9 +628,9 @@ OsVendorInit(void)
if (!g_fLogInited) {
/* keep this order. If LogInit fails it calls Abort which then calls
- * ddxGiveUp where LogInit is called again and creates an infinite
- * recursion. If we set g_fLogInited to TRUE before the init we
- * avoid the second call
+ * ddxGiveUp where LogInit is called again and creates an infinite
+ * recursion. If we set g_fLogInited to TRUE before the init we
+ * avoid the second call
*/
g_fLogInited = TRUE;
g_pszLogFile = LogInit(g_pszLogFile, NULL);
@@ -885,7 +885,7 @@ ddxUseMsg(void)
/* See Porting Layer Definition - p. 20 */
/*
* Do any global initialization, then initialize each screen.
- *
+ *
* NOTE: We use ddxProcessArgument, so we don't need to touch argc and argv
*/
@@ -1004,7 +1004,7 @@ winCheckDisplayNumber(void)
int nDisp;
HANDLE mutex;
char name[MAX_PATH];
- char *pszPrefix = '\0';
+ const char *pszPrefix = '\0';
OSVERSIONINFO osvi = { 0 };
/* Check display range */
diff --git a/xorg-server/hw/xwin/ddraw.h b/xorg-server/hw/xwin/ddraw.h
index 1871d9551..4c9af772e 100644
--- a/xorg-server/hw/xwin/ddraw.h
+++ b/xorg-server/hw/xwin/ddraw.h
@@ -1346,7 +1346,7 @@ extern "C" {
/*****************************************************************************
* IDirectDraw2 interface
*/
-/* Note: IDirectDraw2 cannot derive from IDirectDraw because the number of
+/* Note: IDirectDraw2 cannot derive from IDirectDraw because the number of
* arguments of SetDisplayMode has changed !
*/
#undef INTERFACE
@@ -1742,7 +1742,7 @@ extern "C" {
/*****************************************************************************
* IDirectDrawSurface2 interface
*/
-/* Cannot inherit from IDirectDrawSurface because the LPDIRECTDRAWSURFACE parameters
+/* Cannot inherit from IDirectDrawSurface because the LPDIRECTDRAWSURFACE parameters
* have been converted to LPDIRECTDRAWSURFACE2.
*/
#undef INTERFACE
@@ -1861,7 +1861,7 @@ extern "C" {
/*****************************************************************************
* IDirectDrawSurface3 interface
*/
-/* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters
+/* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters
* have been converted to LPDIRECTDRAWSURFACE3.
*/
#undef INTERFACE
diff --git a/xorg-server/hw/xwin/glx/glshim.c b/xorg-server/hw/xwin/glx/glshim.c
index 7109196c0..df5a932ff 100644
--- a/xorg-server/hw/xwin/glx/glshim.c
+++ b/xorg-server/hw/xwin/glx/glshim.c
@@ -36,6 +36,7 @@
#endif
#define GL_GLEXT_LEGACY
+#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
#undef GL_ARB_imaging
#undef GL_VERSION_1_3
@@ -46,6 +47,8 @@
#include "glwindows.h"
#include <glx/glxserver.h>
+extern void *glXGetProcAddressARB(const char *);
+
static HMODULE hMod = NULL;
/*
diff --git a/xorg-server/hw/xwin/win.h b/xorg-server/hw/xwin/win.h
index ed1ad01dc..b7d20ca73 100644
--- a/xorg-server/hw/xwin/win.h
+++ b/xorg-server/hw/xwin/win.h
@@ -706,7 +706,7 @@ extern FARPROC g_fpDirectDrawCreateClipper;
winPrivWinPtr pWinPriv = winGetWindowPriv(pWin)
/*
- * wrapper macros
+ * wrapper macros
*/
#define _WIN_WRAP(priv, real, mem, func) {\
priv->mem = real->mem; \
diff --git a/xorg-server/hw/xwin/winSetAppUserModelID.c b/xorg-server/hw/xwin/winSetAppUserModelID.c
index 41615e19c..f9cb92cdd 100644
--- a/xorg-server/hw/xwin/winSetAppUserModelID.c
+++ b/xorg-server/hw/xwin/winSetAppUserModelID.c
@@ -90,7 +90,7 @@ winSetAppUserModelID(HWND hWnd, const char *AppID)
return;
}
- winDebug("winSetAppUserMOdelID - hwnd 0x%08x appid '%s'\n", hWnd, AppID);
+ winDebug("winSetAppUserMOdelID - hwnd 0x%p appid '%s'\n", hWnd, AppID);
hr = g_pSHGetPropertyStoreForWindow(hWnd, &IID_IPropertyStore,
(void **) &pps);
diff --git a/xorg-server/hw/xwin/winclipboard/xevents.c b/xorg-server/hw/xwin/winclipboard/xevents.c
index d0077b846..33d52aafd 100644
--- a/xorg-server/hw/xwin/winclipboard/xevents.c
+++ b/xorg-server/hw/xwin/winclipboard/xevents.c
@@ -126,7 +126,8 @@ void
winClipboardInitMonitoredSelections(void)
{
/* Initialize static variables */
- for (int i = 0; i < CLIP_NUM_SELECTIONS; ++i)
+ int i;
+ for (i = 0; i < CLIP_NUM_SELECTIONS; ++i)
s_iOwners[i] = None;
lastOwnedSelectionIndex = CLIP_OWN_NONE;
diff --git a/xorg-server/hw/xwin/wincmap.c b/xorg-server/hw/xwin/wincmap.c
index 5dcc8bceb..1bdc7df70 100644
--- a/xorg-server/hw/xwin/wincmap.c
+++ b/xorg-server/hw/xwin/wincmap.c
@@ -270,7 +270,7 @@ winCreateColormap(ColormapPtr pmap)
* FIXME: This is some evil hackery to help in handling some X clients
* that expect the top pixel to be white. This "help" only lasts until
* some client overwrites the top colormap entry.
- *
+ *
* We don't want to actually allocate the top entry, as that causes
* problems with X clients that need 7 planes (128 colors) in the default
* colormap, such as Magic 7.1.
diff --git a/xorg-server/hw/xwin/winconfig.c b/xorg-server/hw/xwin/winconfig.c
index a6d3c0a1f..321dfeed2 100644
--- a/xorg-server/hw/xwin/winconfig.c
+++ b/xorg-server/hw/xwin/winconfig.c
@@ -239,7 +239,7 @@ winConfigKeyboard(DeviceIntPtr pDevice)
XkbGetRulesDflts(&g_winInfo.xkb);
/*
- * Query the windows autorepeat settings and change the xserver defaults.
+ * Query the windows autorepeat settings and change the xserver defaults.
*/
{
int kbd_delay;
@@ -277,7 +277,7 @@ winConfigKeyboard(DeviceIntPtr pDevice)
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.
+ different layout numbers set. Map them to a single entry.
Same might apply for chinese, korean and other symbol languages
too */
layoutNum = (layoutNum & 0xffff);
@@ -358,7 +358,7 @@ winConfigKeyboard(DeviceIntPtr pDevice)
kbdfrom = X_CMDLINE;
/*
- * Until the layout code is finished, I search for the keyboard
+ * Until the layout code is finished, I search for the keyboard
* device and configure the server with it.
*/
@@ -653,7 +653,7 @@ winSetPercentOption(void *optlist, const char *name, double deflt)
/*
* Compare two strings for equality. This is caseinsensitive and
- * The characters '_', ' ' (space) and '\t' (tab) are treated as
+ * The characters '_', ' ' (space) and '\t' (tab) are treated as
* not existing.
*/
@@ -696,7 +696,7 @@ winNameCompare(const char *s1, const char *s2)
#ifdef XWIN_XF86CONFIG
/*
- * Find the named option in the list.
+ * Find the named option in the list.
* @return the pointer to the option record, or NULL if not found.
*/
diff --git a/xorg-server/hw/xwin/wincreatewnd.c b/xorg-server/hw/xwin/wincreatewnd.c
index 9f7201620..6c5b21dfa 100644
--- a/xorg-server/hw/xwin/wincreatewnd.c
+++ b/xorg-server/hw/xwin/wincreatewnd.c
@@ -160,8 +160,8 @@ winCreateBoundingWindowWindowed(ScreenPtr pScreen)
&& !pScreenInfo->fMultiWindow
#endif
) {
- /* Try to handle startup via run.exe. run.exe instructs Windows to
- * hide all created windows. Detect this case and make sure the
+ /* Try to handle startup via run.exe. run.exe instructs Windows to
+ * hide all created windows. Detect this case and make sure the
* window is shown nevertheless */
STARTUPINFO startupInfo;
diff --git a/xorg-server/hw/xwin/wincursor.c b/xorg-server/hw/xwin/wincursor.c
index f3ac0f7ae..bddd6b7ed 100644
--- a/xorg-server/hw/xwin/wincursor.c
+++ b/xorg-server/hw/xwin/wincursor.c
@@ -106,7 +106,7 @@ winPointerWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
MapWindowPoints(pScreenPriv->hwndScreen,
HWND_DESKTOP, (LPPOINT) &rcClient, 2);
- /*
+ /*
* Update the Windows cursor position so that we don't
* immediately warp back to the current position.
*/
@@ -169,7 +169,7 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen)
pCursor->bits->width, pCursor->bits->height,
pCursor->bits->xhot, pCursor->bits->yhot);
- /* We can use only White and Black, so calc brightness of color
+ /* We can use only White and Black, so calc brightness of color
* Also check if the cursor is inverted */
dForeY = BRIGHTNESS(pCursor->fore);
dBackY = BRIGHTNESS(pCursor->back);
@@ -184,8 +184,8 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen)
pCursor->bits->width, pCursor->bits->height);
}
- /* Get the number of bytes required to store the whole cursor image
- * This is roughly (sm_cx * sm_cy) / 8
+ /* Get the number of bytes required to store the whole cursor image
+ * This is roughly (sm_cx * sm_cy) / 8
* round up to 8 pixel boundary so we can convert whole bytes */
nBytes =
bits_to_bytes(pScreenPriv->cursor.sm_cx) * pScreenPriv->cursor.sm_cy;
@@ -199,7 +199,7 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen)
memset(pAnd, 0xFF, nBytes);
pXor = calloc(1, nBytes);
- /* Convert the X11 bitmap to a win32 bitmap
+ /* Convert the X11 bitmap to a win32 bitmap
* The first is for an empty mask */
if (pCursor->bits->emptyMask) {
int x, y, xmax = bits_to_bytes(nCX);
diff --git a/xorg-server/hw/xwin/windialogs.c b/xorg-server/hw/xwin/windialogs.c
index 61f7fe0bd..6fe3fc442 100644
--- a/xorg-server/hw/xwin/windialogs.c
+++ b/xorg-server/hw/xwin/windialogs.c
@@ -389,8 +389,8 @@ winDisplayDepthChangeDialog(winPrivScreenPtr pScreenPriv)
}
/*
- * Display a notification to the user that the visual
- * will not be displayed until the Windows display depth
+ * 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(g_hInstance,
@@ -411,7 +411,7 @@ winDisplayDepthChangeDialog(winPrivScreenPtr pScreenPriv)
/*
* Process messages for the dialog that is displayed for
- * disruptive screen depth changes.
+ * disruptive screen depth changes.
*/
static INT_PTR CALLBACK
@@ -437,8 +437,8 @@ winChangeDepthDlgProc(HWND hwndDialog, UINT message,
s_pScreenInfo = s_pScreenPriv->pScreenInfo;
#if CYGDEBUG
- winDebug("winChangeDepthDlgProc - WM_INITDIALOG - s_pScreenPriv: %08x, "
- "s_pScreenInfo: %08x\n",
+ winDebug("winChangeDepthDlgProc - WM_INITDIALOG - s_pScreenPriv: %p, "
+ "s_pScreenInfo: %p\n",
s_pScreenPriv, s_pScreenInfo);
#endif
@@ -481,7 +481,7 @@ winChangeDepthDlgProc(HWND hwndDialog, UINT message,
case IDCANCEL:
winDebug("winChangeDepthDlgProc - WM_COMMAND - IDOK or IDCANCEL\n");
- /*
+ /*
* User dismissed the dialog, hide it until the
* display mode is restored.
*/
diff --git a/xorg-server/hw/xwin/winlayouts.h b/xorg-server/hw/xwin/winlayouts.h
index 8b6b98407..a61fd7ac1 100644
--- a/xorg-server/hw/xwin/winlayouts.h
+++ b/xorg-server/hw/xwin/winlayouts.h
@@ -23,7 +23,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.
*/
-/* Definitions for various keyboard layouts from windows and their
+/* Definitions for various keyboard layouts from windows and their
* XKB settings.
*/
diff --git a/xorg-server/hw/xwin/winmsgwindow.c b/xorg-server/hw/xwin/winmsgwindow.c
index 59f1da503..f5649b722 100644
--- a/xorg-server/hw/xwin/winmsgwindow.c
+++ b/xorg-server/hw/xwin/winmsgwindow.c
@@ -96,7 +96,6 @@ static HWND
winCreateMsgWindow(void)
{
HWND hwndMsg;
- wATOM winClass;
// register window class
{
@@ -114,7 +113,7 @@ winCreateMsgWindow(void)
wcx.lpszMenuName = NULL;
wcx.lpszClassName = WINDOW_CLASS_X_MSG;
wcx.hIconSm = NULL;
- winClass = RegisterClassEx(&wcx);
+ RegisterClassEx(&wcx);
}
// Create the msg window.
@@ -136,7 +135,7 @@ winCreateMsgWindow(void)
return NULL;
}
- winDebug("winCreateMsgWindow - Created msg window hwnd 0x%x\n", hwndMsg);
+ winDebug("winCreateMsgWindow - Created msg window hwnd 0x%p\n", hwndMsg);
return hwndMsg;
}
diff --git a/xorg-server/hw/xwin/winmultiwindowicons.c b/xorg-server/hw/xwin/winmultiwindowicons.c
index 93d389d46..c22e68874 100644
--- a/xorg-server/hw/xwin/winmultiwindowicons.c
+++ b/xorg-server/hw/xwin/winmultiwindowicons.c
@@ -382,7 +382,7 @@ winXIconToHICON(Display * pDisplay, Window id, int iconSize)
static int generation;
uint32_t *icon, *icon_data = NULL;
unsigned long int size;
- unsigned long int type;
+ Atom type;
int format;
unsigned long int left;
@@ -465,7 +465,7 @@ winXIconToHICON(Display * pDisplay, Window id, int iconSize)
xImageIcon =
XGetImage(pDisplay, hints->icon_pixmap, 0, 0, width, height,
0xFFFFFFFF, ZPixmap);
- winDebug("winXIconToHICON: id 0x%x icon Ximage 0x%x\n", id,
+ winDebug("winXIconToHICON: id 0x%x icon Ximage 0x%p\n", id,
xImageIcon);
if (hints->icon_mask)
diff --git a/xorg-server/hw/xwin/winmultiwindowshape.c b/xorg-server/hw/xwin/winmultiwindowshape.c
index cb0f38950..73afaea55 100644
--- a/xorg-server/hw/xwin/winmultiwindowshape.c
+++ b/xorg-server/hw/xwin/winmultiwindowshape.c
@@ -47,7 +47,7 @@ winSetShapeMultiWindow(WindowPtr pWin, int kind)
winScreenPriv(pScreen);
#if CYGMULTIWINDOW_DEBUG
- ErrorF("winSetShapeMultiWindow - pWin: %08x kind: %i\n", pWin, kind);
+ ErrorF("winSetShapeMultiWindow - pWin: %p kind: %i\n", pWin, kind);
#endif
WIN_UNWRAP(SetShape);
diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c
index f2e7907b8..c22d69074 100644
--- a/xorg-server/hw/xwin/winmultiwindowwindow.c
+++ b/xorg-server/hw/xwin/winmultiwindowwindow.c
@@ -286,7 +286,7 @@ winChangeWindowAttributesMultiWindow(WindowPtr pWin, unsigned long mask)
winScreenPriv(pScreen);
#if CYGMULTIWINDOW_DEBUG
- ErrorF("winChangeWindowAttributesMultiWindow - pWin: %08x\n", pWin);
+ ErrorF("winChangeWindowAttributesMultiWindow - pWin: %p\n", pWin);
#endif
WIN_UNWRAP(ChangeWindowAttributes);
@@ -315,7 +315,7 @@ winUnmapWindowMultiWindow(WindowPtr pWin)
winScreenPriv(pScreen);
#if CYGMULTIWINDOW_DEBUG
- ErrorF("winUnmapWindowMultiWindow - pWin: %08x\n", pWin);
+ ErrorF("winUnmapWindowMultiWindow - pWin: %p\n", pWin);
#endif
WIN_UNWRAP(UnrealizeWindow);
@@ -346,7 +346,7 @@ winMapWindowMultiWindow(WindowPtr pWin)
winScreenPriv(pScreen);
#if CYGMULTIWINDOW_DEBUG
- ErrorF("winMapWindowMultiWindow - pWin: %08x\n", pWin);
+ ErrorF("winMapWindowMultiWindow - pWin: %p\n", pWin);
#endif
WIN_UNWRAP(RealizeWindow);
@@ -378,7 +378,7 @@ winReparentWindowMultiWindow(WindowPtr pWin, WindowPtr pPriorParent)
winScreenPriv(pScreen);
winDebug
- ("winReparentMultiWindow - pWin:%08x XID:0x%x, reparent from pWin:%08x XID:0x%x to pWin:%08x XID:0x%x\n",
+ ("winReparentMultiWindow - pWin:%p XID:0x%x, reparent from pWin:%p XID:0x%x to pWin:%p XID:0x%x\n",
pWin, pWin->drawable.id, pPriorParent, pPriorParent->drawable.id,
pWin->parent, pWin->parent->drawable.id);
@@ -409,7 +409,7 @@ winRestackWindowMultiWindow(WindowPtr pWin, WindowPtr pOldNextSib)
winScreenPriv(pScreen);
#if CYGMULTIWINDOW_DEBUG || CYGWINDOWING_DEBUG
- winTrace("winRestackMultiWindow - %08x\n", pWin);
+ winTrace("winRestackMultiWindow - %p\n", pWin);
#endif
WIN_UNWRAP(RestackWindow);
@@ -492,7 +492,7 @@ winCreateWindowsWindow(WindowPtr pWin)
winInitMultiWindowClass();
- winDebug("winCreateWindowsTopLevelWindow - pWin:%08x XID:0x%x \n", pWin,
+ winDebug("winCreateWindowsTopLevelWindow - pWin:%p XID:0x%x \n", pWin,
pWin->drawable.id);
iX = pWin->drawable.x + GetSystemMetrics(SM_XVIRTUALSCREEN);
@@ -618,7 +618,7 @@ winDestroyWindowsWindow(WindowPtr pWin)
HICON hIcon;
HICON hIconSm;
- winDebug("winDestroyWindowsWindow - pWin:%08x XID:0x%x \n", pWin,
+ winDebug("winDestroyWindowsWindow - pWin:%p XID:0x%x \n", pWin,
pWin->drawable.id);
/* Bail out if the Windows window handle is invalid */
@@ -700,7 +700,7 @@ winUpdateWindowsWindow(WindowPtr pWin)
}
/*
- * winGetWindowID -
+ * winGetWindowID -
*/
XID
@@ -720,7 +720,7 @@ winGetWindowID(WindowPtr pWin)
}
/*
- * winFindWindow -
+ * winFindWindow -
*/
static void
@@ -734,7 +734,7 @@ winFindWindow(void *value, XID id, void *cdata)
}
/*
- * winReorderWindowsMultiWindow -
+ * winReorderWindowsMultiWindow -
*/
void
diff --git a/xorg-server/hw/xwin/winmultiwindowwm.c b/xorg-server/hw/xwin/winmultiwindowwm.c
index e17a9502d..6599dfba8 100644
--- a/xorg-server/hw/xwin/winmultiwindowwm.c
+++ b/xorg-server/hw/xwin/winmultiwindowwm.c
@@ -339,7 +339,7 @@ PopMessage(WMMsgQueuePtr pQueue, WMInfoPtr pWMInfo)
#if 0
/*
- * HaveMessage -
+ * HaveMessage -
*/
static Bool
diff --git a/xorg-server/hw/xwin/winmultiwindowwndproc.c b/xorg-server/hw/xwin/winmultiwindowwndproc.c
index 17823baf2..d296f0f0c 100644
--- a/xorg-server/hw/xwin/winmultiwindowwndproc.c
+++ b/xorg-server/hw/xwin/winmultiwindowwndproc.c
@@ -140,7 +140,7 @@ ConstrainSize(WinXSizeHints hints, int *widthp, int *heightp)
*
* minAspectX * dheight > minAspectY * dwidth
* maxAspectX * dheight < maxAspectY * dwidth
- *
+ *
*/
if (hints.flags & PAspect) {
@@ -271,7 +271,7 @@ winRaiseWindow(WindowPtr pWin)
BOOL oldstate = winInRaiseWindow;
XID vlist[1] = { 0 };
winInRaiseWindow = TRUE;
- /* Call configure window directly to make sure it gets processed
+ /* Call configure window directly to make sure it gets processed
* in time
*/
ConfigureWindow(pWin, CWStackMode, vlist, serverClient);
diff --git a/xorg-server/hw/xwin/winprefs.c b/xorg-server/hw/xwin/winprefs.c
index 53abc163f..505292714 100644
--- a/xorg-server/hw/xwin/winprefs.c
+++ b/xorg-server/hw/xwin/winprefs.c
@@ -625,7 +625,7 @@ winIconIsOverride(HICON hicon)
* If @path is NULL, use the built-in default.
*/
static int
-winPrefsLoadPreferences(char *path)
+winPrefsLoadPreferences(const char *path)
{
FILE *prefFile = NULL;
diff --git a/xorg-server/hw/xwin/winprefslex.l b/xorg-server/hw/xwin/winprefslex.l
index fd13edc05..9e6f0d6d4 100644
--- a/xorg-server/hw/xwin/winprefslex.l
+++ b/xorg-server/hw/xwin/winprefslex.l
@@ -37,8 +37,6 @@
#include <string.h>
#include "winprefsyacc.h"
-extern int yyparse(void);
-
extern void ErrorF (const char* /*f*/, ...);
/* Copy the parsed string, must be free()d in yacc parser */
diff --git a/xorg-server/hw/xwin/winprefsyacc.y b/xorg-server/hw/xwin/winprefsyacc.y
index 683fc44ca..9bb28ae92 100644
--- a/xorg-server/hw/xwin/winprefsyacc.y
+++ b/xorg-server/hw/xwin/winprefsyacc.y
@@ -64,7 +64,7 @@ static void SetDefaultSysMenu (char *menu, int pos);
static void SetTrayIcon (char *fname);
static void OpenMenu(char *menuname);
-static void AddMenuLine(char *name, MENUCOMMANDTYPE cmd, char *param);
+static void AddMenuLine(const char *name, MENUCOMMANDTYPE cmd, const char *param);
static void CloseMenu(void);
static void OpenIcons(void);
@@ -79,9 +79,10 @@ static void OpenSysMenu(void);
static void AddSysMenuLine(char *matchstr, char *menuname, int pos);
static void CloseSysMenu(void);
-static int yyerror (char *s);
+static int yyerror (const char *s);
extern char *yytext;
+extern int yylineno;
extern int yylex(void);
%}
@@ -252,10 +253,8 @@ debug: DEBUGOUTPUT STRING NEWLINE { ErrorF("LoadPreferences: %s\n", $2); free($
* Errors in parsing abort and print log messages
*/
static int
-yyerror (char *s)
+yyerror (const char *s)
{
- extern int yylineno; /* Handled by flex internally */
-
ErrorF("LoadPreferences: %s line %d\n", s, yylineno);
return 1;
}
@@ -308,7 +307,7 @@ OpenMenu (char *menuname)
}
static void
-AddMenuLine (char *text, MENUCOMMANDTYPE cmd, char *param)
+AddMenuLine (const char *text, MENUCOMMANDTYPE cmd, const char *param)
{
if (menu.menuItem==NULL)
menu.menuItem = malloc(sizeof(MENUITEM));
diff --git a/xorg-server/hw/xwin/winscrinit.c b/xorg-server/hw/xwin/winscrinit.c
index ed1773c11..ce0aada31 100644
--- a/xorg-server/hw/xwin/winscrinit.c
+++ b/xorg-server/hw/xwin/winscrinit.c
@@ -185,7 +185,7 @@ winScreenInit(ScreenPtr pScreen, int argc, char **argv)
/* Are we using multiple monitors? */
if (pScreenInfo->fMultipleMonitors) {
- /*
+ /*
* In this case, some of the defaults set in
* winInitializeScreenDefaults() are not correct ...
*/
@@ -345,7 +345,7 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
pVisual->vid != pScreen->rootVisual; pVisual++);
pScreenPriv->pRootVisual = pVisual;
- /*
+ /*
* Setup points to the block and wakeup handlers. Pass a pointer
* to the current screen as pWakeupdata.
*/
diff --git a/xorg-server/hw/xwin/winshaddd.c b/xorg-server/hw/xwin/winshaddd.c
index 5f3b658fb..4904eb440 100644
--- a/xorg-server/hw/xwin/winshaddd.c
+++ b/xorg-server/hw/xwin/winshaddd.c
@@ -173,7 +173,7 @@ winReleasePrimarySurfaceShadowDD(ScreenPtr pScreen)
/*
* Create a DirectDraw surface for the shadow framebuffer; also create
* a primary surface object so we can blit to the display.
- *
+ *
* Install a DirectDraw clipper on our primary surface object
* that clips our blits to the unobscured client area of our display window.
*/
@@ -518,7 +518,7 @@ winShadowUpdateDD(ScreenPtr pScreen, shadowBufPtr pBuf)
/*
* Handle small regions with multiple blits,
- * handle large regions by creating a clipping region and
+ * handle large regions by creating a clipping region and
* doing a single blit constrained to that clipping region.
*/
if (pScreenInfo->dwClipUpdatesNBoxes == 0
@@ -619,7 +619,7 @@ winInitScreenShadowDD(ScreenPtr pScreen)
/*
* Call the wrapped CloseScreen function.
- *
+ *
* Free our resources and private structures.
*/
@@ -683,7 +683,7 @@ winCloseScreenShadowDD(ScreenPtr pScreen)
/*
* Tell mi what sort of visuals we need.
- *
+ *
* Generally we only need one visual, as our screen can only
* handle one format at a time, I believe. You may want
* to verify that last sentence.
diff --git a/xorg-server/hw/xwin/winshadddnl.c b/xorg-server/hw/xwin/winshadddnl.c
index cb326dc81..48599b266 100644
--- a/xorg-server/hw/xwin/winshadddnl.c
+++ b/xorg-server/hw/xwin/winshadddnl.c
@@ -184,7 +184,7 @@ winReleasePrimarySurfaceShadowDDNL(ScreenPtr pScreen)
/*
* Create a DirectDraw surface for the shadow framebuffer; also create
* a primary surface object so we can blit to the display.
- *
+ *
* Install a DirectDraw clipper on our primary surface object
* that clips our blits to the unobscured client area of our display window.
*/
@@ -216,7 +216,7 @@ winAllocateFBShadowDDNL(ScreenPtr pScreen)
}
/*
- * Initialize the framebuffer memory so we don't get a
+ * Initialize the framebuffer memory so we don't get a
* strange display at startup
*/
ZeroMemory(lpSurface, pScreenInfo->dwPaddedWidth * pScreenInfo->dwHeight);
@@ -545,7 +545,7 @@ winShadowUpdateDDNL(ScreenPtr pScreen, shadowBufPtr pBuf)
/*
* Handle small regions with multiple blits,
- * handle large regions by creating a clipping region and
+ * handle large regions by creating a clipping region and
* doing a single blit constrained to that clipping region.
*/
if (pScreenInfo->dwClipUpdatesNBoxes == 0
@@ -988,7 +988,7 @@ winRedrawScreenShadowDDNL(ScreenPtr pScreen)
/* Return immediately if we didn't get needed surfaces */
if (!pScreenPriv->pddsPrimary4 || !pScreenPriv->pddsShadow4)
- return;
+ return FALSE;
/* Get the origin of the window in the screen coords */
ptOrigin.x = pScreenInfo->dwXOffset;
diff --git a/xorg-server/hw/xwin/winshadgdi.c b/xorg-server/hw/xwin/winshadgdi.c
index 5c815eb73..3d222ad4b 100644
--- a/xorg-server/hw/xwin/winshadgdi.c
+++ b/xorg-server/hw/xwin/winshadgdi.c
@@ -155,7 +155,7 @@ winQueryRGBBitsAndMasks(ScreenPtr pScreen)
/* Color masks for 8 bpp are standardized */
if (GetDeviceCaps(pScreenPriv->hdcScreen, RASTERCAPS) & RC_PALETTE) {
- /*
+ /*
* RGB BPP for 8 bit palletes is always 8
* and the color masks are always 0.
*/
@@ -381,7 +381,7 @@ winAllocateFBShadowGDI(ScreenPtr pScreen)
#if 0
return FALSE;
#else
- /* ago: ignore this error. The blit fails with wine, but does not
+ /* ago: ignore this error. The blit fails with wine, but does not
* cause any problems later. */
fReturn = TRUE;
@@ -474,7 +474,7 @@ winShadowUpdateGDI(ScreenPtr pScreen, shadowBufPtr pBuf)
/*
* Handle small regions with multiple blits,
- * handle large regions by creating a clipping region and
+ * handle large regions by creating a clipping region and
* doing a single blit constrained to that clipping region.
*/
if (!pScreenInfo->fMultiWindow &&
@@ -634,7 +634,7 @@ winCloseScreenShadowGDI(ScreenPtr pScreen)
/*
* Tell mi what sort of visuals we need.
- *
+ *
* Generally we only need one visual, as our screen can only
* handle one format at a time, I believe. You may want
* to verify that last sentence.
@@ -815,7 +815,7 @@ winActivateAppShadowGDI(ScreenPtr pScreen)
*/
if (pScreenPriv->fActive && pScreenInfo->fFullScreen) {
/*
- * Activating, attempt to bring our window
+ * Activating, attempt to bring our window
* to the top of the display
*/
ShowWindow(pScreenPriv->hwndScreen, SW_RESTORE);
diff --git a/xorg-server/hw/xwin/winwin32rootlesswndproc.c b/xorg-server/hw/xwin/winwin32rootlesswndproc.c
index 001d0d2fc..f65811c9a 100644
--- a/xorg-server/hw/xwin/winwin32rootlesswndproc.c
+++ b/xorg-server/hw/xwin/winwin32rootlesswndproc.c
@@ -147,7 +147,7 @@ ConstrainSize(WinXSizeHints hints, int *widthp, int *heightp)
*
* minAspectX * dheight > minAspectY * dwidth
* maxAspectX * dheight < maxAspectY * dwidth
- *
+ *
*/
if (hints.flags & PAspect) {
diff --git a/xorg-server/hw/xwin/winwindowswm.c b/xorg-server/hw/xwin/winwindowswm.c
index 2805ff7ce..db41d6b60 100644
--- a/xorg-server/hw/xwin/winwindowswm.c
+++ b/xorg-server/hw/xwin/winwindowswm.c
@@ -284,7 +284,7 @@ ProcWindowsWMReenableUpdate(ClientPtr client)
{
REQUEST_SIZE_MATCH(xWindowsWMReenableUpdateReq);
- //winEnableUpdate();
+ //winEnableUpdate();
return Success;
}
diff --git a/xorg-server/hw/xwin/winwndproc.c b/xorg-server/hw/xwin/winwndproc.c
index 1b0992186..0c434c927 100644
--- a/xorg-server/hw/xwin/winwndproc.c
+++ b/xorg-server/hw/xwin/winwndproc.c
@@ -403,7 +403,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
/*
- * NOTE: Scrollbars may have moved if they were at the
+ * NOTE: Scrollbars may have moved if they were at the
* far right/bottom, so we query their current position.
*/
@@ -621,7 +621,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
int iBorderHeight, iBorderWidth;
#if CYGDEBUG
- winDebug("winWindowProc - WM_GETMINMAXINFO - pScreenInfo: %08x\n",
+ winDebug("winWindowProc - WM_GETMINMAXINFO - pScreenInfo: %p\n",
s_pScreenInfo);
#endif
@@ -1053,12 +1053,12 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
if (winIsFakeCtrl_L(message, wParam, lParam))
return 0;
- /*
+ /*
* Discard presses generated from Windows auto-repeat
*/
if (lParam & (1 << 30)) {
switch (wParam) {
- /* ago: Pressing LControl while RControl is pressed is
+ /* ago: Pressing LControl while RControl is pressed is
* Indicated as repeat. Fix this!
*/
case VK_CONTROL:
diff --git a/xorg-server/include/closure.h b/xorg-server/include/closure.h
index 0a7dae6ae..0d941dfe9 100644
--- a/xorg-server/include/closure.h
+++ b/xorg-server/include/closure.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/colormap.h b/xorg-server/include/colormap.h
index b89bbe114..5f6b97fec 100644
--- a/xorg-server/include/colormap.h
+++ b/xorg-server/include/colormap.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/colormapst.h b/xorg-server/include/colormapst.h
index ac0c62e70..53b61cb22 100644
--- a/xorg-server/include/colormapst.h
+++ b/xorg-server/include/colormapst.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/cursor.h b/xorg-server/include/cursor.h
index 1e483ac40..281d88ba0 100644
--- a/xorg-server/include/cursor.h
+++ b/xorg-server/include/cursor.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/cursorstr.h b/xorg-server/include/cursorstr.h
index 2157954c9..221cd7034 100644
--- a/xorg-server/include/cursorstr.h
+++ b/xorg-server/include/cursorstr.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -49,7 +49,7 @@ SOFTWARE.
#include "cursor.h"
#include "privates.h"
-/*
+/*
* device-independent cursor storage
*/
diff --git a/xorg-server/include/dbus-core.h b/xorg-server/include/dbus-core.h
index b2d6d1b9e..d6260dc66 100644
--- a/xorg-server/include/dbus-core.h
+++ b/xorg-server/include/dbus-core.h
@@ -27,7 +27,7 @@
#define DBUS_CORE_H
#ifdef NEED_DBUS
-typedef struct DBusConnection DBusConnection;
+#include <dbus/dbus.h>
typedef void (*dbus_core_connect_hook) (DBusConnection * connection,
void *data);
diff --git a/xorg-server/include/dix.h b/xorg-server/include/dix.h
index 116da2e2c..991a3ce88 100644
--- a/xorg-server/include/dix.h
+++ b/xorg-server/include/dix.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/extension.h b/xorg-server/include/extension.h
index 7c09af150..a4c09dee1 100644
--- a/xorg-server/include/extension.h
+++ b/xorg-server/include/extension.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/extnsionst.h b/xorg-server/include/extnsionst.h
index fbdb73c53..636f0a891 100644
--- a/xorg-server/include/extnsionst.h
+++ b/xorg-server/include/extnsionst.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -72,7 +72,7 @@ typedef struct _ExtensionEntry {
PrivateRec *devPrivates;
} ExtensionEntry;
-/*
+/*
* The arguments may be different for extension event swapping functions.
* Deal with this by casting when initializing the event's EventSwapVector[]
* entries.
diff --git a/xorg-server/include/gc.h b/xorg-server/include/gc.h
index eb0a5835e..53f9c29e1 100644
--- a/xorg-server/include/gc.h
+++ b/xorg-server/include/gc.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/gcstruct.h b/xorg-server/include/gcstruct.h
index 6358b8cb7..e48d61045 100644
--- a/xorg-server/include/gcstruct.h
+++ b/xorg-server/include/gcstruct.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -254,16 +254,15 @@ typedef struct _GC {
unsigned int arcMode:1;
unsigned int subWindowMode:1;
unsigned int graphicsExposures:1;
- unsigned int clientClipType:2; /* CT_<kind> */
unsigned int miTranslate:1; /* should mi things translate? */
unsigned int tileIsPixel:1; /* tile is solid pixel */
unsigned int fExpose:1; /* Call exposure handling */
unsigned int freeCompClip:1; /* Free composite clip */
unsigned int scratch_inuse:1; /* is this GC in a pool for reuse? */
- unsigned int unused:13; /* see comment above */
- unsigned long planemask;
- unsigned long fgPixel;
- unsigned long bgPixel;
+ unsigned int unused:15; /* see comment above */
+ unsigned int planemask;
+ unsigned int fgPixel;
+ unsigned int bgPixel;
/*
* alas -- both tile and stipple must be here as they
* are independently specifiable
@@ -271,11 +270,11 @@ typedef struct _GC {
PixUnion tile;
PixmapPtr stipple;
DDXPointRec patOrg; /* origin for (tile, stipple) */
- struct _Font *font;
DDXPointRec clipOrg;
- void *clientClip;
- unsigned long stateChanges; /* masked with GC_<kind> */
- unsigned long serialNumber;
+ struct _Font *font;
+ RegionPtr clientClip;
+ unsigned int stateChanges; /* masked with GC_<kind> */
+ unsigned int serialNumber;
const GCFuncs *funcs;
const GCOps *ops;
PrivateRec *devPrivates;
diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h
index 35ceafa88..bf22dc7ee 100644
--- a/xorg-server/include/input.h
+++ b/xorg-server/include/input.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/inputstr.h b/xorg-server/include/inputstr.h
index f6cfb049d..568f5f991 100644
--- a/xorg-server/include/inputstr.h
+++ b/xorg-server/include/inputstr.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -159,7 +159,7 @@ typedef struct _OtherInputMasks {
*/
#define MasksPerDetailMask 8 /* 256 keycodes and 256 possible
- modifier combinations, but only
+ modifier combinations, but only
3 buttons. */
typedef struct _DetailRec { /* Grab details may be bit masks */
@@ -174,9 +174,9 @@ union _GrabMask {
};
/**
- * Central struct for device grabs.
+ * Central struct for device grabs.
* The same struct is used for both core grabs and device grabs, with
- * different fields being set.
+ * different fields being set.
* If the grab is a core grab (GrabPointer/GrabKeyboard), then the eventMask
* is a combination of standard event masks (i.e. PointerMotionMask |
* ButtonPressMask).
diff --git a/xorg-server/include/list.h b/xorg-server/include/list.h
index 455c670d3..39f198590 100644
--- a/xorg-server/include/list.h
+++ b/xorg-server/include/list.h
@@ -117,7 +117,7 @@ struct xorg_list {
* Example:
* xorg_list_init(&bar->list_of_foos);
*
- * @param The list to initialized.
+ * @param list The list to initialize
*/
static inline void
xorg_list_init(struct xorg_list *list)
diff --git a/xorg-server/include/misc.h b/xorg-server/include/misc.h
index 9c2f573b9..9b1c03a67 100644
--- a/xorg-server/include/misc.h
+++ b/xorg-server/include/misc.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -43,7 +43,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
Copyright 1992, 1993 Data General Corporation;
-Copyright 1992, 1993 OMRON Corporation
+Copyright 1992, 1993 OMRON Corporation
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that the
@@ -51,9 +51,9 @@ above copyright notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting documentation, and that
neither the name OMRON or DATA GENERAL be used in advertising or publicity
pertaining to distribution of the software without specific, written prior
-permission of the party whose name is to be used. Neither OMRON or
+permission of the party whose name is to be used. Neither OMRON or
DATA GENERAL make any representation about the suitability of this software
-for any purpose. It is provided "as is" without express or implied warranty.
+for any purpose. It is provided "as is" without express or implied warranty.
OMRON AND DATA GENERAL EACH DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
@@ -67,7 +67,7 @@ OF THIS SOFTWARE.
#ifndef MISC_H
#define MISC_H 1
/*
- * X internal definitions
+ * X internal definitions
*
*/
@@ -138,7 +138,7 @@ lswapl(uint32_t x)
static inline uint16_t
lswaps(uint16_t x)
{
- return ((x & 0xff) << 8) | ((x >> 8) & 0xff);
+ return (uint16_t)((x & 0xff) << 8) | ((x >> 8) & 0xff);
}
#undef min
diff --git a/xorg-server/include/miscstruct.h b/xorg-server/include/miscstruct.h
index dbab10f08..589a6cbaa 100644
--- a/xorg-server/include/miscstruct.h
+++ b/xorg-server/include/miscstruct.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/os.h b/xorg-server/include/os.h
index e4ec4b1b8..3e68c4933 100644
--- a/xorg-server/include/os.h
+++ b/xorg-server/include/os.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/pixmap.h b/xorg-server/include/pixmap.h
index 4b8fc244d..9656c3ade 100644
--- a/xorg-server/include/pixmap.h
+++ b/xorg-server/include/pixmap.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/pixmapstr.h b/xorg-server/include/pixmapstr.h
index 2bdff98d9..380e48335 100644
--- a/xorg-server/include/pixmapstr.h
+++ b/xorg-server/include/pixmapstr.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -67,7 +67,7 @@ typedef struct _Drawable {
} DrawableRec;
/*
- * PIXMAP -- device dependent
+ * PIXMAP -- device dependent
*/
typedef struct _Pixmap {
diff --git a/xorg-server/include/property.h b/xorg-server/include/property.h
index cae44719b..e350513a4 100644
--- a/xorg-server/include/property.h
+++ b/xorg-server/include/property.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/propertyst.h b/xorg-server/include/propertyst.h
index da995769c..d8ca840a0 100644
--- a/xorg-server/include/propertyst.h
+++ b/xorg-server/include/propertyst.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -49,7 +49,7 @@ SOFTWARE.
#include "misc.h"
#include "property.h"
#include "privates.h"
-/*
+/*
* PROPERTY -- property element
*/
diff --git a/xorg-server/include/region.h b/xorg-server/include/region.h
index 11dd59e98..14d283f88 100644
--- a/xorg-server/include/region.h
+++ b/xorg-server/include/region.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/regionstr.h b/xorg-server/include/regionstr.h
index 4a0725d62..515e93ffa 100644
--- a/xorg-server/include/regionstr.h
+++ b/xorg-server/include/regionstr.h
@@ -125,7 +125,7 @@ RegionEnd(RegionPtr reg)
}
static inline size_t
-RegionSizeof(int n)
+RegionSizeof(size_t n)
{
return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
}
diff --git a/xorg-server/include/resource.h b/xorg-server/include/resource.h
index fe56bb2a7..772f363b0 100644
--- a/xorg-server/include/resource.h
+++ b/xorg-server/include/resource.h
@@ -26,13 +26,13 @@ Copyright 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -50,7 +50,7 @@ SOFTWARE.
#include "dixaccess.h"
/*****************************************************************
- * STUFF FOR RESOURCES
+ * STUFF FOR RESOURCES
*****************************************************************/
/* classes for Resource routines */
diff --git a/xorg-server/include/rgb.h b/xorg-server/include/rgb.h
index ddfb1d814..449bc54f0 100644
--- a/xorg-server/include/rgb.h
+++ b/xorg-server/include/rgb.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/screenint.h b/xorg-server/include/screenint.h
index e61cd33ed..e38384873 100644
--- a/xorg-server/include/screenint.h
+++ b/xorg-server/include/screenint.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/scrnintstr.h b/xorg-server/include/scrnintstr.h
index 269ff5a0c..faf05630c 100644
--- a/xorg-server/include/scrnintstr.h
+++ b/xorg-server/include/scrnintstr.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/selection.h b/xorg-server/include/selection.h
index 37e4f5e64..7a516f14a 100644
--- a/xorg-server/include/selection.h
+++ b/xorg-server/include/selection.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -51,7 +51,7 @@ SOFTWARE.
#include "privates.h"
/*
- * Selection data structures
+ * Selection data structures
*/
typedef struct _Selection {
diff --git a/xorg-server/include/servermd.h b/xorg-server/include/servermd.h
index c88a5428d..a3b5c3af3 100644
--- a/xorg-server/include/servermd.h
+++ b/xorg-server/include/servermd.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -86,7 +86,7 @@ SOFTWARE.
#endif
#include <X11/Xfuncproto.h>
-/*
+/*
* This returns the number of padding units, for depth d and width w.
* For bitmaps this can be calculated with the macros above.
* Other depths require either grovelling over the formats field of the
diff --git a/xorg-server/include/site.h b/xorg-server/include/site.h
index 25caabbb3..9bd8e2f12 100644
--- a/xorg-server/include/site.h
+++ b/xorg-server/include/site.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -66,8 +66,8 @@ SOFTWARE.
/*
* The following constants are provided solely as a last line of defense. The
* normal build ALWAYS overrides them using a special rule given in
- * server/dix/Imakefile. If you want to change either of these constants,
- * you should set the DefaultFontPath or DefaultRGBDatabase configuration
+ * server/dix/Imakefile. If you want to change either of these constants,
+ * you should set the DefaultFontPath or DefaultRGBDatabase configuration
* parameters.
* DO NOT CHANGE THESE VALUES OR THE DIX IMAKEFILE!
*/
@@ -76,7 +76,7 @@ SOFTWARE.
#endif
/*
- * The following constants contain default values for all of the variables
+ * The following constants contain default values for all of the variables
* that can be initialized on the server command line or in the environment.
*/
#define COMPILEDDEFAULTFONT "fixed"
diff --git a/xorg-server/include/window.h b/xorg-server/include/window.h
index c123728f0..6daec8599 100644
--- a/xorg-server/include/window.h
+++ b/xorg-server/include/window.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/windowstr.h b/xorg-server/include/windowstr.h
index 740f4a6c0..53eef376e 100644
--- a/xorg-server/include/windowstr.h
+++ b/xorg-server/include/windowstr.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/include/xkbfile.h b/xorg-server/include/xkbfile.h
index 9f3b04c30..f93d31ab0 100644
--- a/xorg-server/include/xkbfile.h
+++ b/xorg-server/include/xkbfile.h
@@ -6,19 +6,19 @@
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
- documentation, and that the name of Silicon Graphics not be
- used in advertising or publicity pertaining to distribution
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
- Silicon Graphics makes no representation about the suitability
+ Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-
- SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/include/xkbsrv.h b/xorg-server/include/xkbsrv.h
index a4878fc9e..cc6307af5 100644
--- a/xorg-server/include/xkbsrv.h
+++ b/xorg-server/include/xkbsrv.h
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/include/xkbstr.h b/xorg-server/include/xkbstr.h
index 935330c7c..8d715577a 100644
--- a/xorg-server/include/xkbstr.h
+++ b/xorg-server/include/xkbstr.h
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -417,7 +417,7 @@ typedef struct _XkbKeyAliasRec {
} XkbKeyAliasRec, *XkbKeyAliasPtr;
/*
- * Names for everything
+ * Names for everything
*/
typedef struct _XkbNamesRec {
Atom keycodes;
@@ -554,7 +554,7 @@ typedef struct _XkbChanges {
} XkbChangesRec, *XkbChangesPtr;
/*
- * These data structures are used to construct a keymap from
+ * These data structures are used to construct a keymap from
* a set of components or to list components in the server
* database.
*/
@@ -587,8 +587,8 @@ typedef struct _XkbComponentList {
} XkbComponentListRec, *XkbComponentListPtr;
/*
- * The following data structures describe and track changes to a
- * non-keyboard extension device
+ * The following data structures describe and track changes to a
+ * non-keyboard extension device
*/
typedef struct _XkbDeviceLedInfo {
unsigned short led_class;
diff --git a/xorg-server/include/xsha1.h b/xorg-server/include/xsha1.h
index aab71067a..60c6a9004 100644
--- a/xorg-server/include/xsha1.h
+++ b/xorg-server/include/xsha1.h
@@ -12,7 +12,7 @@ int x_sha1_update(void *ctx, void *data, int size);
/*
* Place the hash in result, and free ctx.
- * Returns 0 on error, 1 on success.
+ * Returns 0 on error, 1 on success.
*/
int x_sha1_final(void *ctx, unsigned char result[20]);
diff --git a/xorg-server/mi/Makefile.am b/xorg-server/mi/Makefile.am
index 0cef7798f..110c3f5dd 100644
--- a/xorg-server/mi/Makefile.am
+++ b/xorg-server/mi/Makefile.am
@@ -2,8 +2,8 @@ noinst_LTLIBRARIES = libmi.la
if XORG
sdk_HEADERS = micmap.h miline.h mipointer.h mi.h \
- migc.h mipointrst.h mizerarc.h micoord.h mifillarc.h \
- mispans.h miwideline.h mistruct.h mifpoly.h mioverlay.h
+ migc.h mipointrst.h mizerarc.h micoord.h \
+ mistruct.h mioverlay.h
endif
AM_CFLAGS = $(DIX_CFLAGS)
@@ -16,7 +16,6 @@ libmi_la_SOURCES = \
micmap.h \
micoord.h \
micopy.c \
- micursor.c \
midash.c \
midispcur.c \
mieq.c \
@@ -24,7 +23,6 @@ libmi_la_SOURCES = \
mifillarc.c \
mifillarc.h \
mifillrct.c \
- mifpolycon.c \
mifpoly.h \
migc.c \
migc.h \
@@ -37,18 +35,13 @@ libmi_la_SOURCES = \
mipointrst.h \
mipoly.c \
mipoly.h \
- mipolycon.c \
- mipolygen.c \
mipolypnt.c \
mipolyrect.c \
mipolyseg.c \
mipolytext.c \
- mipolyutil.c \
mipushpxl.c \
miscanfill.h \
miscrinit.c \
- mispans.c \
- mispans.h \
misprite.c \
misprite.h \
mistruct.h \
diff --git a/xorg-server/mi/mi.h b/xorg-server/mi/mi.h
index 5a455c910..db62c9166 100644
--- a/xorg-server/mi/mi.h
+++ b/xorg-server/mi/mi.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -288,22 +288,6 @@ extern _X_EXPORT void miFillPolygon(DrawablePtr /*dst */ ,
DDXPointPtr /*pPts */
);
-/* mipolycon.c */
-
-extern _X_EXPORT Bool miFillConvexPoly(DrawablePtr /*dst */ ,
- GCPtr /*pgc */ ,
- int /*count */ ,
- DDXPointPtr /*ptsIn */
- );
-
-/* mipolygen.c */
-
-extern _X_EXPORT Bool miFillGeneralPoly(DrawablePtr /*dst */ ,
- GCPtr /*pgc */ ,
- int /*count */ ,
- DDXPointPtr /*ptsIn */
- );
-
/* mipolypnt.c */
extern _X_EXPORT void miPolyPoint(DrawablePtr /*pDrawable */ ,
diff --git a/xorg-server/mi/miarc.c b/xorg-server/mi/miarc.c
index e55108a44..e8bc87e3e 100644
--- a/xorg-server/mi/miarc.c
+++ b/xorg-server/mi/miarc.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -63,6 +63,22 @@ SOFTWARE.
#include "mifillarc.h"
#include <X11/Xfuncproto.h>
+#define EPSILON 0.000001
+#define ISEQUAL(a,b) (fabs((a) - (b)) <= EPSILON)
+#define UNEQUAL(a,b) (fabs((a) - (b)) > EPSILON)
+#define PTISEQUAL(a,b) (ISEQUAL(a.x,b.x) && ISEQUAL(a.y,b.y))
+#define SQSECANT 108.856472512142 /* 1/sin^2(11/2) - for 11o miter cutoff */
+
+/* Point with sub-pixel positioning. */
+typedef struct _SppPoint {
+ double x, y;
+} SppPointRec, *SppPointPtr;
+
+typedef struct _SppArc {
+ double x, y, width, height;
+ double angle1, angle2;
+} SppArcRec, *SppArcPtr;
+
static double miDsin(double a);
static double miDcos(double a);
static double miDasin(double v);
@@ -82,7 +98,7 @@ cbrt(double x)
/*
* some interesting sematic interpretation of the protocol:
*
- * Self intersecting arcs (i.e. those spanning 360 degrees)
+ * Self intersecting arcs (i.e. those spanning 360 degrees)
* never join with other arcs, and are drawn without caps
* (unless on/off dashed, in which case each dash segment
* is capped, except when the last segment meets the
@@ -99,21 +115,6 @@ cbrt(double x)
*
*/
-#undef max
-#undef min
-
-_X_INLINE static int
-max(const int x, const int y)
-{
- return x > y ? x : y;
-}
-
-_X_INLINE static int
-min(const int x, const int y)
-{
- return x < y ? x : y;
-}
-
struct bound {
double min, max;
};
@@ -353,7 +354,7 @@ of the two quadratics
y^2 + ((b+A)/2)y + (Z + (bZ - d)/A) = 0
-where
+where
A = +/- sqrt(8Z + b^2 - 4c)
b, c, d are the cubic, quadratic, and linear coefficients of the quartic
@@ -1110,6 +1111,195 @@ miWideArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs)
}
}
+/* Find the index of the point with the smallest y.also return the
+ * smallest and largest y */
+static int
+GetFPolyYBounds(SppPointPtr pts, int n, double yFtrans, int *by, int *ty)
+{
+ SppPointPtr ptMin;
+ double ymin, ymax;
+ SppPointPtr ptsStart = pts;
+
+ ptMin = pts;
+ ymin = ymax = (pts++)->y;
+
+ while (--n > 0) {
+ if (pts->y < ymin) {
+ ptMin = pts;
+ ymin = pts->y;
+ }
+ if (pts->y > ymax)
+ ymax = pts->y;
+
+ pts++;
+ }
+
+ *by = ICEIL(ymin + yFtrans);
+ *ty = ICEIL(ymax + yFtrans - 1);
+ return ptMin - ptsStart;
+}
+
+/*
+ * miFillSppPoly written by Todd Newman; April. 1987.
+ *
+ * Fill a convex polygon. If the given polygon
+ * is not convex, then the result is undefined.
+ * The algorithm is to order the edges from smallest
+ * y to largest by partitioning the array into a left
+ * edge list and a right edge list. The algorithm used
+ * to traverse each edge is digital differencing analyzer
+ * line algorithm with y as the major axis. There's some funny linear
+ * interpolation involved because of the subpixel postioning.
+ */
+static void
+miFillSppPoly(DrawablePtr dst, GCPtr pgc, int count, /* number of points */
+ SppPointPtr ptsIn, /* the points */
+ int xTrans, int yTrans, /* Translate each point by this */
+ double xFtrans, double yFtrans /* translate before conversion
+ by this amount. This provides
+ a mechanism to match rounding
+ errors with any shape that must
+ meet the polygon exactly.
+ */
+ )
+{
+ double xl = 0.0, xr = 0.0, /* x vals of left and right edges */
+ ml = 0.0, /* left edge slope */
+ mr = 0.0, /* right edge slope */
+ dy, /* delta y */
+ i; /* loop counter */
+ int y, /* current scanline */
+ j, imin, /* index of vertex with smallest y */
+ ymin, /* y-extents of polygon */
+ ymax, *width, *FirstWidth, /* output buffer */
+ *Marked; /* set if this vertex has been used */
+ int left, right, /* indices to first endpoints */
+ nextleft, nextright; /* indices to second endpoints */
+ DDXPointPtr ptsOut, FirstPoint; /* output buffer */
+
+ if (pgc->miTranslate) {
+ xTrans += dst->x;
+ yTrans += dst->y;
+ }
+
+ imin = GetFPolyYBounds(ptsIn, count, yFtrans, &ymin, &ymax);
+
+ y = ymax - ymin + 1;
+ if ((count < 3) || (y <= 0))
+ return;
+ ptsOut = FirstPoint = malloc(sizeof(DDXPointRec) * y);
+ width = FirstWidth = malloc(sizeof(int) * y);
+ Marked = malloc(sizeof(int) * count);
+
+ if (!ptsOut || !width || !Marked) {
+ free(Marked);
+ free(width);
+ free(ptsOut);
+ return;
+ }
+
+ for (j = 0; j < count; j++)
+ Marked[j] = 0;
+ nextleft = nextright = imin;
+ Marked[imin] = -1;
+ y = ICEIL(ptsIn[nextleft].y + yFtrans);
+
+ /*
+ * loop through all edges of the polygon
+ */
+ do {
+ /* add a left edge if we need to */
+ if ((y > (ptsIn[nextleft].y + yFtrans) ||
+ ISEQUAL(y, ptsIn[nextleft].y + yFtrans)) &&
+ Marked[nextleft] != 1) {
+ Marked[nextleft]++;
+ left = nextleft++;
+
+ /* find the next edge, considering the end conditions */
+ if (nextleft >= count)
+ nextleft = 0;
+
+ /* now compute the starting point and slope */
+ dy = ptsIn[nextleft].y - ptsIn[left].y;
+ if (dy != 0.0) {
+ ml = (ptsIn[nextleft].x - ptsIn[left].x) / dy;
+ dy = y - (ptsIn[left].y + yFtrans);
+ xl = (ptsIn[left].x + xFtrans) + ml * max(dy, 0);
+ }
+ }
+
+ /* add a right edge if we need to */
+ if ((y > ptsIn[nextright].y + yFtrans) ||
+ (ISEQUAL(y, ptsIn[nextright].y + yFtrans)
+ && Marked[nextright] != 1)) {
+ Marked[nextright]++;
+ right = nextright--;
+
+ /* find the next edge, considering the end conditions */
+ if (nextright < 0)
+ nextright = count - 1;
+
+ /* now compute the starting point and slope */
+ dy = ptsIn[nextright].y - ptsIn[right].y;
+ if (dy != 0.0) {
+ mr = (ptsIn[nextright].x - ptsIn[right].x) / dy;
+ dy = y - (ptsIn[right].y + yFtrans);
+ xr = (ptsIn[right].x + xFtrans) + mr * max(dy, 0);
+ }
+ }
+
+ /*
+ * generate scans to fill while we still have
+ * a right edge as well as a left edge.
+ */
+ i = (min(ptsIn[nextleft].y, ptsIn[nextright].y) + yFtrans) - y;
+
+ if (i < EPSILON) {
+ if (Marked[nextleft] && Marked[nextright]) {
+ /* Arrgh, we're trapped! (no more points)
+ * Out, we've got to get out of here before this decadence saps
+ * our will completely! */
+ break;
+ }
+ continue;
+ }
+ else {
+ j = (int) i;
+ if (!j)
+ j++;
+ }
+ while (j > 0) {
+ int cxl, cxr;
+
+ ptsOut->y = (y) + yTrans;
+
+ cxl = ICEIL(xl);
+ cxr = ICEIL(xr);
+ /* reverse the edges if necessary */
+ if (xl < xr) {
+ *(width++) = cxr - cxl;
+ (ptsOut++)->x = cxl + xTrans;
+ }
+ else {
+ *(width++) = cxl - cxr;
+ (ptsOut++)->x = cxr + xTrans;
+ }
+ y++;
+
+ /* increment down the edges */
+ xl += ml;
+ xr += mr;
+ j--;
+ }
+ } while (y <= ymax);
+
+ /* Finally, fill the spans we've collected */
+ (*pgc->ops->FillSpans) (dst, pgc,
+ ptsOut - FirstPoint, FirstPoint, FirstWidth, 1);
+ free(Marked);
+ free(FirstWidth);
+ free(FirstPoint);
+}
static double
angleBetween(SppPointRec center, SppPointRec point1, SppPointRec point2)
{
@@ -1291,7 +1481,7 @@ miArcCap(DrawablePtr pDraw,
/* MIROUNDCAP -- a private helper function
* Put Rounded cap on end. pCenter is the center of this end of the line
* pEnd is the center of the other end of the line. pCorner is one of the
- * two corners at this end of the line.
+ * two corners at this end of the line.
* NOTE: pOtherCorner must be counter-clockwise from pCorner.
*/
/*ARGSUSED*/ static void
@@ -1443,7 +1633,7 @@ miDatan2(double dy, double dx)
* array. (For example, if we want to leave a spare point to make sectors
* instead of segments.) So we pass in the malloc()ed chunk that contains the
* array and an index saying where we should start stashing the points.
- * If there isn't an array already, we just pass in a null pointer and
+ * If there isn't an array already, we just pass in a null pointer and
* count on realloc() to handle the null pointer correctly.
*/
static int
@@ -1462,7 +1652,7 @@ miGetArcPts(SppArcPtr parc, /* points to an arc */
SppPointPtr poly;
/* The spec says that positive angles indicate counterclockwise motion.
- * Given our coordinate system (with 0,0 in the upper left corner),
+ * Given our coordinate system (with 0,0 in the upper left corner),
* the screen appears flipped in Y. The easiest fix is to negate the
* angles given */
@@ -2548,7 +2738,7 @@ computeBound(struct arc_def *def,
}
/*
- * this section computes the x value of the span at y
+ * this section computes the x value of the span at y
* intersected with the specified face of the ellipse.
*
* this is the min/max X value over the set of normal
@@ -2561,7 +2751,7 @@ computeBound(struct arc_def *def,
*
* compute the derivative with-respect-to ellipse_y and solve
* for zero:
- *
+ *
* (w^2 - h^2) ellipse_y^3 + h^4 y
* 0 = - ----------------------------------
* h w ellipse_y^2 sqrt (h^2 - ellipse_y^2)
@@ -2588,7 +2778,7 @@ computeBound(struct arc_def *def,
*
* or (to use accelerators),
*
- * y0^3 (h^2 - w^2) - h^2 y (3y0^2 - 2h^2)
+ * y0^3 (h^2 - w^2) - h^2 y (3y0^2 - 2h^2)
*
*/
diff --git a/xorg-server/mi/mibitblt.c b/xorg-server/mi/mibitblt.c
index 114f72d5b..724396333 100644
--- a/xorg-server/mi/mibitblt.c
+++ b/xorg-server/mi/mibitblt.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -66,7 +66,7 @@ SOFTWARE.
extern int ffs(int);
#endif
-/* MICOPYAREA -- public entry for the CopyArea request
+/* MICOPYAREA -- public entry for the CopyArea request
* For each rectangle in the source region
* get the pixels with GetSpans
* set them in the destination with SetSpans
@@ -253,7 +253,7 @@ miCopyArea(DrawablePtr pSrcDrawable,
}
/* MIGETPLANE -- gets a bitmap representing one plane of pDraw
- * A helper used for CopyPlane and XY format GetImage
+ * A helper used for CopyPlane and XY format GetImage
* No clever strategy here, we grab a scanline at a time, pull out the
* bits and then stuff them in a 1 bit deep map.
*/
@@ -358,9 +358,9 @@ miGetPlane(DrawablePtr pDraw, int planeNum, /* number of the bitPlane */
}
/* MIOPQSTIPDRAWABLE -- use pbits as an opaque stipple for pDraw.
- * Drawing through the clip mask we SetSpans() the bits into a
+ * Drawing through the clip mask we SetSpans() the bits into a
* bitmap and stipple those bits onto the destination drawable by doing a
- * PolyFillRect over the whole drawable,
+ * PolyFillRect over the whole drawable,
* then we invert the bitmap by copying it onto itself with an alu of
* GXinvert, invert the foreground/background colors of the gc, and draw
* the background bits.
@@ -504,10 +504,10 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc,
}
/* MICOPYPLANE -- public entry for the CopyPlane request.
- * strategy:
- * First build up a bitmap out of the bits requested
+ * strategy:
+ * First build up a bitmap out of the bits requested
* build a source clip
- * Use the bitmap we've built up as a Stipple for the destination
+ * Use the bitmap we've built up as a Stipple for the destination
*/
_X_COLD RegionPtr
miCopyPlane(DrawablePtr pSrcDrawable,
@@ -670,16 +670,16 @@ miGetImage(DrawablePtr pDraw, int sx, int sy, int w, int h,
/* MIPUTIMAGE -- public entry for the PutImage request
* Here we benefit from knowing the format of the bits pointed to by pImage,
- * even if we don't know how pDraw represents them.
- * Three different strategies are used depending on the format
+ * even if we don't know how pDraw represents them.
+ * Three different strategies are used depending on the format
* XYBitmap Format:
* we just use the Opaque Stipple helper function to cover the destination
- * Note that this covers all the planes of the drawable with the
+ * Note that this covers all the planes of the drawable with the
* foreground color (masked with the GC planemask) where there are 1 bits
* and the background color (masked with the GC planemask) where there are
* 0 bits
* XYPixmap format:
- * what we're called with is a series of XYBitmaps, but we only want
+ * what we're called with is a series of XYBitmaps, but we only want
* each XYPixmap to update 1 plane, instead of updating all of them.
* we set the foreground color to be all 1s and the background to all 0s
* then for each plane, we set the plane mask to only effect that one
diff --git a/xorg-server/mi/micopy.c b/xorg-server/mi/micopy.c
index a52b0a786..2409c7880 100644
--- a/xorg-server/mi/micopy.c
+++ b/xorg-server/mi/micopy.c
@@ -167,7 +167,7 @@ miDoCopy(DrawablePtr pSrcDrawable,
/* Compute source clip region */
if (pSrcDrawable->type == DRAWABLE_PIXMAP) {
- if ((pSrcDrawable == pDstDrawable) && (pGC->clientClipType == CT_NONE))
+ if ((pSrcDrawable == pDstDrawable) && (!pGC->clientClip))
prgnSrcClip = miGetCompositeClip(pGC);
else
fastSrc = TRUE;
@@ -186,8 +186,7 @@ miDoCopy(DrawablePtr pSrcDrawable,
*/
fastSrc = TRUE;
}
- else if ((pSrcDrawable == pDstDrawable) &&
- (pGC->clientClipType == CT_NONE)) {
+ else if ((pSrcDrawable == pDstDrawable) && (!pGC->clientClip)) {
prgnSrcClip = miGetCompositeClip(pGC);
}
else {
diff --git a/xorg-server/mi/micursor.c b/xorg-server/mi/micursor.c
deleted file mode 100644
index 13ce776db..000000000
--- a/xorg-server/mi/micursor.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "scrnintstr.h"
-#include "cursor.h"
-#include "misc.h"
-#include "mi.h"
-#include "inputstr.h"
-
-void
-miRecolorCursor(DeviceIntPtr pDev, ScreenPtr pScr,
- CursorPtr pCurs, Bool displayed)
-{
- /*
- * This is guaranteed to correct any color-dependent state which may have
- * been bound up in private state created by RealizeCursor
- */
- pScr->UnrealizeCursor(pDev, pScr, pCurs);
- pScr->RealizeCursor(pDev, pScr, pCurs);
- if (displayed)
- pScr->DisplayCursor(pDev, pScr, pCurs);
-}
diff --git a/xorg-server/mi/midash.c b/xorg-server/mi/midash.c
index 78cbaf25e..08f11aa38 100644
--- a/xorg-server/mi/midash.c
+++ b/xorg-server/mi/midash.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -49,7 +49,6 @@ SOFTWARE.
#include "regionstr.h"
#include "mistruct.h"
-#include "mifpoly.h"
void
miStepDash(int dist, /* distance to step */
diff --git a/xorg-server/mi/midispcur.c b/xorg-server/mi/midispcur.c
index 8cca5fe6e..50f0dd212 100644
--- a/xorg-server/mi/midispcur.c
+++ b/xorg-server/mi/midispcur.c
@@ -78,9 +78,9 @@ typedef struct {
(miDCBufferPtr)dixLookupScreenPrivate(&dev->devPrivates, miDCDeviceKey, screen) : \
(miDCBufferPtr)dixLookupScreenPrivate(&GetMaster(dev, MASTER_POINTER)->devPrivates, miDCDeviceKey, screen))
-/*
+/*
* The core pointer buffer will point to the index of the virtual pointer
- * in the pCursorBuffers array.
+ * in the pCursorBuffers array.
*/
typedef struct {
CloseScreenProcPtr CloseScreen;
diff --git a/xorg-server/mi/miexpose.c b/xorg-server/mi/miexpose.c
index de8ee6c2a..fc4dbc071 100644
--- a/xorg-server/mi/miexpose.c
+++ b/xorg-server/mi/miexpose.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -107,7 +107,7 @@ the region package can call this.
#define RECTLIMIT 25 /* pick a number, any number > 8 */
#endif
-/* miHandleExposures
+/* miHandleExposures
generate a region for exposures for areas that were copied from obscured or
non-existent areas to non-obscured areas of the destination. Paint the
background for the region, if the destination is a window.
@@ -131,8 +131,8 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
RegionRec rgnExposed; /* exposed region, calculated source-
relative, made dst relative to
intersect with visible parts of
- dest and send events to client,
- and then screen relative to paint
+ dest and send events to client,
+ and then screen relative to paint
the window background
*/
WindowPtr pSrcWin;
@@ -230,7 +230,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
RegionIntersect(&rgnExposed, &rgnExposed, prgnDstClip);
/* intersect with client clip region. */
- if (pGC->clientClipType == CT_REGION)
+ if (pGC->clientClip)
RegionIntersect(&rgnExposed, &rgnExposed, pGC->clientClip);
/*
@@ -564,7 +564,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
}
/* MICLEARDRAWABLE -- sets the entire drawable to the background color of
- * the GC. Useful when we have a scratch drawable and need to initialize
+ * the GC. Useful when we have a scratch drawable and need to initialize
* it. */
void
miClearDrawable(DrawablePtr pDraw, GCPtr pGC)
diff --git a/xorg-server/mi/mifillarc.c b/xorg-server/mi/mifillarc.c
index 08484d703..246d70ff4 100644
--- a/xorg-server/mi/mifillarc.c
+++ b/xorg-server/mi/mifillarc.c
@@ -36,7 +36,6 @@ Author: Bob Scheifler, MIT X Consortium
#include "regionstr.h"
#include "gcstruct.h"
#include "pixmapstr.h"
-#include "mifpoly.h"
#include "mi.h"
#include "mifillarc.h"
@@ -51,7 +50,7 @@ Author: Bob Scheifler, MIT X Consortium
#define Dsin(d) sin((double)d*(M_PI/11520.0))
#define Dcos(d) cos((double)d*(M_PI/11520.0))
-void
+static void
miFillArcSetup(xArc * arc, miFillArcRec * info)
{
info->y = arc->height >> 1;
@@ -277,7 +276,7 @@ miGetPieEdge(xArc * arc, int angle, miSliceEdgePtr edge, Bool top, Bool left)
miGetArcEdge(arc, edge, k, top, left);
}
-void
+static void
miFillArcSliceSetup(xArc * arc, miArcSliceRec * slice, GCPtr pGC)
{
int angle1, angle2;
diff --git a/xorg-server/mi/mifillarc.h b/xorg-server/mi/mifillarc.h
index 1478d1850..61ab2538d 100644
--- a/xorg-server/mi/mifillarc.h
+++ b/xorg-server/mi/mifillarc.h
@@ -175,13 +175,4 @@ typedef struct _miArcSlice {
#define miFillInArcLower(slw) (((iny + dy) != 0) && \
((slw > 1) || (ine != inxk)))
-extern _X_EXPORT void miFillArcSetup(xArc * /*arc */ ,
- miFillArcRec * /*info */
- );
-
-extern _X_EXPORT void miFillArcSliceSetup(xArc * /*arc */ ,
- miArcSliceRec * /*slice */ ,
- GCPtr /*pGC */
- );
-
#endif /* __MIFILLARC_H__ */
diff --git a/xorg-server/mi/mifillrct.c b/xorg-server/mi/mifillrct.c
index faf60498b..28f2322e6 100644
--- a/xorg-server/mi/mifillrct.c
+++ b/xorg-server/mi/mifillrct.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/mi/mifpoly.h b/xorg-server/mi/mifpoly.h
index f853fb46b..3202476b2 100644
--- a/xorg-server/mi/mifpoly.h
+++ b/xorg-server/mi/mifpoly.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -49,24 +49,6 @@ SOFTWARE.
#include <X11/Xfuncproto.h>
-#define EPSILON 0.000001
-#define ISEQUAL(a,b) (fabs((a) - (b)) <= EPSILON)
-#define UNEQUAL(a,b) (fabs((a) - (b)) > EPSILON)
-#define WITHINHALF(a, b) (((a) - (b) > 0.0) ? (a) - (b) < 0.5 : \
- (b) - (a) <= 0.5)
-#define ROUNDTOINT(x) ((int) (((x) > 0.0) ? ((x) + 0.5) : ((x) - 0.5)))
-#define ISZERO(x) (fabs((x)) <= EPSILON)
-#define PTISEQUAL(a,b) (ISEQUAL(a.x,b.x) && ISEQUAL(a.y,b.y))
-#define PTUNEQUAL(a,b) (UNEQUAL(a.x,b.x) || UNEQUAL(a.y,b.y))
-#define PtEqual(a, b) (((a).x == (b).x) && ((a).y == (b).y))
-
-#define NotEnd 0
-#define FirstEnd 1
-#define SecondEnd 2
-
-#define SQSECANT 108.856472512142 /* 1/sin^2(11/2) - for 11o miter cutoff */
-#define D2SECANT 5.21671526231167 /* 1/2*sin(11/2) - max extension per width */
-
static _X_INLINE int
ICEIL(double x)
{
@@ -75,28 +57,4 @@ ICEIL(double x)
return ((x == _cTmp) || (x < 0.0)) ? _cTmp : _cTmp + 1;
}
-/* Point with sub-pixel positioning. In this case we use doubles, but
- * see mifpolycon.c for other suggestions
- */
-typedef struct _SppPoint {
- double x, y;
-} SppPointRec, *SppPointPtr;
-
-typedef struct _SppArc {
- double x, y, width, height;
- double angle1, angle2;
-} SppArcRec, *SppArcPtr;
-
-/* mifpolycon.c */
-
-extern _X_EXPORT void miFillSppPoly(DrawablePtr /*dst */ ,
- GCPtr /*pgc */ ,
- int /*count */ ,
- SppPointPtr /*ptsIn */ ,
- int /*xTrans */ ,
- int /*yTrans */ ,
- double /*xFtrans */ ,
- double /*yFtrans */
- );
-
#endif /* __MIFPOLY_H__ */
diff --git a/xorg-server/mi/mifpolycon.c b/xorg-server/mi/mifpolycon.c
deleted file mode 100644
index b1337315b..000000000
--- a/xorg-server/mi/mifpolycon.c
+++ /dev/null
@@ -1,249 +0,0 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <math.h>
-#include <X11/X.h>
-#include "gcstruct.h"
-#include "windowstr.h"
-#include "pixmapstr.h"
-#include "mifpoly.h"
-
-static int GetFPolyYBounds(SppPointPtr pts, int n, double yFtrans,
- int *by, int *ty);
-
-/*
- * Written by Todd Newman; April. 1987.
- *
- * Fill a convex polygon. If the given polygon
- * is not convex, then the result is undefined.
- * The algorithm is to order the edges from smallest
- * y to largest by partitioning the array into a left
- * edge list and a right edge list. The algorithm used
- * to traverse each edge is digital differencing analyzer
- * line algorithm with y as the major axis. There's some funny linear
- * interpolation involved because of the subpixel postioning.
- */
-void
-miFillSppPoly(DrawablePtr dst, GCPtr pgc, int count, /* number of points */
- SppPointPtr ptsIn, /* the points */
- int xTrans, int yTrans, /* Translate each point by this */
- double xFtrans, double yFtrans /* translate before conversion
- by this amount. This provides
- a mechanism to match rounding
- errors with any shape that must
- meet the polygon exactly.
- */
- )
-{
- double xl = 0.0, xr = 0.0, /* x vals of left and right edges */
- ml = 0.0, /* left edge slope */
- mr = 0.0, /* right edge slope */
- dy, /* delta y */
- i; /* loop counter */
- int y, /* current scanline */
- j, imin, /* index of vertex with smallest y */
- ymin, /* y-extents of polygon */
- ymax, *width, *FirstWidth, /* output buffer */
- *Marked; /* set if this vertex has been used */
- int left, right, /* indices to first endpoints */
- nextleft, nextright; /* indices to second endpoints */
- DDXPointPtr ptsOut, FirstPoint; /* output buffer */
-
- if (pgc->miTranslate) {
- xTrans += dst->x;
- yTrans += dst->y;
- }
-
- imin = GetFPolyYBounds(ptsIn, count, yFtrans, &ymin, &ymax);
-
- y = ymax - ymin + 1;
- if ((count < 3) || (y <= 0))
- return;
- ptsOut = FirstPoint = malloc(sizeof(DDXPointRec) * y);
- width = FirstWidth = malloc(sizeof(int) * y);
- Marked = malloc(sizeof(int) * count);
-
- if (!ptsOut || !width || !Marked) {
- free(Marked);
- free(width);
- free(ptsOut);
- return;
- }
-
- for (j = 0; j < count; j++)
- Marked[j] = 0;
- nextleft = nextright = imin;
- Marked[imin] = -1;
- y = ICEIL(ptsIn[nextleft].y + yFtrans);
-
- /*
- * loop through all edges of the polygon
- */
- do {
- /* add a left edge if we need to */
- if ((y > (ptsIn[nextleft].y + yFtrans) ||
- ISEQUAL(y, ptsIn[nextleft].y + yFtrans)) &&
- Marked[nextleft] != 1) {
- Marked[nextleft]++;
- left = nextleft++;
-
- /* find the next edge, considering the end conditions */
- if (nextleft >= count)
- nextleft = 0;
-
- /* now compute the starting point and slope */
- dy = ptsIn[nextleft].y - ptsIn[left].y;
- if (dy != 0.0) {
- ml = (ptsIn[nextleft].x - ptsIn[left].x) / dy;
- dy = y - (ptsIn[left].y + yFtrans);
- xl = (ptsIn[left].x + xFtrans) + ml * max(dy, 0);
- }
- }
-
- /* add a right edge if we need to */
- if ((y > ptsIn[nextright].y + yFtrans) ||
- (ISEQUAL(y, ptsIn[nextright].y + yFtrans)
- && Marked[nextright] != 1)) {
- Marked[nextright]++;
- right = nextright--;
-
- /* find the next edge, considering the end conditions */
- if (nextright < 0)
- nextright = count - 1;
-
- /* now compute the starting point and slope */
- dy = ptsIn[nextright].y - ptsIn[right].y;
- if (dy != 0.0) {
- mr = (ptsIn[nextright].x - ptsIn[right].x) / dy;
- dy = y - (ptsIn[right].y + yFtrans);
- xr = (ptsIn[right].x + xFtrans) + mr * max(dy, 0);
- }
- }
-
- /*
- * generate scans to fill while we still have
- * a right edge as well as a left edge.
- */
- i = (min(ptsIn[nextleft].y, ptsIn[nextright].y) + yFtrans) - y;
-
- if (i < EPSILON) {
- if (Marked[nextleft] && Marked[nextright]) {
- /* Arrgh, we're trapped! (no more points)
- * Out, we've got to get out of here before this decadence saps
- * our will completely! */
- break;
- }
- continue;
- }
- else {
- j = (int) i;
- if (!j)
- j++;
- }
- while (j > 0) {
- int cxl, cxr;
-
- ptsOut->y = (y) + yTrans;
-
- cxl = ICEIL(xl);
- cxr = ICEIL(xr);
- /* reverse the edges if necessary */
- if (xl < xr) {
- *(width++) = cxr - cxl;
- (ptsOut++)->x = cxl + xTrans;
- }
- else {
- *(width++) = cxl - cxr;
- (ptsOut++)->x = cxr + xTrans;
- }
- y++;
-
- /* increment down the edges */
- xl += ml;
- xr += mr;
- j--;
- }
- } while (y <= ymax);
-
- /* Finally, fill the spans we've collected */
- (*pgc->ops->FillSpans) (dst, pgc,
- ptsOut - FirstPoint, FirstPoint, FirstWidth, 1);
- free(Marked);
- free(FirstWidth);
- free(FirstPoint);
-}
-
-/* Find the index of the point with the smallest y.also return the
- * smallest and largest y */
-static
- int
-GetFPolyYBounds(SppPointPtr pts, int n, double yFtrans, int *by, int *ty)
-{
- SppPointPtr ptMin;
- double ymin, ymax;
- SppPointPtr ptsStart = pts;
-
- ptMin = pts;
- ymin = ymax = (pts++)->y;
-
- while (--n > 0) {
- if (pts->y < ymin) {
- ptMin = pts;
- ymin = pts->y;
- }
- if (pts->y > ymax)
- ymax = pts->y;
-
- pts++;
- }
-
- *by = ICEIL(ymin + yFtrans);
- *ty = ICEIL(ymax + yFtrans - 1);
- return ptMin - ptsStart;
-}
diff --git a/xorg-server/mi/migc.c b/xorg-server/mi/migc.c
index 9bbe8846e..8fdd4810c 100644
--- a/xorg-server/mi/migc.c
+++ b/xorg-server/mi/migc.c
@@ -55,20 +55,9 @@ miDestroyGC(GCPtr pGC)
void
miDestroyClip(GCPtr pGC)
{
- if (pGC->clientClipType == CT_NONE)
- return;
- else if (pGC->clientClipType == CT_PIXMAP) {
- (*pGC->pScreen->DestroyPixmap) ((PixmapPtr) (pGC->clientClip));
- }
- else {
- /*
- * we know we'll never have a list of rectangles, since ChangeClip
- * immediately turns them into a region
- */
+ if (pGC->clientClip)
RegionDestroy(pGC->clientClip);
- }
pGC->clientClip = NULL;
- pGC->clientClipType = CT_NONE;
}
void
@@ -77,8 +66,7 @@ miChangeClip(GCPtr pGC, int type, void *pvalue, int nrects)
(*pGC->funcs->DestroyClip) (pGC);
if (type == CT_PIXMAP) {
/* convert the pixmap to a region */
- pGC->clientClip = (void *) BitmapToRegion(pGC->pScreen,
- (PixmapPtr) pvalue);
+ pGC->clientClip = BitmapToRegion(pGC->pScreen, (PixmapPtr) pvalue);
(*pGC->pScreen->DestroyPixmap) (pvalue);
}
else if (type == CT_REGION) {
@@ -86,34 +74,21 @@ miChangeClip(GCPtr pGC, int type, void *pvalue, int nrects)
pGC->clientClip = pvalue;
}
else if (type != CT_NONE) {
- pGC->clientClip = (void *) RegionFromRects(nrects,
- (xRectangle *) pvalue,
- type);
+ pGC->clientClip = RegionFromRects(nrects, (xRectangle *) pvalue, type);
free(pvalue);
}
- pGC->clientClipType = (type != CT_NONE &&
- pGC->clientClip) ? CT_REGION : CT_NONE;
pGC->stateChanges |= GCClipMask;
}
void
miCopyClip(GCPtr pgcDst, GCPtr pgcSrc)
{
- RegionPtr prgnNew;
-
- switch (pgcSrc->clientClipType) {
- case CT_PIXMAP:
- ((PixmapPtr) pgcSrc->clientClip)->refcnt++;
- /* Fall through !! */
- case CT_NONE:
- (*pgcDst->funcs->ChangeClip) (pgcDst, (int) pgcSrc->clientClipType,
- pgcSrc->clientClip, 0);
- break;
- case CT_REGION:
- prgnNew = RegionCreate(NULL, 1);
+ if (pgcSrc->clientClip) {
+ RegionPtr prgnNew = RegionCreate(NULL, 1);
RegionCopy(prgnNew, (RegionPtr) (pgcSrc->clientClip));
- (*pgcDst->funcs->ChangeClip) (pgcDst, CT_REGION, (void *) prgnNew, 0);
- break;
+ (*pgcDst->funcs->ChangeClip) (pgcDst, CT_REGION, prgnNew, 0);
+ } else {
+ (*pgcDst->funcs->ChangeClip) (pgcDst, CT_NONE, NULL, 0);
}
}
@@ -149,7 +124,7 @@ miComputeCompositeClip(GCPtr pGC, DrawablePtr pDrawable)
* regions. (this wins especially if many clients clip by children
* and have no client clip.)
*/
- if (pGC->clientClipType == CT_NONE) {
+ if (!pGC->clientClip) {
if (freeCompClip)
RegionDestroy(pGC->pCompositeClip);
pGC->pCompositeClip = pregWin;
@@ -206,7 +181,7 @@ miComputeCompositeClip(GCPtr pGC, DrawablePtr pDrawable)
pGC->pCompositeClip = RegionCreate(&pixbounds, 1);
}
- if (pGC->clientClipType == CT_REGION) {
+ if (pGC->clientClip) {
if (pDrawable->x || pDrawable->y) {
RegionTranslate(pGC->clientClip,
pDrawable->x + pGC->clipOrg.x,
diff --git a/xorg-server/mi/miglblt.c b/xorg-server/mi/miglblt.c
index b53ab9c0e..0183e998b 100644
--- a/xorg-server/mi/miglblt.c
+++ b/xorg-server/mi/miglblt.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/mi/miinitext.c b/xorg-server/mi/miinitext.c
index 1d905167e..5872bf534 100644
--- a/xorg-server/mi/miinitext.c
+++ b/xorg-server/mi/miinitext.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/mi/mioverlay.c b/xorg-server/mi/mioverlay.c
index eb8dda133..2b20fd72f 100644
--- a/xorg-server/mi/mioverlay.c
+++ b/xorg-server/mi/mioverlay.c
@@ -1667,7 +1667,7 @@ miOverlayComputeCompositeClip(GCPtr pGC, WindowPtr pWin)
freeTmpClip = FALSE;
}
freeCompClip = pGC->freeCompClip;
- if (pGC->clientClipType == CT_NONE) {
+ if (!pGC->clientClip) {
if (freeCompClip)
RegionDestroy(pGC->pCompositeClip);
pGC->pCompositeClip = pregWin;
diff --git a/xorg-server/mi/mipointer.c b/xorg-server/mi/mipointer.c
index 6fa416d9d..2bdd6ca98 100644
--- a/xorg-server/mi/mipointer.c
+++ b/xorg-server/mi/mipointer.c
@@ -273,6 +273,20 @@ miPointerSetCursorPosition(DeviceIntPtr pDev, ScreenPtr pScreen,
return TRUE;
}
+void
+miRecolorCursor(DeviceIntPtr pDev, ScreenPtr pScr,
+ CursorPtr pCurs, Bool displayed)
+{
+ /*
+ * This is guaranteed to correct any color-dependent state which may have
+ * been bound up in private state created by RealizeCursor
+ */
+ pScr->UnrealizeCursor(pDev, pScr, pCurs);
+ pScr->RealizeCursor(pDev, pScr, pCurs);
+ if (displayed)
+ pScr->DisplayCursor(pDev, pScr, pCurs);
+}
+
/**
* Set up sprite information for the device.
* This function will be called once for each device after it is initialized
@@ -539,10 +553,15 @@ miPointerMoveNoEvent(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
* The coordinates provided are always absolute. The parameter mode whether
* it was relative or absolute movement that landed us at those coordinates.
*
+ * If the cursor was constrained by a barrier, ET_Barrier* events may be
+ * generated and appended to the InternalEvent list provided.
+ *
* @param pDev The device to move
* @param mode Movement mode (Absolute or Relative)
* @param[in,out] screenx The x coordinate in desktop coordinates
* @param[in,out] screeny The y coordinate in desktop coordinates
+ * @param[in,out] nevents The number of events in events (before/after)
+ * @param[in,out] events The list of events before/after being constrained
*/
ScreenPtr
miPointerSetPosition(DeviceIntPtr pDev, int mode, double *screenx,
diff --git a/xorg-server/mi/mipoly.c b/xorg-server/mi/mipoly.c
index 07d981845..a332376d1 100644
--- a/xorg-server/mi/mipoly.c
+++ b/xorg-server/mi/mipoly.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -47,11 +47,6 @@ SOFTWARE.
* mipoly.c
*
* Written by Brian Kelleher; June 1986
- *
- * Draw polygons. This routine translates the point by the
- * origin if pGC->miTranslate is non-zero, and calls
- * to the appropriate routine to actually scan convert the
- * polygon.
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
@@ -62,8 +57,622 @@ SOFTWARE.
#include "gcstruct.h"
#include "pixmapstr.h"
#include "mi.h"
+#include "miscanfill.h"
+#include "mipoly.h"
#include "regionstr.h"
+/*
+ * Insert the given edge into the edge table. First we must find the correct
+ * bucket in the Edge table, then find the right slot in the bucket. Finally,
+ * we can insert it.
+ */
+static Bool
+miInsertEdgeInET(EdgeTable * ET, EdgeTableEntry * ETE, int scanline,
+ ScanLineListBlock ** SLLBlock, int *iSLLBlock)
+{
+ EdgeTableEntry *start, *prev;
+ ScanLineList *pSLL, *pPrevSLL;
+ ScanLineListBlock *tmpSLLBlock;
+
+ /*
+ * find the right bucket to put the edge into
+ */
+ pPrevSLL = &ET->scanlines;
+ pSLL = pPrevSLL->next;
+ while (pSLL && (pSLL->scanline < scanline)) {
+ pPrevSLL = pSLL;
+ pSLL = pSLL->next;
+ }
+
+ /*
+ * reassign pSLL (pointer to ScanLineList) if necessary
+ */
+ if ((!pSLL) || (pSLL->scanline > scanline)) {
+ if (*iSLLBlock > SLLSPERBLOCK - 1) {
+ tmpSLLBlock = malloc(sizeof(ScanLineListBlock));
+ if (!tmpSLLBlock)
+ return FALSE;
+ (*SLLBlock)->next = tmpSLLBlock;
+ tmpSLLBlock->next = NULL;
+ *SLLBlock = tmpSLLBlock;
+ *iSLLBlock = 0;
+ }
+ pSLL = &((*SLLBlock)->SLLs[(*iSLLBlock)++]);
+
+ pSLL->next = pPrevSLL->next;
+ pSLL->edgelist = NULL;
+ pPrevSLL->next = pSLL;
+ }
+ pSLL->scanline = scanline;
+
+ /*
+ * now insert the edge in the right bucket
+ */
+ prev = NULL;
+ start = pSLL->edgelist;
+ while (start && (start->bres.minor < ETE->bres.minor)) {
+ prev = start;
+ start = start->next;
+ }
+ ETE->next = start;
+
+ if (prev)
+ prev->next = ETE;
+ else
+ pSLL->edgelist = ETE;
+ return TRUE;
+}
+
+static void
+miFreeStorage(ScanLineListBlock * pSLLBlock)
+{
+ ScanLineListBlock *tmpSLLBlock;
+
+ while (pSLLBlock) {
+ tmpSLLBlock = pSLLBlock->next;
+ free(pSLLBlock);
+ pSLLBlock = tmpSLLBlock;
+ }
+}
+
+/*
+ * CreateEdgeTable
+ *
+ * This routine creates the edge table for scan converting polygons.
+ * The Edge Table (ET) looks like:
+ *
+ * EdgeTable
+ * --------
+ * | ymax | ScanLineLists
+ * |scanline|-->------------>-------------->...
+ * -------- |scanline| |scanline|
+ * |edgelist| |edgelist|
+ * --------- ---------
+ * | |
+ * | |
+ * V V
+ * list of ETEs list of ETEs
+ *
+ * where ETE is an EdgeTableEntry data structure, and there is one ScanLineList
+ * per scanline at which an edge is initially entered.
+ */
+
+static Bool
+miCreateETandAET(int count, DDXPointPtr pts, EdgeTable * ET,
+ EdgeTableEntry * AET, EdgeTableEntry * pETEs,
+ ScanLineListBlock * pSLLBlock)
+{
+ DDXPointPtr top, bottom;
+ DDXPointPtr PrevPt, CurrPt;
+ int iSLLBlock = 0;
+
+ int dy;
+
+ if (count < 2)
+ return TRUE;
+
+ /*
+ * initialize the Active Edge Table
+ */
+ AET->next = NULL;
+ AET->back = NULL;
+ AET->nextWETE = NULL;
+ AET->bres.minor = MININT;
+
+ /*
+ * initialize the Edge Table.
+ */
+ ET->scanlines.next = NULL;
+ ET->ymax = MININT;
+ ET->ymin = MAXINT;
+ pSLLBlock->next = NULL;
+
+ PrevPt = &pts[count - 1];
+
+ /*
+ * for each vertex in the array of points.
+ * In this loop we are dealing with two vertices at
+ * a time -- these make up one edge of the polygon.
+ */
+ while (count--) {
+ CurrPt = pts++;
+
+ /*
+ * find out which point is above and which is below.
+ */
+ if (PrevPt->y > CurrPt->y) {
+ bottom = PrevPt, top = CurrPt;
+ pETEs->ClockWise = 0;
+ }
+ else {
+ bottom = CurrPt, top = PrevPt;
+ pETEs->ClockWise = 1;
+ }
+
+ /*
+ * don't add horizontal edges to the Edge table.
+ */
+ if (bottom->y != top->y) {
+ pETEs->ymax = bottom->y - 1; /* -1 so we don't get last scanline */
+
+ /*
+ * initialize integer edge algorithm
+ */
+ dy = bottom->y - top->y;
+ BRESINITPGONSTRUCT(dy, top->x, bottom->x, pETEs->bres);
+
+ if (!miInsertEdgeInET(ET, pETEs, top->y, &pSLLBlock, &iSLLBlock)) {
+ miFreeStorage(pSLLBlock->next);
+ return FALSE;
+ }
+
+ ET->ymax = max(ET->ymax, PrevPt->y);
+ ET->ymin = min(ET->ymin, PrevPt->y);
+ pETEs++;
+ }
+
+ PrevPt = CurrPt;
+ }
+ return TRUE;
+}
+
+/*
+ * This routine moves EdgeTableEntries from the EdgeTable into the Active Edge
+ * Table, leaving them sorted by smaller x coordinate.
+ */
+
+static void
+miloadAET(EdgeTableEntry * AET, EdgeTableEntry * ETEs)
+{
+ EdgeTableEntry *pPrevAET;
+ EdgeTableEntry *tmp;
+
+ pPrevAET = AET;
+ AET = AET->next;
+ while (ETEs) {
+ while (AET && (AET->bres.minor < ETEs->bres.minor)) {
+ pPrevAET = AET;
+ AET = AET->next;
+ }
+ tmp = ETEs->next;
+ ETEs->next = AET;
+ if (AET)
+ AET->back = ETEs;
+ ETEs->back = pPrevAET;
+ pPrevAET->next = ETEs;
+ pPrevAET = ETEs;
+
+ ETEs = tmp;
+ }
+}
+
+/*
+ * computeWAET
+ *
+ * This routine links the AET by the nextWETE (winding EdgeTableEntry) link for
+ * use by the winding number rule. The final Active Edge Table (AET) might
+ * look something like:
+ *
+ * AET
+ * ---------- --------- ---------
+ * |ymax | |ymax | |ymax |
+ * | ... | |... | |... |
+ * |next |->|next |->|next |->...
+ * |nextWETE| |nextWETE| |nextWETE|
+ * --------- --------- ^--------
+ * | | |
+ * V-------------------> V---> ...
+ *
+ */
+static void
+micomputeWAET(EdgeTableEntry * AET)
+{
+ EdgeTableEntry *pWETE;
+ int inside = 1;
+ int isInside = 0;
+
+ AET->nextWETE = NULL;
+ pWETE = AET;
+ AET = AET->next;
+ while (AET) {
+ if (AET->ClockWise)
+ isInside++;
+ else
+ isInside--;
+
+ if ((!inside && !isInside) || (inside && isInside)) {
+ pWETE->nextWETE = AET;
+ pWETE = AET;
+ inside = !inside;
+ }
+ AET = AET->next;
+ }
+ pWETE->nextWETE = NULL;
+}
+
+/*
+ * Just a simple insertion sort using pointers and back pointers to sort the
+ * Active Edge Table.
+ */
+
+static int
+miInsertionSort(EdgeTableEntry * AET)
+{
+ EdgeTableEntry *pETEchase;
+ EdgeTableEntry *pETEinsert;
+ EdgeTableEntry *pETEchaseBackTMP;
+ int changed = 0;
+
+ AET = AET->next;
+ while (AET) {
+ pETEinsert = AET;
+ pETEchase = AET;
+ while (pETEchase->back->bres.minor > AET->bres.minor)
+ pETEchase = pETEchase->back;
+
+ AET = AET->next;
+ if (pETEchase != pETEinsert) {
+ pETEchaseBackTMP = pETEchase->back;
+ pETEinsert->back->next = AET;
+ if (AET)
+ AET->back = pETEinsert->back;
+ pETEinsert->next = pETEchase;
+ pETEchase->back->next = pETEinsert;
+ pETEchase->back = pETEinsert;
+ pETEinsert->back = pETEchaseBackTMP;
+ changed = 1;
+ }
+ }
+ return changed;
+}
+
+/* Find the index of the point with the smallest y */
+static int
+getPolyYBounds(DDXPointPtr pts, int n, int *by, int *ty)
+{
+ DDXPointPtr ptMin;
+ int ymin, ymax;
+ DDXPointPtr ptsStart = pts;
+
+ ptMin = pts;
+ ymin = ymax = (pts++)->y;
+
+ while (--n > 0) {
+ if (pts->y < ymin) {
+ ptMin = pts;
+ ymin = pts->y;
+ }
+ if (pts->y > ymax)
+ ymax = pts->y;
+
+ pts++;
+ }
+
+ *by = ymin;
+ *ty = ymax;
+ return ptMin - ptsStart;
+}
+
+/*
+ * Written by Brian Kelleher; Dec. 1985.
+ *
+ * Fill a convex polygon. If the given polygon is not convex, then the result
+ * is undefined. The algorithm is to order the edges from smallest y to
+ * largest by partitioning the array into a left edge list and a right edge
+ * list. The algorithm used to traverse each edge is an extension of
+ * Bresenham's line algorithm with y as the major axis. For a derivation of
+ * the algorithm, see the author of this code.
+ */
+static Bool
+miFillConvexPoly(DrawablePtr dst, GCPtr pgc, int count, DDXPointPtr ptsIn)
+{
+ int xl = 0, xr = 0; /* x vals of left and right edges */
+ int dl = 0, dr = 0; /* decision variables */
+ int ml = 0, m1l = 0; /* left edge slope and slope+1 */
+ int mr = 0, m1r = 0; /* right edge slope and slope+1 */
+ int incr1l = 0, incr2l = 0; /* left edge error increments */
+ int incr1r = 0, incr2r = 0; /* right edge error increments */
+ int dy; /* delta y */
+ int y; /* current scanline */
+ int left, right; /* indices to first endpoints */
+ int i; /* loop counter */
+ int nextleft, nextright; /* indices to second endpoints */
+ DDXPointPtr ptsOut, FirstPoint; /* output buffer */
+ int *width, *FirstWidth; /* output buffer */
+ int imin; /* index of smallest vertex (in y) */
+ int ymin; /* y-extents of polygon */
+ int ymax;
+
+ /*
+ * find leftx, bottomy, rightx, topy, and the index
+ * of bottomy. Also translate the points.
+ */
+ imin = getPolyYBounds(ptsIn, count, &ymin, &ymax);
+
+ dy = ymax - ymin + 1;
+ if ((count < 3) || (dy < 0))
+ return TRUE;
+ ptsOut = FirstPoint = malloc(sizeof(DDXPointRec) * dy);
+ width = FirstWidth = malloc(sizeof(int) * dy);
+ if (!FirstPoint || !FirstWidth) {
+ free(FirstWidth);
+ free(FirstPoint);
+ return FALSE;
+ }
+
+ nextleft = nextright = imin;
+ y = ptsIn[nextleft].y;
+
+ /*
+ * loop through all edges of the polygon
+ */
+ do {
+ /*
+ * add a left edge if we need to
+ */
+ if (ptsIn[nextleft].y == y) {
+ left = nextleft;
+
+ /*
+ * find the next edge, considering the end
+ * conditions of the array.
+ */
+ nextleft++;
+ if (nextleft >= count)
+ nextleft = 0;
+
+ /*
+ * now compute all of the random information
+ * needed to run the iterative algorithm.
+ */
+ BRESINITPGON(ptsIn[nextleft].y - ptsIn[left].y,
+ ptsIn[left].x, ptsIn[nextleft].x,
+ xl, dl, ml, m1l, incr1l, incr2l);
+ }
+
+ /*
+ * add a right edge if we need to
+ */
+ if (ptsIn[nextright].y == y) {
+ right = nextright;
+
+ /*
+ * find the next edge, considering the end
+ * conditions of the array.
+ */
+ nextright--;
+ if (nextright < 0)
+ nextright = count - 1;
+
+ /*
+ * now compute all of the random information
+ * needed to run the iterative algorithm.
+ */
+ BRESINITPGON(ptsIn[nextright].y - ptsIn[right].y,
+ ptsIn[right].x, ptsIn[nextright].x,
+ xr, dr, mr, m1r, incr1r, incr2r);
+ }
+
+ /*
+ * generate scans to fill while we still have
+ * a right edge as well as a left edge.
+ */
+ i = min(ptsIn[nextleft].y, ptsIn[nextright].y) - y;
+ /* in case we're called with non-convex polygon */
+ if (i < 0) {
+ free(FirstWidth);
+ free(FirstPoint);
+ return TRUE;
+ }
+ while (i-- > 0) {
+ ptsOut->y = y;
+
+ /*
+ * reverse the edges if necessary
+ */
+ if (xl < xr) {
+ *(width++) = xr - xl;
+ (ptsOut++)->x = xl;
+ }
+ else {
+ *(width++) = xl - xr;
+ (ptsOut++)->x = xr;
+ }
+ y++;
+
+ /* increment down the edges */
+ BRESINCRPGON(dl, xl, ml, m1l, incr1l, incr2l);
+ BRESINCRPGON(dr, xr, mr, m1r, incr1r, incr2r);
+ }
+ } while (y != ymax);
+
+ /*
+ * Finally, fill the <remaining> spans
+ */
+ (*pgc->ops->FillSpans) (dst, pgc,
+ ptsOut - FirstPoint, FirstPoint, FirstWidth, 1);
+ free(FirstWidth);
+ free(FirstPoint);
+ return TRUE;
+}
+
+/*
+ * Written by Brian Kelleher; Oct. 1985
+ *
+ * Routine to fill a polygon. Two fill rules are supported: frWINDING and
+ * frEVENODD.
+ */
+static Bool
+miFillGeneralPoly(DrawablePtr dst, GCPtr pgc, int count, DDXPointPtr ptsIn)
+{
+ EdgeTableEntry *pAET; /* the Active Edge Table */
+ int y; /* the current scanline */
+ int nPts = 0; /* number of pts in buffer */
+ EdgeTableEntry *pWETE; /* Winding Edge Table */
+ ScanLineList *pSLL; /* Current ScanLineList */
+ DDXPointPtr ptsOut; /* ptr to output buffers */
+ int *width;
+ DDXPointRec FirstPoint[NUMPTSTOBUFFER]; /* the output buffers */
+ int FirstWidth[NUMPTSTOBUFFER];
+ EdgeTableEntry *pPrevAET; /* previous AET entry */
+ EdgeTable ET; /* Edge Table header node */
+ EdgeTableEntry AET; /* Active ET header node */
+ EdgeTableEntry *pETEs; /* Edge Table Entries buff */
+ ScanLineListBlock SLLBlock; /* header for ScanLineList */
+ int fixWAET = 0;
+
+ if (count < 3)
+ return TRUE;
+
+ if (!(pETEs = malloc(sizeof(EdgeTableEntry) * count)))
+ return FALSE;
+ ptsOut = FirstPoint;
+ width = FirstWidth;
+ if (!miCreateETandAET(count, ptsIn, &ET, &AET, pETEs, &SLLBlock)) {
+ free(pETEs);
+ return FALSE;
+ }
+ pSLL = ET.scanlines.next;
+
+ if (pgc->fillRule == EvenOddRule) {
+ /*
+ * for each scanline
+ */
+ for (y = ET.ymin; y < ET.ymax; y++) {
+ /*
+ * Add a new edge to the active edge table when we
+ * get to the next edge.
+ */
+ if (pSLL && y == pSLL->scanline) {
+ miloadAET(&AET, pSLL->edgelist);
+ pSLL = pSLL->next;
+ }
+ pPrevAET = &AET;
+ pAET = AET.next;
+
+ /*
+ * for each active edge
+ */
+ while (pAET) {
+ ptsOut->x = pAET->bres.minor;
+ ptsOut++->y = y;
+ *width++ = pAET->next->bres.minor - pAET->bres.minor;
+ nPts++;
+
+ /*
+ * send out the buffer when its full
+ */
+ if (nPts == NUMPTSTOBUFFER) {
+ (*pgc->ops->FillSpans) (dst, pgc,
+ nPts, FirstPoint, FirstWidth, 1);
+ ptsOut = FirstPoint;
+ width = FirstWidth;
+ nPts = 0;
+ }
+ EVALUATEEDGEEVENODD(pAET, pPrevAET, y);
+ EVALUATEEDGEEVENODD(pAET, pPrevAET, y);
+ }
+ miInsertionSort(&AET);
+ }
+ }
+ else { /* default to WindingNumber */
+
+ /*
+ * for each scanline
+ */
+ for (y = ET.ymin; y < ET.ymax; y++) {
+ /*
+ * Add a new edge to the active edge table when we
+ * get to the next edge.
+ */
+ if (pSLL && y == pSLL->scanline) {
+ miloadAET(&AET, pSLL->edgelist);
+ micomputeWAET(&AET);
+ pSLL = pSLL->next;
+ }
+ pPrevAET = &AET;
+ pAET = AET.next;
+ pWETE = pAET;
+
+ /*
+ * for each active edge
+ */
+ while (pAET) {
+ /*
+ * if the next edge in the active edge table is
+ * also the next edge in the winding active edge
+ * table.
+ */
+ if (pWETE == pAET) {
+ ptsOut->x = pAET->bres.minor;
+ ptsOut++->y = y;
+ *width++ = pAET->nextWETE->bres.minor - pAET->bres.minor;
+ nPts++;
+
+ /*
+ * send out the buffer
+ */
+ if (nPts == NUMPTSTOBUFFER) {
+ (*pgc->ops->FillSpans) (dst, pgc, nPts, FirstPoint,
+ FirstWidth, 1);
+ ptsOut = FirstPoint;
+ width = FirstWidth;
+ nPts = 0;
+ }
+
+ pWETE = pWETE->nextWETE;
+ while (pWETE != pAET)
+ EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET);
+ pWETE = pWETE->nextWETE;
+ }
+ EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET);
+ }
+
+ /*
+ * reevaluate the Winding active edge table if we
+ * just had to resort it or if we just exited an edge.
+ */
+ if (miInsertionSort(&AET) || fixWAET) {
+ micomputeWAET(&AET);
+ fixWAET = 0;
+ }
+ }
+ }
+
+ /*
+ * Get any spans that we missed by buffering
+ */
+ (*pgc->ops->FillSpans) (dst, pgc, nPts, FirstPoint, FirstWidth, 1);
+ free(pETEs);
+ miFreeStorage(SLLBlock.next);
+ return TRUE;
+}
+
+/*
+ * Draw polygons. This routine translates the point by the origin if
+ * pGC->miTranslate is non-zero, and calls to the appropriate routine to
+ * actually scan convert the polygon.
+ */
void
miFillPolygon(DrawablePtr dst, GCPtr pgc,
int shape, int mode, int count, DDXPointPtr pPts)
diff --git a/xorg-server/mi/mipoly.h b/xorg-server/mi/mipoly.h
index e37fb48a2..d67a5249e 100644
--- a/xorg-server/mi/mipoly.h
+++ b/xorg-server/mi/mipoly.h
@@ -55,7 +55,7 @@ from The Open Group.
* the polygon by incrementing the y coordinate. We
* keep a list of edges which the current scanline crosses,
* sorted by x. This list is called the Active Edge Table (AET)
- * As we change the y-coordinate, we update each entry in
+ * As we change the y-coordinate, we update each entry in
* in the active edge table to reflect the edges new xcoord.
* This list must be sorted at each scanline in case
* two edges intersect.
@@ -171,23 +171,3 @@ typedef struct _ScanLineListBlock {
pAET = pAET->next; \
} \
}
-
-/* mipolyutil.c */
-
-extern _X_EXPORT Bool miCreateETandAET(int /*count */ ,
- DDXPointPtr /*pts */ ,
- EdgeTable * /*ET*/,
- EdgeTableEntry * /*AET*/,
- EdgeTableEntry * /*pETEs */ ,
- ScanLineListBlock * /*pSLLBlock */
- );
-
-extern _X_EXPORT void miloadAET(EdgeTableEntry * /*AET*/, EdgeTableEntry * /*ETEs */
- );
-
-extern _X_EXPORT void micomputeWAET(EdgeTableEntry * /*AET*/);
-
-extern _X_EXPORT int miInsertionSort(EdgeTableEntry * /*AET*/);
-
-extern _X_EXPORT void miFreeStorage(ScanLineListBlock * /*pSLLBlock */
- );
diff --git a/xorg-server/mi/mipolycon.c b/xorg-server/mi/mipolycon.c
deleted file mode 100644
index e831633fe..000000000
--- a/xorg-server/mi/mipolycon.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "gcstruct.h"
-#include "pixmap.h"
-#include "mi.h"
-#include "miscanfill.h"
-
-static int getPolyYBounds(DDXPointPtr pts, int n, int *by, int *ty);
-
-/*
- * convexpoly.c
- *
- * Written by Brian Kelleher; Dec. 1985.
- *
- * Fill a convex polygon. If the given polygon
- * is not convex, then the result is undefined.
- * The algorithm is to order the edges from smallest
- * y to largest by partitioning the array into a left
- * edge list and a right edge list. The algorithm used
- * to traverse each edge is an extension of Bresenham's
- * line algorithm with y as the major axis.
- * For a derivation of the algorithm, see the author of
- * this code.
- */
-Bool
-miFillConvexPoly(DrawablePtr dst, GCPtr pgc, int count, /* number of points */
- DDXPointPtr ptsIn /* the points */
- )
-{
- int xl = 0, xr = 0; /* x vals of left and right edges */
- int dl = 0, dr = 0; /* decision variables */
- int ml = 0, m1l = 0; /* left edge slope and slope+1 */
- int mr = 0, m1r = 0; /* right edge slope and slope+1 */
- int incr1l = 0, incr2l = 0; /* left edge error increments */
- int incr1r = 0, incr2r = 0; /* right edge error increments */
- int dy; /* delta y */
- int y; /* current scanline */
- int left, right; /* indices to first endpoints */
- int i; /* loop counter */
- int nextleft, nextright; /* indices to second endpoints */
- DDXPointPtr ptsOut, FirstPoint; /* output buffer */
- int *width, *FirstWidth; /* output buffer */
- int imin; /* index of smallest vertex (in y) */
- int ymin; /* y-extents of polygon */
- int ymax;
-
- /*
- * find leftx, bottomy, rightx, topy, and the index
- * of bottomy. Also translate the points.
- */
- imin = getPolyYBounds(ptsIn, count, &ymin, &ymax);
-
- dy = ymax - ymin + 1;
- if ((count < 3) || (dy < 0))
- return TRUE;
- ptsOut = FirstPoint = malloc(sizeof(DDXPointRec) * dy);
- width = FirstWidth = malloc(sizeof(int) * dy);
- if (!FirstPoint || !FirstWidth) {
- free(FirstWidth);
- free(FirstPoint);
- return FALSE;
- }
-
- nextleft = nextright = imin;
- y = ptsIn[nextleft].y;
-
- /*
- * loop through all edges of the polygon
- */
- do {
- /*
- * add a left edge if we need to
- */
- if (ptsIn[nextleft].y == y) {
- left = nextleft;
-
- /*
- * find the next edge, considering the end
- * conditions of the array.
- */
- nextleft++;
- if (nextleft >= count)
- nextleft = 0;
-
- /*
- * now compute all of the random information
- * needed to run the iterative algorithm.
- */
- BRESINITPGON(ptsIn[nextleft].y - ptsIn[left].y,
- ptsIn[left].x, ptsIn[nextleft].x,
- xl, dl, ml, m1l, incr1l, incr2l);
- }
-
- /*
- * add a right edge if we need to
- */
- if (ptsIn[nextright].y == y) {
- right = nextright;
-
- /*
- * find the next edge, considering the end
- * conditions of the array.
- */
- nextright--;
- if (nextright < 0)
- nextright = count - 1;
-
- /*
- * now compute all of the random information
- * needed to run the iterative algorithm.
- */
- BRESINITPGON(ptsIn[nextright].y - ptsIn[right].y,
- ptsIn[right].x, ptsIn[nextright].x,
- xr, dr, mr, m1r, incr1r, incr2r);
- }
-
- /*
- * generate scans to fill while we still have
- * a right edge as well as a left edge.
- */
- i = min(ptsIn[nextleft].y, ptsIn[nextright].y) - y;
- /* in case we're called with non-convex polygon */
- if (i < 0) {
- free(FirstWidth);
- free(FirstPoint);
- return TRUE;
- }
- while (i-- > 0) {
- ptsOut->y = y;
-
- /*
- * reverse the edges if necessary
- */
- if (xl < xr) {
- *(width++) = xr - xl;
- (ptsOut++)->x = xl;
- }
- else {
- *(width++) = xl - xr;
- (ptsOut++)->x = xr;
- }
- y++;
-
- /* increment down the edges */
- BRESINCRPGON(dl, xl, ml, m1l, incr1l, incr2l);
- BRESINCRPGON(dr, xr, mr, m1r, incr1r, incr2r);
- }
- } while (y != ymax);
-
- /*
- * Finally, fill the <remaining> spans
- */
- (*pgc->ops->FillSpans) (dst, pgc,
- ptsOut - FirstPoint, FirstPoint, FirstWidth, 1);
- free(FirstWidth);
- free(FirstPoint);
- return TRUE;
-}
-
-/*
- * Find the index of the point with the smallest y.
- */
-static int
-getPolyYBounds(DDXPointPtr pts, int n, int *by, int *ty)
-{
- DDXPointPtr ptMin;
- int ymin, ymax;
- DDXPointPtr ptsStart = pts;
-
- ptMin = pts;
- ymin = ymax = (pts++)->y;
-
- while (--n > 0) {
- if (pts->y < ymin) {
- ptMin = pts;
- ymin = pts->y;
- }
- if (pts->y > ymax)
- ymax = pts->y;
-
- pts++;
- }
-
- *by = ymin;
- *ty = ymax;
- return ptMin - ptsStart;
-}
diff --git a/xorg-server/mi/mipolygen.c b/xorg-server/mi/mipolygen.c
deleted file mode 100644
index 2031b42b7..000000000
--- a/xorg-server/mi/mipolygen.c
+++ /dev/null
@@ -1,213 +0,0 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <X11/X.h>
-#include "gcstruct.h"
-#include "miscanfill.h"
-#include "mipoly.h"
-#include "pixmap.h"
-#include "mi.h"
-
-/*
- *
- * Written by Brian Kelleher; Oct. 1985
- *
- * Routine to fill a polygon. Two fill rules are
- * supported: frWINDING and frEVENODD.
- *
- * See fillpoly.h for a complete description of the algorithm.
- */
-
-Bool
-miFillGeneralPoly(DrawablePtr dst, GCPtr pgc, int count, /* number of points */
- DDXPointPtr ptsIn /* the points */
- )
-{
- EdgeTableEntry *pAET; /* the Active Edge Table */
- int y; /* the current scanline */
- int nPts = 0; /* number of pts in buffer */
- EdgeTableEntry *pWETE; /* Winding Edge Table */
- ScanLineList *pSLL; /* Current ScanLineList */
- DDXPointPtr ptsOut; /* ptr to output buffers */
- int *width;
- DDXPointRec FirstPoint[NUMPTSTOBUFFER]; /* the output buffers */
- int FirstWidth[NUMPTSTOBUFFER];
- EdgeTableEntry *pPrevAET; /* previous AET entry */
- EdgeTable ET; /* Edge Table header node */
- EdgeTableEntry AET; /* Active ET header node */
- EdgeTableEntry *pETEs; /* Edge Table Entries buff */
- ScanLineListBlock SLLBlock; /* header for ScanLineList */
- int fixWAET = 0;
-
- if (count < 3)
- return TRUE;
-
- if (!(pETEs = malloc(sizeof(EdgeTableEntry) * count)))
- return FALSE;
- ptsOut = FirstPoint;
- width = FirstWidth;
- if (!miCreateETandAET(count, ptsIn, &ET, &AET, pETEs, &SLLBlock)) {
- free(pETEs);
- return FALSE;
- }
- pSLL = ET.scanlines.next;
-
- if (pgc->fillRule == EvenOddRule) {
- /*
- * for each scanline
- */
- for (y = ET.ymin; y < ET.ymax; y++) {
- /*
- * Add a new edge to the active edge table when we
- * get to the next edge.
- */
- if (pSLL && y == pSLL->scanline) {
- miloadAET(&AET, pSLL->edgelist);
- pSLL = pSLL->next;
- }
- pPrevAET = &AET;
- pAET = AET.next;
-
- /*
- * for each active edge
- */
- while (pAET) {
- ptsOut->x = pAET->bres.minor;
- ptsOut++->y = y;
- *width++ = pAET->next->bres.minor - pAET->bres.minor;
- nPts++;
-
- /*
- * send out the buffer when its full
- */
- if (nPts == NUMPTSTOBUFFER) {
- (*pgc->ops->FillSpans) (dst, pgc,
- nPts, FirstPoint, FirstWidth, 1);
- ptsOut = FirstPoint;
- width = FirstWidth;
- nPts = 0;
- }
- EVALUATEEDGEEVENODD(pAET, pPrevAET, y)
- EVALUATEEDGEEVENODD(pAET, pPrevAET, y);
- }
- miInsertionSort(&AET);
- }
- }
- else { /* default to WindingNumber */
-
- /*
- * for each scanline
- */
- for (y = ET.ymin; y < ET.ymax; y++) {
- /*
- * Add a new edge to the active edge table when we
- * get to the next edge.
- */
- if (pSLL && y == pSLL->scanline) {
- miloadAET(&AET, pSLL->edgelist);
- micomputeWAET(&AET);
- pSLL = pSLL->next;
- }
- pPrevAET = &AET;
- pAET = AET.next;
- pWETE = pAET;
-
- /*
- * for each active edge
- */
- while (pAET) {
- /*
- * if the next edge in the active edge table is
- * also the next edge in the winding active edge
- * table.
- */
- if (pWETE == pAET) {
- ptsOut->x = pAET->bres.minor;
- ptsOut++->y = y;
- *width++ = pAET->nextWETE->bres.minor - pAET->bres.minor;
- nPts++;
-
- /*
- * send out the buffer
- */
- if (nPts == NUMPTSTOBUFFER) {
- (*pgc->ops->FillSpans) (dst, pgc, nPts, FirstPoint,
- FirstWidth, 1);
- ptsOut = FirstPoint;
- width = FirstWidth;
- nPts = 0;
- }
-
- pWETE = pWETE->nextWETE;
- while (pWETE != pAET)
- EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET);
- pWETE = pWETE->nextWETE;
- }
- EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET);
- }
-
- /*
- * reevaluate the Winding active edge table if we
- * just had to resort it or if we just exited an edge.
- */
- if (miInsertionSort(&AET) || fixWAET) {
- micomputeWAET(&AET);
- fixWAET = 0;
- }
- }
- }
-
- /*
- * Get any spans that we missed by buffering
- */
- (*pgc->ops->FillSpans) (dst, pgc, nPts, FirstPoint, FirstWidth, 1);
- free(pETEs);
- miFreeStorage(SLLBlock.next);
- return TRUE;
-}
diff --git a/xorg-server/mi/mipolypnt.c b/xorg-server/mi/mipolypnt.c
index 086502b26..4fa521d07 100644
--- a/xorg-server/mi/mipolypnt.c
+++ b/xorg-server/mi/mipolypnt.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/mi/mipolyrect.c b/xorg-server/mi/mipolyrect.c
index e316ae053..830822513 100644
--- a/xorg-server/mi/mipolyrect.c
+++ b/xorg-server/mi/mipolyrect.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/mi/mipolyseg.c b/xorg-server/mi/mipolyseg.c
index d6f18076c..7909b398b 100644
--- a/xorg-server/mi/mipolyseg.c
+++ b/xorg-server/mi/mipolyseg.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -61,7 +61,7 @@ SOFTWARE.
* lines are drawn in the order listed.
*
* Walks the segments, compressing them into format for PolyLines.
- *
+ *
*****************************************************************/
void
diff --git a/xorg-server/mi/mipolytext.c b/xorg-server/mi/mipolytext.c
index 02c45882f..f1e5ed867 100644
--- a/xorg-server/mi/mipolytext.c
+++ b/xorg-server/mi/mipolytext.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/mi/mipolyutil.c b/xorg-server/mi/mipolyutil.c
deleted file mode 100644
index 5e6301d43..000000000
--- a/xorg-server/mi/mipolyutil.c
+++ /dev/null
@@ -1,369 +0,0 @@
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "regionstr.h"
-#include "gc.h"
-#include "miscanfill.h"
-#include "mipoly.h"
-#include "misc.h" /* MAXINT */
-
-/*
- * fillUtils.c
- *
- * Written by Brian Kelleher; Oct. 1985
- *
- * This module contains all of the utility functions
- * needed to scan convert a polygon.
- *
- */
-
-/*
- * InsertEdgeInET
- *
- * Insert the given edge into the edge table.
- * First we must find the correct bucket in the
- * Edge table, then find the right slot in the
- * bucket. Finally, we can insert it.
- *
- */
-static Bool
-miInsertEdgeInET(EdgeTable * ET, EdgeTableEntry * ETE, int scanline,
- ScanLineListBlock ** SLLBlock, int *iSLLBlock)
-{
- EdgeTableEntry *start, *prev;
- ScanLineList *pSLL, *pPrevSLL;
- ScanLineListBlock *tmpSLLBlock;
-
- /*
- * find the right bucket to put the edge into
- */
- pPrevSLL = &ET->scanlines;
- pSLL = pPrevSLL->next;
- while (pSLL && (pSLL->scanline < scanline)) {
- pPrevSLL = pSLL;
- pSLL = pSLL->next;
- }
-
- /*
- * reassign pSLL (pointer to ScanLineList) if necessary
- */
- if ((!pSLL) || (pSLL->scanline > scanline)) {
- if (*iSLLBlock > SLLSPERBLOCK - 1) {
- tmpSLLBlock = malloc(sizeof(ScanLineListBlock));
- if (!tmpSLLBlock)
- return FALSE;
- (*SLLBlock)->next = tmpSLLBlock;
- tmpSLLBlock->next = NULL;
- *SLLBlock = tmpSLLBlock;
- *iSLLBlock = 0;
- }
- pSLL = &((*SLLBlock)->SLLs[(*iSLLBlock)++]);
-
- pSLL->next = pPrevSLL->next;
- pSLL->edgelist = NULL;
- pPrevSLL->next = pSLL;
- }
- pSLL->scanline = scanline;
-
- /*
- * now insert the edge in the right bucket
- */
- prev = NULL;
- start = pSLL->edgelist;
- while (start && (start->bres.minor < ETE->bres.minor)) {
- prev = start;
- start = start->next;
- }
- ETE->next = start;
-
- if (prev)
- prev->next = ETE;
- else
- pSLL->edgelist = ETE;
- return TRUE;
-}
-
-/*
- * CreateEdgeTable
- *
- * This routine creates the edge table for
- * scan converting polygons.
- * The Edge Table (ET) looks like:
- *
- * EdgeTable
- * --------
- * | ymax | ScanLineLists
- * |scanline|-->------------>-------------->...
- * -------- |scanline| |scanline|
- * |edgelist| |edgelist|
- * --------- ---------
- * | |
- * | |
- * V V
- * list of ETEs list of ETEs
- *
- * where ETE is an EdgeTableEntry data structure,
- * and there is one ScanLineList per scanline at
- * which an edge is initially entered.
- *
- */
-
-Bool
-miCreateETandAET(int count, DDXPointPtr pts, EdgeTable * ET,
- EdgeTableEntry * AET, EdgeTableEntry * pETEs,
- ScanLineListBlock * pSLLBlock)
-{
- DDXPointPtr top, bottom;
- DDXPointPtr PrevPt, CurrPt;
- int iSLLBlock = 0;
-
- int dy;
-
- if (count < 2)
- return TRUE;
-
- /*
- * initialize the Active Edge Table
- */
- AET->next = NULL;
- AET->back = NULL;
- AET->nextWETE = NULL;
- AET->bres.minor = MININT;
-
- /*
- * initialize the Edge Table.
- */
- ET->scanlines.next = NULL;
- ET->ymax = MININT;
- ET->ymin = MAXINT;
- pSLLBlock->next = NULL;
-
- PrevPt = &pts[count - 1];
-
- /*
- * for each vertex in the array of points.
- * In this loop we are dealing with two vertices at
- * a time -- these make up one edge of the polygon.
- */
- while (count--) {
- CurrPt = pts++;
-
- /*
- * find out which point is above and which is below.
- */
- if (PrevPt->y > CurrPt->y) {
- bottom = PrevPt, top = CurrPt;
- pETEs->ClockWise = 0;
- }
- else {
- bottom = CurrPt, top = PrevPt;
- pETEs->ClockWise = 1;
- }
-
- /*
- * don't add horizontal edges to the Edge table.
- */
- if (bottom->y != top->y) {
- pETEs->ymax = bottom->y - 1; /* -1 so we don't get last scanline */
-
- /*
- * initialize integer edge algorithm
- */
- dy = bottom->y - top->y;
- BRESINITPGONSTRUCT(dy, top->x, bottom->x, pETEs->bres);
-
- if (!miInsertEdgeInET(ET, pETEs, top->y, &pSLLBlock, &iSLLBlock)) {
- miFreeStorage(pSLLBlock->next);
- return FALSE;
- }
-
- ET->ymax = max(ET->ymax, PrevPt->y);
- ET->ymin = min(ET->ymin, PrevPt->y);
- pETEs++;
- }
-
- PrevPt = CurrPt;
- }
- return TRUE;
-}
-
-/*
- * loadAET
- *
- * This routine moves EdgeTableEntries from the
- * EdgeTable into the Active Edge Table,
- * leaving them sorted by smaller x coordinate.
- *
- */
-
-void
-miloadAET(EdgeTableEntry * AET, EdgeTableEntry * ETEs)
-{
- EdgeTableEntry *pPrevAET;
- EdgeTableEntry *tmp;
-
- pPrevAET = AET;
- AET = AET->next;
- while (ETEs) {
- while (AET && (AET->bres.minor < ETEs->bres.minor)) {
- pPrevAET = AET;
- AET = AET->next;
- }
- tmp = ETEs->next;
- ETEs->next = AET;
- if (AET)
- AET->back = ETEs;
- ETEs->back = pPrevAET;
- pPrevAET->next = ETEs;
- pPrevAET = ETEs;
-
- ETEs = tmp;
- }
-}
-
-/*
- * computeWAET
- *
- * This routine links the AET by the
- * nextWETE (winding EdgeTableEntry) link for
- * use by the winding number rule. The final
- * Active Edge Table (AET) might look something
- * like:
- *
- * AET
- * ---------- --------- ---------
- * |ymax | |ymax | |ymax |
- * | ... | |... | |... |
- * |next |->|next |->|next |->...
- * |nextWETE| |nextWETE| |nextWETE|
- * --------- --------- ^--------
- * | | |
- * V-------------------> V---> ...
- *
- */
-void
-micomputeWAET(EdgeTableEntry * AET)
-{
- EdgeTableEntry *pWETE;
- int inside = 1;
- int isInside = 0;
-
- AET->nextWETE = NULL;
- pWETE = AET;
- AET = AET->next;
- while (AET) {
- if (AET->ClockWise)
- isInside++;
- else
- isInside--;
-
- if ((!inside && !isInside) || (inside && isInside)) {
- pWETE->nextWETE = AET;
- pWETE = AET;
- inside = !inside;
- }
- AET = AET->next;
- }
- pWETE->nextWETE = NULL;
-}
-
-/*
- * InsertionSort
- *
- * Just a simple insertion sort using
- * pointers and back pointers to sort the Active
- * Edge Table.
- *
- */
-
-int
-miInsertionSort(EdgeTableEntry * AET)
-{
- EdgeTableEntry *pETEchase;
- EdgeTableEntry *pETEinsert;
- EdgeTableEntry *pETEchaseBackTMP;
- int changed = 0;
-
- AET = AET->next;
- while (AET) {
- pETEinsert = AET;
- pETEchase = AET;
- while (pETEchase->back->bres.minor > AET->bres.minor)
- pETEchase = pETEchase->back;
-
- AET = AET->next;
- if (pETEchase != pETEinsert) {
- pETEchaseBackTMP = pETEchase->back;
- pETEinsert->back->next = AET;
- if (AET)
- AET->back = pETEinsert->back;
- pETEinsert->next = pETEchase;
- pETEchase->back->next = pETEinsert;
- pETEchase->back = pETEinsert;
- pETEinsert->back = pETEchaseBackTMP;
- changed = 1;
- }
- }
- return changed;
-}
-
-/*
- * Clean up our act.
- */
-void
-miFreeStorage(ScanLineListBlock * pSLLBlock)
-{
- ScanLineListBlock *tmpSLLBlock;
-
- while (pSLLBlock) {
- tmpSLLBlock = pSLLBlock->next;
- free(pSLLBlock);
- pSLLBlock = tmpSLLBlock;
- }
-}
diff --git a/xorg-server/mi/mipushpxl.c b/xorg-server/mi/mipushpxl.c
index 9a78f4050..f6a1b5259 100644
--- a/xorg-server/mi/mipushpxl.c
+++ b/xorg-server/mi/mipushpxl.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/mi/miscrinit.c b/xorg-server/mi/miscrinit.c
index 327bd1540..b53c7e41a 100644
--- a/xorg-server/mi/miscrinit.c
+++ b/xorg-server/mi/miscrinit.c
@@ -45,7 +45,7 @@ from The Open Group.
/* We use this structure to propogate some information from miScreenInit to
* miCreateScreenResources. miScreenInit allocates the structure, fills it
- * in, and puts it into pScreen->devPrivate. miCreateScreenResources
+ * in, and puts it into pScreen->devPrivate. miCreateScreenResources
* extracts the info and frees the structure. We could've accomplished the
* same thing by adding fields to the screen structure, but they would have
* ended up being redundant, and would have exposed this mi implementation
diff --git a/xorg-server/mi/mispans.c b/xorg-server/mi/mispans.c
deleted file mode 100644
index 11c8a43d0..000000000
--- a/xorg-server/mi/mispans.c
+++ /dev/null
@@ -1,526 +0,0 @@
-/***********************************************************
-
-Copyright 1989, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-Copyright 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "misc.h"
-#include "pixmapstr.h"
-#include "gcstruct.h"
-#include "mispans.h"
-
-/*
-
-These routines maintain lists of Spans, in order to implement the
-``touch-each-pixel-once'' rules of wide lines and arcs.
-
-Written by Joel McCormack, Summer 1989.
-
-*/
-
-void
-miInitSpanGroup(SpanGroup * spanGroup)
-{
- spanGroup->size = 0;
- spanGroup->count = 0;
- spanGroup->group = NULL;
- spanGroup->ymin = MAXSHORT;
- spanGroup->ymax = MINSHORT;
-} /* InitSpanGroup */
-
-#define YMIN(spans) (spans->points[0].y)
-#define YMAX(spans) (spans->points[spans->count-1].y)
-
-static void
-miSubtractSpans(SpanGroup * spanGroup, Spans * sub)
-{
- int i, subCount, spansCount;
- int ymin, ymax, xmin, xmax;
- Spans *spans;
- DDXPointPtr subPt, spansPt;
- int *subWid, *spansWid;
- int extra;
-
- ymin = YMIN(sub);
- ymax = YMAX(sub);
- spans = spanGroup->group;
- for (i = spanGroup->count; i; i--, spans++) {
- if (YMIN(spans) <= ymax && ymin <= YMAX(spans)) {
- subCount = sub->count;
- subPt = sub->points;
- subWid = sub->widths;
- spansCount = spans->count;
- spansPt = spans->points;
- spansWid = spans->widths;
- extra = 0;
- for (;;) {
- while (spansCount && spansPt->y < subPt->y) {
- spansPt++;
- spansWid++;
- spansCount--;
- }
- if (!spansCount)
- break;
- while (subCount && subPt->y < spansPt->y) {
- subPt++;
- subWid++;
- subCount--;
- }
- if (!subCount)
- break;
- if (subPt->y == spansPt->y) {
- xmin = subPt->x;
- xmax = xmin + *subWid;
- if (xmin >= spansPt->x + *spansWid || spansPt->x >= xmax) {
- ;
- }
- else if (xmin <= spansPt->x) {
- if (xmax >= spansPt->x + *spansWid) {
- memmove(spansPt, spansPt + 1,
- sizeof *spansPt * (spansCount - 1));
- memmove(spansWid, spansWid + 1,
- sizeof *spansWid * (spansCount - 1));
- spansPt--;
- spansWid--;
- spans->count--;
- extra++;
- }
- else {
- *spansWid = *spansWid - (xmax - spansPt->x);
- spansPt->x = xmax;
- }
- }
- else {
- if (xmax >= spansPt->x + *spansWid) {
- *spansWid = xmin - spansPt->x;
- }
- else {
- if (!extra) {
- DDXPointPtr newPt;
- int *newwid;
-
-#define EXTRA 8
- newPt =
- (DDXPointPtr) realloc(spans->points,
- (spans->count +
- EXTRA) *
- sizeof(DDXPointRec));
- if (!newPt)
- break;
- spansPt = newPt + (spansPt - spans->points);
- spans->points = newPt;
- newwid =
- (int *) realloc(spans->widths,
- (spans->count +
- EXTRA) * sizeof(int));
- if (!newwid)
- break;
- spansWid = newwid + (spansWid - spans->widths);
- spans->widths = newwid;
- extra = EXTRA;
- }
- memmove(spansPt + 1, spansPt,
- sizeof *spansPt * (spansCount));
- memmove(spansWid + 1, spansWid,
- sizeof *spansWid * (spansCount));
- spans->count++;
- extra--;
- *spansWid = xmin - spansPt->x;
- spansWid++;
- spansPt++;
- *spansWid = *spansWid - (xmax - spansPt->x);
- spansPt->x = xmax;
- }
- }
- }
- spansPt++;
- spansWid++;
- spansCount--;
- }
- }
- }
-}
-
-void
-miAppendSpans(SpanGroup * spanGroup, SpanGroup * otherGroup, Spans * spans)
-{
- int ymin, ymax;
- int spansCount;
-
- spansCount = spans->count;
- if (spansCount > 0) {
- if (spanGroup->size == spanGroup->count) {
- spanGroup->size = (spanGroup->size + 8) * 2;
- spanGroup->group = (Spans *)
- realloc(spanGroup->group, sizeof(Spans) * spanGroup->size);
- }
-
- spanGroup->group[spanGroup->count] = *spans;
- (spanGroup->count)++;
- ymin = spans->points[0].y;
- if (ymin < spanGroup->ymin)
- spanGroup->ymin = ymin;
- ymax = spans->points[spansCount - 1].y;
- if (ymax > spanGroup->ymax)
- spanGroup->ymax = ymax;
- if (otherGroup && otherGroup->ymin < ymax && ymin < otherGroup->ymax) {
- miSubtractSpans(otherGroup, spans);
- }
- }
- else {
- free(spans->points);
- free(spans->widths);
- }
-} /* AppendSpans */
-
-void
-miFreeSpanGroup(SpanGroup * spanGroup)
-{
- free(spanGroup->group);
-}
-
-static void
-QuickSortSpansX(DDXPointRec points[], int widths[], int numSpans)
-{
- int x;
- int i, j, m;
- DDXPointPtr r;
-
-/* Always called with numSpans > 1 */
-/* Sorts only by x, as all y should be the same */
-
-#define ExchangeSpans(a, b) \
-{ \
- DDXPointRec tpt; \
- int tw; \
- \
- tpt = points[a]; points[a] = points[b]; points[b] = tpt; \
- tw = widths[a]; widths[a] = widths[b]; widths[b] = tw; \
-}
-
- do {
- if (numSpans < 9) {
- /* Do insertion sort */
- int xprev;
-
- xprev = points[0].x;
- i = 1;
- do { /* while i != numSpans */
- x = points[i].x;
- if (xprev > x) {
- /* points[i] is out of order. Move into proper location. */
- DDXPointRec tpt;
- int tw, k;
-
- for (j = 0; x >= points[j].x; j++) {
- }
- tpt = points[i];
- tw = widths[i];
- for (k = i; k != j; k--) {
- points[k] = points[k - 1];
- widths[k] = widths[k - 1];
- }
- points[j] = tpt;
- widths[j] = tw;
- x = points[i].x;
- } /* if out of order */
- xprev = x;
- i++;
- } while (i != numSpans);
- return;
- }
-
- /* Choose partition element, stick in location 0 */
- m = numSpans / 2;
- if (points[m].x > points[0].x)
- ExchangeSpans(m, 0);
- if (points[m].x > points[numSpans - 1].x)
- ExchangeSpans(m, numSpans - 1);
- if (points[m].x > points[0].x)
- ExchangeSpans(m, 0);
- x = points[0].x;
-
- /* Partition array */
- i = 0;
- j = numSpans;
- do {
- r = &(points[i]);
- do {
- r++;
- i++;
- } while (i != numSpans && r->x < x);
- r = &(points[j]);
- do {
- r--;
- j--;
- } while (x < r->x);
- if (i < j)
- ExchangeSpans(i, j);
- } while (i < j);
-
- /* Move partition element back to middle */
- ExchangeSpans(0, j);
-
- /* Recurse */
- if (numSpans - j - 1 > 1)
- QuickSortSpansX(&points[j + 1], &widths[j + 1], numSpans - j - 1);
- numSpans = j;
- } while (numSpans > 1);
-} /* QuickSortSpans */
-
-static int
-UniquifySpansX(Spans * spans, DDXPointRec * newPoints, int *newWidths)
-{
- int newx1, newx2, oldpt, i, y;
- DDXPointRec *oldPoints;
- int *oldWidths;
- int *startNewWidths;
-
-/* Always called with numSpans > 1 */
-/* Uniquify the spans, and stash them into newPoints and newWidths. Return the
- number of unique spans. */
-
- startNewWidths = newWidths;
-
- oldPoints = spans->points;
- oldWidths = spans->widths;
-
- y = oldPoints->y;
- newx1 = oldPoints->x;
- newx2 = newx1 + *oldWidths;
-
- for (i = spans->count - 1; i != 0; i--) {
- oldPoints++;
- oldWidths++;
- oldpt = oldPoints->x;
- if (oldpt > newx2) {
- /* Write current span, start a new one */
- newPoints->x = newx1;
- newPoints->y = y;
- *newWidths = newx2 - newx1;
- newPoints++;
- newWidths++;
- newx1 = oldpt;
- newx2 = oldpt + *oldWidths;
- }
- else {
- /* extend current span, if old extends beyond new */
- oldpt = oldpt + *oldWidths;
- if (oldpt > newx2)
- newx2 = oldpt;
- }
- } /* for */
-
- /* Write final span */
- newPoints->x = newx1;
- *newWidths = newx2 - newx1;
- newPoints->y = y;
-
- return (newWidths - startNewWidths) + 1;
-} /* UniquifySpansX */
-
-static void
-miDisposeSpanGroup(SpanGroup * spanGroup)
-{
- int i;
- Spans *spans;
-
- for (i = 0; i < spanGroup->count; i++) {
- spans = spanGroup->group + i;
- free(spans->points);
- free(spans->widths);
- }
-}
-
-void
-miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, SpanGroup * spanGroup)
-{
- int i;
- Spans *spans;
- Spans *yspans;
- int *ysizes;
- int ymin, ylength;
-
- /* Outgoing spans for one big call to FillSpans */
- DDXPointPtr points;
- int *widths;
- int count;
-
- if (spanGroup->count == 0)
- return;
-
- if (spanGroup->count == 1) {
- /* Already should be sorted, unique */
- spans = spanGroup->group;
- (*pGC->ops->FillSpans)
- (pDraw, pGC, spans->count, spans->points, spans->widths, TRUE);
- free(spans->points);
- free(spans->widths);
- }
- else {
- /* Yuck. Gross. Radix sort into y buckets, then sort x and uniquify */
- /* This seems to be the fastest thing to do. I've tried sorting on
- both x and y at the same time rather than creating into all those
- y buckets, but it was somewhat slower. */
-
- ymin = spanGroup->ymin;
- ylength = spanGroup->ymax - ymin + 1;
-
- /* Allocate Spans for y buckets */
- yspans = malloc(ylength * sizeof(Spans));
- ysizes = malloc(ylength * sizeof(int));
-
- if (!yspans || !ysizes) {
- free(yspans);
- free(ysizes);
- miDisposeSpanGroup(spanGroup);
- return;
- }
-
- for (i = 0; i != ylength; i++) {
- ysizes[i] = 0;
- yspans[i].count = 0;
- yspans[i].points = NULL;
- yspans[i].widths = NULL;
- }
-
- /* Go through every single span and put it into the correct bucket */
- count = 0;
- for (i = 0, spans = spanGroup->group;
- i != spanGroup->count; i++, spans++) {
- int index;
- int j;
-
- for (j = 0, points = spans->points, widths = spans->widths;
- j != spans->count; j++, points++, widths++) {
- index = points->y - ymin;
- if (index >= 0 && index < ylength) {
- Spans *newspans = &(yspans[index]);
-
- if (newspans->count == ysizes[index]) {
- DDXPointPtr newpoints;
- int *newwidths;
-
- ysizes[index] = (ysizes[index] + 8) * 2;
- newpoints = (DDXPointPtr) realloc(newspans->points,
- ysizes[index] *
- sizeof(DDXPointRec));
- newwidths =
- (int *) realloc(newspans->widths,
- ysizes[index] * sizeof(int));
- if (!newpoints || !newwidths) {
- for (i = 0; i < ylength; i++) {
- free(yspans[i].points);
- free(yspans[i].widths);
- }
- free(yspans);
- free(ysizes);
- free(newpoints);
- free(newwidths);
- miDisposeSpanGroup(spanGroup);
- return;
- }
- newspans->points = newpoints;
- newspans->widths = newwidths;
- }
- newspans->points[newspans->count] = *points;
- newspans->widths[newspans->count] = *widths;
- (newspans->count)++;
- } /* if y value of span in range */
- } /* for j through spans */
- count += spans->count;
- free(spans->points);
- spans->points = NULL;
- free(spans->widths);
- spans->widths = NULL;
- } /* for i thorough Spans */
-
- /* Now sort by x and uniquify each bucket into the final array */
- points = malloc(count * sizeof(DDXPointRec));
- widths = malloc(count * sizeof(int));
- if (!points || !widths) {
- for (i = 0; i < ylength; i++) {
- free(yspans[i].points);
- free(yspans[i].widths);
- }
- free(yspans);
- free(ysizes);
- free(points);
- free(widths);
- return;
- }
- count = 0;
- for (i = 0; i != ylength; i++) {
- int ycount = yspans[i].count;
-
- if (ycount > 0) {
- if (ycount > 1) {
- QuickSortSpansX(yspans[i].points, yspans[i].widths, ycount);
- count += UniquifySpansX
- (&(yspans[i]), &(points[count]), &(widths[count]));
- }
- else {
- points[count] = yspans[i].points[0];
- widths[count] = yspans[i].widths[0];
- count++;
- }
- free(yspans[i].points);
- free(yspans[i].widths);
- }
- }
-
- (*pGC->ops->FillSpans) (pDraw, pGC, count, points, widths, TRUE);
- free(points);
- free(widths);
- free(yspans);
- free(ysizes); /* use (DE)xalloc for these? */
- }
-
- spanGroup->count = 0;
- spanGroup->ymin = MAXSHORT;
- spanGroup->ymax = MINSHORT;
-}
diff --git a/xorg-server/mi/mispans.h b/xorg-server/mi/mispans.h
deleted file mode 100644
index f3148ff19..000000000
--- a/xorg-server/mi/mispans.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/***********************************************************
-
-Copyright 1989, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-Copyright 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef MISPANS_H
-#define MISPANS_H
-
-typedef struct {
- int count; /* number of spans */
- DDXPointPtr points; /* pointer to list of start points */
- int *widths; /* pointer to list of widths */
-} Spans;
-
-typedef struct {
- int size; /* Total number of *Spans allocated */
- int count; /* Number of *Spans actually in group */
- Spans *group; /* List of Spans */
- int ymin, ymax; /* Min, max y values encountered */
-} SpanGroup;
-
-/* Initialize SpanGroup. MUST BE DONE before use. */
-extern _X_EXPORT void miInitSpanGroup(SpanGroup * /*spanGroup */
- );
-
-/* Add a Spans to a SpanGroup. The spans MUST BE in y-sorted order */
-extern _X_EXPORT void miAppendSpans(SpanGroup * /*spanGroup */ ,
- SpanGroup * /*otherGroup */ ,
- Spans * /*spans */
- );
-
-/* Paint a span group, insuring that each pixel is painted at most once */
-extern _X_EXPORT void miFillUniqueSpanGroup(DrawablePtr /*pDraw */ ,
- GCPtr /*pGC */ ,
- SpanGroup * /*spanGroup */
- );
-
-/* Free up data in a span group. MUST BE DONE or you'll suffer memory leaks */
-extern _X_EXPORT void miFreeSpanGroup(SpanGroup * /*spanGroup */
- );
-
-/* Rops which must use span groups */
-#define miSpansCarefulRop(rop) (((rop) & 0xc) == 0x8 || ((rop) & 0x3) == 0x2)
-#define miSpansEasyRop(rop) (!miSpansCarefulRop(rop))
-
-#endif /* MISPANS_H */
diff --git a/xorg-server/mi/mistruct.h b/xorg-server/mi/mistruct.h
index 17f7d8329..00856f191 100644
--- a/xorg-server/mi/mistruct.h
+++ b/xorg-server/mi/mistruct.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/mi/mivaltree.c b/xorg-server/mi/mivaltree.c
index 8e4e9a9e0..ea6889fdc 100644
--- a/xorg-server/mi/mivaltree.c
+++ b/xorg-server/mi/mivaltree.c
@@ -27,19 +27,19 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*
- * Copyright 1987, 1988, 1989 by
+ * Copyright 1987, 1988, 1989 by
* Digital Equipment Corporation, Maynard, Massachusetts,
- *
+ *
* All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
+ * both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of Digital not be
* used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- *
+ * software without specific, written prior permission.
+ *
* DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
* DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
@@ -47,7 +47,7 @@ in this Software without prior written authorization from The Open Group.
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
- *
+ *
******************************************************************/
/* The panoramix components contained the following notice */
@@ -79,7 +79,7 @@ Equipment Corporation.
******************************************************************/
- /*
+ /*
* Aug '86: Susan Angebranndt -- original code
* July '87: Adam de Boor -- substantially modified and commented
* Summer '89: Joel McCormack -- so fast you wouldn't believe it possible.
diff --git a/xorg-server/mi/miwideline.c b/xorg-server/mi/miwideline.c
index 29ba12c69..452d74fc1 100644
--- a/xorg-server/mi/miwideline.c
+++ b/xorg-server/mi/miwideline.c
@@ -24,6 +24,25 @@ not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
+Copyright 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
*/
/* Author: Keith Packard, MIT X Consortium */
@@ -52,6 +71,505 @@ from The Open Group.
#include "miwideline.h"
#include "mi.h"
+#if 0
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "misc.h"
+#include "pixmapstr.h"
+#include "gcstruct.h"
+#endif
+
+typedef struct {
+ int count; /* number of spans */
+ DDXPointPtr points; /* pointer to list of start points */
+ int *widths; /* pointer to list of widths */
+} Spans;
+
+typedef struct {
+ int size; /* Total number of *Spans allocated */
+ int count; /* Number of *Spans actually in group */
+ Spans *group; /* List of Spans */
+ int ymin, ymax; /* Min, max y values encountered */
+} SpanGroup;
+
+/* Rops which must use span groups */
+#define miSpansCarefulRop(rop) (((rop) & 0xc) == 0x8 || ((rop) & 0x3) == 0x2)
+#define miSpansEasyRop(rop) (!miSpansCarefulRop(rop))
+
+/*
+
+These routines maintain lists of Spans, in order to implement the
+``touch-each-pixel-once'' rules of wide lines and arcs.
+
+Written by Joel McCormack, Summer 1989.
+
+*/
+
+static void
+miInitSpanGroup(SpanGroup * spanGroup)
+{
+ spanGroup->size = 0;
+ spanGroup->count = 0;
+ spanGroup->group = NULL;
+ spanGroup->ymin = MAXSHORT;
+ spanGroup->ymax = MINSHORT;
+} /* InitSpanGroup */
+
+#define YMIN(spans) (spans->points[0].y)
+#define YMAX(spans) (spans->points[spans->count-1].y)
+
+static void
+miSubtractSpans(SpanGroup * spanGroup, Spans * sub)
+{
+ int i, subCount, spansCount;
+ int ymin, ymax, xmin, xmax;
+ Spans *spans;
+ DDXPointPtr subPt, spansPt;
+ int *subWid, *spansWid;
+ int extra;
+
+ ymin = YMIN(sub);
+ ymax = YMAX(sub);
+ spans = spanGroup->group;
+ for (i = spanGroup->count; i; i--, spans++) {
+ if (YMIN(spans) <= ymax && ymin <= YMAX(spans)) {
+ subCount = sub->count;
+ subPt = sub->points;
+ subWid = sub->widths;
+ spansCount = spans->count;
+ spansPt = spans->points;
+ spansWid = spans->widths;
+ extra = 0;
+ for (;;) {
+ while (spansCount && spansPt->y < subPt->y) {
+ spansPt++;
+ spansWid++;
+ spansCount--;
+ }
+ if (!spansCount)
+ break;
+ while (subCount && subPt->y < spansPt->y) {
+ subPt++;
+ subWid++;
+ subCount--;
+ }
+ if (!subCount)
+ break;
+ if (subPt->y == spansPt->y) {
+ xmin = subPt->x;
+ xmax = xmin + *subWid;
+ if (xmin >= spansPt->x + *spansWid || spansPt->x >= xmax) {
+ ;
+ }
+ else if (xmin <= spansPt->x) {
+ if (xmax >= spansPt->x + *spansWid) {
+ memmove(spansPt, spansPt + 1,
+ sizeof *spansPt * (spansCount - 1));
+ memmove(spansWid, spansWid + 1,
+ sizeof *spansWid * (spansCount - 1));
+ spansPt--;
+ spansWid--;
+ spans->count--;
+ extra++;
+ }
+ else {
+ *spansWid = *spansWid - (xmax - spansPt->x);
+ spansPt->x = xmax;
+ }
+ }
+ else {
+ if (xmax >= spansPt->x + *spansWid) {
+ *spansWid = xmin - spansPt->x;
+ }
+ else {
+ if (!extra) {
+ DDXPointPtr newPt;
+ int *newwid;
+
+#define EXTRA 8
+ newPt =
+ (DDXPointPtr) realloc(spans->points,
+ (spans->count +
+ EXTRA) *
+ sizeof(DDXPointRec));
+ if (!newPt)
+ break;
+ spansPt = newPt + (spansPt - spans->points);
+ spans->points = newPt;
+ newwid =
+ (int *) realloc(spans->widths,
+ (spans->count +
+ EXTRA) * sizeof(int));
+ if (!newwid)
+ break;
+ spansWid = newwid + (spansWid - spans->widths);
+ spans->widths = newwid;
+ extra = EXTRA;
+ }
+ memmove(spansPt + 1, spansPt,
+ sizeof *spansPt * (spansCount));
+ memmove(spansWid + 1, spansWid,
+ sizeof *spansWid * (spansCount));
+ spans->count++;
+ extra--;
+ *spansWid = xmin - spansPt->x;
+ spansWid++;
+ spansPt++;
+ *spansWid = *spansWid - (xmax - spansPt->x);
+ spansPt->x = xmax;
+ }
+ }
+ }
+ spansPt++;
+ spansWid++;
+ spansCount--;
+ }
+ }
+ }
+}
+
+static void
+miAppendSpans(SpanGroup * spanGroup, SpanGroup * otherGroup, Spans * spans)
+{
+ int ymin, ymax;
+ int spansCount;
+
+ spansCount = spans->count;
+ if (spansCount > 0) {
+ if (spanGroup->size == spanGroup->count) {
+ spanGroup->size = (spanGroup->size + 8) * 2;
+ spanGroup->group = (Spans *)
+ realloc(spanGroup->group, sizeof(Spans) * spanGroup->size);
+ }
+
+ spanGroup->group[spanGroup->count] = *spans;
+ (spanGroup->count)++;
+ ymin = spans->points[0].y;
+ if (ymin < spanGroup->ymin)
+ spanGroup->ymin = ymin;
+ ymax = spans->points[spansCount - 1].y;
+ if (ymax > spanGroup->ymax)
+ spanGroup->ymax = ymax;
+ if (otherGroup && otherGroup->ymin < ymax && ymin < otherGroup->ymax) {
+ miSubtractSpans(otherGroup, spans);
+ }
+ }
+ else {
+ free(spans->points);
+ free(spans->widths);
+ }
+} /* AppendSpans */
+
+static void
+miFreeSpanGroup(SpanGroup * spanGroup)
+{
+ free(spanGroup->group);
+}
+
+static void
+QuickSortSpansX(DDXPointRec points[], int widths[], int numSpans)
+{
+ int x;
+ int i, j, m;
+ DDXPointPtr r;
+
+/* Always called with numSpans > 1 */
+/* Sorts only by x, as all y should be the same */
+
+#define ExchangeSpans(a, b) \
+{ \
+ DDXPointRec tpt; \
+ int tw; \
+ \
+ tpt = points[a]; points[a] = points[b]; points[b] = tpt; \
+ tw = widths[a]; widths[a] = widths[b]; widths[b] = tw; \
+}
+
+ do {
+ if (numSpans < 9) {
+ /* Do insertion sort */
+ int xprev;
+
+ xprev = points[0].x;
+ i = 1;
+ do { /* while i != numSpans */
+ x = points[i].x;
+ if (xprev > x) {
+ /* points[i] is out of order. Move into proper location. */
+ DDXPointRec tpt;
+ int tw, k;
+
+ for (j = 0; x >= points[j].x; j++) {
+ }
+ tpt = points[i];
+ tw = widths[i];
+ for (k = i; k != j; k--) {
+ points[k] = points[k - 1];
+ widths[k] = widths[k - 1];
+ }
+ points[j] = tpt;
+ widths[j] = tw;
+ x = points[i].x;
+ } /* if out of order */
+ xprev = x;
+ i++;
+ } while (i != numSpans);
+ return;
+ }
+
+ /* Choose partition element, stick in location 0 */
+ m = numSpans / 2;
+ if (points[m].x > points[0].x)
+ ExchangeSpans(m, 0);
+ if (points[m].x > points[numSpans - 1].x)
+ ExchangeSpans(m, numSpans - 1);
+ if (points[m].x > points[0].x)
+ ExchangeSpans(m, 0);
+ x = points[0].x;
+
+ /* Partition array */
+ i = 0;
+ j = numSpans;
+ do {
+ r = &(points[i]);
+ do {
+ r++;
+ i++;
+ } while (i != numSpans && r->x < x);
+ r = &(points[j]);
+ do {
+ r--;
+ j--;
+ } while (x < r->x);
+ if (i < j)
+ ExchangeSpans(i, j);
+ } while (i < j);
+
+ /* Move partition element back to middle */
+ ExchangeSpans(0, j);
+
+ /* Recurse */
+ if (numSpans - j - 1 > 1)
+ QuickSortSpansX(&points[j + 1], &widths[j + 1], numSpans - j - 1);
+ numSpans = j;
+ } while (numSpans > 1);
+} /* QuickSortSpans */
+
+static int
+UniquifySpansX(Spans * spans, DDXPointRec * newPoints, int *newWidths)
+{
+ int newx1, newx2, oldpt, i, y;
+ DDXPointRec *oldPoints;
+ int *oldWidths;
+ int *startNewWidths;
+
+/* Always called with numSpans > 1 */
+/* Uniquify the spans, and stash them into newPoints and newWidths. Return the
+ number of unique spans. */
+
+ startNewWidths = newWidths;
+
+ oldPoints = spans->points;
+ oldWidths = spans->widths;
+
+ y = oldPoints->y;
+ newx1 = oldPoints->x;
+ newx2 = newx1 + *oldWidths;
+
+ for (i = spans->count - 1; i != 0; i--) {
+ oldPoints++;
+ oldWidths++;
+ oldpt = oldPoints->x;
+ if (oldpt > newx2) {
+ /* Write current span, start a new one */
+ newPoints->x = newx1;
+ newPoints->y = y;
+ *newWidths = newx2 - newx1;
+ newPoints++;
+ newWidths++;
+ newx1 = oldpt;
+ newx2 = oldpt + *oldWidths;
+ }
+ else {
+ /* extend current span, if old extends beyond new */
+ oldpt = oldpt + *oldWidths;
+ if (oldpt > newx2)
+ newx2 = oldpt;
+ }
+ } /* for */
+
+ /* Write final span */
+ newPoints->x = newx1;
+ *newWidths = newx2 - newx1;
+ newPoints->y = y;
+
+ return (newWidths - startNewWidths) + 1;
+} /* UniquifySpansX */
+
+static void
+miDisposeSpanGroup(SpanGroup * spanGroup)
+{
+ int i;
+ Spans *spans;
+
+ for (i = 0; i < spanGroup->count; i++) {
+ spans = spanGroup->group + i;
+ free(spans->points);
+ free(spans->widths);
+ }
+}
+
+static void
+miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, SpanGroup * spanGroup)
+{
+ int i;
+ Spans *spans;
+ Spans *yspans;
+ int *ysizes;
+ int ymin, ylength;
+
+ /* Outgoing spans for one big call to FillSpans */
+ DDXPointPtr points;
+ int *widths;
+ int count;
+
+ if (spanGroup->count == 0)
+ return;
+
+ if (spanGroup->count == 1) {
+ /* Already should be sorted, unique */
+ spans = spanGroup->group;
+ (*pGC->ops->FillSpans)
+ (pDraw, pGC, spans->count, spans->points, spans->widths, TRUE);
+ free(spans->points);
+ free(spans->widths);
+ }
+ else {
+ /* Yuck. Gross. Radix sort into y buckets, then sort x and uniquify */
+ /* This seems to be the fastest thing to do. I've tried sorting on
+ both x and y at the same time rather than creating into all those
+ y buckets, but it was somewhat slower. */
+
+ ymin = spanGroup->ymin;
+ ylength = spanGroup->ymax - ymin + 1;
+
+ /* Allocate Spans for y buckets */
+ yspans = malloc(ylength * sizeof(Spans));
+ ysizes = malloc(ylength * sizeof(int));
+
+ if (!yspans || !ysizes) {
+ free(yspans);
+ free(ysizes);
+ miDisposeSpanGroup(spanGroup);
+ return;
+ }
+
+ for (i = 0; i != ylength; i++) {
+ ysizes[i] = 0;
+ yspans[i].count = 0;
+ yspans[i].points = NULL;
+ yspans[i].widths = NULL;
+ }
+
+ /* Go through every single span and put it into the correct bucket */
+ count = 0;
+ for (i = 0, spans = spanGroup->group;
+ i != spanGroup->count; i++, spans++) {
+ int index;
+ int j;
+
+ for (j = 0, points = spans->points, widths = spans->widths;
+ j != spans->count; j++, points++, widths++) {
+ index = points->y - ymin;
+ if (index >= 0 && index < ylength) {
+ Spans *newspans = &(yspans[index]);
+
+ if (newspans->count == ysizes[index]) {
+ DDXPointPtr newpoints;
+ int *newwidths;
+
+ ysizes[index] = (ysizes[index] + 8) * 2;
+ newpoints = (DDXPointPtr) realloc(newspans->points,
+ ysizes[index] *
+ sizeof(DDXPointRec));
+ newwidths =
+ (int *) realloc(newspans->widths,
+ ysizes[index] * sizeof(int));
+ if (!newpoints || !newwidths) {
+ for (i = 0; i < ylength; i++) {
+ free(yspans[i].points);
+ free(yspans[i].widths);
+ }
+ free(yspans);
+ free(ysizes);
+ free(newpoints);
+ free(newwidths);
+ miDisposeSpanGroup(spanGroup);
+ return;
+ }
+ newspans->points = newpoints;
+ newspans->widths = newwidths;
+ }
+ newspans->points[newspans->count] = *points;
+ newspans->widths[newspans->count] = *widths;
+ (newspans->count)++;
+ } /* if y value of span in range */
+ } /* for j through spans */
+ count += spans->count;
+ free(spans->points);
+ spans->points = NULL;
+ free(spans->widths);
+ spans->widths = NULL;
+ } /* for i thorough Spans */
+
+ /* Now sort by x and uniquify each bucket into the final array */
+ points = malloc(count * sizeof(DDXPointRec));
+ widths = malloc(count * sizeof(int));
+ if (!points || !widths) {
+ for (i = 0; i < ylength; i++) {
+ free(yspans[i].points);
+ free(yspans[i].widths);
+ }
+ free(yspans);
+ free(ysizes);
+ free(points);
+ free(widths);
+ return;
+ }
+ count = 0;
+ for (i = 0; i != ylength; i++) {
+ int ycount = yspans[i].count;
+
+ if (ycount > 0) {
+ if (ycount > 1) {
+ QuickSortSpansX(yspans[i].points, yspans[i].widths, ycount);
+ count += UniquifySpansX
+ (&(yspans[i]), &(points[count]), &(widths[count]));
+ }
+ else {
+ points[count] = yspans[i].points[0];
+ widths[count] = yspans[i].widths[0];
+ count++;
+ }
+ free(yspans[i].points);
+ free(yspans[i].widths);
+ }
+ }
+
+ (*pGC->ops->FillSpans) (pDraw, pGC, count, points, widths, TRUE);
+ free(points);
+ free(widths);
+ free(yspans);
+ free(ysizes); /* use (DE)xalloc for these? */
+ }
+
+ spanGroup->count = 0;
+ spanGroup->ymin = MAXSHORT;
+ spanGroup->ymax = MINSHORT;
+}
+
static Bool
InitSpans(Spans * spans, size_t nspans)
{
@@ -273,7 +791,7 @@ miFillRectPolyHelper(DrawablePtr pDrawable,
}
}
-/* static */ int
+static int
miPolyBuildEdge(double x0, double y0, double k, /* x0 * dy - y0 * dx */
int dx, int dy, int xi, int yi, int left, PolyEdgePtr edge)
{
@@ -325,7 +843,7 @@ miPolyBuildEdge(double x0, double y0, double k, /* x0 * dy - y0 * dx */
#define StepAround(v, incr, max) (((v) + (incr) < 0) ? (max - 1) : ((v) + (incr) == max) ? 0 : ((v) + (incr)))
-/* static */ int
+static int
miPolyBuildPoly(PolyVertexPtr vertices,
PolySlopePtr slopes,
int count,
@@ -865,7 +1383,7 @@ miRoundJoinFace(LineFacePtr face, PolyEdgePtr edge, Bool *leftEdge)
return y;
}
-void
+static void
miRoundJoinClip(LineFacePtr pLeft, LineFacePtr pRight,
PolyEdgePtr edge1, PolyEdgePtr edge2,
int *y1, int *y2, Bool *left1, Bool *left2)
@@ -886,7 +1404,7 @@ miRoundJoinClip(LineFacePtr pLeft, LineFacePtr pRight,
*y2 = miRoundJoinFace(pRight, edge2, left2);
}
-int
+static int
miRoundCapClip(LineFacePtr face, Bool isInt, PolyEdgePtr edge, Bool *leftEdge)
{
int y;
diff --git a/xorg-server/mi/miwideline.h b/xorg-server/mi/miwideline.h
index 110541120..88bc3d6c8 100644
--- a/xorg-server/mi/miwideline.h
+++ b/xorg-server/mi/miwideline.h
@@ -28,7 +28,6 @@ from The Open Group.
/* Author: Keith Packard, MIT X Consortium */
-#include "mispans.h"
#include "mifpoly.h" /* for ICEIL */
/*
@@ -92,28 +91,3 @@ typedef struct _LineFace {
ValidateGC (pDrawable, pGC); \
} \
}
-
-extern _X_EXPORT void miRoundJoinClip(LineFacePtr /*pLeft */ ,
- LineFacePtr /*pRight */ ,
- PolyEdgePtr /*edge1 */ ,
- PolyEdgePtr /*edge2 */ ,
- int * /*y1 */ ,
- int * /*y2 */ ,
- Bool * /*left1 */ ,
- Bool * /*left2 */
- );
-
-extern _X_EXPORT int miRoundCapClip(LineFacePtr /*face */ ,
- Bool /*isInt */ ,
- PolyEdgePtr /*edge */ ,
- Bool * /*leftEdge */
- );
-
-extern _X_EXPORT int miPolyBuildEdge(double x0, double y0, double k, int dx,
- int dy, int xi, int yi, int left,
- PolyEdgePtr edge);
-extern _X_EXPORT int miPolyBuildPoly(PolyVertexPtr vertices,
- PolySlopePtr slopes, int count, int xi,
- int yi, PolyEdgePtr left,
- PolyEdgePtr right, int *pnleft,
- int *pnright, int *h);
diff --git a/xorg-server/mi/miwindow.c b/xorg-server/mi/miwindow.c
index 0cf50465a..a1af3a770 100644
--- a/xorg-server/mi/miwindow.c
+++ b/xorg-server/mi/miwindow.c
@@ -27,13 +27,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/mi/mizerclip.c b/xorg-server/mi/mizerclip.c
index d05bf6788..0ae964190 100644
--- a/xorg-server/mi/mizerclip.c
+++ b/xorg-server/mi/mizerclip.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/mi/mizerline.c b/xorg-server/mi/mizerline.c
index f30e01239..5a2447014 100644
--- a/xorg-server/mi/mizerline.c
+++ b/xorg-server/mi/mizerline.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -235,7 +235,7 @@ miZeroLine(DrawablePtr pDraw, GCPtr pGC, int mode, /* Origin or Previous */
length = abs(new_x2 - new_x1);
/* if we've clipped the endpoint, always draw the full length
- * of the segment, because then the capstyle doesn't matter
+ * of the segment, because then the capstyle doesn't matter
*/
if (pt2_clipped)
length++;
@@ -295,7 +295,7 @@ miZeroLine(DrawablePtr pDraw, GCPtr pGC, int mode, /* Origin or Previous */
length = abs(new_y2 - new_y1);
/* if we've clipped the endpoint, always draw the full length
- * of the segment, because then the capstyle doesn't matter
+ * of the segment, because then the capstyle doesn't matter
*/
if (pt2_clipped)
length++;
diff --git a/xorg-server/miext/damage/damage.c b/xorg-server/miext/damage/damage.c
index 9bd9c84e7..6ef7f9dfc 100644
--- a/xorg-server/miext/damage/damage.c
+++ b/xorg-server/miext/damage/damage.c
@@ -1591,7 +1591,7 @@ miDamageCreate(DamagePtr pDamage)
* Since we can't know if a GC has been validated against one of the affected
* children, just bump them all to be safe.
*/
-static int
+static int
damageRegisterVisit(WindowPtr pWin, void *data)
{
pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER;
diff --git a/xorg-server/miext/rootless/rootless.h b/xorg-server/miext/rootless/rootless.h
index a3f38b633..1be61cdf3 100644
--- a/xorg-server/miext/rootless/rootless.h
+++ b/xorg-server/miext/rootless/rootless.h
@@ -319,7 +319,7 @@ typedef struct _RootlessFrameProcs {
Bool RootlessInit(ScreenPtr pScreen, RootlessFrameProcsPtr procs);
/*
- * Return the frame ID for the physical window displaying the given window.
+ * Return the frame ID for the physical window displaying the given window.
*
* create If true and the window has no frame, attempt to create one
*/
diff --git a/xorg-server/miext/rootless/rootlessGC.c b/xorg-server/miext/rootless/rootlessGC.c
index 23ff3934e..4fba26c8d 100644
--- a/xorg-server/miext/rootless/rootlessGC.c
+++ b/xorg-server/miext/rootless/rootlessGC.c
@@ -297,7 +297,7 @@ RootlessCreateGC(GCPtr pGC)
* All the others just unwrap and call.
*/
-// GCFUNC_UNRAP assumes funcs have been wrapped and
+// GCFUNC_UNRAP assumes funcs have been wrapped and
// does not assume ops have been wrapped
#define GCFUNC_UNWRAP(pGC) \
RootlessGCRec *gcrec = (RootlessGCRec *) \
diff --git a/xorg-server/miext/rootless/rootlessValTree.c b/xorg-server/miext/rootless/rootlessValTree.c
index c7c2c9935..0f7b76cb6 100644
--- a/xorg-server/miext/rootless/rootlessValTree.c
+++ b/xorg-server/miext/rootless/rootlessValTree.c
@@ -29,19 +29,19 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*
- * Copyright 1987, 1988, 1989 by
+ * Copyright 1987, 1988, 1989 by
* Digital Equipment Corporation, Maynard, Massachusetts,
- *
+ *
* All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
+ * both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of Digital not be
* used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- *
+ * software without specific, written prior permission.
+ *
* DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
* DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
@@ -49,7 +49,7 @@ in this Software without prior written authorization from The Open Group.
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
- *
+ *
******************************************************************/
/* The panoramix components contained the following notice */
@@ -80,7 +80,7 @@ dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
- /*
+ /*
* Aug '86: Susan Angebranndt -- original code
* July '87: Adam de Boor -- substantially modified and commented
* Summer '89: Joel McCormack -- so fast you wouldn't believe it possible.
@@ -456,9 +456,9 @@ RootlessTreeObscured(WindowPtr pParent)
*
*-----------------------------------------------------------------------
*/
-/*
+/*
Quartz version: used for validate from root in rootless mode.
- We need to make sure top-level windows don't clip each other,
+ We need to make sure top-level windows don't clip each other,
and that top-level windows aren't clipped to the root window.
*/
/*ARGSUSED*/
@@ -491,9 +491,9 @@ RootlessMiValidateTree(WindowPtr pRoot, /* Parent to validate */
ErrorF("ValidateTree: BUSTED!\n");
}
- /*
- * Recursively compute the clips for all children of the root.
- * They don't clip against each other or the root itself, so
+ /*
+ * Recursively compute the clips for all children of the root.
+ * They don't clip against each other or the root itself, so
* childClip is always reset to that child's size.
*/
@@ -520,7 +520,7 @@ RootlessMiValidateTree(WindowPtr pRoot, /* Parent to validate */
RegionUninit(&childClip);
- /* The root is never clipped by its children, so nothing on the root
+ /* The root is never clipped by its children, so nothing on the root
is ever exposed by moving or mapping its children. */
RegionNull(&pRoot->valdata->after.exposed);
RegionNull(&pRoot->valdata->after.borderExposed);
diff --git a/xorg-server/miext/rootless/rootlessWindow.c b/xorg-server/miext/rootless/rootlessWindow.c
index 3dbd5886a..a8f296a39 100644
--- a/xorg-server/miext/rootless/rootlessWindow.c
+++ b/xorg-server/miext/rootless/rootlessWindow.c
@@ -128,7 +128,7 @@ RootlessNativeWindowMoved(WindowPtr pWin)
return;
}
- /* Don't want to do anything to the physical window (avoids
+ /* Don't want to do anything to the physical window (avoids
notification-response feedback loops) */
no_configure_window = TRUE;
@@ -477,7 +477,7 @@ RootlessRealizeWindow(WindowPtr pWin)
/*
* RootlessFrameForWindow
- * Returns the frame ID for the physical window displaying the given window.
+ * Returns the frame ID for the physical window displaying the given window.
* If CREATE is true and the window has no frame, attempt to create one.
*/
RootlessFrameID
@@ -559,7 +559,7 @@ RootlessReorderWindow(WindowPtr pWin)
RootlessStopDrawing(pWin, FALSE);
- /* Find the next window above this one that has a mapped frame.
+ /* Find the next window above this one that has a mapped frame.
* Only include cases where the windows are in the same category of
* hittability to ensure offscreen windows dont get restacked
* relative to onscreen ones (but that the offscreen ones maintain
diff --git a/xorg-server/miext/shadow/shrotate.c b/xorg-server/miext/shadow/shrotate.c
index 779a905d2..a0fc4ec4e 100644
--- a/xorg-server/miext/shadow/shrotate.c
+++ b/xorg-server/miext/shadow/shrotate.c
@@ -259,7 +259,7 @@ shadowUpdateRotatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
p = pixelsPerBits;
/*
* Build one word of output from multiple inputs
- *
+ *
* Note that for 90/270 rotations, this will walk
* down the shadow hitting each scanline once.
* This is probably not very efficient.
diff --git a/xorg-server/miext/sync/misyncfd.c b/xorg-server/miext/sync/misyncfd.c
index 93ff85fa8..92f3b2294 100644
--- a/xorg-server/miext/sync/misyncfd.c
+++ b/xorg-server/miext/sync/misyncfd.c
@@ -77,7 +77,7 @@ _X_EXPORT Bool miSyncFdScreenInit(ScreenPtr pScreen,
if (!miSyncSetup(pScreen))
return FALSE;
-
+
if (!dixPrivateKeyRegistered(&syncFdScreenPrivateKey)) {
if (!dixRegisterPrivateKey(&syncFdScreenPrivateKey, PRIVATE_SCREEN, 0))
return FALSE;
@@ -94,6 +94,6 @@ _X_EXPORT Bool miSyncFdScreenInit(ScreenPtr pScreen,
priv->funcs = *funcs;
dixSetPrivate(&pScreen->devPrivates, &syncFdScreenPrivateKey, priv);
-
+
return TRUE;
}
diff --git a/xorg-server/os/WaitFor.c b/xorg-server/os/WaitFor.c
index 3eb15b9b8..86d96c846 100644
--- a/xorg-server/os/WaitFor.c
+++ b/xorg-server/os/WaitFor.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -82,7 +82,7 @@ SOFTWARE.
#define EINVAL WSAEINVAL
#undef EBADF
#define EBADF WSAENOTSOCK
-/* Windows select does not set errno. Use GetErrno as wrapper for
+/* Windows select does not set errno. Use GetErrno as wrapper for
WSAGetLastError */
#define GetErrno WSAGetLastError
#else
@@ -167,7 +167,7 @@ WaitForSomething(int *pClientsReady)
busfault_check();
#endif
- /* We need a while loop here to handle
+ /* We need a while loop here to handle
crashed connections and the screen saver timeout */
while (1) {
/* deal with any blocked jobs */
@@ -343,14 +343,14 @@ WaitForSomething(int *pClientsReady)
* ready, they are all returned. This means that an
* aggressive client could take over the server.
* This was not considered a big problem because
- * aggressive clients can hose the server in so many
+ * aggressive clients can hose the server in so many
* other ways :)
*/
client_priority = clients[client_index]->priority;
if (nready == 0 || client_priority > highest_priority) {
/* Either we found the first client, or we found
* a client whose priority is greater than all others
- * that have been found so far. Either way, we want
+ * that have been found so far. Either way, we want
* to initialize the list of clients to contain just
* this client.
*/
@@ -358,7 +358,7 @@ WaitForSomething(int *pClientsReady)
highest_priority = client_priority;
nready = 1;
}
- /* the following if makes sure that multiple same-priority
+ /* the following if makes sure that multiple same-priority
* clients get batched together
*/
else if (client_priority == highest_priority) {
diff --git a/xorg-server/os/access.c b/xorg-server/os/access.c
index 125f35f5f..5c510ded2 100644
--- a/xorg-server/os/access.c
+++ b/xorg-server/os/access.c
@@ -35,13 +35,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -201,7 +201,7 @@ static Bool NewHost(int /*family */ ,
/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
+ checked in DisableLocalHost(), which is called to disable the default
local host entries when stronger authentication is turned on. */
typedef struct _host {
@@ -309,7 +309,7 @@ ifioctl(int fd, int cmd, char *arg)
/*
* DefineSelf (fd):
*
- * Define this host for access control. Find all the hosts the OS knows about
+ * Define this host for access control. Find all the hosts the OS knows about
* for this fd and add them to the selfhosts list.
*/
@@ -712,7 +712,7 @@ DefineSelf(int fd)
)
continue;
- /*
+ /*
* ignore 'localhost' entries as they're not useful
* on the other end of the wire
*/
@@ -835,7 +835,7 @@ ResetHosts(const char *display)
} saddr;
#endif
int family = 0;
- void *addr;
+ void *addr = NULL;
int len;
siTypesInitialize();
@@ -928,8 +928,8 @@ ResetHosts(const char *display)
len = a->ai_addrlen;
f = ConvertAddr(a->ai_addr, &len,
(void **) &addr);
- if ((family == f) ||
- ((family == FamilyWild) && (f != -1))) {
+ if (addr && ((family == f) ||
+ ((family == FamilyWild) && (f != -1)))) {
NewHost(f, addr, len, FALSE);
}
}
@@ -1010,7 +1010,7 @@ ComputeLocalClient(ClientPtr client)
/*
* Return the uid and all gids of a connected local client
* Allocates a LocalClientCredRec - caller must call FreeLocalClientCreds
- *
+ *
* Used by localuser & localgroup ServerInterpreted access control forms below
* Used by AuthAudit to log who local connections came from
*/
@@ -1037,8 +1037,8 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec ** lccp)
return -1;
ci = ((OsCommPtr) client->osPrivate)->trans_conn;
#if !(defined(sun) && defined(HAVE_GETPEERUCRED))
- /* Most implementations can only determine peer credentials for Unix
- * domain sockets - Solaris getpeerucred can work with a bit more, so
+ /* Most implementations can only determine peer credentials for Unix
+ * domain sockets - Solaris getpeerucred can work with a bit more, so
* we just let it tell us if the connection type is supported or not
*/
if (!_XSERVTransIsLocal(ci)) {
@@ -1203,7 +1203,7 @@ ForEachHostInFamily(int family, Bool (*func) (unsigned char *addr,
return FALSE;
}
-/* Add a host to the access control list. This is the internal interface
+/* Add a host to the access control list. This is the internal interface
* called when starting or resetting the server */
static Bool
NewHost(int family, const void *addr, int len, int addingLocalHosts)
@@ -1352,14 +1352,14 @@ CheckAddr(int family, const void *pAddr, unsigned length)
return len;
}
-/* Check if a host is not in the access control list.
+/* Check if a host is not in the access control list.
* Returns 1 if host is invalid, 0 if we've found it. */
int
InvalidHost(register struct sockaddr *saddr, int len, ClientPtr client)
{
int family;
- void *addr;
+ void *addr = NULL;
register HOST *selfhost, *host;
if (!AccessEnabled) /* just let them in */
@@ -1370,7 +1370,7 @@ InvalidHost(register struct sockaddr *saddr, int len, ClientPtr client)
if (family == FamilyLocal) {
if (!LocalHostEnabled) {
/*
- * check to see if any local address is enabled. This
+ * check to see if any local address is enabled. This
* implicitly enables local connections.
*/
for (selfhost = selfhosts; selfhost; selfhost = selfhost->next) {
@@ -1386,12 +1386,12 @@ InvalidHost(register struct sockaddr *saddr, int len, ClientPtr client)
}
for (host = validhosts; host; host = host->next) {
if (host->family == FamilyServerInterpreted) {
- if (siAddrMatch(family, addr, len, host, client)) {
+ if (addr && siAddrMatch(family, addr, len, host, client)) {
return 0;
}
}
else {
- if (addrEqual(family, addr, len, host))
+ if (addr && addrEqual(family, addr, len, host))
return 0;
}
@@ -1474,7 +1474,7 @@ GetAccessControl(void)
* See xc/doc/specs/SIAddresses for formal definitions of each type.
*/
-/* These definitions and the siTypeAdd function could be exported in the
+/* These definitions and the siTypeAdd function could be exported in the
* future to enable loading additional host types, but that was not done for
* the initial implementation.
*/
@@ -1571,7 +1571,7 @@ siCheckAddr(const char *addrString, int length)
valueString = (const char *) memchr(addrString, '\0', length);
if (valueString != NULL) {
/* Make sure the first string is a recognized address type,
- * and the second string is a valid address of that type.
+ * and the second string is a valid address of that type.
*/
typelen = strlen(addrString) + 1;
addrlen = length - typelen;
@@ -1638,8 +1638,8 @@ siHostnameAddrMatch(int family, void *addr, int len,
{
Bool res = FALSE;
-/* Currently only supports checking against IPv4 & IPv6 connections, but
- * support for other address families, such as DECnet, could be added if
+/* Currently only supports checking against IPv4 & IPv6 connections, but
+ * support for other address families, such as DECnet, could be added if
* desired.
*/
#if defined(IPv6) && defined(AF_INET6)
@@ -1648,7 +1648,7 @@ siHostnameAddrMatch(int family, void *addr, int len,
struct addrinfo *addresses;
struct addrinfo *a;
int f, hostaddrlen;
- void *hostaddr;
+ void *hostaddr = NULL;
if (siAddrLen >= sizeof(hostname))
return FALSE;
@@ -1659,7 +1659,7 @@ siHostnameAddrMatch(int family, void *addr, int len,
for (a = addresses; a != NULL; a = a->ai_next) {
hostaddrlen = a->ai_addrlen;
f = ConvertAddr(a->ai_addr, &hostaddrlen, &hostaddr);
- if ((f == family) && (len == hostaddrlen) &&
+ if ((f == family) && (len == hostaddrlen) && hostaddr &&
(memcmp(addr, hostaddr, len) == 0)) {
res = TRUE;
break;
@@ -1717,7 +1717,7 @@ siHostnameCheckAddr(const char *valueString, int length, void *typePriv)
{
/* Check conformance of hostname to RFC 2396 sec. 3.2.2 definition.
* We do not use ctype functions here to avoid locale-specific
- * character sets. Hostnames must be pure ASCII.
+ * character sets. Hostnames must be pure ASCII.
*/
int len = length;
int i;
@@ -1771,12 +1771,12 @@ siHostnameCheckAddr(const char *valueString, int length, void *typePriv)
*
* Currently supports only IPv6 literal address as specified in IETF RFC 3513
*
- * Once draft-ietf-ipv6-scoping-arch-00.txt becomes an RFC, support will be
+ * Once draft-ietf-ipv6-scoping-arch-00.txt becomes an RFC, support will be
* added for the scoped address format it specifies.
*/
-/* Maximum length of an IPv6 address string - increase when adding support
- * for scoped address qualifiers. Includes room for trailing NUL byte.
+/* Maximum length of an IPv6 address string - increase when adding support
+ * for scoped address qualifiers. Includes room for trailing NUL byte.
*/
#define SI_IPv6_MAXLEN INET6_ADDRSTRLEN
diff --git a/xorg-server/os/busfault.c b/xorg-server/os/busfault.c
index ac0268fd5..d4afa6df3 100644
--- a/xorg-server/os/busfault.c
+++ b/xorg-server/os/busfault.c
@@ -47,7 +47,7 @@ struct busfault {
void *context;
};
-static Bool busfaulted;
+static Bool busfaulted;
static struct xorg_list busfaults;
struct busfault *
diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c
index f915e1295..da3397da6 100644
--- a/xorg-server/os/connection.c
+++ b/xorg-server/os/connection.c
@@ -26,13 +26,13 @@ Copyright 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -421,7 +421,7 @@ CreateWellKnownSockets(void)
}
else { /* -displayfd and no explicit display number */
Bool found = 0;
- for (i = 0; i < 65535 - X_TCP_PORT; i++) {
+ for (i = 0; i < 65536 - X_TCP_PORT; i++) {
if (TryCreateSocket(i, &partial) && !partial) {
found = 1;
break;
@@ -648,8 +648,8 @@ AuthorizationIDOfClient(ClientPtr client)
* CARD8 byteOrder;
* BYTE pad;
* CARD16 majorVersion, minorVersion;
- * CARD16 nbytesAuthProto;
- * CARD16 nbytesAuthString;
+ * CARD16 nbytesAuthProto;
+ * CARD16 nbytesAuthString;
* } xConnClientPrefix;
*
* It is hoped that eventually one protocol will be agreed upon. In the
@@ -974,7 +974,7 @@ CloseDownFileDescriptor(OsCommPtr oc)
/*****************
* CheckConnections
- * Some connection has died, go find which one and shut it down
+ * Some connection has died, go find which one and shut it down
* The file descriptor has been closed, but is still in AllClients.
* If would truly be wonderful if select() would put the bogus
* file descriptors in the exception mask, but nooooo. So we have
@@ -1035,7 +1035,7 @@ CheckConnections(void)
/*****************
* CloseDownConnection
- * Delete client from AllClients and free resources
+ * Delete client from AllClients and free resources
*****************/
void
diff --git a/xorg-server/os/io.c b/xorg-server/os/io.c
index 8181a8639..bb273bb0c 100644
--- a/xorg-server/os/io.c
+++ b/xorg-server/os/io.c
@@ -26,13 +26,13 @@ Copyright 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -448,7 +448,7 @@ ReadRequestFromClient(ClientPtr client)
* buffer beyond the request we're returning to the caller.
* If there is only a partial request, treat like buffer
* is empty so that select() will be called again and other clients
- * can get into the queue.
+ * can get into the queue.
*/
gotnow -= needed;
diff --git a/xorg-server/os/log.c b/xorg-server/os/log.c
index 7348ad4a2..2e3b3f61f 100644
--- a/xorg-server/os/log.c
+++ b/xorg-server/os/log.c
@@ -127,7 +127,7 @@ static char __crashreporter_info_buff__[4096] = { 0 };
static const char *__crashreporter_info__ __attribute__ ((__used__)) =
&__crashreporter_info_buff__[0];
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
-// This is actually a toolchain requirement, but I'm not sure the correct check,
+// This is actually a toolchain requirement, but I'm not sure the correct check,
// but it should be fine to just only include it for Leopard and later. This line
// just tells the linker to never strip this symbol (such as for space optimization)
asm(".desc ___crashreporter_info__, 0x10");
diff --git a/xorg-server/os/oscolor.c b/xorg-server/os/oscolor.c
index a44ed3f18..017aab1f2 100644
--- a/xorg-server/os/oscolor.c
+++ b/xorg-server/os/oscolor.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/os/osdep.h b/xorg-server/os/osdep.h
index 0ccdb62ef..77a5b53ab 100644
--- a/xorg-server/os/osdep.h
+++ b/xorg-server/os/osdep.h
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/xorg-server/os/osinit.c b/xorg-server/os/osinit.c
index 4d48ea94e..ff0979ac8 100644
--- a/xorg-server/os/osinit.c
+++ b/xorg-server/os/osinit.c
@@ -26,13 +26,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -225,9 +225,9 @@ OsInit(void)
fclose(stdin);
fclose(stdout);
# endif
- /*
- * If a write of zero bytes to stderr returns non-zero, i.e. -1,
- * then writing to stderr failed, and we'll write somewhere else
+ /*
+ * If a write of zero bytes to stderr returns non-zero, i.e. -1,
+ * then writing to stderr failed, and we'll write somewhere else
* instead. (Apparently this never happens in the Real World.)
*/
if (write(2, fname, 0) == -1) {
diff --git a/xorg-server/os/xdmcp.c b/xorg-server/os/xdmcp.c
index 99616d94b..b6e97c928 100644
--- a/xorg-server/os/xdmcp.c
+++ b/xorg-server/os/xdmcp.c
@@ -562,7 +562,7 @@ XdmcpRegisterDisplayClass(const char *name, int length)
DisplayClass.data[i] = (CARD8) name[i];
}
-/*
+/*
* initialize XDMCP; create the socket, compute the display
* number, set up the state machine
*/
diff --git a/xorg-server/present/present.c b/xorg-server/present/present.c
index 47566c74e..ac9047edb 100644
--- a/xorg-server/present/present.c
+++ b/xorg-server/present/present.c
@@ -91,7 +91,7 @@ present_flip_pending_pixmap(ScreenPtr screen)
if (!screen_priv->flip_pending)
return NULL;
-
+
return screen_priv->flip_pending->pixmap;
}
@@ -372,7 +372,7 @@ present_set_tree_pixmap_visit(WindowPtr window, void *data)
(*screen->SetWindowPixmap)(window, visit->new);
return WT_WALKCHILDREN;
}
-
+
static void
present_set_tree_pixmap(WindowPtr window, PixmapPtr pixmap)
{
@@ -866,7 +866,7 @@ present_pixmap(WindowPtr window,
xorg_list_add(&vblank->event_queue, &present_exec_queue);
vblank->queued = TRUE;
- if (target_msc >= crtc_msc) {
+ if ((pixmap && target_msc >= crtc_msc) || (!pixmap && target_msc > crtc_msc)) {
ret = present_queue_vblank(screen, target_crtc, vblank->event_id, target_msc);
if (ret != Success) {
xorg_list_del(&vblank->event_queue);
@@ -929,7 +929,7 @@ present_notify_msc(WindowPtr window,
0, 0,
NULL,
NULL, NULL,
- 0,
+ PresentOptionAsync,
target_msc, divisor, remainder, NULL, 0);
}
diff --git a/xorg-server/randr/randrstr.h b/xorg-server/randr/randrstr.h
index e14223201..13e6a8596 100644
--- a/xorg-server/randr/randrstr.h
+++ b/xorg-server/randr/randrstr.h
@@ -984,17 +984,17 @@ extern _X_EXPORT void
#endif /* _RANDRSTR_H_ */
/*
-
+
randr extension implementation structure
Query state:
ProcRRGetScreenInfo/ProcRRGetScreenResources
RRGetInfo
-
+
• Request configuration from driver, either 1.0 or 1.2 style
• These functions only record state changes, all
other actions are pended until RRTellChanged is called
-
+
->rrGetInfo
1.0:
RRRegisterSize
@@ -1009,15 +1009,15 @@ Query state:
RROutputSetSubpixelOrder
RROutputSetClones
RRCrtcNotify
-
+
• Must delay scanning configuration until after ->rrGetInfo returns
because some drivers will call SetCurrentConfig in the middle
of the ->rrGetInfo operation.
-
+
1.0:
• Scan old configuration, mirror to new structures
-
+
RRScanOldConfig
RRCrtcCreate
RROutputCreate
@@ -1027,16 +1027,16 @@ Query state:
RROldModeAdd • This adds modes one-at-a-time
RRModeGet
RRCrtcNotify
-
+
• send events, reset pointer if necessary
-
+
RRTellChanged
WalkTree (sending events)
-
+
• when layout has changed:
RRPointerScreenConfigured
RRSendConfigNotify
-
+
Asynchronous state setting (1.2 only)
When setting state asynchronously, the driver invokes the
->rrGetInfo function and then calls RRTellChanged to flush
diff --git a/xorg-server/randr/rrprovider.c b/xorg-server/randr/rrprovider.c
index 4507ba894..bbb8e51b3 100644
--- a/xorg-server/randr/rrprovider.c
+++ b/xorg-server/randr/rrprovider.c
@@ -159,7 +159,7 @@ ProcRRGetProviderInfo (ClientPtr client)
ScreenPtr provscreen;
RRProvider *providers;
uint32_t *prov_cap;
-
+
REQUEST_SIZE_MATCH(xRRGetProviderInfoReq);
VERIFY_RR_PROVIDER(stuff->provider, provider, DixReadAccess);
diff --git a/xorg-server/randr/rrtransform.c b/xorg-server/randr/rrtransform.c
index f93181d2e..c8a27498f 100644
--- a/xorg-server/randr/rrtransform.c
+++ b/xorg-server/randr/rrtransform.c
@@ -131,7 +131,7 @@ RRTransformRescale(struct pixman_f_transform *f_transform, double limit)
/*
* Compute the complete transformation matrix including
- * client-specified transform, rotation/reflection values and the crtc
+ * client-specified transform, rotation/reflection values and the crtc
* offset.
*
* Return TRUE if the resulting transform is not a simple translation.
diff --git a/xorg-server/randr/rrtransform.h b/xorg-server/randr/rrtransform.h
index 2269b4cb7..f811d2b3d 100644
--- a/xorg-server/randr/rrtransform.h
+++ b/xorg-server/randr/rrtransform.h
@@ -59,7 +59,7 @@ extern _X_EXPORT Bool
/*
* Compute the complete transformation matrix including
- * client-specified transform, rotation/reflection values and the crtc
+ * client-specified transform, rotation/reflection values and the crtc
* offset.
*
* Return TRUE if the resulting transform is not a simple translation.
diff --git a/xorg-server/randr/rrxinerama.c b/xorg-server/randr/rrxinerama.c
index 76d728c70..26894a663 100644
--- a/xorg-server/randr/rrxinerama.c
+++ b/xorg-server/randr/rrxinerama.c
@@ -23,7 +23,7 @@
* This Xinerama implementation comes from the SiS driver which has
* the following notice:
*/
-/*
+/*
* SiS driver main code
*
* Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria.
diff --git a/xorg-server/record/record.c b/xorg-server/record/record.c
index c9002196f..0a466e279 100644
--- a/xorg-server/record/record.c
+++ b/xorg-server/record/record.c
@@ -93,7 +93,7 @@ typedef union {
} major;
} RecordMinorOpRec, *RecordMinorOpPtr;
-/* RecordClientsAndProtocolRec, nicknamed RCAP - holds all the client and
+/* RecordClientsAndProtocolRec, nicknamed RCAP - holds all the client and
* protocol selections passed in a single CreateContext or RegisterClients.
* Generally, a context will have one of these from the create and an
* additional one for each RegisterClients. RCAPs are freed when all their
@@ -260,7 +260,7 @@ RecordFlushReplyBuffer(RecordContextPtr pContext,
* is its length in bytes.
* padlen is the number of pad bytes from a zeroed array.
* futurelen is the number of bytes that will be sent in subsequent
- * calls to this function to complete this protocol element.
+ * calls to this function to complete this protocol element.
* In those subsequent calls, futurelen will be -1 to indicate
* that the current data is a continuation of the same protocol
* element.
@@ -1020,8 +1020,8 @@ RecordUninstallHooks(RecordClientsAndProtocolPtr pRCAP, XID oneclient)
*
* Side Effects:
* Recording hooks needed by client will be uninstalled if the context
- * is enabled. The designated client will be removed from the
- * pRCAP->pClientIDs array. If it was the only client on the RCAP,
+ * is enabled. The designated client will be removed from the
+ * pRCAP->pClientIDs array. If it was the only client on the RCAP,
* the RCAP is removed from the context and freed. (Invariant: RCAPs
* have at least one client.)
*/
@@ -1064,7 +1064,7 @@ RecordDeleteClientFromRCAP(RecordClientsAndProtocolPtr pRCAP, int position)
*
* Side Effects:
* Recording hooks needed by client will be installed if the context
- * is enabled. The designated client will be added to the
+ * is enabled. The designated client will be added to the
* pRCAP->pClientIDs array, which may be realloced.
* pRCAP->clientIDsSeparatelyAllocated may be set to 1 if there
* is no more room to hold clients internal to the RCAP.
@@ -1173,8 +1173,8 @@ RecordSanityCheckClientSpecifiers(ClientPtr client, XID *clientspecs,
* pClientspecs is an array of CLIENTSPECs that have been sanity
* checked.
* pNumClientspecs is a pointer to the number of elements in pClientspecs.
- * excludespec, if non-zero, is the resource id base of a client that
- * should not be included in the expansion of XRecordAllClients or
+ * excludespec, if non-zero, is the resource id base of a client that
+ * should not be included in the expansion of XRecordAllClients or
* XRecordCurrentClients.
*
* Returns:
@@ -1379,7 +1379,7 @@ RecordSanityCheckRegisterClients(RecordContextPtr pContext, ClientPtr client,
} /* end RecordSanityCheckRegisterClients */
/* This is a tactical structure used to gather information about all the sets
- * (RecordSetPtr) that need to be created for an RCAP in the process of
+ * (RecordSetPtr) that need to be created for an RCAP in the process of
* digesting a list of RECORDRANGEs (converting it to the internal
* representation).
*/
@@ -1447,7 +1447,7 @@ RecordAllocIntervals(SetInfoPtr psi, int nIntervals)
* Returns: BadAlloc if a memory allocation error occurred, else Success.
*
* Side Effects:
- * The slice of pRanges indicated by byteoffset is stored in psi.
+ * The slice of pRanges indicated by byteoffset is stored in psi.
* If pExtSetInfo is non-NULL, minor opcode intervals are stored
* in an existing SetInfoRec if the major opcode interval matches, else
* they are stored in a new SetInfoRec, and *pnExtSetInfo is
@@ -2639,7 +2639,7 @@ SProcRecordDispatch(ClientPtr client)
/* RecordConnectionSetupInfo
*
* Arguments:
- * pContext is an enabled context that specifies recording of
+ * pContext is an enabled context that specifies recording of
* connection setup info.
* pci holds the connection setup info.
*
diff --git a/xorg-server/render/animcur.c b/xorg-server/render/animcur.c
index 69f9f887c..825ae1fe7 100644
--- a/xorg-server/render/animcur.c
+++ b/xorg-server/render/animcur.c
@@ -159,7 +159,7 @@ AnimCurScreenBlockHandler(ScreenPtr pScreen,
/*
* Not a simple Unwrap/Wrap as this
- * isn't called along the DisplayCursor
+ * isn't called along the DisplayCursor
* wrapper chain.
*/
DisplayCursor = pScreen->DisplayCursor;
diff --git a/xorg-server/render/glyph.c b/xorg-server/render/glyph.c
index ae3812171..f3310db12 100644
--- a/xorg-server/render/glyph.c
+++ b/xorg-server/render/glyph.c
@@ -16,7 +16,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
diff --git a/xorg-server/render/glyphstr.h b/xorg-server/render/glyphstr.h
index 835c1a74e..2df055dfd 100644
--- a/xorg-server/render/glyphstr.h
+++ b/xorg-server/render/glyphstr.h
@@ -16,7 +16,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
diff --git a/xorg-server/render/mipict.h b/xorg-server/render/mipict.h
index a16dd3112..23ce9e8f6 100644
--- a/xorg-server/render/mipict.h
+++ b/xorg-server/render/mipict.h
@@ -16,7 +16,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
diff --git a/xorg-server/render/picture.c b/xorg-server/render/picture.c
index cd9bc7485..711cbc7bb 100644
--- a/xorg-server/render/picture.c
+++ b/xorg-server/render/picture.c
@@ -16,7 +16,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
diff --git a/xorg-server/render/picture.h b/xorg-server/render/picture.h
index c85353a44..66c85c56f 100644
--- a/xorg-server/render/picture.h
+++ b/xorg-server/render/picture.h
@@ -16,7 +16,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
@@ -129,7 +129,7 @@ typedef enum _PictFormatShort {
} PictFormatShort;
/*
- * For dynamic indexed visuals (GrayScale and PseudoColor), these control the
+ * For dynamic indexed visuals (GrayScale and PseudoColor), these control the
* selection of colors allocated for drawing to Pictures. The default
* policy depends on the size of the colormap:
*
@@ -189,8 +189,8 @@ typedef pixman_fixed_1_16_t xFixed_1_16;
typedef pixman_fixed_16_16_t xFixed_16_16;
/*
- * An unadorned "xFixed" is the same as xFixed_16_16,
- * (since it's quite common in the code)
+ * An unadorned "xFixed" is the same as xFixed_16_16,
+ * (since it's quite common in the code)
*/
typedef pixman_fixed_t xFixed;
diff --git a/xorg-server/render/render.c b/xorg-server/render/render.c
index 9ac4a98e7..e3031da25 100644
--- a/xorg-server/render/render.c
+++ b/xorg-server/render/render.c
@@ -16,7 +16,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
@@ -1548,7 +1548,7 @@ ProcRenderCreateCursor(ClientPtr client)
FreePicture(pPicture, 0);
}
/*
- * Check whether the cursor can be directly supported by
+ * Check whether the cursor can be directly supported by
* the core cursor code
*/
ncolor = 0;
diff --git a/xorg-server/xfixes/cursor.c b/xorg-server/xfixes/cursor.c
index 31a408fac..94d24a8e2 100644
--- a/xorg-server/xfixes/cursor.c
+++ b/xorg-server/xfixes/cursor.c
@@ -632,7 +632,7 @@ ReplaceCursor(CursorPtr pCursor, TestCursorFunc testCursor, void *closure)
int resIndex;
ReplaceCursorLookupRec rcl;
- /*
+ /*
* Cursors exist only in the resource database, windows and grabs.
* All of these are always pointed at by the resource database. Walk
* the whole thing looking for cursors
@@ -735,7 +735,7 @@ SProcXFixesChangeCursorByName(ClientPtr client)
/*
* Routines for manipulating the per-screen hide counts list.
- * This list indicates which clients have requested cursor hiding
+ * This list indicates which clients have requested cursor hiding
* for that screen.
*/
@@ -772,7 +772,7 @@ createCursorHideCount(ClientPtr pClient, ScreenPtr pScreen)
pChc->pNext = cs->pCursorHideCounts;
cs->pCursorHideCounts = pChc;
- /*
+ /*
* Create a resource for this element so it can be deleted
* when the client goes away.
*/
@@ -784,7 +784,7 @@ createCursorHideCount(ClientPtr pClient, ScreenPtr pScreen)
return Success;
}
-/*
+/*
* Delete the given hide-counts list element from its screen list.
*/
static void
@@ -812,7 +812,7 @@ deleteCursorHideCount(CursorHideCountPtr pChcToDel, ScreenPtr pScreen)
}
}
-/*
+/*
* Delete all the hide-counts list elements for this screen.
*/
static void
@@ -848,9 +848,9 @@ ProcXFixesHideCursor(ClientPtr client)
return ret;
}
- /*
- * Has client hidden the cursor before on this screen?
- * If so, just increment the count.
+ /*
+ * Has client hidden the cursor before on this screen?
+ * If so, just increment the count.
*/
pChc = findCursorHideCount(client, pWin->drawable.pScreen);
@@ -859,8 +859,8 @@ ProcXFixesHideCursor(ClientPtr client)
return Success;
}
- /*
- * This is the first time this client has hid the cursor
+ /*
+ * This is the first time this client has hid the cursor
* for this screen.
*/
ret = XaceHook(XACE_SCREEN_ACCESS, client, pWin->drawable.pScreen,
@@ -912,7 +912,7 @@ ProcXFixesShowCursor(ClientPtr client)
return rc;
}
- /*
+ /*
* Has client hidden the cursor on this screen?
* If not, generate an error.
*/
diff --git a/xorg-server/xfixes/region.c b/xorg-server/xfixes/region.c
index 4cfeee1a1..4492f1267 100644
--- a/xorg-server/xfixes/region.c
+++ b/xorg-server/xfixes/region.c
@@ -222,20 +222,13 @@ ProcXFixesCreateRegionFromGC(ClientPtr client)
if (rc != Success)
return rc;
- switch (pGC->clientClipType) {
- case CT_PIXMAP:
- pRegion = BitmapToRegion(pGC->pScreen, (PixmapPtr) pGC->clientClip);
- if (!pRegion)
- return BadAlloc;
- break;
- case CT_REGION:
+ if (pGC->clientClip) {
pClip = (RegionPtr) pGC->clientClip;
pRegion = XFixesRegionCopy(pClip);
if (!pRegion)
return BadAlloc;
- break;
- default:
- return BadImplementation; /* assume sane server bits */
+ } else {
+ return BadMatch;
}
if (!AddResource(stuff->region, RegionResType, (void *) pRegion))
diff --git a/xorg-server/xkb/XKBAlloc.c b/xorg-server/xkb/XKBAlloc.c
index 20e0459af..78c98371d 100644
--- a/xorg-server/xkb/XKBAlloc.c
+++ b/xorg-server/xkb/XKBAlloc.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/XKBGAlloc.c b/xorg-server/xkb/XKBGAlloc.c
index 888078406..25917d304 100644
--- a/xorg-server/xkb/XKBGAlloc.c
+++ b/xorg-server/xkb/XKBGAlloc.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/XKBMAlloc.c b/xorg-server/xkb/XKBMAlloc.c
index 3ffd5dad1..37ed1a725 100644
--- a/xorg-server/xkb/XKBMAlloc.c
+++ b/xorg-server/xkb/XKBMAlloc.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -357,7 +357,7 @@ XkbResizeKeyType(XkbDescPtr xkb,
* might have to be enlarged.
* If the key type decreased in size:
* - keys that have a group width > the old width don't have to be
- * resized (because they must have some other wider type associated
+ * resized (because they must have some other wider type associated
* with some group).
* + keys that have a group width == the old width might have to be
* shrunk.
diff --git a/xorg-server/xkb/XKBMisc.c b/xorg-server/xkb/XKBMisc.c
index 6abd1d11a..df268b583 100644
--- a/xorg-server/xkb/XKBMisc.c
+++ b/xorg-server/xkb/XKBMisc.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/ddxBeep.c b/xorg-server/xkb/ddxBeep.c
index caf78c94d..52353ea81 100644
--- a/xorg-server/xkb/ddxBeep.c
+++ b/xorg-server/xkb/ddxBeep.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/ddxCtrls.c b/xorg-server/xkb/ddxCtrls.c
index 0805fb208..964ac3d51 100644
--- a/xorg-server/xkb/ddxCtrls.c
+++ b/xorg-server/xkb/ddxCtrls.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/ddxKillSrv.c b/xorg-server/xkb/ddxKillSrv.c
index 1cabb1bd7..7c7e73970 100644
--- a/xorg-server/xkb/ddxKillSrv.c
+++ b/xorg-server/xkb/ddxKillSrv.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/ddxLEDs.c b/xorg-server/xkb/ddxLEDs.c
index 81b7b00e0..e5aecb523 100644
--- a/xorg-server/xkb/ddxLEDs.c
+++ b/xorg-server/xkb/ddxLEDs.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/ddxLoad.c b/xorg-server/xkb/ddxLoad.c
index 1dc0e4eee..f71815aa8 100644
--- a/xorg-server/xkb/ddxLoad.c
+++ b/xorg-server/xkb/ddxLoad.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/ddxVT.c b/xorg-server/xkb/ddxVT.c
index 65291026a..f3cd26a97 100644
--- a/xorg-server/xkb/ddxVT.c
+++ b/xorg-server/xkb/ddxVT.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/maprules.c b/xorg-server/xkb/maprules.c
index 6f5f8ccf3..28148d9a5 100644
--- a/xorg-server/xkb/maprules.c
+++ b/xorg-server/xkb/maprules.c
@@ -6,19 +6,19 @@
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
- documentation, and that the name of Silicon Graphics not be
- used in advertising or publicity pertaining to distribution
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
- Silicon Graphics makes no representation about the suitability
+ Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-
- SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/xkb.c b/xorg-server/xkb/xkb.c
index dc570f0e5..15c7f34cf 100644
--- a/xorg-server/xkb/xkb.c
+++ b/xorg-server/xkb/xkb.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -3986,7 +3986,7 @@ _XkbSetNamesCheck(ClientPtr client, DeviceIntPtr dev,
{
XkbDescRec *xkb;
CARD32 *tmp;
- Atom bad;
+ Atom bad = None;
tmp = data;
xkb = dev->key->xkbInfo->desc;
diff --git a/xorg-server/xkb/xkbAccessX.c b/xorg-server/xkb/xkbAccessX.c
index 5f3de0d9e..7fd6a48df 100644
--- a/xorg-server/xkb/xkbAccessX.c
+++ b/xorg-server/xkb/xkbAccessX.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -598,7 +598,7 @@ AccessXFilterReleaseEvent(DeviceEvent *event, DeviceIntPtr keybd)
Bool ignoreKeyEvent = FALSE;
/* Don't transmit the KeyRelease if BounceKeys is on and
- * this is the release of a key that was ignored due to
+ * this is the release of a key that was ignored due to
* BounceKeys.
*/
if (ctrls->enabled_ctrls & XkbBounceKeysMask) {
diff --git a/xorg-server/xkb/xkbActions.c b/xorg-server/xkb/xkbActions.c
index c44f44bc1..2a196f151 100644
--- a/xorg-server/xkb/xkbActions.c
+++ b/xorg-server/xkb/xkbActions.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/xkbEvents.c b/xorg-server/xkb/xkbEvents.c
index cc9a535d7..0dbbd6cbc 100644
--- a/xorg-server/xkb/xkbEvents.c
+++ b/xorg-server/xkb/xkbEvents.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/xkbInit.c b/xorg-server/xkb/xkbInit.c
index 06ec46e81..30e10bd15 100644
--- a/xorg-server/xkb/xkbInit.c
+++ b/xorg-server/xkb/xkbInit.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -676,9 +676,9 @@ InitKeyboardDeviceStructFromString(DeviceIntPtr dev,
/***====================================================================***/
/*
- * Be very careful about what does and doesn't get freed by this
- * function. To reduce fragmentation, XkbInitDevice allocates a
- * single huge block per device and divides it up into most of the
+ * Be very careful about what does and doesn't get freed by this
+ * function. To reduce fragmentation, XkbInitDevice allocates a
+ * single huge block per device and divides it up into most of the
* fixed-size structures for the device. Don't free anything that
* is part of this larger block.
*/
diff --git a/xorg-server/xkb/xkbLEDs.c b/xorg-server/xkb/xkbLEDs.c
index e1e22d178..4e1600207 100644
--- a/xorg-server/xkb/xkbLEDs.c
+++ b/xorg-server/xkb/xkbLEDs.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -47,8 +47,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
* XkbIndicatorsToUpdate(dev,changed,check_devs_rtrn)
*
* Given a keyboard and a set of state components that have changed,
- * this function returns the indicators on the default keyboard
- * feedback that might be affected. It also reports whether or not
+ * this function returns the indicators on the default keyboard
+ * feedback that might be affected. It also reports whether or not
* any extension devices might be affected in check_devs_rtrn.
*/
@@ -85,10 +85,10 @@ XkbIndicatorsToUpdate(DeviceIntPtr dev,
* Bool
*XkbApplyLEDChangeToKeyboard(xkbi,map,on,change)
*
- * Some indicators "drive" the keyboard when their state is explicitly
+ * Some indicators "drive" the keyboard when their state is explicitly
* changed, as described in section 9.2.1 of the XKB protocol spec.
- * This function updates the state and controls for the keyboard
- * specified by 'xkbi' to reflect any changes that are required
+ * This function updates the state and controls for the keyboard
+ * specified by 'xkbi' to reflect any changes that are required
* when the indicator described by 'map' is turned on or off. The
* extent of the changes is reported in change, which must be defined.
*/
@@ -357,9 +357,9 @@ XkbUpdateAllDeviceIndicators(XkbChangesPtr changes, XkbEventCausePtr cause)
* attempted change. If 'changes' is NULL, this function generates
* XKB events to report any such changes to interested clients.
*
- * If 'cause' is non-NULL, it specifies the reason for the change,
- * as reported in some XKB events. If it is NULL, this function
- * assumes that the change is the result of a core protocol
+ * If 'cause' is non-NULL, it specifies the reason for the change,
+ * as reported in some XKB events. If it is NULL, this function
+ * assumes that the change is the result of a core protocol
* ChangeKeyboardMapping request.
*/
@@ -407,7 +407,7 @@ XkbSetIndicators(DeviceIntPtr dev,
*
* Applies the indicator maps for any indicators specified in
* 'update' from the default keyboard feedback on the device
- * specified by 'dev.'
+ * specified by 'dev.'
*
* If 'changes' is NULL, this function generates and XKB events
* required to report the necessary changes, otherwise it simply
@@ -442,9 +442,9 @@ XkbUpdateIndicators(DeviceIntPtr dev,
* XkbCheckIndicatorMaps(dev,sli,which)
*
* Updates the 'indicator accelerators' for the indicators specified
- * by 'which' in the feedback specified by 'sli.' The indicator
- * accelerators are internal to the server and are used to simplify
- * and speed up the process of figuring out which indicators might
+ * by 'which' in the feedback specified by 'sli.' The indicator
+ * accelerators are internal to the server and are used to simplify
+ * and speed up the process of figuring out which indicators might
* be affected by a particular change in keyboard state or controls.
*/
@@ -677,7 +677,7 @@ XkbCopySrvLedInfo(DeviceIntPtr from,
*
* Finds the XkbSrvLedInfoPtr for the specified 'class' and 'id'
* on the device specified by 'dev.' If the class and id specify
- * a valid device feedback, this function returns the existing
+ * a valid device feedback, this function returns the existing
* feedback or allocates a new one.
*
*/
@@ -839,7 +839,7 @@ XkbApplyLedNameChanges(DeviceIntPtr dev,
*
* Handles all of the secondary effects of the changes to the
* feedback specified by 'sli' on the device specified by 'dev.'
- *
+ *
* If 'changed_maps' specifies any indicators, this function generates
* XkbExtensionDeviceNotify events and possibly IndicatorMapNotify
* events to report the changes, and recalculates the effective
diff --git a/xorg-server/xkb/xkbPrKeyEv.c b/xorg-server/xkb/xkbPrKeyEv.c
index b24fd6cb7..f7a6b4b14 100644
--- a/xorg-server/xkb/xkbPrKeyEv.c
+++ b/xorg-server/xkb/xkbPrKeyEv.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/xkbSwap.c b/xorg-server/xkb/xkbSwap.c
index 076da340b..ecec63ee2 100644
--- a/xorg-server/xkb/xkbSwap.c
+++ b/xorg-server/xkb/xkbSwap.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/xkbUtils.c b/xorg-server/xkb/xkbUtils.c
index c14a790df..6019f0f31 100644
--- a/xorg-server/xkb/xkbUtils.c
+++ b/xorg-server/xkb/xkbUtils.c
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/xkbfmisc.c b/xorg-server/xkb/xkbfmisc.c
index d96ee4b52..2ecdcd555 100644
--- a/xorg-server/xkb/xkbfmisc.c
+++ b/xorg-server/xkb/xkbfmisc.c
@@ -6,19 +6,19 @@
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
- documentation, and that the name of Silicon Graphics not be
- used in advertising or publicity pertaining to distribution
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
- Silicon Graphics makes no representation about the suitability
+ Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-
- SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/xkbgeom.h b/xorg-server/xkb/xkbgeom.h
index 1999f5c71..5ade436be 100644
--- a/xorg-server/xkb/xkbgeom.h
+++ b/xorg-server/xkb/xkbgeom.h
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
+Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/xkbout.c b/xorg-server/xkb/xkbout.c
index 7bb6ceafe..5f77ab01d 100644
--- a/xorg-server/xkb/xkbout.c
+++ b/xorg-server/xkb/xkbout.c
@@ -6,19 +6,19 @@
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
- documentation, and that the name of Silicon Graphics not be
- used in advertising or publicity pertaining to distribution
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
- Silicon Graphics makes no representation about the suitability
+ Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-
- SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/xkbtext.c b/xorg-server/xkb/xkbtext.c
index fdf1d1790..ffbc546b3 100644
--- a/xorg-server/xkb/xkbtext.c
+++ b/xorg-server/xkb/xkbtext.c
@@ -6,19 +6,19 @@
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
- documentation, and that the name of Silicon Graphics not be
- used in advertising or publicity pertaining to distribution
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
- Silicon Graphics makes no representation about the suitability
+ Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-
- SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkb/xkmread.c b/xorg-server/xkb/xkmread.c
index b6241b5c7..0b9f0ef6d 100644
--- a/xorg-server/xkb/xkmread.c
+++ b/xorg-server/xkb/xkmread.c
@@ -6,19 +6,19 @@
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
- documentation, and that the name of Silicon Graphics not be
- used in advertising or publicity pertaining to distribution
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
- Silicon Graphics makes no representation about the suitability
+ Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
-
- SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/xorg-server/xkeyboard-config/README b/xorg-server/xkeyboard-config/README
index 2be1ab633..256402507 100644
--- a/xorg-server/xkeyboard-config/README
+++ b/xorg-server/xkeyboard-config/README
@@ -1,28 +1,46 @@
X Keyboard Extension
--------------------
-The X Keyboard Extension essentially replaces the core protocol definition
-of the keyboard. The extension makes it possible to clearly and explicitly
-specify most aspects of keyboard behaviour on a per-key basis and to more
-closely track the logical and physical state of the keyboard. It also
-includes a number of keyboard controls designed to make keyboards more
-accessible to people with physical impairments.
+The X Keyboard (XKB) Extension essentially replaces the core protocol
+definition of a keyboard. The extension makes it possible to specify
+clearly and explicitly most aspects of keyboard behaviour on a per-key
+basis, and to track more closely the logical and physical state of a
+keyboard. It also includes a number of keyboard controls designed to
+make keyboards more accessible to people with physical impairments.
-There are five types of components in the server database corresponding to
-five xkb symbolic names (symbols, geometry, keycodes, compat, and types)
-which determine the keyboard behaviour. These five components can be
-combined into a resulting keyboard mapping using the 'rules' component.
+There are five components that define a complete keyboard mapping:
+symbols, geometry, keycodes, compat, and types; these five components
+can be combined together using the 'rules' component of the database
+provided by this project, xkeyboard-config.
-The complete specification can be found in:
- http://www.x.org/current/doc/kbproto/xkbproto.pdf
+The complete specification for the XKB Extension can be found here:
-For XKB configuration information, see the 'docs/README.config' file.
+ http://xfree86.org/current/XKBproto.pdf
-For information on how to further enhance XKB configuration, see the
-'docs/README.enhancing' file.
+xkeyboard-config
+----------------
-For information on how to replace an existing XKB configuration database
-with XKeyboardConfig, see the 'docs/HOWTO.transition' file.
+This project provides a consistent, well-structured, frequently
+released, open source database of keyboard configuration data. The
+project is targeted to XKB-based systems.
+
+For XKB configuration information, see:
+
+ docs/README.config
+
+For information on how to enhance the database itself, see:
+
+ docs/README.enhancing
+
+For information on how to replace an older XKB configuration database
+with the one provided by this project, see:
+
+ docs/HOWTO.transition
+
+For guidelines to making contributions to this project, see:
-Contribution guidelines are described on:
http://www.freedesktop.org/wiki/Software/XKeyboardConfig/Rules
+
+To submit bug reports (and patches), please use the bugzilla system:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xkeyboard-config