From d6d3999ccb2cb72d55820770260172eccbbb68d7 Mon Sep 17 00:00:00 2001
From: marha
Date: Mon, 16 Apr 2012 09:17:34 +0200
Subject: libX11 xserver pixman mesa git update 16 Apr 2012
---
libX11/specs/libX11/CH04.xml | 2 +-
mesalib/Android.mk | 4 +-
mesalib/configs/autoconf.in | 6 +
mesalib/configure.ac | 24 +-
mesalib/docs/GL3.txt | 2 +-
mesalib/docs/viewperf.html | 31 +
mesalib/src/gallium/auxiliary/util/u_blitter.c | 2 +-
mesalib/src/gallium/auxiliary/util/u_double_list.h | 287 +--
mesalib/src/gallium/auxiliary/util/u_dual_blend.h | 26 +
mesalib/src/gallium/auxiliary/util/u_linkage.h | 9 +-
mesalib/src/glsl/Makefile.sources | 1 +
mesalib/src/glsl/ast.h | 12 +
mesalib/src/glsl/ast_to_hir.cpp | 9 +-
mesalib/src/glsl/builtin_variables.cpp | 1 +
mesalib/src/glsl/glsl_parser.yy | 20 +
mesalib/src/glsl/ir.h | 6 +
mesalib/src/glsl/ir_builder.cpp | 183 ++
mesalib/src/glsl/ir_builder.h | 105 +
mesalib/src/glsl/ir_clone.cpp | 4 +
mesalib/src/glsl/ir_set_program_inouts.cpp | 4 +-
mesalib/src/glsl/linker.cpp | 13 +-
mesalib/src/glsl/opt_if_simplification.cpp | 8 +
mesalib/src/mesa/main/blend.c | 11 +
mesalib/src/mesa/main/context.c | 36 +
mesalib/src/mesa/main/extensions.c | 2 +-
mesalib/src/mesa/main/ff_fragment_shader.cpp | 321 +--
mesalib/src/mesa/main/format_pack.c | 2 +-
mesalib/src/mesa/main/get.c | 3 +
mesalib/src/mesa/main/mtypes.h | 4 +
mesalib/src/mesa/main/shader_query.cpp | 85 +-
mesalib/src/mesa/main/shaderapi.c | 3 +
mesalib/src/mesa/main/shaderapi.h | 7 +
mesalib/src/mesa/main/shaderobj.c | 6 +
mesalib/src/mesa/state_tracker/st_atom_blend.c | 8 +-
mesalib/src/mesa/state_tracker/st_extensions.c | 7 +
mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +-
pixman/configure.ac | 2 +-
pixman/pixman/pixman-mmx.c | 5 +
xorg-server/Xext/bigreq.c | 16 +-
xorg-server/Xext/dpmsproc.h | 2 +-
xorg-server/Xext/geint.h | 107 +-
xorg-server/Xext/panoramiX.h | 29 +-
xorg-server/Xext/panoramiXh.h | 16 +-
xorg-server/Xext/securitysrv.h | 45 +-
xorg-server/Xext/shmint.h | 14 +-
xorg-server/Xext/syncsdk.h | 93 +-
xorg-server/Xext/xacestr.h | 2 +-
xorg-server/Xext/xselinux.h | 116 +-
xorg-server/Xext/xselinux_ext.c | 308 +--
xorg-server/Xi/allowev.c | 32 +-
xorg-server/Xi/allowev.h | 6 +-
xorg-server/Xi/chgdctl.h | 10 +-
xorg-server/Xi/chgfctl.h | 6 +-
xorg-server/Xi/chgkbd.c | 2 +-
xorg-server/Xi/chgkbd.h | 6 +-
xorg-server/Xi/chgkmap.c | 8 +-
xorg-server/Xi/chgkmap.h | 6 +-
xorg-server/Xi/chgprop.h | 6 +-
xorg-server/Xi/chgptr.c | 6 +-
xorg-server/Xi/chgptr.h | 14 +-
xorg-server/Xi/closedev.c | 40 +-
xorg-server/Xi/closedev.h | 6 +-
xorg-server/Xi/devbell.h | 6 +-
xorg-server/Xi/exevents.c | 86 +-
xorg-server/Xi/exglobals.h | 3 +-
xorg-server/Xi/getbmap.c | 12 +-
xorg-server/Xi/getbmap.h | 10 +-
xorg-server/Xi/getdctl.h | 10 +-
xorg-server/Xi/getfctl.c | 110 +-
xorg-server/Xi/getfctl.h | 10 +-
xorg-server/Xi/getfocus.c | 18 +-
xorg-server/Xi/getfocus.h | 10 +-
xorg-server/Xi/getkmap.c | 22 +-
xorg-server/Xi/getkmap.h | 10 +-
xorg-server/Xi/getmmap.c | 10 +-
xorg-server/Xi/getmmap.h | 10 +-
xorg-server/Xi/getprop.h | 18 +-
xorg-server/Xi/getselev.c | 72 +-
xorg-server/Xi/getselev.h | 10 +-
xorg-server/Xi/getvers.c | 10 +-
xorg-server/Xi/getvers.h | 10 +-
xorg-server/Xi/grabdev.h | 20 +-
xorg-server/Xi/grabdevb.h | 6 +-
xorg-server/Xi/grabdevk.h | 6 +-
xorg-server/Xi/gtmotion.c | 48 +-
xorg-server/Xi/gtmotion.h | 10 +-
xorg-server/Xi/listdev.h | 12 +-
xorg-server/Xi/opendev.h | 10 +-
xorg-server/Xi/queryst.h | 10 +-
xorg-server/Xi/selectev.h | 6 +-
xorg-server/Xi/sendexev.h | 6 +-
xorg-server/Xi/setbmap.h | 10 +-
xorg-server/Xi/setdval.c | 26 +-
xorg-server/Xi/setdval.h | 10 +-
xorg-server/Xi/setfocus.c | 10 +-
xorg-server/Xi/setfocus.h | 6 +-
xorg-server/Xi/setmmap.c | 14 +-
xorg-server/Xi/setmmap.h | 10 +-
xorg-server/Xi/setmode.h | 10 +-
xorg-server/Xi/ungrdev.c | 12 +-
xorg-server/Xi/ungrdev.h | 6 +-
xorg-server/Xi/ungrdevb.h | 6 +-
xorg-server/Xi/ungrdevk.h | 6 +-
xorg-server/Xi/xiallowev.h | 2 +-
xorg-server/Xi/xichangecursor.h | 6 +-
xorg-server/Xi/xichangehierarchy.h | 6 +-
xorg-server/Xi/xigetclientpointer.h | 12 +-
xorg-server/Xi/xigrabdev.h | 2 +-
xorg-server/Xi/xiquerydevice.c | 2 +-
xorg-server/Xi/xiquerydevice.h | 20 +-
xorg-server/Xi/xiquerypointer.h | 10 +-
xorg-server/Xi/xiqueryversion.h | 4 +-
xorg-server/Xi/xiselectev.h | 4 +-
xorg-server/Xi/xisetclientpointer.h | 6 +-
xorg-server/Xi/xisetdevfocus.c | 28 +-
xorg-server/Xi/xisetdevfocus.h | 4 +-
xorg-server/Xi/xiwarppointer.h | 6 +-
xorg-server/composite/compositeext.h | 4 +-
xorg-server/config/config-backends.h | 18 +-
xorg-server/damageext/damageext.h | 4 +-
xorg-server/damageext/damageextint.h | 142 +-
xorg-server/dix/dispatch.h | 290 +--
xorg-server/dix/events.c | 3 +-
xorg-server/dix/ffs.c | 3 +-
xorg-server/dix/getevents.c | 2 +-
xorg-server/fb/fbbits.c | 2 +-
xorg-server/fb/fbrop.h | 21 +-
xorg-server/glx/extension_string.c | 96 +-
xorg-server/glx/extension_string.h | 36 +-
xorg-server/glx/glxbyteorder.h | 4 +-
xorg-server/glx/glxdrawable.h | 28 +-
xorg-server/glx/glxext.h | 11 +-
xorg-server/glx/glxutil.h | 14 +-
xorg-server/glx/indirect_reqsize.c | 88 +-
xorg-server/glx/indirect_size_get.c | 3 -
xorg-server/glx/indirect_table.h | 8 +-
xorg-server/glx/singlesize.h | 8 +-
xorg-server/glx/unpack.h | 461 +++--
xorg-server/hw/dmx/config/Canvas.h | 8 +-
xorg-server/hw/dmx/config/CanvasP.h | 10 +-
xorg-server/hw/dmx/config/dmxconfig.h | 4 +-
xorg-server/hw/dmx/config/dmxprint.h | 4 +-
xorg-server/hw/dmx/dmx-config.h | 2 +-
xorg-server/hw/dmx/dmx.h | 798 ++++----
xorg-server/hw/dmx/dmxcb.h | 2 +-
xorg-server/hw/dmx/dmxclient.h | 20 +-
xorg-server/hw/dmx/dmxcmap.h | 131 +-
xorg-server/hw/dmx/dmxcursor.h | 9 +-
xorg-server/hw/dmx/dmxdpms.h | 6 +-
xorg-server/hw/dmx/dmxfont.h | 4 +-
xorg-server/hw/dmx/dmxgc.h | 171 +-
xorg-server/hw/dmx/dmxgcops.h | 64 +-
xorg-server/hw/dmx/dmxinit.h | 16 +-
xorg-server/hw/dmx/dmxlog.h | 18 +-
xorg-server/hw/dmx/dmxpixmap.h | 127 +-
xorg-server/hw/dmx/dmxscrinit.h | 96 +-
xorg-server/hw/dmx/dmxshadow.h | 2 +-
xorg-server/hw/dmx/dmxstat.h | 14 +-
xorg-server/hw/dmx/dmxsync.h | 2 +-
xorg-server/hw/dmx/dmxvisual.h | 10 +-
xorg-server/hw/dmx/glxProxy/compsize.h | 2 +-
xorg-server/hw/dmx/glxProxy/global.c | 2 +-
xorg-server/hw/dmx/glxProxy/glxcmds.h | 12 +-
xorg-server/hw/dmx/glxProxy/glxcontext.h | 56 +-
xorg-server/hw/dmx/glxProxy/glxdrawable.h | 5 +-
xorg-server/hw/dmx/glxProxy/glxerror.h | 1 -
xorg-server/hw/dmx/glxProxy/glxscreens.h | 7 +-
xorg-server/hw/dmx/glxProxy/glxsingle.h | 30 +-
xorg-server/hw/dmx/glxProxy/glxswap.h | 12 +-
xorg-server/hw/dmx/glxProxy/unpack.h | 453 +++--
xorg-server/hw/dmx/input/ChkNotMaskEv.h | 2 +-
xorg-server/hw/dmx/input/atKeynames.h | 584 +++---
xorg-server/hw/dmx/input/dmxarg.h | 10 +-
xorg-server/hw/dmx/input/dmxbackend.h | 26 +-
xorg-server/hw/dmx/input/dmxcommon.h | 40 +-
xorg-server/hw/dmx/input/dmxconsole.h | 34 +-
xorg-server/hw/dmx/input/dmxevents.h | 4 +-
xorg-server/hw/dmx/input/dmxmap.h | 2 +-
xorg-server/hw/dmx/input/dmxsigio.h | 4 +-
xorg-server/hw/dmx/input/lnx-keyboard.h | 44 +-
xorg-server/hw/dmx/input/lnx-ms.h | 26 +-
xorg-server/hw/dmx/input/lnx-ps2.h | 26 +-
xorg-server/hw/dmx/input/usb-private.h | 22 +-
xorg-server/hw/kdrive/ephyr/ephyrglxext.h | 3 +-
xorg-server/hw/kdrive/ephyr/ephyrlog.h | 10 +-
xorg-server/hw/kdrive/ephyr/ephyrproxyext.h | 3 +-
xorg-server/hw/kdrive/fake/fakeinit.c | 86 +-
xorg-server/hw/kdrive/fake/kbd.c | 12 +-
xorg-server/hw/kdrive/fake/mouse.c | 9 +-
xorg-server/hw/kdrive/fake/os.c | 13 +-
xorg-server/hw/kdrive/fbdev/fbdev.h | 56 +-
xorg-server/hw/kdrive/src/fourcc.h | 3 +-
xorg-server/hw/xfree86/common/fourcc.h | 3 +-
xorg-server/hw/xfree86/common/xf86Bus.h | 32 +-
xorg-server/hw/xfree86/common/xf86Config.h | 10 +-
xorg-server/hw/xfree86/common/xf86DPMS.c | 68 +-
xorg-server/hw/xfree86/common/xf86Events.c | 8 +-
xorg-server/hw/xfree86/common/xf86InPriv.h | 86 +-
xorg-server/hw/xfree86/common/xf86PciInfo.h | 23 +-
xorg-server/hw/xfree86/common/xf86Privstr.h | 120 +-
xorg-server/hw/xfree86/common/xf86VGAarbiter.h | 97 +-
xorg-server/hw/xfree86/common/xf86Xinput.h | 3 +
xorg-server/hw/xfree86/common/xf86fbBus.c | 16 +-
xorg-server/hw/xfree86/common/xf86noBus.c | 2 +-
xorg-server/hw/xfree86/common/xf86pciBus.h | 90 +-
xorg-server/hw/xfree86/common/xf86xvpriv.h | 176 +-
xorg-server/hw/xfree86/common/xorgHelper.c | 1 -
xorg-server/hw/xfree86/common/xorgVersion.h | 26 +-
xorg-server/hw/xfree86/dixmods/extmod/xvmod.c | 1 -
xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h | 8 +-
xorg-server/hw/xfree86/dixmods/recordmod.c | 23 +-
xorg-server/hw/xfree86/dixmods/xkbKillSrv.c | 2 +-
xorg-server/hw/xfree86/dixmods/xkbPrivate.c | 19 +-
xorg-server/hw/xfree86/dixmods/xkbVT.c | 8 +-
xorg-server/hw/xfree86/dri/sarea.h | 33 +-
xorg-server/hw/xfree86/fbdevhw/fbpriv.h | 330 ++--
xorg-server/hw/xfree86/i2c/bt829.h | 90 +-
xorg-server/hw/xfree86/i2c/fi1236.h | 110 +-
xorg-server/hw/xfree86/i2c/msp3430.h | 53 +-
xorg-server/hw/xfree86/i2c/tda9850.h | 21 +-
xorg-server/hw/xfree86/i2c/tda9885.h | 62 +-
xorg-server/hw/xfree86/i2c/uda1380.h | 17 +-
xorg-server/hw/xfree86/int10/stub.c | 2 +-
xorg-server/hw/xfree86/int10/xf86x86emu.c | 38 +-
xorg-server/hw/xfree86/loader/loader.h | 152 +-
xorg-server/hw/xfree86/loader/loaderProcs.h | 188 +-
xorg-server/hw/xfree86/loader/os.c | 2 +-
xorg-server/hw/xfree86/modes/xf86Rename.h | 2 +-
xorg-server/hw/xfree86/os-support/bsd/bsd_VTsw.c | 206 +-
xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c | 30 +-
xorg-server/hw/xfree86/os-support/bus/Pci.c | 2 +-
xorg-server/hw/xfree86/os-support/bus/Pci.h | 5 +-
xorg-server/hw/xfree86/os-support/bus/xf86Sbus.h | 2 +-
xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c | 118 +-
xorg-server/hw/xfree86/os-support/linux/lnx_bell.c | 2 +-
xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c | 30 +-
xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c | 127 +-
.../hw/xfree86/os-support/shared/VTsw_noop.c | 120 +-
.../hw/xfree86/os-support/shared/VTsw_usl.c | 172 +-
.../hw/xfree86/os-support/shared/agp_noop.c | 23 +-
.../hw/xfree86/os-support/shared/ioperm_noop.c | 5 +-
xorg-server/hw/xfree86/os-support/shared/pm_noop.c | 4 +-
.../hw/xfree86/os-support/shared/sigiostubs.c | 19 +-
xorg-server/hw/xfree86/os-support/shared/xf86Axp.h | 37 +-
.../hw/xfree86/os-support/solaris/sun_agp.c | 389 ++--
xorg-server/hw/xfree86/os-support/stub/stub_bios.c | 4 +-
xorg-server/hw/xfree86/os-support/stub/stub_init.c | 2 +-
.../hw/xfree86/os-support/stub/stub_video.c | 4 +-
xorg-server/hw/xfree86/os-support/xf86OSpriv.h | 32 +-
xorg-server/hw/xfree86/os-support/xf86_OSlib.h | 409 ++--
xorg-server/hw/xfree86/parser/xf86tokens.h | 19 +-
xorg-server/hw/xfree86/ramdac/BTPriv.h | 8 +-
xorg-server/hw/xfree86/ramdac/IBMPriv.h | 22 +-
xorg-server/hw/xfree86/ramdac/TIPriv.h | 6 +-
xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h | 103 +-
xorg-server/hw/xfree86/ramdac/xf86RamDac.c | 304 +--
xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c | 24 +-
xorg-server/hw/xfree86/ramdac/xf86RamDacPriv.h | 4 +-
xorg-server/hw/xfree86/vgahw/vgaHWmodule.c | 20 +-
xorg-server/hw/xfree86/x86emu/x86emu.h | 75 +-
xorg-server/hw/xfree86/x86emu/x86emu/debug.h | 163 +-
xorg-server/hw/xfree86/x86emu/x86emu/decode.h | 57 +-
xorg-server/hw/xfree86/x86emu/x86emu/fpu.h | 23 +-
xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h | 44 +-
xorg-server/hw/xfree86/x86emu/x86emu/ops.h | 6 +-
xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h | 251 ++-
xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h | 189 +-
xorg-server/hw/xfree86/x86emu/x86emu/regs.h | 101 +-
xorg-server/hw/xfree86/x86emu/x86emu/types.h | 23 +-
xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h | 34 +-
xorg-server/hw/xfree86/xaa/xaaBitOrder.c | 8 +-
xorg-server/hw/xfree86/xaa/xaacexp.h | 95 +-
xorg-server/hw/xfree86/xaa/xaawrap.h | 154 +-
xorg-server/hw/xnest/Args.h | 20 +-
xorg-server/hw/xnest/Color.h | 115 +-
xorg-server/hw/xnest/Display.h | 8 +-
xorg-server/hw/xnest/Drawable.h | 52 +-
xorg-server/hw/xnest/Events.h | 2 +-
xorg-server/hw/xnest/Handlers.c | 6 +-
xorg-server/hw/xnest/Handlers.h | 4 +-
xorg-server/hw/xnest/Init.h | 2 +-
xorg-server/hw/xnest/Keyboard.h | 4 +-
xorg-server/hw/xnest/Pixmap.c | 162 +-
xorg-server/hw/xnest/Pointer.h | 4 +-
xorg-server/hw/xnest/Screen.h | 2 +-
xorg-server/hw/xnest/Visual.c | 50 +-
xorg-server/hw/xnest/Visual.h | 4 +-
xorg-server/hw/xnest/XNFont.h | 4 +-
xorg-server/hw/xnest/XNGC.h | 5 +-
xorg-server/hw/xnest/XNPixmap.h | 75 +-
xorg-server/hw/xnest/XNWindow.h | 147 +-
xorg-server/hw/xnest/Xnest.h | 8 +-
xorg-server/hw/xnest/xnest-config.h | 2 +-
xorg-server/hw/xquartz/sanitizedCarbon.h | 10 +-
xorg-server/hw/xquartz/sanitizedCocoa.h | 10 +-
xorg-server/hw/xwin/winclip.c | 6 +-
xorg-server/hw/xwin/winfont.c | 50 +-
xorg-server/hw/xwin/winglobals.c | 96 +-
xorg-server/hw/xwin/winglobals.h | 177 +-
xorg-server/hw/xwin/winkeynames.h | 40 +-
xorg-server/hw/xwin/winmessages.h | 2051 ++++++++++----------
xorg-server/hw/xwin/winmonitors.h | 12 +-
xorg-server/hw/xwin/winms.h | 2 +-
xorg-server/hw/xwin/winmultiwindowclass.h | 79 +-
xorg-server/hw/xwin/winresource.h | 2 -
xorg-server/include/closestr.h | 253 ++-
xorg-server/include/closure.h | 13 +-
xorg-server/include/cursorstr.h | 197 +-
xorg-server/include/dixaccess.h | 58 +-
xorg-server/include/dixfontstr.h | 6 +-
xorg-server/include/eventconvert.h | 2 +-
xorg-server/include/events.h | 2 +
xorg-server/include/globals.h | 4 +-
xorg-server/include/hotplug.h | 2 +-
xorg-server/include/miscstruct.h | 11 +-
xorg-server/include/opaque.h | 154 +-
xorg-server/include/optionstr.h | 3 +-
xorg-server/include/pixmapstr.h | 171 +-
xorg-server/include/propertyst.h | 134 +-
xorg-server/include/ptrveloc.h | 71 +-
xorg-server/include/region.h | 3 +-
xorg-server/include/registry.h | 8 +-
xorg-server/include/rgb.h | 7 +-
xorg-server/include/selection.h | 17 +-
xorg-server/include/servermd.h | 706 ++++---
xorg-server/include/site.h | 253 ++-
xorg-server/include/validate.h | 2 +-
xorg-server/include/windowstr.h | 123 +-
xorg-server/include/xkbstr.h | 763 ++++----
xorg-server/include/xserver-properties.h | 2 -
xorg-server/mi/mibstore.c | 86 +-
xorg-server/mi/mibstore.h | 46 +-
xorg-server/mi/micoord.h | 2 +-
xorg-server/mi/micursor.c | 3 +-
xorg-server/mi/mipointrst.h | 31 +-
xorg-server/mi/miscanfill.h | 13 +-
xorg-server/mi/mistruct.h | 17 +-
xorg-server/mi/mivalidate.h | 102 +-
xorg-server/miext/cw/cw.h | 342 ++--
xorg-server/miext/damage/damagestr.h | 72 +-
xorg-server/miext/rootless/rootlessCommon.h | 574 +++---
xorg-server/miext/rootless/rootlessConfig.h | 124 +-
xorg-server/miext/shadow/shalloc.c | 99 +-
xorg-server/os/strcasecmp.c | 4 +-
xorg-server/os/strcasestr.c | 28 +-
xorg-server/os/strlcat.c | 117 +-
xorg-server/os/strndup.c | 18 +-
xorg-server/render/picture.h | 463 ++---
xorg-server/xfixes/xfixesint.h | 174 +-
xorg-server/xkb/ddxCtrls.c | 32 +-
xorg-server/xkb/ddxKillSrv.c | 2 +-
xorg-server/xkb/ddxPrivate.c | 2 +-
xorg-server/xkb/ddxVT.c | 2 +-
353 files changed, 10921 insertions(+), 10346 deletions(-)
create mode 100644 mesalib/src/gallium/auxiliary/util/u_dual_blend.h
create mode 100644 mesalib/src/glsl/ir_builder.cpp
create mode 100644 mesalib/src/glsl/ir_builder.h
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
actual_format_return
nitems_return
bytes_after_return
- .br prop_return
+ prop_return
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.
+
+
+Maya-03 test 2
+
+
+This test makes some unusual calls to glRotate. For example:
+
+
+glRotate(50, 50, 50, 1);
+glRotate(100, 100, 100, 1);
+glRotate(52, 52, 52, 1);
+
+
+These unusual values lead to invalid modelview matrices.
+For example, the last glRotate command above produces this matrix with Mesa:
+
+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
+
+and with NVIDIA's OpenGL:
+
+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
+
+
+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.
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
-#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
+#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?
@@ -420,6 +421,11 @@ public:
*/
int location;
+ /**
+ * output index for dual source blending.
+ */
+ int index;
+
/**
* Built-in state that backs this uniform
*
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
@@ -238,11 +238,18 @@ _mesa_longest_attribute_name_length(struct gl_shader_program *shProg)
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);
@@ -127,6 +130,10 @@ extern void GLAPIENTRY
_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
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
-#endif
-
-#ifndef _GEINT_H_
-#define _GEINT_H_
-
-#include
-#include
-#include "misc.h"
-#include "os.h"
-#include "dixstruct.h"
-#include "extnsionst.h"
-#include
-
-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
+#endif
+
+#ifndef _GEINT_H_
+#define _GEINT_H_
+
+#include
+#include
+#include "misc.h"
+#include "os.h"
+#include "dixstruct.h"
+#include "extnsionst.h"
+#include
+
+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 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
#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
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include
#include
@@ -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
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include
#include
#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
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include
#include
#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
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include
#include
#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
#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
#include
#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
@@ -1110,6 +1110,48 @@ EmitTouchEnd(DeviceIntPtr dev, TouchPointInfoPtr ti, int flags, XID resource)
FreeEventList(tel, GetMaximumEventsNum());
}
+/**
+ * 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. */
@@ -1138,6 +1188,25 @@ TouchPuntToNextOwner(DeviceIntPtr dev, TouchPointInfoPtr ti,
ActivateEarlyAccept(dev, 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.
*
@@ -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
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include
#include
#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
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include
#include
#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
#endif
-#include "windowstr.h" /* focus struct */
-#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* focus struct */
+#include "inputstr.h" /* DeviceIntPtr */
#include
#include
#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
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include
#include
#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
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include
-#include /* Request macro */
+#include /* 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
#include
-#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
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include
#include
#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
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include
#include
#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
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include
#include
#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
#endif
-#include "windowstr.h" /* focus struct */
-#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* focus struct */
+#include "inputstr.h" /* DeviceIntPtr */
#include
#include
@@ -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
#endif
-#include "inputstr.h" /* DeviceIntPtr */
+#include "inputstr.h" /* DeviceIntPtr */
#include
#include
#include
@@ -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
#endif
-#include "inputstr.h" /* DeviceIntPtr */
-#include "windowstr.h" /* window structure */
+#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* window structure */
#include
#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
#endif
-#include "inputstr.h" /* DeviceIntPtr */
-#include "windowstr.h" /* window structure */
+#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* window structure */
#include
#include
-#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
-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
-#endif
-
-#ifndef _DAMAGEEXTINT_H_
-#define _DAMAGEEXTINT_H_
-
-#include
-#include
-#include "misc.h"
-#include "os.h"
-#include "dixstruct.h"
-#include "extnsionst.h"
-#include
-#include "windowstr.h"
-#include "selection.h"
-#include "scrnintstr.h"
-#include "damageext.h"
-#include "damage.h"
-#include "xfixes.h"
-
-typedef struct _DamageClient {
- CARD32 major_version;
- CARD32 minor_version;
- int critical;
-} DamageClientRec, *DamageClientPtr;
-
-#define GetDamageClient(pClient) ((DamageClientPtr)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
+#endif
+
+#ifndef _DAMAGEEXTINT_H_
+#define _DAMAGEEXTINT_H_
+
+#include
+#include
+#include "misc.h"
+#include "os.h"
+#include "dixstruct.h"
+#include "extnsionst.h"
+#include
+#include "windowstr.h"
+#include "selection.h"
+#include "scrnintstr.h"
+#include "damageext.h"
+#include "damage.h"
+#include "xfixes.h"
+
+typedef struct _DamageClient {
+ CARD32 major_version;
+ CARD32 minor_version;
+ int critical;
+} DamageClientRec, *DamageClientPtr;
+
+#define GetDamageClient(pClient) ((DamageClientPtr)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
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of the above listed
-copyright holder(s) not be used in advertising or publicity pertaining
-to distribution of the software without specific, written prior
-permission.
-
-THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
-TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
-LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-********************************************************/
-
-/*
- * This prototypes the dispatch.c module (except for functions declared in
- * global headers), plus related dispatch procedures from devices.c, events.c,
- * extension.c, property.c.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include
-#endif
-
-#ifndef DISPATCH_H
-#define DISPATCH_H 1
-
-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
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of the above listed
+copyright holder(s) not be used in advertising or publicity pertaining
+to distribution of the software without specific, written prior
+permission.
+
+THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
+TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
+LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+/*
+ * This prototypes the dispatch.c module (except for functions declared in
+ * global headers), plus related dispatch procedures from devices.c, events.c,
+ * extension.c, property.c.
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include
+#endif
+
+#ifndef DISPATCH_H
+#define DISPATCH_H 1
+
+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
#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
#include
#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
-#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
+#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
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
- * David H. Dawes
- * Rickard E. (Rik) Faith
- *
- */
-
-/** \file
- * Main header file included by all other DMX-related files.
- */
-
-/** \mainpage
- * - DMX Home Page
- * - DMX Project Page (on
- * Source Forge)
- * - Distributed Multihead
- * X design, the design document for DMX
- * - Client-to-Server
- * DMX Extension to the X Protocol
- */
-
-#ifndef DMX_H
-#define DMX_H
-
-#if HAVE_DMX_CONFIG_H
-#include
-#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
-#include
-#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
+ * David H. Dawes
+ * Rickard E. (Rik) Faith
+ *
+ */
+
+/** \file
+ * Main header file included by all other DMX-related files.
+ */
+
+/** \mainpage
+ * - DMX Home Page
+ * - DMX Project Page (on
+ * Source Forge)
+ * - Distributed Multihead
+ * X design, the design document for DMX
+ * - Client-to-Server
+ * DMX Extension to the X Protocol
+ */
+
+#ifndef DMX_H
+#define DMX_H
+
+#if HAVE_DMX_CONFIG_H
+#include
+#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
+#include
+#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
/* Always include these, since we query them even if we don't export XINPUT. */
-#include /* For XDevice */
+#include /* For XDevice */
#include
#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
- *
- */
-
-/** \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
+ *
+ */
+
+/** \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
- *
- */
-
-/** \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
+ *
+ */
+
+/** \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
- *
- */
-
-/** \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
+ *
+ */
+
+/** \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
- * David H. Dawes
- *
- */
-
-/** \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
+ * David H. Dawes
+ *
+ */
+
+/** \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
-#include
-
-#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
+#include
+
+#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
-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
-#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
+#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
-#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
+#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
-#endif
-
-#ifndef _LOADER_H
-#define _LOADER_H
-
-#include
-#include
-#include
-
-/* 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
+#endif
+
+#ifndef _LOADER_H
+#define _LOADER_H
+
+#include
+#include
+#include
+
+/* 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
-#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
+#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
- * 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
-#endif
-
-#include
-#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
+ * 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
+#endif
+
+#include
+#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
#include
#include
-
+
#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
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright 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
-#endif
-
-#include
-
-#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
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright 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
+#endif
+
+#include
+
+#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
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright 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
-#endif
-
-#include
-
-#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
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright 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
+#endif
+
+#include
+
+#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
#endif
-# include
-# include "xf86.h"
-# include "xf86Priv.h"
-# include "xf86_OSlib.h"
+#include
+#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
-# include
-# include
-# include
-# include
-
-
-# include
-
-# if defined(_NEED_SYSI86)
-# if !(defined (sun) && defined (SVR4))
-# include
-# include
-# include
-# endif
-# include
-# include
-# if defined(SVR4) && !defined(sun)
-# include
-# endif /* SVR4 && !sun */
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+#if defined(_NEED_SYSI86)
+#if !(defined (sun) && defined (SVR4))
+#include
+#include
+#include
+#endif
+#include
+#include
+#if defined(SVR4) && !defined(sun)
+#include
+#endif /* SVR4 && !sun */
/* V86SC_IOPL was moved to on Solaris 7 and later */
-# if !defined(V86SC_IOPL) /* Solaris 7 or later? */
-# include /* Nope */
-# endif
-# if defined(sun) && (defined (__i386__) || defined(__i386) || defined(__x86)) && defined (SVR4)
-# include
-# endif
-# endif /* _NEED_SYSI86 */
-
-# if defined(HAS_SVR3_MMAPDRV)
-# include
-# if !defined(_NEED_SYSI86)
-# include
-# include
-# endif
-# include /* MMAP driver header */
-# endif
-
-# if !defined(sun) || defined(HAVE_SYS_VT_H)
-# define HAS_USL_VTS
-# endif
-# if !defined(sun)
-# include
-# endif
-# if defined(HAS_USL_VTS)
-# if !defined(sun)
-# include
-# endif
-# include
-# include
-# endif
-
-# if defined(sun)
-# include
-# include
-# include
-
-/* undefine symbols from 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 /* Nope */
+#endif
+#if defined(sun) && (defined (__i386__) || defined(__i386) || defined(__x86)) && defined (SVR4)
+#include
+#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
+#if !defined(_NEED_SYSI86)
+#include
+#include
+#endif
+#include /* 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
+#endif
+#if defined(HAS_USL_VTS)
+#if !defined(sun)
+#include
+#endif
+#include
+#include
+#endif
+#if defined(sun)
+#include
+#include
+#include
-# if defined(SVR4)
-# include
-# if !(defined(sun) && defined (SVR4))
-# define DEV_MEM "/dev/pmem"
-# endif
-# define CLEARDTR_SUPPORT
-# define POSIX_TTY
-# endif /* SVR4 */
+/* undefine symbols from 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
+#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
-# include
-# include
-# include
-# include
-
-# ifdef __linux__
-# include
-# else /* __GLIBC__ */
-# include
-# endif
-# ifdef __sparc__
-# include
-# endif
-
-# include
-
-# include
-
-# include
-# ifdef __linux__
-# define HAS_USL_VTS
-# include
-# include
-# define LDGMAP GIO_SCRNMAP
-# define LDSMAP PIO_SCRNMAP
-# define LDNMAP LDSMAP
-# define CLEARDTR_SUPPORT
-# endif
-
-# define POSIX_TTY
-
-#endif /* __linux__ || __GLIBC__ */
+#include
+#include
+#include
+#include
+#include
+
+#ifdef __linux__
+#include
+#else /* __GLIBC__ */
+#include
+#endif
+#ifdef __sparc__
+#include
+#endif
+
+#include
+
+#include
+
+#include
+#ifdef __linux__
+#define HAS_USL_VTS
+#include
+#include
+#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
-# include
+#include
+#include
-# include
-# define termio termios
-# define POSIX_TTY
+#include
+#define termio termios
+#define POSIX_TTY
-# include
+#include
-# include
-# include
-# include
+#include
+#include
+#include
-#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
-# if defined(__FreeBSD_version) && !defined(__FreeBSD_kernel_version)
-# define __FreeBSD_kernel_version __FreeBSD_version
-# endif
+#include
+#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
-# include