aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-16 09:17:34 +0200
committermarha <marha@users.sourceforge.net>2012-04-16 09:17:34 +0200
commitd6d3999ccb2cb72d55820770260172eccbbb68d7 (patch)
tree568ce82dd1a8e2edbbe8cd4cb5ab5b14157f34f6
parentfffd436e9c2ec6f5aa501ee57d0e4ade7293ee60 (diff)
downloadvcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.tar.gz
vcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.tar.bz2
vcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.zip
libX11 xserver pixman mesa git update 16 Apr 2012
-rw-r--r--libX11/specs/libX11/CH04.xml2
-rw-r--r--mesalib/Android.mk4
-rw-r--r--mesalib/configs/autoconf.in6
-rw-r--r--mesalib/configure.ac24
-rw-r--r--mesalib/docs/GL3.txt2
-rw-r--r--mesalib/docs/viewperf.html31
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_blitter.c2
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_double_list.h287
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_dual_blend.h26
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_linkage.h9
-rw-r--r--mesalib/src/glsl/Makefile.sources1
-rw-r--r--mesalib/src/glsl/ast.h12
-rw-r--r--mesalib/src/glsl/ast_to_hir.cpp9
-rw-r--r--mesalib/src/glsl/builtin_variables.cpp1
-rw-r--r--mesalib/src/glsl/glsl_parser.yy20
-rw-r--r--mesalib/src/glsl/ir.h6
-rw-r--r--mesalib/src/glsl/ir_builder.cpp183
-rw-r--r--mesalib/src/glsl/ir_builder.h105
-rw-r--r--mesalib/src/glsl/ir_clone.cpp4
-rw-r--r--mesalib/src/glsl/ir_set_program_inouts.cpp4
-rw-r--r--mesalib/src/glsl/linker.cpp13
-rw-r--r--mesalib/src/glsl/opt_if_simplification.cpp8
-rw-r--r--mesalib/src/mesa/main/blend.c11
-rw-r--r--mesalib/src/mesa/main/context.c36
-rw-r--r--mesalib/src/mesa/main/extensions.c2
-rw-r--r--mesalib/src/mesa/main/ff_fragment_shader.cpp321
-rw-r--r--mesalib/src/mesa/main/format_pack.c2
-rw-r--r--mesalib/src/mesa/main/get.c3
-rw-r--r--mesalib/src/mesa/main/mtypes.h4
-rw-r--r--mesalib/src/mesa/main/shader_query.cpp85
-rw-r--r--mesalib/src/mesa/main/shaderapi.c3
-rw-r--r--mesalib/src/mesa/main/shaderapi.h7
-rw-r--r--mesalib/src/mesa/main/shaderobj.c6
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_blend.c8
-rw-r--r--mesalib/src/mesa/state_tracker/st_extensions.c7
-rw-r--r--mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp2
-rw-r--r--pixman/configure.ac2
-rw-r--r--pixman/pixman/pixman-mmx.c5
-rw-r--r--xorg-server/Xext/bigreq.c16
-rw-r--r--xorg-server/Xext/dpmsproc.h2
-rw-r--r--xorg-server/Xext/geint.h107
-rw-r--r--xorg-server/Xext/panoramiX.h29
-rw-r--r--xorg-server/Xext/panoramiXh.h16
-rw-r--r--xorg-server/Xext/securitysrv.h45
-rw-r--r--xorg-server/Xext/shmint.h14
-rw-r--r--xorg-server/Xext/syncsdk.h93
-rw-r--r--xorg-server/Xext/xacestr.h2
-rw-r--r--xorg-server/Xext/xselinux.h116
-rw-r--r--xorg-server/Xext/xselinux_ext.c308
-rw-r--r--xorg-server/Xi/allowev.c32
-rw-r--r--xorg-server/Xi/allowev.h6
-rw-r--r--xorg-server/Xi/chgdctl.h10
-rw-r--r--xorg-server/Xi/chgfctl.h6
-rw-r--r--xorg-server/Xi/chgkbd.c2
-rw-r--r--xorg-server/Xi/chgkbd.h6
-rw-r--r--xorg-server/Xi/chgkmap.c8
-rw-r--r--xorg-server/Xi/chgkmap.h6
-rw-r--r--xorg-server/Xi/chgprop.h6
-rw-r--r--xorg-server/Xi/chgptr.c6
-rw-r--r--xorg-server/Xi/chgptr.h14
-rw-r--r--xorg-server/Xi/closedev.c40
-rw-r--r--xorg-server/Xi/closedev.h6
-rw-r--r--xorg-server/Xi/devbell.h6
-rw-r--r--xorg-server/Xi/exevents.c86
-rw-r--r--xorg-server/Xi/exglobals.h3
-rw-r--r--xorg-server/Xi/getbmap.c12
-rw-r--r--xorg-server/Xi/getbmap.h10
-rw-r--r--xorg-server/Xi/getdctl.h10
-rw-r--r--xorg-server/Xi/getfctl.c110
-rw-r--r--xorg-server/Xi/getfctl.h10
-rw-r--r--xorg-server/Xi/getfocus.c18
-rw-r--r--xorg-server/Xi/getfocus.h10
-rw-r--r--xorg-server/Xi/getkmap.c22
-rw-r--r--xorg-server/Xi/getkmap.h10
-rw-r--r--xorg-server/Xi/getmmap.c10
-rw-r--r--xorg-server/Xi/getmmap.h10
-rw-r--r--xorg-server/Xi/getprop.h18
-rw-r--r--xorg-server/Xi/getselev.c72
-rw-r--r--xorg-server/Xi/getselev.h10
-rw-r--r--xorg-server/Xi/getvers.c10
-rw-r--r--xorg-server/Xi/getvers.h10
-rw-r--r--xorg-server/Xi/grabdev.h20
-rw-r--r--xorg-server/Xi/grabdevb.h6
-rw-r--r--xorg-server/Xi/grabdevk.h6
-rw-r--r--xorg-server/Xi/gtmotion.c48
-rw-r--r--xorg-server/Xi/gtmotion.h10
-rw-r--r--xorg-server/Xi/listdev.h12
-rw-r--r--xorg-server/Xi/opendev.h10
-rw-r--r--xorg-server/Xi/queryst.h10
-rw-r--r--xorg-server/Xi/selectev.h6
-rw-r--r--xorg-server/Xi/sendexev.h6
-rw-r--r--xorg-server/Xi/setbmap.h10
-rw-r--r--xorg-server/Xi/setdval.c26
-rw-r--r--xorg-server/Xi/setdval.h10
-rw-r--r--xorg-server/Xi/setfocus.c10
-rw-r--r--xorg-server/Xi/setfocus.h6
-rw-r--r--xorg-server/Xi/setmmap.c14
-rw-r--r--xorg-server/Xi/setmmap.h10
-rw-r--r--xorg-server/Xi/setmode.h10
-rw-r--r--xorg-server/Xi/ungrdev.c12
-rw-r--r--xorg-server/Xi/ungrdev.h6
-rw-r--r--xorg-server/Xi/ungrdevb.h6
-rw-r--r--xorg-server/Xi/ungrdevk.h6
-rw-r--r--xorg-server/Xi/xiallowev.h2
-rw-r--r--xorg-server/Xi/xichangecursor.h6
-rw-r--r--xorg-server/Xi/xichangehierarchy.h6
-rw-r--r--xorg-server/Xi/xigetclientpointer.h12
-rw-r--r--xorg-server/Xi/xigrabdev.h2
-rw-r--r--xorg-server/Xi/xiquerydevice.c2
-rw-r--r--xorg-server/Xi/xiquerydevice.h20
-rw-r--r--xorg-server/Xi/xiquerypointer.h10
-rw-r--r--xorg-server/Xi/xiqueryversion.h4
-rw-r--r--xorg-server/Xi/xiselectev.h4
-rw-r--r--xorg-server/Xi/xisetclientpointer.h6
-rw-r--r--xorg-server/Xi/xisetdevfocus.c28
-rw-r--r--xorg-server/Xi/xisetdevfocus.h4
-rw-r--r--xorg-server/Xi/xiwarppointer.h6
-rw-r--r--xorg-server/composite/compositeext.h4
-rw-r--r--xorg-server/config/config-backends.h18
-rw-r--r--xorg-server/damageext/damageext.h4
-rw-r--r--xorg-server/damageext/damageextint.h142
-rw-r--r--xorg-server/dix/dispatch.h290
-rw-r--r--xorg-server/dix/events.c3
-rw-r--r--xorg-server/dix/ffs.c3
-rw-r--r--xorg-server/dix/getevents.c2
-rw-r--r--xorg-server/fb/fbbits.c2
-rw-r--r--xorg-server/fb/fbrop.h21
-rw-r--r--xorg-server/glx/extension_string.c96
-rw-r--r--xorg-server/glx/extension_string.h36
-rw-r--r--xorg-server/glx/glxbyteorder.h4
-rw-r--r--xorg-server/glx/glxdrawable.h28
-rw-r--r--xorg-server/glx/glxext.h11
-rw-r--r--xorg-server/glx/glxutil.h14
-rw-r--r--xorg-server/glx/indirect_reqsize.c88
-rw-r--r--xorg-server/glx/indirect_size_get.c3
-rw-r--r--xorg-server/glx/indirect_table.h8
-rw-r--r--xorg-server/glx/singlesize.h8
-rw-r--r--xorg-server/glx/unpack.h461
-rw-r--r--xorg-server/hw/dmx/config/Canvas.h8
-rw-r--r--xorg-server/hw/dmx/config/CanvasP.h10
-rw-r--r--xorg-server/hw/dmx/config/dmxconfig.h4
-rw-r--r--xorg-server/hw/dmx/config/dmxprint.h4
-rw-r--r--xorg-server/hw/dmx/dmx-config.h2
-rw-r--r--xorg-server/hw/dmx/dmx.h798
-rw-r--r--xorg-server/hw/dmx/dmxcb.h2
-rw-r--r--xorg-server/hw/dmx/dmxclient.h20
-rw-r--r--xorg-server/hw/dmx/dmxcmap.h131
-rw-r--r--xorg-server/hw/dmx/dmxcursor.h9
-rw-r--r--xorg-server/hw/dmx/dmxdpms.h6
-rw-r--r--xorg-server/hw/dmx/dmxfont.h4
-rw-r--r--xorg-server/hw/dmx/dmxgc.h171
-rw-r--r--xorg-server/hw/dmx/dmxgcops.h64
-rw-r--r--xorg-server/hw/dmx/dmxinit.h16
-rw-r--r--xorg-server/hw/dmx/dmxlog.h18
-rw-r--r--xorg-server/hw/dmx/dmxpixmap.h127
-rw-r--r--xorg-server/hw/dmx/dmxscrinit.h96
-rw-r--r--xorg-server/hw/dmx/dmxshadow.h2
-rw-r--r--xorg-server/hw/dmx/dmxstat.h14
-rw-r--r--xorg-server/hw/dmx/dmxsync.h2
-rw-r--r--xorg-server/hw/dmx/dmxvisual.h10
-rw-r--r--xorg-server/hw/dmx/glxProxy/compsize.h2
-rw-r--r--xorg-server/hw/dmx/glxProxy/global.c2
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxcmds.h12
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxcontext.h56
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxdrawable.h5
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxerror.h1
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxscreens.h7
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxsingle.h30
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxswap.h12
-rw-r--r--xorg-server/hw/dmx/glxProxy/unpack.h453
-rw-r--r--xorg-server/hw/dmx/input/ChkNotMaskEv.h2
-rw-r--r--xorg-server/hw/dmx/input/atKeynames.h584
-rw-r--r--xorg-server/hw/dmx/input/dmxarg.h10
-rw-r--r--xorg-server/hw/dmx/input/dmxbackend.h26
-rw-r--r--xorg-server/hw/dmx/input/dmxcommon.h40
-rw-r--r--xorg-server/hw/dmx/input/dmxconsole.h34
-rw-r--r--xorg-server/hw/dmx/input/dmxevents.h4
-rw-r--r--xorg-server/hw/dmx/input/dmxmap.h2
-rw-r--r--xorg-server/hw/dmx/input/dmxsigio.h4
-rw-r--r--xorg-server/hw/dmx/input/lnx-keyboard.h44
-rw-r--r--xorg-server/hw/dmx/input/lnx-ms.h26
-rw-r--r--xorg-server/hw/dmx/input/lnx-ps2.h26
-rw-r--r--xorg-server/hw/dmx/input/usb-private.h22
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrglxext.h3
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrlog.h10
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrproxyext.h3
-rw-r--r--xorg-server/hw/kdrive/fake/fakeinit.c86
-rw-r--r--xorg-server/hw/kdrive/fake/kbd.c12
-rw-r--r--xorg-server/hw/kdrive/fake/mouse.c9
-rw-r--r--xorg-server/hw/kdrive/fake/os.c13
-rw-r--r--xorg-server/hw/kdrive/fbdev/fbdev.h56
-rw-r--r--xorg-server/hw/kdrive/src/fourcc.h3
-rw-r--r--xorg-server/hw/xfree86/common/fourcc.h3
-rw-r--r--xorg-server/hw/xfree86/common/xf86Bus.h32
-rw-r--r--xorg-server/hw/xfree86/common/xf86Config.h10
-rw-r--r--xorg-server/hw/xfree86/common/xf86DPMS.c68
-rw-r--r--xorg-server/hw/xfree86/common/xf86Events.c8
-rw-r--r--xorg-server/hw/xfree86/common/xf86InPriv.h86
-rw-r--r--xorg-server/hw/xfree86/common/xf86PciInfo.h23
-rw-r--r--xorg-server/hw/xfree86/common/xf86Privstr.h120
-rw-r--r--xorg-server/hw/xfree86/common/xf86VGAarbiter.h97
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.h3
-rw-r--r--xorg-server/hw/xfree86/common/xf86fbBus.c16
-rw-r--r--xorg-server/hw/xfree86/common/xf86noBus.c2
-rw-r--r--xorg-server/hw/xfree86/common/xf86pciBus.h90
-rw-r--r--xorg-server/hw/xfree86/common/xf86xvpriv.h176
-rw-r--r--xorg-server/hw/xfree86/common/xorgHelper.c1
-rw-r--r--xorg-server/hw/xfree86/common/xorgVersion.h26
-rw-r--r--xorg-server/hw/xfree86/dixmods/extmod/xvmod.c1
-rw-r--r--xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h8
-rw-r--r--xorg-server/hw/xfree86/dixmods/recordmod.c23
-rw-r--r--xorg-server/hw/xfree86/dixmods/xkbKillSrv.c2
-rw-r--r--xorg-server/hw/xfree86/dixmods/xkbPrivate.c19
-rw-r--r--xorg-server/hw/xfree86/dixmods/xkbVT.c8
-rw-r--r--xorg-server/hw/xfree86/dri/sarea.h33
-rw-r--r--xorg-server/hw/xfree86/fbdevhw/fbpriv.h330
-rw-r--r--xorg-server/hw/xfree86/i2c/bt829.h90
-rw-r--r--xorg-server/hw/xfree86/i2c/fi1236.h110
-rw-r--r--xorg-server/hw/xfree86/i2c/msp3430.h53
-rw-r--r--xorg-server/hw/xfree86/i2c/tda9850.h21
-rw-r--r--xorg-server/hw/xfree86/i2c/tda9885.h62
-rw-r--r--xorg-server/hw/xfree86/i2c/uda1380.h17
-rw-r--r--xorg-server/hw/xfree86/int10/stub.c2
-rw-r--r--xorg-server/hw/xfree86/int10/xf86x86emu.c38
-rw-r--r--xorg-server/hw/xfree86/loader/loader.h152
-rw-r--r--xorg-server/hw/xfree86/loader/loaderProcs.h188
-rw-r--r--xorg-server/hw/xfree86/loader/os.c2
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Rename.h2
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_VTsw.c206
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c30
-rw-r--r--xorg-server/hw/xfree86/os-support/bus/Pci.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/bus/Pci.h5
-rw-r--r--xorg-server/hw/xfree86/os-support/bus/xf86Sbus.h2
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c118
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_bell.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c30
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c127
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c120
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c172
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/agp_noop.c23
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c5
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/pm_noop.c4
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/sigiostubs.c19
-rw-r--r--xorg-server/hw/xfree86/os-support/shared/xf86Axp.h37
-rw-r--r--xorg-server/hw/xfree86/os-support/solaris/sun_agp.c389
-rw-r--r--xorg-server/hw/xfree86/os-support/stub/stub_bios.c4
-rw-r--r--xorg-server/hw/xfree86/os-support/stub/stub_init.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/stub/stub_video.c4
-rw-r--r--xorg-server/hw/xfree86/os-support/xf86OSpriv.h32
-rw-r--r--xorg-server/hw/xfree86/os-support/xf86_OSlib.h409
-rw-r--r--xorg-server/hw/xfree86/parser/xf86tokens.h19
-rw-r--r--xorg-server/hw/xfree86/ramdac/BTPriv.h8
-rw-r--r--xorg-server/hw/xfree86/ramdac/IBMPriv.h22
-rw-r--r--xorg-server/hw/xfree86/ramdac/TIPriv.h6
-rw-r--r--xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h103
-rw-r--r--xorg-server/hw/xfree86/ramdac/xf86RamDac.c304
-rw-r--r--xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c24
-rw-r--r--xorg-server/hw/xfree86/ramdac/xf86RamDacPriv.h4
-rw-r--r--xorg-server/hw/xfree86/vgahw/vgaHWmodule.c20
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu.h75
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/debug.h163
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/decode.h57
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/fpu.h23
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h44
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/ops.h6
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h251
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h189
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/regs.h101
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/types.h23
-rw-r--r--xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h34
-rw-r--r--xorg-server/hw/xfree86/xaa/xaaBitOrder.c8
-rw-r--r--xorg-server/hw/xfree86/xaa/xaacexp.h95
-rw-r--r--xorg-server/hw/xfree86/xaa/xaawrap.h154
-rw-r--r--xorg-server/hw/xnest/Args.h20
-rw-r--r--xorg-server/hw/xnest/Color.h115
-rw-r--r--xorg-server/hw/xnest/Display.h8
-rw-r--r--xorg-server/hw/xnest/Drawable.h52
-rw-r--r--xorg-server/hw/xnest/Events.h2
-rw-r--r--xorg-server/hw/xnest/Handlers.c6
-rw-r--r--xorg-server/hw/xnest/Handlers.h4
-rw-r--r--xorg-server/hw/xnest/Init.h2
-rw-r--r--xorg-server/hw/xnest/Keyboard.h4
-rw-r--r--xorg-server/hw/xnest/Pixmap.c162
-rw-r--r--xorg-server/hw/xnest/Pointer.h4
-rw-r--r--xorg-server/hw/xnest/Screen.h2
-rw-r--r--xorg-server/hw/xnest/Visual.c50
-rw-r--r--xorg-server/hw/xnest/Visual.h4
-rw-r--r--xorg-server/hw/xnest/XNFont.h4
-rw-r--r--xorg-server/hw/xnest/XNGC.h5
-rw-r--r--xorg-server/hw/xnest/XNPixmap.h75
-rw-r--r--xorg-server/hw/xnest/XNWindow.h147
-rw-r--r--xorg-server/hw/xnest/Xnest.h8
-rw-r--r--xorg-server/hw/xnest/xnest-config.h2
-rw-r--r--xorg-server/hw/xquartz/sanitizedCarbon.h10
-rw-r--r--xorg-server/hw/xquartz/sanitizedCocoa.h10
-rw-r--r--xorg-server/hw/xwin/winclip.c6
-rw-r--r--xorg-server/hw/xwin/winfont.c50
-rw-r--r--xorg-server/hw/xwin/winglobals.c96
-rw-r--r--xorg-server/hw/xwin/winglobals.h177
-rw-r--r--xorg-server/hw/xwin/winkeynames.h40
-rw-r--r--xorg-server/hw/xwin/winmessages.h2051
-rw-r--r--xorg-server/hw/xwin/winmonitors.h12
-rw-r--r--xorg-server/hw/xwin/winms.h2
-rw-r--r--xorg-server/hw/xwin/winmultiwindowclass.h79
-rw-r--r--xorg-server/hw/xwin/winresource.h2
-rw-r--r--xorg-server/include/closestr.h253
-rw-r--r--xorg-server/include/closure.h13
-rw-r--r--xorg-server/include/cursorstr.h197
-rw-r--r--xorg-server/include/dixaccess.h58
-rw-r--r--xorg-server/include/dixfontstr.h6
-rw-r--r--xorg-server/include/eventconvert.h2
-rw-r--r--xorg-server/include/events.h2
-rw-r--r--xorg-server/include/globals.h4
-rw-r--r--xorg-server/include/hotplug.h2
-rw-r--r--xorg-server/include/miscstruct.h11
-rw-r--r--xorg-server/include/opaque.h154
-rw-r--r--xorg-server/include/optionstr.h3
-rw-r--r--xorg-server/include/pixmapstr.h171
-rw-r--r--xorg-server/include/propertyst.h134
-rw-r--r--xorg-server/include/ptrveloc.h71
-rw-r--r--xorg-server/include/region.h3
-rw-r--r--xorg-server/include/registry.h8
-rw-r--r--xorg-server/include/rgb.h7
-rw-r--r--xorg-server/include/selection.h17
-rw-r--r--xorg-server/include/servermd.h706
-rw-r--r--xorg-server/include/site.h253
-rw-r--r--xorg-server/include/validate.h2
-rw-r--r--xorg-server/include/windowstr.h123
-rw-r--r--xorg-server/include/xkbstr.h763
-rw-r--r--xorg-server/include/xserver-properties.h2
-rw-r--r--xorg-server/mi/mibstore.c86
-rw-r--r--xorg-server/mi/mibstore.h46
-rw-r--r--xorg-server/mi/micoord.h2
-rw-r--r--xorg-server/mi/micursor.c3
-rw-r--r--xorg-server/mi/mipointrst.h31
-rw-r--r--xorg-server/mi/miscanfill.h13
-rw-r--r--xorg-server/mi/mistruct.h17
-rw-r--r--xorg-server/mi/mivalidate.h102
-rw-r--r--xorg-server/miext/cw/cw.h342
-rw-r--r--xorg-server/miext/damage/damagestr.h72
-rw-r--r--xorg-server/miext/rootless/rootlessCommon.h574
-rw-r--r--xorg-server/miext/rootless/rootlessConfig.h124
-rw-r--r--xorg-server/miext/shadow/shalloc.c99
-rw-r--r--xorg-server/os/strcasecmp.c4
-rw-r--r--xorg-server/os/strcasestr.c28
-rw-r--r--xorg-server/os/strlcat.c117
-rw-r--r--xorg-server/os/strndup.c18
-rw-r--r--xorg-server/render/picture.h463
-rw-r--r--xorg-server/xfixes/xfixesint.h174
-rw-r--r--xorg-server/xkb/ddxCtrls.c32
-rw-r--r--xorg-server/xkb/ddxKillSrv.c2
-rw-r--r--xorg-server/xkb/ddxPrivate.c2
-rw-r--r--xorg-server/xkb/ddxVT.c2
353 files changed, 10921 insertions, 10346 deletions
diff --git a/libX11/specs/libX11/CH04.xml b/libX11/specs/libX11/CH04.xml
index 973e7907e..a3f47d543 100644
--- a/libX11/specs/libX11/CH04.xml
+++ b/libX11/specs/libX11/CH04.xml
@@ -1424,7 +1424,7 @@ To obtain the type, format, and value of a property of a given window, use
<paramdef><parameter> actual_format_return</parameter></paramdef>
<paramdef><parameter> nitems_return</parameter></paramdef>
<paramdef><parameter> bytes_after_return</parameter></paramdef>
- <paramdef>.br<parameter> prop_return</parameter></paramdef>
+ <paramdef><parameter> prop_return</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<!-- .FN -->
diff --git a/mesalib/Android.mk b/mesalib/Android.mk
index 0d5917ce5..6a3014c81 100644
--- a/mesalib/Android.mk
+++ b/mesalib/Android.mk
@@ -24,7 +24,7 @@
# BOARD_GPU_DRIVERS should be defined. The valid values are
#
# classic drivers: i915 i965
-# gallium drivers: swrast i915g nouveau r300g r600g vmwgfx
+# gallium drivers: swrast i915g nouveau r300g r600g radeonsi vmwgfx
#
# The main target is libGLES_mesa. For each classic driver enabled, a DRI
# module will also be built. DRI modules will be loaded by libGLES_mesa.
@@ -37,7 +37,7 @@ DRM_TOP := external/drm
DRM_GRALLOC_TOP := hardware/drm_gralloc
classic_drivers := i915 i965
-gallium_drivers := swrast i915g nouveau r300g r600g vmwgfx
+gallium_drivers := swrast i915g nouveau r300g r600g radeonsi vmwgfx
MESA_GPU_DRIVERS := $(strip $(BOARD_GPU_DRIVERS))
diff --git a/mesalib/configs/autoconf.in b/mesalib/configs/autoconf.in
index 95cca6f23..ec3f3194e 100644
--- a/mesalib/configs/autoconf.in
+++ b/mesalib/configs/autoconf.in
@@ -32,9 +32,12 @@ INTEL_LIBS = @INTEL_LIBS@
INTEL_CFLAGS = @INTEL_CFLAGS@
X11_LIBS = @X11_LIBS@
X11_CFLAGS = @X11_CFLAGS@
+LLVM_BINDIR = @LLVM_BINDIR@
LLVM_CFLAGS = @LLVM_CFLAGS@
+LLVM_CXXFLAGS = @LLVM_CXXFLAGS@
LLVM_LDFLAGS = @LLVM_LDFLAGS@
LLVM_LIBS = @LLVM_LIBS@
+LLVM_INCLUDEDIR = @LLVM_INCLUDEDIR@
GLW_CFLAGS = @GLW_CFLAGS@
GLX_TLS = @GLX_TLS@
DRI_CFLAGS = @DRI_CFLAGS@
@@ -58,6 +61,9 @@ AWK = @AWK@
GREP = @GREP@
NM = @NM@
+# Perl
+PERL = @PERL@
+
# Python and flags (generally only needed by the developers)
PYTHON2 = @PYTHON2@
PYTHON_FLAGS = -t -O -O
diff --git a/mesalib/configure.ac b/mesalib/configure.ac
index 65d358e0a..df65ae5ed 100644
--- a/mesalib/configure.ac
+++ b/mesalib/configure.ac
@@ -38,7 +38,8 @@ dnl Versions for external dependencies
LIBDRM_REQUIRED=2.4.24
LIBDRM_RADEON_REQUIRED=2.4.31
LIBDRM_INTEL_REQUIRED=2.4.32
-LIBDRM_NOUVEAU_REQUIRED=0.6
+LIBDRM_NVVIEUX_REQUIRED=2.4.33
+LIBDRM_NOUVEAU_REQUIRED=2.4.33
DRI2PROTO_REQUIRED=2.6
GLPROTO_REQUIRED=1.4.14
LIBDRM_XORG_REQUIRED=2.4.24
@@ -67,6 +68,8 @@ if test ! -f "$srcdir/src/glsl/glcpp/glcpp-parse.y"; then
fi
AC_PROG_LEX
+AC_PATH_PROG([PERL], [perl])
+
dnl Our fallback install-sh is a symlink to minstall. Use the existing
dnl configuration in that case.
AC_PROG_INSTALL
@@ -1272,7 +1275,7 @@ esac
case $DRI_DIRS in
*nouveau*)
- PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
+ PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NVVIEUX_REQUIRED])
HAVE_NOUVEAU_DRI=yes;
;;
esac
@@ -1647,9 +1650,12 @@ if test "x$with_gallium_drivers" != x; then
SRC_DIRS="$SRC_DIRS gallium gallium/winsys gallium/targets"
fi
+AC_SUBST([LLVM_BINDIR])
AC_SUBST([LLVM_CFLAGS])
+AC_SUBST([LLVM_CXXFLAGS])
AC_SUBST([LLVM_LIBS])
AC_SUBST([LLVM_LDFLAGS])
+AC_SUBST([LLVM_INCLUDEDIR])
AC_SUBST([LLVM_VERSION])
case "x$enable_opengl$enable_gles1$enable_gles2" in
@@ -1795,6 +1801,9 @@ if test "x$enable_gallium_llvm" = xyes; then
LLVM_LIBS="`$LLVM_CONFIG --libs engine bitwriter`"
fi
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
+ LLVM_BINDIR=`$LLVM_CONFIG --bindir`
+ LLVM_CXXFLAGS=`$LLVM_CONFIG --cxxflags`
+ LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
DEFINES="$DEFINES -D__STDC_CONSTANT_MACROS"
MESA_LLVM=1
else
@@ -1898,9 +1907,17 @@ if test "x$with_gallium_drivers" != x; then
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
gallium_check_st "radeon/drm" "dri-r600" "xorg-r600" "" "xvmc-r600" "vdpau-r600" "va-r600"
;;
+ xradeonsi)
+ GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS radeonsi"
+ if test "x$LLVM_VERSION" != "x3.1"; then
+ AC_MSG_ERROR([LLVM 3.1 is required to build the radeonsi driver.])
+ fi
+ NEED_RADEON_GALLIUM=yes;
+ gallium_check_st "radeon/drm" "dri-radeonsi" "xorg-radeonsi"
+ ;;
xnouveau)
PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
- GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50 nvc0"
+ GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nv30 nv50 nvc0"
gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau" "" "xvmc-nouveau" "vdpau-nouveau"
;;
xswrast)
@@ -1957,6 +1974,7 @@ done
AM_CONDITIONAL(HAVE_GALAHAD_GALLIUM, test x$HAVE_GALAHAD_GALLIUM = xyes)
AM_CONDITIONAL(HAVE_IDENTITY_GALLIUM, test x$HAVE_IDENTITY_GALLIUM = xyes)
AM_CONDITIONAL(HAVE_NOOP_GALLIUM, test x$HAVE_NOOP_GALLIUM = xyes)
+AM_CONDITIONAL(NEED_RADEON_GALLIUM, test x$NEED_RADEON_GALLIUM = xyes)
AC_SUBST([GALLIUM_MAKE_DIRS])
dnl prepend CORE_DIRS to SRC_DIRS
diff --git a/mesalib/docs/GL3.txt b/mesalib/docs/GL3.txt
index c0bbf80ee..3e0b25ebc 100644
--- a/mesalib/docs/GL3.txt
+++ b/mesalib/docs/GL3.txt
@@ -72,7 +72,7 @@ GLX_ARB_create_context_profile DONE
GL 3.3:
GLSL 3.30 not started
-GL_ARB_blend_func_extended started (airlied/ARB_blend_func_extended)
+GL_ARB_blend_func_extended DONE (r600, softpipe)
GL_ARB_explicit_attrib_location DONE (i915, i965, r300, r600, swrast)
GL_ARB_occlusion_query2 DONE (r300, r600, swrast)
GL_ARB_sampler_objects DONE (i965, r300, r600)
diff --git a/mesalib/docs/viewperf.html b/mesalib/docs/viewperf.html
index c294255ac..1005eae48 100644
--- a/mesalib/docs/viewperf.html
+++ b/mesalib/docs/viewperf.html
@@ -152,7 +152,38 @@ If the fallback texture created in _mesa_get_fallback_texture() is
initialized to be full white instead of full black the rendering appears
correct.
However, we have no plans to implement this work-around in Mesa.
+</p>
+
+<h2>Maya-03 test 2</h2>
+
+<p>
+This test makes some unusual calls to glRotate. For example:
+</p>
+<pre>
+glRotate(50, 50, 50, 1);
+glRotate(100, 100, 100, 1);
+glRotate(52, 52, 52, 1);
+</pre>
+<p>
+These unusual values lead to invalid modelview matrices.
+For example, the last glRotate command above produces this matrix with Mesa:
+<pre>
+1.08536e+24 2.55321e-23 -0.000160389 0
+5.96937e-25 1.08536e+24 103408 0
+103408 -0.000160389 1.74755e+09 0
+0 0 0 nan
+</pre>
+and with NVIDIA's OpenGL:
+<pre>
+1.4013e-45 0 -nan 0
+0 1.4013e-45 1.4013e-45 0
+1.4013e-45 -nan 1.4013e-45 0
+0 0 0 1.4013e-45
+</pre>
+<p>
+This causes the object in question to be drawn in a strange orientation
+and with a semi-random color (between white and black) since GL_FOG is enabled.
</p>
diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.c b/mesalib/src/gallium/auxiliary/util/u_blitter.c
index 3e9cbffe9..6a9141209 100644
--- a/mesalib/src/gallium/auxiliary/util/u_blitter.c
+++ b/mesalib/src/gallium/auxiliary/util/u_blitter.c
@@ -276,7 +276,7 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe)
for (i = 0; i < 4; i++)
ctx->vertices[i][0][3] = 1; /*v.w*/
- ctx->upload = u_upload_create(pipe, 65536, 128, PIPE_BIND_VERTEX_BUFFER);
+ ctx->upload = u_upload_create(pipe, 65536, 4, PIPE_BIND_VERTEX_BUFFER);
return &ctx->base;
}
diff --git a/mesalib/src/gallium/auxiliary/util/u_double_list.h b/mesalib/src/gallium/auxiliary/util/u_double_list.h
index 29f0b9d09..9d1129b18 100644
--- a/mesalib/src/gallium/auxiliary/util/u_double_list.h
+++ b/mesalib/src/gallium/auxiliary/util/u_double_list.h
@@ -1,141 +1,146 @@
-/**************************************************************************
- *
- * Copyright 2006 Tungsten Graphics, Inc., Bismarck, ND. USA.
- * 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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- **************************************************************************/
-
-/**
- * \file
- * List macros heavily inspired by the Linux kernel
- * list handling. No list looping yet.
- *
- * Is not threadsafe, so common operations need to
- * be protected using an external mutex.
- */
-
-#ifndef _U_DOUBLE_LIST_H_
-#define _U_DOUBLE_LIST_H_
-
-
-#include <stddef.h>
-#include "pipe/p_compiler.h"
-
-
-struct list_head
-{
- struct list_head *prev;
- struct list_head *next;
-};
-
-static INLINE void list_inithead(struct list_head *item)
-{
- item->prev = item;
- item->next = item;
-}
-
-static INLINE void list_add(struct list_head *item, struct list_head *list)
-{
- item->prev = list;
- item->next = list->next;
- list->next->prev = item;
- list->next = item;
-}
-
-static INLINE void list_addtail(struct list_head *item, struct list_head *list)
-{
- item->next = list;
- item->prev = list->prev;
- list->prev->next = item;
- list->prev = item;
-}
-
-static INLINE void list_replace(struct list_head *from, struct list_head *to)
-{
- to->prev = from->prev;
- to->next = from->next;
- from->next->prev = to;
- from->prev->next = to;
-}
-
-static INLINE void list_del(struct list_head *item)
-{
- item->prev->next = item->next;
- item->next->prev = item->prev;
-}
-
-static INLINE void list_delinit(struct list_head *item)
-{
- item->prev->next = item->next;
- item->next->prev = item->prev;
- item->next = item;
- item->prev = item;
-}
-
-#define LIST_INITHEAD(__item) list_inithead(__item)
-#define LIST_ADD(__item, __list) list_add(__item, __list)
-#define LIST_ADDTAIL(__item, __list) list_addtail(__item, __list)
-#define LIST_REPLACE(__from, __to) list_replace(__from, __to)
-#define LIST_DEL(__item) list_del(__item)
-#define LIST_DELINIT(__item) list_delinit(__item)
-
-#define LIST_ENTRY(__type, __item, __field) \
- ((__type *)(((char *)(__item)) - offsetof(__type, __field)))
-
-#define LIST_IS_EMPTY(__list) \
- ((__list)->next == (__list))
-
-#ifndef container_of
-#define container_of(ptr, sample, member) \
- (void *)((char *)(ptr) \
- - ((char *)&(sample)->member - (char *)(sample)))
-#endif
-
-#define LIST_FOR_EACH_ENTRY(pos, head, member) \
- for (pos = container_of((head)->next, pos, member); \
- &pos->member != (head); \
- pos = container_of(pos->member.next, pos, member))
-
-#define LIST_FOR_EACH_ENTRY_SAFE(pos, storage, head, member) \
- for (pos = container_of((head)->next, pos, member), \
- storage = container_of(pos->member.next, pos, member); \
- &pos->member != (head); \
- pos = storage, storage = container_of(storage->member.next, storage, member))
-
-#define LIST_FOR_EACH_ENTRY_SAFE_REV(pos, storage, head, member) \
- for (pos = container_of((head)->prev, pos, member), \
- storage = container_of(pos->member.prev, pos, member); \
- &pos->member != (head); \
- pos = storage, storage = container_of(storage->member.prev, storage, member))
-
-#define LIST_FOR_EACH_ENTRY_FROM(pos, start, head, member) \
- for (pos = container_of((start), pos, member); \
- &pos->member != (head); \
- pos = container_of(pos->member.next, pos, member))
-
-#define LIST_FOR_EACH_ENTRY_FROM_REV(pos, start, head, member) \
- for (pos = container_of((start), pos, member); \
- &pos->member != (head); \
- pos = container_of(pos->member.prev, pos, member))
-
-#endif /*_U_DOUBLE_LIST_H_*/
+/**************************************************************************
+ *
+ * Copyright 2006 Tungsten Graphics, Inc., Bismarck, ND. USA.
+ * 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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ **************************************************************************/
+
+/**
+ * \file
+ * List macros heavily inspired by the Linux kernel
+ * list handling. No list looping yet.
+ *
+ * Is not threadsafe, so common operations need to
+ * be protected using an external mutex.
+ */
+
+#ifndef _U_DOUBLE_LIST_H_
+#define _U_DOUBLE_LIST_H_
+
+
+#include <stddef.h>
+#include "pipe/p_compiler.h"
+
+
+struct list_head
+{
+ struct list_head *prev;
+ struct list_head *next;
+};
+
+static INLINE void list_inithead(struct list_head *item)
+{
+ item->prev = item;
+ item->next = item;
+}
+
+static INLINE void list_add(struct list_head *item, struct list_head *list)
+{
+ item->prev = list;
+ item->next = list->next;
+ list->next->prev = item;
+ list->next = item;
+}
+
+static INLINE void list_addtail(struct list_head *item, struct list_head *list)
+{
+ item->next = list;
+ item->prev = list->prev;
+ list->prev->next = item;
+ list->prev = item;
+}
+
+static INLINE void list_replace(struct list_head *from, struct list_head *to)
+{
+ to->prev = from->prev;
+ to->next = from->next;
+ from->next->prev = to;
+ from->prev->next = to;
+}
+
+static INLINE void list_del(struct list_head *item)
+{
+ item->prev->next = item->next;
+ item->next->prev = item->prev;
+}
+
+static INLINE void list_delinit(struct list_head *item)
+{
+ item->prev->next = item->next;
+ item->next->prev = item->prev;
+ item->next = item;
+ item->prev = item;
+}
+
+#define LIST_INITHEAD(__item) list_inithead(__item)
+#define LIST_ADD(__item, __list) list_add(__item, __list)
+#define LIST_ADDTAIL(__item, __list) list_addtail(__item, __list)
+#define LIST_REPLACE(__from, __to) list_replace(__from, __to)
+#define LIST_DEL(__item) list_del(__item)
+#define LIST_DELINIT(__item) list_delinit(__item)
+
+#define LIST_ENTRY(__type, __item, __field) \
+ ((__type *)(((char *)(__item)) - offsetof(__type, __field)))
+
+#define LIST_IS_EMPTY(__list) \
+ ((__list)->next == (__list))
+
+/**
+ * Cast from a pointer to a member of a struct back to the containing struct.
+ *
+ * 'sample' MUST be initialized, or else the result is undefined!
+ */
+#ifndef container_of
+#define container_of(ptr, sample, member) \
+ (void *)((char *)(ptr) \
+ - ((char *)&(sample)->member - (char *)(sample)))
+#endif
+
+#define LIST_FOR_EACH_ENTRY(pos, head, member) \
+ for (pos = NULL, pos = container_of((head)->next, pos, member); \
+ &pos->member != (head); \
+ pos = container_of(pos->member.next, pos, member))
+
+#define LIST_FOR_EACH_ENTRY_SAFE(pos, storage, head, member) \
+ for (pos = NULL, pos = container_of((head)->next, pos, member), \
+ storage = container_of(pos->member.next, pos, member); \
+ &pos->member != (head); \
+ pos = storage, storage = container_of(storage->member.next, storage, member))
+
+#define LIST_FOR_EACH_ENTRY_SAFE_REV(pos, storage, head, member) \
+ for (pos = NULL, pos = container_of((head)->prev, pos, member), \
+ storage = container_of(pos->member.prev, pos, member); \
+ &pos->member != (head); \
+ pos = storage, storage = container_of(storage->member.prev, storage, member))
+
+#define LIST_FOR_EACH_ENTRY_FROM(pos, start, head, member) \
+ for (pos = NULL, pos = container_of((start), pos, member); \
+ &pos->member != (head); \
+ pos = container_of(pos->member.next, pos, member))
+
+#define LIST_FOR_EACH_ENTRY_FROM_REV(pos, start, head, member) \
+ for (pos = NULL, pos = container_of((start), pos, member); \
+ &pos->member != (head); \
+ pos = container_of(pos->member.prev, pos, member))
+
+#endif /*_U_DOUBLE_LIST_H_*/
diff --git a/mesalib/src/gallium/auxiliary/util/u_dual_blend.h b/mesalib/src/gallium/auxiliary/util/u_dual_blend.h
new file mode 100644
index 000000000..e31d43c18
--- /dev/null
+++ b/mesalib/src/gallium/auxiliary/util/u_dual_blend.h
@@ -0,0 +1,26 @@
+#ifndef U_DUAL_BLEND_H
+#define U_DUAL_BLEND_H
+
+#include "pipe/p_state.h"
+
+static INLINE boolean util_blend_factor_is_dual_src(int factor)
+{
+ return (factor == PIPE_BLENDFACTOR_SRC1_COLOR) ||
+ (factor == PIPE_BLENDFACTOR_SRC1_ALPHA) ||
+ (factor == PIPE_BLENDFACTOR_INV_SRC1_COLOR) ||
+ (factor == PIPE_BLENDFACTOR_INV_SRC1_ALPHA);
+}
+
+static INLINE boolean util_blend_state_is_dual(const struct pipe_blend_state *blend,
+ int index)
+{
+ if (util_blend_factor_is_dual_src(blend->rt[index].rgb_src_factor) ||
+ util_blend_factor_is_dual_src(blend->rt[index].alpha_src_factor) ||
+ util_blend_factor_is_dual_src(blend->rt[index].rgb_dst_factor) ||
+ util_blend_factor_is_dual_src(blend->rt[index].alpha_dst_factor))
+ return true;
+ return false;
+}
+
+
+#endif
diff --git a/mesalib/src/gallium/auxiliary/util/u_linkage.h b/mesalib/src/gallium/auxiliary/util/u_linkage.h
index 43ec917fc..7b23123d3 100644
--- a/mesalib/src/gallium/auxiliary/util/u_linkage.h
+++ b/mesalib/src/gallium/auxiliary/util/u_linkage.h
@@ -49,15 +49,16 @@ unsigned util_semantic_set_from_program_file(struct util_semantic_set *set, cons
*
* num_slots is the size of the layout array and hardware limit instead.
*
- * efficient_slots == 0 or efficient_solts == num_slots are typical settings.
+ * efficient_slots == 0 or efficient_slots == num_slots are typical settings.
*/
void util_semantic_layout_from_set(unsigned char *layout, const struct util_semantic_set *set, unsigned efficient_slots, unsigned num_slots);
static INLINE void
-util_semantic_table_from_layout(unsigned char *table, unsigned char *layout, unsigned char first_slot_value, unsigned char num_slots)
+util_semantic_table_from_layout(unsigned char *table, size_t table_size, unsigned char *layout,
+ unsigned char first_slot_value, unsigned char num_slots)
{
- int i;
- memset(table, 0xff, sizeof(table));
+ unsigned char i;
+ memset(table, 0xff, table_size);
for(i = 0; i < num_slots; ++i)
table[layout[i]] = first_slot_value + i;
diff --git a/mesalib/src/glsl/Makefile.sources b/mesalib/src/glsl/Makefile.sources
index 15f5e1f50..5621e42b2 100644
--- a/mesalib/src/glsl/Makefile.sources
+++ b/mesalib/src/glsl/Makefile.sources
@@ -26,6 +26,7 @@ LIBGLSL_CXX_FILES := \
glsl_symbol_table.cpp \
hir_field_selection.cpp \
ir_basic_block.cpp \
+ ir_builder.cpp \
ir_clone.cpp \
ir_constant_expression.cpp \
ir.cpp \
diff --git a/mesalib/src/glsl/ast.h b/mesalib/src/glsl/ast.h
index 9b1e0b192..b096c838c 100644
--- a/mesalib/src/glsl/ast.h
+++ b/mesalib/src/glsl/ast.h
@@ -363,6 +363,11 @@ struct ast_type_qualifier {
* qualifier is used.
*/
unsigned explicit_location:1;
+ /**
+ * Flag set if GL_ARB_explicit_attrib_location "index" layout
+ * qualifier is used.
+ */
+ unsigned explicit_index:1;
/** \name Layout qualifiers for GL_AMD_conservative_depth */
/** \{ */
@@ -386,6 +391,13 @@ struct ast_type_qualifier {
* This field is only valid if \c explicit_location is set.
*/
int location;
+ /**
+ * Index specified via GL_ARB_explicit_attrib_location layout
+ *
+ * \note
+ * This field is only valid if \c explicit_index is set.
+ */
+ int index;
/**
* Return true if and only if an interpolation qualifier is present.
diff --git a/mesalib/src/glsl/ast_to_hir.cpp b/mesalib/src/glsl/ast_to_hir.cpp
index f4dfc4ce3..820c86c5e 100644
--- a/mesalib/src/glsl/ast_to_hir.cpp
+++ b/mesalib/src/glsl/ast_to_hir.cpp
@@ -2092,14 +2092,21 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
} else {
var->location = qual->location;
}
+ if (qual->flags.q.explicit_index) {
+ var->explicit_index = true;
+ var->index = qual->index;
+ }
}
+ } else if (qual->flags.q.explicit_index) {
+ _mesa_glsl_error(loc, state,
+ "explicit index requires explicit location\n");
}
/* Does the declaration use the 'layout' keyword?
*/
const bool uses_layout = qual->flags.q.pixel_center_integer
|| qual->flags.q.origin_upper_left
- || qual->flags.q.explicit_location;
+ || qual->flags.q.explicit_location; /* no need for index since it relies on location */
/* Does the declaration use the deprecated 'attribute' or 'varying'
* keywords?
diff --git a/mesalib/src/glsl/builtin_variables.cpp b/mesalib/src/glsl/builtin_variables.cpp
index 516a69caf..03b64c931 100644
--- a/mesalib/src/glsl/builtin_variables.cpp
+++ b/mesalib/src/glsl/builtin_variables.cpp
@@ -408,6 +408,7 @@ add_variable(exec_list *instructions, glsl_symbol_table *symtab,
var->location = slot;
var->explicit_location = (slot >= 0);
+ var->explicit_index = 0;
/* Once the variable is created an initialized, add it to the symbol table
* and add the declaration to the IR stream.
diff --git a/mesalib/src/glsl/glsl_parser.yy b/mesalib/src/glsl/glsl_parser.yy
index 920213c30..5753acf3c 100644
--- a/mesalib/src/glsl/glsl_parser.yy
+++ b/mesalib/src/glsl/glsl_parser.yy
@@ -1103,8 +1103,14 @@ layout_qualifier_id_list:
if ($1.flags.q.explicit_location)
$$.location = $1.location;
+ if ($1.flags.q.explicit_index)
+ $$.index = $1.index;
+
if ($3.flags.q.explicit_location)
$$.location = $3.location;
+
+ if ($3.flags.q.explicit_index)
+ $$.index = $3.index;
}
;
@@ -1191,6 +1197,20 @@ layout_qualifier_id:
YYERROR;
}
}
+
+ if (strcmp("index", $1) == 0) {
+ got_one = true;
+
+ $$.flags.q.explicit_index = 1;
+
+ if ($3 >= 0) {
+ $$.index = $3;
+ } else {
+ _mesa_glsl_error(& @3, state,
+ "invalid index %d specified\n", $3);
+ YYERROR;
+ }
+ }
}
/* If the identifier didn't match any known layout identifiers,
diff --git a/mesalib/src/glsl/ir.h b/mesalib/src/glsl/ir.h
index b1ae6db74..d6c6a607a 100644
--- a/mesalib/src/glsl/ir.h
+++ b/mesalib/src/glsl/ir.h
@@ -386,6 +386,7 @@ public:
* no effect).
*/
unsigned explicit_location:1;
+ unsigned explicit_index:1;
/**
* Does this variable have an initializer?
@@ -421,6 +422,11 @@ public:
int location;
/**
+ * output index for dual source blending.
+ */
+ int index;
+
+ /**
* Built-in state that backs this uniform
*
* Once set at variable creation, \c state_slots must remain invariant.
diff --git a/mesalib/src/glsl/ir_builder.cpp b/mesalib/src/glsl/ir_builder.cpp
new file mode 100644
index 000000000..9a16c90e5
--- /dev/null
+++ b/mesalib/src/glsl/ir_builder.cpp
@@ -0,0 +1,183 @@
+/*
+ * Copyright © 2012 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "ir_builder.h"
+#include "program/prog_instruction.h"
+
+using namespace ir_builder;
+
+namespace ir_builder {
+
+void
+ir_factory::emit(ir_instruction *ir)
+{
+ instructions->push_tail(ir);
+}
+
+ir_variable *
+ir_factory::make_temp(const glsl_type *type, const char *name)
+{
+ ir_variable *var;
+
+ var = new(mem_ctx) ir_variable(type, name, ir_var_temporary);
+ emit(var);
+
+ return var;
+}
+
+ir_assignment *
+assign(deref lhs, operand rhs, int writemask)
+{
+ void *mem_ctx = ralloc_parent(lhs.val);
+
+ ir_assignment *assign = new(mem_ctx) ir_assignment(lhs.val,
+ rhs.val,
+ NULL, writemask);
+
+ return assign;
+}
+
+ir_assignment *
+assign(deref lhs, operand rhs)
+{
+ return assign(lhs, rhs, (1 << lhs.val->type->vector_elements) - 1);
+}
+
+ir_swizzle *
+swizzle(operand a, int swizzle, int components)
+{
+ void *mem_ctx = ralloc_parent(a.val);
+
+ return new(mem_ctx) ir_swizzle(a.val,
+ GET_SWZ(swizzle, 0),
+ GET_SWZ(swizzle, 1),
+ GET_SWZ(swizzle, 2),
+ GET_SWZ(swizzle, 3),
+ components);
+}
+
+ir_swizzle *
+swizzle_xxxx(operand a)
+{
+ return swizzle(a, SWIZZLE_XXXX, 4);
+}
+
+ir_swizzle *
+swizzle_yyyy(operand a)
+{
+ return swizzle(a, SWIZZLE_YYYY, 4);
+}
+
+ir_swizzle *
+swizzle_zzzz(operand a)
+{
+ return swizzle(a, SWIZZLE_ZZZZ, 4);
+}
+
+ir_swizzle *
+swizzle_wwww(operand a)
+{
+ return swizzle(a, SWIZZLE_WWWW, 4);
+}
+
+ir_swizzle *
+swizzle_x(operand a)
+{
+ return swizzle(a, SWIZZLE_XXXX, 1);
+}
+
+ir_swizzle *
+swizzle_y(operand a)
+{
+ return swizzle(a, SWIZZLE_YYYY, 1);
+}
+
+ir_swizzle *
+swizzle_z(operand a)
+{
+ return swizzle(a, SWIZZLE_ZZZZ, 1);
+}
+
+ir_swizzle *
+swizzle_w(operand a)
+{
+ return swizzle(a, SWIZZLE_WWWW, 1);
+}
+
+ir_swizzle *
+swizzle_xy(operand a)
+{
+ return swizzle(a, SWIZZLE_XYZW, 2);
+}
+
+ir_swizzle *
+swizzle_xyz(operand a)
+{
+ return swizzle(a, SWIZZLE_XYZW, 3);
+}
+
+ir_swizzle *
+swizzle_xyzw(operand a)
+{
+ return swizzle(a, SWIZZLE_XYZW, 4);
+}
+
+ir_expression *
+expr(ir_expression_operation op, operand a, operand b)
+{
+ void *mem_ctx = ralloc_parent(a.val);
+
+ return new(mem_ctx) ir_expression(op, a.val, b.val);
+}
+
+ir_expression *add(operand a, operand b)
+{
+ return expr(ir_binop_add, a, b);
+}
+
+ir_expression *sub(operand a, operand b)
+{
+ return expr(ir_binop_sub, a, b);
+}
+
+ir_expression *mul(operand a, operand b)
+{
+ return expr(ir_binop_mul, a, b);
+}
+
+ir_expression *dot(operand a, operand b)
+{
+ return expr(ir_binop_dot, a, b);
+}
+
+ir_expression *
+saturate(operand a)
+{
+ void *mem_ctx = ralloc_parent(a.val);
+
+ return expr(ir_binop_max,
+ expr(ir_binop_min, a, new(mem_ctx) ir_constant(1.0f)),
+ new(mem_ctx) ir_constant(0.0f));
+}
+
+} /* namespace ir_builder */
diff --git a/mesalib/src/glsl/ir_builder.h b/mesalib/src/glsl/ir_builder.h
new file mode 100644
index 000000000..0ebcbab95
--- /dev/null
+++ b/mesalib/src/glsl/ir_builder.h
@@ -0,0 +1,105 @@
+/*
+ * Copyright © 2012 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "ir.h"
+
+namespace ir_builder {
+
+/**
+ * This little class exists to let the helper expression generators
+ * take either an ir_rvalue * or an ir_variable * to be automatically
+ * dereferenced, while still providing compile-time type checking.
+ *
+ * You don't have to explicitly call the constructor -- C++ will see
+ * that you passed an ir_variable, and silently call the
+ * operand(ir_variable *var) constructor behind your back.
+ */
+class operand {
+public:
+ operand(ir_rvalue *val)
+ : val(val)
+ {
+ }
+
+ operand(ir_variable *var)
+ {
+ void *mem_ctx = ralloc_parent(var);
+ val = new(mem_ctx) ir_dereference_variable(var);
+ }
+
+ ir_rvalue *val;
+};
+
+/** Automatic generator for ir_dereference_variable on assignment LHS.
+ *
+ * \sa operand
+ */
+class deref {
+public:
+ deref(ir_dereference *val)
+ : val(val)
+ {
+ }
+
+ deref(ir_variable *var)
+ {
+ void *mem_ctx = ralloc_parent(var);
+ val = new(mem_ctx) ir_dereference_variable(var);
+ }
+
+
+ ir_dereference *val;
+};
+
+class ir_factory {
+public:
+ void emit(ir_instruction *ir);
+ ir_variable *make_temp(const glsl_type *type, const char *name);
+
+ exec_list *instructions;
+ void *mem_ctx;
+};
+
+ir_assignment *assign(deref lhs, operand rhs);
+ir_assignment *assign(deref lhs, operand rhs, int writemask);
+
+ir_expression *expr(ir_expression_operation op, operand a, operand b);
+ir_expression *add(operand a, operand b);
+ir_expression *sub(operand a, operand b);
+ir_expression *mul(operand a, operand b);
+ir_expression *dot(operand a, operand b);
+ir_expression *saturate(operand a);
+
+ir_swizzle *swizzle_xxxx(operand a);
+ir_swizzle *swizzle_yyyy(operand a);
+ir_swizzle *swizzle_zzzz(operand a);
+ir_swizzle *swizzle_wwww(operand a);
+ir_swizzle *swizzle_x(operand a);
+ir_swizzle *swizzle_y(operand a);
+ir_swizzle *swizzle_z(operand a);
+ir_swizzle *swizzle_w(operand a);
+ir_swizzle *swizzle_xy(operand a);
+ir_swizzle *swizzle_xyz(operand a);
+ir_swizzle *swizzle_xyzw(operand a);
+
+} /* namespace ir_builder */
diff --git a/mesalib/src/glsl/ir_clone.cpp b/mesalib/src/glsl/ir_clone.cpp
index 26b0d8f5f..5a7a71cf6 100644
--- a/mesalib/src/glsl/ir_clone.cpp
+++ b/mesalib/src/glsl/ir_clone.cpp
@@ -57,6 +57,7 @@ ir_variable::clone(void *mem_ctx, struct hash_table *ht) const
var->origin_upper_left = this->origin_upper_left;
var->pixel_center_integer = this->pixel_center_integer;
var->explicit_location = this->explicit_location;
+ var->explicit_index = this->explicit_index;
var->has_initializer = this->has_initializer;
var->depth_layout = this->depth_layout;
@@ -74,6 +75,9 @@ ir_variable::clone(void *mem_ctx, struct hash_table *ht) const
if (this->explicit_location)
var->location = this->location;
+ if (this->explicit_index)
+ var->index = this->index;
+
if (this->constant_value)
var->constant_value = this->constant_value->clone(mem_ctx, ht);
diff --git a/mesalib/src/glsl/ir_set_program_inouts.cpp b/mesalib/src/glsl/ir_set_program_inouts.cpp
index 8c2bc30d6..8f3edb969 100644
--- a/mesalib/src/glsl/ir_set_program_inouts.cpp
+++ b/mesalib/src/glsl/ir_set_program_inouts.cpp
@@ -81,12 +81,12 @@ mark(struct gl_program *prog, ir_variable *var, int offset, int len,
*/
for (int i = 0; i < len; i++) {
- GLbitfield64 bitfield = BITFIELD64_BIT(var->location + offset + i);
+ GLbitfield64 bitfield = BITFIELD64_BIT(var->location + var->index + offset + i);
if (var->mode == ir_var_in) {
prog->InputsRead |= bitfield;
if (is_fragment_shader) {
gl_fragment_program *fprog = (gl_fragment_program *) prog;
- fprog->InterpQualifier[var->location + offset + i] =
+ fprog->InterpQualifier[var->location + var->index + offset + i] =
(glsl_interp_qualifier) var->interpolation;
}
} else if (var->mode == ir_var_system_value) {
diff --git a/mesalib/src/glsl/linker.cpp b/mesalib/src/glsl/linker.cpp
index 49b6b8f4a..6ba297237 100644
--- a/mesalib/src/glsl/linker.cpp
+++ b/mesalib/src/glsl/linker.cpp
@@ -1274,10 +1274,15 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
}
} else if (target_index == MESA_SHADER_FRAGMENT) {
unsigned binding;
+ unsigned index;
if (prog->FragDataBindings->get(binding, var->name)) {
assert(binding >= FRAG_RESULT_DATA0);
var->location = binding;
+
+ if (prog->FragDataIndexBindings->get(index, var->name)) {
+ var->index = index;
+ }
}
}
@@ -1288,7 +1293,7 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
*/
const unsigned slots = count_attribute_slots(var->type);
if (var->location != -1) {
- if (var->location >= generic_base) {
+ if (var->location >= generic_base && var->index < 1) {
/* From page 61 of the OpenGL 4.0 spec:
*
* "LinkProgram will fail if the attribute bindings assigned
@@ -1333,8 +1338,8 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
? "vertex shader input" : "fragment shader output";
linker_error(prog,
"insufficient contiguous locations "
- "available for %s `%s'", string,
- var->name);
+ "available for %s `%s' %d %d %d", string,
+ var->name, used_locations, use_mask, attr);
return false;
}
@@ -2321,7 +2326,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
goto done;
}
- if (!assign_attribute_or_color_locations(prog, MESA_SHADER_FRAGMENT, ctx->Const.MaxDrawBuffers)) {
+ if (!assign_attribute_or_color_locations(prog, MESA_SHADER_FRAGMENT, MAX2(ctx->Const.MaxDrawBuffers, ctx->Const.MaxDualSourceDrawBuffers))) {
goto done;
}
diff --git a/mesalib/src/glsl/opt_if_simplification.cpp b/mesalib/src/glsl/opt_if_simplification.cpp
index 940dd08d5..7e88208f7 100644
--- a/mesalib/src/glsl/opt_if_simplification.cpp
+++ b/mesalib/src/glsl/opt_if_simplification.cpp
@@ -66,6 +66,14 @@ do_if_simplification(exec_list *instructions)
ir_visitor_status
ir_if_simplification_visitor::visit_leave(ir_if *ir)
{
+ /* If the if statement has nothing on either side, remove it. */
+ if (ir->then_instructions.is_empty() &&
+ ir->else_instructions.is_empty()) {
+ ir->remove();
+ this->made_progress = true;
+ return visit_continue;
+ }
+
/* FINISHME: Ideally there would be a way to note that the condition results
* FINISHME: in a constant before processing both of the other subtrees.
* FINISHME: This can probably be done with some flags, but it would take
diff --git a/mesalib/src/mesa/main/blend.c b/mesalib/src/mesa/main/blend.c
index 09acdf5c5..bc446edca 100644
--- a/mesalib/src/mesa/main/blend.c
+++ b/mesalib/src/mesa/main/blend.c
@@ -63,6 +63,11 @@ legal_src_factor(const struct gl_context *ctx, GLenum factor)
case GL_CONSTANT_ALPHA:
case GL_ONE_MINUS_CONSTANT_ALPHA:
return GL_TRUE;
+ case GL_SRC1_COLOR:
+ case GL_SRC1_ALPHA:
+ case GL_ONE_MINUS_SRC1_COLOR:
+ case GL_ONE_MINUS_SRC1_ALPHA:
+ return ctx->Extensions.ARB_blend_func_extended;
default:
return GL_FALSE;
}
@@ -93,6 +98,12 @@ legal_dst_factor(const struct gl_context *ctx, GLenum factor)
case GL_CONSTANT_ALPHA:
case GL_ONE_MINUS_CONSTANT_ALPHA:
return GL_TRUE;
+ case GL_SRC_ALPHA_SATURATE:
+ case GL_SRC1_COLOR:
+ case GL_SRC1_ALPHA:
+ case GL_ONE_MINUS_SRC1_COLOR:
+ case GL_ONE_MINUS_SRC1_ALPHA:
+ return ctx->Extensions.ARB_blend_func_extended;
default:
return GL_FALSE;
}
diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c
index 83e5de47a..51b024143 100644
--- a/mesalib/src/mesa/main/context.c
+++ b/mesalib/src/mesa/main/context.c
@@ -1695,7 +1695,39 @@ _mesa_set_mvp_with_dp4( struct gl_context *ctx,
ctx->mvp_with_dp4 = flag;
}
+static GLboolean
+blend_factor_is_dual_src(GLenum factor)
+{
+ return factor == GL_SRC1_COLOR || factor == GL_SRC1_ALPHA ||
+ factor == GL_ONE_MINUS_SRC1_COLOR || factor == GL_ONE_MINUS_SRC1_ALPHA;
+}
+/*
+ * ARB_blend_func_extended - ERRORS section
+ * "The error INVALID_OPERATION is generated by Begin or any procedure that
+ * implicitly calls Begin if any draw buffer has a blend function requiring the
+ * second color input (SRC1_COLOR, ONE_MINUS_SRC1_COLOR, SRC1_ALPHA or
+ * ONE_MINUS_SRC1_ALPHA), and a framebuffer is bound that has more than
+ * the value of MAX_DUAL_SOURCE_DRAW_BUFFERS-1 active color attachements."
+ */
+static GLboolean
+_mesa_check_blend_func_error(struct gl_context *ctx)
+{
+ GLuint i;
+ for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
+ if (blend_factor_is_dual_src(ctx->Color.Blend[i].SrcRGB) ||
+ blend_factor_is_dual_src(ctx->Color.Blend[i].DstRGB) ||
+ blend_factor_is_dual_src(ctx->Color.Blend[i].SrcA) ||
+ blend_factor_is_dual_src(ctx->Color.Blend[i].DstA)) {
+ if (i >= ctx->Const.MaxDualSourceDrawBuffers) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "dual source blend on illegal attachment");
+ return GL_FALSE;
+ }
+ }
+ }
+ return GL_TRUE;
+}
/**
* Prior to drawing anything with glBegin, glDrawArrays, etc. this function
@@ -1816,6 +1848,10 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
return GL_FALSE;
}
+ if (_mesa_check_blend_func_error(ctx) == GL_FALSE) {
+ return GL_FALSE;
+ }
+
#ifdef DEBUG
if (ctx->Shader.Flags & GLSL_LOG) {
struct gl_shader_program *shProg[MESA_SHADER_TYPES];
diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c
index 3ce4cd559..5f2c74a75 100644
--- a/mesalib/src/mesa/main/extensions.c
+++ b/mesalib/src/mesa/main/extensions.c
@@ -940,7 +940,7 @@ _mesa_get_enabled_extension(struct gl_context *ctx, GLuint index)
n = 0;
for (i = extension_table; i->name != 0; ++i) {
if (n == index && base[i->offset]) {
- return (GLubyte*) i->name;
+ return (const GLubyte*) i->name;
} else if (base[i->offset]) {
++n;
}
diff --git a/mesalib/src/mesa/main/ff_fragment_shader.cpp b/mesalib/src/mesa/main/ff_fragment_shader.cpp
index 7b830439d..3c91b1a42 100644
--- a/mesalib/src/mesa/main/ff_fragment_shader.cpp
+++ b/mesalib/src/mesa/main/ff_fragment_shader.cpp
@@ -45,12 +45,15 @@ extern "C" {
#include "main/uniforms.h"
#include "../glsl/glsl_types.h"
#include "../glsl/ir.h"
+#include "../glsl/ir_builder.h"
#include "../glsl/glsl_symbol_table.h"
#include "../glsl/glsl_parser_extras.h"
#include "../glsl/ir_optimization.h"
#include "../glsl/ir_print_visitor.h"
#include "../program/ir_to_mesa.h"
+using namespace ir_builder;
+
/*
* Note on texture units:
*
@@ -508,12 +511,11 @@ static GLuint make_state_key( struct gl_context *ctx, struct state_key *key )
/** State used to build the fragment program:
*/
-struct texenv_fragment_program {
+class texenv_fragment_program : public ir_factory {
+public:
struct gl_shader_program *shader_program;
struct gl_shader *shader;
- exec_list *instructions;
exec_list *top_instructions;
- void *mem_ctx;
struct state_key *state;
ir_variable *src_texture[MAX_TEXTURE_COORD_UNITS];
@@ -621,21 +623,15 @@ emit_combine_source(struct texenv_fragment_program *p,
switch (operand) {
case OPR_ONE_MINUS_SRC_COLOR:
- return new(p->mem_ctx) ir_expression(ir_binop_sub,
- new(p->mem_ctx) ir_constant(1.0f),
- src);
+ return sub(new(p->mem_ctx) ir_constant(1.0f), src);
case OPR_SRC_ALPHA:
- return src->type->is_scalar()
- ? src : (ir_rvalue *) new(p->mem_ctx) ir_swizzle(src, 3, 3, 3, 3, 1);
+ return src->type->is_scalar() ? src : swizzle_w(src);
case OPR_ONE_MINUS_SRC_ALPHA: {
- ir_rvalue *const scalar = (src->type->is_scalar())
- ? src : (ir_rvalue *) new(p->mem_ctx) ir_swizzle(src, 3, 3, 3, 3, 1);
+ ir_rvalue *const scalar = src->type->is_scalar() ? src : swizzle_w(src);
- return new(p->mem_ctx) ir_expression(ir_binop_sub,
- new(p->mem_ctx) ir_constant(1.0f),
- scalar);
+ return sub(new(p->mem_ctx) ir_constant(1.0f), scalar);
}
case OPR_ZERO:
@@ -696,7 +692,7 @@ smear(struct texenv_fragment_program *p, ir_rvalue *val)
if (!val->type->is_scalar())
return val;
- return new(p->mem_ctx) ir_swizzle(val, 0, 0, 0, 0, 4);
+ return swizzle_xxxx(val);
}
static ir_rvalue *
@@ -720,73 +716,52 @@ emit_combine(struct texenv_fragment_program *p,
return src[0];
case MODE_MODULATE:
- return new(p->mem_ctx) ir_expression(ir_binop_mul, src[0], src[1]);
+ return mul(src[0], src[1]);
case MODE_ADD:
- return new(p->mem_ctx) ir_expression(ir_binop_add, src[0], src[1]);
+ return add(src[0], src[1]);
case MODE_ADD_SIGNED:
- tmp0 = new(p->mem_ctx) ir_expression(ir_binop_add, src[0], src[1]);
- return new(p->mem_ctx) ir_expression(ir_binop_add, tmp0,
- new(p->mem_ctx) ir_constant(-0.5f));
+ return add(add(src[0], src[1]), new(p->mem_ctx) ir_constant(-0.5f));
case MODE_INTERPOLATE:
/* Arg0 * (Arg2) + Arg1 * (1-Arg2) */
- tmp0 = new(p->mem_ctx) ir_expression(ir_binop_mul, src[0], src[2]);
-
- tmp1 = new(p->mem_ctx) ir_expression(ir_binop_sub,
- new(p->mem_ctx) ir_constant(1.0f),
- src[2]->clone(p->mem_ctx, NULL));
- tmp1 = new(p->mem_ctx) ir_expression(ir_binop_mul, src[1], tmp1);
-
- return new(p->mem_ctx) ir_expression(ir_binop_add, tmp0, tmp1);
+ tmp0 = mul(src[0], src[2]);
+ tmp1 = mul(src[1], sub(new(p->mem_ctx) ir_constant(1.0f),
+ src[2]->clone(p->mem_ctx, NULL)));
+ return add(tmp0, tmp1);
case MODE_SUBTRACT:
- return new(p->mem_ctx) ir_expression(ir_binop_sub, src[0], src[1]);
+ return sub(src[0], src[1]);
case MODE_DOT3_RGBA:
case MODE_DOT3_RGBA_EXT:
case MODE_DOT3_RGB_EXT:
case MODE_DOT3_RGB: {
- tmp0 = new(p->mem_ctx) ir_expression(ir_binop_mul, src[0],
- new(p->mem_ctx) ir_constant(2.0f));
- tmp0 = new(p->mem_ctx) ir_expression(ir_binop_add, tmp0,
- new(p->mem_ctx) ir_constant(-1.0f));
- tmp0 = new(p->mem_ctx) ir_swizzle(smear(p, tmp0), 0, 1, 2, 3, 3);
-
- tmp1 = new(p->mem_ctx) ir_expression(ir_binop_mul, src[1],
- new(p->mem_ctx) ir_constant(2.0f));
- tmp1 = new(p->mem_ctx) ir_expression(ir_binop_add, tmp1,
- new(p->mem_ctx) ir_constant(-1.0f));
- tmp1 = new(p->mem_ctx) ir_swizzle(smear(p, tmp1), 0, 1, 2, 3, 3);
-
- return new(p->mem_ctx) ir_expression(ir_binop_dot, tmp0, tmp1);
+ tmp0 = mul(src[0], new(p->mem_ctx) ir_constant(2.0f));
+ tmp0 = add(tmp0, new(p->mem_ctx) ir_constant(-1.0f));
+
+ tmp1 = mul(src[1], new(p->mem_ctx) ir_constant(2.0f));
+ tmp1 = add(tmp1, new(p->mem_ctx) ir_constant(-1.0f));
+
+ return dot(swizzle_xyz(smear(p, tmp0)), swizzle_xyz(smear(p, tmp1)));
}
case MODE_MODULATE_ADD_ATI:
- tmp0 = new(p->mem_ctx) ir_expression(ir_binop_mul, src[0], src[2]);
- return new(p->mem_ctx) ir_expression(ir_binop_add, tmp0, src[1]);
+ return add(mul(src[0], src[2]), src[1]);
case MODE_MODULATE_SIGNED_ADD_ATI:
- tmp0 = new(p->mem_ctx) ir_expression(ir_binop_mul, src[0], src[2]);
- tmp0 = new(p->mem_ctx) ir_expression(ir_binop_add, tmp0, src[1]);
- return new(p->mem_ctx) ir_expression(ir_binop_add, tmp0,
- new(p->mem_ctx) ir_constant(-0.5f));
+ return add(add(mul(src[0], src[2]), src[1]),
+ new(p->mem_ctx) ir_constant(-0.5f));
case MODE_MODULATE_SUBTRACT_ATI:
- tmp0 = new(p->mem_ctx) ir_expression(ir_binop_mul, src[0], src[2]);
- return new(p->mem_ctx) ir_expression(ir_binop_sub, tmp0, src[1]);
+ return sub(mul(src[0], src[2]), src[1]);
case MODE_ADD_PRODUCTS:
- tmp0 = new(p->mem_ctx) ir_expression(ir_binop_mul, src[0], src[1]);
- tmp1 = new(p->mem_ctx) ir_expression(ir_binop_mul, src[2], src[3]);
- return new(p->mem_ctx) ir_expression(ir_binop_add, tmp0, tmp1);
+ return add(mul(src[0], src[1]), mul(src[2], src[3]));
case MODE_ADD_PRODUCTS_SIGNED:
- tmp0 = new(p->mem_ctx) ir_expression(ir_binop_mul, src[0], src[1]);
- tmp1 = new(p->mem_ctx) ir_expression(ir_binop_mul, src[2], src[3]);
- tmp0 = new(p->mem_ctx) ir_expression(ir_binop_add, tmp0, tmp1);
- return new(p->mem_ctx) ir_expression(ir_binop_add, tmp0,
- new(p->mem_ctx) ir_constant(-0.5f));
+ return add(add(mul(src[0], src[1]), mul(src[2], src[3])),
+ new(p->mem_ctx) ir_constant(-0.5f));
case MODE_BUMP_ENVMAP_ATI:
/* special - not handled here */
@@ -798,15 +773,6 @@ emit_combine(struct texenv_fragment_program *p,
}
}
-static ir_rvalue *
-saturate(struct texenv_fragment_program *p, ir_rvalue *val)
-{
- val = new(p->mem_ctx) ir_expression(ir_binop_min, val,
- new(p->mem_ctx) ir_constant(1.0f));
- return new(p->mem_ctx) ir_expression(ir_binop_max, val,
- new(p->mem_ctx) ir_constant(0.0f));
-}
-
/**
* Generate instructions for one texture unit's env/combiner mode.
*/
@@ -857,13 +823,8 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
else
alpha_saturate = GL_FALSE;
- ir_variable *temp_var = new(p->mem_ctx) ir_variable(glsl_type::vec4_type,
- "texenv_combine",
- ir_var_temporary);
- p->instructions->push_tail(temp_var);
-
+ ir_variable *temp_var = p->make_temp(glsl_type::vec4_type, "texenv_combine");
ir_dereference *deref;
- ir_assignment *assign;
ir_rvalue *val;
/* Emit the RGB and A combine ops
@@ -876,11 +837,9 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
key->unit[unit].OptRGB);
val = smear(p, val);
if (rgb_saturate)
- val = saturate(p, val);
+ val = saturate(val);
- deref = new(p->mem_ctx) ir_dereference_variable(temp_var);
- assign = new(p->mem_ctx) ir_assignment(deref, val);
- p->instructions->push_tail(assign);
+ p->emit(assign(temp_var, val));
}
else if (key->unit[unit].ModeRGB == MODE_DOT3_RGBA_EXT ||
key->unit[unit].ModeRGB == MODE_DOT3_RGBA) {
@@ -890,10 +849,8 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
key->unit[unit].OptRGB);
val = smear(p, val);
if (rgb_saturate)
- val = saturate(p, val);
- deref = new(p->mem_ctx) ir_dereference_variable(temp_var);
- assign = new(p->mem_ctx) ir_assignment(deref, val);
- p->instructions->push_tail(assign);
+ val = saturate(val);
+ p->emit(assign(temp_var, val));
}
else {
/* Need to do something to stop from re-emitting identical
@@ -903,25 +860,19 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
key->unit[unit].NumArgsRGB,
key->unit[unit].ModeRGB,
key->unit[unit].OptRGB);
- val = smear(p, val);
- val = new(p->mem_ctx) ir_swizzle(val, 0, 1, 2, 3, 3);
+ val = swizzle_xyz(smear(p, val));
if (rgb_saturate)
- val = saturate(p, val);
- deref = new(p->mem_ctx) ir_dereference_variable(temp_var);
- assign = new(p->mem_ctx) ir_assignment(deref, val, NULL, WRITEMASK_XYZ);
- p->instructions->push_tail(assign);
+ val = saturate(val);
+ p->emit(assign(temp_var, val, WRITEMASK_XYZ));
val = emit_combine(p, unit,
key->unit[unit].NumArgsA,
key->unit[unit].ModeA,
key->unit[unit].OptA);
- val = smear(p, val);
- val = new(p->mem_ctx) ir_swizzle(val, 3, 3, 3, 3, 1);
+ val = swizzle_w(smear(p, val));
if (alpha_saturate)
- val = saturate(p, val);
- deref = new(p->mem_ctx) ir_dereference_variable(temp_var);
- assign = new(p->mem_ctx) ir_assignment(deref, val, NULL, WRITEMASK_W);
- p->instructions->push_tail(assign);
+ val = saturate(val);
+ p->emit(assign(temp_var, val, WRITEMASK_W));
}
deref = new(p->mem_ctx) ir_dereference_variable(temp_var);
@@ -945,8 +896,7 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
(ir_constant_data *)const_data);
}
- return saturate(p, new(p->mem_ctx) ir_expression(ir_binop_mul,
- deref, shift));
+ return saturate(mul(deref, shift));
}
else
return deref;
@@ -959,7 +909,6 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
static void load_texture( struct texenv_fragment_program *p, GLuint unit )
{
ir_dereference *deref;
- ir_assignment *assign;
if (p->src_texture[unit])
return;
@@ -981,15 +930,11 @@ static void load_texture( struct texenv_fragment_program *p, GLuint unit )
}
if (!p->state->unit[unit].enabled) {
- p->src_texture[unit] = new(p->mem_ctx) ir_variable(glsl_type::vec4_type,
- "dummy_tex",
- ir_var_temporary);
- p->instructions->push_tail(p->src_texture[unit]);
-
- deref = new(p->mem_ctx) ir_dereference_variable(p->src_texture[unit]);
- assign = new(p->mem_ctx) ir_assignment(deref,
- new(p->mem_ctx) ir_constant(0.0f));
- p->instructions->push_tail(assign);
+ p->src_texture[unit] = p->make_temp(glsl_type::vec4_type,
+ "dummy_tex");
+ p->emit(p->src_texture[unit]);
+
+ p->emit(assign(p->src_texture[unit], new(p->mem_ctx) ir_constant(0.0f)));
return ;
}
@@ -1051,10 +996,8 @@ static void load_texture( struct texenv_fragment_program *p, GLuint unit )
break;
}
- p->src_texture[unit] = new(p->mem_ctx) ir_variable(glsl_type::vec4_type,
- "tex",
- ir_var_temporary);
- p->instructions->push_tail(p->src_texture[unit]);
+ p->src_texture[unit] = p->make_temp(glsl_type::vec4_type,
+ "tex");
ir_texture *tex = new(p->mem_ctx) ir_texture(ir_tex);
@@ -1078,11 +1021,9 @@ static void load_texture( struct texenv_fragment_program *p, GLuint unit )
}
texcoord = texcoord->clone(p->mem_ctx, NULL);
- tex->projector = new(p->mem_ctx) ir_swizzle(texcoord, 3, 0, 0, 0, 1);
+ tex->projector = swizzle_w(texcoord);
- deref = new(p->mem_ctx) ir_dereference_variable(p->src_texture[unit]);
- assign = new(p->mem_ctx) ir_assignment(deref, tex);
- p->instructions->push_tail(assign);
+ p->emit(assign(p->src_texture[unit], tex));
}
static void
@@ -1142,13 +1083,10 @@ load_texunit_bumpmap( struct texenv_fragment_program *p, GLuint unit )
GLuint bumpedUnitNr = key->unit[unit].OptRGB[1].Source - SRC_TEXTURE0;
ir_rvalue *bump;
ir_rvalue *texcoord;
- ir_variable *rot_mat_0_var, *rot_mat_1_var;
- ir_dereference_variable *rot_mat_0, *rot_mat_1;
+ ir_variable *rot_mat_0, *rot_mat_1;
- rot_mat_0_var = p->shader->symbols->get_variable("gl_BumpRotMatrix0MESA");
- rot_mat_1_var = p->shader->symbols->get_variable("gl_BumpRotMatrix1MESA");
- rot_mat_0 = new(p->mem_ctx) ir_dereference_variable(rot_mat_0_var);
- rot_mat_1 = new(p->mem_ctx) ir_dereference_variable(rot_mat_1_var);
+ rot_mat_0 = p->shader->symbols->get_variable("gl_BumpRotMatrix0MESA");
+ rot_mat_1 = p->shader->symbols->get_variable("gl_BumpRotMatrix1MESA");
ir_variable *tc_array = p->shader->symbols->get_variable("gl_TexCoord");
assert(tc_array);
@@ -1163,44 +1101,22 @@ load_texunit_bumpmap( struct texenv_fragment_program *p, GLuint unit )
* dest = Arg1 + (Arg0.xx * rotMat0) + (Arg0.yy * rotMat1)
* note only 2 coords are affected the rest are left unchanged (mul by 0)
*/
- ir_dereference *deref;
- ir_assignment *assign;
ir_rvalue *bump_x, *bump_y;
texcoord = smear(p, texcoord);
/* bump_texcoord = texcoord */
- ir_variable *bumped = new(p->mem_ctx) ir_variable(texcoord->type,
- "bump_texcoord",
- ir_var_temporary);
- p->instructions->push_tail(bumped);
-
- deref = new(p->mem_ctx) ir_dereference_variable(bumped);
- assign = new(p->mem_ctx) ir_assignment(deref, texcoord);
- p->instructions->push_tail(assign);
+ ir_variable *bumped = p->make_temp(texcoord->type, "bump_texcoord");
+ p->emit(bumped);
+ p->emit(assign(bumped, texcoord));
/* bump_texcoord.xy += arg0.x * rotmat0 + arg0.y * rotmat1 */
bump = get_source(p, key->unit[unit].OptRGB[0].Source, unit);
- bump_x = new(p->mem_ctx) ir_swizzle(bump, 0, 0, 0, 0, 1);
- bump = bump->clone(p->mem_ctx, NULL);
- bump_y = new(p->mem_ctx) ir_swizzle(bump, 1, 0, 0, 0, 1);
-
- bump_x = new(p->mem_ctx) ir_expression(ir_binop_mul, bump_x, rot_mat_0);
- bump_y = new(p->mem_ctx) ir_expression(ir_binop_mul, bump_y, rot_mat_1);
-
- ir_expression *expr;
- expr = new(p->mem_ctx) ir_expression(ir_binop_add, bump_x, bump_y);
+ bump_x = mul(swizzle_x(bump), rot_mat_0);
+ bump_y = mul(swizzle_y(bump->clone(p->mem_ctx, NULL)), rot_mat_1);
- deref = new(p->mem_ctx) ir_dereference_variable(bumped);
- expr = new(p->mem_ctx) ir_expression(ir_binop_add,
- new(p->mem_ctx) ir_swizzle(deref,
- 0, 1, 1, 1,
- 2),
- expr);
-
- deref = new(p->mem_ctx) ir_dereference_variable(bumped);
- assign = new(p->mem_ctx) ir_assignment(deref, expr, NULL, WRITEMASK_XY);
- p->instructions->push_tail(assign);
+ p->emit(assign(bumped, add(swizzle_xy(bumped), add(bump_x, bump_y)),
+ WRITEMASK_XY));
p->texcoord_tex[bumpedUnitNr] = bumped;
}
@@ -1220,31 +1136,22 @@ emit_fog_instructions(struct texenv_fragment_program *p,
ir_rvalue *f, *temp;
ir_variable *params, *oparams;
ir_variable *fogcoord;
- ir_assignment *assign;
/* Temporary storage for the whole fog result. Fog calculations
* only affect rgb so we're hanging on to the .a value of fragcolor
* this way.
*/
- ir_variable *fog_result = new(p->mem_ctx) ir_variable(glsl_type::vec4_type,
- "fog_result",
- ir_var_auto);
- p->instructions->push_tail(fog_result);
- temp = new(p->mem_ctx) ir_dereference_variable(fog_result);
- assign = new(p->mem_ctx) ir_assignment(temp, fragcolor);
- p->instructions->push_tail(assign);
+ ir_variable *fog_result = p->make_temp(glsl_type::vec4_type, "fog_result");
+ p->emit(assign(fog_result, fragcolor));
- temp = new(p->mem_ctx) ir_dereference_variable(fog_result);
- fragcolor = new(p->mem_ctx) ir_swizzle(temp, 0, 1, 2, 3, 3);
+ fragcolor = swizzle_xyz(fog_result);
oparams = p->shader->symbols->get_variable("gl_FogParamsOptimizedMESA");
fogcoord = p->shader->symbols->get_variable("gl_FogFragCoord");
params = p->shader->symbols->get_variable("gl_Fog");
f = new(p->mem_ctx) ir_dereference_variable(fogcoord);
- ir_variable *f_var = new(p->mem_ctx) ir_variable(glsl_type::float_type,
- "fog_factor", ir_var_auto);
- p->instructions->push_tail(f_var);
+ ir_variable *f_var = p->make_temp(glsl_type::float_type, "fog_factor");
switch (key->fog_mode) {
case FOG_LINEAR:
@@ -1253,13 +1160,7 @@ emit_fog_instructions(struct texenv_fragment_program *p,
* gl_MesaFogParamsOptimized gives us (-1 / (end - start)) and
* (end / (end - start)) so we can generate a single MAD.
*/
- temp = new(p->mem_ctx) ir_dereference_variable(oparams);
- temp = new(p->mem_ctx) ir_swizzle(temp, 0, 0, 0, 0, 1);
- f = new(p->mem_ctx) ir_expression(ir_binop_mul, f, temp);
-
- temp = new(p->mem_ctx) ir_dereference_variable(oparams);
- temp = new(p->mem_ctx) ir_swizzle(temp, 1, 0, 0, 0, 1);
- f = new(p->mem_ctx) ir_expression(ir_binop_add, f, temp);
+ f = add(mul(f, swizzle_x(oparams)), swizzle_y(oparams));
break;
case FOG_EXP:
/* f = e^(-(density * fogcoord))
@@ -1268,9 +1169,7 @@ emit_fog_instructions(struct texenv_fragment_program *p,
* use EXP2 which is generally the native instruction without
* having to do any further math on the fog density uniform.
*/
- temp = new(p->mem_ctx) ir_dereference_variable(oparams);
- temp = new(p->mem_ctx) ir_swizzle(temp, 2, 0, 0, 0, 1);
- f = new(p->mem_ctx) ir_expression(ir_binop_mul, f, temp);
+ f = mul(f, swizzle_z(oparams));
f = new(p->mem_ctx) ir_expression(ir_unop_neg, f);
f = new(p->mem_ctx) ir_expression(ir_unop_exp2, f);
break;
@@ -1281,50 +1180,23 @@ emit_fog_instructions(struct texenv_fragment_program *p,
* can do this like FOG_EXP but with a squaring after the
* multiply by density.
*/
- ir_variable *temp_var = new(p->mem_ctx) ir_variable(glsl_type::float_type,
- "fog_temp",
- ir_var_auto);
- p->instructions->push_tail(temp_var);
-
- temp = new(p->mem_ctx) ir_dereference_variable(oparams);
- temp = new(p->mem_ctx) ir_swizzle(temp, 3, 0, 0, 0, 1);
- f = new(p->mem_ctx) ir_expression(ir_binop_mul,
- f, temp);
-
- temp = new(p->mem_ctx) ir_dereference_variable(temp_var);
- ir_assignment *assign = new(p->mem_ctx) ir_assignment(temp, f);
- p->instructions->push_tail(assign);
-
- f = new(p->mem_ctx) ir_dereference_variable(temp_var);
- temp = new(p->mem_ctx) ir_dereference_variable(temp_var);
- f = new(p->mem_ctx) ir_expression(ir_binop_mul, f, temp);
+ ir_variable *temp_var = p->make_temp(glsl_type::float_type, "fog_temp");
+ p->emit(assign(temp_var, mul(f, swizzle_w(oparams))));
+
+ f = mul(temp_var, temp_var);
f = new(p->mem_ctx) ir_expression(ir_unop_neg, f);
f = new(p->mem_ctx) ir_expression(ir_unop_exp2, f);
break;
}
- f = saturate(p, f);
+ p->emit(assign(f_var, saturate(f)));
- temp = new(p->mem_ctx) ir_dereference_variable(f_var);
- assign = new(p->mem_ctx) ir_assignment(temp, f);
- p->instructions->push_tail(assign);
-
- f = new(p->mem_ctx) ir_dereference_variable(f_var);
- f = new(p->mem_ctx) ir_expression(ir_binop_sub,
- new(p->mem_ctx) ir_constant(1.0f),
- f);
+ f = sub(new(p->mem_ctx) ir_constant(1.0f), f_var);
temp = new(p->mem_ctx) ir_dereference_variable(params);
temp = new(p->mem_ctx) ir_dereference_record(temp, "color");
- temp = new(p->mem_ctx) ir_swizzle(temp, 0, 1, 2, 3, 3);
- temp = new(p->mem_ctx) ir_expression(ir_binop_mul, temp, f);
-
- f = new(p->mem_ctx) ir_dereference_variable(f_var);
- f = new(p->mem_ctx) ir_expression(ir_binop_mul, fragcolor, f);
- f = new(p->mem_ctx) ir_expression(ir_binop_add, temp, f);
+ temp = mul(swizzle_xyz(temp), f);
- ir_dereference *deref = new(p->mem_ctx) ir_dereference_variable(fog_result);
- assign = new(p->mem_ctx) ir_assignment(deref, f, NULL, WRITEMASK_XYZ);
- p->instructions->push_tail(assign);
+ p->emit(assign(fog_result, add(temp, mul(fragcolor, f_var)), WRITEMASK_XYZ));
return new(p->mem_ctx) ir_dereference_variable(fog_result);
}
@@ -1363,40 +1235,24 @@ emit_instructions(struct texenv_fragment_program *p)
}
ir_rvalue *cf = get_source(p, SRC_PREVIOUS, 0);
- ir_dereference_variable *deref;
- ir_assignment *assign;
if (key->separate_specular) {
- ir_rvalue *tmp0;
- ir_variable *spec_result = new(p->mem_ctx) ir_variable(glsl_type::vec4_type,
- "specular_add",
- ir_var_temporary);
-
- p->instructions->push_tail(spec_result);
-
- deref = new(p->mem_ctx) ir_dereference_variable(spec_result);
- assign = new(p->mem_ctx) ir_assignment(deref, cf);
- p->instructions->push_tail(assign);
-
- deref = new(p->mem_ctx) ir_dereference_variable(spec_result);
- tmp0 = new(p->mem_ctx) ir_swizzle(deref, 0, 1, 2, 3, 3);
+ ir_variable *spec_result = p->make_temp(glsl_type::vec4_type,
+ "specular_add");
+ p->emit(assign(spec_result, cf));
ir_rvalue *secondary;
if (p->state->inputs_available & FRAG_BIT_COL1) {
ir_variable *var =
p->shader->symbols->get_variable("gl_SecondaryColor");
assert(var);
- secondary = new(p->mem_ctx) ir_dereference_variable(var);
+ secondary = swizzle_xyz(var);
} else {
- secondary = get_current_attrib(p, VERT_ATTRIB_COLOR1);
+ secondary = swizzle_xyz(get_current_attrib(p, VERT_ATTRIB_COLOR1));
}
- secondary = new(p->mem_ctx) ir_swizzle(secondary, 0, 1, 2, 3, 3);
-
- tmp0 = new(p->mem_ctx) ir_expression(ir_binop_add, tmp0, secondary);
- deref = new(p->mem_ctx) ir_dereference_variable(spec_result);
- assign = new(p->mem_ctx) ir_assignment(deref, tmp0, NULL, WRITEMASK_XYZ);
- p->instructions->push_tail(assign);
+ p->emit(assign(spec_result, add(swizzle_xyz(spec_result), secondary),
+ WRITEMASK_XYZ));
cf = new(p->mem_ctx) ir_dereference_variable(spec_result);
}
@@ -1407,9 +1263,7 @@ emit_instructions(struct texenv_fragment_program *p)
ir_variable *frag_color = p->shader->symbols->get_variable("gl_FragColor");
assert(frag_color);
- deref = new(p->mem_ctx) ir_dereference_variable(frag_color);
- assign = new(p->mem_ctx) ir_assignment(deref, cf);
- p->instructions->push_tail(assign);
+ p->emit(assign(frag_color, cf));
}
/**
@@ -1419,11 +1273,10 @@ emit_instructions(struct texenv_fragment_program *p)
static struct gl_shader_program *
create_new_program(struct gl_context *ctx, struct state_key *key)
{
- struct texenv_fragment_program p;
+ texenv_fragment_program p;
unsigned int unit;
_mesa_glsl_parse_state *state;
- memset(&p, 0, sizeof(p));
p.mem_ctx = ralloc_context(NULL);
p.shader = ctx->Driver.NewShader(ctx, 0, GL_FRAGMENT_SHADER);
p.shader->ir = new(p.shader) exec_list;
@@ -1457,7 +1310,7 @@ create_new_program(struct gl_context *ctx, struct state_key *key)
p.src_previous = NULL;
ir_function *main_f = new(p.mem_ctx) ir_function("main");
- p.instructions->push_tail(main_f);
+ p.emit(main_f);
state->symbols->add_function(main_f);
ir_function_signature *main_sig =
diff --git a/mesalib/src/mesa/main/format_pack.c b/mesalib/src/mesa/main/format_pack.c
index ff08ac561..7f0bda127 100644
--- a/mesalib/src/mesa/main/format_pack.c
+++ b/mesalib/src/mesa/main/format_pack.c
@@ -2605,7 +2605,7 @@ _mesa_pack_colormask(gl_format format, const GLubyte colorMask[4], void *dst)
if (bits == 8) {
GLubyte *d = (GLubyte *) dst;
for (i = 0; i < bytes; i++) {
- d[i] = d[i] ? 0xffff : 0x0;
+ d[i] = d[i] ? 0xff : 0x0;
}
}
else if (bits == 16) {
diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c
index 9a5ca5334..55dc20550 100644
--- a/mesalib/src/mesa/main/get.c
+++ b/mesalib/src/mesa/main/get.c
@@ -333,6 +333,7 @@ EXTRA_EXT(ARB_copy_buffer);
EXTRA_EXT(EXT_framebuffer_sRGB);
EXTRA_EXT(ARB_texture_buffer_object);
EXTRA_EXT(OES_EGL_image_external);
+EXTRA_EXT(ARB_blend_func_extended);
static const int
extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program[] = {
@@ -1304,6 +1305,8 @@ static const struct value_desc values[] = {
{ GL_MAX_DEBUG_LOGGED_MESSAGES_ARB, CONST(MAX_DEBUG_LOGGED_MESSAGES), NO_EXTRA },
{ GL_MAX_DEBUG_MESSAGE_LENGTH_ARB, CONST(MAX_DEBUG_MESSAGE_LENGTH), NO_EXTRA },
+ { GL_MAX_DUAL_SOURCE_DRAW_BUFFERS, CONTEXT_INT(Const.MaxDualSourceDrawBuffers), extra_ARB_blend_func_extended },
+
#endif /* FEATURE_GL */
};
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h
index 8e441c232..bfa320a52 100644
--- a/mesalib/src/mesa/main/mtypes.h
+++ b/mesalib/src/mesa/main/mtypes.h
@@ -2263,6 +2263,7 @@ struct gl_shader_program
* and they are \b not the values returned by \c glGetFragDataLocation.
*/
struct string_to_uint_map *FragDataBindings;
+ struct string_to_uint_map *FragDataIndexBindings;
/**
* Transform feedback varyings last specified by
@@ -2814,6 +2815,9 @@ struct gl_constants
/* GL_ARB_robustness */
GLenum ResetStrategy;
+ /* GL_ARB_blend_func_extended */
+ GLuint MaxDualSourceDrawBuffers;
+
/**
* Whether the implementation strips out and ignores texture borders.
*
diff --git a/mesalib/src/mesa/main/shader_query.cpp b/mesalib/src/mesa/main/shader_query.cpp
index 8ab18126c..02a48ba60 100644
--- a/mesalib/src/mesa/main/shader_query.cpp
+++ b/mesalib/src/mesa/main/shader_query.cpp
@@ -239,10 +239,17 @@ void GLAPIENTRY
_mesa_BindFragDataLocation(GLuint program, GLuint colorNumber,
const GLchar *name)
{
+ _mesa_BindFragDataLocationIndexed(program, colorNumber, 0, name);
+}
+
+void GLAPIENTRY
+_mesa_BindFragDataLocationIndexed(GLuint program, GLuint colorNumber,
+ GLuint index, const GLchar *name)
+{
GET_CURRENT_CONTEXT(ctx);
struct gl_shader_program *const shProg =
- _mesa_lookup_shader_program_err(ctx, program, "glBindFragDataLocation");
+ _mesa_lookup_shader_program_err(ctx, program, "glBindFragDataLocationIndexed");
if (!shProg)
return;
@@ -250,13 +257,22 @@ _mesa_BindFragDataLocation(GLuint program, GLuint colorNumber,
return;
if (strncmp(name, "gl_", 3) == 0) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glBindFragDataLocation(illegal name)");
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glBindFragDataLocationIndexed(illegal name)");
+ return;
+ }
+
+ if (index > 1) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glBindFragDataLocationIndexed(index)");
return;
}
- if (colorNumber >= ctx->Const.MaxDrawBuffers) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glBindFragDataLocation(index)");
+ if (index == 0 && colorNumber >= ctx->Const.MaxDrawBuffers) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glBindFragDataLocationIndexed(colorNumber)");
+ return;
+ }
+
+ if (index == 1 && colorNumber >= ctx->Const.MaxDualSourceDrawBuffers) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glBindFragDataLocationIndexed(colorNumber)");
return;
}
@@ -265,11 +281,68 @@ _mesa_BindFragDataLocation(GLuint program, GLuint colorNumber,
* between built-in attributes and user-defined attributes.
*/
shProg->FragDataBindings->put(colorNumber + FRAG_RESULT_DATA0, name);
-
+ shProg->FragDataIndexBindings->put(index, name);
/*
* Note that this binding won't go into effect until
* glLinkProgram is called again.
*/
+
+}
+
+GLint GLAPIENTRY
+_mesa_GetFragDataIndex(GLuint program, const GLchar *name)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_shader_program *const shProg =
+ _mesa_lookup_shader_program_err(ctx, program, "glGetFragDataIndex");
+
+ if (!shProg) {
+ return -1;
+ }
+
+ if (!shProg->LinkStatus) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetFragDataIndex(program not linked)");
+ return -1;
+ }
+
+ if (!name)
+ return -1;
+
+ if (strncmp(name, "gl_", 3) == 0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetFragDataIndex(illegal name)");
+ return -1;
+ }
+
+ /* Not having a fragment shader is not an error.
+ */
+ if (shProg->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL)
+ return -1;
+
+ exec_list *ir = shProg->_LinkedShaders[MESA_SHADER_FRAGMENT]->ir;
+ foreach_list(node, ir) {
+ const ir_variable *const var = ((ir_instruction *) node)->as_variable();
+
+ /* The extra check against FRAG_RESULT_DATA0 is because
+ * glGetFragDataLocation cannot be used on "conventional" attributes.
+ *
+ * From page 95 of the OpenGL 3.0 spec:
+ *
+ * "If name is not an active attribute, if name is a conventional
+ * attribute, or if an error occurs, -1 will be returned."
+ */
+ if (var == NULL
+ || var->mode != ir_var_out
+ || var->location == -1
+ || var->location < FRAG_RESULT_DATA0)
+ continue;
+
+ if (strcmp(var->name, name) == 0)
+ return var->index;
+ }
+
+ return -1;
}
GLint GLAPIENTRY
diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c
index 0e655a0d8..e0f20b638 100644
--- a/mesalib/src/mesa/main/shaderapi.c
+++ b/mesalib/src/mesa/main/shaderapi.c
@@ -1748,6 +1748,9 @@ _mesa_init_shader_dispatch(struct _glapi_table *exec)
SET_ReleaseShaderCompiler(exec, _mesa_ReleaseShaderCompiler);
SET_GetShaderPrecisionFormat(exec, _mesa_GetShaderPrecisionFormat);
+ /* GL_ARB_blend_func_extended */
+ SET_BindFragDataLocationIndexed(exec, _mesa_BindFragDataLocationIndexed);
+ SET_GetFragDataIndex(exec, _mesa_GetFragDataIndex);
#endif /* FEATURE_GL */
}
diff --git a/mesalib/src/mesa/main/shaderapi.h b/mesalib/src/mesa/main/shaderapi.h
index 0ffebdb07..4886959d5 100644
--- a/mesalib/src/mesa/main/shaderapi.h
+++ b/mesalib/src/mesa/main/shaderapi.h
@@ -86,6 +86,9 @@ _mesa_GetAttachedObjectsARB(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
extern GLint GLAPIENTRY
_mesa_GetFragDataLocation(GLuint program, const GLchar *name);
+extern GLint GLAPIENTRY
+_mesa_GetFragDataIndex(GLuint program, const GLchar *name);
+
extern GLhandleARB GLAPIENTRY
_mesa_GetHandleARB(GLenum pname);
@@ -128,6 +131,10 @@ _mesa_BindFragDataLocation(GLuint program, GLuint colorNumber,
const GLchar *name);
extern void GLAPIENTRY
+_mesa_BindFragDataLocationIndexed(GLuint program, GLuint colorNumber,
+ GLuint index, const GLchar *name);
+
+extern void GLAPIENTRY
_mesa_GetActiveAttribARB(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *,
GLenum *, GLcharARB *);
diff --git a/mesalib/src/mesa/main/shaderobj.c b/mesalib/src/mesa/main/shaderobj.c
index 36f208d6c..7eb6f0bda 100644
--- a/mesalib/src/mesa/main/shaderobj.c
+++ b/mesalib/src/mesa/main/shaderobj.c
@@ -242,6 +242,7 @@ _mesa_init_shader_program(struct gl_context *ctx, struct gl_shader_program *prog
prog->AttributeBindings = string_to_uint_map_ctor();
prog->FragDataBindings = string_to_uint_map_ctor();
+ prog->FragDataIndexBindings = string_to_uint_map_ctor();
#if FEATURE_ARB_geometry_shader4
prog->Geom.VerticesOut = 0;
@@ -319,6 +320,11 @@ _mesa_free_shader_program_data(struct gl_context *ctx,
shProg->FragDataBindings = NULL;
}
+ if (shProg->FragDataIndexBindings) {
+ string_to_uint_map_dtor(shProg->FragDataIndexBindings);
+ shProg->FragDataIndexBindings = NULL;
+ }
+
/* detach shaders */
for (i = 0; i < shProg->NumShaders; i++) {
_mesa_reference_shader(ctx, &shProg->Shaders[i], NULL);
diff --git a/mesalib/src/mesa/state_tracker/st_atom_blend.c b/mesalib/src/mesa/state_tracker/st_atom_blend.c
index 1ffc2f1b7..dea50af67 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_blend.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_blend.c
@@ -78,10 +78,10 @@ translate_blend(GLenum blend)
return PIPE_BLENDFACTOR_CONST_COLOR;
case GL_CONSTANT_ALPHA:
return PIPE_BLENDFACTOR_CONST_ALPHA;
- /*
+ case GL_SRC1_COLOR:
return PIPE_BLENDFACTOR_SRC1_COLOR;
+ case GL_SRC1_ALPHA:
return PIPE_BLENDFACTOR_SRC1_ALPHA;
- */
case GL_ZERO:
return PIPE_BLENDFACTOR_ZERO;
case GL_ONE_MINUS_SRC_COLOR:
@@ -96,10 +96,10 @@ translate_blend(GLenum blend)
return PIPE_BLENDFACTOR_INV_CONST_COLOR;
case GL_ONE_MINUS_CONSTANT_ALPHA:
return PIPE_BLENDFACTOR_INV_CONST_ALPHA;
- /*
+ case GL_ONE_MINUS_SRC1_COLOR:
return PIPE_BLENDFACTOR_INV_SRC1_COLOR;
+ case GL_ONE_MINUS_SRC1_ALPHA:
return PIPE_BLENDFACTOR_INV_SRC1_ALPHA;
- */
default:
assert("invalid GL token in translate_blend()" == NULL);
return 0;
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c
index afea0ea4f..34e0329be 100644
--- a/mesalib/src/mesa/state_tracker/st_extensions.c
+++ b/mesalib/src/mesa/state_tracker/st_extensions.c
@@ -120,6 +120,10 @@ void st_init_limits(struct st_context *st)
= _clamp(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS),
1, MAX_DRAW_BUFFERS);
+ c->MaxDualSourceDrawBuffers
+ = _clamp(screen->get_param(screen, PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS),
+ 0, MAX_DRAW_BUFFERS);
+
c->MaxLineWidth
= _maxf(1.0f, screen->get_paramf(screen,
PIPE_CAPF_MAX_LINE_WIDTH));
@@ -629,4 +633,7 @@ void st_init_extensions(struct st_context *st)
break;
}
}
+
+ if (ctx->Const.MaxDualSourceDrawBuffers > 0)
+ ctx->Extensions.ARB_blend_func_extended = GL_TRUE;
}
diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index ae8533e18..9e68deb34 100644
--- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -1925,7 +1925,7 @@ glsl_to_tgsi_visitor::visit(ir_dereference_variable *ir)
assert(var->location != -1);
entry = new(mem_ctx) variable_storage(var,
PROGRAM_OUTPUT,
- var->location);
+ var->location + var->index);
break;
case ir_var_system_value:
entry = new(mem_ctx) variable_storage(var,
diff --git a/pixman/configure.ac b/pixman/configure.ac
index 1cf9eb4e5..56ef10ebf 100644
--- a/pixman/configure.ac
+++ b/pixman/configure.ac
@@ -565,7 +565,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#ifndef __arm__
#error "IWMMXT is only available on ARM"
#endif
-#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6))
+#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5))
#error "Need GCC >= 4.6 for IWMMXT intrinsics"
#endif
#include <mmintrin.h>
diff --git a/pixman/pixman/pixman-mmx.c b/pixman/pixman/pixman-mmx.c
index 3b4625ccf..9fd1a76f9 100644
--- a/pixman/pixman/pixman-mmx.c
+++ b/pixman/pixman/pixman-mmx.c
@@ -73,6 +73,7 @@ _mm_mulhi_pu16 (__m64 __A, __m64 __B)
return __A;
}
+# ifdef __OPTIMIZE__
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_shuffle_pi16 (__m64 __A, int8_t const __N)
{
@@ -85,6 +86,10 @@ _mm_shuffle_pi16 (__m64 __A, int8_t const __N)
return ret;
}
+# else
+# define _mm_shuffle_pi16(A, N) \
+ ((__m64) __builtin_ia32_pshufw ((__v4hi)(__m64)(A), (int)(N)))
+# endif
# endif
#endif
diff --git a/xorg-server/Xext/bigreq.c b/xorg-server/Xext/bigreq.c
index a939e1699..49355c4a4 100644
--- a/xorg-server/Xext/bigreq.c
+++ b/xorg-server/Xext/bigreq.c
@@ -43,16 +43,16 @@ from The Open Group.
void BigReqExtensionInit(INITARGS);
static int
-ProcBigReqDispatch (ClientPtr client)
+ProcBigReqDispatch(ClientPtr client)
{
REQUEST(xBigReqEnableReq);
xBigReqEnableReply rep;
if (client->swapped) {
- swaps(&stuff->length);
+ swaps(&stuff->length);
}
if (stuff->brReqType != X_BigReqEnable)
- return BadRequest;
+ return BadRequest;
REQUEST_SIZE_MATCH(xBigReqEnableReq);
client->big_requests = TRUE;
memset(&rep, 0, sizeof(xBigReqEnableReply));
@@ -61,10 +61,10 @@ ProcBigReqDispatch (ClientPtr client)
rep.sequenceNumber = client->sequence;
rep.max_request_size = maxBigRequestSize;
if (client->swapped) {
- swaps(&rep.sequenceNumber);
- swapl(&rep.max_request_size);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.max_request_size);
}
- WriteToClient(client, sizeof(xBigReqEnableReply), (char *)&rep);
+ WriteToClient(client, sizeof(xBigReqEnableReply), (char *) &rep);
return Success;
}
@@ -72,6 +72,6 @@ void
BigReqExtensionInit(INITARGS)
{
AddExtension(XBigReqExtensionName, 0, 0,
- ProcBigReqDispatch, ProcBigReqDispatch,
- NULL, StandardMinorOpcode);
+ ProcBigReqDispatch, ProcBigReqDispatch,
+ NULL, StandardMinorOpcode);
}
diff --git a/xorg-server/Xext/dpmsproc.h b/xorg-server/Xext/dpmsproc.h
index c1df56fdf..7494dfd6f 100644
--- a/xorg-server/Xext/dpmsproc.h
+++ b/xorg-server/Xext/dpmsproc.h
@@ -9,7 +9,7 @@
#include "dixstruct.h"
-int DPMSSet(ClientPtr client, int level);
+int DPMSSet(ClientPtr client, int level);
Bool DPMSSupported(void);
#endif
diff --git a/xorg-server/Xext/geint.h b/xorg-server/Xext/geint.h
index 5c64a20f4..f76d14809 100644
--- a/xorg-server/Xext/geint.h
+++ b/xorg-server/Xext/geint.h
@@ -1,53 +1,54 @@
-/*
- * Copyright 2007-2008 Peter Hutterer
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Author: Peter Hutterer, University of South Australia, NICTA
- */
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _GEINT_H_
-#define _GEINT_H_
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "os.h"
-#include "dixstruct.h"
-#include "extnsionst.h"
-#include <X11/extensions/geproto.h>
-
-extern _X_EXPORT DevPrivateKeyRec GEClientPrivateKeyRec;
-#define GEClientPrivateKey (&GEClientPrivateKeyRec)
-
-typedef struct _GEClientInfo {
- CARD32 major_version;
- CARD32 minor_version;
-} GEClientInfoRec, *GEClientInfoPtr;
-
-#define GEGetClient(pClient) ((GEClientInfoPtr)(dixLookupPrivate(&((pClient)->devPrivates), GEClientPrivateKey)))
-
-extern _X_EXPORT int (*ProcGEVector[/*GENumRequests*/])(ClientPtr);
-extern _X_EXPORT int (*SProcGEVector[/*GENumRequests*/])(ClientPtr);
-
-#endif /* _GEINT_H_ */
+/*
+ * Copyright 2007-2008 Peter Hutterer
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Author: Peter Hutterer, University of South Australia, NICTA
+ */
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _GEINT_H_
+#define _GEINT_H_
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "misc.h"
+#include "os.h"
+#include "dixstruct.h"
+#include "extnsionst.h"
+#include <X11/extensions/geproto.h>
+
+extern _X_EXPORT DevPrivateKeyRec GEClientPrivateKeyRec;
+
+#define GEClientPrivateKey (&GEClientPrivateKeyRec)
+
+typedef struct _GEClientInfo {
+ CARD32 major_version;
+ CARD32 minor_version;
+} GEClientInfoRec, *GEClientInfoPtr;
+
+#define GEGetClient(pClient) ((GEClientInfoPtr)(dixLookupPrivate(&((pClient)->devPrivates), GEClientPrivateKey)))
+
+extern _X_EXPORT int (*ProcGEVector[ /*GENumRequests */ ]) (ClientPtr);
+extern _X_EXPORT int (*SProcGEVector[ /*GENumRequests */ ]) (ClientPtr);
+
+#endif /* _GEINT_H_ */
diff --git a/xorg-server/Xext/panoramiX.h b/xorg-server/Xext/panoramiX.h
index 71651e558..6578dfa17 100644
--- a/xorg-server/Xext/panoramiX.h
+++ b/xorg-server/Xext/panoramiX.h
@@ -26,7 +26,6 @@ Equipment Corporation.
******************************************************************/
-
/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
/*
@@ -47,25 +46,25 @@ Equipment Corporation.
#include "dixstruct.h"
typedef struct _PanoramiXInfo {
- XID id ;
+ XID id;
} PanoramiXInfo;
typedef struct {
PanoramiXInfo info[MAXSCREENS];
RESTYPE type;
union {
- struct {
- char visibility;
- char class;
- char root;
- } win;
- struct {
- Bool shared;
- } pix;
- struct {
- Bool root;
- } pict;
- char raw_data[4];
+ struct {
+ char visibility;
+ char class;
+ char root;
+ } win;
+ struct {
+ Bool shared;
+ } pix;
+ struct {
+ Bool root;
+ } pict;
+ char raw_data[4];
} u;
} PanoramiXRes;
@@ -77,4 +76,4 @@ typedef struct {
#define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared)
#define IS_ROOT_DRAWABLE(d) (((d)->type == XRT_WINDOW) && (d)->u.win.root)
-#endif /* _PANORAMIX_H_ */
+#endif /* _PANORAMIX_H_ */
diff --git a/xorg-server/Xext/panoramiXh.h b/xorg-server/Xext/panoramiXh.h
index 31b8f90b6..2762a59ac 100644
--- a/xorg-server/Xext/panoramiXh.h
+++ b/xorg-server/Xext/panoramiXh.h
@@ -16,7 +16,7 @@ extern int PanoramiXUnmapSubwindows(ClientPtr client);
extern int PanoramiXConfigureWindow(ClientPtr client);
extern int PanoramiXCirculateWindow(ClientPtr client);
extern int PanoramiXGetGeometry(ClientPtr client);
-extern int PanoramiXTranslateCoords(ClientPtr client);
+extern int PanoramiXTranslateCoords(ClientPtr client);
extern int PanoramiXCreatePixmap(ClientPtr client);
extern int PanoramiXFreePixmap(ClientPtr client);
extern int PanoramiXChangeGC(ClientPtr client);
@@ -40,7 +40,7 @@ extern int PanoramiXPolyFillRectangle(ClientPtr client);
extern int PanoramiXPutImage(ClientPtr client);
extern int PanoramiXGetImage(ClientPtr client);
extern int PanoramiXPolyText8(ClientPtr client);
-extern int PanoramiXPolyText16(ClientPtr client);
+extern int PanoramiXPolyText16(ClientPtr client);
extern int PanoramiXImageText8(ClientPtr client);
extern int PanoramiXImageText16(ClientPtr client);
extern int PanoramiXCreateColormap(ClientPtr client);
@@ -57,11 +57,11 @@ extern int PanoramiXAllocColorPlanes(ClientPtr client);
#define PROC_EXTERN(pfunc) extern int pfunc(ClientPtr)
-PROC_EXTERN(ProcPanoramiXQueryVersion);
-PROC_EXTERN(ProcPanoramiXGetState);
-PROC_EXTERN(ProcPanoramiXGetScreenCount);
-PROC_EXTERN(ProcPanoramiXGetScreenSize);
-
+PROC_EXTERN(ProcPanoramiXQueryVersion);
+PROC_EXTERN(ProcPanoramiXGetState);
+PROC_EXTERN(ProcPanoramiXGetScreenCount);
+PROC_EXTERN(ProcPanoramiXGetScreenSize);
+
PROC_EXTERN(ProcXineramaQueryScreens);
PROC_EXTERN(ProcXineramaIsActive);
@@ -70,4 +70,4 @@ extern int SProcPanoramiXDispatch(ClientPtr client);
extern int connBlockScreenStart;
extern xConnSetupPrefix connSetupPrefix;
-extern int (* SavedProcVector[256]) (ClientPtr client);
+extern int (*SavedProcVector[256]) (ClientPtr client);
diff --git a/xorg-server/Xext/securitysrv.h b/xorg-server/Xext/securitysrv.h
index 3d3894a18..8904242d6 100644
--- a/xorg-server/Xext/securitysrv.h
+++ b/xorg-server/Xext/securitysrv.h
@@ -32,52 +32,51 @@ from The Open Group.
/* Allow client side portions of <X11/extensions/security.h> to compile */
#ifndef Status
-# define Status int
-# define NEED_UNDEF_Status
+#define Status int
+#define NEED_UNDEF_Status
#endif
#ifndef Display
-# define Display void
-# define NEED_UNDEF_Display
+#define Display void
+#define NEED_UNDEF_Display
#endif
#include <X11/extensions/secur.h>
#ifdef NEED_UNDEF_Status
-# undef Status
-# undef NEED_UNDEF_Status
+#undef Status
+#undef NEED_UNDEF_Status
#endif
#ifdef NEED_UNDEF_Display
-# undef Display
-# undef NEED_UNDEF_Display
+#undef Display
+#undef NEED_UNDEF_Display
#endif
-
-#include "input.h" /* for DeviceIntPtr */
-#include "property.h" /* for PropertyPtr */
-#include "pixmap.h" /* for DrawablePtr */
-#include "resource.h" /* for RESTYPE */
+#include "input.h" /* for DeviceIntPtr */
+#include "property.h" /* for PropertyPtr */
+#include "pixmap.h" /* for DrawablePtr */
+#include "resource.h" /* for RESTYPE */
/* resource type to pass in LookupIDByType for authorizations */
extern RESTYPE SecurityAuthorizationResType;
/* this is what we store for an authorization */
typedef struct {
- XID id; /* resource ID */
- CARD32 timeout; /* how long to live in seconds after refcnt == 0 */
- unsigned int trustLevel; /* trusted/untrusted */
- XID group; /* see embedding extension */
- unsigned int refcnt; /* how many clients connected with this auth */
- unsigned int secondsRemaining; /* overflow time amount for >49 days */
- OsTimerPtr timer; /* timer for this auth */
+ XID id; /* resource ID */
+ CARD32 timeout; /* how long to live in seconds after refcnt == 0 */
+ unsigned int trustLevel; /* trusted/untrusted */
+ XID group; /* see embedding extension */
+ unsigned int refcnt; /* how many clients connected with this auth */
+ unsigned int secondsRemaining; /* overflow time amount for >49 days */
+ OsTimerPtr timer; /* timer for this auth */
struct _OtherClients *eventClients; /* clients wanting events */
} SecurityAuthorizationRec, *SecurityAuthorizationPtr;
typedef struct {
- XID group; /* the group that was sent in GenerateAuthorization */
- Bool valid; /* did anyone recognize it? if so, set to TRUE */
+ XID group; /* the group that was sent in GenerateAuthorization */
+ Bool valid; /* did anyone recognize it? if so, set to TRUE */
} SecurityValidateGroupInfoRec;
/* Give this value or higher to the -audit option to get security messages */
#define SECURITY_AUDIT_LEVEL 4
-#endif /* _SECURITY_SRV_H */
+#endif /* _SECURITY_SRV_H */
diff --git a/xorg-server/Xext/shmint.h b/xorg-server/Xext/shmint.h
index 8f8a00d4f..fa6941c90 100644
--- a/xorg-server/Xext/shmint.h
+++ b/xorg-server/Xext/shmint.h
@@ -42,28 +42,28 @@
int /* sh */, \
int /* dx */, \
int /* dy */, \
- char * /* data */
+ char * /* data */
#define XSHM_CREATE_PIXMAP_ARGS \
ScreenPtr /* pScreen */, \
int /* width */, \
int /* height */, \
int /* depth */, \
- char * /* addr */
+ char * /* addr */
typedef struct _ShmFuncs {
- PixmapPtr (* CreatePixmap)(XSHM_CREATE_PIXMAP_ARGS);
- void (* PutImage)(XSHM_PUT_IMAGE_ARGS);
+ PixmapPtr (*CreatePixmap) (XSHM_CREATE_PIXMAP_ARGS);
+ void (*PutImage) (XSHM_PUT_IMAGE_ARGS);
} ShmFuncs, *ShmFuncsPtr;
extern _X_EXPORT void
-ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs);
+ ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs);
extern _X_EXPORT void
-ShmRegisterFbFuncs(ScreenPtr pScreen);
+ ShmRegisterFbFuncs(ScreenPtr pScreen);
extern _X_EXPORT RESTYPE ShmSegType;
extern _X_EXPORT int ShmCompletionCode;
extern _X_EXPORT int BadShmSegCode;
-#endif /* _SHMINT_H_ */
+#endif /* _SHMINT_H_ */
diff --git a/xorg-server/Xext/syncsdk.h b/xorg-server/Xext/syncsdk.h
index eab5451f1..f1b99d010 100644
--- a/xorg-server/Xext/syncsdk.h
+++ b/xorg-server/Xext/syncsdk.h
@@ -1,47 +1,46 @@
-/*
- * Copyright © 2010 NVIDIA Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _SYNCSDK_H_
-#define _SYNCSDK_H_
-
-#include "misync.h"
-
-extern _X_EXPORT int
-SyncVerifyFence(SyncFence **ppFence, XID fid, ClientPtr client, Mask mode);
-
-#define VERIFY_SYNC_FENCE(pFence, fid, client, mode) \
- do { \
- int rc; \
- rc = SyncVerifyFence(&(pFence), (fid), (client), (mode)); \
- if (Success != rc) return rc; \
- } while (0)
-
-#define VERIFY_SYNC_FENCE_OR_NONE(pFence, fid, client, mode) \
- do { \
- pFence = 0; \
- if (None != fid) \
- VERIFY_SYNC_FENCE((pFence), (fid), (client), (mode)); \
- } while (0)
-
-#endif /* _SYNCSDK_H_ */
-
+/*
+ * Copyright © 2010 NVIDIA Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef _SYNCSDK_H_
+#define _SYNCSDK_H_
+
+#include "misync.h"
+
+extern _X_EXPORT int
+ SyncVerifyFence(SyncFence ** ppFence, XID fid, ClientPtr client, Mask mode);
+
+#define VERIFY_SYNC_FENCE(pFence, fid, client, mode) \
+ do { \
+ int rc; \
+ rc = SyncVerifyFence(&(pFence), (fid), (client), (mode)); \
+ if (Success != rc) return rc; \
+ } while (0)
+
+#define VERIFY_SYNC_FENCE_OR_NONE(pFence, fid, client, mode) \
+ do { \
+ pFence = 0; \
+ if (None != fid) \
+ VERIFY_SYNC_FENCE((pFence), (fid), (client), (mode)); \
+ } while (0)
+
+#endif /* _SYNCSDK_H_ */
diff --git a/xorg-server/Xext/xacestr.h b/xorg-server/Xext/xacestr.h
index 84216c8c0..989b0339f 100644
--- a/xorg-server/Xext/xacestr.h
+++ b/xorg-server/Xext/xacestr.h
@@ -144,4 +144,4 @@ typedef struct {
int requestResult;
} XaceAuditRec;
-#endif /* _XACESTR_H */
+#endif /* _XACESTR_H */
diff --git a/xorg-server/Xext/xselinux.h b/xorg-server/Xext/xselinux.h
index 57239821e..5be7088c8 100644
--- a/xorg-server/Xext/xselinux.h
+++ b/xorg-server/Xext/xselinux.h
@@ -53,87 +53,87 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define X_SELinuxGetClientContext 22
typedef struct {
- CARD8 reqType;
- CARD8 SELinuxReqType;
- CARD16 length;
- CARD8 client_major;
- CARD8 client_minor;
+ CARD8 reqType;
+ CARD8 SELinuxReqType;
+ CARD16 length;
+ CARD8 client_major;
+ CARD8 client_minor;
} SELinuxQueryVersionReq;
typedef struct {
- CARD8 type;
- CARD8 pad1;
- CARD16 sequenceNumber;
- CARD32 length;
- CARD16 server_major;
- CARD16 server_minor;
- CARD32 pad2;
- CARD32 pad3;
- CARD32 pad4;
- CARD32 pad5;
- CARD32 pad6;
+ CARD8 type;
+ CARD8 pad1;
+ CARD16 sequenceNumber;
+ CARD32 length;
+ CARD16 server_major;
+ CARD16 server_minor;
+ CARD32 pad2;
+ CARD32 pad3;
+ CARD32 pad4;
+ CARD32 pad5;
+ CARD32 pad6;
} SELinuxQueryVersionReply;
typedef struct {
- CARD8 reqType;
- CARD8 SELinuxReqType;
- CARD16 length;
- CARD32 context_len;
+ CARD8 reqType;
+ CARD8 SELinuxReqType;
+ CARD16 length;
+ CARD32 context_len;
} SELinuxSetCreateContextReq;
typedef struct {
- CARD8 reqType;
- CARD8 SELinuxReqType;
- CARD16 length;
+ CARD8 reqType;
+ CARD8 SELinuxReqType;
+ CARD16 length;
} SELinuxGetCreateContextReq;
typedef struct {
- CARD8 reqType;
- CARD8 SELinuxReqType;
- CARD16 length;
- CARD32 id;
- CARD32 context_len;
+ CARD8 reqType;
+ CARD8 SELinuxReqType;
+ CARD16 length;
+ CARD32 id;
+ CARD32 context_len;
} SELinuxSetContextReq;
typedef struct {
- CARD8 reqType;
- CARD8 SELinuxReqType;
- CARD16 length;
- CARD32 id;
+ CARD8 reqType;
+ CARD8 SELinuxReqType;
+ CARD16 length;
+ CARD32 id;
} SELinuxGetContextReq;
typedef struct {
- CARD8 reqType;
- CARD8 SELinuxReqType;
- CARD16 length;
- CARD32 window;
- CARD32 property;
+ CARD8 reqType;
+ CARD8 SELinuxReqType;
+ CARD16 length;
+ CARD32 window;
+ CARD32 property;
} SELinuxGetPropertyContextReq;
typedef struct {
- CARD8 type;
- CARD8 pad1;
- CARD16 sequenceNumber;
- CARD32 length;
- CARD32 context_len;
- CARD32 pad2;
- CARD32 pad3;
- CARD32 pad4;
- CARD32 pad5;
- CARD32 pad6;
+ CARD8 type;
+ CARD8 pad1;
+ CARD16 sequenceNumber;
+ CARD32 length;
+ CARD32 context_len;
+ CARD32 pad2;
+ CARD32 pad3;
+ CARD32 pad4;
+ CARD32 pad5;
+ CARD32 pad6;
} SELinuxGetContextReply;
typedef struct {
- CARD8 type;
- CARD8 pad1;
- CARD16 sequenceNumber;
- CARD32 length;
- CARD32 count;
- CARD32 pad2;
- CARD32 pad3;
- CARD32 pad4;
- CARD32 pad5;
- CARD32 pad6;
+ CARD8 type;
+ CARD8 pad1;
+ CARD16 sequenceNumber;
+ CARD32 length;
+ CARD32 count;
+ CARD32 pad2;
+ CARD32 pad3;
+ CARD32 pad4;
+ CARD32 pad5;
+ CARD32 pad6;
} SELinuxListItemsReply;
-#endif /* _XSELINUX_H */
+#endif /* _XSELINUX_H */
diff --git a/xorg-server/Xext/xselinux_ext.c b/xorg-server/Xext/xselinux_ext.c
index a18a36706..342abb1a6 100644
--- a/xorg-server/Xext/xselinux_ext.c
+++ b/xorg-server/Xext/xselinux_ext.c
@@ -44,7 +44,6 @@ typedef struct {
CARD32 id;
} SELinuxListItemRec;
-
/*
* Extension Dispatch
*/
@@ -53,8 +52,9 @@ static security_context_t
SELinuxCopyContext(char *ptr, unsigned len)
{
security_context_t copy = malloc(len + 1);
+
if (!copy)
- return NULL;
+ return NULL;
strncpy(copy, ptr, len);
copy[len] = '\0';
return copy;
@@ -71,12 +71,12 @@ ProcSELinuxQueryVersion(ClientPtr client)
rep.server_major = SELINUX_MAJOR_VERSION;
rep.server_minor = SELINUX_MINOR_VERSION;
if (client->swapped) {
- swaps(&rep.sequenceNumber);
- swapl(&rep.length);
- swaps(&rep.server_major);
- swaps(&rep.server_minor);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swaps(&rep.server_major);
+ swaps(&rep.server_minor);
}
- WriteToClient(client, sizeof(rep), (char *)&rep);
+ WriteToClient(client, sizeof(rep), (char *) &rep);
return Success;
}
@@ -88,9 +88,9 @@ SELinuxSendContextReply(ClientPtr client, security_id_t sid)
int len = 0;
if (sid) {
- if (avc_sid_to_context_raw(sid, &ctx) < 0)
- return BadValue;
- len = strlen(ctx) + 1;
+ if (avc_sid_to_context_raw(sid, &ctx) < 0)
+ return BadValue;
+ len = strlen(ctx) + 1;
}
rep.type = X_Reply;
@@ -99,12 +99,12 @@ SELinuxSendContextReply(ClientPtr client, security_id_t sid)
rep.context_len = len;
if (client->swapped) {
- swapl(&rep.length);
- swaps(&rep.sequenceNumber);
- swapl(&rep.context_len);
+ swapl(&rep.length);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.context_len);
}
- WriteToClient(client, sizeof(SELinuxGetContextReply), (char *)&rep);
+ WriteToClient(client, sizeof(SELinuxGetContextReply), (char *) &rep);
WriteToClient(client, len, ctx);
freecon(ctx);
return Success;
@@ -123,20 +123,20 @@ ProcSELinuxSetCreateContext(ClientPtr client, unsigned offset)
REQUEST_FIXED_SIZE(SELinuxSetCreateContextReq, stuff->context_len);
if (stuff->context_len > 0) {
- ctx = SELinuxCopyContext((char *)(stuff + 1), stuff->context_len);
- if (!ctx)
- return BadAlloc;
+ ctx = SELinuxCopyContext((char *) (stuff + 1), stuff->context_len);
+ if (!ctx)
+ return BadAlloc;
}
ptr = dixLookupPrivate(privPtr, subjectKey);
- pSid = (security_id_t *)(ptr + offset);
+ pSid = (security_id_t *) (ptr + offset);
*pSid = NULL;
rc = Success;
if (stuff->context_len > 0) {
- if (security_check_context_raw(ctx) < 0 ||
- avc_context_to_sid_raw(ctx, pSid) < 0)
- rc = BadValue;
+ if (security_check_context_raw(ctx) < 0 ||
+ avc_context_to_sid_raw(ctx, pSid) < 0)
+ rc = BadValue;
}
free(ctx);
@@ -152,11 +152,11 @@ ProcSELinuxGetCreateContext(ClientPtr client, unsigned offset)
REQUEST_SIZE_MATCH(SELinuxGetCreateContextReq);
if (offset == CTX_DEV)
- ptr = dixLookupPrivate(&serverClient->devPrivates, subjectKey);
+ ptr = dixLookupPrivate(&serverClient->devPrivates, subjectKey);
else
- ptr = dixLookupPrivate(&client->devPrivates, subjectKey);
+ ptr = dixLookupPrivate(&client->devPrivates, subjectKey);
- pSid = (security_id_t *)(ptr + offset);
+ pSid = (security_id_t *) (ptr + offset);
return SELinuxSendContextReply(client, *pSid);
}
@@ -174,19 +174,19 @@ ProcSELinuxSetDeviceContext(ClientPtr client)
REQUEST_FIXED_SIZE(SELinuxSetContextReq, stuff->context_len);
if (stuff->context_len < 1)
- return BadLength;
- ctx = SELinuxCopyContext((char *)(stuff + 1), stuff->context_len);
+ return BadLength;
+ ctx = SELinuxCopyContext((char *) (stuff + 1), stuff->context_len);
if (!ctx)
- return BadAlloc;
+ return BadAlloc;
rc = dixLookupDevice(&dev, stuff->id, client, DixManageAccess);
if (rc != Success)
- goto out;
+ goto out;
if (security_check_context_raw(ctx) < 0 ||
- avc_context_to_sid_raw(ctx, &sid) < 0) {
- rc = BadValue;
- goto out;
+ avc_context_to_sid_raw(ctx, &sid) < 0) {
+ rc = BadValue;
+ goto out;
}
subj = dixLookupPrivate(&dev->devPrivates, subjectKey);
@@ -195,7 +195,7 @@ ProcSELinuxSetDeviceContext(ClientPtr client)
obj->sid = sid;
rc = Success;
-out:
+ out:
free(ctx);
return rc;
}
@@ -212,7 +212,7 @@ ProcSELinuxGetDeviceContext(ClientPtr client)
rc = dixLookupDevice(&dev, stuff->id, client, DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
subj = dixLookupPrivate(&dev->devPrivates, subjectKey);
return SELinuxSendContextReply(client, subj->sid);
@@ -231,12 +231,12 @@ ProcSELinuxGetDrawableContext(ClientPtr client)
rc = dixLookupDrawable(&pDraw, stuff->id, client, 0, DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
if (pDraw->type == DRAWABLE_PIXMAP)
- privatePtr = &((PixmapPtr)pDraw)->devPrivates;
+ privatePtr = &((PixmapPtr) pDraw)->devPrivates;
else
- privatePtr = &((WindowPtr)pDraw)->devPrivates;
+ privatePtr = &((WindowPtr) pDraw)->devPrivates;
obj = dixLookupPrivate(privatePtr, objectKey);
return SELinuxSendContextReply(client, obj->sid);
@@ -255,12 +255,12 @@ ProcSELinuxGetPropertyContext(ClientPtr client, pointer privKey)
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetPropAccess);
if (rc != Success)
- return rc;
+ return rc;
rc = dixLookupProperty(&pProp, pWin, stuff->property, client,
- DixGetAttrAccess);
+ DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
obj = dixLookupPrivate(&pProp->devPrivates, privKey);
return SELinuxSendContextReply(client, obj->sid);
@@ -278,7 +278,7 @@ ProcSELinuxGetSelectionContext(ClientPtr client, pointer privKey)
rc = dixLookupSelection(&pSel, stuff->id, client, DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
obj = dixLookupPrivate(&pSel->devPrivates, privKey);
return SELinuxSendContextReply(client, obj->sid);
@@ -296,23 +296,23 @@ ProcSELinuxGetClientContext(ClientPtr client)
rc = dixLookupClient(&target, stuff->id, client, DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
subj = dixLookupPrivate(&target->devPrivates, subjectKey);
return SELinuxSendContextReply(client, subj->sid);
}
static int
-SELinuxPopulateItem(SELinuxListItemRec *i, PrivateRec **privPtr, CARD32 id,
- int *size)
+SELinuxPopulateItem(SELinuxListItemRec * i, PrivateRec ** privPtr, CARD32 id,
+ int *size)
{
SELinuxObjectRec *obj = dixLookupPrivate(privPtr, objectKey);
SELinuxObjectRec *data = dixLookupPrivate(privPtr, dataKey);
if (avc_sid_to_context_raw(obj->sid, &i->octx) < 0)
- return BadValue;
+ return BadValue;
if (avc_sid_to_context_raw(data->sid, &i->dctx) < 0)
- return BadValue;
+ return BadValue;
i->id = id;
i->octx_len = bytes_to_int32(strlen(i->octx) + 1);
@@ -323,19 +323,20 @@ SELinuxPopulateItem(SELinuxListItemRec *i, PrivateRec **privPtr, CARD32 id,
}
static void
-SELinuxFreeItems(SELinuxListItemRec *items, int count)
+SELinuxFreeItems(SELinuxListItemRec * items, int count)
{
int k;
+
for (k = 0; k < count; k++) {
- freecon(items[k].octx);
- freecon(items[k].dctx);
+ freecon(items[k].octx);
+ freecon(items[k].dctx);
}
free(items);
}
static int
-SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec *items,
- int size, int count)
+SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec * items,
+ int size, int count)
{
int rc, k, pos = 0;
SELinuxListItemsReply rep;
@@ -343,31 +344,31 @@ SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec *items,
buf = calloc(size, sizeof(CARD32));
if (size && !buf) {
- rc = BadAlloc;
- goto out;
+ rc = BadAlloc;
+ goto out;
}
/* Fill in the buffer */
for (k = 0; k < count; k++) {
- buf[pos] = items[k].id;
- if (client->swapped)
- swapl(buf + pos);
- pos++;
-
- buf[pos] = items[k].octx_len * 4;
- if (client->swapped)
- swapl(buf + pos);
- pos++;
-
- buf[pos] = items[k].dctx_len * 4;
- if (client->swapped)
- swapl(buf + pos);
- pos++;
-
- memcpy((char *)(buf + pos), items[k].octx, strlen(items[k].octx) + 1);
- pos += items[k].octx_len;
- memcpy((char *)(buf + pos), items[k].dctx, strlen(items[k].dctx) + 1);
- pos += items[k].dctx_len;
+ buf[pos] = items[k].id;
+ if (client->swapped)
+ swapl(buf + pos);
+ pos++;
+
+ buf[pos] = items[k].octx_len * 4;
+ if (client->swapped)
+ swapl(buf + pos);
+ pos++;
+
+ buf[pos] = items[k].dctx_len * 4;
+ if (client->swapped)
+ swapl(buf + pos);
+ pos++;
+
+ memcpy((char *) (buf + pos), items[k].octx, strlen(items[k].octx) + 1);
+ pos += items[k].octx_len;
+ memcpy((char *) (buf + pos), items[k].dctx, strlen(items[k].dctx) + 1);
+ pos += items[k].dctx_len;
}
/* Send reply to client */
@@ -377,18 +378,18 @@ SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec *items,
rep.count = count;
if (client->swapped) {
- swapl(&rep.length);
- swaps(&rep.sequenceNumber);
- swapl(&rep.count);
+ swapl(&rep.length);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.count);
}
- WriteToClient(client, sizeof(SELinuxListItemsReply), (char *)&rep);
- WriteToClient(client, size * 4, (char *)buf);
+ WriteToClient(client, sizeof(SELinuxListItemsReply), (char *) &rep);
+ WriteToClient(client, size * 4, (char *) buf);
/* Free stuff and return */
rc = Success;
free(buf);
-out:
+ out:
SELinuxFreeItems(items, count);
return rc;
}
@@ -407,27 +408,27 @@ ProcSELinuxListProperties(ClientPtr client)
rc = dixLookupWindow(&pWin, stuff->id, client, DixListPropAccess);
if (rc != Success)
- return rc;
+ return rc;
/* Count the number of properties and allocate items */
count = 0;
for (pProp = wUserProps(pWin); pProp; pProp = pProp->next)
- count++;
+ count++;
items = calloc(count, sizeof(SELinuxListItemRec));
if (count && !items)
- return BadAlloc;
+ return BadAlloc;
/* Fill in the items and calculate size */
i = 0;
size = 0;
for (pProp = wUserProps(pWin); pProp; pProp = pProp->next) {
- id = pProp->propertyName;
- rc = SELinuxPopulateItem(items + i, &pProp->devPrivates, id, &size);
- if (rc != Success) {
- SELinuxFreeItems(items, count);
- return rc;
- }
- i++;
+ id = pProp->propertyName;
+ rc = SELinuxPopulateItem(items + i, &pProp->devPrivates, id, &size);
+ if (rc != Success) {
+ SELinuxFreeItems(items, count);
+ return rc;
+ }
+ i++;
}
return SELinuxSendItemsToClient(client, items, size, count);
@@ -446,22 +447,22 @@ ProcSELinuxListSelections(ClientPtr client)
/* Count the number of selections and allocate items */
count = 0;
for (pSel = CurrentSelections; pSel; pSel = pSel->next)
- count++;
+ count++;
items = calloc(count, sizeof(SELinuxListItemRec));
if (count && !items)
- return BadAlloc;
+ return BadAlloc;
/* Fill in the items and calculate size */
i = 0;
size = 0;
for (pSel = CurrentSelections; pSel; pSel = pSel->next) {
- id = pSel->selection;
- rc = SELinuxPopulateItem(items + i, &pSel->devPrivates, id, &size);
- if (rc != Success) {
- SELinuxFreeItems(items, count);
- return rc;
- }
- i++;
+ id = pSel->selection;
+ rc = SELinuxPopulateItem(items + i, &pSel->devPrivates, id, &size);
+ if (rc != Success) {
+ SELinuxFreeItems(items, count);
+ return rc;
+ }
+ i++;
}
return SELinuxSendItemsToClient(client, items, size, count);
@@ -473,53 +474,53 @@ ProcSELinuxDispatch(ClientPtr client)
REQUEST(xReq);
switch (stuff->data) {
case X_SELinuxQueryVersion:
- return ProcSELinuxQueryVersion(client);
+ return ProcSELinuxQueryVersion(client);
case X_SELinuxSetDeviceCreateContext:
- return ProcSELinuxSetCreateContext(client, CTX_DEV);
+ return ProcSELinuxSetCreateContext(client, CTX_DEV);
case X_SELinuxGetDeviceCreateContext:
- return ProcSELinuxGetCreateContext(client, CTX_DEV);
+ return ProcSELinuxGetCreateContext(client, CTX_DEV);
case X_SELinuxSetDeviceContext:
- return ProcSELinuxSetDeviceContext(client);
+ return ProcSELinuxSetDeviceContext(client);
case X_SELinuxGetDeviceContext:
- return ProcSELinuxGetDeviceContext(client);
+ return ProcSELinuxGetDeviceContext(client);
case X_SELinuxSetDrawableCreateContext:
- return ProcSELinuxSetCreateContext(client, CTX_WIN);
+ return ProcSELinuxSetCreateContext(client, CTX_WIN);
case X_SELinuxGetDrawableCreateContext:
- return ProcSELinuxGetCreateContext(client, CTX_WIN);
+ return ProcSELinuxGetCreateContext(client, CTX_WIN);
case X_SELinuxGetDrawableContext:
- return ProcSELinuxGetDrawableContext(client);
+ return ProcSELinuxGetDrawableContext(client);
case X_SELinuxSetPropertyCreateContext:
- return ProcSELinuxSetCreateContext(client, CTX_PRP);
+ return ProcSELinuxSetCreateContext(client, CTX_PRP);
case X_SELinuxGetPropertyCreateContext:
- return ProcSELinuxGetCreateContext(client, CTX_PRP);
+ return ProcSELinuxGetCreateContext(client, CTX_PRP);
case X_SELinuxSetPropertyUseContext:
- return ProcSELinuxSetCreateContext(client, USE_PRP);
+ return ProcSELinuxSetCreateContext(client, USE_PRP);
case X_SELinuxGetPropertyUseContext:
- return ProcSELinuxGetCreateContext(client, USE_PRP);
+ return ProcSELinuxGetCreateContext(client, USE_PRP);
case X_SELinuxGetPropertyContext:
- return ProcSELinuxGetPropertyContext(client, objectKey);
+ return ProcSELinuxGetPropertyContext(client, objectKey);
case X_SELinuxGetPropertyDataContext:
- return ProcSELinuxGetPropertyContext(client, dataKey);
+ return ProcSELinuxGetPropertyContext(client, dataKey);
case X_SELinuxListProperties:
- return ProcSELinuxListProperties(client);
+ return ProcSELinuxListProperties(client);
case X_SELinuxSetSelectionCreateContext:
- return ProcSELinuxSetCreateContext(client, CTX_SEL);
+ return ProcSELinuxSetCreateContext(client, CTX_SEL);
case X_SELinuxGetSelectionCreateContext:
- return ProcSELinuxGetCreateContext(client, CTX_SEL);
+ return ProcSELinuxGetCreateContext(client, CTX_SEL);
case X_SELinuxSetSelectionUseContext:
- return ProcSELinuxSetCreateContext(client, USE_SEL);
+ return ProcSELinuxSetCreateContext(client, USE_SEL);
case X_SELinuxGetSelectionUseContext:
- return ProcSELinuxGetCreateContext(client, USE_SEL);
+ return ProcSELinuxGetCreateContext(client, USE_SEL);
case X_SELinuxGetSelectionContext:
- return ProcSELinuxGetSelectionContext(client, objectKey);
+ return ProcSELinuxGetSelectionContext(client, objectKey);
case X_SELinuxGetSelectionDataContext:
- return ProcSELinuxGetSelectionContext(client, dataKey);
+ return ProcSELinuxGetSelectionContext(client, dataKey);
case X_SELinuxListSelections:
- return ProcSELinuxListSelections(client);
+ return ProcSELinuxListSelections(client);
case X_SELinuxGetClientContext:
- return ProcSELinuxGetClientContext(client);
+ return ProcSELinuxGetClientContext(client);
default:
- return BadRequest;
+ return BadRequest;
}
}
@@ -620,63 +621,62 @@ SProcSELinuxDispatch(ClientPtr client)
switch (stuff->data) {
case X_SELinuxQueryVersion:
- return SProcSELinuxQueryVersion(client);
+ return SProcSELinuxQueryVersion(client);
case X_SELinuxSetDeviceCreateContext:
- return SProcSELinuxSetCreateContext(client, CTX_DEV);
+ return SProcSELinuxSetCreateContext(client, CTX_DEV);
case X_SELinuxGetDeviceCreateContext:
- return ProcSELinuxGetCreateContext(client, CTX_DEV);
+ return ProcSELinuxGetCreateContext(client, CTX_DEV);
case X_SELinuxSetDeviceContext:
- return SProcSELinuxSetDeviceContext(client);
+ return SProcSELinuxSetDeviceContext(client);
case X_SELinuxGetDeviceContext:
- return SProcSELinuxGetDeviceContext(client);
+ return SProcSELinuxGetDeviceContext(client);
case X_SELinuxSetDrawableCreateContext:
- return SProcSELinuxSetCreateContext(client, CTX_WIN);
+ return SProcSELinuxSetCreateContext(client, CTX_WIN);
case X_SELinuxGetDrawableCreateContext:
- return ProcSELinuxGetCreateContext(client, CTX_WIN);
+ return ProcSELinuxGetCreateContext(client, CTX_WIN);
case X_SELinuxGetDrawableContext:
- return SProcSELinuxGetDrawableContext(client);
+ return SProcSELinuxGetDrawableContext(client);
case X_SELinuxSetPropertyCreateContext:
- return SProcSELinuxSetCreateContext(client, CTX_PRP);
+ return SProcSELinuxSetCreateContext(client, CTX_PRP);
case X_SELinuxGetPropertyCreateContext:
- return ProcSELinuxGetCreateContext(client, CTX_PRP);
+ return ProcSELinuxGetCreateContext(client, CTX_PRP);
case X_SELinuxSetPropertyUseContext:
- return SProcSELinuxSetCreateContext(client, USE_PRP);
+ return SProcSELinuxSetCreateContext(client, USE_PRP);
case X_SELinuxGetPropertyUseContext:
- return ProcSELinuxGetCreateContext(client, USE_PRP);
+ return ProcSELinuxGetCreateContext(client, USE_PRP);
case X_SELinuxGetPropertyContext:
- return SProcSELinuxGetPropertyContext(client, objectKey);
+ return SProcSELinuxGetPropertyContext(client, objectKey);
case X_SELinuxGetPropertyDataContext:
- return SProcSELinuxGetPropertyContext(client, dataKey);
+ return SProcSELinuxGetPropertyContext(client, dataKey);
case X_SELinuxListProperties:
- return SProcSELinuxListProperties(client);
+ return SProcSELinuxListProperties(client);
case X_SELinuxSetSelectionCreateContext:
- return SProcSELinuxSetCreateContext(client, CTX_SEL);
+ return SProcSELinuxSetCreateContext(client, CTX_SEL);
case X_SELinuxGetSelectionCreateContext:
- return ProcSELinuxGetCreateContext(client, CTX_SEL);
+ return ProcSELinuxGetCreateContext(client, CTX_SEL);
case X_SELinuxSetSelectionUseContext:
- return SProcSELinuxSetCreateContext(client, USE_SEL);
+ return SProcSELinuxSetCreateContext(client, USE_SEL);
case X_SELinuxGetSelectionUseContext:
- return ProcSELinuxGetCreateContext(client, USE_SEL);
+ return ProcSELinuxGetCreateContext(client, USE_SEL);
case X_SELinuxGetSelectionContext:
- return SProcSELinuxGetSelectionContext(client, objectKey);
+ return SProcSELinuxGetSelectionContext(client, objectKey);
case X_SELinuxGetSelectionDataContext:
- return SProcSELinuxGetSelectionContext(client, dataKey);
+ return SProcSELinuxGetSelectionContext(client, dataKey);
case X_SELinuxListSelections:
- return ProcSELinuxListSelections(client);
+ return ProcSELinuxListSelections(client);
case X_SELinuxGetClientContext:
- return SProcSELinuxGetClientContext(client);
+ return SProcSELinuxGetClientContext(client);
default:
- return BadRequest;
+ return BadRequest;
}
}
-
/*
* Extension Setup / Teardown
*/
static void
-SELinuxResetProc(ExtensionEntry *extEntry)
+SELinuxResetProc(ExtensionEntry * extEntry)
{
SELinuxFlaskReset();
SELinuxLabelReset();
@@ -689,15 +689,15 @@ SELinuxExtensionInit(INITARGS)
/* Check SELinux mode on system, configuration file, and boolean */
if (!is_selinux_enabled()) {
- LogMessage(X_INFO, "SELinux: Disabled on system\n");
- return;
+ LogMessage(X_INFO, "SELinux: Disabled on system\n");
+ return;
}
if (selinuxEnforcingState == SELINUX_MODE_DISABLED) {
- LogMessage(X_INFO, "SELinux: Disabled in configuration file\n");
- return;
+ LogMessage(X_INFO, "SELinux: Disabled in configuration file\n");
+ return;
}
if (!security_get_boolean_active("xserver_object_manager")) {
- LogMessage(X_INFO, "SELinux: Disabled by boolean\n");
+ LogMessage(X_INFO, "SELinux: Disabled by boolean\n");
return;
}
@@ -707,9 +707,9 @@ SELinuxExtensionInit(INITARGS)
/* Add extension to server */
extEntry = AddExtension(SELINUX_EXTENSION_NAME,
- SELinuxNumberEvents, SELinuxNumberErrors,
- ProcSELinuxDispatch, SProcSELinuxDispatch,
- SELinuxResetProc, StandardMinorOpcode);
+ SELinuxNumberEvents, SELinuxNumberErrors,
+ ProcSELinuxDispatch, SProcSELinuxDispatch,
+ SELinuxResetProc, StandardMinorOpcode);
AddExtensionAlias("Flask", extEntry);
}
diff --git a/xorg-server/Xi/allowev.c b/xorg-server/Xi/allowev.c
index ff9e667b0..770fe9fd8 100644
--- a/xorg-server/Xi/allowev.c
+++ b/xorg-server/Xi/allowev.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
@@ -97,31 +97,31 @@ ProcXAllowDeviceEvents(ClientPtr client)
rc = dixLookupDevice(&thisdev, stuff->deviceid, client, DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
time = ClientTimeToServerTime(stuff->time);
switch (stuff->mode) {
case ReplayThisDevice:
- AllowSome(client, time, thisdev, NOT_GRABBED);
- break;
+ AllowSome(client, time, thisdev, NOT_GRABBED);
+ break;
case SyncThisDevice:
- AllowSome(client, time, thisdev, FREEZE_NEXT_EVENT);
- break;
+ AllowSome(client, time, thisdev, FREEZE_NEXT_EVENT);
+ break;
case AsyncThisDevice:
- AllowSome(client, time, thisdev, THAWED);
- break;
+ AllowSome(client, time, thisdev, THAWED);
+ break;
case AsyncOtherDevices:
- AllowSome(client, time, thisdev, THAW_OTHERS);
- break;
+ AllowSome(client, time, thisdev, THAW_OTHERS);
+ break;
case SyncAll:
- AllowSome(client, time, thisdev, FREEZE_BOTH_NEXT_EVENT);
- break;
+ AllowSome(client, time, thisdev, FREEZE_BOTH_NEXT_EVENT);
+ break;
case AsyncAll:
- AllowSome(client, time, thisdev, THAWED_BOTH);
- break;
+ AllowSome(client, time, thisdev, THAWED_BOTH);
+ break;
default:
- client->errorValue = stuff->mode;
- return BadValue;
+ client->errorValue = stuff->mode;
+ return BadValue;
}
return Success;
}
diff --git a/xorg-server/Xi/allowev.h b/xorg-server/Xi/allowev.h
index 199744fea..f081ab52e 100644
--- a/xorg-server/Xi/allowev.h
+++ b/xorg-server/Xi/allowev.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef ALLOWEV_H
#define ALLOWEV_H 1
-int SProcXAllowDeviceEvents(ClientPtr /* client */
+int SProcXAllowDeviceEvents(ClientPtr /* client */
);
-int ProcXAllowDeviceEvents(ClientPtr /* client */
+int ProcXAllowDeviceEvents(ClientPtr /* client */
);
-#endif /* ALLOWEV_H */
+#endif /* ALLOWEV_H */
diff --git a/xorg-server/Xi/chgdctl.h b/xorg-server/Xi/chgdctl.h
index 9cda225cb..f5ca5e766 100644
--- a/xorg-server/Xi/chgdctl.h
+++ b/xorg-server/Xi/chgdctl.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef CHGDCTL_H
#define CHGDCTL_H 1
-int SProcXChangeDeviceControl(ClientPtr /* client */
+int SProcXChangeDeviceControl(ClientPtr /* client */
);
-int ProcXChangeDeviceControl(ClientPtr /* client */
+int ProcXChangeDeviceControl(ClientPtr /* client */
);
void SRepXChangeDeviceControl(ClientPtr /* client */ ,
- int /* size */ ,
- xChangeDeviceControlReply * /* rep */
+ int /* size */ ,
+ xChangeDeviceControlReply * /* rep */
);
-#endif /* CHGDCTL_H */
+#endif /* CHGDCTL_H */
diff --git a/xorg-server/Xi/chgfctl.h b/xorg-server/Xi/chgfctl.h
index cfa9fc6b0..45a55a5f8 100644
--- a/xorg-server/Xi/chgfctl.h
+++ b/xorg-server/Xi/chgfctl.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef CHGFCTL_H
#define CHGFCTL_H 1
-int SProcXChangeFeedbackControl(ClientPtr /* client */
+int SProcXChangeFeedbackControl(ClientPtr /* client */
);
-int ProcXChangeFeedbackControl(ClientPtr /* client */
+int ProcXChangeFeedbackControl(ClientPtr /* client */
);
-#endif /* CHGFCTL_H */
+#endif /* CHGFCTL_H */
diff --git a/xorg-server/Xi/chgkbd.c b/xorg-server/Xi/chgkbd.c
index d8139193f..ea91eb371 100644
--- a/xorg-server/Xi/chgkbd.c
+++ b/xorg-server/Xi/chgkbd.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "XIstubs.h"
diff --git a/xorg-server/Xi/chgkbd.h b/xorg-server/Xi/chgkbd.h
index 5f9922336..ec567fe42 100644
--- a/xorg-server/Xi/chgkbd.h
+++ b/xorg-server/Xi/chgkbd.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef CHGKBD_H
#define CHGKBD_H 1
-int SProcXChangeKeyboardDevice(ClientPtr /* client */
+int SProcXChangeKeyboardDevice(ClientPtr /* client */
);
-int ProcXChangeKeyboardDevice(ClientPtr /* client */
+int ProcXChangeKeyboardDevice(ClientPtr /* client */
);
-#endif /* CHGKBD_H */
+#endif /* CHGKBD_H */
diff --git a/xorg-server/Xi/chgkmap.c b/xorg-server/Xi/chgkmap.c
index 32caa2d02..49660f944 100644
--- a/xorg-server/Xi/chgkmap.c
+++ b/xorg-server/Xi/chgkmap.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exevents.h"
@@ -105,12 +105,12 @@ ProcXChangeDeviceKeyMapping(ClientPtr client)
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
if (ret != Success)
- return ret;
+ return ret;
len = stuff->length - bytes_to_int32(sizeof(xChangeDeviceKeyMappingReq));
ret = ChangeKeyMapping(client, dev, len, DeviceMappingNotify,
- stuff->firstKeyCode, stuff->keyCodes,
- stuff->keySymsPerKeyCode, (KeySym *) & stuff[1]);
+ stuff->firstKeyCode, stuff->keyCodes,
+ stuff->keySymsPerKeyCode, (KeySym *) &stuff[1]);
return ret;
}
diff --git a/xorg-server/Xi/chgkmap.h b/xorg-server/Xi/chgkmap.h
index 6ed6420fb..633af7ca4 100644
--- a/xorg-server/Xi/chgkmap.h
+++ b/xorg-server/Xi/chgkmap.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef CHGKMAP_H
#define CHGKMAP_H 1
-int SProcXChangeDeviceKeyMapping(ClientPtr /* client */
+int SProcXChangeDeviceKeyMapping(ClientPtr /* client */
);
-int ProcXChangeDeviceKeyMapping(ClientPtr /* client */
+int ProcXChangeDeviceKeyMapping(ClientPtr /* client */
);
-#endif /* CHGKMAP_H */
+#endif /* CHGKMAP_H */
diff --git a/xorg-server/Xi/chgprop.h b/xorg-server/Xi/chgprop.h
index 36716180a..89d6b5695 100644
--- a/xorg-server/Xi/chgprop.h
+++ b/xorg-server/Xi/chgprop.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef CHGPROP_H
#define CHGPROP_H 1
-int SProcXChangeDeviceDontPropagateList(ClientPtr /* client */
+int SProcXChangeDeviceDontPropagateList(ClientPtr /* client */
);
-int ProcXChangeDeviceDontPropagateList(ClientPtr /* client */
+int ProcXChangeDeviceDontPropagateList(ClientPtr /* client */
);
-#endif /* CHGPROP_H */
+#endif /* CHGPROP_H */
diff --git a/xorg-server/Xi/chgptr.c b/xorg-server/Xi/chgptr.c
index ee04ab662..f99d1aaea 100644
--- a/xorg-server/Xi/chgptr.c
+++ b/xorg-server/Xi/chgptr.c
@@ -54,12 +54,12 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "XIstubs.h"
-#include "windowstr.h" /* window structure */
-#include "scrnintstr.h" /* screen structure */
+#include "windowstr.h" /* window structure */
+#include "scrnintstr.h" /* screen structure */
#include "dixevents.h"
#include "exevents.h"
diff --git a/xorg-server/Xi/chgptr.h b/xorg-server/Xi/chgptr.h
index 2d8ab66e5..47265b3bc 100644
--- a/xorg-server/Xi/chgptr.h
+++ b/xorg-server/Xi/chgptr.h
@@ -30,19 +30,19 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef CHGPTR_H
#define CHGPTR_H 1
-int SProcXChangePointerDevice(ClientPtr /* client */
+int SProcXChangePointerDevice(ClientPtr /* client */
);
-int ProcXChangePointerDevice(ClientPtr /* client */
+int ProcXChangePointerDevice(ClientPtr /* client */
);
-void DeleteFocusClassDeviceStruct(DeviceIntPtr /* dev */
+void DeleteFocusClassDeviceStruct(DeviceIntPtr /* dev */
);
void SendEventToAllWindows(DeviceIntPtr /* dev */ ,
- Mask /* mask */ ,
- xEvent * /* ev */ ,
- int /* count */
+ Mask /* mask */ ,
+ xEvent * /* ev */ ,
+ int /* count */
);
-#endif /* CHGPTR_H */
+#endif /* CHGPTR_H */
diff --git a/xorg-server/Xi/closedev.c b/xorg-server/Xi/closedev.c
index 54ada55f5..154e6ce08 100644
--- a/xorg-server/Xi/closedev.c
+++ b/xorg-server/Xi/closedev.c
@@ -54,9 +54,9 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
-#include "windowstr.h" /* window structure */
-#include "scrnintstr.h" /* screen structure */
+#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* window structure */
+#include "scrnintstr.h" /* screen structure */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "XIstubs.h"
@@ -94,15 +94,15 @@ DeleteDeviceEvents(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client)
GrabPtr grab, next;
if ((pOthers = wOtherInputMasks(pWin)) != 0)
- for (others = pOthers->inputClients; others; others = others->next)
- if (SameClient(others, client))
- others->mask[dev->id] = NoEventMask;
+ for (others = pOthers->inputClients; others; others = others->next)
+ if (SameClient(others, client))
+ others->mask[dev->id] = NoEventMask;
for (grab = wPassiveGrabs(pWin); grab; grab = next) {
- next = grab->next;
- if ((grab->device == dev) &&
- (client->clientAsMask == CLIENT_BITS(grab->resource)))
- FreeResource(grab->resource, RT_NONE);
+ next = grab->next;
+ if ((grab->device == dev) &&
+ (client->clientAsMask == CLIENT_BITS(grab->resource)))
+ FreeResource(grab->resource, RT_NONE);
}
}
@@ -119,10 +119,10 @@ DeleteEventsFromChildren(DeviceIntPtr dev, WindowPtr p1, ClientPtr client)
WindowPtr p2;
while (p1) {
- p2 = p1->firstChild;
- DeleteDeviceEvents(dev, p1, client);
- DeleteEventsFromChildren(dev, p2, client);
- p1 = p1->nextSib;
+ p2 = p1->firstChild;
+ DeleteDeviceEvents(dev, p1, client);
+ DeleteEventsFromChildren(dev, p2, client);
+ p1 = p1->nextSib;
}
}
@@ -144,20 +144,20 @@ ProcXCloseDevice(ClientPtr client)
rc = dixLookupDevice(&d, stuff->deviceid, client, DixUseAccess);
if (rc != Success)
- return rc;
+ return rc;
if (d->deviceGrab.grab && SameClient(d->deviceGrab.grab, client))
- (*d->deviceGrab.DeactivateGrab) (d); /* release active grab */
+ (*d->deviceGrab.DeactivateGrab) (d); /* release active grab */
/* Remove event selections from all windows for events from this device
* and selected by this client.
* Delete passive grabs from all windows for this device. */
for (i = 0; i < screenInfo.numScreens; i++) {
- pWin = screenInfo.screens[i]->root;
- DeleteDeviceEvents(d, pWin, client);
- p1 = pWin->firstChild;
- DeleteEventsFromChildren(d, p1, client);
+ pWin = screenInfo.screens[i]->root;
+ DeleteDeviceEvents(d, pWin, client);
+ p1 = pWin->firstChild;
+ DeleteEventsFromChildren(d, p1, client);
}
return Success;
diff --git a/xorg-server/Xi/closedev.h b/xorg-server/Xi/closedev.h
index 400aaa60b..798c02379 100644
--- a/xorg-server/Xi/closedev.h
+++ b/xorg-server/Xi/closedev.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef CLOSEDEV_H
#define CLOSEDEV_H 1
-int SProcXCloseDevice(ClientPtr /* client */
+int SProcXCloseDevice(ClientPtr /* client */
);
-int ProcXCloseDevice(ClientPtr /* client */
+int ProcXCloseDevice(ClientPtr /* client */
);
-#endif /* CLOSEDEV_H */
+#endif /* CLOSEDEV_H */
diff --git a/xorg-server/Xi/devbell.h b/xorg-server/Xi/devbell.h
index 02a77a6b9..2d0b05aa3 100644
--- a/xorg-server/Xi/devbell.h
+++ b/xorg-server/Xi/devbell.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef DEVBELL_H
#define DEVBELL_H 1
-int SProcXDeviceBell(ClientPtr /* client */
+int SProcXDeviceBell(ClientPtr /* client */
);
-int ProcXDeviceBell(ClientPtr /* client */
+int ProcXDeviceBell(ClientPtr /* client */
);
-#endif /* DEVBELL_H */
+#endif /* DEVBELL_H */
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c
index ff2224094..c05c22604 100644
--- a/xorg-server/Xi/exevents.c
+++ b/xorg-server/Xi/exevents.c
@@ -1111,6 +1111,48 @@ EmitTouchEnd(DeviceIntPtr dev, TouchPointInfoPtr ti, int flags, XID resource)
}
/**
+ * Find the oldest touch that still has a pointer emulation client.
+ *
+ * Pointer emulation can only be performed for the oldest touch. Otherwise, the
+ * order of events seen by the client will be wrong. This function helps us find
+ * the next touch to be emulated.
+ *
+ * @param dev The device to find touches for.
+ */
+static TouchPointInfoPtr
+FindOldestPointerEmulatedTouch(DeviceIntPtr dev)
+{
+ TouchPointInfoPtr oldest = NULL;
+ int i;
+
+ for (i = 0; i < dev->touch->num_touches; i++) {
+ TouchPointInfoPtr ti = dev->touch->touches + i;
+ int j;
+
+ if (!ti->active || !ti->emulate_pointer)
+ continue;
+
+ for (j = 0; j < ti->num_listeners; j++) {
+ if (ti->listeners[j].type == LISTENER_POINTER_GRAB ||
+ ti->listeners[j].type == LISTENER_POINTER_REGULAR)
+ break;
+ }
+ if (j == ti->num_listeners)
+ continue;
+
+ if (!oldest) {
+ oldest = ti;
+ continue;
+ }
+
+ if (oldest->client_id - ti->client_id < UINT_MAX / 2)
+ oldest = ti;
+ }
+
+ return oldest;
+}
+
+/**
* If the current owner has rejected the event, deliver the
* TouchOwnership/TouchBegin to the next item in the sprite stack.
*/
@@ -1123,8 +1165,16 @@ TouchPuntToNextOwner(DeviceIntPtr dev, TouchPointInfoPtr ti,
ti->listeners[0].state == LISTENER_EARLY_ACCEPT)
DeliverTouchEvents(dev, ti, (InternalEvent *) ev,
ti->listeners[0].listener);
- else if (ti->listeners[0].state == LISTENER_AWAITING_BEGIN)
+ else if (ti->listeners[0].state == LISTENER_AWAITING_BEGIN) {
+ /* We can't punt to a pointer listener unless all older pointer
+ * emulated touches have been seen already. */
+ if ((ti->listeners[0].type == LISTENER_POINTER_GRAB ||
+ ti->listeners[0].type == LISTENER_POINTER_REGULAR) &&
+ ti != FindOldestPointerEmulatedTouch(dev))
+ return;
+
TouchEventHistoryReplay(ti, dev, ti->listeners[0].listener);
+ }
/* If we've just removed the last grab and the touch has physically
* ended, send a TouchEnd event too and finalise the touch. */
@@ -1139,6 +1189,25 @@ TouchPuntToNextOwner(DeviceIntPtr dev, TouchPointInfoPtr ti,
}
/**
+ * Check the oldest touch to see if it needs to be replayed to its pointer
+ * owner.
+ *
+ * Touch event propagation is paused if it hits a pointer listener while an
+ * older touch with a pointer listener is waiting on accept or reject. This
+ * function will restart propagation of a paused touch if needed.
+ *
+ * @param dev The device to check touches for.
+ */
+static void
+CheckOldestTouch(DeviceIntPtr dev)
+{
+ TouchPointInfoPtr oldest = FindOldestPointerEmulatedTouch(dev);
+
+ if (oldest && oldest->listeners[0].state == LISTENER_AWAITING_BEGIN)
+ TouchPuntToNextOwner(dev, oldest, NULL);
+}
+
+/**
* Process a touch rejection.
*
* @param sourcedev The source device of the touch sequence.
@@ -1169,6 +1238,7 @@ TouchRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, XID resource,
* finish, then we can just kill it now. */
if (ti->num_listeners == 1 && ti->pending_finish) {
TouchEndTouch(sourcedev, ti);
+ CheckOldestTouch(sourcedev);
return;
}
@@ -1184,6 +1254,8 @@ TouchRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, XID resource,
* the TouchOwnership or TouchBegin event to the new owner. */
if (ev && ti->num_listeners > 0 && was_owner)
TouchPuntToNextOwner(sourcedev, ti, ev);
+
+ CheckOldestTouch(sourcedev);
}
/**
@@ -1389,8 +1461,11 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
if (ev->any.type == ET_TouchEnd &&
!dev->button->buttonsDown &&
- dev->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(grab))
+ dev->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(grab)) {
(*dev->deviceGrab.DeactivateGrab) (dev);
+ CheckOldestTouch(dev);
+ return Success;
+ }
}
}
else {
@@ -1755,6 +1830,13 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
listener->type == LISTENER_POINTER_GRAB) {
rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win,
grab, xi2mask);
+
+ if (ti->num_listeners > 1) {
+ ev->any.type = ET_TouchUpdate;
+ ev->device_event.flags |= TOUCH_PENDING_END;
+ ti->pending_finish = TRUE;
+ }
+
goto out;
}
diff --git a/xorg-server/Xi/exglobals.h b/xorg-server/Xi/exglobals.h
index 8c5a42e6e..9f235e034 100644
--- a/xorg-server/Xi/exglobals.h
+++ b/xorg-server/Xi/exglobals.h
@@ -79,6 +79,7 @@ extern int DevicePropertyNotify;
extern RESTYPE RT_INPUTCLIENT;
extern DevPrivateKeyRec XIClientPrivateKeyRec;
+
#define XIClientPrivateKey (&XIClientPrivateKeyRec)
-#endif /* EXGLOBALS_H */
+#endif /* EXGLOBALS_H */
diff --git a/xorg-server/Xi/getbmap.c b/xorg-server/Xi/getbmap.c
index b7054f7d2..a0ec1a61b 100644
--- a/xorg-server/Xi/getbmap.c
+++ b/xorg-server/Xi/getbmap.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exglobals.h"
@@ -100,16 +100,16 @@ ProcXGetDeviceButtonMapping(ClientPtr client)
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
b = dev->button;
if (b == NULL)
- return BadMatch;
+ return BadMatch;
rep.nElts = b->numButtons;
rep.length = bytes_to_int32(rep.nElts);
WriteReplyToClient(client, sizeof(xGetDeviceButtonMappingReply), &rep);
- (void)WriteToClient(client, rep.nElts, (char *)&b->map[1]);
+ (void) WriteToClient(client, rep.nElts, (char *) &b->map[1]);
return Success;
}
@@ -122,9 +122,9 @@ ProcXGetDeviceButtonMapping(ClientPtr client)
void
SRepXGetDeviceButtonMapping(ClientPtr client, int size,
- xGetDeviceButtonMappingReply * rep)
+ xGetDeviceButtonMappingReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/getbmap.h b/xorg-server/Xi/getbmap.h
index d95b3c67c..8b107d026 100644
--- a/xorg-server/Xi/getbmap.h
+++ b/xorg-server/Xi/getbmap.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETBMAP_H
#define GETBMAP_H 1
-int SProcXGetDeviceButtonMapping(ClientPtr /* client */
+int SProcXGetDeviceButtonMapping(ClientPtr /* client */
);
-int ProcXGetDeviceButtonMapping(ClientPtr /* client */
+int ProcXGetDeviceButtonMapping(ClientPtr /* client */
);
void SRepXGetDeviceButtonMapping(ClientPtr /* client */ ,
- int /* size */ ,
- xGetDeviceButtonMappingReply * /* rep */
+ int /* size */ ,
+ xGetDeviceButtonMappingReply * /* rep */
);
-#endif /* GETBMAP_H */
+#endif /* GETBMAP_H */
diff --git a/xorg-server/Xi/getdctl.h b/xorg-server/Xi/getdctl.h
index 19c189f36..7ca739264 100644
--- a/xorg-server/Xi/getdctl.h
+++ b/xorg-server/Xi/getdctl.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETDCTL_H
#define GETDCTL_H 1
-int SProcXGetDeviceControl(ClientPtr /* client */
+int SProcXGetDeviceControl(ClientPtr /* client */
);
-int ProcXGetDeviceControl(ClientPtr /* client */
+int ProcXGetDeviceControl(ClientPtr /* client */
);
void SRepXGetDeviceControl(ClientPtr /* client */ ,
- int /* size */ ,
- xGetDeviceControlReply * /* rep */
+ int /* size */ ,
+ xGetDeviceControlReply * /* rep */
);
-#endif /* GETDCTL_H */
+#endif /* GETDCTL_H */
diff --git a/xorg-server/Xi/getfctl.c b/xorg-server/Xi/getfctl.c
index ea80a879d..2772c0c26 100644
--- a/xorg-server/Xi/getfctl.c
+++ b/xorg-server/Xi/getfctl.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exglobals.h"
@@ -99,13 +99,13 @@ CopySwapKbdFeedback(ClientPtr client, KbdFeedbackPtr k, char **buf)
k2->led_mask = k->ctrl.leds;
k2->global_auto_repeat = k->ctrl.autoRepeat;
for (i = 0; i < 32; i++)
- k2->auto_repeats[i] = k->ctrl.autoRepeats[i];
+ k2->auto_repeats[i] = k->ctrl.autoRepeats[i];
if (client->swapped) {
- swaps(&k2->length);
- swaps(&k2->pitch);
- swaps(&k2->duration);
- swapl(&k2->led_mask);
- swapl(&k2->led_values);
+ swaps(&k2->length);
+ swaps(&k2->pitch);
+ swaps(&k2->duration);
+ swapl(&k2->led_mask);
+ swapl(&k2->led_values);
}
*buf += sizeof(xKbdFeedbackState);
}
@@ -129,10 +129,10 @@ CopySwapPtrFeedback(ClientPtr client, PtrFeedbackPtr p, char **buf)
p2->accelDenom = p->ctrl.den;
p2->threshold = p->ctrl.threshold;
if (client->swapped) {
- swaps(&p2->length);
- swaps(&p2->accelNum);
- swaps(&p2->accelDenom);
- swaps(&p2->threshold);
+ swaps(&p2->length);
+ swaps(&p2->accelNum);
+ swaps(&p2->accelDenom);
+ swaps(&p2->threshold);
}
*buf += sizeof(xPtrFeedbackState);
}
@@ -156,10 +156,10 @@ CopySwapIntegerFeedback(ClientPtr client, IntegerFeedbackPtr i, char **buf)
i2->min_value = i->ctrl.min_value;
i2->max_value = i->ctrl.max_value;
if (client->swapped) {
- swaps(&i2->length);
- swapl(&i2->resolution);
- swapl(&i2->min_value);
- swapl(&i2->max_value);
+ swaps(&i2->length);
+ swapl(&i2->resolution);
+ swapl(&i2->min_value);
+ swapl(&i2->max_value);
}
*buf += sizeof(xIntegerFeedbackState);
}
@@ -180,22 +180,22 @@ CopySwapStringFeedback(ClientPtr client, StringFeedbackPtr s, char **buf)
s2 = (xStringFeedbackState *) * buf;
s2->class = StringFeedbackClass;
s2->length = sizeof(xStringFeedbackState) +
- s->ctrl.num_symbols_supported * sizeof(KeySym);
+ s->ctrl.num_symbols_supported * sizeof(KeySym);
s2->id = s->ctrl.id;
s2->max_symbols = s->ctrl.max_symbols;
s2->num_syms_supported = s->ctrl.num_symbols_supported;
*buf += sizeof(xStringFeedbackState);
kptr = (KeySym *) (*buf);
for (i = 0; i < s->ctrl.num_symbols_supported; i++)
- *kptr++ = *(s->ctrl.symbols_supported + i);
+ *kptr++ = *(s->ctrl.symbols_supported + i);
if (client->swapped) {
- swaps(&s2->length);
- swaps(&s2->max_symbols);
- swaps(&s2->num_syms_supported);
- kptr = (KeySym *) (*buf);
- for (i = 0; i < s->ctrl.num_symbols_supported; i++, kptr++) {
- swapl(kptr);
- }
+ swaps(&s2->length);
+ swaps(&s2->max_symbols);
+ swaps(&s2->num_syms_supported);
+ kptr = (KeySym *) (*buf);
+ for (i = 0; i < s->ctrl.num_symbols_supported; i++, kptr++) {
+ swapl(kptr);
+ }
}
*buf += (s->ctrl.num_symbols_supported * sizeof(KeySym));
}
@@ -218,9 +218,9 @@ CopySwapLedFeedback(ClientPtr client, LedFeedbackPtr l, char **buf)
l2->led_values = l->ctrl.led_values;
l2->led_mask = l->ctrl.led_mask;
if (client->swapped) {
- swaps(&l2->length);
- swapl(&l2->led_values);
- swapl(&l2->led_mask);
+ swaps(&l2->length);
+ swapl(&l2->led_values);
+ swapl(&l2->led_mask);
}
*buf += sizeof(xLedFeedbackState);
}
@@ -244,9 +244,9 @@ CopySwapBellFeedback(ClientPtr client, BellFeedbackPtr b, char **buf)
b2->pitch = b->ctrl.pitch;
b2->duration = b->ctrl.duration;
if (client->swapped) {
- swaps(&b2->length);
- swaps(&b2->pitch);
- swaps(&b2->duration);
+ swaps(&b2->length);
+ swaps(&b2->pitch);
+ swaps(&b2->duration);
}
*buf += sizeof(xBellFeedbackState);
}
@@ -260,12 +260,12 @@ CopySwapBellFeedback(ClientPtr client, BellFeedbackPtr b, char **buf)
void
SRepXGetFeedbackControl(ClientPtr client, int size,
- xGetFeedbackControlReply * rep)
+ xGetFeedbackControlReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
swaps(&rep->num_feedbacks);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
/***********************************************************************
@@ -293,7 +293,7 @@ ProcXGetFeedbackControl(ClientPtr client)
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
rep.repType = X_Reply;
rep.RepType = X_GetFeedbackControl;
@@ -302,51 +302,51 @@ ProcXGetFeedbackControl(ClientPtr client)
rep.num_feedbacks = 0;
for (k = dev->kbdfeed; k; k = k->next) {
- rep.num_feedbacks++;
- total_length += sizeof(xKbdFeedbackState);
+ rep.num_feedbacks++;
+ total_length += sizeof(xKbdFeedbackState);
}
for (p = dev->ptrfeed; p; p = p->next) {
- rep.num_feedbacks++;
- total_length += sizeof(xPtrFeedbackState);
+ rep.num_feedbacks++;
+ total_length += sizeof(xPtrFeedbackState);
}
for (s = dev->stringfeed; s; s = s->next) {
- rep.num_feedbacks++;
- total_length += sizeof(xStringFeedbackState) +
- (s->ctrl.num_symbols_supported * sizeof(KeySym));
+ rep.num_feedbacks++;
+ total_length += sizeof(xStringFeedbackState) +
+ (s->ctrl.num_symbols_supported * sizeof(KeySym));
}
for (i = dev->intfeed; i; i = i->next) {
- rep.num_feedbacks++;
- total_length += sizeof(xIntegerFeedbackState);
+ rep.num_feedbacks++;
+ total_length += sizeof(xIntegerFeedbackState);
}
for (l = dev->leds; l; l = l->next) {
- rep.num_feedbacks++;
- total_length += sizeof(xLedFeedbackState);
+ rep.num_feedbacks++;
+ total_length += sizeof(xLedFeedbackState);
}
for (b = dev->bell; b; b = b->next) {
- rep.num_feedbacks++;
- total_length += sizeof(xBellFeedbackState);
+ rep.num_feedbacks++;
+ total_length += sizeof(xBellFeedbackState);
}
if (total_length == 0)
- return BadMatch;
+ return BadMatch;
- buf = (char *)malloc(total_length);
+ buf = (char *) malloc(total_length);
if (!buf)
- return BadAlloc;
+ return BadAlloc;
savbuf = buf;
for (k = dev->kbdfeed; k; k = k->next)
- CopySwapKbdFeedback(client, k, &buf);
+ CopySwapKbdFeedback(client, k, &buf);
for (p = dev->ptrfeed; p; p = p->next)
- CopySwapPtrFeedback(client, p, &buf);
+ CopySwapPtrFeedback(client, p, &buf);
for (s = dev->stringfeed; s; s = s->next)
- CopySwapStringFeedback(client, s, &buf);
+ CopySwapStringFeedback(client, s, &buf);
for (i = dev->intfeed; i; i = i->next)
- CopySwapIntegerFeedback(client, i, &buf);
+ CopySwapIntegerFeedback(client, i, &buf);
for (l = dev->leds; l; l = l->next)
- CopySwapLedFeedback(client, l, &buf);
+ CopySwapLedFeedback(client, l, &buf);
for (b = dev->bell; b; b = b->next)
- CopySwapBellFeedback(client, b, &buf);
+ CopySwapBellFeedback(client, b, &buf);
rep.length = bytes_to_int32(total_length);
WriteReplyToClient(client, sizeof(xGetFeedbackControlReply), &rep);
diff --git a/xorg-server/Xi/getfctl.h b/xorg-server/Xi/getfctl.h
index 0ad58aa2b..f0b240d4c 100644
--- a/xorg-server/Xi/getfctl.h
+++ b/xorg-server/Xi/getfctl.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETFCTL_H
#define GETFCTL_H 1
-int SProcXGetFeedbackControl(ClientPtr /* client */
+int SProcXGetFeedbackControl(ClientPtr /* client */
);
-int ProcXGetFeedbackControl(ClientPtr /* client */
+int ProcXGetFeedbackControl(ClientPtr /* client */
);
void SRepXGetFeedbackControl(ClientPtr /* client */ ,
- int /* size */ ,
- xGetFeedbackControlReply * /* rep */
+ int /* size */ ,
+ xGetFeedbackControlReply * /* rep */
);
-#endif /* GETFCTL_H */
+#endif /* GETFCTL_H */
diff --git a/xorg-server/Xi/getfocus.c b/xorg-server/Xi/getfocus.c
index 676850df1..ba36e37e3 100644
--- a/xorg-server/Xi/getfocus.c
+++ b/xorg-server/Xi/getfocus.c
@@ -54,8 +54,8 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "windowstr.h" /* focus struct */
-#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* focus struct */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exglobals.h"
@@ -95,9 +95,9 @@ ProcXGetDeviceFocus(ClientPtr client)
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetFocusAccess);
if (rc != Success)
- return rc;
+ return rc;
if (!dev->focus)
- return BadDevice;
+ return BadDevice;
rep.repType = X_Reply;
rep.RepType = X_GetDeviceFocus;
@@ -107,13 +107,13 @@ ProcXGetDeviceFocus(ClientPtr client)
focus = dev->focus;
if (focus->win == NoneWin)
- rep.focus = None;
+ rep.focus = None;
else if (focus->win == PointerRootWin)
- rep.focus = PointerRoot;
+ rep.focus = PointerRoot;
else if (focus->win == FollowKeyboardWin)
- rep.focus = FollowKeyboard;
+ rep.focus = FollowKeyboard;
else
- rep.focus = focus->win->drawable.id;
+ rep.focus = focus->win->drawable.id;
rep.time = focus->time.milliseconds;
rep.revertTo = focus->revert;
@@ -135,5 +135,5 @@ SRepXGetDeviceFocus(ClientPtr client, int size, xGetDeviceFocusReply * rep)
swapl(&rep->length);
swapl(&rep->focus);
swapl(&rep->time);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/getfocus.h b/xorg-server/Xi/getfocus.h
index c3f2d67b6..6e90ae77b 100644
--- a/xorg-server/Xi/getfocus.h
+++ b/xorg-server/Xi/getfocus.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETFOCUS_H
#define GETFOCUS_H 1
-int SProcXGetDeviceFocus(ClientPtr /* client */
+int SProcXGetDeviceFocus(ClientPtr /* client */
);
-int ProcXGetDeviceFocus(ClientPtr /* client */
+int ProcXGetDeviceFocus(ClientPtr /* client */
);
void SRepXGetDeviceFocus(ClientPtr /* client */ ,
- int /* size */ ,
- xGetDeviceFocusReply * /* rep */
+ int /* size */ ,
+ xGetDeviceFocusReply * /* rep */
);
-#endif /* GETFOCUS_H */
+#endif /* GETFOCUS_H */
diff --git a/xorg-server/Xi/getkmap.c b/xorg-server/Xi/getkmap.c
index 2501ec05a..006be62a6 100644
--- a/xorg-server/Xi/getkmap.c
+++ b/xorg-server/Xi/getkmap.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exglobals.h"
@@ -99,20 +99,20 @@ ProcXGetDeviceKeyMapping(ClientPtr client)
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
if (dev->key == NULL)
- return BadMatch;
+ return BadMatch;
xkb = dev->key->xkbInfo->desc;
if (stuff->firstKeyCode < xkb->min_key_code ||
- stuff->firstKeyCode > xkb->max_key_code) {
- client->errorValue = stuff->firstKeyCode;
- return BadValue;
+ stuff->firstKeyCode > xkb->max_key_code) {
+ client->errorValue = stuff->firstKeyCode;
+ return BadValue;
}
if (stuff->firstKeyCode + stuff->count > xkb->max_key_code + 1) {
- client->errorValue = stuff->count;
- return BadValue;
+ client->errorValue = stuff->count;
+ return BadValue;
}
syms = XkbGetCoreMap(dev);
@@ -123,7 +123,7 @@ ProcXGetDeviceKeyMapping(ClientPtr client)
rep.RepType = X_GetDeviceKeyMapping;
rep.sequenceNumber = client->sequence;
rep.keySymsPerKeyCode = syms->mapWidth;
- rep.length = (syms->mapWidth * stuff->count); /* KeySyms are 4 bytes */
+ rep.length = (syms->mapWidth * stuff->count); /* KeySyms are 4 bytes */
WriteReplyToClient(client, sizeof(xGetDeviceKeyMappingReply), &rep);
client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write;
@@ -146,9 +146,9 @@ ProcXGetDeviceKeyMapping(ClientPtr client)
void
SRepXGetDeviceKeyMapping(ClientPtr client, int size,
- xGetDeviceKeyMappingReply * rep)
+ xGetDeviceKeyMappingReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/getkmap.h b/xorg-server/Xi/getkmap.h
index 58c8f12e6..8f0ff8eec 100644
--- a/xorg-server/Xi/getkmap.h
+++ b/xorg-server/Xi/getkmap.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETKMAP_H
#define GETKMAP_H 1
-int SProcXGetDeviceKeyMapping(ClientPtr /* client */
+int SProcXGetDeviceKeyMapping(ClientPtr /* client */
);
-int ProcXGetDeviceKeyMapping(ClientPtr /* client */
+int ProcXGetDeviceKeyMapping(ClientPtr /* client */
);
void SRepXGetDeviceKeyMapping(ClientPtr /* client */ ,
- int /* size */ ,
- xGetDeviceKeyMappingReply * /* rep */
+ int /* size */ ,
+ xGetDeviceKeyMappingReply * /* rep */
);
-#endif /* GETKMAP_H */
+#endif /* GETKMAP_H */
diff --git a/xorg-server/Xi/getmmap.c b/xorg-server/Xi/getmmap.c
index 4eee00679..3f8424373 100644
--- a/xorg-server/Xi/getmmap.c
+++ b/xorg-server/Xi/getmmap.c
@@ -54,9 +54,9 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
-#include <X11/extensions/XIproto.h> /* Request macro */
+#include <X11/extensions/XIproto.h> /* Request macro */
#include "exglobals.h"
#include "getmmap.h"
@@ -95,7 +95,7 @@ ProcXGetDeviceModifierMapping(ClientPtr client)
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
if (ret != Success)
- return ret;
+ return ret;
ret = generate_modkeymap(client, dev, &modkeymap, &max_keys_per_mod);
if (ret != Success)
@@ -125,9 +125,9 @@ ProcXGetDeviceModifierMapping(ClientPtr client)
void
SRepXGetDeviceModifierMapping(ClientPtr client, int size,
- xGetDeviceModifierMappingReply * rep)
+ xGetDeviceModifierMappingReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/getmmap.h b/xorg-server/Xi/getmmap.h
index 9a93bb8c5..d0a76df43 100644
--- a/xorg-server/Xi/getmmap.h
+++ b/xorg-server/Xi/getmmap.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETMMAP_H
#define GETMMAP_H 1
-int SProcXGetDeviceModifierMapping(ClientPtr /* client */
+int SProcXGetDeviceModifierMapping(ClientPtr /* client */
);
-int ProcXGetDeviceModifierMapping(ClientPtr /* client */
+int ProcXGetDeviceModifierMapping(ClientPtr /* client */
);
void SRepXGetDeviceModifierMapping(ClientPtr /* client */ ,
- int /* size */ ,
- xGetDeviceModifierMappingReply * /* rep */
+ int /* size */ ,
+ xGetDeviceModifierMappingReply * /* rep */
);
-#endif /* GETMMAP_H */
+#endif /* GETMMAP_H */
diff --git a/xorg-server/Xi/getprop.h b/xorg-server/Xi/getprop.h
index 1a7b128b2..25fa0d901 100644
--- a/xorg-server/Xi/getprop.h
+++ b/xorg-server/Xi/getprop.h
@@ -30,22 +30,22 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETPROP_H
#define GETPROP_H 1
-int SProcXGetDeviceDontPropagateList(ClientPtr /* client */
+int SProcXGetDeviceDontPropagateList(ClientPtr /* client */
);
-int ProcXGetDeviceDontPropagateList(ClientPtr /* client */
+int ProcXGetDeviceDontPropagateList(ClientPtr /* client */
);
XEventClass *ClassFromMask(XEventClass * /* buf */ ,
- Mask /* mask */ ,
- int /* maskndx */ ,
- CARD16 * /* count */ ,
- int /* mode */
+ Mask /* mask */ ,
+ int /* maskndx */ ,
+ CARD16 * /* count */ ,
+ int /* mode */
);
void SRepXGetDeviceDontPropagateList(ClientPtr /* client */ ,
- int /* size */ ,
- xGetDeviceDontPropagateListReply * /* rep */
+ int /* size */ ,
+ xGetDeviceDontPropagateListReply * /* rep */
);
-#endif /* GETPROP_H */
+#endif /* GETPROP_H */
diff --git a/xorg-server/Xi/getselev.c b/xorg-server/Xi/getselev.c
index b316e2364..253c87fb5 100644
--- a/xorg-server/Xi/getselev.c
+++ b/xorg-server/Xi/getselev.c
@@ -56,8 +56,8 @@ SOFTWARE.
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
-#include "inputstr.h" /* DeviceIntPtr */
-#include "windowstr.h" /* window struct */
+#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* window struct */
#include "exglobals.h"
#include "swaprep.h"
@@ -111,45 +111,45 @@ ProcXGetSelectedExtensionEvents(ClientPtr client)
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
if ((pOthers = wOtherInputMasks(pWin)) != 0) {
- for (others = pOthers->inputClients; others; others = others->next)
- for (i = 0; i < EMASKSIZE; i++)
- ClassFromMask(NULL, others->mask[i], i,
- &rep.all_clients_count, COUNT);
-
- for (others = pOthers->inputClients; others; others = others->next)
- if (SameClient(others, client)) {
- for (i = 0; i < EMASKSIZE; i++)
- ClassFromMask(NULL, others->mask[i], i,
- &rep.this_client_count, COUNT);
- break;
- }
-
- total_length = (rep.all_clients_count + rep.this_client_count) *
- sizeof(XEventClass);
- rep.length = bytes_to_int32(total_length);
- buf = (XEventClass *) malloc(total_length);
-
- tclient = buf;
- aclient = buf + rep.this_client_count;
- if (others)
- for (i = 0; i < EMASKSIZE; i++)
- tclient =
- ClassFromMask(tclient, others->mask[i], i, NULL, CREATE);
-
- for (others = pOthers->inputClients; others; others = others->next)
- for (i = 0; i < EMASKSIZE; i++)
- aclient =
- ClassFromMask(aclient, others->mask[i], i, NULL, CREATE);
+ for (others = pOthers->inputClients; others; others = others->next)
+ for (i = 0; i < EMASKSIZE; i++)
+ ClassFromMask(NULL, others->mask[i], i,
+ &rep.all_clients_count, COUNT);
+
+ for (others = pOthers->inputClients; others; others = others->next)
+ if (SameClient(others, client)) {
+ for (i = 0; i < EMASKSIZE; i++)
+ ClassFromMask(NULL, others->mask[i], i,
+ &rep.this_client_count, COUNT);
+ break;
+ }
+
+ total_length = (rep.all_clients_count + rep.this_client_count) *
+ sizeof(XEventClass);
+ rep.length = bytes_to_int32(total_length);
+ buf = (XEventClass *) malloc(total_length);
+
+ tclient = buf;
+ aclient = buf + rep.this_client_count;
+ if (others)
+ for (i = 0; i < EMASKSIZE; i++)
+ tclient =
+ ClassFromMask(tclient, others->mask[i], i, NULL, CREATE);
+
+ for (others = pOthers->inputClients; others; others = others->next)
+ for (i = 0; i < EMASKSIZE; i++)
+ aclient =
+ ClassFromMask(aclient, others->mask[i], i, NULL, CREATE);
}
WriteReplyToClient(client, sizeof(xGetSelectedExtensionEventsReply), &rep);
if (total_length) {
- client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
- WriteSwappedDataToClient(client, total_length, buf);
+ client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
+ WriteSwappedDataToClient(client, total_length, buf);
}
free(buf);
return Success;
@@ -164,11 +164,11 @@ ProcXGetSelectedExtensionEvents(ClientPtr client)
void
SRepXGetSelectedExtensionEvents(ClientPtr client, int size,
- xGetSelectedExtensionEventsReply * rep)
+ xGetSelectedExtensionEventsReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
swaps(&rep->this_client_count);
swaps(&rep->all_clients_count);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/getselev.h b/xorg-server/Xi/getselev.h
index 5e7a65914..371be1a27 100644
--- a/xorg-server/Xi/getselev.h
+++ b/xorg-server/Xi/getselev.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETSELEV_H
#define GETSELEV_H 1
-int SProcXGetSelectedExtensionEvents(ClientPtr /* client */
+int SProcXGetSelectedExtensionEvents(ClientPtr /* client */
);
-int ProcXGetSelectedExtensionEvents(ClientPtr /* client */
+int ProcXGetSelectedExtensionEvents(ClientPtr /* client */
);
void SRepXGetSelectedExtensionEvents(ClientPtr /* client */ ,
- int /* size */ ,
- xGetSelectedExtensionEventsReply * /* rep */
+ int /* size */ ,
+ xGetSelectedExtensionEventsReply * /* rep */
);
-#endif /* GETSELEV_H */
+#endif /* GETSELEV_H */
diff --git a/xorg-server/Xi/getvers.c b/xorg-server/Xi/getvers.c
index 8bea1c4b9..eb52c5b93 100644
--- a/xorg-server/Xi/getvers.c
+++ b/xorg-server/Xi/getvers.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exevents.h"
@@ -95,8 +95,8 @@ ProcXGetExtensionVersion(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
if (stuff->length != bytes_to_int32(sizeof(xGetExtensionVersionReq) +
- stuff->nbytes))
- return BadLength;
+ stuff->nbytes))
+ return BadLength;
memset(&rep, 0, sizeof(xGetExtensionVersionReply));
rep.repType = X_Reply;
@@ -121,11 +121,11 @@ ProcXGetExtensionVersion(ClientPtr client)
void
SRepXGetExtensionVersion(ClientPtr client, int size,
- xGetExtensionVersionReply * rep)
+ xGetExtensionVersionReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
swaps(&rep->major_version);
swaps(&rep->minor_version);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/getvers.h b/xorg-server/Xi/getvers.h
index c67e77a0f..11fec4b06 100644
--- a/xorg-server/Xi/getvers.h
+++ b/xorg-server/Xi/getvers.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GETVERS_H
#define GETVERS_H 1
-int SProcXGetExtensionVersion(ClientPtr /* client */
+int SProcXGetExtensionVersion(ClientPtr /* client */
);
-int ProcXGetExtensionVersion(ClientPtr /* client */
+int ProcXGetExtensionVersion(ClientPtr /* client */
);
void SRepXGetExtensionVersion(ClientPtr /* client */ ,
- int /* size */ ,
- xGetExtensionVersionReply * /* rep */
+ int /* size */ ,
+ xGetExtensionVersionReply * /* rep */
);
-#endif /* GETVERS_H */
+#endif /* GETVERS_H */
diff --git a/xorg-server/Xi/grabdev.h b/xorg-server/Xi/grabdev.h
index 881982fd2..72e0fd692 100644
--- a/xorg-server/Xi/grabdev.h
+++ b/xorg-server/Xi/grabdev.h
@@ -30,23 +30,23 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GRABDEV_H
#define GRABDEV_H 1
-int SProcXGrabDevice(ClientPtr /* client */
+int SProcXGrabDevice(ClientPtr /* client */
);
-int ProcXGrabDevice(ClientPtr /* client */
+int ProcXGrabDevice(ClientPtr /* client */
);
int CreateMaskFromList(ClientPtr /* client */ ,
- XEventClass * /* list */ ,
- int /* count */ ,
- struct tmask /* mask */ [],
- DeviceIntPtr /* dev */ ,
- int /* req */
+ XEventClass * /* list */ ,
+ int /* count */ ,
+ struct tmask /* mask */ [],
+ DeviceIntPtr /* dev */ ,
+ int /* req */
);
void SRepXGrabDevice(ClientPtr /* client */ ,
- int /* size */ ,
- xGrabDeviceReply * /* rep */
+ int /* size */ ,
+ xGrabDeviceReply * /* rep */
);
-#endif /* GRABDEV_H */
+#endif /* GRABDEV_H */
diff --git a/xorg-server/Xi/grabdevb.h b/xorg-server/Xi/grabdevb.h
index 84a27b3d9..b2a9796b5 100644
--- a/xorg-server/Xi/grabdevb.h
+++ b/xorg-server/Xi/grabdevb.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GRABDEVB_H
#define GRABDEVB_H 1
-int SProcXGrabDeviceButton(ClientPtr /* client */
+int SProcXGrabDeviceButton(ClientPtr /* client */
);
-int ProcXGrabDeviceButton(ClientPtr /* client */
+int ProcXGrabDeviceButton(ClientPtr /* client */
);
-#endif /* GRABDEVB_H */
+#endif /* GRABDEVB_H */
diff --git a/xorg-server/Xi/grabdevk.h b/xorg-server/Xi/grabdevk.h
index e34913628..85738affa 100644
--- a/xorg-server/Xi/grabdevk.h
+++ b/xorg-server/Xi/grabdevk.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GRABDEVK_H
#define GRABDEVK_H 1
-int SProcXGrabDeviceKey(ClientPtr /* client */
+int SProcXGrabDeviceKey(ClientPtr /* client */
);
-int ProcXGrabDeviceKey(ClientPtr /* client */
+int ProcXGrabDeviceKey(ClientPtr /* client */
);
-#endif /* GRABDEVK_H */
+#endif /* GRABDEVK_H */
diff --git a/xorg-server/Xi/gtmotion.c b/xorg-server/Xi/gtmotion.c
index 34f167b40..48bc79af4 100644
--- a/xorg-server/Xi/gtmotion.c
+++ b/xorg-server/Xi/gtmotion.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exevents.h"
@@ -103,51 +103,51 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq);
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixReadAccess);
if (rc != Success)
- return rc;
+ return rc;
v = dev->valuator;
if (v == NULL || v->numAxes == 0)
- return BadMatch;
+ return BadMatch;
if (dev->valuator->motionHintWindow)
- MaybeStopDeviceHint(dev, client);
+ MaybeStopDeviceHint(dev, client);
axes = v->numAxes;
rep.repType = X_Reply;
rep.RepType = X_GetDeviceMotionEvents;
rep.sequenceNumber = client->sequence;
rep.nEvents = 0;
rep.axes = axes;
- rep.mode = Absolute; /* XXX we don't do relative at the moment */
+ rep.mode = Absolute; /* XXX we don't do relative at the moment */
rep.length = 0;
start = ClientTimeToServerTime(stuff->start);
stop = ClientTimeToServerTime(stuff->stop);
if (CompareTimeStamps(start, stop) == LATER ||
- CompareTimeStamps(start, currentTime) == LATER) {
- WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep);
- return Success;
+ CompareTimeStamps(start, currentTime) == LATER) {
+ WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep);
+ return Success;
}
if (CompareTimeStamps(stop, currentTime) == LATER)
- stop = currentTime;
+ stop = currentTime;
num_events = v->numMotionEvents;
if (num_events) {
size = sizeof(Time) + (axes * sizeof(INT32));
- rep.nEvents = GetMotionHistory(dev, (xTimecoord **) &coords,/* XXX */
- start.milliseconds, stop.milliseconds,
- (ScreenPtr) NULL, FALSE);
+ rep.nEvents = GetMotionHistory(dev, (xTimecoord **) & coords, /* XXX */
+ start.milliseconds, stop.milliseconds,
+ (ScreenPtr) NULL, FALSE);
}
if (rep.nEvents > 0) {
- length = bytes_to_int32(rep.nEvents * size);
- rep.length = length;
+ length = bytes_to_int32(rep.nEvents * size);
+ rep.length = length;
}
nEvents = rep.nEvents;
WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep);
if (nEvents) {
- if (client->swapped) {
- bufptr = coords;
- for (i = 0; i < nEvents * (axes + 1); i++) {
- swapl(bufptr);
- bufptr++;
- }
- }
- WriteToClient(client, length * 4, (char *)coords);
+ if (client->swapped) {
+ bufptr = coords;
+ for (i = 0; i < nEvents * (axes + 1); i++) {
+ swapl(bufptr);
+ bufptr++;
+ }
+ }
+ WriteToClient(client, length * 4, (char *) coords);
}
free(coords);
return Success;
@@ -162,10 +162,10 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
void
SRepXGetDeviceMotionEvents(ClientPtr client, int size,
- xGetDeviceMotionEventsReply * rep)
+ xGetDeviceMotionEventsReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
swapl(&rep->nEvents);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/gtmotion.h b/xorg-server/Xi/gtmotion.h
index cdd8825cc..f62bf578c 100644
--- a/xorg-server/Xi/gtmotion.h
+++ b/xorg-server/Xi/gtmotion.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef GTMOTION_H
#define GTMOTION_H 1
-int SProcXGetDeviceMotionEvents(ClientPtr /* client */
+int SProcXGetDeviceMotionEvents(ClientPtr /* client */
);
-int ProcXGetDeviceMotionEvents(ClientPtr /* client */
+int ProcXGetDeviceMotionEvents(ClientPtr /* client */
);
void SRepXGetDeviceMotionEvents(ClientPtr /* client */ ,
- int /* size */ ,
- xGetDeviceMotionEventsReply * /* rep */
+ int /* size */ ,
+ xGetDeviceMotionEventsReply * /* rep */
);
-#endif /* GTMOTION_H */
+#endif /* GTMOTION_H */
diff --git a/xorg-server/Xi/listdev.h b/xorg-server/Xi/listdev.h
index b0d2dd5e2..39ea2389f 100644
--- a/xorg-server/Xi/listdev.h
+++ b/xorg-server/Xi/listdev.h
@@ -30,17 +30,17 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef LISTDEV_H
#define LISTDEV_H 1
-#define VPC 20 /* Max # valuators per chunk */
+#define VPC 20 /* Max # valuators per chunk */
-int SProcXListInputDevices(ClientPtr /* client */
+int SProcXListInputDevices(ClientPtr /* client */
);
-int ProcXListInputDevices(ClientPtr /* client */
+int ProcXListInputDevices(ClientPtr /* client */
);
void SRepXListInputDevices(ClientPtr /* client */ ,
- int /* size */ ,
- xListInputDevicesReply * /* rep */
+ int /* size */ ,
+ xListInputDevicesReply * /* rep */
);
-#endif /* LISTDEV_H */
+#endif /* LISTDEV_H */
diff --git a/xorg-server/Xi/opendev.h b/xorg-server/Xi/opendev.h
index 9665fe9cb..e2d806197 100644
--- a/xorg-server/Xi/opendev.h
+++ b/xorg-server/Xi/opendev.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef OPENDEV_H
#define OPENDEV_H 1
-int SProcXOpenDevice(ClientPtr /* client */
+int SProcXOpenDevice(ClientPtr /* client */
);
-int ProcXOpenDevice(ClientPtr /* client */
+int ProcXOpenDevice(ClientPtr /* client */
);
void SRepXOpenDevice(ClientPtr /* client */ ,
- int /* size */ ,
- xOpenDeviceReply * /* rep */
+ int /* size */ ,
+ xOpenDeviceReply * /* rep */
);
-#endif /* OPENDEV_H */
+#endif /* OPENDEV_H */
diff --git a/xorg-server/Xi/queryst.h b/xorg-server/Xi/queryst.h
index 9232ff666..5619ca59d 100644
--- a/xorg-server/Xi/queryst.h
+++ b/xorg-server/Xi/queryst.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef QUERYST_H
#define QUERYST_H 1
-int SProcXQueryDeviceState(ClientPtr /* client */
+int SProcXQueryDeviceState(ClientPtr /* client */
);
-int ProcXQueryDeviceState(ClientPtr /* client */
+int ProcXQueryDeviceState(ClientPtr /* client */
);
void SRepXQueryDeviceState(ClientPtr /* client */ ,
- int /* size */ ,
- xQueryDeviceStateReply * /* rep */
+ int /* size */ ,
+ xQueryDeviceStateReply * /* rep */
);
-#endif /* QUERYST_H */
+#endif /* QUERYST_H */
diff --git a/xorg-server/Xi/selectev.h b/xorg-server/Xi/selectev.h
index 60fb4476b..e80fe4a43 100644
--- a/xorg-server/Xi/selectev.h
+++ b/xorg-server/Xi/selectev.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SELECTEV_H
#define SELECTEV_H 1
-int SProcXSelectExtensionEvent(ClientPtr /* client */
+int SProcXSelectExtensionEvent(ClientPtr /* client */
);
-int ProcXSelectExtensionEvent(ClientPtr /* client */
+int ProcXSelectExtensionEvent(ClientPtr /* client */
);
-#endif /* SELECTEV_H */
+#endif /* SELECTEV_H */
diff --git a/xorg-server/Xi/sendexev.h b/xorg-server/Xi/sendexev.h
index e156f1ba2..38c66434d 100644
--- a/xorg-server/Xi/sendexev.h
+++ b/xorg-server/Xi/sendexev.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SENDEXEV_H
#define SENDEXEV_H 1
-int SProcXSendExtensionEvent(ClientPtr /* client */
+int SProcXSendExtensionEvent(ClientPtr /* client */
);
-int ProcXSendExtensionEvent(ClientPtr /* client */
+int ProcXSendExtensionEvent(ClientPtr /* client */
);
-#endif /* SENDEXEV_H */
+#endif /* SENDEXEV_H */
diff --git a/xorg-server/Xi/setbmap.h b/xorg-server/Xi/setbmap.h
index 20ad8e077..8d73f23b4 100644
--- a/xorg-server/Xi/setbmap.h
+++ b/xorg-server/Xi/setbmap.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SETBMAP_H
#define SETBMAP_H 1
-int SProcXSetDeviceButtonMapping(ClientPtr /* client */
+int SProcXSetDeviceButtonMapping(ClientPtr /* client */
);
-int ProcXSetDeviceButtonMapping(ClientPtr /* client */
+int ProcXSetDeviceButtonMapping(ClientPtr /* client */
);
void SRepXSetDeviceButtonMapping(ClientPtr /* client */ ,
- int /* size */ ,
- xSetDeviceButtonMappingReply * /* rep */
+ int /* size */ ,
+ xSetDeviceButtonMappingReply * /* rep */
);
-#endif /* SETBMAP_H */
+#endif /* SETBMAP_H */
diff --git a/xorg-server/Xi/setdval.c b/xorg-server/Xi/setdval.c
index ea17852f7..542f20dd8 100644
--- a/xorg-server/Xi/setdval.c
+++ b/xorg-server/Xi/setdval.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "XIstubs.h"
@@ -99,27 +99,27 @@ ProcXSetDeviceValuators(ClientPtr client)
rep.sequenceNumber = client->sequence;
if (stuff->length != bytes_to_int32(sizeof(xSetDeviceValuatorsReq)) +
- stuff->num_valuators)
- return BadLength;
+ stuff->num_valuators)
+ return BadLength;
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
if (dev->valuator == NULL)
- return BadMatch;
+ return BadMatch;
if (stuff->first_valuator + stuff->num_valuators > dev->valuator->numAxes)
- return BadValue;
+ return BadValue;
if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client))
- rep.status = AlreadyGrabbed;
+ rep.status = AlreadyGrabbed;
else
- rep.status = SetDeviceValuators(client, dev, (int *)&stuff[1],
- stuff->first_valuator,
- stuff->num_valuators);
+ rep.status = SetDeviceValuators(client, dev, (int *) &stuff[1],
+ stuff->first_valuator,
+ stuff->num_valuators);
if (rep.status != Success && rep.status != AlreadyGrabbed)
- return rep.status;
+ return rep.status;
WriteReplyToClient(client, sizeof(xSetDeviceValuatorsReply), &rep);
return Success;
@@ -134,9 +134,9 @@ ProcXSetDeviceValuators(ClientPtr client)
void
SRepXSetDeviceValuators(ClientPtr client, int size,
- xSetDeviceValuatorsReply * rep)
+ xSetDeviceValuatorsReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/setdval.h b/xorg-server/Xi/setdval.h
index 40b431784..05642743a 100644
--- a/xorg-server/Xi/setdval.h
+++ b/xorg-server/Xi/setdval.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SETDVAL_H
#define SETDVAL_H 1
-int SProcXSetDeviceValuators(ClientPtr /* client */
+int SProcXSetDeviceValuators(ClientPtr /* client */
);
-int ProcXSetDeviceValuators(ClientPtr /* client */
+int ProcXSetDeviceValuators(ClientPtr /* client */
);
void SRepXSetDeviceValuators(ClientPtr /* client */ ,
- int /* size */ ,
- xSetDeviceValuatorsReply * /* rep */
+ int /* size */ ,
+ xSetDeviceValuatorsReply * /* rep */
);
-#endif /* SETDVAL_H */
+#endif /* SETDVAL_H */
diff --git a/xorg-server/Xi/setfocus.c b/xorg-server/Xi/setfocus.c
index feec3fc35..809184189 100644
--- a/xorg-server/Xi/setfocus.c
+++ b/xorg-server/Xi/setfocus.c
@@ -54,8 +54,8 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "windowstr.h" /* focus struct */
-#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* focus struct */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
@@ -99,12 +99,12 @@ ProcXSetDeviceFocus(ClientPtr client)
ret = dixLookupDevice(&dev, stuff->device, client, DixSetFocusAccess);
if (ret != Success)
- return ret;
+ return ret;
if (!dev->focus)
- return BadDevice;
+ return BadDevice;
ret = SetInputFocus(client, dev, stuff->focus, stuff->revertTo,
- stuff->time, TRUE);
+ stuff->time, TRUE);
return ret;
}
diff --git a/xorg-server/Xi/setfocus.h b/xorg-server/Xi/setfocus.h
index 3a49f8440..0adf45157 100644
--- a/xorg-server/Xi/setfocus.h
+++ b/xorg-server/Xi/setfocus.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SETFOCUS_H
#define SETFOCUS_H 1
-int SProcXSetDeviceFocus(ClientPtr /* client */
+int SProcXSetDeviceFocus(ClientPtr /* client */
);
-int ProcXSetDeviceFocus(ClientPtr /* client */
+int ProcXSetDeviceFocus(ClientPtr /* client */
);
-#endif /* SETFOCUS_H */
+#endif /* SETFOCUS_H */
diff --git a/xorg-server/Xi/setmmap.c b/xorg-server/Xi/setmmap.c
index dc6d828a1..36845d706 100644
--- a/xorg-server/Xi/setmmap.c
+++ b/xorg-server/Xi/setmmap.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XI2.h>
#include <X11/extensions/XIproto.h>
@@ -95,7 +95,7 @@ ProcXSetDeviceModifierMapping(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xSetDeviceModifierMappingReq);
if (stuff->length != bytes_to_int32(sizeof(xSetDeviceModifierMappingReq)) +
- (stuff->numKeyPerModifier << 1))
+ (stuff->numKeyPerModifier << 1))
return BadLength;
rep.repType = X_Reply;
@@ -113,9 +113,9 @@ ProcXSetDeviceModifierMapping(ClientPtr client)
ret = MappingSuccess;
if (ret == MappingSuccess || ret == MappingBusy || ret == MappingFailed) {
- rep.success = ret;
- WriteReplyToClient(client, sizeof(xSetDeviceModifierMappingReply),
- &rep);
+ rep.success = ret;
+ WriteReplyToClient(client, sizeof(xSetDeviceModifierMappingReply),
+ &rep);
}
else if (ret == -1) {
return BadValue;
@@ -136,9 +136,9 @@ ProcXSetDeviceModifierMapping(ClientPtr client)
void
SRepXSetDeviceModifierMapping(ClientPtr client, int size,
- xSetDeviceModifierMappingReply * rep)
+ xSetDeviceModifierMappingReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
- WriteToClient(client, size, (char *)rep);
+ WriteToClient(client, size, (char *) rep);
}
diff --git a/xorg-server/Xi/setmmap.h b/xorg-server/Xi/setmmap.h
index 9b345da7c..9347b9679 100644
--- a/xorg-server/Xi/setmmap.h
+++ b/xorg-server/Xi/setmmap.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SETMMAP_H
#define SETMMAP_H 1
-int SProcXSetDeviceModifierMapping(ClientPtr /* client */
+int SProcXSetDeviceModifierMapping(ClientPtr /* client */
);
-int ProcXSetDeviceModifierMapping(ClientPtr /* client */
+int ProcXSetDeviceModifierMapping(ClientPtr /* client */
);
void SRepXSetDeviceModifierMapping(ClientPtr /* client */ ,
- int /* size */ ,
- xSetDeviceModifierMappingReply * /* rep */
+ int /* size */ ,
+ xSetDeviceModifierMappingReply * /* rep */
);
-#endif /* SETMMAP_H */
+#endif /* SETMMAP_H */
diff --git a/xorg-server/Xi/setmode.h b/xorg-server/Xi/setmode.h
index 021bfa02d..d01bfffd3 100644
--- a/xorg-server/Xi/setmode.h
+++ b/xorg-server/Xi/setmode.h
@@ -30,15 +30,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SETMODE_H
#define SETMODE_H 1
-int SProcXSetDeviceMode(ClientPtr /* client */
+int SProcXSetDeviceMode(ClientPtr /* client */
);
-int ProcXSetDeviceMode(ClientPtr /* client */
+int ProcXSetDeviceMode(ClientPtr /* client */
);
void SRepXSetDeviceMode(ClientPtr /* client */ ,
- int /* size */ ,
- xSetDeviceModeReply * /* rep */
+ int /* size */ ,
+ xSetDeviceModeReply * /* rep */
);
-#endif /* SETMODE_H */
+#endif /* SETMODE_H */
diff --git a/xorg-server/Xi/ungrdev.c b/xorg-server/Xi/ungrdev.c
index 58c1f57ef..162a00abf 100644
--- a/xorg-server/Xi/ungrdev.c
+++ b/xorg-server/Xi/ungrdev.c
@@ -54,8 +54,8 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
-#include "windowstr.h" /* window structure */
+#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* window structure */
#include <X11/extensions/XIproto.h>
#include "exglobals.h"
@@ -96,13 +96,13 @@ ProcXUngrabDevice(ClientPtr client)
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
if (rc != Success)
- return rc;
+ return rc;
grab = dev->deviceGrab.grab;
time = ClientTimeToServerTime(stuff->time);
if ((CompareTimeStamps(time, currentTime) != LATER) &&
- (CompareTimeStamps(time, dev->deviceGrab.grabTime) != EARLIER) &&
- (grab) && SameClient(grab, client) && grab->grabtype == XI)
- (*dev->deviceGrab.DeactivateGrab) (dev);
+ (CompareTimeStamps(time, dev->deviceGrab.grabTime) != EARLIER) &&
+ (grab) && SameClient(grab, client) && grab->grabtype == XI)
+ (*dev->deviceGrab.DeactivateGrab) (dev);
return Success;
}
diff --git a/xorg-server/Xi/ungrdev.h b/xorg-server/Xi/ungrdev.h
index 8e3c210a3..8a85c27f1 100644
--- a/xorg-server/Xi/ungrdev.h
+++ b/xorg-server/Xi/ungrdev.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef UNGRDEV_H
#define UNGRDEV_H 1
-int SProcXUngrabDevice(ClientPtr /* client */
+int SProcXUngrabDevice(ClientPtr /* client */
);
-int ProcXUngrabDevice(ClientPtr /* client */
+int ProcXUngrabDevice(ClientPtr /* client */
);
-#endif /* UNGRDEV_H */
+#endif /* UNGRDEV_H */
diff --git a/xorg-server/Xi/ungrdevb.h b/xorg-server/Xi/ungrdevb.h
index 400d61d9e..97d8aede1 100644
--- a/xorg-server/Xi/ungrdevb.h
+++ b/xorg-server/Xi/ungrdevb.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef UNGRDEVB_H
#define UNGRDEVB_H 1
-int SProcXUngrabDeviceButton(ClientPtr /* client */
+int SProcXUngrabDeviceButton(ClientPtr /* client */
);
-int ProcXUngrabDeviceButton(ClientPtr /* client */
+int ProcXUngrabDeviceButton(ClientPtr /* client */
);
-#endif /* UNGRDEVB_H */
+#endif /* UNGRDEVB_H */
diff --git a/xorg-server/Xi/ungrdevk.h b/xorg-server/Xi/ungrdevk.h
index 9dec17a10..1c4bab65b 100644
--- a/xorg-server/Xi/ungrdevk.h
+++ b/xorg-server/Xi/ungrdevk.h
@@ -30,10 +30,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef UNGRDEVK_H
#define UNGRDEVK_H 1
-int SProcXUngrabDeviceKey(ClientPtr /* client */
+int SProcXUngrabDeviceKey(ClientPtr /* client */
);
-int ProcXUngrabDeviceKey(ClientPtr /* client */
+int ProcXUngrabDeviceKey(ClientPtr /* client */
);
-#endif /* UNGRDEVK_H */
+#endif /* UNGRDEVK_H */
diff --git a/xorg-server/Xi/xiallowev.h b/xorg-server/Xi/xiallowev.h
index 3a417b9b1..c24ac3df4 100644
--- a/xorg-server/Xi/xiallowev.h
+++ b/xorg-server/Xi/xiallowev.h
@@ -33,4 +33,4 @@
int ProcXIAllowEvents(ClientPtr client);
int SProcXIAllowEvents(ClientPtr client);
-#endif /* XIALLOWEV_H */
+#endif /* XIALLOWEV_H */
diff --git a/xorg-server/Xi/xichangecursor.h b/xorg-server/Xi/xichangecursor.h
index dc6ccb1af..14477772a 100644
--- a/xorg-server/Xi/xichangecursor.h
+++ b/xorg-server/Xi/xichangecursor.h
@@ -30,7 +30,7 @@
#ifndef CHDEVCUR_H
#define CHDEVCUR_H 1
-int SProcXIChangeCursor(ClientPtr /* client */);
-int ProcXIChangeCursor(ClientPtr /* client */);
+int SProcXIChangeCursor(ClientPtr /* client */ );
+int ProcXIChangeCursor(ClientPtr /* client */ );
-#endif /* CHDEVCUR_H */
+#endif /* CHDEVCUR_H */
diff --git a/xorg-server/Xi/xichangehierarchy.h b/xorg-server/Xi/xichangehierarchy.h
index 483c6cd72..8ec1915ae 100644
--- a/xorg-server/Xi/xichangehierarchy.h
+++ b/xorg-server/Xi/xichangehierarchy.h
@@ -36,9 +36,9 @@
#ifndef CHDEVHIER_H
#define CHDEVHIER_H 1
-int SProcXIChangeHierarchy(ClientPtr /* client */);
-int ProcXIChangeHierarchy(ClientPtr /* client */);
+int SProcXIChangeHierarchy(ClientPtr /* client */ );
+int ProcXIChangeHierarchy(ClientPtr /* client */ );
void XISendDeviceHierarchyEvent(int flags[]);
-#endif /* CHDEVHIER_H */
+#endif /* CHDEVHIER_H */
diff --git a/xorg-server/Xi/xigetclientpointer.h b/xorg-server/Xi/xigetclientpointer.h
index 1539aa8a9..4ecf42cca 100644
--- a/xorg-server/Xi/xigetclientpointer.h
+++ b/xorg-server/Xi/xigetclientpointer.h
@@ -29,10 +29,10 @@
#ifndef GETCPTR_H
#define GETCPTR_H 1
-int SProcXIGetClientPointer(ClientPtr /* client */);
-int ProcXIGetClientPointer(ClientPtr /* client */);
-void SRepXIGetClientPointer(ClientPtr /* client */,
- int /* size */,
- xXIGetClientPointerReply* /* rep */);
+int SProcXIGetClientPointer(ClientPtr /* client */ );
+int ProcXIGetClientPointer(ClientPtr /* client */ );
+void SRepXIGetClientPointer(ClientPtr /* client */ ,
+ int /* size */ ,
+ xXIGetClientPointerReply * /* rep */ );
-#endif /* GETCPTR_H */
+#endif /* GETCPTR_H */
diff --git a/xorg-server/Xi/xigrabdev.h b/xorg-server/Xi/xigrabdev.h
index 08309c932..e5aa702c5 100644
--- a/xorg-server/Xi/xigrabdev.h
+++ b/xorg-server/Xi/xigrabdev.h
@@ -38,4 +38,4 @@ int SProcXIUngrabDevice(ClientPtr client);
void SRepXIGrabDevice(ClientPtr client, int size, xXIGrabDeviceReply * rep);
-#endif /* XIGRABDEV_H */
+#endif /* XIGRABDEV_H */
diff --git a/xorg-server/Xi/xiquerydevice.c b/xorg-server/Xi/xiquerydevice.c
index 749bc24c9..15c8b2a7b 100644
--- a/xorg-server/Xi/xiquerydevice.c
+++ b/xorg-server/Xi/xiquerydevice.c
@@ -430,7 +430,7 @@ ListTouchInfo(DeviceIntPtr dev, xXITouchInfo * touch)
{
touch->type = XITouchClass;
touch->length = sizeof(xXITouchInfo) >> 2;
- touch->sourceid = touch->sourceid;
+ touch->sourceid = dev->touch->sourceid;
touch->mode = dev->touch->mode;
touch->num_touches = dev->touch->num_touches;
diff --git a/xorg-server/Xi/xiquerydevice.h b/xorg-server/Xi/xiquerydevice.h
index 632c42eeb..8a180bf39 100644
--- a/xorg-server/Xi/xiquerydevice.h
+++ b/xorg-server/Xi/xiquerydevice.h
@@ -35,15 +35,15 @@
int SProcXIQueryDevice(ClientPtr client);
int ProcXIQueryDevice(ClientPtr client);
-void SRepXIQueryDevice(ClientPtr client, int size, xXIQueryDeviceReply *rep);
+void SRepXIQueryDevice(ClientPtr client, int size, xXIQueryDeviceReply * rep);
int SizeDeviceClasses(DeviceIntPtr dev);
int ListDeviceClasses(ClientPtr client, DeviceIntPtr dev,
- char* any, uint16_t* nclasses);
-int GetDeviceUse(DeviceIntPtr dev, uint16_t *attachment);
-int ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info, Bool reportState);
-int ListKeyInfo(DeviceIntPtr dev, xXIKeyInfo* info);
-int ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info,
- int axisnumber, Bool reportState);
-int ListScrollInfo(DeviceIntPtr dev, xXIScrollInfo* info, int axisnumber);
-int ListTouchInfo(DeviceIntPtr dev, xXITouchInfo* info);
-#endif /* QUERYDEV_H */
+ char *any, uint16_t * nclasses);
+int GetDeviceUse(DeviceIntPtr dev, uint16_t * attachment);
+int ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo * info, Bool reportState);
+int ListKeyInfo(DeviceIntPtr dev, xXIKeyInfo * info);
+int ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo * info,
+ int axisnumber, Bool reportState);
+int ListScrollInfo(DeviceIntPtr dev, xXIScrollInfo * info, int axisnumber);
+int ListTouchInfo(DeviceIntPtr dev, xXITouchInfo * info);
+#endif /* QUERYDEV_H */
diff --git a/xorg-server/Xi/xiquerypointer.h b/xorg-server/Xi/xiquerypointer.h
index ea22376a6..a6bc4ce95 100644
--- a/xorg-server/Xi/xiquerypointer.h
+++ b/xorg-server/Xi/xiquerypointer.h
@@ -30,10 +30,10 @@
#ifndef QUERYDP_H
#define QUERYDP_H 1
-int SProcXIQueryPointer(ClientPtr /* client */);
-int ProcXIQueryPointer(ClientPtr /* client */);
+int SProcXIQueryPointer(ClientPtr /* client */ );
+int ProcXIQueryPointer(ClientPtr /* client */ );
void SRepXIQueryPointer(ClientPtr /* client */ ,
- int /* size */ ,
- xXIQueryPointerReply * /* rep */);
+ int /* size */ ,
+ xXIQueryPointerReply * /* rep */ );
-#endif /* QUERYDP_H */
+#endif /* QUERYDP_H */
diff --git a/xorg-server/Xi/xiqueryversion.h b/xorg-server/Xi/xiqueryversion.h
index 06bb7291a..6dcedacc0 100644
--- a/xorg-server/Xi/xiqueryversion.h
+++ b/xorg-server/Xi/xiqueryversion.h
@@ -35,6 +35,6 @@
int SProcXIQueryVersion(ClientPtr client);
int ProcXIQueryVersion(ClientPtr client);
-void SRepXIQueryVersion(ClientPtr client, int size, xXIQueryVersionReply* rep);
+void SRepXIQueryVersion(ClientPtr client, int size, xXIQueryVersionReply * rep);
-#endif /* QUERYVERSION_H */
+#endif /* QUERYVERSION_H */
diff --git a/xorg-server/Xi/xiselectev.h b/xorg-server/Xi/xiselectev.h
index 21ec9371b..56681d398 100644
--- a/xorg-server/Xi/xiselectev.h
+++ b/xorg-server/Xi/xiselectev.h
@@ -35,6 +35,6 @@ int ProcXISelectEvents(ClientPtr client);
int SProcXIGetSelectedEvents(ClientPtr client);
int ProcXIGetSelectedEvents(ClientPtr client);
void SRepXIGetSelectedEvents(ClientPtr client,
- int len, xXIGetSelectedEventsReply *rep);
+ int len, xXIGetSelectedEventsReply * rep);
-#endif /* _XISELECTEVENTS_H_ */
+#endif /* _XISELECTEVENTS_H_ */
diff --git a/xorg-server/Xi/xisetclientpointer.h b/xorg-server/Xi/xisetclientpointer.h
index 5968d98da..f5c15bf49 100644
--- a/xorg-server/Xi/xisetclientpointer.h
+++ b/xorg-server/Xi/xisetclientpointer.h
@@ -30,7 +30,7 @@
#ifndef SETCPTR_H
#define SETCPTR_H 1
-int SProcXISetClientPointer(ClientPtr /* client */);
-int ProcXISetClientPointer(ClientPtr /* client */);
+int SProcXISetClientPointer(ClientPtr /* client */ );
+int ProcXISetClientPointer(ClientPtr /* client */ );
-#endif /* SETCPTR_H */
+#endif /* SETCPTR_H */
diff --git a/xorg-server/Xi/xisetdevfocus.c b/xorg-server/Xi/xisetdevfocus.c
index 294df7c32..b52c9cc99 100644
--- a/xorg-server/Xi/xisetdevfocus.c
+++ b/xorg-server/Xi/xisetdevfocus.c
@@ -32,12 +32,12 @@
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
-#include "windowstr.h" /* window structure */
+#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* window structure */
#include <X11/extensions/XI2.h>
#include <X11/extensions/XI2proto.h>
-#include "exglobals.h" /* BadDevice */
+#include "exglobals.h" /* BadDevice */
#include "xisetdevfocus.h"
int
@@ -73,12 +73,12 @@ ProcXISetFocus(ClientPtr client)
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetFocusAccess);
if (ret != Success)
- return ret;
+ return ret;
if (!dev->focus)
- return BadDevice;
+ return BadDevice;
return SetInputFocus(client, dev, stuff->focus, RevertToParent,
- stuff->time, TRUE);
+ stuff->time, TRUE);
}
int
@@ -93,9 +93,9 @@ ProcXIGetFocus(ClientPtr client)
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetFocusAccess);
if (ret != Success)
- return ret;
+ return ret;
if (!dev->focus)
- return BadDevice;
+ return BadDevice;
rep.repType = X_Reply;
rep.RepType = X_XIGetFocus;
@@ -103,23 +103,23 @@ ProcXIGetFocus(ClientPtr client)
rep.sequenceNumber = client->sequence;
if (dev->focus->win == NoneWin)
- rep.focus = None;
+ rep.focus = None;
else if (dev->focus->win == PointerRootWin)
- rep.focus = PointerRoot;
+ rep.focus = PointerRoot;
else if (dev->focus->win == FollowKeyboardWin)
- rep.focus = FollowKeyboard;
+ rep.focus = FollowKeyboard;
else
- rep.focus = dev->focus->win->drawable.id;
+ rep.focus = dev->focus->win->drawable.id;
WriteReplyToClient(client, sizeof(xXIGetFocusReply), &rep);
return Success;
}
void
-SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply *rep)
+SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
swapl(&rep->focus);
- WriteToClient(client, len, (char *)rep);
+ WriteToClient(client, len, (char *) rep);
}
diff --git a/xorg-server/Xi/xisetdevfocus.h b/xorg-server/Xi/xisetdevfocus.h
index 2c3243d86..0865a72d4 100644
--- a/xorg-server/Xi/xisetdevfocus.h
+++ b/xorg-server/Xi/xisetdevfocus.h
@@ -36,5 +36,5 @@ int ProcXISetFocus(ClientPtr client);
int SProcXIGetFocus(ClientPtr client);
int ProcXIGetFocus(ClientPtr client);
-void SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply* rep);
-#endif /* XISETDEVFOCUS_H */
+void SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply * rep);
+#endif /* XISETDEVFOCUS_H */
diff --git a/xorg-server/Xi/xiwarppointer.h b/xorg-server/Xi/xiwarppointer.h
index aafc73904..7637f422a 100644
--- a/xorg-server/Xi/xiwarppointer.h
+++ b/xorg-server/Xi/xiwarppointer.h
@@ -30,7 +30,7 @@
#ifndef WARPDEVP_H
#define WARPDEVP_H 1
-int SProcXIWarpPointer(ClientPtr /* client */);
-int ProcXIWarpPointer(ClientPtr /* client */);
+int SProcXIWarpPointer(ClientPtr /* client */ );
+int ProcXIWarpPointer(ClientPtr /* client */ );
-#endif /* WARPDEVP_H */
+#endif /* WARPDEVP_H */
diff --git a/xorg-server/composite/compositeext.h b/xorg-server/composite/compositeext.h
index b20bab158..600604d8d 100644
--- a/xorg-server/composite/compositeext.h
+++ b/xorg-server/composite/compositeext.h
@@ -32,7 +32,7 @@
#include "scrnintstr.h"
extern _X_EXPORT Bool CompositeRegisterAlternateVisuals(ScreenPtr pScreen,
- VisualID *vids,
+ VisualID * vids,
int nVisuals);
-#endif /* _COMPOSITEEXT_H_ */
+#endif /* _COMPOSITEEXT_H_ */
diff --git a/xorg-server/config/config-backends.h b/xorg-server/config/config-backends.h
index 10743c38a..e5622d51e 100644
--- a/xorg-server/config/config-backends.h
+++ b/xorg-server/config/config-backends.h
@@ -37,12 +37,12 @@ int config_udev_init(void);
void config_udev_fini(void);
#else
-# ifdef CONFIG_NEED_DBUS
+#ifdef CONFIG_NEED_DBUS
#include <dbus/dbus.h>
-typedef void (*config_dbus_core_connect_hook)(DBusConnection *connection,
- void *data);
-typedef void (*config_dbus_core_disconnect_hook)(void *data);
+typedef void (*config_dbus_core_connect_hook) (DBusConnection * connection,
+ void *data);
+typedef void (*config_dbus_core_disconnect_hook) (void *data);
struct config_dbus_core_hook {
config_dbus_core_connect_hook connect;
@@ -56,17 +56,17 @@ int config_dbus_core_init(void);
void config_dbus_core_fini(void);
int config_dbus_core_add_hook(struct config_dbus_core_hook *hook);
void config_dbus_core_remove_hook(struct config_dbus_core_hook *hook);
-# endif
+#endif
-# ifdef CONFIG_DBUS_API
+#ifdef CONFIG_DBUS_API
int config_dbus_init(void);
void config_dbus_fini(void);
-# endif
+#endif
-# ifdef CONFIG_HAL
+#ifdef CONFIG_HAL
int config_hal_init(void);
void config_hal_fini(void);
-# endif
+#endif
#endif
#ifdef CONFIG_WSCONS
diff --git a/xorg-server/damageext/damageext.h b/xorg-server/damageext/damageext.h
index 642800bd2..bd9963509 100644
--- a/xorg-server/damageext/damageext.h
+++ b/xorg-server/damageext/damageext.h
@@ -28,6 +28,6 @@
#define _DAMAGEEXT_H_
void
-DamageExtensionInit(void);
+ DamageExtensionInit(void);
-#endif /* _DAMAGEEXT_H_ */
+#endif /* _DAMAGEEXT_H_ */
diff --git a/xorg-server/damageext/damageextint.h b/xorg-server/damageext/damageextint.h
index f291f043c..b7e63e077 100644
--- a/xorg-server/damageext/damageextint.h
+++ b/xorg-server/damageext/damageextint.h
@@ -1,71 +1,71 @@
-/*
- * Copyright © 2002 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _DAMAGEEXTINT_H_
-#define _DAMAGEEXTINT_H_
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "os.h"
-#include "dixstruct.h"
-#include "extnsionst.h"
-#include <X11/extensions/damageproto.h>
-#include "windowstr.h"
-#include "selection.h"
-#include "scrnintstr.h"
-#include "damageext.h"
-#include "damage.h"
-#include "xfixes.h"
-
-typedef struct _DamageClient {
- CARD32 major_version;
- CARD32 minor_version;
- int critical;
-} DamageClientRec, *DamageClientPtr;
-
-#define GetDamageClient(pClient) ((DamageClientPtr)dixLookupPrivate(&(pClient)->devPrivates, DamageClientPrivateKey))
-
-typedef struct _DamageExt {
- DamagePtr pDamage;
- DrawablePtr pDrawable;
- DamageReportLevel level;
- ClientPtr pClient;
- XID id;
- XID drawable;
-} DamageExtRec, *DamageExtPtr;
-
-#define VERIFY_DAMAGEEXT(pDamageExt, rid, client, mode) { \
- int rc = dixLookupResourceByType((pointer *)&(pDamageExt), rid, \
- DamageExtType, client, mode); \
- if (rc != Success) \
- return rc; \
-}
-
-void
-DamageExtSetCritical (ClientPtr pClient, Bool critical);
-
-#endif /* _DAMAGEEXTINT_H_ */
+/*
+ * Copyright © 2002 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _DAMAGEEXTINT_H_
+#define _DAMAGEEXTINT_H_
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "misc.h"
+#include "os.h"
+#include "dixstruct.h"
+#include "extnsionst.h"
+#include <X11/extensions/damageproto.h>
+#include "windowstr.h"
+#include "selection.h"
+#include "scrnintstr.h"
+#include "damageext.h"
+#include "damage.h"
+#include "xfixes.h"
+
+typedef struct _DamageClient {
+ CARD32 major_version;
+ CARD32 minor_version;
+ int critical;
+} DamageClientRec, *DamageClientPtr;
+
+#define GetDamageClient(pClient) ((DamageClientPtr)dixLookupPrivate(&(pClient)->devPrivates, DamageClientPrivateKey))
+
+typedef struct _DamageExt {
+ DamagePtr pDamage;
+ DrawablePtr pDrawable;
+ DamageReportLevel level;
+ ClientPtr pClient;
+ XID id;
+ XID drawable;
+} DamageExtRec, *DamageExtPtr;
+
+#define VERIFY_DAMAGEEXT(pDamageExt, rid, client, mode) { \
+ int rc = dixLookupResourceByType((pointer *)&(pDamageExt), rid, \
+ DamageExtType, client, mode); \
+ if (rc != Success) \
+ return rc; \
+}
+
+void
+ DamageExtSetCritical(ClientPtr pClient, Bool critical);
+
+#endif /* _DAMAGEEXTINT_H_ */
diff --git a/xorg-server/dix/dispatch.h b/xorg-server/dix/dispatch.h
index 718684724..3f3f3a2d9 100644
--- a/xorg-server/dix/dispatch.h
+++ b/xorg-server/dix/dispatch.h
@@ -1,145 +1,145 @@
-/************************************************************
-
-Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of the above listed
-copyright holder(s) not be used in advertising or publicity pertaining
-to distribution of the software without specific, written prior
-permission.
-
-THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
-TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
-LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-********************************************************/
-
-/*
- * This prototypes the dispatch.c module (except for functions declared in
- * global headers), plus related dispatch procedures from devices.c, events.c,
- * extension.c, property.c.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef DISPATCH_H
-#define DISPATCH_H 1
-
-int ProcAllocColor(ClientPtr /* client */);
-int ProcAllocColorCells(ClientPtr /* client */);
-int ProcAllocColorPlanes(ClientPtr /* client */);
-int ProcAllocNamedColor(ClientPtr /* client */);
-int ProcBell(ClientPtr /* client */);
-int ProcChangeAccessControl(ClientPtr /* client */);
-int ProcChangeCloseDownMode(ClientPtr /* client */);
-int ProcChangeGC(ClientPtr /* client */);
-int ProcChangeHosts(ClientPtr /* client */);
-int ProcChangeKeyboardControl(ClientPtr /* client */);
-int ProcChangeKeyboardMapping(ClientPtr /* client */);
-int ProcChangePointerControl(ClientPtr /* client */);
-int ProcChangeProperty(ClientPtr /* client */);
-int ProcChangeSaveSet(ClientPtr /* client */);
-int ProcChangeWindowAttributes(ClientPtr /* client */);
-int ProcCirculateWindow(ClientPtr /* client */);
-int ProcClearToBackground(ClientPtr /* client */);
-int ProcCloseFont(ClientPtr /* client */);
-int ProcConfigureWindow(ClientPtr /* client */);
-int ProcConvertSelection(ClientPtr /* client */);
-int ProcCopyArea(ClientPtr /* client */);
-int ProcCopyColormapAndFree(ClientPtr /* client */);
-int ProcCopyGC(ClientPtr /* client */);
-int ProcCopyPlane(ClientPtr /* client */);
-int ProcCreateColormap(ClientPtr /* client */);
-int ProcCreateCursor(ClientPtr /* client */);
-int ProcCreateGC(ClientPtr /* client */);
-int ProcCreateGlyphCursor(ClientPtr /* client */);
-int ProcCreatePixmap(ClientPtr /* client */);
-int ProcCreateWindow(ClientPtr /* client */);
-int ProcDeleteProperty(ClientPtr /* client */);
-int ProcDestroySubwindows(ClientPtr /* client */);
-int ProcDestroyWindow(ClientPtr /* client */);
-int ProcEstablishConnection(ClientPtr /* client */);
-int ProcFillPoly(ClientPtr /* client */);
-int ProcForceScreenSaver(ClientPtr /* client */);
-int ProcFreeColormap(ClientPtr /* client */);
-int ProcFreeColors(ClientPtr /* client */);
-int ProcFreeCursor(ClientPtr /* client */);
-int ProcFreeGC(ClientPtr /* client */);
-int ProcFreePixmap(ClientPtr /* client */);
-int ProcGetAtomName(ClientPtr /* client */);
-int ProcGetFontPath(ClientPtr /* client */);
-int ProcGetGeometry(ClientPtr /* client */);
-int ProcGetImage(ClientPtr /* client */);
-int ProcGetKeyboardControl(ClientPtr /* client */);
-int ProcGetKeyboardMapping(ClientPtr /* client */);
-int ProcGetModifierMapping(ClientPtr /* client */);
-int ProcGetMotionEvents(ClientPtr /* client */);
-int ProcGetPointerControl(ClientPtr /* client */);
-int ProcGetPointerMapping(ClientPtr /* client */);
-int ProcGetProperty(ClientPtr /* client */);
-int ProcGetScreenSaver(ClientPtr /* client */);
-int ProcGetSelectionOwner(ClientPtr /* client */);
-int ProcGetWindowAttributes(ClientPtr /* client */);
-int ProcGrabServer(ClientPtr /* client */);
-int ProcImageText16(ClientPtr /* client */);
-int ProcImageText8(ClientPtr /* client */);
-int ProcInitialConnection(ClientPtr /* client */);
-int ProcInstallColormap(ClientPtr /* client */);
-int ProcInternAtom(ClientPtr /* client */);
-int ProcKillClient(ClientPtr /* client */);
-int ProcListExtensions(ClientPtr /* client */);
-int ProcListFonts(ClientPtr /* client */);
-int ProcListFontsWithInfo(ClientPtr /* client */);
-int ProcListHosts(ClientPtr /* client */);
-int ProcListInstalledColormaps(ClientPtr /* client */);
-int ProcListProperties(ClientPtr /* client */);
-int ProcLookupColor(ClientPtr /* client */);
-int ProcMapSubwindows(ClientPtr /* client */);
-int ProcMapWindow(ClientPtr /* client */);
-int ProcNoOperation(ClientPtr /* client */);
-int ProcOpenFont(ClientPtr /* client */);
-int ProcPolyArc(ClientPtr /* client */);
-int ProcPolyFillArc(ClientPtr /* client */);
-int ProcPolyFillRectangle(ClientPtr /* client */);
-int ProcPolyLine(ClientPtr /* client */);
-int ProcPolyPoint(ClientPtr /* client */);
-int ProcPolyRectangle(ClientPtr /* client */);
-int ProcPolySegment(ClientPtr /* client */);
-int ProcPolyText(ClientPtr /* client */);
-int ProcPutImage(ClientPtr /* client */);
-int ProcQueryBestSize(ClientPtr /* client */);
-int ProcQueryColors(ClientPtr /* client */);
-int ProcQueryExtension(ClientPtr /* client */);
-int ProcQueryFont(ClientPtr /* client */);
-int ProcQueryKeymap(ClientPtr /* client */);
-int ProcQueryTextExtents(ClientPtr /* client */);
-int ProcQueryTree(ClientPtr /* client */);
-int ProcReparentWindow(ClientPtr /* client */);
-int ProcRotateProperties(ClientPtr /* client */);
-int ProcSetClipRectangles(ClientPtr /* client */);
-int ProcSetDashes(ClientPtr /* client */);
-int ProcSetFontPath(ClientPtr /* client */);
-int ProcSetModifierMapping(ClientPtr /* client */);
-int ProcSetPointerMapping(ClientPtr /* client */);
-int ProcSetScreenSaver(ClientPtr /* client */);
-int ProcSetSelectionOwner(ClientPtr /* client */);
-int ProcStoreColors(ClientPtr /* client */);
-int ProcStoreNamedColor(ClientPtr /* client */);
-int ProcTranslateCoords(ClientPtr /* client */);
-int ProcUngrabServer(ClientPtr /* client */);
-int ProcUninstallColormap(ClientPtr /* client */);
-int ProcUnmapSubwindows(ClientPtr /* client */);
-int ProcUnmapWindow(ClientPtr /* client */);
-
-#endif /* DISPATCH_H */
+/************************************************************
+
+Copyright 1996 by Thomas E. Dickey <dickey@clark.net>
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of the above listed
+copyright holder(s) not be used in advertising or publicity pertaining
+to distribution of the software without specific, written prior
+permission.
+
+THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
+TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+/*
+ * This prototypes the dispatch.c module (except for functions declared in
+ * global headers), plus related dispatch procedures from devices.c, events.c,
+ * extension.c, property.c.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef DISPATCH_H
+#define DISPATCH_H 1
+
+int ProcAllocColor(ClientPtr /* client */ );
+int ProcAllocColorCells(ClientPtr /* client */ );
+int ProcAllocColorPlanes(ClientPtr /* client */ );
+int ProcAllocNamedColor(ClientPtr /* client */ );
+int ProcBell(ClientPtr /* client */ );
+int ProcChangeAccessControl(ClientPtr /* client */ );
+int ProcChangeCloseDownMode(ClientPtr /* client */ );
+int ProcChangeGC(ClientPtr /* client */ );
+int ProcChangeHosts(ClientPtr /* client */ );
+int ProcChangeKeyboardControl(ClientPtr /* client */ );
+int ProcChangeKeyboardMapping(ClientPtr /* client */ );
+int ProcChangePointerControl(ClientPtr /* client */ );
+int ProcChangeProperty(ClientPtr /* client */ );
+int ProcChangeSaveSet(ClientPtr /* client */ );
+int ProcChangeWindowAttributes(ClientPtr /* client */ );
+int ProcCirculateWindow(ClientPtr /* client */ );
+int ProcClearToBackground(ClientPtr /* client */ );
+int ProcCloseFont(ClientPtr /* client */ );
+int ProcConfigureWindow(ClientPtr /* client */ );
+int ProcConvertSelection(ClientPtr /* client */ );
+int ProcCopyArea(ClientPtr /* client */ );
+int ProcCopyColormapAndFree(ClientPtr /* client */ );
+int ProcCopyGC(ClientPtr /* client */ );
+int ProcCopyPlane(ClientPtr /* client */ );
+int ProcCreateColormap(ClientPtr /* client */ );
+int ProcCreateCursor(ClientPtr /* client */ );
+int ProcCreateGC(ClientPtr /* client */ );
+int ProcCreateGlyphCursor(ClientPtr /* client */ );
+int ProcCreatePixmap(ClientPtr /* client */ );
+int ProcCreateWindow(ClientPtr /* client */ );
+int ProcDeleteProperty(ClientPtr /* client */ );
+int ProcDestroySubwindows(ClientPtr /* client */ );
+int ProcDestroyWindow(ClientPtr /* client */ );
+int ProcEstablishConnection(ClientPtr /* client */ );
+int ProcFillPoly(ClientPtr /* client */ );
+int ProcForceScreenSaver(ClientPtr /* client */ );
+int ProcFreeColormap(ClientPtr /* client */ );
+int ProcFreeColors(ClientPtr /* client */ );
+int ProcFreeCursor(ClientPtr /* client */ );
+int ProcFreeGC(ClientPtr /* client */ );
+int ProcFreePixmap(ClientPtr /* client */ );
+int ProcGetAtomName(ClientPtr /* client */ );
+int ProcGetFontPath(ClientPtr /* client */ );
+int ProcGetGeometry(ClientPtr /* client */ );
+int ProcGetImage(ClientPtr /* client */ );
+int ProcGetKeyboardControl(ClientPtr /* client */ );
+int ProcGetKeyboardMapping(ClientPtr /* client */ );
+int ProcGetModifierMapping(ClientPtr /* client */ );
+int ProcGetMotionEvents(ClientPtr /* client */ );
+int ProcGetPointerControl(ClientPtr /* client */ );
+int ProcGetPointerMapping(ClientPtr /* client */ );
+int ProcGetProperty(ClientPtr /* client */ );
+int ProcGetScreenSaver(ClientPtr /* client */ );
+int ProcGetSelectionOwner(ClientPtr /* client */ );
+int ProcGetWindowAttributes(ClientPtr /* client */ );
+int ProcGrabServer(ClientPtr /* client */ );
+int ProcImageText16(ClientPtr /* client */ );
+int ProcImageText8(ClientPtr /* client */ );
+int ProcInitialConnection(ClientPtr /* client */ );
+int ProcInstallColormap(ClientPtr /* client */ );
+int ProcInternAtom(ClientPtr /* client */ );
+int ProcKillClient(ClientPtr /* client */ );
+int ProcListExtensions(ClientPtr /* client */ );
+int ProcListFonts(ClientPtr /* client */ );
+int ProcListFontsWithInfo(ClientPtr /* client */ );
+int ProcListHosts(ClientPtr /* client */ );
+int ProcListInstalledColormaps(ClientPtr /* client */ );
+int ProcListProperties(ClientPtr /* client */ );
+int ProcLookupColor(ClientPtr /* client */ );
+int ProcMapSubwindows(ClientPtr /* client */ );
+int ProcMapWindow(ClientPtr /* client */ );
+int ProcNoOperation(ClientPtr /* client */ );
+int ProcOpenFont(ClientPtr /* client */ );
+int ProcPolyArc(ClientPtr /* client */ );
+int ProcPolyFillArc(ClientPtr /* client */ );
+int ProcPolyFillRectangle(ClientPtr /* client */ );
+int ProcPolyLine(ClientPtr /* client */ );
+int ProcPolyPoint(ClientPtr /* client */ );
+int ProcPolyRectangle(ClientPtr /* client */ );
+int ProcPolySegment(ClientPtr /* client */ );
+int ProcPolyText(ClientPtr /* client */ );
+int ProcPutImage(ClientPtr /* client */ );
+int ProcQueryBestSize(ClientPtr /* client */ );
+int ProcQueryColors(ClientPtr /* client */ );
+int ProcQueryExtension(ClientPtr /* client */ );
+int ProcQueryFont(ClientPtr /* client */ );
+int ProcQueryKeymap(ClientPtr /* client */ );
+int ProcQueryTextExtents(ClientPtr /* client */ );
+int ProcQueryTree(ClientPtr /* client */ );
+int ProcReparentWindow(ClientPtr /* client */ );
+int ProcRotateProperties(ClientPtr /* client */ );
+int ProcSetClipRectangles(ClientPtr /* client */ );
+int ProcSetDashes(ClientPtr /* client */ );
+int ProcSetFontPath(ClientPtr /* client */ );
+int ProcSetModifierMapping(ClientPtr /* client */ );
+int ProcSetPointerMapping(ClientPtr /* client */ );
+int ProcSetScreenSaver(ClientPtr /* client */ );
+int ProcSetSelectionOwner(ClientPtr /* client */ );
+int ProcStoreColors(ClientPtr /* client */ );
+int ProcStoreNamedColor(ClientPtr /* client */ );
+int ProcTranslateCoords(ClientPtr /* client */ );
+int ProcUngrabServer(ClientPtr /* client */ );
+int ProcUninstallColormap(ClientPtr /* client */ );
+int ProcUnmapSubwindows(ClientPtr /* client */ );
+int ProcUnmapWindow(ClientPtr /* client */ );
+
+#endif /* DISPATCH_H */
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index 447094757..b9f9cfa3c 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -5098,8 +5098,7 @@ ProcQueryPointer(ClientPtr client)
memset(&rep, 0, sizeof(xQueryPointerReply));
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
- rep.mask = mouse->button ? (mouse->button->state) : 0;
- rep.mask |= XkbStateFieldFromRec(&keyboard->key->xkbInfo->state);
+ rep.mask = event_get_corestate(mouse, keyboard);
rep.length = 0;
rep.root = (GetCurrentRootWindow(mouse))->drawable.id;
rep.rootX = pSprite->hot.x;
diff --git a/xorg-server/dix/ffs.c b/xorg-server/dix/ffs.c
index d0bd3e507..f0400cbd1 100644
--- a/xorg-server/dix/ffs.c
+++ b/xorg-server/dix/ffs.c
@@ -38,10 +38,11 @@ int
ffs(int i)
{
int j;
+
if (i == 0)
return 0;
for (j = 1; (i & 1) == 0; j++)
- i >>= 1;
+ i >>= 1;
return j;
}
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index 3093786c3..23bbe065c 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -848,7 +848,7 @@ scale_to_desktop(DeviceIntPtr dev, ValuatorMask *mask,
ScreenPtr scr = miPointerGetScreen(dev);
double x, y;
- BUG_WARN(!dev->valuator || dev->valuator->numAxes < 2);
+ BUG_WARN(dev->valuator && dev->valuator->numAxes < 2);
if (!dev->valuator || dev->valuator->numAxes < 2) {
/* if we have no axes, last.valuators must be in screen coords
* anyway */
diff --git a/xorg-server/fb/fbbits.c b/xorg-server/fb/fbbits.c
index 850d1632e..ac44f3e67 100644
--- a/xorg-server/fb/fbbits.c
+++ b/xorg-server/fb/fbbits.c
@@ -139,7 +139,7 @@
#undef BITSMUL
#undef BITSUNIT
#undef BITS
-
+
#undef BRESSOLID
#undef BRESDASH
#undef DOTS
diff --git a/xorg-server/fb/fbrop.h b/xorg-server/fb/fbrop.h
index a01fdabfe..4362adb37 100644
--- a/xorg-server/fb/fbrop.h
+++ b/xorg-server/fb/fbrop.h
@@ -24,10 +24,10 @@
#define _FBROP_H_
typedef struct _mergeRopBits {
- FbBits ca1, cx1, ca2, cx2;
+ FbBits ca1, cx1, ca2, cx2;
} FbMergeRopRec, *FbMergeRopPtr;
-extern _X_EXPORT const FbMergeRopRec FbMergeRopBits[16];
+extern _X_EXPORT const FbMergeRopRec FbMergeRopBits[16];
#define FbDeclareMergeRop() FbBits _ca1, _cx1, _ca2, _cx2;
#define FbDeclarePrebuiltMergeRop() FbBits _cca, _ccx;
@@ -95,21 +95,22 @@ extern _X_EXPORT const FbMergeRopRec FbMergeRopBits[16];
* Stippling operations;
*/
-extern _X_EXPORT const FbBits fbStipple16Bits[256]; /* half of table */
+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[];
+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)
#define FbStippleRRopMask(dst, b, fa, fx, ba, bx, m) \
(FbDoMaskRRop(dst, fa, fx, m) & (b)) | (FbDoMaskRRop(dst, ba, bx, m) & ~(b))
-
+
#define FbDoLeftMaskByteStippleRRop(dst, b, fa, fx, ba, bx, lb, l) { \
FbBits __xor = ((fx) & (b)) | ((bx) & ~(b)); \
FbDoLeftMaskByteRRop(dst, lb, l, ((fa) & (b)) | ((ba) & ~(b)), __xor); \
@@ -121,7 +122,7 @@ extern _X_EXPORT const FbBits *const fbStippleTable[];
}
#define FbOpaqueStipple(b, fg, bg) (((fg) & (b)) | ((bg) & ~(b)))
-
+
/*
* Compute rop for using tile code for 1-bit dest stipples; modifies
* existing rop to flip depending on pixel values
diff --git a/xorg-server/glx/extension_string.c b/xorg-server/glx/extension_string.c
index 7721cb056..866f8bf45 100644
--- a/xorg-server/glx/extension_string.c
+++ b/xorg-server/glx/extension_string.c
@@ -45,10 +45,10 @@
#define EXT_ENABLED(bit,supported) (IS_SET(supported, bit))
struct extension_info {
- const char * const name;
- unsigned name_len;
+ const char *const name;
+ unsigned name_len;
- unsigned char bit;
+ unsigned char bit;
/**
* This is the lowest version of GLX that "requires" this extension.
@@ -56,37 +56,36 @@ struct extension_info {
* SGI_make_current_read. If the extension is not required by any known
* version of GLX, use 0, 0.
*/
- unsigned char version_major;
- unsigned char version_minor;
+ unsigned char version_major;
+ unsigned char version_minor;
/**
* Is driver support forced by the ABI?
*/
- unsigned char driver_support;
+ unsigned char driver_support;
};
static const struct extension_info known_glx_extensions[] = {
/* GLX_ARB_get_proc_address is implemented on the client. */
- { GLX(ARB_multisample), VER(1,4), Y, },
-
- { GLX(EXT_import_context), VER(0,0), Y, },
- { GLX(EXT_texture_from_pixmap), VER(0,0), Y, },
- { GLX(EXT_visual_info), VER(0,0), Y, },
- { GLX(EXT_visual_rating), VER(0,0), Y, },
-
- { GLX(MESA_copy_sub_buffer), VER(0,0), N, },
- { GLX(OML_swap_method), VER(0,0), Y, },
- { GLX(SGI_make_current_read), VER(1,3), N, },
- { GLX(SGI_swap_control), VER(0,0), N, },
- { GLX(SGIS_multisample), VER(0,0), Y, },
- { GLX(SGIX_fbconfig), VER(1,3), Y, },
- { GLX(SGIX_pbuffer), VER(1,3), Y, },
- { GLX(SGIX_visual_select_group), VER(0,0), Y, },
- { GLX(INTEL_swap_event), VER(1,4), N, },
- { NULL }
+ {GLX(ARB_multisample), VER(1, 4), Y,},
+
+ {GLX(EXT_import_context), VER(0, 0), Y,},
+ {GLX(EXT_texture_from_pixmap), VER(0, 0), Y,},
+ {GLX(EXT_visual_info), VER(0, 0), Y,},
+ {GLX(EXT_visual_rating), VER(0, 0), Y,},
+
+ {GLX(MESA_copy_sub_buffer), VER(0, 0), N,},
+ {GLX(OML_swap_method), VER(0, 0), Y,},
+ {GLX(SGI_make_current_read), VER(1, 3), N,},
+ {GLX(SGI_swap_control), VER(0, 0), N,},
+ {GLX(SGIS_multisample), VER(0, 0), Y,},
+ {GLX(SGIX_fbconfig), VER(1, 3), Y,},
+ {GLX(SGIX_pbuffer), VER(1, 3), Y,},
+ {GLX(SGIX_visual_select_group), VER(0, 0), Y,},
+ {GLX(INTEL_swap_event), VER(1, 4), N,},
+ {NULL}
};
-
/**
* Create a GLX extension string for a set of enable bits.
*
@@ -111,56 +110,51 @@ __glXGetExtensionString(const unsigned char *enable_bits, char *buffer)
unsigned i;
int length = 0;
-
for (i = 0; known_glx_extensions[i].name != NULL; i++) {
- const unsigned bit = known_glx_extensions[i].bit;
- const size_t len = known_glx_extensions[i].name_len;
-
- if (EXT_ENABLED(bit, enable_bits)) {
- if (buffer != NULL) {
- (void) memcpy(& buffer[length], known_glx_extensions[i].name,
- len);
-
- buffer[length + len + 0] = ' ';
- buffer[length + len + 1] = '\0';
- }
-
- length += len + 1;
- }
+ const unsigned bit = known_glx_extensions[i].bit;
+ const size_t len = known_glx_extensions[i].name_len;
+
+ if (EXT_ENABLED(bit, enable_bits)) {
+ if (buffer != NULL) {
+ (void) memcpy(&buffer[length], known_glx_extensions[i].name,
+ len);
+
+ buffer[length + len + 0] = ' ';
+ buffer[length + len + 1] = '\0';
+ }
+
+ length += len + 1;
+ }
}
return length + 1;
}
-
void
__glXEnableExtension(unsigned char *enable_bits, const char *ext)
{
const size_t ext_name_len = strlen(ext);
unsigned i;
-
for (i = 0; known_glx_extensions[i].name != NULL; i++) {
- if ((ext_name_len == known_glx_extensions[i].name_len)
- && (memcmp(ext, known_glx_extensions[i].name, ext_name_len) == 0)) {
- SET_BIT(enable_bits, known_glx_extensions[i].bit);
- break;
- }
+ if ((ext_name_len == known_glx_extensions[i].name_len)
+ && (memcmp(ext, known_glx_extensions[i].name, ext_name_len) == 0)) {
+ SET_BIT(enable_bits, known_glx_extensions[i].bit);
+ break;
+ }
}
}
-
void
__glXInitExtensionEnableBits(unsigned char *enable_bits)
{
unsigned i;
-
(void) memset(enable_bits, 0, __GLX_EXT_BYTES);
for (i = 0; known_glx_extensions[i].name != NULL; i++) {
- if (known_glx_extensions[i].driver_support) {
- SET_BIT(enable_bits, known_glx_extensions[i].bit);
- }
+ if (known_glx_extensions[i].driver_support) {
+ SET_BIT(enable_bits, known_glx_extensions[i].bit);
+ }
}
}
diff --git a/xorg-server/glx/extension_string.h b/xorg-server/glx/extension_string.h
index 912534a04..e02213f8f 100644
--- a/xorg-server/glx/extension_string.h
+++ b/xorg-server/glx/extension_string.h
@@ -36,29 +36,29 @@
enum {
/* GLX_ARB_get_proc_address is implemented on the client. */
- ARB_multisample_bit = 0,
- EXT_import_context_bit,
- EXT_texture_from_pixmap_bit,
- EXT_visual_info_bit,
- EXT_visual_rating_bit,
- MESA_copy_sub_buffer_bit,
- OML_swap_method_bit,
- SGI_make_current_read_bit,
- SGI_swap_control_bit,
- SGI_video_sync_bit,
- SGIS_multisample_bit,
- SGIX_fbconfig_bit,
- SGIX_pbuffer_bit,
- SGIX_visual_select_group_bit,
- INTEL_swap_event_bit,
- __NUM_GLX_EXTS,
+ ARB_multisample_bit = 0,
+ EXT_import_context_bit,
+ EXT_texture_from_pixmap_bit,
+ EXT_visual_info_bit,
+ EXT_visual_rating_bit,
+ MESA_copy_sub_buffer_bit,
+ OML_swap_method_bit,
+ SGI_make_current_read_bit,
+ SGI_swap_control_bit,
+ SGI_video_sync_bit,
+ SGIS_multisample_bit,
+ SGIX_fbconfig_bit,
+ SGIX_pbuffer_bit,
+ SGIX_visual_select_group_bit,
+ INTEL_swap_event_bit,
+ __NUM_GLX_EXTS,
};
#define __GLX_EXT_BYTES ((__NUM_GLX_EXTS + 7) / 8)
extern int __glXGetExtensionString(const unsigned char *enable_bits,
- char *buffer);
+ char *buffer);
extern void __glXEnableExtension(unsigned char *enable_bits, const char *ext);
extern void __glXInitExtensionEnableBits(unsigned char *enable_bits);
-#endif /* GLX_EXTENSION_STRING_H */
+#endif /* GLX_EXTENSION_STRING_H */
diff --git a/xorg-server/glx/glxbyteorder.h b/xorg-server/glx/glxbyteorder.h
index cdf6b15f0..73f0f7df7 100644
--- a/xorg-server/glx/glxbyteorder.h
+++ b/xorg-server/glx/glxbyteorder.h
@@ -51,11 +51,11 @@
#define bswap_32(value) \
(((uint32_t)bswap_16((uint16_t)((value) & 0xffff)) << 16) | \
(uint32_t)bswap_16((uint16_t)((value) >> 16)))
-
+
#define bswap_64(value) \
(((uint64_t)bswap_32((uint32_t)((value) & 0xffffffff)) \
<< 32) | \
(uint64_t)bswap_32((uint32_t)((value) >> 32)))
#endif
-#endif /* !defined(__GLXBYTEORDER_H__) */
+#endif /* !defined(__GLXBYTEORDER_H__) */
diff --git a/xorg-server/glx/glxdrawable.h b/xorg-server/glx/glxdrawable.h
index 2a365c505..007658961 100644
--- a/xorg-server/glx/glxdrawable.h
+++ b/xorg-server/glx/glxdrawable.h
@@ -44,34 +44,34 @@ enum {
};
struct __GLXdrawable {
- void (*destroy)(__GLXdrawable *private);
- GLboolean (*swapBuffers)(ClientPtr client, __GLXdrawable *);
- void (*copySubBuffer)(__GLXdrawable *drawable,
- int x, int y, int w, int h);
- void (*waitX)(__GLXdrawable *);
- void (*waitGL)(__GLXdrawable *);
+ void (*destroy) (__GLXdrawable * private);
+ GLboolean(*swapBuffers) (ClientPtr client, __GLXdrawable *);
+ void (*copySubBuffer) (__GLXdrawable * drawable,
+ int x, int y, int w, int h);
+ void (*waitX) (__GLXdrawable *);
+ void (*waitGL) (__GLXdrawable *);
DrawablePtr pDraw;
XID drawId;
/*
- ** Either GLX_DRAWABLE_PIXMAP, GLX_DRAWABLE_WINDOW or
- ** GLX_DRAWABLE_PBUFFER.
- */
+ ** Either GLX_DRAWABLE_PIXMAP, GLX_DRAWABLE_WINDOW or
+ ** GLX_DRAWABLE_PBUFFER.
+ */
int type;
/*
- ** Configuration of the visual to which this drawable was created.
- */
+ ** Configuration of the visual to which this drawable was created.
+ */
__GLXconfig *config;
GLenum target;
GLenum format;
/*
- ** Event mask
- */
+ ** Event mask
+ */
unsigned long eventMask;
};
-#endif /* !__GLX_drawable_h__ */
+#endif /* !__GLX_drawable_h__ */
diff --git a/xorg-server/glx/glxext.h b/xorg-server/glx/glxext.h
index 58cf0540f..7cd5cb49f 100644
--- a/xorg-server/glx/glxext.h
+++ b/xorg-server/glx/glxext.h
@@ -35,17 +35,16 @@
* Silicon Graphics, Inc.
*/
-extern GLboolean __glXFreeContext(__GLXcontext *glxc);
+extern GLboolean __glXFreeContext(__GLXcontext * glxc);
extern void __glXFlushContextCache(void);
-extern void __glXAddToContextList(__GLXcontext *cx);
+extern void __glXAddToContextList(__GLXcontext * cx);
extern void __glXErrorCallBack(GLenum code);
extern void __glXClearErrorOccured(void);
extern GLboolean __glXErrorOccured(void);
-extern void __glXResetLargeCommandStatus(__GLXclientState*);
+extern void __glXResetLargeCommandStatus(__GLXclientState *);
extern const char GLServerVersion[];
-extern int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap);
-
-#endif /* _glxext_h_ */
+extern int DoGetString(__GLXclientState * cl, GLbyte * pc, GLboolean need_swap);
+#endif /* _glxext_h_ */
diff --git a/xorg-server/glx/glxutil.h b/xorg-server/glx/glxutil.h
index d1a715b4b..314606da2 100644
--- a/xorg-server/glx/glxutil.h
+++ b/xorg-server/glx/glxutil.h
@@ -35,17 +35,17 @@
* Silicon Graphics, Inc.
*/
-extern GLboolean __glXDrawableInit(__GLXdrawable *drawable,
- __GLXscreen *screen,
- DrawablePtr pDraw, int type, XID drawID,
- __GLXconfig *config);
-extern void __glXDrawableRelease(__GLXdrawable *drawable);
+extern GLboolean __glXDrawableInit(__GLXdrawable * drawable,
+ __GLXscreen * screen,
+ DrawablePtr pDraw, int type, XID drawID,
+ __GLXconfig * config);
+extern void __glXDrawableRelease(__GLXdrawable * drawable);
/* context helper routines */
-extern __GLXcontext *__glXLookupContextByTag(__GLXclientState*, GLXContextTag);
+extern __GLXcontext *__glXLookupContextByTag(__GLXclientState *, GLXContextTag);
/* init helper routines */
extern void *__glXglDDXScreenInfo(void);
extern void *__glXglDDXExtensionInfo(void);
-#endif /* _glxcmds_h_ */
+#endif /* _glxcmds_h_ */
diff --git a/xorg-server/glx/indirect_reqsize.c b/xorg-server/glx/indirect_reqsize.c
index 20e2a5de1..86ea9700f 100644
--- a/xorg-server/glx/indirect_reqsize.c
+++ b/xorg-server/glx/indirect_reqsize.c
@@ -25,7 +25,6 @@
* SOFTWARE.
*/
-
#include <GL/gl.h>
#include "glxserver.h"
#include "glxbyteorder.h"
@@ -48,9 +47,8 @@
{ return __glX ## to ## ReqSize( pc, swap ); }
#endif
-
int
-__glXCallListsReqSize(const GLbyte *pc, Bool swap)
+__glXCallListsReqSize(const GLbyte * pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 0);
GLenum type = *(GLenum *) (pc + 4);
@@ -66,7 +64,7 @@ __glXCallListsReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXBitmapReqSize(const GLbyte *pc, Bool swap)
+__glXBitmapReqSize(const GLbyte * pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
@@ -90,7 +88,7 @@ __glXBitmapReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXFogfvReqSize(const GLbyte *pc, Bool swap)
+__glXFogfvReqSize(const GLbyte * pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 0);
GLsizei compsize;
@@ -104,7 +102,7 @@ __glXFogfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXLightfvReqSize(const GLbyte *pc, Bool swap)
+__glXLightfvReqSize(const GLbyte * pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 4);
GLsizei compsize;
@@ -118,7 +116,7 @@ __glXLightfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXLightModelfvReqSize(const GLbyte *pc, Bool swap)
+__glXLightModelfvReqSize(const GLbyte * pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 0);
GLsizei compsize;
@@ -132,7 +130,7 @@ __glXLightModelfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXMaterialfvReqSize(const GLbyte *pc, Bool swap)
+__glXMaterialfvReqSize(const GLbyte * pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 4);
GLsizei compsize;
@@ -146,7 +144,7 @@ __glXMaterialfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXPolygonStippleReqSize(const GLbyte *pc, Bool swap)
+__glXPolygonStippleReqSize(const GLbyte * pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
@@ -166,7 +164,7 @@ __glXPolygonStippleReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexParameterfvReqSize(const GLbyte *pc, Bool swap)
+__glXTexParameterfvReqSize(const GLbyte * pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 4);
GLsizei compsize;
@@ -180,7 +178,7 @@ __glXTexParameterfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexImage1DReqSize(const GLbyte *pc, Bool swap)
+__glXTexImage1DReqSize(const GLbyte * pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
@@ -208,7 +206,7 @@ __glXTexImage1DReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexImage2DReqSize(const GLbyte *pc, Bool swap)
+__glXTexImage2DReqSize(const GLbyte * pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
@@ -238,7 +236,7 @@ __glXTexImage2DReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexEnvfvReqSize(const GLbyte *pc, Bool swap)
+__glXTexEnvfvReqSize(const GLbyte * pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 4);
GLsizei compsize;
@@ -252,7 +250,7 @@ __glXTexEnvfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexGendvReqSize(const GLbyte *pc, Bool swap)
+__glXTexGendvReqSize(const GLbyte * pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 4);
GLsizei compsize;
@@ -266,7 +264,7 @@ __glXTexGendvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexGenfvReqSize(const GLbyte *pc, Bool swap)
+__glXTexGenfvReqSize(const GLbyte * pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 4);
GLsizei compsize;
@@ -280,7 +278,7 @@ __glXTexGenfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXPixelMapfvReqSize(const GLbyte *pc, Bool swap)
+__glXPixelMapfvReqSize(const GLbyte * pc, Bool swap)
{
GLsizei mapsize = *(GLsizei *) (pc + 4);
@@ -292,7 +290,7 @@ __glXPixelMapfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXPixelMapusvReqSize(const GLbyte *pc, Bool swap)
+__glXPixelMapusvReqSize(const GLbyte * pc, Bool swap)
{
GLsizei mapsize = *(GLsizei *) (pc + 4);
@@ -304,7 +302,7 @@ __glXPixelMapusvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXDrawPixelsReqSize(const GLbyte *pc, Bool swap)
+__glXDrawPixelsReqSize(const GLbyte * pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
@@ -332,7 +330,7 @@ __glXDrawPixelsReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap)
+__glXPrioritizeTexturesReqSize(const GLbyte * pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 0);
@@ -344,7 +342,7 @@ __glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap)
+__glXTexSubImage1DReqSize(const GLbyte * pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
@@ -372,7 +370,7 @@ __glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap)
+__glXTexSubImage2DReqSize(const GLbyte * pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
@@ -402,7 +400,7 @@ __glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXColorTableReqSize(const GLbyte *pc, Bool swap)
+__glXColorTableReqSize(const GLbyte * pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
@@ -430,7 +428,7 @@ __glXColorTableReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap)
+__glXColorTableParameterfvReqSize(const GLbyte * pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 4);
GLsizei compsize;
@@ -444,7 +442,7 @@ __glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXColorSubTableReqSize(const GLbyte *pc, Bool swap)
+__glXColorSubTableReqSize(const GLbyte * pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
@@ -472,7 +470,7 @@ __glXColorSubTableReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap)
+__glXConvolutionFilter1DReqSize(const GLbyte * pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
@@ -500,7 +498,7 @@ __glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap)
+__glXConvolutionFilter2DReqSize(const GLbyte * pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
@@ -530,7 +528,7 @@ __glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap)
+__glXConvolutionParameterfvReqSize(const GLbyte * pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 4);
GLsizei compsize;
@@ -544,7 +542,7 @@ __glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexImage3DReqSize(const GLbyte *pc, Bool swap)
+__glXTexImage3DReqSize(const GLbyte * pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = *(GLint *) (pc + 8);
@@ -581,7 +579,7 @@ __glXTexImage3DReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap)
+__glXTexSubImage3DReqSize(const GLbyte * pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = *(GLint *) (pc + 8);
@@ -615,7 +613,7 @@ __glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap)
+__glXCompressedTexImage1DARBReqSize(const GLbyte * pc, Bool swap)
{
GLsizei imageSize = *(GLsizei *) (pc + 20);
@@ -627,7 +625,7 @@ __glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap)
+__glXCompressedTexImage2DARBReqSize(const GLbyte * pc, Bool swap)
{
GLsizei imageSize = *(GLsizei *) (pc + 24);
@@ -639,7 +637,7 @@ __glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap)
+__glXCompressedTexImage3DARBReqSize(const GLbyte * pc, Bool swap)
{
GLsizei imageSize = *(GLsizei *) (pc + 28);
@@ -651,7 +649,7 @@ __glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap)
+__glXCompressedTexSubImage3DARBReqSize(const GLbyte * pc, Bool swap)
{
GLsizei imageSize = *(GLsizei *) (pc + 36);
@@ -663,7 +661,7 @@ __glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXProgramStringARBReqSize(const GLbyte *pc, Bool swap)
+__glXProgramStringARBReqSize(const GLbyte * pc, Bool swap)
{
GLsizei len = *(GLsizei *) (pc + 8);
@@ -675,7 +673,7 @@ __glXProgramStringARBReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap)
+__glXDrawBuffersARBReqSize(const GLbyte * pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 0);
@@ -687,7 +685,7 @@ __glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap)
+__glXPointParameterfvEXTReqSize(const GLbyte * pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 0);
GLsizei compsize;
@@ -701,7 +699,7 @@ __glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap)
+__glXProgramParameters4dvNVReqSize(const GLbyte * pc, Bool swap)
{
GLsizei num = *(GLsizei *) (pc + 8);
@@ -713,7 +711,7 @@ __glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap)
+__glXProgramParameters4fvNVReqSize(const GLbyte * pc, Bool swap)
{
GLsizei num = *(GLsizei *) (pc + 8);
@@ -725,7 +723,7 @@ __glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap)
+__glXVertexAttribs1dvNVReqSize(const GLbyte * pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 4);
@@ -737,7 +735,7 @@ __glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap)
+__glXVertexAttribs2dvNVReqSize(const GLbyte * pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 4);
@@ -749,7 +747,7 @@ __glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap)
+__glXVertexAttribs3dvNVReqSize(const GLbyte * pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 4);
@@ -761,7 +759,7 @@ __glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap)
+__glXVertexAttribs3fvNVReqSize(const GLbyte * pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 4);
@@ -773,7 +771,7 @@ __glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap)
+__glXVertexAttribs3svNVReqSize(const GLbyte * pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 4);
@@ -785,7 +783,7 @@ __glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap)
+__glXVertexAttribs4dvNVReqSize(const GLbyte * pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 4);
@@ -797,7 +795,7 @@ __glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap)
}
int
-__glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap)
+__glXProgramNamedParameter4fvNVReqSize(const GLbyte * pc, Bool swap)
{
GLsizei len = *(GLsizei *) (pc + 4);
diff --git a/xorg-server/glx/indirect_size_get.c b/xorg-server/glx/indirect_size_get.c
index 3e5687d2f..da3a6cb85 100644
--- a/xorg-server/glx/indirect_size_get.c
+++ b/xorg-server/glx/indirect_size_get.c
@@ -25,7 +25,6 @@
* SOFTWARE.
*/
-
#include <X11/Xfuncproto.h>
#include <GL/gl.h>
#include "indirect_size_get.h"
@@ -45,7 +44,6 @@
#define FASTCALL
#endif
-
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(GLX_USE_APPLEGL)
#undef HAVE_ALIAS
#endif
@@ -60,7 +58,6 @@
{ return __gl ## to ## _size( e ); }
#endif
-
_X_INTERNAL PURE FASTCALL GLint
__glCallLists_size(GLenum e)
{
diff --git a/xorg-server/glx/indirect_table.h b/xorg-server/glx/indirect_table.h
index 4af1ccbea..a39dc4e3d 100644
--- a/xorg-server/glx/indirect_table.h
+++ b/xorg-server/glx/indirect_table.h
@@ -45,8 +45,8 @@ struct __glXDispatchInfo {
/**
*/
- const int_fast16_t * dispatch_tree;
-
+ const int_fast16_t *dispatch_tree;
+
/**
* Array of protocol decode and dispatch functions index by the opcode
* search tree (i.e., \c dispatch_tree). The first element in each pair
@@ -70,7 +70,7 @@ struct __glXDispatchInfo {
* If size checking is not to be performed on this type of protocol
* data, this pointer will be \c NULL.
*/
- const int_fast16_t (*size_table)[2];
+ const int_fast16_t(*size_table)[2];
/**
* Array of functions used to calculate the variable-size portion of
@@ -103,4 +103,4 @@ extern const struct __glXDispatchInfo Single_dispatch_info;
extern const struct __glXDispatchInfo Render_dispatch_info;
extern const struct __glXDispatchInfo VendorPriv_dispatch_info;
-#endif /* INDIRECT_TABLE_H */
+#endif /* INDIRECT_TABLE_H */
diff --git a/xorg-server/glx/singlesize.h b/xorg-server/glx/singlesize.h
index 78826dfb0..dc85d3d36 100644
--- a/xorg-server/glx/singlesize.h
+++ b/xorg-server/glx/singlesize.h
@@ -38,7 +38,7 @@
#include "indirect_size.h"
extern GLint __glReadPixels_size(GLenum format, GLenum type,
- GLint width, GLint height);
+ GLint width, GLint height);
extern GLint __glGetMap_size(GLenum pname, GLenum query);
extern GLint __glGetMapdv_size(GLenum target, GLenum query);
extern GLint __glGetMapfv_size(GLenum target, GLenum query);
@@ -48,7 +48,7 @@ extern GLint __glGetPixelMapfv_size(GLenum map);
extern GLint __glGetPixelMapuiv_size(GLenum map);
extern GLint __glGetPixelMapusv_size(GLenum map);
extern GLint __glGetTexImage_size(GLenum target, GLint level, GLenum format,
- GLenum type, GLint width, GLint height,
- GLint depth);
+ GLenum type, GLint width, GLint height,
+ GLint depth);
-#endif /* _singlesize_h_ */
+#endif /* _singlesize_h_ */
diff --git a/xorg-server/glx/unpack.h b/xorg-server/glx/unpack.h
index a5f211555..0a088fc33 100644
--- a/xorg-server/glx/unpack.h
+++ b/xorg-server/glx/unpack.h
@@ -1,234 +1,227 @@
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef __GLX_unpack_h__
-#define __GLX_unpack_h__
-
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#define __GLX_PAD(s) (((s)+3) & (GLuint)~3)
-
-/*
-** Fetch the context-id out of a SingleReq request pointed to by pc.
-*/
-#define __GLX_GET_SINGLE_CONTEXT_TAG(pc) (((xGLXSingleReq*)pc)->contextTag)
-#define __GLX_GET_VENDPRIV_CONTEXT_TAG(pc) (((xGLXVendorPrivateReq*)pc)->contextTag)
-
-/*
-** Fetch a double from potentially unaligned memory.
-*/
-#ifdef __GLX_ALIGN64
-#define __GLX_MEM_COPY(dst,src,n) memmove(dst,src,n)
-#define __GLX_GET_DOUBLE(dst,src) __GLX_MEM_COPY(&dst,src,8)
-#else
-#define __GLX_GET_DOUBLE(dst,src) (dst) = *((GLdouble*)(src))
-#endif
-
-extern void __glXMemInit(void);
-
-extern xGLXSingleReply __glXReply;
-
-#define __GLX_BEGIN_REPLY(size) \
- __glXReply.length = __GLX_PAD(size) >> 2; \
- __glXReply.type = X_Reply; \
- __glXReply.sequenceNumber = client->sequence;
-
-#define __GLX_SEND_HEADER() \
- WriteToClient( client, sz_xGLXSingleReply, (char *)&__glXReply);
-
-#define __GLX_PUT_RETVAL(a) \
- __glXReply.retval = (a);
-
-#define __GLX_PUT_SIZE(a) \
- __glXReply.size = (a);
-
-#define __GLX_PUT_RENDERMODE(m) \
- __glXReply.pad3 = (m)
-
-/*
-** Get a buffer to hold returned data, with the given alignment. If we have
-** to realloc, allocate size+align, in case the pointer has to be bumped for
-** alignment. The answerBuffer should already be aligned.
-**
-** NOTE: the cast (long)res below assumes a long is large enough to hold a
-** pointer.
-*/
-#define __GLX_GET_ANSWER_BUFFER(res,cl,size,align) \
- if ((size) > sizeof(answerBuffer)) { \
- int bump; \
- if ((cl)->returnBufSize < (size)+(align)) { \
- (cl)->returnBuf = (GLbyte*)realloc((cl)->returnBuf, \
- (size)+(align)); \
- if (!(cl)->returnBuf) { \
- return BadAlloc; \
- } \
- (cl)->returnBufSize = (size)+(align); \
- } \
- res = (char*)cl->returnBuf; \
- bump = (long)(res) % (align); \
- if (bump) res += (align) - (bump); \
- } else { \
- res = (char *)answerBuffer; \
- }
-
-#define __GLX_PUT_BYTE() \
- *(GLbyte *)&__glXReply.pad3 = *(GLbyte *)answer
-
-#define __GLX_PUT_SHORT() \
- *(GLshort *)&__glXReply.pad3 = *(GLshort *)answer
-
-#define __GLX_PUT_INT() \
- *(GLint *)&__glXReply.pad3 = *(GLint *)answer
-
-#define __GLX_PUT_FLOAT() \
- *(GLfloat *)&__glXReply.pad3 = *(GLfloat *)answer
-
-#define __GLX_PUT_DOUBLE() \
- *(GLdouble *)&__glXReply.pad3 = *(GLdouble *)answer
-
-#define __GLX_SEND_BYTE_ARRAY(len) \
- WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT8), (char *)answer)
-
-#define __GLX_SEND_SHORT_ARRAY(len) \
- WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT16), (char *)answer)
-
-#define __GLX_SEND_INT_ARRAY(len) \
- WriteToClient(client, (len)*__GLX_SIZE_INT32, (char *)answer)
-
-#define __GLX_SEND_FLOAT_ARRAY(len) \
- WriteToClient(client, (len)*__GLX_SIZE_FLOAT32, (char *)answer)
-
-#define __GLX_SEND_DOUBLE_ARRAY(len) \
- WriteToClient(client, (len)*__GLX_SIZE_FLOAT64, (char *)answer)
-
-
-#define __GLX_SEND_VOID_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len)
-#define __GLX_SEND_UBYTE_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len)
-#define __GLX_SEND_USHORT_ARRAY(len) __GLX_SEND_SHORT_ARRAY(len)
-#define __GLX_SEND_UINT_ARRAY(len) __GLX_SEND_INT_ARRAY(len)
-
-/*
-** PERFORMANCE NOTE:
-** Machine dependent optimizations abound here; these swapping macros can
-** conceivably be replaced with routines that do the job faster.
-*/
-#define __GLX_DECLARE_SWAP_VARIABLES \
- GLbyte sw
-
-#define __GLX_DECLARE_SWAP_ARRAY_VARIABLES \
- GLbyte *swapPC; \
- GLbyte *swapEnd
-
-
-#define __GLX_SWAP_INT(pc) \
- sw = ((GLbyte *)(pc))[0]; \
- ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \
- ((GLbyte *)(pc))[3] = sw; \
- sw = ((GLbyte *)(pc))[1]; \
- ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \
- ((GLbyte *)(pc))[2] = sw;
-
-#define __GLX_SWAP_SHORT(pc) \
- sw = ((GLbyte *)(pc))[0]; \
- ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[1]; \
- ((GLbyte *)(pc))[1] = sw;
-
-#define __GLX_SWAP_DOUBLE(pc) \
- sw = ((GLbyte *)(pc))[0]; \
- ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[7]; \
- ((GLbyte *)(pc))[7] = sw; \
- sw = ((GLbyte *)(pc))[1]; \
- ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[6]; \
- ((GLbyte *)(pc))[6] = sw; \
- sw = ((GLbyte *)(pc))[2]; \
- ((GLbyte *)(pc))[2] = ((GLbyte *)(pc))[5]; \
- ((GLbyte *)(pc))[5] = sw; \
- sw = ((GLbyte *)(pc))[3]; \
- ((GLbyte *)(pc))[3] = ((GLbyte *)(pc))[4]; \
- ((GLbyte *)(pc))[4] = sw;
-
-#define __GLX_SWAP_FLOAT(pc) \
- sw = ((GLbyte *)(pc))[0]; \
- ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \
- ((GLbyte *)(pc))[3] = sw; \
- sw = ((GLbyte *)(pc))[1]; \
- ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \
- ((GLbyte *)(pc))[2] = sw;
-
-#define __GLX_SWAP_INT_ARRAY(pc, count) \
- swapPC = ((GLbyte *)(pc)); \
- swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT32;\
- while (swapPC < swapEnd) { \
- __GLX_SWAP_INT(swapPC); \
- swapPC += __GLX_SIZE_INT32; \
- }
-
-#define __GLX_SWAP_SHORT_ARRAY(pc, count) \
- swapPC = ((GLbyte *)(pc)); \
- swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT16;\
- while (swapPC < swapEnd) { \
- __GLX_SWAP_SHORT(swapPC); \
- swapPC += __GLX_SIZE_INT16; \
- }
-
-#define __GLX_SWAP_DOUBLE_ARRAY(pc, count) \
- swapPC = ((GLbyte *)(pc)); \
- swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT64;\
- while (swapPC < swapEnd) { \
- __GLX_SWAP_DOUBLE(swapPC); \
- swapPC += __GLX_SIZE_FLOAT64; \
- }
-
-#define __GLX_SWAP_FLOAT_ARRAY(pc, count) \
- swapPC = ((GLbyte *)(pc)); \
- swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT32;\
- while (swapPC < swapEnd) { \
- __GLX_SWAP_FLOAT(swapPC); \
- swapPC += __GLX_SIZE_FLOAT32; \
- }
-
-#define __GLX_SWAP_REPLY_HEADER() \
- __GLX_SWAP_SHORT(&__glXReply.sequenceNumber); \
- __GLX_SWAP_INT(&__glXReply.length);
-
-#define __GLX_SWAP_REPLY_RETVAL() \
- __GLX_SWAP_INT(&__glXReply.retval)
-
-#define __GLX_SWAP_REPLY_SIZE() \
- __GLX_SWAP_INT(&__glXReply.size)
-
-#endif /* !__GLX_unpack_h__ */
-
-
-
-
-
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef __GLX_unpack_h__
+#define __GLX_unpack_h__
+
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#define __GLX_PAD(s) (((s)+3) & (GLuint)~3)
+
+/*
+** Fetch the context-id out of a SingleReq request pointed to by pc.
+*/
+#define __GLX_GET_SINGLE_CONTEXT_TAG(pc) (((xGLXSingleReq*)pc)->contextTag)
+#define __GLX_GET_VENDPRIV_CONTEXT_TAG(pc) (((xGLXVendorPrivateReq*)pc)->contextTag)
+
+/*
+** Fetch a double from potentially unaligned memory.
+*/
+#ifdef __GLX_ALIGN64
+#define __GLX_MEM_COPY(dst,src,n) memmove(dst,src,n)
+#define __GLX_GET_DOUBLE(dst,src) __GLX_MEM_COPY(&dst,src,8)
+#else
+#define __GLX_GET_DOUBLE(dst,src) (dst) = *((GLdouble*)(src))
+#endif
+
+extern void __glXMemInit(void);
+
+extern xGLXSingleReply __glXReply;
+
+#define __GLX_BEGIN_REPLY(size) \
+ __glXReply.length = __GLX_PAD(size) >> 2; \
+ __glXReply.type = X_Reply; \
+ __glXReply.sequenceNumber = client->sequence;
+
+#define __GLX_SEND_HEADER() \
+ WriteToClient( client, sz_xGLXSingleReply, (char *)&__glXReply);
+
+#define __GLX_PUT_RETVAL(a) \
+ __glXReply.retval = (a);
+
+#define __GLX_PUT_SIZE(a) \
+ __glXReply.size = (a);
+
+#define __GLX_PUT_RENDERMODE(m) \
+ __glXReply.pad3 = (m)
+
+/*
+** Get a buffer to hold returned data, with the given alignment. If we have
+** to realloc, allocate size+align, in case the pointer has to be bumped for
+** alignment. The answerBuffer should already be aligned.
+**
+** NOTE: the cast (long)res below assumes a long is large enough to hold a
+** pointer.
+*/
+#define __GLX_GET_ANSWER_BUFFER(res,cl,size,align) \
+ if ((size) > sizeof(answerBuffer)) { \
+ int bump; \
+ if ((cl)->returnBufSize < (size)+(align)) { \
+ (cl)->returnBuf = (GLbyte*)realloc((cl)->returnBuf, \
+ (size)+(align)); \
+ if (!(cl)->returnBuf) { \
+ return BadAlloc; \
+ } \
+ (cl)->returnBufSize = (size)+(align); \
+ } \
+ res = (char*)cl->returnBuf; \
+ bump = (long)(res) % (align); \
+ if (bump) res += (align) - (bump); \
+ } else { \
+ res = (char *)answerBuffer; \
+ }
+
+#define __GLX_PUT_BYTE() \
+ *(GLbyte *)&__glXReply.pad3 = *(GLbyte *)answer
+
+#define __GLX_PUT_SHORT() \
+ *(GLshort *)&__glXReply.pad3 = *(GLshort *)answer
+
+#define __GLX_PUT_INT() \
+ *(GLint *)&__glXReply.pad3 = *(GLint *)answer
+
+#define __GLX_PUT_FLOAT() \
+ *(GLfloat *)&__glXReply.pad3 = *(GLfloat *)answer
+
+#define __GLX_PUT_DOUBLE() \
+ *(GLdouble *)&__glXReply.pad3 = *(GLdouble *)answer
+
+#define __GLX_SEND_BYTE_ARRAY(len) \
+ WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT8), (char *)answer)
+
+#define __GLX_SEND_SHORT_ARRAY(len) \
+ WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT16), (char *)answer)
+
+#define __GLX_SEND_INT_ARRAY(len) \
+ WriteToClient(client, (len)*__GLX_SIZE_INT32, (char *)answer)
+
+#define __GLX_SEND_FLOAT_ARRAY(len) \
+ WriteToClient(client, (len)*__GLX_SIZE_FLOAT32, (char *)answer)
+
+#define __GLX_SEND_DOUBLE_ARRAY(len) \
+ WriteToClient(client, (len)*__GLX_SIZE_FLOAT64, (char *)answer)
+
+#define __GLX_SEND_VOID_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len)
+#define __GLX_SEND_UBYTE_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len)
+#define __GLX_SEND_USHORT_ARRAY(len) __GLX_SEND_SHORT_ARRAY(len)
+#define __GLX_SEND_UINT_ARRAY(len) __GLX_SEND_INT_ARRAY(len)
+
+/*
+** PERFORMANCE NOTE:
+** Machine dependent optimizations abound here; these swapping macros can
+** conceivably be replaced with routines that do the job faster.
+*/
+#define __GLX_DECLARE_SWAP_VARIABLES \
+ GLbyte sw
+
+#define __GLX_DECLARE_SWAP_ARRAY_VARIABLES \
+ GLbyte *swapPC; \
+ GLbyte *swapEnd
+
+#define __GLX_SWAP_INT(pc) \
+ sw = ((GLbyte *)(pc))[0]; \
+ ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \
+ ((GLbyte *)(pc))[3] = sw; \
+ sw = ((GLbyte *)(pc))[1]; \
+ ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \
+ ((GLbyte *)(pc))[2] = sw;
+
+#define __GLX_SWAP_SHORT(pc) \
+ sw = ((GLbyte *)(pc))[0]; \
+ ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[1]; \
+ ((GLbyte *)(pc))[1] = sw;
+
+#define __GLX_SWAP_DOUBLE(pc) \
+ sw = ((GLbyte *)(pc))[0]; \
+ ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[7]; \
+ ((GLbyte *)(pc))[7] = sw; \
+ sw = ((GLbyte *)(pc))[1]; \
+ ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[6]; \
+ ((GLbyte *)(pc))[6] = sw; \
+ sw = ((GLbyte *)(pc))[2]; \
+ ((GLbyte *)(pc))[2] = ((GLbyte *)(pc))[5]; \
+ ((GLbyte *)(pc))[5] = sw; \
+ sw = ((GLbyte *)(pc))[3]; \
+ ((GLbyte *)(pc))[3] = ((GLbyte *)(pc))[4]; \
+ ((GLbyte *)(pc))[4] = sw;
+
+#define __GLX_SWAP_FLOAT(pc) \
+ sw = ((GLbyte *)(pc))[0]; \
+ ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \
+ ((GLbyte *)(pc))[3] = sw; \
+ sw = ((GLbyte *)(pc))[1]; \
+ ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \
+ ((GLbyte *)(pc))[2] = sw;
+
+#define __GLX_SWAP_INT_ARRAY(pc, count) \
+ swapPC = ((GLbyte *)(pc)); \
+ swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT32;\
+ while (swapPC < swapEnd) { \
+ __GLX_SWAP_INT(swapPC); \
+ swapPC += __GLX_SIZE_INT32; \
+ }
+
+#define __GLX_SWAP_SHORT_ARRAY(pc, count) \
+ swapPC = ((GLbyte *)(pc)); \
+ swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT16;\
+ while (swapPC < swapEnd) { \
+ __GLX_SWAP_SHORT(swapPC); \
+ swapPC += __GLX_SIZE_INT16; \
+ }
+
+#define __GLX_SWAP_DOUBLE_ARRAY(pc, count) \
+ swapPC = ((GLbyte *)(pc)); \
+ swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT64;\
+ while (swapPC < swapEnd) { \
+ __GLX_SWAP_DOUBLE(swapPC); \
+ swapPC += __GLX_SIZE_FLOAT64; \
+ }
+
+#define __GLX_SWAP_FLOAT_ARRAY(pc, count) \
+ swapPC = ((GLbyte *)(pc)); \
+ swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT32;\
+ while (swapPC < swapEnd) { \
+ __GLX_SWAP_FLOAT(swapPC); \
+ swapPC += __GLX_SIZE_FLOAT32; \
+ }
+
+#define __GLX_SWAP_REPLY_HEADER() \
+ __GLX_SWAP_SHORT(&__glXReply.sequenceNumber); \
+ __GLX_SWAP_INT(&__glXReply.length);
+
+#define __GLX_SWAP_REPLY_RETVAL() \
+ __GLX_SWAP_INT(&__glXReply.retval)
+
+#define __GLX_SWAP_REPLY_SIZE() \
+ __GLX_SWAP_INT(&__glXReply.size)
+
+#endif /* !__GLX_unpack_h__ */
diff --git a/xorg-server/hw/dmx/config/Canvas.h b/xorg-server/hw/dmx/config/Canvas.h
index fe9a57f21..d516faf93 100644
--- a/xorg-server/hw/dmx/config/Canvas.h
+++ b/xorg-server/hw/dmx/config/Canvas.h
@@ -47,9 +47,9 @@ typedef struct _CanvasRec *CanvasWidget;
extern WidgetClass canvasWidgetClass;
typedef struct _CanvasExposeDataRec {
- Widget w;
- XEvent *event;
- Region region;
+ Widget w;
+ XEvent *event;
+ Region region;
} CanvasExposeDataRec, *CanvasExposeDataPtr;
-#endif /* _Canvas_h */
+#endif /* _Canvas_h */
diff --git a/xorg-server/hw/dmx/config/CanvasP.h b/xorg-server/hw/dmx/config/CanvasP.h
index cf43710f1..b1ccf2497 100644
--- a/xorg-server/hw/dmx/config/CanvasP.h
+++ b/xorg-server/hw/dmx/config/CanvasP.h
@@ -45,8 +45,8 @@ typedef struct {
} CanvasClassPart;
typedef struct _CanvasClassRec {
- CoreClassPart core_class;
- CanvasClassPart canvas_class;
+ CoreClassPart core_class;
+ CanvasClassPart canvas_class;
} CanvasClassRec;
extern CanvasClassRec canvasClassRec;
@@ -58,8 +58,8 @@ typedef struct {
} CanvasPart;
typedef struct _CanvasRec {
- CorePart core;
- CanvasPart canvas;
+ CorePart core;
+ CanvasPart canvas;
} CanvasRec;
-#endif /* _CanvasP_h */
+#endif /* _CanvasP_h */
diff --git a/xorg-server/hw/dmx/config/dmxconfig.h b/xorg-server/hw/dmx/config/dmxconfig.h
index 91a6662e3..deb293cc0 100644
--- a/xorg-server/hw/dmx/config/dmxconfig.h
+++ b/xorg-server/hw/dmx/config/dmxconfig.h
@@ -40,8 +40,8 @@
#include <xkb-config.h>
extern void dmxConfigStoreDisplay(const char *display);
-extern void dmxConfigStoreInput(const char *input); /* Core devices */
-extern void dmxConfigStoreXInput(const char *input); /* Non-core devices */
+extern void dmxConfigStoreInput(const char *input); /* Core devices */
+extern void dmxConfigStoreXInput(const char *input); /* Non-core devices */
extern void dmxConfigStoreFile(const char *file);
extern void dmxConfigStoreConfig(const char *config);
extern void dmxConfigConfigure(void);
diff --git a/xorg-server/hw/dmx/config/dmxprint.h b/xorg-server/hw/dmx/config/dmxprint.h
index d162dea95..d77bafce2 100644
--- a/xorg-server/hw/dmx/config/dmxprint.h
+++ b/xorg-server/hw/dmx/config/dmxprint.h
@@ -37,7 +37,7 @@
#ifndef _DMXPRINT_H_
#define _DMXPRINT_H_
-void dmxConfigPrint(FILE *str, DMXConfigEntryPtr entry);
-void dmxConfigVirtualPrint(FILE *str, DMXConfigVirtualPtr p);
+void dmxConfigPrint(FILE * str, DMXConfigEntryPtr entry);
+void dmxConfigVirtualPrint(FILE * str, DMXConfigVirtualPtr p);
#endif
diff --git a/xorg-server/hw/dmx/dmx-config.h b/xorg-server/hw/dmx/dmx-config.h
index 1fda69f45..c435ece2e 100644
--- a/xorg-server/hw/dmx/dmx-config.h
+++ b/xorg-server/hw/dmx/dmx-config.h
@@ -72,4 +72,4 @@
/* Enable the DMX extension */
#define DMXEXT
-#endif /* DMX_CONFIG_H */
+#endif /* DMX_CONFIG_H */
diff --git a/xorg-server/hw/dmx/dmx.h b/xorg-server/hw/dmx/dmx.h
index dc5d25e16..d7c620467 100644
--- a/xorg-server/hw/dmx/dmx.h
+++ b/xorg-server/hw/dmx/dmx.h
@@ -1,388 +1,410 @@
-/*
- * Copyright 2001-2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- * Kevin E. Martin <kem@redhat.com>
- * David H. Dawes <dawes@xfree86.org>
- * Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Main header file included by all other DMX-related files.
- */
-
-/** \mainpage
- * - <a href="http://dmx.sourceforge.net">DMX Home Page</a>
- * - <a href="http://sourceforge.net/projects/dmx">DMX Project Page (on
- * Source Forge)</a>
- * - <a href="http://dmx.sourceforge.net/dmx.html">Distributed Multihead
- * X design</a>, the design document for DMX
- * - <a href="http://dmx.sourceforge.net/DMXSpec.txt">Client-to-Server
- * DMX Extension to the X Protocol</a>
- */
-
-#ifndef DMX_H
-#define DMX_H
-
-#if HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "gcstruct.h"
-
-/* Handle client-side include files in one place. */
-#include "dmxclient.h"
-
-#include "globals.h"
-#include "scrnintstr.h"
-
-#include "picturestr.h"
-
-#ifdef GLXEXT
-#include <GL/glx.h>
-#include <GL/glxint.h>
-#endif
-
-typedef enum {
- PosNone = -1,
- PosAbsolute = 0,
- PosRightOf,
- PosLeftOf,
- PosAbove,
- PosBelow,
- PosRelative
-} PositionType;
-
-/** Provide the typedef globally, but keep the contents opaque outside
- * of the input routines. \see dmxinput.h */
-typedef struct _DMXInputInfo DMXInputInfo;
-
-/** Provide the typedef globally, but keep the contents opaque outside
- * of the XSync statistic routines. \see dmxstat.c */
-typedef struct _DMXStatInfo DMXStatInfo;
-
-/** Global structure containing information about each backend screen. */
-typedef struct _DMXScreenInfo {
- const char *name; /**< Name from command line or config file */
- int index; /**< Index into dmxScreens global */
-
- /*---------- Back-end X server information ----------*/
-
- Display *beDisplay; /**< Back-end X server's display */
- int beWidth; /**< Width of BE display */
- int beHeight; /**< Height of BE display */
- int beDepth; /**< Depth of BE display */
- int beBPP; /**< Bits per pixel of BE display */
- int beXDPI; /**< Horizontal dots per inch of BE */
- int beYDPI; /**< Vertical dots per inch of BE */
-
- int beNumDepths; /**< Number of depths on BE server */
- int *beDepths; /**< Depths from BE server */
-
- int beNumPixmapFormats; /**< Number of pixmap formats on BE */
- XPixmapFormatValues *bePixmapFormats; /**< Pixmap formats on BE */
-
- int beNumVisuals; /**< Number of visuals on BE */
- XVisualInfo *beVisuals; /**< Visuals from BE server */
- int beDefVisualIndex; /**< Default visual index of BE */
-
- int beNumDefColormaps; /**< Number of default colormaps */
- Colormap *beDefColormaps; /**< Default colormaps for DMX server */
-
- Pixel beBlackPixel; /**< Default black pixel for BE */
- Pixel beWhitePixel; /**< Default white pixel for BE */
-
- /*---------- Screen window information ----------*/
-
- Window scrnWin; /**< "Screen" window on backend display */
- int scrnX; /**< X offset of "screen" WRT BE display */
- int scrnY; /**< Y offset of "screen" WRT BE display */
- int scrnWidth; /**< Width of "screen" */
- int scrnHeight; /**< Height of "screen" */
- int scrnXSign; /**< X offset sign of "screen" */
- int scrnYSign; /**< Y offset sign of "screen" */
-
- /** Default drawables for "screen" */
- Drawable scrnDefDrawables[MAXFORMATS];
-
- struct _DMXScreenInfo *next; /**< List of "screens" on same display */
- struct _DMXScreenInfo *over; /**< List of "screens" that overlap */
-
- /*---------- Root window information ----------*/
-
- Window rootWin; /**< "Root" window on backend display */
- int rootX; /**< X offset of "root" window WRT "screen"*/
- int rootY; /**< Y offset of "root" window WRT "screen"*/
- int rootWidth; /**< Width of "root" window */
- int rootHeight; /**< Height of "root" window */
-
- int rootXOrigin; /**< Global X origin of "root" window */
- int rootYOrigin; /**< Global Y origin of "root" window */
-
- /*---------- Shadow framebuffer information ----------*/
-
- void *shadow; /**< Shadow framebuffer data (if enabled) */
- XlibGC shadowGC; /**< Default GC used by shadow FB code */
- XImage *shadowFBImage; /**< Screen image used by shadow FB code */
-
- /*---------- Other related information ----------*/
-
- int shared; /**< Non-zero if another Xdmx is running */
-
- Bool WMRunningOnBE;
-
- Cursor noCursor;
- Cursor curCursor;
- /* Support for cursors on overlapped
- * backend displays. */
- CursorPtr cursor;
- int cursorVisible;
- int cursorNotShared; /* for overlapping screens on a backend */
-
- PositionType where; /**< Relative layout information */
- int whereX; /**< Relative layout information */
- int whereY; /**< Relative layout information */
- int whereRefScreen; /**< Relative layout information */
-
- int savedTimeout; /**< Original screen saver timeout */
- int dpmsCapable; /**< Non-zero if backend is DPMS capable */
- int dpmsEnabled; /**< Non-zero if DPMS enabled */
- int dpmsStandby; /**< Original DPMS standby value */
- int dpmsSuspend; /**< Original DPMS suspend value */
- int dpmsOff; /**< Original DPMS off value */
-
- DMXStatInfo *stat; /**< Statistics about XSync */
- Bool needsSync; /**< True if an XSync is pending */
-
-#ifdef GLXEXT
- /** Visual information for glxProxy */
- int numGlxVisuals;
- __GLXvisualConfig *glxVisuals;
- int glxMajorOpcode;
- int glxErrorBase;
-
- /** FB config information for glxProxy */
- __GLXFBConfig *fbconfigs;
- int numFBConfigs;
-#endif
-
- /** Function pointers to wrapped screen
- * functions */
- CloseScreenProcPtr CloseScreen;
- SaveScreenProcPtr SaveScreen;
-
- CreateGCProcPtr CreateGC;
-
- CreateWindowProcPtr CreateWindow;
- DestroyWindowProcPtr DestroyWindow;
- PositionWindowProcPtr PositionWindow;
- ChangeWindowAttributesProcPtr ChangeWindowAttributes;
- RealizeWindowProcPtr RealizeWindow;
- UnrealizeWindowProcPtr UnrealizeWindow;
- RestackWindowProcPtr RestackWindow;
- WindowExposuresProcPtr WindowExposures;
- CopyWindowProcPtr CopyWindow;
-
- ResizeWindowProcPtr ResizeWindow;
- ReparentWindowProcPtr ReparentWindow;
-
- ChangeBorderWidthProcPtr ChangeBorderWidth;
-
- GetImageProcPtr GetImage;
- GetSpansProcPtr GetSpans;
-
- CreatePixmapProcPtr CreatePixmap;
- DestroyPixmapProcPtr DestroyPixmap;
- BitmapToRegionProcPtr BitmapToRegion;
-
- RealizeFontProcPtr RealizeFont;
- UnrealizeFontProcPtr UnrealizeFont;
-
- CreateColormapProcPtr CreateColormap;
- DestroyColormapProcPtr DestroyColormap;
- InstallColormapProcPtr InstallColormap;
- StoreColorsProcPtr StoreColors;
-
- SetShapeProcPtr SetShape;
-
- CreatePictureProcPtr CreatePicture;
- DestroyPictureProcPtr DestroyPicture;
- ChangePictureClipProcPtr ChangePictureClip;
- DestroyPictureClipProcPtr DestroyPictureClip;
-
- ChangePictureProcPtr ChangePicture;
- ValidatePictureProcPtr ValidatePicture;
-
- CompositeProcPtr Composite;
- GlyphsProcPtr Glyphs;
- CompositeRectsProcPtr CompositeRects;
-
- InitIndexedProcPtr InitIndexed;
- CloseIndexedProcPtr CloseIndexed;
- UpdateIndexedProcPtr UpdateIndexed;
-
- TrapezoidsProcPtr Trapezoids;
- TrianglesProcPtr Triangles;
-} DMXScreenInfo;
-
-/* Global variables available to all Xserver/hw/dmx routines. */
-extern int dmxNumScreens; /**< Number of dmxScreens */
-extern DMXScreenInfo *dmxScreens; /**< List of outputs */
-extern int dmxShadowFB; /**< Non-zero if using
- * shadow frame-buffer
- * (deprecated) */
-extern XErrorEvent dmxLastErrorEvent; /**< Last error that
- * occurred */
-extern Bool dmxErrorOccurred; /**< True if an error
- * occurred */
-extern Bool dmxOffScreenOpt; /**< True if using off
- * screen
- * optimizations */
-extern Bool dmxSubdividePrimitives; /**< True if using the
- * primitive subdivision
- * optimization */
-extern Bool dmxLazyWindowCreation; /**< True if using the
- * lazy window creation
- * optimization */
-extern Bool dmxUseXKB; /**< True if the XKB
- * extension should be
- * used with the backend
- * servers */
-extern int dmxDepth; /**< Requested depth if
- * non-zero */
-#ifdef GLXEXT
-extern Bool dmxGLXProxy; /**< True if glxProxy
- * support is enabled */
-extern Bool dmxGLXSwapGroupSupport; /**< True if glxProxy
- * support for swap
- * groups and barriers
- * is enabled */
-extern Bool dmxGLXSyncSwap; /**< True if glxProxy
- * should force an XSync
- * request after each
- * swap buffers call */
-extern Bool dmxGLXFinishSwap; /**< True if glxProxy
- * should force a
- * glFinish request
- * after each swap
- * buffers call */
-#endif
-extern char *dmxFontPath; /**< NULL if no font
- * path is set on the
- * command line;
- * otherwise, a string
- * of comma separated
- * paths built from the
- * command line
- * specified font
- * paths */
-extern Bool dmxIgnoreBadFontPaths; /**< True if bad font
- * paths should be
- * ignored during server
- * init */
-extern Bool dmxAddRemoveScreens; /**< True if add and
- * remove screens support
- * is enabled */
-
-/** Wrap screen or GC function pointer */
-#define DMX_WRAP(_entry, _newfunc, _saved, _actual) \
-do { \
- (_saved)->_entry = (_actual)->_entry; \
- (_actual)->_entry = (_newfunc); \
-} while (0)
-
-/** Unwrap screen or GC function pointer */
-#define DMX_UNWRAP(_entry, _saved, _actual) \
-do { \
- (_actual)->_entry = (_saved)->_entry; \
-} while (0)
-
-/* Define the MAXSCREENSALLOC/FREE macros, when MAXSCREENS patch has not
- * been applied to sources. */
-#ifdef MAXSCREENS
-#define MAXSCREEN_MAKECONSTSTR1(x) #x
-#define MAXSCREEN_MAKECONSTSTR2(x) MAXSCREEN_MAKECONSTSTR1(x)
-
-#define MAXSCREEN_FAILED_TXT "Failed at [" \
- MAXSCREEN_MAKECONSTSTR2(__LINE__) ":" __FILE__ "] to allocate object: "
-
-#define _MAXSCREENSALLOCF(o,size,fatal) \
- do { \
- if (!o) { \
- o = calloc((size), sizeof(*(o))); \
- if (!o && fatal) FatalError(MAXSCREEN_FAILED_TXT #o); \
- } \
- } while (0)
-#define _MAXSCREENSALLOCR(o,size,retval) \
- do { \
- if (!o) { \
- o = calloc((size), sizeof(*(o))); \
- if (!o) return retval; \
- } \
- } while (0)
-
-#define MAXSCREENSFREE(o) \
- do { \
- free(o); \
- o = NULL; \
- } while (0)
-
-#define MAXSCREENSALLOC(o) _MAXSCREENSALLOCF(o,MAXSCREENS, 0)
-#define MAXSCREENSALLOC_FATAL(o) _MAXSCREENSALLOCF(o,MAXSCREENS, 1)
-#define MAXSCREENSALLOC_RETURN(o,r) _MAXSCREENSALLOCR(o,MAXSCREENS, (r))
-#define MAXSCREENSALLOCPLUSONE(o) _MAXSCREENSALLOCF(o,MAXSCREENS+1,0)
-#define MAXSCREENSALLOCPLUSONE_FATAL(o) _MAXSCREENSALLOCF(o,MAXSCREENS+1,1)
-#define MAXSCREENSCALLOC(o,m) _MAXSCREENSALLOCF(o,MAXSCREENS*(m),0)
-#define MAXSCREENSCALLOC_FATAL(o,m) _MAXSCREENSALLOCF(o,MAXSCREENS*(m),1)
-#endif
-
-extern DevPrivateKeyRec dmxGCPrivateKeyRec;
-#define dmxGCPrivateKey (&dmxGCPrivateKeyRec) /**< Private index for GCs */
-
-extern DevPrivateKeyRec dmxWinPrivateKeyRec;
-#define dmxWinPrivateKey (&dmxWinPrivateKeyRec) /**< Private index for Windows */
-
-extern DevPrivateKeyRec dmxPixPrivateKeyRec;
-#define dmxPixPrivateKey (&dmxPixPrivateKeyRec) /**< Private index for Pixmaps */
-
-extern int dmxFontPrivateIndex; /**< Private index for Fonts */
-
-extern DevPrivateKeyRec dmxScreenPrivateKeyRec;
-#define dmxScreenPrivateKey (&dmxScreenPrivateKeyRec) /**< Private index for Screens */
-
-extern DevPrivateKeyRec dmxColormapPrivateKeyRec;
-#define dmxColormapPrivateKey (&dmxColormapPrivateKeyRec) /**< Private index for Colormaps */
-
-extern DevPrivateKeyRec dmxPictPrivateKeyRec;
-#define dmxPictPrivateKey (&dmxPictPrivateKeyRec) /**< Private index for Picts */
-
-extern DevPrivateKeyRec dmxGlyphSetPrivateKeyRec;
-#define dmxGlyphSetPrivateKey (&dmxGlyphSetPrivateKeyRec) /**< Private index for GlyphSets */
-
-#endif /* DMX_H */
+/*
+ * Copyright 2001-2003 Red Hat Inc., Durham, North Carolina.
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation on the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Authors:
+ * Kevin E. Martin <kem@redhat.com>
+ * David H. Dawes <dawes@xfree86.org>
+ * Rickard E. (Rik) Faith <faith@redhat.com>
+ *
+ */
+
+/** \file
+ * Main header file included by all other DMX-related files.
+ */
+
+/** \mainpage
+ * - <a href="http://dmx.sourceforge.net">DMX Home Page</a>
+ * - <a href="http://sourceforge.net/projects/dmx">DMX Project Page (on
+ * Source Forge)</a>
+ * - <a href="http://dmx.sourceforge.net/dmx.html">Distributed Multihead
+ * X design</a>, the design document for DMX
+ * - <a href="http://dmx.sourceforge.net/DMXSpec.txt">Client-to-Server
+ * DMX Extension to the X Protocol</a>
+ */
+
+#ifndef DMX_H
+#define DMX_H
+
+#if HAVE_DMX_CONFIG_H
+#include <dmx-config.h>
+#endif
+
+#include "gcstruct.h"
+
+/* Handle client-side include files in one place. */
+#include "dmxclient.h"
+
+#include "globals.h"
+#include "scrnintstr.h"
+
+#include "picturestr.h"
+
+#ifdef GLXEXT
+#include <GL/glx.h>
+#include <GL/glxint.h>
+#endif
+
+typedef enum {
+ PosNone = -1,
+ PosAbsolute = 0,
+ PosRightOf,
+ PosLeftOf,
+ PosAbove,
+ PosBelow,
+ PosRelative
+} PositionType;
+
+/** Provide the typedef globally, but keep the contents opaque outside
+ * of the input routines. \see dmxinput.h */
+typedef struct _DMXInputInfo DMXInputInfo;
+
+/** Provide the typedef globally, but keep the contents opaque outside
+ * of the XSync statistic routines. \see dmxstat.c */
+typedef struct _DMXStatInfo DMXStatInfo;
+
+/** Global structure containing information about each backend screen. */
+typedef struct _DMXScreenInfo {
+ const char *name; /**< Name from command line or config file */
+ int index; /**< Index into dmxScreens global */
+
+ /*---------- Back-end X server information ----------*/
+
+ Display *beDisplay; /**< Back-end X server's display */
+ int beWidth; /**< Width of BE display */
+ int beHeight; /**< Height of BE display */
+ int beDepth; /**< Depth of BE display */
+ int beBPP; /**< Bits per pixel of BE display */
+ int beXDPI; /**< Horizontal dots per inch of BE */
+ int beYDPI; /**< Vertical dots per inch of BE */
+
+ int beNumDepths; /**< Number of depths on BE server */
+ int *beDepths; /**< Depths from BE server */
+
+ int beNumPixmapFormats; /**< Number of pixmap formats on BE */
+ XPixmapFormatValues *bePixmapFormats; /**< Pixmap formats on BE */
+
+ int beNumVisuals; /**< Number of visuals on BE */
+ XVisualInfo *beVisuals; /**< Visuals from BE server */
+ int beDefVisualIndex; /**< Default visual index of BE */
+
+ int beNumDefColormaps; /**< Number of default colormaps */
+ Colormap *beDefColormaps; /**< Default colormaps for DMX server */
+
+ Pixel beBlackPixel; /**< Default black pixel for BE */
+ Pixel beWhitePixel; /**< Default white pixel for BE */
+
+ /*---------- Screen window information ----------*/
+
+ Window scrnWin; /**< "Screen" window on backend display */
+ int scrnX; /**< X offset of "screen" WRT BE display */
+ int scrnY; /**< Y offset of "screen" WRT BE display */
+ int scrnWidth; /**< Width of "screen" */
+ int scrnHeight; /**< Height of "screen" */
+ int scrnXSign; /**< X offset sign of "screen" */
+ int scrnYSign; /**< Y offset sign of "screen" */
+
+ /** Default drawables for "screen" */
+ Drawable scrnDefDrawables[MAXFORMATS];
+
+ struct _DMXScreenInfo *next; /**< List of "screens" on same display */
+ struct _DMXScreenInfo *over; /**< List of "screens" that overlap */
+
+ /*---------- Root window information ----------*/
+
+ Window rootWin; /**< "Root" window on backend display */
+ int rootX; /**< X offset of "root" window WRT "screen"*/
+ int rootY; /**< Y offset of "root" window WRT "screen"*/
+ int rootWidth; /**< Width of "root" window */
+ int rootHeight; /**< Height of "root" window */
+
+ int rootXOrigin; /**< Global X origin of "root" window */
+ int rootYOrigin; /**< Global Y origin of "root" window */
+
+ /*---------- Shadow framebuffer information ----------*/
+
+ void *shadow; /**< Shadow framebuffer data (if enabled) */
+ XlibGC shadowGC; /**< Default GC used by shadow FB code */
+ XImage *shadowFBImage; /**< Screen image used by shadow FB code */
+
+ /*---------- Other related information ----------*/
+
+ int shared; /**< Non-zero if another Xdmx is running */
+
+ Bool WMRunningOnBE;
+
+ Cursor noCursor;
+ Cursor curCursor;
+ /* Support for cursors on overlapped
+ * backend displays. */
+ CursorPtr cursor;
+ int cursorVisible;
+ int cursorNotShared; /* for overlapping screens on a backend */
+
+ PositionType where; /**< Relative layout information */
+ int whereX; /**< Relative layout information */
+ int whereY; /**< Relative layout information */
+ int whereRefScreen; /**< Relative layout information */
+
+ int savedTimeout; /**< Original screen saver timeout */
+ int dpmsCapable; /**< Non-zero if backend is DPMS capable */
+ int dpmsEnabled; /**< Non-zero if DPMS enabled */
+ int dpmsStandby; /**< Original DPMS standby value */
+ int dpmsSuspend; /**< Original DPMS suspend value */
+ int dpmsOff; /**< Original DPMS off value */
+
+ DMXStatInfo *stat; /**< Statistics about XSync */
+ Bool needsSync; /**< True if an XSync is pending */
+
+#ifdef GLXEXT
+ /** Visual information for glxProxy */
+ int numGlxVisuals;
+ __GLXvisualConfig *glxVisuals;
+ int glxMajorOpcode;
+ int glxErrorBase;
+
+ /** FB config information for glxProxy */
+ __GLXFBConfig *fbconfigs;
+ int numFBConfigs;
+#endif
+
+ /** Function pointers to wrapped screen
+ * functions */
+ CloseScreenProcPtr CloseScreen;
+ SaveScreenProcPtr SaveScreen;
+
+ CreateGCProcPtr CreateGC;
+
+ CreateWindowProcPtr CreateWindow;
+ DestroyWindowProcPtr DestroyWindow;
+ PositionWindowProcPtr PositionWindow;
+ ChangeWindowAttributesProcPtr ChangeWindowAttributes;
+ RealizeWindowProcPtr RealizeWindow;
+ UnrealizeWindowProcPtr UnrealizeWindow;
+ RestackWindowProcPtr RestackWindow;
+ WindowExposuresProcPtr WindowExposures;
+ CopyWindowProcPtr CopyWindow;
+
+ ResizeWindowProcPtr ResizeWindow;
+ ReparentWindowProcPtr ReparentWindow;
+
+ ChangeBorderWidthProcPtr ChangeBorderWidth;
+
+ GetImageProcPtr GetImage;
+ GetSpansProcPtr GetSpans;
+
+ CreatePixmapProcPtr CreatePixmap;
+ DestroyPixmapProcPtr DestroyPixmap;
+ BitmapToRegionProcPtr BitmapToRegion;
+
+ RealizeFontProcPtr RealizeFont;
+ UnrealizeFontProcPtr UnrealizeFont;
+
+ CreateColormapProcPtr CreateColormap;
+ DestroyColormapProcPtr DestroyColormap;
+ InstallColormapProcPtr InstallColormap;
+ StoreColorsProcPtr StoreColors;
+
+ SetShapeProcPtr SetShape;
+
+ CreatePictureProcPtr CreatePicture;
+ DestroyPictureProcPtr DestroyPicture;
+ ChangePictureClipProcPtr ChangePictureClip;
+ DestroyPictureClipProcPtr DestroyPictureClip;
+
+ ChangePictureProcPtr ChangePicture;
+ ValidatePictureProcPtr ValidatePicture;
+
+ CompositeProcPtr Composite;
+ GlyphsProcPtr Glyphs;
+ CompositeRectsProcPtr CompositeRects;
+
+ InitIndexedProcPtr InitIndexed;
+ CloseIndexedProcPtr CloseIndexed;
+ UpdateIndexedProcPtr UpdateIndexed;
+
+ TrapezoidsProcPtr Trapezoids;
+ TrianglesProcPtr Triangles;
+} DMXScreenInfo;
+
+/* Global variables available to all Xserver/hw/dmx routines. */
+extern int dmxNumScreens; /**< Number of dmxScreens */
+extern DMXScreenInfo *dmxScreens; /**< List of outputs */
+extern int dmxShadowFB; /**< Non-zero if using
+
+ * shadow frame-buffer
+ * (deprecated) */
+extern XErrorEvent dmxLastErrorEvent; /**< Last error that
+
+ * occurred */
+extern Bool dmxErrorOccurred; /**< True if an error
+
+ * occurred */
+extern Bool dmxOffScreenOpt; /**< True if using off
+
+ * screen
+ * optimizations */
+extern Bool dmxSubdividePrimitives; /**< True if using the
+
+ * primitive subdivision
+ * optimization */
+extern Bool dmxLazyWindowCreation; /**< True if using the
+
+ * lazy window creation
+ * optimization */
+extern Bool dmxUseXKB; /**< True if the XKB
+
+ * extension should be
+ * used with the backend
+ * servers */
+extern int dmxDepth; /**< Requested depth if
+
+ * non-zero */
+#ifdef GLXEXT
+extern Bool dmxGLXProxy; /**< True if glxProxy
+
+ * support is enabled */
+extern Bool dmxGLXSwapGroupSupport; /**< True if glxProxy
+
+ * support for swap
+ * groups and barriers
+ * is enabled */
+extern Bool dmxGLXSyncSwap; /**< True if glxProxy
+
+ * should force an XSync
+ * request after each
+ * swap buffers call */
+extern Bool dmxGLXFinishSwap; /**< True if glxProxy
+
+ * should force a
+ * glFinish request
+ * after each swap
+ * buffers call */
+#endif
+extern char *dmxFontPath; /**< NULL if no font
+
+ * path is set on the
+ * command line;
+ * otherwise, a string
+ * of comma separated
+ * paths built from the
+ * command line
+ * specified font
+ * paths */
+extern Bool dmxIgnoreBadFontPaths; /**< True if bad font
+
+ * paths should be
+ * ignored during server
+ * init */
+extern Bool dmxAddRemoveScreens; /**< True if add and
+
+ * remove screens support
+ * is enabled */
+
+/** Wrap screen or GC function pointer */
+#define DMX_WRAP(_entry, _newfunc, _saved, _actual) \
+do { \
+ (_saved)->_entry = (_actual)->_entry; \
+ (_actual)->_entry = (_newfunc); \
+} while (0)
+
+/** Unwrap screen or GC function pointer */
+#define DMX_UNWRAP(_entry, _saved, _actual) \
+do { \
+ (_actual)->_entry = (_saved)->_entry; \
+} while (0)
+
+/* Define the MAXSCREENSALLOC/FREE macros, when MAXSCREENS patch has not
+ * been applied to sources. */
+#ifdef MAXSCREENS
+#define MAXSCREEN_MAKECONSTSTR1(x) #x
+#define MAXSCREEN_MAKECONSTSTR2(x) MAXSCREEN_MAKECONSTSTR1(x)
+
+#define MAXSCREEN_FAILED_TXT "Failed at [" \
+ MAXSCREEN_MAKECONSTSTR2(__LINE__) ":" __FILE__ "] to allocate object: "
+
+#define _MAXSCREENSALLOCF(o,size,fatal) \
+ do { \
+ if (!o) { \
+ o = calloc((size), sizeof(*(o))); \
+ if (!o && fatal) FatalError(MAXSCREEN_FAILED_TXT #o); \
+ } \
+ } while (0)
+#define _MAXSCREENSALLOCR(o,size,retval) \
+ do { \
+ if (!o) { \
+ o = calloc((size), sizeof(*(o))); \
+ if (!o) return retval; \
+ } \
+ } while (0)
+
+#define MAXSCREENSFREE(o) \
+ do { \
+ free(o); \
+ o = NULL; \
+ } while (0)
+
+#define MAXSCREENSALLOC(o) _MAXSCREENSALLOCF(o,MAXSCREENS, 0)
+#define MAXSCREENSALLOC_FATAL(o) _MAXSCREENSALLOCF(o,MAXSCREENS, 1)
+#define MAXSCREENSALLOC_RETURN(o,r) _MAXSCREENSALLOCR(o,MAXSCREENS, (r))
+#define MAXSCREENSALLOCPLUSONE(o) _MAXSCREENSALLOCF(o,MAXSCREENS+1,0)
+#define MAXSCREENSALLOCPLUSONE_FATAL(o) _MAXSCREENSALLOCF(o,MAXSCREENS+1,1)
+#define MAXSCREENSCALLOC(o,m) _MAXSCREENSALLOCF(o,MAXSCREENS*(m),0)
+#define MAXSCREENSCALLOC_FATAL(o,m) _MAXSCREENSALLOCF(o,MAXSCREENS*(m),1)
+#endif
+
+extern DevPrivateKeyRec dmxGCPrivateKeyRec;
+
+#define dmxGCPrivateKey (&dmxGCPrivateKeyRec) /**< Private index for GCs */
+
+extern DevPrivateKeyRec dmxWinPrivateKeyRec;
+
+#define dmxWinPrivateKey (&dmxWinPrivateKeyRec) /**< Private index for Windows */
+
+extern DevPrivateKeyRec dmxPixPrivateKeyRec;
+
+#define dmxPixPrivateKey (&dmxPixPrivateKeyRec) /**< Private index for Pixmaps */
+
+extern int dmxFontPrivateIndex; /**< Private index for Fonts */
+
+extern DevPrivateKeyRec dmxScreenPrivateKeyRec;
+
+#define dmxScreenPrivateKey (&dmxScreenPrivateKeyRec) /**< Private index for Screens */
+
+extern DevPrivateKeyRec dmxColormapPrivateKeyRec;
+
+#define dmxColormapPrivateKey (&dmxColormapPrivateKeyRec) /**< Private index for Colormaps */
+
+extern DevPrivateKeyRec dmxPictPrivateKeyRec;
+
+#define dmxPictPrivateKey (&dmxPictPrivateKeyRec) /**< Private index for Picts */
+
+extern DevPrivateKeyRec dmxGlyphSetPrivateKeyRec;
+
+#define dmxGlyphSetPrivateKey (&dmxGlyphSetPrivateKeyRec) /**< Private index for GlyphSets */
+
+#endif /* DMX_H */
diff --git a/xorg-server/hw/dmx/dmxcb.h b/xorg-server/hw/dmx/dmxcb.h
index fa334dbe8..ca8a2566d 100644
--- a/xorg-server/hw/dmx/dmxcb.h
+++ b/xorg-server/hw/dmx/dmxcb.h
@@ -38,7 +38,7 @@
#ifndef _DMXCB_H_
#define _DMXCB_H_
/** The cursor position, in global coordinates. */
-extern int dmxGlobalWidth, dmxGlobalHeight;
+extern int dmxGlobalWidth, dmxGlobalHeight;
/** #dmxComputeWidthHeight can either recompute the global bounding box
* or not. */
diff --git a/xorg-server/hw/dmx/dmxclient.h b/xorg-server/hw/dmx/dmxclient.h
index f0f235f61..19dfdbe16 100644
--- a/xorg-server/hw/dmx/dmxclient.h
+++ b/xorg-server/hw/dmx/dmxclient.h
@@ -51,19 +51,21 @@ typedef unsigned long Mask64;
typedef unsigned long Atom64;
typedef unsigned long VisualID64;
typedef unsigned long Time64;
+
#define XID XID64
#define Mask Mask64
#define Atom Atom64
#define VisualID VisualID64
#define Time Time64
-typedef XID Window64;
-typedef XID Drawable64;
-typedef XID Font64;
-typedef XID Pixmap64;
-typedef XID Cursor64;
-typedef XID Colormap64;
-typedef XID GContext64;
-typedef XID KeySym64;
+typedef XID Window64;
+typedef XID Drawable64;
+typedef XID Font64;
+typedef XID Pixmap64;
+typedef XID Cursor64;
+typedef XID Colormap64;
+typedef XID GContext64;
+typedef XID KeySym64;
+
#define Window Window64
#define Drawable Drawable64
#define Font Font64
@@ -94,7 +96,7 @@ typedef XID KeySym64;
#include <X11/extensions/XI.h>
/* Always include these, since we query them even if we don't export XINPUT. */
-#include <X11/extensions/XInput.h> /* For XDevice */
+#include <X11/extensions/XInput.h> /* For XDevice */
#include <X11/extensions/Xext.h>
#undef GC
diff --git a/xorg-server/hw/dmx/dmxcmap.h b/xorg-server/hw/dmx/dmxcmap.h
index 499ca7f66..29318b586 100644
--- a/xorg-server/hw/dmx/dmxcmap.h
+++ b/xorg-server/hw/dmx/dmxcmap.h
@@ -1,66 +1,65 @@
-/*
- * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- * Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Header file for colormap support. \see dmxcmap.c. */
-
-#ifndef DMXCMAP_H
-#define DMXCMAP_H
-
-#include "colormapst.h"
-
-/** Colormap private area. */
-typedef struct _dmxColormapPriv {
- Colormap cmap;
-} dmxColormapPrivRec, *dmxColormapPrivPtr;
-
-
-extern Bool dmxCreateColormap(ColormapPtr pColormap);
-extern void dmxDestroyColormap(ColormapPtr pColormap);
-extern void dmxInstallColormap(ColormapPtr pColormap);
-extern void dmxStoreColors(ColormapPtr pColormap, int ndef, xColorItem *pdef);
-
-extern Bool dmxCreateDefColormap(ScreenPtr pScreen);
-
-extern Bool dmxBECreateColormap(ColormapPtr pColormap);
-extern Bool dmxBEFreeColormap(ColormapPtr pColormap);
-
-/** Set colormap private structure. */
-#define DMX_SET_COLORMAP_PRIV(_pCMap, _pCMapPriv) \
- dixSetPrivate(&(_pCMap)->devPrivates, dmxColormapPrivateKey, _pCMapPriv)
-
-/** Get colormap private structure. */
-#define DMX_GET_COLORMAP_PRIV(_pCMap) (dmxColormapPrivPtr) \
- dixLookupPrivate(&(_pCMap)->devPrivates, dmxColormapPrivateKey)
-
-#endif /* DMXCMAP_H */
+/*
+ * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation on the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Authors:
+ * Kevin E. Martin <kem@redhat.com>
+ *
+ */
+
+/** \file
+ * Header file for colormap support. \see dmxcmap.c. */
+
+#ifndef DMXCMAP_H
+#define DMXCMAP_H
+
+#include "colormapst.h"
+
+/** Colormap private area. */
+typedef struct _dmxColormapPriv {
+ Colormap cmap;
+} dmxColormapPrivRec, *dmxColormapPrivPtr;
+
+extern Bool dmxCreateColormap(ColormapPtr pColormap);
+extern void dmxDestroyColormap(ColormapPtr pColormap);
+extern void dmxInstallColormap(ColormapPtr pColormap);
+extern void dmxStoreColors(ColormapPtr pColormap, int ndef, xColorItem * pdef);
+
+extern Bool dmxCreateDefColormap(ScreenPtr pScreen);
+
+extern Bool dmxBECreateColormap(ColormapPtr pColormap);
+extern Bool dmxBEFreeColormap(ColormapPtr pColormap);
+
+/** Set colormap private structure. */
+#define DMX_SET_COLORMAP_PRIV(_pCMap, _pCMapPriv) \
+ dixSetPrivate(&(_pCMap)->devPrivates, dmxColormapPrivateKey, _pCMapPriv)
+
+/** Get colormap private structure. */
+#define DMX_GET_COLORMAP_PRIV(_pCMap) (dmxColormapPrivPtr) \
+ dixLookupPrivate(&(_pCMap)->devPrivates, dmxColormapPrivateKey)
+
+#endif /* DMXCMAP_H */
diff --git a/xorg-server/hw/dmx/dmxcursor.h b/xorg-server/hw/dmx/dmxcursor.h
index fc2e118e0..2b55b4e86 100644
--- a/xorg-server/hw/dmx/dmxcursor.h
+++ b/xorg-server/hw/dmx/dmxcursor.h
@@ -43,11 +43,12 @@
/** Cursor private area. */
typedef struct _dmxCursorPriv {
- Cursor cursor;
+ Cursor cursor;
} dmxCursorPrivRec, *dmxCursorPrivPtr;
/** Cursor functions for mi layer. \see dmxcursor.c \see dmxscrinit.c */
extern miPointerScreenFuncRec dmxPointerCursorFuncs;
+
/** Sprite functions for mi layer. \see dmxcursor.c \see dmxscrinit.c */
extern miPointerSpriteFuncRec dmxPointerSpriteFuncs;
@@ -57,8 +58,8 @@ extern void dmxInitOverlap(void);
extern void dmxCursorNoMulti(void);
extern void dmxMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y);
extern void dmxCheckCursor(void);
-extern int dmxOnScreen(int x, int y, DMXScreenInfo *dmxScreen);
-extern void dmxHideCursor(DMXScreenInfo *dmxScreen);
+extern int dmxOnScreen(int x, int y, DMXScreenInfo * dmxScreen);
+extern void dmxHideCursor(DMXScreenInfo * dmxScreen);
extern void dmxBECreateCursor(ScreenPtr pScreen, CursorPtr pCursor);
extern Bool dmxBEFreeCursor(ScreenPtr pScreen, CursorPtr pCursor);
@@ -69,4 +70,4 @@ extern Bool dmxBEFreeCursor(ScreenPtr pScreen, CursorPtr pCursor);
#define DMX_SET_CURSOR_PRIV(_pCursor, _pScreen, v) \
dixSetScreenPrivate(&(_pCursor)->devPrivates, CursorScreenKey, _pScreen, v)
-#endif /* DMXCURSOR_H */
+#endif /* DMXCURSOR_H */
diff --git a/xorg-server/hw/dmx/dmxdpms.h b/xorg-server/hw/dmx/dmxdpms.h
index e3eee983a..772fa2f11 100644
--- a/xorg-server/hw/dmx/dmxdpms.h
+++ b/xorg-server/hw/dmx/dmxdpms.h
@@ -36,7 +36,7 @@
#ifndef _DMXDPMS_H_
#define _DMXDPMS_H_
-extern void dmxDPMSInit(DMXScreenInfo *dmxScreen);
-extern void dmxDPMSTerm(DMXScreenInfo *dmxScreen);
-extern void dmxDPMSWakeup(void); /* Call when input is processed */
+extern void dmxDPMSInit(DMXScreenInfo * dmxScreen);
+extern void dmxDPMSTerm(DMXScreenInfo * dmxScreen);
+extern void dmxDPMSWakeup(void); /* Call when input is processed */
#endif
diff --git a/xorg-server/hw/dmx/dmxfont.h b/xorg-server/hw/dmx/dmxfont.h
index 086e71b59..8575ca953 100644
--- a/xorg-server/hw/dmx/dmxfont.h
+++ b/xorg-server/hw/dmx/dmxfont.h
@@ -41,7 +41,7 @@
/** Font private area. */
typedef struct _dmxFontPriv {
- int refcnt;
+ int refcnt;
XFontStruct **font;
} dmxFontPrivRec, *dmxFontPrivPtr;
@@ -56,4 +56,4 @@ extern Bool dmxBEFreeFont(ScreenPtr pScreen, FontPtr pFont);
extern int dmxFontPrivateIndex;
-#endif /* DMXFONT_H */
+#endif /* DMXFONT_H */
diff --git a/xorg-server/hw/dmx/dmxgc.h b/xorg-server/hw/dmx/dmxgc.h
index 43a6296af..7b99d88c6 100644
--- a/xorg-server/hw/dmx/dmxgc.h
+++ b/xorg-server/hw/dmx/dmxgc.h
@@ -1,86 +1,85 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- * Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Interface for GC support. \see dmxgc.c */
-
-#ifndef DMXGC_H
-#define DMXGC_H
-
-#include "gcstruct.h"
-
-/** GC private area. */
-typedef struct _dmxGCPriv {
- GCOps *ops;
- GCFuncs *funcs;
- XlibGC gc;
- Bool msc;
-} dmxGCPrivRec, *dmxGCPrivPtr;
-
-
-extern Bool dmxInitGC(ScreenPtr pScreen);
-
-extern Bool dmxCreateGC(GCPtr pGC);
-extern void dmxValidateGC(GCPtr pGC, unsigned long changes,
- DrawablePtr pDrawable);
-extern void dmxChangeGC(GCPtr pGC, unsigned long mask);
-extern void dmxCopyGC(GCPtr pGCSrc, unsigned long changes, GCPtr pGCDst);
-extern void dmxDestroyGC(GCPtr pGC);
-extern void dmxChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects);
-extern void dmxDestroyClip(GCPtr pGC);
-extern void dmxCopyClip(GCPtr pGCDst, GCPtr pGCSrc);
-
-extern void dmxBECreateGC(ScreenPtr pScreen, GCPtr pGC);
-extern Bool dmxBEFreeGC(GCPtr pGC);
-
-/** Get private. */
-#define DMX_GET_GC_PRIV(_pGC) \
- (dmxGCPrivPtr)dixLookupPrivate(&(_pGC)->devPrivates, dmxGCPrivateKey)
-
-#define DMX_GC_FUNC_PROLOGUE(_pGC) \
-do { \
- dmxGCPrivPtr _pGCPriv = DMX_GET_GC_PRIV(_pGC); \
- DMX_UNWRAP(funcs, _pGCPriv, (_pGC)); \
- if (_pGCPriv->ops) \
- DMX_UNWRAP(ops, _pGCPriv, (_pGC)); \
-} while (0)
-
-#define DMX_GC_FUNC_EPILOGUE(_pGC) \
-do { \
- dmxGCPrivPtr _pGCPriv = DMX_GET_GC_PRIV(_pGC); \
- DMX_WRAP(funcs, &dmxGCFuncs, _pGCPriv, (_pGC)); \
- if (_pGCPriv->ops) \
- DMX_WRAP(ops, &dmxGCOps, _pGCPriv, (_pGC)); \
-} while (0)
-
-#endif /* DMXGC_H */
+/*
+ * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation on the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Authors:
+ * Kevin E. Martin <kem@redhat.com>
+ *
+ */
+
+/** \file
+ * Interface for GC support. \see dmxgc.c */
+
+#ifndef DMXGC_H
+#define DMXGC_H
+
+#include "gcstruct.h"
+
+/** GC private area. */
+typedef struct _dmxGCPriv {
+ GCOps *ops;
+ GCFuncs *funcs;
+ XlibGC gc;
+ Bool msc;
+} dmxGCPrivRec, *dmxGCPrivPtr;
+
+extern Bool dmxInitGC(ScreenPtr pScreen);
+
+extern Bool dmxCreateGC(GCPtr pGC);
+extern void dmxValidateGC(GCPtr pGC, unsigned long changes,
+ DrawablePtr pDrawable);
+extern void dmxChangeGC(GCPtr pGC, unsigned long mask);
+extern void dmxCopyGC(GCPtr pGCSrc, unsigned long changes, GCPtr pGCDst);
+extern void dmxDestroyGC(GCPtr pGC);
+extern void dmxChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects);
+extern void dmxDestroyClip(GCPtr pGC);
+extern void dmxCopyClip(GCPtr pGCDst, GCPtr pGCSrc);
+
+extern void dmxBECreateGC(ScreenPtr pScreen, GCPtr pGC);
+extern Bool dmxBEFreeGC(GCPtr pGC);
+
+/** Get private. */
+#define DMX_GET_GC_PRIV(_pGC) \
+ (dmxGCPrivPtr)dixLookupPrivate(&(_pGC)->devPrivates, dmxGCPrivateKey)
+
+#define DMX_GC_FUNC_PROLOGUE(_pGC) \
+do { \
+ dmxGCPrivPtr _pGCPriv = DMX_GET_GC_PRIV(_pGC); \
+ DMX_UNWRAP(funcs, _pGCPriv, (_pGC)); \
+ if (_pGCPriv->ops) \
+ DMX_UNWRAP(ops, _pGCPriv, (_pGC)); \
+} while (0)
+
+#define DMX_GC_FUNC_EPILOGUE(_pGC) \
+do { \
+ dmxGCPrivPtr _pGCPriv = DMX_GET_GC_PRIV(_pGC); \
+ DMX_WRAP(funcs, &dmxGCFuncs, _pGCPriv, (_pGC)); \
+ if (_pGCPriv->ops) \
+ DMX_WRAP(ops, &dmxGCOps, _pGCPriv, (_pGC)); \
+} while (0)
+
+#endif /* DMXGC_H */
diff --git a/xorg-server/hw/dmx/dmxgcops.h b/xorg-server/hw/dmx/dmxgcops.h
index da14d4d94..4ba0ad500 100644
--- a/xorg-server/hw/dmx/dmxgcops.h
+++ b/xorg-server/hw/dmx/dmxgcops.h
@@ -38,58 +38,58 @@
#define DMXGCOPS_H
extern void dmxFillSpans(DrawablePtr pDrawable, GCPtr pGC,
- int nInit, DDXPointPtr pptInit, int *pwidthInit,
- int fSorted);
+ int nInit, DDXPointPtr pptInit, int *pwidthInit,
+ int fSorted);
extern void dmxSetSpans(DrawablePtr pDrawable, GCPtr pGC,
- char *psrc, DDXPointPtr ppt, int *pwidth, int nspans,
- int fSorted);
+ char *psrc, DDXPointPtr ppt, int *pwidth, int nspans,
+ int fSorted);
extern void dmxPutImage(DrawablePtr pDrawable, GCPtr pGC,
- int depth, int x, int y, int w, int h,
- int leftPad, int format, char *pBits);
+ int depth, int x, int y, int w, int h,
+ int leftPad, int format, char *pBits);
extern RegionPtr dmxCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
- int srcx, int srcy, int w, int h,
- int dstx, int dsty);
+ int srcx, int srcy, int w, int h,
+ int dstx, int dsty);
extern RegionPtr dmxCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
- int srcx, int srcy, int width, int height,
- int dstx, int dsty, unsigned long bitPlane);
+ int srcx, int srcy, int width, int height,
+ int dstx, int dsty, unsigned long bitPlane);
extern void dmxPolyPoint(DrawablePtr pDrawable, GCPtr pGC,
- int mode, int npt, DDXPointPtr pptInit);
+ int mode, int npt, DDXPointPtr pptInit);
extern void dmxPolylines(DrawablePtr pDrawable, GCPtr pGC,
- int mode, int npt, DDXPointPtr pptInit);
+ int mode, int npt, DDXPointPtr pptInit);
extern void dmxPolySegment(DrawablePtr pDrawable, GCPtr pGC,
- int nseg, xSegment *pSegs);
+ int nseg, xSegment * pSegs);
extern void dmxPolyRectangle(DrawablePtr pDrawable, GCPtr pGC,
- int nrects, xRectangle *pRects);
+ int nrects, xRectangle *pRects);
extern void dmxPolyArc(DrawablePtr pDrawable, GCPtr pGC,
- int narcs, xArc *parcs);
+ int narcs, xArc * parcs);
extern void dmxFillPolygon(DrawablePtr pDrawable, GCPtr pGC,
- int shape, int mode, int count, DDXPointPtr pPts);
+ int shape, int mode, int count, DDXPointPtr pPts);
extern void dmxPolyFillRect(DrawablePtr pDrawable, GCPtr pGC,
- int nrectFill, xRectangle *prectInit);
+ int nrectFill, xRectangle *prectInit);
extern void dmxPolyFillArc(DrawablePtr pDrawable, GCPtr pGC,
- int narcs, xArc *parcs);
+ int narcs, xArc * parcs);
extern int dmxPolyText8(DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, char *chars);
+ int x, int y, int count, char *chars);
extern int dmxPolyText16(DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, unsigned short *chars);
+ int x, int y, int count, unsigned short *chars);
extern void dmxImageText8(DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, char *chars);
+ int x, int y, int count, char *chars);
extern void dmxImageText16(DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, int count, unsigned short *chars);
+ int x, int y, int count, unsigned short *chars);
extern void dmxImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, unsigned int nglyph,
- CharInfoPtr *ppci, pointer pglyphBase);
+ int x, int y, unsigned int nglyph,
+ CharInfoPtr * ppci, pointer pglyphBase);
extern void dmxPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
- int x, int y, unsigned int nglyph,
- CharInfoPtr *ppci, pointer pglyphBase);
+ int x, int y, unsigned int nglyph,
+ CharInfoPtr * ppci, pointer pglyphBase);
extern void dmxPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
- int w, int h, int x, int y);
+ int w, int h, int x, int y);
extern void dmxGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
- unsigned int format, unsigned long planeMask,
- char *pdstLine);
+ unsigned int format, unsigned long planeMask,
+ char *pdstLine);
extern void dmxGetSpans(DrawablePtr pDrawable, int wMax,
- DDXPointPtr ppt, int *pwidth, int nspans,
- char *pdstStart);
+ DDXPointPtr ppt, int *pwidth, int nspans,
+ char *pdstStart);
-#endif /* DMXGCOPS_H */
+#endif /* DMXGCOPS_H */
diff --git a/xorg-server/hw/dmx/dmxinit.h b/xorg-server/hw/dmx/dmxinit.h
index 7d166fd85..ce4e2ff4b 100644
--- a/xorg-server/hw/dmx/dmxinit.h
+++ b/xorg-server/hw/dmx/dmxinit.h
@@ -39,12 +39,12 @@
#include "scrnintstr.h"
-extern Bool dmxOpenDisplay(DMXScreenInfo *dmxScreen);
-extern void dmxSetErrorHandler(DMXScreenInfo *dmxScreen);
-extern void dmxCheckForWM(DMXScreenInfo *dmxScreen);
-extern void dmxGetScreenAttribs(DMXScreenInfo *dmxScreen);
-extern Bool dmxGetVisualInfo(DMXScreenInfo *dmxScreen);
-extern void dmxGetColormaps(DMXScreenInfo *dmxScreen);
-extern void dmxGetPixmapFormats(DMXScreenInfo *dmxScreen);
+extern Bool dmxOpenDisplay(DMXScreenInfo * dmxScreen);
+extern void dmxSetErrorHandler(DMXScreenInfo * dmxScreen);
+extern void dmxCheckForWM(DMXScreenInfo * dmxScreen);
+extern void dmxGetScreenAttribs(DMXScreenInfo * dmxScreen);
+extern Bool dmxGetVisualInfo(DMXScreenInfo * dmxScreen);
+extern void dmxGetColormaps(DMXScreenInfo * dmxScreen);
+extern void dmxGetPixmapFormats(DMXScreenInfo * dmxScreen);
-#endif /* DMXINIT_H */
+#endif /* DMXINIT_H */
diff --git a/xorg-server/hw/dmx/dmxlog.h b/xorg-server/hw/dmx/dmxlog.h
index 7b614bd73..4d4cd269a 100644
--- a/xorg-server/hw/dmx/dmxlog.h
+++ b/xorg-server/hw/dmx/dmxlog.h
@@ -55,20 +55,20 @@ typedef enum {
/* Logging functions used by Xserver/hw/dmx routines. */
extern dmxLogLevel dmxSetLogLevel(dmxLogLevel newLevel);
extern dmxLogLevel dmxGetLogLevel(void);
-extern void dmxLog(dmxLogLevel logLevel, const char *format, ...);
-extern void dmxLogCont(dmxLogLevel logLevel, const char *format, ...);
-extern const char *dmxEventName(int type);
+extern void dmxLog(dmxLogLevel logLevel, const char *format, ...);
+extern void dmxLogCont(dmxLogLevel logLevel, const char *format, ...);
+extern const char *dmxEventName(int type);
#ifndef DMX_LOG_STANDALONE
-extern void dmxLogOutput(DMXScreenInfo *dmxScreen, const char *format, ...);
-extern void dmxLogOutputCont(DMXScreenInfo *dmxScreen, const char *format,
+extern void dmxLogOutput(DMXScreenInfo * dmxScreen, const char *format, ...);
+extern void dmxLogOutputCont(DMXScreenInfo * dmxScreen, const char *format,
...);
-extern void dmxLogOutputWarning(DMXScreenInfo *dmxScreen, const char *format,
+extern void dmxLogOutputWarning(DMXScreenInfo * dmxScreen, const char *format,
...);
-extern void dmxLogInput(DMXInputInfo *dmxInput, const char *format, ...);
-extern void dmxLogInputCont(DMXInputInfo *dmxInput, const char *format, ...);
+extern void dmxLogInput(DMXInputInfo * dmxInput, const char *format, ...);
+extern void dmxLogInputCont(DMXInputInfo * dmxInput, const char *format, ...);
extern void dmxLogArgs(dmxLogLevel logLevel, int argc, char **argv);
-extern void dmxLogVisual(DMXScreenInfo *dmxScreen, XVisualInfo *vi,
+extern void dmxLogVisual(DMXScreenInfo * dmxScreen, XVisualInfo * vi,
int defaultVisual);
extern const char *dmxXInputEventName(int type);
#endif
diff --git a/xorg-server/hw/dmx/dmxpixmap.h b/xorg-server/hw/dmx/dmxpixmap.h
index a41918ce4..30bb666d5 100644
--- a/xorg-server/hw/dmx/dmxpixmap.h
+++ b/xorg-server/hw/dmx/dmxpixmap.h
@@ -1,64 +1,63 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- * Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Interface for pixmap support. \see dmxpixmap.c */
-
-#ifndef DMXPIXMAP_H
-#define DMXPIXMAP_H
-
-#include "pixmapstr.h"
-
-/** Pixmap private area. */
-typedef struct _dmxPixPriv {
- Pixmap pixmap;
- XImage *detachedImage;
-} dmxPixPrivRec, *dmxPixPrivPtr;
-
-
-extern Bool dmxInitPixmap(ScreenPtr pScreen);
-
-extern PixmapPtr dmxCreatePixmap(ScreenPtr pScreen,
- int width, int height, int depth,
- unsigned usage_hint);
-extern Bool dmxDestroyPixmap(PixmapPtr pPixmap);
-extern RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap);
-
-extern void dmxBECreatePixmap(PixmapPtr pPixmap);
-extern Bool dmxBEFreePixmap(PixmapPtr pPixmap);
-
-/** Get pixmap private pointer. */
-#define DMX_GET_PIXMAP_PRIV(_pPix) \
- (dmxPixPrivPtr)dixLookupPrivate(&(_pPix)->devPrivates, dmxPixPrivateKey)
-
-#endif /* DMXPIXMAP_H */
+/*
+ * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation on the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Authors:
+ * Kevin E. Martin <kem@redhat.com>
+ *
+ */
+
+/** \file
+ * Interface for pixmap support. \see dmxpixmap.c */
+
+#ifndef DMXPIXMAP_H
+#define DMXPIXMAP_H
+
+#include "pixmapstr.h"
+
+/** Pixmap private area. */
+typedef struct _dmxPixPriv {
+ Pixmap pixmap;
+ XImage *detachedImage;
+} dmxPixPrivRec, *dmxPixPrivPtr;
+
+extern Bool dmxInitPixmap(ScreenPtr pScreen);
+
+extern PixmapPtr dmxCreatePixmap(ScreenPtr pScreen,
+ int width, int height, int depth,
+ unsigned usage_hint);
+extern Bool dmxDestroyPixmap(PixmapPtr pPixmap);
+extern RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap);
+
+extern void dmxBECreatePixmap(PixmapPtr pPixmap);
+extern Bool dmxBEFreePixmap(PixmapPtr pPixmap);
+
+/** Get pixmap private pointer. */
+#define DMX_GET_PIXMAP_PRIV(_pPix) \
+ (dmxPixPrivPtr)dixLookupPrivate(&(_pPix)->devPrivates, dmxPixPrivateKey)
+
+#endif /* DMXPIXMAP_H */
diff --git a/xorg-server/hw/dmx/dmxscrinit.h b/xorg-server/hw/dmx/dmxscrinit.h
index 328e33272..5c0bfacce 100644
--- a/xorg-server/hw/dmx/dmxscrinit.h
+++ b/xorg-server/hw/dmx/dmxscrinit.h
@@ -1,48 +1,48 @@
-/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- * Kevin E. Martin <kem@redhat.com>
- * David H. Dawes <dawes@xfree86.org>
- *
- */
-
-/** \file
- * Interface for screen initialization. \see dmxscrinit.c */
-
-#ifndef DMXSCRINIT_H
-#define DMXSCRINIT_H
-
-#include "scrnintstr.h"
-
-extern Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]);
-
-extern void dmxBEScreenInit(int idx, ScreenPtr pScreen);
-extern void dmxBECloseScreen(ScreenPtr pScreen);
-
-#endif /* DMXSCRINIT_H */
+/*
+ * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation on the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Authors:
+ * Kevin E. Martin <kem@redhat.com>
+ * David H. Dawes <dawes@xfree86.org>
+ *
+ */
+
+/** \file
+ * Interface for screen initialization. \see dmxscrinit.c */
+
+#ifndef DMXSCRINIT_H
+#define DMXSCRINIT_H
+
+#include "scrnintstr.h"
+
+extern Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]);
+
+extern void dmxBEScreenInit(int idx, ScreenPtr pScreen);
+extern void dmxBECloseScreen(ScreenPtr pScreen);
+
+#endif /* DMXSCRINIT_H */
diff --git a/xorg-server/hw/dmx/dmxshadow.h b/xorg-server/hw/dmx/dmxshadow.h
index cafe87900..081b4d1dc 100644
--- a/xorg-server/hw/dmx/dmxshadow.h
+++ b/xorg-server/hw/dmx/dmxshadow.h
@@ -43,4 +43,4 @@
extern void dmxShadowUpdateProc(ScreenPtr pScreen, shadowBufPtr pBuf);
-#endif /* DMXSHADOW_H */
+#endif /* DMXSHADOW_H */
diff --git a/xorg-server/hw/dmx/dmxstat.h b/xorg-server/hw/dmx/dmxstat.h
index 04c88d3c9..8c8d7bae5 100644
--- a/xorg-server/hw/dmx/dmxstat.h
+++ b/xorg-server/hw/dmx/dmxstat.h
@@ -43,13 +43,13 @@
#define DMX_STAT_BIN0 10000 /**< us for bin[0] */
#define DMX_STAT_BINMULT 100 /**< multiplier for next bin[] */
-extern int dmxStatInterval; /**< Only for dmxstat.c and dmxsync.c */
-extern void dmxStatActivate(const char *interval, const char *displays);
+extern int dmxStatInterval; /**< Only for dmxstat.c and dmxsync.c */
+extern void dmxStatActivate(const char *interval, const char *displays);
extern DMXStatInfo *dmxStatAlloc(void);
-extern void dmxStatFree(DMXStatInfo *);
-extern void dmxStatInit(void);
-extern void dmxStatSync(DMXScreenInfo *dmxScreen,
- struct timeval *stop, struct timeval *start,
- unsigned long pending);
+extern void dmxStatFree(DMXStatInfo *);
+extern void dmxStatInit(void);
+extern void dmxStatSync(DMXScreenInfo * dmxScreen,
+ struct timeval *stop, struct timeval *start,
+ unsigned long pending);
#endif
diff --git a/xorg-server/hw/dmx/dmxsync.h b/xorg-server/hw/dmx/dmxsync.h
index b80f54af2..d67ae09c6 100644
--- a/xorg-server/hw/dmx/dmxsync.h
+++ b/xorg-server/hw/dmx/dmxsync.h
@@ -39,5 +39,5 @@
extern void dmxSyncActivate(const char *interval);
extern void dmxSyncInit(void);
-extern void dmxSync(DMXScreenInfo *dmxScreen, Bool now);
+extern void dmxSync(DMXScreenInfo * dmxScreen, Bool now);
#endif
diff --git a/xorg-server/hw/dmx/dmxvisual.h b/xorg-server/hw/dmx/dmxvisual.h
index bcb54cd0e..4d97df927 100644
--- a/xorg-server/hw/dmx/dmxvisual.h
+++ b/xorg-server/hw/dmx/dmxvisual.h
@@ -39,9 +39,9 @@
#include "scrnintstr.h"
-extern Visual *dmxLookupVisual(ScreenPtr pScreen, VisualPtr pVisual);
-extern Visual *dmxLookupVisualFromID(ScreenPtr pScreen, VisualID vid);
-extern Colormap dmxColormapFromDefaultVisual(ScreenPtr pScreen,
- Visual *visual);
+extern Visual *dmxLookupVisual(ScreenPtr pScreen, VisualPtr pVisual);
+extern Visual *dmxLookupVisualFromID(ScreenPtr pScreen, VisualID vid);
+extern Colormap dmxColormapFromDefaultVisual(ScreenPtr pScreen,
+ Visual * visual);
-#endif /* DMXVISUAL_H */
+#endif /* DMXVISUAL_H */
diff --git a/xorg-server/hw/dmx/glxProxy/compsize.h b/xorg-server/hw/dmx/glxProxy/compsize.h
index 856c6f5ad..360966233 100644
--- a/xorg-server/hw/dmx/glxProxy/compsize.h
+++ b/xorg-server/hw/dmx/glxProxy/compsize.h
@@ -48,4 +48,4 @@ extern GLint __glTexGeniv_size(GLenum e);
extern GLint __glTexParameterfv_size(GLenum e);
extern GLint __glTexParameteriv_size(GLenum e);
-#endif /* !__compsize_h__ */
+#endif /* !__compsize_h__ */
diff --git a/xorg-server/hw/dmx/glxProxy/global.c b/xorg-server/hw/dmx/glxProxy/global.c
index 9cf8c11c3..6d4612deb 100644
--- a/xorg-server/hw/dmx/glxProxy/global.c
+++ b/xorg-server/hw/dmx/glxProxy/global.c
@@ -64,7 +64,7 @@ xGLXSingleReply __glXReply;
** A set of state for each client. The 0th one is unused because client
** indices start at 1, not 0.
*/
-__GLXclientState *__glXClients[MAXCLIENTS+1];
+__GLXclientState *__glXClients[MAXCLIENTS + 1];
int __glXVersionMajor;
int __glXVersionMinor;
diff --git a/xorg-server/hw/dmx/glxProxy/glxcmds.h b/xorg-server/hw/dmx/glxProxy/glxcmds.h
index ae866be29..b0745927e 100644
--- a/xorg-server/hw/dmx/glxProxy/glxcmds.h
+++ b/xorg-server/hw/dmx/glxProxy/glxcmds.h
@@ -28,10 +28,10 @@
#ifndef __GLX_cmds_h__
#define __GLX_cmds_h__
-extern int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc);
-extern int __glXCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc);
-extern int __glXJoinSwapGroupSGIX(__GLXclientState *cl, GLbyte *pc);
-extern int __glXMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc);
-extern int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc);
+extern int __glXBindSwapBarrierSGIX(__GLXclientState * cl, GLbyte * pc);
+extern int __glXCreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc);
+extern int __glXJoinSwapGroupSGIX(__GLXclientState * cl, GLbyte * pc);
+extern int __glXMakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc);
+extern int __glXQueryMaxSwapBarriersSGIX(__GLXclientState * cl, GLbyte * pc);
-#endif /* !__GLX_cmds_h__ */
+#endif /* !__GLX_cmds_h__ */
diff --git a/xorg-server/hw/dmx/glxProxy/glxcontext.h b/xorg-server/hw/dmx/glxProxy/glxcontext.h
index f88093bc7..ac8c0573d 100644
--- a/xorg-server/hw/dmx/glxProxy/glxcontext.h
+++ b/xorg-server/hw/dmx/glxProxy/glxcontext.h
@@ -37,68 +37,68 @@ typedef struct __GLXcontextRec __GLXcontext;
struct __GLXcontextRec {
/*
- ** list of context structs
- */
+ ** list of context structs
+ */
struct __GLXcontextRec *last;
struct __GLXcontextRec *next;
/*
- ** Pointer to screen info data for this context. This is set
- ** when the context is created.
- */
+ ** Pointer to screen info data for this context. This is set
+ ** when the context is created.
+ */
ScreenPtr pScreen;
__GLXscreenInfo *pGlxScreen;
/*
- ** This context is created with respect to this visual.
- */
+ ** This context is created with respect to this visual.
+ */
VisualRec *pVisual;
__GLXvisualConfig *pGlxVisual;
__GLXFBConfig *pFBConfig;
/*
- ** The XID of this context.
- */
+ ** The XID of this context.
+ */
XID id;
XID *real_ids;
/*
- ** The XID of the shareList context.
- */
+ ** The XID of the shareList context.
+ */
XID share_id;
/*
- ** Visual id.
- */
+ ** Visual id.
+ */
VisualID vid;
VisualID *real_vids;
/*
- ** screen number.
- */
+ ** screen number.
+ */
GLint screen;
/*
- ** Whether this context's ID still exists.
- */
+ ** Whether this context's ID still exists.
+ */
GLboolean idExists;
-
+
/*
- ** Whether this context is current for some client.
- */
+ ** Whether this context is current for some client.
+ */
GLboolean isCurrent;
-
+
/*
- ** Buffers for feedback and selection.
- */
+ ** Buffers for feedback and selection.
+ */
GLfloat *feedbackBuf;
- GLint feedbackBufSize; /* number of elements allocated */
+ GLint feedbackBufSize; /* number of elements allocated */
GLuint *selectBuf;
- GLint selectBufSize; /* number of elements allocated */
+ GLint selectBufSize; /* number of elements allocated */
/*
- ** Set only if current drawable is a glx pixmap.
- */
+ ** Set only if current drawable is a glx pixmap.
+ */
__GLXpixmap *pGlxPixmap;
__GLXpixmap *pGlxReadPixmap;
__glXWindow *pGlxWindow;
@@ -108,4 +108,4 @@ struct __GLXcontextRec {
};
-#endif /* !__GLX_context_h__ */
+#endif /* !__GLX_context_h__ */
diff --git a/xorg-server/hw/dmx/glxProxy/glxdrawable.h b/xorg-server/hw/dmx/glxProxy/glxdrawable.h
index 8f2d81e26..0340896e5 100644
--- a/xorg-server/hw/dmx/glxProxy/glxdrawable.h
+++ b/xorg-server/hw/dmx/glxProxy/glxdrawable.h
@@ -48,12 +48,11 @@ typedef struct {
DrawablePtr pDraw;
int type;
Bool idExists;
- int refcnt; /* contexts bound */
+ int refcnt; /* contexts bound */
__GLXFBConfig *pGlxFBConfig;
ScreenPtr pScreen;
} __glXWindow;
-
typedef struct {
__GLXscreenInfo *pGlxScreen;
__GLXFBConfig *pFBConfig;
@@ -63,4 +62,4 @@ typedef struct {
XID *be_xids;
} __glXPbuffer;
-#endif /* !__GLX_drawable_h__ */
+#endif /* !__GLX_drawable_h__ */
diff --git a/xorg-server/hw/dmx/glxProxy/glxerror.h b/xorg-server/hw/dmx/glxProxy/glxerror.h
index d84ec4457..26492d2d4 100644
--- a/xorg-server/hw/dmx/glxProxy/glxerror.h
+++ b/xorg-server/hw/dmx/glxProxy/glxerror.h
@@ -48,5 +48,4 @@ extern int __glXUnsupportedPrivateRequest;
extern int __glXBadFBConfig;
extern int __glXBadPbuffer;
-
#endif
diff --git a/xorg-server/hw/dmx/glxProxy/glxscreens.h b/xorg-server/hw/dmx/glxProxy/glxscreens.h
index da50bdc85..a9fe2a9db 100644
--- a/xorg-server/hw/dmx/glxProxy/glxscreens.h
+++ b/xorg-server/hw/dmx/glxProxy/glxscreens.h
@@ -33,8 +33,6 @@
#include "GL/internal/glcore.h"
-
-
typedef struct {
__GLXvisualConfig *pGlxVisual;
@@ -47,10 +45,9 @@ typedef struct {
} __GLXscreenInfo;
-
extern void __glXScreenInit(GLint);
extern void __glXScreenReset(void);
-extern char *__glXGetServerString( unsigned int name );
+extern char *__glXGetServerString(unsigned int name);
-#endif /* !__GLX_screens_h__ */
+#endif /* !__GLX_screens_h__ */
diff --git a/xorg-server/hw/dmx/glxProxy/glxsingle.h b/xorg-server/hw/dmx/glxProxy/glxsingle.h
index 7c23537e8..32a9d4921 100644
--- a/xorg-server/hw/dmx/glxProxy/glxsingle.h
+++ b/xorg-server/hw/dmx/glxProxy/glxsingle.h
@@ -31,24 +31,24 @@
#ifndef __GLXSINGLE_H
#define __GLXSINGLE_H
-extern int __glXForwardSingleReq( __GLXclientState *cl, GLbyte *pc );
-extern int __glXForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc );
-extern int __glXForwardAllWithReply( __GLXclientState *cl, GLbyte *pc );
+extern int __glXForwardSingleReq(__GLXclientState * cl, GLbyte * pc);
+extern int __glXForwardPipe0WithReply(__GLXclientState * cl, GLbyte * pc);
+extern int __glXForwardAllWithReply(__GLXclientState * cl, GLbyte * pc);
-extern int __glXForwardSingleReqSwap( __GLXclientState *cl, GLbyte *pc );
+extern int __glXForwardSingleReqSwap(__GLXclientState * cl, GLbyte * pc);
-extern int __glXForwardPipe0WithReplySwap( __GLXclientState *cl, GLbyte *pc );
-extern int __glXForwardPipe0WithReplySwapsv( __GLXclientState *cl, GLbyte *pc );
-extern int __glXForwardPipe0WithReplySwapiv( __GLXclientState *cl, GLbyte *pc );
-extern int __glXForwardPipe0WithReplySwapdv( __GLXclientState *cl, GLbyte *pc );
+extern int __glXForwardPipe0WithReplySwap(__GLXclientState * cl, GLbyte * pc);
+extern int __glXForwardPipe0WithReplySwapsv(__GLXclientState * cl, GLbyte * pc);
+extern int __glXForwardPipe0WithReplySwapiv(__GLXclientState * cl, GLbyte * pc);
+extern int __glXForwardPipe0WithReplySwapdv(__GLXclientState * cl, GLbyte * pc);
-extern int __glXForwardAllWithReplySwap( __GLXclientState *cl, GLbyte *pc );
-extern int __glXForwardAllWithReplySwapsv( __GLXclientState *cl, GLbyte *pc );
-extern int __glXForwardAllWithReplySwapiv( __GLXclientState *cl, GLbyte *pc );
-extern int __glXForwardAllWithReplySwapdv( __GLXclientState *cl, GLbyte *pc );
+extern int __glXForwardAllWithReplySwap(__GLXclientState * cl, GLbyte * pc);
+extern int __glXForwardAllWithReplySwapsv(__GLXclientState * cl, GLbyte * pc);
+extern int __glXForwardAllWithReplySwapiv(__GLXclientState * cl, GLbyte * pc);
+extern int __glXForwardAllWithReplySwapdv(__GLXclientState * cl, GLbyte * pc);
-extern int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc);
-extern int __glXDispSwap_GetTexImage(__GLXclientState *cl, GLbyte *pc);
-extern int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc);
+extern int __glXDisp_ReadPixels(__GLXclientState * cl, GLbyte * pc);
+extern int __glXDispSwap_GetTexImage(__GLXclientState * cl, GLbyte * pc);
+extern int __glXDispSwap_GetColorTable(__GLXclientState * cl, GLbyte * pc);
#endif
diff --git a/xorg-server/hw/dmx/glxProxy/glxswap.h b/xorg-server/hw/dmx/glxProxy/glxswap.h
index 08e38df7b..1e1fea14f 100644
--- a/xorg-server/hw/dmx/glxProxy/glxswap.h
+++ b/xorg-server/hw/dmx/glxProxy/glxswap.h
@@ -34,13 +34,13 @@
#ifndef __GLX_swap_h__
#define __GLX_swap_h__
-extern int JoinSwapGroupSGIX(DrawablePtr pDraw, DrawablePtr pMember);
-extern int SGSwapBuffers(__GLXclientState *cl, XID drawId, GLXContextTag tag,
- DrawablePtr pDraw);
+extern int JoinSwapGroupSGIX(DrawablePtr pDraw, DrawablePtr pMember);
+extern int SGSwapBuffers(__GLXclientState * cl, XID drawId, GLXContextTag tag,
+ DrawablePtr pDraw);
extern void SwapBarrierInit(void);
extern void SwapBarrierReset(void);
-extern int QueryMaxSwapBarriersSGIX(int screen);
-extern int BindSwapBarrierSGIX(DrawablePtr pDraw, int barrier);
+extern int QueryMaxSwapBarriersSGIX(int screen);
+extern int BindSwapBarrierSGIX(DrawablePtr pDraw, int barrier);
-#endif /* !__GLX_swap_h__ */
+#endif /* !__GLX_swap_h__ */
diff --git a/xorg-server/hw/dmx/glxProxy/unpack.h b/xorg-server/hw/dmx/glxProxy/unpack.h
index c592c3d92..b4b73580c 100644
--- a/xorg-server/hw/dmx/glxProxy/unpack.h
+++ b/xorg-server/hw/dmx/glxProxy/unpack.h
@@ -1,230 +1,223 @@
-#ifndef __GLX_unpack_h__
-#define __GLX_unpack_h__
-
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#define __GLX_PAD(s) (((s)+3) & (GLuint)~3)
-
-/*
-** Fetch the context-id out of a SingleReq request pointed to by pc.
-*/
-#define __GLX_GET_SINGLE_CONTEXT_TAG(pc) (((xGLXSingleReq*)pc)->contextTag)
-#define __GLX_GET_VENDPRIV_CONTEXT_TAG(pc) (((xGLXVendorPrivateReq*)pc)->contextTag)
-
-/*
-** Fetch a double from potentially unaligned memory.
-*/
-#ifdef __GLX_ALIGN64
-#define __GLX_MEM_COPY(dst,src,n) memmove(dst,src,n)
-#define __GLX_GET_DOUBLE(dst,src) __GLX_MEM_COPY(&dst,src,8)
-#else
-#define __GLX_GET_DOUBLE(dst,src) (dst) = *((GLdouble*)(src))
-#endif
-
-extern void __glXMemInit(void);
-
-extern xGLXSingleReply __glXReply;
-
-#define __GLX_BEGIN_REPLY(size) \
- __glXReply.length = __GLX_PAD(size) >> 2; \
- __glXReply.type = X_Reply; \
- __glXReply.sequenceNumber = client->sequence;
-
-#define __GLX_SEND_HEADER() \
- WriteToClient( client, sz_xGLXSingleReply, (char *)&__glXReply);
-
-#define __GLX_PUT_RETVAL(a) \
- __glXReply.retval = (a);
-
-#define __GLX_PUT_SIZE(a) \
- __glXReply.size = (a);
-
-#define __GLX_PUT_RENDERMODE(m) \
- __glXReply.pad3 = (m)
-
-/*
-** Get a buffer to hold returned data, with the given alignment. If we have
-** to realloc, allocate size+align, in case the pointer has to be bumped for
-** alignment. The answerBuffer should already be aligned.
-**
-** NOTE: the cast (long)res below assumes a long is large enough to hold a
-** pointer.
-*/
-#define __GLX_GET_ANSWER_BUFFER(res,cl,size,align) \
- if ((size) > sizeof(answerBuffer)) { \
- int bump; \
- if ((cl)->returnBufSize < (size)+(align)) { \
- (cl)->returnBuf = (GLbyte*)realloc((cl)->returnBuf, \
- (size)+(align)); \
- if (!(cl)->returnBuf) { \
- return BadAlloc; \
- } \
- (cl)->returnBufSize = (size)+(align); \
- } \
- res = (char*)cl->returnBuf; \
- bump = (long)(res) % (align); \
- if (bump) res += (align) - (bump); \
- } else { \
- res = (char *)answerBuffer; \
- }
-
-#define __GLX_PUT_BYTE() \
- *(GLbyte *)&__glXReply.pad3 = *(GLbyte *)answer
-
-#define __GLX_PUT_SHORT() \
- *(GLshort *)&__glXReply.pad3 = *(GLshort *)answer
-
-#define __GLX_PUT_INT() \
- *(GLint *)&__glXReply.pad3 = *(GLint *)answer
-
-#define __GLX_PUT_FLOAT() \
- *(GLfloat *)&__glXReply.pad3 = *(GLfloat *)answer
-
-#define __GLX_PUT_DOUBLE() \
- *(GLdouble *)&__glXReply.pad3 = *(GLdouble *)answer
-
-#define __GLX_SEND_BYTE_ARRAY(len) \
- WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT8), (char *)answer)
-
-#define __GLX_SEND_SHORT_ARRAY(len) \
- WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT16), (char *)answer)
-
-#define __GLX_SEND_INT_ARRAY(len) \
- WriteToClient(client, (len)*__GLX_SIZE_INT32, (char *)answer)
-
-#define __GLX_SEND_FLOAT_ARRAY(len) \
- WriteToClient(client, (len)*__GLX_SIZE_FLOAT32, (char *)answer)
-
-#define __GLX_SEND_DOUBLE_ARRAY(len) \
- WriteToClient(client, (len)*__GLX_SIZE_FLOAT64, (char *)answer)
-
-
-#define __GLX_SEND_VOID_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len)
-#define __GLX_SEND_UBYTE_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len)
-#define __GLX_SEND_USHORT_ARRAY(len) __GLX_SEND_SHORT_ARRAY(len)
-#define __GLX_SEND_UINT_ARRAY(len) __GLX_SEND_INT_ARRAY(len)
-
-/*
-** PERFORMANCE NOTE:
-** Machine dependent optimizations abound here; these swapping macros can
-** conceivably be replaced with routines that do the job faster.
-*/
-#define __GLX_DECLARE_SWAP_VARIABLES \
- GLbyte sw
-
-#define __GLX_DECLARE_SWAP_ARRAY_VARIABLES \
- GLbyte *swapPC; \
- GLbyte *swapEnd
-
-
-#define __GLX_SWAP_INT(pc) \
- sw = ((GLbyte *)(pc))[0]; \
- ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \
- ((GLbyte *)(pc))[3] = sw; \
- sw = ((GLbyte *)(pc))[1]; \
- ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \
- ((GLbyte *)(pc))[2] = sw;
-
-#define __GLX_SWAP_SHORT(pc) \
- sw = ((GLbyte *)(pc))[0]; \
- ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[1]; \
- ((GLbyte *)(pc))[1] = sw;
-
-#define __GLX_SWAP_DOUBLE(pc) \
- sw = ((GLbyte *)(pc))[0]; \
- ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[7]; \
- ((GLbyte *)(pc))[7] = sw; \
- sw = ((GLbyte *)(pc))[1]; \
- ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[6]; \
- ((GLbyte *)(pc))[6] = sw; \
- sw = ((GLbyte *)(pc))[2]; \
- ((GLbyte *)(pc))[2] = ((GLbyte *)(pc))[5]; \
- ((GLbyte *)(pc))[5] = sw; \
- sw = ((GLbyte *)(pc))[3]; \
- ((GLbyte *)(pc))[3] = ((GLbyte *)(pc))[4]; \
- ((GLbyte *)(pc))[4] = sw;
-
-#define __GLX_SWAP_FLOAT(pc) \
- sw = ((GLbyte *)(pc))[0]; \
- ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \
- ((GLbyte *)(pc))[3] = sw; \
- sw = ((GLbyte *)(pc))[1]; \
- ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \
- ((GLbyte *)(pc))[2] = sw;
-
-#define __GLX_SWAP_INT_ARRAY(pc, count) \
- swapPC = ((GLbyte *)(pc)); \
- swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT32;\
- while (swapPC < swapEnd) { \
- __GLX_SWAP_INT(swapPC); \
- swapPC += __GLX_SIZE_INT32; \
- }
-
-#define __GLX_SWAP_SHORT_ARRAY(pc, count) \
- swapPC = ((GLbyte *)(pc)); \
- swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT16;\
- while (swapPC < swapEnd) { \
- __GLX_SWAP_SHORT(swapPC); \
- swapPC += __GLX_SIZE_INT16; \
- }
-
-#define __GLX_SWAP_DOUBLE_ARRAY(pc, count) \
- swapPC = ((GLbyte *)(pc)); \
- swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT64;\
- while (swapPC < swapEnd) { \
- __GLX_SWAP_DOUBLE(swapPC); \
- swapPC += __GLX_SIZE_FLOAT64; \
- }
-
-#define __GLX_SWAP_FLOAT_ARRAY(pc, count) \
- swapPC = ((GLbyte *)(pc)); \
- swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT32;\
- while (swapPC < swapEnd) { \
- __GLX_SWAP_FLOAT(swapPC); \
- swapPC += __GLX_SIZE_FLOAT32; \
- }
-
-#define __GLX_SWAP_REPLY_HEADER() \
- __GLX_SWAP_SHORT(&__glXReply.sequenceNumber); \
- __GLX_SWAP_INT(&__glXReply.length);
-
-#define __GLX_SWAP_REPLY_RETVAL() \
- __GLX_SWAP_INT(&__glXReply.retval)
-
-#define __GLX_SWAP_REPLY_SIZE() \
- __GLX_SWAP_INT(&__glXReply.size)
-
-#endif /* !__GLX_unpack_h__ */
-
-
-
-
-
+#ifndef __GLX_unpack_h__
+#define __GLX_unpack_h__
+
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#define __GLX_PAD(s) (((s)+3) & (GLuint)~3)
+
+/*
+** Fetch the context-id out of a SingleReq request pointed to by pc.
+*/
+#define __GLX_GET_SINGLE_CONTEXT_TAG(pc) (((xGLXSingleReq*)pc)->contextTag)
+#define __GLX_GET_VENDPRIV_CONTEXT_TAG(pc) (((xGLXVendorPrivateReq*)pc)->contextTag)
+
+/*
+** Fetch a double from potentially unaligned memory.
+*/
+#ifdef __GLX_ALIGN64
+#define __GLX_MEM_COPY(dst,src,n) memmove(dst,src,n)
+#define __GLX_GET_DOUBLE(dst,src) __GLX_MEM_COPY(&dst,src,8)
+#else
+#define __GLX_GET_DOUBLE(dst,src) (dst) = *((GLdouble*)(src))
+#endif
+
+extern void __glXMemInit(void);
+
+extern xGLXSingleReply __glXReply;
+
+#define __GLX_BEGIN_REPLY(size) \
+ __glXReply.length = __GLX_PAD(size) >> 2; \
+ __glXReply.type = X_Reply; \
+ __glXReply.sequenceNumber = client->sequence;
+
+#define __GLX_SEND_HEADER() \
+ WriteToClient( client, sz_xGLXSingleReply, (char *)&__glXReply);
+
+#define __GLX_PUT_RETVAL(a) \
+ __glXReply.retval = (a);
+
+#define __GLX_PUT_SIZE(a) \
+ __glXReply.size = (a);
+
+#define __GLX_PUT_RENDERMODE(m) \
+ __glXReply.pad3 = (m)
+
+/*
+** Get a buffer to hold returned data, with the given alignment. If we have
+** to realloc, allocate size+align, in case the pointer has to be bumped for
+** alignment. The answerBuffer should already be aligned.
+**
+** NOTE: the cast (long)res below assumes a long is large enough to hold a
+** pointer.
+*/
+#define __GLX_GET_ANSWER_BUFFER(res,cl,size,align) \
+ if ((size) > sizeof(answerBuffer)) { \
+ int bump; \
+ if ((cl)->returnBufSize < (size)+(align)) { \
+ (cl)->returnBuf = (GLbyte*)realloc((cl)->returnBuf, \
+ (size)+(align)); \
+ if (!(cl)->returnBuf) { \
+ return BadAlloc; \
+ } \
+ (cl)->returnBufSize = (size)+(align); \
+ } \
+ res = (char*)cl->returnBuf; \
+ bump = (long)(res) % (align); \
+ if (bump) res += (align) - (bump); \
+ } else { \
+ res = (char *)answerBuffer; \
+ }
+
+#define __GLX_PUT_BYTE() \
+ *(GLbyte *)&__glXReply.pad3 = *(GLbyte *)answer
+
+#define __GLX_PUT_SHORT() \
+ *(GLshort *)&__glXReply.pad3 = *(GLshort *)answer
+
+#define __GLX_PUT_INT() \
+ *(GLint *)&__glXReply.pad3 = *(GLint *)answer
+
+#define __GLX_PUT_FLOAT() \
+ *(GLfloat *)&__glXReply.pad3 = *(GLfloat *)answer
+
+#define __GLX_PUT_DOUBLE() \
+ *(GLdouble *)&__glXReply.pad3 = *(GLdouble *)answer
+
+#define __GLX_SEND_BYTE_ARRAY(len) \
+ WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT8), (char *)answer)
+
+#define __GLX_SEND_SHORT_ARRAY(len) \
+ WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT16), (char *)answer)
+
+#define __GLX_SEND_INT_ARRAY(len) \
+ WriteToClient(client, (len)*__GLX_SIZE_INT32, (char *)answer)
+
+#define __GLX_SEND_FLOAT_ARRAY(len) \
+ WriteToClient(client, (len)*__GLX_SIZE_FLOAT32, (char *)answer)
+
+#define __GLX_SEND_DOUBLE_ARRAY(len) \
+ WriteToClient(client, (len)*__GLX_SIZE_FLOAT64, (char *)answer)
+
+#define __GLX_SEND_VOID_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len)
+#define __GLX_SEND_UBYTE_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len)
+#define __GLX_SEND_USHORT_ARRAY(len) __GLX_SEND_SHORT_ARRAY(len)
+#define __GLX_SEND_UINT_ARRAY(len) __GLX_SEND_INT_ARRAY(len)
+
+/*
+** PERFORMANCE NOTE:
+** Machine dependent optimizations abound here; these swapping macros can
+** conceivably be replaced with routines that do the job faster.
+*/
+#define __GLX_DECLARE_SWAP_VARIABLES \
+ GLbyte sw
+
+#define __GLX_DECLARE_SWAP_ARRAY_VARIABLES \
+ GLbyte *swapPC; \
+ GLbyte *swapEnd
+
+#define __GLX_SWAP_INT(pc) \
+ sw = ((GLbyte *)(pc))[0]; \
+ ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \
+ ((GLbyte *)(pc))[3] = sw; \
+ sw = ((GLbyte *)(pc))[1]; \
+ ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \
+ ((GLbyte *)(pc))[2] = sw;
+
+#define __GLX_SWAP_SHORT(pc) \
+ sw = ((GLbyte *)(pc))[0]; \
+ ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[1]; \
+ ((GLbyte *)(pc))[1] = sw;
+
+#define __GLX_SWAP_DOUBLE(pc) \
+ sw = ((GLbyte *)(pc))[0]; \
+ ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[7]; \
+ ((GLbyte *)(pc))[7] = sw; \
+ sw = ((GLbyte *)(pc))[1]; \
+ ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[6]; \
+ ((GLbyte *)(pc))[6] = sw; \
+ sw = ((GLbyte *)(pc))[2]; \
+ ((GLbyte *)(pc))[2] = ((GLbyte *)(pc))[5]; \
+ ((GLbyte *)(pc))[5] = sw; \
+ sw = ((GLbyte *)(pc))[3]; \
+ ((GLbyte *)(pc))[3] = ((GLbyte *)(pc))[4]; \
+ ((GLbyte *)(pc))[4] = sw;
+
+#define __GLX_SWAP_FLOAT(pc) \
+ sw = ((GLbyte *)(pc))[0]; \
+ ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \
+ ((GLbyte *)(pc))[3] = sw; \
+ sw = ((GLbyte *)(pc))[1]; \
+ ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \
+ ((GLbyte *)(pc))[2] = sw;
+
+#define __GLX_SWAP_INT_ARRAY(pc, count) \
+ swapPC = ((GLbyte *)(pc)); \
+ swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT32;\
+ while (swapPC < swapEnd) { \
+ __GLX_SWAP_INT(swapPC); \
+ swapPC += __GLX_SIZE_INT32; \
+ }
+
+#define __GLX_SWAP_SHORT_ARRAY(pc, count) \
+ swapPC = ((GLbyte *)(pc)); \
+ swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT16;\
+ while (swapPC < swapEnd) { \
+ __GLX_SWAP_SHORT(swapPC); \
+ swapPC += __GLX_SIZE_INT16; \
+ }
+
+#define __GLX_SWAP_DOUBLE_ARRAY(pc, count) \
+ swapPC = ((GLbyte *)(pc)); \
+ swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT64;\
+ while (swapPC < swapEnd) { \
+ __GLX_SWAP_DOUBLE(swapPC); \
+ swapPC += __GLX_SIZE_FLOAT64; \
+ }
+
+#define __GLX_SWAP_FLOAT_ARRAY(pc, count) \
+ swapPC = ((GLbyte *)(pc)); \
+ swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT32;\
+ while (swapPC < swapEnd) { \
+ __GLX_SWAP_FLOAT(swapPC); \
+ swapPC += __GLX_SIZE_FLOAT32; \
+ }
+
+#define __GLX_SWAP_REPLY_HEADER() \
+ __GLX_SWAP_SHORT(&__glXReply.sequenceNumber); \
+ __GLX_SWAP_INT(&__glXReply.length);
+
+#define __GLX_SWAP_REPLY_RETVAL() \
+ __GLX_SWAP_INT(&__glXReply.retval)
+
+#define __GLX_SWAP_REPLY_SIZE() \
+ __GLX_SWAP_INT(&__glXReply.size)
+
+#endif /* !__GLX_unpack_h__ */
diff --git a/xorg-server/hw/dmx/input/ChkNotMaskEv.h b/xorg-server/hw/dmx/input/ChkNotMaskEv.h
index f79075e1d..78ad51f91 100644
--- a/xorg-server/hw/dmx/input/ChkNotMaskEv.h
+++ b/xorg-server/hw/dmx/input/ChkNotMaskEv.h
@@ -36,5 +36,5 @@
#ifndef _CHKNOTMASKEV_H_
#define _CHKNOTMASKEV_H_
-extern Bool XCheckNotMaskEvent (Display *dpy, long mask, XEvent *event);
+extern Bool XCheckNotMaskEvent(Display * dpy, long mask, XEvent * event);
#endif
diff --git a/xorg-server/hw/dmx/input/atKeynames.h b/xorg-server/hw/dmx/input/atKeynames.h
index 551a9e1b0..68e2eb31d 100644
--- a/xorg-server/hw/dmx/input/atKeynames.h
+++ b/xorg-server/hw/dmx/input/atKeynames.h
@@ -1,292 +1,292 @@
-/*
- * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Thomas Roell not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Thomas Roell makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as is" without express or implied warranty.
- *
- * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THOMAS ROELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * Copyright (c) 1994-2003 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-#ifndef _ATKEYNAMES_H
-#define _ATKEYNAMES_H
-
-#define XK_TECHNICAL
-#define XK_KATAKANA
-#include <X11/keysym.h>
-#include <X11/XF86keysym.h>
-
-#define GLYPHS_PER_KEY 4
-#define NUM_KEYCODES 248
-#define MIN_KEYCODE 8
-#define MAX_KEYCODE (NUM_KEYCODES + MIN_KEYCODE - 1)
-
-#define AltMask Mod1Mask
-#define NumLockMask Mod2Mask
-#define AltLangMask Mod3Mask
-#define KanaMask Mod4Mask
-#define ScrollLockMask Mod5Mask
-
-/*
- * NOTE: The AT/MF keyboards can generate (via the 8042) two (MF: three)
- * sets of scancodes. Set3 can only be generated by a MF keyboard.
- * Set2 sends a makecode for keypress, and the same code prefixed by a
- * F0 for keyrelease. This is a little bit ugly to handle. Thus we use
- * here for X386 the PC/XT compatible Set1. This set uses 8bit scancodes.
- * Bit 7 ist set if the key is released. The code E0 switches to a
- * different meaning to add the new MF cursorkeys, while not breaking old
- * applications. E1 is another special prefix. Since I assume that there
- * will be further versions of PC/XT scancode compatible keyboards, we
- * may be in trouble one day.
- *
- * IDEA: 1) Use Set2 on AT84 keyboards and translate it to MF Set3.
- * 2) Use the keyboards native set and translate it to common keysyms.
- */
-
-/*
- * definition of the AT84/MF101/MF102 Keyboard:
- * ============================================================
- * Defined Key Cap Glyphs Pressed value
- * Key Name Main Also (hex) (dec)
- * ---------------- ---------- ------- ------ ------
- */
-
-#define KEY_Escape /* Escape 0x01 */ 1
-#define KEY_1 /* 1 ! 0x02 */ 2
-#define KEY_2 /* 2 @ 0x03 */ 3
-#define KEY_3 /* 3 # 0x04 */ 4
-#define KEY_4 /* 4 $ 0x05 */ 5
-#define KEY_5 /* 5 % 0x06 */ 6
-#define KEY_6 /* 6 ^ 0x07 */ 7
-#define KEY_7 /* 7 & 0x08 */ 8
-#define KEY_8 /* 8 * 0x09 */ 9
-#define KEY_9 /* 9 ( 0x0a */ 10
-#define KEY_0 /* 0 ) 0x0b */ 11
-#define KEY_Minus /* - (Minus) _ (Under) 0x0c */ 12
-#define KEY_Equal /* = (Equal) + 0x0d */ 13
-#define KEY_BackSpace /* Back Space 0x0e */ 14
-#define KEY_Tab /* Tab 0x0f */ 15
-#define KEY_Q /* Q 0x10 */ 16
-#define KEY_W /* W 0x11 */ 17
-#define KEY_E /* E 0x12 */ 18
-#define KEY_R /* R 0x13 */ 19
-#define KEY_T /* T 0x14 */ 20
-#define KEY_Y /* Y 0x15 */ 21
-#define KEY_U /* U 0x16 */ 22
-#define KEY_I /* I 0x17 */ 23
-#define KEY_O /* O 0x18 */ 24
-#define KEY_P /* P 0x19 */ 25
-#define KEY_LBrace /* [ { 0x1a */ 26
-#define KEY_RBrace /* ] } 0x1b */ 27
-#define KEY_Enter /* Enter 0x1c */ 28
-#define KEY_LCtrl /* Ctrl(left) 0x1d */ 29
-#define KEY_A /* A 0x1e */ 30
-#define KEY_S /* S 0x1f */ 31
-#define KEY_D /* D 0x20 */ 32
-#define KEY_F /* F 0x21 */ 33
-#define KEY_G /* G 0x22 */ 34
-#define KEY_H /* H 0x23 */ 35
-#define KEY_J /* J 0x24 */ 36
-#define KEY_K /* K 0x25 */ 37
-#define KEY_L /* L 0x26 */ 38
-#define KEY_SemiColon /* ;(SemiColon) :(Colon) 0x27 */ 39
-#define KEY_Quote /* ' (Apostr) " (Quote) 0x28 */ 40
-#define KEY_Tilde /* ` (Accent) ~ (Tilde) 0x29 */ 41
-#define KEY_ShiftL /* Shift(left) 0x2a */ 42
-#define KEY_BSlash /* \(BckSlash) |(VertBar)0x2b */ 43
-#define KEY_Z /* Z 0x2c */ 44
-#define KEY_X /* X 0x2d */ 45
-#define KEY_C /* C 0x2e */ 46
-#define KEY_V /* V 0x2f */ 47
-#define KEY_B /* B 0x30 */ 48
-#define KEY_N /* N 0x31 */ 49
-#define KEY_M /* M 0x32 */ 50
-#define KEY_Comma /* , (Comma) < (Less) 0x33 */ 51
-#define KEY_Period /* . (Period) >(Greater)0x34 */ 52
-#define KEY_Slash /* / (Slash) ? 0x35 */ 53
-#define KEY_ShiftR /* Shift(right) 0x36 */ 54
-#define KEY_KP_Multiply /* * 0x37 */ 55
-#define KEY_Alt /* Alt(left) 0x38 */ 56
-#define KEY_Space /* (SpaceBar) 0x39 */ 57
-#define KEY_CapsLock /* CapsLock 0x3a */ 58
-#define KEY_F1 /* F1 0x3b */ 59
-#define KEY_F2 /* F2 0x3c */ 60
-#define KEY_F3 /* F3 0x3d */ 61
-#define KEY_F4 /* F4 0x3e */ 62
-#define KEY_F5 /* F5 0x3f */ 63
-#define KEY_F6 /* F6 0x40 */ 64
-#define KEY_F7 /* F7 0x41 */ 65
-#define KEY_F8 /* F8 0x42 */ 66
-#define KEY_F9 /* F9 0x43 */ 67
-#define KEY_F10 /* F10 0x44 */ 68
-#define KEY_NumLock /* NumLock 0x45 */ 69
-#define KEY_ScrollLock /* ScrollLock 0x46 */ 70
-#define KEY_KP_7 /* 7 Home 0x47 */ 71
-#define KEY_KP_8 /* 8 Up 0x48 */ 72
-#define KEY_KP_9 /* 9 PgUp 0x49 */ 73
-#define KEY_KP_Minus /* - (Minus) 0x4a */ 74
-#define KEY_KP_4 /* 4 Left 0x4b */ 75
-#define KEY_KP_5 /* 5 0x4c */ 76
-#define KEY_KP_6 /* 6 Right 0x4d */ 77
-#define KEY_KP_Plus /* + (Plus) 0x4e */ 78
-#define KEY_KP_1 /* 1 End 0x4f */ 79
-#define KEY_KP_2 /* 2 Down 0x50 */ 80
-#define KEY_KP_3 /* 3 PgDown 0x51 */ 81
-#define KEY_KP_0 /* 0 Insert 0x52 */ 82
-#define KEY_KP_Decimal /* . (Decimal) Delete 0x53 */ 83
-#define KEY_SysReqest /* SysReqest 0x54 */ 84
- /* NOTUSED 0x55 */
-#define KEY_Less /* < (Less) >(Greater) 0x56 */ 86
-#define KEY_F11 /* F11 0x57 */ 87
-#define KEY_F12 /* F12 0x58 */ 88
-
-#define KEY_Prefix0 /* special 0x60 */ 96
-#define KEY_Prefix1 /* specail 0x61 */ 97
-
-/*
- * The 'scancodes' below are generated by the server, because the MF101/102
- * keyboard sends them as sequence of other scancodes
- */
-#define KEY_Home /* Home 0x59 */ 89
-#define KEY_Up /* Up 0x5a */ 90
-#define KEY_PgUp /* PgUp 0x5b */ 91
-#define KEY_Left /* Left 0x5c */ 92
-#define KEY_Begin /* Begin 0x5d */ 93
-#define KEY_Right /* Right 0x5e */ 94
-#define KEY_End /* End 0x5f */ 95
-#define KEY_Down /* Down 0x60 */ 96
-#define KEY_PgDown /* PgDown 0x61 */ 97
-#define KEY_Insert /* Insert 0x62 */ 98
-#define KEY_Delete /* Delete 0x63 */ 99
-#define KEY_KP_Enter /* Enter 0x64 */ 100
-#define KEY_RCtrl /* Ctrl(right) 0x65 */ 101
-#define KEY_Pause /* Pause 0x66 */ 102
-#define KEY_Print /* Print 0x67 */ 103
-#define KEY_KP_Divide /* Divide 0x68 */ 104
-#define KEY_AltLang /* AtlLang(right) 0x69 */ 105
-#define KEY_Break /* Break 0x6a */ 106
-#define KEY_LMeta /* Left Meta 0x6b */ 107
-#define KEY_RMeta /* Right Meta 0x6c */ 108
-#define KEY_Menu /* Menu 0x6d */ 109
-#define KEY_F13 /* F13 0x6e */ 110
-#define KEY_F14 /* F14 0x6f */ 111
-#define KEY_F15 /* F15 0x70 */ 112
-#define KEY_HKTG /* Hirugana/Katakana tog 0x70 */ 112
-#define KEY_F16 /* F16 0x71 */ 113
-#define KEY_F17 /* F17 0x72 */ 114
-#define KEY_KP_DEC /* KP_DEC 0x73 */ 115
-#define KEY_BSlash2 /* \ _ 0x73 */ 115
-#define KEY_KP_Equal /* Equal (Keypad) 0x76 */ 118
-#define KEY_XFER /* Kanji Transfer 0x79 */ 121
-#define KEY_NFER /* No Kanji Transfer 0x7b */ 123
-#define KEY_Yen /* Yen 0x7d */ 125
-
-#define KEY_Power /* Power Key 0x84 */ 132
-#define KEY_Mute /* Audio Mute 0x85 */ 133
-#define KEY_AudioLower /* Audio Lower 0x86 */ 134
-#define KEY_AudioRaise /* Audio Raise 0x87 */ 135
-#define KEY_Help /* Help 0x88 */ 136
-#define KEY_L1 /* Stop 0x89 */ 137
-#define KEY_L2 /* Again 0x8a */ 138
-#define KEY_L3 /* Props 0x8b */ 139
-#define KEY_L4 /* Undo 0x8c */ 140
-#define KEY_L5 /* Front 0x8d */ 141
-#define KEY_L6 /* Copy 0x8e */ 142
-#define KEY_L7 /* Open 0x8f */ 143
-#define KEY_L8 /* Paste 0x90 */ 144
-#define KEY_L9 /* Find 0x91 */ 145
-#define KEY_L10 /* Cut 0x92 */ 146
-
-/*
- * Fake 'scancodes' in the following ranges are generated for 2-byte
- * codes not handled elsewhere. These correspond to most extended keys
- * on so-called "Internet" keyboards:
- *
- * 0x79-0x93
- * 0x96-0xa1
- * 0xa3-0xac
- * 0xb1-0xb4
- * 0xba-0xbd
- * 0xc2
- * 0xcc-0xd2
- * 0xd6-0xf7
- */
-
-/*
- * Remapped 'scancodes' are generated for single-byte codes in the range
- * 0x59-0x5f,0x62-0x76. These are used for some extra keys on some keyboards.
- */
-
-#define KEY_0x59 0x95
-#define KEY_0x5A 0xA2
-#define KEY_0x5B 0xAD
-#define KEY_0x5C KEY_KP_EQUAL
-#define KEY_0x5D 0xAE
-#define KEY_0x5E 0xAF
-#define KEY_0x5F 0xB0
-#define KEY_0x62 0xB5
-#define KEY_0x63 0xB6
-#define KEY_0x64 0xB7
-#define KEY_0x65 0xB8
-#define KEY_0x66 0xB9
-#define KEY_0x67 0xBE
-#define KEY_0x68 0xBF
-#define KEY_0x69 0xC0
-#define KEY_0x6A 0xC1
-#define KEY_0x6B 0xC3
-#define KEY_0x6C 0xC4
-#define KEY_0x6D 0xC5
-#define KEY_0x6E 0xC6
-#define KEY_0x6F 0xC7
-#define KEY_0x70 0xC8
-#define KEY_0x71 0xC9
-#define KEY_0x72 0xCA
-#define KEY_0x73 0xCB
-#define KEY_0x74 0xD3
-#define KEY_0x75 0xD4
-#define KEY_0x76 0xD5
-
-/* These are for "notused" and "unknown" entries in translation maps. */
-#define KEY_NOTUSED 0
-#define KEY_UNKNOWN 255
-
-#endif /* _ATKEYNAMES_H */
+/*
+ * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Thomas Roell not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Thomas Roell makes no representations
+ * about the suitability of this software for any purpose. It is provided
+ * "as is" without express or implied warranty.
+ *
+ * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THOMAS ROELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/*
+ * Copyright (c) 1994-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef _ATKEYNAMES_H
+#define _ATKEYNAMES_H
+
+#define XK_TECHNICAL
+#define XK_KATAKANA
+#include <X11/keysym.h>
+#include <X11/XF86keysym.h>
+
+#define GLYPHS_PER_KEY 4
+#define NUM_KEYCODES 248
+#define MIN_KEYCODE 8
+#define MAX_KEYCODE (NUM_KEYCODES + MIN_KEYCODE - 1)
+
+#define AltMask Mod1Mask
+#define NumLockMask Mod2Mask
+#define AltLangMask Mod3Mask
+#define KanaMask Mod4Mask
+#define ScrollLockMask Mod5Mask
+
+/*
+ * NOTE: The AT/MF keyboards can generate (via the 8042) two (MF: three)
+ * sets of scancodes. Set3 can only be generated by a MF keyboard.
+ * Set2 sends a makecode for keypress, and the same code prefixed by a
+ * F0 for keyrelease. This is a little bit ugly to handle. Thus we use
+ * here for X386 the PC/XT compatible Set1. This set uses 8bit scancodes.
+ * Bit 7 ist set if the key is released. The code E0 switches to a
+ * different meaning to add the new MF cursorkeys, while not breaking old
+ * applications. E1 is another special prefix. Since I assume that there
+ * will be further versions of PC/XT scancode compatible keyboards, we
+ * may be in trouble one day.
+ *
+ * IDEA: 1) Use Set2 on AT84 keyboards and translate it to MF Set3.
+ * 2) Use the keyboards native set and translate it to common keysyms.
+ */
+
+/*
+ * definition of the AT84/MF101/MF102 Keyboard:
+ * ============================================================
+ * Defined Key Cap Glyphs Pressed value
+ * Key Name Main Also (hex) (dec)
+ * ---------------- ---------- ------- ------ ------
+ */
+
+#define KEY_Escape /* Escape 0x01 */ 1
+#define KEY_1 /* 1 ! 0x02 */ 2
+#define KEY_2 /* 2 @ 0x03 */ 3
+#define KEY_3 /* 3 # 0x04 */ 4
+#define KEY_4 /* 4 $ 0x05 */ 5
+#define KEY_5 /* 5 % 0x06 */ 6
+#define KEY_6 /* 6 ^ 0x07 */ 7
+#define KEY_7 /* 7 & 0x08 */ 8
+#define KEY_8 /* 8 * 0x09 */ 9
+#define KEY_9 /* 9 ( 0x0a */ 10
+#define KEY_0 /* 0 ) 0x0b */ 11
+#define KEY_Minus /* - (Minus) _ (Under) 0x0c */ 12
+#define KEY_Equal /* = (Equal) + 0x0d */ 13
+#define KEY_BackSpace /* Back Space 0x0e */ 14
+#define KEY_Tab /* Tab 0x0f */ 15
+#define KEY_Q /* Q 0x10 */ 16
+#define KEY_W /* W 0x11 */ 17
+#define KEY_E /* E 0x12 */ 18
+#define KEY_R /* R 0x13 */ 19
+#define KEY_T /* T 0x14 */ 20
+#define KEY_Y /* Y 0x15 */ 21
+#define KEY_U /* U 0x16 */ 22
+#define KEY_I /* I 0x17 */ 23
+#define KEY_O /* O 0x18 */ 24
+#define KEY_P /* P 0x19 */ 25
+#define KEY_LBrace /* [ { 0x1a */ 26
+#define KEY_RBrace /* ] } 0x1b */ 27
+#define KEY_Enter /* Enter 0x1c */ 28
+#define KEY_LCtrl /* Ctrl(left) 0x1d */ 29
+#define KEY_A /* A 0x1e */ 30
+#define KEY_S /* S 0x1f */ 31
+#define KEY_D /* D 0x20 */ 32
+#define KEY_F /* F 0x21 */ 33
+#define KEY_G /* G 0x22 */ 34
+#define KEY_H /* H 0x23 */ 35
+#define KEY_J /* J 0x24 */ 36
+#define KEY_K /* K 0x25 */ 37
+#define KEY_L /* L 0x26 */ 38
+#define KEY_SemiColon /* ;(SemiColon) :(Colon) 0x27 */ 39
+#define KEY_Quote /* ' (Apostr) " (Quote) 0x28 */ 40
+#define KEY_Tilde /* ` (Accent) ~ (Tilde) 0x29 */ 41
+#define KEY_ShiftL /* Shift(left) 0x2a */ 42
+#define KEY_BSlash /* \(BckSlash) |(VertBar)0x2b */ 43
+#define KEY_Z /* Z 0x2c */ 44
+#define KEY_X /* X 0x2d */ 45
+#define KEY_C /* C 0x2e */ 46
+#define KEY_V /* V 0x2f */ 47
+#define KEY_B /* B 0x30 */ 48
+#define KEY_N /* N 0x31 */ 49
+#define KEY_M /* M 0x32 */ 50
+#define KEY_Comma /* , (Comma) < (Less) 0x33 */ 51
+#define KEY_Period /* . (Period) >(Greater)0x34 */ 52
+#define KEY_Slash /* / (Slash) ? 0x35 */ 53
+#define KEY_ShiftR /* Shift(right) 0x36 */ 54
+#define KEY_KP_Multiply /* * 0x37 */ 55
+#define KEY_Alt /* Alt(left) 0x38 */ 56
+#define KEY_Space /* (SpaceBar) 0x39 */ 57
+#define KEY_CapsLock /* CapsLock 0x3a */ 58
+#define KEY_F1 /* F1 0x3b */ 59
+#define KEY_F2 /* F2 0x3c */ 60
+#define KEY_F3 /* F3 0x3d */ 61
+#define KEY_F4 /* F4 0x3e */ 62
+#define KEY_F5 /* F5 0x3f */ 63
+#define KEY_F6 /* F6 0x40 */ 64
+#define KEY_F7 /* F7 0x41 */ 65
+#define KEY_F8 /* F8 0x42 */ 66
+#define KEY_F9 /* F9 0x43 */ 67
+#define KEY_F10 /* F10 0x44 */ 68
+#define KEY_NumLock /* NumLock 0x45 */ 69
+#define KEY_ScrollLock /* ScrollLock 0x46 */ 70
+#define KEY_KP_7 /* 7 Home 0x47 */ 71
+#define KEY_KP_8 /* 8 Up 0x48 */ 72
+#define KEY_KP_9 /* 9 PgUp 0x49 */ 73
+#define KEY_KP_Minus /* - (Minus) 0x4a */ 74
+#define KEY_KP_4 /* 4 Left 0x4b */ 75
+#define KEY_KP_5 /* 5 0x4c */ 76
+#define KEY_KP_6 /* 6 Right 0x4d */ 77
+#define KEY_KP_Plus /* + (Plus) 0x4e */ 78
+#define KEY_KP_1 /* 1 End 0x4f */ 79
+#define KEY_KP_2 /* 2 Down 0x50 */ 80
+#define KEY_KP_3 /* 3 PgDown 0x51 */ 81
+#define KEY_KP_0 /* 0 Insert 0x52 */ 82
+#define KEY_KP_Decimal /* . (Decimal) Delete 0x53 */ 83
+#define KEY_SysReqest /* SysReqest 0x54 */ 84
+ /* NOTUSED 0x55 */
+#define KEY_Less /* < (Less) >(Greater) 0x56 */ 86
+#define KEY_F11 /* F11 0x57 */ 87
+#define KEY_F12 /* F12 0x58 */ 88
+
+#define KEY_Prefix0 /* special 0x60 */ 96
+#define KEY_Prefix1 /* specail 0x61 */ 97
+
+/*
+ * The 'scancodes' below are generated by the server, because the MF101/102
+ * keyboard sends them as sequence of other scancodes
+ */
+#define KEY_Home /* Home 0x59 */ 89
+#define KEY_Up /* Up 0x5a */ 90
+#define KEY_PgUp /* PgUp 0x5b */ 91
+#define KEY_Left /* Left 0x5c */ 92
+#define KEY_Begin /* Begin 0x5d */ 93
+#define KEY_Right /* Right 0x5e */ 94
+#define KEY_End /* End 0x5f */ 95
+#define KEY_Down /* Down 0x60 */ 96
+#define KEY_PgDown /* PgDown 0x61 */ 97
+#define KEY_Insert /* Insert 0x62 */ 98
+#define KEY_Delete /* Delete 0x63 */ 99
+#define KEY_KP_Enter /* Enter 0x64 */ 100
+#define KEY_RCtrl /* Ctrl(right) 0x65 */ 101
+#define KEY_Pause /* Pause 0x66 */ 102
+#define KEY_Print /* Print 0x67 */ 103
+#define KEY_KP_Divide /* Divide 0x68 */ 104
+#define KEY_AltLang /* AtlLang(right) 0x69 */ 105
+#define KEY_Break /* Break 0x6a */ 106
+#define KEY_LMeta /* Left Meta 0x6b */ 107
+#define KEY_RMeta /* Right Meta 0x6c */ 108
+#define KEY_Menu /* Menu 0x6d */ 109
+#define KEY_F13 /* F13 0x6e */ 110
+#define KEY_F14 /* F14 0x6f */ 111
+#define KEY_F15 /* F15 0x70 */ 112
+#define KEY_HKTG /* Hirugana/Katakana tog 0x70 */ 112
+#define KEY_F16 /* F16 0x71 */ 113
+#define KEY_F17 /* F17 0x72 */ 114
+#define KEY_KP_DEC /* KP_DEC 0x73 */ 115
+#define KEY_BSlash2 /* \ _ 0x73 */ 115
+#define KEY_KP_Equal /* Equal (Keypad) 0x76 */ 118
+#define KEY_XFER /* Kanji Transfer 0x79 */ 121
+#define KEY_NFER /* No Kanji Transfer 0x7b */ 123
+#define KEY_Yen /* Yen 0x7d */ 125
+
+#define KEY_Power /* Power Key 0x84 */ 132
+#define KEY_Mute /* Audio Mute 0x85 */ 133
+#define KEY_AudioLower /* Audio Lower 0x86 */ 134
+#define KEY_AudioRaise /* Audio Raise 0x87 */ 135
+#define KEY_Help /* Help 0x88 */ 136
+#define KEY_L1 /* Stop 0x89 */ 137
+#define KEY_L2 /* Again 0x8a */ 138
+#define KEY_L3 /* Props 0x8b */ 139
+#define KEY_L4 /* Undo 0x8c */ 140
+#define KEY_L5 /* Front 0x8d */ 141
+#define KEY_L6 /* Copy 0x8e */ 142
+#define KEY_L7 /* Open 0x8f */ 143
+#define KEY_L8 /* Paste 0x90 */ 144
+#define KEY_L9 /* Find 0x91 */ 145
+#define KEY_L10 /* Cut 0x92 */ 146
+
+/*
+ * Fake 'scancodes' in the following ranges are generated for 2-byte
+ * codes not handled elsewhere. These correspond to most extended keys
+ * on so-called "Internet" keyboards:
+ *
+ * 0x79-0x93
+ * 0x96-0xa1
+ * 0xa3-0xac
+ * 0xb1-0xb4
+ * 0xba-0xbd
+ * 0xc2
+ * 0xcc-0xd2
+ * 0xd6-0xf7
+ */
+
+/*
+ * Remapped 'scancodes' are generated for single-byte codes in the range
+ * 0x59-0x5f,0x62-0x76. These are used for some extra keys on some keyboards.
+ */
+
+#define KEY_0x59 0x95
+#define KEY_0x5A 0xA2
+#define KEY_0x5B 0xAD
+#define KEY_0x5C KEY_KP_EQUAL
+#define KEY_0x5D 0xAE
+#define KEY_0x5E 0xAF
+#define KEY_0x5F 0xB0
+#define KEY_0x62 0xB5
+#define KEY_0x63 0xB6
+#define KEY_0x64 0xB7
+#define KEY_0x65 0xB8
+#define KEY_0x66 0xB9
+#define KEY_0x67 0xBE
+#define KEY_0x68 0xBF
+#define KEY_0x69 0xC0
+#define KEY_0x6A 0xC1
+#define KEY_0x6B 0xC3
+#define KEY_0x6C 0xC4
+#define KEY_0x6D 0xC5
+#define KEY_0x6E 0xC6
+#define KEY_0x6F 0xC7
+#define KEY_0x70 0xC8
+#define KEY_0x71 0xC9
+#define KEY_0x72 0xCA
+#define KEY_0x73 0xCB
+#define KEY_0x74 0xD3
+#define KEY_0x75 0xD4
+#define KEY_0x76 0xD5
+
+/* These are for "notused" and "unknown" entries in translation maps. */
+#define KEY_NOTUSED 0
+#define KEY_UNKNOWN 255
+
+#endif /* _ATKEYNAMES_H */
diff --git a/xorg-server/hw/dmx/input/dmxarg.h b/xorg-server/hw/dmx/input/dmxarg.h
index ca76f9272..acd8805b6 100644
--- a/xorg-server/hw/dmx/input/dmxarg.h
+++ b/xorg-server/hw/dmx/input/dmxarg.h
@@ -39,11 +39,11 @@
typedef struct _dmxArg *dmxArg;
-extern dmxArg dmxArgCreate(void);
-extern void dmxArgFree(dmxArg a);
-extern void dmxArgAdd(dmxArg a, const char *string);
+extern dmxArg dmxArgCreate(void);
+extern void dmxArgFree(dmxArg a);
+extern void dmxArgAdd(dmxArg a, const char *string);
extern const char *dmxArgV(dmxArg a, int item);
-extern int dmxArgC(dmxArg a);
-extern dmxArg dmxArgParse(const char *string);
+extern int dmxArgC(dmxArg a);
+extern dmxArg dmxArgParse(const char *string);
#endif
diff --git a/xorg-server/hw/dmx/input/dmxbackend.h b/xorg-server/hw/dmx/input/dmxbackend.h
index ee78f0014..6a49a56d6 100644
--- a/xorg-server/hw/dmx/input/dmxbackend.h
+++ b/xorg-server/hw/dmx/input/dmxbackend.h
@@ -39,18 +39,18 @@
#define _DMXBACKEND_H_
extern pointer dmxBackendCreatePrivate(DeviceIntPtr pDevice);
-extern void dmxBackendDestroyPrivate(pointer private);
-extern void dmxBackendInit(DevicePtr pDev);
-extern void dmxBackendLateReInit(DevicePtr pDev);
-extern void dmxBackendMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-extern void dmxBackendKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-extern void dmxBackendCollectEvents(DevicePtr pDev,
- dmxMotionProcPtr motion,
- dmxEnqueueProcPtr enqueue,
- dmxCheckSpecialProcPtr checkspecial,
- DMXBlockType block);
-extern void dmxBackendProcessInput(pointer private);
-extern int dmxBackendFunctions(pointer private, DMXFunctionType function);
-extern void dmxBackendUpdatePosition(pointer private, int x, int y);
+extern void dmxBackendDestroyPrivate(pointer private);
+extern void dmxBackendInit(DevicePtr pDev);
+extern void dmxBackendLateReInit(DevicePtr pDev);
+extern void dmxBackendMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
+extern void dmxBackendKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
+extern void dmxBackendCollectEvents(DevicePtr pDev,
+ dmxMotionProcPtr motion,
+ dmxEnqueueProcPtr enqueue,
+ dmxCheckSpecialProcPtr checkspecial,
+ DMXBlockType block);
+extern void dmxBackendProcessInput(pointer private);
+extern int dmxBackendFunctions(pointer private, DMXFunctionType function);
+extern void dmxBackendUpdatePosition(pointer private, int x, int y);
#endif
diff --git a/xorg-server/hw/dmx/input/dmxcommon.h b/xorg-server/hw/dmx/input/dmxcommon.h
index 68f2b520d..d4f8d3c89 100644
--- a/xorg-server/hw/dmx/input/dmxcommon.h
+++ b/xorg-server/hw/dmx/input/dmxcommon.h
@@ -98,27 +98,27 @@
#define DMX_POINTER_EVENT_MASK \
(ButtonPressMask | ButtonReleaseMask | PointerMotionMask)
-extern void dmxCommonKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-extern void dmxCommonKbdGetMap(DevicePtr pDev,
- KeySymsPtr pKeySyms, CARD8 *pModMap);
-extern void dmxCommonKbdCtrl(DevicePtr pDev, KeybdCtrl *ctrl);
-extern void dmxCommonKbdBell(DevicePtr pDev, int percent,
- int volume, int pitch, int duration);
-extern int dmxCommonKbdOn(DevicePtr pDev);
-extern void dmxCommonKbdOff(DevicePtr pDev);
-extern void dmxCommonMouGetMap(DevicePtr pDev,
- unsigned char *map, int *nButtons);
-extern void dmxCommonMouCtrl(DevicePtr pDev, PtrCtrl *ctrl);
-extern int dmxCommonMouOn(DevicePtr pDev);
-extern void dmxCommonMouOff(DevicePtr pDev);
-extern int dmxFindPointerScreen(int x, int y);
-
-extern int dmxCommonOthOn(DevicePtr pDev);
-extern void dmxCommonOthOff(DevicePtr pDev);
-extern void dmxCommonOthGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
+extern void dmxCommonKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
+extern void dmxCommonKbdGetMap(DevicePtr pDev,
+ KeySymsPtr pKeySyms, CARD8 *pModMap);
+extern void dmxCommonKbdCtrl(DevicePtr pDev, KeybdCtrl * ctrl);
+extern void dmxCommonKbdBell(DevicePtr pDev, int percent,
+ int volume, int pitch, int duration);
+extern int dmxCommonKbdOn(DevicePtr pDev);
+extern void dmxCommonKbdOff(DevicePtr pDev);
+extern void dmxCommonMouGetMap(DevicePtr pDev,
+ unsigned char *map, int *nButtons);
+extern void dmxCommonMouCtrl(DevicePtr pDev, PtrCtrl * ctrl);
+extern int dmxCommonMouOn(DevicePtr pDev);
+extern void dmxCommonMouOff(DevicePtr pDev);
+extern int dmxFindPointerScreen(int x, int y);
+
+extern int dmxCommonOthOn(DevicePtr pDev);
+extern void dmxCommonOthOff(DevicePtr pDev);
+extern void dmxCommonOthGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
/* helper functions */
extern pointer dmxCommonCopyPrivate(DeviceIntPtr pDevice);
-extern void dmxCommonSaveState(pointer private);
-extern void dmxCommonRestoreState(pointer private);
+extern void dmxCommonSaveState(pointer private);
+extern void dmxCommonRestoreState(pointer private);
#endif
diff --git a/xorg-server/hw/dmx/input/dmxconsole.h b/xorg-server/hw/dmx/input/dmxconsole.h
index cd545d39b..1c5261101 100644
--- a/xorg-server/hw/dmx/input/dmxconsole.h
+++ b/xorg-server/hw/dmx/input/dmxconsole.h
@@ -38,22 +38,22 @@
#define _DMXCONSOLE_H_
extern pointer dmxConsoleCreatePrivate(DeviceIntPtr pDevice);
-extern void dmxConsoleDestroyPrivate(pointer private);
-extern void dmxConsoleInit(DevicePtr pDev);
-extern void dmxConsoleReInit(DevicePtr pDev);
-extern void dmxConsoleMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-extern void dmxConsoleKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-extern void dmxConsoleCollectEvents(DevicePtr pDev,
- dmxMotionProcPtr motion,
- dmxEnqueueProcPtr enqueue,
- dmxCheckSpecialProcPtr checkspecial,
- DMXBlockType block);
-extern int dmxConsoleFunctions(pointer private, DMXFunctionType function);
-extern void dmxConsoleUpdatePosition(pointer private, int x, int y);
-extern void dmxConsoleKbdSetCtrl(pointer private, KeybdCtrl *ctrl);
-extern void dmxConsoleCapture(DMXInputInfo *dmxInput);
-extern void dmxConsoleUncapture(DMXInputInfo *dmxInput);
-extern void dmxConsoleUpdateInfo(pointer private,
- DMXUpdateType, WindowPtr pWindow);
+extern void dmxConsoleDestroyPrivate(pointer private);
+extern void dmxConsoleInit(DevicePtr pDev);
+extern void dmxConsoleReInit(DevicePtr pDev);
+extern void dmxConsoleMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
+extern void dmxConsoleKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
+extern void dmxConsoleCollectEvents(DevicePtr pDev,
+ dmxMotionProcPtr motion,
+ dmxEnqueueProcPtr enqueue,
+ dmxCheckSpecialProcPtr checkspecial,
+ DMXBlockType block);
+extern int dmxConsoleFunctions(pointer private, DMXFunctionType function);
+extern void dmxConsoleUpdatePosition(pointer private, int x, int y);
+extern void dmxConsoleKbdSetCtrl(pointer private, KeybdCtrl * ctrl);
+extern void dmxConsoleCapture(DMXInputInfo * dmxInput);
+extern void dmxConsoleUncapture(DMXInputInfo * dmxInput);
+extern void dmxConsoleUpdateInfo(pointer private,
+ DMXUpdateType, WindowPtr pWindow);
#endif
diff --git a/xorg-server/hw/dmx/input/dmxevents.h b/xorg-server/hw/dmx/input/dmxevents.h
index fe8712ebe..4877cf49c 100644
--- a/xorg-server/hw/dmx/input/dmxevents.h
+++ b/xorg-server/hw/dmx/input/dmxevents.h
@@ -40,7 +40,7 @@
extern void dmxMotion(DevicePtr pDev, int *v, int firstAxis, int axesCount,
DMXMotionType type, DMXBlockType block);
extern void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
- XEvent *e, DMXBlockType block);
-extern int dmxCheckSpecialKeys(DevicePtr pDev, KeySym keySym);
+ XEvent * e, DMXBlockType block);
+extern int dmxCheckSpecialKeys(DevicePtr pDev, KeySym keySym);
extern void dmxInvalidateGlobalPosition(void);
#endif
diff --git a/xorg-server/hw/dmx/input/dmxmap.h b/xorg-server/hw/dmx/input/dmxmap.h
index aad30d1bd..62da1ed36 100644
--- a/xorg-server/hw/dmx/input/dmxmap.h
+++ b/xorg-server/hw/dmx/input/dmxmap.h
@@ -38,5 +38,5 @@
extern void dmxMapInsert(DMXLocalInputInfoPtr dmxLocal,
int remoteEvent, int serverEvent);
extern void dmxMapClear(DMXLocalInputInfoPtr dmxLocal);
-extern int dmxMapLookup(DMXLocalInputInfoPtr dmxLocal, int remoteEvent);
+extern int dmxMapLookup(DMXLocalInputInfoPtr dmxLocal, int remoteEvent);
#endif
diff --git a/xorg-server/hw/dmx/input/dmxsigio.h b/xorg-server/hw/dmx/input/dmxsigio.h
index 83f8060ae..4e4874929 100644
--- a/xorg-server/hw/dmx/input/dmxsigio.h
+++ b/xorg-server/hw/dmx/input/dmxsigio.h
@@ -40,6 +40,6 @@ extern void dmxSigioBlock(void);
extern void dmxSigioUnblock(void);
extern void dmxSigioEnableInput(void);
extern void dmxSigioDisableInput(void);
-extern void dmxSigioRegister(DMXInputInfo *dmxInput, int fd);
-extern void dmxSigioUnregister(DMXInputInfo *dmxInput);
+extern void dmxSigioRegister(DMXInputInfo * dmxInput, int fd);
+extern void dmxSigioUnregister(DMXInputInfo * dmxInput);
#endif
diff --git a/xorg-server/hw/dmx/input/lnx-keyboard.h b/xorg-server/hw/dmx/input/lnx-keyboard.h
index e36a50499..891c6a9a4 100644
--- a/xorg-server/hw/dmx/input/lnx-keyboard.h
+++ b/xorg-server/hw/dmx/input/lnx-keyboard.h
@@ -38,26 +38,26 @@
#define _LNX_KEYBOARD_H_
extern pointer kbdLinuxCreatePrivate(DeviceIntPtr pKeyboard);
-extern void kbdLinuxDestroyPrivate(pointer private);
-
-extern void kbdLinuxInit(DevicePtr pDev);
-extern void kbdLinuxGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-extern int kbdLinuxOn(DevicePtr pDev);
-extern void kbdLinuxOff(DevicePtr pDev);
-
-extern void kbdLinuxVTPreSwitch(pointer p);
-extern void kbdLinuxVTPostSwitch(pointer p);
-extern int kbdLinuxVTSwitch(pointer p, int vt,
- dmxVTSwitchReturnProcPtr switch_return,
- pointer switch_return_data);
-
-extern void kbdLinuxRead(DevicePtr pDev,
- dmxMotionProcPtr motion,
- dmxEnqueueProcPtr enqueue,
- dmxCheckSpecialProcPtr checkspecial,
- DMXBlockType block);
-
-extern void kbdLinuxCtrl(DevicePtr pDev, KeybdCtrl *ctrl);
-extern void kbdLinuxBell(DevicePtr pDev, int percent,
- int volume, int pitch, int duration);
+extern void kbdLinuxDestroyPrivate(pointer private);
+
+extern void kbdLinuxInit(DevicePtr pDev);
+extern void kbdLinuxGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
+extern int kbdLinuxOn(DevicePtr pDev);
+extern void kbdLinuxOff(DevicePtr pDev);
+
+extern void kbdLinuxVTPreSwitch(pointer p);
+extern void kbdLinuxVTPostSwitch(pointer p);
+extern int kbdLinuxVTSwitch(pointer p, int vt,
+ dmxVTSwitchReturnProcPtr switch_return,
+ pointer switch_return_data);
+
+extern void kbdLinuxRead(DevicePtr pDev,
+ dmxMotionProcPtr motion,
+ dmxEnqueueProcPtr enqueue,
+ dmxCheckSpecialProcPtr checkspecial,
+ DMXBlockType block);
+
+extern void kbdLinuxCtrl(DevicePtr pDev, KeybdCtrl * ctrl);
+extern void kbdLinuxBell(DevicePtr pDev, int percent,
+ int volume, int pitch, int duration);
#endif
diff --git a/xorg-server/hw/dmx/input/lnx-ms.h b/xorg-server/hw/dmx/input/lnx-ms.h
index 9042fc293..28ed09557 100644
--- a/xorg-server/hw/dmx/input/lnx-ms.h
+++ b/xorg-server/hw/dmx/input/lnx-ms.h
@@ -38,18 +38,18 @@
#define _LNX_MS_H_
extern pointer msLinuxCreatePrivate(DeviceIntPtr pMouse);
-extern void msLinuxDestroyPrivate(pointer priv);
-extern void msLinuxRead(DevicePtr pDev,
- dmxMotionProcPtr motion,
- dmxEnqueueProcPtr enqueue,
- dmxCheckSpecialProcPtr checkspecial,
- DMXBlockType block);
-extern void msLinuxInit(DevicePtr pDev);
-extern void msLinuxGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-extern int msLinuxOn(DevicePtr pDev);
-extern void msLinuxOff(DevicePtr pDev);
-extern void msLinuxCtrl(DevicePtr pDev, PtrCtrl *ctrl);
-extern void msLinuxVTPreSwitch(pointer p);
-extern void msLinuxVTPostSwitch(pointer p);
+extern void msLinuxDestroyPrivate(pointer priv);
+extern void msLinuxRead(DevicePtr pDev,
+ dmxMotionProcPtr motion,
+ dmxEnqueueProcPtr enqueue,
+ dmxCheckSpecialProcPtr checkspecial,
+ DMXBlockType block);
+extern void msLinuxInit(DevicePtr pDev);
+extern void msLinuxGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
+extern int msLinuxOn(DevicePtr pDev);
+extern void msLinuxOff(DevicePtr pDev);
+extern void msLinuxCtrl(DevicePtr pDev, PtrCtrl * ctrl);
+extern void msLinuxVTPreSwitch(pointer p);
+extern void msLinuxVTPostSwitch(pointer p);
#endif
diff --git a/xorg-server/hw/dmx/input/lnx-ps2.h b/xorg-server/hw/dmx/input/lnx-ps2.h
index 5772e03d0..93f0f0219 100644
--- a/xorg-server/hw/dmx/input/lnx-ps2.h
+++ b/xorg-server/hw/dmx/input/lnx-ps2.h
@@ -38,18 +38,18 @@
#define _LNX_PS2_H_
extern pointer ps2LinuxCreatePrivate(DeviceIntPtr pMouse);
-extern void ps2LinuxDestroyPrivate(pointer priv);
-extern void ps2LinuxRead(DevicePtr pDev,
- dmxMotionProcPtr motion,
- dmxEnqueueProcPtr enqueue,
- dmxCheckSpecialProcPtr checkspecial,
- DMXBlockType block);
-extern void ps2LinuxInit(DevicePtr pDev);
-extern void ps2LinuxGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
-extern int ps2LinuxOn(DevicePtr pDev);
-extern void ps2LinuxOff(DevicePtr pDev);
-extern void ps2LinuxCtrl(DevicePtr pDev, PtrCtrl *ctrl);
-extern void ps2LinuxVTPreSwitch(pointer p);
-extern void ps2LinuxVTPostSwitch(pointer p);
+extern void ps2LinuxDestroyPrivate(pointer priv);
+extern void ps2LinuxRead(DevicePtr pDev,
+ dmxMotionProcPtr motion,
+ dmxEnqueueProcPtr enqueue,
+ dmxCheckSpecialProcPtr checkspecial,
+ DMXBlockType block);
+extern void ps2LinuxInit(DevicePtr pDev);
+extern void ps2LinuxGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info);
+extern int ps2LinuxOn(DevicePtr pDev);
+extern void ps2LinuxOff(DevicePtr pDev);
+extern void ps2LinuxCtrl(DevicePtr pDev, PtrCtrl * ctrl);
+extern void ps2LinuxVTPreSwitch(pointer p);
+extern void ps2LinuxVTPostSwitch(pointer p);
#endif
diff --git a/xorg-server/hw/dmx/input/usb-private.h b/xorg-server/hw/dmx/input/usb-private.h
index c70668ce5..096607a34 100644
--- a/xorg-server/hw/dmx/input/usb-private.h
+++ b/xorg-server/hw/dmx/input/usb-private.h
@@ -98,20 +98,20 @@
/* Private area for USB devices. */
typedef struct _myPrivate {
- DeviceIntPtr pDevice; /**< Device (mouse or other) */
- int fd; /**< File descriptor */
- unsigned char mask[EV_MAX/8 + 1]; /**< Mask */
- int numRel, numAbs, numLeds; /**< Counts */
- int relmap[DMX_MAX_AXES]; /**< Relative axis map */
- int absmap[DMX_MAX_AXES]; /**< Absolute axis map */
+ DeviceIntPtr pDevice; /**< Device (mouse or other) */
+ int fd; /**< File descriptor */
+ unsigned char mask[EV_MAX / 8 + 1]; /**< Mask */
+ int numRel, numAbs, numLeds; /**< Counts */
+ int relmap[DMX_MAX_AXES]; /**< Relative axis map */
+ int absmap[DMX_MAX_AXES]; /**< Absolute axis map */
- CARD32 kbdState[NUM_STATE_ENTRIES]; /**< Keyboard state */
- DeviceIntPtr pKeyboard; /** Keyboard device */
+ CARD32 kbdState[NUM_STATE_ENTRIES]; /**< Keyboard state */
+ DeviceIntPtr pKeyboard; /** Keyboard device */
- int pitch; /**< Bell pitch */
- unsigned long duration; /**< Bell duration */
+ int pitch; /**< Bell pitch */
+ unsigned long duration; /**< Bell duration */
/* FIXME: dmxInput is never initialized */
- DMXInputInfo *dmxInput; /**< For pretty-printing */
+ DMXInputInfo *dmxInput; /**< For pretty-printing */
} myPrivate;
#endif
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrglxext.h b/xorg-server/hw/kdrive/ephyr/ephyrglxext.h
index 22ea605d7..053f8d303 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrglxext.h
+++ b/xorg-server/hw/kdrive/ephyr/ephyrglxext.h
@@ -29,7 +29,6 @@
#define __EPHYR_GLXEXT_H__
#include <X11/Xdefs.h>
-Bool ephyrHijackGLXExtension (void) ;
+Bool ephyrHijackGLXExtension(void);
#endif /*__EPHYR_GLXEXT_H__*/
-
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrlog.h b/xorg-server/hw/kdrive/ephyr/ephyrlog.h
index a07a0a097..0da0a2518 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrlog.h
+++ b/xorg-server/hw/kdrive/ephyr/ephyrlog.h
@@ -35,7 +35,7 @@
/*we are not in debug mode*/
#define EPHYR_LOG(...)
#define EPHYR_LOG_ERROR(...)
-#endif /*!DEBUG*/
+#endif /*!DEBUG */
#define ERROR_LOG_LEVEL 3
#define INFO_LOG_LEVEL 4
@@ -45,23 +45,23 @@
LogMessageVerb(X_NOTICE, INFO_LOG_LEVEL, "in %s:%d:%s: ",\
__FILE__, __LINE__, __func__) ; \
LogMessageVerb(X_NOTICE, INFO_LOG_LEVEL, __VA_ARGS__)
-#endif /*nomadik_log*/
+#endif /*nomadik_log */
#ifndef EPHYR_LOG_ERROR
#define EPHYR_LOG_ERROR(...) \
LogMessageVerb(X_NOTICE, ERROR_LOG_LEVEL, "Error:in %s:%d:%s: ",\
__FILE__, __LINE__, __func__) ; \
LogMessageVerb(X_NOTICE, ERROR_LOG_LEVEL, __VA_ARGS__)
-#endif /*EPHYR_LOG_ERROR*/
+#endif /*EPHYR_LOG_ERROR */
#ifndef EPHYR_RETURN_IF_FAIL
#define EPHYR_RETURN_IF_FAIL(cond) \
if (!(cond)) {EPHYR_LOG_ERROR("condition %s failed\n", #cond);return;}
-#endif /*nomadik_return_if_fail*/
+#endif /*nomadik_return_if_fail */
#ifndef EPHYR_RETURN_VAL_IF_FAIL
#define EPHYR_RETURN_VAL_IF_FAIL(cond,val) \
if (!(cond)) {EPHYR_LOG_ERROR("condition %s failed\n", #cond);return val;}
-#endif /*nomadik_return_val_if_fail*/
+#endif /*nomadik_return_val_if_fail */
#endif /*__EPHYRLOG_H__*/
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrproxyext.h b/xorg-server/hw/kdrive/ephyr/ephyrproxyext.h
index e52f8d887..018b69b34 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrproxyext.h
+++ b/xorg-server/hw/kdrive/ephyr/ephyrproxyext.h
@@ -28,7 +28,6 @@
#ifndef __EPHYRPROXYEXT_H__
#define __EPHYRPROXYEXT_H__
-Bool ephyrProxyExtensionInit (const char *a_extension_name) ;
+Bool ephyrProxyExtensionInit(const char *a_extension_name);
#endif /*__EPHYRPROXYEXT_H__*/
-
diff --git a/xorg-server/hw/kdrive/fake/fakeinit.c b/xorg-server/hw/kdrive/fake/fakeinit.c
index e25093fbf..0aae1ddc1 100644
--- a/xorg-server/hw/kdrive/fake/fakeinit.c
+++ b/xorg-server/hw/kdrive/fake/fakeinit.c
@@ -26,94 +26,94 @@
#include "fake.h"
void
-InitCard (char *name)
+InitCard(char *name)
{
- KdCardInfoAdd (&fakeFuncs, 0);
+ KdCardInfoAdd(&fakeFuncs, 0);
}
void
-InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv)
+InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
{
- KdInitOutput (pScreenInfo, argc, argv);
+ KdInitOutput(pScreenInfo, argc, argv);
}
void
-InitInput (int argc, char **argv)
+InitInput(int argc, char **argv)
{
KdPointerInfo *pi;
KdKeyboardInfo *ki;
- pi = KdNewPointer ();
+ pi = KdNewPointer();
if (!pi)
return;
pi->driver = &FakePointerDriver;
KdAddPointer(pi);
- ki = KdNewKeyboard ();
+ ki = KdNewKeyboard();
if (!ki)
return;
ki->driver = &FakeKeyboardDriver;
KdAddKeyboard(ki);
- KdInitInput ();
+ KdInitInput();
}
void
-CloseInput (void)
+CloseInput(void)
{
- KdCloseInput ();
+ KdCloseInput();
}
#ifdef DDXBEFORERESET
void
-ddxBeforeReset (void)
+ddxBeforeReset(void)
{
}
#endif
void
-ddxUseMsg (void)
+ddxUseMsg(void)
{
KdUseMsg();
}
int
-ddxProcessArgument (int argc, char **argv, int i)
+ddxProcessArgument(int argc, char **argv, int i)
{
- return KdProcessArgument (argc, argv, i);
+ return KdProcessArgument(argc, argv, i);
}
void
-OsVendorInit (void)
+OsVendorInit(void)
{
- KdOsInit (&FakeOsFuncs);
+ KdOsInit(&FakeOsFuncs);
}
-KdCardFuncs fakeFuncs = {
- fakeCardInit, /* cardinit */
- fakeScreenInit, /* scrinit */
- fakeInitScreen, /* initScreen */
- fakeFinishInitScreen, /* finishInitScreen */
- fakeCreateResources, /* createRes */
- fakePreserve, /* preserve */
- fakeEnable, /* enable */
- fakeDPMS, /* dpms */
- fakeDisable, /* disable */
- fakeRestore, /* restore */
- fakeScreenFini, /* scrfini */
- fakeCardFini, /* cardfini */
-
- 0, /* initCursor */
- 0, /* enableCursor */
- 0, /* disableCursor */
- 0, /* finiCursor */
- 0, /* recolorCursor */
-
- 0, /* initAccel */
- 0, /* enableAccel */
- 0, /* disableAccel */
- 0, /* finiAccel */
-
- fakeGetColors, /* getColors */
- fakePutColors, /* putColors */
+KdCardFuncs fakeFuncs = {
+ fakeCardInit, /* cardinit */
+ fakeScreenInit, /* scrinit */
+ fakeInitScreen, /* initScreen */
+ fakeFinishInitScreen, /* finishInitScreen */
+ fakeCreateResources, /* createRes */
+ fakePreserve, /* preserve */
+ fakeEnable, /* enable */
+ fakeDPMS, /* dpms */
+ fakeDisable, /* disable */
+ fakeRestore, /* restore */
+ fakeScreenFini, /* scrfini */
+ fakeCardFini, /* cardfini */
+
+ 0, /* initCursor */
+ 0, /* enableCursor */
+ 0, /* disableCursor */
+ 0, /* finiCursor */
+ 0, /* recolorCursor */
+
+ 0, /* initAccel */
+ 0, /* enableAccel */
+ 0, /* disableAccel */
+ 0, /* finiAccel */
+
+ fakeGetColors, /* getColors */
+ fakePutColors, /* putColors */
};
diff --git a/xorg-server/hw/kdrive/fake/kbd.c b/xorg-server/hw/kdrive/fake/kbd.c
index 769730d64..83a3c66cf 100644
--- a/xorg-server/hw/kdrive/fake/kbd.c
+++ b/xorg-server/hw/kdrive/fake/kbd.c
@@ -29,7 +29,7 @@
#define FAKE_WIDTH 2
static Status
-FakeKeyboardInit (KdKeyboardInfo *ki)
+FakeKeyboardInit(KdKeyboardInfo * ki)
{
ki->minScanCode = 8;
ki->maxScanCode = 255;
@@ -37,29 +37,29 @@ FakeKeyboardInit (KdKeyboardInfo *ki)
}
static Status
-FakeKeyboardEnable (KdKeyboardInfo *ki)
+FakeKeyboardEnable(KdKeyboardInfo * ki)
{
return Success;
}
static void
-FakeKeyboardDisable (KdKeyboardInfo *ki)
+FakeKeyboardDisable(KdKeyboardInfo * ki)
{
return;
}
static void
-FakeKeyboardFini (KdKeyboardInfo *ki)
+FakeKeyboardFini(KdKeyboardInfo * ki)
{
}
static void
-FakeKeyboardLeds (KdKeyboardInfo *ki, int leds)
+FakeKeyboardLeds(KdKeyboardInfo * ki, int leds)
{
}
static void
-FakeKeyboardBell (KdKeyboardInfo *ki, int volume, int frequency, int duration)
+FakeKeyboardBell(KdKeyboardInfo * ki, int volume, int frequency, int duration)
{
}
diff --git a/xorg-server/hw/kdrive/fake/mouse.c b/xorg-server/hw/kdrive/fake/mouse.c
index 758f6cd22..bb4c25eeb 100644
--- a/xorg-server/hw/kdrive/fake/mouse.c
+++ b/xorg-server/hw/kdrive/fake/mouse.c
@@ -33,30 +33,29 @@
#include "kdrive.h"
static Status
-MouseInit (KdPointerInfo *pi)
+MouseInit(KdPointerInfo * pi)
{
return Success;
}
static Status
-MouseEnable (KdPointerInfo *pi)
+MouseEnable(KdPointerInfo * pi)
{
return Success;
}
static void
-MouseDisable (KdPointerInfo *pi)
+MouseDisable(KdPointerInfo * pi)
{
return;
}
static void
-MouseFini (KdPointerInfo *pi)
+MouseFini(KdPointerInfo * pi)
{
return;
}
-
KdPointerDriver FakePointerDriver = {
"fake",
MouseInit,
diff --git a/xorg-server/hw/kdrive/fake/os.c b/xorg-server/hw/kdrive/fake/os.c
index 76cd9e728..01bb37bd5 100644
--- a/xorg-server/hw/kdrive/fake/os.c
+++ b/xorg-server/hw/kdrive/fake/os.c
@@ -26,33 +26,33 @@
#include "fake.h"
static int
-FakeInit (void)
+FakeInit(void)
{
return 1;
}
static void
-FakeEnable (void)
+FakeEnable(void)
{
}
static Bool
-FakeSpecialKey (KeySym sym)
+FakeSpecialKey(KeySym sym)
{
return FALSE;
}
static void
-FakeDisable (void)
+FakeDisable(void)
{
}
static void
-FakeFini (void)
+FakeFini(void)
{
}
-KdOsFuncs FakeOsFuncs = {
+KdOsFuncs FakeOsFuncs = {
FakeInit,
FakeEnable,
FakeSpecialKey,
@@ -60,4 +60,3 @@ KdOsFuncs FakeOsFuncs = {
FakeFini,
0
};
-
diff --git a/xorg-server/hw/kdrive/fbdev/fbdev.h b/xorg-server/hw/kdrive/fbdev/fbdev.h
index ec53784af..0706f4e11 100644
--- a/xorg-server/hw/kdrive/fbdev/fbdev.h
+++ b/xorg-server/hw/kdrive/fbdev/fbdev.h
@@ -33,67 +33,67 @@
#endif
typedef struct _fbdevPriv {
- struct fb_var_screeninfo var;
- struct fb_fix_screeninfo fix;
- __u16 red[256];
- __u16 green[256];
- __u16 blue[256];
- int fd;
- char *fb;
- char *fb_base;
+ struct fb_var_screeninfo var;
+ struct fb_fix_screeninfo fix;
+ __u16 red[256];
+ __u16 green[256];
+ __u16 blue[256];
+ int fd;
+ char *fb;
+ char *fb_base;
} FbdevPriv;
typedef struct _fbdevScrPriv {
- Rotation randr;
- Bool shadow;
+ Rotation randr;
+ Bool shadow;
} FbdevScrPriv;
-extern KdCardFuncs fbdevFuncs;
-extern char* fbdevDevicePath;
+extern KdCardFuncs fbdevFuncs;
+extern char *fbdevDevicePath;
Bool
-fbdevCardInit (KdCardInfo *card);
+ fbdevCardInit(KdCardInfo * card);
Bool
-fbdevScreenInit (KdScreenInfo *screen);
+ fbdevScreenInit(KdScreenInfo * screen);
Bool
-fbdevInitScreen (ScreenPtr pScreen);
+ fbdevInitScreen(ScreenPtr pScreen);
Bool
-fbdevFinishInitScreen (ScreenPtr pScreen);
+ fbdevFinishInitScreen(ScreenPtr pScreen);
Bool
-fbdevCreateResources (ScreenPtr pScreen);
+ fbdevCreateResources(ScreenPtr pScreen);
void
-fbdevPreserve (KdCardInfo *card);
+ fbdevPreserve(KdCardInfo * card);
Bool
-fbdevEnable (ScreenPtr pScreen);
+ fbdevEnable(ScreenPtr pScreen);
Bool
-fbdevDPMS (ScreenPtr pScreen, int mode);
+ fbdevDPMS(ScreenPtr pScreen, int mode);
void
-fbdevDisable (ScreenPtr pScreen);
+ fbdevDisable(ScreenPtr pScreen);
void
-fbdevRestore (KdCardInfo *card);
+ fbdevRestore(KdCardInfo * card);
void
-fbdevScreenFini (KdScreenInfo *screen);
+ fbdevScreenFini(KdScreenInfo * screen);
void
-fbdevCardFini (KdCardInfo *card);
+ fbdevCardFini(KdCardInfo * card);
void
-fbdevGetColors (ScreenPtr pScreen, int n, xColorItem *pdefs);
+ fbdevGetColors(ScreenPtr pScreen, int n, xColorItem * pdefs);
void
-fbdevPutColors (ScreenPtr pScreen, int n, xColorItem *pdefs);
+ fbdevPutColors(ScreenPtr pScreen, int n, xColorItem * pdefs);
Bool
-fbdevMapFramebuffer (KdScreenInfo *screen);
+ fbdevMapFramebuffer(KdScreenInfo * screen);
-#endif /* _FBDEV_H_ */
+#endif /* _FBDEV_H_ */
diff --git a/xorg-server/hw/kdrive/src/fourcc.h b/xorg-server/hw/kdrive/src/fourcc.h
index 54be7ebe8..534ec452f 100644
--- a/xorg-server/hw/kdrive/src/fourcc.h
+++ b/xorg-server/hw/kdrive/src/fourcc.h
@@ -69,7 +69,6 @@
XvTopToBottom \
}
-
#define FOURCC_UYVY 0x59565955
#define XVIMAGE_UYVY \
{ \
@@ -130,4 +129,4 @@
XvTopToBottom \
}
-#endif /* _XF86_FOURCC_H_ */
+#endif /* _XF86_FOURCC_H_ */
diff --git a/xorg-server/hw/xfree86/common/fourcc.h b/xorg-server/hw/xfree86/common/fourcc.h
index 853657e86..e6126b7fe 100644
--- a/xorg-server/hw/xfree86/common/fourcc.h
+++ b/xorg-server/hw/xfree86/common/fourcc.h
@@ -96,7 +96,6 @@
XvTopToBottom \
}
-
#define FOURCC_UYVY 0x59565955
#define XVIMAGE_UYVY \
{ \
@@ -157,4 +156,4 @@
XvTopToBottom \
}
-#endif /* _XF86_FOURCC_H_ */
+#endif /* _XF86_FOURCC_H_ */
diff --git a/xorg-server/hw/xfree86/common/xf86Bus.h b/xorg-server/hw/xfree86/common/xf86Bus.h
index 0b2ebdb44..abf2efd1a 100644
--- a/xorg-server/hw/xfree86/common/xf86Bus.h
+++ b/xorg-server/hw/xfree86/common/xf86Bus.h
@@ -44,20 +44,20 @@
#endif
typedef struct {
- DriverPtr driver;
- int chipset;
- int entityProp;
- EntityProc entityInit;
- EntityProc entityEnter;
- EntityProc entityLeave;
- pointer private;
- Bool active;
- Bool inUse;
- BusRec bus;
- int lastScrnFlag;
- DevUnion * entityPrivates;
- int numInstances;
- GDevPtr * devices;
+ DriverPtr driver;
+ int chipset;
+ int entityProp;
+ EntityProc entityInit;
+ EntityProc entityEnter;
+ EntityProc entityLeave;
+ pointer private;
+ Bool active;
+ Bool inUse;
+ BusRec bus;
+ int lastScrnFlag;
+ DevUnion *entityPrivates;
+ int numInstances;
+ GDevPtr *devices;
} EntityRec, *EntityPtr;
#define ACCEL_IS_SHARABLE 0x100
@@ -69,6 +69,6 @@ extern int xf86NumEntities;
extern BusRec primaryBus;
int xf86AllocateEntity(void);
-BusType StringToBusType(const char* busID, const char **retID);
+BusType StringToBusType(const char *busID, const char **retID);
-#endif /* _XF86_BUS_H */
+#endif /* _XF86_BUS_H */
diff --git a/xorg-server/hw/xfree86/common/xf86Config.h b/xorg-server/hw/xfree86/common/xf86Config.h
index 411fc2cc1..de06677c3 100644
--- a/xorg-server/hw/xfree86/common/xf86Config.h
+++ b/xorg-server/hw/xfree86/common/xf86Config.h
@@ -59,14 +59,14 @@ typedef struct _ModuleDefault {
/*
* prototypes
*/
-char ** xf86ModulelistFromConfig(pointer **);
-char ** xf86DriverlistFromConfig(void);
-char ** xf86DriverlistFromCompile(void);
-char ** xf86InputDriverlistFromConfig(void);
+char **xf86ModulelistFromConfig(pointer **);
+char **xf86DriverlistFromConfig(void);
+char **xf86DriverlistFromCompile(void);
+char **xf86InputDriverlistFromConfig(void);
Bool xf86BuiltinInputDriver(const char *);
ConfigStatus xf86HandleConfigFile(Bool);
Bool xf86AutoConfig(void);
GDevPtr autoConfigDevice(GDevPtr preconf_device);
-#endif /* _xf86_config_h */
+#endif /* _xf86_config_h */
diff --git a/xorg-server/hw/xfree86/common/xf86DPMS.c b/xorg-server/hw/xfree86/common/xf86DPMS.c
index 613c7cf73..75f034239 100644
--- a/xorg-server/hw/xfree86/common/xf86DPMS.c
+++ b/xorg-server/hw/xfree86/common/xf86DPMS.c
@@ -53,7 +53,6 @@ static Bool DPMSClose(int i, ScreenPtr pScreen);
static int DPMSCount = 0;
#endif
-
Bool
xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
{
@@ -65,28 +64,28 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
DPMSKey = &DPMSKeyRec;
- if (!dixRegisterPrivateKey(&DPMSKeyRec, PRIVATE_SCREEN, sizeof (DPMSRec)))
- return FALSE;
+ if (!dixRegisterPrivateKey(&DPMSKeyRec, PRIVATE_SCREEN, sizeof(DPMSRec)))
+ return FALSE;
pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey);
pScrn->DPMSSet = set;
pDPMS->Flags = flags;
DPMSOpt = xf86FindOption(pScrn->options, "dpms");
if (DPMSDisabledSwitch) {
- enabled_from = X_CMDLINE;
- DPMSEnabled = FALSE;
+ enabled_from = X_CMDLINE;
+ DPMSEnabled = FALSE;
}
else if (DPMSOpt) {
- enabled_from = X_CONFIG;
- DPMSEnabled = xf86CheckBoolOption(pScrn->options, "dpms", FALSE);
- xf86MarkOptionUsed(DPMSOpt);
+ enabled_from = X_CONFIG;
+ DPMSEnabled = xf86CheckBoolOption(pScrn->options, "dpms", FALSE);
+ xf86MarkOptionUsed(DPMSOpt);
}
else {
- enabled_from = X_DEFAULT;
- DPMSEnabled = TRUE;
+ enabled_from = X_DEFAULT;
+ DPMSEnabled = TRUE;
}
if (DPMSEnabled)
- xf86DrvMsg(pScreen->myNum, enabled_from, "DPMS enabled\n");
+ xf86DrvMsg(pScreen->myNum, enabled_from, "DPMS enabled\n");
pDPMS->Enabled = DPMSEnabled;
pDPMS->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = DPMSClose;
@@ -97,7 +96,6 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
#endif
}
-
#ifdef DPMSExtension
static Bool
@@ -107,13 +105,13 @@ DPMSClose(int i, ScreenPtr pScreen)
/* This shouldn't happen */
if (DPMSKey == NULL)
- return FALSE;
+ return FALSE;
pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey);
/* This shouldn't happen */
if (!pDPMS)
- return FALSE;
+ return FALSE;
pScreen->CloseScreen = pDPMS->CloseScreen;
@@ -124,15 +122,14 @@ DPMSClose(int i, ScreenPtr pScreen)
* to deal with this internally.
*/
if (xf86Screens[i]->vtSema && xf86Screens[i]->DPMSSet) {
- xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0);
+ xf86Screens[i]->DPMSSet(xf86Screens[i], DPMSModeOn, 0);
}
-
+
if (--DPMSCount == 0)
- DPMSKey = NULL;
+ DPMSKey = NULL;
return pScreen->CloseScreen(i, pScreen);
}
-
/*
* DPMSSet --
* Device dependent DPMS mode setting hook. This is called whenever
@@ -148,28 +145,27 @@ DPMSSet(ClientPtr client, int level)
DPMSPowerLevel = level;
if (DPMSKey == NULL)
- return Success;
+ return Success;
if (level != DPMSModeOn) {
- rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive);
- if (rc != Success)
- return rc;
+ rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive);
+ if (rc != Success)
+ return rc;
}
/* For each screen, set the DPMS level */
for (i = 0; i < xf86NumScreens; i++) {
- pScrn = xf86Screens[i];
- pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey);
- if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) {
- xf86VGAarbiterLock(pScrn);
- pScrn->DPMSSet(pScrn, level, 0);
- xf86VGAarbiterUnlock(pScrn);
- }
+ pScrn = xf86Screens[i];
+ pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey);
+ if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) {
+ xf86VGAarbiterLock(pScrn);
+ pScrn->DPMSSet(pScrn, level, 0);
+ xf86VGAarbiterUnlock(pScrn);
+ }
}
return Success;
}
-
/*
* DPMSSupported --
* Return TRUE if any screen supports DPMS.
@@ -182,17 +178,17 @@ DPMSSupported(void)
ScrnInfoPtr pScrn;
if (DPMSKey == NULL) {
- return FALSE;
+ return FALSE;
}
/* For each screen, check if DPMS is supported */
for (i = 0; i < xf86NumScreens; i++) {
- pScrn = xf86Screens[i];
- pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey);
- if (pDPMS && pScrn->DPMSSet)
- return TRUE;
+ pScrn = xf86Screens[i];
+ pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey);
+ if (pDPMS && pScrn->DPMSSet)
+ return TRUE;
}
return FALSE;
}
-#endif /* DPMSExtension */
+#endif /* DPMSExtension */
diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c
index 058057e92..5896f220c 100644
--- a/xorg-server/hw/xfree86/common/xf86Events.c
+++ b/xorg-server/hw/xfree86/common/xf86Events.c
@@ -449,6 +449,8 @@ xf86VTSwitch(void)
xf86DisableInputHandler(ih);
for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) {
if (pInfo->dev) {
+ if (!pInfo->dev->enabled)
+ pInfo->flags |= XI86_DEVICE_DISABLED;
xf86ReleaseKeys(pInfo->dev);
ProcessInputEvents();
DisableDevice(pInfo->dev, TRUE);
@@ -482,8 +484,9 @@ xf86VTSwitch(void)
pInfo = xf86InputDevs;
while (pInfo) {
- if (pInfo->dev)
+ if (pInfo->dev && (pInfo->flags & XI86_DEVICE_DISABLED) == 0)
EnableDevice(pInfo->dev, TRUE);
+ pInfo->flags &= ~XI86_DEVICE_DISABLED;
pInfo = pInfo->next;
}
for (ih = InputHandlers; ih; ih = ih->next)
@@ -537,8 +540,9 @@ xf86VTSwitch(void)
pInfo = xf86InputDevs;
while (pInfo) {
- if (pInfo->dev)
+ if (pInfo->dev && (pInfo->flags & XI86_DEVICE_DISABLED) == 0)
EnableDevice(pInfo->dev, TRUE);
+ pInfo->flags &= ~XI86_DEVICE_DISABLED;
pInfo = pInfo->next;
}
diff --git a/xorg-server/hw/xfree86/common/xf86InPriv.h b/xorg-server/hw/xfree86/common/xf86InPriv.h
index 15fef4320..5826ac388 100644
--- a/xorg-server/hw/xfree86/common/xf86InPriv.h
+++ b/xorg-server/hw/xfree86/common/xf86InPriv.h
@@ -1,43 +1,43 @@
-
-/*
- * Copyright (c) 1999 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _xf86InPriv_h
-#define _xf86InPriv_h
-
-/* xf86Globals.c */
-extern InputDriverPtr *xf86InputDriverList;
-extern int xf86NumInputDrivers;
-
-/* xf86Helper.c */
-InputDriverPtr xf86LookupInputDriver(const char *name);
-
-#endif /* _xf86InPriv_h */
+
+/*
+ * Copyright (c) 1999 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifndef _xf86InPriv_h
+#define _xf86InPriv_h
+
+/* xf86Globals.c */
+extern InputDriverPtr *xf86InputDriverList;
+extern int xf86NumInputDrivers;
+
+/* xf86Helper.c */
+InputDriverPtr xf86LookupInputDriver(const char *name);
+
+#endif /* _xf86InPriv_h */
diff --git a/xorg-server/hw/xfree86/common/xf86PciInfo.h b/xorg-server/hw/xfree86/common/xf86PciInfo.h
index e2d78627b..d6450e25c 100644
--- a/xorg-server/hw/xfree86/common/xf86PciInfo.h
+++ b/xorg-server/hw/xfree86/common/xf86PciInfo.h
@@ -101,7 +101,6 @@
#define PCI_VENDOR_INTEL 0x8086
#define PCI_VENDOR_ARK 0xEDD8
-
/* Generic */
#define PCI_CHIP_VGA 0x0000
#define PCI_CHIP_8514 0x0001
@@ -215,10 +214,10 @@
#define PCI_CHIP_R300_NE 0x4E45
#define PCI_CHIP_R300_NF 0x4E46
#define PCI_CHIP_R300_NG 0x4E47
-#define PCI_CHIP_R350_NH 0x4E48
-#define PCI_CHIP_R350_NI 0x4E49
-#define PCI_CHIP_R360_NJ 0x4E4A
-#define PCI_CHIP_R350_NK 0x4E4B
+#define PCI_CHIP_R350_NH 0x4E48
+#define PCI_CHIP_R350_NI 0x4E49
+#define PCI_CHIP_R360_NJ 0x4E4A
+#define PCI_CHIP_R350_NK 0x4E4B
#define PCI_CHIP_RV350_NP 0x4E50
#define PCI_CHIP_RV350_NQ 0x4E51
#define PCI_CHIP_RV350_NR 0x4E52
@@ -498,16 +497,16 @@
#define PCI_CHIP_SIS330 0x0330
#define PCI_CHIP_SIS630 0x6300
#define PCI_CHIP_SIS540 0x5300
-#define PCI_CHIP_SIS550 0x5315
-#define PCI_CHIP_SIS650 0x6325
+#define PCI_CHIP_SIS550 0x5315
+#define PCI_CHIP_SIS650 0x6325
#define PCI_CHIP_SIS730 0x7300
/* Hewlett-Packard */
#define PCI_CHIP_ELROY 0x1054
#define PCI_CHIP_ZX1_SBA 0x1229
#define PCI_CHIP_ZX1_IOC 0x122A
-#define PCI_CHIP_ZX1_LBA 0x122E /* a.k.a. Mercury */
-#define PCI_CHIP_ZX1_AGP8 0x12B4 /* a.k.a. QuickSilver */
+#define PCI_CHIP_ZX1_LBA 0x122E /* a.k.a. Mercury */
+#define PCI_CHIP_ZX1_AGP8 0x12B4 /* a.k.a. QuickSilver */
#define PCI_CHIP_ZX2_LBA 0x12EE
#define PCI_CHIP_ZX2_SBA 0x4030
#define PCI_CHIP_ZX2_IOC 0x4031
@@ -713,9 +712,9 @@
#define PCI_CHIP_I740_AGP 0x7800
#define PCI_CHIP_460GX_PXB 0x84CB
#define PCI_CHIP_460GX_SAC 0x84E0
-#define PCI_CHIP_460GX_GXB_2 0x84E2 /* PCI function 2 */
+#define PCI_CHIP_460GX_GXB_2 0x84E2 /* PCI function 2 */
#define PCI_CHIP_460GX_WXB 0x84E6
-#define PCI_CHIP_460GX_GXB_1 0x84EA /* PCI function 1 */
+#define PCI_CHIP_460GX_GXB_1 0x84EA /* PCI function 1 */
/* Silicon Motion Inc. */
#define PCI_CHIP_SMI910 0x0910
@@ -730,4 +729,4 @@
#define PCI_CHIP_VMWARE0405 0x0405
#define PCI_CHIP_VMWARE0710 0x0710
-#endif /* _XF86_PCIINFO_H */
+#endif /* _XF86_PCIINFO_H */
diff --git a/xorg-server/hw/xfree86/common/xf86Privstr.h b/xorg-server/hw/xfree86/common/xf86Privstr.h
index 79bc8a084..e78cd407d 100644
--- a/xorg-server/hw/xfree86/common/xf86Privstr.h
+++ b/xorg-server/hw/xfree86/common/xf86Privstr.h
@@ -29,7 +29,7 @@
/*
* This file contains definitions of the private XFree86 data structures/types.
* None of the data structures here should be used by video drivers.
- */
+ */
#ifndef _XF86PRIVSTR_H
#define _XF86PRIVSTR_H
@@ -55,90 +55,90 @@ typedef enum {
*/
typedef struct {
- int consoleFd;
- int vtno;
+ int consoleFd;
+ int vtno;
/* event handler part */
- int lastEventTime;
- Bool vtRequestsPending;
+ int lastEventTime;
+ Bool vtRequestsPending;
#ifdef sun
- int vtPendingNum;
+ int vtPendingNum;
#endif
- Bool dontVTSwitch;
- Bool autoVTSwitch;
- Bool ShareVTs;
- Bool dontZap;
- Bool dontZoom;
- Bool notrapSignals; /* don't exit cleanly - die at fault */
- Bool caughtSignal;
+ Bool dontVTSwitch;
+ Bool autoVTSwitch;
+ Bool ShareVTs;
+ Bool dontZap;
+ Bool dontZoom;
+ Bool notrapSignals; /* don't exit cleanly - die at fault */
+ Bool caughtSignal;
/* graphics part */
- ScreenPtr currentScreen;
+ ScreenPtr currentScreen;
#if defined(CSRG_BASED) || defined(__FreeBSD_kernel__)
- int consType; /* Which console driver? */
+ int consType; /* Which console driver? */
#endif
/* Other things */
- Bool allowMouseOpenFail;
- Bool vidModeEnabled; /* VidMode extension enabled */
- Bool vidModeAllowNonLocal; /* allow non-local VidMode
- * connections */
- Bool miscModInDevEnabled; /* Allow input devices to be
- * changed */
- Bool miscModInDevAllowNonLocal;
- Bool useSIGIO; /* Use SIGIO for handling
- input device events */
- Pix24Flags pixmap24;
- MessageType pix24From;
- Bool pmFlag;
- Log log;
- Bool disableRandR;
- MessageType randRFrom;
- Bool aiglx;
- MessageType aiglxFrom;
- XF86_GlxVisuals glxVisuals;
- MessageType glxVisualsFrom;
-
- Bool useDefaultFontPath;
- MessageType useDefaultFontPathFrom;
- Bool ignoreABI;
-
- Bool forceInputDevices; /* force xorg.conf or built-in input devices */
- Bool autoAddDevices; /* Whether to succeed NIDR, or ignore. */
- Bool autoEnableDevices; /* Whether to enable, or let the client
- * control. */
-
- Bool dri2;
- MessageType dri2From;
+ Bool allowMouseOpenFail;
+ Bool vidModeEnabled; /* VidMode extension enabled */
+ Bool vidModeAllowNonLocal; /* allow non-local VidMode
+ * connections */
+ Bool miscModInDevEnabled; /* Allow input devices to be
+ * changed */
+ Bool miscModInDevAllowNonLocal;
+ Bool useSIGIO; /* Use SIGIO for handling
+ input device events */
+ Pix24Flags pixmap24;
+ MessageType pix24From;
+ Bool pmFlag;
+ Log log;
+ Bool disableRandR;
+ MessageType randRFrom;
+ Bool aiglx;
+ MessageType aiglxFrom;
+ XF86_GlxVisuals glxVisuals;
+ MessageType glxVisualsFrom;
+
+ Bool useDefaultFontPath;
+ MessageType useDefaultFontPathFrom;
+ Bool ignoreABI;
+
+ Bool forceInputDevices; /* force xorg.conf or built-in input devices */
+ Bool autoAddDevices; /* Whether to succeed NIDR, or ignore. */
+ Bool autoEnableDevices; /* Whether to enable, or let the client
+ * control. */
+
+ Bool dri2;
+ MessageType dri2From;
} xf86InfoRec, *xf86InfoPtr;
#ifdef DPMSExtension
/* Private info for DPMS */
typedef struct {
- CloseScreenProcPtr CloseScreen;
- Bool Enabled;
- int Flags;
+ CloseScreenProcPtr CloseScreen;
+ Bool Enabled;
+ int Flags;
} DPMSRec, *DPMSPtr;
#endif
#ifdef XF86VIDMODE
/* Private info for Video Mode Extentsion */
typedef struct {
- DisplayModePtr First;
- DisplayModePtr Next;
- int Flags;
- CloseScreenProcPtr CloseScreen;
+ DisplayModePtr First;
+ DisplayModePtr Next;
+ int Flags;
+ CloseScreenProcPtr CloseScreen;
} VidModeRec, *VidModePtr;
#endif
/* Information for root window properties. */
typedef struct _RootWinProp {
- struct _RootWinProp * next;
- char * name;
- Atom type;
- short format;
- long size;
- pointer data;
+ struct _RootWinProp *next;
+ char *name;
+ Atom type;
+ short format;
+ long size;
+ pointer data;
} RootWinProp, *RootWinPropPtr;
/* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */
@@ -161,4 +161,4 @@ typedef struct _RootWinProp {
#define WSCONS 32
#endif
-#endif /* _XF86PRIVSTR_H */
+#endif /* _XF86PRIVSTR_H */
diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiter.h b/xorg-server/hw/xfree86/common/xf86VGAarbiter.h
index ae9c51dd2..bb52cf78a 100644
--- a/xorg-server/hw/xfree86/common/xf86VGAarbiter.h
+++ b/xorg-server/hw/xfree86/common/xf86VGAarbiter.h
@@ -1,48 +1,49 @@
-/*
- * Copyright (c) 2009 Tiago Vignatti
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * 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.
- */
-
-#ifndef __XF86VGAARBITER_H
-#define __XF86VGAARBITER_H
-
-#include "screenint.h"
-#include "misc.h"
-#include "xf86.h"
-
-/* Functions */
-extern void xf86VGAarbiterInit(void);
-extern void xf86VGAarbiterFini(void);
-void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn);
-extern Bool xf86VGAarbiterWrapFunctions(void);
-extern void xf86VGAarbiterLock(ScrnInfoPtr pScrn);
-extern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn);
-
-/* allow a driver to remove itself from arbiter - really should be
- * done in the kernel though */
-extern _X_EXPORT void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc);
-/* DRI and arbiter are really not possible together,
- * you really want to remove the card from arbitration if you can */
-extern _X_EXPORT Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen);
-
-#endif /* __XF86VGAARBITER_H */
+/*
+ * Copyright (c) 2009 Tiago Vignatti
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * 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.
+ */
+
+#ifndef __XF86VGAARBITER_H
+#define __XF86VGAARBITER_H
+
+#include "screenint.h"
+#include "misc.h"
+#include "xf86.h"
+
+/* Functions */
+extern void xf86VGAarbiterInit(void);
+extern void xf86VGAarbiterFini(void);
+void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn);
+extern Bool xf86VGAarbiterWrapFunctions(void);
+extern void xf86VGAarbiterLock(ScrnInfoPtr pScrn);
+extern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn);
+
+/* allow a driver to remove itself from arbiter - really should be
+ * done in the kernel though */
+extern _X_EXPORT void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc);
+
+/* DRI and arbiter are really not possible together,
+ * you really want to remove the card from arbitration if you can */
+extern _X_EXPORT Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen);
+
+#endif /* __XF86VGAARBITER_H */
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.h b/xorg-server/hw/xfree86/common/xf86Xinput.h
index 3731a34d5..1d4363a50 100644
--- a/xorg-server/hw/xfree86/common/xf86Xinput.h
+++ b/xorg-server/hw/xfree86/common/xf86Xinput.h
@@ -61,6 +61,9 @@
#define XI86_ALWAYS_CORE 0x04 /* device always controls the pointer */
/* the device sends Xinput and core pointer events */
#define XI86_SEND_CORE_EVENTS XI86_ALWAYS_CORE
+/* 0x08 is reserved for legacy XI86_SEND_DRAG_EVENTS, do not use for now */
+/* server-internal only */
+#define XI86_DEVICE_DISABLED 0x10 /* device was disabled before vt switch */
/* This holds the input driver entry and module information. */
typedef struct _InputDriverRec {
diff --git a/xorg-server/hw/xfree86/common/xf86fbBus.c b/xorg-server/hw/xfree86/common/xf86fbBus.c
index 45929804f..1e5162332 100644
--- a/xorg-server/hw/xfree86/common/xf86fbBus.c
+++ b/xorg-server/hw/xfree86/common/xf86fbBus.c
@@ -56,13 +56,13 @@ xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active)
#ifdef XSERVER_LIBPCIACCESS
if (pciSlotClaimed)
- return -1;
+ return -1;
#endif
#if defined(__sparc__) || defined (__sparc64__)
if (sbusSlotClaimed)
- return -1;
+ return -1;
#endif
-
+
num = xf86AllocateEntity();
p = xf86Entities[num];
p->driver = drvp;
@@ -85,12 +85,12 @@ xf86GetFbInfoForScreen(int scrnIndex)
int num = 0;
int i;
EntityPtr p;
-
+
for (i = 0; i < xf86Screens[scrnIndex]->numEntities; i++) {
- p = xf86Entities[xf86Screens[scrnIndex]->entityList[i]];
- if (p->bus.type == BUS_NONE) {
- num++;
- }
+ p = xf86Entities[xf86Screens[scrnIndex]->entityList[i]];
+ if (p->bus.type == BUS_NONE) {
+ num++;
+ }
}
return num;
}
diff --git a/xorg-server/hw/xfree86/common/xf86noBus.c b/xorg-server/hw/xfree86/common/xf86noBus.c
index 0b9634918..4f55def7b 100644
--- a/xorg-server/hw/xfree86/common/xf86noBus.c
+++ b/xorg-server/hw/xfree86/common/xf86noBus.c
@@ -51,7 +51,7 @@ xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active)
{
EntityPtr p;
int num;
-
+
num = xf86AllocateEntity();
p = xf86Entities[num];
p->driver = drvp;
diff --git a/xorg-server/hw/xfree86/common/xf86pciBus.h b/xorg-server/hw/xfree86/common/xf86pciBus.h
index a631fbffb..56ec6e9e7 100644
--- a/xorg-server/hw/xfree86/common/xf86pciBus.h
+++ b/xorg-server/hw/xfree86/common/xf86pciBus.h
@@ -1,45 +1,45 @@
-
-/*
- * Copyright (c) 1999-2003 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _XF86_PCI_BUS_H
-#define _XF86_PCI_BUS_H
-
-void xf86PciProbe(void);
-Bool xf86PciAddMatchingDev(DriverPtr drvp);
-Bool xf86PciProbeDev(DriverPtr drvp);
-void xf86PciIsolateDevice(char *argument);
-int xf86PciMatchDriver(char* matches[], int nmatches);
-Bool xf86PciConfigure(void *busData, struct pci_device *pDev);
-void xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo,
- GDevRec *GDev, int *chipset);
-
-#endif /* _XF86_PCI_BUS_H */
+
+/*
+ * Copyright (c) 1999-2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifndef _XF86_PCI_BUS_H
+#define _XF86_PCI_BUS_H
+
+void xf86PciProbe(void);
+Bool xf86PciAddMatchingDev(DriverPtr drvp);
+Bool xf86PciProbeDev(DriverPtr drvp);
+void xf86PciIsolateDevice(char *argument);
+int xf86PciMatchDriver(char *matches[], int nmatches);
+Bool xf86PciConfigure(void *busData, struct pci_device *pDev);
+void xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo,
+ GDevRec * GDev, int *chipset);
+
+#endif /* _XF86_PCI_BUS_H */
diff --git a/xorg-server/hw/xfree86/common/xf86xvpriv.h b/xorg-server/hw/xfree86/common/xf86xvpriv.h
index 7eb46e51f..289ca5843 100644
--- a/xorg-server/hw/xfree86/common/xf86xvpriv.h
+++ b/xorg-server/hw/xfree86/common/xf86xvpriv.h
@@ -1,88 +1,88 @@
-
-/*
- * Copyright (c) 2003 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-#ifndef _XF86XVPRIV_H_
-#define _XF86XVPRIV_H_
-
-#include "xf86xv.h"
-#include "privates.h"
-
-/*** These are DDX layer privates ***/
-
-extern _X_EXPORT DevPrivateKey XF86XvScreenKey;
-
-typedef struct {
- DestroyWindowProcPtr DestroyWindow;
- ClipNotifyProcPtr ClipNotify;
- WindowExposuresProcPtr WindowExposures;
- PostValidateTreeProcPtr PostValidateTree;
- void (*AdjustFrame)(int, int, int, int);
- Bool (*EnterVT)(int, int);
- void (*LeaveVT)(int, int);
- xf86ModeSetProc *ModeSet;
-} XF86XVScreenRec, *XF86XVScreenPtr;
-
-typedef struct {
- int flags;
- PutVideoFuncPtr PutVideo;
- PutStillFuncPtr PutStill;
- GetVideoFuncPtr GetVideo;
- GetStillFuncPtr GetStill;
- StopVideoFuncPtr StopVideo;
- SetPortAttributeFuncPtr SetPortAttribute;
- GetPortAttributeFuncPtr GetPortAttribute;
- QueryBestSizeFuncPtr QueryBestSize;
- PutImageFuncPtr PutImage;
- ReputImageFuncPtr ReputImage;
- QueryImageAttributesFuncPtr QueryImageAttributes;
- ClipNotifyFuncPtr ClipNotify;
-} XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr;
-
-typedef struct {
- ScrnInfoPtr pScrn;
- DrawablePtr pDraw;
- unsigned char type;
- unsigned int subWindowMode;
- RegionPtr clientClip;
- RegionPtr ckeyFilled;
- RegionPtr pCompositeClip;
- Bool FreeCompositeClip;
- XvAdaptorRecPrivatePtr AdaptorRec;
- XvStatus isOn;
- Bool clipChanged;
- int vid_x, vid_y, vid_w, vid_h;
- int drw_x, drw_y, drw_w, drw_h;
- DevUnion DevPriv;
-} XvPortRecPrivate, *XvPortRecPrivatePtr;
-
-typedef struct _XF86XVWindowRec{
- XvPortRecPrivatePtr PortRec;
- struct _XF86XVWindowRec *next;
-} XF86XVWindowRec, *XF86XVWindowPtr;
-
-#endif /* _XF86XVPRIV_H_ */
+
+/*
+ * Copyright (c) 2003 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifndef _XF86XVPRIV_H_
+#define _XF86XVPRIV_H_
+
+#include "xf86xv.h"
+#include "privates.h"
+
+/*** These are DDX layer privates ***/
+
+extern _X_EXPORT DevPrivateKey XF86XvScreenKey;
+
+typedef struct {
+ DestroyWindowProcPtr DestroyWindow;
+ ClipNotifyProcPtr ClipNotify;
+ WindowExposuresProcPtr WindowExposures;
+ PostValidateTreeProcPtr PostValidateTree;
+ void (*AdjustFrame) (int, int, int, int);
+ Bool (*EnterVT) (int, int);
+ void (*LeaveVT) (int, int);
+ xf86ModeSetProc *ModeSet;
+} XF86XVScreenRec, *XF86XVScreenPtr;
+
+typedef struct {
+ int flags;
+ PutVideoFuncPtr PutVideo;
+ PutStillFuncPtr PutStill;
+ GetVideoFuncPtr GetVideo;
+ GetStillFuncPtr GetStill;
+ StopVideoFuncPtr StopVideo;
+ SetPortAttributeFuncPtr SetPortAttribute;
+ GetPortAttributeFuncPtr GetPortAttribute;
+ QueryBestSizeFuncPtr QueryBestSize;
+ PutImageFuncPtr PutImage;
+ ReputImageFuncPtr ReputImage;
+ QueryImageAttributesFuncPtr QueryImageAttributes;
+ ClipNotifyFuncPtr ClipNotify;
+} XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr;
+
+typedef struct {
+ ScrnInfoPtr pScrn;
+ DrawablePtr pDraw;
+ unsigned char type;
+ unsigned int subWindowMode;
+ RegionPtr clientClip;
+ RegionPtr ckeyFilled;
+ RegionPtr pCompositeClip;
+ Bool FreeCompositeClip;
+ XvAdaptorRecPrivatePtr AdaptorRec;
+ XvStatus isOn;
+ Bool clipChanged;
+ int vid_x, vid_y, vid_w, vid_h;
+ int drw_x, drw_y, drw_w, drw_h;
+ DevUnion DevPriv;
+} XvPortRecPrivate, *XvPortRecPrivatePtr;
+
+typedef struct _XF86XVWindowRec {
+ XvPortRecPrivatePtr PortRec;
+ struct _XF86XVWindowRec *next;
+} XF86XVWindowRec, *XF86XVWindowPtr;
+
+#endif /* _XF86XVPRIV_H_ */
diff --git a/xorg-server/hw/xfree86/common/xorgHelper.c b/xorg-server/hw/xfree86/common/xorgHelper.c
index 7a8e5167d..174ca6bb7 100644
--- a/xorg-server/hw/xfree86/common/xorgHelper.c
+++ b/xorg-server/hw/xfree86/common/xorgHelper.c
@@ -15,7 +15,6 @@
#include "xf86Priv.h"
#include "xorgVersion.h"
-
CARD32
xorgGetVersion(void)
{
diff --git a/xorg-server/hw/xfree86/common/xorgVersion.h b/xorg-server/hw/xfree86/common/xorgVersion.h
index f627e87a5..e34ddecdf 100644
--- a/xorg-server/hw/xfree86/common/xorgVersion.h
+++ b/xorg-server/hw/xfree86/common/xorgVersion.h
@@ -27,23 +27,23 @@
*/
#ifndef XORG_VERSION_H
-# define XORG_VERSION_H
+#define XORG_VERSION_H
-# ifndef XORG_VERSION_CURRENT
-# error
-# endif
+#ifndef XORG_VERSION_CURRENT
+#error
+#endif
-# define XORG_VERSION_NUMERIC(major,minor,patch,snap,dummy) \
+#define XORG_VERSION_NUMERIC(major,minor,patch,snap,dummy) \
(((major) * 10000000) + ((minor) * 100000) + ((patch) * 1000) + snap)
-# define XORG_GET_MAJOR_VERSION(vers) ((vers) / 10000000)
-# define XORG_GET_MINOR_VERSION(vers) (((vers) % 10000000) / 100000)
-# define XORG_GET_PATCH_VERSION(vers) (((vers) % 100000) / 1000)
-# define XORG_GET_SNAP_VERSION(vers) ((vers) % 1000)
+#define XORG_GET_MAJOR_VERSION(vers) ((vers) / 10000000)
+#define XORG_GET_MINOR_VERSION(vers) (((vers) % 10000000) / 100000)
+#define XORG_GET_PATCH_VERSION(vers) (((vers) % 100000) / 1000)
+#define XORG_GET_SNAP_VERSION(vers) ((vers) % 1000)
-# define XORG_VERSION_MAJOR XORG_GET_MAJOR_VERSION(XORG_VERSION_CURRENT)
-# define XORG_VERSION_MINOR XORG_GET_MINOR_VERSION(XORG_VERSION_CURRENT)
-# define XORG_VERSION_PATCH XORG_GET_PATCH_VERSION(XORG_VERSION_CURRENT)
-# define XORG_VERSION_SNAP XORG_GET_SNAP_VERSION(XORG_VERSION_CURRENT)
+#define XORG_VERSION_MAJOR XORG_GET_MAJOR_VERSION(XORG_VERSION_CURRENT)
+#define XORG_VERSION_MINOR XORG_GET_MINOR_VERSION(XORG_VERSION_CURRENT)
+#define XORG_VERSION_PATCH XORG_GET_PATCH_VERSION(XORG_VERSION_CURRENT)
+#define XORG_VERSION_SNAP XORG_GET_SNAP_VERSION(XORG_VERSION_CURRENT)
#endif
diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c b/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c
index 955104679..97616c705 100644
--- a/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c
+++ b/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c
@@ -20,4 +20,3 @@ XvRegister(void)
XvGetRTPortProc = XvGetRTPort;
XvMCScreenInitProc = XvMCScreenInit;
}
-
diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h b/xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h
index b39c915b4..be51e559d 100644
--- a/xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h
+++ b/xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h
@@ -5,9 +5,9 @@
#include "xvmcext.h"
-extern DevPrivateKey (*XvGetScreenKeyProc)(void);
-extern unsigned long (*XvGetRTPortProc)(void);
-extern int (*XvScreenInitProc)(ScreenPtr);
-extern int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr);
+extern DevPrivateKey (*XvGetScreenKeyProc) (void);
+extern unsigned long (*XvGetRTPortProc) (void);
+extern int (*XvScreenInitProc) (ScreenPtr);
+extern int (*XvMCScreenInitProc) (ScreenPtr, int, XvMCAdaptorPtr);
extern void XvRegister(void);
diff --git a/xorg-server/hw/xfree86/dixmods/recordmod.c b/xorg-server/hw/xfree86/dixmods/recordmod.c
index 63d340e75..b75cc3fdb 100644
--- a/xorg-server/hw/xfree86/dixmods/recordmod.c
+++ b/xorg-server/hw/xfree86/dixmods/recordmod.c
@@ -19,16 +19,16 @@ static ExtensionModule recordExt = {
};
static XF86ModuleVersionInfo VersRec = {
- "record",
- MODULEVENDORSTRING,
- MODINFOSTRING1,
- MODINFOSTRING2,
- XORG_VERSION_CURRENT,
- 1, 13, 0,
- ABI_CLASS_EXTENSION,
- ABI_EXTENSION_VERSION,
- MOD_CLASS_EXTENSION,
- {0,0,0,0}
+ "record",
+ MODULEVENDORSTRING,
+ MODINFOSTRING1,
+ MODINFOSTRING2,
+ XORG_VERSION_CURRENT,
+ 1, 13, 0,
+ ABI_CLASS_EXTENSION,
+ ABI_EXTENSION_VERSION,
+ MOD_CLASS_EXTENSION,
+ {0, 0, 0, 0}
};
_X_EXPORT XF86ModuleData recordModuleData = { &VersRec, recordSetup, NULL };
@@ -39,6 +39,5 @@ recordSetup(pointer module, pointer opts, int *errmaj, int *errmin)
LoadExtension(&recordExt, FALSE);
/* Need a non-NULL return value to indicate success */
- return (pointer)1;
+ return (pointer) 1;
}
-
diff --git a/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c b/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c
index 0f4e25c0c..6dd21dd51 100644
--- a/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c
+++ b/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c
@@ -45,7 +45,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "xf86.h"
int
-XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act)
+XkbDDXTerminateServer(DeviceIntPtr dev, KeyCode key, XkbAction *act)
{
if (dev != inputInfo.keyboard)
xf86ProcessActionEvent(ACTION_TERMINATE, NULL);
diff --git a/xorg-server/hw/xfree86/dixmods/xkbPrivate.c b/xorg-server/hw/xfree86/dixmods/xkbPrivate.c
index 06d1c2b3d..574590f28 100644
--- a/xorg-server/hw/xfree86/dixmods/xkbPrivate.c
+++ b/xorg-server/hw/xfree86/dixmods/xkbPrivate.c
@@ -18,31 +18,32 @@
#include "xf86.h"
int
-XkbDDXPrivate(DeviceIntPtr dev,KeyCode key,XkbAction *act)
+XkbDDXPrivate(DeviceIntPtr dev, KeyCode key, XkbAction *act)
{
XkbAnyAction *xf86act = &(act->any);
- char msgbuf[XkbAnyActionDataSize+1];
+ char msgbuf[XkbAnyActionDataSize + 1];
if (xf86act->type == XkbSA_XFree86Private) {
memcpy(msgbuf, xf86act->data, XkbAnyActionDataSize);
- msgbuf[XkbAnyActionDataSize]= '\0';
- if (strcasecmp(msgbuf, "-vmode")==0)
+ msgbuf[XkbAnyActionDataSize] = '\0';
+ if (strcasecmp(msgbuf, "-vmode") == 0)
xf86ProcessActionEvent(ACTION_PREV_MODE, NULL);
- else if (strcasecmp(msgbuf, "+vmode")==0)
+ else if (strcasecmp(msgbuf, "+vmode") == 0)
xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL);
- else if (strcasecmp(msgbuf, "prgrbs")==0) {
+ else if (strcasecmp(msgbuf, "prgrbs") == 0) {
DeviceIntPtr tmp;
+
xf86Msg(X_INFO, "Printing all currently active device grabs:\n");
for (tmp = inputInfo.devices; tmp; tmp = tmp->next)
if (tmp->deviceGrab.grab)
PrintDeviceGrabInfo(tmp);
xf86Msg(X_INFO, "End list of active device grabs\n");
}
- else if (strcasecmp(msgbuf, "ungrab")==0)
+ else if (strcasecmp(msgbuf, "ungrab") == 0)
UngrabAllDevices(FALSE);
- else if (strcasecmp(msgbuf, "clsgrb")==0)
+ else if (strcasecmp(msgbuf, "clsgrb") == 0)
UngrabAllDevices(TRUE);
- else if (strcasecmp(msgbuf, "prwins")==0)
+ else if (strcasecmp(msgbuf, "prwins") == 0)
PrintWindowTree();
}
diff --git a/xorg-server/hw/xfree86/dixmods/xkbVT.c b/xorg-server/hw/xfree86/dixmods/xkbVT.c
index 13bd6f41e..4ca4451d0 100644
--- a/xorg-server/hw/xfree86/dixmods/xkbVT.c
+++ b/xorg-server/hw/xfree86/dixmods/xkbVT.c
@@ -45,18 +45,18 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "xf86.h"
int
-XkbDDXSwitchScreen(DeviceIntPtr dev,KeyCode key,XkbAction *act)
+XkbDDXSwitchScreen(DeviceIntPtr dev, KeyCode key, XkbAction *act)
{
int scrnnum = XkbSAScreen(&act->screen);
if (act->screen.flags & XkbSA_SwitchApplication) {
if (act->screen.flags & XkbSA_SwitchAbsolute)
- xf86ProcessActionEvent(ACTION_SWITCHSCREEN,(void *) &scrnnum);
+ xf86ProcessActionEvent(ACTION_SWITCHSCREEN, (void *) &scrnnum);
else {
if (scrnnum < 0)
- xf86ProcessActionEvent(ACTION_SWITCHSCREEN_PREV,NULL);
+ xf86ProcessActionEvent(ACTION_SWITCHSCREEN_PREV, NULL);
else
- xf86ProcessActionEvent(ACTION_SWITCHSCREEN_NEXT,NULL);
+ xf86ProcessActionEvent(ACTION_SWITCHSCREEN_NEXT, NULL);
}
}
diff --git a/xorg-server/hw/xfree86/dri/sarea.h b/xorg-server/hw/xfree86/dri/sarea.h
index 1528cc191..7a55b49d6 100644
--- a/xorg-server/hw/xfree86/dri/sarea.h
+++ b/xorg-server/hw/xfree86/dri/sarea.h
@@ -33,7 +33,6 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-
#ifndef _SAREA_H_
#define _SAREA_H_
@@ -43,7 +42,7 @@
#if defined(__alpha__)
#define SAREA_MAX 0x2000
#elif defined(__ia64__)
-#define SAREA_MAX 0x10000 /* 64kB */
+#define SAREA_MAX 0x10000 /* 64kB */
#else
/* Intel 830M driver needs at least 8k SAREA */
#define SAREA_MAX 0x2000
@@ -59,8 +58,8 @@
* \sa _XF86DRISAREA.
*/
typedef struct _XF86DRISAREADrawable {
- unsigned int stamp;
- unsigned int flags;
+ unsigned int stamp;
+ unsigned int flags;
} XF86DRISAREADrawableRec, *XF86DRISAREADrawablePtr;
/**
@@ -69,11 +68,11 @@ typedef struct _XF86DRISAREADrawable {
* \sa _XF86DRISAREA.
*/
typedef struct _XF86DRISAREAFrame {
- unsigned int x;
- unsigned int y;
- unsigned int width;
- unsigned int height;
- unsigned int fullscreen;
+ unsigned int x;
+ unsigned int y;
+ unsigned int width;
+ unsigned int height;
+ unsigned int fullscreen;
} XF86DRISAREAFrameRec, *XF86DRISAREAFramePtr;
/**
@@ -81,17 +80,17 @@ typedef struct _XF86DRISAREAFrame {
*/
typedef struct _XF86DRISAREA {
/** first thing is always the DRM locking structure */
- drmLock lock;
+ drmLock lock;
/** \todo Use readers/writer lock for drawable_lock */
- drmLock drawable_lock;
- XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES];
- XF86DRISAREAFrameRec frame;
- drm_context_t dummy_context;
+ drmLock drawable_lock;
+ XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES];
+ XF86DRISAREAFrameRec frame;
+ drm_context_t dummy_context;
} XF86DRISAREARec, *XF86DRISAREAPtr;
-typedef struct _XF86DRILSAREA {
- drmLock lock;
- drmLock otherLocks[31];
+typedef struct _XF86DRILSAREA {
+ drmLock lock;
+ drmLock otherLocks[31];
} XF86DRILSAREARec, *XF86DRILSAREAPtr;
#endif
diff --git a/xorg-server/hw/xfree86/fbdevhw/fbpriv.h b/xorg-server/hw/xfree86/fbdevhw/fbpriv.h
index 4c08ec15d..340a4428c 100644
--- a/xorg-server/hw/xfree86/fbdevhw/fbpriv.h
+++ b/xorg-server/hw/xfree86/fbdevhw/fbpriv.h
@@ -16,8 +16,8 @@
#define FB_MAJOR 29
-#define FB_MODES_SHIFT 5 /* 32 modes per framebuffer */
-#define FB_NUM_MINORS 256 /* 256 Minors */
+#define FB_MODES_SHIFT 5 /* 32 modes per framebuffer */
+#define FB_NUM_MINORS 256 /* 256 Minors */
#define FB_MAX (FB_NUM_MINORS / (1 << FB_MODES_SHIFT))
#define GET_FB_IDX(node) (MINOR(node) >> FB_MODES_SHIFT)
@@ -37,75 +37,75 @@
#define FBIOPUT_CON2FBMAP 0x4610
#define FBIOBLANK 0x4611
-#define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */
-#define FB_TYPE_PLANES 1 /* Non interleaved planes */
-#define FB_TYPE_INTERLEAVED_PLANES 2 /* Interleaved planes */
-#define FB_TYPE_TEXT 3 /* Text/attributes */
-
-#define FB_AUX_TEXT_MDA 0 /* Monochrome text */
-#define FB_AUX_TEXT_CGA 1 /* CGA/EGA/VGA Color text */
-#define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */
-#define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */
-#define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */
-
-#define FB_VISUAL_MONO01 0 /* Monochr. 1=Black 0=White */
-#define FB_VISUAL_MONO10 1 /* Monochr. 1=White 0=Black */
-#define FB_VISUAL_TRUECOLOR 2 /* True color */
-#define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */
-#define FB_VISUAL_DIRECTCOLOR 4 /* Direct color */
-#define FB_VISUAL_STATIC_PSEUDOCOLOR 5 /* Pseudo color readonly */
-
-#define FB_ACCEL_NONE 0 /* no hardware accelerator */
-#define FB_ACCEL_ATARIBLITT 1 /* Atari Blitter */
-#define FB_ACCEL_AMIGABLITT 2 /* Amiga Blitter */
-#define FB_ACCEL_S3_TRIO64 3 /* Cybervision64 (S3 Trio64) */
-#define FB_ACCEL_NCR_77C32BLT 4 /* RetinaZ3 (NCR 77C32BLT) */
-#define FB_ACCEL_S3_VIRGE 5 /* Cybervision64/3D (S3 ViRGE) */
-#define FB_ACCEL_ATI_MACH64GX 6 /* ATI Mach 64GX family */
-#define FB_ACCEL_DEC_TGA 7 /* DEC 21030 TGA */
-#define FB_ACCEL_ATI_MACH64CT 8 /* ATI Mach 64CT family */
-#define FB_ACCEL_ATI_MACH64VT 9 /* ATI Mach 64CT family VT class */
-#define FB_ACCEL_ATI_MACH64GT 10 /* ATI Mach 64CT family GT class */
-#define FB_ACCEL_SUN_CREATOR 11 /* Sun Creator/Creator3D */
-#define FB_ACCEL_SUN_CGSIX 12 /* Sun cg6 */
-#define FB_ACCEL_SUN_LEO 13 /* Sun leo/zx */
-#define FB_ACCEL_IMS_TWINTURBO 14 /* IMS Twin Turbo */
-#define FB_ACCEL_3DLABS_PERMEDIA2 15 /* 3Dlabs Permedia 2 */
-#define FB_ACCEL_MATROX_MGA2064W 16 /* Matrox MGA2064W (Millenium) */
-#define FB_ACCEL_MATROX_MGA1064SG 17 /* Matrox MGA1064SG (Mystique) */
-#define FB_ACCEL_MATROX_MGA2164W 18 /* Matrox MGA2164W (Millenium II) */
-#define FB_ACCEL_MATROX_MGA2164W_AGP 19 /* Matrox MGA2164W (Millenium II) */
-#define FB_ACCEL_MATROX_MGAG100 20 /* Matrox G100 (Productiva G100) */
-#define FB_ACCEL_MATROX_MGAG200 21 /* Matrox G200 (Myst, Mill, ...) */
-#define FB_ACCEL_SUN_CG14 22 /* Sun cgfourteen */
-#define FB_ACCEL_SUN_BWTWO 23 /* Sun bwtwo */
-#define FB_ACCEL_SUN_CGTHREE 24 /* Sun cgthree */
-#define FB_ACCEL_SUN_TCX 25 /* Sun tcx */
-#define FB_ACCEL_MATROX_MGAG400 26 /* Matrox G400 */
-#define FB_ACCEL_NV3 27 /* nVidia RIVA 128 */
-#define FB_ACCEL_NV4 28 /* nVidia RIVA TNT */
-#define FB_ACCEL_NV5 29 /* nVidia RIVA TNT2 */
-#define FB_ACCEL_CT_6555x 30 /* C&T 6555x */
-#define FB_ACCEL_3DFX_BANSHEE 31 /* 3Dfx Banshee */
-#define FB_ACCEL_ATI_RAGE128 32 /* ATI Rage128 family */
+#define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */
+#define FB_TYPE_PLANES 1 /* Non interleaved planes */
+#define FB_TYPE_INTERLEAVED_PLANES 2 /* Interleaved planes */
+#define FB_TYPE_TEXT 3 /* Text/attributes */
+
+#define FB_AUX_TEXT_MDA 0 /* Monochrome text */
+#define FB_AUX_TEXT_CGA 1 /* CGA/EGA/VGA Color text */
+#define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */
+#define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */
+#define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */
+
+#define FB_VISUAL_MONO01 0 /* Monochr. 1=Black 0=White */
+#define FB_VISUAL_MONO10 1 /* Monochr. 1=White 0=Black */
+#define FB_VISUAL_TRUECOLOR 2 /* True color */
+#define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */
+#define FB_VISUAL_DIRECTCOLOR 4 /* Direct color */
+#define FB_VISUAL_STATIC_PSEUDOCOLOR 5 /* Pseudo color readonly */
+
+#define FB_ACCEL_NONE 0 /* no hardware accelerator */
+#define FB_ACCEL_ATARIBLITT 1 /* Atari Blitter */
+#define FB_ACCEL_AMIGABLITT 2 /* Amiga Blitter */
+#define FB_ACCEL_S3_TRIO64 3 /* Cybervision64 (S3 Trio64) */
+#define FB_ACCEL_NCR_77C32BLT 4 /* RetinaZ3 (NCR 77C32BLT) */
+#define FB_ACCEL_S3_VIRGE 5 /* Cybervision64/3D (S3 ViRGE) */
+#define FB_ACCEL_ATI_MACH64GX 6 /* ATI Mach 64GX family */
+#define FB_ACCEL_DEC_TGA 7 /* DEC 21030 TGA */
+#define FB_ACCEL_ATI_MACH64CT 8 /* ATI Mach 64CT family */
+#define FB_ACCEL_ATI_MACH64VT 9 /* ATI Mach 64CT family VT class */
+#define FB_ACCEL_ATI_MACH64GT 10 /* ATI Mach 64CT family GT class */
+#define FB_ACCEL_SUN_CREATOR 11 /* Sun Creator/Creator3D */
+#define FB_ACCEL_SUN_CGSIX 12 /* Sun cg6 */
+#define FB_ACCEL_SUN_LEO 13 /* Sun leo/zx */
+#define FB_ACCEL_IMS_TWINTURBO 14 /* IMS Twin Turbo */
+#define FB_ACCEL_3DLABS_PERMEDIA2 15 /* 3Dlabs Permedia 2 */
+#define FB_ACCEL_MATROX_MGA2064W 16 /* Matrox MGA2064W (Millenium) */
+#define FB_ACCEL_MATROX_MGA1064SG 17 /* Matrox MGA1064SG (Mystique) */
+#define FB_ACCEL_MATROX_MGA2164W 18 /* Matrox MGA2164W (Millenium II) */
+#define FB_ACCEL_MATROX_MGA2164W_AGP 19 /* Matrox MGA2164W (Millenium II) */
+#define FB_ACCEL_MATROX_MGAG100 20 /* Matrox G100 (Productiva G100) */
+#define FB_ACCEL_MATROX_MGAG200 21 /* Matrox G200 (Myst, Mill, ...) */
+#define FB_ACCEL_SUN_CG14 22 /* Sun cgfourteen */
+#define FB_ACCEL_SUN_BWTWO 23 /* Sun bwtwo */
+#define FB_ACCEL_SUN_CGTHREE 24 /* Sun cgthree */
+#define FB_ACCEL_SUN_TCX 25 /* Sun tcx */
+#define FB_ACCEL_MATROX_MGAG400 26 /* Matrox G400 */
+#define FB_ACCEL_NV3 27 /* nVidia RIVA 128 */
+#define FB_ACCEL_NV4 28 /* nVidia RIVA TNT */
+#define FB_ACCEL_NV5 29 /* nVidia RIVA TNT2 */
+#define FB_ACCEL_CT_6555x 30 /* C&T 6555x */
+#define FB_ACCEL_3DFX_BANSHEE 31 /* 3Dfx Banshee */
+#define FB_ACCEL_ATI_RAGE128 32 /* ATI Rage128 family */
struct fb_fix_screeninfo {
- char id[16]; /* identification string eg "TT Builtin" */
- char *smem_start; /* Start of frame buffer mem */
- /* (physical address) */
- __u32 smem_len; /* Length of frame buffer mem */
- __u32 type; /* see FB_TYPE_* */
- __u32 type_aux; /* Interleave for interleaved Planes */
- __u32 visual; /* see FB_VISUAL_* */
- __u16 xpanstep; /* zero if no hardware panning */
- __u16 ypanstep; /* zero if no hardware panning */
- __u16 ywrapstep; /* zero if no hardware ywrap */
- __u32 line_length; /* length of a line in bytes */
- char *mmio_start; /* Start of Memory Mapped I/O */
- /* (physical address) */
- __u32 mmio_len; /* Length of Memory Mapped I/O */
- __u32 accel; /* Type of acceleration available */
- __u16 reserved[3]; /* Reserved for future compatibility */
+ char id[16]; /* identification string eg "TT Builtin" */
+ char *smem_start; /* Start of frame buffer mem */
+ /* (physical address) */
+ __u32 smem_len; /* Length of frame buffer mem */
+ __u32 type; /* see FB_TYPE_* */
+ __u32 type_aux; /* Interleave for interleaved Planes */
+ __u32 visual; /* see FB_VISUAL_* */
+ __u16 xpanstep; /* zero if no hardware panning */
+ __u16 ypanstep; /* zero if no hardware panning */
+ __u16 ywrapstep; /* zero if no hardware ywrap */
+ __u32 line_length; /* length of a line in bytes */
+ char *mmio_start; /* Start of Memory Mapped I/O */
+ /* (physical address) */
+ __u32 mmio_len; /* Length of Memory Mapped I/O */
+ __u32 accel; /* Type of acceleration available */
+ __u16 reserved[3]; /* Reserved for future compatibility */
};
/* Interpretation of offset for color fields: All offsets are from the right,
@@ -115,101 +115,101 @@ struct fb_fix_screeninfo {
* big-endian byte order if bits_per_pixel is greater than 8.
*/
struct fb_bitfield {
- __u32 offset; /* beginning of bitfield */
- __u32 length; /* length of bitfield */
- __u32 msb_right; /* != 0 : Most significant bit is */
- /* right */
+ __u32 offset; /* beginning of bitfield */
+ __u32 length; /* length of bitfield */
+ __u32 msb_right; /* != 0 : Most significant bit is */
+ /* right */
};
-#define FB_NONSTD_HAM 1 /* Hold-And-Modify (HAM) */
+#define FB_NONSTD_HAM 1 /* Hold-And-Modify (HAM) */
-#define FB_ACTIVATE_NOW 0 /* set values immediately (or vbl)*/
-#define FB_ACTIVATE_NXTOPEN 1 /* activate on next open */
-#define FB_ACTIVATE_TEST 2 /* don't set, round up impossible */
+#define FB_ACTIVATE_NOW 0 /* set values immediately (or vbl) */
+#define FB_ACTIVATE_NXTOPEN 1 /* activate on next open */
+#define FB_ACTIVATE_TEST 2 /* don't set, round up impossible */
#define FB_ACTIVATE_MASK 15
- /* values */
-#define FB_ACTIVATE_VBL 16 /* activate values on next vbl */
-#define FB_CHANGE_CMAP_VBL 32 /* change colormap on vbl */
-#define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */
-
-#define FB_ACCELF_TEXT 1 /* text mode acceleration */
-
-#define FB_SYNC_HOR_HIGH_ACT 1 /* horizontal sync high active */
-#define FB_SYNC_VERT_HIGH_ACT 2 /* vertical sync high active */
-#define FB_SYNC_EXT 4 /* external sync */
-#define FB_SYNC_COMP_HIGH_ACT 8 /* composite sync high active */
-#define FB_SYNC_BROADCAST 16 /* broadcast video timings */
- /* vtotal = 144d/288n/576i => PAL */
- /* vtotal = 121d/242n/484i => NTSC */
-#define FB_SYNC_ON_GREEN 32 /* sync on green */
-
-#define FB_VMODE_NONINTERLACED 0 /* non interlaced */
-#define FB_VMODE_INTERLACED 1 /* interlaced */
-#define FB_VMODE_DOUBLE 2 /* double scan */
+ /* values */
+#define FB_ACTIVATE_VBL 16 /* activate values on next vbl */
+#define FB_CHANGE_CMAP_VBL 32 /* change colormap on vbl */
+#define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */
+
+#define FB_ACCELF_TEXT 1 /* text mode acceleration */
+
+#define FB_SYNC_HOR_HIGH_ACT 1 /* horizontal sync high active */
+#define FB_SYNC_VERT_HIGH_ACT 2 /* vertical sync high active */
+#define FB_SYNC_EXT 4 /* external sync */
+#define FB_SYNC_COMP_HIGH_ACT 8 /* composite sync high active */
+#define FB_SYNC_BROADCAST 16 /* broadcast video timings */
+ /* vtotal = 144d/288n/576i => PAL */
+ /* vtotal = 121d/242n/484i => NTSC */
+#define FB_SYNC_ON_GREEN 32 /* sync on green */
+
+#define FB_VMODE_NONINTERLACED 0 /* non interlaced */
+#define FB_VMODE_INTERLACED 1 /* interlaced */
+#define FB_VMODE_DOUBLE 2 /* double scan */
#define FB_VMODE_MASK 255
-#define FB_VMODE_YWRAP 256 /* ywrap instead of panning */
-#define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */
-#define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */
+#define FB_VMODE_YWRAP 256 /* ywrap instead of panning */
+#define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */
+#define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */
struct fb_var_screeninfo {
- __u32 xres; /* visible resolution */
- __u32 yres;
- __u32 xres_virtual; /* virtual resolution */
- __u32 yres_virtual;
- __u32 xoffset; /* offset from virtual to visible */
- __u32 yoffset; /* resolution */
-
- __u32 bits_per_pixel; /* guess what */
- __u32 grayscale; /* != 0 Graylevels instead of colors */
-
- struct fb_bitfield red; /* bitfield in fb mem if true color, */
- struct fb_bitfield green; /* else only length is significant */
- struct fb_bitfield blue;
- struct fb_bitfield transp; /* transparency */
-
- __u32 nonstd; /* != 0 Non standard pixel format */
-
- __u32 activate; /* see FB_ACTIVATE_* */
-
- __u32 height; /* height of picture in mm */
- __u32 width; /* width of picture in mm */
-
- __u32 accel_flags; /* acceleration flags (hints) */
-
- /* Timing: All values in pixclocks, except pixclock (of course) */
- __u32 pixclock; /* pixel clock in ps (pico seconds) */
- __u32 left_margin; /* time from sync to picture */
- __u32 right_margin; /* time from picture to sync */
- __u32 upper_margin; /* time from sync to picture */
- __u32 lower_margin;
- __u32 hsync_len; /* length of horizontal sync */
- __u32 vsync_len; /* length of vertical sync */
- __u32 sync; /* see FB_SYNC_* */
- __u32 vmode; /* see FB_VMODE_* */
- __u32 reserved[6]; /* Reserved for future compatibility */
+ __u32 xres; /* visible resolution */
+ __u32 yres;
+ __u32 xres_virtual; /* virtual resolution */
+ __u32 yres_virtual;
+ __u32 xoffset; /* offset from virtual to visible */
+ __u32 yoffset; /* resolution */
+
+ __u32 bits_per_pixel; /* guess what */
+ __u32 grayscale; /* != 0 Graylevels instead of colors */
+
+ struct fb_bitfield red; /* bitfield in fb mem if true color, */
+ struct fb_bitfield green; /* else only length is significant */
+ struct fb_bitfield blue;
+ struct fb_bitfield transp; /* transparency */
+
+ __u32 nonstd; /* != 0 Non standard pixel format */
+
+ __u32 activate; /* see FB_ACTIVATE_* */
+
+ __u32 height; /* height of picture in mm */
+ __u32 width; /* width of picture in mm */
+
+ __u32 accel_flags; /* acceleration flags (hints) */
+
+ /* Timing: All values in pixclocks, except pixclock (of course) */
+ __u32 pixclock; /* pixel clock in ps (pico seconds) */
+ __u32 left_margin; /* time from sync to picture */
+ __u32 right_margin; /* time from picture to sync */
+ __u32 upper_margin; /* time from sync to picture */
+ __u32 lower_margin;
+ __u32 hsync_len; /* length of horizontal sync */
+ __u32 vsync_len; /* length of vertical sync */
+ __u32 sync; /* see FB_SYNC_* */
+ __u32 vmode; /* see FB_VMODE_* */
+ __u32 reserved[6]; /* Reserved for future compatibility */
};
struct fb_cmap {
- __u32 start; /* First entry */
- __u32 len; /* Number of entries */
- __u16 *red; /* Red values */
- __u16 *green;
- __u16 *blue;
- __u16 *transp; /* transparency, can be NULL */
+ __u32 start; /* First entry */
+ __u32 len; /* Number of entries */
+ __u16 *red; /* Red values */
+ __u16 *green;
+ __u16 *blue;
+ __u16 *transp; /* transparency, can be NULL */
};
struct fb_con2fbmap {
- __u32 console;
- __u32 framebuffer;
+ __u32 console;
+ __u32 framebuffer;
};
struct fb_monspecs {
- __u32 hfmin; /* hfreq lower limit (Hz) */
- __u32 hfmax; /* hfreq upper limit (Hz) */
- __u16 vfmin; /* vfreq lower limit (Hz) */
- __u16 vfmax; /* vfreq upper limit (Hz) */
- unsigned dpms : 1; /* supports DPMS */
+ __u32 hfmin; /* hfreq lower limit (Hz) */
+ __u32 hfmax; /* hfreq upper limit (Hz) */
+ __u16 vfmin; /* vfreq lower limit (Hz) */
+ __u16 vfmax; /* vfreq upper limit (Hz) */
+ unsigned dpms:1; /* supports DPMS */
};
#if 1
@@ -219,8 +219,7 @@ struct fb_monspecs {
#endif
-
-#if 1 /* Preliminary */
+#if 1 /* Preliminary */
/*
* Hardware Cursor
@@ -232,34 +231,33 @@ struct fb_monspecs {
#define FBIOGET_CURSORSTATE 0x460A
#define FBIOPUT_CURSORSTATE 0x460B
-
struct fb_fix_cursorinfo {
- __u16 crsr_width; /* width and height of the cursor in */
- __u16 crsr_height; /* pixels (zero if no cursor) */
- __u16 crsr_xsize; /* cursor size in display pixels */
- __u16 crsr_ysize;
- __u16 crsr_color1; /* colormap entry for cursor color1 */
- __u16 crsr_color2; /* colormap entry for cursor color2 */
+ __u16 crsr_width; /* width and height of the cursor in */
+ __u16 crsr_height; /* pixels (zero if no cursor) */
+ __u16 crsr_xsize; /* cursor size in display pixels */
+ __u16 crsr_ysize;
+ __u16 crsr_color1; /* colormap entry for cursor color1 */
+ __u16 crsr_color2; /* colormap entry for cursor color2 */
};
struct fb_var_cursorinfo {
- __u16 width;
- __u16 height;
- __u16 xspot;
- __u16 yspot;
- __u8 data[1]; /* field with [height][width] */
+ __u16 width;
+ __u16 height;
+ __u16 xspot;
+ __u16 yspot;
+ __u8 data[1]; /* field with [height][width] */
};
struct fb_cursorstate {
- __s16 xoffset;
- __s16 yoffset;
- __u16 mode;
+ __s16 xoffset;
+ __s16 yoffset;
+ __u16 mode;
};
#define FB_CURSOR_OFF 0
#define FB_CURSOR_ON 1
#define FB_CURSOR_FLASH 2
-#endif /* Preliminary */
+#endif /* Preliminary */
-#endif /* _LINUX_FB_H */
+#endif /* _LINUX_FB_H */
diff --git a/xorg-server/hw/xfree86/i2c/bt829.h b/xorg-server/hw/xfree86/i2c/bt829.h
index 06e488f04..2709bee50 100644
--- a/xorg-server/hw/xfree86/i2c/bt829.h
+++ b/xorg-server/hw/xfree86/i2c/bt829.h
@@ -4,36 +4,36 @@
#include "xf86i2c.h"
typedef struct {
- int tunertype; /* Must be set before init */
- /* Private variables */
- I2CDevRec d;
-
- CARD8 brightness;
- CARD8 ccmode;
- CARD8 code;
- CARD16 contrast;
- CARD8 format;
- int height;
- CARD8 hue;
- CARD8 len;
- CARD8 mux;
- CARD8 out_en;
- CARD8 p_io;
- CARD16 sat_u;
- CARD16 sat_v;
- CARD8 vbien;
- CARD8 vbifmt;
- int width;
-
- CARD16 hdelay;
- CARD16 hscale;
- CARD16 vactive;
- CARD16 vdelay;
- CARD16 vscale;
-
- CARD16 htotal;
- CARD8 id;
- CARD8 svideo_mux;
+ int tunertype; /* Must be set before init */
+ /* Private variables */
+ I2CDevRec d;
+
+ CARD8 brightness;
+ CARD8 ccmode;
+ CARD8 code;
+ CARD16 contrast;
+ CARD8 format;
+ int height;
+ CARD8 hue;
+ CARD8 len;
+ CARD8 mux;
+ CARD8 out_en;
+ CARD8 p_io;
+ CARD16 sat_u;
+ CARD16 sat_v;
+ CARD8 vbien;
+ CARD8 vbifmt;
+ int width;
+
+ CARD16 hdelay;
+ CARD16 hscale;
+ CARD16 vactive;
+ CARD16 vdelay;
+ CARD16 vscale;
+
+ CARD16 htotal;
+ CARD8 id;
+ CARD8 svideo_mux;
} BT829Rec, *BT829Ptr;
#define xf86_bt829_Detect bt829_Detect
@@ -46,20 +46,20 @@ extern _X_EXPORT BT829Ptr bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr);
#define xf86_bt829_ATIInit bt829_ATIInit
extern _X_EXPORT int bt829_ATIInit(BT829Ptr bt);
-#define BT829_NTSC 1 /* NTSC-M */
-#define BT829_NTSC_JAPAN 2 /* NTSC-Japan */
-#define BT829_PAL 3 /* PAL-B,D,G,H,I */
-#define BT829_PAL_M 4 /* PAL-M */
-#define BT829_PAL_N 5 /* PAL-N */
-#define BT829_SECAM 6 /* SECAM */
-#define BT829_PAL_N_COMB 7 /* PAL-N combination */
+#define BT829_NTSC 1 /* NTSC-M */
+#define BT829_NTSC_JAPAN 2 /* NTSC-Japan */
+#define BT829_PAL 3 /* PAL-B,D,G,H,I */
+#define BT829_PAL_M 4 /* PAL-M */
+#define BT829_PAL_N 5 /* PAL-N */
+#define BT829_SECAM 6 /* SECAM */
+#define BT829_PAL_N_COMB 7 /* PAL-N combination */
#define xf86_bt829_SetFormat bt829_SetFormat
extern _X_EXPORT int bt829_SetFormat(BT829Ptr bt, CARD8 format);
-#define BT829_MUX2 1 /* ATI -> composite video */
-#define BT829_MUX0 2 /* ATI -> tv tuner */
-#define BT829_MUX1 3 /* ATI -> s-video */
+#define BT829_MUX2 1 /* ATI -> composite video */
+#define BT829_MUX0 2 /* ATI -> tv tuner */
+#define BT829_MUX1 3 /* ATI -> s-video */
#define xf86_bt829_SetMux bt829_SetMux
extern _X_EXPORT int bt829_SetMux(BT829Ptr bt, CARD8 mux);
@@ -69,17 +69,21 @@ extern _X_EXPORT int bt829_SetCaptSize(BT829Ptr bt, int width, int height);
#define xf86_bt829_SetBrightness bt829_SetBrightness
extern _X_EXPORT void bt829_SetBrightness(BT829Ptr bt, int brightness);
+
#define xf86_bt829_SetContrast bt829_SetContrast
extern _X_EXPORT void bt829_SetContrast(BT829Ptr bt, int contrast);
+
#define xf86_bt829_SetSaturation bt829_SetSaturation
extern _X_EXPORT void bt829_SetSaturation(BT829Ptr bt, int saturation);
+
#define xf86_bt829_SetTint bt829_SetTint
-extern _X_EXPORT void bt829_SetTint(BT829Ptr bt, int hue); /* Hue */
+extern _X_EXPORT void bt829_SetTint(BT829Ptr bt, int hue); /* Hue */
#define xf86_bt829_SetOUT_EN bt829_SetOUT_EN
-extern _X_EXPORT void bt829_SetOUT_EN(BT829Ptr bt, BOOL out_en);/* VPOLE register */
+extern _X_EXPORT void bt829_SetOUT_EN(BT829Ptr bt, BOOL out_en); /* VPOLE register */
+
#define xf86_bt829_SetP_IO bt829_SetP_IO
-extern _X_EXPORT void bt829_SetP_IO(BT829Ptr bt, CARD8 p_io); /* P_IO register */
+extern _X_EXPORT void bt829_SetP_IO(BT829Ptr bt, CARD8 p_io); /* P_IO register */
extern _X_EXPORT int bt829_SetCC(BT829Ptr bt);
diff --git a/xorg-server/hw/xfree86/i2c/fi1236.h b/xorg-server/hw/xfree86/i2c/fi1236.h
index 8dd7e4fdb..053089277 100644
--- a/xorg-server/hw/xfree86/i2c/fi1236.h
+++ b/xorg-server/hw/xfree86/i2c/fi1236.h
@@ -7,64 +7,63 @@
#undef NUM
typedef struct {
- CARD32 fcar; /* 16 * fcar_Mhz */
- CARD32 min_freq; /* 16 * min_freq_Mhz */
- CARD32 max_freq; /* 16 * max_freq_Mhz */
-
- CARD32 threshold1; /* 16 * Value_Mhz */
- CARD32 threshold2; /* 16 * Value_Mhz */
-
- CARD8 band_low;
- CARD8 band_mid;
- CARD8 band_high;
- CARD8 control;
- } FI1236_parameters;
+ CARD32 fcar; /* 16 * fcar_Mhz */
+ CARD32 min_freq; /* 16 * min_freq_Mhz */
+ CARD32 max_freq; /* 16 * max_freq_Mhz */
+ CARD32 threshold1; /* 16 * Value_Mhz */
+ CARD32 threshold2; /* 16 * Value_Mhz */
+
+ CARD8 band_low;
+ CARD8 band_mid;
+ CARD8 band_high;
+ CARD8 control;
+} FI1236_parameters;
typedef struct {
- /* what we want */
- /* all frequencies are in Mhz */
- double f_rf; /* frequency to tune to */
- double f_if1; /* first intermediate frequency */
- double f_if2; /* second intermediate frequency */
- double f_ref; /* reference frequency */
- double f_ifbw; /* bandwidth */
- double f_step; /* step */
-
- /* what we compute */
- double f_lo1;
- double f_lo2;
- int LO1I;
- int LO2I;
- int SEL;
- int STEP;
- int NUM;
- } MT2032_parameters;
+ /* what we want */
+ /* all frequencies are in Mhz */
+ double f_rf; /* frequency to tune to */
+ double f_if1; /* first intermediate frequency */
+ double f_if2; /* second intermediate frequency */
+ double f_ref; /* reference frequency */
+ double f_ifbw; /* bandwidth */
+ double f_step; /* step */
+
+ /* what we compute */
+ double f_lo1;
+ double f_lo2;
+ int LO1I;
+ int LO2I;
+ int SEL;
+ int STEP;
+ int NUM;
+} MT2032_parameters;
typedef struct {
- I2CDevRec d;
- int type;
-
- void* afc_source; /* The AFC source may be another chip like TDA988x */
-
- int afc_delta;
- CARD32 original_frequency;
- Bool afc_timer_installed;
- int afc_count;
- int last_afc_hint;
-
- double video_if;
- FI1236_parameters parm;
- int xogc; /* for MT2032 */
-
- struct {
- CARD8 div1;
- CARD8 div2;
- CARD8 control;
- CARD8 band;
- CARD8 aux; /* this is for MK3 tuners */
- } tuner_data;
- } FI1236Rec, *FI1236Ptr;
+ I2CDevRec d;
+ int type;
+
+ void *afc_source; /* The AFC source may be another chip like TDA988x */
+
+ int afc_delta;
+ CARD32 original_frequency;
+ Bool afc_timer_installed;
+ int afc_count;
+ int last_afc_hint;
+
+ double video_if;
+ FI1236_parameters parm;
+ int xogc; /* for MT2032 */
+
+ struct {
+ CARD8 div1;
+ CARD8 div2;
+ CARD8 control;
+ CARD8 band;
+ CARD8 aux; /* this is for MK3 tuners */
+ } tuner_data;
+} FI1236Rec, *FI1236Ptr;
#define TUNER_TYPE_FI1236 0
#define TUNER_TYPE_FI1216 1
@@ -86,7 +85,6 @@ typedef struct {
#define TUNER_OFF 4
#define TUNER_STILL_TUNING 5
-
void FI1236_tune(FI1236Ptr f, CARD32 frequency);
#define FI1236SymbolsList \
@@ -96,15 +94,19 @@ void FI1236_tune(FI1236Ptr f, CARD32 frequency);
#define xf86_Detect_FI1236 Detect_FI1236
extern _X_EXPORT FI1236Ptr Detect_FI1236(I2CBusPtr b, I2CSlaveAddr addr);
+
#define xf86_FI1236_set_tuner_type FI1236_set_tuner_type
extern _X_EXPORT void FI1236_set_tuner_type(FI1236Ptr f, int type);
+
#define xf86_TUNER_set_frequency TUNER_set_frequency
extern _X_EXPORT void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency);
#define xf86_FI1236_AFC FI1236_AFC
extern _X_EXPORT int FI1236_AFC(FI1236Ptr f);
+
#define xf86_TUNER_get_afc_hint TUNER_get_afc_hint
extern _X_EXPORT int TUNER_get_afc_hint(FI1236Ptr f);
+
#define xf86_fi1236_dump_status fi1236_dump_status
extern _X_EXPORT void fi1236_dump_status(FI1236Ptr f);
diff --git a/xorg-server/hw/xfree86/i2c/msp3430.h b/xorg-server/hw/xfree86/i2c/msp3430.h
index 8423d1411..ef66e1ed8 100644
--- a/xorg-server/hw/xfree86/i2c/msp3430.h
+++ b/xorg-server/hw/xfree86/i2c/msp3430.h
@@ -4,29 +4,28 @@
#include "xf86i2c.h"
typedef struct {
- I2CDevRec d;
-
- int standard;
- int connector;
- int mode;
+ I2CDevRec d;
- CARD8 hardware_version, major_revision, product_code, rom_version;
+ int standard;
+ int connector;
+ int mode;
+
+ CARD8 hardware_version, major_revision, product_code, rom_version;
#ifdef MSP_DEBUG
- CARD8 registers_present[256];
+ CARD8 registers_present[256];
#endif
- CARD16 chip_id;
- CARD8 chip_family;
- Bool recheck; /*reinitialization needed after channel change */
- CARD8 c_format; /*current state of audio format */
- CARD16 c_standard; /*current state of standard register */
- CARD8 c_source; /*current state of source register */
- CARD8 c_matrix; /*current state of matrix register */
- CARD8 c_fmmatrix; /*current state of fmmatrix register */
- int c_mode; /* current state of mode for autoswitchimg */
- CARD8 volume;
- } MSP3430Rec, * MSP3430Ptr;
-
+ CARD16 chip_id;
+ CARD8 chip_family;
+ Bool recheck; /*reinitialization needed after channel change */
+ CARD8 c_format; /*current state of audio format */
+ CARD16 c_standard; /*current state of standard register */
+ CARD8 c_source; /*current state of source register */
+ CARD8 c_matrix; /*current state of matrix register */
+ CARD8 c_fmmatrix; /*current state of fmmatrix register */
+ int c_mode; /* current state of mode for autoswitchimg */
+ CARD8 volume;
+} MSP3430Rec, *MSP3430Ptr;
#define MSP3430_ADDR_1 0x80
#define MSP3430_ADDR_2 0x84
@@ -37,9 +36,9 @@ typedef struct {
#define MSP3430_PAL_DK1 (0x100 | MSP3430_PAL)
#define MSP3430_SECAM 3
-#define MSP3430_CONNECTOR_1 1 /* tuner on AIW cards */
-#define MSP3430_CONNECTOR_2 2 /* SVideo on AIW cards */
-#define MSP3430_CONNECTOR_3 3 /* composite on AIW cards */
+#define MSP3430_CONNECTOR_1 1 /* tuner on AIW cards */
+#define MSP3430_CONNECTOR_2 2 /* SVideo on AIW cards */
+#define MSP3430_CONNECTOR_3 3 /* composite on AIW cards */
#define MSP3430_ADDR(a) ((a)->d.SlaveAddr)
@@ -50,7 +49,7 @@ typedef struct {
/*----------------------------------------------------------*/
/* MSP chip families */
-#define MSPFAMILY_UNKNOWN 0
+#define MSPFAMILY_UNKNOWN 0
#define MSPFAMILY_34x0D 1
#define MSPFAMILY_34x5D 2
#define MSPFAMILY_34x0G 3
@@ -94,14 +93,18 @@ typedef struct {
#define xf86_InitMSP3430 InitMSP3430
extern _X_EXPORT void InitMSP3430(MSP3430Ptr m);
+
#define xf86_DetectMSP3430 DetectMSP3430
extern _X_EXPORT MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr);
+
#define xf86_ResetMSP3430 ResetMSP3430
extern _X_EXPORT void ResetMSP3430(MSP3430Ptr m);
+
#define xf86_MSP3430SetVolume MSP3430SetVolume
-extern _X_EXPORT void MSP3430SetVolume (MSP3430Ptr m, CARD8 value);
+extern _X_EXPORT void MSP3430SetVolume(MSP3430Ptr m, CARD8 value);
+
#define xf86_MSP3430SetSAP MSP3430SetSAP
-extern _X_EXPORT void MSP3430SetSAP (MSP3430Ptr m, int mode);
+extern _X_EXPORT void MSP3430SetSAP(MSP3430Ptr m, int mode);
#define MSP3430SymbolsList \
"InitMSP3430", \
diff --git a/xorg-server/hw/xfree86/i2c/tda9850.h b/xorg-server/hw/xfree86/i2c/tda9850.h
index d81679510..7d82095f0 100644
--- a/xorg-server/hw/xfree86/i2c/tda9850.h
+++ b/xorg-server/hw/xfree86/i2c/tda9850.h
@@ -4,27 +4,32 @@
#include "xf86i2c.h"
typedef struct {
- I2CDevRec d;
-
- int mux;
- int stereo;
- int sap;
- Bool mute;
- Bool sap_mute;
- } TDA9850Rec, *TDA9850Ptr;
+ I2CDevRec d;
+
+ int mux;
+ int stereo;
+ int sap;
+ Bool mute;
+ Bool sap_mute;
+} TDA9850Rec, *TDA9850Ptr;
#define TDA9850_ADDR_1 0xB4
#define xf86_Detect_tda9850 Detect_tda9850
extern _X_EXPORT TDA9850Ptr Detect_tda9850(I2CBusPtr b, I2CSlaveAddr addr);
+
#define xf86_tda9850_init tda9850_init
extern _X_EXPORT Bool tda9850_init(TDA9850Ptr t);
+
#define xf86_tda9850_setaudio tda9850_setaudio
extern _X_EXPORT void tda9850_setaudio(TDA9850Ptr t);
+
#define xf86_tda9850_mute tda9850_mute
extern _X_EXPORT void tda9850_mute(TDA9850Ptr t, Bool mute);
+
#define xf86_tda9850_sap_mute tda9850_sap_mute
extern _X_EXPORT void tda9850_sap_mute(TDA9850Ptr t, Bool sap_mute);
+
#define xf86_tda9850_getstatus tda9850_getstatus
extern _X_EXPORT CARD16 tda9850_getstatus(TDA9850Ptr t);
diff --git a/xorg-server/hw/xfree86/i2c/tda9885.h b/xorg-server/hw/xfree86/i2c/tda9885.h
index 004f43d5c..2d8a8af15 100644
--- a/xorg-server/hw/xfree86/i2c/tda9885.h
+++ b/xorg-server/hw/xfree86/i2c/tda9885.h
@@ -4,35 +4,35 @@
#include "xf86i2c.h"
typedef struct {
- I2CDevRec d;
-
- /* write-only parameters */
- /* B DATA */
- CARD8 sound_trap;
- CARD8 auto_mute_fm;
- CARD8 carrier_mode;
- CARD8 modulation;
- CARD8 forced_mute_audio;
- CARD8 port1;
- CARD8 port2;
- /* C DATA */
- CARD8 top_adjustment;
- CARD8 deemphasis;
- CARD8 audio_gain;
- /* E DATA */
- CARD8 standard_sound_carrier;
- CARD8 standard_video_if;
- CARD8 minimum_gain;
- CARD8 gating;
- CARD8 vif_agc;
- /* read-only values */
-
- CARD8 after_reset;
- CARD8 afc_status;
- CARD8 vif_level;
- CARD8 afc_win;
- CARD8 fm_carrier;
- } TDA9885Rec, *TDA9885Ptr;
+ I2CDevRec d;
+
+ /* write-only parameters */
+ /* B DATA */
+ CARD8 sound_trap;
+ CARD8 auto_mute_fm;
+ CARD8 carrier_mode;
+ CARD8 modulation;
+ CARD8 forced_mute_audio;
+ CARD8 port1;
+ CARD8 port2;
+ /* C DATA */
+ CARD8 top_adjustment;
+ CARD8 deemphasis;
+ CARD8 audio_gain;
+ /* E DATA */
+ CARD8 standard_sound_carrier;
+ CARD8 standard_video_if;
+ CARD8 minimum_gain;
+ CARD8 gating;
+ CARD8 vif_agc;
+ /* read-only values */
+
+ CARD8 after_reset;
+ CARD8 afc_status;
+ CARD8 vif_level;
+ CARD8 afc_win;
+ CARD8 fm_carrier;
+} TDA9885Rec, *TDA9885Ptr;
#define TDA9885_ADDR_1 0x86
#define TDA9885_ADDR_2 0x84
@@ -41,12 +41,16 @@ typedef struct {
#define xf86_Detect_tda9885 Detect_tda9885
extern _X_EXPORT TDA9885Ptr Detect_tda9885(I2CBusPtr b, I2CSlaveAddr addr);
+
#define xf86_tda9885_init tda9885_init
extern _X_EXPORT Bool tda9885_init(TDA9885Ptr t);
+
#define xf86_tda9885_setparameters tda9885_setparameters
extern _X_EXPORT void tda9885_setparameters(TDA9885Ptr t);
+
#define xf86_tda9885_getstatus tda9885_getstatus
extern _X_EXPORT void tda9885_getstatus(TDA9885Ptr t);
+
#define xf86_tda9885_dumpstatus tda9885_dumpstatus
extern _X_EXPORT void tda9885_dumpstatus(TDA9885Ptr t);
diff --git a/xorg-server/hw/xfree86/i2c/uda1380.h b/xorg-server/hw/xfree86/i2c/uda1380.h
index da232f90d..f0bc6167a 100644
--- a/xorg-server/hw/xfree86/i2c/uda1380.h
+++ b/xorg-server/hw/xfree86/i2c/uda1380.h
@@ -35,29 +35,36 @@
#include "xf86i2c.h"
typedef struct {
- I2CDevRec d;
-
- CARD16 analog_mixer_settings; /* register 0x03 */
-
- } UDA1380Rec, *UDA1380Ptr;
+ I2CDevRec d;
+
+ CARD16 analog_mixer_settings; /* register 0x03 */
+
+} UDA1380Rec, *UDA1380Ptr;
#define UDA1380_ADDR_1 0x30
#define UDA1380_ADDR_2 0x34
#define xf86_Detect_uda1380 Detect_uda1380
extern _X_EXPORT UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr);
+
#define xf86_uda1380_init uda1380_init
extern _X_EXPORT Bool uda1380_init(UDA1380Ptr t);
+
#define xf86_uda1380_shutdown uda1380_shutdown
extern _X_EXPORT void uda1380_shutdown(UDA1380Ptr t);
+
#define xf86_uda1380_setvolume uda1380_setvolume
extern _X_EXPORT void uda1380_setvolume(UDA1380Ptr t, INT32);
+
#define xf86_uda1380_mute uda1380_mute
extern _X_EXPORT void uda1380_mute(UDA1380Ptr t, Bool);
+
#define xf86_uda1380_setparameters uda1380_setparameters
extern _X_EXPORT void uda1380_setparameters(UDA1380Ptr t);
+
#define xf86_uda1380_getstatus uda1380_getstatus
extern _X_EXPORT void uda1380_getstatus(UDA1380Ptr t);
+
#define xf86_uda1380_dumpstatus uda1380_dumpstatus
extern _X_EXPORT void uda1380_dumpstatus(UDA1380Ptr t);
diff --git a/xorg-server/hw/xfree86/int10/stub.c b/xorg-server/hw/xfree86/int10/stub.c
index 58b65782c..8fd079069 100644
--- a/xorg-server/hw/xfree86/int10/stub.c
+++ b/xorg-server/hw/xfree86/int10/stub.c
@@ -38,7 +38,7 @@ xf86FreeInt10(xf86Int10InfoPtr pInt)
}
void *
-xf86Int10AllocPages(xf86Int10InfoPtr pInt,int num, int *off)
+xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, int *off)
{
*off = 0;
return NULL;
diff --git a/xorg-server/hw/xfree86/int10/xf86x86emu.c b/xorg-server/hw/xfree86/int10/xf86x86emu.c
index 83663b0e6..0f8737b49 100644
--- a/xorg-server/hw/xfree86/int10/xf86x86emu.c
+++ b/xorg-server/hw/xfree86/int10/xf86x86emu.c
@@ -24,7 +24,7 @@ x86emu_do_int(int num)
Int10Current->num = num;
if (!int_handler(Int10Current)) {
- X86EMU_halt_sys();
+ X86EMU_halt_sys();
}
}
@@ -34,10 +34,10 @@ xf86ExecX86int10(xf86Int10InfoPtr pInt)
int sig = setup_int(pInt);
if (sig < 0)
- return;
+ return;
if (int_handler(pInt)) {
- X86EMU_exec();
+ X86EMU_exec();
}
finish_int(pInt, sig);
@@ -48,33 +48,34 @@ xf86Int10ExecSetup(xf86Int10InfoPtr pInt)
{
int i;
X86EMU_intrFuncs intFuncs[256];
+
X86EMU_pioFuncs pioFuncs = {
- (&x_inb),
- (&x_inw),
- (&x_inl),
- (&x_outb),
- (&x_outw),
- (&x_outl)
+ (&x_inb),
+ (&x_inw),
+ (&x_inl),
+ (&x_outb),
+ (&x_outw),
+ (&x_outl)
};
X86EMU_memFuncs memFuncs = {
- (&Mem_rb),
- (&Mem_rw),
- (&Mem_rl),
- (&Mem_wb),
- (&Mem_ww),
- (&Mem_wl)
+ (&Mem_rb),
+ (&Mem_rw),
+ (&Mem_rl),
+ (&Mem_wb),
+ (&Mem_ww),
+ (&Mem_wl)
};
X86EMU_setupMemFuncs(&memFuncs);
pInt->cpuRegs = &M;
M.mem_base = 0;
- M.mem_size = 1024*1024 + 1024;
+ M.mem_size = 1024 * 1024 + 1024;
X86EMU_setupPioFuncs(&pioFuncs);
- for (i=0;i<256;i++)
- intFuncs[i] = x86emu_do_int;
+ for (i = 0; i < 256; i++)
+ intFuncs[i] = x86emu_do_int;
X86EMU_setupIntrFuncs(intFuncs);
return TRUE;
}
@@ -83,6 +84,7 @@ void
printk(const char *fmt, ...)
{
va_list argptr;
+
va_start(argptr, fmt);
VErrorF(fmt, argptr);
va_end(argptr);
diff --git a/xorg-server/hw/xfree86/loader/loader.h b/xorg-server/hw/xfree86/loader/loader.h
index a53970b6e..5cadd5ad6 100644
--- a/xorg-server/hw/xfree86/loader/loader.h
+++ b/xorg-server/hw/xfree86/loader/loader.h
@@ -1,76 +1,76 @@
-/*
- * Copyright 1995-1998 by Metro Link, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Metro Link, Inc. not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Metro Link, Inc. makes no
- * representations about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-/*
- * Copyright (c) 1997-2001 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _LOADER_H
-#define _LOADER_H
-
-#include <X11/Xosdefs.h>
-#include <X11/Xfuncproto.h>
-#include <X11/Xmd.h>
-
-/* Compiled-in version information */
-typedef struct {
- int xf86Version;
- int ansicVersion;
- int videodrvVersion;
- int xinputVersion;
- int extensionVersion;
- int fontVersion;
-} ModuleVersions;
-extern const ModuleVersions LoaderVersionInfo;
-
-extern unsigned long LoaderOptions;
-
-/* Internal Functions */
-void * LoaderOpen(const char *, int *, int *);
-
-#endif /* _LOADER_H */
+/*
+ * Copyright 1995-1998 by Metro Link, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Metro Link, Inc. not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Metro Link, Inc. makes no
+ * representations about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+/*
+ * Copyright (c) 1997-2001 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifndef _LOADER_H
+#define _LOADER_H
+
+#include <X11/Xosdefs.h>
+#include <X11/Xfuncproto.h>
+#include <X11/Xmd.h>
+
+/* Compiled-in version information */
+typedef struct {
+ int xf86Version;
+ int ansicVersion;
+ int videodrvVersion;
+ int xinputVersion;
+ int extensionVersion;
+ int fontVersion;
+} ModuleVersions;
+extern const ModuleVersions LoaderVersionInfo;
+
+extern unsigned long LoaderOptions;
+
+/* Internal Functions */
+void *LoaderOpen(const char *, int *, int *);
+
+#endif /* _LOADER_H */
diff --git a/xorg-server/hw/xfree86/loader/loaderProcs.h b/xorg-server/hw/xfree86/loader/loaderProcs.h
index 133d5aae9..a7b752b9a 100644
--- a/xorg-server/hw/xfree86/loader/loaderProcs.h
+++ b/xorg-server/hw/xfree86/loader/loaderProcs.h
@@ -1,94 +1,94 @@
-/*
- * Copyright 1995-1998 by Metro Link, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Metro Link, Inc. not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Metro Link, Inc. makes no
- * representations about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-/*
- * Copyright (c) 1997-2002 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _LOADERPROCS_H
-#define _LOADERPROCS_H
-
-#include "xf86Module.h"
-
-typedef struct module_desc {
- struct module_desc *child;
- struct module_desc *sib;
- struct module_desc *parent;
- char *name;
- char *path;
- void *handle;
- ModuleSetupProc SetupProc;
- ModuleTearDownProc TearDownProc;
- void *TearDownData; /* returned from SetupProc */
- const XF86ModuleVersionInfo *VersionInfo;
-} ModuleDesc, *ModuleDescPtr;
-
-/* External API for the loader */
-
-void LoaderInit(void);
-
-ModuleDescPtr LoadDriver(const char *, const char *, int, pointer, int *,
- int *);
-ModuleDescPtr LoadModule(const char *, const char *, const char **,
- const char **, pointer, const XF86ModReqInfo *,
- int *, int *);
-ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent);
-void UnloadDriver(ModuleDescPtr);
-void LoaderSetPath(const char *path);
-void LoaderSortExtensions(void);
-
-void LoaderUnload(const char *, void *);
-unsigned long LoaderGetModuleVersion(ModuleDescPtr mod);
-
-void LoaderResetOptions(void);
-void LoaderSetOptions(unsigned long);
-
-/* Options for LoaderSetOptions */
-#define LDR_OPT_ABI_MISMATCH_NONFATAL 0x0001
-
-#endif /* _LOADERPROCS_H */
+/*
+ * Copyright 1995-1998 by Metro Link, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Metro Link, Inc. not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Metro Link, Inc. makes no
+ * representations about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+/*
+ * Copyright (c) 1997-2002 by The XFree86 Project, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name of the copyright holder(s)
+ * and author(s) shall not be used in advertising or otherwise to promote
+ * the sale, use or other dealings in this Software without prior written
+ * authorization from the copyright holder(s) and author(s).
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifndef _LOADERPROCS_H
+#define _LOADERPROCS_H
+
+#include "xf86Module.h"
+
+typedef struct module_desc {
+ struct module_desc *child;
+ struct module_desc *sib;
+ struct module_desc *parent;
+ char *name;
+ char *path;
+ void *handle;
+ ModuleSetupProc SetupProc;
+ ModuleTearDownProc TearDownProc;
+ void *TearDownData; /* returned from SetupProc */
+ const XF86ModuleVersionInfo *VersionInfo;
+} ModuleDesc, *ModuleDescPtr;
+
+/* External API for the loader */
+
+void LoaderInit(void);
+
+ModuleDescPtr LoadDriver(const char *, const char *, int, pointer, int *,
+ int *);
+ModuleDescPtr LoadModule(const char *, const char *, const char **,
+ const char **, pointer, const XF86ModReqInfo *,
+ int *, int *);
+ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent);
+void UnloadDriver(ModuleDescPtr);
+void LoaderSetPath(const char *path);
+void LoaderSortExtensions(void);
+
+void LoaderUnload(const char *, void *);
+unsigned long LoaderGetModuleVersion(ModuleDescPtr mod);
+
+void LoaderResetOptions(void);
+void LoaderSetOptions(unsigned long);
+
+/* Options for LoaderSetOptions */
+#define LDR_OPT_ABI_MISMATCH_NONFATAL 0x0001
+
+#endif /* _LOADERPROCS_H */
diff --git a/xorg-server/hw/xfree86/loader/os.c b/xorg-server/hw/xfree86/loader/os.c
index 6b5ac7e86..e3a9ac448 100644
--- a/xorg-server/hw/xfree86/loader/os.c
+++ b/xorg-server/hw/xfree86/loader/os.c
@@ -66,7 +66,7 @@ void
LoaderGetOS(const char **name, int *major, int *minor, int *teeny)
{
if (name)
- *name = OSNAME;
+ *name = OSNAME;
/* reporting runtime versions isn't supported yet */
}
diff --git a/xorg-server/hw/xfree86/modes/xf86Rename.h b/xorg-server/hw/xfree86/modes/xf86Rename.h
index e3418caad..46690a8f6 100644
--- a/xorg-server/hw/xfree86/modes/xf86Rename.h
+++ b/xorg-server/hw/xfree86/modes/xf86Rename.h
@@ -91,4 +91,4 @@
#define xf86SetSingleMode XF86NAME(xf86SetSingleMode)
#define xf86SetDesiredModes XF86NAME(xf86SetDesiredModes)
-#endif /* _XF86RENAME_H_ */
+#endif /* _XF86RENAME_H_ */
diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_VTsw.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_VTsw.c
index 15220d743..0ee51de2f 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/bsd_VTsw.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_VTsw.c
@@ -1,103 +1,103 @@
-/*
- * Derived from VTsw_usl.c which is
- * Copyright 1993 by David Wexelblat <dwex@goblin.org>
- * by S_ren Schmidt (sos@login.dkuug.dk)
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of David Wexelblat not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. David Wexelblat makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as is" without express or implied warranty.
- *
- * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-/*
- * Handle the VT-switching interface for OSs that use USL-style ioctl()s
- * (the bsd, sysv, sco, and linux subdirs).
- */
-
-/*
- * This function is the signal handler for the VT-switching signal. It
- * is only referenced inside the OS-support layer.
- */
-void
-xf86VTRequest(int sig)
-{
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
- xf86Info.vtRequestsPending = TRUE;
- }
-#endif
- return;
-}
-
-Bool
-xf86VTSwitchPending()
-{
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
- return xf86Info.vtRequestsPending ? TRUE : FALSE;
- }
-#endif
- return FALSE;
-}
-
-Bool
-xf86VTSwitchAway()
-{
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
- xf86Info.vtRequestsPending = FALSE;
- if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
- return FALSE;
- else
- return TRUE;
- }
-#endif
- return FALSE;
-}
-
-Bool
-xf86VTSwitchTo()
-{
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
- xf86Info.vtRequestsPending = FALSE;
- if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
- return FALSE;
- else
- return TRUE;
- }
-#endif
- return TRUE;
-}
-
-Bool
-xf86VTActivate(int vtno)
-{
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) {
- return FALSE;
- }
- return TRUE;
-}
+/*
+ * Derived from VTsw_usl.c which is
+ * Copyright 1993 by David Wexelblat <dwex@goblin.org>
+ * by S_ren Schmidt (sos@login.dkuug.dk)
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of David Wexelblat not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. David Wexelblat makes no representations
+ * about the suitability of this software for any purpose. It is provided
+ * "as is" without express or implied warranty.
+ *
+ * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <X11/X.h>
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+
+/*
+ * Handle the VT-switching interface for OSs that use USL-style ioctl()s
+ * (the bsd, sysv, sco, and linux subdirs).
+ */
+
+/*
+ * This function is the signal handler for the VT-switching signal. It
+ * is only referenced inside the OS-support layer.
+ */
+void
+xf86VTRequest(int sig)
+{
+#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
+ xf86Info.vtRequestsPending = TRUE;
+ }
+#endif
+ return;
+}
+
+Bool
+xf86VTSwitchPending()
+{
+#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
+ return xf86Info.vtRequestsPending ? TRUE : FALSE;
+ }
+#endif
+ return FALSE;
+}
+
+Bool
+xf86VTSwitchAway()
+{
+#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
+ xf86Info.vtRequestsPending = FALSE;
+ if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
+ return FALSE;
+ else
+ return TRUE;
+ }
+#endif
+ return FALSE;
+}
+
+Bool
+xf86VTSwitchTo()
+{
+#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
+ xf86Info.vtRequestsPending = FALSE;
+ if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
+ return FALSE;
+ else
+ return TRUE;
+ }
+#endif
+ return TRUE;
+}
+
+Bool
+xf86VTActivate(int vtno)
+{
+ if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) {
+ return FALSE;
+ }
+ return TRUE;
+}
diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c
index 31b364df3..645377ed6 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c
@@ -26,74 +26,74 @@ int readDense8(pointer Base, register unsigned long Offset);
int readDense16(pointer Base, register unsigned long Offset);
int readDense32(pointer Base, register unsigned long Offset);
void
-writeDenseNB8(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB8(int Value, pointer Base, register unsigned long Offset);
void
-writeDenseNB16(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB16(int Value, pointer Base, register unsigned long Offset);
void
-writeDenseNB32(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB32(int Value, pointer Base, register unsigned long Offset);
void
-writeDense8(int Value, pointer Base, register unsigned long Offset);
+ writeDense8(int Value, pointer Base, register unsigned long Offset);
void
-writeDense16(int Value, pointer Base, register unsigned long Offset);
+ writeDense16(int Value, pointer Base, register unsigned long Offset);
void
-writeDense32(int Value, pointer Base, register unsigned long Offset);
+ writeDense32(int Value, pointer Base, register unsigned long Offset);
int
readDense8(pointer Base, register unsigned long Offset)
{
mem_barrier();
- return (alpha_ldbu((pointer)((unsigned long)Base+(Offset))));
+ return (alpha_ldbu((pointer) ((unsigned long) Base + (Offset))));
}
int
readDense16(pointer Base, register unsigned long Offset)
{
mem_barrier();
- return (alpha_ldwu((pointer)((unsigned long)Base+(Offset))));
+ return (alpha_ldwu((pointer) ((unsigned long) Base + (Offset))));
}
int
readDense32(pointer Base, register unsigned long Offset)
{
mem_barrier();
- return *(volatile CARD32*)((unsigned long)Base+(Offset));
+ return *(volatile CARD32 *) ((unsigned long) Base + (Offset));
}
void
writeDenseNB8(int Value, pointer Base, register unsigned long Offset)
{
- alpha_stb((pointer)((unsigned long)Base+(Offset)), Value);
+ alpha_stb((pointer) ((unsigned long) Base + (Offset)), Value);
}
void
writeDenseNB16(int Value, pointer Base, register unsigned long Offset)
{
- alpha_stw((pointer)((unsigned long)Base + (Offset)), Value);
+ alpha_stw((pointer) ((unsigned long) Base + (Offset)), Value);
}
void
writeDenseNB32(int Value, pointer Base, register unsigned long Offset)
{
- *(volatile CARD32*)((unsigned long)Base+(Offset)) = Value;
+ *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value;
}
void
writeDense8(int Value, pointer Base, register unsigned long Offset)
{
write_mem_barrier();
- alpha_stb((pointer)((unsigned long)Base+(Offset)), Value);
+ alpha_stb((pointer) ((unsigned long) Base + (Offset)), Value);
}
void
writeDense16(int Value, pointer Base, register unsigned long Offset)
{
write_mem_barrier();
- alpha_stw((pointer)((unsigned long)Base + (Offset)), Value);
+ alpha_stw((pointer) ((unsigned long) Base + (Offset)), Value);
}
void
writeDense32(int Value, pointer Base, register unsigned long Offset)
{
write_mem_barrier();
- *(volatile CARD32 *)((unsigned long)Base+(Offset)) = Value;
+ *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value;
}
diff --git a/xorg-server/hw/xfree86/os-support/bus/Pci.c b/xorg-server/hw/xfree86/os-support/bus/Pci.c
index 0362a00e3..52d142fbf 100644
--- a/xorg-server/hw/xfree86/os-support/bus/Pci.c
+++ b/xorg-server/hw/xfree86/os-support/bus/Pci.c
@@ -129,7 +129,7 @@
Bool
xf86scanpci(void)
{
- Bool success = FALSE;
+ Bool success = FALSE;
success = (pci_system_init() == 0);
diff --git a/xorg-server/hw/xfree86/os-support/bus/Pci.h b/xorg-server/hw/xfree86/os-support/bus/Pci.h
index 5709bd841..776bb637c 100644
--- a/xorg-server/hw/xfree86/os-support/bus/Pci.h
+++ b/xorg-server/hw/xfree86/os-support/bus/Pci.h
@@ -95,7 +95,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-
/*
* This file has the private Pci definitions. The public ones are imported
* from xf86Pci.h. Drivers should not use this file.
@@ -119,7 +118,7 @@
#endif
#ifndef PCI_DOM_MASK
-# define PCI_DOM_MASK 0x0ffu
+#define PCI_DOM_MASK 0x0ffu
#endif
#define PCI_DOMBUS_MASK (((PCI_DOM_MASK) << 8) | 0x0ffu)
@@ -146,4 +145,4 @@ extern void osPciInit(void);
#error No PCI support available for this architecture/OS combination
#endif
-#endif /* _PCI_H */
+#endif /* _PCI_H */
diff --git a/xorg-server/hw/xfree86/os-support/bus/xf86Sbus.h b/xorg-server/hw/xfree86/os-support/bus/xf86Sbus.h
index cff5e808a..8a10d64fe 100644
--- a/xorg-server/hw/xfree86/os-support/bus/xf86Sbus.h
+++ b/xorg-server/hw/xfree86/os-support/bus/xf86Sbus.h
@@ -66,4 +66,4 @@
#define FBTYPE_CREATOR -1
#endif
-#endif /* _XF86_SBUS_H */
+#endif /* _XF86_SBUS_H */
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c b/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c
index 5fad19451..d98efa247 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c
@@ -14,7 +14,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
-
+
#define ACPI_SOCKET "/var/run/acpid.socket"
#define ACPI_VIDEO_NOTIFY_SWITCH 0x80
@@ -43,8 +43,8 @@ static CARD32
lnxACPIReopen(OsTimerPtr timer, CARD32 time, pointer arg)
{
if (lnxACPIOpen()) {
- TimerFree(timer);
- return 0;
+ TimerFree(timer);
+ return 0;
}
return ACPI_REOPEN_DELAY;
@@ -53,7 +53,7 @@ lnxACPIReopen(OsTimerPtr timer, CARD32 time, pointer arg)
#define LINE_LENGTH 80
static int
-lnxACPIGetEventFromOs(int fd, pmEvent *events, int num)
+lnxACPIGetEventFromOs(int fd, pmEvent * events, int num)
{
char ev[LINE_LENGTH];
int n;
@@ -61,59 +61,59 @@ lnxACPIGetEventFromOs(int fd, pmEvent *events, int num)
memset(ev, 0, LINE_LENGTH);
do {
- n = read( fd, ev, LINE_LENGTH );
+ n = read(fd, ev, LINE_LENGTH);
} while ((n == -1) && (errno == EAGAIN || errno == EINTR));
if (n <= 0) {
- lnxCloseACPI();
- TimerSet(NULL, 0, ACPI_REOPEN_DELAY, lnxACPIReopen, NULL);
- return 0;
+ lnxCloseACPI();
+ TimerSet(NULL, 0, ACPI_REOPEN_DELAY, lnxACPIReopen, NULL);
+ return 0;
}
/* FIXME: this only processes the first read ACPI event & might break
* with interrupted reads. */
-
+
/* Check that we have a video event */
if (!strncmp(ev, "video", 5)) {
- char *video = NULL;
- char *GFX = NULL;
- char *notify = NULL;
- char *data = NULL; /* doesn't appear to be used in the kernel */
- unsigned long int notify_l, data_l;
+ char *video = NULL;
+ char *GFX = NULL;
+ char *notify = NULL;
+ char *data = NULL; /* doesn't appear to be used in the kernel */
+ unsigned long int notify_l, data_l;
- video = strtok(ev, " ");
+ video = strtok(ev, " ");
- GFX = strtok(NULL, " ");
+ GFX = strtok(NULL, " ");
#if 0
- ErrorF("GFX: %s\n",GFX);
+ ErrorF("GFX: %s\n", GFX);
#endif
- notify = strtok(NULL, " ");
- notify_l = strtoul(notify, NULL, 16);
+ notify = strtok(NULL, " ");
+ notify_l = strtoul(notify, NULL, 16);
#if 0
- ErrorF("notify: 0x%lx\n",notify_l);
+ ErrorF("notify: 0x%lx\n", notify_l);
#endif
- data = strtok(NULL, " ");
- data_l = strtoul(data, NULL, 16);
+ data = strtok(NULL, " ");
+ data_l = strtoul(data, NULL, 16);
#if 0
- ErrorF("data: 0x%lx\n",data_l);
+ ErrorF("data: 0x%lx\n", data_l);
#endif
- /* Differentiate between events */
- switch (notify_l) {
- case ACPI_VIDEO_NOTIFY_SWITCH:
- case ACPI_VIDEO_NOTIFY_CYCLE:
- case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT:
- case ACPI_VIDEO_NOTIFY_PREV_OUTPUT:
- events[0] = XF86_APM_CAPABILITY_CHANGED;
- return 1;
- case ACPI_VIDEO_NOTIFY_PROBE:
- return 0;
- default:
- return 0;
- }
+ /* Differentiate between events */
+ switch (notify_l) {
+ case ACPI_VIDEO_NOTIFY_SWITCH:
+ case ACPI_VIDEO_NOTIFY_CYCLE:
+ case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT:
+ case ACPI_VIDEO_NOTIFY_PREV_OUTPUT:
+ events[0] = XF86_APM_CAPABILITY_CHANGED;
+ return 1;
+ case ACPI_VIDEO_NOTIFY_PROBE:
+ return 0;
+ default:
+ return 0;
+ }
}
-
+
return 0;
}
@@ -123,42 +123,42 @@ lnxACPIConfirmEventToOs(int fd, pmEvent event)
/* No ability to send back to the kernel in ACPI */
switch (event) {
default:
- return PM_NONE;
+ return PM_NONE;
}
}
PMClose
lnxACPIOpen(void)
{
- int fd;
+ int fd;
struct sockaddr_un addr;
int r = -1;
static int warned = 0;
DebugF("ACPI: OSPMOpen called\n");
if (ACPIihPtr || !xf86Info.pmFlag)
- return NULL;
-
+ return NULL;
+
DebugF("ACPI: Opening device\n");
if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) > -1) {
- memset(&addr, 0, sizeof(addr));
- addr.sun_family = AF_UNIX;
- strcpy(addr.sun_path, ACPI_SOCKET);
- if ((r = connect(fd, (struct sockaddr*)&addr, sizeof(addr))) == -1) {
- if (!warned)
- xf86MsgVerb(X_WARNING,3,"Open ACPI failed (%s) (%s)\n",
- ACPI_SOCKET, strerror(errno));
- warned = 1;
- shutdown(fd, 2);
- close(fd);
- return NULL;
- }
+ memset(&addr, 0, sizeof(addr));
+ addr.sun_family = AF_UNIX;
+ strcpy(addr.sun_path, ACPI_SOCKET);
+ if ((r = connect(fd, (struct sockaddr *) &addr, sizeof(addr))) == -1) {
+ if (!warned)
+ xf86MsgVerb(X_WARNING, 3, "Open ACPI failed (%s) (%s)\n",
+ ACPI_SOCKET, strerror(errno));
+ warned = 1;
+ shutdown(fd, 2);
+ close(fd);
+ return NULL;
+ }
}
xf86PMGetEventFromOs = lnxACPIGetEventFromOs;
xf86PMConfirmEventToOs = lnxACPIConfirmEventToOs;
- ACPIihPtr = xf86AddGeneralHandler(fd,xf86HandlePMEvents,NULL);
- xf86MsgVerb(X_INFO,3,"Open ACPI successful (%s)\n", ACPI_SOCKET);
+ ACPIihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL);
+ xf86MsgVerb(X_INFO, 3, "Open ACPI successful (%s)\n", ACPI_SOCKET);
warned = 0;
return lnxCloseACPI;
@@ -171,9 +171,9 @@ lnxCloseACPI(void)
DebugF("ACPI: Closing device\n");
if (ACPIihPtr) {
- fd = xf86RemoveGeneralHandler(ACPIihPtr);
- shutdown(fd, 2);
- close(fd);
- ACPIihPtr = NULL;
+ fd = xf86RemoveGeneralHandler(ACPIihPtr);
+ shutdown(fd, 2);
+ close(fd);
+ ACPIihPtr = NULL;
}
}
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c b/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c
index 75cdd3ebc..e1d3cbf17 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c
@@ -42,5 +42,5 @@ xf86OSRingBell(int loudness, int pitch, int duration)
ioctl(xf86Info.consoleFd, KDMKTONE,
((1193190 / pitch) & 0xffff) |
- (((unsigned long)duration * loudness / 50) << 16));
+ (((unsigned long) duration * loudness / 50) << 16));
}
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c b/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c
index cb3460d29..49950705a 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c
@@ -10,74 +10,74 @@ int readDense8(pointer Base, register unsigned long Offset);
int readDense16(pointer Base, register unsigned long Offset);
int readDense32(pointer Base, register unsigned long Offset);
void
-writeDenseNB8(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB8(int Value, pointer Base, register unsigned long Offset);
void
-writeDenseNB16(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB16(int Value, pointer Base, register unsigned long Offset);
void
-writeDenseNB32(int Value, pointer Base, register unsigned long Offset);
+ writeDenseNB32(int Value, pointer Base, register unsigned long Offset);
void
-writeDense8(int Value, pointer Base, register unsigned long Offset);
+ writeDense8(int Value, pointer Base, register unsigned long Offset);
void
-writeDense16(int Value, pointer Base, register unsigned long Offset);
+ writeDense16(int Value, pointer Base, register unsigned long Offset);
void
-writeDense32(int Value, pointer Base, register unsigned long Offset);
+ writeDense32(int Value, pointer Base, register unsigned long Offset);
int
readDense8(pointer Base, register unsigned long Offset)
{
mem_barrier();
- return *(volatile CARD8*) ((unsigned long)Base+(Offset));
+ return *(volatile CARD8 *) ((unsigned long) Base + (Offset));
}
int
readDense16(pointer Base, register unsigned long Offset)
{
mem_barrier();
- return *(volatile CARD16*) ((unsigned long)Base+(Offset));
+ return *(volatile CARD16 *) ((unsigned long) Base + (Offset));
}
int
readDense32(pointer Base, register unsigned long Offset)
{
mem_barrier();
- return *(volatile CARD32*)((unsigned long)Base+(Offset));
+ return *(volatile CARD32 *) ((unsigned long) Base + (Offset));
}
void
writeDenseNB8(int Value, pointer Base, register unsigned long Offset)
{
- *(volatile CARD8*)((unsigned long)Base+(Offset)) = Value;
+ *(volatile CARD8 *) ((unsigned long) Base + (Offset)) = Value;
}
void
writeDenseNB16(int Value, pointer Base, register unsigned long Offset)
{
- *(volatile CARD16*)((unsigned long)Base + (Offset)) = Value;
+ *(volatile CARD16 *) ((unsigned long) Base + (Offset)) = Value;
}
void
writeDenseNB32(int Value, pointer Base, register unsigned long Offset)
{
- *(volatile CARD32*)((unsigned long)Base+(Offset)) = Value;
+ *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value;
}
void
writeDense8(int Value, pointer Base, register unsigned long Offset)
{
write_mem_barrier();
- *(volatile CARD8 *)((unsigned long)Base+(Offset)) = Value;
+ *(volatile CARD8 *) ((unsigned long) Base + (Offset)) = Value;
}
void
writeDense16(int Value, pointer Base, register unsigned long Offset)
{
write_mem_barrier();
- *(volatile CARD16 *)((unsigned long)Base+(Offset)) = Value;
+ *(volatile CARD16 *) ((unsigned long) Base + (Offset)) = Value;
}
void
writeDense32(int Value, pointer Base, register unsigned long Offset)
{
write_mem_barrier();
- *(volatile CARD32 *)((unsigned long)Base+(Offset)) = Value;
+ *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value;
}
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 0b9493d27..0a17c2a81 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c
@@ -11,11 +11,9 @@
#include "xf86_OSlib.h"
#include "xf86.h"
-
#define MODPROBE_PATH_FILE "/proc/sys/kernel/modprobe"
#define MAX_PATH 1024
-
#if 0
/* XFree86 #defines execl to be the xf86execl() function which does
* a fork AND exec. We don't want that. We want the regular,
@@ -26,7 +24,6 @@
#endif
#endif
-
/*
* Load a Linux kernel module.
* This is used by the DRI/DRM to load a DRM kernel module when
@@ -39,74 +36,76 @@
int
xf86LoadKernelModule(const char *modName)
{
- char mpPath[MAX_PATH] = "";
- int fd = -1, status, n;
- pid_t pid;
+ char mpPath[MAX_PATH] = "";
+ int fd = -1, status, n;
+ pid_t pid;
+
+ /* get the path to the modprobe program */
+ fd = open(MODPROBE_PATH_FILE, O_RDONLY);
+ if (fd >= 0) {
+ int count = read(fd, mpPath, MAX_PATH - 1);
+
+ if (count <= 0) {
+ mpPath[0] = 0;
+ }
+ else if (mpPath[count - 1] == '\n') {
+ mpPath[count - 1] = 0; /* replaces \n with \0 */
+ }
+ close(fd);
+ /* if this worked, mpPath will be "/sbin/modprobe" or similar. */
+ }
- /* get the path to the modprobe program */
- fd = open(MODPROBE_PATH_FILE, O_RDONLY);
- if (fd >= 0) {
- int count = read(fd, mpPath, MAX_PATH - 1);
- if (count <= 0) {
- mpPath[0] = 0;
- }
- else if (mpPath[count - 1] == '\n') {
- mpPath[count - 1] = 0; /* replaces \n with \0 */
- }
- close(fd);
- /* if this worked, mpPath will be "/sbin/modprobe" or similar. */
- }
+ if (mpPath[0] == 0) {
+ /* we failed to get the path from the system, use a default */
+ strcpy(mpPath, "/sbin/modprobe");
+ }
- if (mpPath[0] == 0) {
- /* we failed to get the path from the system, use a default */
- strcpy(mpPath, "/sbin/modprobe");
- }
+ /* now fork/exec the modprobe command */
+ /*
+ * It would be good to capture stdout/stderr so that it can be directed
+ * to the log file. modprobe errors currently are missing from the log
+ * file.
+ */
+ 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
+ */
+ if (setreuid(0, 0)) {
+ xf86Msg(X_WARNING, "LoadKernelModule: "
+ "Setting of real/effective user Id to 0/0 failed");
+ }
+ setenv("PATH", "/sbin", 1);
+ n = execl(mpPath, "modprobe", modName, NULL);
+ xf86Msg(X_WARNING, "LoadKernelModule %s\n", strerror(errno));
+ exit(EXIT_FAILURE); /* if we get here the child's exec failed */
+ break;
+ case -1: /* fork failed */
+ return 0;
+ default: /* fork worked */
+ {
+ /* XXX we loop over waitpid() because it sometimes fails on
+ * the first attempt. Don't know why!
+ */
+ int count = 0, p;
- /* now fork/exec the modprobe command */
- /*
- * It would be good to capture stdout/stderr so that it can be directed
- * to the log file. modprobe errors currently are missing from the log
- * file.
- */
- 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
- */
- if (setreuid(0,0)) {
- xf86Msg(X_WARNING,"LoadKernelModule: "
- "Setting of real/effective user Id to 0/0 failed");
- }
- setenv("PATH","/sbin",1);
- n = execl(mpPath, "modprobe", modName, NULL);
- xf86Msg(X_WARNING,"LoadKernelModule %s\n",strerror(errno));
- exit(EXIT_FAILURE); /* if we get here the child's exec failed */
- break;
- case -1: /* fork failed */
- return 0;
- default: /* fork worked */
- {
- /* XXX we loop over waitpid() because it sometimes fails on
- * the first attempt. Don't know why!
- */
- int count = 0, p;
- do {
+ do {
p = waitpid(pid, &status, 0);
- } while (p == -1 && count++ < 4);
+ } while (p == -1 && count++ < 4);
- if (p == -1) {
+ if (p == -1) {
return 0;
- }
+ }
- if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
- return 1; /* success! */
- }
- else {
+ if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
+ return 1; /* success! */
+ }
+ else {
return 0;
- }
- }
- }
+ }
+ }
+ }
- /* never get here */
- return 0;
+ /* never get here */
+ return 0;
}
diff --git a/xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c b/xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c
index be47cd681..a75d134b4 100644
--- a/xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c
+++ b/xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c
@@ -1,60 +1,60 @@
-/*
- * Copyright 1993 by David Wexelblat <dwex@XFree86.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of David Wexelblat not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. David Wexelblat makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as is" without express or implied warranty.
- *
- * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-/*
- * No-op functions for OSs without VTs
- */
-
-Bool
-xf86VTSwitchPending(void)
-{
- return FALSE;
-}
-
-Bool
-xf86VTSwitchAway(void)
-{
- return FALSE;
-}
-
-Bool
-xf86VTSwitchTo(void)
-{
- return TRUE;
-}
-
-Bool
-xf86VTActivate(int vtno)
-{
- return TRUE;
-}
+/*
+ * Copyright 1993 by David Wexelblat <dwex@XFree86.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of David Wexelblat not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. David Wexelblat makes no representations
+ * about the suitability of this software for any purpose. It is provided
+ * "as is" without express or implied warranty.
+ *
+ * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <X11/X.h>
+
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+
+/*
+ * No-op functions for OSs without VTs
+ */
+
+Bool
+xf86VTSwitchPending(void)
+{
+ return FALSE;
+}
+
+Bool
+xf86VTSwitchAway(void)
+{
+ return FALSE;
+}
+
+Bool
+xf86VTSwitchTo(void)
+{
+ return TRUE;
+}
+
+Bool
+xf86VTActivate(int vtno)
+{
+ return TRUE;
+}
diff --git a/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c b/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c
index 769fa009c..f20106c90 100644
--- a/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c
+++ b/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c
@@ -1,86 +1,86 @@
-/*
- * Copyright 1993 by David Wexelblat <dwex@XFree86.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of David Wexelblat not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. David Wexelblat makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as is" without express or implied warranty.
- *
- * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-/*
- * Handle the VT-switching interface for OSs that use USL-style ioctl()s
- * (the sysv, sco, and linux subdirs).
- */
-
-/*
- * This function is the signal handler for the VT-switching signal. It
- * is only referenced inside the OS-support layer.
- */
-void
-xf86VTRequest(int sig)
-{
- signal(sig, (void(*)(int))xf86VTRequest);
- xf86Info.vtRequestsPending = TRUE;
- return;
-}
-
-Bool
-xf86VTSwitchPending(void)
-{
- return xf86Info.vtRequestsPending ? TRUE : FALSE;
-}
-
-Bool
-xf86VTSwitchAway(void)
-{
- xf86Info.vtRequestsPending = FALSE;
- if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
- return FALSE;
- else
- return TRUE;
-}
-
-Bool
-xf86VTSwitchTo(void)
-{
- xf86Info.vtRequestsPending = FALSE;
- if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
- return FALSE;
- else
- return TRUE;
-}
-
-Bool
-xf86VTActivate(int vtno)
-{
-#ifdef VT_ACTIVATE
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) {
- return FALSE;
- }
-#endif
- return TRUE;
-}
+/*
+ * Copyright 1993 by David Wexelblat <dwex@XFree86.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of David Wexelblat not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. David Wexelblat makes no representations
+ * about the suitability of this software for any purpose. It is provided
+ * "as is" without express or implied warranty.
+ *
+ * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <X11/X.h>
+
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+
+/*
+ * Handle the VT-switching interface for OSs that use USL-style ioctl()s
+ * (the sysv, sco, and linux subdirs).
+ */
+
+/*
+ * This function is the signal handler for the VT-switching signal. It
+ * is only referenced inside the OS-support layer.
+ */
+void
+xf86VTRequest(int sig)
+{
+ signal(sig, (void (*)(int)) xf86VTRequest);
+ xf86Info.vtRequestsPending = TRUE;
+ return;
+}
+
+Bool
+xf86VTSwitchPending(void)
+{
+ return xf86Info.vtRequestsPending ? TRUE : FALSE;
+}
+
+Bool
+xf86VTSwitchAway(void)
+{
+ xf86Info.vtRequestsPending = FALSE;
+ if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
+ return FALSE;
+ else
+ return TRUE;
+}
+
+Bool
+xf86VTSwitchTo(void)
+{
+ xf86Info.vtRequestsPending = FALSE;
+ if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
+ return FALSE;
+ else
+ return TRUE;
+}
+
+Bool
+xf86VTActivate(int vtno)
+{
+#ifdef VT_ACTIVATE
+ if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) {
+ return FALSE;
+ }
+#endif
+ return TRUE;
+}
diff --git a/xorg-server/hw/xfree86/os-support/shared/agp_noop.c b/xorg-server/hw/xfree86/os-support/shared/agp_noop.c
index eda466a52..9c6ed4b8d 100644
--- a/xorg-server/hw/xfree86/os-support/shared/agp_noop.c
+++ b/xorg-server/hw/xfree86/os-support/shared/agp_noop.c
@@ -43,61 +43,60 @@
Bool
xf86GARTCloseScreen(int screenNum)
{
- return FALSE;
+ return FALSE;
}
Bool
xf86AgpGARTSupported()
{
- return FALSE;
+ return FALSE;
}
AgpInfoPtr
xf86GetAGPInfo(int screenNum)
{
- return NULL;
+ return NULL;
}
Bool
xf86AcquireGART(int screenNum)
{
- return FALSE;
+ return FALSE;
}
Bool
xf86ReleaseGART(int screenNum)
{
- return FALSE;
+ return FALSE;
}
int
xf86AllocateGARTMemory(int screenNum, unsigned long size, int type,
- unsigned long *physical)
+ unsigned long *physical)
{
- return -1;
+ return -1;
}
Bool
xf86DeallocateGARTMemory(int screenNum, int key)
{
- return FALSE;
+ return FALSE;
}
Bool
xf86BindGARTMemory(int screenNum, int key, unsigned long offset)
{
- return FALSE;
+ return FALSE;
}
-
Bool
xf86UnbindGARTMemory(int screenNum, int key)
{
- return FALSE;
+ return FALSE;
}
Bool
xf86EnableAGP(int screenNum, CARD32 mode)
{
- return FALSE;
+ return FALSE;
}
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 805caccac..30688c0b5 100644
--- a/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c
+++ b/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c
@@ -38,12 +38,11 @@
Bool
xf86EnableIO()
{
- return TRUE;
+ return TRUE;
}
void
xf86DisableIO()
{
- return;
+ return;
}
-
diff --git a/xorg-server/hw/xfree86/os-support/shared/pm_noop.c b/xorg-server/hw/xfree86/os-support/shared/pm_noop.c
index bfac4b1c8..1d6f0789d 100644
--- a/xorg-server/hw/xfree86/os-support/shared/pm_noop.c
+++ b/xorg-server/hw/xfree86/os-support/shared/pm_noop.c
@@ -41,7 +41,5 @@
PMClose
xf86OSPMOpen(void)
{
- return NULL;
+ return NULL;
}
-
-
diff --git a/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c b/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c
index cecec37f7..ba8e234f4 100644
--- a/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c
+++ b/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c
@@ -29,13 +29,13 @@
#include <xorg-config.h>
#endif
-# include <X11/X.h>
-# include "xf86.h"
-# include "xf86Priv.h"
-# include "xf86_OSlib.h"
+#include <X11/X.h>
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
int
-xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure)
+xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure)
{
return 0;
}
@@ -47,25 +47,24 @@ xf86RemoveSIGIOHandler(int fd)
}
int
-xf86BlockSIGIO (void)
+xf86BlockSIGIO(void)
{
return 0;
}
void
-xf86UnblockSIGIO (int wasset)
+xf86UnblockSIGIO(int wasset)
{
}
void
-xf86AssertBlockedSIGIO (char *where)
+xf86AssertBlockedSIGIO(char *where)
{
}
/* XXX This is a quick hack for the benefit of xf86SetSilkenMouse() */
Bool
-xf86SIGIOSupported ()
+xf86SIGIOSupported()
{
return FALSE;
}
-
diff --git a/xorg-server/hw/xfree86/os-support/shared/xf86Axp.h b/xorg-server/hw/xfree86/os-support/shared/xf86Axp.h
index 5e9d6284c..fded9d8c9 100644
--- a/xorg-server/hw/xfree86/os-support/shared/xf86Axp.h
+++ b/xorg-server/hw/xfree86/os-support/shared/xf86Axp.h
@@ -6,29 +6,28 @@
#define _XF86_AXP_H_
typedef enum {
- SYS_NONE,
- TSUNAMI,
- LCA,
- APECS,
- T2,
- T2_GAMMA,
- CIA,
- MCPCIA,
- JENSEN,
- POLARIS,
- PYXIS,
- PYXIS_CIA,
- IRONGATE
+ SYS_NONE,
+ TSUNAMI,
+ LCA,
+ APECS,
+ T2,
+ T2_GAMMA,
+ CIA,
+ MCPCIA,
+ JENSEN,
+ POLARIS,
+ PYXIS,
+ PYXIS_CIA,
+ IRONGATE
} axpDevice;
-
+
typedef struct {
- axpDevice id;
- unsigned long hae_thresh;
- unsigned long hae_mask;
- unsigned long size;
+ axpDevice id;
+ unsigned long hae_thresh;
+ unsigned long hae_mask;
+ unsigned long size;
} axpParams;
extern axpParams xf86AXPParams[];
#endif
-
diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c b/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c
index 8c4e9f5c1..fb58eca81 100644
--- a/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c
+++ b/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c
@@ -51,6 +51,7 @@
static int gartFd = -1;
static int acquiredScreen = -1;
static Bool initDone = FALSE;
+
/*
* Close /dev/agpgart. This frees all associated memory allocated during
* this server generation.
@@ -58,17 +59,17 @@ static Bool initDone = FALSE;
Bool
xf86GARTCloseScreen(int screenNum)
{
- if (gartFd != -1) {
- close(gartFd);
- acquiredScreen = -1;
- gartFd = -1;
- initDone = FALSE;
+ if (gartFd != -1) {
+ close(gartFd);
+ acquiredScreen = -1;
+ gartFd = -1;
+ initDone = FALSE;
- xf86DrvMsg(screenNum, X_INFO,
- "xf86GARTCloseScreen: device closed successfully\n");
+ xf86DrvMsg(screenNum, X_INFO,
+ "xf86GARTCloseScreen: device closed successfully\n");
- }
- return TRUE;
+ }
+ return TRUE;
}
/*
@@ -77,251 +78,249 @@ xf86GARTCloseScreen(int screenNum)
static Bool
GARTInit(int screenNum)
{
- if (initDone)
- return gartFd != -1;
-
- if (gartFd == -1)
- gartFd = open(AGP_DEVICE, O_RDWR);
- else
- return FALSE;
-
- if (gartFd == -1) {
- xf86DrvMsg(screenNum, X_ERROR,
- "GARTInit: Unable to open " AGP_DEVICE " (%s)\n",
- strerror(errno));
- return FALSE;
- }
-
- initDone = TRUE;
- xf86DrvMsg(screenNum, X_INFO,
- "GARTInit: " AGP_DEVICE " opened successfully\n");
-
- return TRUE;
+ if (initDone)
+ return gartFd != -1;
+
+ if (gartFd == -1)
+ gartFd = open(AGP_DEVICE, O_RDWR);
+ else
+ return FALSE;
+
+ if (gartFd == -1) {
+ xf86DrvMsg(screenNum, X_ERROR,
+ "GARTInit: Unable to open " AGP_DEVICE " (%s)\n",
+ strerror(errno));
+ return FALSE;
+ }
+
+ initDone = TRUE;
+ xf86DrvMsg(screenNum, X_INFO,
+ "GARTInit: " AGP_DEVICE " opened successfully\n");
+
+ return TRUE;
}
Bool
xf86AgpGARTSupported(void)
{
- return (GARTInit(-1));
+ return (GARTInit(-1));
}
AgpInfoPtr
xf86GetAGPInfo(int screenNum)
{
- agp_info_t agpinf;
- AgpInfoPtr info;
-
- if (!GARTInit(screenNum))
- return NULL;
-
- if (ioctl(gartFd, AGPIOC_INFO, &agpinf) != 0) {
- xf86DrvMsg(screenNum, X_ERROR,
- "xf86GetAGPInfo: AGPIOC_INFO failed (%s)\n",
- strerror(errno));
- return NULL;
- }
-
- if ((info = calloc(sizeof(AgpInfo), 1)) == NULL) {
- xf86DrvMsg(screenNum, X_ERROR,
- "xf86GetAGPInfo: Failed to allocate AgpInfo\n");
- return NULL;
- }
-
- info->bridgeId = agpinf.agpi_devid;
- info->agpMode = agpinf.agpi_mode;
- info->base = agpinf.agpi_aperbase;
- info->size = agpinf.agpi_apersize;
- info->totalPages = (unsigned long)agpinf.agpi_pgtotal;
- info->systemPages = (unsigned long)agpinf.agpi_pgsystem;
- info->usedPages = (unsigned long)agpinf.agpi_pgused;
-
- return info;
+ agp_info_t agpinf;
+ AgpInfoPtr info;
+
+ if (!GARTInit(screenNum))
+ return NULL;
+
+ if (ioctl(gartFd, AGPIOC_INFO, &agpinf) != 0) {
+ xf86DrvMsg(screenNum, X_ERROR,
+ "xf86GetAGPInfo: AGPIOC_INFO failed (%s)\n",
+ strerror(errno));
+ return NULL;
+ }
+
+ if ((info = calloc(sizeof(AgpInfo), 1)) == NULL) {
+ xf86DrvMsg(screenNum, X_ERROR,
+ "xf86GetAGPInfo: Failed to allocate AgpInfo\n");
+ return NULL;
+ }
+
+ info->bridgeId = agpinf.agpi_devid;
+ info->agpMode = agpinf.agpi_mode;
+ info->base = agpinf.agpi_aperbase;
+ info->size = agpinf.agpi_apersize;
+ info->totalPages = (unsigned long) agpinf.agpi_pgtotal;
+ info->systemPages = (unsigned long) agpinf.agpi_pgsystem;
+ info->usedPages = (unsigned long) agpinf.agpi_pgused;
+
+ return info;
}
Bool
xf86AcquireGART(int screenNum)
{
- if (!GARTInit(screenNum))
- return FALSE;
-
- if (acquiredScreen != screenNum) {
- if (ioctl(gartFd, AGPIOC_ACQUIRE, 0) != 0) {
- xf86DrvMsg(screenNum, X_WARNING,
- "xf86AcquireGART: AGPIOC_ACQUIRE failed (%s)\n",
- strerror(errno));
- return FALSE;
- }
- acquiredScreen = screenNum;
- xf86DrvMsg(screenNum, X_INFO,
- "xf86AcquireGART: AGPIOC_ACQUIRE succeeded\n");
- }
- return TRUE;
+ if (!GARTInit(screenNum))
+ return FALSE;
+
+ if (acquiredScreen != screenNum) {
+ if (ioctl(gartFd, AGPIOC_ACQUIRE, 0) != 0) {
+ xf86DrvMsg(screenNum, X_WARNING,
+ "xf86AcquireGART: AGPIOC_ACQUIRE failed (%s)\n",
+ strerror(errno));
+ return FALSE;
+ }
+ acquiredScreen = screenNum;
+ xf86DrvMsg(screenNum, X_INFO,
+ "xf86AcquireGART: AGPIOC_ACQUIRE succeeded\n");
+ }
+ return TRUE;
}
Bool
xf86ReleaseGART(int screenNum)
{
- if (!GARTInit(screenNum))
- return FALSE;
-
- if (acquiredScreen == screenNum) {
- /*
- * The FreeBSD agp driver removes allocations on release.
- * The Solaris driver doesn't. xf86ReleaseGART() is expected
- * to give up access to the GART, but not to remove any
- * allocations.
- */
-
- if (ioctl(gartFd, AGPIOC_RELEASE, 0) != 0) {
- xf86DrvMsg(screenNum, X_WARNING,
- "xf86ReleaseGART: AGPIOC_RELEASE failed (%s)\n",
- strerror(errno));
- return FALSE;
- }
- acquiredScreen = -1;
- xf86DrvMsg(screenNum, X_INFO,
- "xf86ReleaseGART: AGPIOC_RELEASE succeeded\n");
- return TRUE;
- }
- return FALSE;
+ if (!GARTInit(screenNum))
+ return FALSE;
+
+ if (acquiredScreen == screenNum) {
+ /*
+ * The FreeBSD agp driver removes allocations on release.
+ * The Solaris driver doesn't. xf86ReleaseGART() is expected
+ * to give up access to the GART, but not to remove any
+ * allocations.
+ */
+
+ if (ioctl(gartFd, AGPIOC_RELEASE, 0) != 0) {
+ xf86DrvMsg(screenNum, X_WARNING,
+ "xf86ReleaseGART: AGPIOC_RELEASE failed (%s)\n",
+ strerror(errno));
+ return FALSE;
+ }
+ acquiredScreen = -1;
+ xf86DrvMsg(screenNum, X_INFO,
+ "xf86ReleaseGART: AGPIOC_RELEASE succeeded\n");
+ return TRUE;
+ }
+ return FALSE;
}
int
xf86AllocateGARTMemory(int screenNum, unsigned long size, int type,
- unsigned long *physical)
+ unsigned long *physical)
{
- agp_allocate_t alloc;
- int pages;
-
- /*
- * Allocates "size" bytes of GART memory (rounds up to the next
- * page multiple) or type "type". A handle (key) for the allocated
- * memory is returned. On error, the return value is -1.
- * "size" should be larger than 0, or AGPIOC_ALLOCATE ioctl will
- * return error.
- */
-
- if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
- return -1;
-
- pages = (size / AGP_PAGE_SIZE);
- if (size % AGP_PAGE_SIZE != 0)
- pages++;
-
- alloc.agpa_pgcount = pages;
- alloc.agpa_type = type;
-
- if (ioctl(gartFd, AGPIOC_ALLOCATE, &alloc) != 0) {
- xf86DrvMsg(screenNum, X_WARNING, "xf86AllocateGARTMemory: "
- "allocation of %d pages failed\n\t(%s)\n", pages,
- strerror(errno));
- return -1;
- }
-
- if (physical)
- *physical = (unsigned long)alloc.agpa_physical;
-
- return alloc.agpa_key;
+ agp_allocate_t alloc;
+ int pages;
+
+ /*
+ * Allocates "size" bytes of GART memory (rounds up to the next
+ * page multiple) or type "type". A handle (key) for the allocated
+ * memory is returned. On error, the return value is -1.
+ * "size" should be larger than 0, or AGPIOC_ALLOCATE ioctl will
+ * return error.
+ */
+
+ if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
+ return -1;
+
+ pages = (size / AGP_PAGE_SIZE);
+ if (size % AGP_PAGE_SIZE != 0)
+ pages++;
+
+ alloc.agpa_pgcount = pages;
+ alloc.agpa_type = type;
+
+ if (ioctl(gartFd, AGPIOC_ALLOCATE, &alloc) != 0) {
+ xf86DrvMsg(screenNum, X_WARNING, "xf86AllocateGARTMemory: "
+ "allocation of %d pages failed\n\t(%s)\n", pages,
+ strerror(errno));
+ return -1;
+ }
+
+ if (physical)
+ *physical = (unsigned long) alloc.agpa_physical;
+
+ return alloc.agpa_key;
}
Bool
xf86DeallocateGARTMemory(int screenNum, int key)
{
- if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
- return FALSE;
+ if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
+ return FALSE;
- if (ioctl(gartFd, AGPIOC_DEALLOCATE, (int *)(uintptr_t)key) != 0) {
- xf86DrvMsg(screenNum, X_WARNING, "xf86DeAllocateGARTMemory: "
- "deallocation of gart memory with key %d failed\n"
- "\t(%s)\n", key, strerror(errno));
- return FALSE;
- }
+ if (ioctl(gartFd, AGPIOC_DEALLOCATE, (int *) (uintptr_t) key) != 0) {
+ xf86DrvMsg(screenNum, X_WARNING, "xf86DeAllocateGARTMemory: "
+ "deallocation of gart memory with key %d failed\n"
+ "\t(%s)\n", key, strerror(errno));
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
/* Bind GART memory with "key" at "offset" */
Bool
xf86BindGARTMemory(int screenNum, int key, unsigned long offset)
{
- agp_bind_t bind;
- int pageOffset;
-
- if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
- return FALSE;
-
- if (offset % AGP_PAGE_SIZE != 0) {
- xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: "
- "offset (0x%lx) is not page-aligned (%d)\n",
- offset, AGP_PAGE_SIZE);
- return FALSE;
- }
- pageOffset = offset / AGP_PAGE_SIZE;
-
- xf86DrvMsgVerb(screenNum, X_INFO, 3,
- "xf86BindGARTMemory: bind key %d at 0x%08lx "
- "(pgoffset %d)\n", key, offset, pageOffset);
-
- bind.agpb_pgstart = pageOffset;
- bind.agpb_key = key;
-
- if (ioctl(gartFd, AGPIOC_BIND, &bind) != 0) {
- xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: "
- "binding of gart memory with key %d\n"
- "\tat offset 0x%lx failed (%s)\n",
- key, offset, strerror(errno));
- return FALSE;
- }
-
- return TRUE;
+ agp_bind_t bind;
+ int pageOffset;
+
+ if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
+ return FALSE;
+
+ if (offset % AGP_PAGE_SIZE != 0) {
+ xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: "
+ "offset (0x%lx) is not page-aligned (%d)\n",
+ offset, AGP_PAGE_SIZE);
+ return FALSE;
+ }
+ pageOffset = offset / AGP_PAGE_SIZE;
+
+ xf86DrvMsgVerb(screenNum, X_INFO, 3,
+ "xf86BindGARTMemory: bind key %d at 0x%08lx "
+ "(pgoffset %d)\n", key, offset, pageOffset);
+
+ bind.agpb_pgstart = pageOffset;
+ bind.agpb_key = key;
+
+ if (ioctl(gartFd, AGPIOC_BIND, &bind) != 0) {
+ xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: "
+ "binding of gart memory with key %d\n"
+ "\tat offset 0x%lx failed (%s)\n",
+ key, offset, strerror(errno));
+ return FALSE;
+ }
+
+ return TRUE;
}
/* Unbind GART memory with "key" */
Bool
xf86UnbindGARTMemory(int screenNum, int key)
{
- agp_unbind_t unbind;
+ agp_unbind_t unbind;
- if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
- return FALSE;
+ if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
+ return FALSE;
- unbind.agpu_pri = 0;
- unbind.agpu_key = key;
+ unbind.agpu_pri = 0;
+ unbind.agpu_key = key;
- if (ioctl(gartFd, AGPIOC_UNBIND, &unbind) != 0) {
- xf86DrvMsg(screenNum, X_WARNING, "xf86UnbindGARTMemory: "
- "unbinding of gart memory with key %d "
- "failed (%s)\n", key, strerror(errno));
- return FALSE;
- }
+ if (ioctl(gartFd, AGPIOC_UNBIND, &unbind) != 0) {
+ xf86DrvMsg(screenNum, X_WARNING, "xf86UnbindGARTMemory: "
+ "unbinding of gart memory with key %d "
+ "failed (%s)\n", key, strerror(errno));
+ return FALSE;
+ }
- xf86DrvMsgVerb(screenNum, X_INFO, 3,
- "xf86UnbindGARTMemory: unbind key %d\n", key);
+ xf86DrvMsgVerb(screenNum, X_INFO, 3,
+ "xf86UnbindGARTMemory: unbind key %d\n", key);
- return TRUE;
+ return TRUE;
}
-
/* XXX Interface may change. */
Bool
xf86EnableAGP(int screenNum, CARD32 mode)
{
- agp_setup_t setup;
+ agp_setup_t setup;
- if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
- return FALSE;
+ if (!GARTInit(screenNum) || (acquiredScreen != screenNum))
+ return FALSE;
- setup.agps_mode = mode;
- if (ioctl(gartFd, AGPIOC_SETUP, &setup) != 0) {
- xf86DrvMsg(screenNum, X_WARNING, "xf86EnableAGP: "
- "AGPIOC_SETUP with mode %x failed (%s)\n",
- (unsigned int) mode, strerror(errno));
- return FALSE;
- }
+ setup.agps_mode = mode;
+ if (ioctl(gartFd, AGPIOC_SETUP, &setup) != 0) {
+ xf86DrvMsg(screenNum, X_WARNING, "xf86EnableAGP: "
+ "AGPIOC_SETUP with mode %x failed (%s)\n",
+ (unsigned int) mode, strerror(errno));
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
-
diff --git a/xorg-server/hw/xfree86/os-support/stub/stub_bios.c b/xorg-server/hw/xfree86/os-support/stub/stub_bios.c
index 8628316dd..dbc92fcdb 100644
--- a/xorg-server/hw/xfree86/os-support/stub/stub_bios.c
+++ b/xorg-server/hw/xfree86/os-support/stub/stub_bios.c
@@ -6,7 +6,7 @@
int
xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
- int Len)
+ int Len)
{
- return -1;
+ return -1;
}
diff --git a/xorg-server/hw/xfree86/os-support/stub/stub_init.c b/xorg-server/hw/xfree86/os-support/stub/stub_init.c
index 36fd2b818..629675d68 100644
--- a/xorg-server/hw/xfree86/os-support/stub/stub_init.c
+++ b/xorg-server/hw/xfree86/os-support/stub/stub_init.c
@@ -17,7 +17,7 @@ xf86CloseConsole()
int
xf86ProcessArgument(int argc, char *argv[], int i)
{
- return 0;
+ return 0;
}
void
diff --git a/xorg-server/hw/xfree86/os-support/stub/stub_video.c b/xorg-server/hw/xfree86/os-support/stub/stub_video.c
index 327496839..9771fcf6e 100644
--- a/xorg-server/hw/xfree86/os-support/stub/stub_video.c
+++ b/xorg-server/hw/xfree86/os-support/stub/stub_video.c
@@ -8,6 +8,6 @@
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
- pVidMem->initialised = TRUE;
- return;
+ pVidMem->initialised = TRUE;
+ return;
}
diff --git a/xorg-server/hw/xfree86/os-support/xf86OSpriv.h b/xorg-server/hw/xfree86/os-support/xf86OSpriv.h
index 754128de9..65769c16f 100644
--- a/xorg-server/hw/xfree86/os-support/xf86OSpriv.h
+++ b/xorg-server/hw/xfree86/os-support/xf86OSpriv.h
@@ -32,25 +32,25 @@
#ifndef _XF86OSPRIV_H
#define _XF86OSPRIV_H
-typedef pointer (*MapMemProcPtr)(int, unsigned long, unsigned long, int);
-typedef void (*UnmapMemProcPtr)(int, pointer, unsigned long);
-typedef pointer (*SetWCProcPtr)(int, unsigned long, unsigned long, Bool,
- MessageType);
-typedef void (*ProtectMemProcPtr)(int, pointer, unsigned long, Bool);
-typedef void (*UndoWCProcPtr)(int, pointer);
-typedef void (*ReadSideEffectsProcPtr)(int, pointer, unsigned long);
+typedef pointer (*MapMemProcPtr) (int, unsigned long, unsigned long, int);
+typedef void (*UnmapMemProcPtr) (int, pointer, unsigned long);
+typedef pointer (*SetWCProcPtr) (int, unsigned long, unsigned long, Bool,
+ MessageType);
+typedef void (*ProtectMemProcPtr) (int, pointer, unsigned long, Bool);
+typedef void (*UndoWCProcPtr) (int, pointer);
+typedef void (*ReadSideEffectsProcPtr) (int, pointer, unsigned long);
typedef struct {
- Bool initialised;
- MapMemProcPtr mapMem;
- UnmapMemProcPtr unmapMem;
- ProtectMemProcPtr protectMem;
- SetWCProcPtr setWC;
- UndoWCProcPtr undoWC;
- ReadSideEffectsProcPtr readSideEffects;
- Bool linearSupported;
+ Bool initialised;
+ MapMemProcPtr mapMem;
+ UnmapMemProcPtr unmapMem;
+ ProtectMemProcPtr protectMem;
+ SetWCProcPtr setWC;
+ UndoWCProcPtr undoWC;
+ ReadSideEffectsProcPtr readSideEffects;
+ Bool linearSupported;
} VidMemInfo, *VidMemInfoPtr;
void xf86OSInitVidMem(VidMemInfoPtr);
-#endif /* _XF86OSPRIV_H */
+#endif /* _XF86OSPRIV_H */
diff --git a/xorg-server/hw/xfree86/os-support/xf86_OSlib.h b/xorg-server/hw/xfree86/os-support/xf86_OSlib.h
index 45500dbdb..9161e181e 100644
--- a/xorg-server/hw/xfree86/os-support/xf86_OSlib.h
+++ b/xorg-server/hw/xfree86/os-support/xf86_OSlib.h
@@ -85,152 +85,150 @@
/**************************************************************************/
#if (defined(SYSV) || defined(SVR4)) && \
(defined(sun) || defined(__i386__))
-# include <sys/ioctl.h>
-# include <signal.h>
-# include <termio.h>
-# include <sys/stat.h>
-# include <sys/types.h>
-
-
-# include <errno.h>
-
-# if defined(_NEED_SYSI86)
-# if !(defined (sun) && defined (SVR4))
-# include <sys/immu.h>
-# include <sys/region.h>
-# include <sys/proc.h>
-# endif
-# include <sys/tss.h>
-# include <sys/sysi86.h>
-# if defined(SVR4) && !defined(sun)
-# include <sys/seg.h>
-# endif /* SVR4 && !sun */
+#include <sys/ioctl.h>
+#include <signal.h>
+#include <termio.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <errno.h>
+
+#if defined(_NEED_SYSI86)
+#if !(defined (sun) && defined (SVR4))
+#include <sys/immu.h>
+#include <sys/region.h>
+#include <sys/proc.h>
+#endif
+#include <sys/tss.h>
+#include <sys/sysi86.h>
+#if defined(SVR4) && !defined(sun)
+#include <sys/seg.h>
+#endif /* SVR4 && !sun */
/* V86SC_IOPL was moved to <sys/sysi86.h> on Solaris 7 and later */
-# if !defined(V86SC_IOPL) /* Solaris 7 or later? */
-# include <sys/v86.h> /* Nope */
-# endif
-# if defined(sun) && (defined (__i386__) || defined(__i386) || defined(__x86)) && defined (SVR4)
-# include <sys/psw.h>
-# endif
-# endif /* _NEED_SYSI86 */
-
-# if defined(HAS_SVR3_MMAPDRV)
-# include <sys/sysmacros.h>
-# if !defined(_NEED_SYSI86)
-# include <sys/immu.h>
-# include <sys/region.h>
-# endif
-# include <sys/mmap.h> /* MMAP driver header */
-# endif
-
-# if !defined(sun) || defined(HAVE_SYS_VT_H)
-# define HAS_USL_VTS
-# endif
-# if !defined(sun)
-# include <sys/emap.h>
-# endif
-# if defined(HAS_USL_VTS)
-# if !defined(sun)
-# include <sys/at_ansi.h>
-# endif
-# include <sys/kd.h>
-# include <sys/vt.h>
-# endif
-
-# if defined(sun)
-# include <sys/fbio.h>
-# include <sys/kbd.h>
-# include <sys/kbio.h>
-
-/* undefine symbols from <sys/kbd.h> we don't need that conflict with enum
- definitions in parser/xf86tokens.h */
-# undef STRING
-# undef LEFTALT
-# undef RIGHTALT
+#if !defined(V86SC_IOPL) /* Solaris 7 or later? */
+#include <sys/v86.h> /* Nope */
+#endif
+#if defined(sun) && (defined (__i386__) || defined(__i386) || defined(__x86)) && defined (SVR4)
+#include <sys/psw.h>
+#endif
+#endif /* _NEED_SYSI86 */
-# define LED_CAP LED_CAPS_LOCK
-# define LED_NUM LED_NUM_LOCK
-# define LED_SCR LED_SCROLL_LOCK
-# define LED_COMP LED_COMPOSE
-# endif /* sun */
+#if defined(HAS_SVR3_MMAPDRV)
+#include <sys/sysmacros.h>
+#if !defined(_NEED_SYSI86)
+#include <sys/immu.h>
+#include <sys/region.h>
+#endif
+#include <sys/mmap.h> /* MMAP driver header */
+#endif
-# if !defined(VT_ACKACQ)
-# define VT_ACKACQ 2
-# endif /* !VT_ACKACQ */
+#if !defined(sun) || defined(HAVE_SYS_VT_H)
+#define HAS_USL_VTS
+#endif
+#if !defined(sun)
+#include <sys/emap.h>
+#endif
+#if defined(HAS_USL_VTS)
+#if !defined(sun)
+#include <sys/at_ansi.h>
+#endif
+#include <sys/kd.h>
+#include <sys/vt.h>
+#endif
+#if defined(sun)
+#include <sys/fbio.h>
+#include <sys/kbd.h>
+#include <sys/kbio.h>
-# if defined(SVR4)
-# include <sys/mman.h>
-# if !(defined(sun) && defined (SVR4))
-# define DEV_MEM "/dev/pmem"
-# endif
-# define CLEARDTR_SUPPORT
-# define POSIX_TTY
-# endif /* SVR4 */
+/* undefine symbols from <sys/kbd.h> we don't need that conflict with enum
+ definitions in parser/xf86tokens.h */
+#undef STRING
+#undef LEFTALT
+#undef RIGHTALT
+
+#define LED_CAP LED_CAPS_LOCK
+#define LED_NUM LED_NUM_LOCK
+#define LED_SCR LED_SCROLL_LOCK
+#define LED_COMP LED_COMPOSE
+#endif /* sun */
+
+#if !defined(VT_ACKACQ)
+#define VT_ACKACQ 2
+#endif /* !VT_ACKACQ */
+
+#if defined(SVR4)
+#include <sys/mman.h>
+#if !(defined(sun) && defined (SVR4))
+#define DEV_MEM "/dev/pmem"
+#endif
+#define CLEARDTR_SUPPORT
+#define POSIX_TTY
+#endif /* SVR4 */
-#endif /* (SYSV || SVR4) */
+#endif /* (SYSV || SVR4) */
/**************************************************************************/
/* Linux or Glibc-based system */
/**************************************************************************/
#if defined(__linux__) || defined(__GLIBC__)
-# include <sys/ioctl.h>
-# include <signal.h>
-# include <stdlib.h>
-# include <sys/types.h>
-# include <assert.h>
-
-# ifdef __linux__
-# include <termio.h>
-# else /* __GLIBC__ */
-# include <termios.h>
-# endif
-# ifdef __sparc__
-# include <sys/param.h>
-# endif
-
-# include <errno.h>
-
-# include <sys/stat.h>
-
-# include <sys/mman.h>
-# ifdef __linux__
-# define HAS_USL_VTS
-# include <sys/kd.h>
-# include <sys/vt.h>
-# define LDGMAP GIO_SCRNMAP
-# define LDSMAP PIO_SCRNMAP
-# define LDNMAP LDSMAP
-# define CLEARDTR_SUPPORT
-# endif
-
-# define POSIX_TTY
-
-#endif /* __linux__ || __GLIBC__ */
+#include <sys/ioctl.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <assert.h>
+
+#ifdef __linux__
+#include <termio.h>
+#else /* __GLIBC__ */
+#include <termios.h>
+#endif
+#ifdef __sparc__
+#include <sys/param.h>
+#endif
+
+#include <errno.h>
+
+#include <sys/stat.h>
+
+#include <sys/mman.h>
+#ifdef __linux__
+#define HAS_USL_VTS
+#include <sys/kd.h>
+#include <sys/vt.h>
+#define LDGMAP GIO_SCRNMAP
+#define LDSMAP PIO_SCRNMAP
+#define LDNMAP LDSMAP
+#define CLEARDTR_SUPPORT
+#endif
+
+#define POSIX_TTY
+
+#endif /* __linux__ || __GLIBC__ */
/**************************************************************************/
/* 386BSD and derivatives, BSD/386 */
/**************************************************************************/
#if defined(__386BSD__) && (defined(__FreeBSD__) || defined(__NetBSD__))
-# undef __386BSD__
+#undef __386BSD__
#endif
#ifdef CSRG_BASED
-# include <sys/ioctl.h>
-# include <signal.h>
+#include <sys/ioctl.h>
+#include <signal.h>
-# include <termios.h>
-# define termio termios
-# define POSIX_TTY
+#include <termios.h>
+#define termio termios
+#define POSIX_TTY
-# include <errno.h>
+#include <errno.h>
-# include <sys/types.h>
-# include <sys/mman.h>
-# include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
-#endif /* CSRG_BASED */
+#endif /* CSRG_BASED */
/**************************************************************************/
/* Kernel of *BSD */
@@ -238,92 +236,92 @@
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
-# include <sys/param.h>
-# if defined(__FreeBSD_version) && !defined(__FreeBSD_kernel_version)
-# define __FreeBSD_kernel_version __FreeBSD_version
-# endif
+#include <sys/param.h>
+#if defined(__FreeBSD_version) && !defined(__FreeBSD_kernel_version)
+#define __FreeBSD_kernel_version __FreeBSD_version
+#endif
-# if !defined(LINKKIT)
+#if !defined(LINKKIT)
/* Don't need this stuff for the Link Kit */
-# ifdef SYSCONS_SUPPORT
-# define COMPAT_SYSCONS
-# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
-# if defined(__DragonFly__) || (__FreeBSD_kernel_version >= 410000)
-# include <sys/consio.h>
-# include <sys/kbio.h>
-# else
-# include <machine/console.h>
-# endif /* FreeBSD 4.1 RELEASE or lator */
-# else
-# include <sys/console.h>
-# endif
-# endif /* SYSCONS_SUPPORT */
-# if defined(PCVT_SUPPORT) && !defined(__NetBSD__) && !defined(__OpenBSD__)
-# if !defined(SYSCONS_SUPPORT)
+#ifdef SYSCONS_SUPPORT
+#define COMPAT_SYSCONS
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+#if defined(__DragonFly__) || (__FreeBSD_kernel_version >= 410000)
+#include <sys/consio.h>
+#include <sys/kbio.h>
+#else
+#include <machine/console.h>
+#endif /* FreeBSD 4.1 RELEASE or lator */
+#else
+#include <sys/console.h>
+#endif
+#endif /* SYSCONS_SUPPORT */
+#if defined(PCVT_SUPPORT) && !defined(__NetBSD__) && !defined(__OpenBSD__)
+#if !defined(SYSCONS_SUPPORT)
/* no syscons, so include pcvt specific header file */
-# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-# include <machine/pcvt_ioctl.h>
-# else
-# include <sys/pcvt_ioctl.h>
-# endif /* __FreeBSD_kernel__ */
-# else /* pcvt and syscons: hard-code the ID magic */
-# define VGAPCVTID _IOWR('V',113, struct pcvtid)
- struct pcvtid {
- char name[16];
- int rmajor, rminor;
- };
-# endif /* PCVT_SUPPORT && SYSCONS_SUPPORT */
-# endif /* PCVT_SUPPORT */
-# ifdef WSCONS_SUPPORT
-# include <dev/wscons/wsconsio.h>
-# include <dev/wscons/wsdisplay_usl_io.h>
-# endif /* WSCONS_SUPPORT */
-# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
-# if defined(__FreeBSD_kernel_version) && (__FreeBSD_kernel_version >= 500013)
-# include <sys/mouse.h>
-# else
-# undef MOUSE_GETINFO
-# include <machine/mouse.h>
-# endif
-# endif
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include <machine/pcvt_ioctl.h>
+#else
+#include <sys/pcvt_ioctl.h>
+#endif /* __FreeBSD_kernel__ */
+#else /* pcvt and syscons: hard-code the ID magic */
+#define VGAPCVTID _IOWR('V',113, struct pcvtid)
+struct pcvtid {
+ char name[16];
+ int rmajor, rminor;
+};
+#endif /* PCVT_SUPPORT && SYSCONS_SUPPORT */
+#endif /* PCVT_SUPPORT */
+#ifdef WSCONS_SUPPORT
+#include <dev/wscons/wsconsio.h>
+#include <dev/wscons/wsdisplay_usl_io.h>
+#endif /* WSCONS_SUPPORT */
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+#if defined(__FreeBSD_kernel_version) && (__FreeBSD_kernel_version >= 500013)
+#include <sys/mouse.h>
+#else
+#undef MOUSE_GETINFO
+#include <machine/mouse.h>
+#endif
+#endif
/* Include these definitions in case ioctl_pc.h didn't get included */
-# ifndef CONSOLE_X_MODE_ON
-# define CONSOLE_X_MODE_ON _IO('t',121)
-# endif
-# ifndef CONSOLE_X_MODE_OFF
-# define CONSOLE_X_MODE_OFF _IO('t',122)
-# endif
-# ifndef CONSOLE_X_BELL
-# define CONSOLE_X_BELL _IOW('t',123,int[2])
-# endif
-# ifndef CONSOLE_X_TV_ON
-# define CONSOLE_X_TV_ON _IOW('t',155,int)
-# define XMODE_RGB 0
-# define XMODE_NTSC 1
-# define XMODE_PAL 2
-# define XMODE_SECAM 3
-# endif
-# ifndef CONSOLE_X_TV_OFF
-# define CONSOLE_X_TV_OFF _IO('t',156)
-# endif
+#ifndef CONSOLE_X_MODE_ON
+#define CONSOLE_X_MODE_ON _IO('t',121)
+#endif
+#ifndef CONSOLE_X_MODE_OFF
+#define CONSOLE_X_MODE_OFF _IO('t',122)
+#endif
+#ifndef CONSOLE_X_BELL
+#define CONSOLE_X_BELL _IOW('t',123,int[2])
+#endif
+#ifndef CONSOLE_X_TV_ON
+#define CONSOLE_X_TV_ON _IOW('t',155,int)
+#define XMODE_RGB 0
+#define XMODE_NTSC 1
+#define XMODE_PAL 2
+#define XMODE_SECAM 3
+#endif
+#ifndef CONSOLE_X_TV_OFF
+#define CONSOLE_X_TV_OFF _IO('t',156)
+#endif
#ifndef CONSOLE_GET_LINEAR_INFO
-# define CONSOLE_GET_LINEAR_INFO _IOR('t',157,struct map_info)
+#define CONSOLE_GET_LINEAR_INFO _IOR('t',157,struct map_info)
#endif
-#ifndef CONSOLE_GET_IO_INFO
-# define CONSOLE_GET_IO_INFO _IOR('t',158,struct map_info)
+#ifndef CONSOLE_GET_IO_INFO
+#define CONSOLE_GET_IO_INFO _IOR('t',158,struct map_info)
#endif
-#ifndef CONSOLE_GET_MEM_INFO
-# define CONSOLE_GET_MEM_INFO _IOR('t',159,struct map_info)
+#ifndef CONSOLE_GET_MEM_INFO
+#define CONSOLE_GET_MEM_INFO _IOR('t',159,struct map_info)
#endif
-# endif /* !LINKKIT */
+#endif /* !LINKKIT */
#if defined(USE_I386_IOPL) || defined(USE_AMD64_IOPL)
#include <machine/sysarch.h>
#endif
-# define CLEARDTR_SUPPORT
+#define CLEARDTR_SUPPORT
-#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */
+#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */
/**************************************************************************/
/* IRIX */
@@ -333,7 +331,7 @@
/* Generic */
/**************************************************************************/
-#include <sys/wait.h> /* May need to adjust this for other OSs */
+#include <sys/wait.h> /* May need to adjust this for other OSs */
/* For PATH_MAX */
#include "misc.h"
@@ -343,21 +341,20 @@
* and it's safe, so just do it.
*/
#if !defined(O_NDELAY) && defined(O_NONBLOCK)
-# define O_NDELAY O_NONBLOCK
-#endif /* !O_NDELAY && O_NONBLOCK */
+#define O_NDELAY O_NONBLOCK
+#endif /* !O_NDELAY && O_NONBLOCK */
#if !defined(MAXHOSTNAMELEN)
-# define MAXHOSTNAMELEN 32
-#endif /* !MAXHOSTNAMELEN */
+#define MAXHOSTNAMELEN 32
+#endif /* !MAXHOSTNAMELEN */
#if defined(_POSIX_SOURCE)
-# include <limits.h>
+#include <limits.h>
#else
-# define _POSIX_SOURCE
-# include <limits.h>
-# undef _POSIX_SOURCE
-#endif /* _POSIX_SOURCE */
-
+#define _POSIX_SOURCE
+#include <limits.h>
+#undef _POSIX_SOURCE
+#endif /* _POSIX_SOURCE */
#ifndef DEV_MEM
#define DEV_MEM "/dev/mem"
@@ -376,4 +373,4 @@
#include "compiler.h"
#endif
-#endif /* _XF86_OSLIB_H */
+#endif /* _XF86_OSLIB_H */
diff --git a/xorg-server/hw/xfree86/parser/xf86tokens.h b/xorg-server/hw/xfree86/parser/xf86tokens.h
index a9856064e..f751b7b0e 100644
--- a/xorg-server/hw/xfree86/parser/xf86tokens.h
+++ b/xorg-server/hw/xfree86/parser/xf86tokens.h
@@ -52,7 +52,6 @@
* authorization from the copyright holder(s) and author(s).
*/
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
@@ -70,13 +69,13 @@
typedef enum {
/* errno-style tokens */
- OBSOLETE_TOKEN = -5,
- EOF_TOKEN = -4,
- LOCK_TOKEN = -3,
- ERROR_TOKEN = -2,
+ OBSOLETE_TOKEN = -5,
+ EOF_TOKEN = -4,
+ LOCK_TOKEN = -3,
+ ERROR_TOKEN = -2,
/* value type tokens */
- NUMBER = 1,
+ NUMBER = 1,
STRING,
/* Tokens that can appear in many sections */
@@ -148,7 +147,7 @@ typedef enum {
DEFAULTDEPTH,
DEFAULTBPP,
DEFAULTFBBPP,
-
+
/* VideoAdaptor tokens */
VIDEOADAPTOR,
@@ -170,7 +169,7 @@ typedef enum {
LOAD,
LOAD_DRIVER,
DISABLE,
-
+
/* Device tokens */
DRIVER,
CHIPSET,
@@ -251,7 +250,7 @@ typedef enum {
DEPTH,
BPP,
WEIGHT,
-
+
/* Layout Tokens */
SCREEN,
INACTIVE,
@@ -289,4 +288,4 @@ typedef enum {
MATCH_IS_TOUCHSCREEN
} ParserTokens;
-#endif /* _xf86_tokens_h */
+#endif /* _xf86_tokens_h */
diff --git a/xorg-server/hw/xfree86/ramdac/BTPriv.h b/xorg-server/hw/xfree86/ramdac/BTPriv.h
index 52737768f..95f288009 100644
--- a/xorg-server/hw/xfree86/ramdac/BTPriv.h
+++ b/xorg-server/hw/xfree86/ramdac/BTPriv.h
@@ -6,15 +6,15 @@
#include "BT.h"
typedef struct {
- const char *DeviceName;
+ const char *DeviceName;
} xf86BTramdacInfo;
extern xf86BTramdacInfo BTramdacDeviceInfo[];
#ifdef INIT_BT_RAMDAC_INFO
xf86BTramdacInfo BTramdacDeviceInfo[] = {
- {"AT&T 20C504"},
- {"AT&T 20C505"},
- {"BT485/484"}
+ {"AT&T 20C504"},
+ {"AT&T 20C505"},
+ {"BT485/484"}
};
#endif
diff --git a/xorg-server/hw/xfree86/ramdac/IBMPriv.h b/xorg-server/hw/xfree86/ramdac/IBMPriv.h
index 309a193ad..48588c851 100644
--- a/xorg-server/hw/xfree86/ramdac/IBMPriv.h
+++ b/xorg-server/hw/xfree86/ramdac/IBMPriv.h
@@ -6,22 +6,22 @@
#include "IBM.h"
typedef struct {
- const char *DeviceName;
+ const char *DeviceName;
} xf86IBMramdacInfo;
extern xf86IBMramdacInfo IBMramdacDeviceInfo[];
#ifdef INIT_IBM_RAMDAC_INFO
xf86IBMramdacInfo IBMramdacDeviceInfo[] = {
- {"IBM 524"},
- {"IBM 524A"},
- {"IBM 525"},
- {"IBM 526"},
- {"IBM 526DB(DoubleBuffer)"},
- {"IBM 528"},
- {"IBM 528A"},
- {"IBM 624"},
- {"IBM 624DB(DoubleBuffer)"},
- {"IBM 640"}
+ {"IBM 524"},
+ {"IBM 524A"},
+ {"IBM 525"},
+ {"IBM 526"},
+ {"IBM 526DB(DoubleBuffer)"},
+ {"IBM 528"},
+ {"IBM 528A"},
+ {"IBM 624"},
+ {"IBM 624DB(DoubleBuffer)"},
+ {"IBM 640"}
};
#endif
diff --git a/xorg-server/hw/xfree86/ramdac/TIPriv.h b/xorg-server/hw/xfree86/ramdac/TIPriv.h
index 20e07f5cc..ece03483b 100644
--- a/xorg-server/hw/xfree86/ramdac/TIPriv.h
+++ b/xorg-server/hw/xfree86/ramdac/TIPriv.h
@@ -6,15 +6,15 @@
#include "TI.h"
typedef struct {
- const char *DeviceName;
+ const char *DeviceName;
} xf86TIramdacInfo;
extern xf86TIramdacInfo TIramdacDeviceInfo[];
#ifdef INIT_TI_RAMDAC_INFO
xf86TIramdacInfo TIramdacDeviceInfo[] = {
- {"TI TVP3030"},
- {"TI TVP3026"}
+ {"TI TVP3030"},
+ {"TI TVP3026"}
};
#endif
diff --git a/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h b/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h
index 76e714b32..062b2eb7c 100644
--- a/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h
+++ b/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h
@@ -1,51 +1,52 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _XF86CURSORPRIV_H
-#define _XF86CURSORPRIV_H
-
-#include "xf86Cursor.h"
-#include "mipointrst.h"
-
-typedef struct {
- Bool SWCursor;
- Bool isUp;
- Bool showTransparent;
- short HotX;
- short HotY;
- short x;
- short y;
- CursorPtr CurrentCursor, CursorToRestore;
- xf86CursorInfoPtr CursorInfoPtr;
- CloseScreenProcPtr CloseScreen;
- RecolorCursorProcPtr RecolorCursor;
- InstallColormapProcPtr InstallColormap;
- QueryBestSizeProcPtr QueryBestSize;
- miPointerSpriteFuncPtr spriteFuncs;
- Bool PalettedCursor;
- ColormapPtr pInstalledMap;
- Bool (*SwitchMode)(int, DisplayModePtr,int);
- xf86EnableDisableFBAccessProc *EnableDisableFBAccess;
- CursorPtr SavedCursor;
-
- /* Number of requests to force HW cursor */
- int ForceHWCursorCount;
- Bool HWCursorForced;
-
- pointer transparentData;
-} xf86CursorScreenRec, *xf86CursorScreenPtr;
-
-void xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y);
-void xf86SetTransparentCursor(ScreenPtr pScreen);
-void xf86MoveCursor(ScreenPtr pScreen, int x, int y);
-void xf86RecolorCursor(ScreenPtr pScreen, CursorPtr pCurs, Bool displayed);
-Bool xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr);
-
-CARD32 xf86ReverseBitOrder(CARD32 data);
-
-extern _X_EXPORT DevPrivateKeyRec xf86CursorScreenKeyRec;
-#define xf86CursorScreenKey (&xf86CursorScreenKeyRec)
-
-#endif /* _XF86CURSORPRIV_H */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#ifndef _XF86CURSORPRIV_H
+#define _XF86CURSORPRIV_H
+
+#include "xf86Cursor.h"
+#include "mipointrst.h"
+
+typedef struct {
+ Bool SWCursor;
+ Bool isUp;
+ Bool showTransparent;
+ short HotX;
+ short HotY;
+ short x;
+ short y;
+ CursorPtr CurrentCursor, CursorToRestore;
+ xf86CursorInfoPtr CursorInfoPtr;
+ CloseScreenProcPtr CloseScreen;
+ RecolorCursorProcPtr RecolorCursor;
+ InstallColormapProcPtr InstallColormap;
+ QueryBestSizeProcPtr QueryBestSize;
+ miPointerSpriteFuncPtr spriteFuncs;
+ Bool PalettedCursor;
+ ColormapPtr pInstalledMap;
+ Bool (*SwitchMode) (int, DisplayModePtr, int);
+ xf86EnableDisableFBAccessProc *EnableDisableFBAccess;
+ CursorPtr SavedCursor;
+
+ /* Number of requests to force HW cursor */
+ int ForceHWCursorCount;
+ Bool HWCursorForced;
+
+ pointer transparentData;
+} xf86CursorScreenRec, *xf86CursorScreenPtr;
+
+void xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y);
+void xf86SetTransparentCursor(ScreenPtr pScreen);
+void xf86MoveCursor(ScreenPtr pScreen, int x, int y);
+void xf86RecolorCursor(ScreenPtr pScreen, CursorPtr pCurs, Bool displayed);
+Bool xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr);
+
+CARD32 xf86ReverseBitOrder(CARD32 data);
+
+extern _X_EXPORT DevPrivateKeyRec xf86CursorScreenKeyRec;
+
+#define xf86CursorScreenKey (&xf86CursorScreenKeyRec)
+
+#endif /* _XF86CURSORPRIV_H */
diff --git a/xorg-server/hw/xfree86/ramdac/xf86RamDac.c b/xorg-server/hw/xfree86/ramdac/xf86RamDac.c
index a170444a9..a67164917 100644
--- a/xorg-server/hw/xfree86/ramdac/xf86RamDac.c
+++ b/xorg-server/hw/xfree86/ramdac/xf86RamDac.c
@@ -1,152 +1,152 @@
-/*
- * Copyright 1998 by Alan Hourihane, Wigan, England.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Alan Hourihane not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Alan Hourihane makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as is" without express or implied warranty.
- *
- * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- * Authors: Alan Hourihane, <alanh@fairlite.demon.co.uk>
- *
- * Generic RAMDAC access routines.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86.h"
-#include "xf86_OSproc.h"
-
-#include "xf86RamDacPriv.h"
-
-int RamDacHWPrivateIndex = -1;
-int RamDacScreenPrivateIndex = -1;
-
-RamDacRecPtr
-RamDacCreateInfoRec(void)
-{
- RamDacRecPtr infoRec;
-
- infoRec = calloc(1, sizeof(RamDacRec));
-
- return infoRec;
-}
-
-RamDacHelperRecPtr
-RamDacHelperCreateInfoRec(void)
-{
- RamDacHelperRecPtr infoRec;
-
- infoRec = calloc(1, sizeof(RamDacHelperRec));
-
- return infoRec;
-}
-
-void
-RamDacDestroyInfoRec(RamDacRecPtr infoRec)
-{
- free(infoRec);
-}
-
-void
-RamDacHelperDestroyInfoRec(RamDacHelperRecPtr infoRec)
-{
- free(infoRec);
-}
-
-Bool
-RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPriv)
-{
- RamDacScreenRecPtr ramdacScrPtr;
-
- /*
- * make sure the RamDacRec is allocated
- */
- if (!RamDacGetRec(pScrn))
- return FALSE;
- ramdacScrPtr =
- ((RamDacScreenRecPtr) (pScrn)->privates[RamDacGetScreenIndex()].ptr);
- ramdacScrPtr->RamDacRec = ramdacPriv;
-
- return TRUE;
-}
-
-void
-RamDacGetRecPrivate(void)
-{
- if (RamDacHWPrivateIndex < 0)
- RamDacHWPrivateIndex = xf86AllocateScrnInfoPrivateIndex();
- if (RamDacScreenPrivateIndex < 0)
- RamDacScreenPrivateIndex = xf86AllocateScrnInfoPrivateIndex();
- return;
-}
-
-Bool
-RamDacGetRec(ScrnInfoPtr scrp)
-{
- RamDacGetRecPrivate();
- /*
- * New privates are always set to NULL, so we can check if the allocation
- * has already been done.
- */
- if (scrp->privates[RamDacHWPrivateIndex].ptr != NULL)
- return TRUE;
- if (scrp->privates[RamDacScreenPrivateIndex].ptr != NULL)
- return TRUE;
-
- scrp->privates[RamDacHWPrivateIndex].ptr =
- xnfcalloc(sizeof(RamDacHWRec), 1);
- scrp->privates[RamDacScreenPrivateIndex].ptr =
- xnfcalloc(sizeof(RamDacScreenRec), 1);
-
- return TRUE;
-}
-
-void
-RamDacFreeRec(ScrnInfoPtr pScrn)
-{
- RamDacHWRecPtr ramdacHWPtr;
- RamDacScreenRecPtr ramdacScrPtr;
-
- if (RamDacHWPrivateIndex < 0)
- return;
-
- if (RamDacScreenPrivateIndex < 0)
- return;
-
- ramdacHWPtr = RAMDACHWPTR(pScrn);
- ramdacScrPtr = ((RamDacScreenRecPtr)
- (pScrn)->privates[RamDacGetScreenIndex()].ptr);
-
- free(ramdacHWPtr);
- ramdacHWPtr = NULL;
-
- free(ramdacScrPtr);
- ramdacScrPtr = NULL;
-}
-
-int
-RamDacGetHWIndex(void)
-{
- return RamDacHWPrivateIndex;
-}
-
-int
-RamDacGetScreenIndex(void)
-{
- return RamDacScreenPrivateIndex;
-}
+/*
+ * Copyright 1998 by Alan Hourihane, Wigan, England.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Alan Hourihane not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Alan Hourihane makes no representations
+ * about the suitability of this software for any purpose. It is provided
+ * "as is" without express or implied warranty.
+ *
+ * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Authors: Alan Hourihane, <alanh@fairlite.demon.co.uk>
+ *
+ * Generic RAMDAC access routines.
+ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include "xf86.h"
+#include "xf86_OSproc.h"
+
+#include "xf86RamDacPriv.h"
+
+int RamDacHWPrivateIndex = -1;
+int RamDacScreenPrivateIndex = -1;
+
+RamDacRecPtr
+RamDacCreateInfoRec(void)
+{
+ RamDacRecPtr infoRec;
+
+ infoRec = calloc(1, sizeof(RamDacRec));
+
+ return infoRec;
+}
+
+RamDacHelperRecPtr
+RamDacHelperCreateInfoRec(void)
+{
+ RamDacHelperRecPtr infoRec;
+
+ infoRec = calloc(1, sizeof(RamDacHelperRec));
+
+ return infoRec;
+}
+
+void
+RamDacDestroyInfoRec(RamDacRecPtr infoRec)
+{
+ free(infoRec);
+}
+
+void
+RamDacHelperDestroyInfoRec(RamDacHelperRecPtr infoRec)
+{
+ free(infoRec);
+}
+
+Bool
+RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPriv)
+{
+ RamDacScreenRecPtr ramdacScrPtr;
+
+ /*
+ * make sure the RamDacRec is allocated
+ */
+ if (!RamDacGetRec(pScrn))
+ return FALSE;
+ ramdacScrPtr =
+ ((RamDacScreenRecPtr) (pScrn)->privates[RamDacGetScreenIndex()].ptr);
+ ramdacScrPtr->RamDacRec = ramdacPriv;
+
+ return TRUE;
+}
+
+void
+RamDacGetRecPrivate(void)
+{
+ if (RamDacHWPrivateIndex < 0)
+ RamDacHWPrivateIndex = xf86AllocateScrnInfoPrivateIndex();
+ if (RamDacScreenPrivateIndex < 0)
+ RamDacScreenPrivateIndex = xf86AllocateScrnInfoPrivateIndex();
+ return;
+}
+
+Bool
+RamDacGetRec(ScrnInfoPtr scrp)
+{
+ RamDacGetRecPrivate();
+ /*
+ * New privates are always set to NULL, so we can check if the allocation
+ * has already been done.
+ */
+ if (scrp->privates[RamDacHWPrivateIndex].ptr != NULL)
+ return TRUE;
+ if (scrp->privates[RamDacScreenPrivateIndex].ptr != NULL)
+ return TRUE;
+
+ scrp->privates[RamDacHWPrivateIndex].ptr =
+ xnfcalloc(sizeof(RamDacHWRec), 1);
+ scrp->privates[RamDacScreenPrivateIndex].ptr =
+ xnfcalloc(sizeof(RamDacScreenRec), 1);
+
+ return TRUE;
+}
+
+void
+RamDacFreeRec(ScrnInfoPtr pScrn)
+{
+ RamDacHWRecPtr ramdacHWPtr;
+ RamDacScreenRecPtr ramdacScrPtr;
+
+ if (RamDacHWPrivateIndex < 0)
+ return;
+
+ if (RamDacScreenPrivateIndex < 0)
+ return;
+
+ ramdacHWPtr = RAMDACHWPTR(pScrn);
+ ramdacScrPtr = ((RamDacScreenRecPtr)
+ (pScrn)->privates[RamDacGetScreenIndex()].ptr);
+
+ free(ramdacHWPtr);
+ ramdacHWPtr = NULL;
+
+ free(ramdacScrPtr);
+ ramdacScrPtr = NULL;
+}
+
+int
+RamDacGetHWIndex(void)
+{
+ return RamDacHWPrivateIndex;
+}
+
+int
+RamDacGetScreenIndex(void)
+{
+ return RamDacScreenPrivateIndex;
+}
diff --git a/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c b/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c
index c6dc83157..7a903d8e4 100644
--- a/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c
+++ b/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c
@@ -40,32 +40,32 @@
#include "xf86RamDacPriv.h"
void
-RamDacLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors,
- VisualPtr pVisual)
+RamDacLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO * colors,
+ VisualPtr pVisual)
{
RamDacRecPtr hwp = RAMDACSCRPTR(pScrn);
int i, index;
for (i = 0; i < numColors; i++) {
- index = indices[i];
- (*hwp->WriteAddress)(pScrn, index);
- (*hwp->WriteData)(pScrn, colors[index].red);
- (*hwp->WriteData)(pScrn, colors[index].green);
- (*hwp->WriteData)(pScrn, colors[index].blue);
+ index = indices[i];
+ (*hwp->WriteAddress) (pScrn, index);
+ (*hwp->WriteData) (pScrn, colors[index].red);
+ (*hwp->WriteData) (pScrn, colors[index].green);
+ (*hwp->WriteData) (pScrn, colors[index].blue);
}
}
Bool
RamDacHandleColormaps(ScreenPtr pScreen, int maxColors, int sigRGBbits,
- unsigned int flags)
+ unsigned int flags)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
RamDacRecPtr hwp = RAMDACSCRPTR(pScrn);
if (hwp->LoadPalette == NULL)
- return xf86HandleColormaps(pScreen, maxColors, sigRGBbits,
- RamDacLoadPalette, NULL, flags);
+ return xf86HandleColormaps(pScreen, maxColors, sigRGBbits,
+ RamDacLoadPalette, NULL, flags);
else
- return xf86HandleColormaps(pScreen, maxColors, sigRGBbits,
- hwp->LoadPalette, NULL, flags);
+ return xf86HandleColormaps(pScreen, maxColors, sigRGBbits,
+ hwp->LoadPalette, NULL, flags);
}
diff --git a/xorg-server/hw/xfree86/ramdac/xf86RamDacPriv.h b/xorg-server/hw/xfree86/ramdac/xf86RamDacPriv.h
index f68e588f5..ae1c665de 100644
--- a/xorg-server/hw/xfree86/ramdac/xf86RamDacPriv.h
+++ b/xorg-server/hw/xfree86/ramdac/xf86RamDacPriv.h
@@ -8,6 +8,6 @@
void RamDacGetRecPrivate(void);
Bool RamDacGetRec(ScrnInfoPtr pScrn);
-int RamDacGetScreenIndex(void);
+int RamDacGetScreenIndex(void);
void RamDacLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
- LOCO *colors, VisualPtr pVisual);
+ LOCO * colors, VisualPtr pVisual);
diff --git a/xorg-server/hw/xfree86/vgahw/vgaHWmodule.c b/xorg-server/hw/xfree86/vgahw/vgaHWmodule.c
index d5c50d9ca..0c5a43aa6 100644
--- a/xorg-server/hw/xfree86/vgahw/vgaHWmodule.c
+++ b/xorg-server/hw/xfree86/vgahw/vgaHWmodule.c
@@ -9,16 +9,16 @@
#include "xf86Module.h"
static XF86ModuleVersionInfo VersRec = {
- "vgahw",
- MODULEVENDORSTRING,
- MODINFOSTRING1,
- MODINFOSTRING2,
- XORG_VERSION_CURRENT,
- 0, 1, 0,
- ABI_CLASS_VIDEODRV,
- ABI_VIDEODRV_VERSION,
- MOD_CLASS_NONE,
- {0, 0, 0, 0}
+ "vgahw",
+ MODULEVENDORSTRING,
+ MODINFOSTRING1,
+ MODINFOSTRING2,
+ XORG_VERSION_CURRENT,
+ 0, 1, 0,
+ ABI_CLASS_VIDEODRV,
+ ABI_VIDEODRV_VERSION,
+ MOD_CLASS_NONE,
+ {0, 0, 0, 0}
};
_X_EXPORT XF86ModuleData vgahwModuleData = { &VersRec, NULL, NULL };
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu.h b/xorg-server/hw/xfree86/x86emu/x86emu.h
index 795e2d688..501dd913c 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu.h
@@ -56,7 +56,7 @@ typedef int X86EMU_pioAddr;
/*---------------------- Macros and type definitions ----------------------*/
#ifdef PACK
-# pragma PACK /* Don't pack structs with function pointers! */
+#pragma PACK /* Don't pack structs with function pointers! */
#endif
/****************************************************************************
@@ -81,13 +81,13 @@ outw - Function to write a word to an I/O port
outl - Function to write a dword to an I/O port
****************************************************************************/
typedef struct {
- u8 (X86APIP inb)(X86EMU_pioAddr addr);
- u16 (X86APIP inw)(X86EMU_pioAddr addr);
- u32 (X86APIP inl)(X86EMU_pioAddr addr);
- void (X86APIP outb)(X86EMU_pioAddr addr, u8 val);
- void (X86APIP outw)(X86EMU_pioAddr addr, u16 val);
- void (X86APIP outl)(X86EMU_pioAddr addr, u32 val);
- } X86EMU_pioFuncs;
+ u8(X86APIP inb) (X86EMU_pioAddr addr);
+ u16(X86APIP inw) (X86EMU_pioAddr addr);
+ u32(X86APIP inl) (X86EMU_pioAddr addr);
+ void (X86APIP outb) (X86EMU_pioAddr addr, u8 val);
+ void (X86APIP outw) (X86EMU_pioAddr addr, u16 val);
+ void (X86APIP outl) (X86EMU_pioAddr addr, u32 val);
+} X86EMU_pioFuncs;
/****************************************************************************
REMARKS:
@@ -112,13 +112,13 @@ wrw - Function to write a word to an address
wrl - Function to write a dword to an address
****************************************************************************/
typedef struct {
- u8 (X86APIP rdb)(u32 addr);
- u16 (X86APIP rdw)(u32 addr);
- u32 (X86APIP rdl)(u32 addr);
- void (X86APIP wrb)(u32 addr, u8 val);
- void (X86APIP wrw)(u32 addr, u16 val);
- void (X86APIP wrl)(u32 addr, u32 val);
- } X86EMU_memFuncs;
+ u8(X86APIP rdb) (u32 addr);
+ u16(X86APIP rdw) (u32 addr);
+ u32(X86APIP rdl) (u32 addr);
+ void (X86APIP wrb) (u32 addr, u8 val);
+ void (X86APIP wrw) (u32 addr, u16 val);
+ void (X86APIP wrl) (u32 addr, u32 val);
+} X86EMU_memFuncs;
/****************************************************************************
Here are the default memory read and write
@@ -132,29 +132,29 @@ extern void X86API wrw(u32 addr, u16 val);
extern void X86API wrl(u32 addr, u32 val);
#ifdef END_PACK
-# pragma END_PACK
+#pragma END_PACK
#endif
/*--------------------- type definitions -----------------------------------*/
-typedef void (X86APIP X86EMU_intrFuncs)(int num);
+typedef void (X86APIP X86EMU_intrFuncs) (int num);
extern X86EMU_intrFuncs _X86EMU_intrTab[256];
/*-------------------------- Function Prototypes --------------------------*/
#ifdef __cplusplus
-extern "C" { /* Use "C" linkage when in C++ mode */
+extern "C" { /* Use "C" linkage when in C++ mode */
#endif
-void X86EMU_setupMemFuncs(X86EMU_memFuncs *funcs);
-void X86EMU_setupPioFuncs(X86EMU_pioFuncs *funcs);
-void X86EMU_setupIntrFuncs(X86EMU_intrFuncs funcs[]);
-void X86EMU_prepareForInt(int num);
+ void X86EMU_setupMemFuncs(X86EMU_memFuncs * funcs);
+ void X86EMU_setupPioFuncs(X86EMU_pioFuncs * funcs);
+ void X86EMU_setupIntrFuncs(X86EMU_intrFuncs funcs[]);
+ void X86EMU_prepareForInt(int num);
/* decode.c */
-void X86EMU_exec(void);
-void X86EMU_halt_sys(void);
+ void X86EMU_exec(void);
+ void X86EMU_halt_sys(void);
#ifdef DEBUG
#define HALT_SYS() \
@@ -166,8 +166,8 @@ void X86EMU_halt_sys(void);
/* Debug options */
-#define DEBUG_DECODE_F 0x000001 /* print decoded instruction */
-#define DEBUG_TRACE_F 0x000002 /* dump regs before/after execution */
+#define DEBUG_DECODE_F 0x000001 /* print decoded instruction */
+#define DEBUG_TRACE_F 0x000002 /* dump regs before/after execution */
#define DEBUG_STEP_F 0x000004
#define DEBUG_DISASSEMBLE_F 0x000008
#define DEBUG_BREAK_F 0x000010
@@ -175,24 +175,23 @@ void X86EMU_halt_sys(void);
#define DEBUG_SAVE_IP_CS_F 0x000040
#define DEBUG_FS_F 0x000080
#define DEBUG_PROC_F 0x000100
-#define DEBUG_SYSINT_F 0x000200 /* bios system interrupts. */
+#define DEBUG_SYSINT_F 0x000200 /* bios system interrupts. */
#define DEBUG_TRACECALL_F 0x000400
#define DEBUG_INSTRUMENT_F 0x000800
-#define DEBUG_MEM_TRACE_F 0x001000
-#define DEBUG_IO_TRACE_F 0x002000
+#define DEBUG_MEM_TRACE_F 0x001000
+#define DEBUG_IO_TRACE_F 0x002000
#define DEBUG_TRACECALL_REGS_F 0x004000
-#define DEBUG_DECODE_NOPRINT_F 0x008000
+#define DEBUG_DECODE_NOPRINT_F 0x008000
#define DEBUG_EXIT 0x010000
#define DEBUG_SYS_F (DEBUG_SVC_F|DEBUG_FS_F|DEBUG_PROC_F)
-void X86EMU_trace_regs(void);
-void X86EMU_trace_xregs(void);
-void X86EMU_dump_memory(u16 seg, u16 off, u32 amt);
-int X86EMU_trace_on(void);
-int X86EMU_trace_off(void);
+ void X86EMU_trace_regs(void);
+ void X86EMU_trace_xregs(void);
+ void X86EMU_dump_memory(u16 seg, u16 off, u32 amt);
+ int X86EMU_trace_on(void);
+ int X86EMU_trace_off(void);
#ifdef __cplusplus
-} /* End of "C" linkage for C++ */
+} /* End of "C" linkage for C++ */
#endif
-
-#endif /* __X86EMU_X86EMU_H */
+#endif /* __X86EMU_X86EMU_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/debug.h b/xorg-server/hw/xfree86/x86emu/x86emu/debug.h
index 5f78d0575..385b804dd 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/debug.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/debug.h
@@ -45,65 +45,65 @@
#define CHECK_IP_FETCH_F 0x1
#define CHECK_SP_ACCESS_F 0x2
-#define CHECK_MEM_ACCESS_F 0x4 /*using regular linear pointer */
-#define CHECK_DATA_ACCESS_F 0x8 /*using segment:offset*/
+#define CHECK_MEM_ACCESS_F 0x4 /*using regular linear pointer */
+#define CHECK_DATA_ACCESS_F 0x8 /*using segment:offset */
#ifdef DEBUG
-# define CHECK_IP_FETCH() (M.x86.check & CHECK_IP_FETCH_F)
-# define CHECK_SP_ACCESS() (M.x86.check & CHECK_SP_ACCESS_F)
-# define CHECK_MEM_ACCESS() (M.x86.check & CHECK_MEM_ACCESS_F)
-# define CHECK_DATA_ACCESS() (M.x86.check & CHECK_DATA_ACCESS_F)
+#define CHECK_IP_FETCH() (M.x86.check & CHECK_IP_FETCH_F)
+#define CHECK_SP_ACCESS() (M.x86.check & CHECK_SP_ACCESS_F)
+#define CHECK_MEM_ACCESS() (M.x86.check & CHECK_MEM_ACCESS_F)
+#define CHECK_DATA_ACCESS() (M.x86.check & CHECK_DATA_ACCESS_F)
#else
-# define CHECK_IP_FETCH()
-# define CHECK_SP_ACCESS()
-# define CHECK_MEM_ACCESS()
-# define CHECK_DATA_ACCESS()
+#define CHECK_IP_FETCH()
+#define CHECK_SP_ACCESS()
+#define CHECK_MEM_ACCESS()
+#define CHECK_DATA_ACCESS()
#endif
#ifdef DEBUG
-# define DEBUG_INSTRUMENT() (M.x86.debug & DEBUG_INSTRUMENT_F)
-# define DEBUG_DECODE() (M.x86.debug & DEBUG_DECODE_F)
-# define DEBUG_TRACE() (M.x86.debug & DEBUG_TRACE_F)
-# define DEBUG_STEP() (M.x86.debug & DEBUG_STEP_F)
-# define DEBUG_DISASSEMBLE() (M.x86.debug & DEBUG_DISASSEMBLE_F)
-# define DEBUG_BREAK() (M.x86.debug & DEBUG_BREAK_F)
-# define DEBUG_SVC() (M.x86.debug & DEBUG_SVC_F)
-# define DEBUG_SAVE_IP_CS() (M.x86.debug & DEBUG_SAVE_IP_CS_F)
-
-# define DEBUG_FS() (M.x86.debug & DEBUG_FS_F)
-# define DEBUG_PROC() (M.x86.debug & DEBUG_PROC_F)
-# define DEBUG_SYSINT() (M.x86.debug & DEBUG_SYSINT_F)
-# define DEBUG_TRACECALL() (M.x86.debug & DEBUG_TRACECALL_F)
-# define DEBUG_TRACECALLREGS() (M.x86.debug & DEBUG_TRACECALL_REGS_F)
-# define DEBUG_SYS() (M.x86.debug & DEBUG_SYS_F)
-# define DEBUG_MEM_TRACE() (M.x86.debug & DEBUG_MEM_TRACE_F)
-# define DEBUG_IO_TRACE() (M.x86.debug & DEBUG_IO_TRACE_F)
-# define DEBUG_DECODE_NOPRINT() (M.x86.debug & DEBUG_DECODE_NOPRINT_F)
+#define DEBUG_INSTRUMENT() (M.x86.debug & DEBUG_INSTRUMENT_F)
+#define DEBUG_DECODE() (M.x86.debug & DEBUG_DECODE_F)
+#define DEBUG_TRACE() (M.x86.debug & DEBUG_TRACE_F)
+#define DEBUG_STEP() (M.x86.debug & DEBUG_STEP_F)
+#define DEBUG_DISASSEMBLE() (M.x86.debug & DEBUG_DISASSEMBLE_F)
+#define DEBUG_BREAK() (M.x86.debug & DEBUG_BREAK_F)
+#define DEBUG_SVC() (M.x86.debug & DEBUG_SVC_F)
+#define DEBUG_SAVE_IP_CS() (M.x86.debug & DEBUG_SAVE_IP_CS_F)
+
+#define DEBUG_FS() (M.x86.debug & DEBUG_FS_F)
+#define DEBUG_PROC() (M.x86.debug & DEBUG_PROC_F)
+#define DEBUG_SYSINT() (M.x86.debug & DEBUG_SYSINT_F)
+#define DEBUG_TRACECALL() (M.x86.debug & DEBUG_TRACECALL_F)
+#define DEBUG_TRACECALLREGS() (M.x86.debug & DEBUG_TRACECALL_REGS_F)
+#define DEBUG_SYS() (M.x86.debug & DEBUG_SYS_F)
+#define DEBUG_MEM_TRACE() (M.x86.debug & DEBUG_MEM_TRACE_F)
+#define DEBUG_IO_TRACE() (M.x86.debug & DEBUG_IO_TRACE_F)
+#define DEBUG_DECODE_NOPRINT() (M.x86.debug & DEBUG_DECODE_NOPRINT_F)
#else
-# define DEBUG_INSTRUMENT() 0
-# define DEBUG_DECODE() 0
-# define DEBUG_TRACE() 0
-# define DEBUG_STEP() 0
-# define DEBUG_DISASSEMBLE() 0
-# define DEBUG_BREAK() 0
-# define DEBUG_SVC() 0
-# define DEBUG_SAVE_IP_CS() 0
-# define DEBUG_FS() 0
-# define DEBUG_PROC() 0
-# define DEBUG_SYSINT() 0
-# define DEBUG_TRACECALL() 0
-# define DEBUG_TRACECALLREGS() 0
-# define DEBUG_SYS() 0
-# define DEBUG_MEM_TRACE() 0
-# define DEBUG_IO_TRACE() 0
-# define DEBUG_DECODE_NOPRINT() 0
+#define DEBUG_INSTRUMENT() 0
+#define DEBUG_DECODE() 0
+#define DEBUG_TRACE() 0
+#define DEBUG_STEP() 0
+#define DEBUG_DISASSEMBLE() 0
+#define DEBUG_BREAK() 0
+#define DEBUG_SVC() 0
+#define DEBUG_SAVE_IP_CS() 0
+#define DEBUG_FS() 0
+#define DEBUG_PROC() 0
+#define DEBUG_SYSINT() 0
+#define DEBUG_TRACECALL() 0
+#define DEBUG_TRACECALLREGS() 0
+#define DEBUG_SYS() 0
+#define DEBUG_MEM_TRACE() 0
+#define DEBUG_IO_TRACE() 0
+#define DEBUG_DECODE_NOPRINT() 0
#endif
#ifdef DEBUG
-# define DECODE_PRINTF(x) if (DEBUG_DECODE()) \
+#define DECODE_PRINTF(x) if (DEBUG_DECODE()) \
x86emu_decode_printf(x)
-# define DECODE_PRINTF2(x,y) if (DEBUG_DECODE()) \
+#define DECODE_PRINTF2(x,y) if (DEBUG_DECODE()) \
x86emu_decode_printf2(x,y)
/*
@@ -123,10 +123,10 @@
M.x86.saved_ip = y; \
}
#else
-# define INC_DECODED_INST_LEN(x)
-# define DECODE_PRINTF(x)
-# define DECODE_PRINTF2(x,y)
-# define SAVE_IP_CS(x,y)
+#define INC_DECODED_INST_LEN(x)
+#define DECODE_PRINTF(x)
+#define DECODE_PRINTF2(x,y)
+#define SAVE_IP_CS(x,y)
#endif
#ifdef DEBUG
@@ -137,13 +137,13 @@
} \
if (DEBUG_TRACE() || DEBUG_DECODE()) X86EMU_trace_regs()
#else
-# define TRACE_REGS()
+#define TRACE_REGS()
#endif
#ifdef DEBUG
-# define SINGLE_STEP() if (DEBUG_STEP()) x86emu_single_step()
+#define SINGLE_STEP() if (DEBUG_STEP()) x86emu_single_step()
#else
-# define SINGLE_STEP()
+#define SINGLE_STEP()
#endif
#define TRACE_AND_STEP() \
@@ -151,29 +151,29 @@
SINGLE_STEP()
#ifdef DEBUG
-# define START_OF_INSTR()
-# define END_OF_INSTR() EndOfTheInstructionProcedure: x86emu_end_instr();
-# define END_OF_INSTR_NO_TRACE() x86emu_end_instr();
+#define START_OF_INSTR()
+#define END_OF_INSTR() EndOfTheInstructionProcedure: x86emu_end_instr();
+#define END_OF_INSTR_NO_TRACE() x86emu_end_instr();
#else
-# define START_OF_INSTR()
-# define END_OF_INSTR()
-# define END_OF_INSTR_NO_TRACE()
+#define START_OF_INSTR()
+#define END_OF_INSTR()
+#define END_OF_INSTR_NO_TRACE()
#endif
#ifdef DEBUG
-# define CALL_TRACE(u,v,w,x,s) \
+#define CALL_TRACE(u,v,w,x,s) \
if (DEBUG_TRACECALLREGS()) \
x86emu_dump_regs(); \
if (DEBUG_TRACECALL()) \
printk("%04x:%04x: CALL %s%04x:%04x\n", u , v, s, w, x);
-# define RETURN_TRACE(n,u,v) \
+#define RETURN_TRACE(n,u,v) \
if (DEBUG_TRACECALLREGS()) \
x86emu_dump_regs(); \
if (DEBUG_TRACECALL()) \
printk("%04x:%04x: %s\n",u,v,n);
#else
-# define CALL_TRACE(u,v,w,x,s)
-# define RETURN_TRACE(n,u,v)
+#define CALL_TRACE(u,v,w,x,s)
+#define RETURN_TRACE(n,u,v)
#endif
#ifdef DEBUG
@@ -185,26 +185,25 @@
/*-------------------------- Function Prototypes --------------------------*/
#ifdef __cplusplus
-extern "C" { /* Use "C" linkage when in C++ mode */
+extern "C" { /* Use "C" linkage when in C++ mode */
#endif
-extern void x86emu_inc_decoded_inst_len (int x);
-extern void x86emu_decode_printf (const char *x);
-extern void x86emu_decode_printf2 (const char *x, int y);
-extern void x86emu_just_disassemble (void);
-extern void x86emu_single_step (void);
-extern void x86emu_end_instr (void);
-extern void x86emu_dump_regs (void);
-extern void x86emu_dump_xregs (void);
-extern void x86emu_print_int_vect (u16 iv);
-extern void x86emu_instrument_instruction (void);
-extern void x86emu_check_ip_access (void);
-extern void x86emu_check_sp_access (void);
-extern void x86emu_check_mem_access (u32 p);
-extern void x86emu_check_data_access (uint s, uint o);
+ extern void x86emu_inc_decoded_inst_len(int x);
+ extern void x86emu_decode_printf(const char *x);
+ extern void x86emu_decode_printf2(const char *x, int y);
+ extern void x86emu_just_disassemble(void);
+ extern void x86emu_single_step(void);
+ extern void x86emu_end_instr(void);
+ extern void x86emu_dump_regs(void);
+ extern void x86emu_dump_xregs(void);
+ extern void x86emu_print_int_vect(u16 iv);
+ extern void x86emu_instrument_instruction(void);
+ extern void x86emu_check_ip_access(void);
+ extern void x86emu_check_sp_access(void);
+ extern void x86emu_check_mem_access(u32 p);
+ extern void x86emu_check_data_access(uint s, uint o);
#ifdef __cplusplus
-} /* End of "C" linkage for C++ */
+} /* End of "C" linkage for C++ */
#endif
-
-#endif /* __X86EMU_DEBUG_H */
+#endif /* __X86EMU_DEBUG_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/decode.h b/xorg-server/hw/xfree86/x86emu/x86emu/decode.h
index 61cd4dc10..49a1f7b54 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/decode.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/decode.h
@@ -52,37 +52,36 @@
/*-------------------------- Function Prototypes --------------------------*/
#ifdef __cplusplus
-extern "C" { /* Use "C" linkage when in C++ mode */
+extern "C" { /* Use "C" linkage when in C++ mode */
#endif
-void x86emu_intr_raise (u8 type);
-void fetch_decode_modrm (int *mod,int *regh,int *regl);
-u8 fetch_byte_imm (void);
-u16 fetch_word_imm (void);
-u32 fetch_long_imm (void);
-u8 fetch_data_byte (uint offset);
-u8 fetch_data_byte_abs (uint segment, uint offset);
-u16 fetch_data_word (uint offset);
-u16 fetch_data_word_abs (uint segment, uint offset);
-u32 fetch_data_long (uint offset);
-u32 fetch_data_long_abs (uint segment, uint offset);
-void store_data_byte (uint offset, u8 val);
-void store_data_byte_abs (uint segment, uint offset, u8 val);
-void store_data_word (uint offset, u16 val);
-void store_data_word_abs (uint segment, uint offset, u16 val);
-void store_data_long (uint offset, u32 val);
-void store_data_long_abs (uint segment, uint offset, u32 val);
-u8* decode_rm_byte_register(int reg);
-u16* decode_rm_word_register(int reg);
-u32* decode_rm_long_register(int reg);
-u16* decode_rm_seg_register(int reg);
-u32 decode_rm00_address(int rm);
-u32 decode_rm01_address(int rm);
-u32 decode_rm10_address(int rm);
-u32 decode_sib_address(int sib, int mod);
+ void x86emu_intr_raise(u8 type);
+ void fetch_decode_modrm(int *mod, int *regh, int *regl);
+ u8 fetch_byte_imm(void);
+ u16 fetch_word_imm(void);
+ u32 fetch_long_imm(void);
+ u8 fetch_data_byte(uint offset);
+ u8 fetch_data_byte_abs(uint segment, uint offset);
+ u16 fetch_data_word(uint offset);
+ u16 fetch_data_word_abs(uint segment, uint offset);
+ u32 fetch_data_long(uint offset);
+ u32 fetch_data_long_abs(uint segment, uint offset);
+ void store_data_byte(uint offset, u8 val);
+ void store_data_byte_abs(uint segment, uint offset, u8 val);
+ void store_data_word(uint offset, u16 val);
+ void store_data_word_abs(uint segment, uint offset, u16 val);
+ void store_data_long(uint offset, u32 val);
+ void store_data_long_abs(uint segment, uint offset, u32 val);
+ u8 *decode_rm_byte_register(int reg);
+ u16 *decode_rm_word_register(int reg);
+ u32 *decode_rm_long_register(int reg);
+ u16 *decode_rm_seg_register(int reg);
+ u32 decode_rm00_address(int rm);
+ u32 decode_rm01_address(int rm);
+ u32 decode_rm10_address(int rm);
+ u32 decode_sib_address(int sib, int mod);
#ifdef __cplusplus
-} /* End of "C" linkage for C++ */
+} /* End of "C" linkage for C++ */
#endif
-
-#endif /* __X86EMU_DECODE_H */
+#endif /* __X86EMU_DECODE_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/fpu.h b/xorg-server/hw/xfree86/x86emu/x86emu/fpu.h
index 5fb271463..1c114987f 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/fpu.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/fpu.h
@@ -40,22 +40,21 @@
#define __X86EMU_FPU_H
#ifdef __cplusplus
-extern "C" { /* Use "C" linkage when in C++ mode */
+extern "C" { /* Use "C" linkage when in C++ mode */
#endif
/* these have to be defined, whether 8087 support compiled in or not. */
-extern void x86emuOp_esc_coprocess_d8 (u8 op1);
-extern void x86emuOp_esc_coprocess_d9 (u8 op1);
-extern void x86emuOp_esc_coprocess_da (u8 op1);
-extern void x86emuOp_esc_coprocess_db (u8 op1);
-extern void x86emuOp_esc_coprocess_dc (u8 op1);
-extern void x86emuOp_esc_coprocess_dd (u8 op1);
-extern void x86emuOp_esc_coprocess_de (u8 op1);
-extern void x86emuOp_esc_coprocess_df (u8 op1);
+ extern void x86emuOp_esc_coprocess_d8(u8 op1);
+ extern void x86emuOp_esc_coprocess_d9(u8 op1);
+ extern void x86emuOp_esc_coprocess_da(u8 op1);
+ extern void x86emuOp_esc_coprocess_db(u8 op1);
+ extern void x86emuOp_esc_coprocess_dc(u8 op1);
+ extern void x86emuOp_esc_coprocess_dd(u8 op1);
+ extern void x86emuOp_esc_coprocess_de(u8 op1);
+ extern void x86emuOp_esc_coprocess_df(u8 op1);
#ifdef __cplusplus
-} /* End of "C" linkage for C++ */
+} /* End of "C" linkage for C++ */
#endif
-
-#endif /* __X86EMU_FPU_H */
+#endif /* __X86EMU_FPU_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h b/xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h
index e59b80783..5a780e69c 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h
@@ -42,23 +42,23 @@
#ifdef X86_FPU_SUPPORT
#ifdef PACK
-# pragma PACK
+#pragma PACK
#endif
/* Basic 8087 register can hold any of the following values: */
union x86_fpu_reg_u {
- s8 tenbytes[10];
- double dval;
- float fval;
- s16 sval;
- s32 lval;
- };
+ s8 tenbytes[10];
+ double dval;
+ float fval;
+ s16 sval;
+ s32 lval;
+};
struct x86_fpu_reg {
- union x86_fpu_reg_u reg;
- char tag;
- };
+ union x86_fpu_reg_u reg;
+ char tag;
+};
/*
* Since we are not going to worry about the problems of aliasing
@@ -83,14 +83,14 @@ struct x86_fpu_reg {
#define X86_FPU_STKTOP 0
struct x86_fpu_registers {
- struct x86_fpu_reg x86_fpu_stack[8];
- int x86_fpu_flags;
- int x86_fpu_config; /* rounding modes, etc. */
- short x86_fpu_tos, x86_fpu_bos;
- };
+ struct x86_fpu_reg x86_fpu_stack[8];
+ int x86_fpu_flags;
+ int x86_fpu_config; /* rounding modes, etc. */
+ short x86_fpu_tos, x86_fpu_bos;
+};
#ifdef END_PACK
-# pragma END_PACK
+#pragma END_PACK
#endif
/*
@@ -104,16 +104,16 @@ struct x86_fpu_registers {
* instructions.
*/
-#endif /* X86_FPU_SUPPORT */
+#endif /* X86_FPU_SUPPORT */
#ifdef DEBUG
-# define DECODE_PRINTINSTR32(t,mod,rh,rl) \
+#define DECODE_PRINTINSTR32(t,mod,rh,rl) \
DECODE_PRINTF(t[(mod<<3)+(rh)]);
-# define DECODE_PRINTINSTR256(t,mod,rh,rl) \
+#define DECODE_PRINTINSTR256(t,mod,rh,rl) \
DECODE_PRINTF(t[(mod<<6)+(rh<<3)+(rl)]);
#else
-# define DECODE_PRINTINSTR32(t,mod,rh,rl)
-# define DECODE_PRINTINSTR256(t,mod,rh,rl)
+#define DECODE_PRINTINSTR32(t,mod,rh,rl)
+#define DECODE_PRINTINSTR256(t,mod,rh,rl)
#endif
-#endif /* __X86EMU_FPU_REGS_H */
+#endif /* __X86EMU_FPU_REGS_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/ops.h b/xorg-server/hw/xfree86/x86emu/x86emu/ops.h
index 65ea67654..1bc07a4e1 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/ops.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/ops.h
@@ -39,7 +39,7 @@
#ifndef __X86EMU_OPS_H
#define __X86EMU_OPS_H
-extern void (*x86emu_optab[0x100])(u8 op1);
-extern void (*x86emu_optab2[0x100])(u8 op2);
+extern void (*x86emu_optab[0x100]) (u8 op1);
+extern void (*x86emu_optab2[0x100]) (u8 op2);
-#endif /* __X86EMU_OPS_H */
+#endif /* __X86EMU_OPS_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h b/xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h
index e023cf88d..aca132bf1 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h
@@ -49,14 +49,16 @@
#define __HAVE_INLINE_ASSEMBLER__
#endif
-u32 get_flags_asm(void);
+u32 get_flags_asm(void);
+
#pragma aux get_flags_asm = \
"pushf" \
"pop eax" \
value [eax] \
modify exact [eax];
-u16 aaa_word_asm(u32 *flags,u16 d);
+u16 aaa_word_asm(u32 * flags, u16 d);
+
#pragma aux aaa_word_asm = \
"push [edi]" \
"popf" \
@@ -67,7 +69,8 @@ u16 aaa_word_asm(u32 *flags,u16 d);
value [ax] \
modify exact [ax];
-u16 aas_word_asm(u32 *flags,u16 d);
+u16 aas_word_asm(u32 * flags, u16 d);
+
#pragma aux aas_word_asm = \
"push [edi]" \
"popf" \
@@ -78,7 +81,8 @@ u16 aas_word_asm(u32 *flags,u16 d);
value [ax] \
modify exact [ax];
-u16 aad_word_asm(u32 *flags,u16 d);
+u16 aad_word_asm(u32 * flags, u16 d);
+
#pragma aux aad_word_asm = \
"push [edi]" \
"popf" \
@@ -89,7 +93,8 @@ u16 aad_word_asm(u32 *flags,u16 d);
value [ax] \
modify exact [ax];
-u16 aam_word_asm(u32 *flags,u8 d);
+u16 aam_word_asm(u32 * flags, u8 d);
+
#pragma aux aam_word_asm = \
"push [edi]" \
"popf" \
@@ -100,7 +105,8 @@ u16 aam_word_asm(u32 *flags,u8 d);
value [ax] \
modify exact [ax];
-u8 adc_byte_asm(u32 *flags,u8 d, u8 s);
+u8 adc_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux adc_byte_asm = \
"push [edi]" \
"popf" \
@@ -111,7 +117,8 @@ u8 adc_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al bl];
-u16 adc_word_asm(u32 *flags,u16 d, u16 s);
+u16 adc_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux adc_word_asm = \
"push [edi]" \
"popf" \
@@ -122,7 +129,8 @@ u16 adc_word_asm(u32 *flags,u16 d, u16 s);
value [ax] \
modify exact [ax bx];
-u32 adc_long_asm(u32 *flags,u32 d, u32 s);
+u32 adc_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux adc_long_asm = \
"push [edi]" \
"popf" \
@@ -133,7 +141,8 @@ u32 adc_long_asm(u32 *flags,u32 d, u32 s);
value [eax] \
modify exact [eax ebx];
-u8 add_byte_asm(u32 *flags,u8 d, u8 s);
+u8 add_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux add_byte_asm = \
"push [edi]" \
"popf" \
@@ -144,7 +153,8 @@ u8 add_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al bl];
-u16 add_word_asm(u32 *flags,u16 d, u16 s);
+u16 add_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux add_word_asm = \
"push [edi]" \
"popf" \
@@ -155,7 +165,8 @@ u16 add_word_asm(u32 *flags,u16 d, u16 s);
value [ax] \
modify exact [ax bx];
-u32 add_long_asm(u32 *flags,u32 d, u32 s);
+u32 add_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux add_long_asm = \
"push [edi]" \
"popf" \
@@ -166,7 +177,8 @@ u32 add_long_asm(u32 *flags,u32 d, u32 s);
value [eax] \
modify exact [eax ebx];
-u8 and_byte_asm(u32 *flags,u8 d, u8 s);
+u8 and_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux and_byte_asm = \
"push [edi]" \
"popf" \
@@ -177,7 +189,8 @@ u8 and_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al bl];
-u16 and_word_asm(u32 *flags,u16 d, u16 s);
+u16 and_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux and_word_asm = \
"push [edi]" \
"popf" \
@@ -188,7 +201,8 @@ u16 and_word_asm(u32 *flags,u16 d, u16 s);
value [ax] \
modify exact [ax bx];
-u32 and_long_asm(u32 *flags,u32 d, u32 s);
+u32 and_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux and_long_asm = \
"push [edi]" \
"popf" \
@@ -199,7 +213,8 @@ u32 and_long_asm(u32 *flags,u32 d, u32 s);
value [eax] \
modify exact [eax ebx];
-u8 cmp_byte_asm(u32 *flags,u8 d, u8 s);
+u8 cmp_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux cmp_byte_asm = \
"push [edi]" \
"popf" \
@@ -210,7 +225,8 @@ u8 cmp_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al bl];
-u16 cmp_word_asm(u32 *flags,u16 d, u16 s);
+u16 cmp_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux cmp_word_asm = \
"push [edi]" \
"popf" \
@@ -221,7 +237,8 @@ u16 cmp_word_asm(u32 *flags,u16 d, u16 s);
value [ax] \
modify exact [ax bx];
-u32 cmp_long_asm(u32 *flags,u32 d, u32 s);
+u32 cmp_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux cmp_long_asm = \
"push [edi]" \
"popf" \
@@ -232,7 +249,8 @@ u32 cmp_long_asm(u32 *flags,u32 d, u32 s);
value [eax] \
modify exact [eax ebx];
-u8 daa_byte_asm(u32 *flags,u8 d);
+u8 daa_byte_asm(u32 * flags, u8 d);
+
#pragma aux daa_byte_asm = \
"push [edi]" \
"popf" \
@@ -243,7 +261,8 @@ u8 daa_byte_asm(u32 *flags,u8 d);
value [al] \
modify exact [al];
-u8 das_byte_asm(u32 *flags,u8 d);
+u8 das_byte_asm(u32 * flags, u8 d);
+
#pragma aux das_byte_asm = \
"push [edi]" \
"popf" \
@@ -254,7 +273,8 @@ u8 das_byte_asm(u32 *flags,u8 d);
value [al] \
modify exact [al];
-u8 dec_byte_asm(u32 *flags,u8 d);
+u8 dec_byte_asm(u32 * flags, u8 d);
+
#pragma aux dec_byte_asm = \
"push [edi]" \
"popf" \
@@ -265,7 +285,8 @@ u8 dec_byte_asm(u32 *flags,u8 d);
value [al] \
modify exact [al];
-u16 dec_word_asm(u32 *flags,u16 d);
+u16 dec_word_asm(u32 * flags, u16 d);
+
#pragma aux dec_word_asm = \
"push [edi]" \
"popf" \
@@ -276,7 +297,8 @@ u16 dec_word_asm(u32 *flags,u16 d);
value [ax] \
modify exact [ax];
-u32 dec_long_asm(u32 *flags,u32 d);
+u32 dec_long_asm(u32 * flags, u32 d);
+
#pragma aux dec_long_asm = \
"push [edi]" \
"popf" \
@@ -287,7 +309,8 @@ u32 dec_long_asm(u32 *flags,u32 d);
value [eax] \
modify exact [eax];
-u8 inc_byte_asm(u32 *flags,u8 d);
+u8 inc_byte_asm(u32 * flags, u8 d);
+
#pragma aux inc_byte_asm = \
"push [edi]" \
"popf" \
@@ -298,7 +321,8 @@ u8 inc_byte_asm(u32 *flags,u8 d);
value [al] \
modify exact [al];
-u16 inc_word_asm(u32 *flags,u16 d);
+u16 inc_word_asm(u32 * flags, u16 d);
+
#pragma aux inc_word_asm = \
"push [edi]" \
"popf" \
@@ -309,7 +333,8 @@ u16 inc_word_asm(u32 *flags,u16 d);
value [ax] \
modify exact [ax];
-u32 inc_long_asm(u32 *flags,u32 d);
+u32 inc_long_asm(u32 * flags, u32 d);
+
#pragma aux inc_long_asm = \
"push [edi]" \
"popf" \
@@ -320,7 +345,8 @@ u32 inc_long_asm(u32 *flags,u32 d);
value [eax] \
modify exact [eax];
-u8 or_byte_asm(u32 *flags,u8 d, u8 s);
+u8 or_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux or_byte_asm = \
"push [edi]" \
"popf" \
@@ -331,7 +357,8 @@ u8 or_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al bl];
-u16 or_word_asm(u32 *flags,u16 d, u16 s);
+u16 or_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux or_word_asm = \
"push [edi]" \
"popf" \
@@ -342,7 +369,8 @@ u16 or_word_asm(u32 *flags,u16 d, u16 s);
value [ax] \
modify exact [ax bx];
-u32 or_long_asm(u32 *flags,u32 d, u32 s);
+u32 or_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux or_long_asm = \
"push [edi]" \
"popf" \
@@ -353,7 +381,8 @@ u32 or_long_asm(u32 *flags,u32 d, u32 s);
value [eax] \
modify exact [eax ebx];
-u8 neg_byte_asm(u32 *flags,u8 d);
+u8 neg_byte_asm(u32 * flags, u8 d);
+
#pragma aux neg_byte_asm = \
"push [edi]" \
"popf" \
@@ -364,7 +393,8 @@ u8 neg_byte_asm(u32 *flags,u8 d);
value [al] \
modify exact [al];
-u16 neg_word_asm(u32 *flags,u16 d);
+u16 neg_word_asm(u32 * flags, u16 d);
+
#pragma aux neg_word_asm = \
"push [edi]" \
"popf" \
@@ -375,7 +405,8 @@ u16 neg_word_asm(u32 *flags,u16 d);
value [ax] \
modify exact [ax];
-u32 neg_long_asm(u32 *flags,u32 d);
+u32 neg_long_asm(u32 * flags, u32 d);
+
#pragma aux neg_long_asm = \
"push [edi]" \
"popf" \
@@ -386,7 +417,8 @@ u32 neg_long_asm(u32 *flags,u32 d);
value [eax] \
modify exact [eax];
-u8 not_byte_asm(u32 *flags,u8 d);
+u8 not_byte_asm(u32 * flags, u8 d);
+
#pragma aux not_byte_asm = \
"push [edi]" \
"popf" \
@@ -397,7 +429,8 @@ u8 not_byte_asm(u32 *flags,u8 d);
value [al] \
modify exact [al];
-u16 not_word_asm(u32 *flags,u16 d);
+u16 not_word_asm(u32 * flags, u16 d);
+
#pragma aux not_word_asm = \
"push [edi]" \
"popf" \
@@ -408,7 +441,8 @@ u16 not_word_asm(u32 *flags,u16 d);
value [ax] \
modify exact [ax];
-u32 not_long_asm(u32 *flags,u32 d);
+u32 not_long_asm(u32 * flags, u32 d);
+
#pragma aux not_long_asm = \
"push [edi]" \
"popf" \
@@ -419,7 +453,8 @@ u32 not_long_asm(u32 *flags,u32 d);
value [eax] \
modify exact [eax];
-u8 rcl_byte_asm(u32 *flags,u8 d, u8 s);
+u8 rcl_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux rcl_byte_asm = \
"push [edi]" \
"popf" \
@@ -430,7 +465,8 @@ u8 rcl_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al cl];
-u16 rcl_word_asm(u32 *flags,u16 d, u8 s);
+u16 rcl_word_asm(u32 * flags, u16 d, u8 s);
+
#pragma aux rcl_word_asm = \
"push [edi]" \
"popf" \
@@ -441,7 +477,8 @@ u16 rcl_word_asm(u32 *flags,u16 d, u8 s);
value [ax] \
modify exact [ax cl];
-u32 rcl_long_asm(u32 *flags,u32 d, u8 s);
+u32 rcl_long_asm(u32 * flags, u32 d, u8 s);
+
#pragma aux rcl_long_asm = \
"push [edi]" \
"popf" \
@@ -452,7 +489,8 @@ u32 rcl_long_asm(u32 *flags,u32 d, u8 s);
value [eax] \
modify exact [eax cl];
-u8 rcr_byte_asm(u32 *flags,u8 d, u8 s);
+u8 rcr_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux rcr_byte_asm = \
"push [edi]" \
"popf" \
@@ -463,7 +501,8 @@ u8 rcr_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al cl];
-u16 rcr_word_asm(u32 *flags,u16 d, u8 s);
+u16 rcr_word_asm(u32 * flags, u16 d, u8 s);
+
#pragma aux rcr_word_asm = \
"push [edi]" \
"popf" \
@@ -474,7 +513,8 @@ u16 rcr_word_asm(u32 *flags,u16 d, u8 s);
value [ax] \
modify exact [ax cl];
-u32 rcr_long_asm(u32 *flags,u32 d, u8 s);
+u32 rcr_long_asm(u32 * flags, u32 d, u8 s);
+
#pragma aux rcr_long_asm = \
"push [edi]" \
"popf" \
@@ -485,7 +525,8 @@ u32 rcr_long_asm(u32 *flags,u32 d, u8 s);
value [eax] \
modify exact [eax cl];
-u8 rol_byte_asm(u32 *flags,u8 d, u8 s);
+u8 rol_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux rol_byte_asm = \
"push [edi]" \
"popf" \
@@ -496,7 +537,8 @@ u8 rol_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al cl];
-u16 rol_word_asm(u32 *flags,u16 d, u8 s);
+u16 rol_word_asm(u32 * flags, u16 d, u8 s);
+
#pragma aux rol_word_asm = \
"push [edi]" \
"popf" \
@@ -507,7 +549,8 @@ u16 rol_word_asm(u32 *flags,u16 d, u8 s);
value [ax] \
modify exact [ax cl];
-u32 rol_long_asm(u32 *flags,u32 d, u8 s);
+u32 rol_long_asm(u32 * flags, u32 d, u8 s);
+
#pragma aux rol_long_asm = \
"push [edi]" \
"popf" \
@@ -518,7 +561,8 @@ u32 rol_long_asm(u32 *flags,u32 d, u8 s);
value [eax] \
modify exact [eax cl];
-u8 ror_byte_asm(u32 *flags,u8 d, u8 s);
+u8 ror_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux ror_byte_asm = \
"push [edi]" \
"popf" \
@@ -529,7 +573,8 @@ u8 ror_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al cl];
-u16 ror_word_asm(u32 *flags,u16 d, u8 s);
+u16 ror_word_asm(u32 * flags, u16 d, u8 s);
+
#pragma aux ror_word_asm = \
"push [edi]" \
"popf" \
@@ -540,7 +585,8 @@ u16 ror_word_asm(u32 *flags,u16 d, u8 s);
value [ax] \
modify exact [ax cl];
-u32 ror_long_asm(u32 *flags,u32 d, u8 s);
+u32 ror_long_asm(u32 * flags, u32 d, u8 s);
+
#pragma aux ror_long_asm = \
"push [edi]" \
"popf" \
@@ -551,7 +597,8 @@ u32 ror_long_asm(u32 *flags,u32 d, u8 s);
value [eax] \
modify exact [eax cl];
-u8 shl_byte_asm(u32 *flags,u8 d, u8 s);
+u8 shl_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux shl_byte_asm = \
"push [edi]" \
"popf" \
@@ -562,7 +609,8 @@ u8 shl_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al cl];
-u16 shl_word_asm(u32 *flags,u16 d, u8 s);
+u16 shl_word_asm(u32 * flags, u16 d, u8 s);
+
#pragma aux shl_word_asm = \
"push [edi]" \
"popf" \
@@ -573,7 +621,8 @@ u16 shl_word_asm(u32 *flags,u16 d, u8 s);
value [ax] \
modify exact [ax cl];
-u32 shl_long_asm(u32 *flags,u32 d, u8 s);
+u32 shl_long_asm(u32 * flags, u32 d, u8 s);
+
#pragma aux shl_long_asm = \
"push [edi]" \
"popf" \
@@ -584,7 +633,8 @@ u32 shl_long_asm(u32 *flags,u32 d, u8 s);
value [eax] \
modify exact [eax cl];
-u8 shr_byte_asm(u32 *flags,u8 d, u8 s);
+u8 shr_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux shr_byte_asm = \
"push [edi]" \
"popf" \
@@ -595,7 +645,8 @@ u8 shr_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al cl];
-u16 shr_word_asm(u32 *flags,u16 d, u8 s);
+u16 shr_word_asm(u32 * flags, u16 d, u8 s);
+
#pragma aux shr_word_asm = \
"push [edi]" \
"popf" \
@@ -606,7 +657,8 @@ u16 shr_word_asm(u32 *flags,u16 d, u8 s);
value [ax] \
modify exact [ax cl];
-u32 shr_long_asm(u32 *flags,u32 d, u8 s);
+u32 shr_long_asm(u32 * flags, u32 d, u8 s);
+
#pragma aux shr_long_asm = \
"push [edi]" \
"popf" \
@@ -617,7 +669,8 @@ u32 shr_long_asm(u32 *flags,u32 d, u8 s);
value [eax] \
modify exact [eax cl];
-u8 sar_byte_asm(u32 *flags,u8 d, u8 s);
+u8 sar_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux sar_byte_asm = \
"push [edi]" \
"popf" \
@@ -628,7 +681,8 @@ u8 sar_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al cl];
-u16 sar_word_asm(u32 *flags,u16 d, u8 s);
+u16 sar_word_asm(u32 * flags, u16 d, u8 s);
+
#pragma aux sar_word_asm = \
"push [edi]" \
"popf" \
@@ -639,7 +693,8 @@ u16 sar_word_asm(u32 *flags,u16 d, u8 s);
value [ax] \
modify exact [ax cl];
-u32 sar_long_asm(u32 *flags,u32 d, u8 s);
+u32 sar_long_asm(u32 * flags, u32 d, u8 s);
+
#pragma aux sar_long_asm = \
"push [edi]" \
"popf" \
@@ -650,7 +705,8 @@ u32 sar_long_asm(u32 *flags,u32 d, u8 s);
value [eax] \
modify exact [eax cl];
-u16 shld_word_asm(u32 *flags,u16 d, u16 fill, u8 s);
+u16 shld_word_asm(u32 * flags, u16 d, u16 fill, u8 s);
+
#pragma aux shld_word_asm = \
"push [edi]" \
"popf" \
@@ -661,7 +717,8 @@ u16 shld_word_asm(u32 *flags,u16 d, u16 fill, u8 s);
value [ax] \
modify exact [ax dx cl];
-u32 shld_long_asm(u32 *flags,u32 d, u32 fill, u8 s);
+u32 shld_long_asm(u32 * flags, u32 d, u32 fill, u8 s);
+
#pragma aux shld_long_asm = \
"push [edi]" \
"popf" \
@@ -672,7 +729,8 @@ u32 shld_long_asm(u32 *flags,u32 d, u32 fill, u8 s);
value [eax] \
modify exact [eax edx cl];
-u16 shrd_word_asm(u32 *flags,u16 d, u16 fill, u8 s);
+u16 shrd_word_asm(u32 * flags, u16 d, u16 fill, u8 s);
+
#pragma aux shrd_word_asm = \
"push [edi]" \
"popf" \
@@ -683,7 +741,8 @@ u16 shrd_word_asm(u32 *flags,u16 d, u16 fill, u8 s);
value [ax] \
modify exact [ax dx cl];
-u32 shrd_long_asm(u32 *flags,u32 d, u32 fill, u8 s);
+u32 shrd_long_asm(u32 * flags, u32 d, u32 fill, u8 s);
+
#pragma aux shrd_long_asm = \
"push [edi]" \
"popf" \
@@ -694,7 +753,8 @@ u32 shrd_long_asm(u32 *flags,u32 d, u32 fill, u8 s);
value [eax] \
modify exact [eax edx cl];
-u8 sbb_byte_asm(u32 *flags,u8 d, u8 s);
+u8 sbb_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux sbb_byte_asm = \
"push [edi]" \
"popf" \
@@ -705,7 +765,8 @@ u8 sbb_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al bl];
-u16 sbb_word_asm(u32 *flags,u16 d, u16 s);
+u16 sbb_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux sbb_word_asm = \
"push [edi]" \
"popf" \
@@ -716,7 +777,8 @@ u16 sbb_word_asm(u32 *flags,u16 d, u16 s);
value [ax] \
modify exact [ax bx];
-u32 sbb_long_asm(u32 *flags,u32 d, u32 s);
+u32 sbb_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux sbb_long_asm = \
"push [edi]" \
"popf" \
@@ -727,7 +789,8 @@ u32 sbb_long_asm(u32 *flags,u32 d, u32 s);
value [eax] \
modify exact [eax ebx];
-u8 sub_byte_asm(u32 *flags,u8 d, u8 s);
+u8 sub_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux sub_byte_asm = \
"push [edi]" \
"popf" \
@@ -738,7 +801,8 @@ u8 sub_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al bl];
-u16 sub_word_asm(u32 *flags,u16 d, u16 s);
+u16 sub_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux sub_word_asm = \
"push [edi]" \
"popf" \
@@ -749,7 +813,8 @@ u16 sub_word_asm(u32 *flags,u16 d, u16 s);
value [ax] \
modify exact [ax bx];
-u32 sub_long_asm(u32 *flags,u32 d, u32 s);
+u32 sub_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux sub_long_asm = \
"push [edi]" \
"popf" \
@@ -760,7 +825,8 @@ u32 sub_long_asm(u32 *flags,u32 d, u32 s);
value [eax] \
modify exact [eax ebx];
-void test_byte_asm(u32 *flags,u8 d, u8 s);
+void test_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux test_byte_asm = \
"push [edi]" \
"popf" \
@@ -770,7 +836,8 @@ void test_byte_asm(u32 *flags,u8 d, u8 s);
parm [edi] [al] [bl] \
modify exact [al bl];
-void test_word_asm(u32 *flags,u16 d, u16 s);
+void test_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux test_word_asm = \
"push [edi]" \
"popf" \
@@ -780,7 +847,8 @@ void test_word_asm(u32 *flags,u16 d, u16 s);
parm [edi] [ax] [bx] \
modify exact [ax bx];
-void test_long_asm(u32 *flags,u32 d, u32 s);
+void test_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux test_long_asm = \
"push [edi]" \
"popf" \
@@ -790,7 +858,8 @@ void test_long_asm(u32 *flags,u32 d, u32 s);
parm [edi] [eax] [ebx] \
modify exact [eax ebx];
-u8 xor_byte_asm(u32 *flags,u8 d, u8 s);
+u8 xor_byte_asm(u32 * flags, u8 d, u8 s);
+
#pragma aux xor_byte_asm = \
"push [edi]" \
"popf" \
@@ -801,7 +870,8 @@ u8 xor_byte_asm(u32 *flags,u8 d, u8 s);
value [al] \
modify exact [al bl];
-u16 xor_word_asm(u32 *flags,u16 d, u16 s);
+u16 xor_word_asm(u32 * flags, u16 d, u16 s);
+
#pragma aux xor_word_asm = \
"push [edi]" \
"popf" \
@@ -812,7 +882,8 @@ u16 xor_word_asm(u32 *flags,u16 d, u16 s);
value [ax] \
modify exact [ax bx];
-u32 xor_long_asm(u32 *flags,u32 d, u32 s);
+u32 xor_long_asm(u32 * flags, u32 d, u32 s);
+
#pragma aux xor_long_asm = \
"push [edi]" \
"popf" \
@@ -823,7 +894,8 @@ u32 xor_long_asm(u32 *flags,u32 d, u32 s);
value [eax] \
modify exact [eax ebx];
-void imul_byte_asm(u32 *flags,u16 *ax,u8 d,u8 s);
+void imul_byte_asm(u32 * flags, u16 * ax, u8 d, u8 s);
+
#pragma aux imul_byte_asm = \
"push [edi]" \
"popf" \
@@ -834,7 +906,8 @@ void imul_byte_asm(u32 *flags,u16 *ax,u8 d,u8 s);
parm [edi] [esi] [al] [bl] \
modify exact [esi ax bl];
-void imul_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 d,u16 s);
+void imul_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 d, u16 s);
+
#pragma aux imul_word_asm = \
"push [edi]" \
"popf" \
@@ -846,7 +919,8 @@ void imul_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 d,u16 s);
parm [edi] [esi] [ecx] [ax] [bx]\
modify exact [esi edi ax bx dx];
-void imul_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 d,u32 s);
+void imul_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 d, u32 s);
+
#pragma aux imul_long_asm = \
"push [edi]" \
"popf" \
@@ -858,7 +932,8 @@ void imul_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 d,u32 s);
parm [edi] [esi] [ecx] [eax] [ebx] \
modify exact [esi edi eax ebx edx];
-void mul_byte_asm(u32 *flags,u16 *ax,u8 d,u8 s);
+void mul_byte_asm(u32 * flags, u16 * ax, u8 d, u8 s);
+
#pragma aux mul_byte_asm = \
"push [edi]" \
"popf" \
@@ -869,7 +944,8 @@ void mul_byte_asm(u32 *flags,u16 *ax,u8 d,u8 s);
parm [edi] [esi] [al] [bl] \
modify exact [esi ax bl];
-void mul_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 d,u16 s);
+void mul_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 d, u16 s);
+
#pragma aux mul_word_asm = \
"push [edi]" \
"popf" \
@@ -881,7 +957,8 @@ void mul_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 d,u16 s);
parm [edi] [esi] [ecx] [ax] [bx]\
modify exact [esi edi ax bx dx];
-void mul_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 d,u32 s);
+void mul_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 d, u32 s);
+
#pragma aux mul_long_asm = \
"push [edi]" \
"popf" \
@@ -893,7 +970,8 @@ void mul_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 d,u32 s);
parm [edi] [esi] [ecx] [eax] [ebx] \
modify exact [esi edi eax ebx edx];
-void idiv_byte_asm(u32 *flags,u8 *al,u8 *ah,u16 d,u8 s);
+void idiv_byte_asm(u32 * flags, u8 * al, u8 * ah, u16 d, u8 s);
+
#pragma aux idiv_byte_asm = \
"push [edi]" \
"popf" \
@@ -905,7 +983,8 @@ void idiv_byte_asm(u32 *flags,u8 *al,u8 *ah,u16 d,u8 s);
parm [edi] [esi] [ecx] [ax] [bl]\
modify exact [esi edi ax bl];
-void idiv_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 dlo,u16 dhi,u16 s);
+void idiv_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 dlo, u16 dhi, u16 s);
+
#pragma aux idiv_word_asm = \
"push [edi]" \
"popf" \
@@ -917,7 +996,8 @@ void idiv_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 dlo,u16 dhi,u16 s);
parm [edi] [esi] [ecx] [ax] [dx] [bx]\
modify exact [esi edi ax dx bx];
-void idiv_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 dlo,u32 dhi,u32 s);
+void idiv_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 dlo, u32 dhi, u32 s);
+
#pragma aux idiv_long_asm = \
"push [edi]" \
"popf" \
@@ -929,7 +1009,8 @@ void idiv_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 dlo,u32 dhi,u32 s);
parm [edi] [esi] [ecx] [eax] [edx] [ebx]\
modify exact [esi edi eax edx ebx];
-void div_byte_asm(u32 *flags,u8 *al,u8 *ah,u16 d,u8 s);
+void div_byte_asm(u32 * flags, u8 * al, u8 * ah, u16 d, u8 s);
+
#pragma aux div_byte_asm = \
"push [edi]" \
"popf" \
@@ -941,7 +1022,8 @@ void div_byte_asm(u32 *flags,u8 *al,u8 *ah,u16 d,u8 s);
parm [edi] [esi] [ecx] [ax] [bl]\
modify exact [esi edi ax bl];
-void div_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 dlo,u16 dhi,u16 s);
+void div_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 dlo, u16 dhi, u16 s);
+
#pragma aux div_word_asm = \
"push [edi]" \
"popf" \
@@ -953,7 +1035,8 @@ void div_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 dlo,u16 dhi,u16 s);
parm [edi] [esi] [ecx] [ax] [dx] [bx]\
modify exact [esi edi ax dx bx];
-void div_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 dlo,u32 dhi,u32 s);
+void div_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 dlo, u32 dhi, u32 s);
+
#pragma aux div_long_asm = \
"push [edi]" \
"popf" \
@@ -967,4 +1050,4 @@ void div_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 dlo,u32 dhi,u32 s);
#endif
-#endif /* __X86EMU_PRIM_ASM_H */
+#endif /* __X86EMU_PRIM_ASM_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h b/xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h
index 6ac2a29f6..0f0e78d71 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h
@@ -40,103 +40,102 @@
#define __X86EMU_PRIM_OPS_H
#ifdef __cplusplus
-extern "C" { /* Use "C" linkage when in C++ mode */
+extern "C" { /* Use "C" linkage when in C++ mode */
#endif
-u16 aaa_word (u16 d);
-u16 aas_word (u16 d);
-u16 aad_word (u16 d);
-u16 aam_word (u8 d);
-u8 adc_byte (u8 d, u8 s);
-u16 adc_word (u16 d, u16 s);
-u32 adc_long (u32 d, u32 s);
-u8 add_byte (u8 d, u8 s);
-u16 add_word (u16 d, u16 s);
-u32 add_long (u32 d, u32 s);
-u8 and_byte (u8 d, u8 s);
-u16 and_word (u16 d, u16 s);
-u32 and_long (u32 d, u32 s);
-u8 cmp_byte (u8 d, u8 s);
-u16 cmp_word (u16 d, u16 s);
-u32 cmp_long (u32 d, u32 s);
-u8 daa_byte (u8 d);
-u8 das_byte (u8 d);
-u8 dec_byte (u8 d);
-u16 dec_word (u16 d);
-u32 dec_long (u32 d);
-u8 inc_byte (u8 d);
-u16 inc_word (u16 d);
-u32 inc_long (u32 d);
-u8 or_byte (u8 d, u8 s);
-u16 or_word (u16 d, u16 s);
-u32 or_long (u32 d, u32 s);
-u8 neg_byte (u8 s);
-u16 neg_word (u16 s);
-u32 neg_long (u32 s);
-u8 not_byte (u8 s);
-u16 not_word (u16 s);
-u32 not_long (u32 s);
-u8 rcl_byte (u8 d, u8 s);
-u16 rcl_word (u16 d, u8 s);
-u32 rcl_long (u32 d, u8 s);
-u8 rcr_byte (u8 d, u8 s);
-u16 rcr_word (u16 d, u8 s);
-u32 rcr_long (u32 d, u8 s);
-u8 rol_byte (u8 d, u8 s);
-u16 rol_word (u16 d, u8 s);
-u32 rol_long (u32 d, u8 s);
-u8 ror_byte (u8 d, u8 s);
-u16 ror_word (u16 d, u8 s);
-u32 ror_long (u32 d, u8 s);
-u8 shl_byte (u8 d, u8 s);
-u16 shl_word (u16 d, u8 s);
-u32 shl_long (u32 d, u8 s);
-u8 shr_byte (u8 d, u8 s);
-u16 shr_word (u16 d, u8 s);
-u32 shr_long (u32 d, u8 s);
-u8 sar_byte (u8 d, u8 s);
-u16 sar_word (u16 d, u8 s);
-u32 sar_long (u32 d, u8 s);
-u16 shld_word (u16 d, u16 fill, u8 s);
-u32 shld_long (u32 d, u32 fill, u8 s);
-u16 shrd_word (u16 d, u16 fill, u8 s);
-u32 shrd_long (u32 d, u32 fill, u8 s);
-u8 sbb_byte (u8 d, u8 s);
-u16 sbb_word (u16 d, u16 s);
-u32 sbb_long (u32 d, u32 s);
-u8 sub_byte (u8 d, u8 s);
-u16 sub_word (u16 d, u16 s);
-u32 sub_long (u32 d, u32 s);
-void test_byte (u8 d, u8 s);
-void test_word (u16 d, u16 s);
-void test_long (u32 d, u32 s);
-u8 xor_byte (u8 d, u8 s);
-u16 xor_word (u16 d, u16 s);
-u32 xor_long (u32 d, u32 s);
-void imul_byte (u8 s);
-void imul_word (u16 s);
-void imul_long (u32 s);
-void imul_long_direct(u32 *res_lo, u32* res_hi,u32 d, u32 s);
-void mul_byte (u8 s);
-void mul_word (u16 s);
-void mul_long (u32 s);
-void idiv_byte (u8 s);
-void idiv_word (u16 s);
-void idiv_long (u32 s);
-void div_byte (u8 s);
-void div_word (u16 s);
-void div_long (u32 s);
-void ins (int size);
-void outs (int size);
-u16 mem_access_word (int addr);
-void push_word (u16 w);
-void push_long (u32 w);
-u16 pop_word (void);
-u32 pop_long (void);
-void cpuid (void);
+ u16 aaa_word(u16 d);
+ u16 aas_word(u16 d);
+ u16 aad_word(u16 d);
+ u16 aam_word(u8 d);
+ u8 adc_byte(u8 d, u8 s);
+ u16 adc_word(u16 d, u16 s);
+ u32 adc_long(u32 d, u32 s);
+ u8 add_byte(u8 d, u8 s);
+ u16 add_word(u16 d, u16 s);
+ u32 add_long(u32 d, u32 s);
+ u8 and_byte(u8 d, u8 s);
+ u16 and_word(u16 d, u16 s);
+ u32 and_long(u32 d, u32 s);
+ u8 cmp_byte(u8 d, u8 s);
+ u16 cmp_word(u16 d, u16 s);
+ u32 cmp_long(u32 d, u32 s);
+ u8 daa_byte(u8 d);
+ u8 das_byte(u8 d);
+ u8 dec_byte(u8 d);
+ u16 dec_word(u16 d);
+ u32 dec_long(u32 d);
+ u8 inc_byte(u8 d);
+ u16 inc_word(u16 d);
+ u32 inc_long(u32 d);
+ u8 or_byte(u8 d, u8 s);
+ u16 or_word(u16 d, u16 s);
+ u32 or_long(u32 d, u32 s);
+ u8 neg_byte(u8 s);
+ u16 neg_word(u16 s);
+ u32 neg_long(u32 s);
+ u8 not_byte(u8 s);
+ u16 not_word(u16 s);
+ u32 not_long(u32 s);
+ u8 rcl_byte(u8 d, u8 s);
+ u16 rcl_word(u16 d, u8 s);
+ u32 rcl_long(u32 d, u8 s);
+ u8 rcr_byte(u8 d, u8 s);
+ u16 rcr_word(u16 d, u8 s);
+ u32 rcr_long(u32 d, u8 s);
+ u8 rol_byte(u8 d, u8 s);
+ u16 rol_word(u16 d, u8 s);
+ u32 rol_long(u32 d, u8 s);
+ u8 ror_byte(u8 d, u8 s);
+ u16 ror_word(u16 d, u8 s);
+ u32 ror_long(u32 d, u8 s);
+ u8 shl_byte(u8 d, u8 s);
+ u16 shl_word(u16 d, u8 s);
+ u32 shl_long(u32 d, u8 s);
+ u8 shr_byte(u8 d, u8 s);
+ u16 shr_word(u16 d, u8 s);
+ u32 shr_long(u32 d, u8 s);
+ u8 sar_byte(u8 d, u8 s);
+ u16 sar_word(u16 d, u8 s);
+ u32 sar_long(u32 d, u8 s);
+ u16 shld_word(u16 d, u16 fill, u8 s);
+ u32 shld_long(u32 d, u32 fill, u8 s);
+ u16 shrd_word(u16 d, u16 fill, u8 s);
+ u32 shrd_long(u32 d, u32 fill, u8 s);
+ u8 sbb_byte(u8 d, u8 s);
+ u16 sbb_word(u16 d, u16 s);
+ u32 sbb_long(u32 d, u32 s);
+ u8 sub_byte(u8 d, u8 s);
+ u16 sub_word(u16 d, u16 s);
+ u32 sub_long(u32 d, u32 s);
+ void test_byte(u8 d, u8 s);
+ void test_word(u16 d, u16 s);
+ void test_long(u32 d, u32 s);
+ u8 xor_byte(u8 d, u8 s);
+ u16 xor_word(u16 d, u16 s);
+ u32 xor_long(u32 d, u32 s);
+ void imul_byte(u8 s);
+ void imul_word(u16 s);
+ void imul_long(u32 s);
+ void imul_long_direct(u32 * res_lo, u32 * res_hi, u32 d, u32 s);
+ void mul_byte(u8 s);
+ void mul_word(u16 s);
+ void mul_long(u32 s);
+ void idiv_byte(u8 s);
+ void idiv_word(u16 s);
+ void idiv_long(u32 s);
+ void div_byte(u8 s);
+ void div_word(u16 s);
+ void div_long(u32 s);
+ void ins(int size);
+ void outs(int size);
+ u16 mem_access_word(int addr);
+ void push_word(u16 w);
+ void push_long(u32 w);
+ u16 pop_word(void);
+ u32 pop_long(void);
+ void cpuid(void);
#ifdef __cplusplus
-} /* End of "C" linkage for C++ */
+} /* End of "C" linkage for C++ */
#endif
-
-#endif /* __X86EMU_PRIM_OPS_H */
+#endif /* __X86EMU_PRIM_OPS_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/regs.h b/xorg-server/hw/xfree86/x86emu/x86emu/regs.h
index 52cf8e41b..6bd061166 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/regs.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/regs.h
@@ -42,7 +42,7 @@
/*---------------------- Macros and type definitions ----------------------*/
#ifdef PACK
-# pragma PACK
+#pragma PACK
#endif
/*
@@ -64,48 +64,48 @@
typedef struct {
u32 e_reg;
- } I32_reg_t;
+} I32_reg_t;
typedef struct {
- u16 filler0, x_reg;
- } I16_reg_t;
+ u16 filler0, x_reg;
+} I16_reg_t;
typedef struct {
- u8 filler0, filler1, h_reg, l_reg;
- } I8_reg_t;
+ u8 filler0, filler1, h_reg, l_reg;
+} I8_reg_t;
-#else /* !__BIG_ENDIAN__ */
+#else /* !__BIG_ENDIAN__ */
typedef struct {
u32 e_reg;
- } I32_reg_t;
+} I32_reg_t;
typedef struct {
- u16 x_reg;
- } I16_reg_t;
+ u16 x_reg;
+} I16_reg_t;
typedef struct {
- u8 l_reg, h_reg;
- } I8_reg_t;
+ u8 l_reg, h_reg;
+} I8_reg_t;
-#endif /* BIG_ENDIAN */
+#endif /* BIG_ENDIAN */
typedef union {
- I32_reg_t I32_reg;
- I16_reg_t I16_reg;
- I8_reg_t I8_reg;
- } i386_general_register;
+ I32_reg_t I32_reg;
+ I16_reg_t I16_reg;
+ I8_reg_t I8_reg;
+} i386_general_register;
struct i386_general_regs {
- i386_general_register A, B, C, D;
- };
+ i386_general_register A, B, C, D;
+};
typedef struct i386_general_regs Gen_reg_t;
struct i386_special_regs {
- i386_general_register SP, BP, SI, DI, IP;
- u32 FLAGS;
- };
+ i386_general_register SP, BP, SI, DI, IP;
+ u32 FLAGS;
+};
/*
* Segment registers here represent the 16 bit quantities
@@ -114,7 +114,7 @@ struct i386_special_regs {
struct i386_segment_regs {
u16 CS, DS, SS, ES, FS, GS;
- };
+};
/* 8 bit registers */
#define R_AH gen.A.I8_reg.h_reg
@@ -258,9 +258,9 @@ struct i386_segment_regs {
#define INTR_HALTED 0x4
typedef struct {
- struct i386_general_regs gen;
- struct i386_special_regs spc;
- struct i386_segment_regs seg;
+ struct i386_general_regs gen;
+ struct i386_special_regs spc;
+ struct i386_segment_regs seg;
/*
* MODE contains information on:
* REPE prefix 2 bits repe,repne
@@ -273,21 +273,21 @@ typedef struct {
* Extern interrupt 1 bits
* Halted 1 bits
*/
- u32 mode;
- volatile int intr; /* mask of pending interrupts */
- int debug;
+ u32 mode;
+ volatile int intr; /* mask of pending interrupts */
+ int debug;
#ifdef DEBUG
- int check;
- u16 saved_ip;
- u16 saved_cs;
- int enc_pos;
- int enc_str_pos;
- char decode_buf[32]; /* encoded byte stream */
- char decoded_buf[256]; /* disassembled strings */
+ int check;
+ u16 saved_ip;
+ u16 saved_cs;
+ int enc_pos;
+ int enc_str_pos;
+ char decode_buf[32]; /* encoded byte stream */
+ char decoded_buf[256]; /* disassembled strings */
#endif
- u8 intno;
- u8 __pad[3];
- } X86EMU_regs;
+ u8 intno;
+ u8 __pad[3];
+} X86EMU_regs;
/****************************************************************************
REMARKS:
@@ -300,20 +300,20 @@ private - private data pointer
x86 - X86 registers
****************************************************************************/
typedef struct {
- unsigned long mem_base;
- unsigned long mem_size;
- void* private;
- X86EMU_regs x86;
- } X86EMU_sysEnv;
+ unsigned long mem_base;
+ unsigned long mem_size;
+ void *private;
+ X86EMU_regs x86;
+} X86EMU_sysEnv;
#ifdef END_PACK
-# pragma END_PACK
+#pragma END_PACK
#endif
/*----------------------------- Global Variables --------------------------*/
#ifdef __cplusplus
-extern "C" { /* Use "C" linkage when in C++ mode */
+extern "C" { /* Use "C" linkage when in C++ mode */
#endif
/* Global emulator machine state.
@@ -321,17 +321,16 @@ extern "C" { /* Use "C" linkage when in C++ mode */
* We keep it global to avoid pointer dereferences in the code for speed.
*/
-extern X86EMU_sysEnv _X86EMU_env;
+ extern X86EMU_sysEnv _X86EMU_env;
#define M _X86EMU_env
/*-------------------------- Function Prototypes --------------------------*/
/* Function to log information at runtime */
-void printk(const char *fmt, ...);
+ void printk(const char *fmt, ...);
#ifdef __cplusplus
-} /* End of "C" linkage for C++ */
+} /* End of "C" linkage for C++ */
#endif
-
-#endif /* __X86EMU_REGS_H */
+#endif /* __X86EMU_REGS_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/types.h b/xorg-server/hw/xfree86/x86emu/x86emu/types.h
index fa23800d0..5a6ef01f8 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/types.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/types.h
@@ -36,7 +36,6 @@
*
****************************************************************************/
-
#ifndef __X86EMU_TYPES_H
#define __X86EMU_TYPES_H
@@ -63,19 +62,19 @@
#include <stdint.h>
-typedef uint8_t u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-typedef uint64_t u64;
+typedef uint8_t u8;
+typedef uint16_t u16;
+typedef uint32_t u32;
+typedef uint64_t u64;
-typedef int8_t s8;
-typedef int16_t s16;
-typedef int32_t s32;
-typedef int64_t s64;
+typedef int8_t s8;
+typedef int16_t s16;
+typedef int32_t s32;
+typedef int64_t s64;
-typedef unsigned int uint;
-typedef int sint;
+typedef unsigned int uint;
+typedef int sint;
typedef u16 X86EMU_pioAddr;
-#endif /* __X86EMU_TYPES_H */
+#endif /* __X86EMU_TYPES_H */
diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h b/xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h
index 112ee366f..f11dc102f 100644
--- a/xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h
+++ b/xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h
@@ -38,7 +38,6 @@
*
****************************************************************************/
-
#ifndef __X86EMU_X86EMUI_H
#define __X86EMU_X86EMUI_H
@@ -74,29 +73,28 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#endif
+#endif
/*--------------------------- Inline Functions ----------------------------*/
#ifdef __cplusplus
-extern "C" { /* Use "C" linkage when in C++ mode */
+extern "C" { /* Use "C" linkage when in C++ mode */
#endif
-extern u8 (X86APIP sys_rdb)(u32 addr);
-extern u16 (X86APIP sys_rdw)(u32 addr);
-extern u32 (X86APIP sys_rdl)(u32 addr);
-extern void (X86APIP sys_wrb)(u32 addr,u8 val);
-extern void (X86APIP sys_wrw)(u32 addr,u16 val);
-extern void (X86APIP sys_wrl)(u32 addr,u32 val);
+ extern u8(X86APIP sys_rdb) (u32 addr);
+ extern u16(X86APIP sys_rdw) (u32 addr);
+ extern u32(X86APIP sys_rdl) (u32 addr);
+ extern void (X86APIP sys_wrb) (u32 addr, u8 val);
+ extern void (X86APIP sys_wrw) (u32 addr, u16 val);
+ extern void (X86APIP sys_wrl) (u32 addr, u32 val);
-extern u8 (X86APIP sys_inb)(X86EMU_pioAddr addr);
-extern u16 (X86APIP sys_inw)(X86EMU_pioAddr addr);
-extern u32 (X86APIP sys_inl)(X86EMU_pioAddr addr);
-extern void (X86APIP sys_outb)(X86EMU_pioAddr addr,u8 val);
-extern void (X86APIP sys_outw)(X86EMU_pioAddr addr,u16 val);
-extern void (X86APIP sys_outl)(X86EMU_pioAddr addr,u32 val);
+ extern u8(X86APIP sys_inb) (X86EMU_pioAddr addr);
+ extern u16(X86APIP sys_inw) (X86EMU_pioAddr addr);
+ extern u32(X86APIP sys_inl) (X86EMU_pioAddr addr);
+ extern void (X86APIP sys_outb) (X86EMU_pioAddr addr, u8 val);
+ extern void (X86APIP sys_outw) (X86EMU_pioAddr addr, u16 val);
+ extern void (X86APIP sys_outl) (X86EMU_pioAddr addr, u32 val);
#ifdef __cplusplus
-} /* End of "C" linkage for C++ */
+} /* End of "C" linkage for C++ */
#endif
-
-#endif /* __X86EMU_X86EMUI_H */
+#endif /* __X86EMU_X86EMUI_H */
diff --git a/xorg-server/hw/xfree86/xaa/xaaBitOrder.c b/xorg-server/hw/xfree86/xaa/xaaBitOrder.c
index 9b124670d..3d9b980e1 100644
--- a/xorg-server/hw/xfree86/xaa/xaaBitOrder.c
+++ b/xorg-server/hw/xfree86/xaa/xaaBitOrder.c
@@ -9,8 +9,8 @@
CARD32
XAAReverseBitOrder(CARD32 v)
{
- return (((0x01010101 & v) << 7) | ((0x02020202 & v) << 5) |
- ((0x04040404 & v) << 3) | ((0x08080808 & v) << 1) |
- ((0x10101010 & v) >> 1) | ((0x20202020 & v) >> 3) |
- ((0x40404040 & v) >> 5) | ((0x80808080 & v) >> 7));
+ return (((0x01010101 & v) << 7) | ((0x02020202 & v) << 5) |
+ ((0x04040404 & v) << 3) | ((0x08080808 & v) << 1) |
+ ((0x10101010 & v) >> 1) | ((0x20202020 & v) >> 3) |
+ ((0x40404040 & v) >> 5) | ((0x80808080 & v) >> 7));
}
diff --git a/xorg-server/hw/xfree86/xaa/xaacexp.h b/xorg-server/hw/xfree86/xaa/xaacexp.h
index 56bcda69a..6fde54c65 100644
--- a/xorg-server/hw/xfree86/xaa/xaacexp.h
+++ b/xorg-server/hw/xfree86/xaa/xaacexp.h
@@ -1,5 +1,4 @@
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
@@ -13,76 +12,76 @@
#endif
#if X_BYTE_ORDER == X_BIG_ENDIAN
-# define SHIFT_L(value, shift) ((value) >> (shift))
-# define SHIFT_R(value, shift) ((value) << (shift))
+#define SHIFT_L(value, shift) ((value) >> (shift))
+#define SHIFT_R(value, shift) ((value) << (shift))
#else
-# define SHIFT_L(value, shift) ((value) << (shift))
-# define SHIFT_R(value, shift) ((value) >> (shift))
+#define SHIFT_L(value, shift) ((value) << (shift))
+#define SHIFT_R(value, shift) ((value) >> (shift))
#endif
#ifndef MSBFIRST
-# ifdef FIXEDBASE
-# define WRITE_IN_BITORDER(dest, offset, data) *(dest) = data;
-# else
-# define WRITE_IN_BITORDER(dest, offset, data) *(dest + offset) = data;
-# endif
-#else
-# ifdef FIXEDBASE
-# define WRITE_IN_BITORDER(dest, offset, data) *(dest) = SWAP_BITS_IN_BYTES(data);
-# else
-# define WRITE_IN_BITORDER(dest, offset, data) *(dest + offset) = SWAP_BITS_IN_BYTES(data)
-# endif
+#ifdef FIXEDBASE
+#define WRITE_IN_BITORDER(dest, offset, data) *(dest) = data;
+#else
+#define WRITE_IN_BITORDER(dest, offset, data) *(dest + offset) = data;
+#endif
+#else
+#ifdef FIXEDBASE
+#define WRITE_IN_BITORDER(dest, offset, data) *(dest) = SWAP_BITS_IN_BYTES(data);
+#else
+#define WRITE_IN_BITORDER(dest, offset, data) *(dest + offset) = SWAP_BITS_IN_BYTES(data)
+#endif
#endif
#ifdef FIXEDBASE
-# ifdef MSBFIRST
-# define WRITE_BITS(b) *base = SWAP_BITS_IN_BYTES(b)
-# define WRITE_BITS1(b) { \
+#ifdef MSBFIRST
+#define WRITE_BITS(b) *base = SWAP_BITS_IN_BYTES(b)
+#define WRITE_BITS1(b) { \
*base = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; }
-# define WRITE_BITS2(b) { \
+#define WRITE_BITS2(b) { \
*base = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \
*base = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_reversed_expand3[((b) & 0xFF0000) >> 16] << 16; }
-# define WRITE_BITS3(b) { \
+#define WRITE_BITS3(b) { \
*base = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \
*base = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_reversed_expand3[((b) & 0xFF0000) >> 16] << 16; \
*base = byte_reversed_expand3[((b) & 0xFF0000) >> 16] >> 16 | \
byte_reversed_expand3[((b) & 0xFF000000) >> 24] << 8; }
-# else
-# define WRITE_BITS(b) *base = (b)
-# define WRITE_BITS1(b) { \
+#else
+#define WRITE_BITS(b) *base = (b)
+#define WRITE_BITS1(b) { \
*base = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; }
-# define WRITE_BITS2(b) { \
+#define WRITE_BITS2(b) { \
*base = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; \
*base = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_expand3[((b) & 0xFF0000) >> 16] << 16; }
-# define WRITE_BITS3(b) { \
+#define WRITE_BITS3(b) { \
*base = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; \
*base = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_expand3[((b) & 0xFF0000) >> 16] << 16; \
*base = byte_expand3[((b) & 0xFF0000) >> 16] >> 16 | \
byte_expand3[((b) & 0xFF000000) >> 24] << 8; }
-# endif
+#endif
#else
-# ifdef MSBFIRST
-# define WRITE_BITS(b) *(base++) = SWAP_BITS_IN_BYTES(b)
-# define WRITE_BITS1(b) { \
+#ifdef MSBFIRST
+#define WRITE_BITS(b) *(base++) = SWAP_BITS_IN_BYTES(b)
+#define WRITE_BITS1(b) { \
*(base++) = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; }
-# define WRITE_BITS2(b) { \
+#define WRITE_BITS2(b) { \
*(base) = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \
*(base + 1) = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_reversed_expand3[((b) & 0xFF0000) >> 16] << 16; \
base += 2; }
-# define WRITE_BITS3(b) { \
+#define WRITE_BITS3(b) { \
*(base) = byte_reversed_expand3[(b) & 0xFF] | \
byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \
*(base + 1) = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \
@@ -90,18 +89,18 @@
*(base + 2) = byte_reversed_expand3[((b) & 0xFF0000) >> 16] >> 16 | \
byte_reversed_expand3[((b) & 0xFF000000) >> 24] << 8; \
base += 3; }
-# else
-# define WRITE_BITS(b) *(base++) = (b)
-# define WRITE_BITS1(b) { \
+#else
+#define WRITE_BITS(b) *(base++) = (b)
+#define WRITE_BITS1(b) { \
*(base++) = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; }
-# define WRITE_BITS2(b) { \
+#define WRITE_BITS2(b) { \
*(base) = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; \
*(base + 1) = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \
byte_expand3[((b) & 0xFF0000) >> 16] << 16; \
base += 2; }
-# define WRITE_BITS3(b) { \
+#define WRITE_BITS3(b) { \
*(base) = byte_expand3[(b) & 0xFF] | \
byte_expand3[((b) & 0xFF00) >> 8] << 24; \
*(base + 1) = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \
@@ -109,19 +108,19 @@
*(base + 2) = byte_expand3[((b) & 0xFF0000) >> 16] >> 16 | \
byte_expand3[((b) & 0xFF000000) >> 24] << 8; \
base += 3; }
-# endif
+#endif
#endif
#ifdef FIXEDBASE
-# ifdef MSBFIRST
-# define EXPNAME(x) x##MSBFirstFixedBase
-# else
-# define EXPNAME(x) x##LSBFirstFixedBase
-# endif
+#ifdef MSBFIRST
+#define EXPNAME(x) x##MSBFirstFixedBase
#else
-# ifdef MSBFIRST
-# define EXPNAME(x) x##MSBFirst
-# else
-# define EXPNAME(x) x##LSBFirst
-# endif
+#define EXPNAME(x) x##LSBFirstFixedBase
+#endif
+#else
+#ifdef MSBFIRST
+#define EXPNAME(x) x##MSBFirst
+#else
+#define EXPNAME(x) x##LSBFirst
+#endif
#endif
diff --git a/xorg-server/hw/xfree86/xaa/xaawrap.h b/xorg-server/hw/xfree86/xaa/xaawrap.h
index 1b7595e95..2d2d7881a 100644
--- a/xorg-server/hw/xfree86/xaa/xaawrap.h
+++ b/xorg-server/hw/xfree86/xaa/xaawrap.h
@@ -1,79 +1,75 @@
-
-#define XAA_SCREEN_PROLOGUE(pScreen, field)\
- ((pScreen)->field = \
- ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
-
-#define XAA_SCREEN_EPILOGUE(pScreen, field, wrapper)\
- ((pScreen)->field = wrapper)
-
-
-#define XAA_GC_FUNC_PROLOGUE(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
- (pGC)->funcs = pGCPriv->wrapFuncs;\
- if(pGCPriv->flags)\
- (pGC)->ops = pGCPriv->wrapOps
-
-#define XAA_GC_FUNC_EPILOGUE(pGC)\
- pGCPriv->wrapFuncs = (pGC)->funcs;\
- (pGC)->funcs = &XAAGCFuncs;\
- if(pGCPriv->flags) {\
- pGCPriv->wrapOps = (pGC)->ops;\
- (pGC)->ops = (pGCPriv->flags & OPS_ARE_ACCEL) ? pGCPriv->XAAOps :\
- &XAAPixmapOps;\
- }
-
-
-#define XAA_GC_OP_PROLOGUE(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
- GCFuncs *oldFuncs = pGC->funcs;\
- pGC->funcs = pGCPriv->wrapFuncs;\
- pGC->ops = pGCPriv->wrapOps
-
-#define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
- GCFuncs *oldFuncs = pGC->funcs;\
- if(!RegionNumRects(pGC->pCompositeClip)) return; \
- pGC->funcs = pGCPriv->wrapFuncs;\
- pGC->ops = pGCPriv->wrapOps
-
-
-#define XAA_GC_OP_EPILOGUE(pGC)\
- pGCPriv->wrapOps = pGC->ops;\
- pGC->funcs = oldFuncs;\
- pGC->ops = pGCPriv->XAAOps
-
-
-#define XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw)\
- XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
- XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDraw));\
- GCFuncs *oldFuncs = pGC->funcs;\
- pGC->funcs = pGCPriv->wrapFuncs;\
- pGC->ops = pGCPriv->wrapOps; \
- SYNC_CHECK(pGC)
-
-#define XAA_PIXMAP_OP_EPILOGUE(pGC)\
- pGCPriv->wrapOps = pGC->ops;\
- pGC->funcs = oldFuncs;\
- pGC->ops = &XAAPixmapOps;\
- pixPriv->flags |= DIRTY
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#define XAA_RENDER_PROLOGUE(pScreen,field)\
- (GetPictureScreen(pScreen)->field = \
- ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
-
-#define XAA_RENDER_EPILOGUE(pScreen, field, wrapper)\
- (GetPictureScreen(pScreen)->field = wrapper)
-
-/* This also works fine for drawables */
-
-#define SYNC_CHECK(pGC) {\
- XAAInfoRecPtr infoRec =\
-((XAAScreenPtr)dixLookupPrivate(&(pGC)->pScreen->devPrivates, XAAGetScreenKey()))->AccelInfoRec; \
- if(infoRec->NeedToSync) {\
- (*infoRec->Sync)(infoRec->pScrn);\
- infoRec->NeedToSync = FALSE;\
- }}
+
+#define XAA_SCREEN_PROLOGUE(pScreen, field)\
+ ((pScreen)->field = \
+ ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
+
+#define XAA_SCREEN_EPILOGUE(pScreen, field, wrapper)\
+ ((pScreen)->field = wrapper)
+
+#define XAA_GC_FUNC_PROLOGUE(pGC)\
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
+ (pGC)->funcs = pGCPriv->wrapFuncs;\
+ if(pGCPriv->flags)\
+ (pGC)->ops = pGCPriv->wrapOps
+
+#define XAA_GC_FUNC_EPILOGUE(pGC)\
+ pGCPriv->wrapFuncs = (pGC)->funcs;\
+ (pGC)->funcs = &XAAGCFuncs;\
+ if(pGCPriv->flags) {\
+ pGCPriv->wrapOps = (pGC)->ops;\
+ (pGC)->ops = (pGCPriv->flags & OPS_ARE_ACCEL) ? pGCPriv->XAAOps :\
+ &XAAPixmapOps;\
+ }
+
+#define XAA_GC_OP_PROLOGUE(pGC)\
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
+ GCFuncs *oldFuncs = pGC->funcs;\
+ pGC->funcs = pGCPriv->wrapFuncs;\
+ pGC->ops = pGCPriv->wrapOps
+
+#define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
+ GCFuncs *oldFuncs = pGC->funcs;\
+ if(!RegionNumRects(pGC->pCompositeClip)) return; \
+ pGC->funcs = pGCPriv->wrapFuncs;\
+ pGC->ops = pGCPriv->wrapOps
+
+#define XAA_GC_OP_EPILOGUE(pGC)\
+ pGCPriv->wrapOps = pGC->ops;\
+ pGC->funcs = oldFuncs;\
+ pGC->ops = pGCPriv->XAAOps
+
+#define XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw)\
+ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
+ XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDraw));\
+ GCFuncs *oldFuncs = pGC->funcs;\
+ pGC->funcs = pGCPriv->wrapFuncs;\
+ pGC->ops = pGCPriv->wrapOps; \
+ SYNC_CHECK(pGC)
+
+#define XAA_PIXMAP_OP_EPILOGUE(pGC)\
+ pGCPriv->wrapOps = pGC->ops;\
+ pGC->funcs = oldFuncs;\
+ pGC->ops = &XAAPixmapOps;\
+ pixPriv->flags |= DIRTY
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#define XAA_RENDER_PROLOGUE(pScreen,field)\
+ (GetPictureScreen(pScreen)->field = \
+ ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
+
+#define XAA_RENDER_EPILOGUE(pScreen, field, wrapper)\
+ (GetPictureScreen(pScreen)->field = wrapper)
+
+/* This also works fine for drawables */
+
+#define SYNC_CHECK(pGC) {\
+ XAAInfoRecPtr infoRec =\
+((XAAScreenPtr)dixLookupPrivate(&(pGC)->pScreen->devPrivates, XAAGetScreenKey()))->AccelInfoRec; \
+ if(infoRec->NeedToSync) {\
+ (*infoRec->Sync)(infoRec->pScrn);\
+ infoRec->NeedToSync = FALSE;\
+ }}
diff --git a/xorg-server/hw/xnest/Args.h b/xorg-server/hw/xnest/Args.h
index c3002bfca..514a39513 100644
--- a/xorg-server/hw/xnest/Args.h
+++ b/xorg-server/hw/xnest/Args.h
@@ -15,24 +15,24 @@ is" without express or implied warranty.
#ifndef XNESTARGC_H
#define XNESTARGS_H
-extern char *xnestDisplayName;
+extern char *xnestDisplayName;
extern Bool xnestSynchronize;
extern Bool xnestFullGeneration;
-extern int xnestDefaultClass;
+extern int xnestDefaultClass;
extern Bool xnestUserDefaultClass;
-extern int xnestDefaultDepth;
+extern int xnestDefaultDepth;
extern Bool xnestUserDefaultDepth;
extern Bool xnestSoftwareScreenSaver;
-extern int xnestX;
-extern int xnestY;
-extern unsigned int xnestWidth;
-extern unsigned int xnestHeight;
+extern int xnestX;
+extern int xnestY;
+extern unsigned int xnestWidth;
+extern unsigned int xnestHeight;
extern int xnestUserGeometry;
-extern int xnestBorderWidth;
+extern int xnestBorderWidth;
extern Bool xnestUserBorderWidth;
-extern char *xnestWindowName;
+extern char *xnestWindowName;
extern int xnestNumScreens;
extern Bool xnestDoDirectColormaps;
extern Window xnestParentWindow;
-#endif /* XNESTARGS_H */
+#endif /* XNESTARGS_H */
diff --git a/xorg-server/hw/xnest/Color.h b/xorg-server/hw/xnest/Color.h
index 3c75fef2f..2c4e0be2a 100644
--- a/xorg-server/hw/xnest/Color.h
+++ b/xorg-server/hw/xnest/Color.h
@@ -1,57 +1,58 @@
-/*
-
-Copyright 1993 by Davor Matic
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation. Davor Matic makes no representations about
-the suitability of this software for any purpose. It is provided "as
-is" without express or implied warranty.
-
-*/
-
-#ifndef XNESTCOLOR_H
-#define XNESTCOLOR_H
-
-#define DUMB_WINDOW_MANAGERS
-
-#define MAXCMAPS 1
-#define MINCMAPS 1
-
-typedef struct {
- Colormap colormap;
-} xnestPrivColormap;
-
-typedef struct {
- int numCmapIDs;
- Colormap *cmapIDs;
- int numWindows;
- Window *windows;
- int index;
-} xnestInstalledColormapWindows;
-
-extern DevPrivateKeyRec xnestColormapPrivateKeyRec;
-#define xnestColormapPriv(pCmap) \
- ((xnestPrivColormap *) dixLookupPrivate(&(pCmap)->devPrivates, &xnestColormapPrivateKeyRec))
-
-#define xnestColormap(pCmap) (xnestColormapPriv(pCmap)->colormap)
-
-#define xnestPixel(pixel) (pixel)
-
-Bool xnestCreateColormap(ColormapPtr pCmap);
-void xnestDestroyColormap(ColormapPtr pCmap);
-void xnestSetInstalledColormapWindows(ScreenPtr pScreen);
-void xnestSetScreenSaverColormapWindow(ScreenPtr pScreen);
-void xnestDirectInstallColormaps(ScreenPtr pScreen);
-void xnestDirectUninstallColormaps(ScreenPtr pScreen);
-void xnestInstallColormap(ColormapPtr pCmap);
-void xnestUninstallColormap(ColormapPtr pCmap);
-int xnestListInstalledColormaps(ScreenPtr pScreen, Colormap *pCmapIDs);
-void xnestStoreColors(ColormapPtr pCmap, int nColors, xColorItem *pColors);
-void xnestResolveColor(unsigned short *pRed, unsigned short *pGreen,
- unsigned short *pBlue, VisualPtr pVisual);
-Bool xnestCreateDefaultColormap(ScreenPtr pScreen);
-
-#endif /* XNESTCOLOR_H */
+/*
+
+Copyright 1993 by Davor Matic
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation. Davor Matic makes no representations about
+the suitability of this software for any purpose. It is provided "as
+is" without express or implied warranty.
+
+*/
+
+#ifndef XNESTCOLOR_H
+#define XNESTCOLOR_H
+
+#define DUMB_WINDOW_MANAGERS
+
+#define MAXCMAPS 1
+#define MINCMAPS 1
+
+typedef struct {
+ Colormap colormap;
+} xnestPrivColormap;
+
+typedef struct {
+ int numCmapIDs;
+ Colormap *cmapIDs;
+ int numWindows;
+ Window *windows;
+ int index;
+} xnestInstalledColormapWindows;
+
+extern DevPrivateKeyRec xnestColormapPrivateKeyRec;
+
+#define xnestColormapPriv(pCmap) \
+ ((xnestPrivColormap *) dixLookupPrivate(&(pCmap)->devPrivates, &xnestColormapPrivateKeyRec))
+
+#define xnestColormap(pCmap) (xnestColormapPriv(pCmap)->colormap)
+
+#define xnestPixel(pixel) (pixel)
+
+Bool xnestCreateColormap(ColormapPtr pCmap);
+void xnestDestroyColormap(ColormapPtr pCmap);
+void xnestSetInstalledColormapWindows(ScreenPtr pScreen);
+void xnestSetScreenSaverColormapWindow(ScreenPtr pScreen);
+void xnestDirectInstallColormaps(ScreenPtr pScreen);
+void xnestDirectUninstallColormaps(ScreenPtr pScreen);
+void xnestInstallColormap(ColormapPtr pCmap);
+void xnestUninstallColormap(ColormapPtr pCmap);
+int xnestListInstalledColormaps(ScreenPtr pScreen, Colormap * pCmapIDs);
+void xnestStoreColors(ColormapPtr pCmap, int nColors, xColorItem * pColors);
+void xnestResolveColor(unsigned short *pRed, unsigned short *pGreen,
+ unsigned short *pBlue, VisualPtr pVisual);
+Bool xnestCreateDefaultColormap(ScreenPtr pScreen);
+
+#endif /* XNESTCOLOR_H */
diff --git a/xorg-server/hw/xnest/Display.h b/xorg-server/hw/xnest/Display.h
index d0eefd57c..4e9dbf463 100644
--- a/xorg-server/hw/xnest/Display.h
+++ b/xorg-server/hw/xnest/Display.h
@@ -21,7 +21,7 @@ is" without express or implied warranty.
#define MAXVISUALSPERDEPTH 256
extern Display *xnestDisplay;
-extern XVisualInfo *xnestVisuals;
+extern XVisualInfo *xnestVisuals;
extern int xnestNumVisuals;
extern int xnestDefaultVisualIndex;
extern Colormap *xnestDefaultColormaps;
@@ -30,8 +30,8 @@ extern int *xnestDepths;
extern int xnestNumDepths;
extern XPixmapFormatValues *xnestPixmapFormats;
extern int xnestNumPixmapFormats;
-extern Pixel xnestBlackPixel;
-extern Pixel xnestWhitePixel;
+extern Pixel xnestBlackPixel;
+extern Pixel xnestWhitePixel;
extern Drawable xnestDefaultDrawables[MAXDEPTH + 1];
extern Pixmap xnestIconBitmap;
extern Pixmap xnestScreenSaverPixmap;
@@ -41,4 +41,4 @@ extern unsigned long xnestEventMask;
void xnestOpenDisplay(int argc, char *argv[]);
void xnestCloseDisplay(void);
-#endif /* XNESTCOMMON_H */
+#endif /* XNESTCOMMON_H */
diff --git a/xorg-server/hw/xnest/Drawable.h b/xorg-server/hw/xnest/Drawable.h
index 7f742cb1f..ea7b5bb21 100644
--- a/xorg-server/hw/xnest/Drawable.h
+++ b/xorg-server/hw/xnest/Drawable.h
@@ -1,26 +1,26 @@
-/*
-
-Copyright 1993 by Davor Matic
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation. Davor Matic makes no representations about
-the suitability of this software for any purpose. It is provided "as
-is" without express or implied warranty.
-
-*/
-
-#ifndef XNESTDRAWABLE_H
-#define XNESTDRAWABLE_H
-
-#include "XNWindow.h"
-#include "XNPixmap.h"
-
-#define xnestDrawable(pDrawable) \
- (WindowDrawable((pDrawable)->type) ? \
- xnestWindow((WindowPtr)pDrawable) : \
- xnestPixmap((PixmapPtr)pDrawable))
-
-#endif /* XNESTDRAWABLE_H */
+/*
+
+Copyright 1993 by Davor Matic
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation. Davor Matic makes no representations about
+the suitability of this software for any purpose. It is provided "as
+is" without express or implied warranty.
+
+*/
+
+#ifndef XNESTDRAWABLE_H
+#define XNESTDRAWABLE_H
+
+#include "XNWindow.h"
+#include "XNPixmap.h"
+
+#define xnestDrawable(pDrawable) \
+ (WindowDrawable((pDrawable)->type) ? \
+ xnestWindow((WindowPtr)pDrawable) : \
+ xnestPixmap((PixmapPtr)pDrawable))
+
+#endif /* XNESTDRAWABLE_H */
diff --git a/xorg-server/hw/xnest/Events.h b/xorg-server/hw/xnest/Events.h
index 2441accd5..1c1b8cd46 100644
--- a/xorg-server/hw/xnest/Events.h
+++ b/xorg-server/hw/xnest/Events.h
@@ -26,4 +26,4 @@ void xnestCollectExposures(void);
void xnestCollectEvents(void);
void xnestQueueKeyEvent(int type, unsigned int keycode);
-#endif /* XNESTEVENTS_H */
+#endif /* XNESTEVENTS_H */
diff --git a/xorg-server/hw/xnest/Handlers.c b/xorg-server/hw/xnest/Handlers.c
index a113f488a..4605b90bd 100644
--- a/xorg-server/hw/xnest/Handlers.c
+++ b/xorg-server/hw/xnest/Handlers.c
@@ -34,12 +34,12 @@ is" without express or implied warranty.
void
xnestBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadMask)
{
- xnestCollectExposures();
- XFlush(xnestDisplay);
+ xnestCollectExposures();
+ XFlush(xnestDisplay);
}
void
xnestWakeupHandler(pointer blockData, int result, pointer pReadMask)
{
- xnestCollectEvents();
+ xnestCollectEvents();
}
diff --git a/xorg-server/hw/xnest/Handlers.h b/xorg-server/hw/xnest/Handlers.h
index 16228a0c1..7160bdd13 100644
--- a/xorg-server/hw/xnest/Handlers.h
+++ b/xorg-server/hw/xnest/Handlers.h
@@ -16,7 +16,7 @@ is" without express or implied warranty.
#define XNESTHANDLERS_H
void xnestBlockHandler(pointer blockData, OSTimePtr pTimeout,
- pointer pReadMask);
+ pointer pReadMask);
void xnestWakeupHandler(pointer blockData, int result, pointer pReadMask);
-#endif /* XNESTHANDLERS_H */
+#endif /* XNESTHANDLERS_H */
diff --git a/xorg-server/hw/xnest/Init.h b/xorg-server/hw/xnest/Init.h
index 4bed0ee67..7c0291ebf 100644
--- a/xorg-server/hw/xnest/Init.h
+++ b/xorg-server/hw/xnest/Init.h
@@ -17,4 +17,4 @@ is" without express or implied warranty.
extern Bool xnestDoFullGeneration;
-#endif /* XNESTINIT_H */
+#endif /* XNESTINIT_H */
diff --git a/xorg-server/hw/xnest/Keyboard.h b/xorg-server/hw/xnest/Keyboard.h
index 546a1cbe4..45d56bc08 100644
--- a/xorg-server/hw/xnest/Keyboard.h
+++ b/xorg-server/hw/xnest/Keyboard.h
@@ -21,8 +21,8 @@ is" without express or implied warranty.
extern DeviceIntPtr xnestKeyboardDevice;
void xnestBell(int volume, DeviceIntPtr pDev, pointer ctrl, int cls);
-void xnestChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl);
+void xnestChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl * ctrl);
int xnestKeyboardProc(DeviceIntPtr pDev, int onoff);
void xnestUpdateModifierState(unsigned int state);
-#endif /* XNESTKEYBOARD_H */
+#endif /* XNESTKEYBOARD_H */
diff --git a/xorg-server/hw/xnest/Pixmap.c b/xorg-server/hw/xnest/Pixmap.c
index eccf56986..13e1610fd 100644
--- a/xorg-server/hw/xnest/Pixmap.c
+++ b/xorg-server/hw/xnest/Pixmap.c
@@ -36,101 +36,101 @@ DevPrivateKeyRec xnestPixmapPrivateKeyRec;
PixmapPtr
xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
- unsigned usage_hint)
+ unsigned usage_hint)
{
- PixmapPtr pPixmap;
-
- pPixmap = AllocatePixmap(pScreen, 0);
- if (!pPixmap)
- return NullPixmap;
- pPixmap->drawable.type = DRAWABLE_PIXMAP;
- pPixmap->drawable.class = 0;
- pPixmap->drawable.depth = depth;
- pPixmap->drawable.bitsPerPixel = depth;
- pPixmap->drawable.id = 0;
- pPixmap->drawable.x = 0;
- pPixmap->drawable.y = 0;
- pPixmap->drawable.width = width;
- pPixmap->drawable.height = height;
- pPixmap->drawable.pScreen = pScreen;
- pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
- pPixmap->refcnt = 1;
- pPixmap->devKind = PixmapBytePad(width, depth);
- pPixmap->usage_hint = usage_hint;
- if (width && height)
- xnestPixmapPriv(pPixmap)->pixmap =
- XCreatePixmap(xnestDisplay,
- xnestDefaultWindows[pScreen->myNum],
- width, height, depth);
- else
- xnestPixmapPriv(pPixmap)->pixmap = 0;
-
- return pPixmap;
+ PixmapPtr pPixmap;
+
+ pPixmap = AllocatePixmap(pScreen, 0);
+ if (!pPixmap)
+ return NullPixmap;
+ pPixmap->drawable.type = DRAWABLE_PIXMAP;
+ pPixmap->drawable.class = 0;
+ pPixmap->drawable.depth = depth;
+ pPixmap->drawable.bitsPerPixel = depth;
+ pPixmap->drawable.id = 0;
+ pPixmap->drawable.x = 0;
+ pPixmap->drawable.y = 0;
+ pPixmap->drawable.width = width;
+ pPixmap->drawable.height = height;
+ pPixmap->drawable.pScreen = pScreen;
+ pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
+ pPixmap->refcnt = 1;
+ pPixmap->devKind = PixmapBytePad(width, depth);
+ pPixmap->usage_hint = usage_hint;
+ if (width && height)
+ xnestPixmapPriv(pPixmap)->pixmap =
+ XCreatePixmap(xnestDisplay,
+ xnestDefaultWindows[pScreen->myNum],
+ width, height, depth);
+ else
+ xnestPixmapPriv(pPixmap)->pixmap = 0;
+
+ return pPixmap;
}
Bool
xnestDestroyPixmap(PixmapPtr pPixmap)
{
- if(--pPixmap->refcnt)
+ if (--pPixmap->refcnt)
+ return TRUE;
+ XFreePixmap(xnestDisplay, xnestPixmap(pPixmap));
+ FreePixmap(pPixmap);
return TRUE;
- XFreePixmap(xnestDisplay, xnestPixmap(pPixmap));
- FreePixmap(pPixmap);
- return TRUE;
}
RegionPtr
xnestPixmapToRegion(PixmapPtr pPixmap)
{
- XImage *ximage;
- register RegionPtr pReg, pTmpReg;
- register int x, y;
- unsigned long previousPixel, currentPixel;
- BoxRec Box = { 0, 0, 0, 0 };
- Bool overlap;
-
- ximage = XGetImage(xnestDisplay, xnestPixmap(pPixmap), 0, 0,
- pPixmap->drawable.width, pPixmap->drawable.height,
- 1, XYPixmap);
-
- pReg = RegionCreate(NULL, 1);
- pTmpReg = RegionCreate(NULL, 1);
- if(!pReg || !pTmpReg) {
- XDestroyImage(ximage);
- return NullRegion;
- }
-
- for (y = 0; y < pPixmap->drawable.height; y++) {
- Box.y1 = y;
- Box.y2 = y + 1;
- previousPixel = 0L;
- for (x = 0; x < pPixmap->drawable.width; x++) {
- currentPixel = XGetPixel(ximage, x, y);
- if (previousPixel != currentPixel) {
- if (previousPixel == 0L) {
- /* left edge */
- Box.x1 = x;
- }
- else if (currentPixel == 0L) {
- /* right edge */
- Box.x2 = x;
- RegionReset(pTmpReg, &Box);
- RegionAppend(pReg, pTmpReg);
- }
- previousPixel = currentPixel;
- }
+ XImage *ximage;
+ register RegionPtr pReg, pTmpReg;
+ register int x, y;
+ unsigned long previousPixel, currentPixel;
+ BoxRec Box = { 0, 0, 0, 0 };
+ Bool overlap;
+
+ ximage = XGetImage(xnestDisplay, xnestPixmap(pPixmap), 0, 0,
+ pPixmap->drawable.width, pPixmap->drawable.height,
+ 1, XYPixmap);
+
+ pReg = RegionCreate(NULL, 1);
+ pTmpReg = RegionCreate(NULL, 1);
+ if (!pReg || !pTmpReg) {
+ XDestroyImage(ximage);
+ return NullRegion;
}
- if (previousPixel != 0L) {
- /* right edge because of the end of pixmap */
- Box.x2 = pPixmap->drawable.width;
- RegionReset(pTmpReg, &Box);
- RegionAppend(pReg, pTmpReg);
+
+ for (y = 0; y < pPixmap->drawable.height; y++) {
+ Box.y1 = y;
+ Box.y2 = y + 1;
+ previousPixel = 0L;
+ for (x = 0; x < pPixmap->drawable.width; x++) {
+ currentPixel = XGetPixel(ximage, x, y);
+ if (previousPixel != currentPixel) {
+ if (previousPixel == 0L) {
+ /* left edge */
+ Box.x1 = x;
+ }
+ else if (currentPixel == 0L) {
+ /* right edge */
+ Box.x2 = x;
+ RegionReset(pTmpReg, &Box);
+ RegionAppend(pReg, pTmpReg);
+ }
+ previousPixel = currentPixel;
+ }
+ }
+ if (previousPixel != 0L) {
+ /* right edge because of the end of pixmap */
+ Box.x2 = pPixmap->drawable.width;
+ RegionReset(pTmpReg, &Box);
+ RegionAppend(pReg, pTmpReg);
+ }
}
- }
-
- RegionDestroy(pTmpReg);
- XDestroyImage(ximage);
- RegionValidate(pReg, &overlap);
+ RegionDestroy(pTmpReg);
+ XDestroyImage(ximage);
+
+ RegionValidate(pReg, &overlap);
- return pReg;
+ return pReg;
}
diff --git a/xorg-server/hw/xnest/Pointer.h b/xorg-server/hw/xnest/Pointer.h
index 890726f55..d0047c517 100644
--- a/xorg-server/hw/xnest/Pointer.h
+++ b/xorg-server/hw/xnest/Pointer.h
@@ -23,7 +23,7 @@ is" without express or implied warranty.
extern DeviceIntPtr xnestPointerDevice;
-void xnestChangePointerControl(DeviceIntPtr pDev, PtrCtrl *ctrl);
+void xnestChangePointerControl(DeviceIntPtr pDev, PtrCtrl * ctrl);
int xnestPointerProc(DeviceIntPtr pDev, int onoff);
-#endif /* XNESTPOINTER_H */
+#endif /* XNESTPOINTER_H */
diff --git a/xorg-server/hw/xnest/Screen.h b/xorg-server/hw/xnest/Screen.h
index b113c6460..1d255d79b 100644
--- a/xorg-server/hw/xnest/Screen.h
+++ b/xorg-server/hw/xnest/Screen.h
@@ -22,4 +22,4 @@ ScreenPtr xnestScreen(Window window);
Bool xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]);
Bool xnestCloseScreen(int index, ScreenPtr pScreen);
-#endif /* XNESTSCREEN_H */
+#endif /* XNESTSCREEN_H */
diff --git a/xorg-server/hw/xnest/Visual.c b/xorg-server/hw/xnest/Visual.c
index da1d63c10..63198ba4f 100644
--- a/xorg-server/hw/xnest/Visual.c
+++ b/xorg-server/hw/xnest/Visual.c
@@ -30,41 +30,41 @@ is" without express or implied warranty.
Visual *
xnestVisual(VisualPtr pVisual)
{
- int i;
+ int i;
- for (i = 0; i < xnestNumVisuals; i++)
- if (pVisual->class == xnestVisuals[i].class &&
- pVisual->bitsPerRGBValue == xnestVisuals[i].bits_per_rgb &&
- pVisual->ColormapEntries == xnestVisuals[i].colormap_size &&
- pVisual->nplanes == xnestVisuals[i].depth &&
- pVisual->redMask == xnestVisuals[i].red_mask &&
- pVisual->greenMask == xnestVisuals[i].green_mask &&
- pVisual->blueMask == xnestVisuals[i].blue_mask)
- return xnestVisuals[i].visual;
+ for (i = 0; i < xnestNumVisuals; i++)
+ if (pVisual->class == xnestVisuals[i].class &&
+ pVisual->bitsPerRGBValue == xnestVisuals[i].bits_per_rgb &&
+ pVisual->ColormapEntries == xnestVisuals[i].colormap_size &&
+ pVisual->nplanes == xnestVisuals[i].depth &&
+ pVisual->redMask == xnestVisuals[i].red_mask &&
+ pVisual->greenMask == xnestVisuals[i].green_mask &&
+ pVisual->blueMask == xnestVisuals[i].blue_mask)
+ return xnestVisuals[i].visual;
- return NULL;
+ return NULL;
}
Visual *
xnestVisualFromID(ScreenPtr pScreen, VisualID visual)
{
- int i;
-
- for (i = 0; i < pScreen->numVisuals; i++)
- if (pScreen->visuals[i].vid == visual)
- return xnestVisual(&pScreen->visuals[i]);
+ int i;
- return NULL;
+ for (i = 0; i < pScreen->numVisuals; i++)
+ if (pScreen->visuals[i].vid == visual)
+ return xnestVisual(&pScreen->visuals[i]);
+
+ return NULL;
}
Colormap
-xnestDefaultVisualColormap(Visual *visual)
+xnestDefaultVisualColormap(Visual * visual)
{
- int i;
-
- for (i = 0; i < xnestNumVisuals; i++)
- if (xnestVisuals[i].visual == visual)
- return xnestDefaultColormaps[i];
-
- return None;
+ int i;
+
+ for (i = 0; i < xnestNumVisuals; i++)
+ if (xnestVisuals[i].visual == visual)
+ return xnestDefaultColormaps[i];
+
+ return None;
}
diff --git a/xorg-server/hw/xnest/Visual.h b/xorg-server/hw/xnest/Visual.h
index 1bd203709..c3ae8a19f 100644
--- a/xorg-server/hw/xnest/Visual.h
+++ b/xorg-server/hw/xnest/Visual.h
@@ -17,9 +17,9 @@ is" without express or implied warranty.
Visual *xnestVisual(VisualPtr pVisual);
Visual *xnestVisualFromID(ScreenPtr pScreen, VisualID visual);
-Colormap xnestDefaultVisualColormap(Visual *visual);
+Colormap xnestDefaultVisualColormap(Visual * visual);
#define xnestDefaultVisual(pScreen) \
xnestVisualFromID((pScreen), (pScreen)->rootVisual)
-#endif /* XNESTVISUAL_H */
+#endif /* XNESTVISUAL_H */
diff --git a/xorg-server/hw/xnest/XNFont.h b/xorg-server/hw/xnest/XNFont.h
index 92c112f36..a210b1790 100644
--- a/xorg-server/hw/xnest/XNFont.h
+++ b/xorg-server/hw/xnest/XNFont.h
@@ -16,7 +16,7 @@ is" without express or implied warranty.
#define XNESTFONT_H
typedef struct {
- XFontStruct *font_struct;
+ XFontStruct *font_struct;
} xnestPrivFont;
extern int xnestFontPrivateIndex;
@@ -31,4 +31,4 @@ extern int xnestFontPrivateIndex;
Bool xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont);
Bool xnestUnrealizeFont(ScreenPtr pScreen, FontPtr pFont);
-#endif /* XNESTFONT_H */
+#endif /* XNESTFONT_H */
diff --git a/xorg-server/hw/xnest/XNGC.h b/xorg-server/hw/xnest/XNGC.h
index c4a6cef77..c7c25e426 100644
--- a/xorg-server/hw/xnest/XNGC.h
+++ b/xorg-server/hw/xnest/XNGC.h
@@ -18,10 +18,11 @@ is" without express or implied warranty.
/* This file uses the GC definition form Xlib.h as XlibGC. */
typedef struct {
- XlibGC gc;
+ XlibGC gc;
} xnestPrivGC;
extern DevPrivateKeyRec xnestGCPrivateKeyRec;
+
#define xnestGCPrivateKey (&xnestGCPrivateKeyRec)
#define xnestGCPriv(pGC) ((xnestPrivGC *) \
@@ -39,4 +40,4 @@ void xnestDestroyClip(GCPtr pGC);
void xnestDestroyClipHelper(GCPtr pGC);
void xnestCopyClip(GCPtr pGCDst, GCPtr pGCSrc);
-#endif /* XNESTGC_H */
+#endif /* XNESTGC_H */
diff --git a/xorg-server/hw/xnest/XNPixmap.h b/xorg-server/hw/xnest/XNPixmap.h
index 0d7c6b61e..268ba1e8b 100644
--- a/xorg-server/hw/xnest/XNPixmap.h
+++ b/xorg-server/hw/xnest/XNPixmap.h
@@ -1,37 +1,38 @@
-/*
-
-Copyright 1993 by Davor Matic
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation. Davor Matic makes no representations about
-the suitability of this software for any purpose. It is provided "as
-is" without express or implied warranty.
-
-*/
-
-#ifndef XNESTPIXMAP_H
-#define XNESTPIXMAP_H
-
-extern DevPrivateKeyRec xnestPixmapPrivateKeyRec;
-#define xnestPixmapPrivateKey (&xnestPixmapPrivateKeyRec)
-
-typedef struct {
- Pixmap pixmap;
-} xnestPrivPixmap;
-
-#define xnestPixmapPriv(pPixmap) ((xnestPrivPixmap *) \
- dixLookupPrivate(&(pPixmap)->devPrivates, xnestPixmapPrivateKey))
-
-#define xnestPixmap(pPixmap) (xnestPixmapPriv(pPixmap)->pixmap)
-
-#define xnestSharePixmap(pPixmap) ((pPixmap)->refcnt++)
-
-PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height,
- int depth, unsigned usage_hint);
-Bool xnestDestroyPixmap(PixmapPtr pPixmap);
-RegionPtr xnestPixmapToRegion(PixmapPtr pPixmap);
-
-#endif /* XNESTPIXMAP_H */
+/*
+
+Copyright 1993 by Davor Matic
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation. Davor Matic makes no representations about
+the suitability of this software for any purpose. It is provided "as
+is" without express or implied warranty.
+
+*/
+
+#ifndef XNESTPIXMAP_H
+#define XNESTPIXMAP_H
+
+extern DevPrivateKeyRec xnestPixmapPrivateKeyRec;
+
+#define xnestPixmapPrivateKey (&xnestPixmapPrivateKeyRec)
+
+typedef struct {
+ Pixmap pixmap;
+} xnestPrivPixmap;
+
+#define xnestPixmapPriv(pPixmap) ((xnestPrivPixmap *) \
+ dixLookupPrivate(&(pPixmap)->devPrivates, xnestPixmapPrivateKey))
+
+#define xnestPixmap(pPixmap) (xnestPixmapPriv(pPixmap)->pixmap)
+
+#define xnestSharePixmap(pPixmap) ((pPixmap)->refcnt++)
+
+PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height,
+ int depth, unsigned usage_hint);
+Bool xnestDestroyPixmap(PixmapPtr pPixmap);
+RegionPtr xnestPixmapToRegion(PixmapPtr pPixmap);
+
+#endif /* XNESTPIXMAP_H */
diff --git a/xorg-server/hw/xnest/XNWindow.h b/xorg-server/hw/xnest/XNWindow.h
index c620767aa..02b0f3f36 100644
--- a/xorg-server/hw/xnest/XNWindow.h
+++ b/xorg-server/hw/xnest/XNWindow.h
@@ -1,73 +1,74 @@
-/*
-
-Copyright 1993 by Davor Matic
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation. Davor Matic makes no representations about
-the suitability of this software for any purpose. It is provided "as
-is" without express or implied warranty.
-
-*/
-
-#ifndef XNESTWINDOW_H
-#define XNESTWINDOW_H
-
-typedef struct {
- Window window;
- Window parent;
- int x;
- int y;
- unsigned int width;
- unsigned int height;
- unsigned int border_width;
- Window sibling_above;
- RegionPtr bounding_shape;
- RegionPtr clip_shape;
-} xnestPrivWin;
-
-typedef struct {
- WindowPtr pWin;
- Window window;
-} xnestWindowMatch;
-
-extern DevPrivateKeyRec xnestWindowPrivateKeyRec;
-#define xnestWindowPrivateKey (&xnestWindowPrivateKeyRec)
-
-#define xnestWindowPriv(pWin) ((xnestPrivWin *) \
- dixLookupPrivate(&(pWin)->devPrivates, xnestWindowPrivateKey))
-
-#define xnestWindow(pWin) (xnestWindowPriv(pWin)->window)
-
-#define xnestWindowParent(pWin) \
- ((pWin)->parent ? \
- xnestWindow((pWin)->parent) : \
- xnestDefaultWindows[pWin->drawable.pScreen->myNum])
-
-#define xnestWindowSiblingAbove(pWin) \
- ((pWin)->prevSib ? xnestWindow((pWin)->prevSib) : None)
-
-#define xnestWindowSiblingBelow(pWin) \
- ((pWin)->nextSib ? xnestWindow((pWin)->nextSib) : None)
-
-#define CWParent CWSibling
-#define CWStackingOrder CWStackMode
-
-WindowPtr xnestWindowPtr(Window window);
-Bool xnestCreateWindow(WindowPtr pWin);
-Bool xnestDestroyWindow(WindowPtr pWin);
-Bool xnestPositionWindow(WindowPtr pWin, int x, int y);
-void xnestConfigureWindow(WindowPtr pWin, unsigned int mask);
-Bool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
-Bool xnestRealizeWindow(WindowPtr pWin);
-Bool xnestUnrealizeWindow(WindowPtr pWin);
-void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion);
-void xnestClipNotify(WindowPtr pWin, int dx, int dy);
-void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn,
- RegionPtr other_exposed);
-void xnestSetShape(WindowPtr pWin, int kind);
-void xnestShapeWindow(WindowPtr pWin);
-
-#endif /* XNESTWINDOW_H */
+/*
+
+Copyright 1993 by Davor Matic
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation. Davor Matic makes no representations about
+the suitability of this software for any purpose. It is provided "as
+is" without express or implied warranty.
+
+*/
+
+#ifndef XNESTWINDOW_H
+#define XNESTWINDOW_H
+
+typedef struct {
+ Window window;
+ Window parent;
+ int x;
+ int y;
+ unsigned int width;
+ unsigned int height;
+ unsigned int border_width;
+ Window sibling_above;
+ RegionPtr bounding_shape;
+ RegionPtr clip_shape;
+} xnestPrivWin;
+
+typedef struct {
+ WindowPtr pWin;
+ Window window;
+} xnestWindowMatch;
+
+extern DevPrivateKeyRec xnestWindowPrivateKeyRec;
+
+#define xnestWindowPrivateKey (&xnestWindowPrivateKeyRec)
+
+#define xnestWindowPriv(pWin) ((xnestPrivWin *) \
+ dixLookupPrivate(&(pWin)->devPrivates, xnestWindowPrivateKey))
+
+#define xnestWindow(pWin) (xnestWindowPriv(pWin)->window)
+
+#define xnestWindowParent(pWin) \
+ ((pWin)->parent ? \
+ xnestWindow((pWin)->parent) : \
+ xnestDefaultWindows[pWin->drawable.pScreen->myNum])
+
+#define xnestWindowSiblingAbove(pWin) \
+ ((pWin)->prevSib ? xnestWindow((pWin)->prevSib) : None)
+
+#define xnestWindowSiblingBelow(pWin) \
+ ((pWin)->nextSib ? xnestWindow((pWin)->nextSib) : None)
+
+#define CWParent CWSibling
+#define CWStackingOrder CWStackMode
+
+WindowPtr xnestWindowPtr(Window window);
+Bool xnestCreateWindow(WindowPtr pWin);
+Bool xnestDestroyWindow(WindowPtr pWin);
+Bool xnestPositionWindow(WindowPtr pWin, int x, int y);
+void xnestConfigureWindow(WindowPtr pWin, unsigned int mask);
+Bool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
+Bool xnestRealizeWindow(WindowPtr pWin);
+Bool xnestUnrealizeWindow(WindowPtr pWin);
+void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion);
+void xnestClipNotify(WindowPtr pWin, int dx, int dy);
+void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn,
+ RegionPtr other_exposed);
+void xnestSetShape(WindowPtr pWin, int kind);
+void xnestShapeWindow(WindowPtr pWin);
+
+#endif /* XNESTWINDOW_H */
diff --git a/xorg-server/hw/xnest/Xnest.h b/xorg-server/hw/xnest/Xnest.h
index 827030c8f..adb9daf8b 100644
--- a/xorg-server/hw/xnest/Xnest.h
+++ b/xorg-server/hw/xnest/Xnest.h
@@ -40,6 +40,7 @@ typedef unsigned long Mask64;
typedef unsigned long Atom64;
typedef unsigned long VisualID64;
typedef unsigned long Time64;
+
#define XID XID64
#define Mask Mask64
#define Atom Atom64
@@ -53,6 +54,7 @@ typedef XID Cursor64;
typedef XID Colormap64;
typedef XID GContext64;
typedef XID KeySym64;
+
#define Window Window64
#define Drawable Drawable64
#define Font Font64
@@ -86,9 +88,3 @@ typedef XID KeySym64;
#undef GContext
#undef KeySym
#endif /*_XSERVER64_tmp*/
-
-
-
-
-
-
diff --git a/xorg-server/hw/xnest/xnest-config.h b/xorg-server/hw/xnest/xnest-config.h
index 4889f1fdd..ef48c580f 100644
--- a/xorg-server/hw/xnest/xnest-config.h
+++ b/xorg-server/hw/xnest/xnest-config.h
@@ -33,4 +33,4 @@
#undef MITSHM
-#endif /* XNEST_CONFIG_H */
+#endif /* XNEST_CONFIG_H */
diff --git a/xorg-server/hw/xquartz/sanitizedCarbon.h b/xorg-server/hw/xquartz/sanitizedCarbon.h
index cc6ef198d..2002a6c46 100644
--- a/xorg-server/hw/xquartz/sanitizedCarbon.h
+++ b/xorg-server/hw/xquartz/sanitizedCarbon.h
@@ -10,11 +10,11 @@
// the basic X server headers. Use QD_<name> to use the QuickDraw
// definition of any of these symbols, or the normal name for the
// X11 definition.
-#define Cursor QD_Cursor
-#define WindowPtr QD_WindowPtr
-#define Picture QD_Picture
-#define BOOL OSX_BOOL
-#define EventType HIT_EventType
+#define Cursor QD_Cursor
+#define WindowPtr QD_WindowPtr
+#define Picture QD_Picture
+#define BOOL OSX_BOOL
+#define EventType HIT_EventType
#include <ApplicationServices/ApplicationServices.h>
#include <CoreServices/CoreServices.h>
diff --git a/xorg-server/hw/xquartz/sanitizedCocoa.h b/xorg-server/hw/xquartz/sanitizedCocoa.h
index 5a2a282d1..f1f1cc2e2 100644
--- a/xorg-server/hw/xquartz/sanitizedCocoa.h
+++ b/xorg-server/hw/xquartz/sanitizedCocoa.h
@@ -10,11 +10,11 @@
// the basic X server headers. Use QD_<name> to use the QuickDraw
// definition of any of these symbols, or the normal name for the
// X11 definition.
-#define Cursor QD_Cursor
-#define WindowPtr QD_WindowPtr
-#define Picture QD_Picture
-#define BOOL OSX_BOOL
-#define EventType HIT_EventType
+#define Cursor QD_Cursor
+#define WindowPtr QD_WindowPtr
+#define Picture QD_Picture
+#define BOOL OSX_BOOL
+#define EventType HIT_EventType
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
diff --git a/xorg-server/hw/xwin/winclip.c b/xorg-server/hw/xwin/winclip.c
index aab7d632d..941e9483a 100644
--- a/xorg-server/hw/xwin/winclip.c
+++ b/xorg-server/hw/xwin/winclip.c
@@ -35,8 +35,8 @@
/* Look at mfb/mfbclip.c for sample implementation */
RegionPtr
-winPixmapToRegionNativeGDI (PixmapPtr pPix)
+winPixmapToRegionNativeGDI(PixmapPtr pPix)
{
- ErrorF ("winPixmapToRegion()\n");
- return NULL;
+ ErrorF("winPixmapToRegion()\n");
+ return NULL;
}
diff --git a/xorg-server/hw/xwin/winfont.c b/xorg-server/hw/xwin/winfont.c
index af3e90da5..7bcbce1c7 100644
--- a/xorg-server/hw/xwin/winfont.c
+++ b/xorg-server/hw/xwin/winfont.c
@@ -37,44 +37,46 @@
/* See Porting Layer Definition - p. 32 */
/* See mfb/mfbfont.c - mfbRealizeFont() - which is empty :) */
Bool
-winRealizeFontNativeGDI (ScreenPtr pScreen, FontPtr pFont)
+winRealizeFontNativeGDI(ScreenPtr pScreen, FontPtr pFont)
{
- BOOL fResult = TRUE;
- winScreenPriv(pScreen);
-
+ BOOL fResult = TRUE;
+
+ winScreenPriv(pScreen);
+
#if CYGDEBUG
- winTrace ("winRealizeFont (%p, %p)\n", pScreen, pFont);
+ winTrace("winRealizeFont (%p, %p)\n", pScreen, pFont);
#endif
- WIN_UNWRAP(RealizeFont);
- if (pScreen->RealizeFont)
- fResult = (*pScreen->RealizeFont) (pScreen, pFont);
- WIN_WRAP(RealizeFont, winRealizeFontNativeGDI);
-
- return fResult;
+ WIN_UNWRAP(RealizeFont);
+ if (pScreen->RealizeFont)
+ fResult = (*pScreen->RealizeFont) (pScreen, pFont);
+ WIN_WRAP(RealizeFont, winRealizeFontNativeGDI);
+
+ return fResult;
}
/* See Porting Layer Definition - p. 32 */
/* See mfb/mfbfont.c - mfbUnrealizeFont() - which is empty :) */
Bool
-winUnrealizeFontNativeGDI (ScreenPtr pScreen, FontPtr pFont)
+winUnrealizeFontNativeGDI(ScreenPtr pScreen, FontPtr pFont)
{
- BOOL fResult = TRUE;
- winScreenPriv(pScreen);
-
+ BOOL fResult = TRUE;
+
+ winScreenPriv(pScreen);
+
#if CYGDEBUG
- winTrace ("winUnrealizeFont (%p, %p)\n", pScreen, pFont);
+ winTrace("winUnrealizeFont (%p, %p)\n", pScreen, pFont);
#endif
- WIN_UNWRAP(UnrealizeFont);
- if (pScreen->UnrealizeFont)
- fResult = (*pScreen->UnrealizeFont) (pScreen, pFont);
- WIN_WRAP(UnrealizeFont, winUnrealizeFontNativeGDI);
-
- return fResult;
+ WIN_UNWRAP(UnrealizeFont);
+ if (pScreen->UnrealizeFont)
+ fResult = (*pScreen->UnrealizeFont) (pScreen, pFont);
+ WIN_WRAP(UnrealizeFont, winUnrealizeFontNativeGDI);
+
+ return fResult;
#if CYGDEBUG
- winDebug ("winUnrealizeFont()\n");
+ winDebug("winUnrealizeFont()\n");
#endif
- return TRUE;
+ return TRUE;
}
#endif
diff --git a/xorg-server/hw/xwin/winglobals.c b/xorg-server/hw/xwin/winglobals.c
index 655cdb131..4953bd0cf 100644
--- a/xorg-server/hw/xwin/winglobals.c
+++ b/xorg-server/hw/xwin/winglobals.c
@@ -35,88 +35,86 @@
#endif
#include "win.h"
-
/*
* General global variables
*/
-int g_iNumScreens = 0;
-winScreenInfo * g_ScreenInfo = 0;
+int g_iNumScreens = 0;
+winScreenInfo *g_ScreenInfo = 0;
+
#ifdef HAS_DEVWINDOWS
-int g_fdMessageQueue = WIN_FD_INVALID;
+int g_fdMessageQueue = WIN_FD_INVALID;
#endif
DevPrivateKeyRec g_iScreenPrivateKeyRec;
DevPrivateKeyRec g_iCmapPrivateKeyRec;
DevPrivateKeyRec g_iGCPrivateKeyRec;
DevPrivateKeyRec g_iPixmapPrivateKeyRec;
DevPrivateKeyRec g_iWindowPrivateKeyRec;
-unsigned long g_ulServerGeneration = 0;
-DWORD g_dwEnginesSupported = 0;
-HINSTANCE g_hInstance = 0;
-HWND g_hDlgDepthChange = NULL;
-HWND g_hDlgExit = NULL;
-HWND g_hDlgAbout = NULL;
-const char * g_pszQueryHost = NULL;
-Bool g_fXdmcpEnabled = FALSE;
-Bool g_fAuthEnabled = FALSE;
-HICON g_hIconX = NULL;
-HICON g_hSmallIconX = NULL;
+unsigned long g_ulServerGeneration = 0;
+DWORD g_dwEnginesSupported = 0;
+HINSTANCE g_hInstance = 0;
+HWND g_hDlgDepthChange = NULL;
+HWND g_hDlgExit = NULL;
+HWND g_hDlgAbout = NULL;
+const char *g_pszQueryHost = NULL;
+Bool g_fXdmcpEnabled = FALSE;
+Bool g_fAuthEnabled = FALSE;
+HICON g_hIconX = NULL;
+HICON g_hSmallIconX = NULL;
+
#ifndef RELOCATE_PROJECTROOT
-const char * g_pszLogFile = DEFAULT_LOGDIR "/XWin.%s.log";
+const char *g_pszLogFile = DEFAULT_LOGDIR "/XWin.%s.log";
#else
-const char * g_pszLogFile = "XWin.log";
-Bool g_fLogFileChanged = FALSE;
+const char *g_pszLogFile = "XWin.log";
+Bool g_fLogFileChanged = FALSE;
#endif
-int g_iLogVerbose = 2;
-Bool g_fLogInited = FALSE;
-char * g_pszCommandLine = NULL;
-Bool g_fSilentFatalError = FALSE;
-DWORD g_dwCurrentThreadID = 0;
-Bool g_fKeyboardHookLL = FALSE;
-Bool g_fNoHelpMessageBox = FALSE;
-Bool g_fSoftwareCursor = FALSE;
-Bool g_fSilentDupError = FALSE;
-Bool g_fNativeGl = FALSE;
-
+int g_iLogVerbose = 2;
+Bool g_fLogInited = FALSE;
+char *g_pszCommandLine = NULL;
+Bool g_fSilentFatalError = FALSE;
+DWORD g_dwCurrentThreadID = 0;
+Bool g_fKeyboardHookLL = FALSE;
+Bool g_fNoHelpMessageBox = FALSE;
+Bool g_fSoftwareCursor = FALSE;
+Bool g_fSilentDupError = FALSE;
+Bool g_fNativeGl = FALSE;
#ifdef XWIN_CLIPBOARD
/*
* Wrapped DIX functions
*/
-winDispatchProcPtr winProcEstablishConnectionOrig = NULL;
-winDispatchProcPtr winProcQueryTreeOrig = NULL;
-winDispatchProcPtr winProcSetSelectionOwnerOrig = NULL;
-
+winDispatchProcPtr winProcEstablishConnectionOrig = NULL;
+winDispatchProcPtr winProcQueryTreeOrig = NULL;
+winDispatchProcPtr winProcSetSelectionOwnerOrig = NULL;
/*
* Clipboard variables
*/
-Bool g_fUnicodeClipboard = TRUE;
-Bool g_fClipboard = TRUE;
-Bool g_fClipboardLaunched = FALSE;
-Bool g_fClipboardStarted = FALSE;
-pthread_t g_ptClipboardProc;
-HWND g_hwndClipboard = NULL;
-void *g_pClipboardDisplay = NULL;
-Window g_iClipboardWindow = None;
-Atom g_atomLastOwnedSelection = None;
+Bool g_fUnicodeClipboard = TRUE;
+Bool g_fClipboard = TRUE;
+Bool g_fClipboardLaunched = FALSE;
+Bool g_fClipboardStarted = FALSE;
+pthread_t g_ptClipboardProc;
+HWND g_hwndClipboard = NULL;
+void *g_pClipboardDisplay = NULL;
+Window g_iClipboardWindow = None;
+Atom g_atomLastOwnedSelection = None;
#endif
-
/*
* Re-initialize global variables that are invalidated
* by a server reset.
*/
void
-winInitializeGlobals (void)
+winInitializeGlobals(void)
{
- g_dwCurrentThreadID = GetCurrentThreadId ();
+ g_dwCurrentThreadID = GetCurrentThreadId();
#ifdef XWIN_CLIPBOARD
- g_iClipboardWindow = None;
- g_pClipboardDisplay = NULL;
- g_atomLastOwnedSelection = None;
- g_hwndClipboard = NULL;
+ g_iClipboardWindow = None;
+ g_pClipboardDisplay = NULL;
+ g_atomLastOwnedSelection = None;
+ g_hwndClipboard = NULL;
#endif
}
diff --git a/xorg-server/hw/xwin/winglobals.h b/xorg-server/hw/xwin/winglobals.h
index 898b9388a..2edf9571e 100644
--- a/xorg-server/hw/xwin/winglobals.h
+++ b/xorg-server/hw/xwin/winglobals.h
@@ -1,88 +1,89 @@
-/*
- File: winglobals.h
- Purpose: declarations for global variables
-
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the "Software"),
- to deal in the Software without restriction, including without limitation
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
- and/or sell copies of the Software, and to 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.
-
-*/
-
-#ifndef WINGLOBALS_H
-#define WINGLOBALS_H
-
-/*
- * References to external symbols
- */
-
-extern int g_iNumScreens;
-extern int g_iLastScreen;
-extern char * g_pszCommandLine;
-extern Bool g_fSilentFatalError;
-extern const char * g_pszLogFile;
-#ifdef RELOCATE_PROJECTROOT
-extern Bool g_fLogFileChanged;
-#endif
-extern int g_iLogVerbose;
-extern Bool g_fLogInited;
-
-extern Bool g_fAuthEnabled;
-extern Bool g_fXdmcpEnabled;
-
-extern Bool g_fNoHelpMessageBox;
-extern Bool g_fSilentDupError;
-extern Bool g_fNativeGl;
-
-extern HWND g_hDlgDepthChange;
-extern HWND g_hDlgExit;
-extern HWND g_hDlgAbout;
-
-extern Bool g_fSoftwareCursor;
-extern Bool g_fCursor;
-
-#ifdef XWIN_CLIPBOARD
-
-/* Typedef for DIX wrapper functions */
-typedef int (*winDispatchProcPtr) (ClientPtr);
-
-/*
- * Wrapped DIX functions
- */
-extern winDispatchProcPtr winProcEstablishConnectionOrig;
-extern winDispatchProcPtr winProcQueryTreeOrig;
-extern winDispatchProcPtr winProcSetSelectionOwnerOrig;
-#endif
-
-/* The global X default icons */
-#if defined(XWIN_MULTIWINDOW)
-extern HICON g_hIconX;
-extern HICON g_hSmallIconX;
-#endif
-
-#ifdef XWIN_MULTIWINDOW
-extern DWORD g_dwCurrentThreadID;
-#endif
-
-extern Bool g_fKeyboardHookLL;
-extern Bool g_fButton[3];
-
-#ifdef XWIN_MULTIWINDOWEXTWM
-extern Bool g_fNoConfigureWindow;
-#endif
-
-#endif /* WINGLOBALS_H */
+/*
+ File: winglobals.h
+ Purpose: declarations for global variables
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to 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.
+
+*/
+
+#ifndef WINGLOBALS_H
+#define WINGLOBALS_H
+
+/*
+ * References to external symbols
+ */
+
+extern int g_iNumScreens;
+extern int g_iLastScreen;
+extern char *g_pszCommandLine;
+extern Bool g_fSilentFatalError;
+extern const char *g_pszLogFile;
+
+#ifdef RELOCATE_PROJECTROOT
+extern Bool g_fLogFileChanged;
+#endif
+extern int g_iLogVerbose;
+extern Bool g_fLogInited;
+
+extern Bool g_fAuthEnabled;
+extern Bool g_fXdmcpEnabled;
+
+extern Bool g_fNoHelpMessageBox;
+extern Bool g_fSilentDupError;
+extern Bool g_fNativeGl;
+
+extern HWND g_hDlgDepthChange;
+extern HWND g_hDlgExit;
+extern HWND g_hDlgAbout;
+
+extern Bool g_fSoftwareCursor;
+extern Bool g_fCursor;
+
+#ifdef XWIN_CLIPBOARD
+
+/* Typedef for DIX wrapper functions */
+typedef int (*winDispatchProcPtr) (ClientPtr);
+
+/*
+ * Wrapped DIX functions
+ */
+extern winDispatchProcPtr winProcEstablishConnectionOrig;
+extern winDispatchProcPtr winProcQueryTreeOrig;
+extern winDispatchProcPtr winProcSetSelectionOwnerOrig;
+#endif
+
+/* The global X default icons */
+#if defined(XWIN_MULTIWINDOW)
+extern HICON g_hIconX;
+extern HICON g_hSmallIconX;
+#endif
+
+#ifdef XWIN_MULTIWINDOW
+extern DWORD g_dwCurrentThreadID;
+#endif
+
+extern Bool g_fKeyboardHookLL;
+extern Bool g_fButton[3];
+
+#ifdef XWIN_MULTIWINDOWEXTWM
+extern Bool g_fNoConfigureWindow;
+#endif
+
+#endif /* WINGLOBALS_H */
diff --git a/xorg-server/hw/xwin/winkeynames.h b/xorg-server/hw/xwin/winkeynames.h
index 75e172e1f..bfed9d427 100644
--- a/xorg-server/hw/xwin/winkeynames.h
+++ b/xorg-server/hw/xwin/winkeynames.h
@@ -60,20 +60,20 @@
* ---------------- ---------- ------- ------ ------
*/
-#define KEY_Escape /* Escape 0x01 */ 1
-#define KEY_1 /* 1 ! 0x02 */ 2
-#define KEY_2 /* 2 @ 0x03 */ 3
-#define KEY_3 /* 3 # 0x04 */ 4
-#define KEY_4 /* 4 $ 0x05 */ 5
-#define KEY_5 /* 5 % 0x06 */ 6
-#define KEY_6 /* 6 ^ 0x07 */ 7
-#define KEY_7 /* 7 & 0x08 */ 8
-#define KEY_8 /* 8 * 0x09 */ 9
-#define KEY_9 /* 9 ( 0x0a */ 10
-#define KEY_0 /* 0 ) 0x0b */ 11
+#define KEY_Escape /* Escape 0x01 */ 1
+#define KEY_1 /* 1 ! 0x02 */ 2
+#define KEY_2 /* 2 @ 0x03 */ 3
+#define KEY_3 /* 3 # 0x04 */ 4
+#define KEY_4 /* 4 $ 0x05 */ 5
+#define KEY_5 /* 5 % 0x06 */ 6
+#define KEY_6 /* 6 ^ 0x07 */ 7
+#define KEY_7 /* 7 & 0x08 */ 8
+#define KEY_8 /* 8 * 0x09 */ 9
+#define KEY_9 /* 9 ( 0x0a */ 10
+#define KEY_0 /* 0 ) 0x0b */ 11
#define KEY_Minus /* - (Minus) _ (Under) 0x0c */ 12
-#define KEY_Equal /* = (Equal) + 0x0d */ 13
-#define KEY_BackSpace /* Back Space 0x0e */ 14
+#define KEY_Equal /* = (Equal) + 0x0d */ 13
+#define KEY_BackSpace /* Back Space 0x0e */ 14
#define KEY_Tab /* Tab 0x0f */ 15
#define KEY_Q /* Q 0x10 */ 16
#define KEY_W /* W 0x11 */ 17
@@ -86,12 +86,12 @@
#define KEY_O /* O 0x18 */ 24
#define KEY_P /* P 0x19 */ 25
#define KEY_LBrace /* [ { 0x1a */ 26
-#define KEY_RBrace /* ] } 0x1b */ 27
+#define KEY_RBrace /* ] } 0x1b */ 27
#define KEY_Enter /* Enter 0x1c */ 28
#define KEY_LCtrl /* Ctrl(left) 0x1d */ 29
#define KEY_A /* A 0x1e */ 30
#define KEY_S /* S 0x1f */ 31
-#define KEY_D /* D 0x20 */ 32
+#define KEY_D /* D 0x20 */ 32
#define KEY_F /* F 0x21 */ 33
#define KEY_G /* G 0x22 */ 34
#define KEY_H /* H 0x23 */ 35
@@ -130,9 +130,9 @@
#define KEY_F10 /* F10 0x44 */ 68
#define KEY_NumLock /* NumLock 0x45 */ 69
#define KEY_ScrollLock /* ScrollLock 0x46 */ 70
-#define KEY_KP_7 /* 7 Home 0x47 */ 71
-#define KEY_KP_8 /* 8 Up 0x48 */ 72
-#define KEY_KP_9 /* 9 PgUp 0x49 */ 73
+#define KEY_KP_7 /* 7 Home 0x47 */ 71
+#define KEY_KP_8 /* 8 Up 0x48 */ 72
+#define KEY_KP_9 /* 9 PgUp 0x49 */ 73
#define KEY_KP_Minus /* - (Minus) 0x4a */ 74
#define KEY_KP_4 /* 4 Left 0x4b */ 75
#define KEY_KP_5 /* 5 0x4c */ 76
@@ -142,7 +142,7 @@
#define KEY_KP_2 /* 2 Down 0x50 */ 80
#define KEY_KP_3 /* 3 PgDown 0x51 */ 81
#define KEY_KP_0 /* 0 Insert 0x52 */ 82
-#define KEY_KP_Decimal /* . (Decimal) Delete 0x53 */ 83
+#define KEY_KP_Decimal /* . (Decimal) Delete 0x53 */ 83
#define KEY_SysReqest /* SysReqest 0x54 */ 84
#define KEY_Fn /* Fn 0x55 */ 85
#define KEY_Less /* < (Less) >(Greater) 0x56 */ 86
@@ -203,4 +203,4 @@
#define KEY_NOTUSED 0
#define KEY_UNKNOWN 255
-#endif /* _WINKEYNAMES_H */
+#endif /* _WINKEYNAMES_H */
diff --git a/xorg-server/hw/xwin/winmessages.h b/xorg-server/hw/xwin/winmessages.h
index ae50dc474..3d3fab274 100644
--- a/xorg-server/hw/xwin/winmessages.h
+++ b/xorg-server/hw/xwin/winmessages.h
@@ -1,1030 +1,1031 @@
#ifndef __WINMESSAGES_H__
#define __WINMESSAGES_H__
-static const unsigned MESSAGE_NAMES_LEN =1024;
+static const unsigned MESSAGE_NAMES_LEN = 1024;
+
static const char *MESSAGE_NAMES[1024] = {
- "WM_NULL",
- "WM_CREATE",
- "WM_DESTROY",
- "WM_MOVE",
- "4",
- "WM_SIZE",
- "WM_ACTIVATE",
- "WM_SETFOCUS",
- "WM_KILLFOCUS",
- "9",
- "WM_ENABLE",
- "WM_SETREDRAW",
- "WM_SETTEXT",
- "WM_GETTEXT",
- "WM_GETTEXTLENGTH",
- "WM_PAINT",
- "WM_CLOSE",
- "WM_QUERYENDSESSION",
- "WM_QUIT",
- "WM_QUERYOPEN",
- "WM_ERASEBKGND",
- "WM_SYSCOLORCHANGE",
- "WM_ENDSESSION",
- "23",
- "WM_SHOWWINDOW",
- "25",
- "WM_WININICHANGE",
- "WM_DEVMODECHANGE",
- "WM_ACTIVATEAPP",
- "WM_FONTCHANGE",
- "WM_TIMECHANGE",
- "WM_CANCELMODE",
- NULL /* WM_SETCURSOR */,
- "WM_MOUSEACTIVATE",
- "WM_CHILDACTIVATE",
- "WM_QUEUESYNC",
- "WM_GETMINMAXINFO",
- "37",
- "WM_PAINTICON",
- "WM_ICONERASEBKGND",
- "WM_NEXTDLGCTL",
- "41",
- "WM_SPOOLERSTATUS",
- "WM_DRAWITEM",
- "WM_MEASUREITEM",
- "WM_DELETEITEM",
- "WM_VKEYTOITEM",
- "WM_CHARTOITEM",
- "WM_SETFONT",
- "WM_GETFONT",
- "WM_SETHOTKEY",
- "WM_GETHOTKEY",
- "52",
- "53",
- "54",
- "WM_QUERYDRAGICON",
- "56",
- "WM_COMPAREITEM",
- "58",
- "59",
- "60",
- "61",
- "62",
- "63",
- "64",
- "WM_COMPACTING",
- "66",
- "67",
- "WM_COMMNOTIFY",
- "69",
- "WM_WINDOWPOSCHANGING",
- "WM_WINDOWPOSCHANGED",
- "WM_POWER",
- "73",
- "WM_COPYDATA",
- "WM_CANCELJOURNAL",
- "76",
- "77",
- "WM_NOTIFY",
- "79",
- "WM_INPUTLANGCHANGEREQUEST",
- "WM_INPUTLANGCHANGE",
- "WM_TCARD",
- "WM_HELP",
- "WM_USERCHANGED",
- "WM_NOTIFYFORMAT",
- "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",
- "WM_CONTEXTMENU",
- "WM_STYLECHANGING",
- "WM_STYLECHANGED",
- "WM_DISPLAYCHANGE",
- "WM_GETICON",
- "WM_SETICON",
- "WM_NCCREATE",
- "WM_NCDESTROY",
- "WM_NCCALCSIZE",
- NULL /* WM_NCHITTEST */,
- "WM_NCPAINT",
- "WM_NCACTIVATE",
- "WM_GETDLGCODE",
- "WM_SYNCPAINT",
- "137",
- "138",
- "139",
- "140",
- "141",
- "142",
- "143",
- "144",
- "145",
- "146",
- "147",
- "148",
- "149",
- "150",
- "151",
- "152",
- "153",
- "154",
- "155",
- "156",
- "157",
- "158",
- "159",
- NULL /* WM_NCMOUSEMOVE */,
- "WM_NCLBUTTONDOWN",
- "WM_NCLBUTTONUP",
- "WM_NCLBUTTONDBLCLK",
- "WM_NCRBUTTONDOWN",
- "WM_NCRBUTTONUP",
- "WM_NCRBUTTONDBLCLK",
- "WM_NCMBUTTONDOWN",
- "WM_NCMBUTTONUP",
- "WM_NCMBUTTONDBLCLK",
- "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",
- "WM_KEYDOWN",
- "WM_KEYUP",
- "WM_CHAR",
- "WM_DEADCHAR",
- "WM_SYSKEYDOWN",
- "WM_SYSKEYUP",
- "WM_SYSCHAR",
- "WM_SYSDEADCHAR",
- "WM_CONVERTREQUESTEX",
- "265",
- "266",
- "267",
- "268",
- "WM_IME_STARTCOMPOSITION",
- "WM_IME_ENDCOMPOSITION",
- "WM_IME_KEYLAST",
- "WM_INITDIALOG",
- "WM_COMMAND",
- "WM_SYSCOMMAND",
- NULL /* WM_TIMER */,
- "WM_HSCROLL",
- "WM_VSCROLL",
- "WM_INITMENU",
- "WM_INITMENUPOPUP",
- "280",
- "281",
- "282",
- "283",
- "284",
- "285",
- "286",
- "WM_MENUSELECT",
- "WM_MENUCHAR",
- "WM_ENTERIDLE",
- "290",
- "291",
- "292",
- "293",
- "294",
- "295",
- "296",
- "297",
- "298",
- "299",
- "300",
- "301",
- "302",
- "303",
- "304",
- "305",
- "WM_CTLCOLORMSGBOX",
- "WM_CTLCOLOREDIT",
- "WM_CTLCOLORLISTBOX",
- "WM_CTLCOLORBTN",
- "WM_CTLCOLORDLG",
- "WM_CTLCOLORSCROLLBAR",
- "WM_CTLCOLORSTATIC",
- "313",
- "314",
- "315",
- "316",
- "317",
- "318",
- "319",
- "320",
- "321",
- "322",
- "323",
- "324",
- "325",
- "326",
- "327",
- "328",
- "329",
- "330",
- "331",
- "332",
- "333",
- "334",
- "335",
- "336",
- "337",
- "338",
- "339",
- "340",
- "341",
- "342",
- "343",
- "344",
- "345",
- "346",
- "347",
- "348",
- "349",
- "350",
- "351",
- "352",
- "353",
- "354",
- "355",
- "356",
- "357",
- "358",
- "359",
- "360",
- "361",
- "362",
- "363",
- "364",
- "365",
- "366",
- "367",
- "368",
- "369",
- "370",
- "371",
- "372",
- "373",
- "374",
- "375",
- "376",
- "377",
- "378",
- "379",
- "380",
- "381",
- "382",
- "383",
- "384",
- "385",
- "386",
- "387",
- "388",
- "389",
- "390",
- "391",
- "392",
- "393",
- "394",
- "395",
- "396",
- "397",
- "398",
- "399",
- "400",
- "401",
- "402",
- "403",
- "404",
- "405",
- "406",
- "407",
- "408",
- "409",
- "410",
- "411",
- "412",
- "413",
- "414",
- "415",
- "416",
- "417",
- "418",
- "419",
- "420",
- "421",
- "422",
- "423",
- "424",
- "425",
- "426",
- "427",
- "428",
- "429",
- "430",
- "431",
- "432",
- "433",
- "434",
- "435",
- "436",
- "437",
- "438",
- "439",
- "440",
- "441",
- "442",
- "443",
- "444",
- "445",
- "446",
- "447",
- "448",
- "449",
- "450",
- "451",
- "452",
- "453",
- "454",
- "455",
- "456",
- "457",
- "458",
- "459",
- "460",
- "461",
- "462",
- "463",
- "464",
- "465",
- "466",
- "467",
- "468",
- "469",
- "470",
- "471",
- "472",
- "473",
- "474",
- "475",
- "476",
- "477",
- "478",
- "479",
- "480",
- "481",
- "482",
- "483",
- "484",
- "485",
- "486",
- "487",
- "488",
- "489",
- "490",
- "491",
- "492",
- "493",
- "494",
- "495",
- "496",
- "497",
- "498",
- "499",
- "500",
- "501",
- "502",
- "503",
- "504",
- "505",
- "506",
- "507",
- "508",
- "509",
- "510",
- "511",
- NULL /* WM_MOUSEMOVE */,
- "WM_LBUTTONDOWN",
- "WM_LBUTTONUP",
- "WM_LBUTTONDBLCLK",
- "WM_RBUTTONDOWN",
- "WM_RBUTTONUP",
- "WM_RBUTTONDBLCLK",
- "WM_MBUTTONDOWN",
- "WM_MBUTTONUP",
- "WM_MBUTTONDBLCLK",
- "WM_MOUSEWHEEL",
- "WM_XBUTTONDOWN",
- "WM_XBUTTONUP",
- "WM_XBUTTONDBLCLK",
- "526",
- "527",
- "WM_PARENTNOTIFY",
- "WM_ENTERMENULOOP",
- "WM_EXITMENULOOP",
- "WM_NEXTMENU",
- "WM_SIZING",
- "WM_CAPTURECHANGED",
- "WM_MOVING",
- "535",
- "WM_POWERBROADCAST",
- "WM_DEVICECHANGE",
- "538",
- "539",
- "540",
- "541",
- "542",
- "543",
- "WM_MDICREATE",
- "WM_MDIDESTROY",
- "WM_MDIACTIVATE",
- "WM_MDIRESTORE",
- "WM_MDINEXT",
- "WM_MDIMAXIMIZE",
- "WM_MDITILE",
- "WM_MDICASCADE",
- "WM_MDIICONARRANGE",
- "WM_MDIGETACTIVE",
- "554",
- "555",
- "556",
- "557",
- "558",
- "559",
- "WM_MDISETMENU",
- "WM_ENTERSIZEMOVE",
- "WM_EXITSIZEMOVE",
- "WM_DROPFILES",
- "WM_MDIREFRESHMENU",
- "565",
- "566",
- "567",
- "568",
- "569",
- "570",
- "571",
- "572",
- "573",
- "574",
- "575",
- "576",
- "577",
- "578",
- "579",
- "580",
- "581",
- "582",
- "583",
- "584",
- "585",
- "586",
- "587",
- "588",
- "589",
- "590",
- "591",
- "592",
- "593",
- "594",
- "595",
- "596",
- "597",
- "598",
- "599",
- "600",
- "601",
- "602",
- "603",
- "604",
- "605",
- "606",
- "607",
- "608",
- "609",
- "610",
- "611",
- "612",
- "613",
- "614",
- "615",
- "616",
- "617",
- "618",
- "619",
- "620",
- "621",
- "622",
- "623",
- "624",
- "625",
- "626",
- "627",
- "628",
- "629",
- "630",
- "631",
- "632",
- "633",
- "634",
- "635",
- "636",
- "637",
- "638",
- "639",
- "640",
- "WM_IME_SETCONTEXT",
- "WM_IME_NOTIFY",
- "WM_IME_CONTROL",
- "WM_IME_COMPOSITIONFULL",
- "WM_IME_SELECT",
- "WM_IME_CHAR",
- "647",
- "648",
- "649",
- "650",
- "651",
- "652",
- "653",
- "654",
- "655",
- "WM_IME_KEYDOWN",
- "WM_IME_KEYUP",
- "658",
- "659",
- "660",
- "661",
- "662",
- "663",
- "664",
- "665",
- "666",
- "667",
- "668",
- "669",
- "670",
- "671",
- "672",
- "WM_MOUSEHOVER",
- "674",
- "WM_MOUSELEAVE",
- "676",
- "677",
- "678",
- "679",
- "680",
- "681",
- "682",
- "683",
- "684",
- "685",
- "686",
- "687",
- "688",
- "689",
- "690",
- "691",
- "692",
- "693",
- "694",
- "695",
- "696",
- "697",
- "698",
- "699",
- "700",
- "701",
- "702",
- "703",
- "704",
- "705",
- "706",
- "707",
- "708",
- "709",
- "710",
- "711",
- "712",
- "713",
- "714",
- "715",
- "716",
- "717",
- "718",
- "719",
- "720",
- "721",
- "722",
- "723",
- "724",
- "725",
- "726",
- "727",
- "728",
- "729",
- "730",
- "731",
- "732",
- "733",
- "734",
- "735",
- "736",
- "737",
- "738",
- "739",
- "740",
- "741",
- "742",
- "743",
- "744",
- "745",
- "746",
- "747",
- "748",
- "749",
- "750",
- "751",
- "752",
- "753",
- "754",
- "755",
- "756",
- "757",
- "758",
- "759",
- "760",
- "761",
- "762",
- "763",
- "764",
- "765",
- "766",
- "767",
- "WM_CUT",
- "WM_COPY",
- "WM_PASTE",
- "WM_CLEAR",
- "WM_UNDO",
- "WM_RENDERFORMAT",
- "WM_RENDERALLFORMATS",
- "WM_DESTROYCLIPBOARD",
- "WM_DRAWCLIPBOARD",
- "WM_PAINTCLIPBOARD",
- "WM_VSCROLLCLIPBOARD",
- "WM_SIZECLIPBOARD",
- "WM_ASKCBFORMATNAME",
- "WM_CHANGECBCHAIN",
- "WM_HSCROLLCLIPBOARD",
- "WM_QUERYNEWPALETTE",
- "WM_PALETTEISCHANGING",
- "WM_PALETTECHANGED",
- "WM_HOTKEY",
- "787",
- "788",
- "789",
- "790",
- "WM_PRINT",
- "WM_PRINTCLIENT",
- "793",
- "794",
- "795",
- "796",
- "797",
- "798",
- "799",
- "800",
- "801",
- "802",
- "803",
- "804",
- "805",
- "806",
- "807",
- "808",
- "809",
- "810",
- "811",
- "812",
- "813",
- "814",
- "815",
- "816",
- "817",
- "818",
- "819",
- "820",
- "821",
- "822",
- "823",
- "824",
- "825",
- "826",
- "827",
- "828",
- "829",
- "830",
- "831",
- "832",
- "833",
- "834",
- "835",
- "836",
- "837",
- "838",
- "839",
- "840",
- "841",
- "842",
- "843",
- "844",
- "845",
- "846",
- "847",
- "848",
- "849",
- "850",
- "851",
- "852",
- "853",
- "854",
- "855",
- "856",
- "857",
- "858",
- "859",
- "860",
- "861",
- "862",
- "863",
- "864",
- "865",
- "866",
- "867",
- "868",
- "869",
- "870",
- "871",
- "872",
- "873",
- "874",
- "875",
- "876",
- "877",
- "878",
- "879",
- "880",
- "881",
- "882",
- "883",
- "884",
- "885",
- "886",
- "887",
- "888",
- "889",
- "890",
- "891",
- "892",
- "893",
- "894",
- "895",
- "896",
- "897",
- "898",
- "899",
- "900",
- "901",
- "902",
- "903",
- "904",
- "905",
- "906",
- "907",
- "908",
- "909",
- "910",
- "911",
- "912",
- "913",
- "914",
- "915",
- "916",
- "917",
- "918",
- "919",
- "920",
- "921",
- "922",
- "923",
- "924",
- "925",
- "926",
- "927",
- "928",
- "929",
- "930",
- "931",
- "932",
- "933",
- "934",
- "935",
- "936",
- "937",
- "938",
- "939",
- "940",
- "941",
- "942",
- "943",
- "944",
- "945",
- "946",
- "947",
- "948",
- "949",
- "950",
- "951",
- "952",
- "953",
- "954",
- "955",
- "956",
- "957",
- "958",
- "959",
- "960",
- "961",
- "962",
- "963",
- "964",
- "965",
- "966",
- "967",
- "968",
- "969",
- "970",
- "971",
- "972",
- "973",
- "974",
- "975",
- "976",
- "977",
- "978",
- "979",
- "980",
- "981",
- "982",
- "983",
- "984",
- "985",
- "986",
- "987",
- "988",
- "989",
- "990",
- "991",
- "992",
- "993",
- "994",
- "995",
- "996",
- "997",
- "998",
- "999",
- "1000",
- "1001",
- "1002",
- "1003",
- "1004",
- "1005",
- "1006",
- "1007",
- "1008",
- "1009",
- "1010",
- "1011",
- "1012",
- "1013",
- "1014",
- "1015",
- "1016",
- "1017",
- "1018",
- "1019",
- "1020",
- "1021",
- "1022",
- "1023"
+ "WM_NULL",
+ "WM_CREATE",
+ "WM_DESTROY",
+ "WM_MOVE",
+ "4",
+ "WM_SIZE",
+ "WM_ACTIVATE",
+ "WM_SETFOCUS",
+ "WM_KILLFOCUS",
+ "9",
+ "WM_ENABLE",
+ "WM_SETREDRAW",
+ "WM_SETTEXT",
+ "WM_GETTEXT",
+ "WM_GETTEXTLENGTH",
+ "WM_PAINT",
+ "WM_CLOSE",
+ "WM_QUERYENDSESSION",
+ "WM_QUIT",
+ "WM_QUERYOPEN",
+ "WM_ERASEBKGND",
+ "WM_SYSCOLORCHANGE",
+ "WM_ENDSESSION",
+ "23",
+ "WM_SHOWWINDOW",
+ "25",
+ "WM_WININICHANGE",
+ "WM_DEVMODECHANGE",
+ "WM_ACTIVATEAPP",
+ "WM_FONTCHANGE",
+ "WM_TIMECHANGE",
+ "WM_CANCELMODE",
+ NULL /* WM_SETCURSOR */ ,
+ "WM_MOUSEACTIVATE",
+ "WM_CHILDACTIVATE",
+ "WM_QUEUESYNC",
+ "WM_GETMINMAXINFO",
+ "37",
+ "WM_PAINTICON",
+ "WM_ICONERASEBKGND",
+ "WM_NEXTDLGCTL",
+ "41",
+ "WM_SPOOLERSTATUS",
+ "WM_DRAWITEM",
+ "WM_MEASUREITEM",
+ "WM_DELETEITEM",
+ "WM_VKEYTOITEM",
+ "WM_CHARTOITEM",
+ "WM_SETFONT",
+ "WM_GETFONT",
+ "WM_SETHOTKEY",
+ "WM_GETHOTKEY",
+ "52",
+ "53",
+ "54",
+ "WM_QUERYDRAGICON",
+ "56",
+ "WM_COMPAREITEM",
+ "58",
+ "59",
+ "60",
+ "61",
+ "62",
+ "63",
+ "64",
+ "WM_COMPACTING",
+ "66",
+ "67",
+ "WM_COMMNOTIFY",
+ "69",
+ "WM_WINDOWPOSCHANGING",
+ "WM_WINDOWPOSCHANGED",
+ "WM_POWER",
+ "73",
+ "WM_COPYDATA",
+ "WM_CANCELJOURNAL",
+ "76",
+ "77",
+ "WM_NOTIFY",
+ "79",
+ "WM_INPUTLANGCHANGEREQUEST",
+ "WM_INPUTLANGCHANGE",
+ "WM_TCARD",
+ "WM_HELP",
+ "WM_USERCHANGED",
+ "WM_NOTIFYFORMAT",
+ "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",
+ "WM_CONTEXTMENU",
+ "WM_STYLECHANGING",
+ "WM_STYLECHANGED",
+ "WM_DISPLAYCHANGE",
+ "WM_GETICON",
+ "WM_SETICON",
+ "WM_NCCREATE",
+ "WM_NCDESTROY",
+ "WM_NCCALCSIZE",
+ NULL /* WM_NCHITTEST */ ,
+ "WM_NCPAINT",
+ "WM_NCACTIVATE",
+ "WM_GETDLGCODE",
+ "WM_SYNCPAINT",
+ "137",
+ "138",
+ "139",
+ "140",
+ "141",
+ "142",
+ "143",
+ "144",
+ "145",
+ "146",
+ "147",
+ "148",
+ "149",
+ "150",
+ "151",
+ "152",
+ "153",
+ "154",
+ "155",
+ "156",
+ "157",
+ "158",
+ "159",
+ NULL /* WM_NCMOUSEMOVE */ ,
+ "WM_NCLBUTTONDOWN",
+ "WM_NCLBUTTONUP",
+ "WM_NCLBUTTONDBLCLK",
+ "WM_NCRBUTTONDOWN",
+ "WM_NCRBUTTONUP",
+ "WM_NCRBUTTONDBLCLK",
+ "WM_NCMBUTTONDOWN",
+ "WM_NCMBUTTONUP",
+ "WM_NCMBUTTONDBLCLK",
+ "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",
+ "WM_KEYDOWN",
+ "WM_KEYUP",
+ "WM_CHAR",
+ "WM_DEADCHAR",
+ "WM_SYSKEYDOWN",
+ "WM_SYSKEYUP",
+ "WM_SYSCHAR",
+ "WM_SYSDEADCHAR",
+ "WM_CONVERTREQUESTEX",
+ "265",
+ "266",
+ "267",
+ "268",
+ "WM_IME_STARTCOMPOSITION",
+ "WM_IME_ENDCOMPOSITION",
+ "WM_IME_KEYLAST",
+ "WM_INITDIALOG",
+ "WM_COMMAND",
+ "WM_SYSCOMMAND",
+ NULL /* WM_TIMER */ ,
+ "WM_HSCROLL",
+ "WM_VSCROLL",
+ "WM_INITMENU",
+ "WM_INITMENUPOPUP",
+ "280",
+ "281",
+ "282",
+ "283",
+ "284",
+ "285",
+ "286",
+ "WM_MENUSELECT",
+ "WM_MENUCHAR",
+ "WM_ENTERIDLE",
+ "290",
+ "291",
+ "292",
+ "293",
+ "294",
+ "295",
+ "296",
+ "297",
+ "298",
+ "299",
+ "300",
+ "301",
+ "302",
+ "303",
+ "304",
+ "305",
+ "WM_CTLCOLORMSGBOX",
+ "WM_CTLCOLOREDIT",
+ "WM_CTLCOLORLISTBOX",
+ "WM_CTLCOLORBTN",
+ "WM_CTLCOLORDLG",
+ "WM_CTLCOLORSCROLLBAR",
+ "WM_CTLCOLORSTATIC",
+ "313",
+ "314",
+ "315",
+ "316",
+ "317",
+ "318",
+ "319",
+ "320",
+ "321",
+ "322",
+ "323",
+ "324",
+ "325",
+ "326",
+ "327",
+ "328",
+ "329",
+ "330",
+ "331",
+ "332",
+ "333",
+ "334",
+ "335",
+ "336",
+ "337",
+ "338",
+ "339",
+ "340",
+ "341",
+ "342",
+ "343",
+ "344",
+ "345",
+ "346",
+ "347",
+ "348",
+ "349",
+ "350",
+ "351",
+ "352",
+ "353",
+ "354",
+ "355",
+ "356",
+ "357",
+ "358",
+ "359",
+ "360",
+ "361",
+ "362",
+ "363",
+ "364",
+ "365",
+ "366",
+ "367",
+ "368",
+ "369",
+ "370",
+ "371",
+ "372",
+ "373",
+ "374",
+ "375",
+ "376",
+ "377",
+ "378",
+ "379",
+ "380",
+ "381",
+ "382",
+ "383",
+ "384",
+ "385",
+ "386",
+ "387",
+ "388",
+ "389",
+ "390",
+ "391",
+ "392",
+ "393",
+ "394",
+ "395",
+ "396",
+ "397",
+ "398",
+ "399",
+ "400",
+ "401",
+ "402",
+ "403",
+ "404",
+ "405",
+ "406",
+ "407",
+ "408",
+ "409",
+ "410",
+ "411",
+ "412",
+ "413",
+ "414",
+ "415",
+ "416",
+ "417",
+ "418",
+ "419",
+ "420",
+ "421",
+ "422",
+ "423",
+ "424",
+ "425",
+ "426",
+ "427",
+ "428",
+ "429",
+ "430",
+ "431",
+ "432",
+ "433",
+ "434",
+ "435",
+ "436",
+ "437",
+ "438",
+ "439",
+ "440",
+ "441",
+ "442",
+ "443",
+ "444",
+ "445",
+ "446",
+ "447",
+ "448",
+ "449",
+ "450",
+ "451",
+ "452",
+ "453",
+ "454",
+ "455",
+ "456",
+ "457",
+ "458",
+ "459",
+ "460",
+ "461",
+ "462",
+ "463",
+ "464",
+ "465",
+ "466",
+ "467",
+ "468",
+ "469",
+ "470",
+ "471",
+ "472",
+ "473",
+ "474",
+ "475",
+ "476",
+ "477",
+ "478",
+ "479",
+ "480",
+ "481",
+ "482",
+ "483",
+ "484",
+ "485",
+ "486",
+ "487",
+ "488",
+ "489",
+ "490",
+ "491",
+ "492",
+ "493",
+ "494",
+ "495",
+ "496",
+ "497",
+ "498",
+ "499",
+ "500",
+ "501",
+ "502",
+ "503",
+ "504",
+ "505",
+ "506",
+ "507",
+ "508",
+ "509",
+ "510",
+ "511",
+ NULL /* WM_MOUSEMOVE */ ,
+ "WM_LBUTTONDOWN",
+ "WM_LBUTTONUP",
+ "WM_LBUTTONDBLCLK",
+ "WM_RBUTTONDOWN",
+ "WM_RBUTTONUP",
+ "WM_RBUTTONDBLCLK",
+ "WM_MBUTTONDOWN",
+ "WM_MBUTTONUP",
+ "WM_MBUTTONDBLCLK",
+ "WM_MOUSEWHEEL",
+ "WM_XBUTTONDOWN",
+ "WM_XBUTTONUP",
+ "WM_XBUTTONDBLCLK",
+ "526",
+ "527",
+ "WM_PARENTNOTIFY",
+ "WM_ENTERMENULOOP",
+ "WM_EXITMENULOOP",
+ "WM_NEXTMENU",
+ "WM_SIZING",
+ "WM_CAPTURECHANGED",
+ "WM_MOVING",
+ "535",
+ "WM_POWERBROADCAST",
+ "WM_DEVICECHANGE",
+ "538",
+ "539",
+ "540",
+ "541",
+ "542",
+ "543",
+ "WM_MDICREATE",
+ "WM_MDIDESTROY",
+ "WM_MDIACTIVATE",
+ "WM_MDIRESTORE",
+ "WM_MDINEXT",
+ "WM_MDIMAXIMIZE",
+ "WM_MDITILE",
+ "WM_MDICASCADE",
+ "WM_MDIICONARRANGE",
+ "WM_MDIGETACTIVE",
+ "554",
+ "555",
+ "556",
+ "557",
+ "558",
+ "559",
+ "WM_MDISETMENU",
+ "WM_ENTERSIZEMOVE",
+ "WM_EXITSIZEMOVE",
+ "WM_DROPFILES",
+ "WM_MDIREFRESHMENU",
+ "565",
+ "566",
+ "567",
+ "568",
+ "569",
+ "570",
+ "571",
+ "572",
+ "573",
+ "574",
+ "575",
+ "576",
+ "577",
+ "578",
+ "579",
+ "580",
+ "581",
+ "582",
+ "583",
+ "584",
+ "585",
+ "586",
+ "587",
+ "588",
+ "589",
+ "590",
+ "591",
+ "592",
+ "593",
+ "594",
+ "595",
+ "596",
+ "597",
+ "598",
+ "599",
+ "600",
+ "601",
+ "602",
+ "603",
+ "604",
+ "605",
+ "606",
+ "607",
+ "608",
+ "609",
+ "610",
+ "611",
+ "612",
+ "613",
+ "614",
+ "615",
+ "616",
+ "617",
+ "618",
+ "619",
+ "620",
+ "621",
+ "622",
+ "623",
+ "624",
+ "625",
+ "626",
+ "627",
+ "628",
+ "629",
+ "630",
+ "631",
+ "632",
+ "633",
+ "634",
+ "635",
+ "636",
+ "637",
+ "638",
+ "639",
+ "640",
+ "WM_IME_SETCONTEXT",
+ "WM_IME_NOTIFY",
+ "WM_IME_CONTROL",
+ "WM_IME_COMPOSITIONFULL",
+ "WM_IME_SELECT",
+ "WM_IME_CHAR",
+ "647",
+ "648",
+ "649",
+ "650",
+ "651",
+ "652",
+ "653",
+ "654",
+ "655",
+ "WM_IME_KEYDOWN",
+ "WM_IME_KEYUP",
+ "658",
+ "659",
+ "660",
+ "661",
+ "662",
+ "663",
+ "664",
+ "665",
+ "666",
+ "667",
+ "668",
+ "669",
+ "670",
+ "671",
+ "672",
+ "WM_MOUSEHOVER",
+ "674",
+ "WM_MOUSELEAVE",
+ "676",
+ "677",
+ "678",
+ "679",
+ "680",
+ "681",
+ "682",
+ "683",
+ "684",
+ "685",
+ "686",
+ "687",
+ "688",
+ "689",
+ "690",
+ "691",
+ "692",
+ "693",
+ "694",
+ "695",
+ "696",
+ "697",
+ "698",
+ "699",
+ "700",
+ "701",
+ "702",
+ "703",
+ "704",
+ "705",
+ "706",
+ "707",
+ "708",
+ "709",
+ "710",
+ "711",
+ "712",
+ "713",
+ "714",
+ "715",
+ "716",
+ "717",
+ "718",
+ "719",
+ "720",
+ "721",
+ "722",
+ "723",
+ "724",
+ "725",
+ "726",
+ "727",
+ "728",
+ "729",
+ "730",
+ "731",
+ "732",
+ "733",
+ "734",
+ "735",
+ "736",
+ "737",
+ "738",
+ "739",
+ "740",
+ "741",
+ "742",
+ "743",
+ "744",
+ "745",
+ "746",
+ "747",
+ "748",
+ "749",
+ "750",
+ "751",
+ "752",
+ "753",
+ "754",
+ "755",
+ "756",
+ "757",
+ "758",
+ "759",
+ "760",
+ "761",
+ "762",
+ "763",
+ "764",
+ "765",
+ "766",
+ "767",
+ "WM_CUT",
+ "WM_COPY",
+ "WM_PASTE",
+ "WM_CLEAR",
+ "WM_UNDO",
+ "WM_RENDERFORMAT",
+ "WM_RENDERALLFORMATS",
+ "WM_DESTROYCLIPBOARD",
+ "WM_DRAWCLIPBOARD",
+ "WM_PAINTCLIPBOARD",
+ "WM_VSCROLLCLIPBOARD",
+ "WM_SIZECLIPBOARD",
+ "WM_ASKCBFORMATNAME",
+ "WM_CHANGECBCHAIN",
+ "WM_HSCROLLCLIPBOARD",
+ "WM_QUERYNEWPALETTE",
+ "WM_PALETTEISCHANGING",
+ "WM_PALETTECHANGED",
+ "WM_HOTKEY",
+ "787",
+ "788",
+ "789",
+ "790",
+ "WM_PRINT",
+ "WM_PRINTCLIENT",
+ "793",
+ "794",
+ "795",
+ "796",
+ "797",
+ "798",
+ "799",
+ "800",
+ "801",
+ "802",
+ "803",
+ "804",
+ "805",
+ "806",
+ "807",
+ "808",
+ "809",
+ "810",
+ "811",
+ "812",
+ "813",
+ "814",
+ "815",
+ "816",
+ "817",
+ "818",
+ "819",
+ "820",
+ "821",
+ "822",
+ "823",
+ "824",
+ "825",
+ "826",
+ "827",
+ "828",
+ "829",
+ "830",
+ "831",
+ "832",
+ "833",
+ "834",
+ "835",
+ "836",
+ "837",
+ "838",
+ "839",
+ "840",
+ "841",
+ "842",
+ "843",
+ "844",
+ "845",
+ "846",
+ "847",
+ "848",
+ "849",
+ "850",
+ "851",
+ "852",
+ "853",
+ "854",
+ "855",
+ "856",
+ "857",
+ "858",
+ "859",
+ "860",
+ "861",
+ "862",
+ "863",
+ "864",
+ "865",
+ "866",
+ "867",
+ "868",
+ "869",
+ "870",
+ "871",
+ "872",
+ "873",
+ "874",
+ "875",
+ "876",
+ "877",
+ "878",
+ "879",
+ "880",
+ "881",
+ "882",
+ "883",
+ "884",
+ "885",
+ "886",
+ "887",
+ "888",
+ "889",
+ "890",
+ "891",
+ "892",
+ "893",
+ "894",
+ "895",
+ "896",
+ "897",
+ "898",
+ "899",
+ "900",
+ "901",
+ "902",
+ "903",
+ "904",
+ "905",
+ "906",
+ "907",
+ "908",
+ "909",
+ "910",
+ "911",
+ "912",
+ "913",
+ "914",
+ "915",
+ "916",
+ "917",
+ "918",
+ "919",
+ "920",
+ "921",
+ "922",
+ "923",
+ "924",
+ "925",
+ "926",
+ "927",
+ "928",
+ "929",
+ "930",
+ "931",
+ "932",
+ "933",
+ "934",
+ "935",
+ "936",
+ "937",
+ "938",
+ "939",
+ "940",
+ "941",
+ "942",
+ "943",
+ "944",
+ "945",
+ "946",
+ "947",
+ "948",
+ "949",
+ "950",
+ "951",
+ "952",
+ "953",
+ "954",
+ "955",
+ "956",
+ "957",
+ "958",
+ "959",
+ "960",
+ "961",
+ "962",
+ "963",
+ "964",
+ "965",
+ "966",
+ "967",
+ "968",
+ "969",
+ "970",
+ "971",
+ "972",
+ "973",
+ "974",
+ "975",
+ "976",
+ "977",
+ "978",
+ "979",
+ "980",
+ "981",
+ "982",
+ "983",
+ "984",
+ "985",
+ "986",
+ "987",
+ "988",
+ "989",
+ "990",
+ "991",
+ "992",
+ "993",
+ "994",
+ "995",
+ "996",
+ "997",
+ "998",
+ "999",
+ "1000",
+ "1001",
+ "1002",
+ "1003",
+ "1004",
+ "1005",
+ "1006",
+ "1007",
+ "1008",
+ "1009",
+ "1010",
+ "1011",
+ "1012",
+ "1013",
+ "1014",
+ "1015",
+ "1016",
+ "1017",
+ "1018",
+ "1019",
+ "1020",
+ "1021",
+ "1022",
+ "1023"
};
#endif
diff --git a/xorg-server/hw/xwin/winmonitors.h b/xorg-server/hw/xwin/winmonitors.h
index 180566b00..acef48274 100644
--- a/xorg-server/hw/xwin/winmonitors.h
+++ b/xorg-server/hw/xwin/winmonitors.h
@@ -1,14 +1,14 @@
/* data returned for monitor information */
struct GetMonitorInfoData {
- int requestedMonitor;
- int monitorNum;
+ int requestedMonitor;
+ int monitorNum;
Bool bUserSpecifiedMonitor;
Bool bMonitorSpecifiedExists;
- int monitorOffsetX;
- int monitorOffsetY;
- int monitorHeight;
- int monitorWidth;
+ int monitorOffsetX;
+ int monitorOffsetY;
+ int monitorHeight;
+ int monitorWidth;
};
Bool QueryMonitor(int index, struct GetMonitorInfoData *data);
diff --git a/xorg-server/hw/xwin/winms.h b/xorg-server/hw/xwin/winms.h
index 60f7eb906..4355baeb8 100644
--- a/xorg-server/hw/xwin/winms.h
+++ b/xorg-server/hw/xwin/winms.h
@@ -46,4 +46,4 @@
#undef CreateWindow
-#endif /* _WINMS_H_ */
+#endif /* _WINMS_H_ */
diff --git a/xorg-server/hw/xwin/winmultiwindowclass.h b/xorg-server/hw/xwin/winmultiwindowclass.h
index 1c9a5e52d..0e3465c78 100644
--- a/xorg-server/hw/xwin/winmultiwindowclass.h
+++ b/xorg-server/hw/xwin/winmultiwindowclass.h
@@ -35,16 +35,16 @@
*/
typedef struct {
- long flags; /* marks which fields in this structure are defined */
- Bool input; /* does this application rely on the window manager to
- get keyboard input? */
- int initial_state; /* see below */
- Pixmap icon_pixmap; /* pixmap to be used as icon */
- Window icon_window; /* window to be used as icon */
- int icon_x, icon_y; /* initial position of icon */
- Pixmap icon_mask; /* icon mask bitmap */
- XID window_group; /* id of related window group */
- /* this structure may be extended in the future */
+ long flags; /* marks which fields in this structure are defined */
+ Bool input; /* does this application rely on the window manager to
+ get keyboard input? */
+ int initial_state; /* see below */
+ Pixmap icon_pixmap; /* pixmap to be used as icon */
+ Window icon_window; /* window to be used as icon */
+ int icon_x, icon_y; /* initial position of icon */
+ Pixmap icon_mask; /* icon mask bitmap */
+ XID window_group; /* id of related window group */
+ /* this structure may be extended in the future */
} WinXWMHints;
/* Window manager hints mask bits */
@@ -63,18 +63,18 @@ typedef struct {
* used with WM_NORMAL_HINTS.
*/
typedef struct {
- long flags; /* marks which fields in this structure are defined */
- int x, y; /* obsolete for new window mgrs, but clients */
- int width, height; /* should set so old wm's don't mess up */
- int min_width, min_height;
- int max_width, max_height;
- int width_inc, height_inc;
- struct {
- int x; /* numerator */
- int y; /* denominator */
- } min_aspect, max_aspect;
- int base_width, base_height; /* added by ICCCM version 1 */
- int win_gravity; /* added by ICCCM version 1 */
+ long flags; /* marks which fields in this structure are defined */
+ int x, y; /* obsolete for new window mgrs, but clients */
+ int width, height; /* should set so old wm's don't mess up */
+ int min_width, min_height;
+ int max_width, max_height;
+ int width_inc, height_inc;
+ struct {
+ int x; /* numerator */
+ int y; /* denominator */
+ } min_aspect, max_aspect;
+ int base_width, base_height; /* added by ICCCM version 1 */
+ int win_gravity; /* added by ICCCM version 1 */
} WinXSizeHints;
/*
@@ -83,42 +83,41 @@ typedef struct {
*/
/* flags argument in size hints */
-#define USPosition (1L << 0) /* user specified x, y */
-#define USSize (1L << 1) /* user specified width, height */
-
-#define PPosition (1L << 2) /* program specified position */
-#define PSize (1L << 3) /* program specified size */
-#define PMinSize (1L << 4) /* program specified minimum size */
-#define PMaxSize (1L << 5) /* program specified maximum size */
-#define PResizeInc (1L << 6) /* program specified resize increments */
-#define PAspect (1L << 7) /* program specified min and max aspect ratios */
-#define PBaseSize (1L << 8) /* program specified base for incrementing */
-#define PWinGravity (1L << 9) /* program specified window gravity */
+#define USPosition (1L << 0) /* user specified x, y */
+#define USSize (1L << 1) /* user specified width, height */
+
+#define PPosition (1L << 2) /* program specified position */
+#define PSize (1L << 3) /* program specified size */
+#define PMinSize (1L << 4) /* program specified minimum size */
+#define PMaxSize (1L << 5) /* program specified maximum size */
+#define PResizeInc (1L << 6) /* program specified resize increments */
+#define PAspect (1L << 7) /* program specified min and max aspect ratios */
+#define PBaseSize (1L << 8) /* program specified base for incrementing */
+#define PWinGravity (1L << 9) /* program specified window gravity */
/* obsolete */
#define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect)
-
/*
* Function prototypes
*/
int
-winMultiWindowGetWMHints (WindowPtr pWin, WinXWMHints *hints);
+ winMultiWindowGetWMHints(WindowPtr pWin, WinXWMHints * hints);
int
-winMultiWindowGetClassHint (WindowPtr pWin, char **res_name, char **res_class);
+ winMultiWindowGetClassHint(WindowPtr pWin, char **res_name, char **res_class);
int
-winMultiWindowGetWindowRole (WindowPtr pWin, char **res_role);
+ winMultiWindowGetWindowRole(WindowPtr pWin, char **res_role);
int
-winMultiWindowGetWMNormalHints (WindowPtr pWin, WinXSizeHints *hints);
+ winMultiWindowGetWMNormalHints(WindowPtr pWin, WinXSizeHints * hints);
int
-winMultiWindowGetWMName (WindowPtr pWin, char **wmName);
+ winMultiWindowGetWMName(WindowPtr pWin, char **wmName);
int
-winMultiWindowGetTransientFor (WindowPtr pWin, WindowPtr *ppDaddy);
+ winMultiWindowGetTransientFor(WindowPtr pWin, WindowPtr *ppDaddy);
#endif
diff --git a/xorg-server/hw/xwin/winresource.h b/xorg-server/hw/xwin/winresource.h
index 7085117e6..a14d402e1 100644
--- a/xorg-server/hw/xwin/winresource.h
+++ b/xorg-server/hw/xwin/winresource.h
@@ -30,7 +30,6 @@
* Authors: Harold L Hunt II
*/
-
/*
* Local defines
*/
@@ -40,7 +39,6 @@
#define IDM_TRAYICON_MENU 103
#define IDC_CLIENTS_CONNECTED 104
-
#define ID_APP_EXIT 200
#define ID_APP_HIDE_ROOT 201
#define ID_APP_ALWAYS_ON_TOP 202
diff --git a/xorg-server/include/closestr.h b/xorg-server/include/closestr.h
index d29ee4d91..c6aa1295f 100644
--- a/xorg-server/include/closestr.h
+++ b/xorg-server/include/closestr.h
@@ -1,127 +1,126 @@
-/*
-
-Copyright 1991, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-
-#ifndef CLOSESTR_H
-#define CLOSESTR_H
-
-#include <X11/Xproto.h>
-#include "closure.h"
-#include "dix.h"
-#include "misc.h"
-#include "gcstruct.h"
-
-/* closure structures */
-
-/* OpenFont */
-
-typedef struct _OFclosure {
- ClientPtr client;
- short current_fpe;
- short num_fpes;
- FontPathElementPtr *fpe_list;
- Mask flags;
-
-/* XXX -- get these from request buffer instead? */
- char *origFontName;
- int origFontNameLen;
- XID fontid;
- char *fontname;
- int fnamelen;
- FontPtr non_cachable_font;
-} OFclosureRec;
-
-/* ListFontsWithInfo */
-
-#define XLFDMAXFONTNAMELEN 256
-typedef struct _LFWIstate {
- char pattern[XLFDMAXFONTNAMELEN];
- int patlen;
- int current_fpe;
- int max_names;
- Bool list_started;
- pointer private;
-} LFWIstateRec, *LFWIstatePtr;
-
-typedef struct _LFWIclosure {
- ClientPtr client;
- int num_fpes;
- FontPathElementPtr *fpe_list;
- xListFontsWithInfoReply *reply;
- int length;
- LFWIstateRec current;
- LFWIstateRec saved;
- int savedNumFonts;
- Bool haveSaved;
- char *savedName;
-} LFWIclosureRec;
-
-/* ListFonts */
-
-typedef struct _LFclosure {
- ClientPtr client;
- int num_fpes;
- FontPathElementPtr *fpe_list;
- FontNamesPtr names;
- LFWIstateRec current;
- LFWIstateRec saved;
- Bool haveSaved;
- char *savedName;
- int savedNameLen;
-} LFclosureRec;
-
-/* PolyText */
-
-typedef struct _PTclosure {
- ClientPtr client;
- DrawablePtr pDraw;
- GC *pGC;
- unsigned char *pElt;
- unsigned char *endReq;
- unsigned char *data;
- int xorg;
- int yorg;
- CARD8 reqType;
- XID did;
- int err;
-} PTclosureRec;
-
-/* ImageText */
-
-typedef struct _ITclosure {
- ClientPtr client;
- DrawablePtr pDraw;
- GC *pGC;
- BYTE nChars;
- unsigned char *data;
- int xorg;
- int yorg;
- CARD8 reqType;
- XID did;
-} ITclosureRec;
-#endif /* CLOSESTR_H */
+/*
+
+Copyright 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+#ifndef CLOSESTR_H
+#define CLOSESTR_H
+
+#include <X11/Xproto.h>
+#include "closure.h"
+#include "dix.h"
+#include "misc.h"
+#include "gcstruct.h"
+
+/* closure structures */
+
+/* OpenFont */
+
+typedef struct _OFclosure {
+ ClientPtr client;
+ short current_fpe;
+ short num_fpes;
+ FontPathElementPtr *fpe_list;
+ Mask flags;
+
+/* XXX -- get these from request buffer instead? */
+ char *origFontName;
+ int origFontNameLen;
+ XID fontid;
+ char *fontname;
+ int fnamelen;
+ FontPtr non_cachable_font;
+} OFclosureRec;
+
+/* ListFontsWithInfo */
+
+#define XLFDMAXFONTNAMELEN 256
+typedef struct _LFWIstate {
+ char pattern[XLFDMAXFONTNAMELEN];
+ int patlen;
+ int current_fpe;
+ int max_names;
+ Bool list_started;
+ pointer private;
+} LFWIstateRec, *LFWIstatePtr;
+
+typedef struct _LFWIclosure {
+ ClientPtr client;
+ int num_fpes;
+ FontPathElementPtr *fpe_list;
+ xListFontsWithInfoReply *reply;
+ int length;
+ LFWIstateRec current;
+ LFWIstateRec saved;
+ int savedNumFonts;
+ Bool haveSaved;
+ char *savedName;
+} LFWIclosureRec;
+
+/* ListFonts */
+
+typedef struct _LFclosure {
+ ClientPtr client;
+ int num_fpes;
+ FontPathElementPtr *fpe_list;
+ FontNamesPtr names;
+ LFWIstateRec current;
+ LFWIstateRec saved;
+ Bool haveSaved;
+ char *savedName;
+ int savedNameLen;
+} LFclosureRec;
+
+/* PolyText */
+
+typedef struct _PTclosure {
+ ClientPtr client;
+ DrawablePtr pDraw;
+ GC *pGC;
+ unsigned char *pElt;
+ unsigned char *endReq;
+ unsigned char *data;
+ int xorg;
+ int yorg;
+ CARD8 reqType;
+ XID did;
+ int err;
+} PTclosureRec;
+
+/* ImageText */
+
+typedef struct _ITclosure {
+ ClientPtr client;
+ DrawablePtr pDraw;
+ GC *pGC;
+ BYTE nChars;
+ unsigned char *data;
+ int xorg;
+ int yorg;
+ CARD8 reqType;
+ XID did;
+} ITclosureRec;
+#endif /* CLOSESTR_H */
diff --git a/xorg-server/include/closure.h b/xorg-server/include/closure.h
index b261f5e0d..0a7dae6ae 100644
--- a/xorg-server/include/closure.h
+++ b/xorg-server/include/closure.h
@@ -22,7 +22,6 @@ Except as contained in this notice, the name of The Open Group shall not be
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
@@ -48,10 +47,10 @@ SOFTWARE.
#ifndef CLOSURE_H
#define CLOSURE_H 1
-typedef struct _LFclosure *LFclosurePtr;
-typedef struct _LFWIclosure *LFWIclosurePtr;
-typedef struct _OFclosure *OFclosurePtr;
-typedef struct _PTclosure *PTclosurePtr;
-typedef struct _ITclosure *ITclosurePtr;
+typedef struct _LFclosure *LFclosurePtr;
+typedef struct _LFWIclosure *LFWIclosurePtr;
+typedef struct _OFclosure *OFclosurePtr;
+typedef struct _PTclosure *PTclosurePtr;
+typedef struct _ITclosure *ITclosurePtr;
-#endif /* CLOSURE_H */
+#endif /* CLOSURE_H */
diff --git a/xorg-server/include/cursorstr.h b/xorg-server/include/cursorstr.h
index b082cb911..68ab2ecfd 100644
--- a/xorg-server/include/cursorstr.h
+++ b/xorg-server/include/cursorstr.h
@@ -1,99 +1,98 @@
-/***********************************************************
-
-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.
-
-******************************************************************/
-
-#ifndef CURSORSTRUCT_H
-#define CURSORSTRUCT_H
-
-#include "cursor.h"
-#include "privates.h"
-/*
- * device-independent cursor storage
- */
-
-/*
- * source and mask point directly to the bits, which are in the server-defined
- * bitmap format.
- */
-typedef struct _CursorBits {
- unsigned char *source; /* points to bits */
- unsigned char *mask; /* points to bits */
- Bool emptyMask; /* all zeros mask */
- unsigned short width, height, xhot, yhot; /* metrics */
- int refcnt; /* can be shared */
- PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/
-#ifdef ARGB_CURSOR
- CARD32 *argb; /* full-color alpha blended */
-#endif
-} CursorBits, *CursorBitsPtr;
-
-#define CURSOR_BITS_SIZE (sizeof(CursorBits) + dixPrivatesSize(PRIVATE_CURSOR_BITS))
-
-typedef struct _Cursor {
- CursorBitsPtr bits;
- unsigned short foreRed, foreGreen, foreBlue; /* device-independent color */
- unsigned short backRed, backGreen, backBlue; /* device-independent color */
- int refcnt;
- PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/
- XID id;
-#ifdef XFIXES
- CARD32 serialNumber;
- Atom name;
-#endif
-} CursorRec;
-
-#define CURSOR_REC_SIZE (sizeof(CursorRec) + dixPrivatesSize(PRIVATE_CURSOR))
-
-typedef struct _CursorMetric {
- unsigned short width, height, xhot, yhot;
-} CursorMetricRec;
-
-typedef struct {
- int x, y;
- ScreenPtr pScreen;
-} HotSpot;
-
-#endif /* CURSORSTRUCT_H */
+/***********************************************************
+
+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.
+
+******************************************************************/
+
+#ifndef CURSORSTRUCT_H
+#define CURSORSTRUCT_H
+
+#include "cursor.h"
+#include "privates.h"
+/*
+ * device-independent cursor storage
+ */
+
+/*
+ * source and mask point directly to the bits, which are in the server-defined
+ * bitmap format.
+ */
+typedef struct _CursorBits {
+ unsigned char *source; /* points to bits */
+ unsigned char *mask; /* points to bits */
+ Bool emptyMask; /* all zeros mask */
+ unsigned short width, height, xhot, yhot; /* metrics */
+ int refcnt; /* can be shared */
+ PrivateRec *devPrivates; /* set by pScr->RealizeCursor */
+#ifdef ARGB_CURSOR
+ CARD32 *argb; /* full-color alpha blended */
+#endif
+} CursorBits, *CursorBitsPtr;
+
+#define CURSOR_BITS_SIZE (sizeof(CursorBits) + dixPrivatesSize(PRIVATE_CURSOR_BITS))
+
+typedef struct _Cursor {
+ CursorBitsPtr bits;
+ unsigned short foreRed, foreGreen, foreBlue; /* device-independent color */
+ unsigned short backRed, backGreen, backBlue; /* device-independent color */
+ int refcnt;
+ PrivateRec *devPrivates; /* set by pScr->RealizeCursor */
+ XID id;
+#ifdef XFIXES
+ CARD32 serialNumber;
+ Atom name;
+#endif
+} CursorRec;
+
+#define CURSOR_REC_SIZE (sizeof(CursorRec) + dixPrivatesSize(PRIVATE_CURSOR))
+
+typedef struct _CursorMetric {
+ unsigned short width, height, xhot, yhot;
+} CursorMetricRec;
+
+typedef struct {
+ int x, y;
+ ScreenPtr pScreen;
+} HotSpot;
+
+#endif /* CURSORSTRUCT_H */
diff --git a/xorg-server/include/dixaccess.h b/xorg-server/include/dixaccess.h
index 7180acd71..784c83c64 100644
--- a/xorg-server/include/dixaccess.h
+++ b/xorg-server/include/dixaccess.h
@@ -20,35 +20,35 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* simultaneously.
*/
-#define DixUnknownAccess 0 /* don't know intentions */
-#define DixReadAccess (1<<0) /* inspecting the object */
-#define DixWriteAccess (1<<1) /* changing the object */
-#define DixDestroyAccess (1<<2) /* destroying the object */
-#define DixCreateAccess (1<<3) /* creating the object */
-#define DixGetAttrAccess (1<<4) /* get object attributes */
-#define DixSetAttrAccess (1<<5) /* set object attributes */
+#define DixUnknownAccess 0 /* don't know intentions */
+#define DixReadAccess (1<<0) /* inspecting the object */
+#define DixWriteAccess (1<<1) /* changing the object */
+#define DixDestroyAccess (1<<2) /* destroying the object */
+#define DixCreateAccess (1<<3) /* creating the object */
+#define DixGetAttrAccess (1<<4) /* get object attributes */
+#define DixSetAttrAccess (1<<5) /* set object attributes */
#define DixListPropAccess (1<<6) /* list properties of object */
-#define DixGetPropAccess (1<<7) /* get properties of object */
-#define DixSetPropAccess (1<<8) /* set properties of object */
-#define DixGetFocusAccess (1<<9) /* get focus of object */
-#define DixSetFocusAccess (1<<10) /* set focus of object */
-#define DixListAccess (1<<11) /* list objects */
-#define DixAddAccess (1<<12) /* add object */
-#define DixRemoveAccess (1<<13) /* remove object */
-#define DixHideAccess (1<<14) /* hide object */
-#define DixShowAccess (1<<15) /* show object */
-#define DixBlendAccess (1<<16) /* mix contents of objects */
-#define DixGrabAccess (1<<17) /* exclusive access to object */
-#define DixFreezeAccess (1<<18) /* freeze status of object */
-#define DixForceAccess (1<<19) /* force status of object */
-#define DixInstallAccess (1<<20) /* install object */
-#define DixUninstallAccess (1<<21) /* uninstall object */
-#define DixSendAccess (1<<22) /* send to object */
-#define DixReceiveAccess (1<<23) /* receive from object */
-#define DixUseAccess (1<<24) /* use object */
-#define DixManageAccess (1<<25) /* manage object */
-#define DixDebugAccess (1<<26) /* debug object */
-#define DixBellAccess (1<<27) /* audible sound */
+#define DixGetPropAccess (1<<7) /* get properties of object */
+#define DixSetPropAccess (1<<8) /* set properties of object */
+#define DixGetFocusAccess (1<<9) /* get focus of object */
+#define DixSetFocusAccess (1<<10) /* set focus of object */
+#define DixListAccess (1<<11) /* list objects */
+#define DixAddAccess (1<<12) /* add object */
+#define DixRemoveAccess (1<<13) /* remove object */
+#define DixHideAccess (1<<14) /* hide object */
+#define DixShowAccess (1<<15) /* show object */
+#define DixBlendAccess (1<<16) /* mix contents of objects */
+#define DixGrabAccess (1<<17) /* exclusive access to object */
+#define DixFreezeAccess (1<<18) /* freeze status of object */
+#define DixForceAccess (1<<19) /* force status of object */
+#define DixInstallAccess (1<<20) /* install object */
+#define DixUninstallAccess (1<<21) /* uninstall object */
+#define DixSendAccess (1<<22) /* send to object */
+#define DixReceiveAccess (1<<23) /* receive from object */
+#define DixUseAccess (1<<24) /* use object */
+#define DixManageAccess (1<<25) /* manage object */
+#define DixDebugAccess (1<<26) /* debug object */
+#define DixBellAccess (1<<27) /* audible sound */
#define DixPostAccess (1<<28) /* post or follow-up call */
-#endif /* DIX_ACCESS_H */
+#endif /* DIX_ACCESS_H */
diff --git a/xorg-server/include/dixfontstr.h b/xorg-server/include/dixfontstr.h
index c559e861e..ce878d06a 100644
--- a/xorg-server/include/dixfontstr.h
+++ b/xorg-server/include/dixfontstr.h
@@ -28,7 +28,7 @@ SOFTWARE.
#include "dixfont.h"
#include <X11/fonts/fontstruct.h>
#include "closure.h"
-#include <X11/Xproto.h> /* for xQueryFontReply */
+#include <X11/Xproto.h> /* for xQueryFontReply */
#define FONTCHARSET(font) (font)
#define FONTMAXBOUNDS(font,field) (font)->info.maxbounds.field
@@ -85,9 +85,9 @@ SOFTWARE.
#define PADGLYPHWIDTHBYTES(w) (((((w)+7)>>3)+3) & ~0x3)
#endif
-#if GLYPHPADBYTES == 8 /* for a cray? */
+#if GLYPHPADBYTES == 8 /* for a cray? */
#define GLYPHWIDTHBYTESPADDED(pci) ((GLYPHWIDTHBYTES(pci)+7) & ~0x7)
#define PADGLYPHWIDTHBYTES(w) (((((w)+7)>>3)+7) & ~0x7)
#endif
-#endif /* DIXFONTSTRUCT_H */
+#endif /* DIXFONTSTRUCT_H */
diff --git a/xorg-server/include/eventconvert.h b/xorg-server/include/eventconvert.h
index 571a51109..4c56d534a 100644
--- a/xorg-server/include/eventconvert.h
+++ b/xorg-server/include/eventconvert.h
@@ -38,4 +38,4 @@ _X_INTERNAL int GetCoreType(enum EventType type);
_X_INTERNAL int GetXIType(enum EventType type);
_X_INTERNAL int GetXI2Type(enum EventType type);
-#endif /* _EVENTCONVERT_H_ */
+#endif /* _EVENTCONVERT_H_ */
diff --git a/xorg-server/include/events.h b/xorg-server/include/events.h
index 222cc3d19..222bf328b 100644
--- a/xorg-server/include/events.h
+++ b/xorg-server/include/events.h
@@ -27,10 +27,12 @@
typedef struct _DeviceEvent DeviceEvent;
typedef struct _DeviceChangedEvent DeviceChangedEvent;
typedef struct _TouchOwnershipEvent TouchOwnershipEvent;
+
#if XFreeXDGA
typedef struct _DGAEvent DGAEvent;
#endif
typedef struct _RawDeviceEvent RawDeviceEvent;
+
#ifdef XQUARTZ
typedef struct _XQuartzEvent XQuartzEvent;
#endif
diff --git a/xorg-server/include/globals.h b/xorg-server/include/globals.h
index 17bca8208..d147df90f 100644
--- a/xorg-server/include/globals.h
+++ b/xorg-server/include/globals.h
@@ -2,7 +2,7 @@
#ifndef _XSERV_GLOBAL_H_
#define _XSERV_GLOBAL_H_
-#include "window.h" /* for WindowPtr */
+#include "window.h" /* for WindowPtr */
/* Global X server variables that are visible to mi, dix, os, and ddx */
@@ -122,4 +122,4 @@ extern _X_EXPORT Bool noXvExtension;
extern _X_EXPORT Bool noDRI2Extension;
#endif
-#endif /* !_XSERV_GLOBAL_H_ */
+#endif /* !_XSERV_GLOBAL_H_ */
diff --git a/xorg-server/include/hotplug.h b/xorg-server/include/hotplug.h
index d074df31d..caa3201e7 100644
--- a/xorg-server/include/hotplug.h
+++ b/xorg-server/include/hotplug.h
@@ -29,4 +29,4 @@
extern _X_EXPORT void config_init(void);
extern _X_EXPORT void config_fini(void);
-#endif /* HOTPLUG_H */
+#endif /* HOTPLUG_H */
diff --git a/xorg-server/include/miscstruct.h b/xorg-server/include/miscstruct.h
index 409b102c0..0820e1e81 100644
--- a/xorg-server/include/miscstruct.h
+++ b/xorg-server/include/miscstruct.h
@@ -22,7 +22,6 @@ Except as contained in this notice, the name of The Open Group shall not be
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
@@ -57,10 +56,10 @@ typedef xPoint DDXPointRec;
typedef struct pixman_box16 BoxRec;
typedef union _DevUnion {
- pointer ptr;
- long val;
- unsigned long uval;
- pointer (*fptr)(void);
+ pointer ptr;
+ long val;
+ unsigned long uval;
+ pointer (*fptr) (void);
} DevUnion;
-#endif /* MISCSTRUCT_H */
+#endif /* MISCSTRUCT_H */
diff --git a/xorg-server/include/opaque.h b/xorg-server/include/opaque.h
index 5c2e9166c..9ca408ae1 100644
--- a/xorg-server/include/opaque.h
+++ b/xorg-server/include/opaque.h
@@ -1,77 +1,77 @@
-/*
-
-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.
-
-*/
-
-#ifndef OPAQUE_H
-#define OPAQUE_H
-
-#include <X11/Xmd.h>
-
-#include "globals.h"
-
-extern _X_EXPORT char *defaultTextFont;
-extern _X_EXPORT char *defaultCursorFont;
-extern _X_EXPORT int MaxClients;
-extern _X_EXPORT volatile char isItTimeToYield;
-extern _X_EXPORT volatile char dispatchException;
-
-/* bit values for dispatchException */
-#define DE_RESET 1
-#define DE_TERMINATE 2
-#define DE_PRIORITYCHANGE 4 /* set when a client's priority changes */
-
-extern _X_EXPORT CARD32 TimeOutValue;
-extern _X_EXPORT int ScreenSaverBlanking;
-extern _X_EXPORT int ScreenSaverAllowExposures;
-extern _X_EXPORT int defaultScreenSaverBlanking;
-extern _X_EXPORT int defaultScreenSaverAllowExposures;
-extern _X_EXPORT char *display;
-
-extern _X_EXPORT int defaultBackingStore;
-extern _X_EXPORT Bool disableBackingStore;
-extern _X_EXPORT Bool enableBackingStore;
-extern _X_EXPORT Bool PartialNetwork;
-extern _X_EXPORT Bool RunFromSigStopParent;
-#ifdef RLIMIT_DATA
-extern _X_EXPORT int limitDataSpace;
-#endif
-#ifdef RLIMIT_STACK
-extern _X_EXPORT int limitStackSpace;
-#endif
-#ifdef RLIMIT_NOFILE
-extern _X_EXPORT int limitNoFile;
-#endif
-extern _X_EXPORT Bool defeatAccessControl;
-extern _X_EXPORT long maxBigRequestSize;
-extern _X_EXPORT Bool party_like_its_1989;
-extern _X_EXPORT Bool whiteRoot;
-extern _X_EXPORT Bool bgNoneRoot;
-
-extern _X_EXPORT Bool CoreDump;
-
-
-#endif /* OPAQUE_H */
+/*
+
+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.
+
+*/
+
+#ifndef OPAQUE_H
+#define OPAQUE_H
+
+#include <X11/Xmd.h>
+
+#include "globals.h"
+
+extern _X_EXPORT char *defaultTextFont;
+extern _X_EXPORT char *defaultCursorFont;
+extern _X_EXPORT int MaxClients;
+extern _X_EXPORT volatile char isItTimeToYield;
+extern _X_EXPORT volatile char dispatchException;
+
+/* bit values for dispatchException */
+#define DE_RESET 1
+#define DE_TERMINATE 2
+#define DE_PRIORITYCHANGE 4 /* set when a client's priority changes */
+
+extern _X_EXPORT CARD32 TimeOutValue;
+extern _X_EXPORT int ScreenSaverBlanking;
+extern _X_EXPORT int ScreenSaverAllowExposures;
+extern _X_EXPORT int defaultScreenSaverBlanking;
+extern _X_EXPORT int defaultScreenSaverAllowExposures;
+extern _X_EXPORT char *display;
+
+extern _X_EXPORT int defaultBackingStore;
+extern _X_EXPORT Bool disableBackingStore;
+extern _X_EXPORT Bool enableBackingStore;
+extern _X_EXPORT Bool PartialNetwork;
+extern _X_EXPORT Bool RunFromSigStopParent;
+
+#ifdef RLIMIT_DATA
+extern _X_EXPORT int limitDataSpace;
+#endif
+#ifdef RLIMIT_STACK
+extern _X_EXPORT int limitStackSpace;
+#endif
+#ifdef RLIMIT_NOFILE
+extern _X_EXPORT int limitNoFile;
+#endif
+extern _X_EXPORT Bool defeatAccessControl;
+extern _X_EXPORT long maxBigRequestSize;
+extern _X_EXPORT Bool party_like_its_1989;
+extern _X_EXPORT Bool whiteRoot;
+extern _X_EXPORT Bool bgNoneRoot;
+
+extern _X_EXPORT Bool CoreDump;
+
+#endif /* OPAQUE_H */
diff --git a/xorg-server/include/optionstr.h b/xorg-server/include/optionstr.h
index a71d245fa..12ab85256 100644
--- a/xorg-server/include/optionstr.h
+++ b/xorg-server/include/optionstr.h
@@ -2,7 +2,6 @@
#define OPTIONSTR_H_
#include "list.h"
-
struct _InputOption {
GenericListRec list;
char *opt_name;
@@ -11,4 +10,4 @@ struct _InputOption {
char *opt_comment;
};
-#endif /* INPUTSTRUCT_H */
+#endif /* INPUTSTRUCT_H */
diff --git a/xorg-server/include/pixmapstr.h b/xorg-server/include/pixmapstr.h
index 0a5d379dc..0800c62b2 100644
--- a/xorg-server/include/pixmapstr.h
+++ b/xorg-server/include/pixmapstr.h
@@ -1,86 +1,85 @@
-/***********************************************************
-
-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.
-
-******************************************************************/
-
-#ifndef PIXMAPSTRUCT_H
-#define PIXMAPSTRUCT_H
-#include "pixmap.h"
-#include "screenint.h"
-#include "regionstr.h"
-#include "privates.h"
-
-typedef struct _Drawable {
- unsigned char type; /* DRAWABLE_<type> */
- unsigned char class; /* specific to type */
- unsigned char depth;
- unsigned char bitsPerPixel;
- XID id; /* resource id */
- short x; /* window: screen absolute, pixmap: 0 */
- short y; /* window: screen absolute, pixmap: 0 */
- unsigned short width;
- unsigned short height;
- ScreenPtr pScreen;
- unsigned long serialNumber;
-} DrawableRec;
-
-/*
- * PIXMAP -- device dependent
- */
-
-typedef struct _Pixmap {
- DrawableRec drawable;
- PrivateRec *devPrivates;
- int refcnt;
- int devKind; /* This is the pitch of the pixmap, typically width*bpp/8. */
- DevUnion devPrivate; /* When !NULL, devPrivate.ptr points to the raw pixel data. */
-#ifdef COMPOSITE
- short screen_x;
- short screen_y;
-#endif
- unsigned usage_hint; /* see CREATE_PIXMAP_USAGE_* */
-} PixmapRec;
-
-#endif /* PIXMAPSTRUCT_H */
+/***********************************************************
+
+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.
+
+******************************************************************/
+
+#ifndef PIXMAPSTRUCT_H
+#define PIXMAPSTRUCT_H
+#include "pixmap.h"
+#include "screenint.h"
+#include "regionstr.h"
+#include "privates.h"
+
+typedef struct _Drawable {
+ unsigned char type; /* DRAWABLE_<type> */
+ unsigned char class; /* specific to type */
+ unsigned char depth;
+ unsigned char bitsPerPixel;
+ XID id; /* resource id */
+ short x; /* window: screen absolute, pixmap: 0 */
+ short y; /* window: screen absolute, pixmap: 0 */
+ unsigned short width;
+ unsigned short height;
+ ScreenPtr pScreen;
+ unsigned long serialNumber;
+} DrawableRec;
+
+/*
+ * PIXMAP -- device dependent
+ */
+
+typedef struct _Pixmap {
+ DrawableRec drawable;
+ PrivateRec *devPrivates;
+ int refcnt;
+ int devKind; /* This is the pitch of the pixmap, typically width*bpp/8. */
+ DevUnion devPrivate; /* When !NULL, devPrivate.ptr points to the raw pixel data. */
+#ifdef COMPOSITE
+ short screen_x;
+ short screen_y;
+#endif
+ unsigned usage_hint; /* see CREATE_PIXMAP_USAGE_* */
+} PixmapRec;
+
+#endif /* PIXMAPSTRUCT_H */
diff --git a/xorg-server/include/propertyst.h b/xorg-server/include/propertyst.h
index fd3e0118d..c12c71af6 100644
--- a/xorg-server/include/propertyst.h
+++ b/xorg-server/include/propertyst.h
@@ -1,68 +1,66 @@
-/***********************************************************
-
-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.
-
-******************************************************************/
-
-#ifndef PROPERTYSTRUCT_H
-#define PROPERTYSTRUCT_H
-#include "misc.h"
-#include "property.h"
-#include "privates.h"
-/*
- * PROPERTY -- property element
- */
-
-typedef struct _Property {
- struct _Property *next;
- ATOM propertyName;
- ATOM type; /* ignored by server */
- uint32_t format; /* format of data for swapping - 8,16,32 */
- uint32_t size; /* size of data in (format/8) bytes */
- pointer data; /* private to client */
- PrivateRec *devPrivates;
-} PropertyRec;
-
-#endif /* PROPERTYSTRUCT_H */
-
+/***********************************************************
+
+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.
+
+******************************************************************/
+
+#ifndef PROPERTYSTRUCT_H
+#define PROPERTYSTRUCT_H
+#include "misc.h"
+#include "property.h"
+#include "privates.h"
+/*
+ * PROPERTY -- property element
+ */
+
+typedef struct _Property {
+ struct _Property *next;
+ ATOM propertyName;
+ ATOM type; /* ignored by server */
+ uint32_t format; /* format of data for swapping - 8,16,32 */
+ uint32_t size; /* size of data in (format/8) bytes */
+ pointer data; /* private to client */
+ PrivateRec *devPrivates;
+} PropertyRec;
+
+#endif /* PROPERTYSTRUCT_H */
diff --git a/xorg-server/include/ptrveloc.h b/xorg-server/include/ptrveloc.h
index 4f76b0094..8778646f5 100644
--- a/xorg-server/include/ptrveloc.h
+++ b/xorg-server/include/ptrveloc.h
@@ -48,8 +48,8 @@ struct _DeviceVelocityRec;
* returns actual acceleration depending on velocity, acceleration control,...
*/
typedef double (*PointerAccelerationProfileFunc)
- (DeviceIntPtr dev, struct _DeviceVelocityRec* vel,
- double velocity, double threshold, double accelCoeff);
+ (DeviceIntPtr dev, struct _DeviceVelocityRec * vel,
+ double velocity, double threshold, double accelCoeff);
/**
* a motion history, with just enough information to
@@ -57,9 +57,9 @@ typedef double (*PointerAccelerationProfileFunc)
* a more or less straight line
*/
typedef struct _MotionTracker {
- double dx, dy; /* accumulated delta for each axis */
- int time; /* time of creation */
- int dir; /* initial direction bitfield */
+ double dx, dy; /* accumulated delta for each axis */
+ int time; /* time of creation */
+ int dir; /* initial direction bitfield */
} MotionTracker, *MotionTrackerPtr;
/**
@@ -68,25 +68,25 @@ typedef struct _MotionTracker {
typedef struct _DeviceVelocityRec {
MotionTrackerPtr tracker;
int num_tracker;
- int cur_tracker; /* current index */
- double velocity; /* velocity as guessed by algorithm */
- double last_velocity; /* previous velocity estimate */
- double last_dx; /* last time-difference */
- double last_dy; /* phase of last/current estimate */
- double corr_mul; /* config: multiply this into velocity */
- double const_acceleration; /* config: (recipr.) const deceleration */
- double min_acceleration; /* config: minimum acceleration */
- short reset_time; /* config: reset non-visible state after # ms */
- short use_softening; /* config: use softening of mouse values */
- double max_rel_diff; /* config: max. relative difference */
- double max_diff; /* config: max. difference */
- int initial_range; /* config: max. offset used as initial velocity */
- Bool average_accel; /* config: average acceleration over velocity */
+ int cur_tracker; /* current index */
+ double velocity; /* velocity as guessed by algorithm */
+ double last_velocity; /* previous velocity estimate */
+ double last_dx; /* last time-difference */
+ double last_dy; /* phase of last/current estimate */
+ double corr_mul; /* config: multiply this into velocity */
+ double const_acceleration; /* config: (recipr.) const deceleration */
+ double min_acceleration; /* config: minimum acceleration */
+ short reset_time; /* config: reset non-visible state after # ms */
+ short use_softening; /* config: use softening of mouse values */
+ double max_rel_diff; /* config: max. relative difference */
+ double max_diff; /* config: max. difference */
+ int initial_range; /* config: max. offset used as initial velocity */
+ Bool average_accel; /* config: average acceleration over velocity */
PointerAccelerationProfileFunc Profile;
PointerAccelerationProfileFunc deviceSpecificProfile;
- void* profile_private;/* extended data, see SetAccelerationProfile() */
- struct { /* to be able to query this information */
- int profile_number;
+ void *profile_private; /* extended data, see SetAccelerationProfile() */
+ struct { /* to be able to query this information */
+ int profile_number;
} statistics;
} DeviceVelocityRec, *DeviceVelocityPtr;
@@ -96,49 +96,54 @@ typedef struct _DeviceVelocityRec {
*/
typedef struct _PredictableAccelSchemeRec {
DeviceVelocityPtr vel;
- long* prop_handlers;
+ long *prop_handlers;
int num_prop_handlers;
} PredictableAccelSchemeRec, *PredictableAccelSchemePtr;
extern _X_EXPORT void
-InitVelocityData(DeviceVelocityPtr vel);
+ InitVelocityData(DeviceVelocityPtr vel);
extern _X_EXPORT void
-InitTrackers(DeviceVelocityPtr vel, int ntracker);
+ InitTrackers(DeviceVelocityPtr vel, int ntracker);
extern _X_EXPORT BOOL
ProcessVelocityData2D(DeviceVelocityPtr vel, double dx, double dy, int time);
extern _X_EXPORT double
+
BasicComputeAcceleration(DeviceIntPtr dev, DeviceVelocityPtr vel,
- double velocity, double threshold, double acc);
+ double velocity, double threshold, double acc);
extern _X_EXPORT void
-FreeVelocityData(DeviceVelocityPtr vel);
+ FreeVelocityData(DeviceVelocityPtr vel);
extern _X_EXPORT int
-SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num);
+ SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num);
extern _X_EXPORT DeviceVelocityPtr
GetDevicePredictableAccelData(DeviceIntPtr dev);
extern _X_EXPORT void
+
SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr vel,
PointerAccelerationProfileFunc profile);
extern _X_INTERNAL void
-AccelerationDefaultCleanup(DeviceIntPtr dev);
+ AccelerationDefaultCleanup(DeviceIntPtr dev);
extern _X_INTERNAL Bool
+
InitPredictableAccelerationScheme(DeviceIntPtr dev,
- struct _ValuatorAccelerationRec* protoScheme);
+ struct _ValuatorAccelerationRec *protoScheme);
extern _X_INTERNAL void
-acceleratePointerPredictable(DeviceIntPtr dev, ValuatorMask* val,
+
+acceleratePointerPredictable(DeviceIntPtr dev, ValuatorMask *val,
CARD32 evtime);
extern _X_INTERNAL void
-acceleratePointerLightweight(DeviceIntPtr dev, ValuatorMask* val,
+
+acceleratePointerLightweight(DeviceIntPtr dev, ValuatorMask *val,
CARD32 evtime);
-#endif /* POINTERVELOCITY_H */
+#endif /* POINTERVELOCITY_H */
diff --git a/xorg-server/include/region.h b/xorg-server/include/region.h
index e9d7e778c..11dd59e98 100644
--- a/xorg-server/include/region.h
+++ b/xorg-server/include/region.h
@@ -22,7 +22,6 @@ Except as contained in this notice, the name of The Open Group shall not be
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
@@ -50,4 +49,4 @@ SOFTWARE.
#include "regionstr.h"
-#endif /* REGION_H */
+#endif /* REGION_H */
diff --git a/xorg-server/include/registry.h b/xorg-server/include/registry.h
index 44f79259e..f471b899f 100644
--- a/xorg-server/include/registry.h
+++ b/xorg-server/include/registry.h
@@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* not be a stack variable.
*/
extern _X_EXPORT void RegisterResourceName(RESTYPE type, const char *name);
-extern _X_EXPORT void RegisterExtensionNames(ExtensionEntry *ext);
+extern _X_EXPORT void RegisterExtensionNames(ExtensionEntry * ext);
/*
* Lookup functions. The returned string must not be modified or freed.
@@ -45,7 +45,7 @@ extern _X_EXPORT const char *LookupResourceName(RESTYPE rtype);
*/
extern _X_EXPORT void dixResetRegistry(void);
-#else /* XREGISTRY */
+#else /* XREGISTRY */
/* Define calls away when the registry is not being built. */
@@ -60,5 +60,5 @@ extern _X_EXPORT void dixResetRegistry(void);
#define dixResetRegistry() { ; }
-#endif /* XREGISTRY */
-#endif /* DIX_REGISTRY_H */
+#endif /* XREGISTRY */
+#endif /* DIX_REGISTRY_H */
diff --git a/xorg-server/include/rgb.h b/xorg-server/include/rgb.h
index 3e768b615..ddfb1d814 100644
--- a/xorg-server/include/rgb.h
+++ b/xorg-server/include/rgb.h
@@ -22,7 +22,6 @@ Except as contained in this notice, the name of The Open Group shall not be
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
@@ -48,6 +47,6 @@ SOFTWARE.
#ifndef RGB_H
#define RGB_H
typedef struct _RGB {
- unsigned short red, green, blue;
- } RGB;
-#endif /* RGB_H */
+ unsigned short red, green, blue;
+} RGB;
+#endif /* RGB_H */
diff --git a/xorg-server/include/selection.h b/xorg-server/include/selection.h
index 3271f6abb..37e4f5e64 100644
--- a/xorg-server/include/selection.h
+++ b/xorg-server/include/selection.h
@@ -22,7 +22,6 @@ Except as contained in this notice, the name of The Open Group shall not be
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
@@ -65,13 +64,12 @@ typedef struct _Selection {
PrivateRec *devPrivates;
} Selection;
-
/*
* Selection API
*/
-extern _X_EXPORT int dixLookupSelection(Selection **result, Atom name,
- ClientPtr client, Mask access_mode);
+extern _X_EXPORT int dixLookupSelection(Selection ** result, Atom name,
+ ClientPtr client, Mask access_mode);
extern _X_EXPORT Selection *CurrentSelections;
@@ -84,12 +82,11 @@ typedef enum {
} SelectionCallbackKind;
typedef struct {
- struct _Selection *selection;
- ClientPtr client;
- SelectionCallbackKind kind;
+ struct _Selection *selection;
+ ClientPtr client;
+ SelectionCallbackKind kind;
} SelectionInfoRec;
-
/*
* Selection server internals
*/
@@ -100,6 +97,4 @@ extern _X_EXPORT void DeleteWindowFromAnySelections(WindowPtr pWin);
extern _X_EXPORT void DeleteClientFromAnySelections(ClientPtr client);
-#endif /* SELECTION_H */
-
-
+#endif /* SELECTION_H */
diff --git a/xorg-server/include/servermd.h b/xorg-server/include/servermd.h
index b5ae6ac71..d6a9a3ad5 100644
--- a/xorg-server/include/servermd.h
+++ b/xorg-server/include/servermd.h
@@ -1,355 +1,351 @@
-/***********************************************************
-
-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.
-
-******************************************************************/
-
-#ifndef SERVERMD_H
-#define SERVERMD_H 1
-
-/*
- * Note: much of this is vestigial from mfb/cfb times. This should
- * really be simplified even further.
- */
-
-/*
- * Machine dependent values:
- * GLYPHPADBYTES should be chosen with consideration for the space-time
- * trade-off. Padding to 0 bytes means that there is no wasted space
- * in the font bitmaps (both on disk and in memory), but that access of
- * the bitmaps will cause odd-address memory references. Padding to
- * 2 bytes would ensure even address memory references and would
- * be suitable for a 68010-class machine, but at the expense of wasted
- * space in the font bitmaps. Padding to 4 bytes would be good
- * for real 32 bit machines, etc. Be sure that you tell the font
- * compiler what kind of padding you want because its defines are
- * kept separate from this. See server/include/font.h for how
- * GLYPHPADBYTES is used.
- */
-
-#ifdef __avr32__
-
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-#define GLYPHPADBYTES 4
-
-#endif /* __avr32__ */
-
-#ifdef __arm32__
-
-#define IMAGE_BYTE_ORDER LSBFirst
-#define BITMAP_BIT_ORDER LSBFirst
-#define GLYPHPADBYTES 4
-
-#endif /* __arm32__ */
-
-#if defined(__nds32__)
-
-#define IMAGE_BYTE_ORDER LSBFirst
-
-#if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO)
-# define BITMAP_BIT_ORDER MSBFirst
-#else
-# define BITMAP_BIT_ORDER LSBFirst
-#endif
-
-#if defined(XF86MONOVGA) || defined(XF86VGA16)
-# define BITMAP_SCANLINE_UNIT 8
-#endif
-
-#define GLYPHPADBYTES 4
-#define GETLEFTBITS_ALIGNMENT 1
-#define LARGE_INSTRUCTION_CACHE
-#define AVOID_MEMORY_READ
-
-#endif /* __nds32__ */
-
-#if defined __hppa__
-
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-#define GLYPHPADBYTES 4 /* to make fb work */
- /* byte boundries */
-#endif /* hpux || __hppa__ */
-
-#if defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__)
-
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-#define GLYPHPADBYTES 4
-
-#endif /* PowerPC */
-
-#if defined(__sh__)
-
-#if defined(__BIG_ENDIAN__)
-# define IMAGE_BYTE_ORDER MSBFirst
-# define BITMAP_BIT_ORDER MSBFirst
-# define GLYPHPADBYTES 4
-#else
-# define IMAGE_BYTE_ORDER LSBFirst
-# define BITMAP_BIT_ORDER LSBFirst
-# define GLYPHPADBYTES 4
-#endif
-
-#endif /* SuperH */
-
-#if defined(__m32r__)
-
-#if defined(__BIG_ENDIAN__)
-# define IMAGE_BYTE_ORDER MSBFirst
-# define BITMAP_BIT_ORDER MSBFirst
-# define GLYPHPADBYTES 4
-#else
-# define IMAGE_BYTE_ORDER LSBFirst
-# define BITMAP_BIT_ORDER LSBFirst
-# define GLYPHPADBYTES 4
-#endif
-
-#endif /* __m32r__ */
-
-#if (defined(sun) && (defined(__sparc) || defined(sparc))) || \
- (defined(__uxp__) && (defined(sparc) || defined(mc68000))) || \
- defined(__sparc__) || defined(__mc68000__)
-
-#if defined(__sparc) || defined(__sparc__)
-# if !defined(sparc)
-# define sparc 1
-# endif
-#endif
-
-#if defined(sun386) || defined(sun5)
-# define IMAGE_BYTE_ORDER LSBFirst /* Values for the SUN only */
-# define BITMAP_BIT_ORDER LSBFirst
-#else
-# define IMAGE_BYTE_ORDER MSBFirst /* Values for the SUN only */
-# define BITMAP_BIT_ORDER MSBFirst
-#endif
-
-#define GLYPHPADBYTES 4
-
-#endif /* sun && !(i386 && SVR4) */
-
-
-#if defined(ibm032) || defined (ibm)
-
-#ifdef __i386__
-# define IMAGE_BYTE_ORDER LSBFirst /* Value for PS/2 only */
-#else
-# define IMAGE_BYTE_ORDER MSBFirst /* Values for the RT only*/
-#endif
-#define BITMAP_BIT_ORDER MSBFirst
-#define GLYPHPADBYTES 1
-/* ibm pcc doesn't understand pragmas. */
-
-#ifdef __i386__
-#define BITMAP_SCANLINE_UNIT 8
-#endif
-
-#endif /* ibm */
-
-#if (defined(mips) || defined(__mips))
-
-#if defined(MIPSEL) || defined(__MIPSEL__)
-# define IMAGE_BYTE_ORDER LSBFirst /* Values for the PMAX only */
-# define BITMAP_BIT_ORDER LSBFirst
-# define GLYPHPADBYTES 4
-#else
-# define IMAGE_BYTE_ORDER MSBFirst /* Values for the MIPS only */
-# define BITMAP_BIT_ORDER MSBFirst
-# define GLYPHPADBYTES 4
-#endif
-
-#endif /* mips */
-
-#if defined(__alpha) || defined(__alpha__)
-# define IMAGE_BYTE_ORDER LSBFirst /* Values for the Alpha only */
-# define BITMAP_BIT_ORDER LSBFirst
-# define GLYPHPADBYTES 4
-
-#endif /* alpha */
-
-#if defined (linux) && defined (__s390__)
-
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-#define GLYPHPADBYTES 4
-
-#define BITMAP_SCANLINE_UNIT 8
-#define FAST_UNALIGNED_READ
-
-#endif /* linux/s390 */
-
-#if defined (linux) && defined (__s390x__)
-
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-#define GLYPHPADBYTES 4
-
-#define BITMAP_SCANLINE_UNIT 8
-#define FAST_UNALIGNED_READ
-
-#endif /* linux/s390x */
-
-
-#if defined(__ia64__) || defined(ia64)
-
-# define IMAGE_BYTE_ORDER LSBFirst
-# define BITMAP_BIT_ORDER LSBFirst
-# define GLYPHPADBYTES 4
-
-#endif /* ia64 */
-
-#if defined(__amd64__) || defined(amd64) || defined(__amd64)
-# define IMAGE_BYTE_ORDER LSBFirst
-# define BITMAP_BIT_ORDER LSBFirst
-# define GLYPHPADBYTES 4
-/* ???? */
-#endif /* AMD64 */
-
-#if defined(SVR4) && (defined(__i386__) || defined(__i386) ) || \
- defined(__alpha__) || defined(__alpha) || \
- defined(__i386__) || \
- defined(__s390x__) || defined(__s390__)
-
-#ifndef IMAGE_BYTE_ORDER
-#define IMAGE_BYTE_ORDER LSBFirst
-#endif
-
-#ifndef BITMAP_BIT_ORDER
-# define BITMAP_BIT_ORDER LSBFirst
-#endif
-
-#ifndef GLYPHPADBYTES
-#define GLYPHPADBYTES 4
-#endif
-
-#endif /* SVR4 / BSD / i386 */
-
-#if defined (linux) && defined (__mc68000__)
-
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-#define GLYPHPADBYTES 4
-
-#endif /* linux/m68k */
-
-
-/* linux on ARM */
-#if defined(linux) && defined(__arm__)
-#define IMAGE_BYTE_ORDER LSBFirst
-#define BITMAP_BIT_ORDER LSBFirst
-#define GLYPHPADBYTES 4
-#endif
-
-/* linux on IBM S/390 */
-#if defined (linux) && defined (__s390__)
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-#define GLYPHPADBYTES 4
-#endif /* linux/s390 */
-
-/* size of buffer to use with GetImage, measured in bytes. There's obviously
- * a trade-off between the amount of heap used and the number of times the
- * ddx routine has to be called.
- */
-#ifndef IMAGE_BUFSIZE
-#define IMAGE_BUFSIZE (64*1024)
-#endif
-
-/* pad scanline to a longword */
-#ifndef BITMAP_SCANLINE_UNIT
-#define BITMAP_SCANLINE_UNIT 32
-#endif
-
-#ifndef BITMAP_SCANLINE_PAD
-#define BITMAP_SCANLINE_PAD 32
-#define LOG2_BITMAP_PAD 5
-#define LOG2_BYTES_PER_SCANLINE_PAD 2
-#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
- * screenInfo or hardwired constants.
- */
-
-typedef struct _PaddingInfo {
- int padRoundUp; /* pixels per pad unit - 1 */
- int padPixelsLog2; /* log 2 (pixels per pad unit) */
- int padBytesLog2; /* log 2 (bytes per pad unit) */
- int notPower2; /* bitsPerPixel not a power of 2 */
- int bytesPerPixel; /* only set when notPower2 is TRUE */
- int bitsPerPixel; /* bits per pixel */
-} PaddingInfo;
-extern _X_EXPORT PaddingInfo PixmapWidthPaddingInfo[];
-
-/* The only portable way to get the bpp from the depth is to look it up */
-#define BitsPerPixel(d) (PixmapWidthPaddingInfo[d].bitsPerPixel)
-
-#define PixmapWidthInPadUnits(w, d) \
- (PixmapWidthPaddingInfo[d].notPower2 ? \
- (((int)(w) * PixmapWidthPaddingInfo[d].bytesPerPixel + \
- PixmapWidthPaddingInfo[d].bytesPerPixel) >> \
- PixmapWidthPaddingInfo[d].padBytesLog2) : \
- ((int)((w) + PixmapWidthPaddingInfo[d].padRoundUp) >> \
- PixmapWidthPaddingInfo[d].padPixelsLog2))
-
-/*
- * Return the number of bytes to which a scanline of the given
- * depth and width will be padded.
- */
-#define PixmapBytePad(w, d) \
- (PixmapWidthInPadUnits(w, d) << PixmapWidthPaddingInfo[d].padBytesLog2)
-
-#define BitmapBytePad(w) \
- (((int)((w) + BITMAP_SCANLINE_PAD - 1) >> LOG2_BITMAP_PAD) << LOG2_BYTES_PER_SCANLINE_PAD)
-
-#define PixmapWidthInPadUnitsProto(w, d) PixmapWidthInPadUnits(w, d)
-#define PixmapBytePadProto(w, d) PixmapBytePad(w, d)
-#define BitmapBytePadProto(w) BitmapBytePad(w)
-
-#endif /* SERVERMD_H */
+/***********************************************************
+
+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.
+
+******************************************************************/
+
+#ifndef SERVERMD_H
+#define SERVERMD_H 1
+
+/*
+ * Note: much of this is vestigial from mfb/cfb times. This should
+ * really be simplified even further.
+ */
+
+/*
+ * Machine dependent values:
+ * GLYPHPADBYTES should be chosen with consideration for the space-time
+ * trade-off. Padding to 0 bytes means that there is no wasted space
+ * in the font bitmaps (both on disk and in memory), but that access of
+ * the bitmaps will cause odd-address memory references. Padding to
+ * 2 bytes would ensure even address memory references and would
+ * be suitable for a 68010-class machine, but at the expense of wasted
+ * space in the font bitmaps. Padding to 4 bytes would be good
+ * for real 32 bit machines, etc. Be sure that you tell the font
+ * compiler what kind of padding you want because its defines are
+ * kept separate from this. See server/include/font.h for how
+ * GLYPHPADBYTES is used.
+ */
+
+#ifdef __avr32__
+
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+
+#endif /* __avr32__ */
+
+#ifdef __arm32__
+
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
+
+#endif /* __arm32__ */
+
+#if defined(__nds32__)
+
+#define IMAGE_BYTE_ORDER LSBFirst
+
+#if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO)
+#define BITMAP_BIT_ORDER MSBFirst
+#else
+#define BITMAP_BIT_ORDER LSBFirst
+#endif
+
+#if defined(XF86MONOVGA) || defined(XF86VGA16)
+#define BITMAP_SCANLINE_UNIT 8
+#endif
+
+#define GLYPHPADBYTES 4
+#define GETLEFTBITS_ALIGNMENT 1
+#define LARGE_INSTRUCTION_CACHE
+#define AVOID_MEMORY_READ
+
+#endif /* __nds32__ */
+
+#if defined __hppa__
+
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4 /* to make fb work */
+ /* byte boundries */
+#endif /* hpux || __hppa__ */
+
+#if defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__)
+
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+
+#endif /* PowerPC */
+
+#if defined(__sh__)
+
+#if defined(__BIG_ENDIAN__)
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+#else
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
+#endif
+
+#endif /* SuperH */
+
+#if defined(__m32r__)
+
+#if defined(__BIG_ENDIAN__)
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+#else
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
+#endif
+
+#endif /* __m32r__ */
+
+#if (defined(sun) && (defined(__sparc) || defined(sparc))) || \
+ (defined(__uxp__) && (defined(sparc) || defined(mc68000))) || \
+ defined(__sparc__) || defined(__mc68000__)
+
+#if defined(__sparc) || defined(__sparc__)
+#if !defined(sparc)
+#define sparc 1
+#endif
+#endif
+
+#if defined(sun386) || defined(sun5)
+#define IMAGE_BYTE_ORDER LSBFirst /* Values for the SUN only */
+#define BITMAP_BIT_ORDER LSBFirst
+#else
+#define IMAGE_BYTE_ORDER MSBFirst /* Values for the SUN only */
+#define BITMAP_BIT_ORDER MSBFirst
+#endif
+
+#define GLYPHPADBYTES 4
+
+#endif /* sun && !(i386 && SVR4) */
+
+#if defined(ibm032) || defined (ibm)
+
+#ifdef __i386__
+#define IMAGE_BYTE_ORDER LSBFirst /* Value for PS/2 only */
+#else
+#define IMAGE_BYTE_ORDER MSBFirst /* Values for the RT only */
+#endif
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 1
+/* ibm pcc doesn't understand pragmas. */
+
+#ifdef __i386__
+#define BITMAP_SCANLINE_UNIT 8
+#endif
+
+#endif /* ibm */
+
+#if (defined(mips) || defined(__mips))
+
+#if defined(MIPSEL) || defined(__MIPSEL__)
+#define IMAGE_BYTE_ORDER LSBFirst /* Values for the PMAX only */
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
+#else
+#define IMAGE_BYTE_ORDER MSBFirst /* Values for the MIPS only */
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+#endif
+
+#endif /* mips */
+
+#if defined(__alpha) || defined(__alpha__)
+#define IMAGE_BYTE_ORDER LSBFirst /* Values for the Alpha only */
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
+
+#endif /* alpha */
+
+#if defined (linux) && defined (__s390__)
+
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+
+#define BITMAP_SCANLINE_UNIT 8
+#define FAST_UNALIGNED_READ
+
+#endif /* linux/s390 */
+
+#if defined (linux) && defined (__s390x__)
+
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+
+#define BITMAP_SCANLINE_UNIT 8
+#define FAST_UNALIGNED_READ
+
+#endif /* linux/s390x */
+
+#if defined(__ia64__) || defined(ia64)
+
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
+
+#endif /* ia64 */
+
+#if defined(__amd64__) || defined(amd64) || defined(__amd64)
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
+/* ???? */
+#endif /* AMD64 */
+
+#if defined(SVR4) && (defined(__i386__) || defined(__i386) ) || \
+ defined(__alpha__) || defined(__alpha) || \
+ defined(__i386__) || \
+ defined(__s390x__) || defined(__s390__)
+
+#ifndef IMAGE_BYTE_ORDER
+#define IMAGE_BYTE_ORDER LSBFirst
+#endif
+
+#ifndef BITMAP_BIT_ORDER
+#define BITMAP_BIT_ORDER LSBFirst
+#endif
+
+#ifndef GLYPHPADBYTES
+#define GLYPHPADBYTES 4
+#endif
+
+#endif /* SVR4 / BSD / i386 */
+
+#if defined (linux) && defined (__mc68000__)
+
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+
+#endif /* linux/m68k */
+
+/* linux on ARM */
+#if defined(linux) && defined(__arm__)
+#define IMAGE_BYTE_ORDER LSBFirst
+#define BITMAP_BIT_ORDER LSBFirst
+#define GLYPHPADBYTES 4
+#endif
+
+/* linux on IBM S/390 */
+#if defined (linux) && defined (__s390__)
+#define IMAGE_BYTE_ORDER MSBFirst
+#define BITMAP_BIT_ORDER MSBFirst
+#define GLYPHPADBYTES 4
+#endif /* linux/s390 */
+
+/* size of buffer to use with GetImage, measured in bytes. There's obviously
+ * a trade-off between the amount of heap used and the number of times the
+ * ddx routine has to be called.
+ */
+#ifndef IMAGE_BUFSIZE
+#define IMAGE_BUFSIZE (64*1024)
+#endif
+
+/* pad scanline to a longword */
+#ifndef BITMAP_SCANLINE_UNIT
+#define BITMAP_SCANLINE_UNIT 32
+#endif
+
+#ifndef BITMAP_SCANLINE_PAD
+#define BITMAP_SCANLINE_PAD 32
+#define LOG2_BITMAP_PAD 5
+#define LOG2_BYTES_PER_SCANLINE_PAD 2
+#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
+ * screenInfo or hardwired constants.
+ */
+
+typedef struct _PaddingInfo {
+ int padRoundUp; /* pixels per pad unit - 1 */
+ int padPixelsLog2; /* log 2 (pixels per pad unit) */
+ int padBytesLog2; /* log 2 (bytes per pad unit) */
+ int notPower2; /* bitsPerPixel not a power of 2 */
+ int bytesPerPixel; /* only set when notPower2 is TRUE */
+ int bitsPerPixel; /* bits per pixel */
+} PaddingInfo;
+extern _X_EXPORT PaddingInfo PixmapWidthPaddingInfo[];
+
+/* The only portable way to get the bpp from the depth is to look it up */
+#define BitsPerPixel(d) (PixmapWidthPaddingInfo[d].bitsPerPixel)
+
+#define PixmapWidthInPadUnits(w, d) \
+ (PixmapWidthPaddingInfo[d].notPower2 ? \
+ (((int)(w) * PixmapWidthPaddingInfo[d].bytesPerPixel + \
+ PixmapWidthPaddingInfo[d].bytesPerPixel) >> \
+ PixmapWidthPaddingInfo[d].padBytesLog2) : \
+ ((int)((w) + PixmapWidthPaddingInfo[d].padRoundUp) >> \
+ PixmapWidthPaddingInfo[d].padPixelsLog2))
+
+/*
+ * Return the number of bytes to which a scanline of the given
+ * depth and width will be padded.
+ */
+#define PixmapBytePad(w, d) \
+ (PixmapWidthInPadUnits(w, d) << PixmapWidthPaddingInfo[d].padBytesLog2)
+
+#define BitmapBytePad(w) \
+ (((int)((w) + BITMAP_SCANLINE_PAD - 1) >> LOG2_BITMAP_PAD) << LOG2_BYTES_PER_SCANLINE_PAD)
+
+#define PixmapWidthInPadUnitsProto(w, d) PixmapWidthInPadUnits(w, d)
+#define PixmapBytePadProto(w, d) PixmapBytePad(w, d)
+#define BitmapBytePadProto(w) BitmapBytePad(w)
+
+#endif /* SERVERMD_H */
diff --git a/xorg-server/include/site.h b/xorg-server/include/site.h
index 07d7db543..25caabbb3 100644
--- a/xorg-server/include/site.h
+++ b/xorg-server/include/site.h
@@ -1,127 +1,126 @@
-/************************************************************
-
-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.
-
-********************************************************/
-
-#ifndef SITE_H
-#define SITE_H
-/*
- * The vendor string identifies the vendor responsible for the
- * server executable.
- */
-#ifndef VENDOR_STRING
-#define VENDOR_STRING "The X.Org Foundation"
-#endif
-
-/*
- * The vendor release number identifies, for the purpose of submitting
- * traceable bug reports, the release number of software produced
- * by the vendor.
- */
-#ifndef VENDOR_RELEASE
-#define VENDOR_RELEASE 6600
-#endif
-
-/*
- * 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
- * parameters.
- * DO NOT CHANGE THESE VALUES OR THE DIX IMAKEFILE!
- */
-#ifndef COMPILEDDEFAULTFONTPATH
-#define COMPILEDDEFAULTFONTPATH "/usr/share/fonts/X11/misc/"
-#endif
-
-/*
- * 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"
-#define COMPILEDCURSORFONT "cursor"
-#ifndef COMPILEDDISPLAYCLASS
-#define COMPILEDDISPLAYCLASS "MIT-unspecified"
-#endif
-#define DEFAULT_TIMEOUT 60 /* seconds */
-#define DEFAULT_KEYBOARD_CLICK 0
-#define DEFAULT_BELL 50
-#define DEFAULT_BELL_PITCH 400
-#define DEFAULT_BELL_DURATION 100
-#define DEFAULT_AUTOREPEAT TRUE
-#define DEFAULT_AUTOREPEATS {\
- 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\
- 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
-
-#define DEFAULT_LEDS 0x0 /* all off */
-#define DEFAULT_LEDS_MASK 0xffffffff /* 32 */
-#define DEFAULT_INT_RESOLUTION 1000
-#define DEFAULT_INT_MIN_VALUE 0
-#define DEFAULT_INT_MAX_VALUE 100
-#define DEFAULT_INT_DISPLAYED 0
-
-#define DEFAULT_PTR_NUMERATOR 2
-#define DEFAULT_PTR_DENOMINATOR 1
-#define DEFAULT_PTR_THRESHOLD 4
-
-#define DEFAULT_SCREEN_SAVER_TIME (10 * (60 * 1000))
-#define DEFAULT_SCREEN_SAVER_INTERVAL (10 * (60 * 1000))
-#define DEFAULT_SCREEN_SAVER_BLANKING PreferBlanking
-#define DEFAULT_SCREEN_SAVER_EXPOSURES AllowExposures
-#ifndef DEFAULT_ACCESS_CONTROL
-#define DEFAULT_ACCESS_CONTROL TRUE
-#endif
-
-/* Default logging parameters. */
-#ifndef DEFAULT_LOG_VERBOSITY
-#define DEFAULT_LOG_VERBOSITY 0
-#endif
-#ifndef DEFAULT_LOG_FILE_VERBOSITY
-#define DEFAULT_LOG_FILE_VERBOSITY 3
-#endif
-
-#endif /* SITE_H */
+/************************************************************
+
+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.
+
+********************************************************/
+
+#ifndef SITE_H
+#define SITE_H
+/*
+ * The vendor string identifies the vendor responsible for the
+ * server executable.
+ */
+#ifndef VENDOR_STRING
+#define VENDOR_STRING "The X.Org Foundation"
+#endif
+
+/*
+ * The vendor release number identifies, for the purpose of submitting
+ * traceable bug reports, the release number of software produced
+ * by the vendor.
+ */
+#ifndef VENDOR_RELEASE
+#define VENDOR_RELEASE 6600
+#endif
+
+/*
+ * 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
+ * parameters.
+ * DO NOT CHANGE THESE VALUES OR THE DIX IMAKEFILE!
+ */
+#ifndef COMPILEDDEFAULTFONTPATH
+#define COMPILEDDEFAULTFONTPATH "/usr/share/fonts/X11/misc/"
+#endif
+
+/*
+ * 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"
+#define COMPILEDCURSORFONT "cursor"
+#ifndef COMPILEDDISPLAYCLASS
+#define COMPILEDDISPLAYCLASS "MIT-unspecified"
+#endif
+#define DEFAULT_TIMEOUT 60 /* seconds */
+#define DEFAULT_KEYBOARD_CLICK 0
+#define DEFAULT_BELL 50
+#define DEFAULT_BELL_PITCH 400
+#define DEFAULT_BELL_DURATION 100
+#define DEFAULT_AUTOREPEAT TRUE
+#define DEFAULT_AUTOREPEATS {\
+ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\
+ 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
+
+#define DEFAULT_LEDS 0x0 /* all off */
+#define DEFAULT_LEDS_MASK 0xffffffff /* 32 */
+#define DEFAULT_INT_RESOLUTION 1000
+#define DEFAULT_INT_MIN_VALUE 0
+#define DEFAULT_INT_MAX_VALUE 100
+#define DEFAULT_INT_DISPLAYED 0
+
+#define DEFAULT_PTR_NUMERATOR 2
+#define DEFAULT_PTR_DENOMINATOR 1
+#define DEFAULT_PTR_THRESHOLD 4
+
+#define DEFAULT_SCREEN_SAVER_TIME (10 * (60 * 1000))
+#define DEFAULT_SCREEN_SAVER_INTERVAL (10 * (60 * 1000))
+#define DEFAULT_SCREEN_SAVER_BLANKING PreferBlanking
+#define DEFAULT_SCREEN_SAVER_EXPOSURES AllowExposures
+#ifndef DEFAULT_ACCESS_CONTROL
+#define DEFAULT_ACCESS_CONTROL TRUE
+#endif
+
+/* Default logging parameters. */
+#ifndef DEFAULT_LOG_VERBOSITY
+#define DEFAULT_LOG_VERBOSITY 0
+#endif
+#ifndef DEFAULT_LOG_FILE_VERBOSITY
+#define DEFAULT_LOG_FILE_VERBOSITY 3
+#endif
+
+#endif /* SITE_H */
diff --git a/xorg-server/include/validate.h b/xorg-server/include/validate.h
index e88fb41a2..1df22a38a 100644
--- a/xorg-server/include/validate.h
+++ b/xorg-server/include/validate.h
@@ -37,4 +37,4 @@ typedef union _Validate *ValidatePtr;
#define UnmapValData ((ValidatePtr)1)
-#endif /* VALIDATE_H */
+#endif /* VALIDATE_H */
diff --git a/xorg-server/include/windowstr.h b/xorg-server/include/windowstr.h
index 222de31dc..9caafba41 100644
--- a/xorg-server/include/windowstr.h
+++ b/xorg-server/include/windowstr.h
@@ -22,7 +22,6 @@ Except as contained in this notice, the name of The Open Group shall not be
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
@@ -53,7 +52,7 @@ SOFTWARE.
#include "regionstr.h"
#include "cursor.h"
#include "property.h"
-#include "resource.h" /* for ROOT_WINDOW_ID_BASE */
+#include "resource.h" /* for ROOT_WINDOW_ID_BASE */
#include "dix.h"
#include "privates.h"
#include "miscstruct.h"
@@ -73,27 +72,27 @@ SOFTWARE.
/* used as NULL-terminated list */
typedef struct _DevCursorNode {
- CursorPtr cursor;
- DeviceIntPtr dev;
- struct _DevCursorNode* next;
+ CursorPtr cursor;
+ DeviceIntPtr dev;
+ struct _DevCursorNode *next;
} DevCursNodeRec, *DevCursNodePtr, *DevCursorList;
typedef struct _WindowOpt {
- CursorPtr cursor; /* default: window.cursorNone */
- VisualID visual; /* default: same as parent */
- Colormap colormap; /* default: same as parent */
- Mask dontPropagateMask; /* default: window.dontPropagate */
- Mask otherEventMasks; /* default: 0 */
- struct _OtherClients *otherClients; /* default: NULL */
- struct _GrabRec *passiveGrabs; /* default: NULL */
- PropertyPtr userProps; /* default: NULL */
- unsigned long backingBitPlanes; /* default: ~0L */
- unsigned long backingPixel; /* default: 0 */
- RegionPtr boundingShape; /* default: NULL */
- RegionPtr clipShape; /* default: NULL */
- RegionPtr inputShape; /* default: NULL */
- struct _OtherInputMasks *inputMasks; /* default: NULL */
- DevCursorList deviceCursors; /* default: NULL */
+ CursorPtr cursor; /* default: window.cursorNone */
+ VisualID visual; /* default: same as parent */
+ Colormap colormap; /* default: same as parent */
+ Mask dontPropagateMask; /* default: window.dontPropagate */
+ Mask otherEventMasks; /* default: 0 */
+ struct _OtherClients *otherClients; /* default: NULL */
+ struct _GrabRec *passiveGrabs; /* default: NULL */
+ PropertyPtr userProps; /* default: NULL */
+ unsigned long backingBitPlanes; /* default: ~0L */
+ unsigned long backingPixel; /* default: 0 */
+ RegionPtr boundingShape; /* default: NULL */
+ RegionPtr clipShape; /* default: NULL */
+ RegionPtr inputShape; /* default: NULL */
+ struct _OtherInputMasks *inputMasks; /* default: NULL */
+ DevCursorList deviceCursors; /* default: NULL */
} WindowOptRec, *WindowOptPtr;
#define BackgroundPixel 2L
@@ -127,49 +126,49 @@ typedef struct _WindowOpt {
#define RedirectDrawManual 2
typedef struct _Window {
- DrawableRec drawable;
- PrivateRec *devPrivates;
- WindowPtr parent; /* ancestor chain */
- WindowPtr nextSib; /* next lower sibling */
- WindowPtr prevSib; /* next higher sibling */
- WindowPtr firstChild; /* top-most child */
- WindowPtr lastChild; /* bottom-most child */
- RegionRec clipList; /* clipping rectangle for output */
- RegionRec borderClip; /* NotClippedByChildren + border */
- union _Validate *valdata;
- RegionRec winSize;
- RegionRec borderSize;
- DDXPointRec origin; /* position relative to parent */
- unsigned short borderWidth;
- unsigned short deliverableEvents; /* all masks from all clients */
- Mask eventMask; /* mask from the creating client */
- PixUnion background;
- PixUnion border;
- pointer backStorage; /* null when BS disabled */
- WindowOptPtr optional;
- unsigned backgroundState:2; /* None, Relative, Pixel, Pixmap */
- unsigned borderIsPixel:1;
- unsigned cursorIsNone:1; /* else real cursor (might inherit) */
- unsigned backingStore:2;
- unsigned saveUnder:1;
- unsigned DIXsaveUnder:1;
- unsigned bitGravity:4;
- unsigned winGravity:4;
- unsigned overrideRedirect:1;
- unsigned visibility:2;
- unsigned mapped:1;
- unsigned realized:1; /* ancestors are all mapped */
- unsigned viewable:1; /* realized && InputOutput */
- unsigned dontPropagate:3;/* index into DontPropagateMasks */
- unsigned forcedBS:1; /* system-supplied backingStore */
- unsigned redirectDraw:2; /* COMPOSITE rendering redirect */
- unsigned forcedBG:1; /* must have an opaque background */
+ DrawableRec drawable;
+ PrivateRec *devPrivates;
+ WindowPtr parent; /* ancestor chain */
+ WindowPtr nextSib; /* next lower sibling */
+ WindowPtr prevSib; /* next higher sibling */
+ WindowPtr firstChild; /* top-most child */
+ WindowPtr lastChild; /* bottom-most child */
+ RegionRec clipList; /* clipping rectangle for output */
+ RegionRec borderClip; /* NotClippedByChildren + border */
+ union _Validate *valdata;
+ RegionRec winSize;
+ RegionRec borderSize;
+ DDXPointRec origin; /* position relative to parent */
+ unsigned short borderWidth;
+ unsigned short deliverableEvents; /* all masks from all clients */
+ Mask eventMask; /* mask from the creating client */
+ PixUnion background;
+ PixUnion border;
+ pointer backStorage; /* null when BS disabled */
+ WindowOptPtr optional;
+ unsigned backgroundState:2; /* None, Relative, Pixel, Pixmap */
+ unsigned borderIsPixel:1;
+ unsigned cursorIsNone:1; /* else real cursor (might inherit) */
+ unsigned backingStore:2;
+ unsigned saveUnder:1;
+ unsigned DIXsaveUnder:1;
+ unsigned bitGravity:4;
+ unsigned winGravity:4;
+ unsigned overrideRedirect:1;
+ unsigned visibility:2;
+ unsigned mapped:1;
+ unsigned realized:1; /* ancestors are all mapped */
+ unsigned viewable:1; /* realized && InputOutput */
+ unsigned dontPropagate:3; /* index into DontPropagateMasks */
+ unsigned forcedBS:1; /* system-supplied backingStore */
+ unsigned redirectDraw:2; /* COMPOSITE rendering redirect */
+ unsigned forcedBG:1; /* must have an opaque background */
#ifdef ROOTLESS
- unsigned rootlessUnhittable:1; /* doesn't hit-test */
+ unsigned rootlessUnhittable:1; /* doesn't hit-test */
#endif
#ifdef COMPOSITE
- unsigned damagedDescendants:1; /* some descendants are damaged */
- unsigned inhibitBGPaint:1; /* paint the background? */
+ unsigned damagedDescendants:1; /* some descendants are damaged */
+ unsigned inhibitBGPaint:1; /* paint the background? */
#endif
} WindowRec;
@@ -178,7 +177,7 @@ typedef struct _Window {
* fields (or filling the appropriate default value)
*/
-extern _X_EXPORT Mask DontPropagateMasks[];
+extern _X_EXPORT Mask DontPropagateMasks[];
#define wTrackParent(w,field) ((w)->optional ? \
(w)->optional->field \
@@ -219,4 +218,4 @@ typedef struct _ScreenSaverStuff *ScreenSaverStuffPtr;
extern _X_EXPORT int screenIsSaved;
-#endif /* WINDOWSTRUCT_H */
+#endif /* WINDOWSTRUCT_H */
diff --git a/xorg-server/include/xkbstr.h b/xorg-server/include/xkbstr.h
index 4afe010d2..935330c7c 100644
--- a/xorg-server/include/xkbstr.h
+++ b/xorg-server/include/xkbstr.h
@@ -40,59 +40,60 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l)))
#endif
- /*
- * Common data structures and access macros
- */
+ /*
+ * Common data structures and access macros
+ */
typedef struct _XkbStateRec {
- unsigned char group; /* base + latched + locked */
- /* FIXME: Why are base + latched short and not char?? */
- unsigned short base_group; /* physically ... down? */
- unsigned short latched_group;
- unsigned char locked_group;
-
- unsigned char mods; /* base + latched + locked */
- unsigned char base_mods; /* physically down */
- unsigned char latched_mods;
- unsigned char locked_mods;
-
- unsigned char compat_state; /* mods + group for core state */
-
- /* grab mods = all depressed and latched mods, _not_ locked mods */
- unsigned char grab_mods; /* grab mods minus internal mods */
- unsigned char compat_grab_mods; /* grab mods + group for core state,
- but not locked groups if
- IgnoreGroupLocks set */
-
- /* effective mods = all mods (depressed, latched, locked) */
- unsigned char lookup_mods; /* effective mods minus internal mods */
- unsigned char compat_lookup_mods; /* effective mods + group */
-
- unsigned short ptr_buttons; /* core pointer buttons */
-} XkbStateRec,*XkbStatePtr;
+ unsigned char group; /* base + latched + locked */
+ /* FIXME: Why are base + latched short and not char?? */
+ unsigned short base_group; /* physically ... down? */
+ unsigned short latched_group;
+ unsigned char locked_group;
+
+ unsigned char mods; /* base + latched + locked */
+ unsigned char base_mods; /* physically down */
+ unsigned char latched_mods;
+ unsigned char locked_mods;
+
+ unsigned char compat_state; /* mods + group for core state */
+
+ /* grab mods = all depressed and latched mods, _not_ locked mods */
+ unsigned char grab_mods; /* grab mods minus internal mods */
+ unsigned char compat_grab_mods; /* grab mods + group for core state,
+ but not locked groups if
+ IgnoreGroupLocks set */
+
+ /* effective mods = all mods (depressed, latched, locked) */
+ unsigned char lookup_mods; /* effective mods minus internal mods */
+ unsigned char compat_lookup_mods; /* effective mods + group */
+
+ unsigned short ptr_buttons; /* core pointer buttons */
+} XkbStateRec, *XkbStatePtr;
+
#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group)
#define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group)
typedef struct _XkbMods {
- unsigned char mask; /* effective mods */
- unsigned char real_mods;
- unsigned short vmods;
-} XkbModsRec,*XkbModsPtr;
+ unsigned char mask; /* effective mods */
+ unsigned char real_mods;
+ unsigned short vmods;
+} XkbModsRec, *XkbModsPtr;
typedef struct _XkbKTMapEntry {
- Bool active;
- unsigned char level;
- XkbModsRec mods;
-} XkbKTMapEntryRec,*XkbKTMapEntryPtr;
+ Bool active;
+ unsigned char level;
+ XkbModsRec mods;
+} XkbKTMapEntryRec, *XkbKTMapEntryPtr;
typedef struct _XkbKeyType {
- XkbModsRec mods;
- unsigned char num_levels;
- unsigned char map_count;
- XkbKTMapEntryPtr map;
- XkbModsPtr preserve;
- Atom name;
- Atom * level_names;
+ XkbModsRec mods;
+ unsigned char num_levels;
+ unsigned char map_count;
+ XkbKTMapEntryPtr map;
+ XkbModsPtr preserve;
+ Atom name;
+ Atom *level_names;
} XkbKeyTypeRec, *XkbKeyTypePtr;
#define XkbNumGroups(g) ((g)&0x0f)
@@ -103,103 +104,109 @@ typedef struct _XkbKeyType {
((g) & 0x0f))
#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
- /*
- * Structures and access macros used primarily by the server
- */
+ /*
+ * Structures and access macros used primarily by the server
+ */
typedef struct _XkbBehavior {
- unsigned char type;
- unsigned char data;
+ unsigned char type;
+ unsigned char data;
} XkbBehavior;
#define XkbAnyActionDataSize 7
-typedef struct _XkbAnyAction {
- unsigned char type;
- unsigned char data[XkbAnyActionDataSize];
+typedef struct _XkbAnyAction {
+ unsigned char type;
+ unsigned char data[XkbAnyActionDataSize];
} XkbAnyAction;
typedef struct _XkbModAction {
- unsigned char type;
- unsigned char flags;
- unsigned char mask;
- unsigned char real_mods;
- /* FIXME: Make this an int. */
- unsigned char vmods1;
- unsigned char vmods2;
+ unsigned char type;
+ unsigned char flags;
+ unsigned char mask;
+ unsigned char real_mods;
+ /* FIXME: Make this an int. */
+ unsigned char vmods1;
+ unsigned char vmods2;
} XkbModAction;
+
#define XkbModActionVMods(a) ((short) (((a)->vmods1 << 8) | (a)->vmods2))
#define XkbSetModActionVMods(a,v) \
((a)->vmods1 = (((v) >> 8) & 0xff), \
(a)->vmods2 = (v) & 0xff)
typedef struct _XkbGroupAction {
- unsigned char type;
- unsigned char flags;
- /* FIXME: Make this an int. */
- char group_XXX;
+ unsigned char type;
+ unsigned char flags;
+ /* FIXME: Make this an int. */
+ char group_XXX;
} XkbGroupAction;
+
#define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX))
#define XkbSASetGroup(a,g) ((a)->group_XXX=(g))
typedef struct _XkbISOAction {
- unsigned char type;
- unsigned char flags;
- unsigned char mask;
- unsigned char real_mods;
- /* FIXME: Make this an int. */
- char group_XXX;
- unsigned char affect;
- unsigned char vmods1;
- unsigned char vmods2;
+ unsigned char type;
+ unsigned char flags;
+ unsigned char mask;
+ unsigned char real_mods;
+ /* FIXME: Make this an int. */
+ char group_XXX;
+ unsigned char affect;
+ unsigned char vmods1;
+ unsigned char vmods2;
} XkbISOAction;
typedef struct _XkbPtrAction {
- unsigned char type;
- unsigned char flags;
- /* FIXME: Make this an int. */
- unsigned char high_XXX;
- unsigned char low_XXX;
- unsigned char high_YYY;
- unsigned char low_YYY;
+ unsigned char type;
+ unsigned char flags;
+ /* FIXME: Make this an int. */
+ unsigned char high_XXX;
+ unsigned char low_XXX;
+ unsigned char high_YYY;
+ unsigned char low_YYY;
} XkbPtrAction;
+
#define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX))
#define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY))
#define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX))
#define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY))
typedef struct _XkbPtrBtnAction {
- unsigned char type;
- unsigned char flags;
- unsigned char count;
- unsigned char button;
+ unsigned char type;
+ unsigned char flags;
+ unsigned char count;
+ unsigned char button;
} XkbPtrBtnAction;
typedef struct _XkbPtrDfltAction {
- unsigned char type;
- unsigned char flags;
- unsigned char affect;
- char valueXXX;
+ unsigned char type;
+ unsigned char flags;
+ unsigned char affect;
+ char valueXXX;
} XkbPtrDfltAction;
+
#define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX))
#define XkbSASetPtrDfltValue(a, c) ((a)->valueXXX = (c) & 0xff)
typedef struct _XkbSwitchScreenAction {
- unsigned char type;
- unsigned char flags;
- char screenXXX;
+ unsigned char type;
+ unsigned char flags;
+ char screenXXX;
} XkbSwitchScreenAction;
+
#define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX))
#define XkbSASetScreen(a, s) ((a)->screenXXX = (s) & 0xff)
typedef struct _XkbCtrlsAction {
- unsigned char type;
- unsigned char flags;
- /* FIXME: Make this an int. */
- unsigned char ctrls3;
- unsigned char ctrls2;
- unsigned char ctrls1;
- unsigned char ctrls0;
+ unsigned char type;
+ unsigned char flags;
+ /* FIXME: Make this an int. */
+ unsigned char ctrls3;
+ unsigned char ctrls2;
+ unsigned char ctrls1;
+ unsigned char ctrls0;
} XkbCtrlsAction;
+
#define XkbActionSetCtrls(a, c) ((a)->ctrls3 = ((c) >> 24) & 0xff, \
(a)->ctrls2 = ((c) >> 16) & 0xff, \
(a)->ctrls1 = ((c) >> 8) & 0xff, \
@@ -210,21 +217,21 @@ typedef struct _XkbCtrlsAction {
((unsigned int) (a)->ctrls0))
typedef struct _XkbMessageAction {
- unsigned char type;
- unsigned char flags;
- unsigned char message[6];
+ unsigned char type;
+ unsigned char flags;
+ unsigned char message[6];
} XkbMessageAction;
-typedef struct _XkbRedirectKeyAction {
- unsigned char type;
- unsigned char new_key;
- unsigned char mods_mask;
- unsigned char mods;
- /* FIXME: Make this an int. */
- unsigned char vmods_mask0;
- unsigned char vmods_mask1;
- unsigned char vmods0;
- unsigned char vmods1;
+typedef struct _XkbRedirectKeyAction {
+ unsigned char type;
+ unsigned char new_key;
+ unsigned char mods_mask;
+ unsigned char mods;
+ /* FIXME: Make this an int. */
+ unsigned char vmods_mask0;
+ unsigned char vmods_mask1;
+ unsigned char vmods0;
+ unsigned char vmods1;
} XkbRedirectKeyAction;
#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\
@@ -238,64 +245,64 @@ typedef struct _XkbRedirectKeyAction {
((a)->vmods_mask0=((m)&0xff)))
typedef struct _XkbDeviceBtnAction {
- unsigned char type;
- unsigned char flags;
- unsigned char count;
- unsigned char button;
- unsigned char device;
+ unsigned char type;
+ unsigned char flags;
+ unsigned char count;
+ unsigned char button;
+ unsigned char device;
} XkbDeviceBtnAction;
typedef struct _XkbDeviceValuatorAction {
- unsigned char type;
- unsigned char device;
- unsigned char v1_what;
- unsigned char v1_ndx;
- unsigned char v1_value;
- unsigned char v2_what;
- unsigned char v2_ndx;
- unsigned char v2_value;
+ unsigned char type;
+ unsigned char device;
+ unsigned char v1_what;
+ unsigned char v1_ndx;
+ unsigned char v1_value;
+ unsigned char v2_what;
+ unsigned char v2_ndx;
+ unsigned char v2_value;
} XkbDeviceValuatorAction;
-typedef union _XkbAction {
- XkbAnyAction any;
- XkbModAction mods;
- XkbGroupAction group;
- XkbISOAction iso;
- XkbPtrAction ptr;
- XkbPtrBtnAction btn;
- XkbPtrDfltAction dflt;
- XkbSwitchScreenAction screen;
- XkbCtrlsAction ctrls;
- XkbMessageAction msg;
- XkbRedirectKeyAction redirect;
- XkbDeviceBtnAction devbtn;
- XkbDeviceValuatorAction devval;
- unsigned char type;
+typedef union _XkbAction {
+ XkbAnyAction any;
+ XkbModAction mods;
+ XkbGroupAction group;
+ XkbISOAction iso;
+ XkbPtrAction ptr;
+ XkbPtrBtnAction btn;
+ XkbPtrDfltAction dflt;
+ XkbSwitchScreenAction screen;
+ XkbCtrlsAction ctrls;
+ XkbMessageAction msg;
+ XkbRedirectKeyAction redirect;
+ XkbDeviceBtnAction devbtn;
+ XkbDeviceValuatorAction devval;
+ unsigned char type;
} XkbAction;
-typedef struct _XkbControls {
- unsigned char mk_dflt_btn;
- unsigned char num_groups;
- unsigned char groups_wrap;
- XkbModsRec internal;
- XkbModsRec ignore_lock;
- unsigned int enabled_ctrls;
- unsigned short repeat_delay;
- unsigned short repeat_interval;
- unsigned short slow_keys_delay;
- unsigned short debounce_delay;
- unsigned short mk_delay;
- unsigned short mk_interval;
- unsigned short mk_time_to_max;
- unsigned short mk_max_speed;
- short mk_curve;
- unsigned short ax_options;
- unsigned short ax_timeout;
- unsigned short axt_opts_mask;
- unsigned short axt_opts_values;
- unsigned int axt_ctrls_mask;
- unsigned int axt_ctrls_values;
- unsigned char per_key_repeat[XkbPerKeyBitArraySize];
+typedef struct _XkbControls {
+ unsigned char mk_dflt_btn;
+ unsigned char num_groups;
+ unsigned char groups_wrap;
+ XkbModsRec internal;
+ XkbModsRec ignore_lock;
+ unsigned int enabled_ctrls;
+ unsigned short repeat_delay;
+ unsigned short repeat_interval;
+ unsigned short slow_keys_delay;
+ unsigned short debounce_delay;
+ unsigned short mk_delay;
+ unsigned short mk_interval;
+ unsigned short mk_time_to_max;
+ unsigned short mk_max_speed;
+ short mk_curve;
+ unsigned short ax_options;
+ unsigned short ax_timeout;
+ unsigned short axt_opts_mask;
+ unsigned short axt_opts_values;
+ unsigned int axt_ctrls_mask;
+ unsigned int axt_ctrls_values;
+ unsigned char per_key_repeat[XkbPerKeyBitArraySize];
} XkbControlsRec, *XkbControlsPtr;
#define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask)
@@ -304,46 +311,46 @@ typedef struct _XkbControls {
XkbAX_NeedOption((c), (w)))
typedef struct _XkbServerMapRec {
- unsigned short num_acts;
- unsigned short size_acts;
- XkbAction *acts;
+ unsigned short num_acts;
+ unsigned short size_acts;
+ XkbAction *acts;
- XkbBehavior *behaviors;
- unsigned short *key_acts;
+ XkbBehavior *behaviors;
+ unsigned short *key_acts;
#if defined(__cplusplus) || defined(c_plusplus)
- /* explicit is a C++ reserved word */
- unsigned char *c_explicit;
+ /* explicit is a C++ reserved word */
+ unsigned char *c_explicit;
#else
- unsigned char *explicit;
+ unsigned char *explicit;
#endif
- unsigned char vmods[XkbNumVirtualMods];
- unsigned short *vmodmap;
+ unsigned char vmods[XkbNumVirtualMods];
+ unsigned short *vmodmap;
} XkbServerMapRec, *XkbServerMapPtr;
#define XkbSMKeyActionsPtr(m, k) (&(m)->acts[(m)->key_acts[(k)]])
- /*
- * Structures and access macros used primarily by clients
- */
+ /*
+ * Structures and access macros used primarily by clients
+ */
-typedef struct _XkbSymMapRec {
- unsigned char kt_index[XkbNumKbdGroups];
- unsigned char group_info;
- unsigned char width;
- unsigned short offset;
+typedef struct _XkbSymMapRec {
+ unsigned char kt_index[XkbNumKbdGroups];
+ unsigned char group_info;
+ unsigned char width;
+ unsigned short offset;
} XkbSymMapRec, *XkbSymMapPtr;
typedef struct _XkbClientMapRec {
- unsigned char size_types;
- unsigned char num_types;
- XkbKeyTypePtr types;
+ unsigned char size_types;
+ unsigned char num_types;
+ XkbKeyTypePtr types;
- unsigned short size_syms;
- unsigned short num_syms;
- KeySym *syms;
- XkbSymMapPtr key_sym_map;
+ unsigned short size_syms;
+ unsigned short num_syms;
+ KeySym *syms;
+ XkbSymMapPtr key_sym_map;
- unsigned char *modmap;
+ unsigned char *modmap;
} XkbClientMapRec, *XkbClientMapPtr;
#define XkbCMKeyGroupInfo(m, k) ((m)->key_sym_map[(k)].group_info)
@@ -357,35 +364,35 @@ typedef struct _XkbClientMapRec {
#define XkbCMKeySymsOffset(m, k) ((m)->key_sym_map[(k)].offset)
#define XkbCMKeySymsPtr(m, k) (&(m)->syms[XkbCMKeySymsOffset((m), (k))])
- /*
- * Compatibility structures and access macros
- */
+ /*
+ * Compatibility structures and access macros
+ */
typedef struct _XkbSymInterpretRec {
- KeySym sym;
- unsigned char flags;
- unsigned char match;
- unsigned char mods;
- unsigned char virtual_mod;
- XkbAnyAction act;
-} XkbSymInterpretRec,*XkbSymInterpretPtr;
+ KeySym sym;
+ unsigned char flags;
+ unsigned char match;
+ unsigned char mods;
+ unsigned char virtual_mod;
+ XkbAnyAction act;
+} XkbSymInterpretRec, *XkbSymInterpretPtr;
typedef struct _XkbCompatMapRec {
- XkbSymInterpretPtr sym_interpret;
- XkbModsRec groups[XkbNumKbdGroups];
- unsigned short num_si;
- unsigned short size_si;
+ XkbSymInterpretPtr sym_interpret;
+ XkbModsRec groups[XkbNumKbdGroups];
+ unsigned short num_si;
+ unsigned short size_si;
} XkbCompatMapRec, *XkbCompatMapPtr;
typedef struct _XkbIndicatorMapRec {
- unsigned char flags;
- /* FIXME: For some reason, interepretation of groups is wildly
- * different between which being base/latched/locked. */
- unsigned char which_groups;
- unsigned char groups;
- unsigned char which_mods;
- XkbModsRec mods;
- unsigned int ctrls;
+ unsigned char flags;
+ /* FIXME: For some reason, interepretation of groups is wildly
+ * different between which being base/latched/locked. */
+ unsigned char which_groups;
+ unsigned char groups;
+ unsigned char which_mods;
+ XkbModsRec mods;
+ unsigned int ctrls;
} XkbIndicatorMapRec, *XkbIndicatorMapPtr;
#define XkbIM_IsAuto(i) (!((i)->flags & XkbIM_NoAutomatic) && \
@@ -394,63 +401,64 @@ typedef struct _XkbIndicatorMapRec {
(i)->ctrls))
#define XkbIM_InUse(i) ((i)->flags || (i)->which_groups || (i)->which_mods || \
(i)->ctrls)
-
typedef struct _XkbIndicatorRec {
- unsigned long phys_indicators;
- XkbIndicatorMapRec maps[XkbNumIndicators];
-} XkbIndicatorRec,*XkbIndicatorPtr;
+ unsigned long phys_indicators;
+ XkbIndicatorMapRec maps[XkbNumIndicators];
+} XkbIndicatorRec, *XkbIndicatorPtr;
-typedef struct _XkbKeyNameRec {
- char name[XkbKeyNameLength];
-} XkbKeyNameRec,*XkbKeyNamePtr;
+typedef struct _XkbKeyNameRec {
+ char name[XkbKeyNameLength];
+} XkbKeyNameRec, *XkbKeyNamePtr;
typedef struct _XkbKeyAliasRec {
- char real[XkbKeyNameLength];
- char alias[XkbKeyNameLength];
-} XkbKeyAliasRec,*XkbKeyAliasPtr;
+ char real[XkbKeyNameLength];
+ char alias[XkbKeyNameLength];
+} XkbKeyAliasRec, *XkbKeyAliasPtr;
- /*
- * Names for everything
- */
+ /*
+ * Names for everything
+ */
typedef struct _XkbNamesRec {
- Atom keycodes;
- Atom geometry;
- Atom symbols;
- Atom types;
- Atom compat;
- Atom vmods[XkbNumVirtualMods];
- Atom indicators[XkbNumIndicators];
- Atom groups[XkbNumKbdGroups];
- XkbKeyNamePtr keys;
- XkbKeyAliasPtr key_aliases;
- Atom *radio_groups;
- Atom phys_symbols;
-
- unsigned char num_keys;
- unsigned char num_key_aliases;
- unsigned short num_rg;
-} XkbNamesRec,*XkbNamesPtr;
-
-typedef struct _XkbGeometry *XkbGeometryPtr;
- /*
- * Tie it all together into one big keyboard description
- */
-typedef struct _XkbDesc {
- unsigned int defined;
- unsigned short flags;
- unsigned short device_spec;
- KeyCode min_key_code;
- KeyCode max_key_code;
-
- XkbControlsPtr ctrls;
- XkbServerMapPtr server;
- XkbClientMapPtr map;
- XkbIndicatorPtr indicators;
- XkbNamesPtr names;
- XkbCompatMapPtr compat;
- XkbGeometryPtr geom;
+ Atom keycodes;
+ Atom geometry;
+ Atom symbols;
+ Atom types;
+ Atom compat;
+ Atom vmods[XkbNumVirtualMods];
+ Atom indicators[XkbNumIndicators];
+ Atom groups[XkbNumKbdGroups];
+ XkbKeyNamePtr keys;
+ XkbKeyAliasPtr key_aliases;
+ Atom *radio_groups;
+ Atom phys_symbols;
+
+ unsigned char num_keys;
+ unsigned char num_key_aliases;
+ unsigned short num_rg;
+} XkbNamesRec, *XkbNamesPtr;
+
+typedef struct _XkbGeometry *XkbGeometryPtr;
+
+ /*
+ * Tie it all together into one big keyboard description
+ */
+typedef struct _XkbDesc {
+ unsigned int defined;
+ unsigned short flags;
+ unsigned short device_spec;
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+
+ XkbControlsPtr ctrls;
+ XkbServerMapPtr server;
+ XkbClientMapPtr map;
+ XkbIndicatorPtr indicators;
+ XkbNamesPtr names;
+ XkbCompatMapPtr compat;
+ XkbGeometryPtr geom;
} XkbDescRec, *XkbDescPtr;
+
#define XkbKeyKeyTypeIndex(d, k, g) (XkbCMKeyTypeIndex((d)->map, (k), (g)))
#define XkbKeyKeyType(d, k, g) (XkbCMKeyType((d)->map, (k), (g)))
#define XkbKeyGroupWidth(d, k, g) (XkbCMKeyGroupWidth((d)->map, (k), (g)))
@@ -477,157 +485,156 @@ typedef struct _XkbDesc {
(k) <= (d)->max_key_code)
#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1)
-
- /*
- * The following structures can be used to track changes
- * to a keyboard device
- */
+ /*
+ * The following structures can be used to track changes
+ * to a keyboard device
+ */
typedef struct _XkbMapChanges {
- unsigned short changed;
- KeyCode min_key_code;
- KeyCode max_key_code;
- unsigned char first_type;
- unsigned char num_types;
- KeyCode first_key_sym;
- unsigned char num_key_syms;
- KeyCode first_key_act;
- unsigned char num_key_acts;
- KeyCode first_key_behavior;
- unsigned char num_key_behaviors;
- KeyCode first_key_explicit;
- unsigned char num_key_explicit;
- KeyCode first_modmap_key;
- unsigned char num_modmap_keys;
- KeyCode first_vmodmap_key;
- unsigned char num_vmodmap_keys;
- unsigned char pad;
- unsigned short vmods;
-} XkbMapChangesRec,*XkbMapChangesPtr;
+ unsigned short changed;
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+ unsigned char first_type;
+ unsigned char num_types;
+ KeyCode first_key_sym;
+ unsigned char num_key_syms;
+ KeyCode first_key_act;
+ unsigned char num_key_acts;
+ KeyCode first_key_behavior;
+ unsigned char num_key_behaviors;
+ KeyCode first_key_explicit;
+ unsigned char num_key_explicit;
+ KeyCode first_modmap_key;
+ unsigned char num_modmap_keys;
+ KeyCode first_vmodmap_key;
+ unsigned char num_vmodmap_keys;
+ unsigned char pad;
+ unsigned short vmods;
+} XkbMapChangesRec, *XkbMapChangesPtr;
typedef struct _XkbControlsChanges {
- unsigned int changed_ctrls;
- unsigned int enabled_ctrls_changes;
- Bool num_groups_changed;
-} XkbControlsChangesRec,*XkbControlsChangesPtr;
+ unsigned int changed_ctrls;
+ unsigned int enabled_ctrls_changes;
+ Bool num_groups_changed;
+} XkbControlsChangesRec, *XkbControlsChangesPtr;
typedef struct _XkbIndicatorChanges {
- unsigned int state_changes;
- unsigned int map_changes;
-} XkbIndicatorChangesRec,*XkbIndicatorChangesPtr;
+ unsigned int state_changes;
+ unsigned int map_changes;
+} XkbIndicatorChangesRec, *XkbIndicatorChangesPtr;
typedef struct _XkbNameChanges {
- unsigned int changed;
- unsigned char first_type;
- unsigned char num_types;
- unsigned char first_lvl;
- unsigned char num_lvls;
- unsigned char num_aliases;
- unsigned char num_rg;
- unsigned char first_key;
- unsigned char num_keys;
- unsigned short changed_vmods;
- unsigned long changed_indicators;
- unsigned char changed_groups;
-} XkbNameChangesRec,*XkbNameChangesPtr;
+ unsigned int changed;
+ unsigned char first_type;
+ unsigned char num_types;
+ unsigned char first_lvl;
+ unsigned char num_lvls;
+ unsigned char num_aliases;
+ unsigned char num_rg;
+ unsigned char first_key;
+ unsigned char num_keys;
+ unsigned short changed_vmods;
+ unsigned long changed_indicators;
+ unsigned char changed_groups;
+} XkbNameChangesRec, *XkbNameChangesPtr;
typedef struct _XkbCompatChanges {
- unsigned char changed_groups;
- unsigned short first_si;
- unsigned short num_si;
-} XkbCompatChangesRec,*XkbCompatChangesPtr;
+ unsigned char changed_groups;
+ unsigned short first_si;
+ unsigned short num_si;
+} XkbCompatChangesRec, *XkbCompatChangesPtr;
typedef struct _XkbChanges {
- unsigned short device_spec;
- unsigned short state_changes;
- XkbMapChangesRec map;
- XkbControlsChangesRec ctrls;
- XkbIndicatorChangesRec indicators;
- XkbNameChangesRec names;
- XkbCompatChangesRec compat;
+ unsigned short device_spec;
+ unsigned short state_changes;
+ XkbMapChangesRec map;
+ XkbControlsChangesRec ctrls;
+ XkbIndicatorChangesRec indicators;
+ XkbNameChangesRec names;
+ XkbCompatChangesRec compat;
} XkbChangesRec, *XkbChangesPtr;
- /*
- * These data structures are used to construct a keymap from
- * a set of components or to list components in the server
- * database.
- */
+ /*
+ * These data structures are used to construct a keymap from
+ * a set of components or to list components in the server
+ * database.
+ */
typedef struct _XkbComponentNames {
- char * keycodes;
- char * types;
- char * compat;
- char * symbols;
- char * geometry;
+ char *keycodes;
+ char *types;
+ char *compat;
+ char *symbols;
+ char *geometry;
} XkbComponentNamesRec, *XkbComponentNamesPtr;
typedef struct _XkbComponentName {
- unsigned short flags;
- char * name;
-} XkbComponentNameRec,*XkbComponentNamePtr;
+ unsigned short flags;
+ char *name;
+} XkbComponentNameRec, *XkbComponentNamePtr;
typedef struct _XkbComponentList {
- int num_keymaps;
- int num_keycodes;
- int num_types;
- int num_compat;
- int num_symbols;
- int num_geometry;
- XkbComponentNamePtr keymaps;
- XkbComponentNamePtr keycodes;
- XkbComponentNamePtr types;
- XkbComponentNamePtr compat;
- XkbComponentNamePtr symbols;
- XkbComponentNamePtr geometry;
+ int num_keymaps;
+ int num_keycodes;
+ int num_types;
+ int num_compat;
+ int num_symbols;
+ int num_geometry;
+ XkbComponentNamePtr keymaps;
+ XkbComponentNamePtr keycodes;
+ XkbComponentNamePtr types;
+ XkbComponentNamePtr compat;
+ XkbComponentNamePtr symbols;
+ XkbComponentNamePtr geometry;
} 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;
- unsigned short led_id;
- unsigned int phys_indicators;
- unsigned int maps_present;
- unsigned int names_present;
- unsigned int state;
- Atom names[XkbNumIndicators];
- XkbIndicatorMapRec maps[XkbNumIndicators];
-} XkbDeviceLedInfoRec,*XkbDeviceLedInfoPtr;
+ unsigned short led_class;
+ unsigned short led_id;
+ unsigned int phys_indicators;
+ unsigned int maps_present;
+ unsigned int names_present;
+ unsigned int state;
+ Atom names[XkbNumIndicators];
+ XkbIndicatorMapRec maps[XkbNumIndicators];
+} XkbDeviceLedInfoRec, *XkbDeviceLedInfoPtr;
typedef struct _XkbDeviceInfo {
- char * name;
- Atom type;
- unsigned short device_spec;
- Bool has_own_state;
- unsigned short supported;
- unsigned short unsupported;
-
- unsigned short num_btns;
- XkbAction * btn_acts;
-
- unsigned short sz_leds;
- unsigned short num_leds;
- unsigned short dflt_kbd_fb;
- unsigned short dflt_led_fb;
- XkbDeviceLedInfoPtr leds;
-} XkbDeviceInfoRec,*XkbDeviceInfoPtr;
+ char *name;
+ Atom type;
+ unsigned short device_spec;
+ Bool has_own_state;
+ unsigned short supported;
+ unsigned short unsupported;
+
+ unsigned short num_btns;
+ XkbAction *btn_acts;
+
+ unsigned short sz_leds;
+ unsigned short num_leds;
+ unsigned short dflt_kbd_fb;
+ unsigned short dflt_led_fb;
+ XkbDeviceLedInfoPtr leds;
+} XkbDeviceInfoRec, *XkbDeviceInfoPtr;
#define XkbXI_DevHasBtnActs(d) ((d)->num_btns > 0 && (d)->btn_acts)
#define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d) && (b) < (d)->num_btns)
#define XkbXI_DevHasLeds(d) ((d)->num_leds > 0 && (d)->leds)
typedef struct _XkbDeviceLedChanges {
- unsigned short led_class;
- unsigned short led_id;
- unsigned int defined; /* names or maps changed */
- struct _XkbDeviceLedChanges *next;
-} XkbDeviceLedChangesRec,*XkbDeviceLedChangesPtr;
+ unsigned short led_class;
+ unsigned short led_id;
+ unsigned int defined; /* names or maps changed */
+ struct _XkbDeviceLedChanges *next;
+} XkbDeviceLedChangesRec, *XkbDeviceLedChangesPtr;
typedef struct _XkbDeviceChanges {
- unsigned int changed;
- unsigned short first_btn;
- unsigned short num_btns;
- XkbDeviceLedChangesRec leds;
-} XkbDeviceChangesRec,*XkbDeviceChangesPtr;
+ unsigned int changed;
+ unsigned short first_btn;
+ unsigned short num_btns;
+ XkbDeviceLedChangesRec leds;
+} XkbDeviceChangesRec, *XkbDeviceChangesPtr;
-#endif /* _XKBSTR_H_ */
+#endif /* _XKBSTR_H_ */
diff --git a/xorg-server/include/xserver-properties.h b/xorg-server/include/xserver-properties.h
index 18b54ba32..85f2ce5c4 100644
--- a/xorg-server/include/xserver-properties.h
+++ b/xorg-server/include/xserver-properties.h
@@ -20,7 +20,6 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-
/* Properties managed by the server. */
#ifndef _XSERVER_PROPERTIES_H_
@@ -63,7 +62,6 @@
/* FLOAT, format 32 */
#define ACCEL_PROP_VELOCITY_SCALING "Device Accel Velocity Scaling"
-
/* Axis labels */
#define AXIS_LABEL_PROP "Axis Labels"
diff --git a/xorg-server/mi/mibstore.c b/xorg-server/mi/mibstore.c
index b791b9dc6..6cadb2b8f 100644
--- a/xorg-server/mi/mibstore.c
+++ b/xorg-server/mi/mibstore.c
@@ -1,43 +1,43 @@
-/*
- * Copyright 2007 Red Hat, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (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.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-#include "scrnintstr.h"
-#include "mibstore.h"
-
-/*
- * There is no longer an mi implementation of backing store. This function
- * is only for source compatibility with old drivers.
- *
- * Note though that you do get backing store for free if your server has
- * Composite enabled, since the automatic redirection mechanism provides
- * essentially the same functionality. See compChangeWindowAttributes()
- * for the implementation.
- */
-
-void
-miInitializeBackingStore (ScreenPtr pScreen)
-{
-}
+/*
+ * Copyright 2007 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (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.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+#include "scrnintstr.h"
+#include "mibstore.h"
+
+/*
+ * There is no longer an mi implementation of backing store. This function
+ * is only for source compatibility with old drivers.
+ *
+ * Note though that you do get backing store for free if your server has
+ * Composite enabled, since the automatic redirection mechanism provides
+ * essentially the same functionality. See compChangeWindowAttributes()
+ * for the implementation.
+ */
+
+void
+miInitializeBackingStore(ScreenPtr pScreen)
+{
+}
diff --git a/xorg-server/mi/mibstore.h b/xorg-server/mi/mibstore.h
index f40f28819..f8ed4446d 100644
--- a/xorg-server/mi/mibstore.h
+++ b/xorg-server/mi/mibstore.h
@@ -1,23 +1,23 @@
-/*-
- * mibstore.h --
- * Header file for users of the MI backing-store scheme.
- *
- * Copyright (c) 1987 by the Regents of the University of California
- *
- * Permission to use, copy, modify, and distribute this
- * software and its documentation for any purpose and without
- * fee is hereby granted, provided that the above copyright
- * notice appear in all copies. The University of California
- * makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without
- * express or implied warranty.
- */
-
-#ifndef _MIBSTORE_H
-#define _MIBSTORE_H
-
-#include "screenint.h"
-
-#define miInitializeBackingStore(x) do {} while (0)
-
-#endif /* _MIBSTORE_H */
+/*-
+ * mibstore.h --
+ * Header file for users of the MI backing-store scheme.
+ *
+ * Copyright (c) 1987 by the Regents of the University of California
+ *
+ * Permission to use, copy, modify, and distribute this
+ * software and its documentation for any purpose and without
+ * fee is hereby granted, provided that the above copyright
+ * notice appear in all copies. The University of California
+ * makes no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without
+ * express or implied warranty.
+ */
+
+#ifndef _MIBSTORE_H
+#define _MIBSTORE_H
+
+#include "screenint.h"
+
+#define miInitializeBackingStore(x) do {} while (0)
+
+#endif /* _MIBSTORE_H */
diff --git a/xorg-server/mi/micoord.h b/xorg-server/mi/micoord.h
index e6d814fc8..481e418c5 100644
--- a/xorg-server/mi/micoord.h
+++ b/xorg-server/mi/micoord.h
@@ -66,4 +66,4 @@
#define intToY(i) (GetHighWord(i))
#endif
-#endif /* _MICOORD_H_ */
+#endif /* _MICOORD_H_ */
diff --git a/xorg-server/mi/micursor.c b/xorg-server/mi/micursor.c
index f6ae8f488..13ce776db 100644
--- a/xorg-server/mi/micursor.c
+++ b/xorg-server/mi/micursor.c
@@ -22,7 +22,6 @@ Except as contained in this notice, the name of The Open Group shall not be
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
@@ -65,5 +64,5 @@ miRecolorCursor(DeviceIntPtr pDev, ScreenPtr pScr,
pScr->UnrealizeCursor(pDev, pScr, pCurs);
pScr->RealizeCursor(pDev, pScr, pCurs);
if (displayed)
- pScr->DisplayCursor(pDev, pScr, pCurs);
+ pScr->DisplayCursor(pDev, pScr, pCurs);
}
diff --git a/xorg-server/mi/mipointrst.h b/xorg-server/mi/mipointrst.h
index c912a17da..104e45cfa 100644
--- a/xorg-server/mi/mipointrst.h
+++ b/xorg-server/mi/mipointrst.h
@@ -3,7 +3,6 @@
*
*/
-
/*
Copyright 1989, 1998 The Open Group
@@ -36,22 +35,22 @@ in this Software without prior written authorization from The Open Group.
#include "scrnintstr.h"
typedef struct {
- ScreenPtr pScreen; /* current screen */
- ScreenPtr pSpriteScreen;/* screen containing current sprite */
- CursorPtr pCursor; /* current cursor */
- CursorPtr pSpriteCursor;/* cursor on screen */
- BoxRec limits; /* current constraints */
- Bool confined; /* pointer can't change screens */
- int x, y; /* hot spot location */
- int devx, devy; /* sprite position */
- Bool generateEvent; /* generate an event during warping? */
+ ScreenPtr pScreen; /* current screen */
+ ScreenPtr pSpriteScreen; /* screen containing current sprite */
+ CursorPtr pCursor; /* current cursor */
+ CursorPtr pSpriteCursor; /* cursor on screen */
+ BoxRec limits; /* current constraints */
+ Bool confined; /* pointer can't change screens */
+ int x, y; /* hot spot location */
+ int devx, devy; /* sprite position */
+ Bool generateEvent; /* generate an event during warping? */
} miPointerRec, *miPointerPtr;
typedef struct {
- miPointerSpriteFuncPtr spriteFuncs; /* sprite-specific methods */
- miPointerScreenFuncPtr screenFuncs; /* screen-specific methods */
- CloseScreenProcPtr CloseScreen;
- Bool waitForUpdate; /* don't move cursor in SIGIO */
- Bool showTransparent; /* show empty cursors */
+ miPointerSpriteFuncPtr spriteFuncs; /* sprite-specific methods */
+ miPointerScreenFuncPtr screenFuncs; /* screen-specific methods */
+ CloseScreenProcPtr CloseScreen;
+ Bool waitForUpdate; /* don't move cursor in SIGIO */
+ Bool showTransparent; /* show empty cursors */
} miPointerScreenRec, *miPointerScreenPtr;
-#endif /* MIPOINTRST_H */
+#endif /* MIPOINTRST_H */
diff --git a/xorg-server/mi/miscanfill.h b/xorg-server/mi/miscanfill.h
index e318c45b4..7fba199de 100644
--- a/xorg-server/mi/miscanfill.h
+++ b/xorg-server/mi/miscanfill.h
@@ -26,7 +26,6 @@ from The Open Group.
*/
-
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
@@ -52,7 +51,6 @@ from The Open Group.
* See the author for a derivation if needed.
*/
-
/*
* In scan converting polygons, we want to choose those pixels
* which are inside the polygon. Thus, we add .5 to the starting
@@ -119,7 +117,6 @@ from The Open Group.
} \
} \
}
-
/*
* This structure contains all of the information needed
@@ -129,13 +126,12 @@ from The Open Group.
* register declarations.
*/
typedef struct {
- int minor; /* minor axis */
- int d; /* decision variable */
- int m, m1; /* slope and slope+1 */
- int incr1, incr2; /* error increments */
+ int minor; /* minor axis */
+ int d; /* decision variable */
+ int m, m1; /* slope and slope+1 */
+ int incr1, incr2; /* error increments */
} BRESINFO;
-
#define BRESINITPGONSTRUCT(dmaj, min1, min2, bres) \
BRESINITPGON(dmaj, min1, min2, bres.minor, bres.d, \
bres.m, bres.m1, bres.incr1, bres.incr2)
@@ -143,5 +139,4 @@ typedef struct {
#define BRESINCRPGONSTRUCT(bres) \
BRESINCRPGON(bres.d, bres.minor, bres.m, bres.m1, bres.incr1, bres.incr2)
-
#endif
diff --git a/xorg-server/mi/mistruct.h b/xorg-server/mi/mistruct.h
index e9cfed5a4..17f7d8329 100644
--- a/xorg-server/mi/mistruct.h
+++ b/xorg-server/mi/mistruct.h
@@ -22,7 +22,6 @@ Except as contained in this notice, the name of The Open Group shall not be
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
@@ -53,11 +52,11 @@ SOFTWARE.
/* information about dashes */
typedef struct _miDash {
- DDXPointRec pt;
- int e1, e2; /* keep these, so we don't have to do it again */
- int e; /* bresenham error term for this point on line */
- int which;
- int newLine;/* 0 if part of same original line as previous dash */
- } miDashRec;
-
-#endif /* MISTRUCT_H */
+ DDXPointRec pt;
+ int e1, e2; /* keep these, so we don't have to do it again */
+ int e; /* bresenham error term for this point on line */
+ int which;
+ int newLine; /* 0 if part of same original line as previous dash */
+} miDashRec;
+
+#endif /* MISTRUCT_H */
diff --git a/xorg-server/mi/mivalidate.h b/xorg-server/mi/mivalidate.h
index 3d4dddaca..4c64ab34e 100644
--- a/xorg-server/mi/mivalidate.h
+++ b/xorg-server/mi/mivalidate.h
@@ -1,51 +1,51 @@
-/*
-
-Copyright 1993, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef MIVALIDATE_H
-#define MIVALIDATE_H
-
-#include "regionstr.h"
-
-typedef union _Validate {
- struct BeforeValidate {
- DDXPointRec oldAbsCorner; /* old window position */
- RegionPtr borderVisible; /* visible region of border, */
- /* non-null when size changes */
- Bool resized; /* unclipped winSize has changed */
- } before;
- struct AfterValidate {
- RegionRec exposed; /* exposed regions, absolute pos */
- RegionRec borderExposed;
- } after;
-} ValidateRec;
-
-#endif /* MIVALIDATE_H */
+/*
+
+Copyright 1993, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef MIVALIDATE_H
+#define MIVALIDATE_H
+
+#include "regionstr.h"
+
+typedef union _Validate {
+ struct BeforeValidate {
+ DDXPointRec oldAbsCorner; /* old window position */
+ RegionPtr borderVisible; /* visible region of border, */
+ /* non-null when size changes */
+ Bool resized; /* unclipped winSize has changed */
+ } before;
+ struct AfterValidate {
+ RegionRec exposed; /* exposed regions, absolute pos */
+ RegionRec borderExposed;
+ } after;
+} ValidateRec;
+
+#endif /* MIVALIDATE_H */
diff --git a/xorg-server/miext/cw/cw.h b/xorg-server/miext/cw/cw.h
index 10d088ad2..9f880f7f5 100644
--- a/xorg-server/miext/cw/cw.h
+++ b/xorg-server/miext/cw/cw.h
@@ -1,169 +1,173 @@
-/*
- * Copyright © 2004 Eric Anholt
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Eric Anholt not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Eric Anholt makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "gcstruct.h"
-#include "picturestr.h"
-#include "privates.h"
-
-/*
- * One of these structures is allocated per GC that gets used with a window with
- * backing pixmap.
- */
-
-typedef struct {
- GCPtr pBackingGC; /* Copy of the GC but with graphicsExposures
- * set FALSE and the clientClip set to
- * clip output to the valid regions of the
- * backing pixmap. */
- unsigned long serialNumber; /* clientClip computed time */
- unsigned long stateChanges; /* changes in parent gc since last copy */
- GCOps *wrapOps; /* wrapped ops */
- GCFuncs *wrapFuncs; /* wrapped funcs */
-} cwGCRec, *cwGCPtr;
-
-extern _X_EXPORT DevPrivateKeyRec cwGCKeyRec;
-#define cwGCKey (&cwGCKeyRec)
-
-#define getCwGC(pGC) ((cwGCPtr)dixLookupPrivate(&(pGC)->devPrivates, cwGCKey))
-#define setCwGC(pGC,p) dixSetPrivate(&(pGC)->devPrivates, cwGCKey, p)
-
-/*
- * One of these structures is allocated per Picture that gets used with a
- * window with a backing pixmap
- */
-
-typedef struct {
- PicturePtr pBackingPicture;
- unsigned long serialNumber;
- unsigned long stateChanges;
-} cwPictureRec, *cwPicturePtr;
-
-extern _X_EXPORT DevPrivateKeyRec cwPictureKeyRec;
-#define cwPictureKey (&cwPictureKeyRec)
-
-#define getCwPicture(pPicture) (pPicture->pDrawable ? \
- (cwPicturePtr)dixLookupPrivate(&(pPicture)->devPrivates, cwPictureKey) : 0)
-#define setCwPicture(pPicture,p) dixSetPrivate(&(pPicture)->devPrivates, cwPictureKey, p)
-
-extern _X_EXPORT DevPrivateKeyRec cwWindowKeyRec;
-#define cwWindowKey (&cwWindowKeyRec)
-
-#define cwWindowPrivate(pWin) dixLookupPrivate(&(pWin)->devPrivates, cwWindowKey)
-#define getCwPixmap(pWindow) ((PixmapPtr) cwWindowPrivate(pWindow))
-#define setCwPixmap(pWindow,pPixmap) \
- dixSetPrivate(&(pWindow)->devPrivates, cwWindowKey, pPixmap)
-
-#define cwDrawableIsRedirWindow(pDraw) \
- ((pDraw)->type == DRAWABLE_WINDOW && \
- getCwPixmap((WindowPtr) (pDraw)) != NULL)
-
-typedef struct {
- /*
- * screen func wrappers
- */
- CloseScreenProcPtr CloseScreen;
- GetImageProcPtr GetImage;
- GetSpansProcPtr GetSpans;
- CreateGCProcPtr CreateGC;
-
- CopyWindowProcPtr CopyWindow;
-
- GetWindowPixmapProcPtr GetWindowPixmap;
- SetWindowPixmapProcPtr SetWindowPixmap;
-
- DestroyPictureProcPtr DestroyPicture;
- ChangePictureClipProcPtr ChangePictureClip;
- DestroyPictureClipProcPtr DestroyPictureClip;
-
- ChangePictureProcPtr ChangePicture;
- ValidatePictureProcPtr ValidatePicture;
-
- CompositeProcPtr Composite;
- CompositeRectsProcPtr CompositeRects;
-
- TrapezoidsProcPtr Trapezoids;
- TrianglesProcPtr Triangles;
-
- RasterizeTrapezoidProcPtr RasterizeTrapezoid;
-} cwScreenRec, *cwScreenPtr;
-
-extern _X_EXPORT DevPrivateKeyRec cwScreenKeyRec;
-#define cwScreenKey (&cwScreenKeyRec)
-
-#define getCwScreen(pScreen) ((cwScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, cwScreenKey))
-#define setCwScreen(pScreen,p) dixSetPrivate(&(pScreen)->devPrivates, cwScreenKey, p)
-
-#define CW_OFFSET_XYPOINTS(ppt, npt) do { \
- DDXPointPtr _ppt = (DDXPointPtr)(ppt); \
- int _i; \
- for (_i = 0; _i < npt; _i++) { \
- _ppt[_i].x += dst_off_x; \
- _ppt[_i].y += dst_off_y; \
- } \
-} while (0)
-
-#define CW_OFFSET_RECTS(prect, nrect) do { \
- int _i; \
- for (_i = 0; _i < nrect; _i++) { \
- (prect)[_i].x += dst_off_x; \
- (prect)[_i].y += dst_off_y; \
- } \
-} while (0)
-
-#define CW_OFFSET_ARCS(parc, narc) do { \
- int _i; \
- for (_i = 0; _i < narc; _i++) { \
- (parc)[_i].x += dst_off_x; \
- (parc)[_i].y += dst_off_y; \
- } \
-} while (0)
-
-#define CW_OFFSET_XY_DST(x, y) do { \
- (x) = (x) + dst_off_x; \
- (y) = (y) + dst_off_y; \
-} while (0)
-
-#define CW_OFFSET_XY_SRC(x, y) do { \
- (x) = (x) + src_off_x; \
- (y) = (y) + src_off_y; \
-} while (0)
-
-/* cw.c */
-extern _X_EXPORT DrawablePtr
-cwGetBackingDrawable(DrawablePtr pDrawable, int *x_off, int *y_off);
-
-/* cw_render.c */
-
-extern _X_EXPORT void
-cwInitializeRender (ScreenPtr pScreen);
-
-extern _X_EXPORT void
-cwFiniRender (ScreenPtr pScreen);
-
-/* cw.c */
-
-extern _X_EXPORT void
-miInitializeCompositeWrapper(ScreenPtr pScreen);
+/*
+ * Copyright © 2004 Eric Anholt
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Eric Anholt not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Eric Anholt makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "gcstruct.h"
+#include "picturestr.h"
+#include "privates.h"
+
+/*
+ * One of these structures is allocated per GC that gets used with a window with
+ * backing pixmap.
+ */
+
+typedef struct {
+ GCPtr pBackingGC; /* Copy of the GC but with graphicsExposures
+ * set FALSE and the clientClip set to
+ * clip output to the valid regions of the
+ * backing pixmap. */
+ unsigned long serialNumber; /* clientClip computed time */
+ unsigned long stateChanges; /* changes in parent gc since last copy */
+ GCOps *wrapOps; /* wrapped ops */
+ GCFuncs *wrapFuncs; /* wrapped funcs */
+} cwGCRec, *cwGCPtr;
+
+extern _X_EXPORT DevPrivateKeyRec cwGCKeyRec;
+
+#define cwGCKey (&cwGCKeyRec)
+
+#define getCwGC(pGC) ((cwGCPtr)dixLookupPrivate(&(pGC)->devPrivates, cwGCKey))
+#define setCwGC(pGC,p) dixSetPrivate(&(pGC)->devPrivates, cwGCKey, p)
+
+/*
+ * One of these structures is allocated per Picture that gets used with a
+ * window with a backing pixmap
+ */
+
+typedef struct {
+ PicturePtr pBackingPicture;
+ unsigned long serialNumber;
+ unsigned long stateChanges;
+} cwPictureRec, *cwPicturePtr;
+
+extern _X_EXPORT DevPrivateKeyRec cwPictureKeyRec;
+
+#define cwPictureKey (&cwPictureKeyRec)
+
+#define getCwPicture(pPicture) (pPicture->pDrawable ? \
+ (cwPicturePtr)dixLookupPrivate(&(pPicture)->devPrivates, cwPictureKey) : 0)
+#define setCwPicture(pPicture,p) dixSetPrivate(&(pPicture)->devPrivates, cwPictureKey, p)
+
+extern _X_EXPORT DevPrivateKeyRec cwWindowKeyRec;
+
+#define cwWindowKey (&cwWindowKeyRec)
+
+#define cwWindowPrivate(pWin) dixLookupPrivate(&(pWin)->devPrivates, cwWindowKey)
+#define getCwPixmap(pWindow) ((PixmapPtr) cwWindowPrivate(pWindow))
+#define setCwPixmap(pWindow,pPixmap) \
+ dixSetPrivate(&(pWindow)->devPrivates, cwWindowKey, pPixmap)
+
+#define cwDrawableIsRedirWindow(pDraw) \
+ ((pDraw)->type == DRAWABLE_WINDOW && \
+ getCwPixmap((WindowPtr) (pDraw)) != NULL)
+
+typedef struct {
+ /*
+ * screen func wrappers
+ */
+ CloseScreenProcPtr CloseScreen;
+ GetImageProcPtr GetImage;
+ GetSpansProcPtr GetSpans;
+ CreateGCProcPtr CreateGC;
+
+ CopyWindowProcPtr CopyWindow;
+
+ GetWindowPixmapProcPtr GetWindowPixmap;
+ SetWindowPixmapProcPtr SetWindowPixmap;
+
+ DestroyPictureProcPtr DestroyPicture;
+ ChangePictureClipProcPtr ChangePictureClip;
+ DestroyPictureClipProcPtr DestroyPictureClip;
+
+ ChangePictureProcPtr ChangePicture;
+ ValidatePictureProcPtr ValidatePicture;
+
+ CompositeProcPtr Composite;
+ CompositeRectsProcPtr CompositeRects;
+
+ TrapezoidsProcPtr Trapezoids;
+ TrianglesProcPtr Triangles;
+
+ RasterizeTrapezoidProcPtr RasterizeTrapezoid;
+} cwScreenRec, *cwScreenPtr;
+
+extern _X_EXPORT DevPrivateKeyRec cwScreenKeyRec;
+
+#define cwScreenKey (&cwScreenKeyRec)
+
+#define getCwScreen(pScreen) ((cwScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, cwScreenKey))
+#define setCwScreen(pScreen,p) dixSetPrivate(&(pScreen)->devPrivates, cwScreenKey, p)
+
+#define CW_OFFSET_XYPOINTS(ppt, npt) do { \
+ DDXPointPtr _ppt = (DDXPointPtr)(ppt); \
+ int _i; \
+ for (_i = 0; _i < npt; _i++) { \
+ _ppt[_i].x += dst_off_x; \
+ _ppt[_i].y += dst_off_y; \
+ } \
+} while (0)
+
+#define CW_OFFSET_RECTS(prect, nrect) do { \
+ int _i; \
+ for (_i = 0; _i < nrect; _i++) { \
+ (prect)[_i].x += dst_off_x; \
+ (prect)[_i].y += dst_off_y; \
+ } \
+} while (0)
+
+#define CW_OFFSET_ARCS(parc, narc) do { \
+ int _i; \
+ for (_i = 0; _i < narc; _i++) { \
+ (parc)[_i].x += dst_off_x; \
+ (parc)[_i].y += dst_off_y; \
+ } \
+} while (0)
+
+#define CW_OFFSET_XY_DST(x, y) do { \
+ (x) = (x) + dst_off_x; \
+ (y) = (y) + dst_off_y; \
+} while (0)
+
+#define CW_OFFSET_XY_SRC(x, y) do { \
+ (x) = (x) + src_off_x; \
+ (y) = (y) + src_off_y; \
+} while (0)
+
+/* cw.c */
+extern _X_EXPORT DrawablePtr
+ cwGetBackingDrawable(DrawablePtr pDrawable, int *x_off, int *y_off);
+
+/* cw_render.c */
+
+extern _X_EXPORT void
+ cwInitializeRender(ScreenPtr pScreen);
+
+extern _X_EXPORT void
+ cwFiniRender(ScreenPtr pScreen);
+
+/* cw.c */
+
+extern _X_EXPORT void
+ miInitializeCompositeWrapper(ScreenPtr pScreen);
diff --git a/xorg-server/miext/damage/damagestr.h b/xorg-server/miext/damage/damagestr.h
index b224958d1..89189905e 100644
--- a/xorg-server/miext/damage/damagestr.h
+++ b/xorg-server/miext/damage/damagestr.h
@@ -30,56 +30,56 @@
#include "damage.h"
#include "gcstruct.h"
#include "privates.h"
-# include "picturestr.h"
+#include "picturestr.h"
typedef struct _damage {
- DamagePtr pNext;
- DamagePtr pNextWin;
- RegionRec damage;
-
- DamageReportLevel damageLevel;
- Bool isInternal;
- void *closure;
- Bool isWindow;
- DrawablePtr pDrawable;
-
- DamageReportFunc damageReport;
- DamageReportFunc damageReportPostRendering;
- DamageDestroyFunc damageDestroy;
- DamageMarkerFunc damageMarker;
-
- Bool reportAfter;
- RegionRec pendingDamage; /* will be flushed post submission at the latest */
- RegionRec backupDamage; /* for use with damageMarker */
- ScreenPtr pScreen;
- PrivateRec *devPrivates;
+ DamagePtr pNext;
+ DamagePtr pNextWin;
+ RegionRec damage;
+
+ DamageReportLevel damageLevel;
+ Bool isInternal;
+ void *closure;
+ Bool isWindow;
+ DrawablePtr pDrawable;
+
+ DamageReportFunc damageReport;
+ DamageReportFunc damageReportPostRendering;
+ DamageDestroyFunc damageDestroy;
+ DamageMarkerFunc damageMarker;
+
+ Bool reportAfter;
+ RegionRec pendingDamage; /* will be flushed post submission at the latest */
+ RegionRec backupDamage; /* for use with damageMarker */
+ ScreenPtr pScreen;
+ PrivateRec *devPrivates;
} DamageRec;
typedef struct _damageScrPriv {
- int internalLevel;
+ int internalLevel;
/*
* For DDXen which don't provide GetScreenPixmap, this provides
* a place to hook damage for windows on the screen
*/
- DamagePtr pScreenDamage;
-
- CopyWindowProcPtr CopyWindow;
- CloseScreenProcPtr CloseScreen;
- CreateGCProcPtr CreateGC;
- DestroyPixmapProcPtr DestroyPixmap;
- SetWindowPixmapProcPtr SetWindowPixmap;
- DestroyWindowProcPtr DestroyWindow;
- CompositeProcPtr Composite;
- GlyphsProcPtr Glyphs;
- AddTrapsProcPtr AddTraps;
+ DamagePtr pScreenDamage;
+
+ CopyWindowProcPtr CopyWindow;
+ CloseScreenProcPtr CloseScreen;
+ CreateGCProcPtr CreateGC;
+ DestroyPixmapProcPtr DestroyPixmap;
+ SetWindowPixmapProcPtr SetWindowPixmap;
+ DestroyWindowProcPtr DestroyWindow;
+ CompositeProcPtr Composite;
+ GlyphsProcPtr Glyphs;
+ AddTrapsProcPtr AddTraps;
/* Table of wrappable function pointers */
- DamageScreenFuncsRec funcs;
+ DamageScreenFuncsRec funcs;
} DamageScrPrivRec, *DamageScrPrivPtr;
typedef struct _damageGCPriv {
- GCOps *ops;
+ GCOps *ops;
GCFuncs *funcs;
} DamageGCPrivRec, *DamageGCPrivPtr;
@@ -111,4 +111,4 @@ typedef struct _damageGCPriv {
#define damageSetWinPriv(pWin,d) \
dixSetPrivate(&(pWin)->devPrivates, damageWinPrivateKey, d)
-#endif /* _DAMAGESTR_H_ */
+#endif /* _DAMAGESTR_H_ */
diff --git a/xorg-server/miext/rootless/rootlessCommon.h b/xorg-server/miext/rootless/rootlessCommon.h
index 893ca9825..fd9c941f4 100644
--- a/xorg-server/miext/rootless/rootlessCommon.h
+++ b/xorg-server/miext/rootless/rootlessCommon.h
@@ -1,290 +1,284 @@
-/*
- * Common internal rootless definitions and code
- */
-/*
- * Copyright (c) 2001 Greg Parker. All Rights Reserved.
- * Copyright (c) 2002-2004 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <stdint.h>
-#ifndef _ROOTLESSCOMMON_H
-#define _ROOTLESSCOMMON_H
-
-#include "misc.h"
-#include "rootless.h"
-#include "fb.h"
-
-#include "scrnintstr.h"
-
-#include "picturestr.h"
-
-
-// Debug output, or not.
-#ifdef ROOTLESSDEBUG
-#define RL_DEBUG_MSG ErrorF
-#else
-#define RL_DEBUG_MSG(a, ...)
-#endif
-
-
-// Global variables
-extern DevPrivateKeyRec rootlessGCPrivateKeyRec;
-#define rootlessGCPrivateKey (&rootlessGCPrivateKeyRec)
-
-extern DevPrivateKeyRec rootlessScreenPrivateKeyRec;
-#define rootlessScreenPrivateKey (&rootlessScreenPrivateKeyRec)
-
-extern DevPrivateKeyRec rootlessWindowPrivateKeyRec;
-#define rootlessWindowPrivateKey (&rootlessWindowPrivateKeyRec)
-
-extern DevPrivateKeyRec rootlessWindowOldPixmapPrivateKeyRec;
-#define rootlessWindowOldPixmapPrivateKey (&rootlessWindowOldPixmapPrivateKeyRec)
-
-
-// RootlessGCRec: private per-gc data
-typedef struct {
- GCFuncs *originalFuncs;
- GCOps *originalOps;
-} RootlessGCRec;
-
-
-// RootlessScreenRec: per-screen private data
-typedef struct _RootlessScreenRec {
- // Rootless implementation functions
- RootlessFrameProcsPtr imp;
-
- // Wrapped screen functions
- CreateScreenResourcesProcPtr CreateScreenResources;
- CloseScreenProcPtr CloseScreen;
-
- CreateWindowProcPtr CreateWindow;
- DestroyWindowProcPtr DestroyWindow;
- RealizeWindowProcPtr RealizeWindow;
- UnrealizeWindowProcPtr UnrealizeWindow;
- MoveWindowProcPtr MoveWindow;
- ResizeWindowProcPtr ResizeWindow;
- RestackWindowProcPtr RestackWindow;
- ReparentWindowProcPtr ReparentWindow;
- ChangeBorderWidthProcPtr ChangeBorderWidth;
- PositionWindowProcPtr PositionWindow;
- ChangeWindowAttributesProcPtr ChangeWindowAttributes;
-
- CreateGCProcPtr CreateGC;
- CopyWindowProcPtr CopyWindow;
- GetImageProcPtr GetImage;
- SourceValidateProcPtr SourceValidate;
-
- MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
- ValidateTreeProcPtr ValidateTree;
-
- SetShapeProcPtr SetShape;
-
- CompositeProcPtr Composite;
- GlyphsProcPtr Glyphs;
-
- InstallColormapProcPtr InstallColormap;
- UninstallColormapProcPtr UninstallColormap;
- StoreColorsProcPtr StoreColors;
-
- void *pixmap_data;
- unsigned int pixmap_data_size;
-
- ColormapPtr colormap;
-
- void *redisplay_timer;
- unsigned int redisplay_timer_set :1;
- unsigned int redisplay_queued :1;
- unsigned int redisplay_expired :1;
- unsigned int colormap_changed :1;
-} RootlessScreenRec, *RootlessScreenPtr;
-
-// "Definition of the Porting Layer for the X11 Sample Server" says
-// unwrap and rewrap of screen functions is unnecessary, but
-// screen->CreateGC changes after a call to cfbCreateGC.
-
-#define SCREEN_UNWRAP(screen, fn) \
- screen->fn = SCREENREC(screen)->fn;
-
-#define SCREEN_WRAP(screen, fn) \
- SCREENREC(screen)->fn = screen->fn; \
- screen->fn = Rootless##fn
-
-
-// Accessors for screen and window privates
-
-#define SCREENREC(pScreen) ((RootlessScreenRec *) \
- dixLookupPrivate(&(pScreen)->devPrivates, rootlessScreenPrivateKey))
-
-#define SETSCREENREC(pScreen, v) \
- dixSetPrivate(&(pScreen)->devPrivates, rootlessScreenPrivateKey, v)
-
-#define WINREC(pWin) ((RootlessWindowRec *) \
- dixLookupPrivate(&(pWin)->devPrivates, rootlessWindowPrivateKey))
-
-#define SETWINREC(pWin, v) \
- dixSetPrivate(&(pWin)->devPrivates, rootlessWindowPrivateKey, v)
-
-// Call a rootless implementation function.
-// Many rootless implementation functions are allowed to be NULL.
-#define CallFrameProc(pScreen, proc, params) \
- if (SCREENREC(pScreen)->frameProcs.proc) { \
- RL_DEBUG_MSG("calling frame proc " #proc " "); \
- SCREENREC(pScreen)->frameProcs.proc params; \
- }
-
-
-// BoxRec manipulators
-// Copied from shadowfb
-
-#define TRIM_BOX(box, pGC) { \
- BoxPtr extents = &pGC->pCompositeClip->extents;\
- if(box.x1 < extents->x1) box.x1 = extents->x1; \
- if(box.x2 > extents->x2) box.x2 = extents->x2; \
- if(box.y1 < extents->y1) box.y1 = extents->y1; \
- if(box.y2 > extents->y2) box.y2 = extents->y2; \
-}
-
-#define TRANSLATE_BOX(box, pDraw) { \
- box.x1 += pDraw->x; \
- box.x2 += pDraw->x; \
- box.y1 += pDraw->y; \
- box.y2 += pDraw->y; \
-}
-
-#define TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC) { \
- TRANSLATE_BOX(box, pDraw); \
- TRIM_BOX(box, pGC); \
-}
-
-#define BOX_NOT_EMPTY(box) \
- (((box.x2 - box.x1) > 0) && ((box.y2 - box.y1) > 0))
-
-
-// HUGE_ROOT and NORMAL_ROOT
-// We don't want to clip windows to the edge of the screen.
-// HUGE_ROOT temporarily makes the root window really big.
-// This is needed as a wrapper around any function that calls
-// SetWinSize or SetBorderSize which clip a window against its
-// parents, including the root.
-
-extern RegionRec rootlessHugeRoot;
-
-#define HUGE_ROOT(pWin) \
- do { \
- WindowPtr w = pWin; \
- while (w->parent) \
- w = w->parent; \
- saveRoot = w->winSize; \
- w->winSize = rootlessHugeRoot; \
- } while (0)
-
-#define NORMAL_ROOT(pWin) \
- do { \
- WindowPtr w = pWin; \
- while (w->parent) \
- w = w->parent; \
- w->winSize = saveRoot; \
- } while (0)
-
-
-// Returns TRUE if this window is a top-level window (i.e. child of the root)
-// The root is not a top-level window.
-#define IsTopLevel(pWin) \
- ((pWin) && (pWin)->parent && !(pWin)->parent->parent)
-
-// Returns TRUE if this window is a root window
-#define IsRoot(pWin) \
- ((pWin) == (pWin)->drawable.pScreen->root)
-
-
-/*
- * SetPixmapBaseToScreen
- * Move the given pixmap's base address to where pixel (0, 0)
- * would be if the pixmap's actual data started at (x, y).
- * Can't access the bits before the first word of the drawable's data in
- * rootless mode, so make sure our base address is always 32-bit aligned.
- */
-#define SetPixmapBaseToScreen(pix, _x, _y) { \
- PixmapPtr _pPix = (PixmapPtr) (pix); \
- _pPix->devPrivate.ptr = (char *) (_pPix->devPrivate.ptr) - \
- ((int)(_x) * _pPix->drawable.bitsPerPixel/8 + \
- (int)(_y) * _pPix->devKind); \
- if (_pPix->drawable.bitsPerPixel != FB_UNIT) { \
- size_t _diff = ((size_t) _pPix->devPrivate.ptr) & \
- (FB_UNIT / CHAR_BIT - 1); \
- _pPix->devPrivate.ptr = (char *) (_pPix->devPrivate.ptr) - \
- _diff; \
- _pPix->drawable.x = _diff / \
- (_pPix->drawable.bitsPerPixel / CHAR_BIT); \
- } \
-}
-
-
-// Returns TRUE if this window is visible inside a frame
-// (e.g. it is visible and has a top-level or root parent)
-Bool IsFramedWindow(WindowPtr pWin);
-
-// Routines that cause regions to get redrawn.
-// DamageRegion and DamageRect are in global coordinates.
-// DamageBox is in window-local coordinates.
-void RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion);
-void RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h);
-void RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox);
-void RootlessRedisplay(WindowPtr pWindow);
-void RootlessRedisplayScreen(ScreenPtr pScreen);
-
-void RootlessQueueRedisplay(ScreenPtr pScreen);
-
-/* Return the colormap currently installed on the given screen. */
-ColormapPtr RootlessGetColormap (ScreenPtr pScreen);
-
-/* Convert colormap to ARGB. */
-Bool RootlessResolveColormap (ScreenPtr pScreen, int first_color,
- int n_colors, uint32_t *colors);
-
-void RootlessFlushWindowColormap (WindowPtr pWin);
-void RootlessFlushScreenColormaps (ScreenPtr pScreen);
-
-// Move a window to its proper location on the screen.
-void RootlessRepositionWindow(WindowPtr pWin);
-
-// Move the window to it's correct place in the physical stacking order.
-void RootlessReorderWindow(WindowPtr pWin);
-
-void RootlessScreenExpose (ScreenPtr pScreen);
-void RootlessHideAllWindows (void);
-void RootlessShowAllWindows (void);
-void RootlessUpdateRooted (Bool state);
-
-void RootlessEnableRoot (ScreenPtr pScreen);
-void RootlessDisableRoot (ScreenPtr pScreen);
-
-void RootlessSetPixmapOfAncestors(WindowPtr pWin);
-
-#endif /* _ROOTLESSCOMMON_H */
+/*
+ * Common internal rootless definitions and code
+ */
+/*
+ * Copyright (c) 2001 Greg Parker. All Rights Reserved.
+ * Copyright (c) 2002-2004 Torrey T. Lyons. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written authorization.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <stdint.h>
+#ifndef _ROOTLESSCOMMON_H
+#define _ROOTLESSCOMMON_H
+
+#include "misc.h"
+#include "rootless.h"
+#include "fb.h"
+
+#include "scrnintstr.h"
+
+#include "picturestr.h"
+
+// Debug output, or not.
+#ifdef ROOTLESSDEBUG
+#define RL_DEBUG_MSG ErrorF
+#else
+#define RL_DEBUG_MSG(a, ...)
+#endif
+
+// Global variables
+extern DevPrivateKeyRec rootlessGCPrivateKeyRec;
+
+#define rootlessGCPrivateKey (&rootlessGCPrivateKeyRec)
+
+extern DevPrivateKeyRec rootlessScreenPrivateKeyRec;
+
+#define rootlessScreenPrivateKey (&rootlessScreenPrivateKeyRec)
+
+extern DevPrivateKeyRec rootlessWindowPrivateKeyRec;
+
+#define rootlessWindowPrivateKey (&rootlessWindowPrivateKeyRec)
+
+extern DevPrivateKeyRec rootlessWindowOldPixmapPrivateKeyRec;
+
+#define rootlessWindowOldPixmapPrivateKey (&rootlessWindowOldPixmapPrivateKeyRec)
+
+// RootlessGCRec: private per-gc data
+typedef struct {
+ GCFuncs *originalFuncs;
+ GCOps *originalOps;
+} RootlessGCRec;
+
+// RootlessScreenRec: per-screen private data
+typedef struct _RootlessScreenRec {
+ // Rootless implementation functions
+ RootlessFrameProcsPtr imp;
+
+ // Wrapped screen functions
+ CreateScreenResourcesProcPtr CreateScreenResources;
+ CloseScreenProcPtr CloseScreen;
+
+ CreateWindowProcPtr CreateWindow;
+ DestroyWindowProcPtr DestroyWindow;
+ RealizeWindowProcPtr RealizeWindow;
+ UnrealizeWindowProcPtr UnrealizeWindow;
+ MoveWindowProcPtr MoveWindow;
+ ResizeWindowProcPtr ResizeWindow;
+ RestackWindowProcPtr RestackWindow;
+ ReparentWindowProcPtr ReparentWindow;
+ ChangeBorderWidthProcPtr ChangeBorderWidth;
+ PositionWindowProcPtr PositionWindow;
+ ChangeWindowAttributesProcPtr ChangeWindowAttributes;
+
+ CreateGCProcPtr CreateGC;
+ CopyWindowProcPtr CopyWindow;
+ GetImageProcPtr GetImage;
+ SourceValidateProcPtr SourceValidate;
+
+ MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
+ ValidateTreeProcPtr ValidateTree;
+
+ SetShapeProcPtr SetShape;
+
+ CompositeProcPtr Composite;
+ GlyphsProcPtr Glyphs;
+
+ InstallColormapProcPtr InstallColormap;
+ UninstallColormapProcPtr UninstallColormap;
+ StoreColorsProcPtr StoreColors;
+
+ void *pixmap_data;
+ unsigned int pixmap_data_size;
+
+ ColormapPtr colormap;
+
+ void *redisplay_timer;
+ unsigned int redisplay_timer_set:1;
+ unsigned int redisplay_queued:1;
+ unsigned int redisplay_expired:1;
+ unsigned int colormap_changed:1;
+} RootlessScreenRec, *RootlessScreenPtr;
+
+// "Definition of the Porting Layer for the X11 Sample Server" says
+// unwrap and rewrap of screen functions is unnecessary, but
+// screen->CreateGC changes after a call to cfbCreateGC.
+
+#define SCREEN_UNWRAP(screen, fn) \
+ screen->fn = SCREENREC(screen)->fn;
+
+#define SCREEN_WRAP(screen, fn) \
+ SCREENREC(screen)->fn = screen->fn; \
+ screen->fn = Rootless##fn
+
+// Accessors for screen and window privates
+
+#define SCREENREC(pScreen) ((RootlessScreenRec *) \
+ dixLookupPrivate(&(pScreen)->devPrivates, rootlessScreenPrivateKey))
+
+#define SETSCREENREC(pScreen, v) \
+ dixSetPrivate(&(pScreen)->devPrivates, rootlessScreenPrivateKey, v)
+
+#define WINREC(pWin) ((RootlessWindowRec *) \
+ dixLookupPrivate(&(pWin)->devPrivates, rootlessWindowPrivateKey))
+
+#define SETWINREC(pWin, v) \
+ dixSetPrivate(&(pWin)->devPrivates, rootlessWindowPrivateKey, v)
+
+// Call a rootless implementation function.
+// Many rootless implementation functions are allowed to be NULL.
+#define CallFrameProc(pScreen, proc, params) \
+ if (SCREENREC(pScreen)->frameProcs.proc) { \
+ RL_DEBUG_MSG("calling frame proc " #proc " "); \
+ SCREENREC(pScreen)->frameProcs.proc params; \
+ }
+
+// BoxRec manipulators
+// Copied from shadowfb
+
+#define TRIM_BOX(box, pGC) { \
+ BoxPtr extents = &pGC->pCompositeClip->extents;\
+ if(box.x1 < extents->x1) box.x1 = extents->x1; \
+ if(box.x2 > extents->x2) box.x2 = extents->x2; \
+ if(box.y1 < extents->y1) box.y1 = extents->y1; \
+ if(box.y2 > extents->y2) box.y2 = extents->y2; \
+}
+
+#define TRANSLATE_BOX(box, pDraw) { \
+ box.x1 += pDraw->x; \
+ box.x2 += pDraw->x; \
+ box.y1 += pDraw->y; \
+ box.y2 += pDraw->y; \
+}
+
+#define TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC) { \
+ TRANSLATE_BOX(box, pDraw); \
+ TRIM_BOX(box, pGC); \
+}
+
+#define BOX_NOT_EMPTY(box) \
+ (((box.x2 - box.x1) > 0) && ((box.y2 - box.y1) > 0))
+
+// HUGE_ROOT and NORMAL_ROOT
+// We don't want to clip windows to the edge of the screen.
+// HUGE_ROOT temporarily makes the root window really big.
+// This is needed as a wrapper around any function that calls
+// SetWinSize or SetBorderSize which clip a window against its
+// parents, including the root.
+
+extern RegionRec rootlessHugeRoot;
+
+#define HUGE_ROOT(pWin) \
+ do { \
+ WindowPtr w = pWin; \
+ while (w->parent) \
+ w = w->parent; \
+ saveRoot = w->winSize; \
+ w->winSize = rootlessHugeRoot; \
+ } while (0)
+
+#define NORMAL_ROOT(pWin) \
+ do { \
+ WindowPtr w = pWin; \
+ while (w->parent) \
+ w = w->parent; \
+ w->winSize = saveRoot; \
+ } while (0)
+
+// Returns TRUE if this window is a top-level window (i.e. child of the root)
+// The root is not a top-level window.
+#define IsTopLevel(pWin) \
+ ((pWin) && (pWin)->parent && !(pWin)->parent->parent)
+
+// Returns TRUE if this window is a root window
+#define IsRoot(pWin) \
+ ((pWin) == (pWin)->drawable.pScreen->root)
+
+/*
+ * SetPixmapBaseToScreen
+ * Move the given pixmap's base address to where pixel (0, 0)
+ * would be if the pixmap's actual data started at (x, y).
+ * Can't access the bits before the first word of the drawable's data in
+ * rootless mode, so make sure our base address is always 32-bit aligned.
+ */
+#define SetPixmapBaseToScreen(pix, _x, _y) { \
+ PixmapPtr _pPix = (PixmapPtr) (pix); \
+ _pPix->devPrivate.ptr = (char *) (_pPix->devPrivate.ptr) - \
+ ((int)(_x) * _pPix->drawable.bitsPerPixel/8 + \
+ (int)(_y) * _pPix->devKind); \
+ if (_pPix->drawable.bitsPerPixel != FB_UNIT) { \
+ size_t _diff = ((size_t) _pPix->devPrivate.ptr) & \
+ (FB_UNIT / CHAR_BIT - 1); \
+ _pPix->devPrivate.ptr = (char *) (_pPix->devPrivate.ptr) - \
+ _diff; \
+ _pPix->drawable.x = _diff / \
+ (_pPix->drawable.bitsPerPixel / CHAR_BIT); \
+ } \
+}
+
+// Returns TRUE if this window is visible inside a frame
+// (e.g. it is visible and has a top-level or root parent)
+Bool IsFramedWindow(WindowPtr pWin);
+
+// Routines that cause regions to get redrawn.
+// DamageRegion and DamageRect are in global coordinates.
+// DamageBox is in window-local coordinates.
+void RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion);
+void RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h);
+void RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox);
+void RootlessRedisplay(WindowPtr pWindow);
+void RootlessRedisplayScreen(ScreenPtr pScreen);
+
+void RootlessQueueRedisplay(ScreenPtr pScreen);
+
+/* Return the colormap currently installed on the given screen. */
+ColormapPtr RootlessGetColormap(ScreenPtr pScreen);
+
+/* Convert colormap to ARGB. */
+Bool RootlessResolveColormap(ScreenPtr pScreen, int first_color,
+ int n_colors, uint32_t * colors);
+
+void RootlessFlushWindowColormap(WindowPtr pWin);
+void RootlessFlushScreenColormaps(ScreenPtr pScreen);
+
+// Move a window to its proper location on the screen.
+void RootlessRepositionWindow(WindowPtr pWin);
+
+// Move the window to it's correct place in the physical stacking order.
+void RootlessReorderWindow(WindowPtr pWin);
+
+void RootlessScreenExpose(ScreenPtr pScreen);
+void RootlessHideAllWindows(void);
+void RootlessShowAllWindows(void);
+void RootlessUpdateRooted(Bool state);
+
+void RootlessEnableRoot(ScreenPtr pScreen);
+void RootlessDisableRoot(ScreenPtr pScreen);
+
+void RootlessSetPixmapOfAncestors(WindowPtr pWin);
+
+#endif /* _ROOTLESSCOMMON_H */
diff --git a/xorg-server/miext/rootless/rootlessConfig.h b/xorg-server/miext/rootless/rootlessConfig.h
index 1ad3afcf0..d39ae63d2 100644
--- a/xorg-server/miext/rootless/rootlessConfig.h
+++ b/xorg-server/miext/rootless/rootlessConfig.h
@@ -1,62 +1,62 @@
-/*
- * Platform specific rootless configuration
- */
-/*
- * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _ROOTLESSCONFIG_H
-#define _ROOTLESSCONFIG_H
-
-#ifdef __APPLE__
-
-# define ROOTLESS_PROTECT_ALPHA TRUE
-# define ROOTLESS_REDISPLAY_DELAY 10
-# define ROOTLESS_RESIZE_GRAVITY TRUE
-/*# define ROOTLESSDEBUG*/
-
-/* Bit mask for alpha channel with a particular number of bits per
- pixel. Note that we only care for 32bpp data. Mac OS X uses planar
- alpha for 16bpp. */
-# define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
-
-#endif /* __APPLE__ */
-
-#if defined(__CYGWIN__) || defined(WIN32)
-
-# define ROOTLESS_PROTECT_ALPHA NO
-# define ROOTLESS_REDISPLAY_DELAY 10
-# undef ROOTLESS_RESIZE_GRAVITY
-/*# define ROOTLESSDEBUG*/
-
-# define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
-
-#endif /* __CYGWIN__ */
-
-#endif /* _ROOTLESSCONFIG_H */
+/*
+ * Platform specific rootless configuration
+ */
+/*
+ * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Except as contained in this notice, the name(s) of the above copyright
+ * holders shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in this Software without prior written authorization.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#ifndef _ROOTLESSCONFIG_H
+#define _ROOTLESSCONFIG_H
+
+#ifdef __APPLE__
+
+#define ROOTLESS_PROTECT_ALPHA TRUE
+#define ROOTLESS_REDISPLAY_DELAY 10
+#define ROOTLESS_RESIZE_GRAVITY TRUE
+/*# define ROOTLESSDEBUG*/
+
+/* Bit mask for alpha channel with a particular number of bits per
+ pixel. Note that we only care for 32bpp data. Mac OS X uses planar
+ alpha for 16bpp. */
+#define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
+
+#endif /* __APPLE__ */
+
+#if defined(__CYGWIN__) || defined(WIN32)
+
+#define ROOTLESS_PROTECT_ALPHA NO
+#define ROOTLESS_REDISPLAY_DELAY 10
+#undef ROOTLESS_RESIZE_GRAVITY
+/*# define ROOTLESSDEBUG*/
+
+#define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
+
+#endif /* __CYGWIN__ */
+
+#endif /* _ROOTLESSCONFIG_H */
diff --git a/xorg-server/miext/shadow/shalloc.c b/xorg-server/miext/shadow/shalloc.c
index ebeaaaee6..e555135b9 100644
--- a/xorg-server/miext/shadow/shalloc.c
+++ b/xorg-server/miext/shadow/shalloc.c
@@ -1,50 +1,49 @@
-/*
- * Copyright © 2000 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 <X11/X.h>
-#include "scrnintstr.h"
-#include "windowstr.h"
-#include <X11/fonts/font.h>
-#include "dixfontstr.h"
-#include <X11/fonts/fontstruct.h>
-#include "mi.h"
-#include "regionstr.h"
-#include "globals.h"
-#include "gcstruct.h"
-#include "shadow.h"
-
-void *
-shadowAlloc (int width, int height, int bpp)
-{
- int stride;
- void *fb;
-
- /* Cant use PixmapBytePad -- the structure is probably not initialized yet */
- stride = BitmapBytePad (width * bpp);
- fb = malloc(stride * height);
- return fb;
-}
+/*
+ * Copyright © 2000 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 <X11/X.h>
+#include "scrnintstr.h"
+#include "windowstr.h"
+#include <X11/fonts/font.h>
+#include "dixfontstr.h"
+#include <X11/fonts/fontstruct.h>
+#include "mi.h"
+#include "regionstr.h"
+#include "globals.h"
+#include "gcstruct.h"
+#include "shadow.h"
+
+void *
+shadowAlloc(int width, int height, int bpp)
+{
+ int stride;
+ void *fb;
+
+ /* Cant use PixmapBytePad -- the structure is probably not initialized yet */
+ stride = BitmapBytePad(width * bpp);
+ fb = malloc(stride * height);
+ return fb;
+}
diff --git a/xorg-server/os/strcasecmp.c b/xorg-server/os/strcasecmp.c
index cf100baf4..2692f7f1e 100644
--- a/xorg-server/os/strcasecmp.c
+++ b/xorg-server/os/strcasecmp.c
@@ -38,7 +38,7 @@
int
xstrcasecmp(const char *str1, const char *str2)
{
- const u_char *us1 = (const u_char *)str1, *us2 = (const u_char *)str2;
+ const u_char *us1 = (const u_char *) str1, *us2 = (const u_char *) str2;
while (tolower(*us1) == tolower(*us2)) {
if (*us1++ == '\0')
@@ -55,7 +55,7 @@ int
xstrncasecmp(const char *s1, const char *s2, size_t n)
{
if (n != 0) {
- const u_char *us1 = (const u_char *)s1, *us2 = (const u_char *)s2;
+ const u_char *us1 = (const u_char *) s1, *us2 = (const u_char *) s2;
do {
if (tolower(*us1) != tolower(*us2++))
diff --git a/xorg-server/os/strcasestr.c b/xorg-server/os/strcasestr.c
index a20a6cc33..1ca2ad6bb 100644
--- a/xorg-server/os/strcasestr.c
+++ b/xorg-server/os/strcasestr.c
@@ -45,20 +45,20 @@
char *
xstrcasestr(const char *s, const char *find)
{
- char c, sc;
- size_t len;
+ char c, sc;
+ size_t len;
- if ((c = *find++) != 0) {
- c = tolower((unsigned char)c);
- len = strlen(find);
- do {
- do {
- if ((sc = *s++) == 0)
- return NULL;
- } while ((char)tolower((unsigned char)sc) != c);
- } while (strncasecmp(s, find, len) != 0);
- s--;
- }
- return ((char *)s);
+ if ((c = *find++) != 0) {
+ c = tolower((unsigned char) c);
+ len = strlen(find);
+ do {
+ do {
+ if ((sc = *s++) == 0)
+ return NULL;
+ } while ((char) tolower((unsigned char) sc) != c);
+ } while (strncasecmp(s, find, len) != 0);
+ s--;
+ }
+ return ((char *) s);
}
#endif
diff --git a/xorg-server/os/strlcat.c b/xorg-server/os/strlcat.c
index e374e2908..316dfa9d1 100644
--- a/xorg-server/os/strlcat.c
+++ b/xorg-server/os/strlcat.c
@@ -1,59 +1,58 @@
-/*
- * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE
- * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <sys/types.h>
-#include <string.h>
-#include "os.h"
-
-/*
- * Appends src to string dst of size siz (unlike strncat, siz is the
- * full size of dst, not space left). At most siz-1 characters
- * will be copied. Always NUL terminates (unless siz <= strlen(dst)).
- * Returns strlen(src) + MIN(siz, strlen(initial dst)).
- * If retval >= siz, truncation occurred.
- */
-size_t
-strlcat(char *dst, const char *src, size_t siz)
-{
- register char *d = dst;
- register const char *s = src;
- register size_t n = siz;
- size_t dlen;
-
- /* Find the end of dst and adjust bytes left but don't go past end */
- while (n-- != 0 && *d != '\0')
- d++;
- dlen = d - dst;
- n = siz - dlen;
-
- if (n == 0)
- return(dlen + strlen(s));
- while (*s != '\0') {
- if (n != 1) {
- *d++ = *s;
- n--;
- }
- s++;
- }
- *d = '\0';
-
- return(dlen + (s - src)); /* count does not include NUL */
-}
+/*
+ * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE
+ * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include <sys/types.h>
+#include <string.h>
+#include "os.h"
+
+/*
+ * Appends src to string dst of size siz (unlike strncat, siz is the
+ * full size of dst, not space left). At most siz-1 characters
+ * will be copied. Always NUL terminates (unless siz <= strlen(dst)).
+ * Returns strlen(src) + MIN(siz, strlen(initial dst)).
+ * If retval >= siz, truncation occurred.
+ */
+size_t
+strlcat(char *dst, const char *src, size_t siz)
+{
+ register char *d = dst;
+ register const char *s = src;
+ register size_t n = siz;
+ size_t dlen;
+
+ /* Find the end of dst and adjust bytes left but don't go past end */
+ while (n-- != 0 && *d != '\0')
+ d++;
+ dlen = d - dst;
+ n = siz - dlen;
+
+ if (n == 0)
+ return (dlen + strlen(s));
+ while (*s != '\0') {
+ if (n != 1) {
+ *d++ = *s;
+ n--;
+ }
+ s++;
+ }
+ *d = '\0';
+
+ return (dlen + (s - src)); /* count does not include NUL */
+}
diff --git a/xorg-server/os/strndup.c b/xorg-server/os/strndup.c
index bf8e982d4..b604b9bac 100644
--- a/xorg-server/os/strndup.c
+++ b/xorg-server/os/strndup.c
@@ -35,15 +35,15 @@
char *
strndup(const char *str, size_t n)
{
- size_t len;
- char *copy;
+ size_t len;
+ char *copy;
- for (len = 0; len < n && str[len]; len++)
- continue;
+ for (len = 0; len < n && str[len]; len++)
+ continue;
- if ((copy = malloc(len + 1)) == NULL)
- return (NULL);
- memcpy(copy, str, len);
- copy[len] = '\0';
- return (copy);
+ if ((copy = malloc(len + 1)) == NULL)
+ return (NULL);
+ memcpy(copy, str, len);
+ copy[len] = '\0';
+ return (copy);
}
diff --git a/xorg-server/render/picture.h b/xorg-server/render/picture.h
index 461bbf01b..c85353a44 100644
--- a/xorg-server/render/picture.h
+++ b/xorg-server/render/picture.h
@@ -1,231 +1,232 @@
-/*
- *
- * Copyright © 2000 SuSE, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of SuSE not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. SuSE makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
- * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Keith Packard, SuSE, Inc.
- */
-
-#ifndef _PICTURE_H_
-#define _PICTURE_H_
-
-#include "privates.h"
-
-#include <pixman.h>
-
-typedef struct _DirectFormat *DirectFormatPtr;
-typedef struct _PictFormat *PictFormatPtr;
-typedef struct _Picture *PicturePtr;
-
-/*
- * While the protocol is generous in format support, the
- * sample implementation allows only packed RGB and GBR
- * representations for data to simplify software rendering,
- */
-#define PICT_FORMAT(bpp,type,a,r,g,b) PIXMAN_FORMAT(bpp, type, a, r, g, b)
-
-/*
- * gray/color formats use a visual index instead of argb
- */
-#define PICT_VISFORMAT(bpp,type,vi) (((bpp) << 24) | \
- ((type) << 16) | \
- ((vi)))
-
-#define PICT_FORMAT_BPP(f) PIXMAN_FORMAT_BPP(f)
-#define PICT_FORMAT_TYPE(f) PIXMAN_FORMAT_TYPE(f)
-#define PICT_FORMAT_A(f) PIXMAN_FORMAT_A(f)
-#define PICT_FORMAT_R(f) PIXMAN_FORMAT_R(f)
-#define PICT_FORMAT_G(f) PIXMAN_FORMAT_G(f)
-#define PICT_FORMAT_B(f) PIXMAN_FORMAT_B(f)
-#define PICT_FORMAT_RGB(f) PIXMAN_FORMAT_RGB(f)
-#define PICT_FORMAT_VIS(f) PIXMAN_FORMAT_VIS(f)
-
-#define PICT_TYPE_OTHER PIXMAN_TYPE_OTHER
-#define PICT_TYPE_A PIXMAN_TYPE_A
-#define PICT_TYPE_ARGB PIXMAN_TYPE_ARGB
-#define PICT_TYPE_ABGR PIXMAN_TYPE_ABGR
-#define PICT_TYPE_COLOR PIXMAN_TYPE_COLOR
-#define PICT_TYPE_GRAY PIXMAN_TYPE_GRAY
-#define PICT_TYPE_BGRA PIXMAN_TYPE_BGRA
-
-#define PICT_FORMAT_COLOR(f) PIXMAN_FORMAT_COLOR(f)
-
-/* 32bpp formats */
-typedef enum _PictFormatShort {
- PICT_a2r10g10b10 = PIXMAN_a2r10g10b10,
- PICT_x2r10g10b10 = PIXMAN_x2r10g10b10,
- PICT_a2b10g10r10 = PIXMAN_a2b10g10r10,
- PICT_x2b10g10r10 = PIXMAN_x2b10g10r10,
-
- PICT_a8r8g8b8 = PIXMAN_a8r8g8b8,
- PICT_x8r8g8b8 = PIXMAN_x8r8g8b8,
- PICT_a8b8g8r8 = PIXMAN_a8b8g8r8,
- PICT_x8b8g8r8 = PIXMAN_x8b8g8r8,
- PICT_b8g8r8a8 = PIXMAN_b8g8r8a8,
- PICT_b8g8r8x8 = PIXMAN_b8g8r8x8,
-
-/* 24bpp formats */
- PICT_r8g8b8 = PIXMAN_r8g8b8,
- PICT_b8g8r8 = PIXMAN_b8g8r8,
-
-/* 16bpp formats */
- PICT_r5g6b5 = PIXMAN_r5g6b5,
- PICT_b5g6r5 = PIXMAN_b5g6r5,
-
- PICT_a1r5g5b5 = PIXMAN_a1r5g5b5,
- PICT_x1r5g5b5 = PIXMAN_x1r5g5b5,
- PICT_a1b5g5r5 = PIXMAN_a1b5g5r5,
- PICT_x1b5g5r5 = PIXMAN_x1b5g5r5,
- PICT_a4r4g4b4 = PIXMAN_a4r4g4b4,
- PICT_x4r4g4b4 = PIXMAN_x4r4g4b4,
- PICT_a4b4g4r4 = PIXMAN_a4b4g4r4,
- PICT_x4b4g4r4 = PIXMAN_x4b4g4r4,
-
-/* 8bpp formats */
- PICT_a8 = PIXMAN_a8,
- PICT_r3g3b2 = PIXMAN_r3g3b2,
- PICT_b2g3r3 = PIXMAN_b2g3r3,
- PICT_a2r2g2b2 = PIXMAN_a2r2g2b2,
- PICT_a2b2g2r2 = PIXMAN_a2b2g2r2,
-
- PICT_c8 = PIXMAN_c8,
- PICT_g8 = PIXMAN_g8,
-
- PICT_x4a4 = PIXMAN_x4a4,
-
- PICT_x4c4 = PIXMAN_x4c4,
- PICT_x4g4 = PIXMAN_x4g4,
-
-/* 4bpp formats */
- PICT_a4 = PIXMAN_a4,
- PICT_r1g2b1 = PIXMAN_r1g2b1,
- PICT_b1g2r1 = PIXMAN_b1g2r1,
- PICT_a1r1g1b1 = PIXMAN_a1r1g1b1,
- PICT_a1b1g1r1 = PIXMAN_a1b1g1r1,
-
- PICT_c4 = PIXMAN_c4,
- PICT_g4 = PIXMAN_g4,
-
-/* 1bpp formats */
- PICT_a1 = PIXMAN_a1,
-
- PICT_g1 = PIXMAN_g1
-} PictFormatShort;
-
-/*
- * 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:
- *
- * Size Default Policy
- * ----------------------------
- * < 64 PolicyMono
- * < 256 PolicyGray
- * 256 PolicyColor (only on PseudoColor)
- *
- * The actual allocation code lives in miindex.c, and so is
- * austensibly server dependent, but that code does:
- *
- * PolicyMono Allocate no additional colors, use black and white
- * PolicyGray Allocate 13 gray levels (11 cells used)
- * PolicyColor Allocate a 4x4x4 cube and 13 gray levels (71 cells used)
- * PolicyAll Allocate as big a cube as possible, fill with gray (all)
- *
- * Here's a picture to help understand how many colors are
- * actually allocated (this is just the gray ramp):
- *
- * gray level
- * all 0000 1555 2aaa 4000 5555 6aaa 8000 9555 aaaa bfff d555 eaaa ffff
- * b/w 0000 ffff
- * 4x4x4 5555 aaaa
- * extra 1555 2aaa 4000 6aaa 8000 9555 bfff d555 eaaa
- *
- * The default colormap supplies two gray levels (black/white), the
- * 4x4x4 cube allocates another two and nine more are allocated to fill
- * in the 13 levels. When the 4x4x4 cube is not allocated, a total of
- * 11 cells are allocated.
- */
-
-#define PictureCmapPolicyInvalid -1
-#define PictureCmapPolicyDefault 0
-#define PictureCmapPolicyMono 1
-#define PictureCmapPolicyGray 2
-#define PictureCmapPolicyColor 3
-#define PictureCmapPolicyAll 4
-
-extern _X_EXPORT int PictureCmapPolicy;
-
-extern _X_EXPORT int PictureParseCmapPolicy (const char *name);
-
-extern _X_EXPORT int RenderErrBase;
-
-/* Fixed point updates from Carl Worth, USC, Information Sciences Institute */
-
-typedef pixman_fixed_32_32_t xFixed_32_32;
-
-typedef pixman_fixed_48_16_t xFixed_48_16;
-
-#define MAX_FIXED_48_16 pixman_max_fixed_48_16
-#define MIN_FIXED_48_16 pixman_min_fixed_48_16
-
-typedef pixman_fixed_1_31_t xFixed_1_31;
-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)
- */
-typedef pixman_fixed_t xFixed;
-#define XFIXED_BITS 16
-
-#define xFixedToInt(f) pixman_fixed_to_int(f)
-#define IntToxFixed(i) pixman_int_to_fixed(i)
-#define xFixedE pixman_fixed_e
-#define xFixed1 pixman_fixed_1
-#define xFixed1MinusE pixman_fixed_1_minus_e
-#define xFixedFrac(f) pixman_fixed_frac(f)
-#define xFixedFloor(f) pixman_fixed_floor(f)
-#define xFixedCeil(f) pixman_fixed_ceil(f)
-
-#define xFixedFraction(f) pixman_fixed_fraction(f)
-#define xFixedMod2(f) pixman_fixed_mod2(f)
-
-/* whether 't' is a well defined not obviously empty trapezoid */
-#define xTrapezoidValid(t) ((t)->left.p1.y != (t)->left.p2.y && \
- (t)->right.p1.y != (t)->right.p2.y && \
- (int) ((t)->bottom - (t)->top) > 0)
-
-/*
- * Standard NTSC luminance conversions:
- *
- * y = r * 0.299 + g * 0.587 + b * 0.114
- *
- * Approximate this for a bit more speed:
- *
- * y = (r * 153 + g * 301 + b * 58) / 512
- *
- * This gives 17 bits of luminance; to get 15 bits, lop the low two
- */
-
-#define CvtR8G8B8toY15(s) (((((s) >> 16) & 0xff) * 153 + \
- (((s) >> 8) & 0xff) * 301 + \
- (((s) ) & 0xff) * 58) >> 2)
-
-#endif /* _PICTURE_H_ */
+/*
+ *
+ * Copyright © 2000 SuSE, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of SuSE not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. SuSE makes no representations about the
+ * suitability of this software for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Keith Packard, SuSE, Inc.
+ */
+
+#ifndef _PICTURE_H_
+#define _PICTURE_H_
+
+#include "privates.h"
+
+#include <pixman.h>
+
+typedef struct _DirectFormat *DirectFormatPtr;
+typedef struct _PictFormat *PictFormatPtr;
+typedef struct _Picture *PicturePtr;
+
+/*
+ * While the protocol is generous in format support, the
+ * sample implementation allows only packed RGB and GBR
+ * representations for data to simplify software rendering,
+ */
+#define PICT_FORMAT(bpp,type,a,r,g,b) PIXMAN_FORMAT(bpp, type, a, r, g, b)
+
+/*
+ * gray/color formats use a visual index instead of argb
+ */
+#define PICT_VISFORMAT(bpp,type,vi) (((bpp) << 24) | \
+ ((type) << 16) | \
+ ((vi)))
+
+#define PICT_FORMAT_BPP(f) PIXMAN_FORMAT_BPP(f)
+#define PICT_FORMAT_TYPE(f) PIXMAN_FORMAT_TYPE(f)
+#define PICT_FORMAT_A(f) PIXMAN_FORMAT_A(f)
+#define PICT_FORMAT_R(f) PIXMAN_FORMAT_R(f)
+#define PICT_FORMAT_G(f) PIXMAN_FORMAT_G(f)
+#define PICT_FORMAT_B(f) PIXMAN_FORMAT_B(f)
+#define PICT_FORMAT_RGB(f) PIXMAN_FORMAT_RGB(f)
+#define PICT_FORMAT_VIS(f) PIXMAN_FORMAT_VIS(f)
+
+#define PICT_TYPE_OTHER PIXMAN_TYPE_OTHER
+#define PICT_TYPE_A PIXMAN_TYPE_A
+#define PICT_TYPE_ARGB PIXMAN_TYPE_ARGB
+#define PICT_TYPE_ABGR PIXMAN_TYPE_ABGR
+#define PICT_TYPE_COLOR PIXMAN_TYPE_COLOR
+#define PICT_TYPE_GRAY PIXMAN_TYPE_GRAY
+#define PICT_TYPE_BGRA PIXMAN_TYPE_BGRA
+
+#define PICT_FORMAT_COLOR(f) PIXMAN_FORMAT_COLOR(f)
+
+/* 32bpp formats */
+typedef enum _PictFormatShort {
+ PICT_a2r10g10b10 = PIXMAN_a2r10g10b10,
+ PICT_x2r10g10b10 = PIXMAN_x2r10g10b10,
+ PICT_a2b10g10r10 = PIXMAN_a2b10g10r10,
+ PICT_x2b10g10r10 = PIXMAN_x2b10g10r10,
+
+ PICT_a8r8g8b8 = PIXMAN_a8r8g8b8,
+ PICT_x8r8g8b8 = PIXMAN_x8r8g8b8,
+ PICT_a8b8g8r8 = PIXMAN_a8b8g8r8,
+ PICT_x8b8g8r8 = PIXMAN_x8b8g8r8,
+ PICT_b8g8r8a8 = PIXMAN_b8g8r8a8,
+ PICT_b8g8r8x8 = PIXMAN_b8g8r8x8,
+
+/* 24bpp formats */
+ PICT_r8g8b8 = PIXMAN_r8g8b8,
+ PICT_b8g8r8 = PIXMAN_b8g8r8,
+
+/* 16bpp formats */
+ PICT_r5g6b5 = PIXMAN_r5g6b5,
+ PICT_b5g6r5 = PIXMAN_b5g6r5,
+
+ PICT_a1r5g5b5 = PIXMAN_a1r5g5b5,
+ PICT_x1r5g5b5 = PIXMAN_x1r5g5b5,
+ PICT_a1b5g5r5 = PIXMAN_a1b5g5r5,
+ PICT_x1b5g5r5 = PIXMAN_x1b5g5r5,
+ PICT_a4r4g4b4 = PIXMAN_a4r4g4b4,
+ PICT_x4r4g4b4 = PIXMAN_x4r4g4b4,
+ PICT_a4b4g4r4 = PIXMAN_a4b4g4r4,
+ PICT_x4b4g4r4 = PIXMAN_x4b4g4r4,
+
+/* 8bpp formats */
+ PICT_a8 = PIXMAN_a8,
+ PICT_r3g3b2 = PIXMAN_r3g3b2,
+ PICT_b2g3r3 = PIXMAN_b2g3r3,
+ PICT_a2r2g2b2 = PIXMAN_a2r2g2b2,
+ PICT_a2b2g2r2 = PIXMAN_a2b2g2r2,
+
+ PICT_c8 = PIXMAN_c8,
+ PICT_g8 = PIXMAN_g8,
+
+ PICT_x4a4 = PIXMAN_x4a4,
+
+ PICT_x4c4 = PIXMAN_x4c4,
+ PICT_x4g4 = PIXMAN_x4g4,
+
+/* 4bpp formats */
+ PICT_a4 = PIXMAN_a4,
+ PICT_r1g2b1 = PIXMAN_r1g2b1,
+ PICT_b1g2r1 = PIXMAN_b1g2r1,
+ PICT_a1r1g1b1 = PIXMAN_a1r1g1b1,
+ PICT_a1b1g1r1 = PIXMAN_a1b1g1r1,
+
+ PICT_c4 = PIXMAN_c4,
+ PICT_g4 = PIXMAN_g4,
+
+/* 1bpp formats */
+ PICT_a1 = PIXMAN_a1,
+
+ PICT_g1 = PIXMAN_g1
+} PictFormatShort;
+
+/*
+ * 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:
+ *
+ * Size Default Policy
+ * ----------------------------
+ * < 64 PolicyMono
+ * < 256 PolicyGray
+ * 256 PolicyColor (only on PseudoColor)
+ *
+ * The actual allocation code lives in miindex.c, and so is
+ * austensibly server dependent, but that code does:
+ *
+ * PolicyMono Allocate no additional colors, use black and white
+ * PolicyGray Allocate 13 gray levels (11 cells used)
+ * PolicyColor Allocate a 4x4x4 cube and 13 gray levels (71 cells used)
+ * PolicyAll Allocate as big a cube as possible, fill with gray (all)
+ *
+ * Here's a picture to help understand how many colors are
+ * actually allocated (this is just the gray ramp):
+ *
+ * gray level
+ * all 0000 1555 2aaa 4000 5555 6aaa 8000 9555 aaaa bfff d555 eaaa ffff
+ * b/w 0000 ffff
+ * 4x4x4 5555 aaaa
+ * extra 1555 2aaa 4000 6aaa 8000 9555 bfff d555 eaaa
+ *
+ * The default colormap supplies two gray levels (black/white), the
+ * 4x4x4 cube allocates another two and nine more are allocated to fill
+ * in the 13 levels. When the 4x4x4 cube is not allocated, a total of
+ * 11 cells are allocated.
+ */
+
+#define PictureCmapPolicyInvalid -1
+#define PictureCmapPolicyDefault 0
+#define PictureCmapPolicyMono 1
+#define PictureCmapPolicyGray 2
+#define PictureCmapPolicyColor 3
+#define PictureCmapPolicyAll 4
+
+extern _X_EXPORT int PictureCmapPolicy;
+
+extern _X_EXPORT int PictureParseCmapPolicy(const char *name);
+
+extern _X_EXPORT int RenderErrBase;
+
+/* Fixed point updates from Carl Worth, USC, Information Sciences Institute */
+
+typedef pixman_fixed_32_32_t xFixed_32_32;
+
+typedef pixman_fixed_48_16_t xFixed_48_16;
+
+#define MAX_FIXED_48_16 pixman_max_fixed_48_16
+#define MIN_FIXED_48_16 pixman_min_fixed_48_16
+
+typedef pixman_fixed_1_31_t xFixed_1_31;
+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)
+ */
+typedef pixman_fixed_t xFixed;
+
+#define XFIXED_BITS 16
+
+#define xFixedToInt(f) pixman_fixed_to_int(f)
+#define IntToxFixed(i) pixman_int_to_fixed(i)
+#define xFixedE pixman_fixed_e
+#define xFixed1 pixman_fixed_1
+#define xFixed1MinusE pixman_fixed_1_minus_e
+#define xFixedFrac(f) pixman_fixed_frac(f)
+#define xFixedFloor(f) pixman_fixed_floor(f)
+#define xFixedCeil(f) pixman_fixed_ceil(f)
+
+#define xFixedFraction(f) pixman_fixed_fraction(f)
+#define xFixedMod2(f) pixman_fixed_mod2(f)
+
+/* whether 't' is a well defined not obviously empty trapezoid */
+#define xTrapezoidValid(t) ((t)->left.p1.y != (t)->left.p2.y && \
+ (t)->right.p1.y != (t)->right.p2.y && \
+ (int) ((t)->bottom - (t)->top) > 0)
+
+/*
+ * Standard NTSC luminance conversions:
+ *
+ * y = r * 0.299 + g * 0.587 + b * 0.114
+ *
+ * Approximate this for a bit more speed:
+ *
+ * y = (r * 153 + g * 301 + b * 58) / 512
+ *
+ * This gives 17 bits of luminance; to get 15 bits, lop the low two
+ */
+
+#define CvtR8G8B8toY15(s) (((((s) >> 16) & 0xff) * 153 + \
+ (((s) >> 8) & 0xff) * 301 + \
+ (((s) ) & 0xff) * 58) >> 2)
+
+#endif /* _PICTURE_H_ */
diff --git a/xorg-server/xfixes/xfixesint.h b/xorg-server/xfixes/xfixesint.h
index 6ba276e8c..71f88a93d 100644
--- a/xorg-server/xfixes/xfixesint.h
+++ b/xorg-server/xfixes/xfixesint.h
@@ -60,242 +60,244 @@
#include "selection.h"
#include "xfixes.h"
-extern int XFixesEventBase;
+extern int XFixesEventBase;
typedef struct _XFixesClient {
- CARD32 major_version;
- CARD32 minor_version;
+ CARD32 major_version;
+ CARD32 minor_version;
} XFixesClientRec, *XFixesClientPtr;
#define GetXFixesClient(pClient) ((XFixesClientPtr)dixLookupPrivate(&(pClient)->devPrivates, XFixesClientPrivateKey))
-extern int (*ProcXFixesVector[XFixesNumberRequests])(ClientPtr);
+extern int (*ProcXFixesVector[XFixesNumberRequests]) (ClientPtr);
/* Initialize extension at server startup time */
void
-XFixesExtensionInit(void);
+ XFixesExtensionInit(void);
/* Save set */
int
-ProcXFixesChangeSaveSet(ClientPtr client);
-
+ ProcXFixesChangeSaveSet(ClientPtr client);
+
int
-SProcXFixesChangeSaveSet(ClientPtr client);
-
+ SProcXFixesChangeSaveSet(ClientPtr client);
+
/* Selection events */
int
-ProcXFixesSelectSelectionInput (ClientPtr client);
+ ProcXFixesSelectSelectionInput(ClientPtr client);
int
-SProcXFixesSelectSelectionInput (ClientPtr client);
+ SProcXFixesSelectSelectionInput(ClientPtr client);
void
-SXFixesSelectionNotifyEvent (xXFixesSelectionNotifyEvent *from,
- xXFixesSelectionNotifyEvent *to);
+
+SXFixesSelectionNotifyEvent(xXFixesSelectionNotifyEvent * from,
+ xXFixesSelectionNotifyEvent * to);
Bool
-XFixesSelectionInit (void);
+ XFixesSelectionInit(void);
/* Cursor notification */
Bool
-XFixesCursorInit (void);
-
+ XFixesCursorInit(void);
+
int
-ProcXFixesSelectCursorInput (ClientPtr client);
+ ProcXFixesSelectCursorInput(ClientPtr client);
int
-SProcXFixesSelectCursorInput (ClientPtr client);
+ SProcXFixesSelectCursorInput(ClientPtr client);
void
-SXFixesCursorNotifyEvent (xXFixesCursorNotifyEvent *from,
- xXFixesCursorNotifyEvent *to);
+
+SXFixesCursorNotifyEvent(xXFixesCursorNotifyEvent * from,
+ xXFixesCursorNotifyEvent * to);
int
-ProcXFixesGetCursorImage (ClientPtr client);
+ ProcXFixesGetCursorImage(ClientPtr client);
int
-SProcXFixesGetCursorImage (ClientPtr client);
+ SProcXFixesGetCursorImage(ClientPtr client);
/* Cursor names (Version 2) */
int
-ProcXFixesSetCursorName (ClientPtr client);
+ ProcXFixesSetCursorName(ClientPtr client);
int
-SProcXFixesSetCursorName (ClientPtr client);
+ SProcXFixesSetCursorName(ClientPtr client);
int
-ProcXFixesGetCursorName (ClientPtr client);
+ ProcXFixesGetCursorName(ClientPtr client);
int
-SProcXFixesGetCursorName (ClientPtr client);
+ SProcXFixesGetCursorName(ClientPtr client);
int
-ProcXFixesGetCursorImageAndName (ClientPtr client);
+ ProcXFixesGetCursorImageAndName(ClientPtr client);
int
-SProcXFixesGetCursorImageAndName (ClientPtr client);
+ SProcXFixesGetCursorImageAndName(ClientPtr client);
/* Cursor replacement (Version 2) */
int
-ProcXFixesChangeCursor (ClientPtr client);
+ ProcXFixesChangeCursor(ClientPtr client);
int
-SProcXFixesChangeCursor (ClientPtr client);
+ SProcXFixesChangeCursor(ClientPtr client);
int
-ProcXFixesChangeCursorByName (ClientPtr client);
+ ProcXFixesChangeCursorByName(ClientPtr client);
int
-SProcXFixesChangeCursorByName (ClientPtr client);
+ SProcXFixesChangeCursorByName(ClientPtr client);
/* Region objects (Version 2* */
Bool
-XFixesRegionInit (void);
+ XFixesRegionInit(void);
int
-ProcXFixesCreateRegion (ClientPtr client);
+ ProcXFixesCreateRegion(ClientPtr client);
int
-SProcXFixesCreateRegion (ClientPtr client);
+ SProcXFixesCreateRegion(ClientPtr client);
int
-ProcXFixesCreateRegionFromBitmap (ClientPtr client);
+ ProcXFixesCreateRegionFromBitmap(ClientPtr client);
int
-SProcXFixesCreateRegionFromBitmap (ClientPtr client);
+ SProcXFixesCreateRegionFromBitmap(ClientPtr client);
int
-ProcXFixesCreateRegionFromWindow (ClientPtr client);
+ ProcXFixesCreateRegionFromWindow(ClientPtr client);
int
-SProcXFixesCreateRegionFromWindow (ClientPtr client);
+ SProcXFixesCreateRegionFromWindow(ClientPtr client);
int
-ProcXFixesCreateRegionFromGC (ClientPtr client);
+ ProcXFixesCreateRegionFromGC(ClientPtr client);
int
-SProcXFixesCreateRegionFromGC (ClientPtr client);
+ SProcXFixesCreateRegionFromGC(ClientPtr client);
int
-ProcXFixesCreateRegionFromPicture (ClientPtr client);
+ ProcXFixesCreateRegionFromPicture(ClientPtr client);
int
-SProcXFixesCreateRegionFromPicture (ClientPtr client);
+ SProcXFixesCreateRegionFromPicture(ClientPtr client);
int
-ProcXFixesDestroyRegion (ClientPtr client);
+ ProcXFixesDestroyRegion(ClientPtr client);
int
-SProcXFixesDestroyRegion (ClientPtr client);
+ SProcXFixesDestroyRegion(ClientPtr client);
int
-ProcXFixesSetRegion (ClientPtr client);
+ ProcXFixesSetRegion(ClientPtr client);
int
-SProcXFixesSetRegion (ClientPtr client);
+ SProcXFixesSetRegion(ClientPtr client);
int
-ProcXFixesCopyRegion (ClientPtr client);
+ ProcXFixesCopyRegion(ClientPtr client);
int
-SProcXFixesCopyRegion (ClientPtr client);
+ SProcXFixesCopyRegion(ClientPtr client);
int
-ProcXFixesCombineRegion (ClientPtr client);
+ ProcXFixesCombineRegion(ClientPtr client);
int
-SProcXFixesCombineRegion (ClientPtr client);
+ SProcXFixesCombineRegion(ClientPtr client);
int
-ProcXFixesInvertRegion (ClientPtr client);
+ ProcXFixesInvertRegion(ClientPtr client);
int
-SProcXFixesInvertRegion (ClientPtr client);
+ SProcXFixesInvertRegion(ClientPtr client);
int
-ProcXFixesTranslateRegion (ClientPtr client);
+ ProcXFixesTranslateRegion(ClientPtr client);
int
-SProcXFixesTranslateRegion (ClientPtr client);
+ SProcXFixesTranslateRegion(ClientPtr client);
int
-ProcXFixesRegionExtents (ClientPtr client);
+ ProcXFixesRegionExtents(ClientPtr client);
int
-SProcXFixesRegionExtents (ClientPtr client);
+ SProcXFixesRegionExtents(ClientPtr client);
int
-ProcXFixesFetchRegion (ClientPtr client);
+ ProcXFixesFetchRegion(ClientPtr client);
int
-SProcXFixesFetchRegion (ClientPtr client);
+ SProcXFixesFetchRegion(ClientPtr client);
int
-ProcXFixesSetGCClipRegion (ClientPtr client);
+ ProcXFixesSetGCClipRegion(ClientPtr client);
int
-SProcXFixesSetGCClipRegion (ClientPtr client);
+ SProcXFixesSetGCClipRegion(ClientPtr client);
int
-ProcXFixesSetWindowShapeRegion (ClientPtr client);
+ ProcXFixesSetWindowShapeRegion(ClientPtr client);
int
-SProcXFixesSetWindowShapeRegion (ClientPtr client);
+ SProcXFixesSetWindowShapeRegion(ClientPtr client);
int
-ProcXFixesSetPictureClipRegion (ClientPtr client);
+ ProcXFixesSetPictureClipRegion(ClientPtr client);
int
-SProcXFixesSetPictureClipRegion (ClientPtr client);
+ SProcXFixesSetPictureClipRegion(ClientPtr client);
int
-ProcXFixesExpandRegion (ClientPtr client);
+ ProcXFixesExpandRegion(ClientPtr client);
int
-SProcXFixesExpandRegion (ClientPtr client);
+ SProcXFixesExpandRegion(ClientPtr client);
int
-PanoramiXFixesSetGCClipRegion (ClientPtr client);
+ PanoramiXFixesSetGCClipRegion(ClientPtr client);
int
-PanoramiXFixesSetWindowShapeRegion (ClientPtr client);
+ PanoramiXFixesSetWindowShapeRegion(ClientPtr client);
int
-PanoramiXFixesSetPictureClipRegion (ClientPtr client);
+ PanoramiXFixesSetPictureClipRegion(ClientPtr client);
/* Cursor Visibility (Version 4) */
-int
-ProcXFixesHideCursor (ClientPtr client);
+int
+ ProcXFixesHideCursor(ClientPtr client);
-int
-SProcXFixesHideCursor (ClientPtr client);
+int
+ SProcXFixesHideCursor(ClientPtr client);
-int
-ProcXFixesShowCursor (ClientPtr client);
+int
+ ProcXFixesShowCursor(ClientPtr client);
-int
-SProcXFixesShowCursor (ClientPtr client);
+int
+ SProcXFixesShowCursor(ClientPtr client);
/* Version 5 */
int
-ProcXFixesCreatePointerBarrier (ClientPtr client);
+ ProcXFixesCreatePointerBarrier(ClientPtr client);
int
-SProcXFixesCreatePointerBarrier (ClientPtr client);
+ SProcXFixesCreatePointerBarrier(ClientPtr client);
int
-ProcXFixesDestroyPointerBarrier (ClientPtr client);
+ ProcXFixesDestroyPointerBarrier(ClientPtr client);
int
-SProcXFixesDestroyPointerBarrier (ClientPtr client);
+ SProcXFixesDestroyPointerBarrier(ClientPtr client);
/* Xinerama */
-extern int (*PanoramiXSaveXFixesVector[XFixesNumberRequests])(ClientPtr);
-void PanoramiXFixesInit (void);
-void PanoramiXFixesReset (void);
+extern int (*PanoramiXSaveXFixesVector[XFixesNumberRequests]) (ClientPtr);
+void PanoramiXFixesInit(void);
+void PanoramiXFixesReset(void);
-#endif /* _XFIXESINT_H_ */
+#endif /* _XFIXESINT_H_ */
diff --git a/xorg-server/xkb/ddxCtrls.c b/xorg-server/xkb/ddxCtrls.c
index 04de608df..0805fb208 100644
--- a/xorg-server/xkb/ddxCtrls.c
+++ b/xorg-server/xkb/ddxCtrls.c
@@ -39,20 +39,19 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/extensions/XI.h>
void
-XkbDDXKeybdCtrlProc(DeviceIntPtr dev,KeybdCtrl *ctrl)
+XkbDDXKeybdCtrlProc(DeviceIntPtr dev, KeybdCtrl * ctrl)
{
-int realRepeat;
+ int realRepeat;
- realRepeat= ctrl->autoRepeat;
- if ((dev->kbdfeed)&&(XkbDDXUsesSoftRepeat(dev)))
- ctrl->autoRepeat= 0;
+ realRepeat = ctrl->autoRepeat;
+ if ((dev->kbdfeed) && (XkbDDXUsesSoftRepeat(dev)))
+ ctrl->autoRepeat = 0;
if (dev->key && dev->key->xkbInfo && dev->key->xkbInfo->kbdProc)
- (*dev->key->xkbInfo->kbdProc)(dev,ctrl);
- ctrl->autoRepeat= realRepeat;
+ (*dev->key->xkbInfo->kbdProc) (dev, ctrl);
+ ctrl->autoRepeat = realRepeat;
return;
}
-
int
XkbDDXUsesSoftRepeat(DeviceIntPtr pXDev)
{
@@ -60,15 +59,15 @@ XkbDDXUsesSoftRepeat(DeviceIntPtr pXDev)
}
void
-XkbDDXChangeControls(DeviceIntPtr dev,XkbControlsPtr old,XkbControlsPtr new)
+XkbDDXChangeControls(DeviceIntPtr dev, XkbControlsPtr old, XkbControlsPtr new)
{
-unsigned changed, i;
-unsigned char *rep_old, *rep_new, *rep_fb;
+ unsigned changed, i;
+ unsigned char *rep_old, *rep_new, *rep_fb;
- changed= new->enabled_ctrls^old->enabled_ctrls;
+ changed = new->enabled_ctrls ^ old->enabled_ctrls;
for (rep_old = old->per_key_repeat,
rep_new = new->per_key_repeat,
- rep_fb = dev->kbdfeed->ctrl.autoRepeats,
+ rep_fb = dev->kbdfeed->ctrl.autoRepeats,
i = 0; i < XkbPerKeyBitArraySize; i++) {
if (rep_old[i] != rep_new[i]) {
rep_fb[i] = rep_new[i];
@@ -76,10 +75,9 @@ unsigned char *rep_old, *rep_new, *rep_fb;
}
}
- if (changed&XkbPerKeyRepeatMask) {
- if (dev->kbdfeed->CtrlProc)
- (*dev->kbdfeed->CtrlProc)(dev,&dev->kbdfeed->ctrl);
+ if (changed & XkbPerKeyRepeatMask) {
+ if (dev->kbdfeed->CtrlProc)
+ (*dev->kbdfeed->CtrlProc) (dev, &dev->kbdfeed->ctrl);
}
return;
}
-
diff --git a/xorg-server/xkb/ddxKillSrv.c b/xorg-server/xkb/ddxKillSrv.c
index 106b39587..1cabb1bd7 100644
--- a/xorg-server/xkb/ddxKillSrv.c
+++ b/xorg-server/xkb/ddxKillSrv.c
@@ -38,7 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <xkbsrv.h>
int
-XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act)
+XkbDDXTerminateServer(DeviceIntPtr dev, KeyCode key, XkbAction *act)
{
if (dev != inputInfo.keyboard)
GiveUp(1);
diff --git a/xorg-server/xkb/ddxPrivate.c b/xorg-server/xkb/ddxPrivate.c
index f1c85f6ea..fcde3a18c 100644
--- a/xorg-server/xkb/ddxPrivate.c
+++ b/xorg-server/xkb/ddxPrivate.c
@@ -8,7 +8,7 @@
#include <xkbsrv.h>
int
-XkbDDXPrivate(DeviceIntPtr dev,KeyCode key,XkbAction *act)
+XkbDDXPrivate(DeviceIntPtr dev, KeyCode key, XkbAction *act)
{
return 0;
}
diff --git a/xorg-server/xkb/ddxVT.c b/xorg-server/xkb/ddxVT.c
index cbd453706..65291026a 100644
--- a/xorg-server/xkb/ddxVT.c
+++ b/xorg-server/xkb/ddxVT.c
@@ -38,7 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <xkbsrv.h>
int
-XkbDDXSwitchScreen(DeviceIntPtr dev,KeyCode key,XkbAction *act)
+XkbDDXSwitchScreen(DeviceIntPtr dev, KeyCode key, XkbAction *act)
{
return 1;
}