From 4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05 Mon Sep 17 00:00:00 2001 From: marha Date: Sat, 25 Jul 2009 19:39:46 +0000 Subject: Added xorg-server-1.6.2.tar.gz --- xorg-server/hw/xfree86/Makefile.am | 17 +- xorg-server/hw/xfree86/Makefile.in | 97 +- xorg-server/hw/xfree86/common/Makefile.am | 37 +- xorg-server/hw/xfree86/common/Makefile.in | 165 +- xorg-server/hw/xfree86/common/atKeynames.h | 295 -- xorg-server/hw/xfree86/common/compiler.h | 122 +- xorg-server/hw/xfree86/common/xf86.h | 65 +- xorg-server/hw/xfree86/common/xf86AutoConfig.c | 242 +- xorg-server/hw/xfree86/common/xf86Build.h | 2 - xorg-server/hw/xfree86/common/xf86Bus.c | 578 +-- xorg-server/hw/xfree86/common/xf86Bus.h | 3 - xorg-server/hw/xfree86/common/xf86Config.c | 275 +- xorg-server/hw/xfree86/common/xf86Configure.c | 107 +- xorg-server/hw/xfree86/common/xf86Cursor.c | 63 +- xorg-server/hw/xfree86/common/xf86DGA.c | 189 +- xorg-server/hw/xfree86/common/xf86DPMS.c | 5 +- xorg-server/hw/xfree86/common/xf86Debug.c | 77 - xorg-server/hw/xfree86/common/xf86DoProbe.c | 116 - xorg-server/hw/xfree86/common/xf86Events.c | 227 +- xorg-server/hw/xfree86/common/xf86Globals.c | 89 +- xorg-server/hw/xfree86/common/xf86Helper.c | 285 +- xorg-server/hw/xfree86/common/xf86InPriv.h | 2 +- xorg-server/hw/xfree86/common/xf86Init.c | 415 +- xorg-server/hw/xfree86/common/xf86MiscExt.c | 561 --- xorg-server/hw/xfree86/common/xf86Mode.c | 14 +- xorg-server/hw/xfree86/common/xf86Module.h | 9 +- xorg-server/hw/xfree86/common/xf86Priv.h | 30 +- xorg-server/hw/xfree86/common/xf86Privstr.h | 33 - xorg-server/hw/xfree86/common/xf86RAC.c | 1171 +++++ xorg-server/hw/xfree86/common/xf86RAC.h | 17 + xorg-server/hw/xfree86/common/xf86RandR.c | 12 +- xorg-server/hw/xfree86/common/xf86ShowOpts.c | 129 + xorg-server/hw/xfree86/common/xf86Version.h | 56 - xorg-server/hw/xfree86/common/xf86Versions.c | 77 - xorg-server/hw/xfree86/common/xf86VidMode.c | 5 +- xorg-server/hw/xfree86/common/xf86XKB.c | 80 - xorg-server/hw/xfree86/common/xf86Xinput.c | 516 ++- xorg-server/hw/xfree86/common/xf86Xinput.h | 12 +- xorg-server/hw/xfree86/common/xf86cmap.c | 11 +- xorg-server/hw/xfree86/common/xf86fbman.c | 8 +- xorg-server/hw/xfree86/common/xf86isaBus.c | 141 - xorg-server/hw/xfree86/common/xf86pciBus.c | 21 +- xorg-server/hw/xfree86/common/xf86pciBus.h | 1 - xorg-server/hw/xfree86/common/xf86sbusBus.c | 3 +- xorg-server/hw/xfree86/common/xf86sbusBus.h | 2 + xorg-server/hw/xfree86/common/xf86str.h | 61 - xorg-server/hw/xfree86/common/xf86xv.c | 11 +- xorg-server/hw/xfree86/common/xf86xvmc.c | 3 +- xorg-server/hw/xfree86/common/xisb.c | 1 - xorg-server/hw/xfree86/ddc/DDC.HOWTO | 16 +- xorg-server/hw/xfree86/ddc/Makefile.in | 76 +- xorg-server/hw/xfree86/ddc/ddcProperty.c | 11 +- xorg-server/hw/xfree86/ddc/edid.h | 7 +- xorg-server/hw/xfree86/ddc/interpret_edid.c | 90 +- xorg-server/hw/xfree86/ddc/print_edid.c | 36 +- xorg-server/hw/xfree86/ddc/xf86DDC.c | 241 +- xorg-server/hw/xfree86/ddc/xf86DDC.h | 11 +- xorg-server/hw/xfree86/dixmods/Makefile.am | 50 +- xorg-server/hw/xfree86/dixmods/Makefile.in | 251 +- xorg-server/hw/xfree86/dixmods/afbmodule.c | 57 - xorg-server/hw/xfree86/dixmods/cfb32module.c | 57 - xorg-server/hw/xfree86/dixmods/cfbmodule.c | 57 - xorg-server/hw/xfree86/dixmods/extmod/Makefile.am | 10 +- xorg-server/hw/xfree86/dixmods/extmod/Makefile.in | 100 +- xorg-server/hw/xfree86/dixmods/extmod/dgaproc.h | 7 +- xorg-server/hw/xfree86/dixmods/extmod/modinit.c | 81 - xorg-server/hw/xfree86/dixmods/extmod/modinit.h | 64 +- xorg-server/hw/xfree86/dixmods/extmod/xf86dga.c | 309 -- xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c | 369 +- xorg-server/hw/xfree86/dixmods/extmod/xf86misc.c | 821 ---- .../hw/xfree86/dixmods/extmod/xf86miscproc.h | 69 - xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c | 40 +- xorg-server/hw/xfree86/dixmods/ftmodule.c | 75 - xorg-server/hw/xfree86/dixmods/glxmodule.c | 15 - xorg-server/hw/xfree86/dixmods/mfbmodule.c | 47 - xorg-server/hw/xfree86/dixmods/xf86XTrapModule.c | 45 - xorg-server/hw/xfree86/dixmods/xkbPrivate.c | 7 +- xorg-server/hw/xfree86/doc/Makefile.am | 1 - xorg-server/hw/xfree86/doc/Makefile.in | 74 +- xorg-server/hw/xfree86/doc/README.fonts | 1158 ----- xorg-server/hw/xfree86/doc/devel/DebuggingHints | 192 - xorg-server/hw/xfree86/doc/devel/Makefile.am | 1 - xorg-server/hw/xfree86/doc/devel/Makefile.in | 72 +- xorg-server/hw/xfree86/doc/man/Makefile.in | 71 +- xorg-server/hw/xfree86/doc/man/Xorg.man.pre | 89 +- xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre | 140 +- xorg-server/hw/xfree86/doc/sgml/Makefile.in | 71 +- xorg-server/hw/xfree86/dri/Makefile.am | 5 + xorg-server/hw/xfree86/dri/Makefile.in | 81 +- xorg-server/hw/xfree86/dri/dri.c | 35 +- xorg-server/hw/xfree86/dri/dristruct.h | 2 + xorg-server/hw/xfree86/dri2/Makefile.in | 76 +- xorg-server/hw/xfree86/dri2/dri2.c | 733 +-- xorg-server/hw/xfree86/dri2/dri2.h | 125 +- xorg-server/hw/xfree86/dri2/dri2ext.c | 234 +- xorg-server/hw/xfree86/dummylib/Makefile.in | 76 +- xorg-server/hw/xfree86/dummylib/xf86info.c | 2 +- xorg-server/hw/xfree86/exa/Makefile.in | 76 +- xorg-server/hw/xfree86/exa/exa.man.pre | 22 +- xorg-server/hw/xfree86/exa/examodule.c | 10 +- xorg-server/hw/xfree86/fbdevhw/Makefile.in | 76 +- xorg-server/hw/xfree86/fbdevhw/fbdevhw.c | 1 - xorg-server/hw/xfree86/i2c/Makefile.in | 76 +- xorg-server/hw/xfree86/i2c/xf86i2c.c | 24 - xorg-server/hw/xfree86/int10/Makefile.in | 76 +- xorg-server/hw/xfree86/int10/generic.c | 17 +- xorg-server/hw/xfree86/int10/helper_exec.c | 2 + xorg-server/hw/xfree86/int10/helper_mem.c | 2 +- xorg-server/hw/xfree86/int10/xf86int10.c | 28 +- xorg-server/hw/xfree86/loader/Makefile.am | 12 +- xorg-server/hw/xfree86/loader/Makefile.in | 129 +- xorg-server/hw/xfree86/loader/SparcMulDiv.S | 87 - xorg-server/hw/xfree86/loader/dixsym.c | 76 +- xorg-server/hw/xfree86/loader/dlloader.c | 9 +- xorg-server/hw/xfree86/loader/fontsym.c | 109 - xorg-server/hw/xfree86/loader/loader.c | 21 +- xorg-server/hw/xfree86/loader/loader.h | 3 - xorg-server/hw/xfree86/loader/loaderProcs.h | 2 - xorg-server/hw/xfree86/loader/loadfont.c | 81 - xorg-server/hw/xfree86/loader/loadmod.c | 39 +- xorg-server/hw/xfree86/loader/misym.c | 177 +- xorg-server/hw/xfree86/loader/os.c | 6 - xorg-server/hw/xfree86/loader/xf86sym.c | 131 +- xorg-server/hw/xfree86/modes/Makefile.in | 76 +- xorg-server/hw/xfree86/modes/xf86Crtc.c | 516 ++- xorg-server/hw/xfree86/modes/xf86Crtc.h | 122 +- xorg-server/hw/xfree86/modes/xf86Cursors.c | 65 +- xorg-server/hw/xfree86/modes/xf86EdidModes.c | 331 +- xorg-server/hw/xfree86/modes/xf86Modes.c | 34 +- xorg-server/hw/xfree86/modes/xf86Modes.h | 16 +- xorg-server/hw/xfree86/modes/xf86RandR12.c | 596 ++- xorg-server/hw/xfree86/modes/xf86RandR12.h | 1 + xorg-server/hw/xfree86/modes/xf86Rename.h | 1 + xorg-server/hw/xfree86/modes/xf86Rotate.c | 494 +- xorg-server/hw/xfree86/modes/xf86gtf.c | 4 + xorg-server/hw/xfree86/os-support/Makefile.am | 10 +- xorg-server/hw/xfree86/os-support/Makefile.in | 85 +- xorg-server/hw/xfree86/os-support/README.OS-lib | 505 -- xorg-server/hw/xfree86/os-support/assyntax.h | 749 --- xorg-server/hw/xfree86/os-support/bsd/Makefile.am | 27 +- xorg-server/hw/xfree86/os-support/bsd/Makefile.in | 132 +- .../hw/xfree86/os-support/bsd/alpha_video.c | 18 - xorg-server/hw/xfree86/os-support/bsd/arm_video.c | 21 - .../hw/xfree86/os-support/bsd/bsdResource.c | 92 - xorg-server/hw/xfree86/os-support/bsd/bsd_axp.c | 2 +- xorg-server/hw/xfree86/os-support/bsd/bsd_init.c | 107 +- xorg-server/hw/xfree86/os-support/bsd/bsd_jstk.c | 183 - xorg-server/hw/xfree86/os-support/bsd/bsd_mouse.c | 791 ---- xorg-server/hw/xfree86/os-support/bsd/i386_video.c | 98 - .../hw/xfree86/os-support/bsd/libusb/data.c | 92 - .../hw/xfree86/os-support/bsd/libusb/descr.c | 73 - .../hw/xfree86/os-support/bsd/libusb/parse.c | 401 -- .../hw/xfree86/os-support/bsd/libusb/usage.c | 196 - xorg-server/hw/xfree86/os-support/bsd/libusb/usb.3 | 191 - xorg-server/hw/xfree86/os-support/bsd/libusb/usb.h | 92 - .../xfree86/os-support/bsd/libusb/usb_hid_usages | 1079 ----- .../hw/xfree86/os-support/bsd/libusb/usbvar.h | 31 - xorg-server/hw/xfree86/os-support/bsd/ppc_video.c | 18 - .../hw/xfree86/os-support/bsd/sparc64_video.c | 18 - xorg-server/hw/xfree86/os-support/bus/Makefile.am | 12 - xorg-server/hw/xfree86/os-support/bus/Makefile.in | 102 +- xorg-server/hw/xfree86/os-support/bus/Pci.c | 25 +- xorg-server/hw/xfree86/os-support/bus/Pci.h | 82 +- xorg-server/hw/xfree86/os-support/bus/Sbus.c | 84 +- xorg-server/hw/xfree86/os-support/bus/bsd_pci.c | 17 - xorg-server/hw/xfree86/os-support/bus/ix86Pci.c | 718 --- xorg-server/hw/xfree86/os-support/bus/linuxPci.c | 34 +- xorg-server/hw/xfree86/os-support/bus/ppcPci.c | 82 - xorg-server/hw/xfree86/os-support/bus/sparcPci.c | 979 ---- xorg-server/hw/xfree86/os-support/bus/xf86Pci.h | 2 - xorg-server/hw/xfree86/os-support/hurd/Makefile.am | 2 +- xorg-server/hw/xfree86/os-support/hurd/Makefile.in | 84 +- .../hw/xfree86/os-support/hurd/hurd_mouse.c | 242 - .../hw/xfree86/os-support/hurd/hurd_video.c | 14 - .../hw/xfree86/os-support/linux/Makefile.am | 9 +- .../hw/xfree86/os-support/linux/Makefile.in | 96 +- .../hw/xfree86/os-support/linux/int10/linux.c | 21 +- .../hw/xfree86/os-support/linux/lnxResource.c | 104 - xorg-server/hw/xfree86/os-support/linux/lnx_axp.c | 2 - xorg-server/hw/xfree86/os-support/linux/lnx_bell.c | 1 + xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c | 2 - xorg-server/hw/xfree86/os-support/linux/lnx_init.c | 54 +- xorg-server/hw/xfree86/os-support/linux/lnx_jstk.c | 180 - .../hw/xfree86/os-support/linux/lnx_mouse.c | 221 - .../hw/xfree86/os-support/linux/lnx_video.c | 221 +- .../hw/xfree86/os-support/lynxos/Makefile.am | 8 - .../hw/xfree86/os-support/lynxos/Makefile.in | 540 --- .../hw/xfree86/os-support/lynxos/lynx_init.c | 192 - .../hw/xfree86/os-support/lynxos/lynx_mmap.c | 72 - .../hw/xfree86/os-support/lynxos/lynx_mouse.c | 33 - .../hw/xfree86/os-support/lynxos/lynx_noinline.c | 177 - .../hw/xfree86/os-support/lynxos/lynx_ppc.S | 70 - .../hw/xfree86/os-support/lynxos/lynx_ppc.c | 51 - .../hw/xfree86/os-support/lynxos/lynx_video.c | 710 --- xorg-server/hw/xfree86/os-support/misc/BUSmemcpy.S | 153 - xorg-server/hw/xfree86/os-support/misc/BUSmemcpy.c | 225 - xorg-server/hw/xfree86/os-support/misc/IODelay.S | 53 - xorg-server/hw/xfree86/os-support/misc/IODelay.c | 24 - xorg-server/hw/xfree86/os-support/misc/Makefile.am | 15 +- xorg-server/hw/xfree86/os-support/misc/Makefile.in | 97 +- xorg-server/hw/xfree86/os-support/misc/PortIO.S | 57 - xorg-server/hw/xfree86/os-support/misc/SlowBcopy.S | 108 - xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c | 70 +- .../hw/xfree86/os-support/misc/xf86_IlHack.c | 16 - xorg-server/hw/xfree86/os-support/misc/xf86_Util.c | 94 - xorg-server/hw/xfree86/os-support/sco/Makefile.am | 1 - xorg-server/hw/xfree86/os-support/sco/Makefile.in | 72 +- xorg-server/hw/xfree86/os-support/sco/sco_iop.c | 44 - xorg-server/hw/xfree86/os-support/sco/sco_mouse.c | 258 -- .../hw/xfree86/os-support/shared/bios_mmap.c | 29 +- xorg-server/hw/xfree86/os-support/shared/inout.S | 111 - .../hw/xfree86/os-support/shared/posix_tty.c | 11 +- xorg-server/hw/xfree86/os-support/shared/sigio.c | 2 +- .../hw/xfree86/os-support/shared/stdResource.c | 3 - .../hw/xfree86/os-support/solaris/Makefile.am | 5 +- .../hw/xfree86/os-support/solaris/Makefile.in | 105 +- .../hw/xfree86/os-support/solaris/sun_bios.c | 103 - .../hw/xfree86/os-support/solaris/sun_init.c | 26 +- .../hw/xfree86/os-support/solaris/sun_mouse.c | 717 --- .../hw/xfree86/os-support/solaris/sun_vid.c | 337 +- xorg-server/hw/xfree86/os-support/sysv/Makefile.am | 2 +- xorg-server/hw/xfree86/os-support/sysv/Makefile.in | 73 +- .../hw/xfree86/os-support/sysv/sysv_mouse.c | 60 - .../hw/xfree86/os-support/sysv/sysv_video.c | 52 - xorg-server/hw/xfree86/os-support/usl/Makefile.am | 6 - xorg-server/hw/xfree86/os-support/usl/Makefile.in | 538 --- xorg-server/hw/xfree86/os-support/usl/usl_init.c | 357 -- xorg-server/hw/xfree86/os-support/usl/usl_iop.c | 106 - xorg-server/hw/xfree86/os-support/usl/usl_mouse.c | 177 - xorg-server/hw/xfree86/os-support/usl/usl_video.c | 109 - xorg-server/hw/xfree86/os-support/usl/usl_vtsw.c | 95 - xorg-server/hw/xfree86/os-support/xf86OSmouse.h | 294 -- xorg-server/hw/xfree86/os-support/xf86_OSlib.h | 246 +- xorg-server/hw/xfree86/os-support/xf86_OSproc.h | 7 - xorg-server/hw/xfree86/parser/Configint.h | 6 +- xorg-server/hw/xfree86/parser/Files.c | 15 + xorg-server/hw/xfree86/parser/Makefile.am | 7 +- xorg-server/hw/xfree86/parser/Makefile.in | 83 +- xorg-server/hw/xfree86/parser/cpconfig.c | 122 - xorg-server/hw/xfree86/parser/read.c | 1 - xorg-server/hw/xfree86/parser/scan.c | 5 +- xorg-server/hw/xfree86/parser/write.c | 9 - xorg-server/hw/xfree86/parser/xf86Parser.h | 1 + xorg-server/hw/xfree86/parser/xf86tokens.h | 2 + xorg-server/hw/xfree86/rac/Makefile.am | 8 - xorg-server/hw/xfree86/rac/Makefile.in | 674 --- xorg-server/hw/xfree86/rac/xf86RAC.c | 1157 ----- xorg-server/hw/xfree86/rac/xf86RAC.h | 17 - xorg-server/hw/xfree86/ramdac/Makefile.in | 76 +- xorg-server/hw/xfree86/ramdac/xf86Cursor.c | 227 +- xorg-server/hw/xfree86/ramdac/xf86HWCurs.c | 6 +- xorg-server/hw/xfree86/shadowfb/Makefile.in | 76 +- xorg-server/hw/xfree86/shadowfb/shadow.c | 6 +- xorg-server/hw/xfree86/utils/Makefile.am | 6 +- xorg-server/hw/xfree86/utils/Makefile.in | 79 +- xorg-server/hw/xfree86/utils/cvt/Makefile.in | 80 +- xorg-server/hw/xfree86/utils/gtf/Makefile.in | 76 +- xorg-server/hw/xfree86/utils/gtf/gtf.c | 5 - xorg-server/hw/xfree86/utils/ioport/Makefile.am | 58 - xorg-server/hw/xfree86/utils/ioport/Makefile.in | 739 --- xorg-server/hw/xfree86/utils/ioport/ioport.c | 491 -- xorg-server/hw/xfree86/utils/kbd_mode/Makefile.am | 70 - xorg-server/hw/xfree86/utils/kbd_mode/Makefile.in | 829 ---- .../hw/xfree86/utils/kbd_mode/bsd-kbd_mode.c | 91 - .../hw/xfree86/utils/kbd_mode/bsd-kbd_mode.man.pre | 36 - .../hw/xfree86/utils/kbd_mode/sun-kbd_mode.c | 152 - .../hw/xfree86/utils/kbd_mode/sun-kbd_mode.man.pre | 53 - xorg-server/hw/xfree86/utils/xorgcfg/Makefile.am | 164 - xorg-server/hw/xfree86/utils/xorgcfg/Makefile.in | 1305 ------ xorg-server/hw/xfree86/utils/xorgcfg/TODO | 33 - xorg-server/hw/xfree86/utils/xorgcfg/XOrgCfg.pre | 1852 -------- xorg-server/hw/xfree86/utils/xorgcfg/accessx.c | 681 --- xorg-server/hw/xfree86/utils/xorgcfg/card-cfg.c | 433 -- xorg-server/hw/xfree86/utils/xorgcfg/card-cfg.h | 43 - xorg-server/hw/xfree86/utils/xorgcfg/card.xbm | 59 - xorg-server/hw/xfree86/utils/xorgcfg/card.xpm | 81 - xorg-server/hw/xfree86/utils/xorgcfg/cards.c | 695 --- xorg-server/hw/xfree86/utils/xorgcfg/cards.h | 89 - xorg-server/hw/xfree86/utils/xorgcfg/computer.xpm | 91 - xorg-server/hw/xfree86/utils/xorgcfg/config.c | 301 -- xorg-server/hw/xfree86/utils/xorgcfg/config.h | 226 - xorg-server/hw/xfree86/utils/xorgcfg/down.xbm | 8 - xorg-server/hw/xfree86/utils/xorgcfg/expert.c | 4839 -------------------- xorg-server/hw/xfree86/utils/xorgcfg/help.c | 1785 -------- xorg-server/hw/xfree86/utils/xorgcfg/help.h | 40 - xorg-server/hw/xfree86/utils/xorgcfg/interface.c | 2278 --------- .../hw/xfree86/utils/xorgcfg/keyboard-cfg.c | 1378 ------ .../hw/xfree86/utils/xorgcfg/keyboard-cfg.h | 73 - xorg-server/hw/xfree86/utils/xorgcfg/keyboard.xbm | 59 - xorg-server/hw/xfree86/utils/xorgcfg/keyboard.xpm | 66 - xorg-server/hw/xfree86/utils/xorgcfg/left.xbm | 8 - xorg-server/hw/xfree86/utils/xorgcfg/loader.c | 405 -- xorg-server/hw/xfree86/utils/xorgcfg/loader.h | 170 - xorg-server/hw/xfree86/utils/xorgcfg/loadmod.c | 663 --- xorg-server/hw/xfree86/utils/xorgcfg/monitor-cfg.c | 456 -- xorg-server/hw/xfree86/utils/xorgcfg/monitor-cfg.h | 47 - xorg-server/hw/xfree86/utils/xorgcfg/monitor.xbm | 59 - xorg-server/hw/xfree86/utils/xorgcfg/monitor.xpm | 79 - xorg-server/hw/xfree86/utils/xorgcfg/mouse-cfg.c | 449 -- xorg-server/hw/xfree86/utils/xorgcfg/mouse-cfg.h | 42 - xorg-server/hw/xfree86/utils/xorgcfg/mouse.xbm | 59 - xorg-server/hw/xfree86/utils/xorgcfg/mouse.xpm | 76 - xorg-server/hw/xfree86/utils/xorgcfg/narrower.xbm | 8 - xorg-server/hw/xfree86/utils/xorgcfg/options.c | 787 ---- xorg-server/hw/xfree86/utils/xorgcfg/options.h | 50 - xorg-server/hw/xfree86/utils/xorgcfg/right.xbm | 8 - xorg-server/hw/xfree86/utils/xorgcfg/screen-cfg.c | 555 --- xorg-server/hw/xfree86/utils/xorgcfg/screen-cfg.h | 43 - xorg-server/hw/xfree86/utils/xorgcfg/screen.c | 983 ---- xorg-server/hw/xfree86/utils/xorgcfg/screen.h | 51 - xorg-server/hw/xfree86/utils/xorgcfg/shorter.xbm | 8 - xorg-server/hw/xfree86/utils/xorgcfg/startx.c | 146 - xorg-server/hw/xfree86/utils/xorgcfg/stubs.c | 65 - xorg-server/hw/xfree86/utils/xorgcfg/stubs.h | 42 - xorg-server/hw/xfree86/utils/xorgcfg/taller.xbm | 8 - xorg-server/hw/xfree86/utils/xorgcfg/text-mode.c | 3379 -------------- xorg-server/hw/xfree86/utils/xorgcfg/up.xbm | 8 - xorg-server/hw/xfree86/utils/xorgcfg/vidmode.c | 1346 ------ xorg-server/hw/xfree86/utils/xorgcfg/vidmode.h | 63 - xorg-server/hw/xfree86/utils/xorgcfg/wider.xbm | 8 - xorg-server/hw/xfree86/utils/xorgcfg/xf86config.c | 982 ---- xorg-server/hw/xfree86/utils/xorgcfg/xf86config.h | 110 - .../hw/xfree86/utils/xorgcfg/xorgcfg.man.pre | 148 - xorg-server/hw/xfree86/utils/xorgconfig/Cards | 3135 ------------- xorg-server/hw/xfree86/utils/xorgconfig/Cards98 | 647 --- .../hw/xfree86/utils/xorgconfig/Makefile.am | 70 - .../hw/xfree86/utils/xorgconfig/Makefile.in | 857 ---- xorg-server/hw/xfree86/utils/xorgconfig/cards.c | 278 -- xorg-server/hw/xfree86/utils/xorgconfig/cards.h | 30 - .../hw/xfree86/utils/xorgconfig/xorgconfig.c | 2890 ------------ .../hw/xfree86/utils/xorgconfig/xorgconfig.man.pre | 22 - xorg-server/hw/xfree86/vbe/Makefile.in | 76 +- xorg-server/hw/xfree86/vbe/vbe.c | 6 +- xorg-server/hw/xfree86/vgahw/Makefile.in | 76 +- xorg-server/hw/xfree86/x86emu/Makefile.in | 76 +- xorg-server/hw/xfree86/x86emu/ops2.c | 4 +- xorg-server/hw/xfree86/x86emu/prim_ops.c | 2 +- xorg-server/hw/xfree86/x86emu/sys.c | 68 +- .../hw/xfree86/x86emu/x86emu/prim_x86_gcc.h | 2 +- xorg-server/hw/xfree86/x86emu/x86emu/types.h | 5 +- xorg-server/hw/xfree86/xaa/Makefile.am | 4 +- xorg-server/hw/xfree86/xaa/Makefile.in | 80 +- xorg-server/hw/xfree86/xaa/xaa.h | 4 + xorg-server/hw/xfree86/xaa/xaaCpyPlane.c | 10 +- xorg-server/hw/xfree86/xaa/xaaInit.c | 12 +- xorg-server/hw/xfree86/xaa/xaaInitAccel.c | 13 +- xorg-server/hw/xfree86/xaa/xaaNonTEText.c | 3 +- xorg-server/hw/xfree86/xaa/xaaOverlayDF.c | 3 +- xorg-server/hw/xfree86/xaa/xaaStateChange.c | 3 +- xorg-server/hw/xfree86/xaa/xaaTEGlyphBlt.S | 964 ---- xorg-server/hw/xfree86/xaa/xaaWrapper.c | 6 +- xorg-server/hw/xfree86/xaa/xaalocal.h | 4 + xorg-server/hw/xfree86/xaa/xaawrap.h | 4 +- xorg-server/hw/xfree86/xf1bpp/Makefile.am | 178 - xorg-server/hw/xfree86/xf1bpp/Makefile.in | 929 ---- xorg-server/hw/xfree86/xf1bpp/maskbits.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbbitblt.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbbltC.c | 3 - xorg-server/hw/xfree86/xf1bpp/mfbbltCI.c | 3 - xorg-server/hw/xfree86/xf1bpp/mfbbltG.c | 3 - xorg-server/hw/xfree86/xf1bpp/mfbbltO.c | 3 - xorg-server/hw/xfree86/xf1bpp/mfbbltX.c | 3 - xorg-server/hw/xfree86/xf1bpp/mfbbres.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbbresd.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbclip.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbcmap.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbfillarc.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbfillrct.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbfillsp.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbfont.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbgc.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbgetsp.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbhrzvert.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbigbblak.c | 4 - xorg-server/hw/xfree86/xf1bpp/mfbigbwht.c | 4 - xorg-server/hw/xfree86/xf1bpp/mfbimage.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbline.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbmap.h | 122 - xorg-server/hw/xfree86/xf1bpp/mfbmap.sh | 25 - xorg-server/hw/xfree86/xf1bpp/mfbmisc.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbmodule.c | 47 - xorg-server/hw/xfree86/xf1bpp/mfbpablack.c | 6 - xorg-server/hw/xfree86/xf1bpp/mfbpainv.c | 6 - xorg-server/hw/xfree86/xf1bpp/mfbpawhite.c | 6 - xorg-server/hw/xfree86/xf1bpp/mfbpgbblak.c | 4 - xorg-server/hw/xfree86/xf1bpp/mfbpgbinv.c | 4 - xorg-server/hw/xfree86/xf1bpp/mfbpgbwht.c | 4 - xorg-server/hw/xfree86/xf1bpp/mfbpixmap.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbplyblack.c | 5 - xorg-server/hw/xfree86/xf1bpp/mfbplyinv.c | 5 - xorg-server/hw/xfree86/xf1bpp/mfbplywhite.c | 5 - xorg-server/hw/xfree86/xf1bpp/mfbpolypnt.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbpushpxl.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbscrclse.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbscrinit.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbseg.c | 3 - xorg-server/hw/xfree86/xf1bpp/mfbsetsp.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbteblack.c | 5 - xorg-server/hw/xfree86/xf1bpp/mfbtewhite.c | 5 - xorg-server/hw/xfree86/xf1bpp/mfbtileC.c | 3 - xorg-server/hw/xfree86/xf1bpp/mfbtileG.c | 3 - xorg-server/hw/xfree86/xf1bpp/mfbunmap.h | 114 - xorg-server/hw/xfree86/xf1bpp/mfbunmap.sh | 23 - xorg-server/hw/xfree86/xf1bpp/mfbwindow.c | 2 - xorg-server/hw/xfree86/xf1bpp/mfbzerarc.c | 2 - xorg-server/hw/xfree86/xf1bpp/xf1bpp.h | 36 - xorg-server/hw/xfree86/xf4bpp/Makefile.am | 57 - xorg-server/hw/xfree86/xf4bpp/Makefile.in | 791 ---- xorg-server/hw/xfree86/xf4bpp/NOTES | 194 - xorg-server/hw/xfree86/xf4bpp/OScompiler.h | 58 - xorg-server/hw/xfree86/xf4bpp/emulOpStip.c | 102 - xorg-server/hw/xfree86/xf4bpp/emulRepAre.c | 69 - xorg-server/hw/xfree86/xf4bpp/emulTile.c | 352 -- xorg-server/hw/xfree86/xf4bpp/ibmTrace.h | 1 - xorg-server/hw/xfree86/xf4bpp/mfbbres.c | 164 - xorg-server/hw/xfree86/xf4bpp/mfbbresd.c | 205 - xorg-server/hw/xfree86/xf4bpp/mfbfillarc.c | 301 -- xorg-server/hw/xfree86/xf4bpp/mfbhrzvert.c | 135 - xorg-server/hw/xfree86/xf4bpp/mfbimggblt.c | 505 -- xorg-server/hw/xfree86/xf4bpp/mfbline.c | 976 ---- xorg-server/hw/xfree86/xf4bpp/mfbseg.c | 2 - xorg-server/hw/xfree86/xf4bpp/mfbzerarc.c | 267 -- xorg-server/hw/xfree86/xf4bpp/offscreen.c | 342 -- xorg-server/hw/xfree86/xf4bpp/ppcArea.c | 97 - xorg-server/hw/xfree86/xf4bpp/ppcCReduce.c | 237 - xorg-server/hw/xfree86/xf4bpp/ppcClip.c | 157 - xorg-server/hw/xfree86/xf4bpp/ppcCpArea.c | 470 -- xorg-server/hw/xfree86/xf4bpp/ppcDepth.c | 53 - xorg-server/hw/xfree86/xf4bpp/ppcFillRct.c | 215 - xorg-server/hw/xfree86/xf4bpp/ppcGC.c | 446 -- xorg-server/hw/xfree86/xf4bpp/ppcGCstr.h | 71 - xorg-server/hw/xfree86/xf4bpp/ppcGetSp.c | 141 - xorg-server/hw/xfree86/xf4bpp/ppcIO.c | 233 - xorg-server/hw/xfree86/xf4bpp/ppcImg.c | 122 - xorg-server/hw/xfree86/xf4bpp/ppcPixFS.c | 502 -- xorg-server/hw/xfree86/xf4bpp/ppcPixmap.c | 151 - xorg-server/hw/xfree86/xf4bpp/ppcPolyPnt.c | 143 - xorg-server/hw/xfree86/xf4bpp/ppcQuery.c | 46 - xorg-server/hw/xfree86/xf4bpp/ppcRslvC.c | 177 - xorg-server/hw/xfree86/xf4bpp/ppcSetSp.c | 319 -- xorg-server/hw/xfree86/xf4bpp/ppcSpMcro.h | 43 - xorg-server/hw/xfree86/xf4bpp/ppcWinFS.c | 280 -- xorg-server/hw/xfree86/xf4bpp/ppcWindow.c | 220 - xorg-server/hw/xfree86/xf4bpp/vgaBitBlt.c | 749 --- xorg-server/hw/xfree86/xf4bpp/vgaGC.c | 213 - xorg-server/hw/xfree86/xf4bpp/vgaImages.c | 460 -- xorg-server/hw/xfree86/xf4bpp/vgaReg.h | 137 - xorg-server/hw/xfree86/xf4bpp/vgaSolid.c | 574 --- xorg-server/hw/xfree86/xf4bpp/vgaStipple.c | 720 --- xorg-server/hw/xfree86/xf4bpp/vgaVideo.h | 93 - xorg-server/hw/xfree86/xf4bpp/vgamodule.c | 57 - xorg-server/hw/xfree86/xf4bpp/wm3.c | 203 - xorg-server/hw/xfree86/xf4bpp/wm3.h | 73 - xorg-server/hw/xfree86/xf4bpp/xf4bpp.h | 622 --- xorg-server/hw/xfree86/xf8_16bpp/Makefile.in | 76 +- xorg-server/hw/xfree86/xf8_32bpp/Makefile.am | 37 - xorg-server/hw/xfree86/xf8_32bpp/Makefile.in | 739 --- xorg-server/hw/xfree86/xf8_32bpp/cfb8_32.h | 191 - xorg-server/hw/xfree86/xf8_32bpp/cfb8_32module.c | 39 - xorg-server/hw/xfree86/xf8_32bpp/cfbcpyarea.c | 549 --- xorg-server/hw/xfree86/xf8_32bpp/cfbcpyplane.c | 41 - xorg-server/hw/xfree86/xf8_32bpp/cfbgc.c | 646 --- xorg-server/hw/xfree86/xf8_32bpp/cfbgc32.c | 2 - xorg-server/hw/xfree86/xf8_32bpp/cfbgc8.c | 2 - xorg-server/hw/xfree86/xf8_32bpp/cfbgcmisc.c | 150 - xorg-server/hw/xfree86/xf8_32bpp/cfbgcunder.c | 620 --- xorg-server/hw/xfree86/xf8_32bpp/cfbimage.c | 174 - xorg-server/hw/xfree86/xf8_32bpp/cfbpntwin.c | 51 - xorg-server/hw/xfree86/xf8_32bpp/cfbscrinit.c | 311 -- xorg-server/hw/xfree86/xf8_32bpp/cfbwindow.c | 116 - xorg-server/hw/xfree86/xf8_32bpp/xf86overlay.c | 1179 ----- 471 files changed, 7426 insertions(+), 85533 deletions(-) delete mode 100644 xorg-server/hw/xfree86/common/atKeynames.h delete mode 100644 xorg-server/hw/xfree86/common/xf86Build.h delete mode 100644 xorg-server/hw/xfree86/common/xf86Debug.c delete mode 100644 xorg-server/hw/xfree86/common/xf86DoProbe.c delete mode 100644 xorg-server/hw/xfree86/common/xf86MiscExt.c create mode 100644 xorg-server/hw/xfree86/common/xf86RAC.c create mode 100644 xorg-server/hw/xfree86/common/xf86RAC.h create mode 100644 xorg-server/hw/xfree86/common/xf86ShowOpts.c delete mode 100644 xorg-server/hw/xfree86/common/xf86Version.h delete mode 100644 xorg-server/hw/xfree86/common/xf86Versions.c delete mode 100644 xorg-server/hw/xfree86/common/xf86XKB.c delete mode 100644 xorg-server/hw/xfree86/common/xf86isaBus.c delete mode 100644 xorg-server/hw/xfree86/dixmods/afbmodule.c delete mode 100644 xorg-server/hw/xfree86/dixmods/cfb32module.c delete mode 100644 xorg-server/hw/xfree86/dixmods/cfbmodule.c delete mode 100644 xorg-server/hw/xfree86/dixmods/extmod/xf86dga.c delete mode 100644 xorg-server/hw/xfree86/dixmods/extmod/xf86misc.c delete mode 100644 xorg-server/hw/xfree86/dixmods/extmod/xf86miscproc.h delete mode 100644 xorg-server/hw/xfree86/dixmods/ftmodule.c delete mode 100644 xorg-server/hw/xfree86/dixmods/mfbmodule.c delete mode 100644 xorg-server/hw/xfree86/dixmods/xf86XTrapModule.c delete mode 100644 xorg-server/hw/xfree86/doc/README.fonts delete mode 100644 xorg-server/hw/xfree86/doc/devel/DebuggingHints delete mode 100644 xorg-server/hw/xfree86/loader/SparcMulDiv.S delete mode 100644 xorg-server/hw/xfree86/loader/fontsym.c delete mode 100644 xorg-server/hw/xfree86/loader/loadfont.c delete mode 100644 xorg-server/hw/xfree86/os-support/README.OS-lib delete mode 100644 xorg-server/hw/xfree86/os-support/assyntax.h delete mode 100644 xorg-server/hw/xfree86/os-support/bsd/bsdResource.c delete mode 100644 xorg-server/hw/xfree86/os-support/bsd/bsd_jstk.c delete mode 100644 xorg-server/hw/xfree86/os-support/bsd/bsd_mouse.c delete mode 100644 xorg-server/hw/xfree86/os-support/bsd/libusb/data.c delete mode 100644 xorg-server/hw/xfree86/os-support/bsd/libusb/descr.c delete mode 100644 xorg-server/hw/xfree86/os-support/bsd/libusb/parse.c delete mode 100644 xorg-server/hw/xfree86/os-support/bsd/libusb/usage.c delete mode 100644 xorg-server/hw/xfree86/os-support/bsd/libusb/usb.3 delete mode 100644 xorg-server/hw/xfree86/os-support/bsd/libusb/usb.h delete mode 100644 xorg-server/hw/xfree86/os-support/bsd/libusb/usb_hid_usages delete mode 100644 xorg-server/hw/xfree86/os-support/bsd/libusb/usbvar.h delete mode 100644 xorg-server/hw/xfree86/os-support/bus/ix86Pci.c delete mode 100644 xorg-server/hw/xfree86/os-support/bus/ppcPci.c delete mode 100644 xorg-server/hw/xfree86/os-support/bus/sparcPci.c delete mode 100644 xorg-server/hw/xfree86/os-support/hurd/hurd_mouse.c delete mode 100644 xorg-server/hw/xfree86/os-support/linux/lnxResource.c delete mode 100644 xorg-server/hw/xfree86/os-support/linux/lnx_jstk.c delete mode 100644 xorg-server/hw/xfree86/os-support/linux/lnx_mouse.c delete mode 100644 xorg-server/hw/xfree86/os-support/lynxos/Makefile.am delete mode 100644 xorg-server/hw/xfree86/os-support/lynxos/Makefile.in delete mode 100644 xorg-server/hw/xfree86/os-support/lynxos/lynx_init.c delete mode 100644 xorg-server/hw/xfree86/os-support/lynxos/lynx_mmap.c delete mode 100644 xorg-server/hw/xfree86/os-support/lynxos/lynx_mouse.c delete mode 100644 xorg-server/hw/xfree86/os-support/lynxos/lynx_noinline.c delete mode 100644 xorg-server/hw/xfree86/os-support/lynxos/lynx_ppc.S delete mode 100644 xorg-server/hw/xfree86/os-support/lynxos/lynx_ppc.c delete mode 100644 xorg-server/hw/xfree86/os-support/lynxos/lynx_video.c delete mode 100644 xorg-server/hw/xfree86/os-support/misc/BUSmemcpy.S delete mode 100644 xorg-server/hw/xfree86/os-support/misc/IODelay.S delete mode 100644 xorg-server/hw/xfree86/os-support/misc/IODelay.c delete mode 100644 xorg-server/hw/xfree86/os-support/misc/PortIO.S delete mode 100644 xorg-server/hw/xfree86/os-support/misc/SlowBcopy.S delete mode 100644 xorg-server/hw/xfree86/os-support/misc/xf86_IlHack.c delete mode 100644 xorg-server/hw/xfree86/os-support/misc/xf86_Util.c delete mode 100644 xorg-server/hw/xfree86/os-support/sco/sco_mouse.c delete mode 100644 xorg-server/hw/xfree86/os-support/shared/inout.S delete mode 100644 xorg-server/hw/xfree86/os-support/solaris/sun_bios.c delete mode 100644 xorg-server/hw/xfree86/os-support/solaris/sun_mouse.c delete mode 100644 xorg-server/hw/xfree86/os-support/sysv/sysv_mouse.c delete mode 100644 xorg-server/hw/xfree86/os-support/usl/Makefile.am delete mode 100644 xorg-server/hw/xfree86/os-support/usl/Makefile.in delete mode 100644 xorg-server/hw/xfree86/os-support/usl/usl_init.c delete mode 100644 xorg-server/hw/xfree86/os-support/usl/usl_iop.c delete mode 100644 xorg-server/hw/xfree86/os-support/usl/usl_mouse.c delete mode 100644 xorg-server/hw/xfree86/os-support/usl/usl_video.c delete mode 100644 xorg-server/hw/xfree86/os-support/usl/usl_vtsw.c delete mode 100644 xorg-server/hw/xfree86/os-support/xf86OSmouse.h delete mode 100644 xorg-server/hw/xfree86/parser/cpconfig.c delete mode 100644 xorg-server/hw/xfree86/rac/Makefile.am delete mode 100644 xorg-server/hw/xfree86/rac/Makefile.in delete mode 100644 xorg-server/hw/xfree86/rac/xf86RAC.c delete mode 100644 xorg-server/hw/xfree86/rac/xf86RAC.h delete mode 100644 xorg-server/hw/xfree86/utils/ioport/Makefile.am delete mode 100644 xorg-server/hw/xfree86/utils/ioport/Makefile.in delete mode 100644 xorg-server/hw/xfree86/utils/ioport/ioport.c delete mode 100644 xorg-server/hw/xfree86/utils/kbd_mode/Makefile.am delete mode 100644 xorg-server/hw/xfree86/utils/kbd_mode/Makefile.in delete mode 100644 xorg-server/hw/xfree86/utils/kbd_mode/bsd-kbd_mode.c delete mode 100644 xorg-server/hw/xfree86/utils/kbd_mode/bsd-kbd_mode.man.pre delete mode 100644 xorg-server/hw/xfree86/utils/kbd_mode/sun-kbd_mode.c delete mode 100644 xorg-server/hw/xfree86/utils/kbd_mode/sun-kbd_mode.man.pre delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/Makefile.am delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/Makefile.in delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/TODO delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/XOrgCfg.pre delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/accessx.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/card-cfg.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/card-cfg.h delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/card.xbm delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/card.xpm delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/cards.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/cards.h delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/computer.xpm delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/config.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/config.h delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/down.xbm delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/expert.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/help.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/help.h delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/interface.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/keyboard-cfg.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/keyboard-cfg.h delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/keyboard.xbm delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/keyboard.xpm delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/left.xbm delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/loader.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/loader.h delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/loadmod.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/monitor-cfg.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/monitor-cfg.h delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/monitor.xbm delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/monitor.xpm delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/mouse-cfg.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/mouse-cfg.h delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/mouse.xbm delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/mouse.xpm delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/narrower.xbm delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/options.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/options.h delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/right.xbm delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/screen-cfg.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/screen-cfg.h delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/screen.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/screen.h delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/shorter.xbm delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/startx.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/stubs.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/stubs.h delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/taller.xbm delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/text-mode.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/up.xbm delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/vidmode.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/vidmode.h delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/wider.xbm delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/xf86config.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/xf86config.h delete mode 100644 xorg-server/hw/xfree86/utils/xorgcfg/xorgcfg.man.pre delete mode 100644 xorg-server/hw/xfree86/utils/xorgconfig/Cards delete mode 100644 xorg-server/hw/xfree86/utils/xorgconfig/Cards98 delete mode 100644 xorg-server/hw/xfree86/utils/xorgconfig/Makefile.am delete mode 100644 xorg-server/hw/xfree86/utils/xorgconfig/Makefile.in delete mode 100644 xorg-server/hw/xfree86/utils/xorgconfig/cards.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgconfig/cards.h delete mode 100644 xorg-server/hw/xfree86/utils/xorgconfig/xorgconfig.c delete mode 100644 xorg-server/hw/xfree86/utils/xorgconfig/xorgconfig.man.pre delete mode 100644 xorg-server/hw/xfree86/xaa/xaaTEGlyphBlt.S delete mode 100644 xorg-server/hw/xfree86/xf1bpp/Makefile.am delete mode 100644 xorg-server/hw/xfree86/xf1bpp/Makefile.in delete mode 100644 xorg-server/hw/xfree86/xf1bpp/maskbits.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbbitblt.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbbltC.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbbltCI.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbbltG.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbbltO.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbbltX.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbbres.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbbresd.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbclip.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbcmap.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbfillarc.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbfillrct.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbfillsp.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbfont.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbgc.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbgetsp.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbhrzvert.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbigbblak.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbigbwht.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbimage.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbline.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbmap.h delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbmap.sh delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbmisc.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbmodule.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbpablack.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbpainv.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbpawhite.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbpgbblak.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbpgbinv.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbpgbwht.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbpixmap.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbplyblack.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbplyinv.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbplywhite.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbpolypnt.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbpushpxl.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbscrclse.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbscrinit.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbseg.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbsetsp.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbteblack.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbtewhite.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbtileC.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbtileG.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbunmap.h delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbunmap.sh delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbwindow.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/mfbzerarc.c delete mode 100644 xorg-server/hw/xfree86/xf1bpp/xf1bpp.h delete mode 100644 xorg-server/hw/xfree86/xf4bpp/Makefile.am delete mode 100644 xorg-server/hw/xfree86/xf4bpp/Makefile.in delete mode 100644 xorg-server/hw/xfree86/xf4bpp/NOTES delete mode 100644 xorg-server/hw/xfree86/xf4bpp/OScompiler.h delete mode 100644 xorg-server/hw/xfree86/xf4bpp/emulOpStip.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/emulRepAre.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/emulTile.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ibmTrace.h delete mode 100644 xorg-server/hw/xfree86/xf4bpp/mfbbres.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/mfbbresd.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/mfbfillarc.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/mfbhrzvert.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/mfbimggblt.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/mfbline.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/mfbseg.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/mfbzerarc.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/offscreen.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcArea.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcCReduce.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcClip.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcCpArea.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcDepth.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcFillRct.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcGC.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcGCstr.h delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcGetSp.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcIO.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcImg.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcPixFS.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcPixmap.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcPolyPnt.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcQuery.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcRslvC.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcSetSp.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcSpMcro.h delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcWinFS.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/ppcWindow.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/vgaBitBlt.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/vgaGC.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/vgaImages.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/vgaReg.h delete mode 100644 xorg-server/hw/xfree86/xf4bpp/vgaSolid.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/vgaStipple.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/vgaVideo.h delete mode 100644 xorg-server/hw/xfree86/xf4bpp/vgamodule.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/wm3.c delete mode 100644 xorg-server/hw/xfree86/xf4bpp/wm3.h delete mode 100644 xorg-server/hw/xfree86/xf4bpp/xf4bpp.h delete mode 100644 xorg-server/hw/xfree86/xf8_32bpp/Makefile.am delete mode 100644 xorg-server/hw/xfree86/xf8_32bpp/Makefile.in delete mode 100644 xorg-server/hw/xfree86/xf8_32bpp/cfb8_32.h delete mode 100644 xorg-server/hw/xfree86/xf8_32bpp/cfb8_32module.c delete mode 100644 xorg-server/hw/xfree86/xf8_32bpp/cfbcpyarea.c delete mode 100644 xorg-server/hw/xfree86/xf8_32bpp/cfbcpyplane.c delete mode 100644 xorg-server/hw/xfree86/xf8_32bpp/cfbgc.c delete mode 100644 xorg-server/hw/xfree86/xf8_32bpp/cfbgc32.c delete mode 100644 xorg-server/hw/xfree86/xf8_32bpp/cfbgc8.c delete mode 100644 xorg-server/hw/xfree86/xf8_32bpp/cfbgcmisc.c delete mode 100644 xorg-server/hw/xfree86/xf8_32bpp/cfbgcunder.c delete mode 100644 xorg-server/hw/xfree86/xf8_32bpp/cfbimage.c delete mode 100644 xorg-server/hw/xfree86/xf8_32bpp/cfbpntwin.c delete mode 100644 xorg-server/hw/xfree86/xf8_32bpp/cfbscrinit.c delete mode 100644 xorg-server/hw/xfree86/xf8_32bpp/cfbwindow.c delete mode 100644 xorg-server/hw/xfree86/xf8_32bpp/xf86overlay.c (limited to 'xorg-server/hw/xfree86') diff --git a/xorg-server/hw/xfree86/Makefile.am b/xorg-server/hw/xfree86/Makefile.am index 03c2c3a3f..98d7ec806 100644 --- a/xorg-server/hw/xfree86/Makefile.am +++ b/xorg-server/hw/xfree86/Makefile.am @@ -12,24 +12,16 @@ if XF86UTILS XF86UTILS_SUBDIR = utils endif -if MFB -MFB_SUBDIR = xf1bpp xf4bpp -endif - -if CFB -CFB_SUBDIR = xf8_32bpp -endif - DOC_SUBDIR = doc -SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser rac \ - ramdac shadowfb vbe vgahw xaa $(MFB_SUBDIR) $(CFB_SUBDIR) \ +SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser \ + ramdac shadowfb vbe vgahw xaa \ xf8_16bpp loader dixmods exa modes \ $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR) DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \ - parser rac ramdac shadowfb vbe vgahw xaa xf1bpp xf4bpp \ - xf8_16bpp xf8_32bpp loader dixmods dri dri2 exa modes \ + parser ramdac shadowfb vbe vgahw xaa \ + xf8_16bpp loader dixmods dri dri2 exa modes \ utils doc bin_PROGRAMS = Xorg @@ -56,7 +48,6 @@ XORG_LIBS = \ common/libinit.a \ loader/libloader.a \ libosandcommon.la \ - rac/librac.a \ parser/libxf86config.a \ dixmods/libdixmods.la \ modes/libxf86modes.a \ diff --git a/xorg-server/hw/xfree86/Makefile.in b/xorg-server/hw/xfree86/Makefile.in index 7bfe644b5..4a49f8687 100644 --- a/xorg-server/hw/xfree86/Makefile.in +++ b/xorg-server/hw/xfree86/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -55,7 +55,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -73,11 +72,11 @@ am_Xorg_OBJECTS = xorg.$(OBJEXT) Xorg_OBJECTS = $(am_Xorg_OBJECTS) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) common/libinit.a \ - loader/libloader.a libosandcommon.la rac/librac.a \ - parser/libxf86config.a dixmods/libdixmods.la \ - modes/libxf86modes.a ramdac/libramdac.a ddc/libddc.a \ - i2c/libi2c.a dixmods/libxorgxkb.la $(top_builddir)/mi/libmi.la \ - $(top_builddir)/os/libos.la dixmods/libxorgxkb.la + loader/libloader.a libosandcommon.la parser/libxf86config.a \ + dixmods/libdixmods.la modes/libxf86modes.a ramdac/libramdac.a \ + ddc/libddc.a i2c/libi2c.a dixmods/libxorgxkb.la \ + $(top_builddir)/mi/libmi.la $(top_builddir)/os/libos.la \ + dixmods/libxorgxkb.la Xorg_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(Xorg_LDFLAGS) \ $(LDFLAGS) -o $@ @@ -86,9 +85,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -120,8 +116,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -142,10 +139,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -167,6 +160,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -176,18 +170,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -206,7 +197,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -220,7 +211,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -232,8 +226,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -242,8 +235,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -276,7 +269,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -286,27 +278,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -317,10 +294,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = \ @@ -328,7 +301,6 @@ XORG_LIBS = \ common/libinit.a \ loader/libloader.a \ libosandcommon.la \ - rac/librac.a \ parser/libxf86config.a \ dixmods/libdixmods.la \ modes/libxf86modes.a \ @@ -346,13 +318,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -385,8 +352,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -406,7 +372,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -416,12 +381,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -439,8 +404,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ SUFFIXES = .pre .man .man.pre # Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM @@ -478,17 +441,15 @@ MANDEFS = \ @DRI_TRUE@DRI_SUBDIR = dri @DRI2_TRUE@DRI2_SUBDIR = dri2 @XF86UTILS_TRUE@XF86UTILS_SUBDIR = utils -@MFB_TRUE@MFB_SUBDIR = xf1bpp xf4bpp -@CFB_TRUE@CFB_SUBDIR = xf8_32bpp DOC_SUBDIR = doc -SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser rac \ - ramdac shadowfb vbe vgahw xaa $(MFB_SUBDIR) $(CFB_SUBDIR) \ +SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser \ + ramdac shadowfb vbe vgahw xaa \ xf8_16bpp loader dixmods exa modes \ $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR) DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \ - parser rac ramdac shadowfb vbe vgahw xaa xf1bpp xf4bpp \ - xf8_16bpp xf8_32bpp loader dixmods dri dri2 exa modes \ + parser ramdac shadowfb vbe vgahw xaa \ + xf8_16bpp loader dixmods dri dri2 exa modes \ utils doc AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ @@ -529,8 +490,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -725,7 +686,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/common/Makefile.am b/xorg-server/hw/xfree86/common/Makefile.am index 1379f457c..b38c14a7d 100644 --- a/xorg-server/hw/xfree86/common/Makefile.am +++ b/xorg-server/hw/xfree86/common/Makefile.am @@ -5,21 +5,16 @@ if XORG_BUS_SPARC SBUS_SOURCES = xf86sbusBus.c endif -if DEBUG -DEBUGSOURCES = xf86Debug.c -endif - if XV XVSOURCES = xf86xv.c xf86xvmc.c XVSDKINCS = xf86xv.h xf86xvmc.h endif -XKBSOURCES = xf86XKB.c XISOURCES = xf86Xinput.c xisb.c XISDKINCS = xf86Xinput.h xisb.h RANDRSOURCES = xf86RandR.c -BUSSOURCES = xf86isaBus.c xf86pciBus.c xf86fbBus.c xf86noBus.c $(SBUS_SOURCES) +BUSSOURCES = xf86pciBus.c xf86fbBus.c xf86noBus.c $(SBUS_SOURCES) MODEDEFSOURCES = $(srcdir)/vesamodes $(srcdir)/extramodes @@ -30,40 +25,38 @@ xf86DefModeSet.c: $(srcdir)/modeline2c.awk $(MODEDEFSOURCES) BUILT_SOURCES = xf86DefModeSet.c AM_LDFLAGS = -r -libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \ +libcommon_la_SOURCES = xf86Configure.c xf86ShowOpts.c xf86Bus.c xf86Config.c \ xf86Cursor.c xf86DGA.c xf86DPMS.c \ - xf86DoProbe.c xf86Events.c \ - xf86Globals.c xf86AutoConfig.c \ - xf86MiscExt.c xf86Option.c \ + xf86Events.c xf86Globals.c xf86AutoConfig.c \ + xf86Option.c \ xf86VidMode.c xf86fbman.c xf86cmap.c \ - xf86Helper.c xf86PM.c \ - xf86Mode.c xf86Build.h xorgHelper.c xf86Versions.c \ - $(XVSOURCES) $(BUSSOURCES) $(XKBSOURCES) \ - $(DEBUGSOURCES) $(XISOURCES) $(RANDRSOURCES) + xf86Helper.c xf86PM.c xf86RAC.c xf86Xinput.c xisb.c \ + xf86Mode.c xorgHelper.c \ + $(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES) nodist_libcommon_la_SOURCES = xf86DefModeSet.c -libinit_a_SOURCES = xf86Build.h xf86Init.c +libinit_a_SOURCES = xf86Init.c +nodist_libinit_a_SOURCES = xf86Build.h INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \ -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ - -I$(srcdir)/../vgahw -I$(srcdir)/../dixmods/extmod + -I$(srcdir)/../vgahw -I$(srcdir)/../dixmods/extmod \ + -I$(srcdir)/../modes sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \ xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86Resources.h \ - xf86cmap.h xf86fbman.h xf86str.h $(XISDKINCS) \ - $(XVSDKINCS) atKeynames.h xf86Version.h xorgVersion.h \ - xf86sbusBus.h xf86xv.h xf86xvmc.h xf86xvpriv.h + xf86cmap.h xf86fbman.h xf86str.h xf86RAC.h xf86Xinput.h xisb.h \ + $(XVSDKINCS) xorgVersion.h \ + xf86sbusBus.h xf86xvpriv.h DISTCLEANFILES = xf86Build.h CLEANFILES = $(BUILT_SOURCES) EXTRA_DIST = \ - atKeynames.h \ compiler.h \ fourcc.h \ scoasm.h \ xf86.h \ - xf86Build.h \ xf86Bus.h \ xf86Config.h \ xf86InPriv.h \ @@ -82,8 +75,6 @@ EXTRA_DIST = \ xf86xvmc.h \ xf86xvpriv.h \ xisb.h \ - xf86Build.h.in \ - xf86Version.h \ xorgVersion.h \ xf86Date.h \ $(MODEDEFSOURCES) \ diff --git a/xorg-server/hw/xfree86/common/Makefile.in b/xorg-server/hw/xfree86/common/Makefile.in index 443492823..a93593a26 100644 --- a/xorg-server/hw/xfree86/common/Makefile.in +++ b/xorg-server/hw/xfree86/common/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -47,7 +47,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -58,33 +57,30 @@ ARFLAGS = cru libinit_a_AR = $(AR) $(ARFLAGS) libinit_a_LIBADD = am_libinit_a_OBJECTS = xf86Init.$(OBJEXT) -libinit_a_OBJECTS = $(am_libinit_a_OBJECTS) +nodist_libinit_a_OBJECTS = +libinit_a_OBJECTS = $(am_libinit_a_OBJECTS) \ + $(nodist_libinit_a_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) libcommon_la_LIBADD = -am__libcommon_la_SOURCES_DIST = xf86Configure.c xf86Bus.c xf86Config.c \ - xf86Cursor.c xf86DGA.c xf86DPMS.c xf86DoProbe.c xf86Events.c \ - xf86Globals.c xf86AutoConfig.c xf86MiscExt.c xf86Option.c \ +am__libcommon_la_SOURCES_DIST = xf86Configure.c xf86ShowOpts.c \ + xf86Bus.c xf86Config.c xf86Cursor.c xf86DGA.c xf86DPMS.c \ + xf86Events.c xf86Globals.c xf86AutoConfig.c xf86Option.c \ xf86VidMode.c xf86fbman.c xf86cmap.c xf86Helper.c xf86PM.c \ - xf86Mode.c xf86Build.h xorgHelper.c xf86Versions.c xf86xv.c \ - xf86xvmc.c xf86isaBus.c xf86pciBus.c xf86fbBus.c xf86noBus.c \ - xf86sbusBus.c xf86XKB.c xf86Debug.c xf86Xinput.c xisb.c \ + xf86RAC.c xf86Xinput.c xisb.c xf86Mode.c xorgHelper.c xf86xv.c \ + xf86xvmc.c xf86pciBus.c xf86fbBus.c xf86noBus.c xf86sbusBus.c \ xf86RandR.c @XV_TRUE@am__objects_1 = xf86xv.lo xf86xvmc.lo @XORG_BUS_SPARC_TRUE@am__objects_2 = xf86sbusBus.lo -am__objects_3 = xf86isaBus.lo xf86pciBus.lo xf86fbBus.lo xf86noBus.lo \ +am__objects_3 = xf86pciBus.lo xf86fbBus.lo xf86noBus.lo \ $(am__objects_2) -am__objects_4 = xf86XKB.lo -@DEBUG_TRUE@am__objects_5 = xf86Debug.lo -am__objects_6 = xf86Xinput.lo xisb.lo -am__objects_7 = xf86RandR.lo -am_libcommon_la_OBJECTS = xf86Configure.lo xf86Bus.lo xf86Config.lo \ - xf86Cursor.lo xf86DGA.lo xf86DPMS.lo xf86DoProbe.lo \ - xf86Events.lo xf86Globals.lo xf86AutoConfig.lo xf86MiscExt.lo \ - xf86Option.lo xf86VidMode.lo xf86fbman.lo xf86cmap.lo \ - xf86Helper.lo xf86PM.lo xf86Mode.lo xorgHelper.lo \ - xf86Versions.lo $(am__objects_1) $(am__objects_3) \ - $(am__objects_4) $(am__objects_5) $(am__objects_6) \ - $(am__objects_7) +am__objects_4 = xf86RandR.lo +am_libcommon_la_OBJECTS = xf86Configure.lo xf86ShowOpts.lo xf86Bus.lo \ + xf86Config.lo xf86Cursor.lo xf86DGA.lo xf86DPMS.lo \ + xf86Events.lo xf86Globals.lo xf86AutoConfig.lo xf86Option.lo \ + xf86VidMode.lo xf86fbman.lo xf86cmap.lo xf86Helper.lo \ + xf86PM.lo xf86RAC.lo xf86Xinput.lo xisb.lo xf86Mode.lo \ + xorgHelper.lo $(am__objects_1) $(am__objects_3) \ + $(am__objects_4) nodist_libcommon_la_OBJECTS = xf86DefModeSet.lo libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) \ $(nodist_libcommon_la_OBJECTS) @@ -93,21 +89,18 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libinit_a_SOURCES) $(libcommon_la_SOURCES) \ - $(nodist_libcommon_la_SOURCES) +SOURCES = $(libinit_a_SOURCES) $(nodist_libinit_a_SOURCES) \ + $(libcommon_la_SOURCES) $(nodist_libcommon_la_SOURCES) DIST_SOURCES = $(libinit_a_SOURCES) $(am__libcommon_la_SOURCES_DIST) am__sdk_HEADERS_DIST = compiler.h fourcc.h xf86.h xf86Module.h \ xf86Opt.h xf86PciInfo.h xf86Priv.h xf86Privstr.h \ - xf86Resources.h xf86cmap.h xf86fbman.h xf86str.h xf86Xinput.h \ - xisb.h xf86xv.h xf86xvmc.h atKeynames.h xf86Version.h \ - xorgVersion.h xf86sbusBus.h xf86xvpriv.h + xf86Resources.h xf86cmap.h xf86fbman.h xf86str.h xf86RAC.h \ + xf86Xinput.h xisb.h xf86xv.h xf86xvmc.h xorgVersion.h \ + xf86sbusBus.h xf86xvpriv.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -125,8 +118,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -147,10 +141,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -172,6 +162,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -181,18 +172,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -211,7 +199,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -225,7 +213,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -237,8 +228,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -247,8 +237,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -281,7 +271,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -291,27 +280,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -322,10 +296,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ $(am__append_1) XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -334,13 +304,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -373,8 +338,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -394,7 +358,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -404,12 +367,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -427,55 +390,49 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ noinst_LIBRARIES = libinit.a noinst_LTLIBRARIES = libcommon.la @XORG_BUS_SPARC_TRUE@SBUS_SOURCES = xf86sbusBus.c -@DEBUG_TRUE@DEBUGSOURCES = xf86Debug.c @XV_TRUE@XVSOURCES = xf86xv.c xf86xvmc.c @XV_TRUE@XVSDKINCS = xf86xv.h xf86xvmc.h -XKBSOURCES = xf86XKB.c XISOURCES = xf86Xinput.c xisb.c XISDKINCS = xf86Xinput.h xisb.h RANDRSOURCES = xf86RandR.c -BUSSOURCES = xf86isaBus.c xf86pciBus.c xf86fbBus.c xf86noBus.c $(SBUS_SOURCES) +BUSSOURCES = xf86pciBus.c xf86fbBus.c xf86noBus.c $(SBUS_SOURCES) MODEDEFSOURCES = $(srcdir)/vesamodes $(srcdir)/extramodes BUILT_SOURCES = xf86DefModeSet.c AM_LDFLAGS = -r -libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \ +libcommon_la_SOURCES = xf86Configure.c xf86ShowOpts.c xf86Bus.c xf86Config.c \ xf86Cursor.c xf86DGA.c xf86DPMS.c \ - xf86DoProbe.c xf86Events.c \ - xf86Globals.c xf86AutoConfig.c \ - xf86MiscExt.c xf86Option.c \ + xf86Events.c xf86Globals.c xf86AutoConfig.c \ + xf86Option.c \ xf86VidMode.c xf86fbman.c xf86cmap.c \ - xf86Helper.c xf86PM.c \ - xf86Mode.c xf86Build.h xorgHelper.c xf86Versions.c \ - $(XVSOURCES) $(BUSSOURCES) $(XKBSOURCES) \ - $(DEBUGSOURCES) $(XISOURCES) $(RANDRSOURCES) + xf86Helper.c xf86PM.c xf86RAC.c xf86Xinput.c xisb.c \ + xf86Mode.c xorgHelper.c \ + $(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES) nodist_libcommon_la_SOURCES = xf86DefModeSet.c -libinit_a_SOURCES = xf86Build.h xf86Init.c +libinit_a_SOURCES = xf86Init.c +nodist_libinit_a_SOURCES = xf86Build.h INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \ -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ - -I$(srcdir)/../vgahw -I$(srcdir)/../dixmods/extmod + -I$(srcdir)/../vgahw -I$(srcdir)/../dixmods/extmod \ + -I$(srcdir)/../modes sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \ xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86Resources.h \ - xf86cmap.h xf86fbman.h xf86str.h $(XISDKINCS) \ - $(XVSDKINCS) atKeynames.h xf86Version.h xorgVersion.h \ - xf86sbusBus.h xf86xv.h xf86xvmc.h xf86xvpriv.h + xf86cmap.h xf86fbman.h xf86str.h xf86RAC.h xf86Xinput.h xisb.h \ + $(XVSDKINCS) xorgVersion.h \ + xf86sbusBus.h xf86xvpriv.h DISTCLEANFILES = xf86Build.h CLEANFILES = $(BUILT_SOURCES) EXTRA_DIST = \ - atKeynames.h \ compiler.h \ fourcc.h \ scoasm.h \ xf86.h \ - xf86Build.h \ xf86Bus.h \ xf86Config.h \ xf86InPriv.h \ @@ -494,8 +451,6 @@ EXTRA_DIST = \ xf86xvmc.h \ xf86xvpriv.h \ xisb.h \ - xf86Build.h.in \ - xf86Version.h \ xorgVersion.h \ xf86Date.h \ $(MODEDEFSOURCES) \ @@ -512,8 +467,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -571,26 +526,22 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Cursor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86DGA.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86DPMS.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86DefModeSet.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86DoProbe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Events.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Globals.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Helper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Init.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86MiscExt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Mode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Option.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86PM.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RAC.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RandR.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Versions.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86ShowOpts.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86VidMode.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86XKB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Xinput.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86cmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86fbBus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86fbman.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86isaBus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86noBus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86pciBus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86sbusBus.Plo@am__quote@ @@ -648,7 +599,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/common/atKeynames.h b/xorg-server/hw/xfree86/common/atKeynames.h deleted file mode 100644 index 85f13ac32..000000000 --- a/xorg-server/hw/xfree86/common/atKeynames.h +++ /dev/null @@ -1,295 +0,0 @@ -/* - * 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 - -#define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7))) -#define ModifierDown(k) ((keyc->state & (k)) == (k)) - -/* - * 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/xfree86/common/compiler.h b/xorg-server/hw/xfree86/common/compiler.h index 7b65da844..285d9a3f6 100644 --- a/xorg-server/hw/xfree86/common/compiler.h +++ b/xorg-server/hw/xfree86/common/compiler.h @@ -75,43 +75,10 @@ # endif # endif /* __inline */ -# if defined(IODEBUG) && defined(__GNUC__) -# define outb RealOutb -# define outw RealOutw -# define outl RealOutl -# define inb RealInb -# define inw RealInw -# define inl RealInl -# endif - -# if defined(QNX4) /* Do this for now to keep Watcom happy */ -# define outb outp -# define outw outpw -# define outl outpd -# define inb inp -# define inw inpw -# define inl inpd - -/* Define the ffs function for inlining */ -extern int ffs(unsigned long); -# pragma aux ffs_ = \ - "bsf edx, eax" \ - "jnz bits_set" \ - "xor eax, eax" \ - "jmp exit1" \ - "bits_set:" \ - "mov eax, edx" \ - "inc eax" \ - "exit1:" \ - __parm [eax] \ - __modify [eax edx] \ - __value [eax] \ - ; -# endif - -# if defined(__SUNPRO_C) -# define DO_PROTOTYPES -# endif +/* Support gcc's __FUNCTION__ for people using other compilers */ +#if !defined(__GNUC__) && !defined(__FUNCTION__) +# define __FUNCTION__ __func__ /* C99 */ +#endif # if defined(NO_INLINE) || defined(DO_PROTOTYPES) @@ -250,7 +217,7 @@ struct __una_u16 { unsigned short x __attribute__((packed)); }; static __inline__ unsigned long ldq_u(unsigned long * r11) { -# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +# if defined(__GNUC__) const struct __una_u64 *ptr = (const struct __una_u64 *) r11; return ptr->x; # else @@ -269,7 +236,7 @@ static __inline__ unsigned long ldq_u(unsigned long * r11) static __inline__ unsigned long ldl_u(unsigned int * r11) { -# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +# if defined(__GNUC__) const struct __una_u32 *ptr = (const struct __una_u32 *) r11; return ptr->x; # else @@ -288,7 +255,7 @@ static __inline__ unsigned long ldl_u(unsigned int * r11) static __inline__ unsigned long ldw_u(unsigned short * r11) { -# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +# if defined(__GNUC__) const struct __una_u16 *ptr = (const struct __una_u16 *) r11; return ptr->x; # else @@ -311,7 +278,7 @@ static __inline__ unsigned long ldw_u(unsigned short * r11) static __inline__ void stq_u(unsigned long r5, unsigned long * r11) { -# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +# if defined(__GNUC__) struct __una_u64 *ptr = (struct __una_u64 *) r11; ptr->x = r5; # else @@ -336,7 +303,7 @@ static __inline__ void stq_u(unsigned long r5, unsigned long * r11) static __inline__ void stl_u(unsigned long r5, unsigned int * r11) { -# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +# if defined(__GNUC__) struct __una_u32 *ptr = (struct __una_u32 *) r11; ptr->x = r5; # else @@ -361,7 +328,7 @@ static __inline__ void stl_u(unsigned long r5, unsigned int * r11) static __inline__ void stw_u(unsigned long r5, unsigned short * r11) { -# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +# if defined(__GNUC__) struct __una_u16 *ptr = (struct __una_u16 *) r11; ptr->x = r5; # else @@ -498,7 +465,7 @@ extern unsigned int inb(unsigned long port); extern unsigned int inw(unsigned long port); extern unsigned int inl(unsigned long port); -# elif defined(linux) && (defined(__amd64__) || defined(__x86_64__)) +# elif defined(linux) && defined(__amd64__) # include @@ -564,9 +531,8 @@ inl(unsigned short port) return ret; } -# elif (defined(linux) || defined(Lynx) || defined(sun) || defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__sparc__) +# elif (defined(linux) || defined(sun) || defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__sparc__) -# if !defined(Lynx) # ifndef ASI_PL # define ASI_PL 0x88 # endif @@ -805,7 +771,6 @@ xf86WriteMmio32LeNB(__volatile__ void *base, const unsigned long offset, : "r" (val), "r" (addr), "i" (ASI_PL)); } -# endif /* !Lynx */ /* * EGCS 1.1 knows about arbitrary unaligned loads. Define some @@ -820,7 +785,7 @@ struct __una_u16 { unsigned short x __attribute__((packed)); }; static __inline__ unsigned long ldq_u(unsigned long *p) { -# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +# if defined(__GNUC__) # if defined(__arch64__) || defined(__sparcv9) const struct __una_u64 *ptr = (const struct __una_u64 *) p; # else @@ -836,7 +801,7 @@ static __inline__ unsigned long ldq_u(unsigned long *p) static __inline__ unsigned long ldl_u(unsigned int *p) { -# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +# if defined(__GNUC__) const struct __una_u32 *ptr = (const struct __una_u32 *) p; return ptr->x; # else @@ -848,7 +813,7 @@ static __inline__ unsigned long ldl_u(unsigned int *p) static __inline__ unsigned long ldw_u(unsigned short *p) { -# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +# if defined(__GNUC__) const struct __una_u16 *ptr = (const struct __una_u16 *) p; return ptr->x; # else @@ -860,7 +825,7 @@ static __inline__ unsigned long ldw_u(unsigned short *p) static __inline__ void stq_u(unsigned long val, unsigned long *p) { -# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +# if defined(__GNUC__) # if defined(__arch64__) || defined(__sparcv9) struct __una_u64 *ptr = (struct __una_u64 *) p; # else @@ -875,7 +840,7 @@ static __inline__ void stq_u(unsigned long val, unsigned long *p) static __inline__ void stl_u(unsigned long val, unsigned int *p) { -# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +# if defined(__GNUC__) struct __una_u32 *ptr = (struct __una_u32 *) p; ptr->x = val; # else @@ -886,7 +851,7 @@ static __inline__ void stl_u(unsigned long val, unsigned int *p) static __inline__ void stw_u(unsigned long val, unsigned short *p) { -# if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +# if defined(__GNUC__) struct __una_u16 *ptr = (struct __una_u16 *) p; ptr->x = val; # else @@ -1067,7 +1032,7 @@ xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset, # define write_mem_barrier() /* NOP */ # endif /* __arm32__ */ -# elif (defined(Lynx) || defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)) && defined(__powerpc__) +# elif (defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)) && defined(__powerpc__) # ifndef MAP_FAILED # define MAP_FAILED ((void *)-1) @@ -1363,7 +1328,7 @@ do { \ # define write_mem_barrier() /* NOP */ # if !defined(__SUNPRO_C) -# if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) +# if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__m32r__) # ifdef GCCUSESGAS /* @@ -1472,7 +1437,7 @@ inl(unsigned short port) # endif /* GCCUSESGAS */ -# else /* !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__)*/ +# else /* !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__m32r__) */ static __inline__ void outb(unsigned short port, unsigned char val) @@ -1513,7 +1478,6 @@ inl(unsigned short port) # endif /* ix86 */ # else /* !GNUC */ -# if !defined(QNX4) # if defined(__STDC__) && (__STDC__ == 1) # ifndef asm # define asm __asm @@ -1529,13 +1493,13 @@ inl(unsigned short port) # define uint_t unsigned int # define uchar_t unsigned char # endif /* __UNIXWARE__ */ -# if !defined(sgi) && !defined(__SUNPRO_C) +# if !defined(__SUNPRO_C) # include # endif # else # include "scoasm.h" # endif -# if (!defined(__HIGHC__) && !defined(sgi) && !defined(__SUNPRO_C)) || \ +# if !defined(__HIGHC__) && !defined(__SUNPRO_C) || \ defined(__USLC__) # pragma asm partial_optimization outl # pragma asm partial_optimization outw @@ -1544,7 +1508,6 @@ inl(unsigned short port) # pragma asm partial_optimization inw # pragma asm partial_optimization inb # endif -# endif # define ldq_u(p) (*((unsigned long *)(p))) # define ldl_u(p) (*((unsigned int *)(p))) # define ldw_u(p) (*((unsigned short *)(p))) @@ -1555,32 +1518,6 @@ inl(unsigned short port) # define write_mem_barrier() /* NOP */ # endif /* __GNUC__ */ -# if defined(QNX4) -# include -extern unsigned inb(unsigned port); -extern unsigned inw(unsigned port); -extern unsigned inl(unsigned port); -extern void outb(unsigned port, unsigned val); -extern void outw(unsigned port, unsigned val); -extern void outl(unsigned port, unsigned val); -# endif /* QNX4 */ - -# if defined(IODEBUG) && defined(__GNUC__) -# undef inb -# undef inw -# undef inl -# undef outb -# undef outw -# undef outl -# define inb(a) __extension__ ({unsigned char __c=RealInb(a); ErrorF("inb(0x%03x) = 0x%02x\t@ line %4d, file %s\n", a, __c, __LINE__, __FILE__);__c;}) -# define inw(a) __extension__ ({unsigned short __c=RealInw(a); ErrorF("inw(0x%03x) = 0x%04x\t@ line %4d, file %s\n", a, __c, __LINE__, __FILE__);__c;}) -# define inl(a) __extension__ ({unsigned int __c=RealInl(a); ErrorF("inl(0x%03x) = 0x%08x\t@ line %4d, file %s\n", a, __c, __LINE__, __FILE__);__c;}) - -# define outb(a,b) (ErrorF("outb(0x%03x, 0x%02x)\t@ line %4d, file %s\n", a, b, __LINE__, __FILE__),RealOutb(a,b)) -# define outw(a,b) (ErrorF("outw(0x%03x, 0x%04x)\t@ line %4d, file %s\n", a, b, __LINE__, __FILE__),RealOutw(a,b)) -# define outl(a,b) (ErrorF("outl(0x%03x, 0x%08x)\t@ line %4d, file %s\n", a, b, __LINE__, __FILE__),RealOutl(a,b)) -# endif - # endif /* NO_INLINE */ # ifdef __alpha__ @@ -1604,8 +1541,6 @@ extern void (*xf86WriteMmio32)(int, void *, unsigned long); extern void (*xf86WriteMmioNB8)(int, void *, unsigned long); extern void (*xf86WriteMmioNB16)(int, void *, unsigned long); extern void (*xf86WriteMmioNB32)(int, void *, unsigned long); -extern void xf86JensenMemToBus(char *, long, long, int); -extern void xf86JensenBusToMem(char *, char *, unsigned long, int); extern void xf86SlowBCopyFromBus(unsigned char *, unsigned char *, int); extern void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); @@ -1619,20 +1554,13 @@ extern void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); # define MMIO_IN32(base, offset) xf86ReadMmio32(base, offset) # endif -# if defined (JENSEN_SUPPORT) -# define MMIO_OUT32(base, offset, val) \ - (*xf86WriteMmio32)((CARD32)(val), base, offset) -# define MMIO_ONB32(base, offset, val) \ - (*xf86WriteMmioNB32)((CARD32)(val), base, offset) -# else -# define MMIO_OUT32(base, offset, val) \ +# define MMIO_OUT32(base, offset, val) \ do { \ write_mem_barrier(); \ *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val); \ } while (0) -# define MMIO_ONB32(base, offset, val) \ +# define MMIO_ONB32(base, offset, val) \ *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val) -# endif # define MMIO_OUT8(base, offset, val) \ (*xf86WriteMmio8)((CARD8)(val), base, offset) diff --git a/xorg-server/hw/xfree86/common/xf86.h b/xorg-server/hw/xfree86/common/xf86.h index e91521770..a32aa9bcc 100644 --- a/xorg-server/hw/xfree86/common/xf86.h +++ b/xorg-server/hw/xfree86/common/xf86.h @@ -56,6 +56,7 @@ /* General parameters */ extern int xf86DoConfigure; +extern int xf86DoShowOptions; extern Bool xf86DoModalias; extern Bool xf86DoConfigurePass1; extern DevPrivateKey xf86ScreenKey; @@ -65,7 +66,6 @@ extern ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */ extern const unsigned char byte_reversed[256]; extern ScrnInfoPtr xf86CurrentScreen; extern Bool pciSlotClaimed; -extern Bool isaSlotClaimed; extern Bool fbSlotClaimed; #if defined(__sparc__) || defined(__sparc) extern Bool sbusSlotClaimed; @@ -101,22 +101,15 @@ Bool xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func); Bool xf86ComparePciBusString(const char *busID, int bus, int device, int func); void xf86FormatPciBusNumber(int busnum, char *buffer); -void xf86PrintResList(int verb, resPtr list); resPtr xf86AddRangesToList(resPtr list, resRange *pRange, int entityIndex); -int xf86ClaimIsaSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); -int xf86GetIsaInfoForScreen(int scrnIndex); int xf86GetFbInfoForScreen(int scrnIndex); -Bool xf86ParseIsaBusString(const char *busID); int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); void xf86EnableAccess(ScrnInfoPtr pScrn); void xf86SetCurrentAccess(Bool Enable, ScrnInfoPtr pScrn); Bool xf86IsPrimaryPci(struct pci_device * pPci); -Bool xf86IsPrimaryIsa(void); /* new RAC */ resPtr xf86AddResToList(resPtr rlist, resRange *Range, int entityIndex); -resPtr xf86JoinResLists(resPtr rlist1, resPtr rlist2); -resPtr xf86DupResList(const resPtr rlist); void xf86FreeResList(resPtr rlist); void xf86ClaimFixedResources(resList list, int entityIndex); Bool xf86DriverHasEntities(DriverPtr drvp); @@ -140,7 +133,6 @@ Bool xf86IsEntityPrimary(int entityIndex); resPtr xf86ReallocatePciResources(int entityIndex, resPtr pRes); resPtr xf86SetOperatingState(resList list, int entityIndex, int mask); void xf86EnterServerState(xf86State state); -memType xf86ChkConflict(resRange *rgp, int entityIndex); ScrnInfoPtr xf86FindScreenForEntity(int entityIndex); Bool xf86NoSharedResources(int screenIndex, resType res); resPtr xf86FindIntersectOfLists(resPtr l1, resPtr l2); @@ -162,8 +154,6 @@ DevUnion *xf86GetEntityPrivate(int entityIndex, int privIndex); /* xf86Configure.c */ GDevPtr xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int chipset); -GDevPtr xf86AddDeviceToConfigure( const char *driver, - struct pci_device * pVideo, int chipset ); /* xf86Cursor.c */ @@ -205,8 +195,8 @@ void xf86EnableGeneralHandler(pointer handler); void xf86InterceptSignals(int *signo); void xf86InterceptSigIll(void (*sigillhandler)(void)); Bool xf86EnableVTSwitch(Bool new); -Bool xf86CommonSpecialKey(int key, Bool down, int modifiers); void xf86ProcessActionEvent(ActionEvent action, void *arg); +void xf86PrintBacktrace(void); /* xf86Helper.c */ @@ -246,10 +236,6 @@ int xf86MatchPciInstances(const char *driverName, int vendorID, SymTabPtr chipsets, PciChipsets *PCIchipsets, GDevPtr *devList, int numDevs, DriverPtr drvp, int **foundEntities); -int xf86MatchIsaInstances(const char *driverName, SymTabPtr chipsets, - IsaChipsets *ISAchipsets, DriverPtr drvp, - FindIsaDevProc FindIsaDevice, GDevPtr *devList, - int numDevs, int **foundEntities); void xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc)(ScrnInfoPtr, int), void (*ProtectRegs)(ScrnInfoPtr, Bool), @@ -278,7 +264,6 @@ Bool xf86GetModInDevEnabled(void); Bool xf86GetAllowMouseOpenFail(void); Bool xf86IsPc98(void); void xf86DisableRandR(void); -CARD32 xf86GetVersion(void); CARD32 xorgGetVersion(void); CARD32 xf86GetModuleVersion(pointer module); pointer xf86LoadDrvSubModule(DriverPtr drv, const char *name); @@ -301,11 +286,6 @@ ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, resList res, EntityProc init, EntityProc enter, EntityProc leave, pointer private); -ScrnInfoPtr xf86ConfigIsaEntity(ScrnInfoPtr pScrn, int scrnFlag, - int entityIndex, IsaChipsets *i_chip, - resList res, EntityProc init, - EntityProc enter, EntityProc leave, - pointer private); ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, @@ -317,19 +297,10 @@ Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, EntityProc enter, EntityProc leave, pointer private); /* Obsolete! don't use */ -Bool xf86ConfigActiveIsaEntity(ScrnInfoPtr pScrn, - int entityIndex, IsaChipsets *i_chip, - resList res, EntityProc init, - EntityProc enter, EntityProc leave, - pointer private); void xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets *p_chip, resList res, EntityProc init, EntityProc enter, EntityProc leave, pointer private); -void xf86ConfigIsaEntityInactive(EntityInfoPtr pEnt, IsaChipsets *i_chip, - resList res, EntityProc init, - EntityProc enter, EntityProc leave, - pointer private); void xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, EntityProc enter, EntityProc leave, pointer private); @@ -341,23 +312,6 @@ Bool xf86IsUnblank(int mode); _X_DEPRECATED void xf86AddModuleInfo(pointer info, pointer module); _X_DEPRECATED void xf86DeleteModuleInfo(int idx); -void xf86getsecs(long *, long *); - -/* xf86Debug.c */ -#ifdef BUILDDEBUG -CARD8 xf86PeekFb8(CARD8 *p); -CARD16 xf86PeekFb16(CARD16 *p); -CARD32 xf86PeekFb32(CARD32 *p); -void xf86PokeFb8(CARD8 *p, CARD8 v); -void xf86PokeFb16(CARD16 *p, CARD16 v); -void xf86PokeFb32(CARD16 *p, CARD32 v); -CARD8 xf86PeekMmio8(pointer Base, unsigned long Offset); -CARD16 xf86PeekMmio16(pointer Base, unsigned long Offset); -CARD32 xf86PeekMmio32(pointer Base, unsigned long Offset); -void xf86PokeMmio8(pointer Base, unsigned long Offset, CARD8 v); -void xf86PokeMmio16(pointer Base, unsigned long Offset, CARD16 v); -void xf86PokeMmio32(pointer Base, unsigned long Offset, CARD32 v); -#endif /* xf86Init.c */ @@ -390,13 +344,14 @@ void xf86PruneDriverModes(ScrnInfoPtr scrp); void xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags); void xf86PrintModes(ScrnInfoPtr scrp); void xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges); -double xf86ModeHSync(DisplayModePtr mode); -double xf86ModeVRefresh(DisplayModePtr mode); +double xf86ModeHSync(const DisplayModeRec *mode); +double xf86ModeVRefresh(const DisplayModeRec *mode); void xf86SetModeDefaultName(DisplayModePtr mode); void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags); -DisplayModePtr xf86DuplicateMode(DisplayModePtr pMode); +DisplayModePtr xf86DuplicateMode(const DisplayModeRec *pMode); DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList); -Bool xf86ModesEqual(DisplayModePtr pMode1, DisplayModePtr pMode2); +Bool xf86ModesEqual(const DisplayModeRec *pMode1, + const DisplayModeRec *pMode2); void xf86PrintModeline(int scrnIndex,DisplayModePtr mode); DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new); @@ -419,12 +374,6 @@ Bool xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen, Bool VidModeExtensionInit(ScreenPtr pScreen); -/* xf86Versions.c */ -CARD32 xf86GetBuiltinInterfaceVersion(BuiltinInterface iface, int flag); -Bool xf86RegisterBuiltinInterfaceVersion(BuiltinInterface iface, - CARD32 version, int flags); - - #endif /* _NO_XF86_PROTOTYPES */ #endif /* _XF86_H */ diff --git a/xorg-server/hw/xfree86/common/xf86AutoConfig.c b/xorg-server/hw/xfree86/common/xf86AutoConfig.c index 7e5fab412..a9a1fd207 100644 --- a/xorg-server/hw/xfree86/common/xf86AutoConfig.c +++ b/xorg-server/hw/xfree86/common/xf86AutoConfig.c @@ -39,8 +39,16 @@ #include "xf86Config.h" #include "xf86Priv.h" #include "xf86_OSlib.h" +#ifdef __sparc__ +# include "xf86sbusBus.h" +#endif #include "dirent.h" +#ifdef sun +# include +# include +#endif + /* Sections for the default built-in configuration. */ #define BUILTIN_DEVICE_NAME \ @@ -79,11 +87,8 @@ static const char **builtinConfig = NULL; static int builtinLines = 0; -static const char *deviceList[] = { - "fbdev", - "vesa", - NULL -}; + +static void listPossibleVideoDrivers(char *matches[], int nmatches); /* * A built-in config file is stored as an array of strings, with each string @@ -135,87 +140,97 @@ AppendToConfig(const char *s) AppendToList(s, &builtinConfig, &builtinLines); } -static const char * -videoPtrToDriverName(struct pci_device *dev) +static int +videoPtrToDriverList(struct pci_device *dev, + char *returnList[], int returnListMax) { /* * things not handled yet: * cyrix/nsc. should be merged into geode anyway. * xgi. */ + int i; + /* Add more entries here if we ever return more than 4 drivers for + any device */ + char *driverList[5] = { NULL, NULL, NULL, NULL, NULL }; switch (dev->vendor_id) { case 0x1022: - if (dev->device_id == 0x2081) - return "geode"; - else - return NULL; - case 0x1142: return "apm"; - case 0xedd8: return "ark"; - case 0x1a03: return "ast"; - case 0x1002: return "ati"; - case 0x102c: return "chips"; - case 0x1013: return "cirrus"; + if (dev->device_id == 0x2081) { + driverList[0] = "geode"; + driverList[1] = "amd"; + } + break; + case 0x1142: driverList[0] = "apm"; break; + case 0xedd8: driverList[0] = "ark"; break; + case 0x1a03: driverList[0] = "ast"; break; + case 0x1002: driverList[0] = "ati"; break; + case 0x102c: driverList[0] = "chips"; break; + case 0x1013: driverList[0] = "cirrus"; break; case 0x8086: - if ((dev->device_id == 0x00d1) || (dev->device_id == 0x7800)) - return "i740"; - else return "intel"; - case 0x102b: return "mga"; - case 0x10c8: return "neomagic"; - case 0x105d: return "i128"; - case 0x10de: case 0x12d2: return "nv"; - case 0x1163: return "rendition"; + if ((dev->device_id == 0x00d1) || (dev->device_id == 0x7800)) { + driverList[0] = "i740"; + } else { + driverList[0] = "intel"; + driverList[1] = "i810"; + } + break; + case 0x102b: driverList[0] = "mga"; break; + case 0x10c8: driverList[0] = "neomagic"; break; + case 0x105d: driverList[0] = "i128"; break; + case 0x10de: case 0x12d2: driverList[0] = "nv"; break; + case 0x1163: driverList[0] = "rendition"; break; case 0x5333: switch (dev->device_id) { case 0x88d0: case 0x88d1: case 0x88f0: case 0x8811: case 0x8812: case 0x8814: case 0x8901: - return "s3"; + driverList[0] = "s3"; break; case 0x5631: case 0x883d: case 0x8a01: case 0x8a10: case 0x8c01: case 0x8c03: case 0x8904: case 0x8a13: - return "s3virge"; + driverList[0] = "s3virge"; break; default: - return "savage"; + driverList[0] = "savage"; break; } - case 0x1039: return "sis"; - case 0x126f: return "siliconmotion"; + break; + case 0x1039: driverList[0] = "sis"; break; + case 0x126f: driverList[0] = "siliconmotion"; break; case 0x121a: if (dev->device_id < 0x0003) - return "voodoo"; + driverList[0] = "voodoo"; + else + driverList[0] = "tdfx"; + break; + case 0x3d3d: driverList[0] = "glint"; break; + case 0x1023: driverList[0] = "trident"; break; + case 0x100c: driverList[0] = "tseng"; break; + case 0x1106: driverList[0] = "openchrome"; break; + case 0x15ad: driverList[0] = "vmware"; break; + case 0x18ca: + if (dev->device_id == 0x47) + driverList[0] = "xgixp"; else - return "tdfx"; - case 0x3d3d: return "glint"; - case 0x1023: return "trident"; - case 0x100c: return "tseng"; - case 0x1106: return "openchrome"; - case 0x15ad: return "vmware"; + driverList[0] = "xgi"; + break; default: break; } - return NULL; + for (i = 0; (i < returnListMax) && (driverList[i] != NULL); i++) { + returnList[i] = xnfstrdup(driverList[i]); + } + return i; /* Number of entries added */ } Bool xf86AutoConfig(void) { - const char **p; + char *deviceList[20]; + char **p; + const char **cp; char buf[1024]; - const char *driver = NULL; ConfigStatus ret; - driver = chooseVideoDriver(); - - if (driver) { - snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION_PRE, - driver, 0, driver); - AppendToConfig(buf); - ErrorF("New driver is \"%s\"\n", driver); - buf[0] = '\t'; - AppendToConfig(BUILTIN_DEVICE_SECTION_POST); - snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION, - driver, 0, driver, 0); - AppendToConfig(buf); - } + listPossibleVideoDrivers(deviceList, 20); for (p = deviceList; *p; p++) { snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION, *p, 0, *p); @@ -225,23 +240,23 @@ xf86AutoConfig(void) } AppendToConfig(BUILTIN_LAYOUT_SECTION_PRE); - if (driver) { - snprintf(buf, sizeof(buf), BUILTIN_LAYOUT_SCREEN_LINE, driver, 0); - AppendToConfig(buf); - } for (p = deviceList; *p; p++) { snprintf(buf, sizeof(buf), BUILTIN_LAYOUT_SCREEN_LINE, *p, 0); AppendToConfig(buf); } AppendToConfig(BUILTIN_LAYOUT_SECTION_POST); + for (p = deviceList; *p; p++) { + xfree(*p); + } + xf86MsgVerb(X_DEFAULT, 0, "Using default built-in configuration (%d lines)\n", builtinLines); xf86MsgVerb(X_DEFAULT, 3, "--- Start of built-in configuration ---\n"); - for (p = builtinConfig; *p; p++) - xf86ErrorFVerb(3, "\t%s", *p); + for (cp = builtinConfig; *cp; cp++) + xf86ErrorFVerb(3, "\t%s", *cp); xf86MsgVerb(X_DEFAULT, 3, "--- End of built-in configuration ---\n"); xf86setBuiltinConfig(builtinConfig); @@ -283,11 +298,10 @@ autoConfigDevice(GDevPtr preconf_device) if (preconf_device) { ptr = preconf_device; } else { - ptr = (GDevPtr)xalloc(sizeof(GDevRec)); + ptr = xcalloc(1, sizeof(GDevRec)); if (!ptr) { return NULL; } - memset((GDevPtr)ptr, 0, sizeof(GDevRec)); ptr->chipID = -1; ptr->chipRev = -1; ptr->irq = -1; @@ -416,17 +430,58 @@ matchDriverFromFiles (char** matches, uint16_t match_vendor, uint16_t match_chip } #endif /* __linux__ */ -char* -chooseVideoDriver(void) +static void +listPossibleVideoDrivers(char *matches[], int nmatches) { struct pci_device * info = NULL; struct pci_device_iterator *iter; - char *chosen_driver = NULL; int i; - char *matches[20]; /* If we have more than 20 drivers we're in trouble */ - for (i=0 ; i<20 ; i++) + for (i = 0 ; i < nmatches ; i++) { matches[i] = NULL; + } + i = 0; + +#ifdef sun + /* Check for driver type based on /dev/fb type and if valid, use + it instead of PCI bus probe results */ + if (xf86Info.consoleFd >= 0) { + struct vis_identifier visid; + const char *cp; + + if (ioctl(xf86Info.consoleFd, VIS_GETIDENTIFIER, &visid) >= 0) { + xf86Msg(X_PROBED, "console driver: %s\n", visid.name); + + /* Special case from before the general case was set */ + if (strcmp(visid.name, "NVDAnvda") == 0) { + matches[i++] = xnfstrdup("nvidia"); + } + + /* General case - split into vendor name (initial all-caps + prefix) & driver name (rest of the string). */ + if (strcmp(visid.name, "SUNWtext") != 0) { + for (cp = visid.name; (*cp != '\0') && isupper(*cp); cp++) { + /* find end of all uppercase vendor section */ + } + if ((cp != visid.name) && (*cp != '\0')) { + char *driverName = xnfstrdup(cp); + char *vendorName = xnfstrdup(visid.name); + vendorName[cp - visid.name] = '\0'; + + matches[i++] = vendorName; + matches[i++] = driverName; + } + } + } + } +#endif +#ifdef __sparc__ + { + char *sbusDriver = sparcDriverName(); + if (sbusDriver) + matches[i++] = xnfstrdup(sbusDriver); + } +#endif /* Find the primary device, and get some information about it. */ iter = pci_slot_match_iterator_create(NULL); @@ -447,31 +502,52 @@ chooseVideoDriver(void) } #endif /* __linux__ */ - /* TODO Handle multiple drivers claiming to support the same PCI ID */ - if (matches[0]) { - chosen_driver = matches[0]; - } else { - if (info != NULL) - chosen_driver = videoPtrToDriverName(info); - if (chosen_driver == NULL) { -#if defined __i386__ || defined __amd64__ || defined __x86_64__ || defined __hurd__ - chosen_driver = "vesa"; -#elif defined __sparc__ - chosen_driver = "sunffb"; + for (i = 0; (i < nmatches) && (matches[i]); i++) { + /* find end of matches list */ + } + + if ((info != NULL) && (i < nmatches)) { + i += videoPtrToDriverList(info, &(matches[i]), nmatches - i); + } + + /* Fallback to platform default hardware */ + if (i < (nmatches - 1)) { +#if defined(__i386__) || defined(__amd64__) || defined(__hurd__) + matches[i++] = xnfstrdup("vesa"); +#elif defined(__sparc__) && !defined(sun) + matches[i++] = xnfstrdup("sunffb"); +#endif + } + + /* Fallback to platform default frame buffer driver */ + if (i < (nmatches - 1)) { +#if !defined(__linux__) && defined(__sparc__) + matches[i++] = xnfstrdup("wsfb"); #else - chosen_driver = "fbdev"; + matches[i++] = xnfstrdup("fbdev"); #endif - } } +} + +char* +chooseVideoDriver(void) +{ + char *chosen_driver = NULL; + int i; + char *matches[20]; /* If we have more than 20 drivers we're in trouble */ - xf86Msg(X_DEFAULT, "Matched %s for the autoconfigured driver\n", chosen_driver); + listPossibleVideoDrivers(matches, 20); - i = 0; - while (matches[i]) { + /* TODO Handle multiple drivers claiming to support the same PCI ID */ + chosen_driver = matches[0]; + + xf86Msg(X_DEFAULT, "Matched %s for the autoconfigured driver\n", + chosen_driver); + + for (i = 0; matches[i] ; i++) { if (matches[i] != chosen_driver) { xfree(matches[i]); } - i++; } return chosen_driver; diff --git a/xorg-server/hw/xfree86/common/xf86Build.h b/xorg-server/hw/xfree86/common/xf86Build.h deleted file mode 100644 index e261f1b5c..000000000 --- a/xorg-server/hw/xfree86/common/xf86Build.h +++ /dev/null @@ -1,2 +0,0 @@ -#define BUILD_DATE 20081105 -#define BUILD_TIME 1144728 diff --git a/xorg-server/hw/xfree86/common/xf86Bus.c b/xorg-server/hw/xfree86/common/xf86Bus.c index f7ffac85e..b94d500f0 100644 --- a/xorg-server/hw/xfree86/common/xf86Bus.c +++ b/xorg-server/hw/xfree86/common/xf86Bus.c @@ -25,7 +25,6 @@ * authorization from the copyright holder(s) and author(s). */ -#define REDUCER /* * This file contains the interfaces to the bus-specific code */ @@ -60,7 +59,10 @@ int xf86NumEntities = 0; static int xf86EntityPrivateCount = 0; BusAccPtr xf86BusAccInfo = NULL; -xf86AccessRec AccessNULL = {NULL,NULL,NULL}; +static void +noopEnableDisable(void *arg) { } + +xf86AccessRec AccessNULL = { noopEnableDisable, noopEnableDisable, NULL }; xf86CurrentAccessRec xf86CurrentAccess = {NULL,NULL}; @@ -68,10 +70,6 @@ BusRec primaryBus = { BUS_NONE, {{0}}}; static Bool xf86ResAccessEnter = FALSE; -#ifdef REDUCER -/* Resources that temporarily conflict with estimated resources */ -static resPtr AccReducers = NULL; -#endif /* resource lists */ resPtr Acc = NULL; @@ -96,10 +94,6 @@ static Bool doFramebufferMode = FALSE; static StateChangeNotificationPtr StateChangeNotificationList; static void notifyStateChange(xf86NotifyState state); -#undef MIN -#define MIN(x,y) ((xaccess->busAcc)->set_f (xf86Entities[i]->access->busAcc); pacc = xf86Entities[i]->access->fallback; - if (pacc->AccessEnable) - pacc->AccessEnable(pacc->arg); + pacc->AccessEnable(pacc->arg); xf86Entities[i]->entityInit(i,xf86Entities[i]->private); - if (pacc->AccessDisable) - pacc->AccessDisable(pacc->arg); - /* remove init resources after init is processed */ - pprev_next = &Acc; - res = Acc; - while (res) { - if (res->res_type & ResInit && (res->entityIndex == i)) { - (*pprev_next) = res->next; - xfree(res); - } else - pprev_next = &(res->next); - res = (*pprev_next); - } + pacc->AccessDisable(pacc->arg); } } @@ -213,11 +190,9 @@ EntityEnter(void) ((BusAccPtr)xf86Entities[i]->access->busAcc)->set_f (xf86Entities[i]->access->busAcc); pacc = xf86Entities[i]->access->fallback; - if (pacc->AccessEnable) - pacc->AccessEnable(pacc->arg); + pacc->AccessEnable(pacc->arg); xf86Entities[i]->entityEnter(i,xf86Entities[i]->private); - if (pacc->AccessDisable) - pacc->AccessDisable(pacc->arg); + pacc->AccessDisable(pacc->arg); } } @@ -233,11 +208,9 @@ EntityLeave(void) ((BusAccPtr)xf86Entities[i]->access->busAcc)->set_f (xf86Entities[i]->access->busAcc); pacc = xf86Entities[i]->access->fallback; - if (pacc->AccessEnable) - pacc->AccessEnable(pacc->arg); + pacc->AccessEnable(pacc->arg); xf86Entities[i]->entityLeave(i,xf86Entities[i]->private); - if (pacc->AccessDisable) - pacc->AccessDisable(pacc->arg); + pacc->AccessDisable(pacc->arg); } } @@ -251,8 +224,6 @@ xf86IsEntityPrimary(int entityIndex) switch (pEnt->busType) { case BUS_PCI: return (pEnt->bus.id.pci == primaryBus.id.pci); - case BUS_ISA: - return TRUE; case BUS_SBUS: return (pEnt->sbusBusId.fbNum == primaryBus.id.sbus.fbNum); default: @@ -260,7 +231,7 @@ xf86IsEntityPrimary(int entityIndex) } } -_X_EXPORT Bool +Bool xf86SetEntityFuncs(int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, pointer private) { @@ -358,10 +329,10 @@ xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex) peacc = xf86Entities[pScrn->entityList[i]]->access; (*ptr) = peacc->next; /* disable entity: call disable func */ - if (peacc->pAccess && peacc->pAccess->AccessDisable) + if (peacc->pAccess) peacc->pAccess->AccessDisable(peacc->pAccess->arg); /* also disable fallback - just in case */ - if (peacc->fallback && peacc->fallback->AccessDisable) + if (peacc->fallback) peacc->fallback->AccessDisable(peacc->fallback->arg); for (i++; i < pScrn->numEntities; i++) pScrn->entityList[i-1] = pScrn->entityList[i]; @@ -391,10 +362,10 @@ xf86ClearEntityListForScreen(int scrnIndex) xf86Entities[entityIndex]->inUse = FALSE; /* disable resource: call the disable function */ peacc = xf86Entities[entityIndex]->access; - if (peacc->pAccess && peacc->pAccess->AccessDisable) + if (peacc->pAccess) peacc->pAccess->AccessDisable(peacc->pAccess->arg); /* and the fallback function */ - if (peacc->fallback && peacc->fallback->AccessDisable) + if (peacc->fallback) peacc->fallback->AccessDisable(peacc->fallback->arg); /* shared resources are only needed when entity is active: remove */ xf86DeallocateResourcesForEntity(entityIndex, ResShared); @@ -409,7 +380,7 @@ xf86ClearEntityListForScreen(int scrnIndex) pScrn->entityInstanceList = NULL; } -_X_EXPORT void +void xf86DeallocateResourcesForEntity(int entityIndex, unsigned long type) { resPtr *pprev_next = &Acc; @@ -525,14 +496,14 @@ disableAccess(void) for (i = 0; i < xf86NumScreens; i++) { peacc = xf86Screens[i]->CurrentAccess->pIoAccess; while (peacc) { - if (peacc->pAccess && peacc->pAccess->AccessDisable) + if (peacc->pAccess) peacc->pAccess->AccessDisable(peacc->pAccess->arg); peacc = peacc->next; } xf86Screens[i]->CurrentAccess->pIoAccess = NULL; peacc = xf86Screens[i]->CurrentAccess->pMemAccess; while (peacc) { - if (peacc->pAccess && peacc->pAccess->AccessDisable) + if (peacc->pAccess) peacc->pAccess->AccessDisable(peacc->pAccess->arg); peacc = peacc->next; } @@ -541,8 +512,7 @@ disableAccess(void) /* then call the generic entity disable funcs */ for (i = 0; i < xf86NumEntities; i++) { pacc = xf86Entities[i]->access->fallback; - if (pacc->AccessDisable) - pacc->AccessDisable(pacc->arg); + pacc->AccessDisable(pacc->arg); } } @@ -692,16 +662,16 @@ xf86EnableAccess(ScrnInfoPtr pScrn) pScrn->CurrentAccess->pMemAccess = NULL; while (pceAcc) { pAcc = pceAcc->pAccess; - if ( pAcc && pAcc->AccessDisable) - (*pAcc->AccessDisable)(pAcc->arg); + if (pAcc) + pAcc->AccessDisable(pAcc->arg); pceAcc = pceAcc->next; } if (pScrn->busAccess) ((BusAccPtr)pScrn->busAccess)->set_f(pScrn->busAccess); while (peAcc) { pAcc = peAcc->pAccess; - if (pAcc && pAcc->AccessEnable) - (*pAcc->AccessEnable)(pAcc->arg); + if (pAcc) + pAcc->AccessEnable(pAcc->arg); peAcc = peAcc->next; } pScrn->CurrentAccess->pIoAccess = (EntityAccessPtr) pScrn->access; @@ -713,8 +683,8 @@ xf86EnableAccess(ScrnInfoPtr pScrn) tmp = pceAcc; while (pceAcc) { pAcc = pceAcc->pAccess; - if (pAcc && pAcc->AccessDisable) - (*pAcc->AccessDisable)(pAcc->arg); + if (pAcc) + pAcc->AccessDisable(pAcc->arg); pceAcc = pceAcc->next; } pceAcc = pScrn->CurrentAccess->pMemAccess; @@ -722,8 +692,8 @@ xf86EnableAccess(ScrnInfoPtr pScrn) && tmp !=pceAcc) { while (pceAcc) { pAcc = pceAcc->pAccess; - if (pAcc && pAcc->AccessDisable) - (*pAcc->AccessDisable)(pAcc->arg); + if (pAcc) + pAcc->AccessDisable(pAcc->arg); pceAcc = pceAcc->next; } } @@ -734,8 +704,8 @@ xf86EnableAccess(ScrnInfoPtr pScrn) } while (pceAcc) { /* current Mem != pAccess */ pAcc = pceAcc->pAccess; - if (pAcc && pAcc->AccessDisable) - (*pAcc->AccessDisable)(pAcc->arg); + if (pAcc) + pAcc->AccessDisable(pAcc->arg); pceAcc = pceAcc->next; } } @@ -743,8 +713,8 @@ xf86EnableAccess(ScrnInfoPtr pScrn) ((BusAccPtr)pScrn->busAccess)->set_f(pScrn->busAccess); while (peAcc) { pAcc = peAcc->pAccess; - if (pAcc && pAcc->AccessEnable) - (*pAcc->AccessEnable)(pAcc->arg); + if (pAcc) + pAcc->AccessEnable(pAcc->arg); peAcc = peAcc->next; } pScrn->CurrentAccess->pMemAccess = @@ -760,16 +730,16 @@ xf86EnableAccess(ScrnInfoPtr pScrn) pScrn->CurrentAccess->pIoAccess = NULL; while (pceAcc) { pAcc = pceAcc->pAccess; - if ( pAcc && pAcc->AccessDisable) - (*pAcc->AccessDisable)(pAcc->arg); + if (pAcc) + pAcc->AccessDisable(pAcc->arg); pceAcc = pceAcc->next; } if (pScrn->busAccess) ((BusAccPtr)pScrn->busAccess)->set_f(pScrn->busAccess); while (peAcc) { pAcc = peAcc->pAccess; - if (pAcc && pAcc->AccessEnable) - (*pAcc->AccessEnable)(pAcc->arg); + if (pAcc) + pAcc->AccessEnable(pAcc->arg); peAcc = peAcc->next; } pScrn->CurrentAccess->pMemAccess = (EntityAccessPtr) pScrn->access; @@ -808,13 +778,11 @@ xf86SetCurrentAccess(Bool Enable, ScrnInfoPtr pScrn) while (pceAcc) { pAcc = pceAcc->pAccess; - if ( pAcc) { - if (!Enable) { - if (pAcc->AccessDisable) - (*pAcc->AccessDisable)(pAcc->arg); + if (pAcc) { + if (Enable) { + pAcc->AccessEnable(pAcc->arg); } else { - if (pAcc->AccessEnable) - (*pAcc->AccessEnable)(pAcc->arg); + pAcc->AccessDisable(pAcc->arg); } } pceAcc = pceAcc->next; @@ -836,11 +804,6 @@ xf86SetAccessFuncs(EntityInfoPtr pEnt, xf86SetAccessFuncPtr funcs, rac = xf86Entities[pEnt->index]->rac; - if (funcs->mem == funcs->io_mem && funcs->mem && funcs->io) - xf86Entities[pEnt->index]->entityProp |= NO_SEPARATE_MEM_FROM_IO; - if (funcs->io == funcs->io_mem && funcs->mem && funcs->io) - xf86Entities[pEnt->index]->entityProp |= NO_SEPARATE_IO_FROM_MEM; - rac->mem_new = funcs->mem; rac->io_new = funcs->io; rac->io_mem_new = funcs->io_mem; @@ -1011,10 +974,6 @@ needCheck(resPtr pRes, unsigned long type, int entityIndex, xf86State state) BusType loc = BUS_NONE; BusType r_loc = BUS_NONE; - /* Ignore overlapped ranges that have been nullified */ - if ((pRes->res_type & ResOverlap) && (pRes->block_begin > pRes->block_end)) - return FALSE; - if ((pRes->res_type & ResTypeMask) != (type & ResTypeMask)) return FALSE; @@ -1025,10 +984,6 @@ needCheck(resPtr pRes, unsigned long type, int entityIndex, xf86State state) if (pRes->res_type & type & ResBios) return FALSE; - /*If requested, skip over estimated resources */ - if (pRes->res_type & type & ResEstimated) - return FALSE; - if (type & pRes->res_type & ResUnused) return FALSE; @@ -1050,33 +1005,10 @@ needCheck(resPtr pRes, unsigned long type, int entityIndex, xf86State state) if (pRes->entityIndex > -1) r_loc = xf86Entities[pRes->entityIndex]->busType; - switch (type & ResAccMask) { - case ResExclusive: - switch (pRes->res_type & ResAccMask) { - case ResExclusive: - break; - case ResShared: - /* ISA buses are only locally exclusive on a PCI system */ - if (loc == BUS_ISA && r_loc == BUS_PCI) - return FALSE; - break; - } - break; - case ResShared: - switch (pRes->res_type & ResAccMask) { - case ResExclusive: - /* ISA buses are only locally exclusive on a PCI system */ - if (loc == BUS_PCI && r_loc == BUS_ISA) - return FALSE; - break; - case ResShared: - return FALSE; - } - break; - case ResAny: - break; - } - + if ((type & ResAccMask) == ResShared && + (pRes->res_type & ResAccMask) == ResShared) + return FALSE; + if (pRes->entityIndex == entityIndex) return FALSE; if (pRes->entityIndex > -1 && @@ -1106,7 +1038,7 @@ checkConflict(resRange *rgp, resPtr pRes, int entityIndex, case ResBlock: if (rgp->rEnd < rgp->rBegin) { xf86Msg(X_ERROR,"end of block range 0x%lx < begin 0x%lx\n", - rgp->rEnd,rgp->rBegin); + (long)rgp->rEnd, (long)rgp->rBegin); return 0; } if ((ret = checkConflictBlock(rgp, pRes))) { @@ -1119,7 +1051,7 @@ checkConflict(resRange *rgp, resPtr pRes, int entityIndex, if ((rgp->rBase & rgp->rMask) != rgp->rBase) { xf86Msg(X_ERROR,"sparse io range (base: 0x%lx mask: 0x%lx)" "doesn't satisfy (base & mask = mask)\n", - rgp->rBase, rgp->rMask); + (long)rgp->rBase, (long)rgp->rMask); return 0; } if ((ret = checkConflictSparse(rgp, pRes))) { @@ -1134,31 +1066,22 @@ checkConflict(resRange *rgp, resPtr pRes, int entityIndex, return 0; } -/* - * ChkConflict() -- used within xxxBus ; find conflict with any location. - */ -memType -ChkConflict(resRange *rgp, resPtr res, xf86State state) -{ - return checkConflict(rgp, res, -2, state,FALSE); -} - /* * xf86ChkConflict() - This function is the low level interface to * the resource broker that gets exported. Tests all resources ie. * performs test with SETUP flag. */ -_X_EXPORT memType +static memType xf86ChkConflict(resRange *rgp, int entityIndex) { - return checkConflict(rgp, Acc, entityIndex, SETUP,FALSE); + return checkConflict(rgp, Acc, entityIndex, SETUP, FALSE); } /* * Resources List handling */ -_X_EXPORT resPtr +static resPtr xf86JoinResLists(resPtr rlist1, resPtr rlist2) { resPtr pRes; @@ -1175,7 +1098,7 @@ xf86JoinResLists(resPtr rlist1, resPtr rlist2) return rlist1; } -_X_EXPORT resPtr +resPtr xf86AddResToList(resPtr rlist, resRange *range, int entityIndex) { resPtr new; @@ -1184,7 +1107,7 @@ xf86AddResToList(resPtr rlist, resRange *range, int entityIndex) case ResBlock: if (range->rEnd < range->rBegin) { xf86Msg(X_ERROR,"end of block range 0x%lx < begin 0x%lx\n", - range->rEnd,range->rBegin); + (long)range->rEnd, (long)range->rBegin); return rlist; } break; @@ -1192,7 +1115,7 @@ xf86AddResToList(resPtr rlist, resRange *range, int entityIndex) if ((range->rBase & range->rMask) != range->rBase) { xf86Msg(X_ERROR,"sparse io range (base: 0x%lx mask: 0x%lx)" "doesn't satisfy (base & mask = mask)\n", - range->rBase, range->rMask); + (long)range->rBase, (long)range->rMask); return rlist; } break; @@ -1225,7 +1148,7 @@ xf86FreeResList(resPtr rlist) xfree(rlist); } -_X_EXPORT resPtr +static resPtr xf86DupResList(const resPtr rlist) { resPtr pRes, ret, prev, new; @@ -1245,7 +1168,7 @@ xf86DupResList(const resPtr rlist) return ret; } -_X_EXPORT void +static void xf86PrintResList(int verb, resPtr list) { int i = 0; @@ -1267,14 +1190,17 @@ xf86PrintResList(int verb, resPtr list) "\t[%d] %d\t%ld\t0x%08lx - 0x%08lx (0x%lx)", i, list->entityIndex, (list->res_type & ResDomain) >> 24, - list->block_begin, list->block_end, - list->block_end - list->block_begin + 1); + (long)list->block_begin, + (long)list->block_end, + (long)(list->block_end - + list->block_begin + 1)); break; case ResSparse: xf86ErrorFVerb(verb, "\t[%d] %d\t%ld\t0x%08lx - 0x%08lx ", i, list->entityIndex, (list->res_type & ResDomain) >> 24, - list->sparse_base,list->sparse_mask); + (long)list->sparse_base, + (long)list->sparse_mask); break; default: list = list->next; @@ -1309,10 +1235,6 @@ xf86PrintResList(int verb, resPtr list) s = "[?]"; } xf86ErrorFVerb(verb, "%s", s); - if (list->res_type & ResEstimated) - xf86ErrorFVerb(verb, "E"); - if (list->res_type & ResOverlap) - xf86ErrorFVerb(verb, "O"); if (list->res_type & ResInit) xf86ErrorFVerb(verb, "t"); if (list->res_type & ResBios) @@ -1366,187 +1288,10 @@ xf86ResourceBrokerInit(void) xf86PrintResList(3, Acc); } -#define MEM_ALIGN (1024 * 1024) - -/* - * RemoveOverlaps() -- remove overlaps between resources of the - * same kind. - * Beware: This function doesn't check for access attributes. - * At resource broker initialization this is no problem as this - * only deals with exclusive resources. - */ -#if 0 -void -RemoveOverlaps(resPtr target, resPtr list, Bool pow2Alignment, Bool useEstimated) -{ - resPtr pRes; - memType size, newsize, adjust; - - if (!target) - return; - - for (pRes = list; pRes; pRes = pRes->next) { - if (pRes != target - && ((pRes->res_type & ResTypeMask) == - (target->res_type & ResTypeMask)) - && pRes->block_begin <= target->block_end - && pRes->block_end >= target->block_begin) { - /* Possibly ignore estimated resources */ - if (!useEstimated && (pRes->res_type & ResEstimated)) continue; - /* - * Target should be a larger region than pRes. If pRes fully - * contains target, don't do anything unless target can overlap. - */ - if (pRes->block_begin <= target->block_begin && - pRes->block_end >= target->block_end) { - if (target->res_type & ResOverlap) { - /* Nullify range but keep its ResOverlap bit on */ - target->block_end = target->block_begin - 1; - return; - } - continue; - } - /* - * In cases where the target and pRes have the same starting - * address, reduce the size of the target (given it's an estimate). - */ - if (pRes->block_begin == target->block_begin) { - if (target->res_type & ResOverlap) - target->block_end = target->block_begin - 1; - else - target->block_end = pRes->block_end; - } - /* Otherwise, trim target to remove the overlap */ - else if (pRes->block_begin <= target->block_end) { - target->block_end = pRes->block_begin - 1; - } else if (!pow2Alignment && - pRes->block_end >= target->block_begin) { - target->block_begin = pRes->block_end + 1; - } - if (pow2Alignment) { - /* - * Align to a power of two. This requires finding the - * largest power of two that is smaller than the adjusted - * size. - */ - size = target->block_end - target->block_begin + 1; - newsize = 1UL << (sizeof(memType) * 8 - 1); - while (!(newsize & size)) - newsize >>= 1; - target->block_end = target->block_begin + newsize - 1; - } else if (target->block_end > MEM_ALIGN) { - /* Align the end to MEM_ALIGN */ - if ((adjust = (target->block_end + 1) % MEM_ALIGN)) - target->block_end -= adjust; - } - } - } -} -#else - -void -RemoveOverlaps(resPtr target, resPtr list, Bool pow2Alignment, Bool useEstimated) -{ - resPtr pRes; - memType size, newsize, adjust; - - if (!target) - return; - - if (!(target->res_type & ResEstimated) /* Don't touch sure resources */ - && !(target->res_type & ResOverlap)) /* Unless they may overlap */ - return; - - for (pRes = list; pRes; pRes = pRes->next) { - if (pRes == target - || ((pRes->res_type & ResTypeMask) != - (target->res_type & ResTypeMask)) - || pRes->block_begin > target->block_end - || pRes->block_end < target->block_begin) - continue; - - if (pRes->block_begin <= target->block_begin) { - /* Possibly ignore estimated resources */ - if (!useEstimated && (pRes->res_type & ResEstimated)) - continue; - - /* Special cases */ - if (pRes->block_end >= target->block_end) { - /* - * If pRes fully contains target, don't do anything - * unless target can overlap. - */ - if (target->res_type & ResOverlap) { - /* Nullify range but keep its ResOverlap bit on */ - target->block_end = target->block_begin - 1; - return; - } else - continue; - } else { -#if 0 /* Don't trim start address - we trust what we got */ - /* - * If !pow2Alignment trim start address: !pow2Alingment - * is only set when estimated OS addresses are handled. - * In cases where the target and pRes have the same - * starting address, reduce the size of the target - * (given it's an estimate). - */ - if (!pow2Alignment) - target->block_begin = pRes->block_end + 1; - else -#endif - if (pRes->block_begin == target->block_begin) - target->block_end = pRes->block_end; - else - continue; - } - } else { - /* Trim target to remove the overlap */ - target->block_end = pRes->block_begin - 1; - } - if (pow2Alignment) { - /* - * Align to a power of two. This requires finding the - * largest power of two that is smaller than the adjusted - * size. - */ - size = target->block_end - target->block_begin + 1; - newsize = 1UL << (sizeof(memType) * 8 - 1); - while (!(newsize & size)) - newsize >>= 1; - target->block_end = target->block_begin + newsize - 1; - } else if (target->block_end > MEM_ALIGN) { - /* Align the end to MEM_ALIGN */ - if ((adjust = (target->block_end + 1) % MEM_ALIGN)) - target->block_end -= adjust; - } - } -} - -#endif - /* - * Resource registrarion + * Resource registration */ -static resList -xf86GetResourcesImplicitly(int entityIndex) -{ - if (entityIndex >= xf86NumEntities) return NULL; - - switch (xf86Entities[entityIndex]->bus.type) { - case BUS_ISA: - case BUS_NONE: - case BUS_SBUS: - return NULL; - case BUS_PCI: - return NULL; - case BUS_last: - return NULL; - } - return NULL; -} - static void convertRange2Host(int entityIndex, resRange *pRange) { @@ -1555,9 +1300,6 @@ convertRange2Host(int entityIndex, resRange *pRange) case BUS_PCI: pciConvertRange2Host(entityIndex,pRange); break; - case BUS_ISA: - isaConvertRange2Host(pRange); - break; default: break; } @@ -1577,24 +1319,19 @@ xf86ConvertListToHost(int entityIndex, resPtr list) /* * xf86RegisterResources() -- attempts to register listed resources. - * If list is NULL it tries to obtain resources implicitly. Function - * returns a resPtr listing all resources not successfully registered. + * Returns a resPtr listing all resources not successfully registered, by + * which we mean, NULL. */ _X_EXPORT resPtr xf86RegisterResources(int entityIndex, resList list, unsigned long access) { - resPtr res = NULL; resRange range; resList list_f = NULL; - if (!list) { - list = xf86GetResourcesImplicitly(entityIndex); - /* these resources have to be in host address space already */ - if (!list) return NULL; - list_f = list; - } - + if (!list) + return NULL; + while(list->type != ResEnd) { range = *list; @@ -1604,15 +1341,7 @@ xf86RegisterResources(int entityIndex, resList list, unsigned long access) range.type = (range.type & ~ResAccMask) | (access & ResAccMask); } range.type &= ~ResEstimated; /* Not allowed for drivers */ -#if !((defined(__alpha__) || (defined(__ia64__))) && defined(linux)) - /* On Alpha Linux, do not check for conflicts, trust the kernel. */ - if (checkConflict(&range, Acc, entityIndex, SETUP,TRUE)) - res = xf86AddResToList(res,&range,entityIndex); - else -#endif - { - Acc = xf86AddResToList(Acc,&range,entityIndex); - } + Acc = xf86AddResToList(Acc,&range,entityIndex); list++; } if (list_f) @@ -1621,12 +1350,8 @@ xf86RegisterResources(int entityIndex, resList list, unsigned long access) #ifdef DEBUG xf86MsgVerb(X_INFO, 3,"Resources after driver initialization\n"); xf86PrintResList(3, Acc); - if (res) xf86MsgVerb(X_INFO, 3, - "Failed Resources after driver initialization " - "for Entity: %i\n",entityIndex); - xf86PrintResList(3, res); #endif - return res; + return NULL; } @@ -1635,7 +1360,6 @@ busTypeSpecific(EntityPtr pEnt, xf86AccessPtr *acc_mem, xf86AccessPtr *acc_io, xf86AccessPtr *acc_mem_io) { switch (pEnt->bus.type) { - case BUS_ISA: case BUS_SBUS: *acc_mem = *acc_io = *acc_mem_io = &AccessNULL; break; @@ -1733,7 +1457,7 @@ setAccess(EntityPtr pEnt, xf86State state) if (pEnt->rac->old) { /* give it to the driver, leave state disabled */ pEnt->rac->old->io = org_io; - } else if (org_io->AccessEnable) { + } else { /* driver doesn't want it - enable generic access */ org_io->AccessEnable(org_io->arg); } @@ -1744,7 +1468,7 @@ setAccess(EntityPtr pEnt, xf86State state) if (pEnt->rac->old) { /* give it to the driver, leave state disabled */ pEnt->rac->old->io_mem = org_mem_io; - } else if (org_mem_io->AccessEnable) { + } else { /* driver doesn't want it - enable generic access */ org_mem_io->AccessEnable(org_mem_io->arg); } @@ -1755,7 +1479,7 @@ setAccess(EntityPtr pEnt, xf86State state) if (pEnt->rac->old) { /* give it to the driver, leave state disabled */ pEnt->rac->old->mem = org_mem; - } else if (org_mem->AccessEnable) { + } else { /* driver doesn't want it - enable generic access */ org_mem->AccessEnable(org_mem->arg); } @@ -1763,27 +1487,26 @@ setAccess(EntityPtr pEnt, xf86State state) if (!(prop & NEED_MEM_SHARED)){ if (prop & NEED_MEM) { - if (acc_mem && acc_mem->AccessEnable) + if (acc_mem) acc_mem->AccessEnable(acc_mem->arg); } else { - if (acc_mem && acc_mem->AccessDisable) + if (acc_mem) acc_mem->AccessDisable(acc_mem->arg); } } if (!(prop & NEED_IO_SHARED)) { if (prop & NEED_IO) { - if (acc_io && acc_io->AccessEnable) - acc_io->AccessEnable(acc_io->arg); + if (acc_io) + acc_io->AccessEnable(acc_io->arg); } else { - if (acc_io && acc_io->AccessDisable) + if (acc_io) acc_io->AccessDisable(acc_io->arg); } } /* disable shared resources */ - if (pEnt->access->pAccess - && pEnt->access->pAccess->AccessDisable) + if (pEnt->access->pAccess) pEnt->access->pAccess->AccessDisable(pEnt->access->pAccess->arg); /* @@ -1820,7 +1543,7 @@ SetSIGIOForState(xf86State state) } } -_X_EXPORT void +void xf86EnterServerState(xf86State state) { EntityPtr pEnt; @@ -1962,44 +1685,6 @@ xf86SetOperatingState(resList list, int entityIndex, int mask) /* * Stage specific code */ - /* - * ProcessEstimatedConflicts() -- Do something about driver-registered - * resources that conflict with estimated resources. For now, just register - * them with a logged warning. - */ -#ifdef REDUCER -static void -ProcessEstimatedConflicts(void) -{ - if (!AccReducers) - return; - - /* Temporary */ - xf86MsgVerb(X_WARNING, 3, - "Registering the following despite conflicts with estimated" - " resources:\n"); - xf86PrintResList(3, AccReducers); - Acc = xf86JoinResLists(Acc, AccReducers); - AccReducers = NULL; -} -#endif - -/* - * xf86ClaimFixedResources() -- This function gets called from the - * driver Probe() function to claim fixed resources. - */ -static void -resError(resList list) -{ - FatalError("A driver tried to allocate the %s %sresource at \n" - "0x%lx:0x%lx which conflicted with another resource. Send the\n" - "output of the server to %s. Please \n" - "specify your computer hardware as closely as possible.\n", - ResIsBlock(list)?"Block":"Sparse", - ResIsMem(list)?"Mem":"Io", - ResIsBlock(list)?list->rBegin:list->rBase, - ResIsBlock(list)?list->rEnd:list->rMask,BUILDERADDR); -} /* * xf86ClaimFixedResources() is used to allocate non-relocatable resources. @@ -2023,20 +1708,7 @@ xf86ClaimFixedResources(resList list, int entityIndex) case ResExclusive: if (!xf86ChkConflict(&range, entityIndex)) { Acc = xf86AddResToList(Acc, &range, entityIndex); -#ifdef REDUCER - } else { - range.type |= ResEstimated; - if (!xf86ChkConflict(&range, entityIndex) && - !checkConflict(&range, AccReducers, entityIndex, - SETUP, FALSE)) { - range.type &= ~(ResEstimated | ResBios); - AccReducers = - xf86AddResToList(AccReducers, &range, entityIndex); -#endif - } else resError(&range); /* no return */ -#ifdef REDUCER - } -#endif + } else FatalError("xf86ClaimFixedResources conflict\n"); break; case ResShared: /* at this stage the resources are just added to the @@ -2058,9 +1730,6 @@ xf86ClaimFixedResources(resList list, int entityIndex) xf86MsgVerb(X_INFO, 3, "resource ranges after xf86ClaimFixedResources() call:\n"); xf86PrintResList(3,Acc); -#ifdef REDUCER - ProcessEstimatedConflicts(); -#endif #ifdef DEBUG if (ptr) { xf86MsgVerb(X_INFO, 3, "to be registered later:\n"); @@ -2156,10 +1825,10 @@ xf86PostProbe(void) { memType val; int i,j; - resPtr resp, acc, tmp, resp_x, *pprev_next; + resPtr resp, acc, tmp, resp_x; if (fbSlotClaimed) { - if (pciSlotClaimed || isaSlotClaimed + if (pciSlotClaimed #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) || sbusSlotClaimed #endif @@ -2176,17 +1845,7 @@ xf86PostProbe(void) return; } } - /* don't compare against ResInit - remove it from clone.*/ acc = tmp = xf86DupResList(Acc); - pprev_next = &acc; - while (tmp) { - if (tmp->res_type & ResInit) { - (*pprev_next) = tmp->next; - xfree(tmp); - } else - pprev_next = &(tmp->next); - tmp = (*pprev_next); - } for (i=0; iresources; @@ -2199,32 +1858,17 @@ xf86PostProbe(void) resp_x = resp; resp = resp->next; resp_x->next = tmp; -#ifdef REDUCER - } else { - resp->res_type |= ResEstimated; - if (!checkConflict(&resp->val, acc, i, SETUP, FALSE)) { - resp->res_type &= ~(ResEstimated | ResBios); - tmp = AccReducers; - AccReducers = resp; - resp = resp->next; - AccReducers->next = tmp; -#endif } else { - xf86MsgVerb(X_INFO, 3, "Found conflict at: 0x%lx\n",val); + xf86MsgVerb(X_INFO, 3, "Found conflict at: 0x%lx\n", + (long)val); resp->res_type &= ~ResEstimated; tmp = xf86Entities[i]->resources; xf86Entities[i]->resources = resp; resp = resp->next; xf86Entities[i]->resources->next = tmp; } -#ifdef REDUCER - } -#endif } xf86JoinResLists(Acc,resp_x); -#ifdef REDUCER - ProcessEstimatedConflicts(); -#endif } xf86FreeResList(acc); @@ -2276,13 +1920,6 @@ checkRequiredResources(int entityIndex) pAcc = pAcc->next; } - /* check if we can separately enable mem/io resources */ - /* XXX we still need to find out how to set this yet */ - if ( ((pEnt->entityProp & NO_SEPARATE_MEM_FROM_IO) - && (pEnt->entityProp & NEED_MEM_SHARED)) - || ((pEnt->entityProp & NO_SEPARATE_IO_FROM_MEM) - && (pEnt->entityProp & NEED_IO_SHARED)) ) - pEnt->entityProp |= NEED_SHARED; /* * After we have checked all resources of an entity agains any * other resource we know if the entity need this resource type @@ -2290,13 +1927,11 @@ checkRequiredResources(int entityIndex) * so no need to share it either. */ if ((pEnt->entityProp & NEED_MEM_SHARED) - && (!(pEnt->entityProp & NEED_MEM)) - && (!(pEnt->entityProp & NO_SEPARATE_MEM_FROM_IO))) + && (!(pEnt->entityProp & NEED_MEM))) pEnt->entityProp &= ~(unsigned long)NEED_MEM_SHARED; if ((pEnt->entityProp & NEED_IO_SHARED) - && (!(pEnt->entityProp & NEED_IO)) - && (!(pEnt->entityProp & NO_SEPARATE_IO_FROM_MEM))) + && (!(pEnt->entityProp & NEED_IO))) pEnt->entityProp &= ~(unsigned long)NEED_IO_SHARED; } @@ -2730,9 +2365,6 @@ xf86ExtractTypeFromList(resPtr list, unsigned long type) return ret; } -/*------------------------------------------------------------*/ -static void CheckGenericGA(void); - /* * xf86FindPrimaryDevice() - Find the display device which * was active when the server was started. @@ -2740,9 +2372,6 @@ static void CheckGenericGA(void); void xf86FindPrimaryDevice() { - /* if no VGA device is found check for primary PCI device */ - if (primaryBus.type == BUS_NONE && xorgHWAccess) - CheckGenericGA(); if (primaryBus.type != BUS_NONE) { char *bus; char loc[16]; @@ -2756,10 +2385,6 @@ xf86FindPrimaryDevice() primaryBus.id.pci->dev, primaryBus.id.pci->func); break; - case BUS_ISA: - bus = "ISA"; - loc[0] = '\0'; - break; case BUS_SBUS: bus = "SBUS"; snprintf(loc, sizeof(loc), " %2.2x", primaryBus.id.sbus.fbNum); @@ -2773,40 +2398,7 @@ xf86FindPrimaryDevice() } } -#if !defined(__sparc) && !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__) && !defined(__arm__) -#include "vgaHW.h" -#include "compiler.h" -#endif - -/* - * CheckGenericGA() - Check for presence of a VGA device. - */ -static void -CheckGenericGA() -{ -/* This needs to be changed for multiple domains */ -#if !defined(__sparc__) && !defined(__sparc) && !defined(__powerpc__) && !defined(__mips__) && !defined(__ia64__) && !defined(__arm__) && !defined(__s390__) - IOADDRESS GenericIOBase = VGAHW_GET_IOBASE(); - CARD8 CurrentValue, TestValue; - - /* VGA CRTC registers are not used here, so don't bother unlocking them */ - - /* VGA has one more read/write attribute register than EGA */ - (void) inb(GenericIOBase + VGA_IN_STAT_1_OFFSET); /* Reset flip-flop */ - outb(VGA_ATTR_INDEX, 0x14 | 0x20); - CurrentValue = inb(VGA_ATTR_DATA_R); - outb(VGA_ATTR_DATA_W, CurrentValue ^ 0x0F); - outb(VGA_ATTR_INDEX, 0x14 | 0x20); - TestValue = inb(VGA_ATTR_DATA_R); - outb(VGA_ATTR_DATA_W, CurrentValue); - - if ((CurrentValue ^ 0x0F) == TestValue) { - primaryBus.type = BUS_ISA; - } -#endif -} - -_X_EXPORT Bool +Bool xf86NoSharedResources(int screenIndex,resType res) { int j; diff --git a/xorg-server/hw/xfree86/common/xf86Bus.h b/xorg-server/hw/xfree86/common/xf86Bus.h index 489ee3459..c2d5bb7d4 100644 --- a/xorg-server/hw/xfree86/common/xf86Bus.h +++ b/xorg-server/hw/xfree86/common/xf86Bus.h @@ -137,11 +137,8 @@ extern BusAccPtr xf86BusAccInfo; int xf86AllocateEntity(void); BusType StringToBusType(const char* busID, const char **retID); -memType ChkConflict(resRange *rgp, resPtr res, xf86State state); Bool xf86IsSubsetOf(resRange range, resPtr list); resPtr xf86ExtractTypeFromList(resPtr list, unsigned long type); resPtr xf86FindIntersect(resRange Range, resPtr list); -void RemoveOverlaps(resPtr target, resPtr list, Bool pow2Alignment, - Bool useEstimated); #endif /* _XF86_BUS_H */ diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c index e91eadd19..93761193e 100644 --- a/xorg-server/hw/xfree86/common/xf86Config.c +++ b/xorg-server/hw/xfree86/common/xf86Config.c @@ -62,10 +62,8 @@ #include "extension.h" #include "Pci.h" -#ifdef XINPUT #include "xf86Xinput.h" extern DeviceAssocRec mouse_assoc; -#endif #ifdef XKB #undef XKB_IN_SERVER @@ -112,13 +110,10 @@ extern DeviceAssocRec mouse_assoc; #define PROJECTROOT "/usr/X11R6" #endif -static char *fontPath = NULL; - static ModuleDefault ModuleDefaults[] = { {.name = "extmod", .toLoad = TRUE, .load_opt=NULL}, {.name = "dbe", .toLoad = TRUE, .load_opt=NULL}, {.name = "glx", .toLoad = TRUE, .load_opt=NULL}, - {.name = "freetype", .toLoad = TRUE, .load_opt=NULL}, #ifdef XRECORD {.name = "record", .toLoad = TRUE, .load_opt=NULL}, #endif @@ -309,7 +304,7 @@ xf86ModulelistFromConfig(pointer **optlist) } } if (found == FALSE) { - XF86ConfModulePtr ptr = xf86configptr->conf_modules; + XF86LoadPtr ptr = (XF86LoadPtr)xf86configptr->conf_modules; ptr = xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt); xf86Msg(X_INFO, "\"%s\" will be loaded by default.\n", ModuleDefaults[i].name); } @@ -318,7 +313,7 @@ xf86ModulelistFromConfig(pointer **optlist) xf86configptr->conf_modules = xnfcalloc(1, sizeof(XF86ConfModuleRec)); for (i=0 ; ModuleDefaults[i].name != NULL ; i++) { if (ModuleDefaults[i].toLoad == TRUE) { - XF86ConfModulePtr ptr = xf86configptr->conf_modules; + XF86LoadPtr ptr = (XF86LoadPtr)xf86configptr->conf_modules; ptr = xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt); } } @@ -589,89 +584,64 @@ xf86ConfigError(char *msg, ...) static void configFiles(XF86ConfFilesPtr fileconf) { - MessageType pathFrom = X_DEFAULT; - int countDirs; - char *temp_path; - char *log_buf; - - /* FontPath */ - /* Try XF86Config FontPath first */ - if (!xf86fpFlag) { - if (fileconf) { - if (fileconf->file_fontpath) { - char *f = xf86ValidateFontPath(fileconf->file_fontpath); - pathFrom = X_CONFIG; - if (*f) { - if (xf86Info.useDefaultFontPath) { - xf86Msg(X_DEFAULT, "Including the default font path %s.\n", defaultFontPath); - char *g = xnfalloc(strlen(defaultFontPath) + strlen(f) + 3); - strcpy(g, f); - strcat(g, ","); - defaultFontPath = strcat(g, defaultFontPath); - xfree(f); - } else { - defaultFontPath = f; - } - } else { - xf86Msg(X_WARNING, - "FontPath is completely invalid. Using compiled-in default.\n"); - fontPath = NULL; - pathFrom = X_DEFAULT; - } - } - } else { - xf86Msg(X_DEFAULT, - "No FontPath specified. Using compiled-in default.\n"); - pathFrom = X_DEFAULT; - } - } else { - /* Use fontpath specified with '-fp' */ - if (fontPath) - { - fontPath = NULL; + MessageType pathFrom; + Bool must_copy; + int size, countDirs; + char *temp_path, *log_buf, *start, *end; + + /* FontPath */ + must_copy = TRUE; + + temp_path = defaultFontPath ? defaultFontPath : ""; + if (xf86fpFlag) + pathFrom = X_CMDLINE; + else if (fileconf && fileconf->file_fontpath) { + pathFrom = X_CONFIG; + if (xf86Info.useDefaultFontPath) { + defaultFontPath = Xprintf("%s%s%s", + fileconf->file_fontpath, + *temp_path ? "," : "", temp_path); + if (defaultFontPath != NULL) { + must_copy = FALSE; + } + } + else + defaultFontPath = fileconf->file_fontpath; } - pathFrom = X_CMDLINE; - } - if (!fileconf) { - /* xf86ValidateFontPath will write into it's arg, but defaultFontPath - could be static, so we make a copy. */ - char *f = xnfalloc(strlen(defaultFontPath) + 1); - f[0] = '\0'; - strcpy (f, defaultFontPath); - defaultFontPath = xf86ValidateFontPath(f); - xfree(f); - } else { - if (fileconf) { - if (!fileconf->file_fontpath) { - /* xf86ValidateFontPath will write into it's arg, but defaultFontPath - could be static, so we make a copy. */ - char *f = xnfalloc(strlen(defaultFontPath) + 1); - f[0] = '\0'; - strcpy (f, defaultFontPath); - defaultFontPath = xf86ValidateFontPath(f); - xfree(f); - } - } - } - - /* If defaultFontPath is still empty, exit here */ + else + pathFrom = X_DEFAULT; + temp_path = defaultFontPath ? defaultFontPath : ""; + + /* ensure defaultFontPath contains "built-ins" */ + start = strstr(temp_path, "built-ins"); + end = start + strlen("built-ins"); + if (start == NULL || + !((start == temp_path || start[-1] == ',') && (!*end || *end == ','))) { + defaultFontPath = Xprintf("%s%sbuilt-ins", + temp_path, *temp_path ? "," : ""); + if (must_copy == TRUE) { + if (defaultFontPath != NULL) { + must_copy = FALSE; + } + } else { + /* already made a copy of the font path */ + xfree(temp_path); + } + } + /* xf86ValidateFontPath modifies its argument, but returns a copy of it. */ + temp_path = must_copy ? XNFstrdup(defaultFontPath) : defaultFontPath; + defaultFontPath = xf86ValidateFontPath(temp_path); + free(temp_path); - if (! *defaultFontPath) - FatalError("No valid FontPath could be found."); + /* make fontpath more readable in the logfiles */ + countDirs = 1; + temp_path = defaultFontPath; + while ((temp_path = index(temp_path, ',')) != NULL) { + countDirs++; + temp_path++; + } - /* make fontpath more readable in the logfiles */ - countDirs = 1; - temp_path = defaultFontPath; - while((temp_path = index(temp_path, ',')) != NULL) { - countDirs++; - temp_path++; - } - log_buf = xnfalloc(strlen(defaultFontPath) + (2 * countDirs) + 1); - if(!log_buf) /* fallback to old method */ - xf86Msg(pathFrom, "FontPath set to \"%s\"\n", defaultFontPath); - else { - char *start, *end; - int size; + log_buf = xnfalloc(strlen(defaultFontPath) + (2 * countDirs) + 1); temp_path = log_buf; start = defaultFontPath; while((end = index(start, ',')) != NULL) { @@ -687,7 +657,6 @@ configFiles(XF86ConfFilesPtr fileconf) strcpy(temp_path, start); xf86Msg(pathFrom, "FontPath set to:\n%s\n", log_buf); xfree(log_buf); - } if (fileconf && fileconf->file_inputdevs) { @@ -708,6 +677,11 @@ configFiles(XF86ConfFilesPtr fileconf) xf86Msg(xf86ModPathFrom, "ModulePath set to \"%s\"\n", xf86ModulePath); + if (!xf86xkbdirFlag && fileconf && fileconf->file_xkbdir) { + XkbBaseDirectory = fileconf->file_xkbdir; + xf86Msg(X_CONFIG, "XKB base directory set to \"%s\"\n", + XkbBaseDirectory); + } #if 0 /* LogFile */ /* @@ -740,23 +714,14 @@ typedef enum { FLAG_ALLOWMOUSEOPENFAIL, FLAG_VTSYSREQ, FLAG_XKBDISABLE, - FLAG_PCIPROBE1, - FLAG_PCIPROBE2, - FLAG_PCIFORCECONFIG1, - FLAG_PCIFORCECONFIG2, - FLAG_PCIFORCENONE, - FLAG_PCIOSCONFIG, FLAG_SAVER_BLANKTIME, FLAG_DPMS_STANDBYTIME, FLAG_DPMS_SUSPENDTIME, FLAG_DPMS_OFFTIME, FLAG_PIXMAP, FLAG_PC98, - FLAG_ESTIMATE_SIZES_AGGRESSIVELY, FLAG_NOPM, FLAG_XINERAMA, - FLAG_ALLOW_DEACTIVATE_GRABS, - FLAG_ALLOW_CLOSEDOWN_GRABS, FLAG_LOG, FLAG_RENDER_COLORMAP_MODE, FLAG_HANDLE_SPECIAL_KEYS, @@ -794,18 +759,6 @@ static OptionInfoRec FlagOptions[] = { {0}, FALSE }, { FLAG_XKBDISABLE, "XkbDisable", OPTV_BOOLEAN, {0}, FALSE }, - { FLAG_PCIPROBE1, "PciProbe1" , OPTV_BOOLEAN, - {0}, FALSE }, - { FLAG_PCIPROBE2, "PciProbe2", OPTV_BOOLEAN, - {0}, FALSE }, - { FLAG_PCIFORCECONFIG1, "PciForceConfig1", OPTV_BOOLEAN, - {0}, FALSE }, - { FLAG_PCIFORCECONFIG2, "PciForceConfig2", OPTV_BOOLEAN, - {0}, FALSE }, - { FLAG_PCIFORCENONE, "PciForceNone", OPTV_BOOLEAN, - {0}, FALSE }, - { FLAG_PCIOSCONFIG, "PciOsConfig", OPTV_BOOLEAN, - {0}, FALSE }, { FLAG_SAVER_BLANKTIME, "BlankTime" , OPTV_INTEGER, {0}, FALSE }, { FLAG_DPMS_STANDBYTIME, "StandbyTime", OPTV_INTEGER, @@ -818,16 +771,10 @@ static OptionInfoRec FlagOptions[] = { {0}, FALSE }, { FLAG_PC98, "PC98", OPTV_BOOLEAN, {0}, FALSE }, - { FLAG_ESTIMATE_SIZES_AGGRESSIVELY,"EstimateSizesAggressively",OPTV_INTEGER, - {0}, FALSE }, { FLAG_NOPM, "NoPM", OPTV_BOOLEAN, {0}, FALSE }, { FLAG_XINERAMA, "Xinerama", OPTV_BOOLEAN, {0}, FALSE }, - { FLAG_ALLOW_DEACTIVATE_GRABS,"AllowDeactivateGrabs", OPTV_BOOLEAN, - {0}, FALSE }, - { FLAG_ALLOW_CLOSEDOWN_GRABS, "AllowClosedownGrabs", OPTV_BOOLEAN, - {0}, FALSE }, { FLAG_LOG, "Log", OPTV_STRING, {0}, FALSE }, { FLAG_RENDER_COLORMAP_MODE, "RenderColormapMode", OPTV_STRING, @@ -884,6 +831,9 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) Bool value; MessageType from; const char *s; +#ifdef XKB + char *rules = "base"; +#endif /* * Merge the ServerLayout and ServerFlags options. The former have @@ -907,10 +857,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) xf86GetOptValBool(FlagOptions, FLAG_DONTZAP, &xf86Info.dontZap); xf86GetOptValBool(FlagOptions, FLAG_DONTZOOM, &xf86Info.dontZoom); - xf86GetOptValBool(FlagOptions, FLAG_ALLOW_DEACTIVATE_GRABS, - &(xf86Info.grabInfo.allowDeactivate)); - xf86GetOptValBool(FlagOptions, FLAG_ALLOW_CLOSEDOWN_GRABS, - &(xf86Info.grabInfo.allowClosedown)); xf86GetOptValBool(FlagOptions, FLAG_IGNORE_ABI, &xf86Info.ignoreABI); if (xf86Info.ignoreABI) { xf86Msg(X_CONFIG, "Ignoring ABI Version\n"); @@ -922,7 +868,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) from = X_CONFIG; } else { - xf86Info.autoAddDevices = TRUE; from = X_DEFAULT; } xf86Msg(from, "%sutomatically adding devices\n", @@ -934,7 +879,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) from = X_CONFIG; } else { - xf86Info.autoEnableDevices = TRUE; from = X_DEFAULT; } xf86Msg(from, "%sutomatically enabling devices\n", @@ -952,13 +896,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) xf86Info.vidModeAllowNonLocal = value; #endif -#ifdef XF86MISC - if (xf86GetOptValBool(FlagOptions, FLAG_DISABLEMODINDEV, &value)) - xf86Info.miscModInDevEnabled = !value; - if (xf86GetOptValBool(FlagOptions, FLAG_MODINDEVALLOWNONLOCAL, &value)) - xf86Info.miscModInDevAllowNonLocal = value; -#endif - if (xf86GetOptValBool(FlagOptions, FLAG_ALLOWMOUSEOPENFAIL, &value)) xf86Info.allowMouseOpenFail = value; @@ -982,19 +919,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) #endif } - if (xf86IsOptionSet(FlagOptions, FLAG_PCIPROBE1)) - xf86Info.pciFlags = PCIProbe1; - if (xf86IsOptionSet(FlagOptions, FLAG_PCIPROBE2)) - xf86Info.pciFlags = PCIProbe2; - if (xf86IsOptionSet(FlagOptions, FLAG_PCIFORCECONFIG1)) - xf86Info.pciFlags = PCIForceConfig1; - if (xf86IsOptionSet(FlagOptions, FLAG_PCIFORCECONFIG2)) - xf86Info.pciFlags = PCIForceConfig2; - if (xf86IsOptionSet(FlagOptions, FLAG_PCIOSCONFIG)) - xf86Info.pciFlags = PCIOsConfig; - if (xf86IsOptionSet(FlagOptions, FLAG_PCIFORCENONE)) - xf86Info.pciFlags = PCIForceNone; - xf86Info.pmFlag = TRUE; if (xf86GetOptValBool(FlagOptions, FLAG_NOPM, &value)) xf86Info.pmFlag = !value; @@ -1053,12 +977,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) xf86Info.randRFrom = X_CONFIG; } #endif - i = -1; - xf86GetOptValInteger(FlagOptions, FLAG_ESTIMATE_SIZES_AGGRESSIVELY, &i); - if (i >= 0) - xf86Info.estimateSizesAggressively = i; - else - xf86Info.estimateSizesAggressively = 0; xf86Info.aiglx = TRUE; xf86Info.aiglxFrom = X_DEFAULT; @@ -1078,7 +996,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) } else if (!xf86NameCmp(s, "all")) { xf86Info.glxVisuals = XF86_GlxVisualsAll; } else { - xf86Msg(X_WARNING,"Unknown HandleSpecialKeys option\n"); + xf86Msg(X_WARNING,"Unknown GlxVisuals option\n"); } } @@ -1092,6 +1010,15 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) xf86Info.allowEmptyInput = (xf86Info.autoAddDevices && xf86Info.autoEnableDevices); xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &xf86Info.allowEmptyInput); + /* AEI on? Then we're not using kbd, so use the evdev rules set. */ +#ifdef XKB +#if defined(linux) + if (xf86Info.allowEmptyInput) + rules = "evdev"; +#endif + XkbSetRulesDflts(rules, "pc105", "us", NULL, NULL); +#endif + xf86Info.useDefaultFontPath = TRUE; xf86Info.useDefaultFontPathFrom = X_DEFAULT; if (xf86GetOptValBool(FlagOptions, FLAG_USE_DEFAULT_FONT_PATH, &value)) { @@ -1237,8 +1164,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) * remove the core attribute from the later ones. */ for (devs = servlayoutp->inputs; devs && *devs; devs++) { - indp = *devs; pointer opt1 = NULL, opt2 = NULL; + indp = *devs; if (indp->commonOptions && xf86CheckBoolOption(indp->commonOptions, "CorePointer", FALSE)) { opt1 = indp->commonOptions; @@ -1552,9 +1479,14 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) } if (xf86Info.allowEmptyInput && !(foundPointer && foundKeyboard)) { +#ifdef CONFIG_HAL xf86Msg(X_INFO, "The server relies on HAL to provide the list of " "input devices.\n\tIf no devices become available, " "reconfigure HAL or disable AllowEmptyInput.\n"); +#else + xf86Msg(X_INFO, "HAL is disabled and no input devices were configured.\n" + "\tTry disabling AllowEmptyInput.\n"); +#endif } return TRUE; @@ -1631,10 +1563,14 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, count++; adjp = (XF86ConfAdjacencyPtr)adjp->list.next; } + #ifdef DEBUG ErrorF("Found %d screens in the layout section %s", count, conf_layout->lay_identifier); #endif + if (!count) /* alloc enough storage even if no screen is specified */ + count = 1; + slp = xnfcalloc(1, (count + 1) * sizeof(screenLayoutRec)); slp[count].screen = NULL; /* @@ -1689,6 +1625,20 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, adjp = (XF86ConfAdjacencyPtr)adjp->list.next; } + /* No screen was specified in the layout. take the first one from the + * config file, or - if it is NULL - configScreen autogenerates one for + * us */ + if (!count) + { + slp[0].screen = xnfcalloc(1, sizeof(confScreenRec)); + if (!configScreen(slp[0].screen, xf86configptr->conf_screen_lst, + 0, X_CONFIG)) { + xfree(slp[0].screen); + xfree(slp); + return FALSE; + } + } + /* XXX Need to tie down the upper left screen. */ /* Fill in the refscreen and top/bottom/left/right values */ @@ -1879,7 +1829,7 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen) indp = xnfalloc(sizeof(IDevPtr)); *indp = NULL; servlayoutp->inputs = indp; - + return TRUE; } @@ -2064,6 +2014,7 @@ configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor) XF86ConfModesLinkPtr modeslnk = conf_monitor->mon_modes_sect_lst; Gamma zeros = {0.0, 0.0, 0.0}; float badgamma = 0.0; + double maxPixClock; xf86Msg(X_CONFIG, "| |-->Monitor \"%s\"\n", conf_monitor->mon_identifier); @@ -2198,8 +2149,11 @@ configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor) xf86ProcessOptions(-1, monitorp->options, MonitorOptions); xf86GetOptValBool(MonitorOptions, MON_REDUCEDBLANKING, &monitorp->reducedblanking); - xf86GetOptValFreq(MonitorOptions, MON_MAX_PIX_CLOCK, OPTUNITS_KHZ, - &monitorp->maxPixClock); + if (xf86GetOptValFreq(MonitorOptions, MON_MAX_PIX_CLOCK, OPTUNITS_KHZ, + &maxPixClock) == TRUE) { + monitorp->maxPixClock = (int) maxPixClock; + } + return TRUE; } @@ -2493,13 +2447,14 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout) { while(*dev) { if (strcmp((*dev)->driver, "kbd") == 0 || - strcmp((*dev)->driver, "mouse") == 0) + strcmp((*dev)->driver, "mouse") == 0 || + strcmp((*dev)->driver, "vmmouse") == 0) { IDevPtr *current; if (!warned) { xf86Msg(X_WARNING, "AllowEmptyInput is on, devices using " - "drivers 'kbd' or 'mouse' will be disabled.\n"); + "drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.\n"); warned = TRUE; } @@ -2545,10 +2500,9 @@ xf86HandleConfigFile(Bool autoconfig) xf86MsgVerb(from, 0, "Using config file: \"%s\"\n", filename); xf86ConfigFile = xnfstrdup(filename); } else { - xf86Msg(X_ERROR, "Unable to locate/open config file"); if (xf86ConfigFile) - xf86ErrorFVerb(0, ": \"%s\"", xf86ConfigFile); - xf86ErrorFVerb(0, "\n"); + xf86Msg(X_ERROR, "Unable to locate/open config file: \"%s\"\n", + xf86ConfigFile); return CONFIG_NOFILE; } } @@ -2653,13 +2607,6 @@ xf86HandleConfigFile(Bool autoconfig) xf86Info.vidModeAllowNonLocal = TRUE; #endif -#ifdef XF86MISC - if (xf86MiscModInDevDisabled) - xf86Info.miscModInDevEnabled = FALSE; - if (xf86MiscModInDevAllowNonLocal) - xf86Info.miscModInDevAllowNonLocal = TRUE; -#endif - if (xf86AllowMouseOpenFail) xf86Info.allowMouseOpenFail = TRUE; diff --git a/xorg-server/hw/xfree86/common/xf86Configure.c b/xorg-server/hw/xfree86/common/xf86Configure.c index 536f89700..77326b6d4 100644 --- a/xorg-server/hw/xfree86/common/xf86Configure.c +++ b/xorg-server/hw/xfree86/common/xf86Configure.c @@ -76,12 +76,6 @@ static char *DFLT_MOUSE_PROTO = "OSMouse"; #elif defined(__UNIXWARE__) static char *DFLT_MOUSE_PROTO = "OSMouse"; static char *DFLT_MOUSE_DEV = "/dev/mouse"; -#elif defined(QNX4) -static char *DFLT_MOUSE_PROTO = "OSMouse"; -static char *DFLT_MOUSE_DEV = "/dev/mouse"; -#elif defined(__QNXNTO__) -static char *DFLT_MOUSE_PROTO = "OSMouse"; -static char *DFLT_MOUSE_DEV = "/dev/devi/mouse0"; #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) static char *DFLT_MOUSE_DEV = "/dev/sysmouse"; static char *DFLT_MOUSE_PROTO = "auto"; @@ -121,18 +115,6 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int return NULL; isPrimary = xf86IsPrimaryPci(pVideo); break; - case BUS_ISA: - /* - * This needs to be revisited as it doesn't allow for non-PCI - * multihead. - */ - if (!xf86IsPrimaryIsa()) - return NULL; - isPrimary = TRUE; - for (i = 0; i < nDevToConfig; i++) - if (!DevToConfig[i].pVideo) - return NULL; - break; #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) case BUS_SBUS: for (i = 0; i < nDevToConfig; i++) @@ -208,10 +190,6 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int chipset = (pVideo->vendor_id << 16) | pVideo->device_id; } break; - case BUS_ISA: - NewDevice.GDev.identifier = "ISA Adapter"; - NewDevice.GDev.busID = "ISA"; - break; #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) case BUS_SBUS: { char *promPath = NULL; @@ -247,17 +225,6 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int # undef NewDevice } -/* - * Backwards compatibility - */ -_X_EXPORT GDevPtr -xf86AddDeviceToConfigure(const char *driver, struct pci_device * pVideo, - int chipset) -{ - return xf86AddBusDeviceToConfigure(driver, pVideo ? BUS_PCI : BUS_ISA, - pVideo, chipset); -} - static XF86ConfInputPtr configureInputSection (void) { @@ -293,8 +260,7 @@ configureInputSection (void) #endif } - mouse = xf86confmalloc(sizeof(XF86ConfInputRec)); - memset((XF86ConfInputPtr)mouse,0,sizeof(XF86ConfInputRec)); + mouse = xf86confcalloc(1, sizeof(XF86ConfInputRec)); mouse->inp_identifier = "Mouse0"; mouse->inp_driver = "mouse"; mouse->inp_option_lst = @@ -330,8 +296,7 @@ configureScreenSection (int screennum) { XF86ConfDisplayPtr display; - display = xf86confmalloc(sizeof(XF86ConfDisplayRec)); - memset((XF86ConfDisplayPtr)display,0,sizeof(XF86ConfDisplayRec)); + display = xf86confcalloc(1, sizeof(XF86ConfDisplayRec)); display->disp_depth = depths[i]; display->disp_black.red = display->disp_white.red = -1; display->disp_black.green = display->disp_white.green = -1; @@ -532,8 +497,7 @@ configureModuleSection (void) for (el = elist; *el; el++) { XF86LoadPtr module; - module = xf86confmalloc(sizeof(XF86LoadRec)); - memset((XF86LoadPtr)module,0,sizeof(XF86LoadRec)); + module = xf86confcalloc(1, sizeof(XF86LoadRec)); module->load_name = *el; ptr->mod_load_lst = (XF86LoadPtr)xf86addListItem( (glp)ptr->mod_load_lst, (glp)module); @@ -547,8 +511,7 @@ configureModuleSection (void) for (el = elist; *el; el++) { XF86LoadPtr module; - module = xf86confmalloc(sizeof(XF86LoadRec)); - memset((XF86LoadPtr)module,0,sizeof(XF86LoadRec)); + module = xf86confcalloc(1, sizeof(XF86LoadRec)); module->load_name = *el; /* Add only those font backends which are referenced by fontpath */ @@ -672,12 +635,17 @@ configureDDCMonitorSection (int screennum) return ptr; } +#if !defined(PATH_MAX) +# define PATH_MAX 1024 +#endif + void -DoConfigure() +DoConfigure(void) { int i,j, screennum = -1; char *home = NULL; - char *filename = NULL; + char filename[PATH_MAX]; + char *addslash = ""; XF86ConfigPtr xf86config = NULL; char **vlist, **vl; int *dev2screen; @@ -722,11 +690,7 @@ DoConfigure() xf86FindPrimaryDevice(); /* Create XF86Config file structure */ - xf86config = malloc(sizeof(XF86ConfigRec)); - memset ((XF86ConfigPtr)xf86config, 0, sizeof(XF86ConfigRec)); - xf86config->conf_device_lst = NULL; - xf86config->conf_screen_lst = NULL; - xf86config->conf_monitor_lst = NULL; + xf86config = calloc(1, sizeof(XF86ConfigRec)); /* Call all of the probe functions, reporting the results. */ for (CurrentDriver = 0; CurrentDriver < xf86NumDrivers; CurrentDriver++) { @@ -779,33 +743,26 @@ DoConfigure() xf86config->conf_input_lst = configureInputSection(); xf86config->conf_layout_lst = configureLayoutSection(); - if (!(home = getenv("HOME"))) + home = getenv("HOME"); + if ((home == NULL) || (home[0] == '\0')) { home = "/"; - { -#if !defined(PATH_MAX) -#define PATH_MAX 1024 -#endif - const char* configfile = XF86CONFIGFILE".new"; - char homebuf[PATH_MAX]; - /* getenv might return R/O memory, as with OS/2 */ - strncpy(homebuf,home,PATH_MAX-1); - homebuf[PATH_MAX-1] = '\0'; - home = homebuf; - if (!(filename = - (char *)xalloc(strlen(home) + - strlen(configfile) + 3))) - - if (home[0] == '/' && home[1] == '\0') - home[0] = '\0'; -#ifndef QNX4 - sprintf(filename, "%s/%s", home,configfile); -#else - sprintf(filename, "//%d%s/%s", getnid(),home,configfile); -#endif - + } else { + /* Determine if trailing slash is present or needed */ + int l = strlen(home); + + if (home[l-1] != '/') { + addslash = "/"; + } } - xf86writeConfigFile(filename, xf86config); + snprintf(filename, sizeof(filename), "%s%s" XF86CONFIGFILE ".new", + home, addslash); + + if (xf86writeConfigFile(filename, xf86config) == 0) { + xf86Msg(X_ERROR, "Unable to write config file: \"%s\": %s\n", + filename, strerror(errno)); + goto bail; + } xf86DoConfigurePass1 = FALSE; /* Try to get DDC information filled in */ @@ -901,7 +858,11 @@ DoConfigure() (glp)xf86config->conf_screen_lst, (glp)ScreenPtr); } - xf86writeConfigFile(filename, xf86config); + if (xf86writeConfigFile(filename, xf86config) == 0) { + xf86Msg(X_ERROR, "Unable to write config file: \"%s\": %s\n", + filename, strerror(errno)); + goto bail; + } ErrorF("\n"); diff --git a/xorg-server/hw/xfree86/common/xf86Cursor.c b/xorg-server/hw/xfree86/common/xf86Cursor.c index 3ea1b4d91..c6f603959 100644 --- a/xorg-server/hw/xfree86/common/xf86Cursor.c +++ b/xorg-server/hw/xfree86/common/xf86Cursor.c @@ -44,10 +44,8 @@ #include "xf86Priv.h" #include "xf86_OSproc.h" -#ifdef XINPUT #include #include "xf86Xinput.h" -#endif #ifdef XFreeXDGA #include "dgaproc.h" @@ -67,7 +65,7 @@ typedef struct { static Bool xf86CursorOffScreen(ScreenPtr *pScreen, int *x, int *y); static void xf86CrossScreen(ScreenPtr pScreen, Bool entering); -static void xf86WarpCursor(ScreenPtr pScreen, int x, int y); +static void xf86WarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); static void xf86PointerMoved(int scrnIndex, int x, int y); @@ -206,6 +204,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode) ScreenPtr pCursorScreen; Bool Switched; int px, py; + DeviceIntPtr dev, it; if (!pScr->vtSema || !mode || !pScr->SwitchMode) return FALSE; @@ -221,9 +220,20 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode) if (mode->HDisplay > pScr->virtualX || mode->VDisplay > pScr->virtualY) return FALSE; - pCursorScreen = miPointerGetScreen(inputInfo.pointer); + /* Let's take an educated guess for which pointer to take here. And about as + educated as it gets is to take the first pointer we find. + */ + for (dev = inputInfo.devices; dev; dev = dev->next) + { + if (IsPointerDevice(dev) && dev->spriteInfo->spriteOwner) + break; + } + if (!dev) + dev = inputInfo.pointer; + + pCursorScreen = miPointerGetScreen(dev); if (pScreen == pCursorScreen) - miPointerGetPosition(inputInfo.pointer, &px, &py); + miPointerGetPosition(dev, &px, &py); xf86EnterServerState(SETUP); Switched = (*pScr->SwitchMode)(pScr->scrnIndex, mode, 0); @@ -232,6 +242,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode) /* * Adjust frame for new display size. + * Frame is centered around cursor position if cursor is on same screen. */ if (pScreen == pCursorScreen) pScr->frameX0 = px - (mode->HDisplay / 2) + 1; @@ -266,8 +277,42 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode) if (pScr->AdjustFrame) (*pScr->AdjustFrame)(pScr->scrnIndex, pScr->frameX0, pScr->frameY0, 0); + /* The original code centered the frame around the cursor if possible. + * Since this is hard to achieve with multiple cursors, we do the following: + * - center around the first pointer + * - move all other pointers to the nearest edge on the screen (or leave + * them unmodified if they are within the boundaries). + */ if (pScreen == pCursorScreen) - xf86WarpCursor(pScreen, px, py); + { + xf86WarpCursor(dev, pScreen, px, py); + } + + for (it = inputInfo.devices; it; it = it->next) + { + if (it == dev) + continue; + + if (IsPointerDevice(it) && it->spriteInfo->spriteOwner) + { + pCursorScreen = miPointerGetScreen(it); + if (pScreen == pCursorScreen) + { + miPointerGetPosition(it, &px, &py); + if (px < pScr->frameX0) + px = pScr->frameX0; + else if (px > pScr->frameX1) + px = pScr->frameX1; + + if(py < pScr->frameY0) + py = pScr->frameY0; + else if(py > pScr->frameY1) + py = pScr->frameY1; + + xf86WarpCursor(it, pScreen, px, py); + } + } + } return Switched; } @@ -424,13 +469,13 @@ xf86CrossScreen (ScreenPtr pScreen, Bool entering) /* ARGSUSED */ static void -xf86WarpCursor (ScreenPtr pScreen, int x, int y) +xf86WarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { int sigstate; sigstate = xf86BlockSIGIO (); - miPointerWarpCursor(pScreen,x,y); + miPointerWarpCursor(pDev, pScreen, x, y); - xf86Info.currentScreen = pScreen; + xf86Info.currentScreen = pScreen; xf86UnblockSIGIO (sigstate); } diff --git a/xorg-server/hw/xfree86/common/xf86DGA.c b/xorg-server/hw/xfree86/common/xf86DGA.c index 0daf1de44..a06f285f1 100644 --- a/xorg-server/hw/xfree86/common/xf86DGA.c +++ b/xorg-server/hw/xfree86/common/xf86DGA.c @@ -46,10 +46,13 @@ #include #endif #include "xf86Xinput.h" +#include "exglobals.h" +#include "exevents.h" #include "mi.h" -static DevPrivateKey DGAScreenKey = NULL; +static int DGAScreenKeyIndex; +static DevPrivateKey DGAScreenKey; static int mieq_installed = 0; static Bool DGACloseScreen(int i, ScreenPtr pScreen); @@ -115,7 +118,7 @@ DGAInit( if(!modes || num <= 0) return FALSE; - DGAScreenKey = &DGAScreenKey; + DGAScreenKey = &DGAScreenKeyIndex; if(!(pScreenPriv = (DGAScreenPtr)xalloc(sizeof(DGAScreenRec)))) return FALSE; @@ -912,7 +915,7 @@ DGAVTSwitch(void) } Bool -DGAStealKeyEvent(int index, int key_code, int is_down) +DGAStealKeyEvent(DeviceIntPtr dev, int index, int key_code, int is_down) { DGAScreenPtr pScreenPriv; dgaEvent de; @@ -920,6 +923,9 @@ DGAStealKeyEvent(int index, int key_code, int is_down) if(DGAScreenKey == NULL) /* no DGA */ return FALSE; + if (key_code < 8 || key_code > 255) + return FALSE; + pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); if(!pScreenPriv || !pScreenPriv->grabKeyboard) /* no direct mode */ @@ -928,7 +934,7 @@ DGAStealKeyEvent(int index, int key_code, int is_down) de.u.u.type = *XDGAEventBase + (is_down ? KeyPress : KeyRelease); de.u.u.detail = key_code; de.u.event.time = GetTimeInMillis(); - mieqEnqueue (inputInfo.keyboard, (xEvent *) &de); + mieqEnqueue (dev, (xEvent *) &de); return TRUE; } @@ -936,7 +942,7 @@ DGAStealKeyEvent(int index, int key_code, int is_down) static int DGAMouseX, DGAMouseY; Bool -DGAStealMotionEvent(int index, int dx, int dy) +DGAStealMotionEvent(DeviceIntPtr dev, int index, int dx, int dy) { DGAScreenPtr pScreenPriv; dgaEvent de; @@ -966,12 +972,12 @@ DGAStealMotionEvent(int index, int dx, int dy) de.u.event.dy = dy; de.u.event.pad1 = DGAMouseX; de.u.event.pad2 = DGAMouseY; - mieqEnqueue (inputInfo.pointer, (xEvent *) &de); + mieqEnqueue (dev, (xEvent *) &de); return TRUE; } Bool -DGAStealButtonEvent(int index, int button, int is_down) +DGAStealButtonEvent(DeviceIntPtr dev, int index, int button, int is_down) { DGAScreenPtr pScreenPriv; dgaEvent de; @@ -991,7 +997,7 @@ DGAStealButtonEvent(int index, int button, int is_down) de.u.event.dy = 0; de.u.event.pad1 = DGAMouseX; de.u.event.pad2 = DGAMouseY; - mieqEnqueue (inputInfo.pointer, (xEvent *) &de); + mieqEnqueue (dev, (xEvent *) &de); return TRUE; } @@ -1025,16 +1031,12 @@ static Mask filters[] = static void DGAProcessKeyboardEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr keybd) { - int key, bit; - register BYTE *kptr; - register int i; - register CARD8 modifiers; - register CARD16 mask; int coreEquiv; - xEvent core; + xEvent xi; KeyClassPtr keyc = keybd->key; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); - + DeviceIntPtr pointer = GetPairedDevice(keybd); + coreEquiv = de->u.u.type - *XDGAEventBase; /* @@ -1043,84 +1045,36 @@ DGAProcessKeyboardEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr keybd) de->u.event.dx = 0; de->u.event.dy = 0; de->u.event.screen = pScreen->myNum; - de->u.event.state = keyc->state | (inputInfo.pointer)->button->state; + de->u.event.state = keyc->state | pointer->button->state; + + de->u.u.type = (IEventBase - 1) + coreEquiv; /* change to XI event */ + UpdateDeviceState(keybd, (xEvent*)de, 1); + de->u.u.type = *XDGAEventBase + coreEquiv; /* change back */ - /* - * Keep the core state in sync by duplicating what - * CoreProcessKeyboardEvent does - */ - key = de->u.u.detail; - kptr = &keyc->down[key >> 3]; - bit = 1 << (key & 7); - modifiers = keyc->modifierMap[key]; - switch (coreEquiv) - { - case KeyPress: - inputInfo.pointer->valuator->motionHintWindow = NullWindow; - *kptr |= bit; - keyc->prev_state = keyc->state; -#ifdef XKB - if (noXkbExtension) -#endif - { - - for (i = 0, mask = 1; modifiers; i++, mask <<= 1) - { - if (mask & modifiers) - { - /* This key affects modifier "i" */ - keyc->modifierKeyCount[i]++; - keyc->state |= mask; - modifiers &= ~mask; - } - } - } - break; - case KeyRelease: - inputInfo.pointer->valuator->motionHintWindow = NullWindow; - *kptr &= ~bit; - keyc->prev_state = keyc->state; -#ifdef XKB - if (noXkbExtension) -#endif - { - for (i = 0, mask = 1; modifiers; i++, mask <<= 1) - { - if (mask & modifiers) { - /* This key affects modifier "i" */ - if (--keyc->modifierKeyCount[i] <= 0) { - keyc->state &= ~mask; - keyc->modifierKeyCount[i] = 0; - } - modifiers &= ~mask; - } - } - } - break; - } /* * Deliver the DGA event */ if (pScreenPriv->client) { /* If the DGA client has selected input, then deliver based on the usual filter */ - TryClientEvents (pScreenPriv->client, (xEvent *) de, 1, + TryClientEvents (pScreenPriv->client, keybd, (xEvent *) de, 1, filters[coreEquiv], pScreenPriv->input, 0); } else { /* If the keyboard is actively grabbed, deliver a grabbed core event */ - if (keybd->grab && !keybd->fromPassiveGrab) + if (keybd->deviceGrab.grab && !keybd->deviceGrab.fromPassiveGrab) { - core.u.u.type = coreEquiv; - core.u.u.detail = de->u.u.detail; - core.u.keyButtonPointer.time = de->u.event.time; - core.u.keyButtonPointer.eventX = de->u.event.dx; - core.u.keyButtonPointer.eventY = de->u.event.dy; - core.u.keyButtonPointer.rootX = de->u.event.dx; - core.u.keyButtonPointer.rootY = de->u.event.dy; - core.u.keyButtonPointer.state = de->u.event.state; - DeliverGrabbedEvent (&core, keybd, FALSE, 1); + xi.u.u.type = (IEventBase - 1) + coreEquiv; + xi.u.u.detail = de->u.u.detail; + xi.u.keyButtonPointer.time = de->u.event.time; + xi.u.keyButtonPointer.eventX = de->u.event.dx; + xi.u.keyButtonPointer.eventY = de->u.event.dy; + xi.u.keyButtonPointer.rootX = de->u.event.dx; + xi.u.keyButtonPointer.rootY = de->u.event.dy; + xi.u.keyButtonPointer.state = de->u.event.state; + ((deviceKeyButtonPointer*)&xi)->deviceid = keybd->id; + DeliverGrabbedEvent (&xi, keybd, FALSE, 1); } } } @@ -1129,77 +1083,44 @@ static void DGAProcessPointerEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr mouse) { ButtonClassPtr butc = mouse->button; - int coreEquiv; + int coreEquiv; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); - xEvent core; + xEvent xi; coreEquiv = de->u.u.type - *XDGAEventBase; /* * Fill in remaining event state */ de->u.event.screen = pScreen->myNum; - de->u.event.state = butc->state | inputInfo.keyboard->key->state; - /* - * Keep the core state in sync by duplicating what - * CoreProcessPointerEvent does - */ - if (coreEquiv != MotionNotify) - { - register int key; - register BYTE *kptr; - int bit; - - key = de->u.u.detail; - kptr = &butc->down[key >> 3]; - bit = 1 << (key & 7); - switch (coreEquiv) - { - case ButtonPress: - mouse->valuator->motionHintWindow = NullWindow; - if (!(*kptr & bit)) - butc->buttonsDown++; - butc->motionMask = ButtonMotionMask; - *kptr |= bit; - if (key <= 5) - butc->state |= (Button1Mask >> 1) << key; - break; - case ButtonRelease: - mouse->valuator->motionHintWindow = NullWindow; - if (*kptr & bit) - --butc->buttonsDown; - if (!butc->buttonsDown) - butc->motionMask = 0; - *kptr &= ~bit; - if (key == 0) - return; - if (key <= 5) - butc->state &= ~((Button1Mask >> 1) << key); - break; - } - } + de->u.event.state = butc->state | GetPairedDevice(mouse)->key->state; + + de->u.u.type = (IEventBase - 1) + coreEquiv; /* change to XI event */ + UpdateDeviceState(mouse, (xEvent*)de, 1); + de->u.u.type = *XDGAEventBase + coreEquiv; /* change back */ + /* * Deliver the DGA event */ if (pScreenPriv->client) { /* If the DGA client has selected input, then deliver based on the usual filter */ - TryClientEvents (pScreenPriv->client, (xEvent *) de, 1, + TryClientEvents (pScreenPriv->client, mouse, (xEvent *) de, 1, filters[coreEquiv], pScreenPriv->input, 0); } else { /* If the pointer is actively grabbed, deliver a grabbed core event */ - if (mouse->grab && !mouse->fromPassiveGrab) + if (mouse->deviceGrab.grab && !mouse->deviceGrab.fromPassiveGrab) { - core.u.u.type = coreEquiv; - core.u.u.detail = de->u.u.detail; - core.u.keyButtonPointer.time = de->u.event.time; - core.u.keyButtonPointer.eventX = de->u.event.dx; - core.u.keyButtonPointer.eventY = de->u.event.dy; - core.u.keyButtonPointer.rootX = de->u.event.dx; - core.u.keyButtonPointer.rootY = de->u.event.dy; - core.u.keyButtonPointer.state = de->u.event.state; - DeliverGrabbedEvent (&core, mouse, FALSE, 1); + xi.u.u.type = (IEventBase - 1 ) + coreEquiv; + xi.u.u.detail = de->u.u.detail; + xi.u.keyButtonPointer.time = de->u.event.time; + xi.u.keyButtonPointer.eventX = de->u.event.dx; + xi.u.keyButtonPointer.eventY = de->u.event.dy; + xi.u.keyButtonPointer.rootX = de->u.event.dx; + xi.u.keyButtonPointer.rootY = de->u.event.dy; + xi.u.keyButtonPointer.state = de->u.event.state; + DeliverGrabbedEvent (&xi, mouse, FALSE, 1); } } } @@ -1287,10 +1208,10 @@ DGAHandleEvent(int screen_num, xEvent *event, DeviceIntPtr device, int nevents) switch (coreEquiv) { case KeyPress: case KeyRelease: - DGAProcessKeyboardEvent (pScreen, de, inputInfo.keyboard); + DGAProcessKeyboardEvent (pScreen, de, device); break; default: - DGAProcessPointerEvent (pScreen, de, inputInfo.pointer); + DGAProcessPointerEvent (pScreen, de, device); break; } } diff --git a/xorg-server/hw/xfree86/common/xf86DPMS.c b/xorg-server/hw/xfree86/common/xf86DPMS.c index 4fb901aae..5ee5e2451 100644 --- a/xorg-server/hw/xfree86/common/xf86DPMS.c +++ b/xorg-server/hw/xfree86/common/xf86DPMS.c @@ -47,7 +47,8 @@ #ifdef DPMSExtension -static DevPrivateKey DPMSKey = NULL; +static int DPMSKeyIndex; +static DevPrivateKey DPMSKey; static Bool DPMSClose(int i, ScreenPtr pScreen); static int DPMSCount = 0; #endif @@ -62,7 +63,7 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) pointer DPMSOpt; MessageType enabled_from = X_INFO; - DPMSKey = &DPMSKey; + DPMSKey = &DPMSKeyIndex; if (DPMSDisabledSwitch) DPMSEnabled = FALSE; diff --git a/xorg-server/hw/xfree86/common/xf86Debug.c b/xorg-server/hw/xfree86/common/xf86Debug.c deleted file mode 100644 index 5b609652b..000000000 --- a/xorg-server/hw/xfree86/common/xf86Debug.c +++ /dev/null @@ -1,77 +0,0 @@ - -/* - * Copyright (c) 2000-2003 by The XFree86 Project, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the copyright holder(s) - * and author(s) shall not be used in advertising or otherwise to promote - * the sale, use or other dealings in this Software without prior written - * authorization from the copyright holder(s) and author(s). - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include -#include -#include "os.h" -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" -#include "compiler.h" - -CARD8 xf86PeekFb8(CARD8 *p) { return *p; } -CARD16 xf86PeekFb16(CARD16 *p) { return *p; } -CARD32 xf86PeekFb32(CARD32 *p) { return *p; } -void xf86PokeFb8(CARD8 *p, CARD8 v) { *p = v; } -void xf86PokeFb16(CARD16 *p, CARD16 v) { *p = v; } -void xf86PokeFb32(CARD16 *p, CARD32 v) { *p = v; } - -CARD8 xf86PeekMmio8(pointer Base, unsigned long Offset) -{ - return MMIO_IN8(Base,Offset); -} - -CARD16 xf86PeekMmio16(pointer Base, unsigned long Offset) -{ - return MMIO_IN16(Base,Offset); -} - -CARD32 xf86PeekMmio32(pointer Base, unsigned long Offset) -{ - return MMIO_IN32(Base,Offset); -} - -void xf86PokeMmio8(pointer Base, unsigned long Offset, CARD8 v) -{ - MMIO_OUT8(Base,Offset,v); -} - -void xf86PokeMmio16(pointer Base, unsigned long Offset, CARD16 v) -{ - MMIO_OUT16(Base,Offset,v); -} - -void xf86PokeMmio32(pointer Base, unsigned long Offset, CARD32 v) -{ - MMIO_OUT32(Base,Offset,v); -} diff --git a/xorg-server/hw/xfree86/common/xf86DoProbe.c b/xorg-server/hw/xfree86/common/xf86DoProbe.c deleted file mode 100644 index bba6ab7e8..000000000 --- a/xorg-server/hw/xfree86/common/xf86DoProbe.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 1999-2002 by The XFree86 Project, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the copyright holder(s) - * and author(s) shall not be used in advertising or otherwise to promote - * the sale, use or other dealings in this Software without prior written - * authorization from the copyright holder(s) and author(s). - */ - -/* - * finish setting up the server - * Load the driver modules and call their probe functions. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include "os.h" -#include "loaderProcs.h" -#include "xf86Config.h" -#include "xf86_OSlib.h" -#include "xf86.h" -#include "xf86Priv.h" - -void -DoProbe() -{ - int i; - Bool probeResult; - Bool ioEnableFailed = FALSE; - - /* Find the list of video driver modules. */ - char **list = xf86DriverlistFromCompile(); - char **l; - - if (list) { - ErrorF("List of video driver modules:\n"); - for (l = list; *l; l++) - ErrorF("\t%s\n", *l); - } else { - ErrorF("No video driver modules found\n"); - } - - /* Load all the drivers that were found. */ - xf86LoadModules(list, NULL); - - /* Disable PCI devices */ - xf86AccessInit(); - - /* Call all of the probe functions, reporting the results. */ - for (i = 0; i < xf86NumDrivers; i++) { - DriverRec * const drv = xf86DriverList[i]; - - if (!xorgHWAccess) { - xorgHWFlags flags; - if (!drv->driverFunc - || !drv->driverFunc( NULL, GET_REQUIRED_HW_INTERFACES, &flags ) - || NEED_IO_ENABLED(flags)) { - if (ioEnableFailed) - continue; - if (!xf86EnableIO()) { - ioEnableFailed = TRUE; - continue; - } - xorgHWAccess = TRUE; - } - } - - - xf86MsgVerb(X_INFO, 3, "Probing in driver %s\n", drv->driverName); - - probeResult = xf86CallDriverProbe( drv, TRUE ); - if (!probeResult) { - xf86ErrorF("Probe in driver `%s' returns FALSE\n", - drv->driverName); - } else { - xf86ErrorF("Probe in driver `%s' returns TRUE\n", - drv->driverName); - - /* If we have a result, then call driver's Identify function */ - if (drv->Identify != NULL) { - const int verbose = xf86SetVerbosity(1); - (*drv->Identify)(0); - xf86SetVerbosity(verbose); - } - } - } - - OsCleanup(TRUE); - AbortDDX(); - fflush(stderr); - exit(0); -} diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c index 76c207a13..d6ef93a1b 100644 --- a/xorg-server/hw/xfree86/common/xf86Events.c +++ b/xorg-server/hw/xfree86/common/xf86Events.c @@ -57,26 +57,20 @@ #include #include #include "misc.h" - #include "compiler.h" - #include "xf86.h" #include "xf86Priv.h" #define XF86_OS_PRIVS #include "xf86_OSlib.h" -#include "atKeynames.h" - +#include #ifdef XFreeXDGA #include "dgaproc.h" #endif -#ifdef XINPUT #include #include -#else #include "inputstr.h" -#endif #include "xf86Xinput.h" #include "mi.h" @@ -87,25 +81,12 @@ #include #endif -#ifdef XKB -extern Bool noXkbExtension; -#endif - #ifdef DPMSExtension #define DPMS_SERVER #include #include "dpmsproc.h" #endif -#define XE_POINTER 1 -#define XE_KEYBOARD 2 - -#define EqEnqueue(pDev, ev) { \ - int __sigstate = xf86BlockSIGIO (); \ - mieqEnqueue (pDev, ev); \ - xf86UnblockSIGIO(__sigstate); \ -} - /* * The first of many hacks to get VT switching to work under * Solaris 2.1 for x86. The basic problem is that Solaris is supposed @@ -160,7 +141,6 @@ LegalModifier(unsigned int key, DeviceIntPtr pDev) * Function used for screensaver purposes by the os module. Returns the * time in milliseconds since there last was any input. */ - int TimeSinceLastInputEvent() { @@ -170,90 +150,34 @@ TimeSinceLastInputEvent() return GetTimeInMillis() - xf86Info.lastEventTime; } - - /* * SetTimeSinceLastInputEvent -- * Set the lastEventTime to now. */ - _X_EXPORT void SetTimeSinceLastInputEvent() { xf86Info.lastEventTime = GetTimeInMillis(); } - - /* * ProcessInputEvents -- * Retrieve all waiting input events and pass them to DIX in their * correct chronological order. Only reads from the system pointer * and keyboard. */ - void ProcessInputEvents () { int x, y; -#ifdef INHERIT_LOCK_STATE - static int generation = 0; -#endif - - /* - * With INHERIT_LOCK_STATE defined, the initial state of CapsLock, NumLock - * and ScrollLock will be set to match that of the VT the server is - * running on. - */ -#ifdef INHERIT_LOCK_STATE - if (generation != serverGeneration) { - xEvent kevent; - DevicePtr pKeyboard = xf86Info.pKeyboard; - extern unsigned int xf86InitialCaps, xf86InitialNum, xf86InitialScroll; - - generation = serverGeneration; - kevent.u.keyButtonPointer.time = GetTimeInMillis(); - kevent.u.keyButtonPointer.rootX = 0; - kevent.u.keyButtonPointer.rootY = 0; - kevent.u.u.type = KeyPress; - - - if (xf86InitialCaps) { - kevent.u.u.detail = xf86InitialCaps; - (* pKeyboard->processInputProc)(&kevent, (DeviceIntPtr)pKeyboard, 1); - xf86InitialCaps = 0; - } - if (xf86InitialNum) { - kevent.u.u.detail = xf86InitialNum; - (* pKeyboard->processInputProc)(&kevent, (DeviceIntPtr)pKeyboard, 1); - xf86InitialNum = 0; - } - if (xf86InitialScroll) { - kevent.u.u.detail = xf86InitialScroll; - (* pKeyboard->processInputProc)(&kevent, (DeviceIntPtr)pKeyboard, 1); - xf86InitialScroll = 0; - } - } -#endif - - xf86Info.inputPending = FALSE; mieqProcessInputEvents(); - miPointerUpdateSprite(inputInfo.pointer); + /* FIXME: This is a problem if we have multiple pointers */ miPointerGetPosition(inputInfo.pointer, &x, &y); xf86SetViewport(xf86Info.currentScreen, x, y); } -void -xf86GrabServerCallback(CallbackListPtr *callbacks, pointer data, pointer args) -{ - ServerGrabInfoRec *grab = (ServerGrabInfoRec*)args; - - xf86Info.grabInfo.server.client = grab->client; - xf86Info.grabInfo.server.grabstate = grab->grabstate; -} - /* * Handle keyboard events that cause some kind of "action" * (i.e., server termination, video mode changes, VT switches, etc.) @@ -281,42 +205,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg) if (!xf86Info.dontZoom) xf86ZoomViewport(xf86Info.currentScreen, -1); break; - case ACTION_DISABLEGRAB: - if (!xf86Info.grabInfo.disabled && xf86Info.grabInfo.allowDeactivate) { - if (inputInfo.pointer && inputInfo.pointer->grab != NULL && - inputInfo.pointer->DeactivateGrab) - inputInfo.pointer->DeactivateGrab(inputInfo.pointer); - if (inputInfo.keyboard && inputInfo.keyboard->grab != NULL && - inputInfo.keyboard->DeactivateGrab) - inputInfo.keyboard->DeactivateGrab(inputInfo.keyboard); - } - break; - case ACTION_CLOSECLIENT: - if (!xf86Info.grabInfo.disabled && xf86Info.grabInfo.allowClosedown) { - ClientPtr pointer, keyboard, server; - - pointer = keyboard = server = NULL; - if (inputInfo.pointer && inputInfo.pointer->grab != NULL) - pointer = clients[CLIENT_ID(inputInfo.pointer->grab->resource)]; - if (inputInfo.keyboard && inputInfo.keyboard->grab != NULL) { - keyboard = clients[CLIENT_ID(inputInfo.keyboard->grab->resource)]; - if (keyboard == pointer) - keyboard = NULL; - } - if ((xf86Info.grabInfo.server.grabstate == SERVER_GRABBED) && - (((server = xf86Info.grabInfo.server.client) == pointer) || - (server == keyboard))) - server = NULL; - - if (pointer) - CloseDownClient(pointer); - if (keyboard) - CloseDownClient(keyboard); - if (server) - CloseDownClient(server); - } - break; -#if !defined(__SOL8__) && !defined(sgi) && \ +#if !defined(__SOL8__) && \ (!defined(sun) || defined(__i386__)) && defined(VT_ACTIVATE) case ACTION_SWITCHSCREEN: if (VTSwitchEnabled && !xf86Info.dontVTSwitch && arg) { @@ -324,12 +213,8 @@ xf86ProcessActionEvent(ActionEvent action, void *arg) #if defined(__SCO__) || defined(__UNIXWARE__) vtno--; #endif -#if defined(QNX4) - xf86Info.vtRequestsPending = vtno; -#else if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) ErrorF("Failed to switch consoles (%s)\n", strerror(errno)); -#endif } break; case ACTION_SWITCHSCREEN_NEXT: @@ -355,78 +240,11 @@ xf86ProcessActionEvent(ActionEvent action, void *arg) } break; #endif - case ACTION_MESSAGE: - { - char *retstr, *message = (char *) arg; - ScrnInfoPtr pScr = XF86SCRNINFO(xf86Info.currentScreen); - -#ifdef DEBUG - ErrorF("ActionMessage: '%s'\n", message); -#endif - /* Okay the message made it to the ddx. The common layer */ - /* can check for relevant messages here and react to any */ - /* that have a global effect. For example: */ - /* */ - /* if (!strcmp(message, "foo") { */ - /* do_foo(); break */ - /* } */ - /* */ - /* otherwise fallback to sending a key event message to */ - /* the current screen's driver: */ - if (*pScr->HandleMessage != NULL) { - (void) (*pScr->HandleMessage)(pScr->scrnIndex, - "KeyEventMessage", message, &retstr); - } - } - break; default: break; } } -#define ModifierIsSet(k) ((modifiers & (k)) == (k)) - -_X_EXPORT Bool -xf86CommonSpecialKey(int key, Bool down, int modifiers) -{ - if ((!ModifierIsSet(ShiftMask)) && - (((ModifierIsSet(ControlMask | AltMask)) || - (ModifierIsSet(ControlMask | AltLangMask))))) { - switch (key) { - - case KEY_BackSpace: - xf86ProcessActionEvent(ACTION_TERMINATE, NULL); - break; - - /* - * Check grabs - */ - case KEY_KP_Divide: - xf86ProcessActionEvent(ACTION_DISABLEGRAB, NULL); - break; - case KEY_KP_Multiply: - xf86ProcessActionEvent(ACTION_CLOSECLIENT, NULL); - break; - - /* - * The idea here is to pass the scancode down to a list of - * registered routines. There should be some standard conventions - * for processing certain keys. - */ - case KEY_KP_Minus: /* Keypad - */ - if (down) xf86ProcessActionEvent(ACTION_PREV_MODE, NULL); - if (!xf86Info.dontZoom) return TRUE; - break; - - case KEY_KP_Plus: /* Keypad + */ - if (down) xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL); - if (!xf86Info.dontZoom) return TRUE; - break; - } - } - return FALSE; -} - /* * xf86Wakeup -- * Os wakeup handler. @@ -436,7 +254,6 @@ xf86CommonSpecialKey(int key, Bool down, int modifiers) void xf86Wakeup(pointer blockData, int err, pointer pReadmask) { -#if !defined(__QNX__) fd_set* LastSelectMask = (fd_set*)pReadmask; fd_set devicesWithInput; InputInfoPtr pInfo; @@ -463,27 +280,6 @@ xf86Wakeup(pointer blockData, int err, pointer pReadmask) } } } -#else /* __QNX__ */ - - InputInfoPtr pInfo; - - pInfo = xf86InputDevs; - while (pInfo) { - if (pInfo->read_input && pInfo->fd >= 0) { - int sigstate = xf86BlockSIGIO(); - - pInfo->read_input(pInfo); - xf86UnblockSIGIO(sigstate); - /* - * Must break here because more than one device may share - * the same file descriptor. - */ - break; - } - pInfo = pInfo->next; - } - -#endif /* __QNX__ */ if (err >= 0) { /* we don't want the handlers called if select() */ IHPtr ih; /* returned with an error condition, do we? */ @@ -497,8 +293,6 @@ xf86Wakeup(pointer blockData, int err, pointer pReadmask) } if (xf86VTSwitchPending()) xf86VTSwitch(); - - if (xf86Info.inputPending) ProcessInputEvents(); } @@ -593,6 +387,19 @@ xf86SigHandler(int signo) FatalError("Caught signal %d. Server aborting\n", signo); } +/* + * xf86PrintBacktrace -- + * Print a stack backtrace for debugging purposes. + */ +_X_EXPORT void +xf86PrintBacktrace(void) +{ + xorg_backtrace(); +} + +#define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7))) +#define ModifierDown(k) ((keyc->state & (k)) == (k)) + static void xf86ReleaseKeys(DeviceIntPtr pDev) { @@ -643,7 +450,7 @@ xf86ReleaseKeys(DeviceIntPtr pDev) int sigstate = xf86BlockSIGIO (); nevents = GetKeyboardEvents(xf86Events, pDev, KeyRelease, i); for (j = 0; j < nevents; j++) - mieqEnqueue(pDev, xf86Events + j); + mieqEnqueue(pDev, (xf86Events + j)->event); xf86UnblockSIGIO(sigstate); } break; diff --git a/xorg-server/hw/xfree86/common/xf86Globals.c b/xorg-server/hw/xfree86/common/xf86Globals.c index f5babbc49..04a96cbdc 100644 --- a/xorg-server/hw/xfree86/common/xf86Globals.c +++ b/xorg-server/hw/xfree86/common/xf86Globals.c @@ -47,10 +47,13 @@ /* Globals that video drivers may access */ /* Index into pScreen.devPrivates */ -DevPrivateKey xf86CreateRootWindowKey = &xf86CreateRootWindowKey; +static int xf86CreateRootWindowKeyIndex; +DevPrivateKey xf86CreateRootWindowKey = &xf86CreateRootWindowKeyIndex; /* Index of ScrnInfo in pScreen.devPrivates */ -_X_EXPORT DevPrivateKey xf86ScreenKey = &xf86ScreenKey; -_X_EXPORT DevPrivateKey xf86PixmapKey = &xf86PixmapKey; +static int xf86ScreenKeyIndex; +_X_EXPORT DevPrivateKey xf86ScreenKey = &xf86ScreenKeyIndex; +static int xf86PixmapKeyIndex; +_X_EXPORT DevPrivateKey xf86PixmapKey = &xf86PixmapKeyIndex; _X_EXPORT ScrnInfoPtr *xf86Screens = NULL; /* List of ScrnInfos */ _X_EXPORT const unsigned char byte_reversed[256] = { @@ -95,45 +98,46 @@ InputInfoPtr xf86InputDevs = NULL; /* Globals that video drivers may not access */ xf86InfoRec xf86Info = { - -1, /* consoleFd */ - -1, /* vtno */ - FALSE, /* vtSysreq */ - SKWhenNeeded, /* ddxSpecialKeys */ - NULL, /* pMouse */ -#ifdef XINPUT - NULL, /* mouseLocal */ -#endif - -1, /* lastEventTime */ - FALSE, /* vtRequestsPending */ - FALSE, /* inputPending */ - FALSE, /* dontVTSwitch */ - FALSE, /* dontZap */ - FALSE, /* dontZoom */ - FALSE, /* notrapSignals */ - FALSE, /* caughtSignal */ - FALSE, /* sharedMonitor */ - NULL, /* currentScreen */ + .consoleFd = -1, + .vtno = -1, + .vtSysreq = FALSE, + .ddxSpecialKeys = SKWhenNeeded, + .lastEventTime = -1, + .vtRequestsPending = FALSE, + .dontVTSwitch = FALSE, + .dontZap = FALSE, + .dontZoom = FALSE, + .notrapSignals = FALSE, + .caughtSignal = FALSE, + .currentScreen = NULL, #ifdef CSRG_BASED - -1, /* screenFd */ - -1, /* consType */ + .screenFd = -1, + .consType = -1, #endif - FALSE, /* allowMouseOpenFail */ - TRUE, /* vidModeEnabled */ - FALSE, /* vidModeAllowNonLocal */ - TRUE, /* miscModInDevEnabled */ - FALSE, /* miscModInDevAllowNonLocal */ - PCIOsConfig, /* pciFlags */ - Pix24DontCare, /* pixmap24 */ - X_DEFAULT, /* pix24From */ + .allowMouseOpenFail = FALSE, + .vidModeEnabled = TRUE, + .vidModeAllowNonLocal = FALSE, + .miscModInDevEnabled = TRUE, + .miscModInDevAllowNonLocal = FALSE, + .pixmap24 = Pix24DontCare, + .pix24From = X_DEFAULT, #ifdef __i386__ - FALSE, /* pc98 */ + .pc98 = FALSE, +#endif + .pmFlag = TRUE, + .log = LogNone, + .kbdCustomKeycodes = FALSE, + .disableRandR = FALSE, + .randRFrom = X_DEFAULT, +#ifdef CONFIG_HAL + .allowEmptyInput = TRUE, + .autoAddDevices = TRUE, + .autoEnableDevices = TRUE +#else + .allowEmptyInput = FALSE, + .autoAddDevices = FALSE, + .autoEnableDevices = FALSE #endif - TRUE, /* pmFlag */ - LogNone, /* syncLog */ - 0, /* estimateSizesAggressively */ - FALSE, /* kbdCustomKeycodes */ - FALSE, /* disableRandR */ - X_DEFAULT /* randRFrom */ }; const char *xf86ConfigFile = NULL; const char *xf86InputDeviceList = NULL; @@ -149,6 +153,7 @@ Bool xf86Resetting = FALSE; Bool xf86Initialising = FALSE; Bool xf86DoProbe = FALSE; Bool xf86DoConfigure = FALSE; +Bool xf86DoShowOptions = FALSE; Bool xf86DoModalias = FALSE; DriverPtr *xf86DriverList = NULL; int xf86NumDrivers = 0; @@ -168,11 +173,11 @@ const char *xf86VisualNames[] = { /* Parameters set only from the command line */ char *xf86ServerName = "no-name"; Bool xf86fpFlag = FALSE; -Bool xf86coFlag = FALSE; Bool xf86sFlag = FALSE; Bool xf86bsEnableFlag = FALSE; Bool xf86bsDisableFlag = FALSE; Bool xf86silkenMouseDisableFlag = FALSE; +Bool xf86xkbdirFlag = FALSE; #ifdef HAVE_ACPI Bool xf86acpiDisableFlag = FALSE; #endif @@ -189,17 +194,11 @@ int xf86Depth = -1; rgb xf86Weight = {0, 0, 0}; Bool xf86FlipPixels = FALSE; Gamma xf86Gamma = {0.0, 0.0, 0.0}; -Bool xf86ShowUnresolved = DEFAULT_UNRESOLVED; -Bool xf86BestRefresh = DEFAULT_BEST_REFRESH; Bool xf86AllowMouseOpenFail = FALSE; #ifdef XF86VIDMODE Bool xf86VidModeDisabled = FALSE; Bool xf86VidModeAllowNonLocal = FALSE; #endif -#ifdef XF86MISC -Bool xf86MiscModInDevDisabled = FALSE; -Bool xf86MiscModInDevAllowNonLocal = FALSE; -#endif RootWinPropPtr *xf86RegisteredPropertiesTable = NULL; _X_EXPORT Bool xf86inSuspend = FALSE; Bool xorgHWAccess = FALSE; diff --git a/xorg-server/hw/xfree86/common/xf86Helper.c b/xorg-server/hw/xfree86/common/xf86Helper.c index 282eb49f9..00df10574 100644 --- a/xorg-server/hw/xfree86/common/xf86Helper.c +++ b/xorg-server/hw/xfree86/common/xf86Helper.c @@ -60,7 +60,6 @@ #include "mivalidate.h" #include "xf86RAC.h" #include "xf86Bus.h" -#include "xf86Version.h" /* For xf86GetClocks */ #if defined(CSRG_BASED) || defined(__GNU__) @@ -357,11 +356,11 @@ xf86DeleteInput(InputInfoPtr pInp, int flags) if (pInp->drv) pInp->drv->refCount--; - /* This should *really* be handled in drv->UnInit(dev) call instead */ -#if 0 + /* This should *really* be handled in drv->UnInit(dev) call instead, but + * if the driver forgets about it make sure we free it or at least crash + * with flying colors */ if (pInp->private) xfree(pInp->private); -#endif /* Remove the entry from the list. */ if (pInp == xf86InputDevs) @@ -448,10 +447,6 @@ xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad) #define GLOBAL_DEFAULT_DEPTH 24 #endif -#ifndef GLOBAL_DEFAULT_FBBPP -#define GLOBAL_DEFAULT_FBBPP 32 -#endif - _X_EXPORT Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp, int depth24flags) @@ -529,7 +524,6 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp, if (depth > 0) scrp->depth = depth; } else { - scrp->bitsPerPixel = GLOBAL_DEFAULT_FBBPP; scrp->depth = GLOBAL_DEFAULT_DEPTH; } } @@ -1097,9 +1091,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable) WindowPtr pChild; Bool WasViewable = (Bool)(pWin->viewable); Bool anyMarked = FALSE; -#ifdef DO_SAVE_UNDERS - Bool dosave = FALSE; -#endif WindowPtr pLayerWin; BoxRec box; @@ -1169,12 +1160,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable) anyMarked = TRUE; } -#ifdef DO_SAVE_UNDERS - if (DO_SAVE_UNDERS(pWin)) - { - dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin); - } -#endif /* DO_SAVE_UNDERS */ if (anyMarked) (*pScreen->ValidateTree)(pWin, NullWindow, VTOther); @@ -1184,10 +1169,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable) { if (anyMarked) (*pScreen->HandleExposures)(pWin); -#ifdef DO_SAVE_UNDERS - if (dosave) - (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin); -#endif /* DO_SAVE_UNDERS */ if (anyMarked && pScreen->PostValidateTree) (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther); } @@ -1552,6 +1533,21 @@ xf86MatchDevice(const char *drivername, GDevPtr **sectlist) return i; } +static Bool +pciDeviceHasBars(struct pci_device *pci) +{ + int i; + + for (i = 0; i < 6; i++) + if (pci->regions[i].size) + return TRUE; + + if (pci->rom_size) + return TRUE; + + return FALSE; +} + struct Inst { struct pci_device * pci; GDevPtr dev; @@ -1687,8 +1683,8 @@ xf86MatchPciInstances(const char *driverName, int vendorID, if ( xf86DoConfigure && xf86DoConfigurePass1 ) { if (xf86CheckPciSlot(pPci)) { GDevPtr pGDev = - xf86AddDeviceToConfigure(drvp->driverName, - pPci, -1); + xf86AddBusDeviceToConfigure(drvp->driverName, + BUS_PCI, pPci, -1); if (pGDev) { /* After configure pass 1, chipID and chipRev * are treated as over-rides, so clobber them @@ -1806,7 +1802,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID, } if (devBus) dev = devBus; /* busID preferred */ if (!dev) { - if ( xf86CheckPciSlot( pPci ) ) { + if (xf86CheckPciSlot(pPci) && pciDeviceHasBars(pPci)) { xf86MsgVerb(X_WARNING, 0, "%s: No matching Device section " "for instance (BusID PCI:%u@%u:%u:%u) found\n", driverName, pPci->domain, pPci->bus, pPci->dev, @@ -1957,108 +1953,6 @@ xf86MatchPciInstances(const char *driverName, int vendorID, return numFound; } -_X_EXPORT int -xf86MatchIsaInstances(const char *driverName, SymTabPtr chipsets, - IsaChipsets *ISAchipsets, DriverPtr drvp, - FindIsaDevProc FindIsaDevice, GDevPtr *devList, - int numDevs, int **foundEntities) -{ - SymTabRec *c; - IsaChipsets *Chips; - int i; - int numFound = 0; - int foundChip = -1; - int *retEntities = NULL; - - *foundEntities = NULL; - -#if defined(__sparc__) || defined(__powerpc__) - FindIsaDevice = NULL; /* Temporary */ -#endif - - if (xf86DoProbe || (xf86DoConfigure && xf86DoConfigurePass1)) { - if (FindIsaDevice && - ((foundChip = (*FindIsaDevice)(NULL)) != -1)) { - xf86AddDeviceToConfigure(drvp->driverName, NULL, foundChip); - return 1; - } - return 0; - } - - for (i = 0; i < numDevs; i++) { - MessageType from = X_CONFIG; - GDevPtr dev = NULL; - GDevPtr devBus = NULL; - - if (devList[i]->busID && *devList[i]->busID) { - if (xf86ParseIsaBusString(devList[i]->busID)) { - if (devBus) xf86MsgVerb(X_WARNING,0, - "%s: More than one matching Device " - "section for ISA-Bus found: %s\n", - driverName,devList[i]->identifier); - else devBus = devList[i]; - } - } else { - if (xf86IsPrimaryIsa()) { - if (dev) xf86MsgVerb(X_WARNING,0, - "%s: More than one matching " - "Device section found: %s\n", - driverName,devList[i]->identifier); - else dev = devList[i]; - } - } - if (devBus) dev = devBus; - if (dev) { - if (dev->chipset) { - for (c = chipsets; c->token >= 0; c++) { - if (xf86NameCmp(c->name, dev->chipset) == 0) - break; - } - if (c->token == -1) { - xf86MsgVerb(X_WARNING, 0, "%s: Chipset \"%s\" in Device " - "section \"%s\" isn't valid for this driver\n", - driverName, dev->chipset, - dev->identifier); - } else - foundChip = c->token; - } else { - if (FindIsaDevice) foundChip = (*FindIsaDevice)(dev); - /* Probe it */ - from = X_PROBED; - } - } - - /* Check if the chip type is listed in the chipset table - for sanity*/ - - if (foundChip >= 0){ - for (Chips = ISAchipsets; Chips->numChipset >= 0; Chips++) { - if (Chips->numChipset == foundChip) - break; - } - if (Chips->numChipset == -1){ - foundChip = -1; - xf86MsgVerb(X_WARNING,0, - "%s: Driver detected unknown ISA-Bus Chipset\n", - driverName); - } - } - if (foundChip != -1) { - numFound++; - retEntities = xnfrealloc(retEntities,numFound * sizeof(int)); - retEntities[numFound - 1] = - xf86ClaimIsaSlot(drvp,foundChip,dev, dev->active ? TRUE : FALSE); - for (c = chipsets; c->token >= 0; c++) { - if (c->token == foundChip) - break; - } - xf86Msg(from, "Chipset %s found\n", c->name); - } - } - *foundEntities = retEntities; - - return numFound; -} - /* * xf86GetClocks -- get the dot-clocks via a BIG BAD hack ... */ @@ -2098,14 +1992,6 @@ xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc)(ScrnInfoPtr, int), cnt = 0; sync = 200000; - /* XXX How critical is this? */ - if (!xf86DisableInterrupts()) - { - (*ClockFunc)(pScrn, CLK_REG_RESTORE); - ErrorF("Failed to disable interrupts during clock probe. If\n"); - ErrorF("your OS does not support disabling interrupts, then you\n"); - FatalError("must specify a Clocks line in the XF86Config file.\n"); - } while ((inb(status) & maskval) == 0x00) if (sync-- == 0) goto finish; /* Something appears to be happening, so reset sync count */ @@ -2126,8 +2012,6 @@ xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc)(ScrnInfoPtr, int), } finish: - xf86EnableInterrupts(); - pScrn->clock[i] = cnt ? cnt : -1; if (BlankScreen) (*BlankScreen)(pScrn, TRUE); @@ -2338,12 +2222,6 @@ xf86DisableRandR() xf86Info.randRFrom = X_PROBED; } -_X_EXPORT CARD32 -xf86GetVersion() -{ - return XF86_VERSION_CURRENT; -} - _X_EXPORT CARD32 xf86GetModuleVersion(pointer module) { @@ -2567,49 +2445,6 @@ xf86FindXvOptions(int scrnIndex, int adaptor_index, char *port_name, #include "loader/os.c" /* new RAC */ -/* - * xf86ConfigIsa/PciEntity() -- These helper functions assign an - * active entity to a screen, registers its fixed resources, assign - * special enter/leave functions and their private scratch area to - * this entity, take the dog for a walk... - */ -_X_EXPORT ScrnInfoPtr -xf86ConfigIsaEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, - IsaChipsets *i_chip, resList res, EntityProc init, - EntityProc enter, EntityProc leave, pointer private) -{ - IsaChipsets *i_id; - EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex); - if (!pEnt) return pScrn; - - if (!(pEnt->location.type == BUS_ISA)) { - xfree(pEnt); - return pScrn; - } - - if (!pEnt->active) { - xf86ConfigIsaEntityInactive(pEnt, i_chip, res, init, enter, - leave, private); - xfree(pEnt); - return pScrn; - } - - if (!pScrn) - pScrn = xf86AllocateScreen(pEnt->driver,scrnFlag); - xf86AddEntityToScreen(pScrn,entityIndex); - - if (i_chip) { - for (i_id = i_chip; i_id->numChipset != -1; i_id++) { - if (pEnt->chipset == i_id->numChipset) break; - } - xf86ClaimFixedResources(i_id->resList,entityIndex); - } - xfree(pEnt); - xf86ClaimFixedResources(res,entityIndex); - xf86SetEntityFuncs(entityIndex,init,enter,leave,private); - - return pScrn; -} _X_EXPORT ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, @@ -2685,39 +2520,9 @@ xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, /* * - * OBSOLETE ! xf86ConfigActiveIsaEntity() and xf86ConfigActivePciEntity() - * are obsolete functions. They the are likely to be removed - * Don't use! + * OBSOLETE ! xf86ConfigActivePciEntity() is an obsolete functions. + * They the are likely to be removed. Don't use! */ -_X_EXPORT Bool -xf86ConfigActiveIsaEntity(ScrnInfoPtr pScrn, int entityIndex, - IsaChipsets *i_chip, resList res, EntityProc init, - EntityProc enter, EntityProc leave, pointer private) -{ - IsaChipsets *i_id; - EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex); - if (!pEnt) return FALSE; - - if (!pEnt->active || !(pEnt->location.type == BUS_ISA)) { - xfree(pEnt); - return FALSE; - } - - xf86AddEntityToScreen(pScrn,entityIndex); - - if (i_chip) { - for (i_id = i_chip; i_id->numChipset != -1; i_id++) { - if (pEnt->chipset == i_id->numChipset) break; - } - xf86ClaimFixedResources(i_id->resList,entityIndex); - } - xfree(pEnt); - xf86ClaimFixedResources(res,entityIndex); - if (!xf86SetEntityFuncs(entityIndex,init,enter,leave,private)) - return FALSE; - - return TRUE; -} _X_EXPORT Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, int entityIndex, @@ -2750,10 +2555,10 @@ xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, int entityIndex, } /* - * xf86ConfigPci/IsaEntityInactive() -- These functions can be used + * xf86ConfigPciEntityInactive() -- This functions can be used * to configure an inactive entity as well as to reconfigure an * previously active entity inactive. If the entity has been - * assigned to a screen before it will be removed. If p_pci(p_isa) is + * assigned to a screen before it will be removed. If p_pci is * non-NULL all static resources listed there will be registered. */ _X_EXPORT void @@ -2778,28 +2583,6 @@ xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets *p_chip, xf86SetEntityFuncs(pEnt->index,init,enter,leave,private); } -_X_EXPORT void -xf86ConfigIsaEntityInactive(EntityInfoPtr pEnt, IsaChipsets *i_chip, - resList res, EntityProc init, EntityProc enter, - EntityProc leave, pointer private) -{ - IsaChipsets *i_id; - ScrnInfoPtr pScrn; - - if ((pScrn = xf86FindScreenForEntity(pEnt->index))) - xf86RemoveEntityFromScreen(pScrn,pEnt->index); - else if (i_chip) { - for (i_id = i_chip; i_id->numChipset != -1; i_id++) { - if (pEnt->chipset == i_id->numChipset) break; - } - xf86ClaimFixedResources(i_id->resList,pEnt->index); - } - xf86ClaimFixedResources(res,pEnt->index); - /* shared resources are only needed when entity is active: remove */ - xf86DeallocateResourcesForEntity(pEnt->index, ResShared); - xf86SetEntityFuncs(pEnt->index,init,enter,leave,private); -} - void xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, EntityProc enter, EntityProc leave, pointer private) @@ -2939,21 +2722,7 @@ xf86MotionHistoryAllocate(LocalDevicePtr local) _X_EXPORT int xf86GetMotionEvents(DeviceIntPtr pDev, xTimecoord *buff, unsigned long start, - unsigned long stop, ScreenPtr pScreen) -{ - return GetMotionHistory(pDev, buff, start, stop, pScreen); -} - -_X_EXPORT void -xf86getsecs(long * secs, long * usecs) + unsigned long stop, ScreenPtr pScreen, BOOL core) { - struct timeval tv; - - X_GETTIMEOFDAY(&tv); - if (secs) - *secs = tv.tv_sec; - if (usecs) - *usecs= tv.tv_usec; - - return; + return GetMotionHistory(pDev, buff, start, stop, pScreen, core); } diff --git a/xorg-server/hw/xfree86/common/xf86InPriv.h b/xorg-server/hw/xfree86/common/xf86InPriv.h index 62e4820cb..3838d6940 100644 --- a/xorg-server/hw/xfree86/common/xf86InPriv.h +++ b/xorg-server/hw/xfree86/common/xf86InPriv.h @@ -38,7 +38,7 @@ extern InputDriverPtr *xf86InputDriverList; extern int xf86NumInputDrivers; /* xf86Xinput.c */ -void xf86ActivateDevice(InputInfoPtr pInfo); +int xf86ActivateDevice(InputInfoPtr pInfo); /* xf86Helper.c */ InputDriverPtr xf86LookupInputDriver(const char *name); diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c index fc50cafc7..f029915c6 100644 --- a/xorg-server/hw/xfree86/common/xf86Init.c +++ b/xorg-server/hw/xfree86/common/xf86Init.c @@ -71,12 +71,8 @@ #include "xf86Date.h" #include "xf86Build.h" #include "mipointer.h" -#ifdef XINPUT #include #include -#else -#include "inputstr.h" -#endif #include "xf86DDC.h" #include "xf86Xinput.h" #include "xf86InPriv.h" @@ -97,12 +93,6 @@ #include "xf86Bus.h" /* forward declarations */ - -static void xf86PrintBanner(void); -static void xf86PrintMarkers(void); -static void xf86PrintDefaultModulePath(void); -static void xf86PrintDefaultLibraryPath(void); - static Bool probe_devices_from_device_sections(DriverPtr drvp); static Bool add_matching_devices_to_configure_list(DriverPtr drvp); static Bool check_for_matching_devices(DriverPtr drvp); @@ -142,7 +132,7 @@ static Bool formatsDone = FALSE; #endif static void -xf86PrintBanner() +xf86PrintBanner(void) { #if PRE_RELEASE ErrorF("\n" @@ -249,13 +239,13 @@ xf86PrintBanner() } static void -xf86PrintMarkers() +xf86PrintMarkers(void) { LogPrintMarkers(); } static void -DoModalias() +DoModalias(void) { int i = -1; char **vlist; @@ -379,10 +369,10 @@ xf86CreateRootWindow(WindowPtr pWin) pProp->size, pProp->data, FALSE); } - + /* Look at err */ ret &= (err==Success); - + } else { xf86Msg(X_ERROR, "xf86CreateRootWindow unexpectedly called with " "non-root window %p (parent %p)\n", @@ -399,7 +389,7 @@ xf86CreateRootWindow(WindowPtr pWin) static void -PostConfigInit(void) +InstallSignalHandlers(void) { /* * Install signal handler for unexpected signals @@ -425,13 +415,6 @@ PostConfigInit(void) signal(SIGXFSZ,xf86SigHandler); #endif } - -#ifdef XF86PM - xf86OSPMClose = xf86OSPMOpen(); -#endif - - /* Do this after XF86Config is read (it's normally in OsInit()) */ - OsInitColors(); } @@ -459,7 +442,7 @@ probe_devices_from_device_sections(DriverPtr drvp) iter = pci_id_match_iterator_create(NULL); while ((pPci = pci_device_next(iter)) != NULL) { if (devList[i]->busID && *devList[i]->busID) { - if (xf86ComparePciBusString(devList[i]->busID, + if (xf86ComparePciBusString(devList[i]->busID, ((pPci->domain << 8) | pPci->bus), pPci->dev, @@ -506,7 +489,7 @@ probe_devices_from_device_sections(DriverPtr drvp) ErrorF("%s: card at %d:%d:%d is claimed by a Device section\n", drvp->driverName, pPci->bus, pPci->dev, pPci->func); #endif - + /* Allocate an entry in the lists to be returned */ entry = xf86ClaimPciSlot(pPci, drvp, device_id, devList[i], devList[i]->active); @@ -526,7 +509,7 @@ probe_devices_from_device_sections(DriverPtr drvp) } } } - + if (entry != -1) { if ((*drvp->PciProbe)(drvp, entry, pPci, devices[j].match_data)) { @@ -539,7 +522,7 @@ probe_devices_from_device_sections(DriverPtr drvp) } } - + return foundScreen; } @@ -565,8 +548,8 @@ add_matching_devices_to_configure_list(DriverPtr drvp) && ((devices[j].device_class_mask & pPci->device_class) == devices[j].device_class) ) { if (xf86CheckPciSlot(pPci)) { - GDevPtr pGDev = - xf86AddDeviceToConfigure(drvp->driverName, pPci, -1); + GDevPtr pGDev = xf86AddBusDeviceToConfigure( + drvp->driverName, BUS_PCI, pPci, -1); if (pGDev != NULL) { /* After configure pass 1, chipID and chipRev are * treated as over-rides, so clobber them here. @@ -600,11 +583,11 @@ check_for_matching_devices(DriverPtr drvp) for (j = 0; ! END_OF_MATCHES(devices[j]); j++) { struct pci_device_iterator *iter; struct pci_device *dev; - + iter = pci_id_match_iterator_create(& devices[j]); dev = pci_device_next(iter); pci_iterator_destroy(iter); - + if (dev != NULL) { return TRUE; } @@ -623,9 +606,9 @@ check_for_matching_devices(DriverPtr drvp) * is found, it is called. If \c DriverRec::PciProbe or no devices can be * successfully probed with it (e.g., only non-PCI devices are available), * the driver's \c DriverRec::Probe function is called. - * + * * \param drv Driver to probe - * + * * \return * If a device can be successfully probed by the driver, \c TRUE is * returned. Otherwise, \c FALSE is returned. @@ -653,13 +636,83 @@ xf86CallDriverProbe( DriverPtr drv, Bool detect_only ) if ( ! foundScreen && (drv->Probe != NULL) ) { xf86Msg( X_WARNING, "Falling back to old probe method for %s\n", drv->driverName ); - foundScreen = (*drv->Probe)( drv, (detect_only) ? PROBE_DETECT + foundScreen = (*drv->Probe)( drv, (detect_only) ? PROBE_DETECT : PROBE_DEFAULT ); } return foundScreen; } +static void +DoProbe(void) +{ + int i; + Bool probeResult; + Bool ioEnableFailed = FALSE; + + /* Find the list of video driver modules. */ + char **list = xf86DriverlistFromCompile(); + char **l; + + if (list) { + ErrorF("List of video driver modules:\n"); + for (l = list; *l; l++) + ErrorF("\t%s\n", *l); + } else { + ErrorF("No video driver modules found\n"); + } + + /* Load all the drivers that were found. */ + xf86LoadModules(list, NULL); + + /* Disable PCI devices */ + xf86AccessInit(); + + /* Call all of the probe functions, reporting the results. */ + for (i = 0; i < xf86NumDrivers; i++) { + DriverRec * const drv = xf86DriverList[i]; + + if (!xorgHWAccess) { + xorgHWFlags flags; + if (!drv->driverFunc + || !drv->driverFunc( NULL, GET_REQUIRED_HW_INTERFACES, &flags ) + || NEED_IO_ENABLED(flags)) { + if (ioEnableFailed) + continue; + if (!xf86EnableIO()) { + ioEnableFailed = TRUE; + continue; + } + xorgHWAccess = TRUE; + } + } + + + xf86MsgVerb(X_INFO, 3, "Probing in driver %s\n", drv->driverName); + + probeResult = xf86CallDriverProbe( drv, TRUE ); + if (!probeResult) { + xf86ErrorF("Probe in driver `%s' returns FALSE\n", + drv->driverName); + } else { + xf86ErrorF("Probe in driver `%s' returns TRUE\n", + drv->driverName); + + /* If we have a result, then call driver's Identify function */ + if (drv->Identify != NULL) { + const int verbose = xf86SetVerbosity(1); + (*drv->Identify)(0); + xf86SetVerbosity(verbose); + } + } + } + + OsCleanup(TRUE); + AbortDDX(); + fflush(stderr); + exit(0); +} + /* * InitOutput -- * Initialize screenInfo for all actually accessible framebuffers. @@ -677,7 +730,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) MessageType pix24From = X_DEFAULT; Bool pix24Fail = FALSE; Bool autoconfig = FALSE; - + GDevPtr configured_device; + xf86Initialising = TRUE; if (serverGeneration == 1) { @@ -703,7 +757,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) } /* Read and parse the config file */ - if (!xf86DoProbe && !xf86DoConfigure && !xf86DoModalias) { + if (!xf86DoProbe && !xf86DoConfigure && !xf86DoModalias && !xf86DoShowOptions) { switch (xf86HandleConfigFile(FALSE)) { case CONFIG_OK: break; @@ -716,8 +770,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) } } - if (!autoconfig) - PostConfigInit(); + InstallSignalHandlers(); /* Initialise the loader */ LoaderInit(); @@ -729,6 +782,9 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) LoaderSetOptions(LDR_OPT_ABI_MISMATCH_NONFATAL); } + if (xf86DoShowOptions) + DoShowOptions(); + xf86OpenConsole(); /* Do a general bus probe. This will be a PCI probe for x86 platforms */ @@ -749,9 +805,12 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) xf86Msg(X_ERROR, "Auto configuration failed\n"); return; } - PostConfigInit(); } +#ifdef XF86PM + xf86OSPMClose = xf86OSPMOpen(); +#endif + /* Initialise the resource broker */ xf86ResourceBrokerInit(); @@ -766,7 +825,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) /* If there aren't any specified in the config file, autoconfig them */ /* FIXME: Does not handle multiple active screen sections, but I'm not * sure if we really want to handle that case*/ - GDevPtr configured_device = xf86ConfigLayout.screens->screen->device; + configured_device = xf86ConfigLayout.screens->screen->device; if ((!configured_device) || (!configured_device->driver)) { if (!autoConfigDevice(configured_device)) { xf86Msg(X_ERROR, "Automatic driver configuration failed\n"); @@ -812,14 +871,10 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) for (i = 0; i < xf86NumDrivers; i++) { xorgHWFlags flags; - /* The Identify function is mandatory, but if it isn't there continue */ + if (xf86DriverList[i]->Identify != NULL) xf86DriverList[i]->Identify(0); - else { - xf86Msg(X_WARNING, "Driver `%s' has no Identify function\n", - xf86DriverList[i]->driverName ? xf86DriverList[i]->driverName - : "noname"); - } + if (!xorgHWAccess && (!xf86DriverList[i]->driverFunc || !xf86DriverList[i]->driverFunc(NULL, @@ -830,19 +885,16 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) } /* Enable full I/O access */ - if (xorgHWAccess) { - if(!xf86EnableIO()) - /* oops, we have failed */ - xorgHWAccess = FALSE; - } + if (xorgHWAccess) + xorgHWAccess = xf86EnableIO(); /* * Locate bus slot that had register IO enabled at server startup */ - - xf86AccessInit(); - xf86FindPrimaryDevice(); - + if (xorgHWAccess) { + xf86AccessInit(); + xf86FindPrimaryDevice(); + } /* * Now call each of the Probe functions. Each successful probe will * result in an extra entry added to the xf86Screens[] list for each @@ -856,7 +908,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) || !xf86DriverList[i]->driverFunc(NULL, GET_REQUIRED_HW_INTERFACES, &flags) - || NEED_IO_ENABLED(flags)) + || NEED_IO_ENABLED(flags)) continue; } @@ -892,7 +944,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) layout++) { Bool found = FALSE; for (j = 0; j < xf86Screens[i]->numEntities; j++) { - + GDevPtr dev = xf86GetDevFromEntity(xf86Screens[i]->entityList[j], xf86Screens[i]->entityInstanceList[j]); @@ -950,7 +1002,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) * Call the driver's PreInit()'s to complete initialisation for the first * generation. */ - + for (i = 0; i < xf86NumScreens; i++) { xf86EnableAccess(xf86Screens[i]); if (xf86Screens[i]->PreInit && @@ -960,7 +1012,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) for (i = 0; i < xf86NumScreens; i++) if (!xf86Screens[i]->configured) xf86DeleteScreen(i--, 0); - + /* * If no screens left, return now. */ @@ -971,46 +1023,14 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) return; } - /* This could be moved into a separate function */ - - /* - * Check that all screens have initialised the mandatory function - * entry points. Delete those which have not. - */ - -#define WARN_SCREEN(func) \ - xf86Msg(X_ERROR, "Driver `%s' has no %s function, deleting.\n", \ - xf86Screens[i]->name, (warned++, func)) - for (i = 0; i < xf86NumScreens; i++) { - int warned = 0; if (xf86Screens[i]->name == NULL) { - xf86Screens[i]->name = xnfalloc(strlen("screen") + 1 + 1); - if (i < 10) - sprintf(xf86Screens[i]->name, "screen%c", i + '0'); - else - sprintf(xf86Screens[i]->name, "screen%c", i - 10 + 'A'); + xf86Screens[i]->name = xnfalloc(strlen("screen") + 10 + 1); + sprintf(xf86Screens[i]->name, "screen%d", i); xf86MsgVerb(X_WARNING, 0, "Screen driver %d has no name set, using `%s'.\n", i, xf86Screens[i]->name); } - if (xf86Screens[i]->ScreenInit == NULL) - WARN_SCREEN("ScreenInit"); - if (xf86Screens[i]->EnterVT == NULL) - WARN_SCREEN("EnterVT"); - if (xf86Screens[i]->LeaveVT == NULL) - WARN_SCREEN("LeaveVT"); - if (warned) - xf86DeleteScreen(i--, 0); - } - - /* - * If no screens left, return now. - */ - - if (xf86NumScreens == 0) { - xf86Msg(X_ERROR, "Screen(s) found, but drivers were unusable.\n"); - return; } /* XXX Should this be before or after loading dependent modules? */ @@ -1121,12 +1141,12 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) FatalError("Unable to make VT property - out of memory. Exiting...\n"); } *VT = xf86Info.vtno; - + VTAtom = MakeAtom(VT_ATOM_NAME, sizeof(VT_ATOM_NAME) - 1, TRUE); for (i = 0, ret = Success; i < xf86NumScreens && ret == Success; i++) { ret = xf86RegisterRootWindowProperty(xf86Screens[i]->scrnIndex, - VTAtom, XA_INTEGER, 32, + VTAtom, XA_INTEGER, 32, 1, VT ); if (ret != Success) xf86DrvMsg(xf86Screens[i]->scrnIndex, X_WARNING, @@ -1143,14 +1163,9 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) } } -#ifdef XKB - xf86InitXkb(); -#endif /* set up the proper access funcs */ xf86PostPreInit(); - AddCallback(&ServerGrabCallback, xf86GrabServerCallback, NULL); - } else { /* * serverGeneration != 1; some OSs have to do things here, too. @@ -1174,34 +1189,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) xf86EnableIO(); } -#if 0 - /* - * Install signal handler for unexpected signals - */ - xf86Info.caughtSignal=FALSE; - if (!xf86Info.notrapSignals) - { - signal(SIGSEGV,xf86SigHandler); - signal(SIGILL,xf86SigHandler); -#ifdef SIGEMT - signal(SIGEMT,xf86SigHandler); -#endif - signal(SIGFPE,xf86SigHandler); -#ifdef SIGBUS - signal(SIGBUS,xf86SigHandler); -#endif -#ifdef SIGSYS - signal(SIGSYS,xf86SigHandler); -#endif -#ifdef SIGXCPU - signal(SIGXCPU,xf86SigHandler); -#endif -#ifdef SIGXFSZ - signal(SIGXFSZ,xf86SigHandler); -#endif - } -#endif - /* * Use the previously collected parts to setup pScreenInfo */ @@ -1215,7 +1202,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) pScreenInfo->formats[i] = formats[i]; /* Make sure the server's VT is active */ - + if (serverGeneration != 1) { xf86Resetting = TRUE; /* All screens are in the same state, so just check the first */ @@ -1225,7 +1212,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) #endif xf86AccessEnter(); xf86EnterServerState(SETUP); - } + } } #ifdef SCO325 else { @@ -1242,8 +1229,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) } #endif /* SCO325 */ - for (i = 0; i < xf86NumScreens; i++) { - xf86EnableAccess(xf86Screens[i]); + for (i = 0; i < xf86NumScreens; i++) { + xf86EnableAccess(xf86Screens[i]); /* * Almost everything uses these defaults, and many of those that * don't, will wrap them. @@ -1251,7 +1238,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) xf86Screens[i]->EnableDisableFBAccess = xf86EnableDisableFBAccess; xf86Screens[i]->SetDGAMode = xf86SetDGAMode; xf86Screens[i]->DPMSSet = NULL; - xf86Screens[i]->LoadPalette = NULL; + xf86Screens[i]->LoadPalette = NULL; xf86Screens[i]->SetOverscan = NULL; xf86Screens[i]->DriverFunc = NULL; xf86Screens[i]->pScreen = NULL; @@ -1286,7 +1273,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) #ifdef RENDER if (PictureGetSubpixelOrder (xf86Screens[i]->pScreen) == SubPixelUnknown) { - xf86MonPtr DDC = (xf86MonPtr)(xf86Screens[i]->monitor->DDC); + xf86MonPtr DDC = (xf86MonPtr)(xf86Screens[i]->monitor->DDC); PictureSetSubpixelOrder (xf86Screens[i]->pScreen, DDC ? (DDC->features.input_type ? @@ -1320,15 +1307,15 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput(argc, argv) - int argc; - char **argv; + int argc; + char **argv; { IDevPtr* pDev; - InputDriverPtr pDrv; - InputInfoPtr pInfo; + DeviceIntPtr dev; xf86Info.vtRequestsPending = FALSE; - xf86Info.inputPending = FALSE; + + mieqInit(); /* Call the PreInit function for each input device instance. */ for (pDev = xf86ConfigLayout.inputs; pDev && *pDev; pDev++) { @@ -1337,51 +1324,18 @@ InitInput(argc, argv) strcpy((*pDev)->driver, "kbd"); } - if ((pDrv = xf86LookupInputDriver((*pDev)->driver)) == NULL) { - xf86Msg(X_ERROR, "No Input driver matching `%s'\n", (*pDev)->driver); - /* XXX For now, just continue. */ - continue; - } - if (!pDrv->PreInit) { - xf86MsgVerb(X_WARNING, 0, - "Input driver `%s' has no PreInit function (ignoring)\n", - pDrv->driverName); - continue; - } - pInfo = pDrv->PreInit(pDrv, *pDev, 0); - if (!pInfo) { - xf86Msg(X_ERROR, "PreInit returned NULL for \"%s\"\n", - (*pDev)->identifier); - continue; - } else if (!(pInfo->flags & XI86_CONFIGURED)) { - xf86Msg(X_ERROR, "PreInit failed for input device \"%s\"\n", - (*pDev)->identifier); - xf86DeleteInput(pInfo, 0); - continue; - } - } - - /* Initialise all input devices. */ - pInfo = xf86InputDevs; - while (pInfo) { - xf86Msg(X_INFO, "evaluating device (%s)\n", pInfo->name); - xf86ActivateDevice(pInfo); - pInfo = pInfo->next; + /* If one fails, the others will too */ + if (xf86NewInputDevice(*pDev, &dev, TRUE) == BadAlloc) + break; } - - mieqInit(); } -#ifndef SET_STDERR_NONBLOCKING -#define SET_STDERR_NONBLOCKING 1 -#endif - /* * OsVendorInit -- * OS/Vendor-specific initialisations. Called from OsInit(), which * is called by dix before establishing the well known sockets. */ - + void OsVendorInit() { @@ -1390,15 +1344,10 @@ OsVendorInit() #ifdef SIGCHLD signal(SIGCHLD, SIG_DFL); /* Need to wait for child processes */ #endif - OsDelayInitColors = TRUE; -#ifndef BUILTIN_FONTS - loadableFonts = TRUE; -#endif if (!beenHere) xf86LogInit(); -#if SET_STDERR_NONBLOCKING /* Set stderr to non-blocking. */ #ifndef O_NONBLOCK #if defined(FNDELAY) @@ -1406,7 +1355,6 @@ OsVendorInit() #elif defined(O_NDELAY) #define O_NONBLOCK O_NDELAY #endif -#endif #ifdef O_NONBLOCK if (!beenHere) { @@ -1456,9 +1404,6 @@ ddxGiveUp() xf86Screens[i]->busAccess = NULL; } -#ifdef USE_XF86_SERVERLOCK - xf86UnlockServer(); -#endif #ifdef XFreeXDGA DGAShutdown(); #endif @@ -1507,9 +1452,9 @@ AbortDDX() (xf86Screens[i]->LeaveVT)(i, 0); } } - + xf86AccessLeave(); - + /* * This is needed for an abnormal server exit, since the normal exit stuff * MUST also be performed (i.e. the vt must be left in a defined state) @@ -1553,6 +1498,18 @@ xf86SetLogVerbosity(int verb) return save; } +static void +xf86PrintDefaultModulePath(void) +{ + ErrorF("%s\n", DEFAULT_MODULE_PATH); +} + +static void +xf86PrintDefaultLibraryPath(void) +{ + ErrorF("%s\n", DEFAULT_LIBRARY_PATH); +} + /* * ddxProcessArgument -- * Process device-dependent command line args. Returns 0 if argument is @@ -1561,8 +1518,6 @@ xf86SetLogVerbosity(int verb) * */ - - /* ARGSUSED */ int ddxProcessArgument(int argc, char **argv, int i) @@ -1578,7 +1533,7 @@ ddxProcessArgument(int argc, char **argv, int i) UseMsg(); \ FatalError("Required argument to %s not specified\n", argv[i]); \ } - + /* First the options that are only allowed for root */ if (getuid() == 0 || geteuid() != 0) { @@ -1622,11 +1577,6 @@ ddxProcessArgument(int argc, char **argv, int i) xf86ConfigFile = argv[i + 1]; return 2; } - if (!strcmp(argv[i],"-showunresolved")) - { - xf86ShowUnresolved = TRUE; - return 1; - } if (!strcmp(argv[i],"-probeonly")) { xf86ProbeOnly = TRUE; @@ -1648,29 +1598,12 @@ ddxProcessArgument(int argc, char **argv, int i) xf86VidModeAllowNonLocal = TRUE; return 1; } -#endif -#ifdef XF86MISC - if (!strcmp(argv[i],"-disableModInDev")) - { - xf86MiscModInDevDisabled = TRUE; - return 1; - } - if (!strcmp(argv[i],"-allowNonLocalModInDev")) - { - xf86MiscModInDevAllowNonLocal = TRUE; - return 1; - } #endif if (!strcmp(argv[i],"-allowMouseOpenFail")) { xf86AllowMouseOpenFail = TRUE; return 1; } - if (!strcmp(argv[i],"-bestRefresh")) - { - xf86BestRefresh = TRUE; - return 1; - } if (!strcmp(argv[i],"-ignoreABI")) { LoaderSetOptions(LDR_OPT_ABI_MISMATCH_NONFATAL); @@ -1734,12 +1667,6 @@ ddxProcessArgument(int argc, char **argv, int i) xf86fpFlag = TRUE; return 0; } - /* Notice the -co flag, but allow it to pass to the dix layer */ - if (!strcmp(argv[i], "-co")) - { - xf86coFlag = TRUE; - return 0; - } /* Notice the -bs flag, but allow it to pass to the dix layer */ if (!strcmp(argv[i], "-bs")) { @@ -1815,11 +1742,11 @@ ddxProcessArgument(int argc, char **argv, int i) return 0; } } - if (!strcmp(argv[i], "-gamma") || !strcmp(argv[i], "-rgamma") || + if (!strcmp(argv[i], "-gamma") || !strcmp(argv[i], "-rgamma") || !strcmp(argv[i], "-ggamma") || !strcmp(argv[i], "-bgamma")) { double gamma; - CHECK_FOR_REQUIRED_ARGUMENT(); + CHECK_FOR_REQUIRED_ARGUMENT(); if (sscanf(argv[++i], "%lf", &gamma) == 1) { if (gamma < GAMMA_MIN || gamma > GAMMA_MAX) { ErrorF("gamma out of range, only %.2f <= gamma_value <= %.1f" @@ -1854,7 +1781,7 @@ ddxProcessArgument(int argc, char **argv, int i) } if (!strcmp(argv[i], "-keyboard")) { - CHECK_FOR_REQUIRED_ARGUMENT(); + CHECK_FOR_REQUIRED_ARGUMENT(); xf86KeyboardName = argv[++i]; return 2; } @@ -1891,6 +1818,15 @@ ddxProcessArgument(int argc, char **argv, int i) xf86AllowMouseOpenFail = TRUE; return 1; } + if (!strcmp(argv[i], "-showopts")) + { + if (getuid() != 0 && geteuid() == 0) { + ErrorF("The '-showopts' option can only be used by root.\n"); + exit(1); + } + xf86DoShowOptions = TRUE; + return 1; + } if (!strcmp(argv[i], "-isolateDevice")) { int bus, device, func; @@ -1908,15 +1844,17 @@ ddxProcessArgument(int argc, char **argv, int i) FatalError("Invalid isolated device specification\n"); } } + /* Notice cmdline xkbdir, but pass to dix as well */ + if (!strcmp(argv[i], "-xkbdir")) + { + xf86xkbdirFlag = TRUE; + return 0; + } + /* OS-specific processing */ return xf86ProcessArgument(argc, argv, i); } -/* ddxInitGlobals - called by |InitGlobals| from os/util.c */ -void ddxInitGlobals(void) -{ -} - /* * ddxUseMsg -- * Print out correct use of device dependent commandline options. @@ -1934,6 +1872,7 @@ ddxUseMsg() ErrorF("-modulepath paths specify the module search path\n"); ErrorF("-logfile file specify a log file name\n"); ErrorF("-configure probe for devices and write an "__XCONFIGFILE__"\n"); + ErrorF("-showopts print available options for all installed drivers\n"); } ErrorF("-modalias output a modalias-style filter for each driver installed\n"); ErrorF("-config file specify a configuration file, relative to the\n"); @@ -1961,13 +1900,7 @@ ddxUseMsg() ErrorF("-disableVidMode disable mode adjustments with xvidtune\n"); ErrorF("-allowNonLocalXvidtune allow xvidtune to be run as a non-local client\n"); #endif -#ifdef XF86MISC - ErrorF("-disableModInDev disable dynamic modification of input device settings\n"); - ErrorF("-allowNonLocalModInDev allow changes to keyboard and mouse settings\n"); - ErrorF(" from non-local clients\n"); ErrorF("-allowMouseOpenFail start server even if the mouse can't be initialized\n"); -#endif - ErrorF("-bestRefresh choose modes with the best refresh rate\n"); ErrorF("-ignoreABI make module ABI mismatches non-fatal\n"); ErrorF("-isolateDevice bus_id restrict device resets to bus_id (PCI only)\n"); ErrorF("-version show the server version\n"); @@ -1978,21 +1911,10 @@ ddxUseMsg() ErrorF("\n"); } -static void -xf86PrintDefaultModulePath(void) -{ - ErrorF("%s\n", DEFAULT_MODULE_PATH); -} - -static void -xf86PrintDefaultLibraryPath(void) -{ - ErrorF("%s\n", DEFAULT_LIBRARY_PATH); -} /* * xf86LoadModules iterates over a list that is being passed in. - */ + */ Bool xf86LoadModules(char **list, pointer *optlist) { @@ -2063,7 +1985,7 @@ xf86GetPixFormat(ScrnInfoPtr pScrn, int depth) return &format; } } - + for (i = 0; i < numFormats; i++) if (formats[i].depth == depth) break; @@ -2085,11 +2007,10 @@ xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth) { PixmapFormatPtr format; - + format = xf86GetPixFormat(pScrn, depth); if (format) return format->bitsPerPixel; else return 0; } - diff --git a/xorg-server/hw/xfree86/common/xf86MiscExt.c b/xorg-server/hw/xfree86/common/xf86MiscExt.c deleted file mode 100644 index 40c196a3e..000000000 --- a/xorg-server/hw/xfree86/common/xf86MiscExt.c +++ /dev/null @@ -1,561 +0,0 @@ -/* - * Copyright (c) 1999-2003 by The XFree86 Project, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the copyright holder(s) - * and author(s) shall not be used in advertising or otherwise to promote - * the sale, use or other dealings in this Software without prior written - * authorization from the copyright holder(s) and author(s). - */ - -/* - * This file contains the Pointer/Keyboard functions needed by the - * XFree86-Misc extension. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include "os.h" -#include "xf86.h" -#include "xf86Priv.h" - -#ifdef XF86MISC -#define _XF86MISC_SERVER_ -#include -#include "xf86miscproc.h" -#endif - -#define XF86_OS_PRIVS -#include "xf86_OSlib.h" - -#ifdef XINPUT -#include -#include -#include "xf86Xinput.h" -#else -#include "inputstr.h" -#endif - -#include "xf86OSmouse.h" - -#ifdef DEBUG -# define DEBUG_P(x) ErrorF(x"\n"); -#else -# define DEBUG_P(x) /**/ -#endif - -#ifdef XF86MISC - -typedef struct { - int type; - int baudrate; - int samplerate; - int resolution; - int buttons; - Bool em3buttons; - int em3timeout; - Bool chordmiddle; - int flags; - char* device; - pointer private; -} mseParamsRec, *mseParamsPtr; - -typedef struct { - int type; - int rate; - int delay; - int serverNumLock; /* obsolete */ - pointer private; -} kbdParamsRec, *kbdParamsPtr; - -/* - Sigh... - - The extension should probably be changed to use protocol - names instead of ID numbers -*/ -static struct mouse_map { - int mtype; - MouseProtocolID proto; -} m_map[] = -{ - { MTYPE_MICROSOFT, PROT_MS }, - { MTYPE_MOUSESYS, PROT_MSC }, - { MTYPE_MMSERIES, PROT_MM }, - { MTYPE_LOGITECH, PROT_LOGI }, - { MTYPE_LOGIMAN, PROT_LOGIMAN }, - { MTYPE_MMHIT, PROT_MMHIT }, - { MTYPE_GLIDEPOINT, PROT_GLIDE }, - { MTYPE_IMSERIAL, PROT_IMSERIAL }, - { MTYPE_THINKING, PROT_THINKING }, - { MTYPE_ACECAD, PROT_ACECAD }, - { MTYPE_PS_2, PROT_PS2 }, - { MTYPE_IMPS2, PROT_IMPS2 }, - { MTYPE_EXPPS2, PROT_EXPPS2 }, - { MTYPE_THINKINGPS2, PROT_THINKPS2 }, - { MTYPE_MMANPLUSPS2, PROT_MMPS2 }, - { MTYPE_GLIDEPOINTPS2, PROT_GLIDEPS2 }, - { MTYPE_NETPS2, PROT_NETPS2 }, - { MTYPE_NETSCROLLPS2, PROT_NETSCPS2 }, - { MTYPE_BUSMOUSE, PROT_BM }, - { MTYPE_AUTOMOUSE, PROT_AUTO }, - { MTYPE_SYSMOUSE, PROT_SYSMOUSE }, - { MTYPE_UNKNOWN, PROT_UNKNOWN } -}; - -static int -MapMseProtoToMisc(MouseProtocolID proto) -{ - int i; - - for (i = 0; m_map[i].proto != PROT_UNKNOWN; i++) - if (proto == m_map[i].proto) - return m_map[i].mtype; - - return MTYPE_UNKNOWN; -} - -static MouseProtocolID -MapMseMiscToProto(int proto) -{ - int i; - - for (i = 0; m_map[i].mtype != MTYPE_UNKNOWN; i++) - if (proto == m_map[i].mtype) - return m_map[i].proto; - - return PROT_UNKNOWN; -} - -_X_EXPORT Bool -MiscExtGetMouseSettings(pointer *mouse, char **devname) -{ - mseParamsPtr mseptr; - - mseptr = MiscExtCreateStruct(MISC_POINTER); - if (!mseptr) - return FALSE; - - { - InputInfoPtr pInfo = mseptr->private; - MouseDevPtr pMse; - - *devname = xf86FindOptionValue(pInfo->options, "Device"); - pMse = pInfo->private; - - mseptr->type = MapMseProtoToMisc(pMse->protocolID); - mseptr->baudrate = pMse->baudRate; - mseptr->samplerate = pMse->sampleRate; - mseptr->resolution = pMse->resolution; - mseptr->buttons = pMse->buttons; - mseptr->em3buttons = pMse->emulate3Buttons; - mseptr->em3timeout = pMse->emulate3Timeout; - mseptr->chordmiddle = pMse->chordMiddle; - mseptr->flags = pMse->mouseFlags; - } - *mouse = mseptr; - return TRUE; -} - -_X_EXPORT int -MiscExtGetMouseValue(pointer mouse, MiscExtMseValType valtype) -{ - mseParamsPtr mse = mouse; - - switch (valtype) { - case MISC_MSE_PROTO: return mse->type; - case MISC_MSE_BAUDRATE: return mse->baudrate; - case MISC_MSE_SAMPLERATE: return mse->samplerate; - case MISC_MSE_RESOLUTION: return mse->resolution; - case MISC_MSE_BUTTONS: return mse->buttons; - case MISC_MSE_EM3BUTTONS: return mse->em3buttons; - case MISC_MSE_EM3TIMEOUT: return mse->em3timeout; - case MISC_MSE_CHORDMIDDLE: return mse->chordmiddle; - case MISC_MSE_FLAGS: return mse->flags; - } - return 0; -} - -_X_EXPORT Bool -MiscExtSetMouseValue(pointer mouse, MiscExtMseValType valtype, int value) -{ - mseParamsPtr mse = mouse; - - switch (valtype) { - case MISC_MSE_PROTO: - mse->type = value; - return TRUE; - case MISC_MSE_BAUDRATE: - mse->baudrate = value; - return TRUE; - case MISC_MSE_SAMPLERATE: - mse->samplerate = value; - return TRUE; - case MISC_MSE_RESOLUTION: - mse->resolution = value; - return TRUE; - case MISC_MSE_BUTTONS: - mse->buttons = value; - return TRUE; - case MISC_MSE_EM3BUTTONS: - mse->em3buttons = value; - return TRUE; - case MISC_MSE_EM3TIMEOUT: - mse->em3timeout = value; - return TRUE; - case MISC_MSE_CHORDMIDDLE: - mse->chordmiddle = value; - return TRUE; - case MISC_MSE_FLAGS: - mse->flags = value; - return TRUE; - } - return FALSE; -} - -_X_EXPORT Bool -MiscExtSetMouseDevice(pointer mouse, char* device) -{ - mseParamsPtr mse = mouse; - mse->device = device; - - return TRUE; -} - -_X_EXPORT Bool -MiscExtGetKbdSettings(pointer *kbd) -{ - return FALSE; -} - -_X_EXPORT int -MiscExtGetKbdValue(pointer keyboard, MiscExtKbdValType valtype) -{ - return 0; -} - -_X_EXPORT Bool -MiscExtSetKbdValue(pointer keyboard, MiscExtKbdValType valtype, int value) -{ - return FALSE; -} - -static void -MiscExtClientStateCallback(CallbackListPtr *callbacks, - pointer data, pointer args) -{ - NewClientInfoRec *clientinfo = (NewClientInfoRec*)args; - - if (clientinfo->client == xf86Info.grabInfo.override && - clientinfo->client->clientState == ClientStateGone) { - xf86Info.grabInfo.override = NULL; - xf86Info.grabInfo.disabled = 0; - DeleteCallback(&ClientStateCallback, MiscExtClientStateCallback, NULL); - } -} - -#define MiscExtGrabStateSuccess 0 /* No errors */ -#define MiscExtGrabStateLocked 1 /* A client already requested that - * grabs cannot be removed/killed */ -#define MiscExtGrabStateAlready 2 /* Request for enabling/disabling - * grab removeal/kill already done */ -_X_EXPORT int -MiscExtSetGrabKeysState(ClientPtr client, int state) -{ - if (xf86Info.grabInfo.override == NULL || - xf86Info.grabInfo.override == client) { - if (state == 0 && xf86Info.grabInfo.disabled == 0) { - xf86Info.grabInfo.disabled = 1; - AddCallback(&ClientStateCallback, - MiscExtClientStateCallback, NULL); - xf86Info.grabInfo.override = client; - } - else if (state == 1 && xf86Info.grabInfo.disabled == 1) { - xf86Info.grabInfo.disabled = 0; - DeleteCallback(&ClientStateCallback, - MiscExtClientStateCallback, NULL); - xf86Info.grabInfo.override = NULL; - } - else - return MiscExtGrabStateAlready; - - return MiscExtGrabStateSuccess; - } - - return MiscExtGrabStateLocked; -} - -_X_EXPORT pointer -MiscExtCreateStruct(MiscExtStructType mse_or_kbd) -{ - switch (mse_or_kbd) { - case MISC_POINTER: - { - mseParamsPtr mseptr; - InputInfoPtr pInfo = xf86InputDevs; - - while (pInfo) { - if (pInfo->dev == inputInfo.pointer) - break; - pInfo = pInfo->next; - } - if (!pInfo) - return NULL; - - mseptr = xcalloc(sizeof(mseParamsRec),1); - if (mseptr) - mseptr->private = pInfo; - return mseptr; - } - case MISC_KEYBOARD: - return xcalloc(sizeof(kbdParamsRec),1); - } - return 0; -} - -_X_EXPORT void -MiscExtDestroyStruct(pointer structure, MiscExtStructType mse_or_kbd) -{ - switch (mse_or_kbd) { - case MISC_POINTER: - case MISC_KEYBOARD: - xfree(structure); - } -} - -static Bool -MiscExtAuthorizeDevice(InputInfoPtr pInfo, char *device) -{ - Bool authorized = FALSE; - char *elem; - struct stat dev, dev_list; - const char *olddev = xf86FindOptionValue(pInfo->options, "Device"); - - if (stat(device,&dev)) - return FALSE; - - if (!S_ISCHR(dev.st_mode)) - return FALSE; - - if (!stat(olddev,&dev_list)) { - if (dev_list.st_dev == dev.st_dev - && dev_list.st_ino == dev.st_ino) { - authorized = TRUE; - } - } - - if (!authorized) { - char *path; - - if (!xf86InputDeviceList - || (path = strdup(xf86InputDeviceList)) == NULL) - return FALSE; - - elem = strtok(path,","); - - while (elem) { - - if (!stat(elem,&dev_list)) { - if (dev_list.st_dev == dev.st_dev - && dev_list.st_ino == dev.st_ino) { - authorized = TRUE; - break; - - } - } - elem = strtok(NULL,","); - } - xfree(path); - } -#if 0 - ErrorF("AUTHORIZED: %s\n",authorized?"Yes":"No"); -#endif - return (authorized); -} - -_X_EXPORT MiscExtReturn -MiscExtApply(pointer structure, MiscExtStructType mse_or_kbd) -{ - if (mse_or_kbd == MISC_POINTER) { - Bool protoChanged = FALSE; - int oldflags; - Bool reopen = FALSE; - MouseProtocolID newProtocol; - mseParamsPtr mse = structure; - InputInfoPtr pInfo; - MouseDevPtr pMse; - pointer xf86MouseProtocolIDToName - = LoaderSymbol("xf86MouseProtocolIDToName"); - if (!xf86MouseProtocolIDToName) - return MISC_RET_NOMODULE; - if (mse->type < MTYPE_MICROSOFT - || (mse->type > MTYPE_EXPPS2 - && (mse->type != MTYPE_OSMOUSE))) - return MISC_RET_BADMSEPROTO; -#ifdef OSMOUSE_ONLY - if (mse->type != MTYPE_OSMOUSE) - return MISC_RET_BADMSEPROTO; -#else - if (mse->type == MTYPE_OSMOUSE) - return MISC_RET_BADMSEPROTO; -#endif /* OSMOUSE_ONLY */ - - if (mse->em3timeout < 0) - return MISC_RET_BADVAL; - - if (mse->type == MTYPE_LOGIMAN - && !(mse->baudrate == 0 - || mse->baudrate == 1200 - || mse->baudrate == 9600)) - return MISC_RET_BADBAUDRATE; - if (mse->type == MTYPE_LOGIMAN && mse->samplerate) - return MISC_RET_BADCOMBO; - - if (mse->flags & MF_REOPEN) { - reopen = TRUE; - mse->flags &= ~MF_REOPEN; - } - if (mse->type != MTYPE_OSMOUSE - && mse->type != MTYPE_PS_2 - && mse->type != MTYPE_BUSMOUSE - && mse->type != MTYPE_IMPS2 - && mse->type != MTYPE_THINKINGPS2 - && mse->type != MTYPE_MMANPLUSPS2 - && mse->type != MTYPE_GLIDEPOINTPS2 - && mse->type != MTYPE_NETPS2 - && mse->type != MTYPE_NETSCROLLPS2 - && mse->type != MTYPE_SYSMOUSE) - { - if (mse->baudrate % 1200 != 0 - || (mse->baudrate != 0 && mse->baudrate < 1200) - || mse->baudrate > 9600) - return MISC_RET_BADBAUDRATE; - } - if ((mse->flags & (MF_CLEAR_DTR|MF_CLEAR_RTS)) - && (mse->type != MTYPE_MOUSESYS)) - return MISC_RET_BADFLAGS; - - if (mse->type != MTYPE_OSMOUSE - && mse->type != MTYPE_BUSMOUSE) - { - if (mse->samplerate < 0) - return MISC_RET_BADVAL; - } - - if (mse->resolution < 0) - return MISC_RET_BADVAL; - if (mse->chordmiddle) - { - if (mse->em3buttons || !(mse->type == MTYPE_MICROSOFT - || mse->type == MTYPE_LOGIMAN) ) - return MISC_RET_BADCOMBO; - } - - /* XXX - This still needs work */ - - pInfo = mse->private; - pMse = pInfo->private; - oldflags = pMse->mouseFlags; - - newProtocol = MapMseMiscToProto(mse->type); - protoChanged = pMse->protocolID != newProtocol; - if (protoChanged - || pMse->baudRate != mse->baudrate - || pMse->sampleRate != mse->samplerate - || pMse->resolution != mse->resolution - || pMse->mouseFlags != mse->flags) - reopen = TRUE; - - if (mse->device) - reopen = TRUE; - - if (reopen) - (pMse->device->deviceProc)(pMse->device, DEVICE_CLOSE); - - pMse->protocolID = newProtocol; - pMse->baudRate = mse->baudrate; - pMse->sampleRate = mse->samplerate; - pMse->resolution = mse->resolution; - pMse->buttons = mse->buttons; - pMse->emulate3Buttons = mse->em3buttons; - pMse->emulate3Timeout = mse->em3timeout; - pMse->chordMiddle = mse->chordmiddle; - pMse->mouseFlags = mse->flags; - - pMse->protocol = ((const char *(*)(MouseProtocolID)) - xf86MouseProtocolIDToName)(pMse->protocolID); - - if (mse->device) { - if (MiscExtAuthorizeDevice(pInfo, mse->device)) { - xf86ReplaceStrOption(pInfo->options, "Device", mse->device); - } else { - return MISC_RET_BADVAL; - } - } - - if (reopen) { - /* Only if protocol is changed explicitely disable auto detect */ - if (protoChanged) - pMse->autoProbe = FALSE; - (pMse->device->deviceProc)(pMse->device, DEVICE_ON); - } - /* Set pInfo->options too */ - - if ((oldflags & MF_CLEAR_DTR) != (pMse->mouseFlags & MF_CLEAR_DTR)) - xf86ReplaceBoolOption(pInfo->options, "ClearDTR", - pMse->mouseFlags | MF_CLEAR_DTR); - if ((oldflags & MF_CLEAR_RTS) != (pMse->mouseFlags & MF_CLEAR_RTS)) - xf86ReplaceBoolOption(pInfo->options, "ClearRTS", - pMse->mouseFlags | MF_CLEAR_RTS); - } - return MISC_RET_BADVAL; -} - -_X_EXPORT Bool -MiscExtGetFilePaths(const char **configfile, const char **modulepath, - const char **logfile) -{ - *configfile = xf86ConfigFile; - *modulepath = xf86ModulePath; - *logfile = xf86LogFile; - - return TRUE; -} - -_X_EXPORT int -MiscExtPassMessage(int scrnIndex, const char *msgtype, const char *msgval, - char **retstr) -{ - ScrnInfoPtr pScr = xf86Screens[scrnIndex]; - - /* should check this in the protocol, but xf86NumScreens isn't exported */ - if (scrnIndex >= xf86NumScreens) - return BadValue; - - if (*pScr->HandleMessage == NULL) - return BadImplementation; - return (*pScr->HandleMessage)(scrnIndex, msgtype, msgval, retstr); -} - -#endif /* XF86MISC */ - diff --git a/xorg-server/hw/xfree86/common/xf86Mode.c b/xorg-server/hw/xfree86/common/xf86Mode.c index c1b0a5fc9..24a431dc5 100644 --- a/xorg-server/hw/xfree86/common/xf86Mode.c +++ b/xorg-server/hw/xfree86/common/xf86Mode.c @@ -39,6 +39,7 @@ #endif #include +#include "xf86Modes.h" #include "os.h" #include "servermd.h" #include "mibank.h" @@ -705,16 +706,9 @@ xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor) * -- libv */ - /* Is the horizontal blanking a bit lowish? */ - if (((mode->HDisplay * 5 / 4) & ~0x07) > mode->HTotal) { - /* is this a cvt -r mode, and only a cvt -r mode? */ - if (((mode->HTotal - mode->HDisplay) == 160) && - ((mode->HSyncEnd - mode->HDisplay) == 80) && - ((mode->HSyncEnd - mode->HSyncStart) == 32) && - ((mode->VSyncStart - mode->VDisplay) == 3)) { - if (!monitor->reducedblanking && !(mode->type & M_T_DRIVER)) - return MODE_NO_REDUCED; - } + if (xf86ModeIsReduced(mode)) { + if (!monitor->reducedblanking && !(mode->type & M_T_DRIVER)) + return MODE_NO_REDUCED; } if ((monitor->maxPixClock) && (mode->Clock > monitor->maxPixClock)) diff --git a/xorg-server/hw/xfree86/common/xf86Module.h b/xorg-server/hw/xfree86/common/xf86Module.h index 5ce6e8a26..81011e163 100644 --- a/xorg-server/hw/xfree86/common/xf86Module.h +++ b/xorg-server/hw/xfree86/common/xf86Module.h @@ -42,7 +42,6 @@ #define _XF86MODULE_H #include "misc.h" -#include "xf86Version.h" #ifndef NULL #define NULL ((void *)0) #endif @@ -83,9 +82,9 @@ typedef enum { * mask is 0xFFFF0000. */ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) -#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(4, 1) -#define ABI_XINPUT_VERSION SET_ABI_VERSION(2, 1) -#define ABI_EXTENSION_VERSION SET_ABI_VERSION(1, 1) +#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(5, 0) +#define ABI_XINPUT_VERSION SET_ABI_VERSION(4, 0) +#define ABI_EXTENSION_VERSION SET_ABI_VERSION(2, 0) #define ABI_FONT_VERSION SET_ABI_VERSION(0, 6) #define MODINFOSTRING1 0xef23fdc5 @@ -194,7 +193,6 @@ pointer LoadSubModuleLocal(pointer, const char *, const char **, const char **, pointer, const XF86ModReqInfo *, int *, int *); void UnloadSubModule(pointer); -void LoadFont(pointer); void UnloadModule (pointer); #endif pointer LoaderSymbol(const char *); @@ -209,6 +207,7 @@ void LoaderReqSymLists(const char **, ...); void LoaderReqSymbols(const char *, ...); int LoaderCheckUnresolved(int); void LoaderGetOS(const char **name, int *major, int *minor, int *teeny); +Bool LoaderShouldIgnoreABI(void); int LoaderGetABIVersion(const char *abiclass); typedef pointer (*ModuleSetupProc)(pointer, pointer, int *, int *); diff --git a/xorg-server/hw/xfree86/common/xf86Priv.h b/xorg-server/hw/xfree86/common/xf86Priv.h index c0d240dd5..41ca8f531 100644 --- a/xorg-server/hw/xfree86/common/xf86Priv.h +++ b/xorg-server/hw/xfree86/common/xf86Priv.h @@ -39,6 +39,7 @@ #include "xf86Privstr.h" #include "propertyst.h" +#include "input.h" /* * Parameters set ONLY from the command line options @@ -50,16 +51,12 @@ extern Bool xf86AllowMouseOpenFail; extern Bool xf86VidModeDisabled; extern Bool xf86VidModeAllowNonLocal; #endif -#ifdef XF86MISC -extern Bool xf86MiscModInDevDisabled; -extern Bool xf86MiscModInDevAllowNonLocal; -#endif extern Bool xf86fpFlag; -extern Bool xf86coFlag; extern Bool xf86sFlag; extern Bool xf86bsEnableFlag; extern Bool xf86bsDisableFlag; extern Bool xf86silkenMouseDisableFlag; +extern Bool xf86xkbdirFlag; extern Bool xf86acpiDisableFlag; extern char *xf86LayoutName; extern char *xf86ScreenName; @@ -73,10 +70,8 @@ extern int xf86Depth; extern Pix24Flags xf86Pix24; extern rgb xf86Weight; extern Bool xf86FlipPixels; -extern Bool xf86BestRefresh; extern Gamma xf86Gamma; extern char *xf86ServerName; -extern Bool xf86ShowUnresolved; extern struct pci_slot_match xf86IsolateDevice; /* Other parameters */ @@ -156,20 +151,19 @@ Bool xf86PathIsSafe(const char *path); extern const DisplayModeRec xf86DefaultModes[]; extern const int xf86NumDefaultModes; -/* xf86DoProbe.c */ -void DoProbe(void); +/* xf86Configure.c */ void DoConfigure(void); +/* xf86ShowOpts.c */ +void DoShowOptions(void); + /* xf86Events.c */ -void xf86PostKbdEvent(unsigned key); -void xf86PostMseEvent(DeviceIntPtr device, int buttons, int dx, int dy); void xf86Wakeup(pointer blockData, int err, pointer pReadmask); void xf86SigHandler(int signo); void xf86HandlePMEvents(int fd, pointer data); extern int (*xf86PMGetEventFromOs)(int fd,pmEvent *events,int num); extern pmWait (*xf86PMConfirmEventToOs)(int fd,pmEvent event); -void xf86GrabServerCallback(CallbackListPtr *, pointer, pointer); /* xf86Helper.c */ void xf86LogInit(void); @@ -181,18 +175,8 @@ int xf86SetVerbosity(int verb); int xf86SetLogVerbosity(int verb); Bool xf86CallDriverProbe( struct _DriverRec * drv, Bool detect_only ); -/* xf86Lock.c */ - -#ifdef USE_XF86_SERVERLOCK -void xf86UnlockServer(void); -#endif - -/* xf86XKB.c */ - -void xf86InitXkb(void); - /* xf86Xinput.c */ -extern xEvent *xf86Events; +extern EventList *xf86Events; #endif /* _NO_XF86_PROTOTYPES */ diff --git a/xorg-server/hw/xfree86/common/xf86Privstr.h b/xorg-server/hw/xfree86/common/xf86Privstr.h index 8cab56ec8..6a7a6dc86 100644 --- a/xorg-server/hw/xfree86/common/xf86Privstr.h +++ b/xorg-server/hw/xfree86/common/xf86Privstr.h @@ -37,17 +37,6 @@ #include "xf86Pci.h" #include "xf86str.h" -/* PCI probe flags */ - -typedef enum { - PCIProbe1 = 0, - PCIProbe2, - PCIForceConfig1, - PCIForceConfig2, - PCIForceNone, - PCIOsConfig -} PciProbeType; - typedef enum { LogNone, LogFlush, @@ -78,16 +67,9 @@ typedef struct { Bool vtSysreq; SpecialKeysInDDX ddxSpecialKeys; - /* mouse part */ - DeviceIntPtr pMouse; -#ifdef XINPUT - pointer mouseLocal; -#endif - /* event handler part */ int lastEventTime; Bool vtRequestsPending; - Bool inputPending; Bool dontVTSwitch; Bool dontZap; Bool dontZoom; @@ -95,7 +77,6 @@ typedef struct { Bool caughtSignal; /* graphics part */ - Bool sharedMonitor; ScreenPtr currentScreen; #if defined(CSRG_BASED) || defined(__FreeBSD_kernel__) int screenFd; /* fd for memory mapped access to @@ -111,7 +92,6 @@ typedef struct { Bool miscModInDevEnabled; /* Allow input devices to be * changed */ Bool miscModInDevAllowNonLocal; - PciProbeType pciFlags; Pix24Flags pixmap24; MessageType pix24From; #ifdef __i386__ @@ -119,7 +99,6 @@ typedef struct { #endif Bool pmFlag; Log log; - int estimateSizesAggressively; Bool kbdCustomKeycodes; Bool disableRandR; MessageType randRFrom; @@ -131,18 +110,6 @@ typedef struct { Bool useDefaultFontPath; MessageType useDefaultFontPathFrom; Bool ignoreABI; - struct { - Bool disabled; /* enable/disable deactivating - * grabs or closing the - * connection to the grabbing - * client */ - ClientPtr override; /* client that disabled - * grab deactivation. - */ - Bool allowDeactivate; - Bool allowClosedown; - ServerGrabInfoRec server; - } grabInfo; Bool allowEmptyInput; /* Allow the server to start with no input * devices. */ diff --git a/xorg-server/hw/xfree86/common/xf86RAC.c b/xorg-server/hw/xfree86/common/xf86RAC.c new file mode 100644 index 000000000..24d29e445 --- /dev/null +++ b/xorg-server/hw/xfree86/common/xf86RAC.c @@ -0,0 +1,1171 @@ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + +#include "misc.h" +#include "xf86.h" +#include "xf86_OSproc.h" + +#include +#include "colormapst.h" +#include "scrnintstr.h" +#include "screenint.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "pixmap.h" +#include "windowstr.h" +#include "window.h" +#include "xf86str.h" +#include "xf86RAC.h" +#include "mipointer.h" +#include "mipointrst.h" +#ifdef RENDER +# include "picturestr.h" +#endif + +#ifdef DEBUG +#define DPRINT_S(x,y) ErrorF(x ": %i\n",y); +#define DPRINT(x) ErrorF(x "\n"); +#else +#define DPRINT_S(x,y) +#define DPRINT(x) +#endif + +#define WRAP_SCREEN(x,y) {pScreenPriv->x = pScreen->x;\ + pScreen->x = y;} +#define WRAP_SCREEN_COND(x,y,cond) \ + {pScreenPriv->x = pScreen->x;\ + if (flag & (cond))\ + pScreen->x = y;} +#define UNWRAP_SCREEN(x) pScreen->x = pScreenPriv->x + +#define SCREEN_PROLOG(x) pScreen->x = ((RACScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, RACScreenKey))->x +#define SCREEN_EPILOG(x,y) pScreen->x = y; + +#define WRAP_PICT_COND(x,y,cond) if (ps)\ + {pScreenPriv->x = ps->x;\ + if (flag & (cond))\ + ps->x = y;} +#define UNWRAP_PICT(x) if (ps) {ps->x = pScreenPriv->x;} + +#define PICTURE_PROLOGUE(field) ps->field = \ + ((RACScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, RACScreenKey))->field +#define PICTURE_EPILOGUE(field, wrap) \ + ps->field = wrap + +#define WRAP_SCREEN_INFO(x,y) {pScreenPriv->x = pScrn->x;\ + pScrn->x = y;} +#define WRAP_SCREEN_INFO_COND(x,y,cond) \ + {pScreenPriv->x = pScrn->x;\ + if (flag & (cond))\ + pScrn->x = y;} +#define UNWRAP_SCREEN_INFO(x) pScrn->x = pScreenPriv->x + +#define SPRITE_PROLOG miPointerScreenPtr PointPriv = \ + (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); \ + RACScreenPtr pScreenPriv = \ + ((RACScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, RACScreenKey));\ + PointPriv->spriteFuncs = pScreenPriv->miSprite; +#define SPRITE_EPILOG pScreenPriv->miSprite = PointPriv->spriteFuncs;\ + PointPriv->spriteFuncs = &RACSpriteFuncs; +#define WRAP_SPRITE_COND(cond){pScreenPriv->miSprite = PointPriv->spriteFuncs;\ + if(flag & (cond))\ + PointPriv->spriteFuncs = &RACSpriteFuncs;} +#define UNWRAP_SPRITE PointPriv->spriteFuncs = pScreenPriv->miSprite + + +#define GC_WRAP(x) pGCPriv->wrapOps = (x)->ops;\ + pGCPriv->wrapFuncs = (x)->funcs;\ + (x)->ops = &RACGCOps;\ + (x)->funcs = &RACGCFuncs; +#define GC_UNWRAP(x)\ + RACGCPtr pGCPriv = (RACGCPtr)dixLookupPrivate(&(x)->devPrivates, RACGCKey);\ + (x)->ops = pGCPriv->wrapOps;\ + (x)->funcs = pGCPriv->wrapFuncs; + +#define GC_SCREEN register ScrnInfoPtr pScrn \ + = xf86Screens[pGC->pScreen->myNum] + +#define ENABLE xf86EnableAccess(xf86Screens[pScreen->myNum]) +#define ENABLE_GC xf86EnableAccess(xf86Screens[pGC->pScreen->myNum]) + +typedef struct _RACScreen { + CreateGCProcPtr CreateGC; + CloseScreenProcPtr CloseScreen; + GetImageProcPtr GetImage; + GetSpansProcPtr GetSpans; + SourceValidateProcPtr SourceValidate; + CopyWindowProcPtr CopyWindow; + ClearToBackgroundProcPtr ClearToBackground; + CreatePixmapProcPtr CreatePixmap; + SaveScreenProcPtr SaveScreen; + /* Colormap */ + StoreColorsProcPtr StoreColors; + /* Cursor */ + DisplayCursorProcPtr DisplayCursor; + RealizeCursorProcPtr RealizeCursor; + UnrealizeCursorProcPtr UnrealizeCursor; + RecolorCursorProcPtr RecolorCursor; + SetCursorPositionProcPtr SetCursorPosition; + void (*AdjustFrame)(int,int,int,int); + Bool (*SwitchMode)(int, DisplayModePtr,int); + Bool (*EnterVT)(int, int); + void (*LeaveVT)(int, int); + void (*FreeScreen)(int, int); + miPointerSpriteFuncPtr miSprite; +#ifdef RENDER + CompositeProcPtr Composite; + GlyphsProcPtr Glyphs; + CompositeRectsProcPtr CompositeRects; +#endif +} RACScreenRec, *RACScreenPtr; + +typedef struct _RACGC { + GCOps *wrapOps; + GCFuncs *wrapFuncs; +} RACGCRec, *RACGCPtr; + +/* Screen funcs */ +static Bool RACCloseScreen (int i, ScreenPtr pScreen); +static void RACGetImage (DrawablePtr pDrawable, int sx, int sy, + int w, int h, unsigned int format, + unsigned long planemask, char *pdstLine); +static void RACGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, + int *pwidth, int nspans, char *pdstStart); +static void RACSourceValidate (DrawablePtr pDrawable, + int x, int y, int width, int height ); +static void RACCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, + RegionPtr prgnSrc ); +static void RACClearToBackground (WindowPtr pWin, int x, int y, + int w, int h, Bool generateExposures ); +static PixmapPtr RACCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, + unsigned usage_hint); +static Bool RACCreateGC(GCPtr pGC); +static Bool RACSaveScreen(ScreenPtr pScreen, Bool unblank); +static void RACStoreColors (ColormapPtr pmap, int ndef, xColorItem *pdefs); +static void RACRecolorCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCurs, Bool displayed); +static Bool RACRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor); +static Bool RACUnrealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor); +static Bool RACDisplayCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor); +static Bool RACSetCursorPosition (DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y, Bool generateEvent); +static void RACAdjustFrame(int index, int x, int y, int flags); +static Bool RACSwitchMode(int index, DisplayModePtr mode, int flags); +static Bool RACEnterVT(int index, int flags); +static void RACLeaveVT(int index, int flags); +static void RACFreeScreen(int index, int flags); +/* GC funcs */ +static void RACValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDraw); +static void RACChangeGC(GCPtr pGC, unsigned long mask); +static void RACCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); +static void RACDestroyGC(GCPtr pGC); +static void RACChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects); +static void RACDestroyClip(GCPtr pGC); +static void RACCopyClip(GCPtr pgcDst, GCPtr pgcSrc); +/* GC ops */ +static void RACFillSpans( DrawablePtr pDraw, GC *pGC, int nInit, + DDXPointPtr pptInit, int *pwidthInit, int fSorted ); +static void RACSetSpans(DrawablePtr pDraw, GCPtr pGC, char *pcharsrc, + register DDXPointPtr ppt, int *pwidth, int nspans, + int fSorted ); +static void RACPutImage(DrawablePtr pDraw, GCPtr pGC, int depth, + int x, int y, int w, int h, int leftPad, + int format, char *pImage ); +static RegionPtr RACCopyArea(DrawablePtr pSrc, DrawablePtr pDst, + GC *pGC, int srcx, int srcy, + int width, int height, + int dstx, int dsty ); +static RegionPtr RACCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, + GCPtr pGC, int srcx, int srcy, + int width, int height, int dstx, int dsty, + unsigned long bitPlane ); +static void RACPolyPoint(DrawablePtr pDraw, GCPtr pGC, int mode, + int npt, xPoint *pptInit ); +static void RACPolylines(DrawablePtr pDraw, GCPtr pGC, int mode, + int npt, DDXPointPtr pptInit ); +static void RACPolySegment(DrawablePtr pDraw, GCPtr pGC, int nseg, + xSegment *pSeg ); +static void RACPolyRectangle(DrawablePtr pDraw, GCPtr pGC, int nRectsInit, + xRectangle *pRectsInit ); +static void RACPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, + xArc *parcs ); +static void RACFillPolygon(DrawablePtr pDraw, GCPtr pGC, int shape, int mode, + int count, DDXPointPtr ptsIn ); +static void RACPolyFillRect( DrawablePtr pDraw, GCPtr pGC, int nrectFill, + xRectangle *prectInit ); +static void RACPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs, + xArc *parcs ); +static int RACPolyText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, + int count, char *chars ); +static int RACPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, + int count, unsigned short *chars ); +static void RACImageText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, + int count, char *chars ); +static void RACImageText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, + int count, unsigned short *chars ); +static void RACImageGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit, + int yInit, unsigned int nglyph, + CharInfoPtr *ppci, pointer pglyphBase ); +static void RACPolyGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit, + int yInit, unsigned int nglyph, + CharInfoPtr *ppci, pointer pglyphBase ); +static void RACPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDraw, + int dx, int dy, int xOrg, int yOrg ); +/* miSpriteFuncs */ +static Bool RACSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCur); +static Bool RACSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCur); +static void RACSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCur, int x, int y); +static void RACSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y); +#ifdef RENDER +static void RACComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, + PicturePtr pDst, INT16 xSrc, INT16 ySrc, + INT16 xMask, INT16 yMask, INT16 xDst, + INT16 yDst, CARD16 width, CARD16 height); +static void RACGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, + int nlist, GlyphListPtr list, GlyphPtr *glyphs); +static void RACCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color, + int nRect, xRectangle *rects); +#endif + +static GCFuncs RACGCFuncs = { + RACValidateGC, RACChangeGC, RACCopyGC, RACDestroyGC, + RACChangeClip, RACDestroyClip, RACCopyClip +}; + +static GCOps RACGCOps = { + RACFillSpans, RACSetSpans, RACPutImage, RACCopyArea, + RACCopyPlane, RACPolyPoint, RACPolylines, RACPolySegment, + RACPolyRectangle, RACPolyArc, RACFillPolygon, RACPolyFillRect, + RACPolyFillArc, RACPolyText8, RACPolyText16, RACImageText8, + RACImageText16, RACImageGlyphBlt, RACPolyGlyphBlt, RACPushPixels, + {NULL} /* devPrivate */ +}; + +static miPointerSpriteFuncRec RACSpriteFuncs = { + RACSpriteRealizeCursor, RACSpriteUnrealizeCursor, RACSpriteSetCursor, + RACSpriteMoveCursor +}; + +static int RACScreenKeyIndex; +static DevPrivateKey RACScreenKey = &RACScreenKeyIndex; +static int RACGCKeyIndex; +static DevPrivateKey RACGCKey = &RACGCKeyIndex; + + +Bool +xf86RACInit(ScreenPtr pScreen, unsigned int flag) +{ + ScrnInfoPtr pScrn; + RACScreenPtr pScreenPriv; + miPointerScreenPtr PointPriv; +#ifdef RENDER + PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); +#endif + + pScrn = xf86Screens[pScreen->myNum]; + PointPriv = (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miPointerScreenKey); + DPRINT_S("RACInit",pScreen->myNum); + + if (!dixRequestPrivate(RACGCKey, sizeof(RACGCRec))) + return FALSE; + + if (!(pScreenPriv = xalloc(sizeof(RACScreenRec)))) + return FALSE; + + dixSetPrivate(&pScreen->devPrivates, RACScreenKey, pScreenPriv); + + WRAP_SCREEN(CloseScreen, RACCloseScreen); + WRAP_SCREEN(SaveScreen, RACSaveScreen); + WRAP_SCREEN_COND(CreateGC, RACCreateGC, RAC_FB); + WRAP_SCREEN_COND(GetImage, RACGetImage, RAC_FB); + WRAP_SCREEN_COND(GetSpans, RACGetSpans, RAC_FB); + WRAP_SCREEN_COND(SourceValidate, RACSourceValidate, RAC_FB); + WRAP_SCREEN_COND(CopyWindow, RACCopyWindow, RAC_FB); + WRAP_SCREEN_COND(ClearToBackground, RACClearToBackground, RAC_FB); + WRAP_SCREEN_COND(CreatePixmap, RACCreatePixmap, RAC_FB); + WRAP_SCREEN_COND(StoreColors, RACStoreColors, RAC_COLORMAP); + WRAP_SCREEN_COND(DisplayCursor, RACDisplayCursor, RAC_CURSOR); + WRAP_SCREEN_COND(RealizeCursor, RACRealizeCursor, RAC_CURSOR); + WRAP_SCREEN_COND(UnrealizeCursor, RACUnrealizeCursor, RAC_CURSOR); + WRAP_SCREEN_COND(RecolorCursor, RACRecolorCursor, RAC_CURSOR); + WRAP_SCREEN_COND(SetCursorPosition, RACSetCursorPosition, RAC_CURSOR); +#ifdef RENDER + WRAP_PICT_COND(Composite,RACComposite,RAC_FB); + WRAP_PICT_COND(Glyphs,RACGlyphs,RAC_FB); + WRAP_PICT_COND(CompositeRects,RACCompositeRects,RAC_FB); +#endif + WRAP_SCREEN_INFO_COND(AdjustFrame, RACAdjustFrame, RAC_VIEWPORT); + WRAP_SCREEN_INFO(SwitchMode, RACSwitchMode); + WRAP_SCREEN_INFO(EnterVT, RACEnterVT); + WRAP_SCREEN_INFO(LeaveVT, RACLeaveVT); + WRAP_SCREEN_INFO(FreeScreen, RACFreeScreen); + WRAP_SPRITE_COND(RAC_CURSOR); + + return TRUE; +} + +/* Screen funcs */ +static Bool +RACCloseScreen (int i, ScreenPtr pScreen) +{ + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, RACScreenKey); + miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, miPointerScreenKey); +#ifdef RENDER + PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); +#endif + + DPRINT_S("RACCloseScreen",pScreen->myNum); + UNWRAP_SCREEN(CreateGC); + UNWRAP_SCREEN(CloseScreen); + UNWRAP_SCREEN(GetImage); + UNWRAP_SCREEN(GetSpans); + UNWRAP_SCREEN(SourceValidate); + UNWRAP_SCREEN(CopyWindow); + UNWRAP_SCREEN(ClearToBackground); + UNWRAP_SCREEN(SaveScreen); + UNWRAP_SCREEN(StoreColors); + UNWRAP_SCREEN(DisplayCursor); + UNWRAP_SCREEN(RealizeCursor); + UNWRAP_SCREEN(UnrealizeCursor); + UNWRAP_SCREEN(RecolorCursor); + UNWRAP_SCREEN(SetCursorPosition); +#ifdef RENDER + UNWRAP_PICT(Composite); + UNWRAP_PICT(Glyphs); + UNWRAP_PICT(CompositeRects); +#endif + UNWRAP_SCREEN_INFO(AdjustFrame); + UNWRAP_SCREEN_INFO(SwitchMode); + UNWRAP_SCREEN_INFO(EnterVT); + UNWRAP_SCREEN_INFO(LeaveVT); + UNWRAP_SCREEN_INFO(FreeScreen); + UNWRAP_SPRITE; + + xfree ((pointer) pScreenPriv); + + if (xf86Screens[pScreen->myNum]->vtSema) { + xf86EnterServerState(SETUP); + ENABLE; + } + return (*pScreen->CloseScreen) (i, pScreen); +} + +static void +RACGetImage ( + DrawablePtr pDrawable, + int sx, int sy, int w, int h, + unsigned int format, + unsigned long planemask, + char *pdstLine + ) +{ + ScreenPtr pScreen = pDrawable->pScreen; + DPRINT_S("RACGetImage",pScreen->myNum); + SCREEN_PROLOG(GetImage); + if (xf86Screens[pScreen->myNum]->vtSema) { + ENABLE; + } + (*pScreen->GetImage) (pDrawable, sx, sy, w, h, + format, planemask, pdstLine); + SCREEN_EPILOG (GetImage, RACGetImage); +} + +static void +RACGetSpans ( + DrawablePtr pDrawable, + int wMax, + DDXPointPtr ppt, + int *pwidth, + int nspans, + char *pdstStart + ) +{ + ScreenPtr pScreen = pDrawable->pScreen; + + DPRINT_S("RACGetSpans",pScreen->myNum); + SCREEN_PROLOG (GetSpans); + ENABLE; + (*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart); + SCREEN_EPILOG (GetSpans, RACGetSpans); +} + +static void +RACSourceValidate ( + DrawablePtr pDrawable, + int x, int y, int width, int height ) +{ + ScreenPtr pScreen = pDrawable->pScreen; + DPRINT_S("RACSourceValidate",pScreen->myNum); + SCREEN_PROLOG (SourceValidate); + ENABLE; + if (pScreen->SourceValidate) + (*pScreen->SourceValidate) (pDrawable, x, y, width, height); + SCREEN_EPILOG (SourceValidate, RACSourceValidate); +} + +static void +RACCopyWindow( + WindowPtr pWin, + DDXPointRec ptOldOrg, + RegionPtr prgnSrc ) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + DPRINT_S("RACCopyWindow",pScreen->myNum); + SCREEN_PROLOG (CopyWindow); + ENABLE; + (*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc); + SCREEN_EPILOG (CopyWindow, RACCopyWindow); +} + +static void +RACClearToBackground ( + WindowPtr pWin, + int x, int y, + int w, int h, + Bool generateExposures ) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + DPRINT_S("RACClearToBackground",pScreen->myNum); + SCREEN_PROLOG ( ClearToBackground); + ENABLE; + (*pScreen->ClearToBackground) (pWin, x, y, w, h, generateExposures); + SCREEN_EPILOG (ClearToBackground, RACClearToBackground); +} + +static PixmapPtr +RACCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint) +{ + PixmapPtr pPix; + + DPRINT_S("RACCreatePixmap",pScreen->myNum); + SCREEN_PROLOG ( CreatePixmap); + ENABLE; + pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, usage_hint); + SCREEN_EPILOG (CreatePixmap, RACCreatePixmap); + + return pPix; +} + +static Bool +RACSaveScreen(ScreenPtr pScreen, Bool unblank) +{ + Bool val; + + DPRINT_S("RACSaveScreen",pScreen->myNum); + SCREEN_PROLOG (SaveScreen); + ENABLE; + val = (*pScreen->SaveScreen) (pScreen, unblank); + SCREEN_EPILOG (SaveScreen, RACSaveScreen); + + return val; +} + +static void +RACStoreColors ( + ColormapPtr pmap, + int ndef, + xColorItem *pdefs) +{ + ScreenPtr pScreen = pmap->pScreen; + + DPRINT_S("RACStoreColors",pScreen->myNum); + SCREEN_PROLOG (StoreColors); + ENABLE; + (*pScreen->StoreColors) (pmap,ndef,pdefs); + + SCREEN_EPILOG ( StoreColors, RACStoreColors); +} + +static void +RACRecolorCursor ( + DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCurs, + Bool displayed + ) +{ + DPRINT_S("RACRecolorCursor",pScreen->myNum); + SCREEN_PROLOG (RecolorCursor); + ENABLE; + (*pScreen->RecolorCursor) (pDev, pScreen,pCurs,displayed); + + SCREEN_EPILOG ( RecolorCursor, RACRecolorCursor); +} + +static Bool +RACRealizeCursor ( + DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCursor + ) +{ + Bool val; + + DPRINT_S("RACRealizeCursor",pScreen->myNum); + SCREEN_PROLOG (RealizeCursor); + ENABLE; + val = (*pScreen->RealizeCursor) (pDev, pScreen,pCursor); + + SCREEN_EPILOG ( RealizeCursor, RACRealizeCursor); + return val; +} + +static Bool +RACUnrealizeCursor ( + DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCursor + ) +{ + Bool val; + + DPRINT_S("RACUnrealizeCursor",pScreen->myNum); + SCREEN_PROLOG (UnrealizeCursor); + ENABLE; + val = (*pScreen->UnrealizeCursor) (pDev, pScreen,pCursor); + + SCREEN_EPILOG ( UnrealizeCursor, RACUnrealizeCursor); + return val; +} + +static Bool +RACDisplayCursor ( + DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCursor + ) +{ + Bool val; + + DPRINT_S("RACDisplayCursor",pScreen->myNum); + SCREEN_PROLOG (DisplayCursor); + ENABLE; + val = (*pScreen->DisplayCursor) (pDev, pScreen,pCursor); + + SCREEN_EPILOG ( DisplayCursor, RACDisplayCursor); + return val; +} + +static Bool +RACSetCursorPosition ( + DeviceIntPtr pDev, + ScreenPtr pScreen, + int x, int y, + Bool generateEvent) +{ + Bool val; + + DPRINT_S("RACSetCursorPosition",pScreen->myNum); + SCREEN_PROLOG (SetCursorPosition); + ENABLE; + val = (*pScreen->SetCursorPosition) (pDev, pScreen,x,y,generateEvent); + + SCREEN_EPILOG ( SetCursorPosition, RACSetCursorPosition); + return val; +} + +static void +RACAdjustFrame(int index, int x, int y, int flags) +{ + ScreenPtr pScreen = screenInfo.screens[index]; + RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, RACScreenKey); + + DPRINT_S("RACAdjustFrame",index); + xf86EnableAccess(xf86Screens[index]); + + (*pScreenPriv->AdjustFrame)(index, x, y, flags); +} + +static Bool +RACSwitchMode(int index, DisplayModePtr mode, int flags) +{ + ScreenPtr pScreen = screenInfo.screens[index]; + RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, RACScreenKey); + + DPRINT_S("RACSwitchMode",index); + xf86EnableAccess(xf86Screens[index]); + + return (*pScreenPriv->SwitchMode)(index, mode, flags); +} + +static Bool +RACEnterVT(int index, int flags) +{ + ScreenPtr pScreen = screenInfo.screens[index]; + RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, RACScreenKey); + + DPRINT_S("RACEnterVT",index); + xf86EnableAccess(xf86Screens[index]); + + return (*pScreenPriv->EnterVT)(index, flags); +} + +static void +RACLeaveVT(int index, int flags) +{ + ScreenPtr pScreen = screenInfo.screens[index]; + RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, RACScreenKey); + + DPRINT_S("RACLeaveVT",index); + xf86EnableAccess(xf86Screens[index]); + + (*pScreenPriv->LeaveVT)(index, flags); +} + +static void +RACFreeScreen(int index, int flags) +{ + ScreenPtr pScreen = screenInfo.screens[index]; + RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, RACScreenKey); + + DPRINT_S("RACFreeScreen",index); + xf86EnableAccess(xf86Screens[index]); + + (*pScreenPriv->FreeScreen)(index, flags); +} + +static Bool +RACCreateGC(GCPtr pGC) +{ + ScreenPtr pScreen = pGC->pScreen; + RACGCPtr pGCPriv = (RACGCPtr)dixLookupPrivate(&pGC->devPrivates, RACGCKey); + Bool ret; + + DPRINT_S("RACCreateGC",pScreen->myNum); + SCREEN_PROLOG(CreateGC); + + ret = (*pScreen->CreateGC)(pGC); + + GC_WRAP(pGC); + SCREEN_EPILOG(CreateGC,RACCreateGC); + + return ret; +} + +/* GC funcs */ +static void +RACValidateGC( + GCPtr pGC, + unsigned long changes, + DrawablePtr pDraw ) +{ + GC_UNWRAP(pGC); + DPRINT("RACValidateGC"); + (*pGC->funcs->ValidateGC)(pGC, changes, pDraw); + GC_WRAP(pGC); +} + + +static void +RACDestroyGC(GCPtr pGC) +{ + GC_UNWRAP (pGC); + DPRINT("RACDestroyGC"); + (*pGC->funcs->DestroyGC)(pGC); + GC_WRAP (pGC); +} + +static void +RACChangeGC ( + GCPtr pGC, + unsigned long mask) +{ + GC_UNWRAP (pGC); + DPRINT("RACChangeGC"); + (*pGC->funcs->ChangeGC) (pGC, mask); + GC_WRAP (pGC); +} + +static void +RACCopyGC ( + GCPtr pGCSrc, + unsigned long mask, + GCPtr pGCDst) +{ + GC_UNWRAP (pGCDst); + DPRINT("RACCopyGC"); + (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); + GC_WRAP (pGCDst); +} + +static void +RACChangeClip ( + GCPtr pGC, + int type, + pointer pvalue, + int nrects ) +{ + GC_UNWRAP (pGC); + DPRINT("RACChangeClip"); + (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); + GC_WRAP (pGC); +} + +static void +RACCopyClip(GCPtr pgcDst, GCPtr pgcSrc) +{ + GC_UNWRAP (pgcDst); + DPRINT("RACCopyClip"); + (* pgcDst->funcs->CopyClip)(pgcDst, pgcSrc); + GC_WRAP (pgcDst); +} + +static void +RACDestroyClip(GCPtr pGC) +{ + GC_UNWRAP (pGC); + DPRINT("RACDestroyClip"); + (* pGC->funcs->DestroyClip)(pGC); + GC_WRAP (pGC); +} + +/* GC Ops */ +static void +RACFillSpans( + DrawablePtr pDraw, + GC *pGC, + int nInit, + DDXPointPtr pptInit, + int *pwidthInit, + int fSorted ) +{ + GC_UNWRAP(pGC); + DPRINT("RACFillSpans"); + ENABLE_GC; + (*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted); + GC_WRAP(pGC); +} + +static void +RACSetSpans( + DrawablePtr pDraw, + GCPtr pGC, + char *pcharsrc, + register DDXPointPtr ppt, + int *pwidth, + int nspans, + int fSorted ) +{ + GC_UNWRAP(pGC); + DPRINT("RACSetSpans"); + ENABLE_GC; + (*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, ppt, pwidth, nspans, fSorted); + GC_WRAP(pGC); +} + +static void +RACPutImage( + DrawablePtr pDraw, + GCPtr pGC, + int depth, + int x, int y, int w, int h, + int leftPad, + int format, + char *pImage ) +{ + GC_UNWRAP(pGC); + DPRINT("RACPutImage"); + ENABLE_GC; + (*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h, + leftPad, format, pImage); + GC_WRAP(pGC); +} + +static RegionPtr +RACCopyArea( + DrawablePtr pSrc, + DrawablePtr pDst, + GC *pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty ) +{ + RegionPtr ret; + + GC_UNWRAP(pGC); + DPRINT("RACCopyArea"); + ENABLE_GC; + ret = (*pGC->ops->CopyArea)(pSrc, pDst, + pGC, srcx, srcy, width, height, dstx, dsty); + GC_WRAP(pGC); + return ret; +} + +static RegionPtr +RACCopyPlane( + DrawablePtr pSrc, + DrawablePtr pDst, + GCPtr pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty, + unsigned long bitPlane ) +{ + RegionPtr ret; + + GC_UNWRAP(pGC); + DPRINT("RACCopyPlane"); + ENABLE_GC; + ret = (*pGC->ops->CopyPlane)(pSrc, pDst, pGC, srcx, srcy, + width, height, dstx, dsty, bitPlane); + GC_WRAP(pGC); + return ret; +} + +static void +RACPolyPoint( + DrawablePtr pDraw, + GCPtr pGC, + int mode, + int npt, + xPoint *pptInit ) +{ + GC_UNWRAP(pGC); + DPRINT("RACPolyPoint"); + ENABLE_GC; + (*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit); + GC_WRAP(pGC); +} + + +static void +RACPolylines( + DrawablePtr pDraw, + GCPtr pGC, + int mode, + int npt, + DDXPointPtr pptInit ) +{ + GC_UNWRAP(pGC); + DPRINT("RACPolylines"); + ENABLE_GC; + (*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit); + GC_WRAP(pGC); +} + +static void +RACPolySegment( + DrawablePtr pDraw, + GCPtr pGC, + int nseg, + xSegment *pSeg ) +{ + GC_UNWRAP(pGC); + DPRINT("RACPolySegment"); + ENABLE_GC; + (*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg); + GC_WRAP(pGC); +} + +static void +RACPolyRectangle( + DrawablePtr pDraw, + GCPtr pGC, + int nRectsInit, + xRectangle *pRectsInit ) +{ + GC_UNWRAP(pGC); + DPRINT("RACPolyRectangle"); + ENABLE_GC; + (*pGC->ops->PolyRectangle)(pDraw, pGC, nRectsInit, pRectsInit); + GC_WRAP(pGC); +} + +static void +RACPolyArc( + DrawablePtr pDraw, + GCPtr pGC, + int narcs, + xArc *parcs ) +{ + GC_UNWRAP(pGC); + DPRINT("RACPolyArc"); + ENABLE_GC; + (*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs); + GC_WRAP(pGC); +} + +static void +RACFillPolygon( + DrawablePtr pDraw, + GCPtr pGC, + int shape, + int mode, + int count, + DDXPointPtr ptsIn ) +{ + GC_UNWRAP(pGC); + DPRINT("RACFillPolygon"); + ENABLE_GC; + (*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, ptsIn); + GC_WRAP(pGC); +} + + +static void +RACPolyFillRect( + DrawablePtr pDraw, + GCPtr pGC, + int nrectFill, + xRectangle *prectInit ) +{ + GC_UNWRAP(pGC); + DPRINT("RACPolyFillRect"); + ENABLE_GC; + (*pGC->ops->PolyFillRect)(pDraw, pGC, nrectFill, prectInit); + GC_WRAP(pGC); +} + + +static void +RACPolyFillArc( + DrawablePtr pDraw, + GCPtr pGC, + int narcs, + xArc *parcs ) +{ + GC_UNWRAP(pGC); + DPRINT("RACPolyFillArc"); + ENABLE_GC; + (*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs); + GC_WRAP(pGC); +} + +static int +RACPolyText8( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + char *chars ) +{ + int ret; + + GC_UNWRAP(pGC); + DPRINT("RACPolyText8"); + ENABLE_GC; + ret = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars); + GC_WRAP(pGC); + return ret; +} + +static int +RACPolyText16( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + unsigned short *chars ) +{ + int ret; + + GC_UNWRAP(pGC); + DPRINT("RACPolyText16"); + ENABLE_GC; + ret = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars); + GC_WRAP(pGC); + return ret; +} + +static void +RACImageText8( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + char *chars ) +{ + GC_UNWRAP(pGC); + DPRINT("RACImageText8"); + ENABLE_GC; + (*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars); + GC_WRAP(pGC); +} + +static void +RACImageText16( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + unsigned short *chars ) +{ + GC_UNWRAP(pGC); + DPRINT("RACImageText16"); + ENABLE_GC; + (*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars); + GC_WRAP(pGC); +} + + +static void +RACImageGlyphBlt( + DrawablePtr pDraw, + GCPtr pGC, + int xInit, int yInit, + unsigned int nglyph, + CharInfoPtr *ppci, + pointer pglyphBase ) +{ + GC_UNWRAP(pGC); + DPRINT("RACImageGlyphBlt"); + ENABLE_GC; + (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, xInit, yInit, + nglyph, ppci, pglyphBase); + GC_WRAP(pGC); +} + +static void +RACPolyGlyphBlt( + DrawablePtr pDraw, + GCPtr pGC, + int xInit, int yInit, + unsigned int nglyph, + CharInfoPtr *ppci, + pointer pglyphBase ) +{ + GC_UNWRAP(pGC); + DPRINT("RACPolyGlyphBlt"); + ENABLE_GC; + (*pGC->ops->PolyGlyphBlt)(pDraw, pGC, xInit, yInit, + nglyph, ppci, pglyphBase); + GC_WRAP(pGC); +} + +static void +RACPushPixels( + GCPtr pGC, + PixmapPtr pBitMap, + DrawablePtr pDraw, + int dx, int dy, int xOrg, int yOrg ) +{ + GC_UNWRAP(pGC); + DPRINT("RACPushPixels"); + ENABLE_GC; + (*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg); + GC_WRAP(pGC); +} + + +/* miSpriteFuncs */ +static Bool +RACSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur) +{ + Bool val; + SPRITE_PROLOG; + DPRINT_S("RACSpriteRealizeCursor",pScreen->myNum); + ENABLE; + val = PointPriv->spriteFuncs->RealizeCursor(pDev, pScreen, pCur); + SPRITE_EPILOG; + return val; +} + +static Bool +RACSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur) +{ + Bool val; + SPRITE_PROLOG; + DPRINT_S("RACSpriteUnrealizeCursor",pScreen->myNum); + ENABLE; + val = PointPriv->spriteFuncs->UnrealizeCursor(pDev, pScreen, pCur); + SPRITE_EPILOG; + return val; +} + +static void +RACSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCur, int x, int y) +{ + SPRITE_PROLOG; + DPRINT_S("RACSpriteSetCursor",pScreen->myNum); + ENABLE; + PointPriv->spriteFuncs->SetCursor(pDev, pScreen, pCur, x, y); + SPRITE_EPILOG; +} + +static void +RACSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) +{ + SPRITE_PROLOG; + DPRINT_S("RACSpriteMoveCursor",pScreen->myNum); + ENABLE; + PointPriv->spriteFuncs->MoveCursor(pDev, pScreen, x, y); + SPRITE_EPILOG; +} + +#ifdef RENDER +static void +RACComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, + PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, + INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, + CARD16 height) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + + PICTURE_PROLOGUE(Composite); + + ENABLE; + (*ps->Composite) (op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, + yDst, width, height); + + PICTURE_EPILOGUE(Composite, RACComposite); +} + +static void +RACGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, + GlyphListPtr list, GlyphPtr *glyphs) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + + PICTURE_PROLOGUE(Glyphs); + + ENABLE; + (*ps->Glyphs)(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); + + PICTURE_EPILOGUE (Glyphs, RACGlyphs); +} + +static void +RACCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color, int nRect, + xRectangle *rects) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + + PICTURE_PROLOGUE(CompositeRects); + + ENABLE; + (*ps->CompositeRects)(op, pDst, color, nRect, rects); + + PICTURE_EPILOGUE (CompositeRects, RACCompositeRects); +} +#endif + diff --git a/xorg-server/hw/xfree86/common/xf86RAC.h b/xorg-server/hw/xfree86/common/xf86RAC.h new file mode 100644 index 000000000..366c21485 --- /dev/null +++ b/xorg-server/hw/xfree86/common/xf86RAC.h @@ -0,0 +1,17 @@ + +#ifndef __XF86RAC_H +#define __XF86RAC_H 1 + +#include "screenint.h" +#include "misc.h" +#include "xf86.h" + +Bool xf86RACInit(ScreenPtr pScreen, unsigned int flag); + +/* flags */ +#define RAC_FB 0x01 +#define RAC_CURSOR 0x02 +#define RAC_COLORMAP 0x04 +#define RAC_VIEWPORT 0x08 + +#endif /* __XF86RAC_H */ diff --git a/xorg-server/hw/xfree86/common/xf86RandR.c b/xorg-server/hw/xfree86/common/xf86RandR.c index a55b93d4c..de2f78c5f 100644 --- a/xorg-server/hw/xfree86/common/xf86RandR.c +++ b/xorg-server/hw/xfree86/common/xf86RandR.c @@ -34,6 +34,7 @@ #include "xf86DDC.h" #include "mipointer.h" #include +#include "inputstr.h" typedef struct _xf86RandRInfo { CreateScreenResourcesProcPtr CreateScreenResources; @@ -45,7 +46,8 @@ typedef struct _xf86RandRInfo { Rotation rotation; } XF86RandRInfoRec, *XF86RandRInfoPtr; -static DevPrivateKey xf86RandRKey = NULL; +static int xf86RandRKeyIndex; +static DevPrivateKey xf86RandRKey; #define XF86RANDRINFO(p) ((XF86RandRInfoPtr)dixLookupPrivate(&(p)->devPrivates, xf86RandRKey)) @@ -72,7 +74,7 @@ xf86RandRGetInfo (ScreenPtr pScreen, Rotation *rotations) *rotations = RR_Rotate_0; - for (mode = scrp->modes; ; mode = mode->next) + for (mode = scrp->modes; mode != NULL ; mode = mode->next) { int refresh = xf86RandRModeRefresh (mode); @@ -244,7 +246,7 @@ xf86RandRSetConfig (ScreenPtr pScreen, Bool useVirtual = FALSE; Rotation oldRotation = randrp->rotation; - miPointerPosition (&px, &py); + miPointerGetPosition(inputInfo.pointer, &px, &py); for (mode = scrp->modes; ; mode = mode->next) { if (mode->HDisplay == pSize->width && @@ -311,7 +313,7 @@ xf86RandRSetConfig (ScreenPtr pScreen, xf86SetViewport(pScreen, px, py); - (*pScreen->SetCursorPosition) (pScreen, px, py, FALSE); + (*pScreen->SetCursorPosition) (inputInfo.pointer, pScreen, px, py, FALSE); } return TRUE; @@ -422,7 +424,7 @@ xf86RandRInit (ScreenPtr pScreen) return TRUE; #endif - xf86RandRKey = &xf86RandRKey; + xf86RandRKey = &xf86RandRKeyIndex; randrp = xalloc (sizeof (XF86RandRInfoRec)); if (!randrp) diff --git a/xorg-server/hw/xfree86/common/xf86ShowOpts.c b/xorg-server/hw/xfree86/common/xf86ShowOpts.c new file mode 100644 index 000000000..b8efa73c2 --- /dev/null +++ b/xorg-server/hw/xfree86/common/xf86ShowOpts.c @@ -0,0 +1,129 @@ +/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86ShopwOpts.c,v 3.80 2003/10/08 14:58:27 dawes Exp $ */ +/* + * Copyright 2000-2002 by Alan Hourihane, Flint Mountain, North Wales. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Alan Hourihane not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Alan Hourihane makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL ALAN HOURIHANE BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + * + * Author: Marcus Schaefer, ms@suse.de + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "os.h" +#ifdef XFree86LOADER +#include "loaderProcs.h" +#endif +#include "xf86.h" +#include "xf86Config.h" +#include "xf86_OSlib.h" +#include "xf86Priv.h" +/* #include "xf86PciData.h" */ +#define IN_XSERVER +#include "xf86Parser.h" +#include "xf86tokens.h" +#include "Configint.h" +#include "vbe.h" +#include "xf86DDC.h" +#if defined(__sparc__) && !defined(__OpenBSD__) +#include "xf86Bus.h" +#include "xf86Sbus.h" +#endif +#include "globals.h" + +static const char* +optionTypeToSting(OptionValueType type) +{ + switch (type) { + case OPTV_NONE: + return ""; + case OPTV_INTEGER: + return ""; + case OPTV_STRING: + return ""; + case OPTV_ANYSTR: + return ""; + case OPTV_REAL: + return ""; + case OPTV_BOOLEAN: + return ""; + case OPTV_FREQ: + return ""; + default: + return ""; + } +} + +void DoShowOptions (void) { + int i = 0; + char **vlist = 0; + char *pSymbol = 0; + XF86ModuleData *initData = 0; + if (! (vlist = xf86DriverlistFromCompile())) { + ErrorF("Missing output drivers\n"); + goto bail; + } + xf86LoadModules (vlist,0); + xfree (vlist); + for (i = 0; i < xf86NumDrivers; i++) { + if (xf86DriverList[i]->AvailableOptions) { + OptionInfoPtr pOption = (OptionInfoPtr)(*xf86DriverList[i]->AvailableOptions)(0,0); + if (! pOption) { + ErrorF ("(EE) Couldn't read option table for %s driver\n", + xf86DriverList[i]->driverName + ); + continue; + } + pSymbol = xalloc ( + strlen(xf86DriverList[i]->driverName) + strlen("ModuleData") + 1 + ); + strcpy (pSymbol, xf86DriverList[i]->driverName); + strcat (pSymbol, "ModuleData"); + initData = LoaderSymbol (pSymbol); + if (initData) { + XF86ModuleVersionInfo *vers = initData->vers; + ErrorF ("Driver[%d]:%s[%s] {\n", + i,xf86DriverList[i]->driverName,vers->vendor + ); + OptionInfoPtr p; + for (p = pOption; p->name != NULL; p++) { + const char *opttype = optionTypeToSting(p->type); + char *optname = xalloc(strlen(p->name) + 2 + 1); + if (!optname) { + continue; + } + sprintf(optname, "%s", p->name); + ErrorF ("\t%s:%s\n", optname,opttype); + } + ErrorF ("}\n"); + } + } + } + bail: + OsCleanup (TRUE); + AbortDDX (); + fflush (stderr); + exit (0); +} diff --git a/xorg-server/hw/xfree86/common/xf86Version.h b/xorg-server/hw/xfree86/common/xf86Version.h deleted file mode 100644 index b93ac7d23..000000000 --- a/xorg-server/hw/xfree86/common/xf86Version.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 1994-2003 by The XFree86 Project, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the copyright holder(s) - * and author(s) shall not be used in advertising or otherwise to promote - * the sale, use or other dealings in this Software without prior written - * authorization from the copyright holder(s) and author(s). - */ - -#ifndef XF86_VERSION_CURRENT - -#define XF86_VERSION_MAJOR 4 -#define XF86_VERSION_MINOR 3 -#define XF86_VERSION_PATCH 99 -#define XF86_VERSION_SNAP 902 - -/* This has five arguments for compatibilty reasons */ -#define XF86_VERSION_NUMERIC(major,minor,patch,snap,dummy) \ - (((major) * 10000000) + ((minor) * 100000) + ((patch) * 1000) + snap) - -#define XF86_GET_MAJOR_VERSION(vers) ((vers) / 10000000) -#define XF86_GET_MINOR_VERSION(vers) (((vers) % 10000000) / 100000) -#define XF86_GET_PATCH_VERSION(vers) (((vers) % 100000) / 1000) -#define XF86_GET_SNAP_VERSION(vers) ((vers) % 1000) - -/* Define these for compatibility. They'll be removed at some point. */ -#define XF86_VERSION_SUBMINOR XF86_VERSION_PATCH -#define XF86_VERSION_BETA 0 -#define XF86_VERSION_ALPHA XF86_VERSION_SNAP - -#define XF86_VERSION_CURRENT \ - XF86_VERSION_NUMERIC(XF86_VERSION_MAJOR, \ - XF86_VERSION_MINOR, \ - XF86_VERSION_PATCH, \ - XF86_VERSION_SNAP, \ - 0) - -#endif diff --git a/xorg-server/hw/xfree86/common/xf86Versions.c b/xorg-server/hw/xfree86/common/xf86Versions.c deleted file mode 100644 index 97a35590e..000000000 --- a/xorg-server/hw/xfree86/common/xf86Versions.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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). - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf86.h" -#include "xf86OSmouse.h" - -static CARD32 registeredVersions[NUM_BUILTIN_IFS]; - -_X_EXPORT CARD32 -xf86GetBuiltinInterfaceVersion(BuiltinInterface iface, int flags) -{ - if (iface < 0 || iface >= NUM_BUILTIN_IFS) { - xf86Msg(X_ERROR, "xf86GetBuiltinInterfaceVersion: Unexpected interface" - "query: %d\n", iface); - return 0; - } - - if (registeredVersions[iface]) - return registeredVersions[iface]; - - /* Most built-in interfaces are handled this way. */ - switch (iface) { - case BUILTIN_IF_OSMOUSE: - return OS_MOUSE_VERSION_CURRENT; - default: - xf86Msg(X_ERROR, "xf86GetBuiltinInterfaceVersion: internal error: " - "interface %d not handled\n", iface); - return 0; - } -} - -_X_EXPORT Bool -xf86RegisterBuiltinInterfaceVersion(BuiltinInterface iface, CARD32 version, - int flags) -{ - if (iface < 0 || iface >= NUM_BUILTIN_IFS) { - xf86Msg(X_ERROR, "xf86RegisterBuiltinInterfaceVersion: " - "unexpected interface number: %d\n", iface); - return FALSE; - } - if (version == 0) { - xf86Msg(X_ERROR, "xf86RegisterBuiltinInterfaceVersion: " - "versions must be greater than zero\n"); - return FALSE; - } - registeredVersions[iface] = version; - return TRUE; -} - diff --git a/xorg-server/hw/xfree86/common/xf86VidMode.c b/xorg-server/hw/xfree86/common/xf86VidMode.c index 9260bb57b..24fccd31b 100644 --- a/xorg-server/hw/xfree86/common/xf86VidMode.c +++ b/xorg-server/hw/xfree86/common/xf86VidMode.c @@ -47,7 +47,8 @@ #include "vidmodeproc.h" #include "xf86cmap.h" -static DevPrivateKey VidModeKey = NULL; +static int VidModeKeyIndex; +static DevPrivateKey VidModeKey; static int VidModeCount = 0; static Bool VidModeClose(int i, ScreenPtr pScreen); @@ -72,7 +73,7 @@ VidModeExtensionInit(ScreenPtr pScreen) return FALSE; } - VidModeKey = &VidModeKey; + VidModeKey = &VidModeKeyIndex; if (!dixSetPrivate(&pScreen->devPrivates, VidModeKey, xcalloc(sizeof(VidModeRec), 1))) { diff --git a/xorg-server/hw/xfree86/common/xf86XKB.c b/xorg-server/hw/xfree86/common/xf86XKB.c deleted file mode 100644 index 11694544a..000000000 --- a/xorg-server/hw/xfree86/common/xf86XKB.c +++ /dev/null @@ -1,80 +0,0 @@ -/************************************************************ -Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, provided that the above copyright -notice appear in all copies and that both that copyright -notice and this permission notice appear in supporting -documentation, and that the name of Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. - -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH -THE USE OR PERFORMANCE OF THIS SOFTWARE. - -********************************************************/ -/* - * Copyright (c) 1994-2002 by The XFree86 Project, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the copyright holder(s) - * and author(s) shall not be used in advertising or otherwise to promote - * the sale, use or other dealings in this Software without prior written - * authorization from the copyright holder(s) and author(s). - */ - - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#define NEED_EVENTS 1 -#include -#include -#include -#include "inputstr.h" -#include "scrnintstr.h" -#include "windowstr.h" -#include - -#include "compiler.h" - -#include "xf86.h" -#include "xf86Priv.h" -#define XF86_OS_PRIVS -#include "xf86_OSlib.h" - -#include - -void -xf86InitXkb(void) -{ -} diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c index 710e787fd..1f412349c 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.c +++ b/xorg-server/hw/xfree86/common/xf86Xinput.c @@ -52,19 +52,17 @@ #include #include -#ifdef XINPUT #include #include -#endif #include "xf86.h" #include "xf86Priv.h" #include "xf86Xinput.h" -#ifdef XINPUT #include "XIstubs.h" #include "xf86Optrec.h" -#endif #include "mipointer.h" #include "xf86InPriv.h" +#include "compiler.h" +#include "extinit.h" #ifdef DPMSExtension #define DPMS_SERVER @@ -86,11 +84,157 @@ #include "mi.h" +#include /* dix pointer acceleration */ + #ifdef XFreeXDGA #include "dgaproc.h" #endif -xEvent *xf86Events = NULL; +#ifdef XKB +#include "xkbsrv.h" +#endif + +#include "os.h" + +EventListPtr xf86Events = NULL; + +/** + * Eval config and modify DeviceVelocityRec accordingly + */ +static void +ProcessVelocityConfiguration(char* devname, pointer list, DeviceVelocityPtr s){ + int tempi, i; + float tempf, tempf2; + + if(!s) + return; + + tempf = xf86SetRealOption(list, "FilterHalflife", -1); + if(tempf > 0) + tempf = 1.0 / tempf; /* set reciprocal if possible */ + + tempf2 = xf86SetRealOption(list, "FilterChainProgression", 2.0); + xf86Msg(X_CONFIG, "%s: (accel) filter chain progression: %.2f\n", + devname, tempf2); + if(tempf2 < 1) + tempf2 = 2; + + tempi = xf86SetIntOption(list, "FilterChainLength", 1); + if(tempi < 1 || tempi > MAX_VELOCITY_FILTERS) + tempi = 1; + + if(tempf > 0.0f && tempi >= 1 && tempf2 >= 1.0f) + InitFilterChain(s, tempf, tempf2, tempi, 40); + + for(i = 0; i < tempi; i++) + xf86Msg(X_CONFIG, "%s: (accel) filter stage %i: %.2f ms\n", + devname, i, 1.0f / (s->filters[i].rdecay)); + + tempf = xf86SetRealOption(list, "ConstantDeceleration", 1.0); + if(tempf > 1.0){ + xf86Msg(X_CONFIG, "%s: (accel) constant deceleration by %.1f\n", + devname, tempf); + s->const_acceleration = 1.0 / tempf; /* set reciprocal deceleration + alias acceleration */ + } + + tempf = xf86SetRealOption(list, "AdaptiveDeceleration", 1.0); + if(tempf > 1.0){ + xf86Msg(X_CONFIG, "%s: (accel) adaptive deceleration by %.1f\n", + devname, tempf); + s->min_acceleration = 1.0 / tempf; /* set minimum acceleration */ + } + + tempf = xf86SetRealOption(list, "VelocityCoupling", -1); + if(tempf >= 0){ + xf86Msg(X_CONFIG, "%s: (accel) velocity coupling is %.1f%%\n", devname, + tempf*100.0); + s->coupling = tempf; + } + + /* Configure softening. If const deceleration is used, this is expected + * to provide better subpixel information so we enable + * softening by default only if ConstantDeceleration is not used + */ + s->use_softening = xf86SetBoolOption(list, "Softening", + s->const_acceleration == 1.0); + + s->average_accel = xf86SetBoolOption(list, "AccelerationProfileAveraging", + s->average_accel); + + s->reset_time = xf86SetIntOption(list, "VelocityReset", s->reset_time); + + tempf = xf86SetRealOption(list, "ExpectedRate", 0); + if(tempf > 0){ + s->corr_mul = 1000.0 / tempf; + }else{ + s->corr_mul = xf86SetRealOption(list, "VelocityScale", s->corr_mul); + } + + /* select profile by number */ + tempi= xf86SetIntOption(list, "AccelerationProfile", + s->statistics.profile_number); + + if(SetAccelerationProfile(s, tempi)){ + xf86Msg(X_CONFIG, "%s: (accel) set acceleration profile %i\n", devname, tempi); + }else{ + xf86Msg(X_CONFIG, "%s: (accel) acceleration profile %i is unknown\n", + devname, tempi); + } +} + +static void +ApplyAccelerationSettings(DeviceIntPtr dev){ + int scheme; + DeviceVelocityPtr pVel; + LocalDevicePtr local = (LocalDevicePtr)dev->public.devicePrivate; + char* schemeStr; + + if(dev->valuator){ + schemeStr = xf86SetStrOption(local->options, "AccelerationScheme", ""); + + scheme = dev->valuator->accelScheme.number; + + if(!xf86NameCmp(schemeStr, "predictable")) + scheme = PtrAccelPredictable; + + if(!xf86NameCmp(schemeStr, "lightweight")) + scheme = PtrAccelLightweight; + + if(!xf86NameCmp(schemeStr, "none")) + scheme = PtrAccelNoOp; + + /* reinit scheme if needed */ + if(dev->valuator->accelScheme.number != scheme){ + if(dev->valuator->accelScheme.AccelCleanupProc){ + dev->valuator->accelScheme.AccelCleanupProc(dev); + } + + if(InitPointerAccelerationScheme(dev, scheme)){ + xf86Msg(X_CONFIG, "%s: (accel) selected scheme %s/%i\n", + local->name, schemeStr, scheme); + }else{ + xf86Msg(X_CONFIG, "%s: (accel) could not init scheme %s\n", + local->name, schemeStr); + scheme = dev->valuator->accelScheme.number; + } + }else{ + xf86Msg(X_CONFIG, "%s: (accel) keeping acceleration scheme %i\n", + local->name, scheme); + } + + xfree(schemeStr); + + /* process special configuration */ + switch(scheme){ + case PtrAccelPredictable: + pVel = GetDevicePredictableAccelData(dev); + ProcessVelocityConfiguration (local->name, local->options, + pVel); + break; + } + } +} static Bool xf86SendDragEvents(DeviceIntPtr device) @@ -135,7 +279,7 @@ xf86ProcessCommonOptions(LocalDevicePtr local, local->history_size = GetMotionHistorySize(); /* Preallocate xEvent store */ if (!xf86Events) - xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + GetEventList(&xf86Events); if (!xf86Events) FatalError("Couldn't allocate event store\n"); } @@ -143,22 +287,28 @@ xf86ProcessCommonOptions(LocalDevicePtr local, /*********************************************************************** * * xf86ActivateDevice -- - * + * * Initialize an input device. * + * Returns TRUE on success, or FALSE otherwise. *********************************************************************** */ -_X_EXPORT void +_X_EXPORT int xf86ActivateDevice(LocalDevicePtr local) { DeviceIntPtr dev; if (local->flags & XI86_CONFIGURED) { - dev = AddInputDevice(local->device_control, TRUE); + dev = AddInputDevice(serverClient, local->device_control, TRUE); if (dev == NULL) - FatalError("Too many input devices"); - + { + xf86Msg(X_ERROR, "Too many input devices. Ignoring %s\n", + local->name); + local->dev = NULL; + return FALSE; + } + local->atom = MakeAtom(local->type_name, strlen(local->type_name), TRUE); @@ -166,9 +316,21 @@ xf86ActivateDevice(LocalDevicePtr local) dev->public.devicePrivate = (pointer) local; local->dev = dev; - dev->coreEvents = local->flags & XI86_ALWAYS_CORE; - RegisterOtherDevice(dev); + dev->coreEvents = local->flags & XI86_ALWAYS_CORE; + dev->isMaster = FALSE; + dev->spriteInfo->spriteOwner = FALSE; + + if (DeviceIsPointerType(dev)) + { + dev->deviceGrab.ActivateGrab = ActivatePointerGrab; + dev->deviceGrab.DeactivateGrab = DeactivatePointerGrab; + } else + { + dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab; + dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; + } + RegisterOtherDevice(dev); #ifdef XKB if (!noXkbExtension) XkbSetExtension(dev, ProcessKeyboardEvent); @@ -178,10 +340,11 @@ xf86ActivateDevice(LocalDevicePtr local) xf86Msg(X_INFO, "XINPUT: Adding extended input device \"%s\" (type: %s)\n", local->name, local->type_name); } + + return TRUE; } -#ifdef XINPUT /*********************************************************************** * * Caller: ProcXOpenDevice @@ -292,6 +455,7 @@ ChangeDeviceControl (ClientPtr client, DeviceIntPtr dev, xDeviceCtl *control) if (!local->control_proc) { switch (control->control) { case DEVICE_CORE: + return BadMatch; case DEVICE_RESOLUTION: case DEVICE_ABS_CALIB: case DEVICE_ABS_AREA: @@ -310,16 +474,107 @@ void AddOtherInputDevices() { } -#endif -int -NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev) +/** + * Create a new input device, activate and enable it. + * + * Possible return codes: + * BadName .. a bad driver name was supplied. + * BadImplementation ... The driver does not have a PreInit function. This + * is a driver bug. + * BadMatch .. device initialization failed. + * BadAlloc .. too many input devices + * + * @param idev The device, already set up with identifier, driver, and the + * options. + * @param pdev Pointer to the new device, if Success was reported. + * @param enable Enable the device after activating it. + * + * @return Success or an error code + */ +_X_INTERNAL int +xf86NewInputDevice(IDevPtr idev, DeviceIntPtr *pdev, BOOL enable) { - IDevRec *idev = NULL; InputDriverPtr drv = NULL; InputInfoPtr pInfo = NULL; - InputOption *option = NULL; DeviceIntPtr dev = NULL; + int rval; + + /* Memory leak for every attached device if we don't + * test if the module is already loaded first */ + drv = xf86LookupInputDriver(idev->driver); + if (!drv) + if (xf86LoadOneModule(idev->driver, NULL)) + drv = xf86LookupInputDriver(idev->driver); + if (!drv) { + xf86Msg(X_ERROR, "No input driver matching `%s'\n", idev->driver); + rval = BadName; + goto unwind; + } + + if (!drv->PreInit) { + xf86Msg(X_ERROR, + "Input driver `%s' has no PreInit function (ignoring)\n", + drv->driverName); + rval = BadImplementation; + goto unwind; + } + + pInfo = drv->PreInit(drv, idev, 0); + + if (!pInfo) { + xf86Msg(X_ERROR, "PreInit returned NULL for \"%s\"\n", idev->identifier); + rval = BadMatch; + goto unwind; + } + else if (!(pInfo->flags & XI86_CONFIGURED)) { + xf86Msg(X_ERROR, "PreInit failed for input device \"%s\"\n", + idev->identifier); + rval = BadMatch; + goto unwind; + } + + if (!xf86ActivateDevice(pInfo)) + { + rval = BadAlloc; + goto unwind; + } + + dev = pInfo->dev; + rval = ActivateDevice(dev); + if (rval != Success) + { + xf86Msg(X_ERROR, "Couldn't init device \"%s\"\n", idev->identifier); + RemoveDevice(dev); + goto unwind; + } + + /* Enable it if it's properly initialised and we're currently in the VT */ + if (enable && dev->inited && dev->startup && xf86Screens[0]->vtSema) + { + EnableDevice(dev); + /* send enter/leave event, update sprite window */ + CheckMotion(NULL, dev); + } + + *pdev = dev; + return Success; + +unwind: + if(pInfo) { + if(drv->UnInit) + drv->UnInit(drv, pInfo, 0); + else + xf86DeleteInput(pInfo, 0); + } + return rval; +} + +_X_EXPORT int +NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev) +{ + IDevRec *idev = NULL; + InputOption *option = NULL; int rval = Success; int is_auto = 0; @@ -333,18 +588,6 @@ NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev) rval = BadRequest; goto unwind; } - /* Memory leak for every attached device if we don't - * test if the module is already loaded first */ - drv = xf86LookupInputDriver(option->value); - if (!drv) - if (xf86LoadOneModule(option->value, NULL)) - drv = xf86LookupInputDriver(option->value); - if (!drv) { - xf86Msg(X_ERROR, "No input driver matching `%s'\n", - option->value); - rval = BadName; - goto unwind; - } idev->driver = xstrdup(option->value); if (!idev->driver) { rval = BadAlloc; @@ -382,12 +625,9 @@ NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev) goto unwind; } - if (!drv->PreInit) { - xf86Msg(X_ERROR, - "Input driver `%s' has no PreInit function (ignoring)\n", - drv->driverName); - rval = BadImplementation; - goto unwind; + if (!idev->identifier) { + xf86Msg(X_ERROR, "No device identifier specified (ignoring)\n"); + return BadMatch; } for (option = options; option; option = option->next) { @@ -399,40 +639,12 @@ NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev) option->value = NULL; } - pInfo = drv->PreInit(drv, idev, 0); - - if (!pInfo) { - xf86Msg(X_ERROR, "PreInit returned NULL for \"%s\"\n", idev->identifier); - rval = BadMatch; - goto unwind; - } - else if (!(pInfo->flags & XI86_CONFIGURED)) { - xf86Msg(X_ERROR, "PreInit failed for input device \"%s\"\n", - idev->identifier); - rval = BadMatch; - goto unwind; - } - - xf86ActivateDevice(pInfo); - - dev = pInfo->dev; - ActivateDevice(dev); - /* Enable it if it's properly initialised, we're currently in the VT, and - * either it's a manual request, or we're automatically enabling devices. */ - if (dev->inited && dev->startup && xf86Screens[0]->vtSema && - (!is_auto || xf86Info.autoEnableDevices)) - EnableDevice(dev); - - *pdev = dev; - return Success; + rval = xf86NewInputDevice(idev, pdev, + (!is_auto || (is_auto && xf86Info.autoEnableDevices))); + if (rval == Success) + return Success; unwind: - if(pInfo) { - if(drv->UnInit) - drv->UnInit(drv, pInfo, 0); - else - xf86DeleteInput(pInfo, 0); - } if(idev->driver) xfree(idev->driver); if(idev->identifier) @@ -442,50 +654,51 @@ unwind: return rval; } -void +_X_EXPORT void DeleteInputDeviceRequest(DeviceIntPtr pDev) { LocalDevicePtr pInfo = (LocalDevicePtr) pDev->public.devicePrivate; - InputDriverPtr drv; - IDevRec *idev; - BOOL found; + InputDriverPtr drv = NULL; + IDevRec *idev = NULL; IDevPtr *it; + Bool isMaster = pDev->isMaster; if (pInfo) /* need to get these before RemoveDevice */ { drv = pInfo->drv; idev = pInfo->conf_idev; } - RemoveDevice(pDev); - if (!pInfo) /* VCP and VCK */ - return; - - if(drv->UnInit) - drv->UnInit(drv, pInfo, 0); - else - xf86DeleteInput(pInfo, 0); - - /* devices added through HAL aren't in the config layout */ - it = xf86ConfigLayout.inputs; - while(*it && *it != idev) - it++; + OsBlockSignals(); + RemoveDevice(pDev); - if (!(*it)) /* end of list, not in the layout */ + if (!isMaster) { - xfree(idev->driver); - xfree(idev->identifier); - xf86optionListFree(idev->commonOptions); - xfree(idev); + if(drv->UnInit) + drv->UnInit(drv, pInfo, 0); + else + xf86DeleteInput(pInfo, 0); + + /* devices added through HAL aren't in the config layout */ + it = xf86ConfigLayout.inputs; + while(*it && *it != idev) + it++; + + if (!(*it)) /* end of list, not in the layout */ + { + xfree(idev->driver); + xfree(idev->identifier); + xf86optionListFree(idev->commonOptions); + xfree(idev); + } } + OsReleaseSignals(); } /* * convenient functions to post events */ -#define MAX_VALUATORS 36 /* XXX from comment in dix/getevents.c */ - _X_EXPORT void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute, @@ -498,8 +711,8 @@ xf86PostMotionEvent(DeviceIntPtr device, static int valuators[MAX_VALUATORS]; if (num_valuators > MAX_VALUATORS) { - xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d" - " is greater than MAX_VALUATORS\n", num_valuators); + xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" + " MAX_VALUATORS\n", __FUNCTION__, num_valuators); return; } @@ -519,15 +732,15 @@ xf86PostMotionEventP(DeviceIntPtr device, int *valuators) { int i = 0, nevents = 0; - int dx, dy; + int dx = 0, dy = 0; Bool drag = xf86SendDragEvents(device); xEvent *xE = NULL; int index; int flags = 0; if (num_valuators > MAX_VALUATORS) { - xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d" - " is greater than MAX_VALUATORS\n", num_valuators); + xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" + " MAX_VALUATORS\n", __FUNCTION__, num_valuators); return; } @@ -537,36 +750,41 @@ xf86PostMotionEventP(DeviceIntPtr device, flags = POINTER_RELATIVE | POINTER_ACCELERATE; #if XFreeXDGA - if (first_valuator == 0 && num_valuators >= 2) { - if (miPointerGetScreen(inputInfo.pointer)) { - index = miPointerGetScreen(inputInfo.pointer)->myNum; - if (is_absolute) { - dx = valuators[0] - device->valuator->lastx; - dy = valuators[1] - device->valuator->lasty; - } - else { + /* The evdev driver may not always send all axes across. */ + if (num_valuators >= 1 && first_valuator <= 1) { + if (miPointerGetScreen(device)) { + index = miPointerGetScreen(device)->myNum; + if (first_valuator == 0) + { dx = valuators[0]; - dy = valuators[1]; + if (is_absolute) + dx -= device->last.valuators[0]; } - if (DGAStealMotionEvent(index, dx, dy)) + + if (first_valuator == 1 || num_valuators >= 2) + { + dy = valuators[1 - first_valuator]; + if (is_absolute) + dy -= device->last.valuators[1]; + } + + if (DGAStealMotionEvent(device, index, dx, dy)) return; } } #endif - if (!xf86Events) - FatalError("Didn't allocate event store\n"); - + GetEventList(&xf86Events); nevents = GetPointerEvents(xf86Events, device, MotionNotify, 0, flags, first_valuator, num_valuators, valuators); for (i = 0; i < nevents; i++) { - xE = xf86Events + i; + xE = (xf86Events + i)->event; /* Don't post core motion events for devices not registered to send * drag events. */ if (xE->u.u.type != MotionNotify || drag) { - mieqEnqueue(device, xf86Events + i); + mieqEnqueue(device, (xf86Events + i)->event); } } } @@ -584,8 +802,8 @@ xf86PostProximityEvent(DeviceIntPtr device, if (num_valuators > MAX_VALUATORS) { - xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d" - " is greater than MAX_VALUATORS\n", num_valuators); + xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" + " MAX_VALUATORS\n", __FUNCTION__, num_valuators); return; } @@ -594,14 +812,12 @@ xf86PostProximityEvent(DeviceIntPtr device, valuators[i] = va_arg(var, int); va_end(var); - if (!xf86Events) - FatalError("Didn't allocate event store\n"); - + GetEventList(&xf86Events); nevents = GetProximityEvents(xf86Events, device, is_in ? ProximityIn : ProximityOut, first_valuator, num_valuators, valuators); for (i = 0; i < nevents; i++) - mieqEnqueue(device, xf86Events + i); + mieqEnqueue(device, (xf86Events + i)->event); } @@ -620,34 +836,32 @@ xf86PostButtonEvent(DeviceIntPtr device, int index; #if XFreeXDGA - if (miPointerGetScreen(inputInfo.pointer)) { - index = miPointerGetScreen(inputInfo.pointer)->myNum; - if (DGAStealButtonEvent(index, button, is_down)) + if (miPointerGetScreen(device)) { + index = miPointerGetScreen(device)->myNum; + if (DGAStealButtonEvent(device, index, button, is_down)) return; } #endif if (num_valuators > MAX_VALUATORS) { - xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d" - " is greater than MAX_VALUATORS\n", num_valuators); + xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" + " MAX_VALUATORS\n", __FUNCTION__, num_valuators); return; } - + va_start(var, num_valuators); for (i = 0; i < num_valuators; i++) valuators[i] = va_arg(var, int); va_end(var); - if (!xf86Events) - FatalError("Didn't allocate event store\n"); - + GetEventList(&xf86Events); nevents = GetPointerEvents(xf86Events, device, is_down ? ButtonPress : ButtonRelease, button, - is_absolute ? POINTER_ABSOLUTE : - POINTER_RELATIVE, + (is_absolute) ? POINTER_ABSOLUTE : POINTER_RELATIVE, first_valuator, num_valuators, valuators); for (i = 0; i < nevents; i++) - mieqEnqueue(device, xf86Events + i); + mieqEnqueue(device, (xf86Events + i)->event); + } _X_EXPORT void @@ -669,20 +883,18 @@ xf86PostKeyEvent(DeviceIntPtr device, "broken.\n"); if (num_valuators > MAX_VALUATORS) { - xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d" - " is greater than MAX_VALUATORS\n", num_valuators); + xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" + " MAX_VALUATORS\n", __FUNCTION__, num_valuators); return; } - if (!xf86Events) - FatalError("Didn't allocate event store\n"); - if (is_absolute) { va_start(var, num_valuators); for (i = 0; i < num_valuators; i++) valuators[i] = va_arg(var, int); va_end(var); + GetEventList(&xf86Events); nevents = GetKeyboardValuatorEvents(xf86Events, device, is_down ? KeyPress : KeyRelease, key_code, first_valuator, @@ -695,7 +907,7 @@ xf86PostKeyEvent(DeviceIntPtr device, } for (i = 0; i < nevents; i++) - mieqEnqueue(device, xf86Events + i); + mieqEnqueue(device, (xf86Events + i)->event); } _X_EXPORT void @@ -707,21 +919,24 @@ xf86PostKeyboardEvent(DeviceIntPtr device, int index; #if XFreeXDGA - if (miPointerGetScreen(inputInfo.pointer)) { - index = miPointerGetScreen(inputInfo.pointer)->myNum; - if (DGAStealKeyEvent(index, key_code, is_down)) + DeviceIntPtr pointer; + + /* Some pointers send key events, paired device is wrong then. */ + pointer = IsPointerDevice(device) ? device : GetPairedDevice(device); + + if (miPointerGetScreen(pointer)) { + index = miPointerGetScreen(pointer)->myNum; + if (DGAStealKeyEvent(device, index, key_code, is_down)) return; } #endif - if (!xf86Events) - FatalError("Didn't allocate event store\n"); - + GetEventList(&xf86Events); nevents = GetKeyboardEvents(xf86Events, device, is_down ? KeyPress : KeyRelease, key_code); for (i = 0; i < nevents; i++) - mieqEnqueue(device, xf86Events + i); + mieqEnqueue(device, (xf86Events + i)->event); } _X_EXPORT LocalDevicePtr @@ -763,10 +978,10 @@ xf86ScaleAxis(int Cx, ErrorF ("Divide by Zero in xf86ScaleAxis"); } - if (X > Sxlow) - X = Sxlow; - if (X < Sxhigh) + if (X > Sxhigh) X = Sxhigh; + if (X < Sxlow) + X = Sxlow; return (X); } @@ -810,12 +1025,15 @@ xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum) { if (axnum == 0) { dev->valuator->axisVal[0] = screenInfo.screens[0]->width / 2; - dev->valuator->lastx = dev->valuator->axisVal[0]; + dev->last.valuators[0] = dev->valuator->axisVal[0]; } else if (axnum == 1) { dev->valuator->axisVal[1] = screenInfo.screens[0]->height / 2; - dev->valuator->lasty = dev->valuator->axisVal[1]; + dev->last.valuators[1] = dev->valuator->axisVal[1]; } + + if(axnum == 0) /* to prevent double invocation */ + ApplyAccelerationSettings(dev); } diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.h b/xorg-server/hw/xfree86/common/xf86Xinput.h index d88bbbeee..2ca2073f9 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.h +++ b/xorg-server/hw/xfree86/common/xf86Xinput.h @@ -57,11 +57,9 @@ #endif #include "xf86str.h" #include "inputstr.h" -#ifdef XINPUT #include #include #include "XIstubs.h" -#endif /* Input device flags */ #define XI86_OPEN_ON_INIT 0x01 /* open the device at startup time */ @@ -89,7 +87,6 @@ #define TS_Raw 60 #define TS_Scaled 61 -#ifdef XINPUT /* This holds the input driver entry and module information. */ typedef struct _InputDriverRec { int driverVersion; @@ -103,7 +100,6 @@ typedef struct _InputDriverRec { pointer module; int refCount; } InputDriverRec, *InputDriverPtr; -#endif /* This is to input devices what the ScrnInfoRec is to screens. */ @@ -174,10 +170,7 @@ void xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down, ...); void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down); -void xf86XinputFinalizeInit(DeviceIntPtr dev); -void xf86ActivateDevice(LocalDevicePtr local); -Bool xf86CheckButton(int button, int down); -void xf86SwitchCoreDevice(LocalDevicePtr device, DeviceIntPtr core); +int xf86ActivateDevice(LocalDevicePtr local); LocalDevicePtr xf86FirstLocalDevice(void); int xf86ScaleAxis(int Cx, int Sxhigh, int Sxlow, int Rxhigh, int Rxlow); void xf86XInputSetScreen(LocalDevicePtr local, int screen_number, int x, int y); @@ -190,6 +183,7 @@ void xf86AddEnabledDevice(InputInfoPtr pInfo); void xf86RemoveEnabledDevice(InputInfoPtr pInfo); void xf86DisableDevice(DeviceIntPtr dev, Bool panic); void xf86EnableDevice(DeviceIntPtr dev); +int xf86NewInputDevice(IDevPtr idev, DeviceIntPtr *pdev, BOOL is_auto); /* xf86Helper.c */ void xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags); @@ -201,7 +195,7 @@ void xf86DeleteInput(InputInfoPtr pInp, int flags); void xf86MotionHistoryAllocate(LocalDevicePtr local); int xf86GetMotionEvents(DeviceIntPtr dev, xTimecoord *buff, unsigned long start, unsigned long stop, - ScreenPtr pScreen); + ScreenPtr pScreen, BOOL core); /* xf86Option.c */ void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts, diff --git a/xorg-server/hw/xfree86/common/xf86cmap.c b/xorg-server/hw/xfree86/common/xf86cmap.c index 764647ee4..e57844764 100644 --- a/xorg-server/hw/xfree86/common/xf86cmap.c +++ b/xorg-server/hw/xfree86/common/xf86cmap.c @@ -29,8 +29,7 @@ #include #endif -#if defined(_XOPEN_SOURCE) || defined(__QNXNTO__) \ - || (defined(sun) && defined(__SVR4)) +#if defined(_XOPEN_SOURCE) || defined(sun) && defined(__SVR4) #include #else #define _XOPEN_SOURCE /* to get prototype for pow on some systems */ @@ -102,8 +101,10 @@ typedef struct { int overscan; } CMapColormapRec, *CMapColormapPtr; -static DevPrivateKey CMapScreenKey = NULL; -static DevPrivateKey CMapColormapKey = &CMapColormapKey; +static int CMapScreenKeyIndex; +static DevPrivateKey CMapScreenKey; +static int CMapColormapKeyIndex; +static DevPrivateKey CMapColormapKey = &CMapColormapKeyIndex; static void CMapInstallColormap(ColormapPtr); static void CMapStoreColors(ColormapPtr, int, xColorItem *); @@ -143,7 +144,7 @@ _X_EXPORT Bool xf86HandleColormaps( if(!maxColors || !sigRGBbits || !loadPalette) return FALSE; - CMapScreenKey = &CMapScreenKey; + CMapScreenKey = &CMapScreenKeyIndex; elements = 1 << sigRGBbits; diff --git a/xorg-server/hw/xfree86/common/xf86fbman.c b/xorg-server/hw/xfree86/common/xf86fbman.c index 9fd2e6c70..5471c58f0 100644 --- a/xorg-server/hw/xfree86/common/xf86fbman.c +++ b/xorg-server/hw/xfree86/common/xf86fbman.c @@ -42,14 +42,15 @@ #define DEBUG */ -static DevPrivateKey xf86FBManagerKey = NULL; +static int xf86FBManagerKeyIndex; +static DevPrivateKey xf86FBManagerKey; _X_EXPORT Bool xf86RegisterOffscreenManager( ScreenPtr pScreen, FBManagerFuncsPtr funcs ){ - xf86FBManagerKey = &xf86FBManagerKey; + xf86FBManagerKey = &xf86FBManagerKeyIndex; dixSetPrivate(&pScreen->devPrivates, xf86FBManagerKey, funcs); return TRUE; @@ -269,7 +270,8 @@ xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen) \************************************************************/ -static DevPrivateKey xf86FBScreenKey = &xf86FBScreenKey; +static int xf86FBScreenKeyIndex; +static DevPrivateKey xf86FBScreenKey = &xf86FBScreenKeyIndex; typedef struct _FBLink { FBArea area; diff --git a/xorg-server/hw/xfree86/common/xf86isaBus.c b/xorg-server/hw/xfree86/common/xf86isaBus.c deleted file mode 100644 index 3abad38ef..000000000 --- a/xorg-server/hw/xfree86/common/xf86isaBus.c +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 1997-2000 by The XFree86 Project, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the copyright holder(s) - * and author(s) shall not be used in advertising or otherwise to promote - * the sale, use or other dealings in this Software without prior written - * authorization from the copyright holder(s) and author(s). - */ - - -/* - * This file contains the interfaces to the bus-specific code - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include "os.h" -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86Resources.h" - -#include "xf86Bus.h" - -#define XF86_OS_PRIVS -#define NEED_OS_RAC_PROTOS -#include "xf86_OSproc.h" - -#include "xf86RAC.h" - -Bool isaSlotClaimed = FALSE; - -/* - * If the slot requested is already in use, return FALSE. - * Otherwise, claim the slot for the screen requesting it. - */ - -_X_EXPORT int -xf86ClaimIsaSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active) -{ - EntityPtr p; - BusAccPtr pbap = xf86BusAccInfo; - int num; - - num = xf86AllocateEntity(); - p = xf86Entities[num]; - p->driver = drvp; - p->chipset = chipset; - p->busType = BUS_ISA; - p->active = active; - p->inUse = FALSE; - xf86AddDevToEntity(num, dev); - p->access = xnfcalloc(1,sizeof(EntityAccessRec)); - p->access->fallback = &AccessNULL; - p->access->pAccess = &AccessNULL; - p->busAcc = NULL; - while (pbap) { - if (pbap->type == BUS_ISA) - p->busAcc = pbap; - pbap = pbap->next; - } - isaSlotClaimed = TRUE; - return num; -} - -/* - * Get the list of ISA "slots" claimed by a screen - * - * Note: The ISA implementation here assumes that only one ISA "slot" type - * can be claimed by any one screen. That means a return value other than - * 0 or 1 isn't useful. - */ -int -xf86GetIsaInfoForScreen(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->busType == BUS_ISA) { - num++; - } - } - return num; -} - -/* - * Parse a BUS ID string, and return True if it is a ISA bus id. - */ - -_X_EXPORT Bool -xf86ParseIsaBusString(const char *busID) -{ - /* - * The format assumed to be "isa" or "isa:" - */ - return (StringToBusType(busID,NULL) == BUS_ISA); -} - - -/* - * xf86IsPrimaryIsa() -- return TRUE if primary device - * is ISA. - */ - -_X_EXPORT Bool -xf86IsPrimaryIsa(void) -{ - return ( primaryBus.type == BUS_ISA ); -} - -void -isaConvertRange2Host(resRange *pRange) -{ - return; -} diff --git a/xorg-server/hw/xfree86/common/xf86pciBus.c b/xorg-server/hw/xfree86/common/xf86pciBus.c index d5ae75b3a..5b29a1511 100644 --- a/xorg-server/hw/xfree86/common/xf86pciBus.c +++ b/xorg-server/hw/xfree86/common/xf86pciBus.c @@ -417,18 +417,16 @@ xf86PciProbe(void) if (xf86IsPrimaryPci(info)) prim = "*"; - xf86Msg( X_PROBED, "PCI:%s(%u@%u:%u:%u) ", prim, info->domain, - info->bus, info->dev, info->func ); + xf86Msg(X_PROBED, "PCI:%s(%u:%u:%u:%u) %04x:%04x:%04x:%04x ", prim, + info->domain, info->bus, info->dev, info->func, + info->vendor_id, info->device_id, + info->subvendor_id, info->subdevice_id); if (vendorname) xf86ErrorF("%s ", vendorname); - else - xf86ErrorF("unknown vendor (0x%04x) ", info->vendor_id); if (chipname) xf86ErrorF("%s ", chipname); - else - xf86ErrorF("unknown chipset (0x%04x) ", info->device_id); xf86ErrorF("rev %d", info->revision); @@ -441,7 +439,7 @@ xf86PciProbe(void) memdone = TRUE; } else xf86ErrorF(", "); - xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size); + xf86ErrorF("0x%08lx/%ld", (long)r->base_addr, (long)r->size); } } @@ -454,12 +452,12 @@ xf86PciProbe(void) iodone = TRUE; } else xf86ErrorF(", "); - xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size); + xf86ErrorF("0x%08lx/%ld", (long)r->base_addr, (long)r->size); } } if ( info->rom_size ) { - xf86ErrorF(", BIOS @ 0x\?\?\?\?\?\?\?\?/%ld", info->rom_size); + xf86ErrorF(", BIOS @ 0x\?\?\?\?\?\?\?\?/%ld", (long)info->rom_size); } xf86ErrorF("\n"); @@ -564,11 +562,6 @@ initPciBusState(void) pbap->disable_f = pciBusAccessDisable; savePciBusState(pbap); break; - case PCI_SUBCLASS_BRIDGE_ISA: - case PCI_SUBCLASS_BRIDGE_EISA: - case PCI_SUBCLASS_BRIDGE_MC: - pbap->type = BUS_ISA; - break; } pbap->next = xf86BusAccInfo; xf86BusAccInfo = pbap; diff --git a/xorg-server/hw/xfree86/common/xf86pciBus.h b/xorg-server/hw/xfree86/common/xf86pciBus.h index 7d08502fc..1cbfa38ea 100644 --- a/xorg-server/hw/xfree86/common/xf86pciBus.h +++ b/xorg-server/hw/xfree86/common/xf86pciBus.h @@ -70,6 +70,5 @@ void PciBusStateEnter(void); void PciStateLeave(void); void PciBusStateLeave(void); void pciConvertRange2Host(int entityIndex, resRange *pRange); -void isaConvertRange2Host(resRange *pRange); #endif /* _XF86_PCI_BUS_H */ diff --git a/xorg-server/hw/xfree86/common/xf86sbusBus.c b/xorg-server/hw/xfree86/common/xf86sbusBus.c index 63d1cb31c..af2b14539 100644 --- a/xorg-server/hw/xfree86/common/xf86sbusBus.c +++ b/xorg-server/hw/xfree86/common/xf86sbusBus.c @@ -602,7 +602,8 @@ xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp) pScrn->virtualY = psdp->height; } -static DevPrivateKey sbusPaletteKey = &sbusPaletteKey; +static sbusPaletteKeyIndex; +static DevPrivateKey sbusPaletteKey = &sbusPaletteKeyIndex; typedef struct _sbusCmap { sbusDevicePtr psdp; CloseScreenProcPtr CloseScreen; diff --git a/xorg-server/hw/xfree86/common/xf86sbusBus.h b/xorg-server/hw/xfree86/common/xf86sbusBus.h index 8576409d4..6161a08e2 100644 --- a/xorg-server/hw/xfree86/common/xf86sbusBus.h +++ b/xorg-server/hw/xfree86/common/xf86sbusBus.h @@ -60,6 +60,7 @@ extern struct sbus_devtable { int devId; int fbType; char *promName; + char *driverName; char *descr; } sbusDeviceTable[]; @@ -93,5 +94,6 @@ int sparcPromGetBool(sbusPromNodePtr pnode, const char *prop); void sparcPromAssignNodes(void); char * sparcPromNode2Pathname(sbusPromNodePtr pnode); int sparcPromPathname2Node(const char *pathName); +char *sparcDriverName(void); #endif /* _XF86_SBUSBUS_H */ diff --git a/xorg-server/hw/xfree86/common/xf86str.h b/xorg-server/hw/xfree86/common/xf86str.h index fc94284cb..904c369a6 100644 --- a/xorg-server/hw/xfree86/common/xf86str.h +++ b/xorg-server/hw/xfree86/common/xf86str.h @@ -382,10 +382,6 @@ typedef enum { struct pci_device; -typedef struct { - unsigned int dummy; -} IsaBusId; - typedef struct { int fbNum; } SbusBusId; @@ -393,7 +389,6 @@ typedef struct { typedef struct _bus { BusType type; union { - IsaBusId isa; struct pci_device *pci; SbusBusId sbus; } id; @@ -436,8 +431,6 @@ typedef struct { int screen; /* For multi-CRTC cards */ } GDevRec, *GDevPtr; -typedef int (*FindIsaDevProc)(GDevPtr dev); - typedef struct { char * identifier; char * driver; @@ -623,9 +616,6 @@ typedef struct _CurrAccRec { #define ResMem 0x0001 #define ResIo 0x0002 -#define ResIrq 0x0003 -#define ResDma 0x0004 -#define ResPciCfg 0x000e /* PCI Configuration space */ #define ResPhysMask 0x000F #define ResExclusive 0x0010 @@ -648,7 +638,6 @@ typedef struct _CurrAccRec { #define ResMiscMask 0x00F000 #define ResBus 0x010000 -#define ResOverlap 0x020000 #if defined(__alpha__) && defined(linux) # define ResDomain 0x1ff000000ul @@ -687,7 +676,6 @@ typedef struct _CurrAccRec { #define ResIsBlock(r) (((r)->type & ResExtMask) == ResBlock) #define ResIsSparse(r) (((r)->type & ResExtMask) == ResSparse) #define ResIsEstimated(r) (((r)->type & ResMiscMask) == ResEstimated) -#define ResCanOverlap(r) (ResIsEstimated(r) || ((r)->type & ResOverlap)) typedef struct { unsigned long type; /* shared, exclusive, unused etc. */ @@ -722,11 +710,6 @@ typedef struct _resRec { #define block_end val.rEnd #define res_type val.type -typedef struct { - int numChipset; - resRange *resList; -} IsaChipsets; - typedef struct _PciChipsets { /** * Key used to match this device with its name in an array of @@ -851,7 +834,6 @@ typedef int xf86SetDGAModeProc (int, int, DGADevicePtr); typedef int xf86ChangeGammaProc (int, Gamma); typedef void xf86PointerMovedProc (int, int, int); typedef Bool xf86PMEventProc (int, pmEvent, Bool); -typedef int xf86HandleMessageProc (int, const char*, const char*, char**); typedef void xf86DPMSSetProc (ScrnInfoPtr, int, int); typedef void xf86LoadPaletteProc (ScrnInfoPtr, int, int *, LOCO *, VisualPtr); typedef void xf86SetOverscanProc (ScrnInfoPtr, int); @@ -1006,7 +988,6 @@ typedef struct _ScrnInfoRec { xf86ChangeGammaProc *ChangeGamma; xf86PointerMovedProc *PointerMoved; xf86PMEventProc *PMEvent; - xf86HandleMessageProc *HandleMessage; xf86DPMSSetProc *DPMSSet; xf86LoadPaletteProc *LoadPalette; xf86SetOverscanProc *SetOverscan; @@ -1090,14 +1071,6 @@ typedef void (*InputHandlerProc)(int fd, pointer data); #define CLK_REG_SAVE -1 #define CLK_REG_RESTORE -2 -/* xf86Debug.c */ -#ifdef BUILDDEBUG -typedef struct { - long sec; - long usec; -} xf86TsRec, *xf86TsPtr; -#endif - /* * misc constants */ @@ -1111,13 +1084,6 @@ typedef struct { #define OVERLAY_8_16_DUALFB 0x00000004 #define OVERLAY_8_32_PLANAR 0x00000008 -#if 0 -#define LD_RESOLV_IFDONE 0 /* only check if no more - delays pending */ -#define LD_RESOLV_NOW 1 /* finish one delay step */ -#define LD_RESOLV_FORCE 2 /* force checking... */ -#endif - /* Values of xf86Info.mouseFlags */ #define MF_CLEAR_DTR 1 #define MF_CLEAR_RTS 2 @@ -1127,36 +1093,9 @@ typedef enum { ACTION_TERMINATE = 0, /* Terminate Server */ ACTION_NEXT_MODE = 10, /* Switch to next video mode */ ACTION_PREV_MODE, - ACTION_DISABLEGRAB = 20, /* Cancel server/pointer/kbd grabs */ - ACTION_CLOSECLIENT, /* Kill client holding grab */ ACTION_SWITCHSCREEN = 100, /* VT switch */ ACTION_SWITCHSCREEN_NEXT, ACTION_SWITCHSCREEN_PREV, - ACTION_MESSAGE = 9999 /* Generic message passing */ } ActionEvent; -/* xf86Versions.c */ -/* - * Never change existing values, and always assign values explicitly. - * NUM_BUILTIN_IFS must always be the last entry. - */ -typedef enum { - BUILTIN_IF_OSMOUSE = 0, - BUILTIN_IF_OSKBD = 1, - NUM_BUILTIN_IFS -} BuiltinInterface; - -/* - * These are intentionally the same as the module version macros. - * It is possible to register a module as providing a specific interface, - * in which case the module's version is used. This feature isn't - * really ready for use yet though. - */ - -#define BUILTIN_INTERFACE_VERSION_NUMERIC(maj, min, patch) \ - ((((maj) & 0xFF) << 24) | (((min) & 0xFF) << 16) | (patch & 0xFFFF)) -#define GET_BUILTIN_INTERFACE_MAJOR_VERSION(vers) (((vers) >> 24) & 0xFF) -#define GET_BUILTIN_INTERFACE_MINOR_VERSION(vers) (((vers) >> 16) & 0xFF) -#define GET_BUILTIN_INTERFACE_PATCH_VERSION(vers) ((vers) & 0xFFFF) - #endif /* _XF86STR_H */ diff --git a/xorg-server/hw/xfree86/common/xf86xv.c b/xorg-server/hw/xfree86/common/xf86xv.c index 7483e20d2..02d6e37a4 100644 --- a/xorg-server/hw/xfree86/common/xf86xv.c +++ b/xorg-server/hw/xfree86/common/xf86xv.c @@ -110,8 +110,10 @@ static void xf86XVAdjustFrame(int index, int x, int y, int flags); static Bool xf86XVInitAdaptors(ScreenPtr, XF86VideoAdaptorPtr*, int); -static DevPrivateKey XF86XVWindowKey = &XF86XVWindowKey; -DevPrivateKey XF86XvScreenKey; +static int XF86XVWindowKeyIndex; +static DevPrivateKey XF86XVWindowKey = &XF86XVWindowKeyIndex; +static int XF86XvScreenKeyIndex; +DevPrivateKey XF86XvScreenKey = &XF86XvScreenKeyIndex; static unsigned long PortResource = 0; DevPrivateKey (*XvGetScreenKeyProc)(void) = NULL; @@ -962,9 +964,8 @@ xf86XVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) } if(!winPriv) { - winPriv = xalloc(sizeof(XF86XVWindowRec)); + winPriv = xcalloc(1, sizeof(XF86XVWindowRec)); if(!winPriv) return BadAlloc; - memset(winPriv, 0, sizeof(XF86XVWindowRec)); winPriv->PortRec = portPriv; winPriv->next = PrivRoot; dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey, winPriv); @@ -1173,7 +1174,7 @@ xf86XVCloseScreen(int i, ScreenPtr pScreen) int c; /* Clear offscreen images */ - (void)memset(&OffscreenImages[pScreen->myNum], 0, sizeof(OffscreenImages[0])); + memset(&OffscreenImages[pScreen->myNum], 0, sizeof(OffscreenImages[0])); if(!ScreenPriv) return TRUE; diff --git a/xorg-server/hw/xfree86/common/xf86xvmc.c b/xorg-server/hw/xfree86/common/xf86xvmc.c index 05267a240..41ef0a0ca 100644 --- a/xorg-server/hw/xfree86/common/xf86xvmc.c +++ b/xorg-server/hw/xfree86/common/xf86xvmc.c @@ -56,7 +56,8 @@ typedef struct { XvMCAdaptorPtr dixinfo; } xf86XvMCScreenRec, *xf86XvMCScreenPtr; -static DevPrivateKey XF86XvMCScreenKey = &XF86XvMCScreenKey; +static int XF86XvMCScreenKeyIndex; +static DevPrivateKey XF86XvMCScreenKey = &XF86XvMCScreenKeyIndex; #define XF86XVMC_GET_PRIVATE(pScreen) (xf86XvMCScreenPtr) \ dixLookupPrivate(&(pScreen)->devPrivates, XF86XvMCScreenKey) diff --git a/xorg-server/hw/xfree86/common/xisb.c b/xorg-server/hw/xfree86/common/xisb.c index d021ec15b..6314094a0 100644 --- a/xorg-server/hw/xfree86/common/xisb.c +++ b/xorg-server/hw/xfree86/common/xisb.c @@ -41,7 +41,6 @@ #include #include -#include #include #include #include diff --git a/xorg-server/hw/xfree86/ddc/DDC.HOWTO b/xorg-server/hw/xfree86/ddc/DDC.HOWTO index 833a7ab54..1d06ca124 100644 --- a/xorg-server/hw/xfree86/ddc/DDC.HOWTO +++ b/xorg-server/hw/xfree86/ddc/DDC.HOWTO @@ -6,24 +6,24 @@ When implementing DDC in the driver one has the choice between DDC1 and DDC2. - DDC1 data is contiuously transmitted by a DDC1 capable display + DDC1 data is continuously transmitted by a DDC1 capable display device. The data is send serially over a data line; the Vsync signal serves as clock. Only one EDID 1.x data block can be transmitted using DDC1. Since transmission of an EDID1 block using a regular Vsync frequency would take up several seconds the driver can increase the Vsync frequency to up to 25 kHz as - soon as it detects DDC1 activety on the data line. + soon as it detects DDC1 activity on the data line. DDC2 data is transmitted using the I2C protocol. This requires an additional clock line. DDC2 is capable of transmitting EDID1 and EDID2 block as well as a VDIF block on display devices that support these. Display devices switch into the DDC2 mode as soon as they detect - activety on the DDC clock line. Once the are in DDC2 mode they + activity on the DDC clock line. Once the are in DDC2 mode they stop transmitting DDC1 signals until the next power cycle. Some graphics chipset configurations which are not capable of DDC2 might still be able to read DDC1 data. Where available - DDC2 it is preferrable. + DDC2 it is preferable. All relevant prototypes and defines are in xf86DDC.h. DDC2 additionally requires I2C support. The I2C prototypes @@ -37,7 +37,7 @@ unsigned int XXX_ddc1Read(ScrnInfoPtr pScrn) - Additionally a function is required to inclrease the Vsync + Additionally a function is required to increase the Vsync frequency to max. 25 kHz. void XXX_ddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed) @@ -58,7 +58,7 @@ in PreInit(). DDC1SetSpeed is a pointer to the SetSpeed() function, DDC1Read has to point to the DDC1 read function. The function will return a pointer to the xf86Monitor structure - which contains all information retreived by DDC. + which contains all information retrieved by DDC. NULL will be returned on failure. DDC2 Support @@ -73,7 +73,7 @@ to the I2CBusRec of the appropriate I2C Bus has to be passed as the second argument. The function will return a pointer to the xf86Monitor structure - which contains all information retreived by DDC. + which contains all information retrieved by DDC. NULL will be returned on failure. Printing monitor parameters @@ -86,7 +86,7 @@ is provided. Further processing of the xf86Monitor structure is not yet - implemented. Howerver it is planned to use the information + implemented. However, it is planned to use the information about video modes, gamma values etc. Therefore it is strongly recommended to read out DDC data before any video mode processing is done. diff --git a/xorg-server/hw/xfree86/ddc/Makefile.in b/xorg-server/hw/xfree86/ddc/Makefile.in index 9016bc200..3e7813965 100644 --- a/xorg-server/hw/xfree86/ddc/Makefile.in +++ b/xorg-server/hw/xfree86/ddc/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,7 +45,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -64,9 +63,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -90,8 +86,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -112,10 +109,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -137,6 +130,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -146,18 +140,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -176,7 +167,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -190,7 +181,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -202,8 +196,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -212,8 +205,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -246,7 +239,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -256,27 +248,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -287,10 +264,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -299,13 +272,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -338,8 +306,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -359,7 +326,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -369,12 +335,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -392,8 +358,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ sdk_HEADERS = edid.h xf86DDC.h noinst_LIBRARIES = libddc.a libddc_a_SOURCES = xf86DDC.c edid.c interpret_edid.c print_edid.c \ @@ -410,8 +374,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -504,7 +468,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/ddc/ddcProperty.c b/xorg-server/hw/xfree86/ddc/ddcProperty.c index 02125dff7..a4384f1d3 100644 --- a/xorg-server/hw/xfree86/ddc/ddcProperty.c +++ b/xorg-server/hw/xfree86/ddc/ddcProperty.c @@ -83,13 +83,18 @@ addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC) } if (makeEDID1prop) { - if ((EDID1rawdata = xalloc(128*sizeof(CARD8)))==NULL) + int size = 128; + + if (DDC->flags & EDID_COMPLETE_RAWDATA) + size += DDC->no_sections * 128; + + if ((EDID1rawdata = xalloc(size*sizeof(CARD8)))==NULL) return; EDID1Atom = MakeAtom(EDID1_ATOM_NAME, sizeof(EDID1_ATOM_NAME) - 1, TRUE); - memcpy(EDID1rawdata, DDC->rawData, 128); + memcpy(EDID1rawdata, DDC->rawData, size); xf86RegisterRootWindowProperty(scrnIndex, EDID1Atom, XA_INTEGER, 8, - 128, (unsigned char *)EDID1rawdata); + size, (unsigned char *)EDID1rawdata); } if (makeEDID2prop) { diff --git a/xorg-server/hw/xfree86/ddc/edid.h b/xorg-server/hw/xfree86/ddc/edid.h index a4e79dae0..3ca402f57 100644 --- a/xorg-server/hw/xfree86/ddc/edid.h +++ b/xorg-server/hw/xfree86/ddc/edid.h @@ -527,10 +527,13 @@ struct detailed_monitor_section { struct whitePoints wp[2]; /* 32 */ /* color management data */ struct cvt_timings cvt[4]; /* 64 */ - /* established timings III */ + Uchar est_iii[6]; /* 6 */ } section; /* max: 80 */ }; +/* flags */ +#define EDID_COMPLETE_RAWDATA 0x1 + typedef struct { int scrnIndex; struct vendor vendor; @@ -539,7 +542,7 @@ typedef struct { struct established_timings timings1; struct std_timings timings2[8]; struct detailed_monitor_section det_mon[4]; - void *vdif; /* unused */ + unsigned long flags; int no_sections; Uchar *rawData; } xf86Monitor, *xf86MonPtr; diff --git a/xorg-server/hw/xfree86/ddc/interpret_edid.c b/xorg-server/hw/xfree86/ddc/interpret_edid.c index 879308520..310606c7c 100644 --- a/xorg-server/hw/xfree86/ddc/interpret_edid.c +++ b/xorg-server/hw/xfree86/ddc/interpret_edid.c @@ -163,6 +163,20 @@ xf86InterpretEDID(int scrnIndex, Uchar *block) return NULL; } +xf86MonPtr +xf86InterpretEEDID(int scrnIndex, Uchar *block) +{ + xf86MonPtr m; + + m = xf86InterpretEDID(scrnIndex, block); + if (!m) + return NULL; + + /* extension parse */ + + return m; +} + static void get_vendor_section(Uchar *c, struct vendor *r) { @@ -270,6 +284,8 @@ get_std_timing_section(Uchar *c, struct std_timings *r, } } +static const unsigned char empty_block[18]; + static void get_dt_md_section(Uchar *c, struct edid_version *ver, struct detailed_monitor_section *det_mon) @@ -313,6 +329,7 @@ get_dt_md_section(Uchar *c, struct edid_version *ver, break; case ADD_EST_TIMINGS: det_mon[i].type = DS_EST_III; + memcpy(det_mon[i].section.est_iii, c + 6, 6); break; case ADD_DUMMY: det_mon[i].type = DS_DUMMY; @@ -321,10 +338,10 @@ get_dt_md_section(Uchar *c, struct edid_version *ver, det_mon[i].type = DS_UNKOWN; break; } - if (c[3] <= 0x0F) { + if (c[3] <= 0x0F && memcmp(c, empty_block, sizeof(empty_block))) { det_mon[i].type = DS_VENDOR + c[3]; } - } else { + } else { det_mon[i].type = DT; get_detailed_timing_section(c,&det_mon[i].section.d_timings); } @@ -394,14 +411,14 @@ get_monitor_ranges(Uchar *c, struct monitor_ranges *r) static void get_whitepoint_section(Uchar *c, struct whitePoints *wp) { - wp[1].white_x = WHITEX1; - wp[1].white_y = WHITEY1; - wp[2].white_x = WHITEX2; - wp[2].white_y = WHITEY2; - wp[1].index = WHITE_INDEX1; - wp[2].index = WHITE_INDEX2; - wp[1].white_gamma = WHITE_GAMMA1; - wp[2].white_gamma = WHITE_GAMMA2; + wp[0].white_x = WHITEX1; + wp[0].white_y = WHITEY1; + wp[1].white_x = WHITEX2; + wp[1].white_y = WHITEY2; + wp[0].index = WHITE_INDEX1; + wp[1].index = WHITE_INDEX2; + wp[0].white_gamma = WHITE_GAMMA1; + wp[1].white_gamma = WHITE_GAMMA2; } static void @@ -445,3 +462,56 @@ validate_version(int scrnIndex, struct edid_version *r) return TRUE; } + +/* + * Returns true if HDMI, false if definitely not or unknown. + */ +_X_EXPORT Bool +xf86MonitorIsHDMI(xf86MonPtr mon) +{ + int i = 0, version, offset; + char *edid = NULL; + + if (!mon) + return FALSE; + + if (!(mon->flags & EDID_COMPLETE_RAWDATA)) + return FALSE; + + if (!mon->no_sections) + return FALSE; + + edid = (char *)mon->rawData; + if (!edid) + return FALSE; + + /* find the CEA extension block */ + for (i = 1; i <= mon->no_sections; i++) + if (edid[i * 128] == 0x02) + break; + if (i == mon->no_sections + 1) + return FALSE; + edid += (i * 128); + + version = edid[1]; + offset = edid[2]; + if (version < 3 || offset < 4) + return FALSE; + + /* walk the cea data blocks */ + for (i = 4; i < offset; i += (edid[i] & 0x1f) + 1) { + char *x = edid + i; + + /* find a vendor specific block */ + if ((x[0] & 0xe0) >> 5 == 0x03) { + int oui = (x[3] << 16) + (x[2] << 8) + x[1]; + + /* find the HDMI vendor OUI */ + if (oui == 0x000c03) + return TRUE; + } + } + + /* guess it's not HDMI after all */ + return FALSE; +} diff --git a/xorg-server/hw/xfree86/ddc/print_edid.c b/xorg-server/hw/xfree86/ddc/print_edid.c index df11bfb3d..e9c8cbdf7 100644 --- a/xorg-server/hw/xfree86/ddc/print_edid.c +++ b/xorg-server/hw/xfree86/ddc/print_edid.c @@ -168,7 +168,7 @@ print_dpms_features(int scrnIndex, struct disp_features *c, } else if (v->revision == 3) { xf86DrvMsg(scrnIndex,X_INFO, "First detailed timing not preferred " - "mode in violation of standard!"); + "mode in violation of standard!\n"); } if (v->revision >= 4) { @@ -230,7 +230,7 @@ print_established_timings(int scrnIndex, struct established_timings *t) unsigned char c; if (t->t1 || t->t2 || t->t_manu) - xf86DrvMsg(scrnIndex,X_INFO,"Supported VESA Video Modes:\n"); + xf86DrvMsg(scrnIndex,X_INFO,"Supported established timings:\n"); c=t->t1; if (c&0x80) xf86DrvMsg(scrnIndex,X_INFO,"720x400@70Hz\n"); if (c&0x40) xf86DrvMsg(scrnIndex,X_INFO,"720x400@88Hz\n"); @@ -262,7 +262,7 @@ print_std_timings(int scrnIndex, struct std_timings *t) for (i=0;i 256) { /* sanity check */ if (!done) { - xf86DrvMsg(scrnIndex,X_INFO,"Supported Future Video Modes:\n"); + xf86DrvMsg(scrnIndex,X_INFO,"Supported standard timings:\n"); done = 1; } xf86DrvMsg(scrnIndex,X_INFO, @@ -295,7 +295,7 @@ print_detailed_timings(int scrnIndex, struct detailed_timings *t) { if (t->clock > 15000000) { /* sanity check */ - xf86DrvMsg(scrnIndex,X_INFO,"Supported additional Video Mode:\n"); + xf86DrvMsg(scrnIndex,X_INFO,"Supported detailed timing:\n"); xf86DrvMsg(scrnIndex,X_INFO,"clock: %.1f MHz ",t->clock/1000000.0); xf86ErrorF("Image Size: %i x %i mm\n",t->h_size,t->v_size); xf86DrvMsg(scrnIndex,X_INFO, @@ -463,22 +463,28 @@ print_number_sections(int scrnIndex, int num) xf86MonPtr xf86PrintEDID(xf86MonPtr m) { - CARD16 i, j; + CARD16 i, j, n; char buf[EDID_WIDTH * 2 + 1]; - if (!(m)) return NULL; + if (!m) return NULL; - print_vendor(m->scrnIndex,&m->vendor); - print_version(m->scrnIndex,&m->ver); - print_display(m->scrnIndex,&m->features, &m->ver); - print_established_timings(m->scrnIndex,&m->timings1); - print_std_timings(m->scrnIndex,m->timings2); - print_detailed_monitor_section(m->scrnIndex,m->det_mon); - print_number_sections(m->scrnIndex,m->no_sections); + print_vendor(m->scrnIndex, &m->vendor); + print_version(m->scrnIndex, &m->ver); + print_display(m->scrnIndex, &m->features, &m->ver); + print_established_timings(m->scrnIndex, &m->timings1); + print_std_timings(m->scrnIndex, m->timings2); + print_detailed_monitor_section(m->scrnIndex, m->det_mon); + print_number_sections(m->scrnIndex, m->no_sections); + + /* extension block section stuff */ xf86DrvMsg(m->scrnIndex, X_INFO, "EDID (in hex):\n"); - - for (i = 0; i < 128; i += j) { + + n = 128; + if (m->flags & EDID_COMPLETE_RAWDATA) + n += m->no_sections * 128; + + for (i = 0; i < n; i += j) { for (j = 0; j < EDID_WIDTH; ++j) { sprintf(&buf[j * 2], "%02x", m->rawData[i + j]); } diff --git a/xorg-server/hw/xfree86/ddc/xf86DDC.c b/xorg-server/hw/xfree86/ddc/xf86DDC.c index 28e2ead28..0d8677637 100644 --- a/xorg-server/hw/xfree86/ddc/xf86DDC.c +++ b/xorg-server/hw/xfree86/ddc/xf86DDC.c @@ -2,6 +2,14 @@ * * Copyright 1998,1999 by Egbert Eich */ + +/* + * Note that DDC1 does not define any method for returning blocks beyond + * the first. DDC2 does, but the original implementation would only ever + * read the first block. If you want to read and parse all blocks, use + * xf86DoEEDID(). + */ + #ifdef HAVE_XORG_CONFIG_H #include #endif @@ -31,18 +39,6 @@ static unsigned int *FetchEDID_DDC1( register unsigned int (*)(ScrnInfoPtr) ); -static unsigned char* EDID1Read_DDC2( - int scrnIndex, - I2CBusPtr pBus -); - -static unsigned char * DDCRead_DDC2( - int scrnIndex, - I2CBusPtr pBus, - int start, - int len -); - typedef enum { DDCOPT_NODDC1, DDCOPT_NODDC2, @@ -107,10 +103,102 @@ xf86DoEDID_DDC1( return tmp; } +static I2CDevPtr +DDC2MakeDevice(I2CBusPtr pBus, int address, char *name) +{ + I2CDevPtr dev = NULL; + + if (!(dev = xf86I2CFindDev(pBus, address))) { + dev = xf86CreateI2CDevRec(); + dev->DevName = name; + dev->SlaveAddr = address; + dev->ByteTimeout = 2200; /* VESA DDC spec 3 p. 43 (+10 %) */ + dev->StartTimeout = 550; + dev->BitTimeout = 40; + dev->AcknTimeout = 40; + + dev->pI2CBus = pBus; + if (!xf86I2CDevInit(dev)) { + xf86DrvMsg(pBus->scrnIndex, X_PROBED, "No DDC2 device\n"); + return NULL; + } + } + + return dev; +} + +static I2CDevPtr +DDC2Init(int scrnIndex, I2CBusPtr pBus) +{ + I2CDevPtr dev = NULL; + + /* + * Slow down the bus so that older monitors don't + * miss things. + */ + pBus->RiseFallTime = 20; + + DDC2MakeDevice(pBus, 0x0060, "E-EDID segment register"); + dev = DDC2MakeDevice(pBus, 0x00A0, "ddc2"); + + return dev; +} + +/* Mmmm, smell the hacks */ +static void +EEDIDStop(I2CDevPtr d) +{ +} + +/* block is the EDID block number. a segment is two blocks. */ +static Bool +DDC2Read(I2CDevPtr dev, int block, unsigned char *R_Buffer) +{ + unsigned char W_Buffer[1]; + int i, segment; + I2CDevPtr seg; + void (*stop)(I2CDevPtr); + + for (i = 0; i < RETRIES; i++) { + /* Stop bits reset the segment pointer to 0, so be careful here. */ + segment = block >> 1; + if (segment) { + Bool b; + + if (!(seg = xf86I2CFindDev(dev->pI2CBus, 0x0060))) + return FALSE; + + W_Buffer[0] = segment; + + stop = dev->pI2CBus->I2CStop; + dev->pI2CBus->I2CStop = EEDIDStop; + + b = xf86I2CWriteRead(seg, W_Buffer, 1, NULL, 0); + + dev->pI2CBus->I2CStop = stop; + if (!b) { + dev->pI2CBus->I2CStop(dev); + continue; + } + } + + W_Buffer[0] = (block & 0x01) * EDID1_LEN; + + if (xf86I2CWriteRead(dev, W_Buffer, 1, R_Buffer, EDID1_LEN)) { + if (!DDC_checksum(R_Buffer, EDID1_LEN)) + return TRUE; + } + } + + return FALSE; +} + /** * Attempts to probe the monitor for EDID information, if NoDDC and NoDDC2 are * unset. EDID information blocks are interpreted and the results returned in - * an xf86MonPtr. + * an xf86MonPtr. Unlike xf86DoEDID_DDC[12](), this function will return + * the complete EDID data, including all extension blocks, if the 'complete' + * parameter is TRUE; * * This function does not affect the list of modes used by drivers -- it is up * to the driver to decide policy on what to do with EDID information. @@ -119,46 +207,72 @@ xf86DoEDID_DDC1( * @return NULL if no monitor attached or failure to interpret the EDID. */ xf86MonPtr -xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus) +xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool complete) { ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; unsigned char *EDID_block = NULL; xf86MonPtr tmp = NULL; + I2CDevPtr dev = NULL; /* Default DDC and DDC2 to enabled. */ Bool noddc = FALSE, noddc2 = FALSE; OptionInfoPtr options; - options = xnfalloc(sizeof(DDCOptions)); - (void)memcpy(options, DDCOptions, sizeof(DDCOptions)); + options = xalloc(sizeof(DDCOptions)); + if (!options) + return NULL; + memcpy(options, DDCOptions, sizeof(DDCOptions)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); xf86GetOptValBool(options, DDCOPT_NODDC, &noddc); xf86GetOptValBool(options, DDCOPT_NODDC2, &noddc2); xfree(options); - + if (noddc || noddc2) return NULL; - EDID_block = EDID1Read_DDC2(scrnIndex,pBus); + if (!(dev = DDC2Init(scrnIndex, pBus))) + return NULL; - if (EDID_block){ - tmp = xf86InterpretEDID(scrnIndex,EDID_block); - } else { -#ifdef DEBUG - ErrorF("No EDID block returned\n"); -#endif + EDID_block = xcalloc(1, EDID1_LEN); + if (!EDID_block) return NULL; + + if (DDC2Read(dev, 0, EDID_block)) { + int i, n = EDID_block[0x7e]; + + if (complete && n) { + EDID_block = xrealloc(EDID_block, EDID1_LEN * (1+n)); + + for (i = 0; i < n; i++) + DDC2Read(dev, i+1, EDID_block + (EDID1_LEN * (1+i))); + } + + tmp = xf86InterpretEEDID(scrnIndex, EDID_block); } -#ifdef DEBUG - if (!tmp) - ErrorF("Cannot interpret EDID block\n"); - else - ErrorF("Sections to follow: %i\n",tmp->no_sections); -#endif - + + if (tmp && complete) + tmp->flags |= EDID_COMPLETE_RAWDATA; + return tmp; } +/** + * Attempts to probe the monitor for EDID information, if NoDDC and NoDDC2 are + * unset. EDID information blocks are interpreted and the results returned in + * an xf86MonPtr. + * + * This function does not affect the list of modes used by drivers -- it is up + * to the driver to decide policy on what to do with EDID information. + * + * @return pointer to a new xf86MonPtr containing the EDID information. + * @return NULL if no monitor attached or failure to interpret the EDID. + */ +xf86MonPtr +xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus) +{ + return xf86DoEEDID(scrnIndex, pBus, FALSE); +} + /* * read EDID record , pass it to callback function to interpret. * callback function will store it for further use by calling @@ -225,68 +339,3 @@ FetchEDID_DDC1(register ScrnInfoPtr pScrn, } while(--count); return (ptr); } - -static unsigned char* -EDID1Read_DDC2(int scrnIndex, I2CBusPtr pBus) -{ - return DDCRead_DDC2(scrnIndex, pBus, 0, EDID1_LEN); -} - -static unsigned char * -DDCRead_DDC2(int scrnIndex, I2CBusPtr pBus, int start, int len) -{ - I2CDevPtr dev; - unsigned char W_Buffer[2]; - int w_bytes; - unsigned char *R_Buffer; - int i; - - /* - * Slow down the bus so that older monitors don't - * miss things. - */ - pBus->RiseFallTime = 20; - - if (!(dev = xf86I2CFindDev(pBus, 0x00A0))) { - dev = xf86CreateI2CDevRec(); - dev->DevName = "ddc2"; - dev->SlaveAddr = 0xA0; - dev->ByteTimeout = 2200; /* VESA DDC spec 3 p. 43 (+10 %) */ - dev->StartTimeout = 550; - dev->BitTimeout = 40; - dev->AcknTimeout = 40; - - dev->pI2CBus = pBus; - if (!xf86I2CDevInit(dev)) { - xf86DrvMsg(scrnIndex, X_PROBED, "No DDC2 device\n"); - return NULL; - } - } - if (start < 0x100) { - w_bytes = 1; - W_Buffer[0] = start; - } else { - w_bytes = 2; - W_Buffer[0] = start & 0xFF; - W_Buffer[1] = (start & 0xFF00) >> 8; - } - R_Buffer = xcalloc(1,sizeof(unsigned char) - * (len)); - for (i=0; i -#endif - -#include "xf86Module.h" - -static MODULESETUPPROTO(afbSetup); - -static XF86ModuleVersionInfo VersRec = -{ - "afb", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 1, 0, 0, - ABI_CLASS_ANSIC, /* Only need the ansic layer */ - ABI_ANSIC_VERSION, - MOD_CLASS_NONE, - {0,0,0,0} /* signature, to be patched into the file by a tool */ -}; - -_X_EXPORT XF86ModuleData afbModuleData = { &VersRec, afbSetup, NULL }; - -static pointer -afbSetup(pointer module, pointer opts, int *errmaj, int *errmin) -{ - /* This modules requires mfb, so load it */ - return LoadSubModule(module, "mfb", NULL, NULL, NULL, NULL, - errmaj, errmin); -} diff --git a/xorg-server/hw/xfree86/dixmods/cfb32module.c b/xorg-server/hw/xfree86/dixmods/cfb32module.c deleted file mode 100644 index 23708e4c2..000000000 --- a/xorg-server/hw/xfree86/dixmods/cfb32module.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 1998 The XFree86 Project, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the XFree86 Project shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from the - * XFree86 Project. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf86Module.h" - -static MODULESETUPPROTO(cfb32Setup); - -static XF86ModuleVersionInfo VersRec = -{ - "cfb32", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 1, 0, 0, - ABI_CLASS_ANSIC, /* Only need the ansic layer */ - ABI_ANSIC_VERSION, - MOD_CLASS_NONE, - {0,0,0,0} /* signature, to be patched into the file by a tool */ -}; - -_X_EXPORT XF86ModuleData cfb32ModuleData = { &VersRec, cfb32Setup, NULL }; - -static pointer -cfb32Setup(pointer module, pointer opts, int *errmaj, int *errmin) -{ - /* This modules requires cfb, so load it */ - return LoadSubModule(module, "cfb", NULL, NULL, NULL, NULL, - errmaj, errmin); -} diff --git a/xorg-server/hw/xfree86/dixmods/cfbmodule.c b/xorg-server/hw/xfree86/dixmods/cfbmodule.c deleted file mode 100644 index 07074c158..000000000 --- a/xorg-server/hw/xfree86/dixmods/cfbmodule.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 1998 The XFree86 Project, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the XFree86 Project shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from the - * XFree86 Project. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf86Module.h" - -static MODULESETUPPROTO(cfbSetup); - -static XF86ModuleVersionInfo VersRec = -{ - "cfb", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 1, 0, 0, - ABI_CLASS_ANSIC, /* Only need the ansic layer */ - ABI_ANSIC_VERSION, - MOD_CLASS_NONE, - {0,0,0,0} /* signature, to be patched into the file by a tool */ -}; - -_X_EXPORT XF86ModuleData cfbModuleData = { &VersRec, cfbSetup, NULL }; - -static pointer -cfbSetup(pointer module, pointer opts, int *errmaj, int *errmin) -{ - /* This modules requires mfb, so load it */ - return LoadSubModule(module, "mfb", NULL, NULL, NULL, NULL, - errmaj, errmin); -} diff --git a/xorg-server/hw/xfree86/dixmods/extmod/Makefile.am b/xorg-server/hw/xfree86/dixmods/extmod/Makefile.am index f90e144ea..dd4ccd633 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/Makefile.am +++ b/xorg-server/hw/xfree86/dixmods/extmod/Makefile.am @@ -4,26 +4,19 @@ extsmoduledir = $(moduledir)/extensions extsmodule_LTLIBRARIES = libextmod.la if DGA -DGA_SRCS = xf86dga.c xf86dga2.c dgaproc.h xf86dgaext.h +DGA_SRCS = xf86dga2.c dgaproc.h xf86dgaext.h endif if XV XV_SRCS = xvmod.c xvmodproc.h endif -if XF86MISC -XF86MISC_SRCS = xf86misc.c xf86miscproc.h -endif - if XF86VIDMODE XF86VMODE_SRCS = xf86vmode.c vidmodeproc.h endif AM_CFLAGS = @DIX_CFLAGS@ @XORG_CFLAGS@ INCLUDES = @XORG_INCS@ \ - -I$(top_srcdir)/afb \ - -I$(top_srcdir)/mfb \ - -I$(top_srcdir)/cfb \ -I$(top_srcdir)/dbe \ -I$(top_srcdir)/hw/xfree86/loader \ -I$(top_srcdir)/miext/shadow @@ -32,7 +25,6 @@ libextmod_la_LDFLAGS = -avoid-version libextmod_la_SOURCES = modinit.c \ modinit.h \ $(DGA_SRCS) \ - $(XF86MISC_SRCS) \ $(XF86VMODE_SRCS) \ $(XV_SRCS) libextmod_la_LIBADD = $(top_builddir)/Xext/libXextmodule.la diff --git a/xorg-server/hw/xfree86/dixmods/extmod/Makefile.in b/xorg-server/hw/xfree86/dixmods/extmod/Makefile.in index 157358c47..d4ead8762 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/Makefile.in +++ b/xorg-server/hw/xfree86/dixmods/extmod/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,7 +45,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -61,15 +60,14 @@ am__installdirs = "$(DESTDIR)$(extsmoduledir)" "$(DESTDIR)$(sdkdir)" extsmoduleLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(extsmodule_LTLIBRARIES) libextmod_la_DEPENDENCIES = $(top_builddir)/Xext/libXextmodule.la -am__libextmod_la_SOURCES_DIST = modinit.c modinit.h xf86dga.c \ - xf86dga2.c dgaproc.h xf86dgaext.h xf86misc.c xf86miscproc.h \ - xf86vmode.c vidmodeproc.h xvmod.c xvmodproc.h -@DGA_TRUE@am__objects_1 = xf86dga.lo xf86dga2.lo -@XF86MISC_TRUE@am__objects_2 = xf86misc.lo -@XF86VIDMODE_TRUE@am__objects_3 = xf86vmode.lo -@XV_TRUE@am__objects_4 = xvmod.lo +am__libextmod_la_SOURCES_DIST = modinit.c modinit.h xf86dga2.c \ + dgaproc.h xf86dgaext.h xf86vmode.c vidmodeproc.h xvmod.c \ + xvmodproc.h +@DGA_TRUE@am__objects_1 = xf86dga2.lo +@XF86VIDMODE_TRUE@am__objects_2 = xf86vmode.lo +@XV_TRUE@am__objects_3 = xvmod.lo am_libextmod_la_OBJECTS = modinit.lo $(am__objects_1) $(am__objects_2) \ - $(am__objects_3) $(am__objects_4) + $(am__objects_3) libextmod_la_OBJECTS = $(am_libextmod_la_OBJECTS) libextmod_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -79,9 +77,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -98,8 +93,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -120,10 +116,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -145,6 +137,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -154,18 +147,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -184,7 +174,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -198,7 +188,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -210,8 +203,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -220,8 +212,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -254,7 +246,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -264,27 +255,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -295,10 +271,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -307,13 +279,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -346,8 +313,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -367,7 +333,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -377,12 +342,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -400,20 +365,14 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ sdk_HEADERS = dgaproc.h extsmoduledir = $(moduledir)/extensions extsmodule_LTLIBRARIES = libextmod.la -@DGA_TRUE@DGA_SRCS = xf86dga.c xf86dga2.c dgaproc.h xf86dgaext.h +@DGA_TRUE@DGA_SRCS = xf86dga2.c dgaproc.h xf86dgaext.h @XV_TRUE@XV_SRCS = xvmod.c xvmodproc.h -@XF86MISC_TRUE@XF86MISC_SRCS = xf86misc.c xf86miscproc.h @XF86VIDMODE_TRUE@XF86VMODE_SRCS = xf86vmode.c vidmodeproc.h AM_CFLAGS = @DIX_CFLAGS@ @XORG_CFLAGS@ INCLUDES = @XORG_INCS@ \ - -I$(top_srcdir)/afb \ - -I$(top_srcdir)/mfb \ - -I$(top_srcdir)/cfb \ -I$(top_srcdir)/dbe \ -I$(top_srcdir)/hw/xfree86/loader \ -I$(top_srcdir)/miext/shadow @@ -422,7 +381,6 @@ libextmod_la_LDFLAGS = -avoid-version libextmod_la_SOURCES = modinit.c \ modinit.h \ $(DGA_SRCS) \ - $(XF86MISC_SRCS) \ $(XF86VMODE_SRCS) \ $(XV_SRCS) @@ -435,8 +393,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -497,9 +455,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modinit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86dga.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86dga2.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86vmode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvmod.Plo@am__quote@ @@ -552,7 +508,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/dixmods/extmod/dgaproc.h b/xorg-server/hw/xfree86/dixmods/extmod/dgaproc.h index aaea4e20c..f4d3fe45b 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/dgaproc.h +++ b/xorg-server/hw/xfree86/dixmods/extmod/dgaproc.h @@ -120,9 +120,10 @@ int DGAGetOldDGAMode(int Index); int DGAGetModeInfo(int Index, XDGAModePtr mode, int num); Bool DGAVTSwitch(void); -Bool DGAStealButtonEvent(int Index, int button, int is_down); -Bool DGAStealMotionEvent(int Index, int dx, int dy); -Bool DGAStealKeyEvent(int Index, int key_code, int is_down); +Bool DGAStealButtonEvent(DeviceIntPtr dev, int Index, int button, + int is_down); +Bool DGAStealMotionEvent(DeviceIntPtr dev, int Index, int dx, int dy); +Bool DGAStealKeyEvent(DeviceIntPtr dev, int Index, int key_code, int is_down); Bool DGAIsDgaEvent (xEvent *e); Bool DGADeliverEvent (ScreenPtr pScreen, xEvent *e); diff --git a/xorg-server/hw/xfree86/dixmods/extmod/modinit.c b/xorg-server/hw/xfree86/dixmods/extmod/modinit.c index 8c8a4ceeb..9bcf51f00 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/modinit.c +++ b/xorg-server/hw/xfree86/dixmods/extmod/modinit.c @@ -47,15 +47,6 @@ static ExtensionModule extensionModules[] = { NULL }, #endif -#ifdef SHAPE - { - ShapeExtensionInit, - SHAPENAME, - &noShapeExtension, - NULL, - NULL - }, -#endif #ifdef MULTIBUFFER { MultibufferExtensionInit, @@ -65,15 +56,6 @@ static ExtensionModule extensionModules[] = { NULL }, #endif -#ifdef MITMISC - { - MITMiscExtensionInit, - MITMISCNAME, - &noMITMiscExtension, - NULL, - NULL - }, -#endif #ifdef notyet { XTestExtensionInit, @@ -83,24 +65,6 @@ static ExtensionModule extensionModules[] = { NULL }, #endif -#ifdef BIGREQS - { - BigReqExtensionInit, - XBigReqExtensionName, - &noBigReqExtension, - NULL, - NULL - }, -#endif -#ifdef XSYNC - { - SyncExtensionInit, - SYNC_NAME, - &noSyncExtension, - NULL, - NULL - }, -#endif #ifdef SCREENSAVER { ScreenSaverExtensionInit, @@ -110,15 +74,6 @@ static ExtensionModule extensionModules[] = { NULL }, #endif -#ifdef XCMISC - { - XCMiscExtensionInit, - XCMiscExtensionName, - &noXCMiscExtension, - NULL, - NULL - }, -#endif #ifdef XF86VIDMODE { XFree86VidModeExtensionInit, @@ -128,15 +83,6 @@ static ExtensionModule extensionModules[] = { NULL }, #endif -#ifdef XF86MISC - { - XFree86MiscExtensionInit, - XF86MISCNAME, - &noXFree86MiscExtension, - NULL, - NULL - }, -#endif #ifdef XFreeXDGA { XFree86DGAExtensionInit, @@ -155,33 +101,6 @@ static ExtensionModule extensionModules[] = { NULL }, #endif -#ifdef FONTCACHE - { - FontCacheExtensionInit, - FONTCACHENAME, - &noFontCacheExtension, - NULL, - NULL - }, -#endif -#ifdef TOGCUP - { - XcupExtensionInit, - XCUPNAME, - &noXcupExtension, - NULL, - NULL - }, -#endif -#ifdef EVI - { - EVIExtensionInit, - EVINAME, - &noEVIExtension, - NULL, - NULL - }, -#endif #ifdef XV { XvExtensionInit, diff --git a/xorg-server/hw/xfree86/dixmods/extmod/modinit.h b/xorg-server/hw/xfree86/dixmods/extmod/modinit.h index 3c2e2022a..1de14858c 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/modinit.h +++ b/xorg-server/hw/xfree86/dixmods/extmod/modinit.h @@ -7,10 +7,8 @@ #define INITARGS void #endif -#ifdef SHAPE #define _SHAPE_SERVER_ /* don't want Xlib structures */ #include -#endif #ifdef MULTIBUFFER extern void MultibufferExtensionInit(INITARGS); @@ -18,12 +16,6 @@ extern void MultibufferExtensionInit(INITARGS); #include #endif -#ifdef MITMISC -extern void MITMiscExtensionInit(INITARGS); -#define _MITMISC_SERVER_ -#include -#endif - #ifdef XTEST extern void XTestExtensionInit(INITARGS); #define _XTEST_SERVER_ @@ -35,41 +27,17 @@ extern void XTestExtensionInit(INITARGS); extern void XTestExtension1Init(INITARGS); #endif -#ifdef BIGREQS -extern void BigReqExtensionInit(INITARGS); -#include -#endif - -#ifdef XSYNC -extern void SyncExtensionInit(INITARGS); -#define _SYNC_SERVER -#include -#include -#endif - #ifdef SCREENSAVER extern void ScreenSaverExtensionInit (INITARGS); #include #endif -#ifdef XCMISC -extern void XCMiscExtensionInit(INITARGS); -#include -#endif - #ifdef XF86VIDMODE extern void XFree86VidModeExtensionInit(INITARGS); #define _XF86VIDMODE_SERVER_ #include #endif -#ifdef XF86MISC -extern void XFree86MiscExtensionInit(INITARGS); -#define _XF86MISC_SERVER_ -#define _XF86MISC_SAVER_COMPAT_ -#include -#endif - #ifdef XFreeXDGA extern void XFree86DGAExtensionInit(INITARGS); extern void XFree86DGARegister(INITARGS); @@ -82,25 +50,6 @@ extern void DPMSExtensionInit(INITARGS); #include #endif -#ifdef FONTCACHE -extern void FontCacheExtensionInit(INITARGS); -#define _FONTCACHE_SERVER_ -#include "fontcacheP.h" -#include "fontcachstr.h" -#endif - -#ifdef TOGCUP -extern void XcupExtensionInit(INITARGS); -#define _XCUP_SERVER_ -#include -#endif - -#ifdef EVI -extern void EVIExtensionInit(INITARGS); -#define _XEVI_SERVER_ -#include -#endif - #ifdef XV extern void XvExtensionInit(INITARGS); extern void XvMCExtensionInit(INITARGS); @@ -117,9 +66,6 @@ extern void ResExtensionInit(INITARGS); #ifdef SHM extern void ShmExtensionInit(INITARGS); #include -extern void ShmSetPixmapFormat( - ScreenPtr pScreen, - int format); extern void ShmRegisterFuncs( ScreenPtr pScreen, ShmFuncsPtr funcs); @@ -130,16 +76,12 @@ extern void SELinuxExtensionInit(INITARGS); #include "xselinux.h" #endif -#if 1 -extern void SecurityExtensionInit(INITARGS); -#endif - -#if 1 -extern void XagExtensionInit(INITARGS); +#ifdef XEVIE +extern void XevieExtensionInit(INITARGS); #endif #if 1 -extern void XpExtensionInit(INITARGS); +extern void SecurityExtensionInit(INITARGS); #endif #if 1 diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xf86dga.c b/xorg-server/hw/xfree86/dixmods/extmod/xf86dga.c deleted file mode 100644 index c66bca26b..000000000 --- a/xorg-server/hw/xfree86/dixmods/extmod/xf86dga.c +++ /dev/null @@ -1,309 +0,0 @@ - -/* - -Copyright (c) 1995 Jon Tombs -Copyright (c) 1995, 1996, 1999 XFree86 Inc - -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#define NEED_REPLIES -#define NEED_EVENTS -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "colormapst.h" -#include "cursorstr.h" -#include "scrnintstr.h" -#include "servermd.h" -#define _XF86DGA_SERVER_ -#include -#include -#include "swaprep.h" -#include "dgaproc.h" - -#include "xf86dgaext.h" - - -static DISPATCH_PROC(ProcXF86DGADirectVideo); -static DISPATCH_PROC(ProcXF86DGAGetVidPage); -static DISPATCH_PROC(ProcXF86DGAGetVideoLL); -static DISPATCH_PROC(ProcXF86DGAGetViewPortSize); -static DISPATCH_PROC(ProcXF86DGASetVidPage); -static DISPATCH_PROC(ProcXF86DGASetViewPort); -static DISPATCH_PROC(ProcXF86DGAInstallColormap); -static DISPATCH_PROC(ProcXF86DGAQueryDirectVideo); -static DISPATCH_PROC(ProcXF86DGAViewPortChanged); - - -static int -ProcXF86DGAGetVideoLL(ClientPtr client) -{ - REQUEST(xXF86DGAGetVideoLLReq); - xXF86DGAGetVideoLLReply rep; - XDGAModeRec mode; - int num, offset, flags; - char *name; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGAGetVideoLLReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - if(!DGAAvailable(stuff->screen)) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - - if(!(num = DGAGetOldDGAMode(stuff->screen))) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - - /* get the parameters for the mode that best matches */ - DGAGetModeInfo(stuff->screen, &mode, num); - - if(!DGAOpenFramebuffer(stuff->screen, &name, - (unsigned char**)(&rep.offset), - (int*)(&rep.bank_size), &offset, &flags)) - return BadAlloc; - - rep.offset += mode.offset; - rep.width = mode.bytesPerScanline / (mode.bitsPerPixel >> 3); - rep.ram_size = rep.bank_size >> 10; - - WriteToClient(client, SIZEOF(xXF86DGAGetVideoLLReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86DGADirectVideo(ClientPtr client) -{ - int num; - PixmapPtr pix; - XDGAModeRec mode; - REQUEST(xXF86DGADirectVideoReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGADirectVideoReq); - - if (!DGAAvailable(stuff->screen)) - return DGAErrorBase + XF86DGANoDirectVideoMode; - - if (stuff->enable & XF86DGADirectGraphics) { - if(!(num = DGAGetOldDGAMode(stuff->screen))) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - } else - num = 0; - - if(Success != DGASetMode(stuff->screen, num, &mode, &pix)) - return (DGAErrorBase + XF86DGAScreenNotActive); - - DGASetInputMode (stuff->screen, - (stuff->enable & XF86DGADirectKeyb) != 0, - (stuff->enable & XF86DGADirectMouse) != 0); - - return (client->noClientException); -} - -static int -ProcXF86DGAGetViewPortSize(ClientPtr client) -{ - int num; - XDGAModeRec mode; - REQUEST(xXF86DGAGetViewPortSizeReq); - xXF86DGAGetViewPortSizeReply rep; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGAGetViewPortSizeReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - if (!DGAAvailable(stuff->screen)) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - - if(!(num = DGAGetOldDGAMode(stuff->screen))) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - - DGAGetModeInfo(stuff->screen, &mode, num); - - rep.width = mode.viewportWidth; - rep.height = mode.viewportHeight; - - WriteToClient(client, SIZEOF(xXF86DGAGetViewPortSizeReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86DGASetViewPort(ClientPtr client) -{ - REQUEST(xXF86DGASetViewPortReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGASetViewPortReq); - - if (!DGAAvailable(stuff->screen)) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - - if (!DGAActive(stuff->screen)) - { - int num; - PixmapPtr pix; - XDGAModeRec mode; - - if(!(num = DGAGetOldDGAMode(stuff->screen))) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - if(Success != DGASetMode(stuff->screen, num, &mode, &pix)) - return (DGAErrorBase + XF86DGAScreenNotActive); - } - - if (DGASetViewport(stuff->screen, stuff->x, stuff->y, DGA_FLIP_RETRACE) - != Success) - return DGAErrorBase + XF86DGADirectNotActivated; - - return (client->noClientException); -} - -static int -ProcXF86DGAGetVidPage(ClientPtr client) -{ - REQUEST(xXF86DGAGetVidPageReq); - xXF86DGAGetVidPageReply rep; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGAGetVidPageReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.vpage = 0; /* silently fail */ - - WriteToClient(client, SIZEOF(xXF86DGAGetVidPageReply), (char *)&rep); - return (client->noClientException); -} - - -static int -ProcXF86DGASetVidPage(ClientPtr client) -{ - REQUEST(xXF86DGASetVidPageReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGASetVidPageReq); - - /* silently fail */ - - return (client->noClientException); -} - - -static int -ProcXF86DGAInstallColormap(ClientPtr client) -{ - ColormapPtr pcmp; - REQUEST(xXF86DGAInstallColormapReq); - - REQUEST_SIZE_MATCH(xXF86DGAInstallColormapReq); - - if (!DGAActive(stuff->screen)) - return (DGAErrorBase + XF86DGADirectNotActivated); - - pcmp = (ColormapPtr )LookupIDByType(stuff->id, RT_COLORMAP); - if (pcmp) { - DGAInstallCmap(pcmp); - return (client->noClientException); - } else { - client->errorValue = stuff->id; - return (BadColor); - } -} - -static int -ProcXF86DGAQueryDirectVideo(ClientPtr client) -{ - REQUEST(xXF86DGAQueryDirectVideoReq); - xXF86DGAQueryDirectVideoReply rep; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGAQueryDirectVideoReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.flags = 0; - - if (DGAAvailable(stuff->screen)) - rep.flags = XF86DGADirectPresent; - - WriteToClient(client, SIZEOF(xXF86DGAQueryDirectVideoReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86DGAViewPortChanged(ClientPtr client) -{ - REQUEST(xXF86DGAViewPortChangedReq); - xXF86DGAViewPortChangedReply rep; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGAViewPortChangedReq); - - if (!DGAActive(stuff->screen)) - return (DGAErrorBase + XF86DGADirectNotActivated); - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.result = 1; - - WriteToClient(client, SIZEOF(xXF86DGAViewPortChangedReply), (char *)&rep); - return (client->noClientException); -} - -int -ProcXF86DGADispatch(register ClientPtr client) -{ - REQUEST(xReq); - - switch (stuff->data) - { - case X_XF86DGAGetVideoLL: - return ProcXF86DGAGetVideoLL(client); - case X_XF86DGADirectVideo: - return ProcXF86DGADirectVideo(client); - case X_XF86DGAGetViewPortSize: - return ProcXF86DGAGetViewPortSize(client); - case X_XF86DGASetViewPort: - return ProcXF86DGASetViewPort(client); - case X_XF86DGAGetVidPage: - return ProcXF86DGAGetVidPage(client); - case X_XF86DGASetVidPage: - return ProcXF86DGASetVidPage(client); - case X_XF86DGAInstallColormap: - return ProcXF86DGAInstallColormap(client); - case X_XF86DGAQueryDirectVideo: - return ProcXF86DGAQueryDirectVideo(client); - case X_XF86DGAViewPortChanged: - return ProcXF86DGAViewPortChanged(client); - default: - return BadRequest; - } -} - diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c b/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c index 295e05e9e..df0030e80 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c +++ b/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c @@ -1,8 +1,10 @@ /* - Copyright (c) 1999 - The XFree86 Project Inc. - - Written by Mark Vojkovich -*/ + * Copyright (c) 1995 Jon Tombs + * Copyright (c) 1995, 1996, 1999 XFree86 Inc + * Copyright (c) 1999 - The XFree86 Project Inc. + * + * Written by Mark Vojkovich + */ #ifdef HAVE_XORG_CONFIG_H @@ -33,6 +35,8 @@ #include "modinit.h" +#define DGA_PROTOCOL_OLD_SUPPORT 1 + static DISPATCH_PROC(ProcXDGADispatch); static DISPATCH_PROC(SProcXDGADispatch); static DISPATCH_PROC(ProcXDGAQueryVersion); @@ -62,7 +66,8 @@ unsigned char DGAReqCode = 0; int DGAErrorBase; int DGAEventBase; -static DevPrivateKey DGAClientPrivateKey = &DGAClientPrivateKey; +static int DGAClientPrivateKeyIndex; +static DevPrivateKey DGAClientPrivateKey = &DGAClientPrivateKeyIndex; static int DGACallbackRefCount = 0; /* This holds the client's version information */ @@ -140,7 +145,7 @@ ProcXDGAOpenFramebuffer(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if (!DGAAvailable(stuff->screen)) + if (!DGAAvailable(stuff->screen)) return DGAErrorBase + XF86DGANoDirectVideoMode; REQUEST_SIZE_MATCH(xXDGAOpenFramebufferReq); @@ -148,9 +153,9 @@ ProcXDGAOpenFramebuffer(ClientPtr client) rep.length = 0; rep.sequenceNumber = client->sequence; - if(!DGAOpenFramebuffer(stuff->screen, &deviceName, + if(!DGAOpenFramebuffer(stuff->screen, &deviceName, (unsigned char**)(&rep.mem1), - (int*)&rep.size, (int*)&rep.offset, (int*)&rep.extra)) + (int*)&rep.size, (int*)&rep.offset, (int*)&rep.extra)) { return BadAlloc; } @@ -174,7 +179,7 @@ ProcXDGACloseFramebuffer(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if (!DGAAvailable(stuff->screen)) + if (!DGAAvailable(stuff->screen)) return DGAErrorBase + XF86DGANoDirectVideoMode; REQUEST_SIZE_MATCH(xXDGACloseFramebufferReq); @@ -258,7 +263,7 @@ ProcXDGAQueryModes(ClientPtr client) info.viewport_flags = mode[i].viewportFlags; info.reserved1 = mode[i].reserved1; info.reserved2 = mode[i].reserved2; - + WriteToClient(client, sz_xXDGAModeInfo, (char*)(&info)); WriteToClient(client, size, mode[i].name); } @@ -269,7 +274,7 @@ ProcXDGAQueryModes(ClientPtr client) } -static void +static void DGAClientStateChange ( CallbackListPtr* pcbl, pointer nulldata, @@ -286,7 +291,7 @@ DGAClientStateChange ( } } - if(client && + if(client && ((client->clientState == ClientStateGone) || (client->clientState == ClientStateRetained))) { XDGAModeRec mode; @@ -321,10 +326,10 @@ ProcXDGASetMode(ClientPtr client) rep.flags = 0; rep.sequenceNumber = client->sequence; - if (!DGAAvailable(stuff->screen)) + if (!DGAAvailable(stuff->screen)) return DGAErrorBase + XF86DGANoDirectVideoMode; - if(DGAClients[stuff->screen] && + if(DGAClients[stuff->screen] && (DGAClients[stuff->screen] != client)) return DGAErrorBase + XF86DGANoDirectVideoMode; @@ -338,7 +343,7 @@ ProcXDGASetMode(ClientPtr client) DGASetMode(stuff->screen, 0, &mode, &pPix); WriteToClient(client, sz_xXDGASetModeReply, (char*)&rep); return (client->noClientException); - } + } if(Success != DGASetMode(stuff->screen, stuff->mode, &mode, &pPix)) return BadValue; @@ -358,7 +363,7 @@ ProcXDGASetMode(ClientPtr client) } size = strlen(mode.name) + 1; - + info.byte_order = mode.byteOrder; info.depth = mode.depth; info.num = mode.num; @@ -426,7 +431,7 @@ ProcXDGAInstallColormap(ClientPtr client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGAInstallColormapReq); - + cmap = (ColormapPtr)LookupIDByType(stuff->cmap, RT_COLORMAP); if (cmap) { DGAInstallCmap(cmap); @@ -452,7 +457,7 @@ ProcXDGASelectInput(ClientPtr client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGASelectInputReq); - + if(DGAClients[stuff->screen] == client) DGASelectInput(stuff->screen, client, stuff->mask); @@ -472,7 +477,7 @@ ProcXDGAFillRectangle(ClientPtr client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGAFillRectangleReq); - + if(Success != DGAFillRect(stuff->screen, stuff->x, stuff->y, stuff->width, stuff->height, stuff->color)) return BadMatch; @@ -492,7 +497,7 @@ ProcXDGACopyArea(ClientPtr client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGACopyAreaReq); - + if(Success != DGABlitRect(stuff->screen, stuff->srcx, stuff->srcy, stuff->width, stuff->height, stuff->dstx, stuff->dsty)) return BadMatch; @@ -513,7 +518,7 @@ ProcXDGACopyTransparentArea(ClientPtr client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGACopyTransparentAreaReq); - + if(Success != DGABlitTransRect(stuff->screen, stuff->srcx, stuff->srcy, stuff->width, stuff->height, stuff->dstx, stuff->dsty, stuff->key)) return BadMatch; @@ -606,7 +611,7 @@ ProcXDGAChangePixmapMode(ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - + x = stuff->x; y = stuff->y; @@ -637,8 +642,8 @@ ProcXDGACreateColormap(ClientPtr client) if(!stuff->mode) return BadValue; - - result = DGACreateColormap(stuff->screen, client, stuff->id, + + result = DGACreateColormap(stuff->screen, client, stuff->id, stuff->mode, stuff->alloc); if(result != Success) return result; @@ -646,6 +651,287 @@ ProcXDGACreateColormap(ClientPtr client) return (client->noClientException); } +/* + * + * Support for the old DGA protocol, used to live in xf86dga.c + * + */ + +#ifdef DGA_PROTOCOL_OLD_SUPPORT + +static DISPATCH_PROC(ProcXF86DGADirectVideo); +static DISPATCH_PROC(ProcXF86DGAGetVidPage); +static DISPATCH_PROC(ProcXF86DGAGetVideoLL); +static DISPATCH_PROC(ProcXF86DGAGetViewPortSize); +static DISPATCH_PROC(ProcXF86DGASetVidPage); +static DISPATCH_PROC(ProcXF86DGASetViewPort); +static DISPATCH_PROC(ProcXF86DGAInstallColormap); +static DISPATCH_PROC(ProcXF86DGAQueryDirectVideo); +static DISPATCH_PROC(ProcXF86DGAViewPortChanged); + + +static int +ProcXF86DGAGetVideoLL(ClientPtr client) +{ + REQUEST(xXF86DGAGetVideoLLReq); + xXF86DGAGetVideoLLReply rep; + XDGAModeRec mode; + int num, offset, flags; + char *name; + + if (stuff->screen > screenInfo.numScreens) + return BadValue; + + REQUEST_SIZE_MATCH(xXF86DGAGetVideoLLReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + if(!DGAAvailable(stuff->screen)) + return (DGAErrorBase + XF86DGANoDirectVideoMode); + + if(!(num = DGAGetOldDGAMode(stuff->screen))) + return (DGAErrorBase + XF86DGANoDirectVideoMode); + + /* get the parameters for the mode that best matches */ + DGAGetModeInfo(stuff->screen, &mode, num); + + if(!DGAOpenFramebuffer(stuff->screen, &name, + (unsigned char**)(&rep.offset), + (int*)(&rep.bank_size), &offset, &flags)) + return BadAlloc; + + rep.offset += mode.offset; + rep.width = mode.bytesPerScanline / (mode.bitsPerPixel >> 3); + rep.ram_size = rep.bank_size >> 10; + + WriteToClient(client, SIZEOF(xXF86DGAGetVideoLLReply), (char *)&rep); + return (client->noClientException); +} + +static int +ProcXF86DGADirectVideo(ClientPtr client) +{ + int num; + PixmapPtr pix; + XDGAModeRec mode; + REQUEST(xXF86DGADirectVideoReq); + + if (stuff->screen > screenInfo.numScreens) + return BadValue; + + REQUEST_SIZE_MATCH(xXF86DGADirectVideoReq); + + if (!DGAAvailable(stuff->screen)) + return DGAErrorBase + XF86DGANoDirectVideoMode; + + if (DGAClients[stuff->screen] && + (DGAClients[stuff->screen] != client)) + return DGAErrorBase + XF86DGANoDirectVideoMode; + + if (stuff->enable & XF86DGADirectGraphics) { + if(!(num = DGAGetOldDGAMode(stuff->screen))) + return (DGAErrorBase + XF86DGANoDirectVideoMode); + } else + num = 0; + + if(Success != DGASetMode(stuff->screen, num, &mode, &pix)) + return (DGAErrorBase + XF86DGAScreenNotActive); + + DGASetInputMode (stuff->screen, + (stuff->enable & XF86DGADirectKeyb) != 0, + (stuff->enable & XF86DGADirectMouse) != 0); + + /* We need to track the client and attach the teardown callback */ + if (stuff->enable & + (XF86DGADirectGraphics | XF86DGADirectKeyb | XF86DGADirectMouse)) { + if (!DGAClients[stuff->screen]) { + if (DGACallbackRefCount++ == 0) + AddCallback (&ClientStateCallback, DGAClientStateChange, NULL); + } + + DGAClients[stuff->screen] = client; + } else { + if (DGAClients[stuff->screen]) { + if (--DGACallbackRefCount == 0) + DeleteCallback(&ClientStateCallback, DGAClientStateChange, NULL); + } + + DGAClients[stuff->screen] = NULL; + } + + return (client->noClientException); +} + +static int +ProcXF86DGAGetViewPortSize(ClientPtr client) +{ + int num; + XDGAModeRec mode; + REQUEST(xXF86DGAGetViewPortSizeReq); + xXF86DGAGetViewPortSizeReply rep; + + if (stuff->screen > screenInfo.numScreens) + return BadValue; + + REQUEST_SIZE_MATCH(xXF86DGAGetViewPortSizeReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + if (!DGAAvailable(stuff->screen)) + return (DGAErrorBase + XF86DGANoDirectVideoMode); + + if(!(num = DGAGetOldDGAMode(stuff->screen))) + return (DGAErrorBase + XF86DGANoDirectVideoMode); + + DGAGetModeInfo(stuff->screen, &mode, num); + + rep.width = mode.viewportWidth; + rep.height = mode.viewportHeight; + + WriteToClient(client, SIZEOF(xXF86DGAGetViewPortSizeReply), (char *)&rep); + return (client->noClientException); +} + +static int +ProcXF86DGASetViewPort(ClientPtr client) +{ + REQUEST(xXF86DGASetViewPortReq); + + if (stuff->screen > screenInfo.numScreens) + return BadValue; + + if (DGAClients[stuff->screen] != client) + return DGAErrorBase + XF86DGADirectNotActivated; + + REQUEST_SIZE_MATCH(xXF86DGASetViewPortReq); + + if (!DGAAvailable(stuff->screen)) + return (DGAErrorBase + XF86DGANoDirectVideoMode); + + if (!DGAActive(stuff->screen)) + return DGAErrorBase + XF86DGADirectNotActivated; + + if (DGASetViewport(stuff->screen, stuff->x, stuff->y, DGA_FLIP_RETRACE) + != Success) + return DGAErrorBase + XF86DGADirectNotActivated; + + return (client->noClientException); +} + +static int +ProcXF86DGAGetVidPage(ClientPtr client) +{ + REQUEST(xXF86DGAGetVidPageReq); + xXF86DGAGetVidPageReply rep; + + if (stuff->screen > screenInfo.numScreens) + return BadValue; + + REQUEST_SIZE_MATCH(xXF86DGAGetVidPageReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.vpage = 0; /* silently fail */ + + WriteToClient(client, SIZEOF(xXF86DGAGetVidPageReply), (char *)&rep); + return (client->noClientException); +} + + +static int +ProcXF86DGASetVidPage(ClientPtr client) +{ + REQUEST(xXF86DGASetVidPageReq); + + if (stuff->screen > screenInfo.numScreens) + return BadValue; + + REQUEST_SIZE_MATCH(xXF86DGASetVidPageReq); + + /* silently fail */ + + return (client->noClientException); +} + + +static int +ProcXF86DGAInstallColormap(ClientPtr client) +{ + ColormapPtr pcmp; + REQUEST(xXF86DGAInstallColormapReq); + + if (stuff->screen > screenInfo.numScreens) + return BadValue; + + if (DGAClients[stuff->screen] != client) + return DGAErrorBase + XF86DGADirectNotActivated; + + REQUEST_SIZE_MATCH(xXF86DGAInstallColormapReq); + + if (!DGAActive(stuff->screen)) + return (DGAErrorBase + XF86DGADirectNotActivated); + + pcmp = (ColormapPtr )LookupIDByType(stuff->id, RT_COLORMAP); + if (pcmp) { + DGAInstallCmap(pcmp); + return (client->noClientException); + } else { + client->errorValue = stuff->id; + return (BadColor); + } +} + +static int +ProcXF86DGAQueryDirectVideo(ClientPtr client) +{ + REQUEST(xXF86DGAQueryDirectVideoReq); + xXF86DGAQueryDirectVideoReply rep; + + if (stuff->screen > screenInfo.numScreens) + return BadValue; + + REQUEST_SIZE_MATCH(xXF86DGAQueryDirectVideoReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.flags = 0; + + if (DGAAvailable(stuff->screen)) + rep.flags = XF86DGADirectPresent; + + WriteToClient(client, SIZEOF(xXF86DGAQueryDirectVideoReply), (char *)&rep); + return (client->noClientException); +} + +static int +ProcXF86DGAViewPortChanged(ClientPtr client) +{ + REQUEST(xXF86DGAViewPortChangedReq); + xXF86DGAViewPortChangedReply rep; + + if (stuff->screen > screenInfo.numScreens) + return BadValue; + + if (DGAClients[stuff->screen] != client) + return DGAErrorBase + XF86DGADirectNotActivated; + + REQUEST_SIZE_MATCH(xXF86DGAViewPortChangedReq); + + if (!DGAActive(stuff->screen)) + return (DGAErrorBase + XF86DGADirectNotActivated); + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.result = 1; + + WriteToClient(client, SIZEOF(xXF86DGAViewPortChangedReply), (char *)&rep); + return (client->noClientException); +} + +#endif /* DGA_PROTOCOL_OLD_SUPPORT */ static int SProcXDGADispatch (ClientPtr client) @@ -701,15 +987,11 @@ ProcXDGADispatch (ClientPtr client) if (stuff->data <= X_XDGACreateColormap) fprintf (stderr, " DGA %s\n", dgaMinor[stuff->data]); #endif - - /* divert old protocol */ -#if 1 - if( (stuff->data <= X_XF86DGAViewPortChanged) && - (stuff->data >= X_XF86DGAGetVideoLL)) - return ProcXF86DGADispatch(client); -#endif switch (stuff->data){ + /* + * DGA2 Protocol + */ case X_XDGAQueryVersion: return ProcXDGAQueryVersion(client); case X_XDGAQueryModes: @@ -742,6 +1024,29 @@ ProcXDGADispatch (ClientPtr client) return ProcXDGAChangePixmapMode(client); case X_XDGACreateColormap: return ProcXDGACreateColormap(client); + /* + * Old DGA Protocol + */ +#ifdef DGA_PROTOCOL_OLD_SUPPORT + case X_XF86DGAGetVideoLL: + return ProcXF86DGAGetVideoLL(client); + case X_XF86DGADirectVideo: + return ProcXF86DGADirectVideo(client); + case X_XF86DGAGetViewPortSize: + return ProcXF86DGAGetViewPortSize(client); + case X_XF86DGASetViewPort: + return ProcXF86DGASetViewPort(client); + case X_XF86DGAGetVidPage: + return ProcXF86DGAGetVidPage(client); + case X_XF86DGASetVidPage: + return ProcXF86DGASetVidPage(client); + case X_XF86DGAInstallColormap: + return ProcXF86DGAInstallColormap(client); + case X_XF86DGAQueryDirectVideo: + return ProcXF86DGAQueryDirectVideo(client); + case X_XF86DGAViewPortChanged: + return ProcXF86DGAViewPortChanged(client); +#endif /* DGA_PROTOCOL_OLD_SUPPORT */ default: return BadRequest; } @@ -750,5 +1055,5 @@ ProcXDGADispatch (ClientPtr client) void XFree86DGARegister(INITARGS) { - XDGAEventBase = &DGAEventBase; + XDGAEventBase = &DGAEventBase; } diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xf86misc.c b/xorg-server/hw/xfree86/dixmods/extmod/xf86misc.c deleted file mode 100644 index 8127afdff..000000000 --- a/xorg-server/hw/xfree86/dixmods/extmod/xf86misc.c +++ /dev/null @@ -1,821 +0,0 @@ - -/* - * Copyright (c) 1995, 1996 The XFree86 Project, Inc - */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#define NEED_REPLIES -#define NEED_EVENTS -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "scrnintstr.h" -#include "inputstr.h" -#include "servermd.h" -#define _XF86MISC_SERVER_ -#undef _XF86MISC_SAVER_COMPAT_ -#include -#include "swaprep.h" -#include "xf86.h" -#include -#include "xf86miscproc.h" - -#if 0 -#include -#include "../os/osdep.h" -#include -#ifndef USL -#ifndef Lynx -#include -#else -#include -#endif -#endif /* USL */ -#endif - -static int miscErrorBase; -static DevPrivateKey MiscClientPrivateKey = &MiscClientPrivateKey; - -/* This holds the client's version information */ -typedef struct { - int major; - int minor; -} MiscPrivRec, *MiscPrivPtr; - -#define M_GETPRIV(c) ((MiscPrivPtr) \ - dixLookupPrivate(&(c)->devPrivates, MiscClientPrivateKey)) -#define M_SETPRIV(c,p) \ - dixSetPrivate(&(c)->devPrivates, MiscClientPrivateKey, p) - -static void XF86MiscResetProc( - ExtensionEntry* /* extEntry */ -); - -static void -ClientVersion(ClientPtr client, int *major, int *minor) -{ - MiscPrivPtr pPriv; - - pPriv = M_GETPRIV(client); - if (!pPriv) { - if (major) *major = 0; - if (minor) *minor = 0; - return; - } - - if (major) *major = pPriv->major; - if (minor) *minor = pPriv->minor; -} - -static DISPATCH_PROC(ProcXF86MiscDispatch); -static DISPATCH_PROC(ProcXF86MiscQueryVersion); -static DISPATCH_PROC(ProcXF86MiscGetKbdSettings); -static DISPATCH_PROC(ProcXF86MiscGetMouseSettings); -static DISPATCH_PROC(ProcXF86MiscSetKbdSettings); -static DISPATCH_PROC(ProcXF86MiscSetMouseSettings); -static DISPATCH_PROC(ProcXF86MiscSetGrabKeysState); -static DISPATCH_PROC(ProcXF86MiscSetClientVersion); -static DISPATCH_PROC(ProcXF86MiscGetFilePaths); -static DISPATCH_PROC(ProcXF86MiscPassMessage); -#ifdef _XF86MISC_SAVER_COMPAT_ -static DISPATCH_PROC(ProcXF86MiscGetSaver); -static DISPATCH_PROC(ProcXF86MiscSetSaver); -#endif -static DISPATCH_PROC(SProcXF86MiscDispatch); -static DISPATCH_PROC(SProcXF86MiscQueryVersion); -static DISPATCH_PROC(SProcXF86MiscGetKbdSettings); -static DISPATCH_PROC(SProcXF86MiscGetMouseSettings); -static DISPATCH_PROC(SProcXF86MiscSetKbdSettings); -static DISPATCH_PROC(SProcXF86MiscSetMouseSettings); -static DISPATCH_PROC(SProcXF86MiscSetGrabKeysState); -static DISPATCH_PROC(SProcXF86MiscSetClientVersion); -static DISPATCH_PROC(SProcXF86MiscGetFilePaths); -static DISPATCH_PROC(SProcXF86MiscPassMessage); -#ifdef _XF86MISC_SAVER_COMPAT_ -static DISPATCH_PROC(SProcXF86MiscGetSaver); -static DISPATCH_PROC(SProcXF86MiscSetSaver); -#endif - -#if 0 -static unsigned char XF86MiscReqCode = 0; -#endif - -#ifdef DEBUG -# define DEBUG_P(x) ErrorF x; -#else -# define DEBUG_P(x) do {} while (0) -#endif - -#define MISCERR(x) (miscErrorBase + x) - -void -XFree86MiscExtensionInit(void) -{ - ExtensionEntry* extEntry; - - if (!xf86GetModInDevEnabled()) - return; - - if ( - (extEntry = AddExtension(XF86MISCNAME, - XF86MiscNumberEvents, - XF86MiscNumberErrors, - ProcXF86MiscDispatch, - SProcXF86MiscDispatch, - XF86MiscResetProc, - StandardMinorOpcode))) { -#if 0 - XF86MiscReqCode = (unsigned char)extEntry->base; -#endif - miscErrorBase = extEntry->errorBase; - } -} - -/*ARGSUSED*/ -static void -XF86MiscResetProc (extEntry) - ExtensionEntry* extEntry; -{ -} - -static int -ProcXF86MiscQueryVersion(client) - register ClientPtr client; -{ - xXF86MiscQueryVersionReply rep; - register int n; - - REQUEST_SIZE_MATCH(xXF86MiscQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = XF86MISC_MAJOR_VERSION; - rep.minorVersion = XF86MISC_MINOR_VERSION; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); - } - WriteToClient(client, sizeof(xXF86MiscQueryVersionReply), (char *)&rep); - return (client->noClientException); -} - -#ifdef _XF86MISC_SAVER_COMPAT_ -/* THESE HAVE NOT BEEN CONVERTED TO THE NEW DESIGN */ - -/* - * This will go away, but remains for now for compatibility with older - * clients. - */ -static int -ProcXF86MiscSetSaver(client) - register ClientPtr client; -{ - REQUEST(xXF86MiscSetSaverReq); - ScrnInfoPtr vptr; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - vptr = (ScrnInfoPtr) - dixLookupPrivate(&screenInfo.screens[stuff->screen]->devPrivates, - xf86ScreenKey); - - REQUEST_SIZE_MATCH(xXF86MiscSetSaverReq); - - if (stuff->suspendTime < 0) - return BadValue; - if (stuff->offTime < 0) - return BadValue; - - return (client->noClientException); -} - -/* - * This will go away, but remains for now for compatibility with older - * clients. - */ -static int -ProcXF86MiscGetSaver(client) - register ClientPtr client; -{ - REQUEST(xXF86MiscGetSaverReq); - xXF86MiscGetSaverReply rep; - register int n; - ScrnInfoPtr vptr; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - vptr = (ScrnInfoPtr) - dixLookupPrivate(&screenInfo.screens[stuff->screen]->devPrivates, - xf86ScreenKey); - - REQUEST_SIZE_MATCH(xXF86MiscGetSaverReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.suspendTime = 0; - rep.offTime = 0; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.suspendTime, n); - swapl(&rep.offTime, n); - } - WriteToClient(client, SIZEOF(xXF86MiscGetSaverReply), (char *)&rep); - return (client->noClientException); -} - -#endif /* _XF86MISC_SAVER_COMPAT_ */ - -static int -ProcXF86MiscGetMouseSettings(client) - register ClientPtr client; -{ - xXF86MiscGetMouseSettingsReply rep; - char *devname; - pointer mouse; - register int n; - int devnamelen; - - REQUEST_SIZE_MATCH(xXF86MiscGetMouseSettingsReq); - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - - if (!MiscExtGetMouseSettings(&mouse, &devname)) - return BadValue; - - rep.mousetype = MiscExtGetMouseValue(mouse, MISC_MSE_PROTO); - rep.baudrate = MiscExtGetMouseValue(mouse, MISC_MSE_BAUDRATE); - rep.samplerate = MiscExtGetMouseValue(mouse, MISC_MSE_SAMPLERATE); - rep.resolution = MiscExtGetMouseValue(mouse, MISC_MSE_RESOLUTION); - rep.buttons = MiscExtGetMouseValue(mouse, MISC_MSE_BUTTONS); - rep.emulate3buttons = MiscExtGetMouseValue(mouse, MISC_MSE_EM3BUTTONS); - rep.emulate3timeout = MiscExtGetMouseValue(mouse, MISC_MSE_EM3TIMEOUT); - rep.chordmiddle = MiscExtGetMouseValue(mouse, MISC_MSE_CHORDMIDDLE); - rep.flags = MiscExtGetMouseValue(mouse, MISC_MSE_FLAGS); - devnamelen = rep.devnamelen = (devname? strlen(devname): 0); - rep.length = (sizeof(xXF86MiscGetMouseSettingsReply) - - sizeof(xGenericReply) + ((rep.devnamelen+3) & ~3)) >> 2; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.mousetype, n); - swapl(&rep.baudrate, n); - swapl(&rep.samplerate, n); - swapl(&rep.resolution, n); - swapl(&rep.buttons, n); - swapl(&rep.emulate3buttons, n); - swapl(&rep.emulate3timeout, n); - swapl(&rep.chordmiddle, n); - swapl(&rep.flags, n); - } - WriteToClient(client, SIZEOF(xXF86MiscGetMouseSettingsReply), (char *)&rep); - MiscExtDestroyStruct(mouse, MISC_POINTER); - - if (devnamelen) - WriteToClient(client, devnamelen, devname); - return (client->noClientException); -} - -static int -ProcXF86MiscGetKbdSettings(client) - register ClientPtr client; -{ - xXF86MiscGetKbdSettingsReply rep; - pointer kbd; - register int n; - - REQUEST_SIZE_MATCH(xXF86MiscGetKbdSettingsReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - if (!MiscExtGetKbdSettings(&kbd)) - return BadValue; - - rep.kbdtype = MiscExtGetKbdValue(kbd, MISC_KBD_TYPE); - rep.rate = MiscExtGetKbdValue(kbd, MISC_KBD_RATE); - rep.delay = MiscExtGetKbdValue(kbd, MISC_KBD_DELAY); - rep.servnumlock = MiscExtGetKbdValue(kbd, MISC_KBD_SERVNUMLOCK); - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.kbdtype, n); - swapl(&rep.rate, n); - swapl(&rep.delay, n); - } - WriteToClient(client, SIZEOF(xXF86MiscGetKbdSettingsReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86MiscSetMouseSettings(client) - register ClientPtr client; -{ - MiscExtReturn ret; - pointer mouse; - char *devname = NULL; - int major, minor; - - REQUEST(xXF86MiscSetMouseSettingsReq); - - REQUEST_AT_LEAST_SIZE(xXF86MiscSetMouseSettingsReq); - - ClientVersion(client, &major, &minor); - - if (xf86GetVerbosity() > 1) { - DEBUG_P(("SetMouseSettings - type: %d brate: %d srate: %d chdmid: %d\n", - (int)stuff->mousetype, (int)stuff->baudrate, - (int)stuff->samplerate, stuff->chordmiddle)); - DEBUG_P((" em3but: %d em3tim: %d res: %d flags: %ld\n", - stuff->emulate3buttons, (int)stuff->emulate3timeout, - (int)stuff->resolution, (unsigned long)stuff->flags)); - } - - if ((mouse = MiscExtCreateStruct(MISC_POINTER)) == (pointer) 0) - return BadAlloc; - - MiscExtSetMouseValue(mouse, MISC_MSE_PROTO, stuff->mousetype); - MiscExtSetMouseValue(mouse, MISC_MSE_BAUDRATE, stuff->baudrate); - MiscExtSetMouseValue(mouse, MISC_MSE_SAMPLERATE, stuff->samplerate); - MiscExtSetMouseValue(mouse, MISC_MSE_RESOLUTION, stuff->resolution); - MiscExtSetMouseValue(mouse, MISC_MSE_BUTTONS, stuff->buttons); - MiscExtSetMouseValue(mouse, MISC_MSE_EM3BUTTONS, stuff->emulate3buttons); - MiscExtSetMouseValue(mouse, MISC_MSE_EM3TIMEOUT, stuff->emulate3timeout); - MiscExtSetMouseValue(mouse, MISC_MSE_CHORDMIDDLE, stuff->chordmiddle); - MiscExtSetMouseValue(mouse, MISC_MSE_FLAGS, stuff->flags); - - if ((major > 0 || minor > 5) && stuff->devnamelen) { - int size = sizeof(xXF86MiscSetMouseSettingsReq) + stuff->devnamelen; - size = (size + 3) >> 2; - if (client->req_len < size) - return BadLength; - if (stuff->devnamelen) { - if (!(devname = xalloc(stuff->devnamelen))) - return BadAlloc; - strncpy(devname,(char*)(&stuff[1]),stuff->devnamelen); - if (xf86GetVerbosity() > 1) - DEBUG_P(("SetMouseSettings - device: %s\n",devname)); - MiscExtSetMouseDevice(mouse, devname); - } - } - - ret = MiscExtApply(mouse, MISC_POINTER); - - if (devname) - xfree(devname); - - switch ((ret)) { - case MISC_RET_SUCCESS: break; - case MISC_RET_BADVAL: return BadValue; - case MISC_RET_BADMSEPROTO: return MISCERR(XF86MiscBadMouseProtocol); - case MISC_RET_BADBAUDRATE: return MISCERR(XF86MiscBadMouseBaudRate); - case MISC_RET_BADFLAGS: return MISCERR(XF86MiscBadMouseFlags); - case MISC_RET_BADCOMBO: return MISCERR(XF86MiscBadMouseCombo); - case MISC_RET_NOMODULE: return MISCERR(XF86MiscNoModule); - default: - DEBUG_P(("Unexpected return from MiscExtApply(POINTER) = %d\n", ret)); - return BadImplementation; - } - - if (xf86GetVerbosity() > 1) - DEBUG_P(("SetMouseSettings - Succeeded\n")); - return (client->noClientException); -} - -static int -ProcXF86MiscSetKbdSettings(client) - register ClientPtr client; -{ - MiscExtReturn ret; - pointer kbd; - REQUEST(xXF86MiscSetKbdSettingsReq); - - REQUEST_SIZE_MATCH(xXF86MiscSetKbdSettingsReq); - - if (xf86GetVerbosity() > 1) - DEBUG_P(("SetKbdSettings - type: %d rate: %d delay: %d snumlk: %d\n", - (int)stuff->kbdtype, (int)stuff->rate, - (int)stuff->delay, stuff->servnumlock)); - - if ((kbd = MiscExtCreateStruct(MISC_KEYBOARD)) == (pointer) 0) - return BadAlloc; - - MiscExtSetKbdValue(kbd, MISC_KBD_TYPE, stuff->kbdtype); - MiscExtSetKbdValue(kbd, MISC_KBD_RATE, stuff->rate); - MiscExtSetKbdValue(kbd, MISC_KBD_DELAY, stuff->delay); - MiscExtSetKbdValue(kbd, MISC_KBD_SERVNUMLOCK, stuff->servnumlock); - - switch ((ret = MiscExtApply(kbd, MISC_KEYBOARD))) { - case MISC_RET_SUCCESS: break; - case MISC_RET_BADVAL: return BadValue; - case MISC_RET_BADKBDTYPE: return MISCERR(XF86MiscBadKbdType); - default: - DEBUG_P(("Unexpected return from MiscExtApply(KEYBOARD) = %d\n", ret)); - return BadImplementation; - } - - if (xf86GetVerbosity() > 1) - DEBUG_P(("SetKbdSettings - Succeeded\n")); - return (client->noClientException); -} - -static int -ProcXF86MiscSetGrabKeysState(client) - register ClientPtr client; -{ - int n, status; - xXF86MiscSetGrabKeysStateReply rep; - REQUEST(xXF86MiscSetGrabKeysStateReq); - - REQUEST_SIZE_MATCH(xXF86MiscSetGrabKeysStateReq); - - if ((status = MiscExtSetGrabKeysState(client, stuff->enable)) == 0) { - if (xf86GetVerbosity() > 1) - DEBUG_P(("SetGrabKeysState - %s\n", - stuff->enable ? "enabled" : "disabled")); - } - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.status = status; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.status, n); - } - WriteToClient(client, SIZEOF(xXF86MiscSetGrabKeysStateReply), (char *)&rep); - - return (client->noClientException); -} - -static int -ProcXF86MiscSetClientVersion(ClientPtr client) -{ - REQUEST(xXF86MiscSetClientVersionReq); - - MiscPrivPtr pPriv; - - REQUEST_SIZE_MATCH(xXF86MiscSetClientVersionReq); - - if ((pPriv = M_GETPRIV(client)) == NULL) { - pPriv = xalloc(sizeof(MiscPrivRec)); - if (!pPriv) - return BadAlloc; - M_SETPRIV(client, pPriv); - } - if (xf86GetVerbosity() > 1) - DEBUG_P(("SetClientVersion: %i %i\n",stuff->major,stuff->minor)); - pPriv->major = stuff->major; - pPriv->minor = stuff->minor; - - return (client->noClientException); -} - -static int -ProcXF86MiscGetFilePaths(client) - register ClientPtr client; -{ - xXF86MiscGetFilePathsReply rep; - const char *configfile; - const char *modulepath; - const char *logfile; - register int n; - int configlen, modulelen, loglen; - - REQUEST_SIZE_MATCH(xXF86MiscGetFilePathsReq); - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - - if (!MiscExtGetFilePaths(&configfile, &modulepath, &logfile)) - return BadValue; - - configlen = rep.configlen = (configfile? strlen(configfile): 0); - modulelen = rep.modulelen = (modulepath? strlen(modulepath): 0); - loglen = rep.loglen = (logfile? strlen(logfile): 0); - rep.length = (SIZEOF(xXF86MiscGetFilePathsReply) - SIZEOF(xGenericReply) + - ((rep.configlen + 3) & ~3) + - ((rep.modulelen + 3) & ~3) + - ((rep.loglen + 3) & ~3) ) >> 2; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.configlen, n); - swaps(&rep.modulelen, n); - swaps(&rep.loglen, n); - } - WriteToClient(client, SIZEOF(xXF86MiscGetFilePathsReply), (char *)&rep); - - if (configlen) - WriteToClient(client, configlen, (char *)configfile); - if (modulelen) - WriteToClient(client, modulelen, (char *)modulepath); - if (loglen) - WriteToClient(client, loglen, (char *)logfile); - - return (client->noClientException); -} - -static int -ProcXF86MiscPassMessage(client) - register ClientPtr client; -{ - xXF86MiscPassMessageReply rep; - char *msgtype, *msgval, *retstr; - int retval, size; - register int n; - int mesglen; - - REQUEST(xXF86MiscPassMessageReq); - - REQUEST_AT_LEAST_SIZE(xXF86MiscPassMessageReq); - size = (sizeof(xXF86MiscPassMessageReq) + 3) >> 2; - size+= (stuff->typelen + 3) >> 2; - size+= (stuff->vallen + 3) >> 2; - if (client->req_len < size) - return BadLength; - if (stuff->typelen) { - if (!(msgtype = xalloc(stuff->typelen))) - return BadAlloc; - strncpy(msgtype,(char*)(&stuff[1]),stuff->typelen); - } else return BadValue; - if (stuff->vallen) { - if (!(msgval = xalloc(stuff->vallen))) { - xfree(msgtype); - return BadAlloc; - } - strncpy(msgval,(char*)((char*)&stuff[1] + ((stuff->typelen + 3) & ~3)), - stuff->vallen); - } else { - xfree(msgtype); - return BadValue; - } - - if ((retval = MiscExtPassMessage(stuff->screen,msgtype,msgval,&retstr)) != 0) { - xfree(msgtype); - xfree(msgval); - return retval; - } - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - mesglen = rep.mesglen = (retstr? strlen(retstr): 0); - rep.length = (SIZEOF(xXF86MiscPassMessageReply) - SIZEOF(xGenericReply) + - ((rep.mesglen + 3) & ~3)) >> 2; - rep.status = 0; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.mesglen, n); - } - WriteToClient(client, SIZEOF(xXF86MiscPassMessageReply), (char *)&rep); - - if (mesglen) - WriteToClient(client, mesglen, (char *)retstr); - - xfree(msgtype); - xfree(msgval); - - return (client->noClientException); -} - -static int -ProcXF86MiscDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_XF86MiscQueryVersion: - return ProcXF86MiscQueryVersion(client); -#ifdef _XF86MISC_SAVER_COMPAT_ - case X_XF86MiscGetSaver: - return ProcXF86MiscGetSaver(client); - case X_XF86MiscSetSaver: - return ProcXF86MiscSetSaver(client); -#endif - case X_XF86MiscGetMouseSettings: - return ProcXF86MiscGetMouseSettings(client); - case X_XF86MiscGetKbdSettings: - return ProcXF86MiscGetKbdSettings(client); - case X_XF86MiscSetClientVersion: - return ProcXF86MiscSetClientVersion(client); - case X_XF86MiscGetFilePaths: - return ProcXF86MiscGetFilePaths(client); - case X_XF86MiscPassMessage: - return ProcXF86MiscPassMessage(client); - default: - if (!xf86GetModInDevEnabled()) - return miscErrorBase + XF86MiscModInDevDisabled; - if (xf86GetModInDevAllowNonLocal() || LocalClient (client)) { - switch (stuff->data) { - case X_XF86MiscSetMouseSettings: - return ProcXF86MiscSetMouseSettings(client); - case X_XF86MiscSetKbdSettings: - return ProcXF86MiscSetKbdSettings(client); - case X_XF86MiscSetGrabKeysState: - return ProcXF86MiscSetGrabKeysState(client); - default: - return BadRequest; - } - } else - return miscErrorBase + XF86MiscModInDevClientNotLocal; - } -} - -static int -SProcXF86MiscQueryVersion(client) - register ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscQueryVersionReq); - swaps(&stuff->length, n); - return ProcXF86MiscQueryVersion(client); -} - -#ifdef _XF86MISC_SAVER_COMPAT_ -static int -SProcXF86MiscGetSaver(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscGetSaverReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscGetSaverReq); - swaps(&stuff->screen, n); - return ProcXF86MiscGetSaver(client); -} - -static int -SProcXF86MiscSetSaver(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscSetSaverReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscSetSaverReq); - swaps(&stuff->screen, n); - swapl(&stuff->suspendTime, n); - swapl(&stuff->offTime, n); - return ProcXF86MiscSetSaver(client); -} -#endif /* _XF86MISC_SAVER_COMPAT_ */ - -static int -SProcXF86MiscGetMouseSettings(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscGetMouseSettingsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscGetMouseSettingsReq); - return ProcXF86MiscGetMouseSettings(client); -} - -static int -SProcXF86MiscGetKbdSettings(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscGetKbdSettingsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscGetKbdSettingsReq); - return ProcXF86MiscGetKbdSettings(client); -} - -static int -SProcXF86MiscSetMouseSettings(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscSetMouseSettingsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscSetMouseSettingsReq); - swapl(&stuff->mousetype, n); - swapl(&stuff->baudrate, n); - swapl(&stuff->samplerate, n); - swapl(&stuff->resolution, n); - swapl(&stuff->buttons, n); - swapl(&stuff->emulate3timeout, n); - swapl(&stuff->flags, n); - return ProcXF86MiscSetMouseSettings(client); -} - -static int -SProcXF86MiscSetKbdSettings(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscSetKbdSettingsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscSetKbdSettingsReq); - swapl(&stuff->kbdtype, n); - swapl(&stuff->rate, n); - swapl(&stuff->delay, n); - return ProcXF86MiscSetKbdSettings(client); -} - -static int -SProcXF86MiscSetGrabKeysState(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscSetGrabKeysStateReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscSetGrabKeysStateReq); - swaps(&stuff->enable, n); - return ProcXF86MiscSetGrabKeysState(client); -} - -static int -SProcXF86MiscSetClientVersion(ClientPtr client) -{ - register int n; - REQUEST(xXF86MiscSetClientVersionReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscSetClientVersionReq); - swaps(&stuff->major, n); - swaps(&stuff->minor, n); - return ProcXF86MiscSetClientVersion(client); -} - -static int -SProcXF86MiscGetFilePaths(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscGetFilePathsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscGetFilePathsReq); - return ProcXF86MiscGetFilePaths(client); -} - -static int -SProcXF86MiscPassMessage(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscPassMessageReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscPassMessageReq); - return ProcXF86MiscPassMessage(client); -} - -static int -SProcXF86MiscDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_XF86MiscQueryVersion: - return SProcXF86MiscQueryVersion(client); -#ifdef _XF86MISC_SAVER_COMPAT_ - case X_XF86MiscGetSaver: - return SProcXF86MiscGetSaver(client); - case X_XF86MiscSetSaver: - return SProcXF86MiscSetSaver(client); -#endif - case X_XF86MiscGetMouseSettings: - return SProcXF86MiscGetMouseSettings(client); - case X_XF86MiscGetKbdSettings: - return SProcXF86MiscGetKbdSettings(client); - case X_XF86MiscSetClientVersion: - return SProcXF86MiscSetClientVersion(client); - case X_XF86MiscGetFilePaths: - return SProcXF86MiscGetFilePaths(client); - case X_XF86MiscPassMessage: - return SProcXF86MiscPassMessage(client); - default: - if (!xf86GetModInDevEnabled()) - return miscErrorBase + XF86MiscModInDevDisabled; - if (xf86GetModInDevAllowNonLocal() || LocalClient (client)) { - switch (stuff->data) { - case X_XF86MiscSetMouseSettings: - return SProcXF86MiscSetMouseSettings(client); - case X_XF86MiscSetKbdSettings: - return SProcXF86MiscSetKbdSettings(client); - case X_XF86MiscSetGrabKeysState: - return SProcXF86MiscSetGrabKeysState(client); - default: - return BadRequest; - } - } else - return miscErrorBase + XF86MiscModInDevClientNotLocal; - } -} - diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xf86miscproc.h b/xorg-server/hw/xfree86/dixmods/extmod/xf86miscproc.h deleted file mode 100644 index 93b193ca7..000000000 --- a/xorg-server/hw/xfree86/dixmods/extmod/xf86miscproc.h +++ /dev/null @@ -1,69 +0,0 @@ - -/* Prototypes for Pointer/Keyboard functions that the DDX must provide */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _XF86MISCPROC_H_ -#define _XF86MISCPROC_H_ - -typedef enum { - MISC_MSE_PROTO, - MISC_MSE_BAUDRATE, - MISC_MSE_SAMPLERATE, - MISC_MSE_RESOLUTION, - MISC_MSE_BUTTONS, - MISC_MSE_EM3BUTTONS, - MISC_MSE_EM3TIMEOUT, - MISC_MSE_CHORDMIDDLE, - MISC_MSE_FLAGS -} MiscExtMseValType; - -typedef enum { - MISC_KBD_TYPE, - MISC_KBD_RATE, - MISC_KBD_DELAY, - MISC_KBD_SERVNUMLOCK -} MiscExtKbdValType; - -typedef enum { - MISC_RET_SUCCESS, - MISC_RET_BADVAL, - MISC_RET_BADMSEPROTO, - MISC_RET_BADBAUDRATE, - MISC_RET_BADFLAGS, - MISC_RET_BADCOMBO, - MISC_RET_BADKBDTYPE, - MISC_RET_NOMODULE -} MiscExtReturn; - -typedef enum { - MISC_POINTER, - MISC_KEYBOARD -} MiscExtStructType; - -#define MISC_MSEFLAG_CLEARDTR 1 -#define MISC_MSEFLAG_CLEARRTS 2 -#define MISC_MSEFLAG_REOPEN 128 - -void XFree86MiscExtensionInit(void); - -Bool MiscExtGetMouseSettings(pointer *mouse, char **devname); -int MiscExtGetMouseValue(pointer mouse, MiscExtMseValType valtype); -Bool MiscExtSetMouseValue(pointer mouse, MiscExtMseValType valtype, int value); -Bool MiscExtGetKbdSettings(pointer *kbd); -int MiscExtGetKbdValue(pointer kbd, MiscExtKbdValType valtype); -Bool MiscExtSetKbdValue(pointer kbd, MiscExtKbdValType valtype, int value); -int MiscExtSetGrabKeysState(ClientPtr client, int enable); -pointer MiscExtCreateStruct(MiscExtStructType mse_or_kbd); -void MiscExtDestroyStruct(pointer structure, MiscExtStructType mse_or_kbd); -MiscExtReturn MiscExtApply(pointer structure, MiscExtStructType mse_or_kbd); -Bool MiscExtSetMouseDevice(pointer mouse, char* device); -Bool MiscExtGetFilePaths(const char **configfile, const char **modulepath, - const char **logfile); -int MiscExtPassMessage(int scrn, const char *msgtype, const char *msgval, - char **retstr); - -#endif - diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c b/xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c index 718d40fbd..aecaf94ff 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c +++ b/xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c @@ -48,11 +48,13 @@ from Kaleb S. KEITHLEY #include "swaprep.h" #include "xf86.h" #include "vidmodeproc.h" +#include "globals.h" #define DEFAULT_XF86VIDMODE_VERBOSITY 3 static int VidModeErrorBase; -static DevPrivateKey VidModeClientPrivateKey = &VidModeClientPrivateKey; +static int VidModeClientPrivateKeyIndex; +static DevPrivateKey VidModeClientPrivateKey = &VidModeClientPrivateKeyIndex; /* This holds the client's version information */ typedef struct { @@ -65,10 +67,6 @@ typedef struct { #define VM_SETPRIV(c,p) \ dixSetPrivate(&(c)->devPrivates, VidModeClientPrivateKey, p) -static void XF86VidModeResetProc( - ExtensionEntry* /* extEntry */ -); - static DISPATCH_PROC(ProcXF86VidModeDispatch); static DISPATCH_PROC(ProcXF86VidModeGetAllModeLines); static DISPATCH_PROC(ProcXF86VidModeGetModeLine); @@ -126,8 +124,6 @@ static void SXF86VidModeNotifyEvent(); xXF86VidModeNotifyEvent * /* to */ ); -extern WindowPtr *WindowTable; - static RESTYPE EventType; /* resource type for event masks */ typedef struct _XF86VidModeEvent *XF86VidModeEventPtr; @@ -146,8 +142,9 @@ typedef struct _XF86VidModeScreenPrivate { XF86VidModeEventPtr events; Bool hasWindow; } XF86VidModeScreenPrivateRec, *XF86VidModeScreenPrivatePtr; - -static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKey; + +static int ScreenPrivateKeyIndex; +static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKeyIndex; #define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr) \ dixLookupPrivate(&(s)->devPrivates, ScreenPrivateKey)) @@ -199,7 +196,7 @@ XFree86VidModeExtensionInit(void) XF86VidModeNumberErrors, ProcXF86VidModeDispatch, SProcXF86VidModeDispatch, - XF86VidModeResetProc, + NULL, StandardMinorOpcode))) { #if 0 XF86VidModeReqCode = (unsigned char)extEntry->base; @@ -212,13 +209,6 @@ XFree86VidModeExtensionInit(void) } } -/*ARGSUSED*/ -static void -XF86VidModeResetProc (extEntry) - ExtensionEntry* extEntry; -{ -} - static int ClientMajorVersion(ClientPtr client) { @@ -1553,6 +1543,7 @@ ProcXF86VidModeGetGammaRamp(ClientPtr client) { CARD16 *ramp = NULL; int n, length, i; + size_t ramplen; xXF86VidModeGetGammaRampReply rep; REQUEST(xXF86VidModeGetGammaRampReq); @@ -1567,7 +1558,8 @@ ProcXF86VidModeGetGammaRamp(ClientPtr client) length = (stuff->size + 1) & ~1; if(stuff->size) { - if(!(ramp = xalloc(length * 3 * sizeof(CARD16)))) + ramplen = length * 3 * sizeof(CARD16); + if (!(ramp = xalloc(ramplen))) return BadAlloc; if (!VidModeGetGammaRamp(stuff->screen, stuff->size, @@ -1585,13 +1577,12 @@ ProcXF86VidModeGetGammaRamp(ClientPtr client) swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); swaps(&rep.size, n); - for(i = 0; i < length * 3; i++) - swaps(&ramp[i],n); + SwapShorts(ramp, length * 3); } WriteToClient(client, sizeof(xXF86VidModeGetGammaRampReply), (char *)&rep); if(stuff->size) { - WriteToClient(client, rep.length << 2, (char*)ramp); + WriteToClient(client, ramplen, (char*)ramp); xfree(ramp); } @@ -2072,7 +2063,6 @@ SProcXF86VidModeGetGamma(ClientPtr client) static int SProcXF86VidModeSetGammaRamp(ClientPtr client) { - CARD16 *ramp; int length, n; REQUEST(xXF86VidModeSetGammaRampReq); swaps(&stuff->length, n); @@ -2081,11 +2071,7 @@ SProcXF86VidModeSetGammaRamp(ClientPtr client) swaps(&stuff->screen, n); length = ((stuff->size + 1) & ~1) * 6; REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length); - ramp = (CARD16*)&stuff[1]; - while(length--) { - swaps(ramp, n); - ramp++; - } + SwapRestS(stuff); return ProcXF86VidModeSetGammaRamp(client); } diff --git a/xorg-server/hw/xfree86/dixmods/ftmodule.c b/xorg-server/hw/xfree86/dixmods/ftmodule.c deleted file mode 100644 index 382c0b3b7..000000000 --- a/xorg-server/hw/xfree86/dixmods/ftmodule.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 1998-2002 The XFree86 Project, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the XFree86 Project shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from the - * XFree86 Project. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "misc.h" - -#include -#include "xf86Module.h" - -static MODULESETUPPROTO(freetypeSetup); - - /* - * This is the module data function that is accessed when loading - * libfreetype as a module. - */ - -static XF86ModuleVersionInfo VersRec = -{ - "freetype", - MODULEVENDORSTRING " & the After X-TT Project", - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 2, 1, 0, - ABI_CLASS_FONT, /* Font module */ - ABI_FONT_VERSION, - MOD_CLASS_FONT, - {0,0,0,0} /* signature, to be patched into the file by a tool */ -}; - -_X_EXPORT XF86ModuleData freetypeModuleData = { &VersRec, freetypeSetup, NULL }; - -extern void FreeTypeRegisterFontFileFunctions(void); - -static FontModule freetypeModule = { - FreeTypeRegisterFontFileFunctions, - "FreeType", - NULL -}; - -static pointer -freetypeSetup(pointer module, pointer opts, int *errmaj, int *errmin) -{ - freetypeModule.module = module; - LoadFont(&freetypeModule); - - /* Need a non-NULL return */ - return (pointer)1; -} diff --git a/xorg-server/hw/xfree86/dixmods/glxmodule.c b/xorg-server/hw/xfree86/dixmods/glxmodule.c index f6fda4b07..62a047e26 100644 --- a/xorg-server/hw/xfree86/dixmods/glxmodule.c +++ b/xorg-server/hw/xfree86/dixmods/glxmodule.c @@ -101,21 +101,6 @@ glxSetup(pointer module, pointer opts, int *errmaj, int *errmin) GlxPushProvider(provider); } - switch (xf86Info.glxVisuals) { - case XF86_GlxVisualsMinimal: - GlxSetVisualConfig(GLX_MINIMAL_VISUALS); - xf86Msg(xf86Info.aiglxFrom, "Exporting only minimal set of GLX visuals\n"); - break; - case XF86_GlxVisualsTypical: - GlxSetVisualConfig(GLX_TYPICAL_VISUALS); - xf86Msg(xf86Info.aiglxFrom, "Exporting typical set of GLX visuals\n"); - break; - case XF86_GlxVisualsAll: - GlxSetVisualConfig(GLX_ALL_VISUALS); - xf86Msg(xf86Info.aiglxFrom, "Exporting all GLX visuals\n"); - break; - } - LoadExtension(&GLXExt, FALSE); return module; diff --git a/xorg-server/hw/xfree86/dixmods/mfbmodule.c b/xorg-server/hw/xfree86/dixmods/mfbmodule.c deleted file mode 100644 index 91539d709..000000000 --- a/xorg-server/hw/xfree86/dixmods/mfbmodule.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 1998 The XFree86 Project, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the XFree86 Project shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from the - * XFree86 Project. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf86Module.h" - -static XF86ModuleVersionInfo VersRec = -{ - "mfb", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 1, 0, 0, - ABI_CLASS_ANSIC, /* Only need the ansic layer */ - ABI_ANSIC_VERSION, - MOD_CLASS_NONE, - {0,0,0,0} /* signature, to be patched into the file by a tool */ -}; - -_X_EXPORT XF86ModuleData mfbModuleData = { &VersRec, NULL, NULL }; diff --git a/xorg-server/hw/xfree86/dixmods/xf86XTrapModule.c b/xorg-server/hw/xfree86/dixmods/xf86XTrapModule.c deleted file mode 100644 index e89d7751d..000000000 --- a/xorg-server/hw/xfree86/dixmods/xf86XTrapModule.c +++ /dev/null @@ -1,45 +0,0 @@ -/* This is the xf86 module code for the DEC_XTRAP extension. */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "xf86Module.h" - -#include - -extern void DEC_XTRAPInit(INITARGS); - -static MODULESETUPPROTO(xtrapSetup); - -static ExtensionModule xtrapExt = -{ - DEC_XTRAPInit, - XTrapExtName, - NULL, - NULL, - NULL -}; - -static XF86ModuleVersionInfo xtrapVersRec = -{ - "xtrap", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 1, 0, 0, - ABI_CLASS_EXTENSION, /* needs the server extension ABI */ - ABI_EXTENSION_VERSION, - MOD_CLASS_EXTENSION, - {0,0,0,0} -}; - -_X_EXPORT XF86ModuleData xtrapModuleData = { &xtrapVersRec, xtrapSetup, NULL }; - -static pointer -xtrapSetup(pointer module, pointer opts, int *errmaj, int *errmin) { - LoadExtension(&xtrapExt, FALSE); - /* Need a non-NULL return value to indicate success */ - return (pointer)1; -} diff --git a/xorg-server/hw/xfree86/dixmods/xkbPrivate.c b/xorg-server/hw/xfree86/dixmods/xkbPrivate.c index e0cd21739..db21a4e17 100644 --- a/xorg-server/hw/xfree86/dixmods/xkbPrivate.c +++ b/xorg-server/hw/xfree86/dixmods/xkbPrivate.c @@ -14,6 +14,7 @@ #define XKBSRV_NEED_FILE_FUNCS #include +#include "os.h" #include "xf86.h" int @@ -29,12 +30,6 @@ XkbDDXPrivate(DeviceIntPtr dev,KeyCode key,XkbAction *act) xf86ProcessActionEvent(ACTION_PREV_MODE, NULL); else if (strcasecmp(msgbuf, "+vmode")==0) xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL); - else if (strcasecmp(msgbuf, "ungrab")==0) - xf86ProcessActionEvent(ACTION_DISABLEGRAB, NULL); - else if (strcasecmp(msgbuf, "clsgrb")==0) - xf86ProcessActionEvent(ACTION_CLOSECLIENT, NULL); - else - xf86ProcessActionEvent(ACTION_MESSAGE, (void *) msgbuf); } return 0; diff --git a/xorg-server/hw/xfree86/doc/Makefile.am b/xorg-server/hw/xfree86/doc/Makefile.am index 6d8f4d213..5809fa05f 100644 --- a/xorg-server/hw/xfree86/doc/Makefile.am +++ b/xorg-server/hw/xfree86/doc/Makefile.am @@ -6,5 +6,4 @@ endif EXTRA_DIST = \ README.DRI \ - README.fonts \ README.rapidaccess diff --git a/xorg-server/hw/xfree86/doc/Makefile.in b/xorg-server/hw/xfree86/doc/Makefile.in index 434646e22..64e8d0a9e 100644 --- a/xorg-server/hw/xfree86/doc/Makefile.in +++ b/xorg-server/hw/xfree86/doc/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -42,7 +42,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -68,8 +67,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -90,10 +90,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -115,6 +111,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -124,18 +121,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -154,7 +148,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -168,7 +162,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -180,8 +177,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -190,8 +186,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -224,7 +220,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -234,27 +229,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -265,10 +245,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -277,13 +253,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -316,8 +287,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -337,7 +307,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -347,12 +316,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -370,13 +339,10 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ @BUILDDOCS_FALSE@SUBDIRS = man @BUILDDOCS_TRUE@SUBDIRS = devel man sgml EXTRA_DIST = \ README.DRI \ - README.fonts \ README.rapidaccess all: all-recursive @@ -386,8 +352,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -493,7 +459,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/doc/README.fonts b/xorg-server/hw/xfree86/doc/README.fonts deleted file mode 100644 index 0ad2b49d0..000000000 --- a/xorg-server/hw/xfree86/doc/README.fonts +++ /dev/null @@ -1,1158 +0,0 @@ - Fonts in X11R6.9 - - Juliusz Chroboczek, - - 25 March 2004 - -1. Introduction - -This document describes the support for fonts in X11R6.9. Installing fonts -(section 2., page 1) is aimed at the casual user wishing to install fonts in -X11R6.9 the rest of the document describes the font support in more detail. - -We assume some familiarity with digital fonts. If anything is not clear to -you, please consult Appendix: Background (section 5., page 1) at the end of -this document for background information. - -1.1 Two font systems - -X includes two font systems: the original core X11 fonts system, which is -present in all implementations of X11, and the Xft fonts system, which may -not be distributed with implementations of X11 that are not based on X11R6.9 -but will hopefully be included by them in the future - -The core X11 fonts system is directly derived from the fonts system included -with X11R1 in 1987, which could only use monochrome bitmap fonts. Over the -years, it has been more or less happily coerced into dealing with scalable -fonts and rotated glyphs. - -Xft was designed from the start to provide good support for scalable fonts, -and do so efficiently. Unlike the core fonts system, it supports features -such as anti-aliasing and sub-pixel rasterisation. Perhaps more importantly, -it gives applications full control over the way glyphs are rendered, making -fine typesetting and WYSIWIG display possible. Finally, it allows applica- -tions to use fonts that are not installed system-wide for displaying docu- -ments with embedded fonts. - -Xft is not compatible with the core fonts system: usage of Xft requires mak- -ing fairly extensive changes to toolkits (user-interface libraries). While -X.org will continue to maintain the core fonts system, toolkit authors are -encouraged to switch to Xft as soon as possible. - -2. Installing fonts - -This section explains how to configure both Xft and the core fonts system to -access newly-installed fonts. - -2.1 Configuring Xft - -Xft has no configuration mechanism itself, rather it relies upon the fontcon- -fig library to configure and customize fonts. That library is not specific -to X11R6.9 or indeed on any particular font output mechanism. This discus- -sion describes how fontconfig, rather than Xft, works. - -2.1.1 Installing fonts in Xft - -Fontconfig looks for fonts in a set of well-known directories that include -all of X11R6.9's standard font directories (`/usr/X11R6/lib/X11/lib/fonts/*') -by default) as well as a directory called `.fonts/' in the user's home direc- -tory. Installing a font for use by Xft applications is as simple as copying -a font file into one of these directories. - - $ cp lucbr.ttf ~/.fonts/ - -Fontconfig will notice the new font at the next opportunity and rebuild its -list of fonts. If you want to trigger this update from the command line (for -example in order to globally update the system-wide Fontconfig information), -you may run the command `fc-cache'. - - $ fc-cache - -2.1.2 Fine-tuning Xft - -Fontconfig's behaviour is controlled by a set of configuration files: a sys- -tem-wide configuration file, `/etc/fonts/fonts.conf', and a user-specific -file called `.fonts.conf' in the user's home directory (this can be overrid- -den with the `FONTCONFIG_FILE' environment variable). - -Every Fontconfig configuration file must start with the following boiler- -plate: - - - - - -In addition, every Fontconfig configuration file must end with the following -line: - - - -The default Fontconfig configuration file includes the directory `~/.fonts/' -in the list of directories searched for font files, and this is where user- -specific font files should be installed. In the unlikely case that a new -font directory needs to be added, this can be done with the following syntax: - - /usr/local/share/fonts/ - -Another useful option is the ability to disable anti-aliasing (font smooth- -ing) for selected fonts. This can be done with the following syntax: - - - - Lucida Console - - - false - - - -Anti-aliasing can be disabled for all fonts by the following incantation: - - - - false - - - -Xft supports sub-pixel rasterisation on LCD displays. X11R6.9 should auto- -matically enable this feature on laptops and when using an LCD monitor con- -nected with a DVI cable; you can check whether this was done by typing - - $ xdpyinfo -ext RENDER | grep sub-pixel - -If this doesn't print anything, you will need to configure Render for your -particular LCD hardware manually; this is done with the following syntax: - - - - rgb - - - -The string `rgb' within the `'...`' specifies the order of -pixel components on your display, and should be changed to match your hard- -ware; it can be one of `rgb (normal LCD screen), `bgr' (backwards LCD -screen), `vrgb' (LCD screen rotated clockwise) or `vbgr' (LCD screen rotated -counterclockwise). - -2.1.3 Configuring applications - -Because most current applications use the core fonts system by default, it is -necessary to explicitly configure them to use Xft. How this is done depends -on the application. - -XTerm can be set to use Xft by using the `-fa' command line option or by set- -ting the `XTerm*faceName' resource: - - XTerm*faceName: Courier - -or - - $ xterm -fa "Courier" - -For applications based on GTK+ 2.0 (including GNOME 2 applications), the -environment variable `GDK_USE_XFT' should be set to `1': - - $ export GDK_USE_XFT=1 - -GTK+ 2.2 uses Xft by default. - -For KDE applications, you should select ``Anti-alias fonts'' in the ``Fonts'' -panel of KDE's ``Control Center''. Note that this option is misnamed: it -switches KDE to using Xft but doesn't enable anti-aliasing in case it was -disabled by your Xft configuration file. - -(What about Mozilla?) - -2.1.4 Troubleshooting - -If some Xft-based applications don't seem to notice the changes you are mak- -ing to your configuration files, they may be linked against an old version of -Xft. In order to fix the problem, you should relink them against a current -version of Xft; on most systems, it is enough to install the current version -of the Xft and Fontconfig libraries. - -If, for some reason, you cannot upgrade the shared libraries, please check -the Xft(3) manual page included with XFree86 4.2 for the configuration mecha- -nisms of the previous version of Xft. - -2.2 Configuring the core X11 fonts system - -Installing fonts in the core system is a two step process. First, you need -to create a font directory that contains all the relevant font files as well -as some index files. You then need to inform the X server of the existence -of this new directory by including it in the font path. - -2.2.1 Installing bitmap fonts - -The X11R6.9 server can use bitmap fonts in both the cross-platform BDF format -and the somewhat more efficient binary PCF format. (X11R6.9 also supports -the obsolete SNF format.) - -Bitmap fonts are normally distributed in the BDF format. Before installing -such fonts, it is desirable (but not absolutely necessary) to convert the -font files to the PCF format. This is done by using the command `bdftopcf', -e.g. - - $ bdftopcf courier12.bdf - -You will then want to compress the resulting PCF font files: - - $ gzip courier12.pcf - -After the fonts have been converted, you should copy all the font files that -you wish to make available into a arbitrary directory, say -`/usr/local/share/fonts/bitmap/'. You should then create the index file -`fonts.dir' by running the command `mkfontdir' (please see the mkfontdir(1) -manual page for more information): - - $ mkdir /usr/local/share/fonts/bitmap/ - $ cp *.pcf.gz /usr/local/share/fonts/bitmap/ - $ mkfontdir /usr/local/share/fonts/bitmap/ - -All that remains is to tell the X server about the existence of the new font -directory; see Setting the server font path (section 2.2.4, page 1) below. - -2.2.2 Installing scalable fonts - -The X11R6.9 server supports scalable fonts in three formats: Type 1, TrueType -and CIDFont. This section only applies to the first two; for information on -CIDFonts, please see Installing CIDFonts (section 2.2.3, page 1) later in -this document. Previous versions also included support for the Speedo scal- -able font format, but that is disabled in the default builds of X11R6.9 and -not included in X11R7.0 and later releases. - -Installing scalable fonts is very similar to installing bitmap fonts: you -create a directory with the font files, and run `mkfontdir' to create an -index file called `fonts.dir'. - -There is, however, a big difference: `mkfontdir' cannot automatically recog- -nise scalable font files. For that reason, you must first index all the font -files in a file called `fonts.scale'. While this can be done by hand, it is -best done by using the `mkfontscale' utility. - - $ mkfontscale /usr/local/share/fonts/Type1/ - $ mkfontdir /usr/local/share/fonts/Type1/ - -Under some circumstances, it may be necessary to modify the `fonts.scale' -file generated by mkfontscale; for more information, please see the mkfont- -dir(1) and mkfontscale(1) manual pages and Core fonts and internationalisa- -tion (section 4.1, page 1) later in this document. - -2.2.3 Installing CID-keyed fonts - -The CID-keyed font format was designed by Adobe Systems for fonts with large -character sets. A CID-keyed font, or CIDFont for short, contains a collec- -tion of glyphs indexed by character ID (CID). - -In order to map such glyphs to meaningful indices, Adobe provide a set of -CMap files. The PostScript name of a font generated from a CIDFont consists -of the name of the CIDFont and the name of the CMap separated by two dashes. -For example, the font generated from the CIDFont `Munhwa-Regular' using the -CMap `UniKS-UCS2-H' is called - - Munhwa-Regular--UniKS-UCS2-H - -The CIDFont code in X11R6.9 requires a very rigid directory structure. The -main directory must be called `CID' (its location defaults to -`/usr/X11R6/lib/X11/fonts/CID' but it may be located anywhere), and it should -contain a subdirectory for every CID collection. Every subdirectory must -contain subdirectories called CIDFont (containing the actual CIDFont files), -CMap (containing all the needed CMaps), AFM (containing the font metric -files) and CFM (initially empty). For example, in the case of the font -Munhwa-Regular that uses the CID collection Adobe-Korea1-0, the directory -structure should be as follows: - - CID/Adobe-Korea1/CIDFont/Munhwa-Regular - CID/Adobe-Korea1/CMap/UniKS-UCS2-H - CID/Adobe-Korea1/AFM/Munhwa-Regular.afm - CID/Adobe-Korea1/CFM/ - CID/fonts.dir - CID/fonts.scale - -After creating this directory structure and copying the relevant files, you -should create a `fonts.scale' file. This file has the same format as in the -case of (non-CID) scalable fonts, except that its first column contains -PostScript font names with the extension `.cid' appended rather than actual -filenames: - - 1 - Adobe-Korea1/Munhwa-Regular--UniKS-UCS2-H.cid \ - -adobe-munhwa-medium-r-normal--0-0-0-0-p-0-iso10646-1 - -(both names on the same line). Running `mkfontdir' creates the `fonts.dir' -file: - - $ cd /usr/local/share/fonts/CID - $ mkfontdir - -Finally, you should create the font metrics summary files in the directory -`CFM' by running the command `mkcfm': - - $ mkcfm /usr/local/share/fonts/CID - -If no CFM files are available, the server will still be able to use the CID -fonts but querying them will take a long time. You should run `mkcfm' again -whenever a change is made to any of the CID-keyed fonts, or when the CID- -keyed fonts are copied to a machine with a different architecture. - -2.2.4 Setting the server's font path - -The list of directories where the server looks for fonts is known as the font -path. Informing the server of the existence of a new font directory consists -of putting it on the font path. - -The font path is an ordered list; if a client's request matches multiple -fonts, the first one in the font path is the one that gets used. When match- -ing fonts, the server makes two passes over the font path: during the first -pass, it searches for an exact match; during the second, it searches for -fonts suitable for scaling. - -For best results, scalable fonts should appear in the font path before the -bitmap fonts; this way, the server will prefer bitmap fonts to scalable fonts -when an exact match is possible, but will avoid scaling bitmap fonts when a -scalable font can be used. (The `:unscaled' hack, while still supported, -should no longer be necessary in X11R6.9.) - -You may check the font path of the running server by typing the command - - $ xset q - -2.2.4.1 Temporary modification of the font path - -The `xset' utility may be used to modify the font path for the current ses- -sion. The font path is set with the command xset fp; a new element is added -to the front with xset +fp, and added to the end with xset fp+. For example, - - $ xset +fp /usr/local/fonts/Type1 - $ xset fp+ /usr/local/fonts/bitmap - -Conversely, an element may be removed from the front of the font path with -`xset -fp', and removed from the end with `xset fp-'. You may reset the font -path to its default value with `xset fp default'. - -For more information, please consult the xset(1) manual page. - -2.2.4.2 Permanent modification of the font path - -The default font path (the one used just after server startup or after `xset -fp default') is specified in the X server's `xorg.conf' file. It is computed -by appending all the directories mentioned in the `FontPath' entries of the -`Files' section in the order in which they appear. - - FontPath "/usr/local/fonts/Type1" - ... - FontPath "/usr/local/fonts/bitmap" - -For more information, please consult the xorg.conf(5) manual page. - -2.2.5 Troubleshooting - -If you seem to be unable to use some of the fonts you have installed, the -first thing to check is that the `fonts.dir' files are correct and that they -are readable by the server (the X server usually runs as root, beware of NFS- -mounted font directories). If this doesn't help, it is quite possible that -you are trying to use a font in a format that is not supported by your -server. - -X11R6.9 supports the BDF, PCF, SNF, Type 1, TrueType, OpenType and CIDFont -font formats. However, not all X11R6.9 servers come with all the font back- -ends configured in. - -On most platforms, the X11R6.9 servers are modular: the font backends are -included in modules that are loaded at runtime. The modules to be loaded are -specified in the `xorg.conf' file using the `Load' directive: - - Load "type1" - -If you have trouble installing fonts in a specific format, you may want to -check the server's log file in order to see whether the relevant modules are -properly loaded. The list of font modules distributed with X11R6.9 is as -follows: - - o "bitmap": bitmap fonts (`*.bdf', `*.pcf' and `*.snf'); - - o "freetype": TrueType fonts (`*.ttf' and `*.ttc'), OpenType fonts - (`*.otf' and `*.otc') and Type 1 fonts (`*.pfa' and `*.pfb'); - - o "type1": alternate Type 1 backend (`*.pfa' and `*.pfb') and CIDFont - backend; - - o "xtt": alternate TrueType backend (`*.ttf' and `*.ttc'). - -Please note that the argument of the `Load' directive is case-sensitive. - -3. Fonts included with X11R6.9 - -3.1 Standard bitmap fonts - -The Sample Implementation of X11 (SI) comes with a large number of bitmap -fonts, including the `fixed' family, and bitmap versions of Courier, Times, -Helvetica and some members of the Lucida family. In the SI, these fonts are -provided in the ISO 8859-1 encoding (ISO Latin Western-European). - -In X11R6.9, a number of these fonts are provided in Unicode-encoded font -files instead. At build time, these fonts are split into font files encoded -according to legacy encodings, a process which allows us to provide the stan- -dard fonts in a number of regional encodings with no duplication of work. - -For example, the font file - - /usr/X11R6/lib/X11/fonts/misc/6x13.bdf - -with XLFD - - -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1 - -is a Unicode-encoded version of the standard `fixed' font with added support -for the Latin, Greek, Cyrillic, Georgian, Armenian, IPA and other scripts -plus numerous technical symbols. It contains over 2800 glyphs, covering all -characters of ISO 8859 parts 1-5, 7-10, 13-15, as well as all European IBM -and Microsoft code pages, KOI8, WGL4, and the repertoires of many other char- -acter sets. - -This font is used at build time for generating the font files - - 6x13-ISO8859-1.bdf - 6x13-ISO8859-2.bdf - ... - 6x13-ISO8859-15.bdf - 6x13-KOI8-R.bdf - -with respective XLFDs - - -misc-fixed-medium-r-normal--13-120-75-75-c-60-iso8859-1 - ... - -misc-fixed-medium-r-normal--13-120-75-75-c-60-iso8859-15 - -misc-fixed-medium-r-normal--13-120-75-75-c-60-koi8-r - -The standard short name `fixed' is normally an alias for - - -misc-fixed-medium-r-normal--13-120-75-75-c-60-iso8859-1 - -3.2 The ClearlyU Unicode font family - -The ClearlyU family of fonts provides a set of 12 pt, 100 dpi proportional -fonts with many of the glyphs needed for Unicode text. Together, the fonts -contain approximately 7500 glyphs. - -The main ClearlyU font has the XLFD - - -mutt-clearlyu-medium-r-normal--17-120-100-100-p-101-iso10646-1 - -and resides in the font file - - /usr/X11R6/lib/X11/fonts/misc/cu12.pcf.gz - -Additional ClearlyU fonts include - - -mutt-clearlyu alternate glyphs-medium-r-normal--17-120-100-100-p-91-iso10646-1 - -mutt-clearlyu pua-medium-r-normal--17-120-100-100-p-111-iso10646-1 - -mutt-clearlyu arabic extra-medium-r-normal--17-120-100-100-p-103-fontspecific-0 - -mutt-clearlyu ligature-medium-r-normal--17-120-100-100-p-141-fontspecific-0 - -The Alternate Glyphs font contains additional glyph shapes that are needed -for certain languages. A second alternate glyph font will be provided later -for cases where a character has more than one commonly used alternate shape -(e.g. the Urdu heh). - -The PUA font contains extra glyphs that are useful for certain rendering pur- -poses. - -The Arabic Extra font contains the glyphs necessary for characters that don't -have all of their possible shapes encoded in ISO 10646. The glyphs are -roughly ordered according to the order of the characters in the ISO 10646 -standard. - -The Ligature font contains ligatures for various scripts that may be useful -for improved presentation of text. - -3.3 Standard scalable fonts - -X11R6.9 includes all the scalable fonts distributed with X11R6. - -3.3.1 Standard Type 1 fonts - -The IBM Courier set of fonts cover ISO 8859-1 and ISO 8859-2 as well as Adobe -Standard Encoding. These fonts have XLFD - - -adobe-courier-medium-*-*--0-0-0-0-m-0-*-* - -and reside in the font files - - /usr/X11R6/lib/X11/fonts/Type1/cour*.pfa - -The Adobe Utopia set of fonts only cover ISO 8859-1 as well as Adobe Standard -Encoding. These fonts have XLFD - - -adobe-utopia-*-*-normal--0-0-0-0-p-0-iso8859-1 - -and reside in the font files - - /usr/X11R6/lib/X11/fonts/Type1/UT*.pfa - -Finally, X11R6.9 also comes with Type 1 versions of Bitstream Courier and -Charter. These fonts have XLFD - - -bitstream-courier-*-*-normal--0-0-0-0-m-0-iso8859-1 - -bitstream-charter-*-*-normal--0-0-0-0-p-0-iso8859-1 - -and reside in the font files - - /usr/X11R6/lib/X11/fonts/Type1/c*bt_.pfb - -3.4 The Bigelow & Holmes Luxi family - -X11R6.9 includes the Luxi family of scalable fonts, in both TrueType and -Type 1 format. This family consists of the fonts Luxi Serif, with XLFD - - -b&h-luxi serif-medium-*-normal--*-*-*-*-p-*-*-* - -Luxi Sans, with XLFD - - -b&h-luxi sans-medium-*-normal--*-*-*-*-p-*-*-* - -and Luxi Mono, with XLFD - - -b&h-luxi mono-medium-*-normal--*-*-*-*-m-*-*-* - -Each of these fonts comes Roman, oblique, bold and bold oblique variants The -TrueType version have glyphs covering the basic ASCII Unicode range, the -Latin 1 range, as well as the Extended Latin range and some additional punc- -tuation characters. In particular, these fonts include all the glyphs needed -for ISO 8859 parts 1, 2, 3, 4, 9, 13 and 15, as well as all the glyphs in the -Adobe Standard encoding and the Windows 3.1 character set. - -The glyph coverage of the Type 1 versions is somewhat reduced, and only cov- -ers ISO 8859 parts 1, 2 and 15 as well as the Adobe Standard encoding. - -The Luxi fonts are original designs by Kris Holmes and Charles Bigelow. Luxi -fonts include seriffed, sans serif, and monospaced styles, in roman and -oblique, and normal and bold weights. The fonts share stem weight, x-height, -capital height, ascent and descent, for graphical harmony. - -The character width metrics of Luxi roman and bold fonts match those of core -fonts bundled with popular operating and window systems. - -The license terms for the Luxi fonts are included in the file `COPYRIGHT.BH', -as well as in the License document. - -Charles Bigelow and Kris Holmes from Bigelow and Holmes Inc. developed the -Luxi typeface designs in Ikarus digital format. - -URW++ Design and Development GmbH converted the Ikarus format fonts to True- -Type and Type1 font programs and implemented the grid-fitting "hints" and -kerning tables in the Luxi fonts. - -For more information, please contact or -, or consult the URW++ web site . - -An earlier version of the Luxi fonts was made available under the name -Lucidux. This name should no longer be used due to trademark uncertainties, -and all traces of the Lucidux name have been removed from X11R6.9. - -4. More about core fonts - -This section describes X11R6.9-specific enhancements to the core X11 fonts -system. - -4.1 Core fonts and internationalisation - -The scalable font backends (Type 1 and TrueType) can automatically re-encode -fonts to the encoding specified in the XLFD in `fonts.dir'. For example, a -`fonts.dir' file can contain entries for the Type 1 Courier font such as - - cour.pfa -adobe-courier-medium-r-normal--0-0-0-0-m-0-iso8859-1 - cour.pfa -adobe-courier-medium-r-normal--0-0-0-0-m-0-iso8859-2 - -which will lead to the font being recoded to ISO 8859-1 and ISO 8859-2 -respectively. - -4.1.1 The fontenc layer - -Two of the scalable backends (Type 1 and the FreeType TrueType backend) use a -common fontenc layer for font re-encoding. This allows these backends to -share their encoding data, and allows simple configuration of new locales -independently of font type. - -Please note: the X-TrueType (X-TT) backend is not included in X11R6.9. That -functionality has been merged into the FreeType backend.> - -In the fontenc layer, an encoding is defined by a name (such as iso8859-1), -possibly a number of aliases (alternate names), and an ordered collection of -mappings. A mapping defines the way the encoding can be mapped into one of -the target encodings known to fontenc; currently, these consist of Unicode, -Adobe glyph names, and arbitrary TrueType ``cmap''s. - -A number of encodings are hardwired into fontenc, and are therefore always -available; the hardcoded encodings cannot easily be redefined. These -include: - - o iso10646-1: Unicode; - - o iso8859-1: ISO Latin-1 (Western Europe); - - o iso8859-2: ISO Latin-2 (Eastern Europe); - - o iso8859-3: ISO Latin-3 (Southern Europe); - - o iso8859-4: ISO Latin-4 (Northern Europe); - - o iso8859-5: ISO Cyrillic; - - o iso8859-6: ISO Arabic; - - o iso8859-7: ISO Greek; - - o iso8859-8: ISO Hebrew; - - o iso8859-9: ISO Latin-5 (Turkish); - - o iso8859-10: ISO Latin-6 (Nordic); - - o iso8859-15: ISO Latin-9, or Latin-0 (Revised Western-European); - - o koi8-r: KOI8 Russian; - - o koi8-u: KOI8 Ukrainian (see RFC 2319); - - o koi8-ru: KOI8 Russian/Ukrainian; - - o koi8-uni: KOI8 ``Unified'' (Russian, Ukrainian, and Byelorussian); - - o koi8-e: KOI8 ``European,'' ISO-IR-111, or ECMA-Cyrillic; - - o microsoft-symbol and apple-roman: these are only likely to be useful - with TrueType symbol fonts. - -Additional encodings can be added by defining encoding files. When a font -encoding is requested that the fontenc layer doesn't know about, the backend -checks the directory in which the font file resides (not necessarily the -directory with fonts.dir!) for a file named `encodings.dir'. If found, this -file is scanned for the requested encoding, and the relevant encoding defini- -tion file is read in. The `mkfontdir' utility, when invoked with the `-e' -option followed by the name of a directory containing encoding files, can be -used to automatically build `encodings.dir' files. Please see the mkfont- -dir(1) manual page for more details. - -A number of encoding files for common encodings are included with X11R6.9. -Information on writing new encoding files can be found in Format of encodings -directory files (section 4.1.3, page 1) and Format of encoding files (section -4.1.4, page 1) later in this document. - -4.1.2 Backend-specific notes about fontenc - -4.1.2.1 The FreeType backend - -For TrueType and OpenType fonts, the FreeType backend scans the mappings in -order. Mappings with a target of PostScript are ignored; mappings with a -TrueType or Unicode target are checked against all the cmaps in the file. -The first applicable mapping is used. - -For Type 1 fonts, the FreeType backend first searches for a mapping with a -target of PostScript. If one is found, it is used. Otherwise, the backend -searches for a mapping with target Unicode, which is then composed with a -built-in table mapping codes to glyph names. Note that this table only cov- -ers part of the Unicode code points that have been assigned names by Adobe. - -Specifying an encoding value of adobe-fontspecific for a Type 1 font disables -the encoding mechanism. This is useful with symbol and incorrectly encoded -fonts (see Incorrectly encoded fonts (section 4.1.6, page 1) below). - -If a suitable mapping is not found, the FreeType backend defaults to -ISO 8859-1. - -4.1.2.2 Type 1 - -The Type 1 backend behaves similarly to the FreeType backend with Type 1 -fonts, except that it limits all encodings to 8-bit codes. - -4.1.3 Format of encoding directory files - -In order to use a font in an encoding that the font backend does not know -about, you need to have an `encodings.dir' file either in the same directory -as the font file used or in a system-wide location -(`/usr/X11R6/lib/X11/fonts/encodings/' by default). - -The `encodings.dir' file has a similar format to `fonts.dir'. Its first line -specifies the number of encodings, while every successive line has two -columns, the name of the encoding, and the name of the encoding file; this -can be relative to the current directory, or absolute. Every encoding name -should agree with the encoding name defined in the encoding file. For exam- -ple, - - 3 - mulearabic-0 /usr/X11R6/lib/X11/fonts/encodings/mulearabic-0.enc - mulearabic-1 /usr/X11R6/lib/X11/fonts/encodings/mulearabic-1.enc - mulearabic-2 /usr/X11R6/lib/X11/fonts/encodings/mulearabic-2.enc - -The name of an encoding must be specified in the encoding file's `STARTENCOD- -ING' or `ALIAS' line. It is not enough to create an `encodings.dir' entry. - -If your platform supports it (it probably does), encoding files may be com- -pressed or gzipped. - -The `encoding.dir' files are best maintained by the `mkfontdir' utility. -Please see the mkfontdir(1) manual page for more information. - -4.1.4 Format of encoding files - -The encoding files are ``free form,'' i.e. any string of whitespace is equiv- -alent to a single space. Keywords are parsed in a non-case-sensitive manner, -meaning that `size', `SIZE', and `SiZE' all parse as the same keyword; on the -other hand, case is significant in glyph names. - -Numbers can be written in decimal, as in `256', in hexadecimal, as in -`0x100', or in octal, as in `0400'. - -Comments are introduced by a hash sign `#'. A `#' may appear at any point in -a line, and all characters following the `#' are ignored, up to the end of -the line. - -The encoding file starts with the definition of the name of the encoding, and -possibly its alternate names (aliases): - - STARTENCODING mulearabic-0 - ALIAS arabic-0 - -The name of the encoding and its aliases should be suitable for use in an -XLFD font name, and therefore contain exactly one dash `-'. - -The encoding file may then optionally declare the size of the encoding. For -a linear encoding (such as ISO 8859-1), the SIZE line specifies the maximum -code plus one: - - SIZE 0x2B - -For a matrix encoding, it should specify two numbers. The first is the num- -ber of the last row plus one, the other, the highest column number plus one. -In the case of `jisx0208.1990-0' (JIS X 0208(1990), double-byte encoding, -high bit clear), it should be - - SIZE 0x75 0x80 - -In the case of a matrix encoding, a `FIRSTINDEX' line may be included to -specify the minimum glyph index in an encoding. The keyword `FIRSTINDEX' is -followed by two integers, the minimum row number followed by the minimum col- -umn number: - - FIRSTINDEX 0x20 0x20 - -In the case of a linear encoding, a `FIRSTINDEX' line is not very useful. If -for some reason however you chose to include on, it should be followed by a -single integer. - -Note that in most font backends inclusion of a `FIRSTINDEX' line has the side -effect of disabling default glyph generation, and this keyword should there- -fore be avoided unless absolutely necessary. - -Codes outside the region defined by the `SIZE' and `FIRSTINDEX' lines are -understood to be undefined. Encodings default to linear encoding with a size -of 256 (0x100). This means that you must declare the size of all 16 bit -encodings. - -What follows is one or more mapping sections. A mapping section starts with -a `STARTMAPPING' line stating the target of the mapping. The target may be -one of: - - o Unicode (ISO 10646): - - STARTMAPPING unicode - - o a given TrueType ``cmap'': - - STARTMAPPING cmap 3 1 - - o PostScript glyph names: - - STARTMAPPING postscript - -Every line in a mapping section maps one from the encoding being defined to -the target of the mapping. In mappings with a Unicode or TrueType mapping, -codes are mapped to codes: - - 0x21 0x0660 - 0x22 0x0661 - ... - -As an abbreviation, it is possible to map a contiguous range of codes in a -single line. A line consisting of three integers - - ) and has the X-TT functionalities for CJKV -support provided by the After X-TT Project (see the After X-TT Project web -site ). The FreeType module has support for -the ``fontenc'' style of internationalisation (see The fontenc layer (section -4.1.1, page 1)). This backend supports TrueType font files (`*.ttf'), Open- -Type font files (`*.otf'), TrueType Collections (`*.ttc'), OpenType Collec- -tions (`*.otc') and Type 1 font files (`*.pfa' and `*.pfb'). - -In order to access the faces in a TrueType Collection file, the face number -must be specified in the fonts.dir file before the filename, within a pair of -colons, or by setting the 'fn' TTCap option. For example, - - :1:mincho.ttc -misc-pmincho-medium-r-normal--0-0-0-0-p-0-jisx0208.1990-0 - -refers to face 1 in the `mincho.ttc' TrueType Collection file. - -The new FreeType backend supports the extended `fonts.dir' syntax introduced -by X-TrueType with a number of options, collectively known as `TTCap'. A -`TTCap' entry follows the general syntax - - option=value: - -and should be specified before the filename. The new FreeType almost per- -fectly supports TTCap options that are compatible with X-TT 1.4. The Auto- -matic Italic (`ai'), Double Strike (`ds') and Bounding box Width (`bw') -options are indispensable in CJKV. For example, - - mincho.ttc -misc-mincho-medium-r-normal--0-0-0-0-c-0-jisx0208.1990-0 - ds=y:mincho.ttc -misc-mincho-bold-r-normal--0-0-0-0-c-0-jisx0208.1990-0 - ai=0.2:mincho.ttc -misc-mincho-medium-i-normal--0-0-0-0-c-0-jisx0208.1990-0 - ds=y:ai=0.2:mincho.ttc -misc-mincho-bold-i-normal--0-0-0-0-c-0-jisx0208.1990-0 - bw=0.5:mincho.ttc -misc-mincho-medium-r-normal--0-0-0-0-c-0-jisx0201.1976-0 - bw=0.5:ds=y:mincho.ttc -misc-mincho-bold-r-normal--0-0-0-0-c-0-jisx0201.1976-0 - bw=0.5:ai=0.2:mincho.ttc -misc-mincho-medium-i-normal--0-0-0-0-c-0-jisx0201.1976-0 - bw=0.5:ds=y:ai=0.2:mincho.ttc -misc-mincho-bold-i-normal--0-0-0-0-c-0-jisx0201.1976-0 - -setup the complete combination of jisx0208 and jisx0201 using mincho.ttc -only. More information on the TTCap syntax is found on the After X-TT Pro- -ject page . - -The FreeType backend uses the fontenc layer in order to support recoding of -fonts; this was described in The fontenc layer (section 4.1.1, page 1) and -especially FreeType-specific notes about fontenc (section 4.1.2.1, page 1) -earlier in this document. - -4.2.2 About the X-TrueType TrueType backend - -The `X-TrueType' backend is a backend based on version 1 of the FreeType -library. X-TrueType doesn't use the `fontenc' layer for managing font encod- -ings, but instead uses its own database of encodings. - -Since the functionalities for CJKV support introduced by X-TT have been -merged into the new FreeType backend, the X-TT backend will be removed from -X11R6.9's tree near the future. Therefore, the use of FreeType backend is -preferred over the X-TT backend. - -General information on X-TrueType may be found at the After X-TT Project page -. - -4.2.3 Delayed glyph rasterisation - -When loading a proportional fonts which contain a huge number of glyphs, the -old FreeType delayed glyph rasterisation until the time at which the glyph -was first used. The new FreeType (libfreetype-xtt2) has an improved `very -lazy' metric calculation method to speed up the process when loading TrueType -or OpenType fonts. Although the X-TT module also has this method, the -"vl=y" TTCap option must be set if you want to use it. This is the default -method for FreeType when it loads multi-byte fonts. Even if you use a uni- -code font which has tens of thousands of glyphs, this delay will not be wor- -risome as long as you use the new FreeType backend -- its `very lazy' method -is super-fast. - -The maximum error of bitmap position using `very lazy' method is 1 pixel, and -is the same as that of a character-cell spacing. When the X-TT backend is -used with the `vl=y' option, a chipped bitmap is displayed with certain -fonts. However, the new FreeType backend has minimal problem with this, -since it corrects left- and right-side bearings using `italicAngle' in the -TrueType/OpenType post table, and does automatic correction of bitmap posi- -tions when rasterisation so that chipped bitmaps are not displayed. Never- -theless if you don't want to use the `very lazy' method when using multi- -bytes fonts, set `vl=n' in the TTCap option to disable it: - - vl=n:luxirr.ttf -b&h-Luxi Serif-medium-r-normal--0-0-0-0-p-0-iso10646-1 - -Of course, both backends also support an optimisation for character-cell -fonts (fonts with all glyph metrics equal, or terminal fonts). A font with -an XLFD specifying a character-cell spacing `c', as in - - -misc-mincho-medium-r-normal--0-0-0-0-c-0-jisx0208.1990-0 - -or - - fs=c:mincho.ttc -misc-mincho-medium-r-normal--0-0-0-0-p-0-jisx0208.1990-0 - -will not compute the metric for each glyph, but instead trust the font to be -a character-cell font. You are encouraged to make use of this optimisation -when useful, but be warned that not all monospaced fonts are character-cell -fonts. - -5. Appendix: background and terminology - -5.1 Characters and glyphs - -A computer text-processing system inputs keystrokes and outputs glyphs, small -pictures that are assembled on paper or on a computer screen. Keystrokes and -glyphs do not, in general, coincide: for example, if the system does generate -ligatures, then to the sequence of two keystrokes will typically cor- -respond a single glyph. Similarly, if the system shapes Arabic glyphs in a -vaguely reasonable manner, then multiple different glyphs may correspond to a -single keystroke. - -The complex transformation rules from keystrokes to glyphs are usually fac- -tored into two simpler transformations, from keystrokes to characters and -from characters to glyphs. You may want to think of characters as the basic -unit of text that is stored e.g. in the buffer of your text editor. While -the definition of a character is intrinsically application-specific, a number -of standardised collections of characters have been defined. - -A coded character set is a set of characters together with a mapping from -integer codes --- known as codepoints --- to characters. Examples of coded -character sets include US-ASCII, ISO 8859-1, KOI8-R, and JIS X 0208(1990). - -A coded character set need not use 8 bit integers to index characters. Many -early systems used 6 bit character sets, while 16 bit (or more) character -sets are necessary for ideographic writing systems. - -5.2 Font files, fonts, and XLFD - -Traditionally, typographers speak about typefaces and founts. A typeface is -a particular style or design, such as Times Italic, while a fount is a -molten-lead incarnation of a given typeface at a given size. - -Digital fonts come in font files. A font file contains the information nec- -essary for generating glyphs of a given typeface, and applications using font -files may access glyph information in an arbitrary order. - -Digital fonts may consist of bitmap data, in which case they are said to be -bitmap fonts. They may also consist of a mathematical description of glyph -shapes, in which case they are said to be scalable fonts. Common formats for -scalable font files are Type 1 (sometimes incorrectly called ATM fonts or -PostScript fonts), TrueType and OpenType. - -The glyph data in a digital font needs to be indexed somehow. How this is -done depends on the font file format. In the case of Type 1 fonts, glyphs -are identified by glyph names. In the case of TrueType fonts, glyphs are -indexed by integers corresponding to one of a number of indexing schemes -(usually Unicode --- see below). - -The X11 core fonts system uses the data in a font file to generate font -instances, which are collections of glyphs at a given size indexed according -to a given encoding. - -X11 core font instances are usually specified using a notation known as the X -Logical Font Description (XLFD). An XLFD starts with a dash `-', and con- -sists of fourteen fields separated by dashes, for example: - - -adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1 - -Or particular interest are the last two fields `iso8859-1', which specify the -font instance's encoding. - -A scalable font is specified by an XLFD which contains zeroes instead of some -fields: - - -adobe-courier-medium-r-normal--0-0-0-0-m-0-iso8859-1 - -X11 font instances may also be specified by short name. Unlike an XLFD, a -short name has no structure and is simply a conventional name for a font -instance. Two short names are of particular interest, as the server will not -start if font instances with these names cannot be opened. These are -`fixed', which specifies the fallback font to use when the requested font -cannot be opened, and `cursor', which specifies the set of glyphs to be used -by the mouse pointer. - -Short names are usually implemented as aliases to XLFDs; the standard `fixed' -and `cursor' aliases are defined in - - /usr/X11R6/lib/X11/font/misc/fonts.alias - -5.3 Unicode - -Unicode (urlnam ) is a coded character set with -the goal of uniquely identifying all characters for all scripts, current and -historical. While Unicode was explicitly not designed as a glyph encoding -scheme, it is often possible to use it as such. - -Unicode is an open character set, meaning that codepoint assignments may be -added to Unicode at any time (once specified, though, an assignment can never -be changed). For this reason, a Unicode font will be sparse, meaning that it -only defines glyphs for a subset of the character registry of Unicode. - -The Unicode standard is defined in parallel with the international standard -ISO 10646. Assignments in the two standards are always equivalent, and we -often use the terms Unicode and ISO 10646 interchangeably. - -When used in the X11 core fonts system, Unicode-encoded fonts should have the -last two fields of their XLFD set to `iso10646-1'. - -6. References - -X11R6.9 comes with extensive documentation in the form of manual pages and -typeset documents. Before installing fonts, you really should read the font- -config(3) and mkfontdir(1) manual pages; other manual pages of interest -include X(7), Xserver(1), xset(1), Xft(3), xlsfonts(1) and showfont(1). In -addition, you may want to read the X Logical Font Description document, by -Jim Flowers, which is provided in the file `xc/doc/xlfd.PS.Z'. - -The latest released version of the X11R6.9 documentation (including this doc- -ument and all manual pages) can be found from current X11R6.9 documentation -. - -The comp.fonts FAQ , which is -unfortunately no longer being maintained, contains a wealth of information -about digital fonts. - -Xft and Fontconfig are described on Keith Packard's Fontconfig site -. - -The xfsft home page -has been superseded by this document, and is now obsolete; you may however -still find some of the information that it contains useful. Joerg Pommnitz' -xfsft page is the -canonical source for the `ttmkfdir' utility, which is the ancestor of -mkfontscale. - -The author's software pages -might or might not contain related scribbles and development versions of -software. - -The documentation of X-TrueType is available from the After X-TT Project page -. - -A number of East-Asian CIDFonts are available from O'Reilly's FTP site -. - -While the Unicode consortium site may be of -interest, you are more likely to find what you need in Markus Kuhn's UTF-8 -and Unicode FAQ . - -The IANA RFC documents, available from a number of sites throughout the -world, often provide interesting information about character set issues; see -for example RFC 373. - - -$XdotOrg$ diff --git a/xorg-server/hw/xfree86/doc/devel/DebuggingHints b/xorg-server/hw/xfree86/doc/devel/DebuggingHints deleted file mode 100644 index 300fe4813..000000000 --- a/xorg-server/hw/xfree86/doc/devel/DebuggingHints +++ /dev/null @@ -1,192 +0,0 @@ - - Xserver Debugging - ================= - -This file is intended to collect helpful hints on Xserver debugging. -I merely outline my experiences here. Somebody else might have better -methods on doing it. This person is therefore invited to share this -experience with the rest of the world by adding it here. - -Paul Flinders has made some patches to gdb to add support for loadable -modules. This version of gdb is currently available as binary for -Linux/x86 on Paul's web site: - - www.dawa.demon.co.uk/xfree-gdb - -This web-site also contains the patches to gdb 4.18 so you may port it -to other platforms. - -It loads the module symbols and supports all gdb features like -breakpointing, disassembling and single stepping. It also shows the -exact location of a signal 11. Paul has fixed the code so that all of -this is working even if using modules compiled without -g. You can -find his latest version on his web site. - -If no module aware gdb is available the following hints might help: - -1. Use remote login. This can be done thru a network connection or - simply by connecting a serial console. This enables you to watch - the Xservers output while running set breakpoints with gdb etc. - Don't even try to run the Xserver from a system console. Whenever - something happens gdb waits for input. However the Xserver has - locked the system console including the keyboard, therefore you'll - never be able to send any input to gdb. Even if your process - doesn't crash or you haven't set any breakpoints a vt switch can be - hazardous: When doing vt switching a signal is sent; unless you did - - gdb> handle SIGUSR1 nostop - - gdb waits for you to continue the program which cannot happen as - you don't have access to gdb's console. - -2. You can compile any source file with debugging symbols to obtain - more information about where an error occurred. Simply go to the - directory which holds the corresponding object file and do: - - # rm .o - # xc/config/util/makeg.sh .o - - After relinking the server or module gdb is able to obtain the - necessary debugging information and will show the exact line in the - source where the error ccurred. See also: - xc/config/util/makeg.man. - -3. In some cases it might be useful to have the assembler output of a - compiled source file. This can be obtained by doing: - - # make .s - - or - - # xc/config/util/makeg.sh .s - - Make will use exactly the same rules it uses for building *.o files. - -4. In some cases it might be useful to set breakpoints in modules. If - no module aware gdb is available you should add a call to one of - the three dummy breakpoint functions - - xf86Break1(), xf86Break2() and xf86Break3() - - to the source file and recompile the module. You now just have to - set a breakpoint onto the appropriate dummy functions. These - functions are located in the core part of the server and therefore - will be available any time. - -5. Without module support gdb is not able to print the function where - an error occurred in a module. - - If you get a line like: - - (gdb) bt - #0 0x823b4f5 in ?? () - .... - - You may obtain the function the address belongs to by calling - LoaderPrintSymbol(): - - (gdb) call LoaderPrintSymbol(0x823b4f5) - - The symbol returned might not always be the name of the function - which contains the address. In case of static functions the symbol - is not known to the loader. However LoaderPrintSymbol() will print - the nearest known function and the offset from its start. You may - easily find the exact location of the address if you do: - - # objdump --disassemble .o - - .o is the name of the object file containing the symbol printed. - -6. Locating static symbols in modules is simpler if the module is a - single object file instead of a library. Such a object file can - easily be build from a library: # mkdir tmp # cd tmp; ar x - module-path/.a # ld -r *.o -o module-path/.o - - When calling LoaderPrintSymbol() the closes public symbol will be - printed together with the offset from the symbol's address. If a - static symbol comes before the first public symbol in a module The - following trick may help: - - create a file 1-.c in tmp/ - containing: - void Dummy-() {} - - Compile it: - - # gcc -c 1-.c - - and do the link step above. - - This way Dummy-() will be the first public function in the - module. All addresses in static function can now be printed - relatively to this address if no other public function comes before - this static one. - -7. In some situations it is quite helpful to add debugging symbols to - the binary. This can be done per object file. Simply remove the - object file and do - - # makeg - - When looking for a bug in a module these debugging infos can be - very helpful: Calling LoaderPrintSymbol() as described above will - return a function and an offset giving the exact location of the - address with respect to this function entry point. When - disassembling an object file with debugging symbols: # objdump -d - -l .o one will receive a disassembled output containing line - number information. Thus one can locate the exact line of code - where the error occurred. - -8. To quickly trace the value of a variable declared in a module three - dummy variables have been added to the core part: - - CARD32 xf86DummyVar1; - CARD32 xf86DummyVar2; - CARD32 xf86DummyVar3; - - The variable can be assigned to one of them. One can then use gdb - to return the value of this variable: - - gdb> p /x xf86DummyVar1 - -9. Sometimes it might be useful to check how the preprocessor replaced - symbols. One can obtain a preprocessed version of the source file - by doing: - - make .i - - This will generate a preprocessed source in .i. - -10. xfree() can catch if one tries to free a memory range twice. You - will get the message: - - Xalloc error: range already freed in Xrealloc() :-( - - To find the location from which xfree() was called one can - breakpoint on XfreeTrap(). The backtrace should show the origin of the - call this call. - -11. To access mapped physical memory the following functions might be - useful. - - These may be used to access physical memory that was mapped using - the flags VIDMEM_FRAMEBUFFER or VIDMEM_MMIO32: - - CARD8 xf86PeekFb8(CARD8 *p); - CARD16 xf86PeekFb16(CARD16 *p); - CARD32 xf86PeekFb32(CARD32 *p); - void xf86PokeFb8(CARD8 *p, CARD8 v); - void xf86PokeFb16(CARD16 *p, CARD16 v); - void xf86PokeFb32(CARD16 *p, CARD32 v); - - Physical memory which was mapped by setting VIDMEM_MMIO should be - accessed using the following. Here the base address to which the - memory is mapped and the offset are required separately. - - CARD8 xf86PeekMmio8(pointer Base, unsigned long Offset); - CARD16 xf86PeekMmio16(pointer Base, unsigned long Offset); - CARD32 xf86PeekMmio32(pointer Base, unsigned long Offset); - void xf86PokeMmio8(pointer Base, unsigned long Offset, CARD8 v); - void xf86PokeMmio16(pointer Base, unsigned long Offset, CARD16 v); - void xf86PokeMmio32(pointer Base, unsigned long Offset, CARD32 v); - diff --git a/xorg-server/hw/xfree86/doc/devel/Makefile.am b/xorg-server/hw/xfree86/doc/devel/Makefile.am index 6ca350c38..eb8b1cb29 100644 --- a/xorg-server/hw/xfree86/doc/devel/Makefile.am +++ b/xorg-server/hw/xfree86/doc/devel/Makefile.am @@ -2,7 +2,6 @@ # not installed on the system for end-users EXTRA_DIST = \ - DebuggingHints \ Domain.note \ RAC.Notes \ Registry \ diff --git a/xorg-server/hw/xfree86/doc/devel/Makefile.in b/xorg-server/hw/xfree86/doc/devel/Makefile.in index 7c169aff3..d5d45e4a9 100644 --- a/xorg-server/hw/xfree86/doc/devel/Makefile.in +++ b/xorg-server/hw/xfree86/doc/devel/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,7 +45,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -59,8 +58,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -81,10 +81,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -106,6 +102,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -115,18 +112,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -145,7 +139,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -159,7 +153,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -171,8 +168,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -181,8 +177,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -215,7 +211,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -225,27 +220,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -256,10 +236,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -268,13 +244,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -307,8 +278,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -328,7 +298,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -338,12 +307,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -361,10 +330,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ EXTRA_DIST = \ - DebuggingHints \ Domain.note \ RAC.Notes \ Registry \ @@ -378,8 +344,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ diff --git a/xorg-server/hw/xfree86/doc/man/Makefile.in b/xorg-server/hw/xfree86/doc/man/Makefile.in index 09fbe07f1..b48fa6263 100644 --- a/xorg-server/hw/xfree86/doc/man/Makefile.in +++ b/xorg-server/hw/xfree86/doc/man/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -48,7 +48,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -72,8 +71,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -94,10 +94,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -119,6 +115,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -128,18 +125,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -158,7 +152,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -172,7 +166,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -184,8 +181,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -194,8 +190,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -228,7 +224,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -238,27 +233,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -269,10 +249,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -281,13 +257,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -320,8 +291,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -341,7 +311,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -351,12 +320,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -374,8 +343,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ # Xserver.man covers options generic to all X servers built in this tree MAN_SRCS = Xorg.man.pre xorg.conf.man.pre @@ -428,8 +395,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ diff --git a/xorg-server/hw/xfree86/doc/man/Xorg.man.pre b/xorg-server/hw/xfree86/doc/man/Xorg.man.pre index 8b48951e7..4992dc715 100644 --- a/xorg-server/hw/xfree86/doc/man/Xorg.man.pre +++ b/xorg-server/hw/xfree86/doc/man/Xorg.man.pre @@ -30,7 +30,7 @@ SPARC and PowerPC. The most widely supported operating systems are the free/OpenSource UNIX-like systems such as Linux, FreeBSD, NetBSD, OpenBSD, and Solaris. Commercial UNIX operating systems such as UnixWare are also supported. Other supported operating systems include -LynxOS, and GNU Hurd. Darwin and Mac OS X are supported with the +GNU Hurd. Darwin and Mac OS X are supported with the XDarwin(__appmansuffix__) X server. Win32/Cygwin is supported with the XWin(__appmansuffix__) X server. .PP @@ -133,8 +133,8 @@ specifies the Virtual Terminal device number which will use. Without this option, .B __xservername__ will pick the first available Virtual Terminal that it can locate. This -option applies only to platforms such as Linux, BSD, SVR3 and SVR4, that -have virtual terminal support. +option applies only to platforms that have virtual terminal support, such +as Linux, BSD, SVR3, and SVR4. .TP .B \-allowMouseOpenFail Allow the server to start up even if the mouse device can't be opened @@ -142,13 +142,6 @@ or initialised. This is equivalent to the .B AllowMouseOpenFail __xconfigfile__(__filemansuffix__) file option. .TP 8 -.B \-allowNonLocalModInDev -Allow changes to keyboard and mouse settings from non-local clients. -By default, connections from non-local clients are not allowed to do -this. This is equivalent to the -.B AllowNonLocalModInDev -__xconfigfile__(__filemansuffix__) file option. -.TP 8 .B \-allowNonLocalXvidtune Make the VidMode extension available to remote clients. This allows the xvidtune client to connect from another host. This is equivalent @@ -175,7 +168,14 @@ to set the color depth, and use .B \-fbbpp if you really need to force a non-default framebuffer (hardware) pixel format. -.TP +.TP 8 +.BI \-config " file" +Read the server configuration from +.IR file . +This option will work for any file when the server is run as root (i.e, +with real-uid 0), or for files relative to a directory in the config +search path for all other users. +.TP 8 .B \-configure When this option is specified, the .B __xservername__ @@ -195,12 +195,6 @@ option, and is provided for compatibility with the native SCO X server. Sets the default color depth. Legal values are 1, 4, 8, 15, 16, and 24. Not all drivers support all values. .TP 8 -.B \-disableModInDev -Disable dynamic modification of input device settings. This is equivalent -to the -.B DisableModInDev -__xconfigfile__(__filemansuffix__) file option. -.TP 8 .B \-disableVidMode Disable the parts of the VidMode extension (used by the xvidtune client) that can be used to change the video modes. This is equivalent @@ -319,6 +313,10 @@ file verbosity level. When the value is supplied, the log file verbosity level is set to that value. The default log file verbosity level is 3. .TP 8 +.B \-modalias +Print a list of device ids each installed driver module claims to support, +in a format similar to Linux modalias. +.TP 8 .BI \-modulepath " searchpath" Set the module search path to .IR searchpath . @@ -399,6 +397,16 @@ in a future release, so the .B \-version option should be used instead. .TP 8 +.B \-showDefaultModulePath +Print out the default module path the server was compiled with. +.TP 8 +.B \-showDefaultLibPath +Print out the path libraries should be installed to. +.TP 8 +.B \-showopts +For each driver module installed, print out the list of options and their +argument types. +.TP 8 .BI \-weight " nnn" Set RGB weighting at 16 bpp. The default is 565. This applies only to those drivers which support 16 bpp. @@ -416,19 +424,6 @@ verbosity level is 0. Print out the server version, patchlevel, release date, the operating system/platform it was built on, and whether it includes module loader support. -.TP 8 -.B \-showDefaultModulePath -Print out the default module path the server was compiled with. -.TP 8 -.B \-showDefaultLibPath -Print out the path libraries should be installed to. -.TP 8 -.BI \-config " file" -Read the server configuration from -.IR file . -This option will work for any file when the server is run as root (i.e, -with real-uid 0), or for files relative to a directory in the config -search path for all other users. .SH "KEYBOARD" .PP The @@ -454,10 +449,11 @@ by are: .TP 8 .B Ctrl+Alt+Backspace -Immediately kills the server -- no questions asked. This can be disabled -with the +Immediately kills the server -- no questions asked. This is disabled by +default. It can be enabled with the -retro command line flag or by setting +the .B DontZap -__xconfigfile__(__filemansuffix__) file option. +__xconfigfile__(__filemansuffix__) file option to a FALSE value. .TP 8 .B Ctrl+Alt+Keypad-Plus Change video mode to next one specified in the configuration file. @@ -471,22 +467,8 @@ This can be disabled with the .B DontZoom __xconfigfile__(__filemansuffix__) file option. .TP 8 -.B Ctrl+Alt+Keypad-Multiply -Not treated specially by default. If the -.B AllowClosedownGrabs -__xconfigfile__(__filemansuffix__) file option is specified, this key sequence -kills clients with an active keyboard or mouse grab as well as killing any -application that may have locked the server, normally using the -XGrabServer(__libmansuffix__) Xlib function. -.TP 8 -.B Ctrl+Alt+Keypad-Divide -Not treated specially by default. If the -.B AllowDeactivateGrabs -__xconfigfile__(__filemansuffix__) file option is specified, this key sequence -deactivates any active keyboard and mouse grabs. -.TP 8 .B Ctrl+Alt+F1...F12 -For BSD and Linux systems with virtual terminal support, these keystroke +For systems with virtual terminal support, these keystroke combinations are used to switch to virtual terminals 1 through 12, respectively. This can be disabled with the .B DontVTSwitch @@ -560,9 +542,6 @@ Libraries. .B __projectroot__/lib/X11/fonts/\(** Fonts. .TP 30 -.B __projectroot__/share/X11/rgb.txt -Color names to RGB mapping. -.TP 30 .B __projectroot__/share/X11/XErrorDB Client error message database. .TP 30 @@ -577,7 +556,7 @@ Initial access control list for display .IR n . .SH "SEE ALSO" X(__miscmansuffix__), Xserver(__appmansuffix__), xdm(__appmansuffix__), xinit(__appmansuffix__), -__xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), xorgcfg(__appmansuffix__), xvidtune(__appmansuffix__), +__xconfigfile__(__filemansuffix__), xvidtune(__appmansuffix__), apm(__drivermansuffix__), ati(__drivermansuffix__), chips(__drivermansuffix__), @@ -588,12 +567,13 @@ glide(__drivermansuffix__), glint(__drivermansuffix__), i128(__drivermansuffix__), i740(__drivermansuffix__), -i810(__drivermansuffix__), imstt(__drivermansuffix__), +intel(__drivermansuffix__), mga(__drivermansuffix__), neomagic(__drivermansuffix__), nsc(__drivermansuffix__), nv(__drivermansuffix__), +openchrome (__drivermansuffix__), r128(__drivermansuffix__), rendition(__drivermansuffix__), s3virge(__drivermansuffix__), @@ -612,7 +592,6 @@ trident(__drivermansuffix__), tseng(__drivermansuffix__), v4l(__drivermansuffix__), vesa(__drivermansuffix__), -vga(__drivermansuffix__), vmware(__drivermansuffix__), .br Web site @@ -620,7 +599,7 @@ Web site .SH AUTHORS __xservername__ has many contributors world wide. The names of most of them -can be found in the documentation, CHANGELOG files in the source tree, +can be found in the documentation, ChangeLog files in the source tree, and in the actual source code. .PP __xservername__ was originally based on XFree86 4.4rc2. diff --git a/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre b/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre index de93aaf36..96ad0160f 100644 --- a/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre +++ b/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre @@ -54,7 +54,7 @@ is the relative path (with no \(lq..\(rq components) specified by that environment variable, and .I is the machine's hostname as reported by -.BR gethostname (__oslibmansuffix__). +.BR gethostname (__libmansuffix__). .PP When the __xservername__ server is started by the \(lqroot\(rq user, the config file search locations are as follows: @@ -67,7 +67,6 @@ search locations are as follows: .B $XORGCONFIG .IB /etc/X11/ $XORGCONFIG .IB __projectroot__/etc/X11/ $XORGCONFIG -.BI $HOME /__xconfigfile__ .I /etc/X11/__xconfigfile__\-4 .I /etc/X11/__xconfigfile__ .I /etc/__xconfigfile__ @@ -93,7 +92,7 @@ is the path specified by that environment variable (usually the home directory), and .I is the machine's hostname as reported by -.BR gethostname (__oslibmansuffix__). +.BR gethostname (__libmansuffix__). .PP The .I __xconfigfile__ @@ -116,6 +115,7 @@ The section names are: .BR "Files " "File pathnames" .BR "ServerFlags " "Server flags" .BR "Module " "Dynamic module loading" +.BR "Extensions " "Extension enabling" .BR "InputDevice " "Input device description" .BR "Device " "Graphics device description" .BR "VideoAdaptor " "Xv video adaptor description" @@ -314,7 +314,7 @@ where .I is an alphanumeric identifier, .I [attribute] -is an attribute wich will be passed to the underlying FPE and +is an attribute which will be passed to the underlying FPE and .I is a number used to order the fontfile FPEs. Examples: .PP @@ -464,11 +464,10 @@ Default: off. .TP 7 .BI "Option \*qDontZap\*q \*q" boolean \*q This disallows the use of the -.B Ctrl+Alt+Backspace -sequence. -That sequence is normally used to terminate the __xservername__ server. -When this option is enabled, that key sequence has no special meaning and -is passed to clients. +.B Terminate_Server +XKB action (usually on Ctrl+Alt+Backspace, depending on XKB options). +This action is normally used to terminate the __xservername__ server. +When this option is enabled, the action has no effect. Default: off. .TP 7 .BI "Option \*qDontZoom\*q \*q" boolean \*q @@ -492,16 +491,6 @@ This allows the xvidtune client (and other clients that use the VidMode extension) to connect from another host. Default: off. .TP 7 -.BI "Option \*qDisableModInDev\*q \*q" boolean \*q -This disables the parts of the XFree86\-Misc extension that can be used to -modify the input device settings dynamically. -Default: that functionality is enabled. -.TP 7 -.BI "Option \*qAllowNonLocalModInDev\*q \*q" boolean \*q -This allows a client to connect from another host and change keyboard -and mouse settings in the running server. -Default: off. -.TP 7 .BI "Option \*qAllowMouseOpenFail\*q \*q" boolean \*q This allows the server to start up even if the mouse device can't be opened/initialised. @@ -626,31 +615,6 @@ Default: PM enabled on platforms that support it. enable or disable XINERAMA extension. Default is disabled. .TP 7 -.BI "Option \*qAllowDeactivateGrabs\*q \*q" boolean \*q -This option enables the use of the -.B Ctrl+Alt+Keypad\-Divide -key sequence to deactivate any active keyboard and mouse grabs. -Default: off. -.TP 7 -.BI "Option \*qAllowClosedownGrabs\*q \*q" boolean \*q -This option enables the use of the -.B Ctrl+Alt+Keypad\-Multiply -key sequence to kill clients with an active keyboard or mouse grab as well -as killing any application that may have locked the server, normally using -the -.BR XGrabServer(__libmansuffix__) -Xlib function. -Default: off. -.br -Note that the options -.B AllowDeactivateGrabs -and -.B AllowClosedownGrabs -will allow users to remove the grab used by screen saver/locker programs. -An API was written to such cases. -If you enable this option, make sure your screen saver/locker is updated. -Default: off. -.TP 7 .BI "Option \*qHandleSpecialKeys\*q \*q" when \*q This option controls when the server uses the builtin handler to process special key combinations (such as @@ -698,7 +662,7 @@ the X server to load. Disabled by default. If enabled, don't add the standard keyboard and mouse drivers, if there are no input devices in the config file. Enabled by default if AutoAddDevices and AutoEnableDevices is enabled, otherwise disabled. -If AllowEmptyInput is on, devices using the kbd or mouse driver are ignored. +If AllowEmptyInput is on, devices using the kbd, mouse or vmmouse driver are ignored. .TP 7 .BI "Option \*qAutoAddDevices\*q \*q" boolean \*q If this option is disabled, then no devices will be added from HAL events. @@ -709,6 +673,15 @@ If this option is disabled, then the devices will be added (and the DevicePresenceNotify event sent), but not enabled, thus leaving policy up to the client. Enabled by default. +.TP 7 +.BI "Option \*qLog\*q \*q" string \*q +This option controls whether the log is flushed and/or synced to disk after +each message. +Possible values are +.B flush +or +.BR sync . +Unset by default. .SH "MODULE SECTION" The .B Module @@ -795,11 +768,38 @@ __projectroot__/lib/modules/extensions .fi .RE .PP -The \(lqbitmap\(rq font module is loaded automatically. +The \(lqextmod\(rq, \(lqdbe\(rq, \(lqglx\(rq, and \(lqdri\(rq extension +modules are loaded automatically, unless disabled with \*qDisable\*q entries. It is recommended that at very least the \(lqextmod\(rq extension module be loaded. If it isn't, some commonly used server extensions (like the SHAPE extension) will not be available. +.SH "EXTENSIONS SECTION" +The +.B Extensions +section is used to specify which X11 protocol extensions should be enabled +or disabled. +The +.B Extensions +section is optional, as are all of the entries that may be specified in +it. +.PP +Entries in this section are listed as Option statements with the name of +the extension as the first argument, and a boolean value as the second. +The extension name is case\-sensitive, and matches the form shown in the output +of \*qXorg -extension ?\*q. +.PP +.RS 7 +Example: the MIT-SHM extension can be disabled with the following entry: +.PP +.RS 4 +.nf +.B "Section \*qExtensions\*q" +.B " Option \*qMIT-SHM\*q \*qDisable\*q" +.B "EndSection" +.fi +.RE +.RE .SH "INPUTDEVICE SECTION" The config file may have multiple .B InputDevice @@ -855,9 +855,12 @@ or command line options, or if it is selected implicitly as the core pointer or keyboard device in the absence of such explicit references. The most commonly used input drivers are -.BR keyboard (__drivermansuffix__) +.BR evdev (__drivermansuffix__) +on Linux systems, and +.BR kbd (__drivermansuffix__) and -.BR mouse (__drivermansuffix__). +.BR mouse (__drivermansuffix__) +on other platforms. .PP In the absence of an explicitly specified core input device, the first .B InputDevice @@ -868,7 +871,7 @@ marked as is used. If there is no match there, the first .B InputDevice -that uses the \(lqmouse\(rq (or \(lqkeyboard\(rq or \(lqkbd\(rq) driver is used. +that uses the \(lqmouse\(rq (or \(lqkbd\(rq) driver is used. The final fallback is to use built\-in default configurations. .PP .B InputDevice @@ -1626,8 +1629,8 @@ Others are driver\-independent, and will eventually be described here. .\" XXX These should really be in an xaa man page. .TP 7 .BI "Option \*qAccel\*q" -Enables XAA (X Acceleration Architecture), a mechanism that makes video -cards' 2D hardware acceleration available to the __xservername__ server. +Enables XAA (X Acceleration Architecture), a mechanism that makes video cards' +2D hardware acceleration available to the __xservername__ server. This option is on by default, but it may be necessary to turn it off if there are bugs in the driver. There are many options to disable specific accelerated operations, listed @@ -2151,11 +2154,11 @@ General: .BR cvt (__appmansuffix__), .BR gtf (__appmansuffix__). .PP -.B Not all modules or interfaces are available on all platforms. +.B "Not all modules or interfaces are available on all platforms." .PP Display drivers: .BR apm (__drivermansuffix__), -.\" .BR ati (__drivermansuffix__), +.BR ati (__drivermansuffix__), .BR chips (__drivermansuffix__), .BR cirrus (__drivermansuffix__), .BR cyrix (__drivermansuffix__), @@ -2164,17 +2167,20 @@ Display drivers: .BR glint (__drivermansuffix__), .BR i128 (__drivermansuffix__), .BR i740 (__drivermansuffix__), -.BR i810 (__drivermansuffix__), .BR imstt (__drivermansuffix__), +.BR intel (__drivermansuffix__), .BR mga (__drivermansuffix__), .BR neomagic (__drivermansuffix__), .BR nv (__drivermansuffix__), +.BR openchrome (__drivermansuffix__), .BR r128 (__drivermansuffix__), +.BR radeon (__drivermansuffix__), .BR rendition (__drivermansuffix__), .BR savage (__drivermansuffix__), .BR s3virge (__drivermansuffix__), .BR siliconmotion (__drivermansuffix__), .BR sis (__drivermansuffix__), +.BR sisusb (__drivermansuffix__), .BR sunbw2 (__drivermansuffix__), .BR suncg14 (__drivermansuffix__), .BR suncg3 (__drivermansuffix__), @@ -2183,37 +2189,43 @@ Display drivers: .BR sunleo (__drivermansuffix__), .BR suntcx (__drivermansuffix__), .BR tdfx (__drivermansuffix__), -.BR tga (__drivermansuffix__), +.\" .BR tga (__drivermansuffix__), .BR trident (__drivermansuffix__), .BR tseng (__drivermansuffix__), .BR vesa (__drivermansuffix__), -.BR vga (__drivermansuffix__), -.BR via (__drivermansuffix__), -.BR vmware (__drivermansuffix__). +.BR vmware (__drivermansuffix__), +.BR voodoo (__drivermansuffix__), +.BR wsfb (__drivermansuffix__), +.BR xgi (__drivermansuffix__), +.BR xgixp (__drivermansuffix__). .PP Input drivers: -.\" .BR acecad (__drivermansuffix__), -.\" .BR calcomp (__drivermansuffix__), +.BR acecad (__drivermansuffix__), +.BR calcomp (__drivermansuffix__), .BR citron (__drivermansuffix__), .BR dmc (__drivermansuffix__), .BR dynapro (__drivermansuffix__), .BR elographics (__drivermansuffix__), +.BR evdev (__drivermansuffix__), .BR fpit (__drivermansuffix__), .BR js_x (__drivermansuffix__), +.BR joystick (__drivermansuffix__), .BR kbd (__drivermansuffix__), -.BR keyboard (__drivermansuffix__), -.\" .BR magictouch (__drivermansuffix__), +.BR magictouch (__drivermansuffix__), .BR microtouch (__drivermansuffix__), -.BR mouse (__drivermansuffix__), +.BR mousedrv (__drivermansuffix__), .BR mutouch (__drivermansuffix__), .BR palmax (__drivermansuffix__), .BR penmount (__drivermansuffix__), +.BR synaptics (__drivermansuffix__), .BR tek4957 (__drivermansuffix__), -.\" .BR ur98 (__drivermansuffix__), +.BR ur98 (__drivermansuffix__), +.BR vmmouse (__drivermansuffix__), .BR void (__drivermansuffix__), .BR wacom (__drivermansuffix__). .PP Other modules and interfaces: +.BR exa (__drivermansuffix__), .BR fbdevhw (__drivermansuffix__), .\" .BR shadowfb (__drivermansuffix__), .BR v4l (__drivermansuffix__). diff --git a/xorg-server/hw/xfree86/doc/sgml/Makefile.in b/xorg-server/hw/xfree86/doc/sgml/Makefile.in index 3ee4d8cdd..c70a3941b 100644 --- a/xorg-server/hw/xfree86/doc/sgml/Makefile.in +++ b/xorg-server/hw/xfree86/doc/sgml/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -64,7 +64,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -79,8 +78,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -101,10 +101,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -126,6 +122,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -135,18 +132,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -165,7 +159,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -179,7 +173,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -191,8 +188,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -201,8 +197,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -235,7 +231,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -245,27 +240,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -276,10 +256,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -288,13 +264,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -327,8 +298,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -348,7 +318,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -358,12 +327,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -381,8 +350,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ SGML_FILES = DESIGN.sgml @BUILD_LINUXDOC_TRUE@TXT_FILES = $(SGML_FILES:%.sgml=%.txt) @BUILD_LINUXDOC_TRUE@PS_FILES = $(SGML_FILES:%.sgml=%.ps) @@ -400,8 +367,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ diff --git a/xorg-server/hw/xfree86/dri/Makefile.am b/xorg-server/hw/xfree86/dri/Makefile.am index e17cea7fd..3ec30beec 100644 --- a/xorg-server/hw/xfree86/dri/Makefile.am +++ b/xorg-server/hw/xfree86/dri/Makefile.am @@ -1,6 +1,11 @@ libdri_la_LTLIBRARIES = libdri.la libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/os-support \ + -I$(top_srcdir)/hw/xfree86/modes \ + -I$(top_srcdir)/hw/xfree86/ddc \ + -I$(top_srcdir)/hw/xfree86/i2c \ + -I$(top_srcdir)/hw/xfree86/parser \ + -I$(top_srcdir)/hw/xfree86/ramdac \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/glx \ -I$(top_srcdir)/GL/include \ diff --git a/xorg-server/hw/xfree86/dri/Makefile.in b/xorg-server/hw/xfree86/dri/Makefile.in index fae6a213e..c25627429 100644 --- a/xorg-server/hw/xfree86/dri/Makefile.in +++ b/xorg-server/hw/xfree86/dri/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,7 +45,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -72,9 +71,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -91,8 +87,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -113,10 +110,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -138,6 +131,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -147,18 +141,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -177,7 +168,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -191,7 +182,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -203,8 +197,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -213,8 +206,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -247,7 +240,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -257,27 +249,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -288,10 +265,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -300,13 +273,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -339,8 +307,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -360,7 +327,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -370,12 +336,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -393,11 +359,14 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ libdri_la_LTLIBRARIES = libdri.la libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/os-support \ + -I$(top_srcdir)/hw/xfree86/modes \ + -I$(top_srcdir)/hw/xfree86/ddc \ + -I$(top_srcdir)/hw/xfree86/i2c \ + -I$(top_srcdir)/hw/xfree86/parser \ + -I$(top_srcdir)/hw/xfree86/ramdac \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/glx \ -I$(top_srcdir)/GL/include \ @@ -426,8 +395,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -561,7 +530,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/dri/dri.c b/xorg-server/hw/xfree86/dri/dri.c index 79934a1c5..bddb6510e 100644 --- a/xorg-server/hw/xfree86/dri/dri.c +++ b/xorg-server/hw/xfree86/dri/dri.c @@ -70,6 +70,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "mi.h" #include "mipointer.h" #include "xf86_OSproc.h" +#include "inputstr.h" #define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu) @@ -78,8 +79,10 @@ extern Bool noPanoramiXExtension; #endif static int DRIEntPrivIndex = -1; -static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKey; -static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKey; +static int DRIScreenPrivKeyIndex; +static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKeyIndex; +static int DRIWindowPrivKeyIndex; +static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKeyIndex; static unsigned long DRIGeneration = 0; static unsigned int DRIDrawableValidationStamp = 0; @@ -299,6 +302,18 @@ DRIOpenDRMMaster(ScrnInfoPtr pScrn, return FALSE; } +static void +DRIClipNotifyAllDrawables(ScreenPtr pScreen); + +static void +dri_crtc_notify(ScreenPtr pScreen) +{ + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + DRIClipNotifyAllDrawables(pScreen); + xf86_unwrap_crtc_notify(pScreen, pDRIPriv->xf86_crtc_notify); + xf86_crtc_notify(pScreen); + pDRIPriv->xf86_crtc_notify = xf86_wrap_crtc_notify(pScreen, dri_crtc_notify); +} Bool DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) @@ -342,7 +357,6 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) pDRIEntPriv = DRI_ENT_PRIV(pScrn); - DRIScreenPrivKey = &DRIScreenPrivKey; if (DRIGeneration != serverGeneration) DRIGeneration = serverGeneration; @@ -603,6 +617,9 @@ DRIFinishScreenInit(ScreenPtr pScreen) pDRIPriv->DestroyWindow = pScreen->DestroyWindow; pScreen->DestroyWindow = DRIDestroyWindow; + pDRIPriv->xf86_crtc_notify = xf86_wrap_crtc_notify(pScreen, + dri_crtc_notify); + if (pDRIInfo->wrap.CopyWindow) { pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow; pScreen->CopyWindow = pDRIInfo->wrap.CopyWindow; @@ -656,6 +673,9 @@ DRICloseScreen(ScreenPtr pScreen) pScreen->DestroyWindow = pDRIPriv->DestroyWindow; pDRIPriv->DestroyWindow = NULL; } + + xf86_unwrap_crtc_notify(pScreen, pDRIPriv->xf86_crtc_notify); + if (pDRIInfo->wrap.CopyWindow) { pScreen->CopyWindow = pDRIPriv->wrap.CopyWindow; pDRIPriv->wrap.CopyWindow = NULL; @@ -669,6 +689,7 @@ DRICloseScreen(ScreenPtr pScreen) pScrn->AdjustFrame = pDRIPriv->wrap.AdjustFrame; pDRIPriv->wrap.AdjustFrame = NULL; } + pDRIPriv->wrapped = FALSE; } @@ -1270,7 +1291,7 @@ DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable, *hHWDrawable = pDRIDrawablePriv->hwDrawable; } } - else { /* pixmap (or for GLX 1.3, a PBuffer) */ + else if (pDrawable->type != DRAWABLE_PIXMAP) { /* PBuffer */ /* NOT_DONE */ return FALSE; } @@ -2298,12 +2319,12 @@ DRIAdjustFrame(int scrnIndex, int x, int y, int flags) pScrn->frameY1 = pScrn->frameY0 + pDRIPriv->pSAREA->frame.height - 1; /* Fix up cursor */ - miPointerPosition(&px, &py); + miPointerGetPosition(inputInfo.pointer, &px, &py); if (px < pScrn->frameX0) px = pScrn->frameX0; if (px > pScrn->frameX1) px = pScrn->frameX1; if (py < pScrn->frameY0) py = pScrn->frameY0; if (py > pScrn->frameY1) py = pScrn->frameY1; - pScreen->SetCursorPosition(pScreen, px, py, TRUE); + pScreen->SetCursorPosition(inputInfo.pointer, pScreen, px, py, TRUE); return; } @@ -2434,7 +2455,7 @@ static void drmSIGIOHandler(int interrupt, void *closure) #if 0 fprintf(stderr, "Trying %d\n", entry->fd); #endif - if ((count = read(entry->fd, buf, sizeof(buf))) > 0) { + if ((count = read(entry->fd, buf, sizeof(buf) - 1)) > 0) { buf[count] = '\0'; #if 0 fprintf(stderr, "Got %s\n", buf); diff --git a/xorg-server/hw/xfree86/dri/dristruct.h b/xorg-server/hw/xfree86/dri/dristruct.h index ae970d834..fc929c2f9 100644 --- a/xorg-server/hw/xfree86/dri/dristruct.h +++ b/xorg-server/hw/xfree86/dri/dristruct.h @@ -35,6 +35,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define DRI_STRUCT_H #include "xf86drm.h" +#include "xf86Crtc.h" #define DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin) ((DRIDrawablePrivPtr) \ @@ -106,6 +107,7 @@ typedef struct _DRIScreenPrivRec XF86DRILSAREAPtr pLSAREA; /* Mapped pointer to SAREA containing lock */ int* pLockRefCount; int* pLockingContext; + xf86_crtc_notify_proc_ptr xf86_crtc_notify; } DRIScreenPrivRec, *DRIScreenPrivPtr; diff --git a/xorg-server/hw/xfree86/dri2/Makefile.in b/xorg-server/hw/xfree86/dri2/Makefile.in index c37499cf3..74cc5d42f 100644 --- a/xorg-server/hw/xfree86/dri2/Makefile.in +++ b/xorg-server/hw/xfree86/dri2/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,7 +45,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -71,9 +70,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -90,8 +86,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -112,10 +109,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -137,6 +130,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -146,18 +140,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -176,7 +167,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -190,7 +181,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -202,8 +196,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -212,8 +205,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -246,7 +239,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -256,27 +248,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -287,10 +264,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -299,13 +272,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -338,8 +306,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -359,7 +326,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -369,12 +335,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -392,8 +358,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ libdri2_la_LTLIBRARIES = libdri2.la libdri2_la_CFLAGS = \ -DHAVE_XORG_CONFIG_H \ @@ -418,8 +382,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -545,7 +509,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c index 74aef7196..580383dbc 100644 --- a/xorg-server/hw/xfree86/dri2/dri2.c +++ b/xorg-server/hw/xfree86/dri2/dri2.c @@ -1,5 +1,5 @@ /* - * Copyright © 2007 Red Hat, Inc. + * Copyright © 2007, 2008 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Soft- @@ -38,40 +38,40 @@ #include "xf86Module.h" #include "scrnintstr.h" #include "windowstr.h" -#include "region.h" -#include "damage.h" #include "dri2.h" -#include #include "xf86.h" -static DevPrivateKey dri2ScreenPrivateKey = &dri2ScreenPrivateKey; -static DevPrivateKey dri2WindowPrivateKey = &dri2WindowPrivateKey; -static DevPrivateKey dri2PixmapPrivateKey = &dri2PixmapPrivateKey; - -typedef struct _DRI2DrawablePriv { - unsigned int refCount; - unsigned int boHandle; - unsigned int dri2Handle; -} DRI2DrawablePrivRec, *DRI2DrawablePrivPtr; +static int dri2ScreenPrivateKeyIndex; +static DevPrivateKey dri2ScreenPrivateKey = &dri2ScreenPrivateKeyIndex; +static int dri2WindowPrivateKeyIndex; +static DevPrivateKey dri2WindowPrivateKey = &dri2WindowPrivateKeyIndex; +static int dri2PixmapPrivateKeyIndex; +static DevPrivateKey dri2PixmapPrivateKey = &dri2PixmapPrivateKeyIndex; + +typedef struct _DRI2Drawable { + unsigned int refCount; + int width; + int height; + DRI2Buffer2Ptr *buffers; + int bufferCount; + unsigned int pendingSequence; +} DRI2DrawableRec, *DRI2DrawablePtr; typedef struct _DRI2Screen { - int fd; - drmBO sareaBO; - void *sarea; - unsigned int sareaSize; const char *driverName; - unsigned int nextHandle; + const char *deviceName; + int fd; + unsigned int lastSequence; - __DRIEventBuffer *buffer; - int locked; + DRI2CreateBuffersProcPtr CreateBuffers; + DRI2DestroyBuffersProcPtr DestroyBuffers; - DRI2GetPixmapHandleProcPtr getPixmapHandle; - DRI2BeginClipNotifyProcPtr beginClipNotify; - DRI2EndClipNotifyProcPtr endClipNotify; + DRI2CreateBufferProcPtr CreateBuffer; + DRI2DestroyBufferProcPtr DestroyBuffer; + DRI2CopyRegionProcPtr CopyRegion; - ClipNotifyProcPtr ClipNotify; - HandleExposuresProcPtr HandleExposures; + HandleExposuresProcPtr HandleExposures; } DRI2ScreenRec, *DRI2ScreenPtr; static DRI2ScreenPtr @@ -80,292 +80,414 @@ DRI2GetScreen(ScreenPtr pScreen) return dixLookupPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey); } -static void * -DRI2ScreenAllocEvent(DRI2ScreenPtr ds, size_t size) +static DRI2DrawablePtr +DRI2GetDrawable(DrawablePtr pDraw) { - unsigned int *pad, mask = ds->buffer->size - 1; - size_t pad_size; - void *p; - - if ((ds->buffer->head & mask) + size > ds->buffer->size) { - /* The requested event size would wrap the buffer, so pad to - * the end and allocate the event from the start. */ - pad_size = ds->buffer->size - (ds->buffer->head & mask); - pad = (unsigned int *) - (ds->buffer->data + (ds->buffer->prealloc & mask)); - *pad = DRI2_EVENT_HEADER(DRI2_EVENT_PAD, pad_size); - ds->buffer->prealloc += pad_size; - } - - p = ds->buffer->data + (ds->buffer->prealloc & mask); - ds->buffer->prealloc += size; - - return p; -} + WindowPtr pWin; + PixmapPtr pPixmap; -static void -DRI2ScreenCommitEvents(DRI2ScreenPtr ds) -{ - ds->buffer->head = ds->buffer->prealloc; + if (pDraw->type == DRAWABLE_WINDOW) + { + pWin = (WindowPtr) pDraw; + return dixLookupPrivate(&pWin->devPrivates, dri2WindowPrivateKey); + } + else + { + pPixmap = (PixmapPtr) pDraw; + return dixLookupPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey); + } } -static void -DRI2PostDrawableConfig(DrawablePtr pDraw) +int +DRI2CreateDrawable(DrawablePtr pDraw) { - ScreenPtr pScreen = pDraw->pScreen; - DRI2ScreenPtr ds = DRI2GetScreen(pScreen); - DRI2DrawablePrivPtr pPriv; - WindowPtr pWin; - PixmapPtr pPixmap; - BoxPtr pBox; - BoxRec pixmapBox; - int nBox; - int i; - __DRIDrawableConfigEvent *e; - size_t size; - - if (pDraw->type == DRAWABLE_WINDOW) { - pWin = (WindowPtr) pDraw; - pPriv = dixLookupPrivate(&pWin->devPrivates, dri2WindowPrivateKey); - - nBox = REGION_NUM_RECTS(&pWin->clipList); - pBox = REGION_RECTS(&pWin->clipList); + WindowPtr pWin; + PixmapPtr pPixmap; + DRI2DrawablePtr pPriv; - pPixmap = pScreen->GetWindowPixmap(pWin); - } else { - pPixmap = (PixmapPtr) pDraw; - pPriv = dixLookupPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey); - - pixmapBox.x1 = 0; - pixmapBox.y1 = 0; - pixmapBox.x2 = pDraw->width; - pixmapBox.y2 = pDraw->height; - nBox = 1; - pBox = &pixmapBox; + pPriv = DRI2GetDrawable(pDraw); + if (pPriv != NULL) + { + pPriv->refCount++; + return Success; } - if (!pPriv) - return; + pPriv = xalloc(sizeof *pPriv); + if (pPriv == NULL) + return BadAlloc; - size = sizeof *e + nBox * sizeof e->rects[0]; - - e = DRI2ScreenAllocEvent(ds, size); - e->event_header = DRI2_EVENT_HEADER(DRI2_EVENT_DRAWABLE_CONFIG, size); - e->drawable = pPriv->dri2Handle; - e->x = pDraw->x - pPixmap->screen_x; - e->y = pDraw->y - pPixmap->screen_y; - e->width = pDraw->width; - e->height = pDraw->height; - - e->num_rects = nBox; - for (i = 0; i < nBox; i++) { - e->rects[i].x1 = pBox->x1 - pPixmap->screen_x; - e->rects[i].y1 = pBox->y1 - pPixmap->screen_y; - e->rects[i].x2 = pBox->x2 - pPixmap->screen_x; - e->rects[i].y2 = pBox->y2 - pPixmap->screen_y; - pBox++; - } -} + pPriv->refCount = 1; + pPriv->width = pDraw->width; + pPriv->height = pDraw->height; + pPriv->buffers = NULL; + pPriv->bufferCount = 0; -static void -DRI2PostBufferAttach(DrawablePtr pDraw, Bool force) -{ - ScreenPtr pScreen = pDraw->pScreen; - DRI2ScreenPtr ds = DRI2GetScreen(pScreen); - DRI2DrawablePrivPtr pPriv; - WindowPtr pWin; - PixmapPtr pPixmap; - __DRIBufferAttachEvent *e; - size_t size; - unsigned int flags; - unsigned int boHandle; - - if (pDraw->type == DRAWABLE_WINDOW) { + if (pDraw->type == DRAWABLE_WINDOW) + { pWin = (WindowPtr) pDraw; - pPixmap = pScreen->GetWindowPixmap(pWin); - pPriv = dixLookupPrivate(&pWin->devPrivates, dri2WindowPrivateKey); - } else { + dixSetPrivate(&pWin->devPrivates, dri2WindowPrivateKey, pPriv); + } + else + { pPixmap = (PixmapPtr) pDraw; - pPriv = dixLookupPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey); + dixSetPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey, pPriv); } - if (!pPriv) - return; - - boHandle = ds->getPixmapHandle(pPixmap, &flags); - if (boHandle == pPriv->boHandle && !force) - return; - - pPriv->boHandle = boHandle; - size = sizeof *e; - e = DRI2ScreenAllocEvent(ds, size); - e->event_header = DRI2_EVENT_HEADER(DRI2_EVENT_BUFFER_ATTACH, size); - e->drawable = pPriv->dri2Handle; - e->buffer.attachment = DRI_DRAWABLE_BUFFER_FRONT_LEFT; - e->buffer.handle = pPriv->boHandle; - e->buffer.pitch = pPixmap->devKind; - e->buffer.cpp = pPixmap->drawable.bitsPerPixel / 8; - e->buffer.flags = flags; + return Success; } -static void -DRI2ClipNotify(WindowPtr pWin, int dx, int dy) +static int +find_attachment(DRI2DrawablePtr pPriv, unsigned attachment) { - ScreenPtr pScreen = pWin->drawable.pScreen; - DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + int i; - if (!ds->locked) { - ds->beginClipNotify(pScreen); - ds->locked = 1; + if (pPriv->buffers == NULL) { + return -1; } - if (ds->ClipNotify) { - pScreen->ClipNotify = ds->ClipNotify; - pScreen->ClipNotify(pWin, dx, dy); - pScreen->ClipNotify = DRI2ClipNotify; + for (i = 0; i < pPriv->bufferCount; i++) { + if ((pPriv->buffers[i] != NULL) + && (pPriv->buffers[i]->attachment == attachment)) { + return i; + } } - DRI2PostDrawableConfig(&pWin->drawable); - DRI2PostBufferAttach(&pWin->drawable, FALSE); + return -1; } -static void -DRI2HandleExposures(WindowPtr pWin) +static DRI2Buffer2Ptr +allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, + DRI2DrawablePtr pPriv, + unsigned int attachment, unsigned int format, + int dimensions_match) { - ScreenPtr pScreen = pWin->drawable.pScreen; - DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + DRI2Buffer2Ptr buffer; + int old_buf; - if (ds->HandleExposures) { - pScreen->HandleExposures = ds->HandleExposures; - pScreen->HandleExposures(pWin); - pScreen->HandleExposures = DRI2HandleExposures; - } + old_buf = find_attachment(pPriv, attachment); - DRI2ScreenCommitEvents(ds); - - if (ds->locked) { - ds->endClipNotify(pScreen); - ds->locked = 0; + if ((old_buf < 0) + || !dimensions_match + || (pPriv->buffers[old_buf]->format != format)) { + buffer = (*ds->CreateBuffer)(pDraw, attachment, format); + } else { + buffer = pPriv->buffers[old_buf]; + pPriv->buffers[old_buf] = NULL; } + + return buffer; } -void -DRI2CloseScreen(ScreenPtr pScreen) +static DRI2Buffer2Ptr * +do_get_buffers(DrawablePtr pDraw, int *width, int *height, + unsigned int *attachments, int count, int *out_count, + int has_format) { - DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); + DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); + DRI2Buffer2Ptr *buffers; + int need_real_front = 0; + int need_fake_front = 0; + int have_fake_front = 0; + int front_format = 0; + const int dimensions_match = (pDraw->width == pPriv->width) + && (pDraw->height == pPriv->height); + int i; + + + buffers = xalloc((count + 1) * sizeof(buffers[0])); + + if (ds->CreateBuffer) { + /* Version 2 API with CreateBuffer */ + for (i = 0; i < count; i++) { + const unsigned attachment = *(attachments++); + const unsigned format = (has_format) ? *(attachments++) : 0; + + buffers[i] = allocate_or_reuse_buffer(pDraw, ds, pPriv, attachment, + format, dimensions_match); + + /* If the drawable is a window and the front-buffer is requested, + * silently add the fake front-buffer to the list of requested + * attachments. The counting logic in the loop accounts for the case + * where the client requests both the fake and real front-buffer. + */ + if (attachment == DRI2BufferBackLeft) { + need_real_front++; + front_format = format; + } + + if (attachment == DRI2BufferFrontLeft) { + need_real_front--; + front_format = format; + + if (pDraw->type == DRAWABLE_WINDOW) { + need_fake_front++; + } + } + + if (pDraw->type == DRAWABLE_WINDOW) { + if (attachment == DRI2BufferFakeFrontLeft) { + need_fake_front--; + have_fake_front = 1; + } + } + } + + if (need_real_front > 0) { + buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, + DRI2BufferFrontLeft, + front_format, dimensions_match); + } + + if (need_fake_front > 0) { + buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, + DRI2BufferFakeFrontLeft, + front_format, dimensions_match); + have_fake_front = 1; + } + + *out_count = i; + + + if (pPriv->buffers != NULL) { + for (i = 0; i < pPriv->bufferCount; i++) { + if (pPriv->buffers[i] != NULL) { + (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); + } + } + + xfree(pPriv->buffers); + } + } else { + DRI2BufferPtr buffers1; + unsigned int temp_buf[32]; + unsigned int *temp = temp_buf; + int i; + int buffers_match = 1; + + /* Version 1 API with CreateBuffers */ + + if ((count + 1) > 32) { + temp = xalloc((count + 1) * sizeof(temp[0])); + } + + for (i = 0; i < count; i++) { + const unsigned attachment = *(attachments++); + + /* Version 1 doesn't deal with the format at all */ + if (has_format) + attachments++; + + /* + * Make sure the client also gets the front buffer when + * it asks for a back buffer + */ + if (attachment == DRI2BufferBackLeft) + need_real_front++; + + /* + * If the drawable is a window and the front-buffer is requested, + * silently add the fake front-buffer to the list of requested + * attachments. The counting logic in the loop accounts for the + * case where the client requests both the fake and real + * front-buffer. + */ + if (attachment == DRI2BufferFrontLeft) { + need_real_front--; + if (pDraw->type == DRAWABLE_WINDOW) + need_fake_front++; + } + if (pDraw->type == DRAWABLE_WINDOW && + attachment == DRI2BufferFakeFrontLeft) + { + need_fake_front--; + have_fake_front = 1; + } + + temp[i] = attachment; + } + + if (need_real_front > 0) + temp[count++] = DRI2BufferFrontLeft; + + if (need_fake_front > 0) { + temp[count++] = DRI2BufferFakeFrontLeft; + have_fake_front = 1; + } + + if (count != pPriv->bufferCount) + buffers_match = 0; + else { + for (i = 0; i < count; i++) + if (pPriv->buffers[i]->attachment != temp[i]) { + buffers_match = 0; + break; + } + } + if (pPriv->buffers == NULL || !dimensions_match || !buffers_match) + { + buffers1 = (*ds->CreateBuffers)(pDraw, temp, count); + if (pPriv->buffers != NULL) + (*ds->DestroyBuffers)(pDraw, (DRI2BufferPtr) pPriv->buffers[0], + pPriv->bufferCount); + } + else + buffers1 = (DRI2BufferPtr) pPriv->buffers[0]; + + for (i = 0; i < count; i++) + buffers[i] = (DRI2Buffer2Ptr) &buffers1[i]; + + *out_count = count; + + if (pPriv->buffers) + xfree (pPriv->buffers); + + if (temp != temp_buf) { + xfree(temp); + } + } - pScreen->ClipNotify = ds->ClipNotify; - pScreen->HandleExposures = ds->HandleExposures; + pPriv->buffers = buffers; + pPriv->bufferCount = *out_count; + pPriv->width = pDraw->width; + pPriv->height = pDraw->height; + *width = pPriv->width; + *height = pPriv->height; + + + /* If the client is getting a fake front-buffer, pre-fill it with the + * contents of the real front-buffer. This ensures correct operation of + * applications that call glXWaitX before calling glDrawBuffer. + */ + if (have_fake_front) { + BoxRec box; + RegionRec region; + + box.x1 = 0; + box.y1 = 0; + box.x2 = pPriv->width; + box.y2 = pPriv->height; + REGION_INIT(pDraw->pScreen, ®ion, &box, 0); + + DRI2CopyRegion(pDraw, ®ion, DRI2BufferFakeFrontLeft, + DRI2BufferFrontLeft); + } - drmBOUnmap(ds->fd, &ds->sareaBO); - drmBOUnreference(ds->fd, &ds->sareaBO); + return pPriv->buffers; +} - xfree(ds); - dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, NULL); +DRI2Buffer2Ptr * +DRI2GetBuffers(DrawablePtr pDraw, int *width, int *height, + unsigned int *attachments, int count, int *out_count) +{ + return do_get_buffers(pDraw, width, height, attachments, count, + out_count, FALSE); } -Bool -DRI2CreateDrawable(DrawablePtr pDraw, - unsigned int *handle, unsigned int *head) +DRI2Buffer2Ptr * +DRI2GetBuffersWithFormat(DrawablePtr pDraw, int *width, int *height, + unsigned int *attachments, int count, int *out_count) { - DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); - WindowPtr pWin; - PixmapPtr pPixmap; - DRI2DrawablePrivPtr pPriv; - DevPrivateKey key; - PrivateRec **devPrivates; - - if (pDraw->type == DRAWABLE_WINDOW) { - pWin = (WindowPtr) pDraw; - devPrivates = &pWin->devPrivates; - key = dri2WindowPrivateKey; - } else { - pPixmap = (PixmapPtr) pDraw; - devPrivates = &pPixmap->devPrivates; - key = dri2PixmapPrivateKey; - } + return do_get_buffers(pDraw, width, height, attachments, count, + out_count, TRUE); +} - pPriv = dixLookupPrivate(devPrivates, key); - if (pPriv != NULL) { - pPriv->refCount++; - } else { - pPriv = xalloc(sizeof *pPriv); - pPriv->refCount = 1; - pPriv->boHandle = 0; - pPriv->dri2Handle = ds->nextHandle++; - dixSetPrivate(devPrivates, key, pPriv); - } +int +DRI2CopyRegion(DrawablePtr pDraw, RegionPtr pRegion, + unsigned int dest, unsigned int src) +{ + DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); + DRI2DrawablePtr pPriv; + DRI2BufferPtr pDestBuffer, pSrcBuffer; + int i; - *handle = pPriv->dri2Handle; - *head = ds->buffer->head; + pPriv = DRI2GetDrawable(pDraw); + if (pPriv == NULL) + return BadDrawable; + + pDestBuffer = NULL; + pSrcBuffer = NULL; + for (i = 0; i < pPriv->bufferCount; i++) + { + if (pPriv->buffers[i]->attachment == dest) + pDestBuffer = (DRI2BufferPtr) pPriv->buffers[i]; + if (pPriv->buffers[i]->attachment == src) + pSrcBuffer = (DRI2BufferPtr) pPriv->buffers[i]; + } + if (pSrcBuffer == NULL || pDestBuffer == NULL) + return BadValue; - DRI2PostDrawableConfig(pDraw); - DRI2PostBufferAttach(pDraw, TRUE); - DRI2ScreenCommitEvents(ds); + (*ds->CopyRegion)(pDraw, pRegion, pDestBuffer, pSrcBuffer); - return TRUE; + return Success; } void DRI2DestroyDrawable(DrawablePtr pDraw) { - PixmapPtr pPixmap; - WindowPtr pWin; - DRI2DrawablePrivPtr pPriv; - DevPrivateKey key; - PrivateRec **devPrivates; - - if (pDraw->type == DRAWABLE_WINDOW) { - pWin = (WindowPtr) pDraw; - devPrivates = &pWin->devPrivates; - key = dri2WindowPrivateKey; - } else { - pPixmap = (PixmapPtr) pDraw; - devPrivates = &pPixmap->devPrivates; - key = dri2PixmapPrivateKey; - } + DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); + DRI2DrawablePtr pPriv; + WindowPtr pWin; + PixmapPtr pPixmap; - pPriv = dixLookupPrivate(devPrivates, key); + pPriv = DRI2GetDrawable(pDraw); if (pPriv == NULL) return; - + pPriv->refCount--; - if (pPriv->refCount == 0) { - dixSetPrivate(devPrivates, key, NULL); - xfree(pPriv); - } -} + if (pPriv->refCount > 0) + return; -void -DRI2ReemitDrawableInfo(DrawablePtr pDraw, unsigned int *head) -{ - DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); + if (pPriv->buffers != NULL) { + int i; - *head = ds->buffer->head; + if (ds->DestroyBuffer) { + for (i = 0; i < pPriv->bufferCount; i++) { + (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); + } + } else { + (*ds->DestroyBuffers)(pDraw, (DRI2BufferPtr) pPriv->buffers[0], + pPriv->bufferCount); + } - DRI2PostDrawableConfig(pDraw); - DRI2PostBufferAttach(pDraw, TRUE); - DRI2ScreenCommitEvents(ds); + xfree(pPriv->buffers); + } + + xfree(pPriv); + + if (pDraw->type == DRAWABLE_WINDOW) + { + pWin = (WindowPtr) pDraw; + dixSetPrivate(&pWin->devPrivates, dri2WindowPrivateKey, NULL); + } + else + { + pPixmap = (PixmapPtr) pDraw; + dixSetPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey, NULL); + } } Bool -DRI2Connect(ScreenPtr pScreen, int *fd, const char **driverName, - unsigned int *sareaHandle) +DRI2Connect(ScreenPtr pScreen, unsigned int driverType, int *fd, + const char **driverName, const char **deviceName) { DRI2ScreenPtr ds = DRI2GetScreen(pScreen); if (ds == NULL) return FALSE; + if (driverType != DRI2DriverDRI) + return BadValue; + *fd = ds->fd; *driverName = ds->driverName; - *sareaHandle = ds->sareaBO.handle; + *deviceName = ds->deviceName; return TRUE; } Bool -DRI2AuthConnection(ScreenPtr pScreen, drm_magic_t magic) +DRI2Authenticate(ScreenPtr pScreen, drm_magic_t magic) { DRI2ScreenPtr ds = DRI2GetScreen(pScreen); @@ -375,86 +497,61 @@ DRI2AuthConnection(ScreenPtr pScreen, drm_magic_t magic) return TRUE; } -unsigned int -DRI2GetPixmapHandle(PixmapPtr pPixmap, unsigned int *flags) -{ - DRI2ScreenPtr ds = DRI2GetScreen(pPixmap->drawable.pScreen); - - return ds->getPixmapHandle(pPixmap, flags); -} - -static void * -DRI2SetupSAREA(ScreenPtr pScreen, size_t driverSareaSize) -{ - DRI2ScreenPtr ds = DRI2GetScreen(pScreen); - unsigned long mask; - const size_t event_buffer_size = 32 * 1024; - - ds->sareaSize = - sizeof(*ds->buffer) + event_buffer_size + - driverSareaSize + - sizeof (unsigned int); - - mask = DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_MAPPABLE | - DRM_BO_FLAG_MEM_LOCAL | DRM_BO_FLAG_SHAREABLE; - - if (drmBOCreate(ds->fd, ds->sareaSize, 1, NULL, mask, 0, &ds->sareaBO)) - return NULL; - - if (drmBOMap(ds->fd, &ds->sareaBO, - DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE, 0, &ds->sarea)) { - drmBOUnreference(ds->fd, &ds->sareaBO); - return NULL; - } - - xf86DrvMsg(pScreen->myNum, X_INFO, - "[DRI2] Allocated %d byte SAREA, BO handle 0x%08x\n", - ds->sareaSize, ds->sareaBO.handle); - memset(ds->sarea, 0, ds->sareaSize); - - ds->buffer = ds->sarea; - ds->buffer->block_header = - DRI2_SAREA_BLOCK_HEADER(DRI2_SAREA_BLOCK_EVENT_BUFFER, - sizeof *ds->buffer + event_buffer_size); - ds->buffer->size = event_buffer_size; - - return DRI2_SAREA_BLOCK_NEXT(ds->buffer); -} - -void * +Bool DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) { DRI2ScreenPtr ds; - void *p; ds = xalloc(sizeof *ds); if (!ds) - return NULL; - - ds->fd = info->fd; - ds->driverName = info->driverName; - ds->nextHandle = 1; - - ds->getPixmapHandle = info->getPixmapHandle; - ds->beginClipNotify = info->beginClipNotify; - ds->endClipNotify = info->endClipNotify; - - ds->ClipNotify = pScreen->ClipNotify; - pScreen->ClipNotify = DRI2ClipNotify; - ds->HandleExposures = pScreen->HandleExposures; - pScreen->HandleExposures = DRI2HandleExposures; + return FALSE; - dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, ds); + ds->fd = info->fd; + ds->driverName = info->driverName; + ds->deviceName = info->deviceName; + + /* Prefer the new one-at-a-time buffer API */ + if (info->version >= 2 && info->CreateBuffer && info->DestroyBuffer) { + ds->CreateBuffer = info->CreateBuffer; + ds->DestroyBuffer = info->DestroyBuffer; + ds->CreateBuffers = NULL; + ds->DestroyBuffers = NULL; + } else if (info->CreateBuffers && info->DestroyBuffers) { + xf86DrvMsg(pScreen->myNum, X_WARNING, + "[DRI2] Version 1 API (broken front buffer rendering)\n"); + ds->CreateBuffer = NULL; + ds->DestroyBuffer = NULL; + ds->CreateBuffers = info->CreateBuffers; + ds->DestroyBuffers = info->DestroyBuffers; + } else { + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[DRI2] Missing buffer management functions\n"); + xfree(ds); + return FALSE; + } - p = DRI2SetupSAREA(pScreen, info->driverSareaSize); - if (p == NULL) { + if (!info->CopyRegion) { + xf86DrvMsg(pScreen->myNum, X_ERROR, + "[DRI2] Missing copy region function\n"); xfree(ds); - return NULL; + return FALSE; } + ds->CopyRegion = info->CopyRegion; + + dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, ds); xf86DrvMsg(pScreen->myNum, X_INFO, "[DRI2] Setup complete\n"); - return p; + return TRUE; +} + +void +DRI2CloseScreen(ScreenPtr pScreen) +{ + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + + xfree(ds); + dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, NULL); } extern ExtensionModule dri2ExtensionModule; @@ -464,10 +561,13 @@ DRI2Setup(pointer module, pointer opts, int *errmaj, int *errmin) { static Bool setupDone = FALSE; - if (!setupDone) { + if (!setupDone) + { setupDone = TRUE; LoadExtension(&dri2ExtensionModule, FALSE); - } else { + } + else + { if (errmaj) *errmaj = LDR_ONCEONLY; } @@ -482,7 +582,7 @@ static XF86ModuleVersionInfo DRI2VersRec = MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, - 1, 0, 0, + 1, 1, 0, ABI_CLASS_EXTENSION, ABI_EXTENSION_VERSION, MOD_CLASS_NONE, @@ -491,3 +591,12 @@ static XF86ModuleVersionInfo DRI2VersRec = _X_EXPORT XF86ModuleData dri2ModuleData = { &DRI2VersRec, DRI2Setup, NULL }; +void +DRI2Version(int *major, int *minor) +{ + if (major != NULL) + *major = DRI2VersRec.majorversion; + + if (minor != NULL) + *minor = DRI2VersRec.minorversion; +} diff --git a/xorg-server/hw/xfree86/dri2/dri2.h b/xorg-server/hw/xfree86/dri2/dri2.h index 85b3da41c..f3692673a 100644 --- a/xorg-server/hw/xfree86/dri2/dri2.h +++ b/xorg-server/hw/xfree86/dri2/dri2.h @@ -33,49 +33,124 @@ #ifndef _DRI2_H_ #define _DRI2_H_ -typedef unsigned int (*DRI2GetPixmapHandleProcPtr)(PixmapPtr p, - unsigned int *flags); -typedef void (*DRI2BeginClipNotifyProcPtr)(ScreenPtr pScreen); -typedef void (*DRI2EndClipNotifyProcPtr)(ScreenPtr pScreen); +#include +/* Version 1 structure (for ABI compatibility) */ typedef struct { - unsigned int version; /* Version of this struct */ + unsigned int attachment; + unsigned int name; + unsigned int pitch; + unsigned int cpp; + unsigned int flags; + void *driverPrivate; +} DRI2BufferRec, *DRI2BufferPtr; + +/* Version 2 structure (with format at the end) */ +typedef struct { + unsigned int attachment; + unsigned int name; + unsigned int pitch; + unsigned int cpp; + unsigned int flags; + void *driverPrivate; + unsigned int format; +} DRI2Buffer2Rec, *DRI2Buffer2Ptr; + +typedef DRI2BufferPtr (*DRI2CreateBuffersProcPtr)(DrawablePtr pDraw, + unsigned int *attachments, + int count); +typedef void (*DRI2DestroyBuffersProcPtr)(DrawablePtr pDraw, + DRI2BufferPtr buffers, + int count); +typedef void (*DRI2CopyRegionProcPtr)(DrawablePtr pDraw, + RegionPtr pRegion, + DRI2BufferPtr pDestBuffer, + DRI2BufferPtr pSrcBuffer); + +typedef void (*DRI2WaitProcPtr)(WindowPtr pWin, + unsigned int sequence); + +typedef DRI2Buffer2Ptr (*DRI2CreateBufferProcPtr)(DrawablePtr pDraw, + unsigned int attachment, + unsigned int format); +typedef void (*DRI2DestroyBufferProcPtr)(DrawablePtr pDraw, + DRI2Buffer2Ptr buffer); + +/** + * Version of the DRI2InfoRec structure defined in this header + */ +#define DRI2INFOREC_VERSION 2 + +typedef struct { + unsigned int version; /**< Version of this struct */ int fd; - size_t driverSareaSize; const char *driverName; - DRI2GetPixmapHandleProcPtr getPixmapHandle; - DRI2BeginClipNotifyProcPtr beginClipNotify; - DRI2EndClipNotifyProcPtr endClipNotify; + const char *deviceName; + + DRI2CreateBuffersProcPtr CreateBuffers; + DRI2DestroyBuffersProcPtr DestroyBuffers; + DRI2CopyRegionProcPtr CopyRegion; + DRI2WaitProcPtr Wait; + + /** + * \name Fields added in version 2 of the structure. + */ + /*@{*/ + DRI2CreateBufferProcPtr CreateBuffer; + DRI2DestroyBufferProcPtr DestroyBuffer; + /*@}*/ + } DRI2InfoRec, *DRI2InfoPtr; -void *DRI2ScreenInit(ScreenPtr pScreen, - DRI2InfoPtr info); +Bool DRI2ScreenInit(ScreenPtr pScreen, + DRI2InfoPtr info); void DRI2CloseScreen(ScreenPtr pScreen); Bool DRI2Connect(ScreenPtr pScreen, + unsigned int driverType, int *fd, const char **driverName, - unsigned int *sareaHandle); + const char **deviceName); -Bool DRI2AuthConnection(ScreenPtr pScreen, drm_magic_t magic); +Bool DRI2Authenticate(ScreenPtr pScreen, drm_magic_t magic); -unsigned int DRI2GetPixmapHandle(PixmapPtr pPixmap, - unsigned int *flags); +int DRI2CreateDrawable(DrawablePtr pDraw); -void DRI2Lock(ScreenPtr pScreen); -void DRI2Unlock(ScreenPtr pScreen); +void DRI2DestroyDrawable(DrawablePtr pDraw); -Bool DRI2CreateDrawable(DrawablePtr pDraw, - unsigned int *handle, - unsigned int *head); +DRI2Buffer2Ptr *DRI2GetBuffers(DrawablePtr pDraw, + int *width, + int *height, + unsigned int *attachments, + int count, + int *out_count); -void DRI2DestroyDrawable(DrawablePtr pDraw); +int DRI2CopyRegion(DrawablePtr pDraw, + RegionPtr pRegion, + unsigned int dest, + unsigned int src); -void DRI2ReemitDrawableInfo(DrawablePtr pDraw, - unsigned int *head); +/** + * Determine the major and minor version of the DRI2 extension. + * + * Provides a mechanism to other modules (e.g., 2D drivers) to determine the + * version of the DRI2 extension. While it is possible to peek directly at + * the \c XF86ModuleData from a layered module, such a module will fail to + * load (due to an unresolved symbol) if the DRI2 extension is not loaded. + * + * \param major Location to store the major verion of the DRI2 extension + * \param minor Location to store the minor verion of the DRI2 extension + * + * \note + * This interface was added some time after the initial release of the DRI2 + * module. Layered modules that wish to use this interface must first test + * its existance by calling \c xf86LoaderCheckSymbol. + */ +extern _X_EXPORT void DRI2Version(int *major, int *minor); -Bool DRI2PostDamage(DrawablePtr pDrawable, - struct drm_clip_rect *rects, int numRects); +extern _X_EXPORT DRI2Buffer2Ptr *DRI2GetBuffersWithFormat(DrawablePtr pDraw, + int *width, int *height, unsigned int *attachments, int count, + int *out_count); #endif diff --git a/xorg-server/hw/xfree86/dri2/dri2ext.c b/xorg-server/hw/xfree86/dri2/dri2ext.c index 4ae0fda3a..3c06174cb 100644 --- a/xorg-server/hw/xfree86/dri2/dri2ext.c +++ b/xorg-server/hw/xfree86/dri2/dri2ext.c @@ -38,11 +38,13 @@ #include #include #include +#include #include "dixstruct.h" #include "scrnintstr.h" #include "pixmapstr.h" #include "extnsionst.h" #include "xf86drm.h" +#include "xfixes.h" #include "dri2.h" /* The only xf86 include */ @@ -51,19 +53,6 @@ static ExtensionEntry *dri2Extension; static RESTYPE dri2DrawableRes; -static Bool -validScreen(ClientPtr client, int screen, ScreenPtr *pScreen) -{ - if (screen >= screenInfo.numScreens) { - client->errorValue = screen; - return FALSE; - } - - *pScreen = screenInfo.screens[screen]; - - return TRUE; -} - static Bool validDrawable(ClientPtr client, XID drawable, DrawablePtr *pDrawable, int *status) @@ -91,8 +80,8 @@ ProcDRI2QueryVersion(ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = DRI2_MAJOR; - rep.minorVersion = DRI2_MINOR; + rep.majorVersion = 1; + rep.minorVersion = 1; if (client->swapped) { swaps(&rep.sequenceNumber, n); @@ -111,67 +100,55 @@ ProcDRI2Connect(ClientPtr client) { REQUEST(xDRI2ConnectReq); xDRI2ConnectReply rep; - ScreenPtr pScreen; - int fd; + DrawablePtr pDraw; + int fd, status; const char *driverName; - char *busId = NULL; - unsigned int sareaHandle; + const char *deviceName; REQUEST_SIZE_MATCH(xDRI2ConnectReq); - if (!validScreen(client, stuff->screen, &pScreen)) - return BadValue; + if (!validDrawable(client, stuff->window, &pDraw, &status)) + return status; rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rep.driverNameLength = 0; - rep.busIdLength = 0; - rep.sareaHandle = 0; - - if (!DRI2Connect(pScreen, &fd, &driverName, &sareaHandle)) - goto fail; + rep.deviceNameLength = 0; - busId = drmGetBusid(fd); - if (busId == NULL) + if (!DRI2Connect(pDraw->pScreen, + stuff->driverType, &fd, &driverName, &deviceName)) goto fail; rep.driverNameLength = strlen(driverName); - rep.busIdLength = strlen(busId); - rep.sareaHandle = sareaHandle; - rep.length = (rep.driverNameLength + 3) / 4 + (rep.busIdLength + 3) / 4; + rep.deviceNameLength = strlen(deviceName); + rep.length = (rep.driverNameLength + 3) / 4 + + (rep.deviceNameLength + 3) / 4; fail: WriteToClient(client, sizeof(xDRI2ConnectReply), &rep); WriteToClient(client, rep.driverNameLength, driverName); - WriteToClient(client, rep.busIdLength, busId); - drmFreeBusid(busId); + WriteToClient(client, rep.deviceNameLength, deviceName); return client->noClientException; } static int -ProcDRI2AuthConnection(ClientPtr client) +ProcDRI2Authenticate(ClientPtr client) { - REQUEST(xDRI2AuthConnectionReq); - xDRI2AuthConnectionReply rep; - ScreenPtr pScreen; + REQUEST(xDRI2AuthenticateReq); + xDRI2AuthenticateReply rep; + DrawablePtr pDraw; + int status; - REQUEST_SIZE_MATCH(xDRI2AuthConnectionReq); - if (!validScreen(client, stuff->screen, &pScreen)) - return BadValue; + REQUEST_SIZE_MATCH(xDRI2AuthenticateReq); + if (!validDrawable(client, stuff->window, &pDraw, &status)) + return status; rep.type = X_Reply; - rep.length = 0; rep.sequenceNumber = client->sequence; - rep.authenticated = 1; - - if (!DRI2AuthConnection(pScreen, stuff->magic)) { - ErrorF("DRI2: Failed to authenticate %lu\n", - (unsigned long) stuff->magic); - rep.authenticated = 0; - } - - WriteToClient(client, sizeof(xDRI2AuthConnectionReply), &rep); + rep.length = 0; + rep.authenticated = DRI2Authenticate(pDraw->pScreen, stuff->magic); + WriteToClient(client, sizeof(xDRI2AuthenticateReply), &rep); return client->noClientException; } @@ -180,9 +157,7 @@ static int ProcDRI2CreateDrawable(ClientPtr client) { REQUEST(xDRI2CreateDrawableReq); - xDRI2CreateDrawableReply rep; DrawablePtr pDrawable; - unsigned int handle, head; int status; REQUEST_SIZE_MATCH(xDRI2CreateDrawableReq); @@ -190,22 +165,15 @@ ProcDRI2CreateDrawable(ClientPtr client) if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) return status; - if (!DRI2CreateDrawable(pDrawable, &handle, &head)) - return BadMatch; + status = DRI2CreateDrawable(pDrawable); + if (status != Success) + return status; if (!AddResource(stuff->drawable, dri2DrawableRes, pDrawable)) { DRI2DestroyDrawable(pDrawable); return BadAlloc; } - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.handle = handle; - rep.head = head; - - WriteToClient(client, sizeof(xDRI2CreateDrawableReply), &rep); - return client->noClientException; } @@ -225,27 +193,131 @@ ProcDRI2DestroyDrawable(ClientPtr client) return client->noClientException; } + +static void +send_buffers_reply(ClientPtr client, DrawablePtr pDrawable, + DRI2Buffer2Ptr *buffers, int count, int width, int height) +{ + xDRI2GetBuffersReply rep; + int skip = 0; + int i; + + if (pDrawable->type == DRAWABLE_WINDOW) { + for (i = 0; i < count; i++) { + /* Do not send the real front buffer of a window to the client. + */ + if (buffers[i]->attachment == DRI2BufferFrontLeft) { + skip++; + continue; + } + } + } + + rep.type = X_Reply; + rep.length = (count - skip) * sizeof(xDRI2Buffer) / 4; + rep.sequenceNumber = client->sequence; + rep.width = width; + rep.height = height; + rep.count = count - skip; + WriteToClient(client, sizeof(xDRI2GetBuffersReply), &rep); + + for (i = 0; i < count; i++) { + xDRI2Buffer buffer; + + /* Do not send the real front buffer of a window to the client. + */ + if ((pDrawable->type == DRAWABLE_WINDOW) + && (buffers[i]->attachment == DRI2BufferFrontLeft)) { + continue; + } + + buffer.attachment = buffers[i]->attachment; + buffer.name = buffers[i]->name; + buffer.pitch = buffers[i]->pitch; + buffer.cpp = buffers[i]->cpp; + buffer.flags = buffers[i]->flags; + WriteToClient(client, sizeof(xDRI2Buffer), &buffer); + } +} + + +static int +ProcDRI2GetBuffers(ClientPtr client) +{ + REQUEST(xDRI2GetBuffersReq); + DrawablePtr pDrawable; + DRI2Buffer2Ptr *buffers; + int status, width, height, count; + unsigned int *attachments; + + REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * 4); + if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) + return status; + + attachments = (unsigned int *) &stuff[1]; + buffers = DRI2GetBuffers(pDrawable, &width, &height, + attachments, stuff->count, &count); + + + send_buffers_reply(client, pDrawable, buffers, count, width, height); + + return client->noClientException; +} + static int -ProcDRI2ReemitDrawableInfo(ClientPtr client) +ProcDRI2GetBuffersWithFormat(ClientPtr client) { - REQUEST(xDRI2ReemitDrawableInfoReq); - xDRI2ReemitDrawableInfoReply rep; + REQUEST(xDRI2GetBuffersReq); + DrawablePtr pDrawable; + DRI2Buffer2Ptr *buffers; + int status, width, height, count; + unsigned int *attachments; + + REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * (2 * 4)); + if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) + return status; + + attachments = (unsigned int *) &stuff[1]; + buffers = DRI2GetBuffersWithFormat(pDrawable, &width, &height, + attachments, stuff->count, &count); + + send_buffers_reply(client, pDrawable, buffers, count, width, height); + + return client->noClientException; +} + +static int +ProcDRI2CopyRegion(ClientPtr client) +{ + REQUEST(xDRI2CopyRegionReq); + xDRI2CopyRegionReply rep; DrawablePtr pDrawable; - unsigned int head; int status; + RegionPtr pRegion; + + REQUEST_SIZE_MATCH(xDRI2CopyRegionReq); - REQUEST_SIZE_MATCH(xDRI2ReemitDrawableInfoReq); if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) return status; - DRI2ReemitDrawableInfo(pDrawable, &head); + VERIFY_REGION(pRegion, stuff->region, client, DixReadAccess); + + status = DRI2CopyRegion(pDrawable, pRegion, stuff->dest, stuff->src); + if (status != Success) + return status; + + /* CopyRegion needs to be a round trip to make sure the X server + * queues the swap buffer rendering commands before the DRI client + * continues rendering. The reply has a bitmask to signal the + * presense of optional return values as well, but we're not using + * that yet. + */ rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.head = head; - WriteToClient(client, sizeof(xDRI2ReemitDrawableInfoReply), &rep); + WriteToClient(client, sizeof(xDRI2CopyRegionReply), &rep); return client->noClientException; } @@ -266,14 +338,18 @@ ProcDRI2Dispatch (ClientPtr client) switch (stuff->data) { case X_DRI2Connect: return ProcDRI2Connect(client); - case X_DRI2AuthConnection: - return ProcDRI2AuthConnection(client); + case X_DRI2Authenticate: + return ProcDRI2Authenticate(client); case X_DRI2CreateDrawable: return ProcDRI2CreateDrawable(client); case X_DRI2DestroyDrawable: return ProcDRI2DestroyDrawable(client); - case X_DRI2ReemitDrawableInfo: - return ProcDRI2ReemitDrawableInfo(client); + case X_DRI2GetBuffers: + return ProcDRI2GetBuffers(client); + case X_DRI2CopyRegion: + return ProcDRI2CopyRegion(client); + case X_DRI2GetBuffersWithFormat: + return ProcDRI2GetBuffersWithFormat(client); default: return BadRequest; } @@ -296,8 +372,7 @@ SProcDRI2Connect(ClientPtr client) swaps(&rep.sequenceNumber, n); rep.length = 0; rep.driverNameLength = 0; - rep.busIdLength = 0; - rep.sareaHandle = 0; + rep.deviceNameLength = 0; return client->noClientException; } @@ -322,11 +397,6 @@ SProcDRI2Dispatch (ClientPtr client) } } -static void -DRI2ResetProc (ExtensionEntry *extEntry) -{ -} - static int DRI2DrawableGone(pointer p, XID id) { DrawablePtr pDrawable = p; @@ -344,7 +414,7 @@ DRI2ExtensionInit(void) DRI2NumberErrors, ProcDRI2Dispatch, SProcDRI2Dispatch, - DRI2ResetProc, + NULL, StandardMinorOpcode); dri2DrawableRes = CreateNewResourceType(DRI2DrawableGone); diff --git a/xorg-server/hw/xfree86/dummylib/Makefile.in b/xorg-server/hw/xfree86/dummylib/Makefile.in index 3611a3d02..f71e34427 100644 --- a/xorg-server/hw/xfree86/dummylib/Makefile.in +++ b/xorg-server/hw/xfree86/dummylib/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -47,7 +47,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -82,9 +81,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -99,8 +95,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -121,10 +118,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -146,6 +139,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -155,18 +149,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -185,7 +176,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -199,7 +190,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -211,8 +205,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -221,8 +214,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -255,7 +248,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -265,27 +257,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -296,10 +273,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -308,13 +281,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -347,8 +315,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -368,7 +335,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -378,12 +344,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -401,8 +367,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ noinst_LIBRARIES = libdummy-nonserver.a INCLUDES = $(XORG_INCS) AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) @@ -439,8 +403,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -575,7 +539,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/dummylib/xf86info.c b/xorg-server/hw/xfree86/dummylib/xf86info.c index 221a9d2bb..7db6817c3 100644 --- a/xorg-server/hw/xfree86/dummylib/xf86info.c +++ b/xorg-server/hw/xfree86/dummylib/xf86info.c @@ -8,5 +8,5 @@ #include "xf86Priv.h" /* Dummy variables */ -xf86InfoRec xf86Info = {NULL, }; +xf86InfoRec xf86Info; diff --git a/xorg-server/hw/xfree86/exa/Makefile.in b/xorg-server/hw/xfree86/exa/Makefile.in index 0311735a6..69c409f54 100644 --- a/xorg-server/hw/xfree86/exa/Makefile.in +++ b/xorg-server/hw/xfree86/exa/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -49,7 +49,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -75,9 +74,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -94,8 +90,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -116,10 +113,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -141,6 +134,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -150,18 +144,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -180,7 +171,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -194,7 +185,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -206,8 +200,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -216,8 +209,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -250,7 +243,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -260,27 +252,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -291,10 +268,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -303,13 +276,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -342,8 +310,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -363,7 +330,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -373,12 +339,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -396,8 +362,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ module_LTLIBRARIES = libexa.la libexa_la_LDFLAGS = -avoid-version INCLUDES = \ @@ -458,8 +422,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -570,7 +534,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/exa/exa.man.pre b/xorg-server/hw/xfree86/exa/exa.man.pre index 14859bc8f..5c953e256 100644 --- a/xorg-server/hw/xfree86/exa/exa.man.pre +++ b/xorg-server/hw/xfree86/exa/exa.man.pre @@ -6,24 +6,23 @@ exa \- new 2D acceleration architecture for X.Org .SH DESCRIPTION .B EXA provides a simple API for video drivers to implement for 2D acceleration. It -is a module loaded by drivers, and is not intended to be loaded on its own. See -your driver's manual page for how to enable -.B EXA -. +is a module loaded by drivers, and is not intended to be loaded on its own. +See your driver's manual page for how to enable +.BR EXA . .PP The .B EXA architecture is designed to make accelerating the Render extension simple and efficient, and results in various performance tradeoffs compared to XAA. Some -options are available for debugging performance issues or driver rendering -problems. They are not intended for general use. +__xconfigfile__ options are available for debugging performance issues or +driver rendering problems. They are not intended for general use. .TP .BI "Option \*qEXANoComposite\*q \*q" boolean \*q Disables acceleration of the Composite operation, which is at the heart of the Render extension. Not related to the Composite extension. Default: No. .TP .BI "Option \*qEXANoUploadToScreen\*q \*q" boolean \*q -Disables acceleration of uploading pixmap data to the freamebuffer. Default: No. +Disables acceleration of uploading pixmap data to the framebuffer. Default: No. .TP .BI "Option \*qEXANoDownloadFromScreen\*q \*q" boolean \*q Disables acceleration of downloading of pixmap data from the framebuffer. @@ -31,16 +30,13 @@ Disables acceleration of downloading of pixmap data from the framebuffer. Not usable with drivers which rely on DownloadFromScreen succeeding. Default: No. .TP -.BI "Option \*qEXAOptimizeMigration\*q \*q" boolean \*q -Enables an additional optimization for migration of destination pixmaps. This -may improve performance in some cases (e.g. when switching virtual desktops with -no compositing manager) but causes corruption in others (e.g. when starting -compiz). Default: No. -.TP .BI "Option \*qMigrationHeuristic\*q \*q" anystr \*q Chooses an alternate pixmap migration heuristic, for debugging purposes. The default is intended to be the best performing one for general use, though others may help with specific use cases. Available options include \*qalways\*q, \*qgreedy\*q, and \*qsmart\*q. Default: always. +.SH "SEE ALSO" +.BR __xservername__ (__appmansuffix__), +.BR __xconfigfile__(__filemansuffix__). .SH AUTHORS Authors include: Keith Packard, Eric Anholt, Zack Rusin, and Michel D\(:anzer diff --git a/xorg-server/hw/xfree86/exa/examodule.c b/xorg-server/hw/xfree86/exa/examodule.c index e18da0a37..27607a1ac 100644 --- a/xorg-server/hw/xfree86/exa/examodule.c +++ b/xorg-server/hw/xfree86/exa/examodule.c @@ -42,7 +42,8 @@ typedef struct _ExaXorgScreenPrivRec { OptionInfoPtr options; } ExaXorgScreenPrivRec, *ExaXorgScreenPrivPtr; -static DevPrivateKey exaXorgScreenPrivateKey = &exaXorgScreenPrivateKey; +static int exaXorgScreenPrivateKeyIndex; +static DevPrivateKey exaXorgScreenPrivateKey = &exaXorgScreenPrivateKeyIndex; typedef enum { EXAOPT_MIGRATION_HEURISTIC, @@ -179,13 +180,6 @@ exaDDXDriverInit(ScreenPtr pScreen) } -/*ARGSUSED*/ -static const OptionInfoRec * -EXAAvailableOptions(void *unused) -{ - return (EXAOptions); -} - static XF86ModuleVersionInfo exaVersRec = { "exa", diff --git a/xorg-server/hw/xfree86/fbdevhw/Makefile.in b/xorg-server/hw/xfree86/fbdevhw/Makefile.in index 7de912cbb..694956505 100644 --- a/xorg-server/hw/xfree86/fbdevhw/Makefile.in +++ b/xorg-server/hw/xfree86/fbdevhw/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -50,7 +50,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -79,9 +78,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -100,8 +96,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -122,10 +119,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -147,6 +140,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -156,18 +150,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -186,7 +177,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -200,7 +191,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -212,8 +206,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -222,8 +215,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -256,7 +249,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -266,27 +258,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -297,10 +274,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -309,13 +282,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -348,8 +316,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -369,7 +336,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -379,12 +345,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -402,8 +368,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ linuxmoduledir = $(moduledir)/linux linuxmodule_LTLIBRARIES = libfbdevhw.la libfbdevhw_la_LDFLAGS = -avoid-version @@ -458,8 +422,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -588,7 +552,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c index 4d514226e..5269277ef 100644 --- a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c +++ b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c @@ -245,7 +245,6 @@ fbdev_modes_equal(struct fb_var_screeninfo *set, struct fb_var_screeninfo *req) set->green.length == req->green.length && set->blue.length == req->blue.length && set->xres == req->xres && set->yres == req->yres && - set->pixclock == req->pixclock && set->right_margin == req->right_margin && set->hsync_len == req->hsync_len && set->left_margin == req->left_margin && diff --git a/xorg-server/hw/xfree86/i2c/Makefile.in b/xorg-server/hw/xfree86/i2c/Makefile.in index dec6218fd..d5cc978ba 100644 --- a/xorg-server/hw/xfree86/i2c/Makefile.in +++ b/xorg-server/hw/xfree86/i2c/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -46,7 +46,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -114,9 +113,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -139,8 +135,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -161,10 +158,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -186,6 +179,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -195,18 +189,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -225,7 +216,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -239,7 +230,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -251,8 +245,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -261,8 +254,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -295,7 +288,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -305,27 +297,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -336,10 +313,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -348,13 +321,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -387,8 +355,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -408,7 +375,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -418,12 +384,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -441,8 +407,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ noinst_LIBRARIES = libi2c.a multimediadir = $(moduledir)/multimedia multimedia_LTLIBRARIES = \ @@ -484,8 +448,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -629,7 +593,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/i2c/xf86i2c.c b/xorg-server/hw/xfree86/i2c/xf86i2c.c index 5cc83faa3..59832d6f9 100644 --- a/xorg-server/hw/xfree86/i2c/xf86i2c.c +++ b/xorg-server/hw/xfree86/i2c/xf86i2c.c @@ -35,12 +35,6 @@ #define I2C_TIMEOUT(x) /*(x)*/ /* Report timeouts */ #define I2C_TRACE(x) /*(x)*/ /* Report progress */ -/* Set which OSs have bad gettimeofday resolution. */ -#if defined(SVR4) && !defined(sun) -#define BAD_GETTIMEOFDAY_RESOLUTION -#endif - - /* This is the default I2CUDelay function if not supplied by the driver. * High level I2C interfaces implementing the bus protocol in hardware * should supply this function too. @@ -49,23 +43,6 @@ * All values 0 to 1e6 inclusive must be expected. */ -#ifdef BAD_GETTIMEOFDAY_RESOLUTION -/* - * This is temporary until a better, portable - * way is found. Adjust bogo_usec to match CPU speed. - */ -static int bogo_usec = 500; - -static void -I2CUDelay(I2CBusPtr b, int usec) -{ - volatile long i; - - if (usec > 0) - for (i = usec * bogo_usec; i > 0; i--) - /* (perhaps hw delay action) */; -} -#else static void I2CUDelay(I2CBusPtr b, int usec) { @@ -86,7 +63,6 @@ I2CUDelay(I2CBusPtr b, int usec) } while (diff>=0 && diff< (usec + 1)); } } -#endif /* Most drivers will register just with GetBits/PutBits functions. * The following functions implement a software I2C protocol diff --git a/xorg-server/hw/xfree86/int10/Makefile.in b/xorg-server/hw/xfree86/int10/Makefile.in index c0f829260..e434023dc 100644 --- a/xorg-server/hw/xfree86/int10/Makefile.in +++ b/xorg-server/hw/xfree86/int10/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,7 +45,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -85,9 +84,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -104,8 +100,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -126,10 +123,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -151,6 +144,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -160,18 +154,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -190,7 +181,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -204,7 +195,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -216,8 +210,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -226,8 +219,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -260,7 +253,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -270,27 +262,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -301,10 +278,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -313,13 +286,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -352,8 +320,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -373,7 +340,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -383,12 +349,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -406,8 +372,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ module_LTLIBRARIES = libint10.la sdk_HEADERS = xf86int10.h EXTRA_CFLAGS = @@ -447,8 +411,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -582,7 +546,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/int10/generic.c b/xorg-server/hw/xfree86/int10/generic.c index a30dee103..0af7c1baa 100644 --- a/xorg-server/hw/xfree86/int10/generic.c +++ b/xorg-server/hw/xfree86/int10/generic.c @@ -176,7 +176,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) * have executable code there. Note that xf86ReadBIOS() can only read in * 64kB at a time. */ - (void)memset((char *)base + V_BIOS, 0, SYS_BIOS - V_BIOS); + memset((char *)base + V_BIOS, 0, SYS_BIOS - V_BIOS); #if 0 for (cs = V_BIOS; cs < SYS_BIOS; cs += V_BIOS_SIZE) if (xf86ReadBIOS(cs, 0, (unsigned char *)base + cs, V_BIOS_SIZE) < @@ -220,19 +220,6 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) INTPriv(pInt)->highMemory = GET_HIGH_BASE(rom_device->rom_size); break; } - case BUS_ISA: - vbiosMem = (unsigned char *)sysMem + bios_location; -#if 0 - (void)memset(vbiosMem, 0, V_BIOS_SIZE); - if (xf86ReadBIOS(bios_location, 0, vbiosMem, V_BIOS_SIZE) - < V_BIOS_SIZE) - xf86DrvMsg(screen, X_WARNING, - "Unable to retrieve all of segment 0x%x.\n",bios_location); -#endif - if (!int10_check_bios(screen, bios_location >> 4, vbiosMem)) { - xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS (4)\n"); - goto error1; - } default: goto error1; } @@ -255,7 +242,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) * 128KiB. */ vbiosMem = (char *)base + V_BIOS; - (void)memset(vbiosMem, 0, 2 * V_BIOS_SIZE); + memset(vbiosMem, 0, 2 * V_BIOS_SIZE); if (read_legacy_video_BIOS(pInt->dev, vbiosMem) < V_BIOS_SIZE) { xf86DrvMsg(screen, X_WARNING, "Unable to retrieve all of segment 0x0C0000.\n"); diff --git a/xorg-server/hw/xfree86/int10/helper_exec.c b/xorg-server/hw/xfree86/int10/helper_exec.c index 15eba4928..1c89ce508 100644 --- a/xorg-server/hw/xfree86/int10/helper_exec.c +++ b/xorg-server/hw/xfree86/int10/helper_exec.c @@ -32,6 +32,8 @@ #include "Pci.h" #ifdef _X86EMU #include "x86emu/x86emui.h" +#else +#define DEBUG_IO_TRACE() 0 #endif #include diff --git a/xorg-server/hw/xfree86/int10/helper_mem.c b/xorg-server/hw/xfree86/int10/helper_mem.c index b59f47358..6f6ecc2b3 100644 --- a/xorg-server/hw/xfree86/int10/helper_mem.c +++ b/xorg-server/hw/xfree86/int10/helper_mem.c @@ -253,7 +253,7 @@ int10_check_bios(int scrnIndex, int codeSeg, const unsigned char* vbiosMem) return FALSE; if (bios_checksum(vbiosMem, size)) - xf86DrvMsg(scrnIndex, X_WARNING, "Bad V_BIOS checksum\n"); + xf86DrvMsg(scrnIndex, X_INFO, "Bad V_BIOS checksum\n"); return TRUE; } diff --git a/xorg-server/hw/xfree86/int10/xf86int10.c b/xorg-server/hw/xfree86/int10/xf86int10.c index f50607cfc..51eb91fbb 100644 --- a/xorg-server/hw/xfree86/int10/xf86int10.c +++ b/xorg-server/hw/xfree86/int10/xf86int10.c @@ -655,6 +655,32 @@ find_pci_class(CARD8 intf, CARD8 subClass, CARD16 _class, } #endif +/* + * Return the last bus number in the same domain as dev. Only look at the + * one domain since this is going into %cl, and VGA I/O is per-domain anyway. + */ +static int +int1A_last_bus_number(struct pci_device *dev) +{ + struct pci_device *d; + struct pci_slot_match m = { dev->domain, + PCI_MATCH_ANY, + PCI_MATCH_ANY, + PCI_MATCH_ANY }; + struct pci_device_iterator *iter; + int i = 0; + + iter = pci_slot_match_iterator_create(&m); + + while ((d = pci_device_next(iter))) + if (d->bus > i) + i = d->bus; + + pci_iterator_destroy(iter); + + return i; +} + static int int1A_handler(xf86Int10InfoPtr pInt) { @@ -674,7 +700,7 @@ int1A_handler(xf86Int10InfoPtr pInt) X86_EDX = 0x20494350; /* " ICP" */ X86_EBX = 0x0210; /* Version 2.10 */ X86_ECX &= 0xFF00; - X86_ECX |= (pciNumBuses & 0xFF); /* Max bus number in system */ + X86_ECX |= int1A_last_bus_number(pvp); X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */ #ifdef PRINT_INT ErrorF("ax=0x%x dx=0x%x bx=0x%x cx=0x%x flags=0x%x\n", diff --git a/xorg-server/hw/xfree86/loader/Makefile.am b/xorg-server/hw/xfree86/loader/Makefile.am index ef9ab9ab3..fa9dbfe5d 100644 --- a/xorg-server/hw/xfree86/loader/Makefile.am +++ b/xorg-server/hw/xfree86/loader/Makefile.am @@ -8,28 +8,20 @@ INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(srcdir)/../dixmods/extmod \ #AM_LDFLAGS = -r AM_CFLAGS = -DIN_LOADER $(DIX_CFLAGS) $(XORG_CFLAGS) -if XORG_LOADER_SPARC -SPARC_SOURCES = SparcMulDiv.S -endif - EXTRA_DIST = \ dlloader.h \ loader.h \ - loaderProcs.h \ - SparcMulDiv.S + loaderProcs.h libloader_a_SOURCES = \ loader.c \ loaderProcs.h \ loadext.c \ loadmod.c \ - loadfont.c \ dlloader.c \ os.c \ dixsym.c \ extsym.c \ - fontsym.c \ misym.c \ xf86sym.c \ - sym.h \ - $(SPARC_SOURCES) + sym.h diff --git a/xorg-server/hw/xfree86/loader/Makefile.in b/xorg-server/hw/xfree86/loader/Makefile.in index 82161d088..cc12b39f8 100644 --- a/xorg-server/hw/xfree86/loader/Makefile.in +++ b/xorg-server/hw/xfree86/loader/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,7 +43,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -53,35 +52,22 @@ LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libloader_a_AR = $(AR) $(ARFLAGS) libloader_a_LIBADD = -am__libloader_a_SOURCES_DIST = loader.c loaderProcs.h loadext.c \ - loadmod.c loadfont.c dlloader.c os.c dixsym.c extsym.c \ - fontsym.c misym.c xf86sym.c sym.h SparcMulDiv.S -@XORG_LOADER_SPARC_TRUE@am__objects_1 = SparcMulDiv.$(OBJEXT) am_libloader_a_OBJECTS = loader.$(OBJEXT) loadext.$(OBJEXT) \ - loadmod.$(OBJEXT) loadfont.$(OBJEXT) dlloader.$(OBJEXT) \ - os.$(OBJEXT) dixsym.$(OBJEXT) extsym.$(OBJEXT) \ - fontsym.$(OBJEXT) misym.$(OBJEXT) xf86sym.$(OBJEXT) \ - $(am__objects_1) + loadmod.$(OBJEXT) dlloader.$(OBJEXT) os.$(OBJEXT) \ + dixsym.$(OBJEXT) extsym.$(OBJEXT) misym.$(OBJEXT) \ + xf86sym.$(OBJEXT) libloader_a_OBJECTS = $(am_libloader_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles -CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -LTCPPASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libloader_a_SOURCES) -DIST_SOURCES = $(am__libloader_a_SOURCES_DIST) +DIST_SOURCES = $(libloader_a_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -90,8 +76,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -112,10 +99,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -137,6 +120,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -146,18 +130,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -176,7 +157,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -190,7 +171,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -202,8 +186,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -212,8 +195,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -246,7 +229,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -256,27 +238,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -287,10 +254,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -299,13 +262,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -338,8 +296,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -359,7 +316,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -369,12 +325,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -392,8 +348,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ noinst_LIBRARIES = libloader.a INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(srcdir)/../dixmods/extmod \ -I$(srcdir)/../vbe -I$(top_srcdir)/miext/cw -I$(srcdir)/../int10 \ @@ -403,39 +357,34 @@ INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(srcdir)/../dixmods/extmod \ #AM_LDFLAGS = -r AM_CFLAGS = -DIN_LOADER $(DIX_CFLAGS) $(XORG_CFLAGS) -@XORG_LOADER_SPARC_TRUE@SPARC_SOURCES = SparcMulDiv.S EXTRA_DIST = \ dlloader.h \ loader.h \ - loaderProcs.h \ - SparcMulDiv.S + loaderProcs.h libloader_a_SOURCES = \ loader.c \ loaderProcs.h \ loadext.c \ loadmod.c \ - loadfont.c \ dlloader.c \ os.c \ dixsym.c \ extsym.c \ - fontsym.c \ misym.c \ xf86sym.c \ - sym.h \ - $(SPARC_SOURCES) + sym.h all: all-am .SUFFIXES: -.SUFFIXES: .S .c .lo .o .obj +.SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -473,40 +422,16 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SparcMulDiv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dixsym.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlloader.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extsym.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontsym.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loader.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadext.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadfont.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadmod.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misym.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86sym.Po@am__quote@ -.S.o: -@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCCAS_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ $< - -.S.obj: -@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCCAS_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.S.lo: -@am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCCAS_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCCAS_FALSE@ $(LTCPPASCOMPILE) -c -o $@ $< - .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @@ -539,7 +464,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/loader/SparcMulDiv.S b/xorg-server/hw/xfree86/loader/SparcMulDiv.S deleted file mode 100644 index 11139d192..000000000 --- a/xorg-server/hw/xfree86/loader/SparcMulDiv.S +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Hardware integer division and multiplication routines for SPARC v8 and higher. - * - * Copyright (C) 1996 David S. Miller (davem@redhat.com) - * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz) - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * JAKUB JELINEK OR DAVID MILLER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/SparcMulDiv.S,v 1.1 1999/07/10 07:24:51 dawes Exp $ */ - - .globl urem_sparcv89, umul_sparcv89, udiv_sparcv89 - .globl rem_sparcv89, mul_sparcv89, div_sparcv89 - - .align 32 -urem_sparcv89: - wr %g0, 0x0, %y - nop - nop - nop - udiv %o0, %o1, %o2 - umul %o2, %o1, %o2 - retl - sub %o0, %o2, %o0 - - .align 32 -umul_sparcv89: - umul %o0, %o1, %o0 - retl - rd %y, %o1 - - .align 32 -udiv_sparcv89: - wr %g0, 0x0, %y - nop - nop - retl - udiv %o0, %o1, %o0 - - .align 32 -rem_sparcv89: - sra %o0, 0x1f, %o4 - wr %o4, 0x0, %y - nop - nop - nop - sdivcc %o0, %o1, %o2 - bvs,a 1f - xnor %o2, %g0, %o2 -1: smul %o2, %o1, %o2 - retl - sub %o0, %o2, %o0 - - .align 32 -mul_sparcv89: - smul %o0, %o1, %o0 - retl - rd %y, %o1 - nop - - .align 32 -div_sparcv89: - sra %o0, 0x1f, %o2 - wr %o2, 0x0, %y - nop - nop - nop - sdivcc %o0, %o1, %o0 - bvs,a 1f - xnor %o0, %g0, %o0 -1: retl - nop diff --git a/xorg-server/hw/xfree86/loader/dixsym.c b/xorg-server/hw/xfree86/loader/dixsym.c index a8bde756b..19b93c5f0 100644 --- a/xorg-server/hw/xfree86/loader/dixsym.c +++ b/xorg-server/hw/xfree86/loader/dixsym.c @@ -57,7 +57,6 @@ #include "cursorstr.h" #include "dix.h" #include "dixevents.h" -#include "dixfont.h" #include "dixstruct.h" #include "misc.h" #include "globals.h" @@ -99,6 +98,7 @@ _X_HIDDEN void *dixLookupTab[] = { /* dix */ /* atom.c */ SYMFUNC(MakeAtom) + SYMFUNC(NameForAtom) SYMFUNC(ValidAtom) /* colormap.c */ SYMFUNC(AllocColor) @@ -138,7 +138,6 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(SendMappingNotify) SYMFUNC(InitPointerDeviceStruct) /* dispatch.c */ - SYMFUNC(SetInputCheck) SYMFUNC(SendErrorToClient) SYMFUNC(UpdateCurrentTime) SYMFUNC(UpdateCurrentTimeIf) @@ -147,11 +146,6 @@ _X_HIDDEN void *dixLookupTab[] = { SYMVAR(isItTimeToYield) SYMVAR(ClientStateCallback) SYMVAR(ServerGrabCallback) - /* dixfonts.c */ - SYMFUNC(CloseFont) - SYMFUNC(FontToXError) - SYMFUNC(LoadGlyphs) - SYMVAR(fpe_functions) /* dixutils.c */ SYMFUNC(AddCallback) SYMFUNC(ClientSleep) @@ -179,7 +173,6 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(GetSpritePosition) SYMFUNC(GetSpriteWindow) SYMFUNC(GetSpriteCursor) - SYMFUNC(WindowsRestructured) SYMVAR(DeviceEventCallback) SYMVAR(EventCallback) SYMVAR(inputInfo) @@ -200,10 +193,6 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(CheckExtension) SYMFUNC(MinorOpcodeOfRequest) SYMFUNC(StandardMinorOpcode) -#ifdef XEVIE - SYMVAR(xeviehot) - SYMVAR(xeviewin) -#endif /* gc.c */ SYMFUNC(CopyGC) SYMFUNC(CreateGC) @@ -214,10 +203,8 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(FreeGC) SYMFUNC(FreeScratchGC) SYMFUNC(GetScratchGC) - SYMFUNC(SetClipRects) SYMFUNC(ValidateGC) SYMFUNC(VerifyRectOrder) - SYMFUNC(SetDashes) /* globals.c */ SYMVAR(ScreenSaverTime) #ifdef DPMSExtension @@ -229,10 +216,7 @@ _X_HIDDEN void *dixLookupTab[] = { SYMVAR(DPMSSuspendTime) SYMVAR(DPMSEnabledSwitch) SYMVAR(DPMSDisabledSwitch) - SYMVAR(defaultDPMSEnabled) #endif - /* bigreq */ - SYMVAR(maxBigRequestSize) #ifdef XV /* XXX These are exported from the DDX, not DIX. */ SYMVAR(XvScreenInitProc) @@ -280,8 +264,6 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(FakeClientID) SYMFUNC(FreeResource) SYMFUNC(FreeResourceByType) - SYMFUNC(GetXIDList) - SYMFUNC(GetXIDRange) SYMFUNC(LegalNewID) SYMFUNC(FindClientResourcesByType) SYMFUNC(FindAllClientResources) @@ -308,8 +290,6 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(SwapColorItem) /* tables.c */ SYMVAR(EventSwapVector) - SYMVAR(ReplySwapVector) - SYMVAR(ProcVector) /* window.c */ SYMFUNC(ChangeWindowAttributes) SYMFUNC(CheckWindowOptionalNeed) @@ -319,19 +299,12 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(GravityTranslate) SYMFUNC(MakeWindowOptional) SYMFUNC(MapWindow) - SYMFUNC(MoveWindowInStack) SYMFUNC(NotClippedByChildren) - SYMFUNC(ResizeChildrenWinSize) SYMFUNC(SaveScreens) SYMFUNC(dixSaveScreens) - SYMFUNC(SendVisibilityNotify) - SYMFUNC(SetWinSize) - SYMFUNC(SetBorderSize) SYMFUNC(TraverseTree) SYMFUNC(UnmapWindow) SYMFUNC(WalkTree) - SYMVAR(deltaSaveUndersViewable) - SYMVAR(numSaveUndersViewable) SYMVAR(savedScreenInfo) SYMVAR(screenIsSaved) @@ -341,14 +314,10 @@ _X_HIDDEN void *dixLookupTab[] = { /* utils.c */ SYMFUNC(Xstrdup) SYMFUNC(XNFstrdup) - SYMVAR(Must_have_memory) SYMFUNC(AdjustWaitForDelay) SYMVAR(noTestExtensions) SYMFUNC(GiveUp) -#ifdef BIGREQS - SYMVAR(noBigReqExtension) -#endif #ifdef COMPOSITE SYMVAR(noCompositeExtension) #endif @@ -361,12 +330,6 @@ _X_HIDDEN void *dixLookupTab[] = { #ifdef DPMSExtension SYMVAR(noDPMSExtension) #endif -#ifdef EVI - SYMVAR(noEVIExtension) -#endif -#ifdef FONTCACHE - SYMVAR(noFontCacheExtension) -#endif #ifdef GLXEXT SYMVAR(noGlxExtension) #endif @@ -376,9 +339,6 @@ _X_HIDDEN void *dixLookupTab[] = { #ifdef MITSHM SYMVAR(noMITShmExtension) #endif -#ifdef MITMISC - SYMVAR(noMITMiscExtension) -#endif #ifdef MULTIBUFFER SYMVAR(noMultibufferExtension) #endif @@ -388,30 +348,12 @@ _X_HIDDEN void *dixLookupTab[] = { #ifdef RENDER SYMVAR(noRenderExtension) #endif -#ifdef SHAPE - SYMVAR(noShapeExtension) -#endif #ifdef XCSECURITY SYMVAR(noSecurityExtension) #endif -#ifdef XSYNC - SYMVAR(noSyncExtension) -#endif -#ifdef TOGCUP - SYMVAR(noXcupExtension) -#endif #ifdef RES SYMVAR(noResExtension) #endif -#ifdef XAPPGROUP - SYMVAR(noXagExtension) -#endif -#ifdef XCMISC - SYMVAR(noXCMiscExtension) -#endif -#ifdef XEVIE - SYMVAR(noXevieExtension) -#endif #ifdef XF86BIGFONT SYMVAR(noXFree86BigfontExtension) #endif @@ -421,9 +363,6 @@ _X_HIDDEN void *dixLookupTab[] = { #ifdef XF86DRI SYMVAR(noXFree86DRIExtension) #endif -#ifdef XF86MISC - SYMVAR(noXFree86MiscExtension) -#endif #ifdef XF86VIDMODE SYMVAR(noXFree86VidModeExtension) #endif @@ -437,12 +376,6 @@ _X_HIDDEN void *dixLookupTab[] = { #ifdef PANORAMIX SYMVAR(noPanoramiXExtension) #endif -#ifdef XINPUT - SYMVAR(noXInputExtension) -#endif -#ifdef XIDLE - SYMVAR(noXIdleExtension) -#endif #ifdef XSELINUX SYMVAR(noSELinuxExtension) #endif @@ -477,15 +410,12 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(SetCriticalOutputPending) SYMVAR(FlushCallback) SYMVAR(ReplyCallback) - SYMVAR(SkippedRequestsCallback) SYMFUNC(ResetCurrentRequest) /* connection.c */ SYMFUNC(IgnoreClient) SYMFUNC(AttendClient) SYMFUNC(AddEnabledDevice) SYMFUNC(RemoveEnabledDevice) - SYMFUNC(MakeClientGrabPervious) - SYMFUNC(MakeClientGrabImpervious) SYMVAR(GrabInProgress) #ifdef XKB @@ -496,14 +426,10 @@ _X_HIDDEN void *dixLookupTab[] = { SYMVAR(XkbDfltRepeatInterval) #endif -#ifdef XINPUT /* Xi */ /* exevents.c */ SYMFUNC(InitValuatorAxisStruct) SYMFUNC(InitProximityClassDeviceStruct) - /* extinit.c */ - SYMFUNC(AssignTypeAndName) -#endif /* xf86DGA.c */ /* XXX This is exported from the DDX, not DIX. */ diff --git a/xorg-server/hw/xfree86/loader/dlloader.c b/xorg-server/hw/xfree86/loader/dlloader.c index 4caefd071..18dcb76c6 100644 --- a/xorg-server/hw/xfree86/loader/dlloader.c +++ b/xorg-server/hw/xfree86/loader/dlloader.c @@ -87,16 +87,15 @@ DLFindSymbolLocal(pointer module, const char *name) static const char symPrefix[] = DLSYM_PREFIX; - if (strlen(symPrefix)) { + if (sizeof(symPrefix) > 1) { n = malloc(strlen(symPrefix) + strlen(name) + 1); sprintf(n, "%s%s", symPrefix, name); - } else { - n = name; + name = n; } - p = dlsym(module, n); + p = dlsym(module, name); - if (strlen(symPrefix)) + if (sizeof(symPrefix) > 1) free(n); return p; diff --git a/xorg-server/hw/xfree86/loader/fontsym.c b/xorg-server/hw/xfree86/loader/fontsym.c deleted file mode 100644 index 82d4b1cf8..000000000 --- a/xorg-server/hw/xfree86/loader/fontsym.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 1998-2002 by The XFree86 Project, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the copyright holder(s) - * and author(s) shall not be used in advertising or otherwise to promote - * the sale, use or other dealings in this Software without prior written - * authorization from the copyright holder(s) and author(s). - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include "sym.h" -#include -#include -#ifdef FONTENC_COMPATIBILITY -#include -#endif -#include -#include -#include -#include -#ifdef FONTCACHE -#define _FONTCACHE_SERVER_ -#include "fontcache.h" -#endif - -_X_HIDDEN void *fontLookupTab[] = { - - SYMFUNC(TwoByteSwap) - SYMFUNC(FourByteSwap) - SYMFUNC(FontCouldBeTerminal) - SYMFUNC(BufFileRead) - SYMFUNC(BufFileWrite) - SYMFUNC(CheckFSFormat) - SYMFUNC(FontFileOpen) - SYMFUNC(FontFilePriorityRegisterRenderer) - SYMFUNC(FontFileRegisterRenderer) - SYMFUNC(FontParseXLFDName) - SYMFUNC(FontFileCloseFont) - SYMFUNC(FontFileOpenBitmap) - SYMFUNC(FontFileCompleteXLFD) - SYMFUNC(FontFileCountDashes) - SYMFUNC(FontFileFindNameInDir) - SYMFUNC(FontFileClose) - SYMFUNC(FontComputeInfoAccelerators) - SYMFUNC(FontDefaultFormat) - SYMFUNC(NameForAtom) - SYMFUNC(BitOrderInvert) - SYMFUNC(FontFileMatchRenderer) - SYMFUNC(RepadBitmap) - SYMFUNC(FontEncName) - SYMFUNC(FontEncRecode) - SYMFUNC(FontEncFind) - SYMFUNC(FontMapFind) - SYMFUNC(FontEncMapFind) - SYMFUNC(FontEncFromXLFD) - SYMFUNC(FontEncDirectory) - SYMFUNC(FontMapReverse) - SYMFUNC(FontMapReverseFree) - SYMFUNC(CreateFontRec) - SYMFUNC(DestroyFontRec) - SYMFUNC(GetGlyphs) - SYMFUNC(QueryGlyphExtents) - - SYMVAR(FontFileBitmapSources) - -#ifdef FONTENC_COMPATIBILITY - /* Obsolete backwards compatibility symbols -- fontencc.c */ - SYMFUNC(font_encoding_from_xlfd) - SYMFUNC(font_encoding_find) - SYMFUNC(font_encoding_recode) - SYMFUNC(font_encoding_name) - SYMFUNC(identifyEncodingFile) -#endif - -#ifdef FONTCACHE - /* fontcache.c */ - SYMFUNC(FontCacheGetSettings) - SYMFUNC(FontCacheGetStatistics) - SYMFUNC(FontCacheChangeSettings) - SYMFUNC(FontCacheOpenCache) - SYMFUNC(FontCacheCloseCache) - SYMFUNC(FontCacheSearchEntry) - SYMFUNC(FontCacheGetEntry) - SYMFUNC(FontCacheInsertEntry) - SYMFUNC(FontCacheGetBitmap) -#endif -}; diff --git a/xorg-server/hw/xfree86/loader/loader.c b/xorg-server/hw/xfree86/loader/loader.c index a00269b70..fc0db2886 100644 --- a/xorg-server/hw/xfree86/loader/loader.c +++ b/xorg-server/hw/xfree86/loader/loader.c @@ -63,7 +63,7 @@ #include #if defined(linux) && \ (defined(__alpha__) || defined(__powerpc__) || defined(__ia64__) \ - || defined(__amd64__) || defined(__x86_64__)) + || defined(__amd64__)) #include #endif #include @@ -76,11 +76,6 @@ #include "compiler.h" #include "sym.h" -#if defined(Lynx) && defined(sun) -/* Cross build machine doesn;t have strerror() */ -#define strerror(err) "strerror unsupported" -#endif - /* * handles are used to identify files that are loaded. Even archives * are counted as a single file. @@ -113,8 +108,7 @@ LoaderInit(void) xf86MsgVerb(X_INFO, 2, "Loader magic: %p\n", (void *) ((long)dixLookupTab ^ (long)extLookupTab - ^ (long)fontLookupTab ^ (long)miLookupTab - ^ (long)xfree86LookupTab)); + ^ (long)miLookupTab ^ (long)xfree86LookupTab)); xf86MsgVerb(X_INFO, 2, "Module ABI versions:\n"); xf86ErrorFVerb(2, "\t%s: %d.%d\n", ABI_CLASS_ANSIC, GET_ABI_MAJOR(LoaderVersionInfo.ansicVersion), @@ -128,9 +122,6 @@ LoaderInit(void) xf86ErrorFVerb(2, "\t%s : %d.%d\n", ABI_CLASS_EXTENSION, GET_ABI_MAJOR(LoaderVersionInfo.extensionVersion), GET_ABI_MINOR(LoaderVersionInfo.extensionVersion)); - xf86ErrorFVerb(2, "\t%s : %d.%d\n", ABI_CLASS_FONT, - GET_ABI_MAJOR(LoaderVersionInfo.fontVersion), - GET_ABI_MINOR(LoaderVersionInfo.fontVersion)); LoaderGetOS(&osname, NULL, NULL, NULL); if (osname) @@ -258,7 +249,7 @@ LoaderOpen(const char *module, const char *cname, int handle, * Find a free handle. */ new_handle = 1; - while (freeHandles[new_handle] && new_handle < MAX_HANDLE) + while (new_handle < MAX_HANDLE && freeHandles[new_handle]) new_handle++; if (new_handle == MAX_HANDLE) { @@ -363,6 +354,12 @@ LoaderSetOptions(unsigned long opts) LoaderOptions |= opts; } +_X_EXPORT Bool +LoaderShouldIgnoreABI(void) +{ + return (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL) != 0; +} + _X_EXPORT int LoaderGetABIVersion(const char *abiclass) { diff --git a/xorg-server/hw/xfree86/loader/loader.h b/xorg-server/hw/xfree86/loader/loader.h index 46d4c3ed3..ac5f99cf5 100644 --- a/xorg-server/hw/xfree86/loader/loader.h +++ b/xorg-server/hw/xfree86/loader/loader.h @@ -53,9 +53,6 @@ #ifndef _LOADER_H #define _LOADER_H -#if defined(Lynx) && defined(sun) -#define const /**/ -#endif #include #include #include diff --git a/xorg-server/hw/xfree86/loader/loaderProcs.h b/xorg-server/hw/xfree86/loader/loaderProcs.h index 9c73db3a6..a10f0b3a6 100644 --- a/xorg-server/hw/xfree86/loader/loaderProcs.h +++ b/xorg-server/hw/xfree86/loader/loaderProcs.h @@ -56,7 +56,6 @@ #undef IN_LOADER #define IN_LOADER #include "xf86Module.h" -#include typedef struct module_desc { struct module_desc *child; @@ -87,7 +86,6 @@ ModuleDescPtr LoadSubModuleLocal(ModuleDescPtr, const char *, pointer, const XF86ModReqInfo *, int *, int *); ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent); -void LoadFont(FontModule *); void UnloadModule(ModuleDescPtr); void UnloadSubModule(ModuleDescPtr); void UnloadDriver(ModuleDescPtr); diff --git a/xorg-server/hw/xfree86/loader/loadfont.c b/xorg-server/hw/xfree86/loader/loadfont.c deleted file mode 100644 index 94d31d6c1..000000000 --- a/xorg-server/hw/xfree86/loader/loadfont.c +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 1998 by The XFree86 Project, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the copyright holder(s) - * and author(s) shall not be used in advertising or otherwise to promote - * the sale, use or other dealings in this Software without prior written - * authorization from the copyright holder(s) and author(s). - */ - -/* Maybe this file belongs in lib/font/fontfile/module/ ? */ - -#define LOADERDECLARATIONS -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "loaderProcs.h" -#include "misc.h" -#include "xf86.h" - -/* XXX this should be static, but xorgcfg needs it, nngh */ -FontModule *FontModuleList = NULL; -static int numFontModules = 0; - -static FontModule * -NewFontModule(void) -{ - FontModule *save = FontModuleList; - int n; - - /* Sanity check */ - if (!FontModuleList) - numFontModules = 0; - - n = numFontModules + 1; - FontModuleList = xrealloc(FontModuleList, (n + 1) * sizeof(FontModule)); - if (FontModuleList == NULL) { - FontModuleList = save; - return NULL; - } else { - numFontModules++; - FontModuleList[numFontModules].name = NULL; - return FontModuleList + (numFontModules - 1); - } -} - -_X_EXPORT void -LoadFont(FontModule * f) -{ - FontModule *newfont; - - if (f == NULL) - return; - - if (!(newfont = NewFontModule())) - return; - - xf86MsgVerb(X_INFO, 2, "Loading font %s\n", f->name); - - newfont->name = f->name; - newfont->initFunc = f->initFunc; - newfont->module = f->module; -} diff --git a/xorg-server/hw/xfree86/loader/loadmod.c b/xorg-server/hw/xfree86/loader/loadmod.c index 7f3bbe49c..22b540c5d 100644 --- a/xorg-server/hw/xfree86/loader/loadmod.c +++ b/xorg-server/hw/xfree86/loader/loadmod.c @@ -59,9 +59,7 @@ #include "misc.h" #include "xf86.h" #include "xf86Priv.h" -#ifdef XINPUT #include "xf86Xinput.h" -#endif #include "loader.h" #include "xf86Optrec.h" @@ -200,7 +198,6 @@ LoaderSetPath(const char *path) /* Standard set of module subdirectories to search, in order of preference */ static const char *stdSubdirs[] = { "", - "fonts/", "input/", "drivers/", "multimedia/", @@ -850,14 +847,7 @@ doLoadModule(const char *module, const char *path, const char **subdirlist, char *m = NULL; const char **cim; - xf86MsgVerb(X_INFO, 3, "LoadModule: \"%s\"\n", module); - - for (cim = compiled_in_modules; *cim; cim++) - if (!strcmp (module, *cim)) - { - xf86MsgVerb(X_INFO, 3, "Module \"%s\" already built-in\n", module); - return (ModuleDescPtr) 1; - } + xf86MsgVerb(X_INFO, 3, "LoadModule: \"%s\"", module); patterns = InitPatterns(patternlist); name = LoaderGetCanonicalName(module, patterns); @@ -872,6 +862,15 @@ doLoadModule(const char *module, const char *path, const char **subdirlist, xf86ErrorFVerb(3, "\n"); m = (char *)module; } + + for (cim = compiled_in_modules; *cim; cim++) + if (!strcmp (m, *cim)) + { + xf86MsgVerb(X_INFO, 3, "Module \"%s\" already built-in\n", m); + ret = (ModuleDescPtr) 1; + goto LoadModule_exit; + } + if (!name) { if (errmaj) *errmaj = LDR_BADUSAGE; @@ -1135,24 +1134,6 @@ UnloadSubModule(ModuleDescPtr mod) xfree(mod); } -static void -FreeModuleDesc(ModuleDescPtr head) -{ - ModuleDescPtr sibs, prev; - - if (head == (ModuleDescPtr) 1) - return; - if (head->child) - FreeModuleDesc(head->child); - sibs = head; - while (sibs) { - prev = sibs; - sibs = sibs->sib; - TestFree(prev->name); - xfree(prev); - } -} - static void RemoveChild(ModuleDescPtr child) { diff --git a/xorg-server/hw/xfree86/loader/misym.c b/xorg-server/hw/xfree86/loader/misym.c index aa712c03a..91f2529b0 100644 --- a/xorg-server/hw/xfree86/loader/misym.c +++ b/xorg-server/hw/xfree86/loader/misym.c @@ -84,127 +84,102 @@ extern miPointerSpriteFuncRec miSpritePointerFuncs; _X_HIDDEN void *miLookupTab[] = { + SYMFUNC(miChangeClip) + SYMFUNC(miChangeGC) + SYMFUNC(miClearDrawable) SYMFUNC(miClearToBackground) - SYMFUNC(miSendGraphicsExpose) + SYMFUNC(miClearVisualTypes) + SYMFUNC(miClipSpans) + SYMFUNC(miComputeCompositeClip) + SYMFUNC(miCopyClip) + SYMFUNC(miCopyGC) + SYMFUNC(miCreateDefColormap) + SYMFUNC(miCreateScreenResources) + SYMFUNC(miDCInitialize) + SYMFUNC(miDestroyClip) + SYMFUNC(miDestroyGC) + SYMFUNC(miExpandDirectColors) + SYMFUNC(miFillArcSetup) + SYMFUNC(miFillArcSliceSetup) + SYMFUNC(miFillPolygon) + SYMFUNC(miGetDefaultVisualMask) + SYMFUNC(miHandleExposures) + SYMFUNC(miImageGlyphBlt) + SYMFUNC(miImageText16) + SYMFUNC(miImageText8) + SYMFUNC(miInitOverlay) + SYMFUNC(miInitVisuals) + SYMFUNC(miInitializeBackingStore) + SYMFUNC(miInitializeBanking) + SYMFUNC(miInitializeColormap) + SYMFUNC(miInstallColormap) + SYMFUNC(miIntersect) + SYMFUNC(miInverse) + SYMFUNC(miListInstalledColormaps) SYMFUNC(miModifyPixmapHeader) - SYMFUNC(miHandleValidateExposures) - SYMFUNC(miSetShape) - SYMFUNC(miChangeBorderWidth) - SYMFUNC(miShapedWindowIn) - SYMFUNC(miRectIn) - SYMFUNC(miZeroClipLine) - SYMFUNC(miZeroDashLine) - SYMFUNC(miClearDrawable) + SYMFUNC(miOverlayCollectUnderlayRegions) + SYMFUNC(miOverlayComputeCompositeClip) + SYMFUNC(miOverlayCopyUnderlay) + SYMFUNC(miOverlayGetPrivateClips) + SYMFUNC(miOverlaySetRootClip) + SYMFUNC(miOverlaySetTransFunction) + SYMFUNC(miPointInRegion) + SYMFUNC(miPointerAbsoluteCursor) + SYMFUNC(miPointerCurrentScreen) + SYMFUNC(miPointerInitialize) + SYMFUNC(miPointerWarpCursor) + SYMFUNC(miPolyArc) + SYMFUNC(miPolyBuildEdge) + SYMFUNC(miPolyBuildPoly) + SYMFUNC(miPolyFillArc) + SYMFUNC(miPolyFillRect) + SYMFUNC(miPolyGlyphBlt) SYMFUNC(miPolyPoint) - SYMFUNC(miStepDash) - SYMFUNC(miIntersect) + SYMFUNC(miPolyRectangle) + SYMFUNC(miPolySegment) + SYMFUNC(miPolyText16) + SYMFUNC(miPolyText8) + SYMFUNC(miRectAlloc) + SYMFUNC(miRectIn) + SYMFUNC(miRectsToRegion) SYMFUNC(miRegionAppend) SYMFUNC(miRegionCopy) + SYMFUNC(miRegionCreate) SYMFUNC(miRegionDestroy) SYMFUNC(miRegionEmpty) + SYMFUNC(miRegionEqual) SYMFUNC(miRegionExtents) SYMFUNC(miRegionInit) SYMFUNC(miRegionNotEmpty) - SYMFUNC(miRegionEqual) SYMFUNC(miRegionReset) SYMFUNC(miRegionUninit) SYMFUNC(miRegionValidate) - SYMFUNC(miTranslateRegion) - SYMFUNC(miHandleExposures) - SYMFUNC(miPolyFillRect) - SYMFUNC(miPolyFillArc) - SYMFUNC(miImageGlyphBlt) - SYMFUNC(miPolyGlyphBlt) - SYMFUNC(miFillPolygon) - SYMFUNC(miFillConvexPoly) - SYMFUNC(miPolySegment) - SYMFUNC(miZeroLine) - SYMFUNC(miWideLine) - SYMFUNC(miWideDash) - SYMFUNC(miZeroPolyArc) - SYMFUNC(miPolyArc) - SYMFUNC(miCreateGCOps) - SYMFUNC(miDestroyGCOps) - SYMFUNC(miComputeCompositeClip) - SYMFUNC(miChangeGC) - SYMFUNC(miCopyGC) - SYMFUNC(miDestroyGC) - SYMFUNC(miChangeClip) - SYMFUNC(miDestroyClip) - SYMFUNC(miCopyClip) - SYMFUNC(miPolyRectangle) - SYMFUNC(miPolyText8) - SYMFUNC(miPolyText16) - SYMFUNC(miImageText8) - SYMFUNC(miImageText16) - SYMFUNC(miRegionCreate) - SYMFUNC(miPaintWindow) - SYMFUNC(miZeroArcSetup) - SYMFUNC(miFillArcSetup) - SYMFUNC(miFillArcSliceSetup) - SYMFUNC(miFindMaxBand) - SYMFUNC(miClipSpans) - SYMFUNC(miAllocateGCPrivateIndex) - SYMFUNC(miScreenInit) - SYMFUNC(miGetScreenPixmap) - SYMFUNC(miSetScreenPixmap) - SYMFUNC(miPointerCurrentScreen) - SYMFUNC(miRectAlloc) - SYMFUNC(miInitializeBackingStore) - SYMFUNC(miInitializeBanking) - SYMFUNC(miModifyBanking) - SYMFUNC(miCopyPlane) - SYMFUNC(miCopyArea) - SYMFUNC(miCreateScreenResources) - SYMFUNC(miGetImage) - SYMFUNC(miPutImage) - SYMFUNC(miPushPixels) - SYMFUNC(miPointerInitialize) - SYMFUNC(miPointerPosition) - SYMFUNC(miRecolorCursor) - SYMFUNC(miPointerWarpCursor) - SYMFUNC(miDCInitialize) - SYMFUNC(miRectsToRegion) - SYMFUNC(miPointInRegion) - SYMFUNC(miInverse) - SYMFUNC(miSubtract) - SYMFUNC(miUnion) - SYMFUNC(miPolyBuildEdge) - SYMFUNC(miPolyBuildPoly) - SYMFUNC(miRoundJoinClip) - SYMFUNC(miRoundCapClip) - SYMFUNC(miSetZeroLineBias) SYMFUNC(miResolveColor) - SYMFUNC(miInitializeColormap) - SYMFUNC(miInstallColormap) - SYMFUNC(miUninstallColormap) - SYMFUNC(miListInstalledColormaps) - SYMFUNC(miExpandDirectColors) - SYMFUNC(miCreateDefColormap) - SYMFUNC(miClearVisualTypes) + SYMFUNC(miRoundCapClip) + SYMFUNC(miRoundJoinClip) + SYMFUNC(miScreenInit) + SYMFUNC(miSegregateChildren) + SYMFUNC(miSetPixmapDepths) SYMFUNC(miSetVisualTypes) SYMFUNC(miSetVisualTypesAndMasks) - SYMFUNC(miGetDefaultVisualMask) - SYMFUNC(miSetPixmapDepths) - SYMFUNC(miInitVisuals) + SYMFUNC(miSetZeroLineBias) + SYMFUNC(miSubtract) + SYMFUNC(miTranslateRegion) + SYMFUNC(miUninstallColormap) + SYMFUNC(miUnion) + SYMFUNC(miWideDash) + SYMFUNC(miWideLine) SYMFUNC(miWindowExposures) - SYMFUNC(miSegregateChildren) - SYMFUNC(miHookInitVisuals) - SYMFUNC(miPointerAbsoluteCursor) - SYMFUNC(miOverlayCopyUnderlay) - SYMFUNC(miOverlaySetTransFunction) - SYMFUNC(miOverlayCollectUnderlayRegions) - SYMFUNC(miInitOverlay) - SYMFUNC(miOverlayComputeCompositeClip) - SYMFUNC(miOverlayGetPrivateClips) - SYMFUNC(miOverlaySetRootClip) + SYMFUNC(miZeroArcSetup) + SYMFUNC(miZeroClipLine) + SYMFUNC(miZeroLine) + SYMFUNC(miZeroPolyArc) SYMVAR(miEmptyBox) SYMVAR(miEmptyData) - SYMVAR(miZeroLineScreenKey) - SYMVAR(miSpritePointerFuncs) - SYMVAR(miPointerScreenKey) SYMVAR(miInstalledMaps) - SYMVAR(miInitVisualsProc) + SYMVAR(miPointerScreenKey) + SYMVAR(miSpritePointerFuncs) + SYMVAR(miZeroLineScreenKey) #ifdef DAMAGE SYMFUNC(DamageDamageRegion) #endif diff --git a/xorg-server/hw/xfree86/loader/os.c b/xorg-server/hw/xfree86/loader/os.c index 12cf3d859..ef9ac38b4 100644 --- a/xorg-server/hw/xfree86/loader/os.c +++ b/xorg-server/hw/xfree86/loader/os.c @@ -48,16 +48,10 @@ #define OSNAME "netbsd" #elif defined(__OpenBSD__) #define OSNAME "openbsd" -#elif defined(Lynx) -#define OSNAME "lynxos" #elif defined(__GNU__) #define OSNAME "hurd" #elif defined(__SCO__) #define OSNAME "sco" -#elif defined(DGUX) -#define OSNAME "dgux" -#elif defined(ISC) -#define OSNAME "isc" #elif defined(SVR4) && defined(sun) #define OSNAME "solaris" #elif defined(SVR5) diff --git a/xorg-server/hw/xfree86/loader/xf86sym.c b/xorg-server/hw/xfree86/loader/xf86sym.c index 24fc44c1b..6378948d4 100644 --- a/xorg-server/hw/xfree86/loader/xf86sym.c +++ b/xorg-server/hw/xfree86/loader/xf86sym.c @@ -64,10 +64,7 @@ #include "xf86_OSproc.h" #include "xf86Parser.h" #include "xf86Config.h" -#ifdef XINPUT -# include "xf86Xinput.h" -#endif -#include "xf86OSmouse.h" +#include "xf86Xinput.h" #ifdef XV #include "xf86xv.h" #include "xf86xvmc.h" @@ -79,7 +76,6 @@ #include "dpmsproc.h" #endif #include "vidmodeproc.h" -#include "xf86miscproc.h" #include "loader.h" #include "xisb.h" #include "vbe.h" @@ -100,6 +96,9 @@ #include "IBM.h" #include "TI.h" +#include "xf86RamDac.h" +#include "BT.h" + #ifndef HAS_GLIBC_SIGSETJMP #if defined(setjmp) && defined(__GNU_LIBRARY__) && \ (!defined(__GLIBC__) || (__GLIBC__ < 2) || \ @@ -188,7 +187,7 @@ extern long __umodsi3(long, long); #include #endif -#if defined(__powerpc__) && (defined(Lynx) || defined(linux)) +#if defined(__powerpc__) && defined(linux) void _restf14(); void _restf17(); void _restf18(); @@ -245,8 +244,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86ReadBIOS) SYMFUNC(xf86EnableIO) SYMFUNC(xf86DisableIO) - SYMFUNC(xf86DisableInterrupts) - SYMFUNC(xf86EnableInterrupts) SYMFUNC(xf86LinearVidMem) SYMFUNC(xf86CheckMTRR) SYMFUNC(xf86MapVidMem) @@ -254,7 +251,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86MapReadSideEffects) SYMFUNC(xf86MapDomainMemory) SYMFUNC(xf86UDelay) - SYMFUNC(xf86IODelay) SYMFUNC(xf86SlowBcopy) SYMFUNC(xf86SetReallySlowBcopy) #ifdef __alpha__ @@ -277,7 +273,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86SerialModemSetBits) SYMFUNC(xf86SerialModemClearBits) SYMFUNC(xf86LoadKernelModule) - SYMFUNC(xf86OSMouseInit) SYMFUNC(xf86AgpGARTSupported) SYMFUNC(xf86GetAGPInfo) SYMFUNC(xf86AcquireGART) @@ -288,33 +283,24 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86UnbindGARTMemory) SYMFUNC(xf86EnableAGP) SYMFUNC(xf86GARTCloseScreen) -#ifdef XINPUT SYMFUNC(XisbNew) SYMFUNC(XisbFree) SYMFUNC(XisbRead) SYMFUNC(XisbWrite) SYMFUNC(XisbTrace) SYMFUNC(XisbBlockDuration) -#endif /* xf86Bus.c */ SYMFUNC(xf86CheckPciSlot) SYMFUNC(xf86ClaimPciSlot) - SYMFUNC(xf86ClaimIsaSlot) SYMFUNC(xf86ClaimFbSlot) SYMFUNC(xf86ClaimNoSlot) SYMFUNC(xf86ParsePciBusString) SYMFUNC(xf86ComparePciBusString) SYMFUNC(xf86FormatPciBusNumber) - SYMFUNC(xf86ParseIsaBusString) SYMFUNC(xf86EnableAccess) SYMFUNC(xf86SetCurrentAccess) SYMFUNC(xf86IsPrimaryPci) - SYMFUNC(xf86IsPrimaryIsa) - SYMFUNC(xf86PrintResList) - SYMFUNC(xf86AddResToList) - SYMFUNC(xf86JoinResLists) - SYMFUNC(xf86DupResList) SYMFUNC(xf86FreeResList) SYMFUNC(xf86ClaimFixedResources) SYMFUNC(xf86AddEntityToScreen) @@ -324,19 +310,14 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86GetNumEntityInstances) SYMFUNC(xf86GetDevFromEntity) SYMFUNC(xf86GetPciInfoForEntity) - SYMFUNC(xf86SetEntityFuncs) - SYMFUNC(xf86DeallocateResourcesForEntity) SYMFUNC(xf86RegisterResources) SYMFUNC(xf86CheckPciMemBase) SYMFUNC(xf86SetAccessFuncs) SYMFUNC(xf86IsEntityPrimary) SYMFUNC(xf86SetOperatingState) - SYMFUNC(xf86EnterServerState) - SYMFUNC(xf86ChkConflict) SYMFUNC(xf86FindScreenForEntity) SYMFUNC(xf86RegisterStateChangeNotificationCallback) SYMFUNC(xf86DeregisterStateChangeNotificationCallback) - SYMFUNC(xf86NoSharedResources) /* Shared Accel Accessor Functions */ SYMFUNC(xf86GetLastScrnFlag) SYMFUNC(xf86SetLastScrnFlag) @@ -350,9 +331,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86AllocateEntityPrivateIndex) SYMFUNC(xf86GetEntityPrivate) - /* xf86Configure.c */ - SYMFUNC(xf86AddDeviceToConfigure) - /* xf86Cursor.c */ SYMFUNC(xf86GetPointerScreenFuncs) @@ -427,7 +405,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86PrintChipsets) SYMFUNC(xf86MatchDevice) SYMFUNC(xf86MatchPciInstances) - SYMFUNC(xf86MatchIsaInstances) SYMFUNC(xf86GetVerbosity) SYMFUNC(xf86GetVisualName) SYMFUNC(xf86GetPix24) @@ -446,11 +423,9 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86GetModInDevAllowNonLocal) SYMFUNC(xf86GetModInDevEnabled) SYMFUNC(xf86GetAllowMouseOpenFail) - SYMFUNC(xf86CommonSpecialKey) SYMFUNC(xf86IsPc98) SYMFUNC(xf86DisableRandR) SYMFUNC(xf86GetRotation) - SYMFUNC(xf86GetVersion) SYMFUNC(xf86GetModuleVersion) SYMFUNC(xf86GetClocks) SYMFUNC(xf86SetPriority) @@ -469,12 +444,9 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86FindXvOptions) SYMFUNC(xf86GetOS) SYMFUNC(xf86ConfigPciEntity) - SYMFUNC(xf86ConfigIsaEntity) SYMFUNC(xf86ConfigFbEntity) SYMFUNC(xf86ConfigActivePciEntity) - SYMFUNC(xf86ConfigActiveIsaEntity) SYMFUNC(xf86ConfigPciEntityInactive) - SYMFUNC(xf86ConfigIsaEntityInactive) SYMFUNC(xf86IsScreenPrimary) SYMFUNC(xf86RegisterRootWindowProperty) SYMFUNC(xf86IsUnblank) @@ -645,32 +617,10 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(VidModeGetGammaRampSize) #endif - /* xf86Versions.c */ - SYMFUNC(xf86GetBuiltinInterfaceVersion) - SYMFUNC(xf86RegisterBuiltinInterfaceVersion) - - /* xf86MiscExt.c */ -#ifdef XF86MISC - SYMFUNC(MiscExtGetMouseSettings) - SYMFUNC(MiscExtGetMouseValue) - SYMFUNC(MiscExtSetMouseValue) - SYMFUNC(MiscExtSetMouseDevice) - SYMFUNC(MiscExtGetKbdSettings) - SYMFUNC(MiscExtGetKbdValue) - SYMFUNC(MiscExtSetKbdValue) - SYMFUNC(MiscExtSetGrabKeysState) - SYMFUNC(MiscExtCreateStruct) - SYMFUNC(MiscExtDestroyStruct) - SYMFUNC(MiscExtApply) - SYMFUNC(MiscExtGetFilePaths) - SYMFUNC(MiscExtPassMessage) -#endif - /* Misc */ SYMFUNC(GetTimeInMillis) /* xf86Xinput.c */ -#ifdef XINPUT SYMFUNC(xf86ProcessCommonOptions) SYMFUNC(xf86PostMotionEvent) SYMFUNC(xf86PostProximityEvent) @@ -681,24 +631,16 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86ActivateDevice) SYMFUNC(xf86XInputSetScreen) SYMFUNC(xf86ScaleAxis) -#endif + SYMFUNC(NewInputDeviceRequest) + SYMFUNC(DeleteInputDeviceRequest) #ifdef DPMSExtension SYMFUNC(DPMSGet) SYMFUNC(DPMSSet) SYMFUNC(DPMSSupported) #endif -/* xf86Debug.c */ -#ifdef BUILDDEBUG - SYMFUNC(xf86Break1) - SYMFUNC(xf86Break2) - SYMFUNC(xf86Break3) - SYMFUNC(xf86SPTimestamp) - SYMFUNC(xf86STimestamp) -#endif SYMFUNC(pciTag) SYMFUNC(pciBusAddrToHostAddr) - SYMFUNC(xf86scanpci) /* Loader functions */ SYMFUNC(LoadSubModule) @@ -706,7 +648,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(LoaderErrorMsg) SYMFUNC(LoaderCheckUnresolved) SYMFUNC(LoadExtension) - SYMFUNC(LoadFont) SYMFUNC(LoaderReqSymbols) SYMFUNC(LoaderReqSymLists) SYMFUNC(LoaderRefSymbols) @@ -716,6 +657,7 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(LoaderListDirs) SYMFUNC(LoaderFreeDirList) SYMFUNC(LoaderGetOS) + SYMFUNC(LoaderShouldIgnoreABI) SYMFUNC(LoaderGetABIVersion) #ifdef XF86DRI @@ -789,7 +731,7 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(outb) SYMFUNC(outw) SYMFUNC(outl) -# if defined(NO_INLINE) || defined(Lynx) +# if defined(NO_INLINE) SYMFUNC(mem_barrier) SYMFUNC(ldl_u) SYMFUNC(eieio) @@ -804,34 +746,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(stw_u) SYMFUNC(write_mem_barrier) # endif -# if defined(Lynx) - SYMFUNC(_restf14) - SYMFUNC(_restf17) - SYMFUNC(_restf18) - SYMFUNC(_restf19) - SYMFUNC(_restf20) - SYMFUNC(_restf22) - SYMFUNC(_restf23) - SYMFUNC(_restf24) - SYMFUNC(_restf25) - SYMFUNC(_restf26) - SYMFUNC(_restf27) - SYMFUNC(_restf28) - SYMFUNC(_restf29) - SYMFUNC(_savef14) - SYMFUNC(_savef17) - SYMFUNC(_savef18) - SYMFUNC(_savef19) - SYMFUNC(_savef20) - SYMFUNC(_savef22) - SYMFUNC(_savef23) - SYMFUNC(_savef24) - SYMFUNC(_savef25) - SYMFUNC(_savef26) - SYMFUNC(_savef27) - SYMFUNC(_savef28) - SYMFUNC(_savef29) -# endif # if PPCIO_DEBUG SYMFUNC(debug_inb) SYMFUNC(debug_inw) @@ -842,39 +756,23 @@ _X_HIDDEN void *xfree86LookupTab[] = { # endif #endif #if defined(__GNUC__) -#if !defined(Lynx) SYMFUNC(__div64) -#endif -#if !defined(Lynx) /* FIXME: test on others than x86 and !3.1.0a/x86 */ SYMFUNC(__divdf3) -#endif SYMFUNC(__divdi3) -#if !defined(Lynx) SYMFUNC(__divsf3) SYMFUNC(__divsi3) -#endif SYMFUNC(__moddi3) -#if !defined(Lynx) SYMFUNC(__modsi3) -#endif -#if !defined(Lynx) SYMFUNC(__mul64) -#endif -#if !defined(Lynx) SYMFUNC(__muldf3) -#endif SYMFUNC(__muldi3) -#if !defined(Lynx) SYMFUNC(__mulsf3) SYMFUNC(__mulsi3) SYMFUNC(__udivdi3) SYMFUNC(__udivsi3) -#endif SYMFUNC(__umoddi3) -#if !defined(Lynx) SYMFUNC(__umodsi3) #endif -#endif #if defined(__ia64__) SYMFUNC(outw) SYMFUNC(outb) @@ -921,7 +819,7 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMVAR(res8514Exclusive) SYMVAR(res8514Shared) -#if defined(__powerpc__) && (!defined(NO_INLINE) || defined(Lynx)) +#if defined(__powerpc__) && !defined(NO_INLINE) SYMVAR(ioBase) #endif @@ -931,9 +829,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { /* Globals from xf86Configure.c */ SYMVAR(ConfiguredMonitor) - /* Pci.c */ - SYMVAR(pciNumBuses) - /* modes */ SYMVAR(xf86CrtcConfigPrivateIndex) SYMFUNC(xf86CrtcConfigInit) @@ -942,6 +837,7 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86CrtcDestroy) SYMFUNC(xf86CrtcInUse) SYMFUNC(xf86CrtcSetScreenSubpixelOrder) + SYMFUNC(xf86RotateFreeShadow) SYMFUNC(xf86RotateCloseScreen) SYMFUNC(xf86CrtcRotate) SYMFUNC(xf86CrtcSetMode) @@ -1004,13 +900,18 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86_hide_cursors) SYMFUNC(xf86_cursors_fini) SYMFUNC(xf86_crtc_clip_video_helper) + SYMFUNC(xf86_wrap_crtc_notify) + SYMFUNC(xf86_unwrap_crtc_notify) + SYMFUNC(xf86_crtc_notify) SYMFUNC(xf86DoEDID_DDC1) SYMFUNC(xf86DoEDID_DDC2) SYMFUNC(xf86InterpretEDID) SYMFUNC(xf86PrintEDID) + SYMFUNC(xf86DoEEDID) SYMFUNC(xf86DDCMonitorSet) SYMFUNC(xf86SetDDCproperties) + SYMFUNC(xf86MonitorIsHDMI) SYMFUNC(xf86CreateI2CBusRec) SYMFUNC(xf86CreateI2CDevRec) diff --git a/xorg-server/hw/xfree86/modes/Makefile.in b/xorg-server/hw/xfree86/modes/Makefile.in index ff0a94f9f..0af44e357 100644 --- a/xorg-server/hw/xfree86/modes/Makefile.in +++ b/xorg-server/hw/xfree86/modes/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,7 +45,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -65,9 +64,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -91,8 +87,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -113,10 +110,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -138,6 +131,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -147,18 +141,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -177,7 +168,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -191,7 +182,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -203,8 +197,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -213,8 +206,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -247,7 +240,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -257,27 +249,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -288,10 +265,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -300,13 +273,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -339,8 +307,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -360,7 +327,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -370,12 +336,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -393,8 +359,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ noinst_LIBRARIES = libxf86modes.a libxf86modes_a_SOURCES = \ xf86Crtc.c \ @@ -432,8 +396,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -530,7 +494,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c index 1facf86e9..84d3cac3e 100644 --- a/xorg-server/hw/xfree86/modes/xf86Crtc.c +++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c @@ -96,6 +96,7 @@ xf86CrtcCreate (ScrnInfoPtr scrn, crtc = xcalloc (sizeof (xf86CrtcRec), 1); if (!crtc) return NULL; + crtc->version = XF86_CRTC_VERSION; crtc->scrn = scrn; crtc->funcs = funcs; #ifdef RANDR_12_INTERFACE @@ -103,6 +104,19 @@ xf86CrtcCreate (ScrnInfoPtr scrn, #endif crtc->rotation = RR_Rotate_0; crtc->desiredRotation = RR_Rotate_0; + pixman_transform_init_identity (&crtc->crtc_to_framebuffer); + pixman_f_transform_init_identity (&crtc->f_crtc_to_framebuffer); + pixman_f_transform_init_identity (&crtc->f_framebuffer_to_crtc); + crtc->filter = NULL; + crtc->params = NULL; + crtc->nparams = 0; + crtc->filter_width = 0; + crtc->filter_height = 0; + crtc->transform_in_use = FALSE; + crtc->transformPresent = FALSE; + crtc->desiredTransformPresent = FALSE; + memset (&crtc->bounds, '\0', sizeof (crtc->bounds)); + if (xf86_config->crtc) crtcs = xrealloc (xf86_config->crtc, (xf86_config->num_crtc + 1) * sizeof (xf86CrtcPtr)); @@ -134,6 +148,8 @@ xf86CrtcDestroy (xf86CrtcPtr crtc) xf86_config->num_crtc--; break; } + if (crtc->params) + xfree (crtc->params); xfree (crtc); } @@ -224,8 +240,8 @@ xf86CrtcSetScreenSubpixelOrder (ScreenPtr pScreen) * Sets the given video mode on the given crtc */ _X_EXPORT Bool -xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, - int x, int y) +xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, + RRTransformPtr transform, int x, int y) { ScrnInfoPtr scrn = crtc->scrn; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); @@ -236,12 +252,14 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, DisplayModeRec saved_mode; int saved_x, saved_y; Rotation saved_rotation; + RRTransformRec saved_transform; + Bool saved_transform_present; if (crtc->funcs->set_mode_major) return crtc->funcs->set_mode_major(crtc, mode, rotation, x, y); - + crtc->enabled = xf86CrtcInUse (crtc); - + if (!crtc->enabled) { /* XXX disable crtc? */ @@ -256,6 +274,12 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, saved_x = crtc->x; saved_y = crtc->y; saved_rotation = crtc->rotation; + if (crtc->transformPresent) { + RRTransformInit (&saved_transform); + RRTransformCopy (&saved_transform, &crtc->transform); + } + saved_transform_present = crtc->transformPresent; + /* Update crtc values up front so the driver can rely on them for mode * setting. */ @@ -263,33 +287,25 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, crtc->x = x; crtc->y = y; crtc->rotation = rotation; + if (transform) { + RRTransformCopy (&crtc->transform, transform); + crtc->transformPresent = TRUE; + } else + crtc->transformPresent = FALSE; - /* Shift offsets that move us out of virtual size */ - if (x + mode->HDisplay > xf86_config->maxWidth || - y + mode->VDisplay > xf86_config->maxHeight) + if (crtc->funcs->set_origin && + memcmp (mode, &saved_mode, sizeof(saved_mode)) == 0 && + saved_rotation == rotation && + saved_transform_present == crtc->transformPresent && + (!crtc->transformPresent || RRTransformEqual(&saved_transform, &crtc->transform))) { - if (x + mode->HDisplay > xf86_config->maxWidth) - crtc->x = xf86_config->maxWidth - mode->HDisplay; - if (y + mode->VDisplay > xf86_config->maxHeight) - crtc->y = xf86_config->maxHeight - mode->VDisplay; - if (crtc->x < 0 || crtc->y < 0) - { - xf86DrvMsg (scrn->scrnIndex, X_ERROR, - "Mode %dx%d does not fit virtual size %dx%d - " - "internal error\n", mode->HDisplay, mode->VDisplay, - xf86_config->maxWidth, xf86_config->maxHeight); - goto done; - } - xf86DrvMsg (scrn->scrnIndex, X_ERROR, - "Mode %dx%d+%d+%d does not fit virtual size %dx%d - " - "offset updated to +%d+%d\n", - mode->HDisplay, mode->VDisplay, x, y, - xf86_config->maxWidth, xf86_config->maxHeight, - crtc->x, crtc->y); + if (!xf86CrtcRotate (crtc)) + goto done; + crtc->funcs->set_origin (crtc, crtc->x, crtc->y); + ret = TRUE; + goto done; } - /* XXX short-circuit changes to base location only */ - /* Pass our mode to the outputs and the CRTC to give them a chance to * adjust it according to limitations or output properties, and also * a chance to reject the mode entirely. @@ -309,9 +325,8 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, goto done; } - if (!xf86CrtcRotate (crtc, mode, rotation)) { + if (!xf86CrtcRotate (crtc)) goto done; - } /* Prepare the outputs and CRTCs before setting the mode. */ for (i = 0; i < xf86_config->num_output; i++) { @@ -343,13 +358,7 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, { xf86OutputPtr output = xf86_config->output[i]; if (output->crtc == crtc) - { output->funcs->commit(output); -#ifdef RANDR_12_INTERFACE - if (output->randr_output) - RRPostPendingProperties (output->randr_output); -#endif - } } /* XXX free adjustedmode */ @@ -363,6 +372,9 @@ done: crtc->y = saved_y; crtc->rotation = saved_rotation; crtc->mode = saved_mode; + if (saved_transform_present) + RRTransformCopy (&crtc->transform, &saved_transform); + crtc->transformPresent = saved_transform_present; } if (didLock) @@ -371,6 +383,34 @@ done: return ret; } +/** + * Sets the given video mode on the given crtc, but without providing + * a transform + */ +_X_EXPORT Bool +xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, + int x, int y) +{ + return xf86CrtcSetModeTransform (crtc, mode, rotation, NULL, x, y); +} + +/** + * Pans the screen, does not change the mode + */ +_X_EXPORT void +xf86CrtcSetOrigin (xf86CrtcPtr crtc, int x, int y) +{ + crtc->x = x; + crtc->y = y; + if (crtc->funcs->set_origin) { + if (!xf86CrtcRotate (crtc)) + return; + crtc->funcs->set_origin (crtc, x, y); + } + else + xf86CrtcSetMode (crtc, &crtc->mode, crtc->rotation, x, y); +} + /* * Output functions */ @@ -390,6 +430,7 @@ typedef enum { OPTION_MAX_CLOCK, OPTION_IGNORE, OPTION_ROTATE, + OPTION_PANNING, } OutputOpts; static OptionInfoRec xf86OutputOptions[] = { @@ -405,6 +446,7 @@ static OptionInfoRec xf86OutputOptions[] = { {OPTION_MAX_CLOCK, "MaxClock", OPTV_FREQ, {0}, FALSE }, {OPTION_IGNORE, "Ignore", OPTV_BOOLEAN, {0}, FALSE }, {OPTION_ROTATE, "Rotate", OPTV_STRING, {0}, FALSE }, + {OPTION_PANNING, "Panning", OPTV_STRING, {0}, FALSE }, {-1, NULL, OPTV_NONE, {0}, FALSE }, }; @@ -694,7 +736,12 @@ xf86CrtcCloseScreen (int index, ScreenPtr screen) /* * Called at ScreenInit time to set up */ -_X_EXPORT Bool +_X_EXPORT +#ifdef RANDR_13_INTERFACE +int +#else +Bool +#endif xf86CrtcScreenInit (ScreenPtr screen) { ScrnInfoPtr scrn = xf86Screens[screen->myNum]; @@ -714,11 +761,17 @@ xf86CrtcScreenInit (ScreenPtr screen) break; } if (c == config->num_crtc) + { xf86RandR12SetRotations (screen, RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270 | RR_Reflect_X | RR_Reflect_Y); + xf86RandR12SetTransformSupport (screen, TRUE); + } else + { xf86RandR12SetRotations (screen, RR_Rotate_0); + xf86RandR12SetTransformSupport (screen, FALSE); + } /* Wrap CreateScreenResources so we can initialize the RandR code */ config->CreateScreenResources = screen->CreateScreenResources; @@ -727,7 +780,11 @@ xf86CrtcScreenInit (ScreenPtr screen) config->CloseScreen = screen->CloseScreen; screen->CloseScreen = xf86CrtcCloseScreen; +#ifdef RANDR_13_INTERFACE + return RANDR_INTERFACE_VERSION; +#else return TRUE; +#endif } static DisplayModePtr @@ -905,7 +962,7 @@ xf86PickCrtcs (ScrnInfoPtr scrn, * see if they can be cloned */ if (xf86ModesEqual (modes[o], modes[n]) && - config->output[0]->initial_rotation == config->output[n]->initial_rotation && + config->output[o]->initial_rotation == config->output[n]->initial_rotation && config->output[o]->initial_x == config->output[n]->initial_x && config->output[o]->initial_y == config->output[n]->initial_y) { @@ -1176,10 +1233,12 @@ xf86InitialOutputPositions (ScrnInfoPtr scrn, DisplayModePtr *modes) output->initial_x += xf86ModeWidth (modes[or], relative->initial_rotation); break; case OPTION_ABOVE: - output->initial_y -= xf86ModeHeight (modes[o], relative->initial_rotation); + if (modes[o]) + output->initial_y -= xf86ModeHeight (modes[o], output->initial_rotation); break; case OPTION_LEFT_OF: - output->initial_x -= xf86ModeWidth (modes[o], relative->initial_rotation); + if (modes[o]) + output->initial_x -= xf86ModeWidth (modes[o], output->initial_rotation); break; default: break; @@ -1237,6 +1296,59 @@ xf86InitialOutputPositions (ScrnInfoPtr scrn, DisplayModePtr *modes) return TRUE; } +static void +xf86InitialPanning (ScrnInfoPtr scrn) +{ + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); + int o; + + for (o = 0; o < config->num_output; o++) + { + xf86OutputPtr output = config->output[o]; + char *panning = xf86GetOptValString (output->options, OPTION_PANNING); + int width, height, left, top; + int track_width, track_height, track_left, track_top; + int brdr[4]; + + memset (&output->initialTotalArea, 0, sizeof(BoxRec)); + memset (&output->initialTrackingArea, 0, sizeof(BoxRec)); + memset (output->initialBorder, 0, 4*sizeof(INT16)); + + if (! panning) + continue; + + switch (sscanf (panning, "%dx%d+%d+%d/%dx%d+%d+%d/%d/%d/%d/%d", + &width, &height, &left, &top, + &track_width, &track_height, &track_left, &track_top, + &brdr[0], &brdr[1], &brdr[2], &brdr[3])) { + case 12: + output->initialBorder[0] = brdr[0]; + output->initialBorder[1] = brdr[1]; + output->initialBorder[2] = brdr[2]; + output->initialBorder[3] = brdr[3]; + /* fall through */ + case 8: + output->initialTrackingArea.x1 = track_left; + output->initialTrackingArea.y1 = track_top; + output->initialTrackingArea.x2 = track_left + track_width; + output->initialTrackingArea.y2 = track_top + track_height; + /* fall through */ + case 4: + output->initialTotalArea.x1 = left; + output->initialTotalArea.y1 = top; + /* fall through */ + case 2: + output->initialTotalArea.x2 = output->initialTotalArea.x1 + width; + output->initialTotalArea.y2 = output->initialTotalArea.y1 + height; + break; + default: + xf86DrvMsg (scrn->scrnIndex, X_ERROR, + "Broken panning specification '%s' for output %s in config file\n", + panning, output->name); + } + } +} + /* * XXX walk the monitor mode list and prune out duplicates that * are inserted by xf86DDCMonitorSet. In an ideal world, that @@ -1407,7 +1519,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) { xf86OutputPtr output = config->output[o]; DisplayModePtr mode; - DisplayModePtr config_modes = NULL, output_modes, default_modes; + DisplayModePtr config_modes = NULL, output_modes, default_modes = NULL; char *preferred_mode; xf86MonPtr edid_monitor; XF86ConfMonitorPtr conf_monitor; @@ -1415,6 +1527,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) int min_clock = 0; int max_clock = 0; double clock; + Bool add_default_modes = TRUE; enum { sync_config, sync_edid, sync_default } sync_source = sync_default; while (output->probed_modes != NULL) @@ -1465,6 +1578,11 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) int i; Bool set_hsync = mon_rec.nHsync == 0; Bool set_vrefresh = mon_rec.nVrefresh == 0; + struct disp_features *features = &edid_monitor->features; + + /* if display is not continuous-frequency, don't add default modes */ + if (!GTF_SUPPORTED(features->msc)) + add_default_modes = FALSE; for (i = 0; i < sizeof (edid_monitor->det_mon) / sizeof (edid_monitor->det_mon[0]); i++) { @@ -1521,8 +1639,10 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) mon_rec.vrefresh[0].hi = 62.0; mon_rec.nVrefresh = 1; } - default_modes = xf86GetDefaultModes (output->interlaceAllowed, - output->doubleScanAllowed); + + if (add_default_modes) + default_modes = xf86GetDefaultModes (output->interlaceAllowed, + output->doubleScanAllowed); /* * If this is not an RB monitor, remove RB modes from the default @@ -1808,6 +1928,66 @@ nextEnabledOutput(xf86CrtcConfigPtr config, Bool *enabled, int *index) return FALSE; } +static Bool +aspectMatch(float a, float b) +{ + return fabs(1 - (a / b)) < 0.05; +} + +static DisplayModePtr +nextAspectMode(xf86OutputPtr o, DisplayModePtr last, float aspect) +{ + DisplayModePtr m = NULL; + + if (!o) + return NULL; + + if (!last) + m = o->probed_modes; + else + m = last->next; + + for (; m; m = m->next) + if (aspectMatch(aspect, (float)m->HDisplay / (float)m->VDisplay)) + return m; + + return NULL; +} + +static DisplayModePtr +bestModeForAspect(xf86CrtcConfigPtr config, Bool *enabled, float aspect) +{ + int o = -1, p; + DisplayModePtr mode = NULL, test = NULL, match = NULL; + + if (!nextEnabledOutput(config, enabled, &o)) + return NULL; + while ((mode = nextAspectMode(config->output[o], mode, aspect))) { + test = mode; + for (p = o; nextEnabledOutput(config, enabled, &p); ) { + test = xf86OutputFindClosestMode(config->output[p], mode); + if (!test) + break; + if (test->HDisplay != mode->HDisplay || + test->VDisplay != mode->VDisplay) { + test = NULL; + break; + } + } + + /* if we didn't match it on all outputs, try the next one */ + if (!test) + continue; + + /* if it's bigger than the last one, save it */ + if (!match || (test->HDisplay > match->HDisplay)) + match = test; + } + + /* return the biggest one found */ + return match; +} + static Bool xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, DisplayModePtr *modes, Bool *enabled, @@ -1860,75 +2040,43 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, } } - if (ret) { - /* oh good, there is a match. stash the selected modes and return. */ - memcpy(modes, preferred_match, - config->num_output * sizeof(DisplayModePtr)); - } - - xfree(preferred); - xfree(preferred_match); - return ret; -} - -static Bool -aspectMatch(float a, float b) -{ - return fabs(1 - (a / b)) < 0.05; -} - -static DisplayModePtr -nextAspectMode(xf86OutputPtr o, DisplayModePtr last, float aspect) -{ - DisplayModePtr m = NULL; - - if (!o) - return NULL; + /* + * If there's no preferred mode, but only one monitor, pick the + * biggest mode for its aspect ratio, assuming one exists. + */ + if (!ret) do { + int i = 0; + float aspect = 0.0; - if (!last) - m = o->probed_modes; - else - m = last->next; + /* count the number of enabled outputs */ + for (i = 0, p = -1; nextEnabledOutput(config, enabled, &p); i++) ; - for (; m; m = m->next) - if (aspectMatch(aspect, (float)m->HDisplay / (float)m->VDisplay)) - return m; + if (i != 1) + break; - return NULL; -} + p = -1; + nextEnabledOutput(config, enabled, &p); + if (config->output[p]->mm_height) + aspect = (float)config->output[p]->mm_width / + (float)config->output[p]->mm_height; -static DisplayModePtr -bestModeForAspect(xf86CrtcConfigPtr config, Bool *enabled, float aspect) -{ - int o = -1, p; - DisplayModePtr mode = NULL, test = NULL, match = NULL; + if (aspect) + preferred_match[p] = bestModeForAspect(config, enabled, aspect); - if (!nextEnabledOutput(config, enabled, &o)) - return NULL; - while ((mode = nextAspectMode(config->output[o], mode, aspect))) { - test = mode; - for (p = o; nextEnabledOutput(config, enabled, &p); ) { - test = xf86OutputFindClosestMode(config->output[p], mode); - if (!test) - break; - if (test->HDisplay != mode->HDisplay || - test->VDisplay != mode->VDisplay) { - test = NULL; - break; - } - } + if (preferred_match[p]) + ret = TRUE; - /* if we didn't match it on all outputs, try the next one */ - if (!test) - continue; + } while (0); - /* if it's bigger than the last one, save it */ - if (!match || (test->HDisplay > match->HDisplay)) - match = test; + if (ret) { + /* oh good, there is a match. stash the selected modes and return. */ + memcpy(modes, preferred_match, + config->num_output * sizeof(DisplayModePtr)); } - /* return the biggest one found */ - return match; + xfree(preferred); + xfree(preferred_match); + return ret; } static Bool @@ -2127,6 +2275,11 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) xfree (modes); return FALSE; } + + /* + * Set initial panning of each output + */ + xf86InitialPanning (scrn); /* * Assign CRTCs to fit output configuration @@ -2166,9 +2319,13 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) crtc->desiredRotation = output->initial_rotation; crtc->desiredX = output->initial_x; crtc->desiredY = output->initial_y; + crtc->desiredTransformPresent = FALSE; crtc->enabled = TRUE; crtc->x = output->initial_x; crtc->y = output->initial_y; + memcpy (&crtc->panningTotalArea, &output->initialTotalArea, sizeof(BoxRec)); + memcpy (&crtc->panningTrackingArea, &output->initialTrackingArea, sizeof(BoxRec)); + memcpy (crtc->panningBorder, output->initialBorder, 4*sizeof(INT16)); output->crtc = crtc; } else { output->crtc = NULL; @@ -2216,6 +2373,68 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) return TRUE; } +/* + * Check the CRTC we're going to map each output to vs. it's current + * CRTC. If they don't match, we have to disable the output and the CRTC + * since the driver will have to re-route things. + */ +static void +xf86PrepareOutputs (ScrnInfoPtr scrn) +{ + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); + int o; + + for (o = 0; o < config->num_output; o++) { + xf86OutputPtr output = config->output[o]; +#if RANDR_GET_CRTC_INTERFACE + /* Disable outputs that are unused or will be re-routed */ + if (!output->funcs->get_crtc || + output->crtc != (*output->funcs->get_crtc)(output) || + output->crtc == NULL) +#endif + (*output->funcs->dpms)(output, DPMSModeOff); + } +} + +static void +xf86PrepareCrtcs (ScrnInfoPtr scrn) +{ + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); + int c; + + for (c = 0; c < config->num_crtc; c++) { +#if RANDR_GET_CRTC_INTERFACE + xf86CrtcPtr crtc = config->crtc[c]; + xf86OutputPtr output = NULL; + uint32_t desired_outputs = 0, current_outputs = 0; + int o; + + for (o = 0; o < config->num_output; o++) { + output = config->output[o]; + if (output->crtc == crtc) + desired_outputs |= (1<funcs->get_crtc) { + desired_outputs = 0; + break; + } + if ((*output->funcs->get_crtc)(output) == crtc) + current_outputs |= (1<funcs->dpms)(crtc, DPMSModeOff); +#else + (*crtc->funcs->dpms)(crtc, DPMSModeOff); +#endif + } +} + /* * Using the desired mode information in each crtc, set * modes (used in EnterVT functions, or at server startup) @@ -2225,31 +2444,22 @@ _X_EXPORT Bool xf86SetDesiredModes (ScrnInfoPtr scrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); - int c, o; + xf86CrtcPtr crtc = config->crtc[0]; + int c; - /* - * Turn off everything so mode setting is done - * with hardware in a consistent state - */ - for (o = 0; o < config->num_output; o++) - { - xf86OutputPtr output = config->output[o]; - (*output->funcs->dpms)(output, DPMSModeOff); + /* A driver with this hook will take care of this */ + if (!crtc->funcs->set_mode_major) { + xf86PrepareOutputs(scrn); + xf86PrepareCrtcs(scrn); } - for (c = 0; c < config->num_crtc; c++) - { - xf86CrtcPtr crtc = config->crtc[c]; - - crtc->funcs->dpms(crtc, DPMSModeOff); - memset(&crtc->mode, 0, sizeof(crtc->mode)); - } - for (c = 0; c < config->num_crtc; c++) { - xf86CrtcPtr crtc = config->crtc[c]; xf86OutputPtr output = NULL; int o; + RRTransformPtr transform; + + crtc = config->crtc[c]; /* Skip disabled CRTCs */ if (!crtc->enabled) @@ -2280,12 +2490,17 @@ xf86SetDesiredModes (ScrnInfoPtr scrn) return FALSE; crtc->desiredMode = *mode; crtc->desiredRotation = RR_Rotate_0; + crtc->desiredTransformPresent = FALSE; crtc->desiredX = 0; crtc->desiredY = 0; } - if (!xf86CrtcSetMode (crtc, &crtc->desiredMode, crtc->desiredRotation, - crtc->desiredX, crtc->desiredY)) + if (crtc->desiredTransformPresent) + transform = &crtc->desiredTransform; + else + transform = NULL; + if (!xf86CrtcSetModeTransform (crtc, &crtc->desiredMode, crtc->desiredRotation, + transform, crtc->desiredX, crtc->desiredY)) return FALSE; } @@ -2414,18 +2629,19 @@ xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation) crtc->enabled = FALSE; continue; } - if (!xf86CrtcSetMode (crtc, crtc_mode, rotation, 0, 0)) + if (!xf86CrtcSetModeTransform (crtc, crtc_mode, rotation, NULL, 0, 0)) ok = FALSE; else { crtc->desiredMode = *crtc_mode; crtc->desiredRotation = rotation; + crtc->desiredTransformPresent = FALSE; crtc->desiredX = 0; crtc->desiredY = 0; } } xf86DisableUnusedFunctions(pScrn); -#if RANDR_12_INTERFACE +#ifdef RANDR_12_INTERFACE xf86RandR12TellChanged (pScrn->pScreen); #endif return ok; @@ -2513,8 +2729,11 @@ xf86DisableUnusedFunctions(ScrnInfoPtr pScrn) { crtc->funcs->dpms(crtc, DPMSModeOff); memset(&crtc->mode, 0, sizeof(crtc->mode)); + xf86RotateDestroy(crtc); } } + if (pScrn->pScreen) + xf86_crtc_notify(pScrn->pScreen); } #ifdef RANDR_12_INTERFACE @@ -2576,9 +2795,11 @@ xf86OutputSetEDID (xf86OutputPtr output, xf86MonPtr edid_mon) size = 0; if (edid_mon) { - if (edid_mon->ver.version == 1) + if (edid_mon->ver.version == 1) { size = 128; - else if (edid_mon->ver.version == 2) + if (edid_mon->flags & EDID_COMPLETE_RAWDATA) + size += edid_mon->no_sections * 128; + } else if (edid_mon->ver.version == 2) size = 256; } xf86OutputSetEDIDProperty (output, edid_mon ? edid_mon->rawData : NULL, size); @@ -2623,15 +2844,16 @@ xf86OutputGetEDIDModes (xf86OutputPtr output) return xf86DDCGetModes(scrn->scrnIndex, edid_mon); } +/* maybe we should care about DDC1? meh. */ _X_EXPORT xf86MonPtr xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus) { ScrnInfoPtr scrn = output->scrn; xf86MonPtr mon; - mon = xf86DoEDID_DDC2 (scrn->scrnIndex, pDDCBus); + mon = xf86DoEEDID(scrn->scrnIndex, pDDCBus, TRUE); if (mon) - xf86DDCApplyQuirks (scrn->scrnIndex, mon); + xf86DDCApplyQuirks(scrn->scrnIndex, mon); return mon; } @@ -2766,3 +2988,41 @@ xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn, return ret; } + +xf86_crtc_notify_proc_ptr +xf86_wrap_crtc_notify (ScreenPtr screen, xf86_crtc_notify_proc_ptr new) +{ + if (xf86CrtcConfigPrivateIndex != -1) + { + ScrnInfoPtr scrn = xf86Screens[screen->myNum]; + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); + xf86_crtc_notify_proc_ptr old; + + old = config->xf86_crtc_notify; + config->xf86_crtc_notify = new; + return old; + } + return NULL; +} + +void +xf86_unwrap_crtc_notify(ScreenPtr screen, xf86_crtc_notify_proc_ptr old) +{ + if (xf86CrtcConfigPrivateIndex != -1) + { + ScrnInfoPtr scrn = xf86Screens[screen->myNum]; + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); + + config->xf86_crtc_notify = old; + } +} + +void +xf86_crtc_notify(ScreenPtr screen) +{ + ScrnInfoPtr scrn = xf86Screens[screen->myNum]; + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); + + if (config->xf86_crtc_notify) + config->xf86_crtc_notify(screen); +} diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.h b/xorg-server/hw/xfree86/modes/xf86Crtc.h index cc045b229..0a596bc49 100644 --- a/xorg-server/hw/xfree86/modes/xf86Crtc.h +++ b/xorg-server/hw/xfree86/modes/xf86Crtc.h @@ -213,9 +213,23 @@ typedef struct _xf86CrtcFuncs { Bool (*set_mode_major)(xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, int x, int y); + + /** + * Callback for panning. Doesn't change the mode. + */ + void + (*set_origin)(xf86CrtcPtr crtc, int x, int y); + } xf86CrtcFuncsRec, *xf86CrtcFuncsPtr; +#define XF86_CRTC_VERSION 2 + struct _xf86Crtc { + /** + * ABI versioning + */ + int version; + /** * Associated ScrnInfo */ @@ -298,12 +312,35 @@ struct _xf86Crtc { * Current transformation matrix */ PictTransform crtc_to_framebuffer; - PictTransform framebuffer_to_crtc; + struct pict_f_transform f_crtc_to_framebuffer; + struct pict_f_transform f_framebuffer_to_crtc; + PictFilterPtr filter; + xFixed *params; + int nparams; + int filter_width; + int filter_height; Bool transform_in_use; + RRTransformRec transform; + Bool transformPresent; + RRTransformRec desiredTransform; + Bool desiredTransformPresent; /** * Bounding box in screen space */ BoxRec bounds; + /** + * Panning: + * TotalArea: total panning area, larger than CRTC's size + * TrackingArea: Area of the pointer for which the CRTC is panned + * border: Borders of the displayed CRTC area which induces panning if the pointer reaches them + */ + BoxRec panningTotalArea; + BoxRec panningTrackingArea; + INT16 panningBorder[4]; + /** + * Clear the shadow + */ + Bool shadowClear; }; typedef struct _xf86OutputFuncs { @@ -409,6 +446,21 @@ typedef struct _xf86OutputFuncs { (*set_property)(xf86OutputPtr output, Atom property, RRPropertyValuePtr value); +#endif +#ifdef RANDR_13_INTERFACE + /** + * Callback to get an updated property value + */ + Bool + (*get_property)(xf86OutputPtr output, + Atom property); +#endif +#ifdef RANDR_GET_CRTC_INTERFACE + /** + * Callback to get current CRTC for a given output + */ + xf86CrtcPtr + (*get_crtc)(xf86OutputPtr output); #endif /** * Clean up driver-specific bits of the output @@ -417,7 +469,15 @@ typedef struct _xf86OutputFuncs { (*destroy) (xf86OutputPtr output); } xf86OutputFuncsRec, *xf86OutputFuncsPtr; + +#define XF86_OUTPUT_VERSION 2 + struct _xf86Output { + /** + * ABI versioning + */ + int version; + /** * Associated ScrnInfo */ @@ -518,6 +578,10 @@ struct _xf86Output { #else void *randr_output; #endif + /** Desired initial panning */ + BoxRec initialTotalArea; + BoxRec initialTrackingArea; + INT16 initialBorder[4]; }; typedef struct _xf86CrtcConfigFuncs { @@ -539,6 +603,8 @@ typedef struct _xf86CrtcConfigFuncs { int height); } xf86CrtcConfigFuncsRec, *xf86CrtcConfigFuncsPtr; +typedef void (*xf86_crtc_notify_proc_ptr) (ScreenPtr pScreen); + typedef struct _xf86CrtcConfig { int num_output; xf86OutputPtr *output; @@ -591,6 +657,9 @@ typedef struct _xf86CrtcConfig { /* wrap screen BlockHandler for rotation */ ScreenBlockHandlerProcPtr BlockHandler; + /* callback when crtc configuration changes */ + xf86_crtc_notify_proc_ptr xf86_crtc_notify; + } xf86CrtcConfigRec, *xf86CrtcConfigPtr; extern int xf86CrtcConfigPrivateIndex; @@ -624,15 +693,36 @@ xf86CrtcDestroy (xf86CrtcPtr crtc); /** * Sets the given video mode on the given crtc */ + +Bool +xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, + RRTransformPtr transform, int x, int y); + Bool xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, int x, int y); +void +xf86CrtcSetOrigin (xf86CrtcPtr crtc, int x, int y); + /* * Assign crtc rotation during mode set */ Bool -xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation); +xf86CrtcRotate (xf86CrtcPtr crtc); + +/* + * Clean up any rotation data, used when a crtc is turned off + * as well as when rotation is disabled. + */ +void +xf86RotateDestroy (xf86CrtcPtr crtc); + +/* + * free shadow memory allocated for all crtcs + */ +void +xf86RotateFreeShadow(ScrnInfoPtr pScrn); /* * Clean up rotation during CloseScreen @@ -669,7 +759,11 @@ xf86ProbeOutputModes (ScrnInfoPtr pScrn, int maxX, int maxY); void xf86SetScrnInfoModes (ScrnInfoPtr pScrn); +#ifdef RANDR_13_INTERFACE +int +#else Bool +#endif xf86CrtcScreenInit (ScreenPtr pScreen); Bool @@ -798,4 +892,28 @@ xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn, INT32 width, INT32 height); +xf86_crtc_notify_proc_ptr +xf86_wrap_crtc_notify (ScreenPtr pScreen, xf86_crtc_notify_proc_ptr new); + +void +xf86_unwrap_crtc_notify(ScreenPtr pScreen, xf86_crtc_notify_proc_ptr old); + +void +xf86_crtc_notify(ScreenPtr pScreen); + +/** + * Panning + */ +Bool +xf86_crtc_get_panning(ScrnInfoPtr pScrn, + BoxPtr totalArea, + BoxPtr TrackingArea, + INT16 *border); + +Bool +xf86_crtc_set_panning(ScrnInfoPtr pScrn, + BoxPtr totalArea, + BoxPtr TrackingArea, + INT16 *border); + #endif /* _XF86CRTC_H_ */ diff --git a/xorg-server/hw/xfree86/modes/xf86Cursors.c b/xorg-server/hw/xfree86/modes/xf86Cursors.c index fee02df38..3106f051b 100644 --- a/xorg-server/hw/xfree86/modes/xf86Cursors.c +++ b/xorg-server/hw/xfree86/modes/xf86Cursors.c @@ -37,6 +37,7 @@ #include "xf86Crtc.h" #include "xf86Modes.h" #include "xf86RandR12.h" +#include "xf86CursorPriv.h" #include "X11/extensions/render.h" #define DPMS_SERVER #include "X11/extensions/dpms.h" @@ -45,6 +46,7 @@ #include "picturestr.h" #endif #include "cursorstr.h" +#include "inputstr.h" /* * Given a screen coordinate, rotate back to a cursor source coordinate @@ -227,8 +229,13 @@ xf86_set_cursor_colors (ScrnInfoPtr scrn, int bg, int fg) xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); CursorPtr cursor = xf86_config->cursor; int c; - CARD8 *bits = cursor ? dixLookupPrivate(&cursor->devPrivates, - screen) : NULL; + CARD8 *bits = cursor ? +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) + dixLookupPrivate(&cursor->devPrivates, CursorScreenKey(screen)) +#else + cursor->devPriv[screen->myNum] +#endif + : NULL; /* Save ARGB versions of these colors */ xf86_config->cursor_fg = (CARD32) fg | 0xff000000; @@ -315,25 +322,31 @@ xf86_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y) */ if (crtc->transform_in_use) { - PictVector v; - v.vector[0] = IntToxFixed (x); v.vector[1] = IntToxFixed (y); v.vector[2] = IntToxFixed(1); - PictureTransformPoint (&crtc->framebuffer_to_crtc, &v); - x = xFixedToInt (v.vector[0]); y = xFixedToInt (v.vector[1]); - } + ScreenPtr screen = scrn->pScreen; + xf86CursorScreenPtr ScreenPriv = + (xf86CursorScreenPtr)dixLookupPrivate(&screen->devPrivates, + xf86CursorScreenKey); + struct pict_f_vector v; + + v.v[0] = x + ScreenPriv->HotX; v.v[1] = y + ScreenPriv->HotY; v.v[2] = 1; + pixman_f_transform_point (&crtc->f_framebuffer_to_crtc, &v); + x = floor (v.v[0] + 0.5); + y = floor (v.v[1] + 0.5); + /* + * Transform position of cursor upper left corner + */ + xf86_crtc_rotate_coord_back (crtc->rotation, + cursor_info->MaxWidth, + cursor_info->MaxHeight, + ScreenPriv->HotX, ScreenPriv->HotY, &dx, &dy); + x -= dx; + y -= dy; + } else { x -= crtc->x; y -= crtc->y; } - /* - * Transform position of cursor upper left corner - */ - xf86_crtc_rotate_coord_back (crtc->rotation, - cursor_info->MaxWidth, - cursor_info->MaxHeight, - 0, 0, &dx, &dy); - x -= dx; - y -= dy; /* * Disable the cursor when it is outside the viewport @@ -589,10 +602,19 @@ xf86_reload_cursors (ScreenPtr screen) xf86CursorInfoPtr cursor_info; CursorPtr cursor; int x, y; + xf86CursorScreenPtr cursor_screen_priv; - /* initial mode setting will not have set a screen yet */ - if (!screen) + /* initial mode setting will not have set a screen yet. + May be called before the devices are initialised. + */ + if (!screen || !inputInfo.pointer) + return; + cursor_screen_priv = dixLookupPrivate(&screen->devPrivates, + xf86CursorScreenKey); + /* return if HW cursor is inactive, to avoid displaying two cursors */ + if (!cursor_screen_priv->isUp) return; + scrn = xf86Screens[screen->myNum]; xf86_config = XF86_CRTC_CONFIG_PTR(scrn); @@ -600,16 +622,16 @@ xf86_reload_cursors (ScreenPtr screen) cursor_info = xf86_config->cursor_info; if (!cursor_info) return; - + cursor = xf86_config->cursor; - GetSpritePosition (&x, &y); + GetSpritePosition (inputInfo.pointer, &x, &y); if (!(cursor_info->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN)) (*cursor_info->HideCursor)(scrn); if (cursor) { #if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) - void *src = dixLookupPrivate(&cursor->devPrivates, screen); + void *src = dixLookupPrivate(&cursor->devPrivates, CursorScreenKey(screen)); #else void *src = cursor->devPriv[screen->myNum]; #endif @@ -621,7 +643,6 @@ xf86_reload_cursors (ScreenPtr screen) (*cursor_info->LoadCursorImage)(cursor_info->pScrn, src); (*cursor_info->SetCursorPosition)(cursor_info->pScrn, x, y); - (*cursor_info->ShowCursor)(cursor_info->pScrn); } } diff --git a/xorg-server/hw/xfree86/modes/xf86EdidModes.c b/xorg-server/hw/xfree86/modes/xf86EdidModes.c index bf0ea3f64..087f66376 100644 --- a/xorg-server/hw/xfree86/modes/xf86EdidModes.c +++ b/xorg-server/hw/xfree86/modes/xf86EdidModes.c @@ -1,5 +1,6 @@ /* * Copyright 2006 Luc Verhaegen. + * Copyright 2008 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -34,16 +35,39 @@ #endif #endif +#define _PARSE_EDID_ #include "xf86.h" #include "xf86DDC.h" #include #include "property.h" #include "propertyst.h" -#include "xf86DDC.h" #include "xf86Crtc.h" #include #include +static Bool +xf86MonitorSupportsReducedBlanking(xf86MonPtr DDC) +{ + /* EDID 1.4 explicitly defines RB support */ + if (DDC->ver.revision >= 4) { + int i; + for (i = 0; i < DET_TIMINGS; i++) { + struct detailed_monitor_section *det_mon = &DDC->det_mon[i]; + if (det_mon->type == DS_RANGES) + if (det_mon->section.ranges.supported_blanking & CVT_REDUCED) + return TRUE; + } + + return FALSE; + } + + /* For anything older, assume digital means RB support. Boo. */ + if (DDC->features.input_type) + return TRUE; + + return FALSE; +} + /* * Quirks to work around broken EDID data from various monitors. */ @@ -68,6 +92,8 @@ typedef enum { DDC_QUIRK_FIRST_DETAILED_PREFERRED = 1 << 6, /* use +hsync +vsync for detailed mode */ DDC_QUIRK_DETAILED_SYNC_PP = 1 << 7, + /* Force single-link DVI bandwidth limit */ + DDC_QUIRK_DVI_SINGLE_LINK = 1 << 8, } ddc_quirk_t; static Bool quirk_prefer_large_60 (int scrnIndex, xf86MonPtr DDC) @@ -129,6 +155,11 @@ static Bool quirk_detailed_v_in_cm (int scrnIndex, xf86MonPtr DDC) DDC->vendor.prod_id == 13600) return TRUE; + /* Bug #21000: LGPhilipsLCD LP154W01-TLAJ */ + if (memcmp (DDC->vendor.name, "LPL", 4) == 0 && + DDC->vendor.prod_id == 47360) + return TRUE; + return FALSE; } @@ -139,6 +170,11 @@ static Bool quirk_detailed_use_maximum_size (int scrnIndex, xf86MonPtr DDC) (DDC->vendor.prod_id == 0 || DDC->vendor.prod_id == 0x2a00)) return TRUE; + /* Bug #21324: Iiyama Vision Master 450 */ + if (memcmp (DDC->vendor.name, "IVM", 4) == 0 && + DDC->vendor.prod_id == 6400) + return TRUE; + return FALSE; } @@ -181,6 +217,16 @@ static Bool quirk_detailed_sync_pp(int scrnIndex, xf86MonPtr DDC) return FALSE; } +/* This should probably be made more generic */ +static Bool quirk_dvi_single_link(int scrnIndex, xf86MonPtr DDC) +{ + /* Red Hat bug #453106: Apple 23" Cinema Display */ + if (memcmp (DDC->vendor.name, "APL", 4) == 0 && + DDC->vendor.prod_id == 0x921c) + return TRUE; + return FALSE; +} + typedef struct { Bool (*detect) (int scrnIndex, xf86MonPtr DDC); ddc_quirk_t quirk; @@ -220,6 +266,10 @@ static const ddc_quirk_map_t ddc_quirks[] = { quirk_detailed_sync_pp, DDC_QUIRK_DETAILED_SYNC_PP, "Use +hsync +vsync for detailed timing." }, + { + quirk_dvi_single_link, DDC_QUIRK_DVI_SINGLE_LINK, + "Forcing maximum pixel clock to single DVI link." + }, { NULL, DDC_QUIRK_NONE, "No known quirks" @@ -227,8 +277,13 @@ static const ddc_quirk_map_t ddc_quirks[] = { }; /* - * TODO: - * - for those with access to the VESA DMT standard; review please. + * These more or less come from the DMT spec. The 720x400 modes are + * inferred from historical 80x25 practice. The 640x480@67 and 832x624@75 + * modes are old-school Mac modes. The EDID spec says the 1152x864@75 mode + * should be 1152x870, again for the Mac, but instead we use the x864 DMT + * mode. + * + * The DMT modes have been fact-checked; the rest are mild guesses. */ #define MODEPREFIX NULL, NULL, NULL, 0, M_T_DRIVER #define MODESUFFIX 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0 @@ -237,16 +292,16 @@ static const DisplayModeRec DDCEstablishedModes[17] = { { MODEPREFIX, 40000, 800, 840, 968, 1056, 0, 600, 601, 605, 628, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@60Hz */ { MODEPREFIX, 36000, 800, 824, 896, 1024, 0, 600, 601, 603, 625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@56Hz */ { MODEPREFIX, 31500, 640, 656, 720, 840, 0, 480, 481, 484, 500, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@75Hz */ - { MODEPREFIX, 31500, 640, 664, 704, 832, 0, 480, 489, 491, 520, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@72Hz */ + { MODEPREFIX, 31500, 640, 664, 704, 832, 0, 480, 489, 492, 520, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@72Hz */ { MODEPREFIX, 30240, 640, 704, 768, 864, 0, 480, 483, 486, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@67Hz */ - { MODEPREFIX, 25200, 640, 656, 752, 800, 0, 480, 490, 492, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@60Hz */ + { MODEPREFIX, 25175, 640, 656, 752, 800, 0, 480, 490, 492, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@60Hz */ { MODEPREFIX, 35500, 720, 738, 846, 900, 0, 400, 421, 423, 449, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 720x400@88Hz */ { MODEPREFIX, 28320, 720, 738, 846, 900, 0, 400, 412, 414, 449, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 720x400@70Hz */ { MODEPREFIX, 135000, 1280, 1296, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x1024@75Hz */ - { MODEPREFIX, 78800, 1024, 1040, 1136, 1312, 0, 768, 769, 772, 800, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1024x768@75Hz */ + { MODEPREFIX, 78750, 1024, 1040, 1136, 1312, 0, 768, 769, 772, 800, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1024x768@75Hz */ { MODEPREFIX, 75000, 1024, 1048, 1184, 1328, 0, 768, 771, 777, 806, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 1024x768@70Hz */ { MODEPREFIX, 65000, 1024, 1048, 1184, 1344, 0, 768, 771, 777, 806, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 1024x768@60Hz */ - { MODEPREFIX, 44900, 1024, 1032, 1208, 1264, 0, 768, 768, 776, 817, 0, V_PHSYNC | V_PVSYNC | V_INTERLACE, MODESUFFIX }, /* 1024x768@43Hz */ + { MODEPREFIX, 44900, 1024, 1032, 1208, 1264, 0, 768, 768, 772, 817, 0, V_PHSYNC | V_PVSYNC | V_INTERLACE, MODESUFFIX }, /* 1024x768@43Hz */ { MODEPREFIX, 57284, 832, 864, 928, 1152, 0, 624, 625, 628, 667, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 832x624@75Hz */ { MODEPREFIX, 49500, 800, 816, 896, 1056, 0, 600, 601, 604, 625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@75Hz */ { MODEPREFIX, 50000, 800, 856, 976, 1040, 0, 600, 637, 643, 666, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@72Hz */ @@ -272,6 +327,90 @@ DDCModesFromEstablished(int scrnIndex, struct established_timings *timing, return Modes; } +/* Autogenerated from the DMT spec */ +static const DisplayModeRec DMTModes[] = { + { MODEPREFIX, 31500, 640, 672, 736, 832, 0, 350, 382, 385, 445, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x350@85Hz */ + { MODEPREFIX, 31500, 640, 672, 736, 832, 0, 400, 401, 404, 445, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 640x400@85Hz */ + { MODEPREFIX, 35500, 720, 756, 828, 936, 0, 400, 401, 404, 446, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 720x400@85Hz */ + { MODEPREFIX, 25175, 640, 656, 752, 800, 0, 480, 490, 492, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@60Hz */ + { MODEPREFIX, 31500, 640, 664, 704, 832, 0, 480, 489, 492, 520, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@72Hz */ + { MODEPREFIX, 31500, 640, 656, 720, 840, 0, 480, 481, 484, 500, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@75Hz */ + { MODEPREFIX, 36000, 640, 696, 752, 832, 0, 480, 481, 484, 509, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x480@85Hz */ + { MODEPREFIX, 36000, 800, 824, 896, 1024, 0, 600, 601, 603, 625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@56Hz */ + { MODEPREFIX, 40000, 800, 840, 968, 1056, 0, 600, 601, 605, 628, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@60Hz */ + { MODEPREFIX, 50000, 800, 856, 976, 1040, 0, 600, 637, 643, 666, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@72Hz */ + { MODEPREFIX, 49500, 800, 816, 896, 1056, 0, 600, 601, 604, 625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@75Hz */ + { MODEPREFIX, 56250, 800, 832, 896, 1048, 0, 600, 601, 604, 631, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 800x600@85Hz */ + { MODEPREFIX, 73250, 800, 848, 880, 960, 0, 600, 603, 607, 636, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 800x600@120Hz RB */ + { MODEPREFIX, 33750, 848, 864, 976, 1088, 0, 480, 486, 494, 517, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 848x480@60Hz */ + { MODEPREFIX, 44900, 1024, 1032, 1208, 1264, 0, 768, 768, 772, 817, 0, V_PHSYNC | V_PVSYNC | V_INTERLACE, MODESUFFIX }, /* 1024x768@43Hz (interlaced) */ + { MODEPREFIX, 65000, 1024, 1048, 1184, 1344, 0, 768, 771, 777, 806, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 1024x768@60Hz */ + { MODEPREFIX, 75000, 1024, 1048, 1184, 1328, 0, 768, 771, 777, 806, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX }, /* 1024x768@70Hz */ + { MODEPREFIX, 78750, 1024, 1040, 1136, 1312, 0, 768, 769, 772, 800, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1024x768@75Hz */ + { MODEPREFIX, 94500, 1024, 1072, 1168, 1376, 0, 768, 769, 772, 808, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1024x768@85Hz */ + { MODEPREFIX, 115500, 1024, 1072, 1104, 1184, 0, 768, 771, 775, 813, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1024x768@120Hz RB */ + { MODEPREFIX, 108000, 1152, 1216, 1344, 1600, 0, 864, 865, 868, 900, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1152x864@75Hz */ + { MODEPREFIX, 68250, 1280, 1328, 1360, 1440, 0, 768, 771, 778, 790, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1280x768@60Hz RB */ + { MODEPREFIX, 79500, 1280, 1344, 1472, 1664, 0, 768, 771, 778, 798, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x768@60Hz */ + { MODEPREFIX, 102250, 1280, 1360, 1488, 1696, 0, 768, 771, 778, 805, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x768@75Hz */ + { MODEPREFIX, 117500, 1280, 1360, 1496, 1712, 0, 768, 771, 778, 809, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x768@85Hz */ + { MODEPREFIX, 140250, 1280, 1328, 1360, 1440, 0, 768, 771, 778, 813, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1280x768@120Hz RB */ + { MODEPREFIX, 71000, 1280, 1328, 1360, 1440, 0, 800, 803, 809, 823, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1280x800@60Hz RB */ + { MODEPREFIX, 83500, 1280, 1352, 1480, 1680, 0, 800, 803, 809, 831, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x800@60Hz */ + { MODEPREFIX, 106500, 1280, 1360, 1488, 1696, 0, 800, 803, 809, 838, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x800@75Hz */ + { MODEPREFIX, 122500, 1280, 1360, 1496, 1712, 0, 800, 803, 809, 843, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x800@85Hz */ + { MODEPREFIX, 146250, 1280, 1328, 1360, 1440, 0, 800, 803, 809, 847, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1280x800@120Hz RB */ + { MODEPREFIX, 108000, 1280, 1376, 1488, 1800, 0, 960, 961, 964, 1000, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x960@60Hz */ + { MODEPREFIX, 148500, 1280, 1344, 1504, 1728, 0, 960, 961, 964, 1011, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x960@85Hz */ + { MODEPREFIX, 175500, 1280, 1328, 1360, 1440, 0, 960, 963, 967, 1017, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1280x960@120Hz RB */ + { MODEPREFIX, 108000, 1280, 1328, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x1024@60Hz */ + { MODEPREFIX, 135000, 1280, 1296, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x1024@75Hz */ + { MODEPREFIX, 157500, 1280, 1344, 1504, 1728, 0, 1024, 1025, 1028, 1072, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1280x1024@85Hz */ + { MODEPREFIX, 187250, 1280, 1328, 1360, 1440, 0, 1024, 1027, 1034, 1084, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1280x1024@120Hz RB */ + { MODEPREFIX, 85500, 1360, 1424, 1536, 1792, 0, 768, 771, 777, 795, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1360x768@60Hz */ + { MODEPREFIX, 148250, 1360, 1408, 1440, 1520, 0, 768, 771, 776, 813, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1360x768@120Hz RB */ + { MODEPREFIX, 101000, 1400, 1448, 1480, 1560, 0, 1050, 1053, 1057, 1080, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1400x1050@60Hz RB */ + { MODEPREFIX, 121750, 1400, 1488, 1632, 1864, 0, 1050, 1053, 1057, 1089, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1400x1050@60Hz */ + { MODEPREFIX, 156000, 1400, 1504, 1648, 1896, 0, 1050, 1053, 1057, 1099, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1400x1050@75Hz */ + { MODEPREFIX, 179500, 1400, 1504, 1656, 1912, 0, 1050, 1053, 1057, 1105, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1400x1050@85Hz */ + { MODEPREFIX, 208000, 1400, 1448, 1480, 1560, 0, 1050, 1053, 1057, 1112, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1400x1050@120Hz RB */ + { MODEPREFIX, 88750, 1440, 1488, 1520, 1600, 0, 900, 903, 909, 926, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1440x900@60Hz RB */ + { MODEPREFIX, 106500, 1440, 1520, 1672, 1904, 0, 900, 903, 909, 934, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1440x900@60Hz */ + { MODEPREFIX, 136750, 1440, 1536, 1688, 1936, 0, 900, 903, 909, 942, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1440x900@75Hz */ + { MODEPREFIX, 157000, 1440, 1544, 1696, 1952, 0, 900, 903, 909, 948, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1440x900@85Hz */ + { MODEPREFIX, 182750, 1440, 1488, 1520, 1600, 0, 900, 903, 909, 953, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1440x900@120Hz RB */ + { MODEPREFIX, 162000, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1600x1200@60Hz */ + { MODEPREFIX, 175500, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1600x1200@65Hz */ + { MODEPREFIX, 189000, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1600x1200@70Hz */ + { MODEPREFIX, 202500, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1600x1200@75Hz */ + { MODEPREFIX, 229500, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX }, /* 1600x1200@85Hz */ + { MODEPREFIX, 268250, 1600, 1648, 1680, 1760, 0, 1200, 1203, 1207, 1271, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1600x1200@120Hz RB */ + { MODEPREFIX, 119000, 1680, 1728, 1760, 1840, 0, 1050, 1053, 1059, 1080, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1680x1050@60Hz RB */ + { MODEPREFIX, 146250, 1680, 1784, 1960, 2240, 0, 1050, 1053, 1059, 1089, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1680x1050@60Hz */ + { MODEPREFIX, 187000, 1680, 1800, 1976, 2272, 0, 1050, 1053, 1059, 1099, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1680x1050@75Hz */ + { MODEPREFIX, 214750, 1680, 1808, 1984, 2288, 0, 1050, 1053, 1059, 1105, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1680x1050@85Hz */ + { MODEPREFIX, 245500, 1680, 1728, 1760, 1840, 0, 1050, 1053, 1059, 1112, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1680x1050@120Hz RB */ + { MODEPREFIX, 204750, 1792, 1920, 2120, 2448, 0, 1344, 1345, 1348, 1394, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1792x1344@60Hz */ + { MODEPREFIX, 261000, 1792, 1888, 2104, 2456, 0, 1344, 1345, 1348, 1417, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1792x1344@75Hz */ + { MODEPREFIX, 333250, 1792, 1840, 1872, 1952, 0, 1344, 1347, 1351, 1423, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1792x1344@120Hz RB */ + { MODEPREFIX, 218250, 1856, 1952, 2176, 2528, 0, 1392, 1393, 1396, 1439, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1856x1392@60Hz */ + { MODEPREFIX, 288000, 1856, 1984, 2208, 2560, 0, 1392, 1393, 1396, 1500, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1856x1392@75Hz */ + { MODEPREFIX, 356500, 1856, 1904, 1936, 2016, 0, 1392, 1395, 1399, 1474, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1856x1392@120Hz RB */ + { MODEPREFIX, 154000, 1920, 1968, 2000, 2080, 0, 1200, 1203, 1209, 1235, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1920x1200@60Hz RB */ + { MODEPREFIX, 193250, 1920, 2056, 2256, 2592, 0, 1200, 1203, 1209, 1245, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1920x1200@60Hz */ + { MODEPREFIX, 245250, 1920, 2056, 2264, 2608, 0, 1200, 1203, 1209, 1255, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1920x1200@75Hz */ + { MODEPREFIX, 281250, 1920, 2064, 2272, 2624, 0, 1200, 1203, 1209, 1262, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1920x1200@85Hz */ + { MODEPREFIX, 317000, 1920, 1968, 2000, 2080, 0, 1200, 1203, 1209, 1271, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1920x1200@120Hz RB */ + { MODEPREFIX, 234000, 1920, 2048, 2256, 2600, 0, 1440, 1441, 1444, 1500, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1920x1440@60Hz */ + { MODEPREFIX, 297000, 1920, 2064, 2288, 2640, 0, 1440, 1441, 1444, 1500, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 1920x1440@75Hz */ + { MODEPREFIX, 380500, 1920, 1968, 2000, 2080, 0, 1440, 1443, 1447, 1525, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 1920x1440@120Hz RB */ + { MODEPREFIX, 268500, 2560, 2608, 2640, 2720, 0, 1600, 1603, 1609, 1646, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 2560x1600@60Hz RB */ + { MODEPREFIX, 348500, 2560, 2752, 3032, 3504, 0, 1600, 1603, 1609, 1658, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 2560x1600@60Hz */ + { MODEPREFIX, 443250, 2560, 2768, 3048, 3536, 0, 1600, 1603, 1609, 1672, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 2560x1600@75Hz */ + { MODEPREFIX, 505250, 2560, 2768, 3048, 3536, 0, 1600, 1603, 1609, 1682, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 2560x1600@85Hz */ + { MODEPREFIX, 552750, 2560, 2608, 2640, 2720, 0, 1600, 1603, 1609, 1694, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 2560x1600@120Hz RB */ +}; + #define LEVEL_DMT 0 #define LEVEL_GTF 1 #define LEVEL_CVT 2 @@ -288,12 +427,43 @@ MonitorStandardTimingLevel(xf86MonPtr DDC) return LEVEL_DMT; } +static int +ModeRefresh(const DisplayModeRec *mode) +{ + return (int)(xf86ModeVRefresh(mode) + 0.5); +} + /* - * This is not really correct. Appendix B of the EDID 1.4 spec defines - * the right thing to do here. If the timing given here matches a mode - * defined in the VESA DMT standard, we _must_ use that. If the device - * supports CVT modes, then we should generate a CVT timing. If both - * of the above fail, use GTF. + * If rb is not set, then we'll not consider reduced-blanking modes as + * part of the DMT pool. For the 'standard' EDID mode descriptor there's + * no way to specify whether the mode should be RB or not. + */ +static DisplayModePtr +FindDMTMode(int hsize, int vsize, int refresh, Bool rb) +{ + int i; + const DisplayModeRec *ret; + + for (i = 0; i < sizeof(DMTModes) / sizeof(DisplayModeRec); i++) { + ret = &DMTModes[i]; + + if (!rb && xf86ModeIsReduced(ret)) + continue; + + if (ret->HDisplay == hsize && + ret->VDisplay == vsize && + refresh == ModeRefresh(ret)) + return xf86DuplicateMode(ret); + } + + return NULL; +} + +/* + * Appendix B of the EDID 1.4 spec defines the right thing to do here. + * If the timing given here matches a mode defined in the VESA DMT standard, + * we _must_ use that. If the device supports CVT modes, then we should + * generate a CVT timing. If both of the above fail, use GTF. * * There are some wrinkles here. EDID 1.1 and 1.0 sinks can't really * "support" GTF, since it wasn't a standard yet; so if they ask for a @@ -308,20 +478,28 @@ MonitorStandardTimingLevel(xf86MonPtr DDC) */ static DisplayModePtr DDCModesFromStandardTiming(struct std_timings *timing, ddc_quirk_t quirks, - int timing_level) + int timing_level, Bool rb) { DisplayModePtr Modes = NULL, Mode = NULL; int i; for (i = 0; i < STD_TIMINGS; i++) { if (timing[i].hsize && timing[i].vsize && timing[i].refresh) { - /* XXX check for DMT first, else... */ - if (timing_level == LEVEL_CVT) - Mode = xf86CVTMode(timing[i].hsize, timing[i].vsize, - timing[i].refresh, FALSE, FALSE); - else - Mode = xf86GTFMode(timing[i].hsize, timing[i].vsize, - timing[i].refresh, FALSE, FALSE); + Mode = FindDMTMode(timing[i].hsize, timing[i].vsize, + timing[i].refresh, rb); + + if (!Mode) { + if (timing_level == LEVEL_CVT) + /* pass rb here too? */ + Mode = xf86CVTMode(timing[i].hsize, timing[i].vsize, + timing[i].refresh, FALSE, FALSE); + else if (timing_level == LEVEL_GTF) + Mode = xf86GTFMode(timing[i].hsize, timing[i].vsize, + timing[i].refresh, FALSE, FALSE); + } + + if (!Mode) + continue; Mode->type = M_T_DRIVER; Modes = xf86ModesAdd(Modes, Mode); @@ -363,7 +541,7 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing, /* We only do seperate sync currently */ if (timing->sync != 0x03) { xf86DrvMsg(scrnIndex, X_INFO, - "%s: %dx%d Warning: We only handle seperate" + "%s: %dx%d Warning: We only handle separate" " sync.\n", __func__, timing->h_active, timing->v_active); } @@ -419,6 +597,7 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing, return Mode; } +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) static DisplayModePtr DDCModesFromCVT(int scrnIndex, struct cvt_timings *t) { @@ -447,7 +626,87 @@ DDCModesFromCVT(int scrnIndex, struct cvt_timings *t) return modes; } +#endif + +static const struct { + short w; + short h; + short r; + short rb; +} EstIIIModes[] = { + /* byte 6 */ + { 640, 350, 85, 0 }, + { 640, 400, 85, 0 }, + { 720, 400, 85, 0 }, + { 640, 480, 85, 0 }, + { 848, 480, 60, 0 }, + { 800, 600, 85, 0 }, + { 1024, 768, 85, 0 }, + { 1152, 864, 75, 0 }, + /* byte 7 */ + { 1280, 768, 60, 1 }, + { 1280, 768, 60, 0 }, + { 1280, 768, 75, 0 }, + { 1280, 768, 85, 0 }, + { 1280, 960, 60, 0 }, + { 1280, 960, 85, 0 }, + { 1280, 1024, 60, 0 }, + { 1280, 1024, 85, 0 }, + /* byte 8 */ + { 1360, 768, 60, 0 }, + { 1440, 900, 60, 1 }, + { 1440, 900, 60, 0 }, + { 1440, 900, 75, 0 }, + { 1440, 900, 85, 0 }, + { 1400, 1050, 60, 1 }, + { 1400, 1050, 60, 0 }, + { 1400, 1050, 75, 0 }, + /* byte 9 */ + { 1400, 1050, 85, 0 }, + { 1680, 1050, 60, 1 }, + { 1680, 1050, 60, 0 }, + { 1680, 1050, 75, 0 }, + { 1680, 1050, 85, 0 }, + { 1600, 1200, 60, 0 }, + { 1600, 1200, 65, 0 }, + { 1600, 1200, 70, 0 }, + /* byte 10 */ + { 1600, 1200, 75, 0 }, + { 1600, 1200, 85, 0 }, + { 1792, 1344, 60, 0 }, + { 1792, 1344, 85, 0 }, + { 1856, 1392, 60, 0 }, + { 1856, 1392, 75, 0 }, + { 1920, 1200, 60, 1 }, + { 1920, 1200, 60, 0 }, + /* byte 11 */ + { 1920, 1200, 75, 0 }, + { 1920, 1200, 85, 0 }, + { 1920, 1440, 60, 0 }, + { 1920, 1440, 75, 0 }, +}; + +static DisplayModePtr +DDCModesFromEstIII(unsigned char *est) +{ + DisplayModePtr modes = NULL; + int i, j, m; + + for (i = 0; i < 6; i++) { + for (j = 7; j > 0; j--) { + if (est[i] & (1 << j)) { + m = (i * 8) + (7 - j); + modes = xf86ModesAdd(modes, + FindDMTMode(EstIIIModes[m].w, + EstIIIModes[m].h, + EstIIIModes[m].r, + EstIIIModes[m].rb)); + } + } + } + return modes; +} /* * This is only valid when the sink claims to be continuous-frequency @@ -595,7 +854,7 @@ xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC) int i; DisplayModePtr Modes = NULL, Mode; ddc_quirk_t quirks; - Bool preferred; + Bool preferred, rb; int timing_level; xf86DrvMsg (scrnIndex, X_INFO, "EDID vendor \"%s\", prod id %d\n", @@ -611,11 +870,14 @@ xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC) if (quirks & (DDC_QUIRK_PREFER_LARGE_60 | DDC_QUIRK_PREFER_LARGE_75)) preferred = FALSE; + rb = xf86MonitorSupportsReducedBlanking(DDC); + timing_level = MonitorStandardTimingLevel(DDC); for (i = 0; i < DET_TIMINGS; i++) { struct detailed_monitor_section *det_mon = &DDC->det_mon[i]; + Mode = NULL; switch (det_mon->type) { case DT: Mode = DDCModeFromDetailedTiming(scrnIndex, @@ -623,20 +885,23 @@ xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC) preferred, quirks); preferred = FALSE; - Modes = xf86ModesAdd(Modes, Mode); break; case DS_STD_TIMINGS: Mode = DDCModesFromStandardTiming(det_mon->section.std_t, - quirks, timing_level); - Modes = xf86ModesAdd(Modes, Mode); + quirks, timing_level, rb); break; +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) case DS_CVT: Mode = DDCModesFromCVT(scrnIndex, det_mon->section.cvt); - Modes = xf86ModesAdd(Modes, Mode); + break; +#endif + case DS_EST_III: + Mode = DDCModesFromEstIII(det_mon->section.est_iii); break; default: break; } + Modes = xf86ModesAdd(Modes, Mode); } /* Add established timings */ @@ -644,7 +909,7 @@ xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC) Modes = xf86ModesAdd(Modes, Mode); /* Add standard timings */ - Mode = DDCModesFromStandardTiming(DDC->timings2, quirks, timing_level); + Mode = DDCModesFromStandardTiming(DDC->timings2, quirks, timing_level, rb); Modes = xf86ModesAdd(Modes, Mode); if (quirks & DDC_QUIRK_PREFER_LARGE_60) @@ -665,23 +930,21 @@ xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC) DisplayModePtr Modes = NULL, Mode; int i, clock; Bool have_hsync = FALSE, have_vrefresh = FALSE, have_maxpixclock = FALSE; + ddc_quirk_t quirks; if (!Monitor || !DDC) return; Monitor->DDC = DDC; + quirks = xf86DDCDetectQuirks(scrnIndex, DDC, FALSE); + if (Monitor->widthmm <= 0 && Monitor->heightmm <= 0) { Monitor->widthmm = 10 * DDC->features.hsize; Monitor->heightmm = 10 * DDC->features.vsize; } - /* - * If this is a digital display, then we can use reduced blanking. - * XXX This is a 1.3 heuristic. 1.4 explicitly defines rb support. - */ - if (DDC->features.input_type) - Monitor->reducedblanking = TRUE; + Monitor->reducedblanking = xf86MonitorSupportsReducedBlanking(DDC); Modes = xf86DDCGetModes(scrnIndex, DDC); @@ -723,6 +986,8 @@ xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC) } clock = DDC->det_mon[i].section.ranges.max_clock * 1000; + if (quirks & DDC_QUIRK_DVI_SINGLE_LINK) + clock = min(clock, 165000); if (!have_maxpixclock && clock > Monitor->maxPixClock) Monitor->maxPixClock = clock; diff --git a/xorg-server/hw/xfree86/modes/xf86Modes.c b/xorg-server/hw/xfree86/modes/xf86Modes.c index ea398ad81..1522fa731 100644 --- a/xorg-server/hw/xfree86/modes/xf86Modes.c +++ b/xorg-server/hw/xfree86/modes/xf86Modes.c @@ -52,7 +52,7 @@ extern XF86ConfigPtr xf86configptr; * Exact copy of xf86Mode.c's. */ _X_EXPORT double -xf86ModeHSync(DisplayModePtr mode) +xf86ModeHSync(const DisplayModeRec *mode) { double hsync = 0.0; @@ -70,7 +70,7 @@ xf86ModeHSync(DisplayModePtr mode) * Exact copy of xf86Mode.c's. */ _X_EXPORT double -xf86ModeVRefresh(DisplayModePtr mode) +xf86ModeVRefresh(const DisplayModeRec *mode) { double refresh = 0.0; @@ -89,7 +89,7 @@ xf86ModeVRefresh(DisplayModePtr mode) } _X_EXPORT int -xf86ModeWidth (DisplayModePtr mode, Rotation rotation) +xf86ModeWidth (const DisplayModeRec *mode, Rotation rotation) { switch (rotation & 0xf) { case RR_Rotate_0: @@ -104,7 +104,7 @@ xf86ModeWidth (DisplayModePtr mode, Rotation rotation) } _X_EXPORT int -xf86ModeHeight (DisplayModePtr mode, Rotation rotation) +xf86ModeHeight (const DisplayModeRec *mode, Rotation rotation) { switch (rotation & 0xf) { case RR_Rotate_0: @@ -206,7 +206,7 @@ xf86SetModeCrtc(DisplayModePtr p, int adjustFlags) * Allocates and returns a copy of pMode, including pointers within pMode. */ _X_EXPORT DisplayModePtr -xf86DuplicateMode(DisplayModePtr pMode) +xf86DuplicateMode(const DisplayModeRec *pMode) { DisplayModePtr pNew; @@ -264,7 +264,7 @@ xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList) * This isn't in xf86Modes.c, but it might deserve to be there. */ _X_EXPORT Bool -xf86ModesEqual(DisplayModePtr pMode1, DisplayModePtr pMode2) +xf86ModesEqual(const DisplayModeRec *pMode1, const DisplayModeRec *pMode2) { if (pMode1->Clock == pMode2->Clock && pMode1->HDisplay == pMode2->HDisplay && @@ -509,10 +509,27 @@ xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList, for (mode = modeList; mode != NULL; mode = mode->next) { if (xf86ModeBandwidth(mode, depth) > bandwidth) +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) mode->status = MODE_BANDWIDTH; +#else + /* MODE_BANDWIDTH didn't exist in xserver 1.2 */ + mode->status = MODE_BAD; +#endif } } +Bool +xf86ModeIsReduced(const DisplayModeRec *mode) +{ + if ((((mode->HDisplay * 5 / 4) & ~0x07) > mode->HTotal) && + ((mode->HTotal - mode->HDisplay) == 160) && + ((mode->HSyncEnd - mode->HDisplay) == 80) && + ((mode->HSyncEnd - mode->HSyncStart) == 32) && + ((mode->VSyncStart - mode->VDisplay) == 3)) + return TRUE; + return FALSE; +} + /** * Marks as bad any reduced-blanking modes. * @@ -521,7 +538,6 @@ xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList, _X_EXPORT void xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList) { - Bool mode_is_reduced = FALSE; DisplayModePtr mode; for (mode = modeList; mode != NULL; mode = mode->next) { @@ -677,12 +693,12 @@ xf86GetMonitorModes (ScrnInfoPtr pScrn, XF86ConfMonitorPtr conf_monitor) _X_EXPORT DisplayModePtr xf86GetDefaultModes (Bool interlaceAllowed, Bool doubleScanAllowed) { - DisplayModePtr head = NULL, prev = NULL, mode; + DisplayModePtr head = NULL, mode; int i; for (i = 0; i < xf86NumDefaultModes; i++) { - DisplayModePtr defMode = &xf86DefaultModes[i]; + const DisplayModeRec *defMode = &xf86DefaultModes[i]; if (!interlaceAllowed && (defMode->Flags & V_INTERLACE)) continue; diff --git a/xorg-server/hw/xfree86/modes/xf86Modes.h b/xorg-server/hw/xfree86/modes/xf86Modes.h index acdea65d8..2fb6a374d 100644 --- a/xorg-server/hw/xfree86/modes/xf86Modes.h +++ b/xorg-server/hw/xfree86/modes/xf86Modes.h @@ -40,22 +40,23 @@ #include "xf86Rename.h" #endif -double xf86ModeHSync(DisplayModePtr mode); -double xf86ModeVRefresh(DisplayModePtr mode); +double xf86ModeHSync(const DisplayModeRec *mode); +double xf86ModeVRefresh(const DisplayModeRec *mode); unsigned int xf86ModeBandwidth(DisplayModePtr mode, int depth); int -xf86ModeWidth (DisplayModePtr mode, Rotation rotation); +xf86ModeWidth (const DisplayModeRec *mode, Rotation rotation); int -xf86ModeHeight (DisplayModePtr mode, Rotation rotation); +xf86ModeHeight (const DisplayModeRec *mode, Rotation rotation); -DisplayModePtr xf86DuplicateMode(DisplayModePtr pMode); +DisplayModePtr xf86DuplicateMode(const DisplayModeRec *pMode); DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList); void xf86SetModeDefaultName(DisplayModePtr mode); void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags); -Bool xf86ModesEqual(DisplayModePtr pMode1, DisplayModePtr pMode2); +Bool xf86ModesEqual(const DisplayModeRec *pMode1, + const DisplayModeRec *pMode2); void xf86PrintModeline(int scrnIndex,DisplayModePtr mode); DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new); @@ -64,6 +65,9 @@ DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, Bool Interlaced); DisplayModePtr xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins); +Bool +xf86ModeIsReduced(const DisplayModeRec *mode); + void xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList, int flags); diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.c b/xorg-server/hw/xfree86/modes/xf86RandR12.c index 6f8ccdf84..454649213 100644 --- a/xorg-server/hw/xfree86/modes/xf86RandR12.c +++ b/xorg-server/hw/xfree86/modes/xf86RandR12.c @@ -37,6 +37,7 @@ #include "xf86DDC.h" #include "mipointer.h" #include "windowstr.h" +#include "inputstr.h" #include #include @@ -50,6 +51,8 @@ typedef struct _xf86RandR12Info { int mmHeight; int maxX; int maxY; + int pointerX; + int pointerY; Rotation rotation; /* current mode */ Rotation supported_rotations; /* driver supported */ } XF86RandRInfoRec, *XF86RandRInfoPtr; @@ -60,11 +63,22 @@ static Bool xf86RandR12CreateScreenResources12 (ScreenPtr pScreen); #endif static int xf86RandR12Generation; -static DevPrivateKey xf86RandR12Key; +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) +static int xf86RandR12KeyIndex; +static DevPrivateKey xf86RandR12Key; #define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \ dixLookupPrivate(&(p)->devPrivates, xf86RandR12Key)) +#else /* XORG_VERSION_CURRENT < 7.0 */ + +static int xf86RandR12Index; +#define XF86RANDRINFO(p) \ + ((XF86RandRInfoPtr)(p)->devPrivates[xf86RandR12Index].ptr) + +#endif /* XORG_VERSION_CURRENT < 7.0 */ + + static int xf86RandR12ModeRefresh (DisplayModePtr mode) { @@ -74,6 +88,355 @@ xf86RandR12ModeRefresh (DisplayModePtr mode) return (int) (mode->Clock * 1000.0 / mode->HTotal / mode->VTotal + 0.5); } +/* Adapt panning area; return TRUE if panning area was valid without adaption */ +static int +xf86RandR13VerifyPanningArea (xf86CrtcPtr crtc, int screenWidth, int screenHeight) +{ + int ret = TRUE; + + if (crtc->version < 2) + return FALSE; + + if (crtc->panningTotalArea.x2 <= crtc->panningTotalArea.x1) { + /* Panning in X is disabled */ + if (crtc->panningTotalArea.x1 || crtc->panningTotalArea.x2) + /* Illegal configuration -> fail/disable */ + ret = FALSE; + crtc->panningTotalArea.x1 = crtc->panningTotalArea.x2 = 0; + crtc->panningTrackingArea.x1 = crtc->panningTrackingArea.x2 = 0; + crtc->panningBorder[0] = crtc->panningBorder[2] = 0; + } else { + /* Panning in X is enabled */ + if (crtc->panningTotalArea.x1 < 0) { + /* Panning region outside screen -> move inside */ + crtc->panningTotalArea.x2 -= crtc->panningTotalArea.x1; + crtc->panningTotalArea.x1 = 0; + ret = FALSE; + } + if (crtc->panningTotalArea.x2 < crtc->panningTotalArea.x1 + crtc->mode.HDisplay) { + /* Panning region smaller than displayed area -> crop to displayed area */ + crtc->panningTotalArea.x2 = crtc->panningTotalArea.x1 + crtc->mode.HDisplay; + ret = FALSE; + } + if (crtc->panningTotalArea.x2 > screenWidth) { + /* Panning region larger than screen -> move inside, then crop to screen */ + crtc->panningTotalArea.x1 -= crtc->panningTotalArea.x2 - screenWidth; + crtc->panningTotalArea.x2 = screenWidth; + ret = FALSE; + if (crtc->panningTotalArea.x1 < 0) + crtc->panningTotalArea.x1 = 0; + } + if (crtc->panningBorder[0] + crtc->panningBorder[2] > crtc->mode.HDisplay) { + /* Borders too large -> set to 0 */ + crtc->panningBorder[0] = crtc->panningBorder[2] = 0; + ret = FALSE; + } + } + + if (crtc->panningTotalArea.y2 <= crtc->panningTotalArea.y1) { + /* Panning in Y is disabled */ + if (crtc->panningTotalArea.y1 || crtc->panningTotalArea.y2) + /* Illegal configuration -> fail/disable */ + ret = FALSE; + crtc->panningTotalArea.y1 = crtc->panningTotalArea.y2 = 0; + crtc->panningTrackingArea.y1 = crtc->panningTrackingArea.y2 = 0; + crtc->panningBorder[1] = crtc->panningBorder[3] = 0; + } else { + /* Panning in Y is enabled */ + if (crtc->panningTotalArea.y1 < 0) { + /* Panning region outside screen -> move inside */ + crtc->panningTotalArea.y2 -= crtc->panningTotalArea.y1; + crtc->panningTotalArea.y1 = 0; + ret = FALSE; + } + if (crtc->panningTotalArea.y2 < crtc->panningTotalArea.y1 + crtc->mode.VDisplay) { + /* Panning region smaller than displayed area -> crop to displayed area */ + crtc->panningTotalArea.y2 = crtc->panningTotalArea.y1 + crtc->mode.VDisplay; + ret = FALSE; + } + if (crtc->panningTotalArea.y2 > screenHeight) { + /* Panning region larger than screen -> move inside, then crop to screen */ + crtc->panningTotalArea.y1 -= crtc->panningTotalArea.y2 - screenHeight; + crtc->panningTotalArea.y2 = screenHeight; + ret = FALSE; + if (crtc->panningTotalArea.y1 < 0) + crtc->panningTotalArea.y1 = 0; + } + if (crtc->panningBorder[1] + crtc->panningBorder[3] > crtc->mode.VDisplay) { + /* Borders too large -> set to 0 */ + crtc->panningBorder[1] = crtc->panningBorder[3] = 0; + ret = FALSE; + } + } + + return ret; +} + +/* + * The heart of the panning operation: + * + * Given a frame buffer position (fb_x, fb_y), + * and a crtc position (crtc_x, crtc_y), + * and a transform matrix which maps frame buffer to crtc, + * compute a panning position (pan_x, pan_y) that + * makes the resulting transform line those two up + */ + +static void +xf86ComputeCrtcPan (Bool transform_in_use, + struct pixman_f_transform *m, + double screen_x, double screen_y, + double crtc_x, double crtc_y, + int old_pan_x, int old_pan_y, + int *new_pan_x, int *new_pan_y) +{ + if (transform_in_use) { + /* + * Given the current transform, M, the current position + * on the Screen, S, and the desired position on the CRTC, + * C, compute a translation, T, such that: + * + * M T S = C + * + * where T is of the form + * + * | 1 0 dx | + * | 0 1 dy | + * | 0 0 1 | + * + * M T S = + * | M00 Sx + M01 Sy + M00 dx + M01 dy + M02 | | Cx F | + * | M10 Sx + M11 Sy + M10 dx + M11 dy + M12 | = | Cy F | + * | M20 Sx + M21 Sy + M20 dx + M21 dy + M22 | | F | + * + * R = M S + * + * Cx F = M00 dx + M01 dy + R0 + * Cy F = M10 dx + M11 dy + R1 + * F = M20 dx + M21 dy + R2 + * + * Zero out dx, then dy + * + * F (Cx M10 - Cy M00) = + * (M10 M01 - M00 M11) dy + M10 R0 - M00 R1 + * F (M10 - Cy M20) = + * (M10 M21 - M20 M11) dy + M10 R2 - M20 R1 + * + * F (Cx M11 - Cy M01) = + * (M11 M00 - M01 M10) dx + M11 R0 - M01 R1 + * F (M11 - Cy M21) = + * (M11 M20 - M21 M10) dx + M11 R2 - M21 R1 + * + * Make some temporaries + * + * T = | Cx M10 - Cy M00 | + * | Cx M11 - Cy M01 | + * + * U = | M10 M01 - M00 M11 | + * | M11 M00 - M01 M10 | + * + * Q = | M10 R0 - M00 R1 | + * | M11 R0 - M01 R1 | + * + * P = | M10 - Cy M20 | + * | M11 - Cy M21 | + * + * W = | M10 M21 - M20 M11 | + * | M11 M20 - M21 M10 | + * + * V = | M10 R2 - M20 R1 | + * | M11 R2 - M21 R1 | + * + * Rewrite: + * + * F T0 = U0 dy + Q0 + * F P0 = W0 dy + V0 + * F T1 = U1 dx + Q1 + * F P1 = W1 dx + V1 + * + * Solve for F (two ways) + * + * F (W0 T0 - U0 P0) = W0 Q0 - U0 V0 + * + * W0 Q0 - U0 V0 + * F = ------------- + * W0 T0 - U0 P0 + * + * F (W1 T1 - U1 P1) = W1 Q1 - U1 V1 + * + * W1 Q1 - U1 V1 + * F = ------------- + * W1 T1 - U1 P1 + * + * We'll use which ever solution works (denominator != 0) + * + * Finally, solve for dx and dy: + * + * dx = (F T1 - Q1) / U1 + * dx = (F P1 - V1) / W1 + * + * dy = (F T0 - Q0) / U0 + * dy = (F P0 - V0) / W0 + */ + double r[3]; + double q[2], u[2], t[2], v[2], w[2], p[2]; + double f; + struct pict_f_vector d; + int i; + + /* Get the un-normalized crtc coordinates again */ + for (i = 0; i < 3; i++) + r[i] = m->m[i][0] * screen_x + m->m[i][1] * screen_y + m->m[i][2]; + + /* Combine values into temporaries */ + for (i = 0; i < 2; i++) { + q[i] = m->m[1][i] * r[0] - m->m[0][i] * r[1]; + u[i] = m->m[1][i] * m->m[0][1-i] - m->m[0][i] * m->m[1][1-i]; + t[i] = m->m[1][i] * crtc_x - m->m[0][i] * crtc_y; + + v[i] = m->m[1][i] * r[2] - m->m[2][i] * r[1]; + w[i] = m->m[1][i] * m->m[2][1-i] - m->m[2][i] * m->m[1][1-i]; + p[i] = m->m[1][i] - m->m[2][i] * crtc_y; + } + + /* Find a way to compute f */ + f = 0; + for (i = 0; i < 2; i++) { + double a = w[i] * q[i] - u[i] * v[i]; + double b = w[i] * t[i] - u[i] * p[i]; + if (b != 0) { + f = a/b; + break; + } + } + + /* Solve for the resulting transform vector */ + for (i = 0; i < 2; i++) { + if (u[i]) + d.v[1-i] = (t[i] * f - q[i]) / u[i]; + else if (w[1]) + d.v[1-i] = (p[i] * f - v[i]) / w[i]; + else + d.v[1-i] = 0; + } + *new_pan_x = old_pan_x - floor (d.v[0] + 0.5); + *new_pan_y = old_pan_y - floor (d.v[1] + 0.5); + } else { + *new_pan_x = screen_x - crtc_x; + *new_pan_y = screen_y - crtc_y; + } +} + +static void +xf86RandR13Pan (xf86CrtcPtr crtc, int x, int y) +{ + int newX, newY; + int width, height; + Bool panned = FALSE; + + if (crtc->version < 2) + return; + + if (! crtc->enabled || + (crtc->panningTotalArea.x2 <= crtc->panningTotalArea.x1 && + crtc->panningTotalArea.y2 <= crtc->panningTotalArea.y1)) + return; + + newX = crtc->x; + newY = crtc->y; + width = crtc->mode.HDisplay; + height = crtc->mode.VDisplay; + + if ((crtc->panningTrackingArea.x2 <= crtc->panningTrackingArea.x1 || + (x >= crtc->panningTrackingArea.x1 && x < crtc->panningTrackingArea.x2)) && + (crtc->panningTrackingArea.y2 <= crtc->panningTrackingArea.y1 || + (y >= crtc->panningTrackingArea.y1 && y < crtc->panningTrackingArea.y2))) + { + struct pict_f_vector c; + + /* + * Pre-clip the mouse position to the panning area so that we don't + * push the crtc outside. This doesn't deal with changes to the + * panning values, only mouse position changes. + */ + if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1) + { + if (x < crtc->panningTotalArea.x1) + x = crtc->panningTotalArea.x1; + if (x >= crtc->panningTotalArea.x2) + x = crtc->panningTotalArea.x2 - 1; + } + if (crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) + { + if (y < crtc->panningTotalArea.y1) + y = crtc->panningTotalArea.y1; + if (y >= crtc->panningTotalArea.y2) + y = crtc->panningTotalArea.y2 - 1; + } + + c.v[0] = x; + c.v[1] = y; + c.v[2] = 1.0; + if (crtc->transform_in_use) { + pixman_f_transform_point(&crtc->f_framebuffer_to_crtc, &c); + } else { + c.v[0] -= crtc->x; + c.v[1] -= crtc->y; + } + + if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1) { + if (c.v[0] < crtc->panningBorder[0]) { + c.v[0] = crtc->panningBorder[0]; + panned = TRUE; + } + if (c.v[0] >= width - crtc->panningBorder[2]) { + c.v[0] = width - crtc->panningBorder[2] - 1; + panned = TRUE; + } + } + if (crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) { + if (c.v[1] < crtc->panningBorder[1]) { + c.v[1] = crtc->panningBorder[1]; + panned = TRUE; + } + if (c.v[1] >= height - crtc->panningBorder[3]) { + c.v[1] = height - crtc->panningBorder[3] - 1; + panned = TRUE; + } + } + if (panned) + xf86ComputeCrtcPan (crtc->transform_in_use, + &crtc->f_framebuffer_to_crtc, + x, y, c.v[0], c.v[1], + newX, newY, &newX, &newY); + } + + /* + * Ensure that the crtc is within the panning region. + * + * XXX This computation only works when we do not have a transform + * in use. + */ + if (!crtc->transform_in_use) + { + /* Validate against [xy]1 after [xy]2, to be sure that results are > 0 for [xy]1 > 0 */ + if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1) { + if (newX > crtc->panningTotalArea.x2 - width) + newX = crtc->panningTotalArea.x2 - width; + if (newX < crtc->panningTotalArea.x1) + newX = crtc->panningTotalArea.x1; + } + if (crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) { + if (newY > crtc->panningTotalArea.y2 - height) + newY = crtc->panningTotalArea.y2 - height; + if (newY < crtc->panningTotalArea.y1) + newY = crtc->panningTotalArea.y1; + } + } + if (newX != crtc->x || newY != crtc->y) + xf86CrtcSetOrigin (crtc, newX, newY); +} + static Bool xf86RandR12GetInfo (ScreenPtr pScreen, Rotation *rotations) { @@ -247,7 +610,7 @@ xf86RandR12SetConfig (ScreenPtr pScreen, randrp->virtualY = scrp->virtualY; } - miPointerPosition (&px, &py); + miPointerGetPosition (inputInfo.pointer, &px, &py); for (mode = scrp->modes; ; mode = mode->next) { if (randrp->maxX == 0 || randrp->maxY == 0) @@ -294,14 +657,14 @@ xf86RandR12SetConfig (ScreenPtr pScreen, /* * Move the cursor back where it belongs; SwitchMode repositions it */ - if (pScreen == miPointerCurrentScreen ()) + if (pScreen == miPointerGetScreen(inputInfo.pointer)) { px = (px >= pScreen->width ? (pScreen->width - 1) : px); py = (py >= pScreen->height ? (pScreen->height - 1) : py); xf86SetViewport(pScreen, px, py); - (*pScreen->SetCursorPosition) (pScreen, px, py, FALSE); + (*pScreen->SetCursorPosition) (inputInfo.pointer, pScreen, px, py, FALSE); } return TRUE; @@ -320,14 +683,19 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen, WindowPtr pRoot = WindowTable[pScreen->myNum]; PixmapPtr pScrnPix = (*pScreen->GetScreenPixmap)(pScreen); Bool ret = FALSE; + int c; +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) if (xf86RandR12Key) { +#endif if (randrp->virtualX == -1 || randrp->virtualY == -1) { randrp->virtualX = pScrn->virtualX; randrp->virtualY = pScrn->virtualY; } +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) } +#endif if (pRoot && pScrn->vtSema) (*pScrn->EnableDisableFBAccess) (pScreen->myNum, FALSE); @@ -336,6 +704,23 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen, goto finish; ret = TRUE; + /* Update panning information */ + for (c = 0; c < config->num_crtc; c++) { + xf86CrtcPtr crtc = config->crtc[c]; + if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1 || + crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) { + if (crtc->panningTotalArea.x2 > crtc->panningTrackingArea.x1) + crtc->panningTotalArea.x2 += width - pScreen->width; + if (crtc->panningTotalArea.y2 > crtc->panningTrackingArea.y1) + crtc->panningTotalArea.y2 += height - pScreen->height; + if (crtc->panningTrackingArea.x2 > crtc->panningTrackingArea.x1) + crtc->panningTrackingArea.x2 += width - pScreen->width; + if (crtc->panningTrackingArea.y2 > crtc->panningTrackingArea.y1) + crtc->panningTrackingArea.y2 += height - pScreen->height; + xf86RandR13VerifyPanningArea (crtc, width, height); + xf86RandR13Pan (crtc, randrp->pointerX, randrp->pointerY); + } + } pScreen->width = pScrnPix->drawable.width = width; pScreen->height = pScrnPix->drawable.height = height; @@ -367,8 +752,8 @@ _X_EXPORT Bool xf86RandR12CreateScreenResources (ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); - XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); + xf86CrtcConfigPtr config; + XF86RandRInfoPtr randrp; int c; int width, height; int mmWidth, mmHeight; @@ -378,6 +763,8 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen) return TRUE; #endif + config = XF86_CRTC_CONFIG_PTR(pScrn); + randrp = XF86RANDRINFO(pScreen); /* * Compute size of screen */ @@ -388,10 +775,16 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen) int crtc_width = crtc->x + xf86ModeWidth (&crtc->mode, crtc->rotation); int crtc_height = crtc->y + xf86ModeHeight (&crtc->mode, crtc->rotation); - if (crtc->enabled && crtc_width > width) - width = crtc_width; - if (crtc->enabled && crtc_height > height) - height = crtc_height; + if (crtc->enabled) { + if (crtc_width > width) + width = crtc_width; + if (crtc_height > height) + height = crtc_height; + if (crtc->panningTotalArea.x2 > width) + width = crtc->panningTotalArea.x2; + if (crtc->panningTotalArea.y2 > height) + height = crtc->panningTotalArea.y2; + } } if (width && height) @@ -442,6 +835,13 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Setting screen physical size to %d x %d\n", mmWidth, mmHeight); + /* + * This is the initial setting of the screen size. + * We have to pre-set it here, otherwise panning would be adapted + * to the new screen size. + */ + pScreen->width = width; + pScreen->height = height; xf86RandR12ScreenSetSize (pScreen, width, height, @@ -449,8 +849,10 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen) mmHeight); } +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) if (xf86RandR12Key == NULL) return TRUE; +#endif if (randrp->virtualX == -1 || randrp->virtualY == -1) { @@ -481,7 +883,11 @@ xf86RandR12Init (ScreenPtr pScreen) if (xf86RandR12Generation != serverGeneration) xf86RandR12Generation = serverGeneration; - xf86RandR12Key = &xf86RandR12Key; +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) + xf86RandR12Key = &xf86RandR12KeyIndex; +#else + xf86RandR12Index = AllocateScreenPrivateIndex(); +#endif randrp = xalloc (sizeof (XF86RandRInfoRec)); if (!randrp) @@ -507,7 +913,11 @@ xf86RandR12Init (ScreenPtr pScreen) randrp->maxX = randrp->maxY = 0; +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) dixSetPrivate(&pScreen->devPrivates, xf86RandR12Key, randrp); +#else + pScreen->devPrivates[xf86RandR12Index].ptr = randrp; +#endif #if RANDR_12_INTERFACE if (!xf86RandR12Init12 (pScreen)) @@ -526,8 +936,10 @@ xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotations) xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); #endif +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) if (xf86RandR12Key == NULL) return; +#endif randrp = XF86RANDRINFO(pScreen); #if RANDR_12_INTERFACE @@ -540,6 +952,31 @@ xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotations) randrp->supported_rotations = rotations; } +_X_EXPORT void +xf86RandR12SetTransformSupport (ScreenPtr pScreen, Bool transforms) +{ + XF86RandRInfoPtr randrp; +#if RANDR_13_INTERFACE + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + int c; + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); +#endif + +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) + if (xf86RandR12Key == NULL) + return; +#endif + + randrp = XF86RANDRINFO(pScreen); +#if RANDR_13_INTERFACE + for (c = 0; c < config->num_crtc; c++) { + xf86CrtcPtr crtc = config->crtc[c]; + + RRCrtcSetTransformSupport (crtc->randr_crtc, transforms); + } +#endif +} + _X_EXPORT void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y) { @@ -662,7 +1099,9 @@ xf86RandR12CrtcNotify (RRCrtcPtr randr_crtc) } } ret = RRCrtcNotify (randr_crtc, randr_mode, x, y, - rotation, numOutputs, randr_outputs); + rotation, + crtc->transformPresent ? &crtc->transform : NULL, + numOutputs, randr_outputs); xfree(randr_outputs); return ret; } @@ -698,18 +1137,20 @@ xf86RandRModeConvert (ScrnInfoPtr scrn, } static Bool -xf86RandR12CrtcSet (ScreenPtr pScreen, - RRCrtcPtr randr_crtc, - RRModePtr randr_mode, - int x, - int y, - Rotation rotation, - int num_randr_outputs, - RROutputPtr *randr_outputs) +xf86RandR12CrtcSet (ScreenPtr pScreen, + RRCrtcPtr randr_crtc, + RRModePtr randr_mode, + int x, + int y, + Rotation rotation, + int num_randr_outputs, + RROutputPtr *randr_outputs) { + XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); xf86CrtcPtr crtc = randr_crtc->devPrivate; + RRTransformPtr transform; Bool changed = FALSE; int o, ro; xf86CrtcPtr *save_crtcs; @@ -727,6 +1168,13 @@ xf86RandR12CrtcSet (ScreenPtr pScreen, if (rotation != crtc->rotation) changed = TRUE; + transform = RRCrtcGetTransform (randr_crtc); + if ((transform != NULL) != crtc->transformPresent) + changed = TRUE; + else if (transform && memcmp (&transform->transform, &crtc->transform.transform, + sizeof (transform->transform)) != 0) + changed = TRUE; + if (x != crtc->x || y != crtc->y) changed = TRUE; for (o = 0; o < config->num_output; o++) @@ -764,9 +1212,10 @@ xf86RandR12CrtcSet (ScreenPtr pScreen, if (randr_mode) { DisplayModeRec mode; + RRTransformPtr transform = RRCrtcGetTransform (randr_crtc); xf86RandRModeConvert (pScrn, randr_mode, &mode); - if (!xf86CrtcSetMode (crtc, &mode, rotation, x, y)) + if (!xf86CrtcSetModeTransform (crtc, &mode, rotation, transform, x, y)) { crtc->enabled = save_enabled; for (o = 0; o < config->num_output; o++) @@ -777,11 +1226,19 @@ xf86RandR12CrtcSet (ScreenPtr pScreen, xfree(save_crtcs); return FALSE; } + xf86RandR13VerifyPanningArea (crtc, pScreen->width, pScreen->height); + xf86RandR13Pan (crtc, randrp->pointerX, randrp->pointerY); /* * Save the last successful setting for EnterVT */ crtc->desiredMode = mode; crtc->desiredRotation = rotation; + if (transform) { + crtc->desiredTransform = *transform; + crtc->desiredTransformPresent = TRUE; + } else + crtc->desiredTransformPresent = FALSE; + crtc->desiredX = x; crtc->desiredY = y; } @@ -831,6 +1288,20 @@ xf86RandR12OutputSetProperty (ScreenPtr pScreen, return output->funcs->set_property(output, property, value); } +static Bool +xf86RandR13OutputGetProperty (ScreenPtr pScreen, + RROutputPtr randr_output, + Atom property) +{ + xf86OutputPtr output = randr_output->devPrivate; + + if (output->funcs->get_property == NULL) + return TRUE; + + /* Should be safe even w/o vtSema */ + return output->funcs->get_property(output, property); +} + static Bool xf86RandR12OutputValidateMode (ScreenPtr pScreen, RROutputPtr randr_output, @@ -1060,8 +1531,10 @@ xf86RandR12CreateScreenResources12 (ScreenPtr pScreen) ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) if (xf86RandR12Key == NULL) return TRUE; +#endif for (c = 0; c < config->num_crtc; c++) xf86RandR12CrtcNotify (config->crtc[c]->randr_crtc); @@ -1083,8 +1556,13 @@ xf86RandR12TellChanged (ScreenPtr pScreen) xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); int c; +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) if (xf86RandR12Key == NULL) return; +#else + if (!XF86RANDRINFO(pScreen)) + return; +#endif xf86RandR12SetInfo12 (pScreen); for (c = 0; c < config->num_crtc; c++) @@ -1096,6 +1574,77 @@ xf86RandR12TellChanged (ScreenPtr pScreen) static void xf86RandR12PointerMoved (int scrnIndex, int x, int y) { + ScreenPtr pScreen = screenInfo.screens[scrnIndex]; + ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen); + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); + XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); + int c; + + randrp->pointerX = x; + randrp->pointerY = y; + for (c = 0; c < config->num_crtc; c++) + xf86RandR13Pan (config->crtc[c], x, y); +} + +static Bool +xf86RandR13GetPanning (ScreenPtr pScreen, + RRCrtcPtr randr_crtc, + BoxPtr totalArea, + BoxPtr trackingArea, + INT16 *border) +{ + xf86CrtcPtr crtc = randr_crtc->devPrivate; + + if (crtc->version < 2) + return FALSE; + if (totalArea) + memcpy (totalArea, &crtc->panningTotalArea, sizeof(BoxRec)); + if (trackingArea) + memcpy (trackingArea, &crtc->panningTrackingArea, sizeof(BoxRec)); + if (border) + memcpy (border, crtc->panningBorder, 4*sizeof(INT16)); + + return TRUE; +} + +static Bool +xf86RandR13SetPanning (ScreenPtr pScreen, + RRCrtcPtr randr_crtc, + BoxPtr totalArea, + BoxPtr trackingArea, + INT16 *border) +{ + XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); + xf86CrtcPtr crtc = randr_crtc->devPrivate; + BoxRec oldTotalArea; + BoxRec oldTrackingArea; + INT16 oldBorder[4]; + + + if (crtc->version < 2) + return FALSE; + + memcpy (&oldTotalArea, &crtc->panningTotalArea, sizeof(BoxRec)); + memcpy (&oldTrackingArea, &crtc->panningTrackingArea, sizeof(BoxRec)); + memcpy (oldBorder, crtc->panningBorder, 4*sizeof(INT16)); + + if (totalArea) + memcpy (&crtc->panningTotalArea, totalArea, sizeof(BoxRec)); + if (trackingArea) + memcpy (&crtc->panningTrackingArea, trackingArea, sizeof(BoxRec)); + if (border) + memcpy (crtc->panningBorder, border, 4*sizeof(INT16)); + + if (xf86RandR13VerifyPanningArea (crtc, pScreen->width, pScreen->height)) { + xf86RandR13Pan (crtc, randrp->pointerX, randrp->pointerY); + return TRUE; + } else { + /* Restore old settings */ + memcpy (&crtc->panningTotalArea, &oldTotalArea, sizeof(BoxRec)); + memcpy (&crtc->panningTrackingArea, &oldTrackingArea, sizeof(BoxRec)); + memcpy (crtc->panningBorder, oldBorder, 4*sizeof(INT16)); + return FALSE; + } } static Bool @@ -1110,6 +1659,11 @@ xf86RandR12Init12 (ScreenPtr pScreen) rp->rrCrtcSetGamma = xf86RandR12CrtcSetGamma; rp->rrOutputSetProperty = xf86RandR12OutputSetProperty; rp->rrOutputValidateMode = xf86RandR12OutputValidateMode; +#if RANDR_13_INTERFACE + rp->rrOutputGetProperty = xf86RandR13OutputGetProperty; + rp->rrGetPanning = xf86RandR13GetPanning; + rp->rrSetPanning = xf86RandR13SetPanning; +#endif rp->rrModeDestroy = xf86RandR12ModeDestroy; rp->rrSetConfig = NULL; pScrn->PointerMoved = xf86RandR12PointerMoved; diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.h b/xorg-server/hw/xfree86/modes/xf86RandR12.h index 4fd855cf5..17a2dcc7f 100644 --- a/xorg-server/hw/xfree86/modes/xf86RandR12.h +++ b/xorg-server/hw/xfree86/modes/xf86RandR12.h @@ -31,6 +31,7 @@ Bool xf86RandR12CreateScreenResources (ScreenPtr pScreen); Bool xf86RandR12Init(ScreenPtr pScreen); void xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotation); +void xf86RandR12SetTransformSupport (ScreenPtr pScreen, Bool transforms); Bool xf86RandR12SetConfig(ScreenPtr pScreen, Rotation rotation, int rate, RRScreenSizePtr pSize); Rotation xf86RandR12GetRotation(ScreenPtr pScreen); diff --git a/xorg-server/hw/xfree86/modes/xf86Rename.h b/xorg-server/hw/xfree86/modes/xf86Rename.h index b8c1d70ef..e3418caad 100644 --- a/xorg-server/hw/xfree86/modes/xf86Rename.h +++ b/xorg-server/hw/xfree86/modes/xf86Rename.h @@ -38,6 +38,7 @@ #define xf86CrtcInUse XF86NAME(xf86CrtcInUse) #define xf86CrtcRotate XF86NAME(xf86CrtcRotate) #define xf86CrtcScreenInit XF86NAME(xf86CrtcScreenInit) +#define xf86CrtcSetModeTransform XF86NAME(xf86CrtcSetModeTransform) #define xf86CrtcSetMode XF86NAME(xf86CrtcSetMode) #define xf86CrtcSetSizeRange XF86NAME(xf86CrtcSetSizeRange) #define xf86CVTMode XF86NAME(xf86CVTMode) diff --git a/xorg-server/hw/xfree86/modes/xf86Rotate.c b/xorg-server/hw/xfree86/modes/xf86Rotate.c index e2d6295b9..6be77d556 100644 --- a/xorg-server/hw/xfree86/modes/xf86Rotate.c +++ b/xorg-server/hw/xfree86/modes/xf86Rotate.c @@ -70,204 +70,8 @@ compWindowFormat (WindowPtr pWin) #define F(x) IntToxFixed(x) -static void -PictureTransformIdentity (PictTransformPtr matrix) -{ - int i; - memset (matrix, '\0', sizeof (PictTransform)); - for (i = 0; i < 3; i++) - matrix->matrix[i][i] = F(1); -} - -static Bool -PictureTransformMultiply (PictTransformPtr dst, PictTransformPtr l, PictTransformPtr r) -{ - PictTransform d; - int dx, dy; - int o; - - for (dy = 0; dy < 3; dy++) - for (dx = 0; dx < 3; dx++) - { - xFixed_48_16 v; - xFixed_32_32 partial; - v = 0; - for (o = 0; o < 3; o++) - { - partial = (xFixed_32_32) l->matrix[dy][o] * (xFixed_32_32) r->matrix[o][dx]; - v += partial >> 16; - } - if (v > MAX_FIXED_48_16 || v < MIN_FIXED_48_16) - return FALSE; - d.matrix[dy][dx] = (xFixed) v; - } - *dst = d; - return TRUE; -} - -static void -PictureTransformInitScale (PictTransformPtr t, xFixed sx, xFixed sy) -{ - memset (t, '\0', sizeof (PictTransform)); - t->matrix[0][0] = sx; - t->matrix[1][1] = sy; - t->matrix[2][2] = F (1); -} - -static xFixed -fixed_inverse (xFixed x) -{ - return (xFixed) ((((xFixed_48_16) F(1)) * F(1)) / x); -} - -static Bool -PictureTransformScale (PictTransformPtr forward, - PictTransformPtr reverse, - xFixed sx, xFixed sy) -{ - PictTransform t; - - PictureTransformInitScale (&t, sx, sy); - if (!PictureTransformMultiply (forward, &t, forward)) - return FALSE; - PictureTransformInitScale (&t, fixed_inverse (sx), fixed_inverse (sy)); - if (!PictureTransformMultiply (reverse, reverse, &t)) - return FALSE; - return TRUE; -} - -static void -PictureTransformInitRotate (PictTransformPtr t, xFixed c, xFixed s) -{ - memset (t, '\0', sizeof (PictTransform)); - t->matrix[0][0] = c; - t->matrix[0][1] = -s; - t->matrix[1][0] = s; - t->matrix[1][1] = c; - t->matrix[2][2] = F (1); -} - -static Bool -PictureTransformRotate (PictTransformPtr forward, - PictTransformPtr reverse, - xFixed c, xFixed s) -{ - PictTransform t; - PictureTransformInitRotate (&t, c, s); - if (!PictureTransformMultiply (forward, &t, forward)) - return FALSE; - - PictureTransformInitRotate (&t, c, -s); - if (!PictureTransformMultiply (reverse, reverse, &t)) - return FALSE; - return TRUE; -} - -static void -PictureTransformInitTranslate (PictTransformPtr t, xFixed tx, xFixed ty) -{ - memset (t, '\0', sizeof (PictTransform)); - t->matrix[0][0] = F (1); - t->matrix[0][2] = tx; - t->matrix[1][1] = F (1); - t->matrix[1][2] = ty; - t->matrix[2][2] = F (1); -} - -static Bool -PictureTransformTranslate (PictTransformPtr forward, - PictTransformPtr reverse, - xFixed tx, xFixed ty) -{ - PictTransform t; - PictureTransformInitTranslate (&t, tx, ty); - if (!PictureTransformMultiply (forward, &t, forward)) - return FALSE; - - PictureTransformInitTranslate (&t, -tx, -ty); - if (!PictureTransformMultiply (reverse, reverse, &t)) - return FALSE; - return TRUE; -} - -static void -PictureTransformBounds (BoxPtr b, PictTransformPtr matrix) -{ - PictVector v[4]; - int i; - int x1, y1, x2, y2; - - v[0].vector[0] = F (b->x1); v[0].vector[1] = F (b->y1); v[0].vector[2] = F(1); - v[1].vector[0] = F (b->x2); v[1].vector[1] = F (b->y1); v[1].vector[2] = F(1); - v[2].vector[0] = F (b->x2); v[2].vector[1] = F (b->y2); v[2].vector[2] = F(1); - v[3].vector[0] = F (b->x1); v[3].vector[1] = F (b->y2); v[3].vector[2] = F(1); - for (i = 0; i < 4; i++) - { - PictureTransformPoint (matrix, &v[i]); - x1 = xFixedToInt (v[i].vector[0]); - y1 = xFixedToInt (v[i].vector[1]); - x2 = xFixedToInt (xFixedCeil (v[i].vector[0])); - y2 = xFixedToInt (xFixedCeil (v[i].vector[1])); - if (i == 0) - { - b->x1 = x1; b->y1 = y1; - b->x2 = x2; b->y2 = y2; - } - else - { - if (x1 < b->x1) b->x1 = x1; - if (y1 < b->y1) b->y1 = y1; - if (x2 > b->x2) b->x2 = x2; - if (y2 > b->y2) b->y2 = y2; - } - } -} - -static Bool -PictureTransformIsIdentity(PictTransform *t) -{ - return ((t->matrix[0][0] == t->matrix[1][1]) && - (t->matrix[0][0] == t->matrix[2][2]) && - (t->matrix[0][0] != 0) && - (t->matrix[0][1] == 0) && - (t->matrix[0][2] == 0) && - (t->matrix[1][0] == 0) && - (t->matrix[1][2] == 0) && - (t->matrix[2][0] == 0) && - (t->matrix[2][1] == 0)); -} - #define toF(x) ((float) (x) / 65536.0f) -static void -PictureTransformErrorF (PictTransform *t) -{ - ErrorF ("{ { %f %f %f } { %f %f %f } { %f %f %f } }", - toF(t->matrix[0][0]), toF(t->matrix[0][1]), toF(t->matrix[0][2]), - toF(t->matrix[1][0]), toF(t->matrix[1][1]), toF(t->matrix[1][2]), - toF(t->matrix[2][0]), toF(t->matrix[2][1]), toF(t->matrix[2][2])); -} - -static Bool -PictureTransformIsInverse (char *where, PictTransform *a, PictTransform *b) -{ - PictTransform t; - - PictureTransformMultiply (&t, a, b); - if (!PictureTransformIsIdentity (&t)) - { - ErrorF ("%s: ", where); - PictureTransformErrorF (a); - ErrorF (" * "); - PictureTransformErrorF (b); - ErrorF (" = "); - PictureTransformErrorF (a); - ErrorF ("\n"); - return FALSE; - } - return TRUE; -} - static void xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region) { @@ -305,19 +109,37 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region) error = SetPictureTransform (src, &crtc->crtc_to_framebuffer); if (error) return; + if (crtc->transform_in_use && crtc->filter) + SetPicturePictFilter (src, crtc->filter, + crtc->params, crtc->nparams); - while (n--) + if (crtc->shadowClear) { - BoxRec dst_box; - - dst_box = *b; - PictureTransformBounds (&dst_box, &crtc->framebuffer_to_crtc); CompositePicture (PictOpSrc, src, NULL, dst, - dst_box.x1, dst_box.y1, 0, 0, dst_box.x1, dst_box.y1, - dst_box.x2 - dst_box.x1, - dst_box.y2 - dst_box.y1); - b++; + 0, 0, 0, 0, 0, 0, + crtc->mode.HDisplay, crtc->mode.VDisplay); + crtc->shadowClear = FALSE; + } + else + { + while (n--) + { + BoxRec dst_box; + + dst_box = *b; + dst_box.x1 -= crtc->filter_width >> 1; + dst_box.x2 += crtc->filter_width >> 1; + dst_box.y1 -= crtc->filter_height >> 1; + dst_box.y2 += crtc->filter_height >> 1; + pixman_f_transform_bounds (&crtc->f_framebuffer_to_crtc, &dst_box); + CompositePicture (PictOpSrc, + src, NULL, dst, + dst_box.x1, dst_box.y1, 0, 0, dst_box.x1, dst_box.y1, + dst_box.x2 - dst_box.x1, + dst_box.y2 - dst_box.y1); + b++; + } } FreePicture (src, None); FreePicture (dst, None); @@ -331,14 +153,26 @@ xf86CrtcDamageShadow (xf86CrtcPtr crtc) RegionRec damage_region; ScreenPtr pScreen = pScrn->pScreen; - damage_box.x1 = crtc->x; - damage_box.x2 = crtc->x + xf86ModeWidth (&crtc->mode, crtc->rotation); - damage_box.y1 = crtc->y; - damage_box.y2 = crtc->y + xf86ModeHeight (&crtc->mode, crtc->rotation); + damage_box.x1 = 0; + damage_box.x2 = crtc->mode.HDisplay; + damage_box.y1 = 0; + damage_box.y2 = crtc->mode.VDisplay; + if (!pixman_transform_bounds (&crtc->crtc_to_framebuffer, &damage_box)) + { + damage_box.x1 = 0; + damage_box.y1 = 0; + damage_box.x2 = pScreen->width; + damage_box.y2 = pScreen->height; + } + if (damage_box.x1 < 0) damage_box.x1 = 0; + if (damage_box.y1 < 0) damage_box.y1 = 0; + if (damage_box.x2 > pScreen->width) damage_box.x2 = pScreen->width; + if (damage_box.y2 > pScreen->height) damage_box.y2 = pScreen->height; REGION_INIT (pScreen, &damage_region, &damage_box, 1); - DamageDamageRegion (&(*pScreen->GetScreenPixmap)(pScreen)->drawable, + DamageRegionAppend (&(*pScreen->GetScreenPixmap)(pScreen)->drawable, &damage_region); REGION_UNINIT (pScreen, &damage_region); + crtc->shadowClear = TRUE; } static void @@ -401,7 +235,7 @@ xf86RotateRedisplay(ScreenPtr pScreen) { xf86CrtcPtr crtc = xf86_config->crtc[c]; - if (crtc->rotation != RR_Rotate_0 && crtc->enabled) + if (crtc->transform_in_use && crtc->enabled) { RegionRec crtc_damage; @@ -437,10 +271,12 @@ xf86RotateBlockHandler(int screenNum, pointer blockData, /* Re-wrap if rotation is still happening */ xf86_config->BlockHandler = pScreen->BlockHandler; pScreen->BlockHandler = xf86RotateBlockHandler; + } else { + xf86_config->BlockHandler = NULL; } } -static void +void xf86RotateDestroy (xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; @@ -457,8 +293,7 @@ xf86RotateDestroy (xf86CrtcPtr crtc) } for (c = 0; c < xf86_config->num_crtc; c++) - if (xf86_config->crtc[c]->rotatedPixmap || - xf86_config->crtc[c]->rotatedData) + if (xf86_config->crtc[c]->transform_in_use) return; /* @@ -478,6 +313,24 @@ xf86RotateDestroy (xf86CrtcPtr crtc) } } +_X_EXPORT void +xf86RotateFreeShadow(ScrnInfoPtr pScrn) +{ + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); + int c; + + for (c = 0; c < config->num_crtc; c++) { + xf86CrtcPtr crtc = config->crtc[c]; + + if (crtc->rotatedPixmap || crtc->rotatedData) { + crtc->funcs->shadow_destroy(crtc, crtc->rotatedPixmap, + crtc->rotatedData); + crtc->rotatedPixmap = NULL; + crtc->rotatedData = NULL; + } + } +} + _X_EXPORT void xf86RotateCloseScreen (ScreenPtr screen) { @@ -489,112 +342,93 @@ xf86RotateCloseScreen (ScreenPtr screen) xf86RotateDestroy (xf86_config->crtc[c]); } +static Bool +xf86CrtcFitsScreen (xf86CrtcPtr crtc, struct pict_f_transform *crtc_to_fb) +{ + ScrnInfoPtr pScrn = crtc->scrn; + BoxRec b; + + /* When called before PreInit, the driver is + * presumably doing load detect + */ + if (pScrn->virtualX == 0 || pScrn->virtualY == 0) + return TRUE; + + b.x1 = 0; + b.y1 = 0; + b.x2 = crtc->mode.HDisplay; + b.y2 = crtc->mode.VDisplay; + if (crtc_to_fb) + pixman_f_transform_bounds (crtc_to_fb, &b); + else { + b.x1 += crtc->x; + b.y1 += crtc->y; + b.x2 += crtc->x; + b.y2 += crtc->y; + } + + return (0 <= b.x1 && b.x2 <= pScrn->virtualX && + 0 <= b.y1 && b.y2 <= pScrn->virtualY); +} + _X_EXPORT Bool -xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation) +xf86CrtcRotate (xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); /* if this is called during ScreenInit() we don't have pScrn->pScreen yet */ ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex]; - PictTransform crtc_to_fb, fb_to_crtc; - - PictureTransformIdentity (&crtc_to_fb); - PictureTransformIdentity (&fb_to_crtc); - PictureTransformIsInverse ("identity", &crtc_to_fb, &fb_to_crtc); - if (rotation != RR_Rotate_0) + PictTransform crtc_to_fb; + struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc; + xFixed *new_params = NULL; + int new_nparams = 0; + PictFilterPtr new_filter = NULL; + int new_width = 0; + int new_height = 0; + RRTransformPtr transform = NULL; + Bool damage = FALSE; + + if (crtc->transformPresent) + transform = &crtc->transform; + + if (!RRTransformCompute (crtc->x, crtc->y, + crtc->mode.HDisplay, crtc->mode.VDisplay, + crtc->rotation, + transform, + + &crtc_to_fb, + &f_crtc_to_fb, + &f_fb_to_crtc) && + xf86CrtcFitsScreen (crtc, &f_crtc_to_fb)) { - xFixed rot_cos, rot_sin, rot_dx, rot_dy; - xFixed scale_x, scale_y, scale_dx, scale_dy; - int mode_w = crtc->mode.HDisplay; - int mode_h = crtc->mode.VDisplay; - - /* rotation */ - switch (rotation & 0xf) { - default: - case RR_Rotate_0: - rot_cos = F ( 1); rot_sin = F ( 0); - rot_dx = F ( 0); rot_dy = F ( 0); - break; - case RR_Rotate_90: - rot_cos = F ( 0); rot_sin = F ( 1); - rot_dx = F ( mode_h); rot_dy = F (0); - break; - case RR_Rotate_180: - rot_cos = F (-1); rot_sin = F ( 0); - rot_dx = F (mode_w); rot_dy = F ( mode_h); - break; - case RR_Rotate_270: - rot_cos = F ( 0); rot_sin = F (-1); - rot_dx = F ( 0); rot_dy = F ( mode_w); - break; - } - - PictureTransformRotate (&crtc_to_fb, &fb_to_crtc, rot_cos, rot_sin); - PictureTransformIsInverse ("rotate", &crtc_to_fb, &fb_to_crtc); - - PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, rot_dx, rot_dy); - PictureTransformIsInverse ("rotate translate", &crtc_to_fb, &fb_to_crtc); - - /* reflection */ - scale_x = F (1); - scale_dx = 0; - scale_y = F (1); - scale_dy = 0; - if (rotation & RR_Reflect_X) - { - scale_x = F(-1); - if (rotation & (RR_Rotate_0|RR_Rotate_180)) - scale_dx = F(mode_w); - else - scale_dx = F(mode_h); - } - if (rotation & RR_Reflect_Y) - { - scale_y = F(-1); - if (rotation & (RR_Rotate_0|RR_Rotate_180)) - scale_dy = F(mode_h); - else - scale_dy = F(mode_w); - } - - PictureTransformScale (&crtc_to_fb, &fb_to_crtc, scale_x, scale_y); - PictureTransformIsInverse ("scale", &crtc_to_fb, &fb_to_crtc); - - PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, scale_dx, scale_dy); - PictureTransformIsInverse ("scale translate", &crtc_to_fb, &fb_to_crtc); - - } - - /* - * If the untranslated transformation is the identity, - * disable the shadow buffer - */ - if (PictureTransformIsIdentity (&crtc_to_fb)) - { - crtc->transform_in_use = FALSE; - PictureTransformInitTranslate (&crtc->crtc_to_framebuffer, - F (-crtc->x), F (-crtc->y)); - PictureTransformInitTranslate (&crtc->framebuffer_to_crtc, - F ( crtc->x), F ( crtc->y)); + /* + * If the untranslated transformation is the identity, + * disable the shadow buffer + */ xf86RotateDestroy (crtc); + crtc->transform_in_use = FALSE; + if (new_params) + xfree (new_params); + new_params = NULL; + new_nparams = 0; + new_filter = NULL; + new_width = 0; + new_height = 0; } else { - PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, F(crtc->x), F(crtc->y)); - PictureTransformIsInverse ("offset", &crtc_to_fb, &fb_to_crtc); - - /* + /* * these are the size of the shadow pixmap, which * matches the mode, not the pre-rotated copy in the * frame buffer */ - int width = mode->HDisplay; - int height = mode->VDisplay; + int width = crtc->mode.HDisplay; + int height = crtc->mode.VDisplay; void *shadowData = crtc->rotatedData; PixmapPtr shadow = crtc->rotatedPixmap; int old_width = shadow ? shadow->drawable.width : 0; int old_height = shadow ? shadow->drawable.height : 0; - + /* Allocate memory for rotation */ if (old_width != width || old_height != height) { @@ -613,9 +447,9 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation) else { /* mark shadowed area as damaged so it will be repainted */ - xf86CrtcDamageShadow (crtc); + damage = TRUE; } - + if (!xf86_config->rotation_damage) { /* Create damage structure */ @@ -626,9 +460,32 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation) goto bail2; /* Wrap block handler */ - xf86_config->BlockHandler = pScreen->BlockHandler; - pScreen->BlockHandler = xf86RotateBlockHandler; + if (!xf86_config->BlockHandler) { + xf86_config->BlockHandler = pScreen->BlockHandler; + pScreen->BlockHandler = xf86RotateBlockHandler; + } } +#ifdef RANDR_12_INTERFACE + if (transform) + { + if (transform->nparams) { + new_params = xalloc (transform->nparams * sizeof (xFixed)); + if (new_params) { + memcpy (new_params, transform->params, + transform->nparams * sizeof (xFixed)); + new_nparams = transform->nparams; + new_filter = transform->filter; + } + } else + new_filter = transform->filter; + if (new_filter) + { + new_width = new_filter->width; + new_height = new_filter->height; + } + } +#endif + if (0) { bail2: @@ -647,15 +504,26 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation) return FALSE; } crtc->transform_in_use = TRUE; - crtc->crtc_to_framebuffer = crtc_to_fb; - crtc->framebuffer_to_crtc = fb_to_crtc; - crtc->bounds.x1 = 0; - crtc->bounds.x2 = crtc->mode.HDisplay; - crtc->bounds.y1 = 0; - crtc->bounds.y2 = crtc->mode.VDisplay; - PictureTransformBounds (&crtc->bounds, &crtc_to_fb); } - + crtc->crtc_to_framebuffer = crtc_to_fb; + crtc->f_crtc_to_framebuffer = f_crtc_to_fb; + crtc->f_framebuffer_to_crtc = f_fb_to_crtc; + if (crtc->params) + xfree (crtc->params); + crtc->params = new_params; + crtc->nparams = new_nparams; + crtc->filter = new_filter; + crtc->filter_width = new_width; + crtc->filter_height = new_height; + crtc->bounds.x1 = 0; + crtc->bounds.x2 = crtc->mode.HDisplay; + crtc->bounds.y1 = 0; + crtc->bounds.y2 = crtc->mode.VDisplay; + pixman_f_transform_bounds (&f_crtc_to_fb, &crtc->bounds); + + if (damage) + xf86CrtcDamageShadow (crtc); + /* All done */ return TRUE; } diff --git a/xorg-server/hw/xfree86/modes/xf86gtf.c b/xorg-server/hw/xfree86/modes/xf86gtf.c index acbac83b6..fed56bd12 100644 --- a/xorg-server/hw/xfree86/modes/xf86gtf.c +++ b/xorg-server/hw/xfree86/modes/xf86gtf.c @@ -62,6 +62,10 @@ #ifdef HAVE_XORG_CONFIG_H # include +#else +#ifdef HAVE_CONFIG_H +#include +#endif #endif #include "xf86.h" diff --git a/xorg-server/hw/xfree86/os-support/Makefile.am b/xorg-server/hw/xfree86/os-support/Makefile.am index f9a82c68d..04997a6cb 100644 --- a/xorg-server/hw/xfree86/os-support/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/Makefile.am @@ -1,10 +1,9 @@ SUBDIRS = bus @XORG_OS_SUBDIR@ misc $(DRI_SUBDIRS) -DIST_SUBDIRS = bsd bus misc linux lynxos solaris sysv sco usl hurd +DIST_SUBDIRS = bsd bus misc linux solaris sysv sco hurd -sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h \ - assyntax.h xf86OSmouse.h +sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h -EXTRA_DIST = int10Defines.h xf86OSpriv.h README.OS-lib +EXTRA_DIST = int10Defines.h xf86OSpriv.h # to get the grouping semantics right, you have to glom these three together # as one library, otherwise libtool will actively defeat your attempts to @@ -24,5 +23,4 @@ DISTCLEANFILES = xorgos.c # FIXME: These don't seem to be used anywhere EXTRA_DIST += \ - shared/bios_devmem.c \ - shared/inout.S + shared/bios_devmem.c diff --git a/xorg-server/hw/xfree86/os-support/Makefile.in b/xorg-server/hw/xfree86/os-support/Makefile.in index 6982a4366..18e2ffde3 100644 --- a/xorg-server/hw/xfree86/os-support/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,7 +45,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -61,9 +60,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -96,8 +92,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -118,10 +115,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -143,6 +136,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -152,18 +146,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -182,7 +173,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -196,7 +187,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -208,8 +202,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -218,8 +211,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -252,7 +245,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -262,27 +254,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -293,10 +270,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -305,13 +278,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -344,8 +312,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -365,7 +332,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -375,12 +341,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -398,17 +364,12 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ SUBDIRS = bus @XORG_OS_SUBDIR@ misc $(DRI_SUBDIRS) -DIST_SUBDIRS = bsd bus misc linux lynxos solaris sysv sco usl hurd -sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h \ - assyntax.h xf86OSmouse.h - +DIST_SUBDIRS = bsd bus misc linux solaris sysv sco hurd +sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h # FIXME: These don't seem to be used anywhere -EXTRA_DIST = int10Defines.h xf86OSpriv.h README.OS-lib \ - shared/bios_devmem.c shared/inout.S +EXTRA_DIST = int10Defines.h xf86OSpriv.h shared/bios_devmem.c # to get the grouping semantics right, you have to glom these three together # as one library, otherwise libtool will actively defeat your attempts to @@ -429,8 +390,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -593,7 +554,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/os-support/README.OS-lib b/xorg-server/hw/xfree86/os-support/README.OS-lib deleted file mode 100644 index e410906f9..000000000 --- a/xorg-server/hw/xfree86/os-support/README.OS-lib +++ /dev/null @@ -1,505 +0,0 @@ - - README for XFree86 OS-support Layer - ----------------------------------- - -Contents --------- - 1) Overview - 2) Directory Layout - 3) Adding a new OS - 4) OS Support API - -1 - Overview ------------- - This directory contains the OS support layer functions for the XFree86 -servers. In addition, some miscellaneous server support functions (not -OS-dependent) are included here, to take advantage of the fact that this -library comes last in the linking order. - -Most of the functionality required to support a new OS is encapsulated in -this library. It is hoped that all OS-specific details can be encapsulated, -but that is not likely ever to be completely possible. Hence some minor -changes will wind up being made in other parts of the server. The major -design principles for this library are maintainability, readability, and -portability. Sometimes these goals conflict; some somewhat arbitrary choices -have been made in implementation. - -2 - Directory Layout --------------------- - os-support/ Contains headers and documentation; no code - misc/ Non-OS-specific miscellaneous functions that - fit best into the link architecture this way. - shared/ Contains files with functions used by more than one - OS. These are symlinked into the OS subdirectories - at build time via Imakefile rules. This is alway - preferable to reproducing functions in more than one - OS library. - bsd/ OS support for the 386BSD/NetBSD/FreeBSD operating - systems. - bsdi/ OS support for the BSD/386 operating system. - linux/ OS support for the Linux operating system. - sco/ OS support for the SCO SVR3.x operating system. - solx86/ OS support for the Solaris x86 operating system. - sysv/ OS support for all SVR4.0 and SVR4.2, and for - ISC and AT&T SVR3.2 operating systems. - -3 - Adding A New OS -------------------- - Adding a support for a new operating system entails implementing all of -the functions described in the API below. Many of these functions are no-ops -for many operating systems, and appropriate files with dummy declarations are -available in the 'shared' subdirectory. - -If your OS is sufficiently similar to an existing OS, you can make use of -the existing subdirectory. One of the reasons for implementing this OS -library was the unmaintainability of the spagetti-#ifdef code that existed -before. You should try to avoid cluttering the code with #ifdef's. If -you find that the subdirectory is getting cluttered, split off into a -seperate subdirectory (e.g. as was done for SCO, rather than cluttering -the 'sysv' subdirectory). You can split functions out of an existing -subdirectory into the 'shared' subdirectory, if that is appropriate. Just -remember to update the Imakefile for the old subdirectory. - -You will still likely have to make some small changes to other parts of -the server. You should not put OS-specific #define's or #include's anywhere -else in the server. These should all go in the "xf86_OSlib.h" header file -in this directory. - -4 - OS Support API ------------------ -void xf86OpenConsole(void) -{ - /* - * Open console device, activate VTs, etc, etc. Fill in requisite - * pieces of xf86Info. Most of this code comes from xf86Init.c - */ -} - -void xf86CloseConsole(void) -{ - /* - * Close console at server exit. - */ -} - -Bool xf86VTSwitchPending(void) -{ - /* - * Returns TRUE iff there is a VT switch operation pending for - * the server. In the USL VT model, this is indicated via a - * signal handler. Should return FALSE always for OSs without - * VTs. - */ -} - -Bool xf86VTSwitchAway(void) -{ - /* - * Handles the OS-specific action for switching away from the active - * VT. Returns FALSE if the switch away fails. Should return - * FALSE always for OSs without VTs (then again, this function - * should never be called in that case). - */ -} - -Bool xf86VTSwitchTo(void) -{ - /* - * Handles the OS-specific action for switching to the active VT. - * Returns FALSE if the switch to fails. Should return TRUE - * always for OSs without VTs (then again, this function should - * never be called in that case). - */ -} - -Bool xf86LinearVidMem(void) -{ - /* - * Returns TRUE if the OS supports mapping linear frame buffers - * (ie memory at addresses above physical memory). - */ -} - -pointer xf86MapVidMem(int ScreenNum, pointer Base, unsigned long Size) -{ - /* - * Handle mapping the video memory. Returns (pointer *)0 for - * failure; causes server exit. It is allowable to call FatalError() - * from inside this function and exit directly. - */ -} - -void xf86UnMapVidMem(int ScreenNum, pointer Base, unsigned long Size) -{ - /* - * Handle unmapping the video memory. This should undo what - * xf86MapVidMem() does. Base is a pointer obtained from - * a previous call to xf86MapVidMem(). - */ -} - -void xf86MapDisplay(int ScreenNum, int Region) -{ - /* - * For OSs that require the screen be mapped when entering a VT. - * A dummy function will be defined for OSs that don't require - * this (or don't have VTs at all). - */ -} - -void xf86UnMapDisplay(int ScreenNum, int Region) -{ - /* - * For Os that require that the screen be unmapped when leaving a - * VT. A dummy function will be defined for OSs that don't require - * this (or don't have VTs at all). - */ -} - -int xf86ReadBIOS(unsigned long Base, unsigned long Offset, - unsigned char *Buf, int Len) -{ - /* - * Read Len bytes from the BIOS at address Base, offset Offset, - * into buffer Buf. Returns -1 for failure or if the OS does - * not support reading the BIOS. This causes a driver probe - * to fail, but does not cause the server to abort. - */ -} - - -void xf86EnableIOPorts(int ScreenNum) -{ - /* - * Enables I/O permissions. The OS layer should - * enable all I/O port access. - */ -} - -void xf86DisableIOPorts(int ScreenNum) -{ - /* - * Disables I/O permissions. - */ -} - -Bool xf86DisableInterrupts(void) -{ - /* - * Disable interrupts if allowed for this OS. Returns FALSE if - * this is not allowed or if the attempt fails for some reason. - */ -} - -void xf86EnableInterrupts(void) -{ - /* - * Reenable interrupts - */ -} - -int xf86ProcessArgument(int argc, char *argv[], int i) -{ - /* - * Process OS-specific command-line arguments. See - * ddxProcessArgument() for more info. - */ -} - -void xf86UseMsg(void) -{ - /* - * Print list of OS-specific command-line arguments. See - * ddxUseMsg() for more info. - */ -} - -void xf86SoundKbdBell(int loudness, int pitch, int duration) -{ - /* - * Sound the keyboard bell. pitch is in Hz, duration in ms, - * loudness is in the range 0-100 (0 -> off). For systems - * where the loudness can't be controlled, scale the duration - * by loudness/50. - */ -} - -void xf86SetKbdLeds(int leds) -{ - /* - * Set the keyboard LEDs to the state indicated in leds - */ -} - -int xf86GetKbdLeds(void) -{ - /* - * Return the state of the keyboard LEDs. If the OS doesn't - * support this, return 0. - */ -} - -void xf86SetKbdRepeat(char rad) -{ - /* - * Set the keyboard repeat rate and delay according the - * the rad value. The lower 5 bits determine the repeat - * rate (lower value -> higher rate). The next 2 bits - * determine the delay. - * This should possibly be changed to take separate rate and - * delay parameters. - */ -} - -void xf86KbdInit(void) -{ - /* - * Save initial keyboard state. This is called at the start of - * each server generation. - */ -} - -int xf86KbdOn(void) -{ - /* - * Set the keyboard up for use with X. This is called whenever - * the server becomes active (ie at the start of each generation and - * whenever its VT becomes active). Return the file descriptor - * for keyboard input. Return -1 if there is no file descriptor - * to add as an input device. If there are errors encountered, - * call FatalError(). A return value of -1 is not considered an - * error condition. - */ -} - -int xf86KbdOff(void) -{ - /* - * Return the keyboard to the state saved by xf86KbdInit(). This is - * called at the end of a server generation, and also when the - * server's VT ceases being active. Returns the keyboard file - * descriptor. Returns -1 if there is no file descriptor to be - * removed as an input device. Errors should be handled the same - * way as in xf86KbdOn(). - */ -} - -void xf86KbdEvents(void) -{ - /* - * Read characters from the keyboard device, and post the events - * by calling xf86PostKbdEvent(). Read as much as is available - * without waiting. - */ -} - -void xf86SetMouseSpeed(int old, int new, unsigned cflag) -{ - /* - * Set the speed of the mouse port. old is the previous speed, - * new is the new speed, and cflag is the value of the termio[s] - * c_cflag field. For mice that have programmable speed operation, - * this should send the appropriate commands to the mouse. - */ -} - -void xf86MouseInit(void) -{ - /* - * This is called at the start of each server generation. In most - * cases this is a noop. If the mouse must not be opened/closed - * when VT switching, the open should be done here. - */ -} - -int xf86MousedOn(void) -{ - /* - * Set the mouse up for use with X. This is called whenever - * the server becomes active (ie at the start of each generation and - * whenever its VT becomes active). This function normally opens - * the mouse device, and may call xf86SetupMouse() to initialise - * the mouse parameters. Return the file descriptor for mouse input. - * Return -1 if there is no file descriptor to add as an input - * device. If there are errors encountered, call FatalError(). - * A return value of -1 is not considered an error condition. - */ -} - -int xf86MouseOff(Bool doclose) -{ - /* - * Release the mouse from use with X. This is called at the end - * of a server generation (with doclose==TRUE), and also when the - * server's VT ceases being active (with doclose==FALSE). If the - * mouse should not be opened/closed when VT switching, the close - * should be done here when doclose==TRUE. For other systems, the - * mouse device should be closed regardless of the doclose value. - * Returns the mouse file descriptor. Returns -1 if there is no - * file descriptor to be removed as an input device. Errors - * should be handled the same way as in xf86MouseOn(). - */ -} - -void xf86MouseEvents(void) -{ - /* - * Read characters from the mouse device, and post the events - * by calling xf86PostMseEvent(). Read as much as is available - * without waiting. If the OS doesn't handle the mouse protocol - * translation, xf86MouseProtocol() may be called to do the - * translation and event posting. If the OS does handle the protocol - * translation, MOUSE_PROTOCOL_IN_KERNEL should be #define'd in - * xf86_OSlib.h. - */ -} - -int xf86OsMouseProc(DevicePtr pPointer, int what) -{ - /* - * Implements the device-proc for the pointer device when an - * OS-based mouse driver is being used (as opposed to the - * server's internal mouse driver). Implemented as any other - * device-proc in the server. - * - * This function only needs to be implemented if USE_OSMOUSE is - * defined for the OS. - */ -} - -int xf86OsMouseEvents(void) -{ - /* - * When supporting an OS-based mouse driver (as opposed to the - * server's internal mouse driver), read some events from the device - * and post them to the DIX layer through xf86PostMseEvent(). - * - * This function only needs to be implemented if USE_OSMOUSE is - * defined for the OS. - */ -} - -void xf86OsMouseOption(int token, pointer lex_ptr) -{ - /* - * Used in parsing an OsMouse keyword from the Xconfig file. - * Passed the token type and a pointer to the token value. - * The function should do whatever is appropriate for the OS's - * mouse driver. - * - * This function only needs to be implemented if USE_OSMOUSE is - * defined for the OS. - */ -} - -/* - * The following functions are simply wrappers around the OS specific - * libc functions - */ - -void * -xf86memmove(void * dest, const void * src, INT32 n) -{ - return(memmove(dest,src,n)); -} - -void * -xf86memset(void * s, int c, INT32 n) -{ - return(memset(s,c,n)); -} - -void * -xf86memcpy(void * dest, const void * src, INT32 n) -{ - return(memcpy(dest,src,n)); -} - -int -xf86memcmp(const void * s1, const void * s2, INT32 n) -{ - return(memcmp(s1,s2,n)); -} - -char * -xf86strcat(char * dest, const char * src) -{ - return(strcat(dest,src)); -} - -char * -xf86strcpy(char * dest, const char * src) -{ - return(strcpy(dest,src)); -} - -int -xf86strcmp(const char * s1, const char * s2) -{ - return(strcmp(s1,s2)); -} - -int -xf86strncmp(const char * s1, const char * s2, INT32 n) -{ - return(strncmp(s1,s2,n)); -} - -size_t -xf86strlen(const char * s) -{ - return(strlen(s)); -} - -void -xf86getsecs(INT32 * secs, INT32 * usecs) -{ - struct timeval tv; - - gettimeofday(&tv, NULL); - *secs = tv.tv_sec; - *usecs= tv.tv_usec; - - return; -} - -double -xf86exp(double x) -{ - return(exp(x)); -} - -double -xf86log(double x) -{ - return(log(x)); -} - -double -xf86pow(double x, double y) -{ - return(pow(x,y)); -} - -double -xf86sqrt(double x) -{ - return(sqrt(x)); -} - -double -xf86cos(double x) -{ - return(cos(x)); -} - - - - -$XFree86: xc/programs/Xserver/hw/xfree86/os-support/README.OS-lib,v 3.10 2001/12/17 20:00:45 dawes Exp $ - - - - - -$XConsortium: README.OS-lib /main/5 1996/02/21 17:50:28 kaleb $ diff --git a/xorg-server/hw/xfree86/os-support/assyntax.h b/xorg-server/hw/xfree86/os-support/assyntax.h deleted file mode 100644 index d3e96e5fd..000000000 --- a/xorg-server/hw/xfree86/os-support/assyntax.h +++ /dev/null @@ -1,749 +0,0 @@ -#ifndef __ASSYNTAX_H__ -#define __ASSYNTAX_H__ - -/* - * Copyright 1992 Vrije Universiteit, The Netherlands - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of the Vrije Universiteit not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. The Vrije Universiteit makes no - * representations about the suitability of this software for any purpose. - * It is provided "as is" without express or implied warranty. - * - * The Vrije Universiteit DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL The Vrije Universiteit BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -/* - * Copyright (c) 1993-1999 by The XFree86 Project, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the copyright holder(s) - * and author(s) shall not be used in advertising or otherwise to promote - * the sale, use or other dealings in this Software without prior written - * authorization from the copyright holder(s) and author(s). - */ - - /* - * assyntax.h - * - * Select the syntax appropriate to the 386 assembler being used - * To add support for more assemblers add more columns to the CHOICE - * macro. Note that register names must also have uppercase names - * to avoid macro recursion. e.g., #define ah %ah recurses! - * - * NB 1. Some of the macros for certain assemblers imply that the code is to - * run in protected mode!! Caveat emptor. - * - * NB 2. 486 specific instructions are not included. This is to discourage - * their accidental use in code that is intended to run on 386 and 486 - * systems. - * - * Supported assemblers: - * - * (a) AT&T SysVr4 as(1): default - * (b) GNU Assembler gas: define USE_GAS or GNU_ASSEMBLER - * (c) Amsterdam Compiler kit: define ACK_ASSEMBLER - * - * The following naming conventions have been used to identify the various - * data types: - * _SR = segment register version - * Integer: - * _Q = quadword = 64 bits - * _L = long = 32 bits - * _W = short = 16 bits - * _B = byte = 8 bits - * Floating-point: - * _X = m80real = 80 bits - * _D = double = 64 bits - * _S = single = 32 bits - * - * Author: Gregory J. Sharp, Sept 1992 - * Vrije Universiteit, Amsterdam, The Netherlands - */ - -#if defined(USE_GAS) && !defined(GNU_ASSEMBLER) -#define GNU_ASSEMBLER -#endif - -#if (defined(__STDC__) && !defined(UNIXCPP)) || (defined (sun) && defined (__i386__) && defined (SVR4) && defined (__STDC__) && !defined (__GNUC__)) -#define CONCAT(x, y) x ## y -#else -#define CONCAT(x, y) x/**/y -#endif - -#ifdef ACK_ASSEMBLER - -/* Assume we write code for 32-bit protected mode! */ - -/* Redefine register names for GAS & AT&T assemblers */ -#define AL al -#define AH ah -#define AX ax -#define EAX ax -#define BL bl -#define BH bh -#define BX bx -#define EBX bx -#define CL cl -#define CH ch -#define CX cx -#define ECX cx -#define DL dl -#define DH dh -#define DX dx -#define EDX dx -#define BP bp -#define EBP bp -#define SI si -#define ESI si -#define DI di -#define EDI di -#define SP sp -#define ESP sp -#define CS cs -#define SS ss -#define DS ds -#define ES es -#define FS fs -#define GS gs -/* Control Registers */ -#define CR0 cr0 -#define CR1 cr1 -#define CR2 cr2 -#define CR3 cr3 -/* Debug Registers */ -#define DR0 dr0 -#define DR1 dr1 -#define DR2 dr2 -#define DR3 dr3 -#define DR4 dr4 -#define DR5 dr5 -#define DR6 dr6 -#define DR7 dr7 -/* Floating-point Stack */ -#define ST st - -#define AS_BEGIN .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text - - -#define _WTOG o16 /* word toggle for _W instructions */ -#define _LTOG /* long toggle for _L instructions */ -#define ADDR_TOGGLE a16 -#define OPSZ_TOGGLE o16 -#define USE16 .use16 -#define USE32 .use32 - -#define CHOICE(a,b,c) c - -#else /* AT&T or GAS */ - -/* Redefine register names for GAS & AT&T assemblers */ -#define AL %al -#define AH %ah -#define AX %ax -#define EAX %eax -#define BL %bl -#define BH %bh -#define BX %bx -#define EBX %ebx -#define CL %cl -#define CH %ch -#define CX %cx -#define ECX %ecx -#define DL %dl -#define DH %dh -#define DX %dx -#define EDX %edx -#define BP %bp -#define EBP %ebp -#define SI %si -#define ESI %esi -#define DI %di -#define EDI %edi -#define SP %sp -#define ESP %esp -#define CS %cs -#define SS %ss -#define DS %ds -#define ES %es -#define FS %fs -#define GS %gs -/* Control Registers */ -#define CR0 %cr0 -#define CR1 %cr1 -#define CR2 %cr2 -#define CR3 %cr3 -/* Debug Registers */ -#define DR0 %db0 -#define DR1 %db1 -#define DR2 %db2 -#define DR3 %db3 -#define DR4 %db4 -#define DR5 %db5 -#define DR6 %db6 -#define DR7 %db7 -/* Floating-point Stack */ -#define ST %st - -#define AS_BEGIN -#define USE16 -#define USE32 - -#ifdef GNU_ASSEMBLER - -#define ADDR_TOGGLE aword -#define OPSZ_TOGGLE word - -#define CHOICE(a,b,c) b - -#else -/* - * AT&T ASSEMBLER SYNTAX - * ********************* - */ -#define CHOICE(a,b,c) a - -#define ADDR_TOGGLE addr16 -#define OPSZ_TOGGLE data16 - -#endif /* GNU_ASSEMBLER */ -#endif /* ACK_ASSEMBLER */ - - -#if defined(__QNX__) || defined(Lynx) || (defined(SYSV) || defined(SVR4)) && !defined(ACK_ASSEMBLER) || defined(__ELF__) || defined(__GNU__) -#define GLNAME(a) a -#else -#define GLNAME(a) CONCAT(_,a) -#endif - - - /****************************************/ - /* */ - /* Select the various choices */ - /* */ - /****************************************/ - - -/* Redefine assembler directives */ -/*********************************/ -#define GLOBL CHOICE(.globl, .globl, .extern) -#define ALIGNTEXT4 CHOICE(.align 4, .align ARG2(2,0x90), .align 4) -#define ALIGNTEXT2 CHOICE(.align 2, .align ARG2(1,0x90), .align 2) -/* ALIGNTEXT4ifNOP is the same as ALIGNTEXT4, but only if the space is - * guaranteed to be filled with NOPs. Otherwise it does nothing. - */ -#define ALIGNTEXT4ifNOP CHOICE(.align 4, .align ARG2(2,0x90), /*can't do it*/) -#define ALIGNDATA4 CHOICE(.align 4, .align ARG2(2,0x0), .align 4) -#define ALIGNDATA2 CHOICE(.align 2, .align ARG2(1,0x0), .align 2) -#define FILE(s) CHOICE(.file s, .file s, .file s) -#define STRING(s) CHOICE(.string s, .asciz s, .asciz s) -#define D_LONG CHOICE(.long, .long, .data4) -#define D_WORD CHOICE(.value, .short, .data2) -#define D_BYTE CHOICE(.byte, .byte, .data1) -#define SPACE CHOICE(.comm, .space, .space) -#define COMM CHOICE(.comm, .comm, .comm) -#define SEG_DATA CHOICE(.data, .data, .sect .data) -#define SEG_TEXT CHOICE(.text, .text, .sect .text) -#define SEG_BSS CHOICE(.bss, .bss, .sect .bss) - -#ifdef GNU_ASSEMBLER -#define D_SPACE(n) . = . + n -#else -#define D_SPACE(n) .space n -#endif - -/* Addressing Modes */ -/* Immediate Mode */ -#define ADDR(a) CHOICE(CONCAT($,a), CONCAT($,a), a) -#define CONST(a) CHOICE(CONCAT($,a), CONCAT($,a), a) - -/* Indirect Mode */ -#define CONTENT(a) CHOICE(a, a, (a)) /* take contents of variable */ -#define REGIND(a) CHOICE((a), (a), (a)) /* Register a indirect */ -/* Register b indirect plus displacement a */ -#define REGOFF(a, b) CHOICE(a(b), a(b), a(b)) -/* Reg indirect Base + Index + Displacement - this is mainly for 16-bit mode - * which has no scaling - */ -#define REGBID(b,i,d) CHOICE(d(b,i), d(b,i), d(b)(i)) -/* Reg indirect Base + (Index * Scale) + Displacement */ -#define REGBISD(b,i,s,d) CHOICE(d(b,i,s), d(b,i,s), d(b)(i*s)) -/* Displaced Scaled Index: */ -#define REGDIS(d,i,s) CHOICE(d(,i,s), d(,i,s), d(i * s)) -/* Indexed Base: */ -#define REGBI(b,i) CHOICE((b,i), (b,i), (b)(i)) -/* Displaced Base: */ -#define REGDB(d,b) CHOICE(d(b), d(b), d(b)) -/* Variable indirect: */ -#define VARINDIRECT(var) CHOICE(*var, *var, (var)) -/* Use register contents as jump/call target: */ -#define CODEPTR(reg) CHOICE(*reg, *reg, reg) - -/* For expressions requiring bracketing - * eg. (CRT0_PM | CRT_EM) - */ - -#define EXPR(a) CHOICE([a], (a), [a]) -#define ENOT(a) CHOICE(0!a, ~a, ~a) -#define EMUL(a,b) CHOICE(a\*b, a*b, a*b) -#define EDIV(a,b) CHOICE(a\/b, a/b, a/b) - -/* - * We have to beat the problem of commas within arguments to choice. - * eg. choice (add a,b, add b,a) will get argument mismatch. Luckily ANSI - * and other known cpp definitions evaluate arguments before substitution - * so the following works. - */ -#define ARG2(a, b) a,b -#define ARG3(a,b,c) a,b,c - -/* Redefine assembler commands */ -#define AAA CHOICE(aaa, aaa, aaa) -#define AAD CHOICE(aad, aad, aad) -#define AAM CHOICE(aam, aam, aam) -#define AAS CHOICE(aas, aas, aas) -#define ADC_L(a, b) CHOICE(adcl ARG2(a,b), adcl ARG2(a,b), _LTOG adc ARG2(b,a)) -#define ADC_W(a, b) CHOICE(adcw ARG2(a,b), adcw ARG2(a,b), _WTOG adc ARG2(b,a)) -#define ADC_B(a, b) CHOICE(adcb ARG2(a,b), adcb ARG2(a,b), adcb ARG2(b,a)) -#define ADD_L(a, b) CHOICE(addl ARG2(a,b), addl ARG2(a,b), _LTOG add ARG2(b,a)) -#define ADD_W(a, b) CHOICE(addw ARG2(a,b), addw ARG2(a,b), _WTOG add ARG2(b,a)) -#define ADD_B(a, b) CHOICE(addb ARG2(a,b), addb ARG2(a,b), addb ARG2(b,a)) -#define AND_L(a, b) CHOICE(andl ARG2(a,b), andl ARG2(a,b), _LTOG and ARG2(b,a)) -#define AND_W(a, b) CHOICE(andw ARG2(a,b), andw ARG2(a,b), _WTOG and ARG2(b,a)) -#define AND_B(a, b) CHOICE(andb ARG2(a,b), andb ARG2(a,b), andb ARG2(b,a)) -#define ARPL(a,b) CHOICE(arpl ARG2(a,b), arpl ARG2(a,b), arpl ARG2(b,a)) -#define BOUND_L(a, b) CHOICE(boundl ARG2(a,b), boundl ARG2(b,a), _LTOG bound ARG2(b,a)) -#define BOUND_W(a, b) CHOICE(boundw ARG2(a,b), boundw ARG2(b,a), _WTOG bound ARG2(b,a)) -#define BSF_L(a, b) CHOICE(bsfl ARG2(a,b), bsfl ARG2(a,b), _LTOG bsf ARG2(b,a)) -#define BSF_W(a, b) CHOICE(bsfw ARG2(a,b), bsfw ARG2(a,b), _WTOG bsf ARG2(b,a)) -#define BSR_L(a, b) CHOICE(bsrl ARG2(a,b), bsrl ARG2(a,b), _LTOG bsr ARG2(b,a)) -#define BSR_W(a, b) CHOICE(bsrw ARG2(a,b), bsrw ARG2(a,b), _WTOG bsr ARG2(b,a)) -#define BT_L(a, b) CHOICE(btl ARG2(a,b), btl ARG2(a,b), _LTOG bt ARG2(b,a)) -#define BT_W(a, b) CHOICE(btw ARG2(a,b), btw ARG2(a,b), _WTOG bt ARG2(b,a)) -#define BTC_L(a, b) CHOICE(btcl ARG2(a,b), btcl ARG2(a,b), _LTOG btc ARG2(b,a)) -#define BTC_W(a, b) CHOICE(btcw ARG2(a,b), btcw ARG2(a,b), _WTOG btc ARG2(b,a)) -#define BTR_L(a, b) CHOICE(btrl ARG2(a,b), btrl ARG2(a,b), _LTOG btr ARG2(b,a)) -#define BTR_W(a, b) CHOICE(btrw ARG2(a,b), btrw ARG2(a,b), _WTOG btr ARG2(b,a)) -#define BTS_L(a, b) CHOICE(btsl ARG2(a,b), btsl ARG2(a,b), _LTOG bts ARG2(b,a)) -#define BTS_W(a, b) CHOICE(btsw ARG2(a,b), btsw ARG2(a,b), _WTOG bts ARG2(b,a)) -#define CALL(a) CHOICE(call a, call a, call a) -#define CALLF(s,a) CHOICE(lcall ARG2(s,a), lcall ARG2(s,a), callf s:a) -#define CBW CHOICE(cbtw, cbw, cbw) -#define CWDE CHOICE(cwtd, cwde, cwde) -#define CLC CHOICE(clc, clc, clc) -#define CLD CHOICE(cld, cld, cld) -#define CLI CHOICE(cli, cli, cli) -#define CLTS CHOICE(clts, clts, clts) -#define CMC CHOICE(cmc, cmc, cmc) -#define CMP_L(a, b) CHOICE(cmpl ARG2(a,b), cmpl ARG2(a,b), _LTOG cmp ARG2(b,a)) -#define CMP_W(a, b) CHOICE(cmpw ARG2(a,b), cmpw ARG2(a,b), _WTOG cmp ARG2(b,a)) -#define CMP_B(a, b) CHOICE(cmpb ARG2(a,b), cmpb ARG2(a,b), cmpb ARG2(b,a)) -#define CMPS_L CHOICE(cmpsl, cmpsl, _LTOG cmps) -#define CMPS_W CHOICE(cmpsw, cmpsw, _WTOG cmps) -#define CMPS_B CHOICE(cmpsb, cmpsb, cmpsb) -#define CWD CHOICE(cwtl, cwd, cwd) -#define CDQ CHOICE(cltd, cdq, cdq) -#define DAA CHOICE(daa, daa, daa) -#define DAS CHOICE(das, das, das) -#define DEC_L(a) CHOICE(decl a, decl a, _LTOG dec a) -#define DEC_W(a) CHOICE(decw a, decw a, _WTOG dec a) -#define DEC_B(a) CHOICE(decb a, decb a, decb a) -#define DIV_L(a) CHOICE(divl a, divl a, div a) -#define DIV_W(a) CHOICE(divw a, divw a, div a) -#define DIV_B(a) CHOICE(divb a, divb a, divb a) -#define ENTER(a,b) CHOICE(enter ARG2(a,b), enter ARG2(a,b), enter ARG2(b,a)) -#define HLT CHOICE(hlt, hlt, hlt) -#define IDIV_L(a) CHOICE(idivl a, idivl a, _LTOG idiv a) -#define IDIV_W(a) CHOICE(idivw a, idivw a, _WTOG idiv a) -#define IDIV_B(a) CHOICE(idivb a, idivb a, idivb a) -/* More forms than this for imul!! */ -#define IMUL_L(a, b) CHOICE(imull ARG2(a,b), imull ARG2(a,b), _LTOG imul ARG2(b,a)) -#define IMUL_W(a, b) CHOICE(imulw ARG2(a,b), imulw ARG2(a,b), _WTOG imul ARG2(b,a)) -#define IMUL_B(a) CHOICE(imulb a, imulb a, imulb a) -#define IN_L CHOICE(inl (DX), inl ARG2(DX,EAX), _LTOG in DX) -#define IN_W CHOICE(inw (DX), inw ARG2(DX,AX), _WTOG in DX) -#define IN_B CHOICE(inb (DX), inb ARG2(DX,AL), inb DX) -/* Please AS code writer: use the following ONLY, if you refer to ports<256 - * directly, but not in IN1_W(DX), for instance, even if IN1_ looks nicer - */ -#if defined (sun) -#define IN1_L(a) CHOICE(inl (a), inl ARG2(a,EAX), _LTOG in a) -#define IN1_W(a) CHOICE(inw (a), inw ARG2(a,AX), _WTOG in a) -#define IN1_B(a) CHOICE(inb (a), inb ARG2(a,AL), inb a) -#else -#define IN1_L(a) CHOICE(inl a, inl ARG2(a,EAX), _LTOG in a) -#define IN1_W(a) CHOICE(inw a, inw ARG2(a,AX), _WTOG in a) -#define IN1_B(a) CHOICE(inb a, inb ARG2(a,AL), inb a) -#endif -#define INC_L(a) CHOICE(incl a, incl a, _LTOG inc a) -#define INC_W(a) CHOICE(incw a, incw a, _WTOG inc a) -#define INC_B(a) CHOICE(incb a, incb a, incb a) -#define INS_L CHOICE(insl, insl, _LTOG ins) -#define INS_W CHOICE(insw, insw, _WTOG ins) -#define INS_B CHOICE(insb, insb, insb) -#define INT(a) CHOICE(int a, int a, int a) -#define INT3 CHOICE(int CONST(3), int3, int CONST(3)) -#define INTO CHOICE(into, into, into) -#define IRET CHOICE(iret, iret, iret) -#define IRETD CHOICE(iret, iret, iretd) -#define JA(a) CHOICE(ja a, ja a, ja a) -#define JAE(a) CHOICE(jae a, jae a, jae a) -#define JB(a) CHOICE(jb a, jb a, jb a) -#define JBE(a) CHOICE(jbe a, jbe a, jbe a) -#define JC(a) CHOICE(jc a, jc a, jc a) -#define JE(a) CHOICE(je a, je a, je a) -#define JG(a) CHOICE(jg a, jg a, jg a) -#define JGE(a) CHOICE(jge a, jge a, jge a) -#define JL(a) CHOICE(jl a, jl a, jl a) -#define JLE(a) CHOICE(jle a, jle a, jle a) -#define JNA(a) CHOICE(jna a, jna a, jna a) -#define JNAE(a) CHOICE(jnae a, jnae a, jnae a) -#define JNB(a) CHOICE(jnb a, jnb a, jnb a) -#define JNBE(a) CHOICE(jnbe a, jnbe a, jnbe a) -#define JNC(a) CHOICE(jnc a, jnc a, jnc a) -#define JNE(a) CHOICE(jne a, jne a, jne a) -#define JNG(a) CHOICE(jng a, jng a, jng a) -#define JNGE(a) CHOICE(jnge a, jnge a, jnge a) -#define JNL(a) CHOICE(jnl a, jnl a, jnl a) -#define JNLE(a) CHOICE(jnle a, jnle a, jnle a) -#define JNO(a) CHOICE(jno a, jno a, jno a) -#define JNP(a) CHOICE(jnp a, jnp a, jnp a) -#define JNS(a) CHOICE(jns a, jns a, jns a) -#define JNZ(a) CHOICE(jnz a, jnz a, jnz a) -#define JO(a) CHOICE(jo a, jo a, jo a) -#define JP(a) CHOICE(jp a, jp a, jp a) -#define JPE(a) CHOICE(jpe a, jpe a, jpe a) -#define JPO(a) CHOICE(jpo a, jpo a, jpo a) -#define JS(a) CHOICE(js a, js a, js a) -#define JZ(a) CHOICE(jz a, jz a, jz a) -#define JMP(a) CHOICE(jmp a, jmp a, jmp a) -#define JMPF(s,a) CHOICE(ljmp ARG2(s,a), ljmp ARG2(s,a), jmpf s:a) -#define LAHF CHOICE(lahf, lahf, lahf) -#if !defined(_REAL_MODE) && !defined(_V86_MODE) -#define LAR(a, b) CHOICE(lar ARG2(a, b), lar ARG2(a, b), lar ARG2(b, a)) -#endif -#define LEA_L(a, b) CHOICE(leal ARG2(a,b), leal ARG2(a,b), _LTOG lea ARG2(b,a)) -#define LEA_W(a, b) CHOICE(leaw ARG2(a,b), leaw ARG2(a,b), _WTOG lea ARG2(b,a)) -#define LEAVE CHOICE(leave, leave, leave) -#define LGDT(a) CHOICE(lgdt a, lgdt a, lgdt a) -#define LIDT(a) CHOICE(lidt a, lidt a, lidt a) -#define LDS(a, b) CHOICE(ldsl ARG2(a,b), lds ARG2(a,b), lds ARG2(b,a)) -#define LES(a, b) CHOICE(lesl ARG2(a,b), les ARG2(a,b), les ARG2(b,a)) -#define LFS(a, b) CHOICE(lfsl ARG2(a,b), lfs ARG2(a,b), lfs ARG2(b,a)) -#define LGS(a, b) CHOICE(lgsl ARG2(a,b), lgs ARG2(a,b), lgs ARG2(b,a)) -#define LSS(a, b) CHOICE(lssl ARG2(a,b), lss ARG2(a,b), lss ARG2(b,a)) -#define LLDT(a) CHOICE(lldt a, lldt a, lldt a) -#define LMSW(a) CHOICE(lmsw a, lmsw a, lmsw a) -#define LOCK CHOICE(lock, lock, lock) -#define LODS_L CHOICE(lodsl, lodsl, _LTOG lods) -#define LODS_W CHOICE(lodsw, lodsw, _WTOG lods) -#define LODS_B CHOICE(lodsb, lodsb, lodsb) -#define LOOP(a) CHOICE(loop a, loop a, loop a) -#define LOOPE(a) CHOICE(loope a, loope a, loope a) -#define LOOPZ(a) CHOICE(loopz a, loopz a, loopz a) -#define LOOPNE(a) CHOICE(loopne a, loopne a, loopne a) -#define LOOPNZ(a) CHOICE(loopnz a, loopnz a, loopnz a) -#if !defined(_REAL_MODE) && !defined(_V86_MODE) -#define LSL(a, b) CHOICE(lsl ARG2(a,b), lsl ARG2(a,b), lsl ARG2(b,a)) -#endif -#define LTR(a) CHOICE(ltr a, ltr a, ltr a) -#define MOV_SR(a, b) CHOICE(movw ARG2(a,b), mov ARG2(a,b), mov ARG2(b,a)) -#define MOV_L(a, b) CHOICE(movl ARG2(a,b), movl ARG2(a,b), _LTOG mov ARG2(b,a)) -#define MOV_W(a, b) CHOICE(movw ARG2(a,b), movw ARG2(a,b), _WTOG mov ARG2(b,a)) -#define MOV_B(a, b) CHOICE(movb ARG2(a,b), movb ARG2(a,b), movb ARG2(b,a)) -#define MOVS_L CHOICE(movsl, movsl, _LTOG movs) -#define MOVS_W CHOICE(movsw, movsw, _WTOG movs) -#define MOVS_B CHOICE(movsb, movsb, movsb) -#define MOVSX_BL(a, b) CHOICE(movsbl ARG2(a,b), movsbl ARG2(a,b), movsx ARG2(b,a)) -#define MOVSX_BW(a, b) CHOICE(movsbw ARG2(a,b), movsbw ARG2(a,b), movsx ARG2(b,a)) -#define MOVSX_WL(a, b) CHOICE(movswl ARG2(a,b), movswl ARG2(a,b), movsx ARG2(b,a)) -#define MOVZX_BL(a, b) CHOICE(movzbl ARG2(a,b), movzbl ARG2(a,b), movzx ARG2(b,a)) -#define MOVZX_BW(a, b) CHOICE(movzbw ARG2(a,b), movzbw ARG2(a,b), movzx ARG2(b,a)) -#define MOVZX_WL(a, b) CHOICE(movzwl ARG2(a,b), movzwl ARG2(a,b), movzx ARG2(b,a)) -#define MUL_L(a) CHOICE(mull a, mull a, _LTOG mul a) -#define MUL_W(a) CHOICE(mulw a, mulw a, _WTOG mul a) -#define MUL_B(a) CHOICE(mulb a, mulb a, mulb a) -#define NEG_L(a) CHOICE(negl a, negl a, _LTOG neg a) -#define NEG_W(a) CHOICE(negw a, negw a, _WTOG neg a) -#define NEG_B(a) CHOICE(negb a, negb a, negb a) -#define NOP CHOICE(nop, nop, nop) -#define NOT_L(a) CHOICE(notl a, notl a, _LTOG not a) -#define NOT_W(a) CHOICE(notw a, notw a, _WTOG not a) -#define NOT_B(a) CHOICE(notb a, notb a, notb a) -#define OR_L(a,b) CHOICE(orl ARG2(a,b), orl ARG2(a,b), _LTOG or ARG2(b,a)) -#define OR_W(a,b) CHOICE(orw ARG2(a,b), orw ARG2(a,b), _WTOG or ARG2(b,a)) -#define OR_B(a,b) CHOICE(orb ARG2(a,b), orb ARG2(a,b), orb ARG2(b,a)) -#define OUT_L CHOICE(outl (DX), outl ARG2(EAX,DX), _LTOG out DX) -#define OUT_W CHOICE(outw (DX), outw ARG2(AX,DX), _WTOG out DX) -#define OUT_B CHOICE(outb (DX), outb ARG2(AL,DX), outb DX) -/* Please AS code writer: use the following ONLY, if you refer to ports<256 - * directly, but not in OUT1_W(DX), for instance, even if OUT1_ looks nicer - */ -#define OUT1_L(a) CHOICE(outl (a), outl ARG2(EAX,a), _LTOG out a) -#define OUT1_W(a) CHOICE(outw (a), outw ARG2(AX,a), _WTOG out a) -#define OUT1_B(a) CHOICE(outb (a), outb ARG2(AL,a), outb a) -#define OUTS_L CHOICE(outsl, outsl, _LTOG outs) -#define OUTS_W CHOICE(outsw, outsw, _WTOG outs) -#define OUTS_B CHOICE(outsb, outsb, outsb) -#define POP_SR(a) CHOICE(pop a, pop a, pop a) -#define POP_L(a) CHOICE(popl a, popl a, _LTOG pop a) -#define POP_W(a) CHOICE(popw a, popw a, _WTOG pop a) -#define POPA_L CHOICE(popal, popal, _LTOG popa) -#define POPA_W CHOICE(popaw, popaw, _WTOG popa) -#define POPF_L CHOICE(popfl, popfl, _LTOG popf) -#define POPF_W CHOICE(popfw, popfw, _WTOG popf) -#define PUSH_SR(a) CHOICE(push a, push a, push a) -#define PUSH_L(a) CHOICE(pushl a, pushl a, _LTOG push a) -#define PUSH_W(a) CHOICE(pushw a, pushw a, _WTOG push a) -#define PUSH_B(a) CHOICE(push a, pushb a, push a) -#define PUSHA_L CHOICE(pushal, pushal, _LTOG pusha) -#define PUSHA_W CHOICE(pushaw, pushaw, _WTOG pusha) -#define PUSHF_L CHOICE(pushfl, pushfl, _LTOG pushf) -#define PUSHF_W CHOICE(pushfw, pushfw, _WTOG pushf) -#define RCL_L(a, b) CHOICE(rcll ARG2(a,b), rcll ARG2(a,b), _LTOG rcl ARG2(b,a)) -#define RCL_W(a, b) CHOICE(rclw ARG2(a,b), rclw ARG2(a,b), _WTOG rcl ARG2(b,a)) -#define RCL_B(a, b) CHOICE(rclb ARG2(a,b), rclb ARG2(a,b), rclb ARG2(b,a)) -#define RCR_L(a, b) CHOICE(rcrl ARG2(a,b), rcrl ARG2(a,b), _LTOG rcr ARG2(b,a)) -#define RCR_W(a, b) CHOICE(rcrw ARG2(a,b), rcrw ARG2(a,b), _WTOG rcr ARG2(b,a)) -#define RCR_B(a, b) CHOICE(rcrb ARG2(a,b), rcrb ARG2(a,b), rcrb ARG2(b,a)) -#define ROL_L(a, b) CHOICE(roll ARG2(a,b), roll ARG2(a,b), _LTOG rol ARG2(b,a)) -#define ROL_W(a, b) CHOICE(rolw ARG2(a,b), rolw ARG2(a,b), _WTOG rol ARG2(b,a)) -#define ROL_B(a, b) CHOICE(rolb ARG2(a,b), rolb ARG2(a,b), rolb ARG2(b,a)) -#define ROR_L(a, b) CHOICE(rorl ARG2(a,b), rorl ARG2(a,b), _LTOG ror ARG2(b,a)) -#define ROR_W(a, b) CHOICE(rorw ARG2(a,b), rorw ARG2(a,b), _WTOG ror ARG2(b,a)) -#define ROR_B(a, b) CHOICE(rorb ARG2(a,b), rorb ARG2(a,b), rorb ARG2(b,a)) -#define REP CHOICE(rep ;, rep ;, repe) -#define REPE CHOICE(repz ;, repe ;, repe) -#define REPNE CHOICE(repnz ;, repne ;, repne) -#define REPNZ REPNE -#define REPZ REPE -#define RET CHOICE(ret, ret, ret) -#define SAHF CHOICE(sahf, sahf, sahf) -#define SAL_L(a, b) CHOICE(sall ARG2(a,b), sall ARG2(a,b), _LTOG sal ARG2(b,a)) -#define SAL_W(a, b) CHOICE(salw ARG2(a,b), salw ARG2(a,b), _WTOG sal ARG2(b,a)) -#define SAL_B(a, b) CHOICE(salb ARG2(a,b), salb ARG2(a,b), salb ARG2(b,a)) -#define SAR_L(a, b) CHOICE(sarl ARG2(a,b), sarl ARG2(a,b), _LTOG sar ARG2(b,a)) -#define SAR_W(a, b) CHOICE(sarw ARG2(a,b), sarw ARG2(a,b), _WTOG sar ARG2(b,a)) -#define SAR_B(a, b) CHOICE(sarb ARG2(a,b), sarb ARG2(a,b), sarb ARG2(b,a)) -#define SBB_L(a, b) CHOICE(sbbl ARG2(a,b), sbbl ARG2(a,b), _LTOG sbb ARG2(b,a)) -#define SBB_W(a, b) CHOICE(sbbw ARG2(a,b), sbbw ARG2(a,b), _WTOG sbb ARG2(b,a)) -#define SBB_B(a, b) CHOICE(sbbb ARG2(a,b), sbbb ARG2(a,b), sbbb ARG2(b,a)) -#define SCAS_L CHOICE(scasl, scasl, _LTOG scas) -#define SCAS_W CHOICE(scasw, scasw, _WTOG scas) -#define SCAS_B CHOICE(scasb, scasb, scasb) -#define SETA(a) CHOICE(seta a, seta a, seta a) -#define SETAE(a) CHOICE(setae a, setae a, setae a) -#define SETB(a) CHOICE(setb a, setb a, setb a) -#define SETBE(a) CHOICE(setbe a, setbe a, setbe a) -#define SETC(a) CHOICE(setc a, setb a, setb a) -#define SETE(a) CHOICE(sete a, sete a, sete a) -#define SETG(a) CHOICE(setg a, setg a, setg a) -#define SETGE(a) CHOICE(setge a, setge a, setge a) -#define SETL(a) CHOICE(setl a, setl a, setl a) -#define SETLE(a) CHOICE(setle a, setle a, setle a) -#define SETNA(a) CHOICE(setna a, setna a, setna a) -#define SETNAE(a) CHOICE(setnae a, setnae a, setnae a) -#define SETNB(a) CHOICE(setnb a, setnb a, setnb a) -#define SETNBE(a) CHOICE(setnbe a, setnbe a, setnbe a) -#define SETNC(a) CHOICE(setnc a, setnb a, setnb a) -#define SETNE(a) CHOICE(setne a, setne a, setne a) -#define SETNG(a) CHOICE(setng a, setng a, setng a) -#define SETNGE(a) CHOICE(setnge a, setnge a, setnge a) -#define SETNL(a) CHOICE(setnl a, setnl a, setnl a) -#define SETNLE(a) CHOICE(setnle a, setnle a, setnle a) -#define SETNO(a) CHOICE(setno a, setno a, setno a) -#define SETNP(a) CHOICE(setnp a, setnp a, setnp a) -#define SETNS(a) CHOICE(setns a, setns a, setna a) -#define SETNZ(a) CHOICE(setnz a, setnz a, setnz a) -#define SETO(a) CHOICE(seto a, seto a, seto a) -#define SETP(a) CHOICE(setp a, setp a, setp a) -#define SETPE(a) CHOICE(setpe a, setpe a, setpe a) -#define SETPO(a) CHOICE(setpo a, setpo a, setpo a) -#define SETS(a) CHOICE(sets a, sets a, seta a) -#define SETZ(a) CHOICE(setz a, setz a, setz a) -#define SGDT(a) CHOICE(sgdt a, sgdt a, sgdt a) -#define SIDT(a) CHOICE(sidt a, sidt a, sidt a) -#define SHL_L(a, b) CHOICE(shll ARG2(a,b), shll ARG2(a,b), _LTOG shl ARG2(b,a)) -#define SHL_W(a, b) CHOICE(shlw ARG2(a,b), shlw ARG2(a,b), _WTOG shl ARG2(b,a)) -#define SHL_B(a, b) CHOICE(shlb ARG2(a,b), shlb ARG2(a,b), shlb ARG2(b,a)) -#define SHLD_L(a,b,c) CHOICE(shldl ARG3(a,b,c), shldl ARG3(a,b,c), _LTOG shld ARG3(c,b,a)) -#define SHLD2_L(a,b) CHOICE(shldl ARG2(a,b), shldl ARG3(CL,a,b), _LTOG shld ARG3(b,a,CL)) -#define SHLD_W(a,b,c) CHOICE(shldw ARG3(a,b,c), shldw ARG3(a,b,c), _WTOG shld ARG3(c,b,a)) -#define SHLD2_W(a,b) CHOICE(shldw ARG2(a,b), shldw ARG3(CL,a,b), _WTOG shld ARG3(b,a,CL)) -#define SHR_L(a, b) CHOICE(shrl ARG2(a,b), shrl ARG2(a,b), _LTOG shr ARG2(b,a)) -#define SHR_W(a, b) CHOICE(shrw ARG2(a,b), shrw ARG2(a,b), _WTOG shr ARG2(b,a)) -#define SHR_B(a, b) CHOICE(shrb ARG2(a,b), shrb ARG2(a,b), shrb ARG2(b,a)) -#define SHRD_L(a,b,c) CHOICE(shrdl ARG3(a,b,c), shrdl ARG3(a,b,c), _LTOG shrd ARG3(c,b,a)) -#define SHRD2_L(a,b) CHOICE(shrdl ARG2(a,b), shrdl ARG3(CL,a,b), _LTOG shrd ARG3(b,a,CL)) -#define SHRD_W(a,b,c) CHOICE(shrdw ARG3(a,b,c), shrdw ARG3(a,b,c), _WTOG shrd ARG3(c,b,a)) -#define SHRD2_W(a,b) CHOICE(shrdw ARG2(a,b), shrdw ARG3(CL,a,b), _WTOG shrd ARG3(b,a,CL)) -#define SLDT(a) CHOICE(sldt a, sldt a, sldt a) -#define SMSW(a) CHOICE(smsw a, smsw a, smsw a) -#define STC CHOICE(stc, stc, stc) -#define STD CHOICE(std, std, std) -#define STI CHOICE(sti, sti, sti) -#define STOS_L CHOICE(stosl, stosl, _LTOG stos) -#define STOS_W CHOICE(stosw, stosw, _WTOG stos) -#define STOS_B CHOICE(stosb, stosb, stosb) -#define STR(a) CHOICE(str a, str a, str a) -#define SUB_L(a, b) CHOICE(subl ARG2(a,b), subl ARG2(a,b), _LTOG sub ARG2(b,a)) -#define SUB_W(a, b) CHOICE(subw ARG2(a,b), subw ARG2(a,b), _WTOG sub ARG2(b,a)) -#define SUB_B(a, b) CHOICE(subb ARG2(a,b), subb ARG2(a,b), subb ARG2(b,a)) -#define TEST_L(a, b) CHOICE(testl ARG2(a,b), testl ARG2(a,b), _LTOG test ARG2(b,a)) -#define TEST_W(a, b) CHOICE(testw ARG2(a,b), testw ARG2(a,b), _WTOG test ARG2(b,a)) -#define TEST_B(a, b) CHOICE(testb ARG2(a,b), testb ARG2(a,b), testb ARG2(b,a)) -#define VERR(a) CHOICE(verr a, verr a, verr a) -#define VERW(a) CHOICE(verw a, verw a, verw a) -#define WAIT CHOICE(wait, wait, wait) -#define XCHG_L(a, b) CHOICE(xchgl ARG2(a,b), xchgl ARG2(a,b), _LTOG xchg ARG2(b,a)) -#define XCHG_W(a, b) CHOICE(xchgw ARG2(a,b), xchgw ARG2(a,b), _WTOG xchg ARG2(b,a)) -#define XCHG_B(a, b) CHOICE(xchgb ARG2(a,b), xchgb ARG2(a,b), xchgb ARG2(b,a)) -#define XLAT CHOICE(xlat, xlat, xlat) -#define XOR_L(a, b) CHOICE(xorl ARG2(a,b), xorl ARG2(a,b), _LTOG xor ARG2(b,a)) -#define XOR_W(a, b) CHOICE(xorw ARG2(a,b), xorw ARG2(a,b), _WTOG xor ARG2(b,a)) -#define XOR_B(a, b) CHOICE(xorb ARG2(a,b), xorb ARG2(a,b), xorb ARG2(b,a)) - - -/* Floating Point Instructions */ -#define F2XM1 CHOICE(f2xm1, f2xm1, f2xm1) -#define FABS CHOICE(fabs, fabs, fabs) -#define FADD_D(a) CHOICE(faddl a, faddl a, faddd a) -#define FADD_S(a) CHOICE(fadds a, fadds a, fadds a) -#define FADD2(a, b) CHOICE(fadd ARG2(a,b), fadd ARG2(a,b), fadd ARG2(b,a)) -#define FADDP(a, b) CHOICE(faddp ARG2(a,b), faddp ARG2(a,b), faddp ARG2(b,a)) -#define FIADD_L(a) CHOICE(fiaddl a, fiaddl a, fiaddl a) -#define FIADD_W(a) CHOICE(fiadd a, fiadds a, fiadds a) -#define FBLD(a) CHOICE(fbld a, fbld a, fbld a) -#define FBSTP(a) CHOICE(fbstp a, fbstp a, fbstp a) -#define FCHS CHOICE(fchs, fchs, fchs) -#define FCLEX CHOICE(fclex, wait; fnclex, wait; fclex) -#define FNCLEX CHOICE(fnclex, fnclex, fclex) -#define FCOM(a) CHOICE(fcom a, fcom a, fcom a) -#define FCOM_D(a) CHOICE(fcoml a, fcoml a, fcomd a) -#define FCOM_S(a) CHOICE(fcoms a, fcoms a, fcoms a) -#define FCOMP(a) CHOICE(fcomp a, fcomp a, fcomp a) -#define FCOMP_D(a) CHOICE(fcompl a, fcompl a, fcompd a) -#define FCOMP_S(a) CHOICE(fcomps a, fcomps a, fcomps a) -#define FCOMPP CHOICE(fcompp, fcompp, fcompp) -#define FCOS CHOICE(fcos, fcos, fcos) -#define FDECSTP CHOICE(fdecstp, fdecstp, fdecstp) -#define FDIV_D(a) CHOICE(fdivl a, fdivl a, fdivd a) -#define FDIV_S(a) CHOICE(fdivs a, fdivs a, fdivs a) -#define FDIV2(a, b) CHOICE(fdiv ARG2(a,b), fdiv ARG2(a,b), fdiv ARG2(b,a)) -#define FDIVP(a, b) CHOICE(fdivp ARG2(a,b), fdivp ARG2(a,b), fdivp ARG2(b,a)) -#define FIDIV_L(a) CHOICE(fidivl a, fidivl a, fidivl a) -#define FIDIV_W(a) CHOICE(fidiv a, fidivs a, fidivs a) -#define FDIVR_D(a) CHOICE(fdivrl a, fdivrl a, fdivrd a) -#define FDIVR_S(a) CHOICE(fdivrs a, fdivrs a, fdivrs a) -#define FDIVR2(a, b) CHOICE(fdivr ARG2(a,b), fdivr ARG2(a,b), fdivr ARG2(b,a)) -#define FDIVRP(a, b) CHOICE(fdivrp ARG2(a,b), fdivrp ARG2(a,b), fdivrp ARG2(b,a)) -#define FIDIVR_L(a) CHOICE(fidivrl a, fidivrl a, fidivrl a) -#define FIDIVR_W(a) CHOICE(fidivr a, fidivrs a, fidivrs a) -#define FFREE(a) CHOICE(ffree a, ffree a, ffree a) -#define FICOM_L(a) CHOICE(ficoml a, ficoml a, ficoml a) -#define FICOM_W(a) CHOICE(ficom a, ficoms a, ficoms a) -#define FICOMP_L(a) CHOICE(ficompl a, ficompl a, ficompl a) -#define FICOMP_W(a) CHOICE(ficomp a, ficomps a, ficomps a) -#define FILD_Q(a) CHOICE(fildll a, fildq a, fildq a) -#define FILD_L(a) CHOICE(fildl a, fildl a, fildl a) -#define FILD_W(a) CHOICE(fild a, filds a, filds a) -#define FINCSTP CHOICE(fincstp, fincstp, fincstp) -#define FINIT CHOICE(finit, wait; fninit, wait; finit) -#define FNINIT CHOICE(fninit, fninit, finit) -#define FIST_L(a) CHOICE(fistl a, fistl a, fistl a) -#define FIST_W(a) CHOICE(fist a, fists a, fists a) -#define FISTP_Q(a) CHOICE(fistpll a, fistpq a, fistpq a) -#define FISTP_L(a) CHOICE(fistpl a, fistpl a, fistpl a) -#define FISTP_W(a) CHOICE(fistp a, fistps a, fistps a) -#define FLD_X(a) CHOICE(fldt a, fldt a, fldx a) /* 80 bit data type! */ -#define FLD_D(a) CHOICE(fldl a, fldl a, fldd a) -#define FLD_S(a) CHOICE(flds a, flds a, flds a) -#define FLD1 CHOICE(fld1, fld1, fld1) -#define FLDL2T CHOICE(fldl2t, fldl2t, fldl2t) -#define FLDL2E CHOICE(fldl2e, fldl2e, fldl2e) -#define FLDPI CHOICE(fldpi, fldpi, fldpi) -#define FLDLG2 CHOICE(fldlg2, fldlg2, fldlg2) -#define FLDLN2 CHOICE(fldln2, fldln2, fldln2) -#define FLDZ CHOICE(fldz, fldz, fldz) -#define FLDCW(a) CHOICE(fldcw a, fldcw a, fldcw a) -#define FLDENV(a) CHOICE(fldenv a, fldenv a, fldenv a) -#define FMUL_S(a) CHOICE(fmuls a, fmuls a, fmuls a) -#define FMUL_D(a) CHOICE(fmull a, fmull a, fmuld a) -#define FMUL2(a, b) CHOICE(fmul ARG2(a,b), fmul ARG2(a,b), fmul ARG2(b,a)) -#define FMULP(a, b) CHOICE(fmulp ARG2(a,b), fmulp ARG2(a,b), fmulp ARG2(b,a)) -#define FIMUL_L(a) CHOICE(fimull a, fimull a, fimull a) -#define FIMUL_W(a) CHOICE(fimul a, fimuls a, fimuls a) -#define FNOP CHOICE(fnop, fnop, fnop) -#define FPATAN CHOICE(fpatan, fpatan, fpatan) -#define FPREM CHOICE(fprem, fprem, fprem) -#define FPREM1 CHOICE(fprem1, fprem1, fprem1) -#define FPTAN CHOICE(fptan, fptan, fptan) -#define FRNDINT CHOICE(frndint, frndint, frndint) -#define FRSTOR(a) CHOICE(frstor a, frstor a, frstor a) -#define FSAVE(a) CHOICE(fsave a, wait; fnsave a, wait; fsave a) -#define FNSAVE(a) CHOICE(fnsave a, fnsave a, fsave a) -#define FSCALE CHOICE(fscale, fscale, fscale) -#define FSIN CHOICE(fsin, fsin, fsin) -#define FSINCOS CHOICE(fsincos, fsincos, fsincos) -#define FSQRT CHOICE(fsqrt, fsqrt, fsqrt) -#define FST_D(a) CHOICE(fstl a, fstl a, fstd a) -#define FST_S(a) CHOICE(fsts a, fsts a, fsts a) -#define FSTP_X(a) CHOICE(fstpt a, fstpt a, fstpx a) -#define FSTP_D(a) CHOICE(fstpl a, fstpl a, fstpd a) -#define FSTP_S(a) CHOICE(fstps a, fstps a, fstps a) -#define FSTCW(a) CHOICE(fstcw a, wait; fnstcw a, wait; fstcw a) -#define FNSTCW(a) CHOICE(fnstcw a, fnstcw a, fstcw a) -#define FSTENV(a) CHOICE(fstenv a, wait; fnstenv a, fstenv a) -#define FNSTENV(a) CHOICE(fnstenv a, fnstenv a, fstenv a) -#define FSTSW(a) CHOICE(fstsw a, wait; fnstsw a, wait; fstsw a) -#define FNSTSW(a) CHOICE(fnstsw a, fnstsw a, fstsw a) -#define FSUB_S(a) CHOICE(fsubs a, fsubs a, fsubs a) -#define FSUB_D(a) CHOICE(fsubl a, fsubl a, fsubd a) -#define FSUB2(a, b) CHOICE(fsub ARG2(a,b), fsub ARG2(a,b), fsub ARG2(b,a)) -#define FSUBP(a, b) CHOICE(fsubp ARG2(a,b), fsubp ARG2(a,b), fsubp ARG2(b,a)) -#define FISUB_L(a) CHOICE(fisubl a, fisubl a, fisubl a) -#define FISUB_W(a) CHOICE(fisub a, fisubs a, fisubs a) -#define FSUBR_S(a) CHOICE(fsubrs a, fsubrs a, fsubrs a) -#define FSUBR_D(a) CHOICE(fsubrl a, fsubrl a, fsubrd a) -#define FSUBR2(a, b) CHOICE(fsubr ARG2(a,b), fsubr ARG2(a,b), fsubr ARG2(b,a)) -#define FSUBRP(a, b) CHOICE(fsubrp ARG2(a,b), fsubrp ARG2(a,b), fsubrp ARG2(b,a)) -#define FISUBR_L(a) CHOICE(fisubrl a, fisubrl a, fisubrl a) -#define FISUBR_W(a) CHOICE(fisubr a, fisubrs a, fisubrs a) -#define FTST CHOICE(ftst, ftst, ftst) -#define FUCOM(a) CHOICE(fucom a, fucom a, fucom a) -#define FUCOMP(a) CHOICE(fucomp a, fucomp a, fucomp a) -#define FUCOMPP CHOICE(fucompp, fucompp, fucompp) -#define FWAIT CHOICE(wait, wait, wait) -#define FXAM CHOICE(fxam, fxam, fxam) -#define FXCH(a) CHOICE(fxch a, fxch a, fxch a) -#define FXTRACT CHOICE(fxtract, fxtract, fxtract) -#define FYL2X CHOICE(fyl2x, fyl2x, fyl2x) -#define FYL2XP1 CHOICE(fyl2xp1, fyl2xp1, fyl2xp1) - -#endif /* __ASSYNTAX_H__ */ diff --git a/xorg-server/hw/xfree86/os-support/bsd/Makefile.am b/xorg-server/hw/xfree86/os-support/bsd/Makefile.am index 4fc270aa9..e52dac13b 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/bsd/Makefile.am @@ -1,9 +1,15 @@ noinst_LTLIBRARIES = libbsd.la -# FIXME: Add USB mouse support? - -# FIXME: APM support. +# APM support. +if BSD_KQUEUE_APM +APM_SOURCES = $(srcdir)/bsd_kqueue_apm.c +else +if BSD_APM +APM_SOURCES = $(srcdir)/bsd_apm.c +else APM_SOURCES = $(srcdir)/../shared/pm_noop.c +endif +endif if FREEBSD_KLDLOAD KMOD_SOURCES = bsd_kmod.c @@ -59,7 +65,6 @@ libbsd_la_SOURCES = \ $(srcdir)/../shared/vidmem.c \ bsd_VTsw.c \ bsd_init.c \ - bsd_mouse.c \ bsd_bell.c \ $(ARCH_SOURCES) \ $(AGP_SOURCES) \ @@ -71,16 +76,4 @@ libbsd_la_SOURCES = \ # FIXME: Add these files to the build as needed EXTRA_DIST = \ - bsd_apm.c \ - bsd_jstk.c \ - bsd_kqueue_apm.c \ - bsdResource.c \ - memrange.h \ - libusb/data.c \ - libusb/descr.c \ - libusb/parse.c \ - libusb/usage.c \ - libusb/usb.3 \ - libusb/usb.h \ - libusb/usb_hid_usages \ - libusb/usbvar.h + memrange.h diff --git a/xorg-server/hw/xfree86/os-support/bsd/Makefile.in b/xorg-server/hw/xfree86/os-support/bsd/Makefile.in index d59e73c87..fa86db8ae 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/bsd/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,7 +43,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -53,12 +52,13 @@ LTLIBRARIES = $(noinst_LTLIBRARIES) libbsd_la_LIBADD = am__libbsd_la_SOURCES_DIST = $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/sigio.c $(srcdir)/../shared/vidmem.c \ - bsd_VTsw.c bsd_init.c bsd_mouse.c bsd_bell.c alpha_video.c \ - bsd_ev56.c bsd_axp.c $(srcdir)/../shared/xf86Axp.c arm_video.c \ + bsd_VTsw.c bsd_init.c bsd_bell.c alpha_video.c bsd_ev56.c \ + bsd_axp.c $(srcdir)/../shared/xf86Axp.c arm_video.c \ i386_video.c ppc_video.c sparc64_video.c \ $(srcdir)/../shared/ioperm_noop.c \ $(srcdir)/../shared/agp_noop.c $(srcdir)/../linux/lnx_agp.c \ - $(srcdir)/../shared/pm_noop.c $(srcdir)/../shared/kmod_noop.c \ + $(srcdir)/../shared/pm_noop.c $(srcdir)/bsd_apm.c \ + $(srcdir)/bsd_kqueue_apm.c $(srcdir)/../shared/kmod_noop.c \ bsd_kmod.c $(srcdir)/../shared/stdResource.c @ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_FALSE@@PPC_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@am__objects_1 = sparc64_video.lo \ @ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_FALSE@@PPC_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@ ioperm_noop.lo @@ -69,23 +69,21 @@ am__libbsd_la_SOURCES_DIST = $(srcdir)/../shared/posix_tty.c \ @ALPHA_VIDEO_TRUE@ bsd_axp.lo xf86Axp.lo @AGP_FALSE@am__objects_2 = agp_noop.lo @AGP_TRUE@am__objects_2 = lnx_agp.lo -am__objects_3 = pm_noop.lo +@BSD_APM_FALSE@@BSD_KQUEUE_APM_FALSE@am__objects_3 = pm_noop.lo +@BSD_APM_TRUE@@BSD_KQUEUE_APM_FALSE@am__objects_3 = bsd_apm.lo +@BSD_KQUEUE_APM_TRUE@am__objects_3 = bsd_kqueue_apm.lo @FREEBSD_KLDLOAD_FALSE@am__objects_4 = kmod_noop.lo @FREEBSD_KLDLOAD_TRUE@am__objects_4 = bsd_kmod.lo am__objects_5 = stdResource.lo am_libbsd_la_OBJECTS = posix_tty.lo sigio.lo vidmem.lo bsd_VTsw.lo \ - bsd_init.lo bsd_mouse.lo bsd_bell.lo $(am__objects_1) \ - $(am__objects_2) $(am__objects_3) $(am__objects_4) \ - $(am__objects_5) + bsd_init.lo bsd_bell.lo $(am__objects_1) $(am__objects_2) \ + $(am__objects_3) $(am__objects_4) $(am__objects_5) libbsd_la_OBJECTS = $(am_libbsd_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -100,8 +98,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -122,10 +121,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -147,6 +142,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -156,18 +152,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -186,7 +179,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -200,7 +193,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -212,8 +208,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -222,8 +217,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -256,7 +251,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -266,27 +260,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -297,10 +276,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -309,13 +284,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -348,8 +318,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -369,7 +338,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -379,12 +347,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -402,14 +370,12 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ noinst_LTLIBRARIES = libbsd.la +@BSD_APM_FALSE@@BSD_KQUEUE_APM_FALSE@APM_SOURCES = $(srcdir)/../shared/pm_noop.c +@BSD_APM_TRUE@@BSD_KQUEUE_APM_FALSE@APM_SOURCES = $(srcdir)/bsd_apm.c -# FIXME: Add USB mouse support? - -# FIXME: APM support. -APM_SOURCES = $(srcdir)/../shared/pm_noop.c +# APM support. +@BSD_KQUEUE_APM_TRUE@APM_SOURCES = $(srcdir)/bsd_kqueue_apm.c @FREEBSD_KLDLOAD_FALSE@KMOD_SOURCES = $(srcdir)/../shared/kmod_noop.c @FREEBSD_KLDLOAD_TRUE@KMOD_SOURCES = bsd_kmod.c @@ -444,7 +410,6 @@ libbsd_la_SOURCES = \ $(srcdir)/../shared/vidmem.c \ bsd_VTsw.c \ bsd_init.c \ - bsd_mouse.c \ bsd_bell.c \ $(ARCH_SOURCES) \ $(AGP_SOURCES) \ @@ -457,19 +422,7 @@ libbsd_la_SOURCES = \ # FIXME: Add these files to the build as needed EXTRA_DIST = \ - bsd_apm.c \ - bsd_jstk.c \ - bsd_kqueue_apm.c \ - bsdResource.c \ - memrange.h \ - libusb/data.c \ - libusb/descr.c \ - libusb/parse.c \ - libusb/usage.c \ - libusb/usb.3 \ - libusb/usb.h \ - libusb/usb_hid_usages \ - libusb/usbvar.h + memrange.h all: all-am @@ -479,8 +432,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -526,12 +479,13 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alpha_video.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arm_video.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_VTsw.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_apm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_axp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_bell.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_ev56.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_kmod.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_mouse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_kqueue_apm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386_video.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioperm_noop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kmod_noop.Plo@am__quote@ @@ -622,6 +576,20 @@ pm_noop.lo: $(srcdir)/../shared/pm_noop.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pm_noop.lo `test -f '$(srcdir)/../shared/pm_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/pm_noop.c +bsd_apm.lo: $(srcdir)/bsd_apm.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bsd_apm.lo -MD -MP -MF $(DEPDIR)/bsd_apm.Tpo -c -o bsd_apm.lo `test -f '$(srcdir)/bsd_apm.c' || echo '$(srcdir)/'`$(srcdir)/bsd_apm.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/bsd_apm.Tpo $(DEPDIR)/bsd_apm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/bsd_apm.c' object='bsd_apm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bsd_apm.lo `test -f '$(srcdir)/bsd_apm.c' || echo '$(srcdir)/'`$(srcdir)/bsd_apm.c + +bsd_kqueue_apm.lo: $(srcdir)/bsd_kqueue_apm.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bsd_kqueue_apm.lo -MD -MP -MF $(DEPDIR)/bsd_kqueue_apm.Tpo -c -o bsd_kqueue_apm.lo `test -f '$(srcdir)/bsd_kqueue_apm.c' || echo '$(srcdir)/'`$(srcdir)/bsd_kqueue_apm.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/bsd_kqueue_apm.Tpo $(DEPDIR)/bsd_kqueue_apm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/bsd_kqueue_apm.c' object='bsd_kqueue_apm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bsd_kqueue_apm.lo `test -f '$(srcdir)/bsd_kqueue_apm.c' || echo '$(srcdir)/'`$(srcdir)/bsd_kqueue_apm.c + kmod_noop.lo: $(srcdir)/../shared/kmod_noop.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT kmod_noop.lo -MD -MP -MF $(DEPDIR)/kmod_noop.Tpo -c -o kmod_noop.lo `test -f '$(srcdir)/../shared/kmod_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/kmod_noop.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/kmod_noop.Tpo $(DEPDIR)/kmod_noop.Plo @@ -647,7 +615,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c b/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c index 523c4488e..9de25f66b 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c @@ -433,24 +433,6 @@ xf86DisableIO() #endif /* USE_ALPHA_PIO */ -/***************************************************************************/ -/* Interrupt Handling section */ -/***************************************************************************/ - -_X_EXPORT Bool -xf86DisableInterrupts() -{ - - return(TRUE); -} - -_X_EXPORT void -xf86EnableInterrupts() -{ - return; -} - - #define vuip volatile unsigned int * static unsigned long msb_set = 0; diff --git a/xorg-server/hw/xfree86/os-support/bsd/arm_video.c b/xorg-server/hw/xfree86/os-support/bsd/arm_video.c index 23948b5d6..a0ebdf2e6 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/arm_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/arm_video.c @@ -522,27 +522,6 @@ xf86DisableIO() #endif /* USE_ARC_MMAP */ - -/***************************************************************************/ -/* Interrupt Handling section */ -/***************************************************************************/ - -_X_EXPORT Bool -xf86DisableInterrupts() -{ - - return(TRUE); -} - -_X_EXPORT void -xf86EnableInterrupts() -{ - - return; -} - - - #if 0 /* * XXX This is here for reference. It needs to be handled differently for the diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsdResource.c b/xorg-server/hw/xfree86/os-support/bsd/bsdResource.c deleted file mode 100644 index d1ee787f1..000000000 --- a/xorg-server/hw/xfree86/os-support/bsd/bsdResource.c +++ /dev/null @@ -1,92 +0,0 @@ - -/* Resource information code */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86Privstr.h" -#include "xf86Pci.h" -#include "xf86Resources.h" -#define NEED_OS_RAC_PROTOS -#include "xf86_OSlib.h" - -/* Avoid Imakefile changes */ -#include "bus/Pci.h" - -#ifdef INCLUDE_XF86_NO_DOMAIN - -#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__) || defined(__x86_64__) - -resPtr -xf86AccResFromOS(resPtr ret) -{ - resRange range; - - /* - * Fallback is to claim the following areas: - * - * 0x000c0000 - 0x000effff location of VGA and other extensions ROMS - */ - - RANGE(range, 0x000c0000, 0x000effff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - - /* - * Fallback would be to claim well known ports in the 0x0 - 0x3ff range - * along with their sparse I/O aliases, but that's too imprecise. Instead - * claim a bare minimum here. - */ - RANGE(range, 0x00000000, 0x000000ff, ResExcIoBlock); /* For mainboard */ - ret = xf86AddResToList(ret, &range, -1); - - /* - * At minimum, the top and bottom resources must be claimed, so that - * resources that are (or appear to be) unallocated can be relocated. - */ - RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); -/* RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); */ - RANGE(range, 0xffffffff, 0xffffffff, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); - - /* XXX add others */ - return ret; -} - -#elif defined(__powerpc__) - -resPtr -xf86AccResFromOS(resPtr ret) -{ - resRange range; - - /* - * At minimum, the top and bottom resources must be claimed, so that - * resources that are (or appear to be) unallocated can be relocated. - */ - RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); - - return ret; -} - -#else - -#error : Put your platform dependent code here!! - -#endif - -#endif /* INCLUDE_XF86_NO_DOMAIN */ diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_axp.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_axp.c index 51ffef148..cb10a9d40 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_axp.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_axp.c @@ -7,7 +7,7 @@ #include "os.h" #include "xf86.h" #include "xf86Priv.h" -#include "xf86Axp.h" +#include "shared/xf86Axp.h" #include #include "xf86_OSlib.h" #include diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c index 83583d5b9..7698084ee 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c @@ -45,6 +45,7 @@ static int devConsoleFd = -1; #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) static int VTnum = -1; static int initialVT = -1; +static Bool ShareVTs = FALSE; #endif #ifdef PCCONS_SUPPORT @@ -269,49 +270,52 @@ xf86OpenConsole() } #endif acquire_vt: - /* - * now get the VT - */ - SYSCALL(result = - ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno)); - if (result != 0) - { - xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n"); - } - SYSCALL(result = + if (!ShareVTs) { + /* + * now get the VT + */ + SYSCALL(result = + ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno)); + if (result != 0) + { + xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n"); + } + SYSCALL(result = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno)); - if (result != 0) - { - xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n"); - } + if (result != 0) + { + xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n"); + } - signal(SIGUSR1, xf86VTRequest); + signal(SIGUSR1, xf86VTRequest); - vtmode.mode = VT_PROCESS; - vtmode.relsig = SIGUSR1; - vtmode.acqsig = SIGUSR1; - vtmode.frsig = SIGUSR1; - if (ioctl(xf86Info.consoleFd, VT_SETMODE, &vtmode) < 0) - { - FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed"); - } -#if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL) - if (ioctl(xf86Info.consoleFd, KDENABIO, 0) < 0) - { - FatalError("xf86OpenConsole: KDENABIO failed (%s)", - strerror(errno)); - } -#endif - if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0) - { - FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed"); - } - break; + vtmode.mode = VT_PROCESS; + vtmode.relsig = SIGUSR1; + vtmode.acqsig = SIGUSR1; + vtmode.frsig = SIGUSR1; + if (ioctl(xf86Info.consoleFd, VT_SETMODE, &vtmode) < 0) + { + FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed"); + } + #if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL) + if (ioctl(xf86Info.consoleFd, KDENABIO, 0) < 0) + { + FatalError("xf86OpenConsole: KDENABIO failed (%s)", + strerror(errno)); + } + #endif + if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0) + { + FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed"); + } + } else { /* ShareVTs */ + close(xf86Info.consoleFd); + } + break; #endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */ #ifdef WSCONS_SUPPORT case WSCONS: - fprintf(stderr, "xf86OpenConsole\n"); - /* xf86Info.consoleFd = open("/dev/wskbd0", 0); */ + /* Nothing to do */ break; #endif } @@ -320,7 +324,7 @@ acquire_vt: { /* serverGeneration != 1 */ #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) - if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) + if (!ShareVTs) if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) { if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0) { @@ -393,6 +397,9 @@ xf86OpenSyscons() if (ioctl(fd, VT_GETACTIVE, &initialVT) < 0) initialVT = -1; #endif + if (ShareVTs) + xf86Info.vtno = initialVT; + if (xf86Info.vtno == -1) { /* @@ -575,8 +582,14 @@ xf86OpenPcvt() sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1); if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0) { - FatalError("xf86OpenPcvt: Cannot open %s (%s)", + ErrorF("xf86OpenPcvt: Cannot open %s (%s)", vtname, strerror(errno)); + xf86Info.vtno = initialVT; + sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1); + if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0) { + FatalError("xf86OpenPcvt: Cannot open %s (%s)", + vtname, strerror(errno)); + } } if (ioctl(fd, VT_GETMODE, &vtmode) < 0) { @@ -585,8 +598,8 @@ xf86OpenPcvt() xf86Info.consType = PCVT; #ifdef WSCONS_SUPPORT xf86Msg(X_PROBED, - "Using wscons driver in pcvt compatibility mode " - "(version %d.%d)\n", + "Using wscons driver on %s in pcvt compatibility mode " + "(version %d.%d)\n", vtname, pcvt_version.rmajor, pcvt_version.rminor); #else xf86Msg(X_PROBED, "Using pcvt driver (version %d.%d)\n", @@ -620,7 +633,7 @@ xf86OpenWScons() #if defined(__NetBSD__) sprintf(ttyname, "/dev/ttyE%d", i); #elif defined(__OpenBSD__) - sprintf(ttyname, "/dev/ttyC%d", i); + sprintf(ttyname, "/dev/ttyC%x", i); #endif if ((fd = open(ttyname, 2)) != -1) break; @@ -646,6 +659,8 @@ xf86CloseConsole() struct vt_mode VT; #endif + if (ShareVTs) return; + switch (xf86Info.consType) { #ifdef PCCONS_SUPPORT @@ -662,7 +677,7 @@ xf86CloseConsole() VT.mode = VT_AUTO; ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); /* dflt vt handling */ } -#if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL) +#if !defined(OpenBSD) && !defined(USE_DEV_IO) && !defined(USE_I386_IOPL) if (ioctl(xf86Info.consoleFd, KDDISABIO, 0) < 0) { xf86FatalError("xf86CloseConsole: KDDISABIO failed (%s)", @@ -712,6 +727,11 @@ xf86ProcessArgument(int argc, char *argv[], int i) return(1); } #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) + if (!strcmp(argv[i], "-sharevts")) + { + ShareVTs = TRUE; + return(1); + } if ((argv[i][0] == 'v') && (argv[i][1] == 't')) { if (sscanf(argv[i], "vt%2d", &VTnum) == 0 || @@ -732,6 +752,7 @@ xf86UseMsg() { #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) ErrorF("vtXX use the specified VT number (1-12)\n"); + ErrorF("-sharevts share VTs with another X server\n"); #endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */ ErrorF("-keeptty "); ErrorF("don't detach controlling tty (for debugging only)\n"); diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_jstk.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_jstk.c deleted file mode 100644 index b5b91b0c7..000000000 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_jstk.c +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright 1995 by Frederic Lepied, France. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Frederic Lepied not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Frederic Lepied makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * FREDERIC LEPIED DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL FREDERIC LEPIED BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - */ - -/* Modified for FreeBSD by David Dawes */ - - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include - -#include "misc.h" -#include "xf86.h" - -#define JS_RETURN sizeof(struct joystick) - -/*********************************************************************** - * - * xf86JoystickOn -- - * - * open the device and init timeout according to the device value. - * - *********************************************************************** - */ - -int -xf86JoystickOn(char * name, int *timeout, int *centerX, int *centerY) -{ - int status; - int changed = 0; - int timeinmicros; - struct joystick js; - -#ifdef DEBUG - ErrorF("xf86JoystickOn: %s\n", name); -#endif - - if ((status = open(name, O_RDWR | O_NDELAY, 0)) < 0) - { - xf86Msg(X_WARNING, "xf86JoystickOn: Cannot open joystick '%s' (%s)\n", - name, strerror(errno)); - return -1; - } - - if (*timeout <= 0) { - /* Use the current setting */ - ioctl(status, JOY_GETTIMEOUT, (char *)&timeinmicros); - *timeout = timeinmicros / 1000; - if (*timeout == 0) - *timeout = 1; - changed = 1; - } - /* Maximum allowed timeout in the FreeBSD driver is 10ms */ - if (*timeout > 10) { - *timeout = 10; - changed = 1; - } - - if (changed) - xf86Msg(X_PROBED, "Joystick: timeout value = %d\n", *timeout); - - timeinmicros = *timeout * 1000; - - /* Assume the joystick is centred when this is called */ - read(status, &js, JS_RETURN); - if (*centerX < 0) { - *centerX = js.x; - xf86Msg(X_PROBED, "Joystick: CenterX set to %d\n", *centerX); - } - if (*centerY < 0) { - *centerY = js.y; - xf86Msg(X_PROBED, "Joystick: CenterY set to %d\n", *centerY); - } - - return status; -} - -/*********************************************************************** - * - * xf86JoystickInit -- - * - * called when X device is initialized. - * - *********************************************************************** - */ - -void -xf86JoystickInit() -{ - return; -} - -/*********************************************************************** - * - * xf86JoystickOff -- - * - * close the handle. - * - *********************************************************************** - */ - -int -xf86JoystickOff(int *fd, int doclose) -{ - int oldfd; - - if (((oldfd = *fd) >= 0) && doclose) { - close(*fd); - *fd = -1; - } - return oldfd; -} - -/*********************************************************************** - * - * xf86JoystickGetState -- - * - * return the state of buttons and the position of the joystick. - * - *********************************************************************** - */ - -int -xf86JoystickGetState(int fd, int *x, int *y, int *buttons) -{ - struct joystick js; - int status; - - status = read(fd, &js, JS_RETURN); - - if (status != JS_RETURN) - { - Error("Joystick read"); - return 0; - } - - *x = js.x; - *y = js.y; - *buttons = js.b1 | (js.b2 << 1); -#ifdef DEBUG - ErrorF("xf86JoystickGetState: x = %d, y = %d, buttons = %d\n", *x, *y, - *buttons); -#endif - - return 1; -} - -/* - * Entry point for XFree86 Loader - */ -void -bsd_jstkModuleInit(pointer *data, INT32 *magic) -{ - *magic = MAGIC_DONE; - *data = NULL; -} -/* end of bsd_jstk.c */ diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_mouse.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_mouse.c deleted file mode 100644 index ca2c1bbd5..000000000 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_mouse.c +++ /dev/null @@ -1,791 +0,0 @@ - -/* - * 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 - -#include -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" -#include "xf86Xinput.h" -#include "xf86OSmouse.h" -#include "xisb.h" -#include "mipointer.h" -#ifdef WSCONS_SUPPORT -#include -#endif -#ifdef USBMOUSE_SUPPORT -#ifdef HAS_LIB_USB_HID -#include -#else -#include "usb.h" -#endif - -#include -#ifdef USB_GET_REPORT_ID -#define USB_NEW_HID -#endif - -#define HUP_GENERIC_DESKTOP 0x0001 -#define HUP_BUTTON 0x0009 - -#define HUG_X 0x0030 -#define HUG_Y 0x0031 -#define HUG_Z 0x0032 -#define HUG_WHEEL 0x0038 - -#define HID_USAGE2(p,u) (((p) << 16) | u) - -/* The UMS mices have middle button as number 3 */ -#define UMS_BUT(i) ((i) == 0 ? 2 : (i) == 1 ? 0 : (i) == 2 ? 1 : (i)) -#endif /* USBMOUSE_SUPPORT */ - -#ifdef USBMOUSE_SUPPORT -static void usbSigioReadInput (int fd, void *closure); -#endif - -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) -/* These are for FreeBSD and DragonFly */ -#define DEFAULT_MOUSE_DEV "/dev/mouse" -#define DEFAULT_SYSMOUSE_DEV "/dev/sysmouse" -#define DEFAULT_PS2_DEV "/dev/psm0" - -static const char *mouseDevs[] = { - DEFAULT_MOUSE_DEV, - DEFAULT_SYSMOUSE_DEV, - DEFAULT_PS2_DEV, - NULL -}; -#elif (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT) -/* Only wsmouse mices are autoconfigured for now on OpenBSD */ -#define DEFAULT_WSMOUSE_DEV "/dev/wsmouse" -#define DEFAULT_WSMOUSE0_DEV "/dev/wsmouse0" - -static const char *mouseDevs[] = { - DEFAULT_WSMOUSE_DEV, - DEFAULT_WSMOUSE0_DEV, - NULL -}; -#endif - -static int -SupportedInterfaces(void) -{ -#if defined(__NetBSD__) - return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO; -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) - return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO | MSE_MISC; -#else - return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO; -#endif -} - -/* Names of protocols that are handled internally here. */ -static const char *internalNames[] = { -#if defined(WSCONS_SUPPORT) - "WSMouse", -#endif -#if defined(USBMOUSE_SUPPORT) - "usb", -#endif - NULL -}; - -/* - * Names of MSC_MISC protocols that the OS supports. These are decoded by - * main "mouse" driver. - */ -static const char *miscNames[] = { -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) - "SysMouse", -#endif - NULL -}; - -static const char ** -BuiltinNames(void) -{ - return internalNames; -} - -static Bool -CheckProtocol(const char *protocol) -{ - int i; - - for (i = 0; internalNames[i]; i++) - if (xf86NameCmp(protocol, internalNames[i]) == 0) - return TRUE; - for (i = 0; miscNames[i]; i++) - if (xf86NameCmp(protocol, miscNames[i]) == 0) - return TRUE; - return FALSE; -} - -static const char * -DefaultProtocol(void) -{ -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) - return "Auto"; -#elif (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT) - return "WSMouse"; -#else - return NULL; -#endif -} - -#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)) && defined(MOUSE_PROTO_SYSMOUSE) -static struct { - int dproto; - const char *name; -} devproto[] = { - { MOUSE_PROTO_MS, "Microsoft" }, - { MOUSE_PROTO_MSC, "MouseSystems" }, - { MOUSE_PROTO_LOGI, "Logitech" }, - { MOUSE_PROTO_MM, "MMSeries" }, - { MOUSE_PROTO_LOGIMOUSEMAN, "MouseMan" }, - { MOUSE_PROTO_BUS, "BusMouse" }, - { MOUSE_PROTO_INPORT, "BusMouse" }, - { MOUSE_PROTO_PS2, "PS/2" }, - { MOUSE_PROTO_HITTAB, "MMHitTab" }, - { MOUSE_PROTO_GLIDEPOINT, "GlidePoint" }, - { MOUSE_PROTO_INTELLI, "Intellimouse" }, - { MOUSE_PROTO_THINK, "ThinkingMouse" }, - { MOUSE_PROTO_SYSMOUSE, "SysMouse" } -}; - -static const char * -SetupAuto(InputInfoPtr pInfo, int *protoPara) -{ - int i; - mousehw_t hw; - mousemode_t mode; - - if (pInfo->fd == -1) - return NULL; - - /* set the driver operation level, if applicable */ - i = 1; - ioctl(pInfo->fd, MOUSE_SETLEVEL, &i); - - /* interrogate the driver and get some intelligence on the device. */ - hw.iftype = MOUSE_IF_UNKNOWN; - hw.model = MOUSE_MODEL_GENERIC; - ioctl(pInfo->fd, MOUSE_GETHWINFO, &hw); - xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: hw.iftype is %d, hw.model is %d\n", - pInfo->name, hw.iftype, hw.model); - if (ioctl(pInfo->fd, MOUSE_GETMODE, &mode) == 0) { - for (i = 0; i < sizeof(devproto)/sizeof(devproto[0]); ++i) { - if (mode.protocol == devproto[i].dproto) { - /* override some parameters */ - if (protoPara) { - protoPara[4] = mode.packetsize; - protoPara[0] = mode.syncmask[0]; - protoPara[1] = mode.syncmask[1]; - } - xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: protocol is %s\n", - pInfo->name, devproto[i].name); - return devproto[i].name; - } - } - } - return NULL; -} - -static void -SetSysMouseRes(InputInfoPtr pInfo, const char *protocol, int rate, int res) -{ - mousemode_t mode; - MouseDevPtr pMse; - - pMse = pInfo->private; - - mode.rate = rate > 0 ? rate : -1; - mode.resolution = res > 0 ? res : -1; - mode.accelfactor = -1; -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) - if (pMse->autoProbe || - (protocol && xf86NameCmp(protocol, "SysMouse") == 0)) { - /* - * As the FreeBSD sysmouse driver defaults to protocol level 0 - * everytime it is opened we enforce protocol level 1 again at - * this point. - */ - mode.level = 1; - } else - mode.level = -1; -#else - mode.level = -1; -#endif - ioctl(pInfo->fd, MOUSE_SETMODE, &mode); -} -#endif - -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) - -#define MOUSED_PID_FILE "/var/run/moused.pid" - -/* - * Try to check if moused is running. DEFAULT_SYSMOUSE_DEV is useless without - * it. There doesn't seem to be a better way of checking. - */ -static Bool -MousedRunning(void) -{ - FILE *f = NULL; - unsigned int pid; - - if ((f = fopen(MOUSED_PID_FILE, "r")) != NULL) { - if (fscanf(f, "%u", &pid) == 1 && pid > 0) { - if (kill(pid, 0) == 0) { - fclose(f); - return TRUE; - } - } - fclose(f); - } - return FALSE; -} - -static const char * -FindDevice(InputInfoPtr pInfo, const char *protocol, int flags) -{ - int fd = -1; - const char **pdev, *dev = NULL; - Bool devMouse = FALSE; - struct stat devMouseStat; - struct stat sb; - - for (pdev = mouseDevs; *pdev; pdev++) { - SYSCALL (fd = open(*pdev, O_RDWR | O_NONBLOCK)); - if (fd == -1) { -#ifdef DEBUG - ErrorF("Cannot open %s (%s)\n", *pdev, strerror(errno)); -#endif - } else { - /* - * /dev/mouse is held until checks for matches with other devices - * are done. This is so that when it points to /dev/sysmouse, - * the test for whether /dev/sysmouse is usable can be made. - */ - if (!strcmp(*pdev, DEFAULT_MOUSE_DEV)) { - if (fstat(fd, &devMouseStat) == 0) - devMouse = TRUE; - close(fd); - continue; - } else if (!strcmp(*pdev, DEFAULT_SYSMOUSE_DEV)) { - /* Check if /dev/mouse is the same as /dev/sysmouse. */ - if (devMouse && fstat(fd, &sb) == 0 && - devMouseStat.st_dev == sb.st_dev && - devMouseStat.st_ino == sb.st_ino) { - /* If the same, use /dev/sysmouse. */ - devMouse = FALSE; - } - close(fd); - if (MousedRunning()) - break; - else { -#ifdef DEBUG - ErrorF("moused isn't running\n"); -#endif - } - } else { - close(fd); - break; - } - } - } - - if (*pdev) - dev = *pdev; - else if (devMouse) - dev = DEFAULT_MOUSE_DEV; - - if (dev) { - /* Set the Device option. */ - pInfo->conf_idev->commonOptions = - xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", dev); - xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n", - pInfo->name, dev); - } - - return *pdev; -} -#endif - -#if (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT) - -/* Only support wsmouse configuration for now */ -static const char * -SetupAuto(InputInfoPtr pInfo, int *protoPara) -{ - - xf86MsgVerb(X_INFO, 3, "%s: SetupAuto: protocol is %s\n", - pInfo->name, "wsmouse"); - return "wsmouse"; -} - -static void -SetMouseRes(InputInfoPtr pInfo, const char *protocol, int rate, int res) -{ - - xf86MsgVerb(X_INFO, 3, "%s: SetMouseRes: protocol %s rate %d res %d\n", - pInfo->name, protocol, rate, res); -} - -static const char * -FindDevice(InputInfoPtr pInfo, const char *protocol, int flags) -{ - int fd = -1; - const char **pdev; - - for (pdev = mouseDevs; *pdev; pdev++) { - SYSCALL(fd = open(*pdev, O_RDWR | O_NONBLOCK)); - if (fd != -1) { - /* Set the Device option. */ - pInfo->conf_idev->commonOptions = - xf86AddNewOption(pInfo->conf_idev->commonOptions, - "Device", *pdev); - xf86Msg(X_INFO, "%s: found Device \"%s\"\n", - pInfo->name, *pdev); - close(fd); - break; - } - } - return *pdev; -} -#endif /* __OpenBSD__ || __NetBSD__ && WSCONS_SUPPORT */ - -#ifdef WSCONS_SUPPORT -#define NUMEVENTS 64 - -static void -wsconsReadInput(InputInfoPtr pInfo) -{ - MouseDevPtr pMse; - static struct wscons_event eventList[NUMEVENTS]; - int n, c; - struct wscons_event *event = eventList; - unsigned char *pBuf; - - pMse = pInfo->private; - - XisbBlockDuration(pMse->buffer, -1); - pBuf = (unsigned char *)eventList; - n = 0; - while (n < sizeof(eventList) && (c = XisbRead(pMse->buffer)) >= 0) { - pBuf[n++] = (unsigned char)c; - } - - if (n == 0) - return; - - n /= sizeof(struct wscons_event); - while( n-- ) { - int buttons = pMse->lastButtons; - int dx = 0, dy = 0, dz = 0, dw = 0; - switch (event->type) { - case WSCONS_EVENT_MOUSE_UP: -#define BUTBIT (1 << (event->value <= 2 ? 2 - event->value : event->value)) - buttons &= ~BUTBIT; - break; - case WSCONS_EVENT_MOUSE_DOWN: - buttons |= BUTBIT; - break; - case WSCONS_EVENT_MOUSE_DELTA_X: - dx = event->value; - break; - case WSCONS_EVENT_MOUSE_DELTA_Y: - dy = -event->value; - break; -#ifdef WSCONS_EVENT_MOUSE_DELTA_Z - case WSCONS_EVENT_MOUSE_DELTA_Z: - dz = event->value; - break; -#endif - default: - xf86Msg(X_WARNING, "%s: bad wsmouse event type=%d\n", pInfo->name, - event->type); - ++event; - continue; - } - - pMse->PostEvent(pInfo, buttons, dx, dy, dz, dw); - ++event; - } - return; -} - - -/* This function is called when the protocol is "wsmouse". */ -static Bool -wsconsPreInit(InputInfoPtr pInfo, const char *protocol, int flags) -{ - MouseDevPtr pMse = pInfo->private; - - pMse->protocol = protocol; - xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol); - - /* Collect the options, and process the common options. */ - xf86CollectInputOptions(pInfo, NULL, NULL); - xf86ProcessCommonOptions(pInfo, pInfo->options); - - /* Check if the device can be opened. */ - pInfo->fd = xf86OpenSerial(pInfo->options); - if (pInfo->fd == -1) { - if (xf86GetAllowMouseOpenFail()) - xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name); - else { - xf86Msg(X_ERROR, "%s: cannot open input device\n", pInfo->name); - xfree(pMse); - return FALSE; - } - } - xf86CloseSerial(pInfo->fd); - pInfo->fd = -1; - - /* Process common mouse options (like Emulate3Buttons, etc). */ - pMse->CommonOptions(pInfo); - - /* Setup the local input proc. */ - pInfo->read_input = wsconsReadInput; - pMse->xisbscale = sizeof(struct wscons_event); - - pInfo->flags |= XI86_CONFIGURED; - return TRUE; -} -#endif - -#if defined(USBMOUSE_SUPPORT) - -typedef struct _UsbMseRec { - int packetSize; - int iid; - hid_item_t loc_x; /* x locator item */ - hid_item_t loc_y; /* y locator item */ - hid_item_t loc_z; /* z (wheel) locator item */ - hid_item_t loc_btn[MSE_MAXBUTTONS]; /* buttons locator items */ - unsigned char *buffer; -} UsbMseRec, *UsbMsePtr; - -static int -usbMouseProc(DeviceIntPtr pPointer, int what) -{ - InputInfoPtr pInfo; - MouseDevPtr pMse; - UsbMsePtr pUsbMse; - unsigned char map[MSE_MAXBUTTONS + 1]; - int nbuttons; - - pInfo = pPointer->public.devicePrivate; - pMse = pInfo->private; - pMse->device = pPointer; - pUsbMse = pMse->mousePriv; - - switch (what) { - case DEVICE_INIT: - pPointer->public.on = FALSE; - - for (nbuttons = 0; nbuttons < MSE_MAXBUTTONS; ++nbuttons) - map[nbuttons + 1] = nbuttons + 1; - - InitPointerDeviceStruct((DevicePtr)pPointer, - map, - min(pMse->buttons, MSE_MAXBUTTONS), - miPointerGetMotionEvents, - pMse->Ctrl, - miPointerGetMotionBufferSize()); - - /* X valuator */ - xf86InitValuatorAxisStruct(pPointer, 0, 0, -1, 1, 0, 1); - xf86InitValuatorDefaults(pPointer, 0); - /* Y valuator */ - xf86InitValuatorAxisStruct(pPointer, 1, 0, -1, 1, 0, 1); - xf86InitValuatorDefaults(pPointer, 1); - xf86MotionHistoryAllocate(pInfo); - break; - - case DEVICE_ON: - pInfo->fd = xf86OpenSerial(pInfo->options); - if (pInfo->fd == -1) - xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name); - else { - pMse->buffer = XisbNew(pInfo->fd, pUsbMse->packetSize); - if (!pMse->buffer) { - xfree(pMse); - xf86CloseSerial(pInfo->fd); - pInfo->fd = -1; - } else { - xf86FlushInput(pInfo->fd); - if (!xf86InstallSIGIOHandler (pInfo->fd, usbSigioReadInput, - pInfo)) - AddEnabledDevice(pInfo->fd); - } - } - pMse->lastButtons = 0; - pMse->lastMappedButtons = 0; - pMse->emulateState = 0; - pPointer->public.on = TRUE; - break; - - case DEVICE_OFF: - case DEVICE_CLOSE: - if (pInfo->fd != -1) { - RemoveEnabledDevice(pInfo->fd); - if (pUsbMse->packetSize > 8 && pUsbMse->buffer) { - xfree(pUsbMse->buffer); - } - if (pMse->buffer) { - XisbFree(pMse->buffer); - pMse->buffer = NULL; - } - xf86CloseSerial(pInfo->fd); - pInfo->fd = -1; - } - pPointer->public.on = FALSE; - usleep(300000); - break; - } - return Success; -} - -static void -usbReadInput(InputInfoPtr pInfo) -{ - MouseDevPtr pMse; - UsbMsePtr pUsbMse; - int buttons = pMse->lastButtons; - int dx = 0, dy = 0, dz = 0, dw = 0; - int n, c; - unsigned char *pBuf; - - pMse = pInfo->private; - pUsbMse = pMse->mousePriv; - - XisbBlockDuration(pMse->buffer, -1); - pBuf = pUsbMse->buffer; - n = 0; - while ((c = XisbRead(pMse->buffer)) >= 0 && n < pUsbMse->packetSize) { - pBuf[n++] = (unsigned char)c; - } - if (n == 0) - return; - if (n != pUsbMse->packetSize) { - xf86Msg(X_WARNING, "%s: incomplete packet, size %d\n", pInfo->name, - n); - } - /* discard packets with an id that don't match the mouse */ - /* XXX this is probably not the right thing */ - if (pUsbMse->iid != 0) { - if (*pBuf++ != pUsbMse->iid) - return; - } - dx = hid_get_data(pBuf, &pUsbMse->loc_x); - dy = hid_get_data(pBuf, &pUsbMse->loc_y); - dz = hid_get_data(pBuf, &pUsbMse->loc_z); - - buttons = 0; - for (n = 0; n < pMse->buttons; n++) { - if (hid_get_data(pBuf, &pUsbMse->loc_btn[n])) - buttons |= (1 << UMS_BUT(n)); - } - pMse->PostEvent(pInfo, buttons, dx, dy, dz, dw); - return; -} - -static void -usbSigioReadInput (int fd, void *closure) -{ - usbReadInput ((InputInfoPtr) closure); -} - -/* This function is called when the protocol is "usb". */ -static Bool -usbPreInit(InputInfoPtr pInfo, const char *protocol, int flags) -{ - MouseDevPtr pMse = pInfo->private; - UsbMsePtr pUsbMse; - report_desc_t reportDesc; - int i; - - pUsbMse = xalloc(sizeof(UsbMseRec)); - if (pUsbMse == NULL) { - xf86Msg(X_ERROR, "%s: cannot allocate UsbMouseRec\n", pInfo->name); - xfree(pMse); - return FALSE; - } - - pMse->protocol = protocol; - xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol); - - /* Collect the options, and process the common options. */ - xf86CollectInputOptions(pInfo, NULL, NULL); - xf86ProcessCommonOptions(pInfo, pInfo->options); - - /* Check if the device can be opened. */ - pInfo->fd = xf86OpenSerial(pInfo->options); - if (pInfo->fd == -1) { - if (xf86GetAllowMouseOpenFail()) - xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name); - else { - xf86Msg(X_ERROR, "%s: cannot open input device\n", pInfo->name); - xfree(pUsbMse); - xfree(pMse); - return FALSE; - } - } - /* Get USB informations */ - reportDesc = hid_get_report_desc(pInfo->fd); - /* Get packet size & iid */ -#ifdef USB_NEW_HID - if (ioctl(pInfo->fd, USB_GET_REPORT_ID, &pUsbMse->iid) == -1) { - xf86Msg(X_ERROR, "Error ioctl USB_GET_REPORT_ID on %s : %s\n", - pInfo->name, strerror(errno)); - return FALSE; - } - pUsbMse->packetSize = hid_report_size(reportDesc, hid_input, - pUsbMse->iid); -#else - pUsbMse->packetSize = hid_report_size(reportDesc, hid_input, - &pUsbMse->iid); -#endif - /* Allocate buffer */ - if (pUsbMse->packetSize <= 8) { - pUsbMse->buffer = pMse->protoBuf; - } else { - pUsbMse->buffer = xalloc(pUsbMse->packetSize); - } - if (pUsbMse->buffer == NULL) { - xf86Msg(X_ERROR, "%s: cannot allocate buffer\n", pInfo->name); - xfree(pUsbMse); - xfree(pMse); - xf86CloseSerial(pInfo->fd); - return FALSE; - } -#ifdef USB_NEW_HID - if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), - hid_input, &pUsbMse->loc_x, pUsbMse->iid) < 0) { - xf86Msg(X_WARNING, "%s: no x locator\n", pInfo->name); - } - if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y), - hid_input, &pUsbMse->loc_y, pUsbMse->iid) < 0) { - xf86Msg(X_WARNING, "%s: no y locator\n", pInfo->name); - } - if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), - hid_input, &pUsbMse->loc_z, pUsbMse->iid) < 0) { - } -#else - if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), - hid_input, &pUsbMse->loc_x) < 0) { - xf86Msg(X_WARNING, "%s: no x locator\n", pInfo->name); - } - if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y), - hid_input, &pUsbMse->loc_y) < 0) { - xf86Msg(X_WARNING, "%s: no y locator\n", pInfo->name); - } - if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), - hid_input, &pUsbMse->loc_z) < 0) { - } -#endif - /* Probe for number of buttons */ - for (i = 1; i <= MSE_MAXBUTTONS; i++) { - if (!hid_locate(reportDesc, HID_USAGE2(HUP_BUTTON, i), - hid_input, &pUsbMse->loc_btn[i-1] -#ifdef USB_NEW_HID - , pUsbMse->iid -#endif - )) - break; - } - pMse->buttons = i-1; - - xf86CloseSerial(pInfo->fd); - pInfo->fd = -1; - - /* Private structure */ - pMse->mousePriv = pUsbMse; - - /* Process common mouse options (like Emulate3Buttons, etc). */ - pMse->CommonOptions(pInfo); - - /* Setup the local procs. */ - pInfo->device_control = usbMouseProc; - pInfo->read_input = usbReadInput; - - pInfo->flags |= XI86_CONFIGURED; - return TRUE; -} -#endif /* USBMOUSE */ - -static Bool -bsdMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags) -{ - /* The protocol is guaranteed to be one of the internalNames[] */ -#ifdef WSCONS_SUPPORT - if (xf86NameCmp(protocol, "WSMouse") == 0) { - return wsconsPreInit(pInfo, protocol, flags); - } -#endif -#ifdef USBMOUSE_SUPPORT - if (xf86NameCmp(protocol, "usb") == 0) { - return usbPreInit(pInfo, protocol, flags); - } -#endif - return TRUE; -} - -_X_EXPORT OSMouseInfoPtr -xf86OSMouseInit(int flags) -{ - OSMouseInfoPtr p; - - p = xcalloc(sizeof(OSMouseInfoRec), 1); - if (!p) - return NULL; - p->SupportedInterfaces = SupportedInterfaces; - p->BuiltinNames = BuiltinNames; - p->DefaultProtocol = DefaultProtocol; - p->CheckProtocol = CheckProtocol; -#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)) && defined(MOUSE_PROTO_SYSMOUSE) - p->SetupAuto = SetupAuto; - p->SetPS2Res = SetSysMouseRes; - p->SetBMRes = SetSysMouseRes; - p->SetMiscRes = SetSysMouseRes; -#endif -#if (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT) - p->SetupAuto = SetupAuto; - p->SetMiscRes = SetMouseRes; -#endif -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__NetBSD__) - p->FindDevice = FindDevice; -#endif - p->PreInit = bsdMousePreInit; - return p; -} diff --git a/xorg-server/hw/xfree86/os-support/bsd/i386_video.c b/xorg-server/hw/xfree86/os-support/bsd/i386_video.c index e2f6420d8..83dabc9c6 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/i386_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/i386_video.c @@ -55,11 +55,6 @@ #endif #endif -#if defined(__OpenBSD__) && (defined(__amd64__) || defined(__x86_64__)) -#include -#include -#endif - #include "xf86_OSlib.h" #include "xf86OSpriv.h" @@ -108,11 +103,6 @@ static pointer NetBSDsetWC(int, unsigned long, unsigned long, Bool, MessageType); static void NetBSDundoWC(int, pointer); #endif -#if (defined(__amd64__) || defined(__x86_64__)) && defined(__OpenBSD__) -static pointer amd64setWC(int, unsigned long, unsigned long, Bool, - MessageType); -static void amd64undoWC(int, pointer); -#endif /* * Check if /dev/mem can be mmap'd. If it can't print a warning when @@ -228,10 +218,6 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) #if defined(HAS_MTRR_BUILTIN) && defined(__NetBSD__) pVidMem->setWC = NetBSDsetWC; pVidMem->undoWC = NetBSDundoWC; -#endif -#if (defined(__amd64__) || defined(__x86_64__)) && defined(__OpenBSD__) - pVidMem->setWC = amd64setWC; - pVidMem->undoWC = amd64undoWC; #endif pVidMem->initialised = TRUE; } @@ -458,38 +444,6 @@ xf86DisableIO() #endif - -/***************************************************************************/ -/* Interrupt Handling section */ -/***************************************************************************/ - -_X_EXPORT Bool -xf86DisableInterrupts() -{ - -#ifdef __GNUC__ - __asm__ __volatile__("cli"); -#else - asm("cli"); -#endif /* __GNUC__ */ - - return(TRUE); -} - -_X_EXPORT void -xf86EnableInterrupts() -{ - -#ifdef __GNUC__ - __asm__ __volatile__("sti"); -#else - asm("sti"); -#endif /* __GNUC__ */ - - return; -} - - #ifdef __NetBSD__ /***************************************************************************/ /* Set TV output mode */ @@ -952,55 +906,3 @@ NetBSDundoWC(int screenNum, pointer list) xfree(mtrrp); } #endif - -#if defined(__OpenBSD__) && (defined(__amd64__) || defined(__x86_64__)) -static pointer -amd64setWC(int screenNum, unsigned long base, unsigned long size, Bool enable, - MessageType from) -{ - struct mtrr *mtrrp; - int n; - - xf86DrvMsg(screenNum, X_WARNING, - "%s MTRR %lx - %lx\n", enable ? "set" : "remove", - base, (base + size)); - - mtrrp = xnfalloc(sizeof (struct mtrr)); - mtrrp->base = base; - mtrrp->len = size; - mtrrp->type = MTRR_TYPE_WC; - - /* - * MTRR_PRIVATE will make this MTRR get reset automatically - * if this process exits, so we have no need for an explicit - * cleanup operation when starting a new server. - */ - - if (enable) - mtrrp->flags = MTRR_VALID | MTRR_PRIVATE; - else - mtrrp->flags = 0; - n = 1; - - if (amd64_set_mtrr(mtrrp, &n) < 0) { - xfree(mtrrp); - return NULL; - } - return mtrrp; -} - -static void -amd64undoWC(int screenNum, pointer list) -{ - struct mtrr *mtrrp = (struct mtrr *)list; - int n; - - if (mtrrp == NULL) - return; - n = 1; - mtrrp->flags &= ~MTRR_VALID; - amd64_set_mtrr(mtrrp, &n); - xfree(mtrrp); -} -#endif /* OpenBSD/amd64 */ - diff --git a/xorg-server/hw/xfree86/os-support/bsd/libusb/data.c b/xorg-server/hw/xfree86/os-support/bsd/libusb/data.c deleted file mode 100644 index 292e5d885..000000000 --- a/xorg-server/hw/xfree86/os-support/bsd/libusb/data.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 1999 Lennart Augustsson - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include -#include "usb.h" - -int -hid_get_data(void *p, hid_item_t *h) -{ - unsigned char *buf; - unsigned int hpos; - unsigned int hsize; - int data; - int i, end, offs; - - _DIAGASSERT(p != NULL); - _DIAGASSERT(h != NULL); - - buf = p; - hpos = h->pos; /* bit position of data */ - hsize = h->report_size; /* bit length of data */ - - if (hsize == 0) - return (0); - offs = hpos / 8; - end = (hpos + hsize) / 8 - offs; - data = 0; - for (i = 0; i <= end; i++) - data |= buf[offs + i] << (i*8); - data >>= hpos % 8; - data &= (1 << hsize) - 1; - if (h->logical_minimum < 0) { - /* Need to sign extend */ - hsize = sizeof data * 8 - hsize; - data = (data << hsize) >> hsize; - } - return (data); -} - -void -hid_set_data(void *p, hid_item_t *h, int data) -{ - unsigned char *buf; - unsigned int hpos; - unsigned int hsize; - int i, end, offs; - - _DIAGASSERT(p != NULL); - _DIAGASSERT(h != NULL); - - buf = p; - hpos = h->pos; /* bit position of data */ - hsize = h->report_size; /* bit length of data */ - - if (hsize != 32) - data &= (1 << hsize) - 1; - data <<= (hpos % 8); - - offs = hpos / 8; - end = (hpos + hsize) / 8 - offs; - data = 0; - for (i = 0; i <= end; i++) - buf[offs + i] |= (data >> (i*8)) & 0xff; -} diff --git a/xorg-server/hw/xfree86/os-support/bsd/libusb/descr.c b/xorg-server/hw/xfree86/os-support/bsd/libusb/descr.c deleted file mode 100644 index 4dc3524d5..000000000 --- a/xorg-server/hw/xfree86/os-support/bsd/libusb/descr.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 1999 Lennart Augustsson - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include "usb.h" -#include "usbvar.h" - -report_desc_t -hid_get_report_desc(fd) - int fd; -{ - struct usb_ctl_report_desc rep; - report_desc_t r; - - _DIAGASSERT(fd != -1); - - rep.size = 0; - if (ioctl(fd, USB_GET_REPORT_DESC, &rep) < 0) - return (0); - r = malloc(sizeof *r + rep.size); - if (r == 0) { - errno = ENOMEM; - return (0); - } - r->size = rep.size; - memcpy(r->data, rep.data, (unsigned int)rep.size); - return (r); -} - -void -hid_dispose_report_desc(r) - report_desc_t r; -{ - - free(r); -} diff --git a/xorg-server/hw/xfree86/os-support/bsd/libusb/parse.c b/xorg-server/hw/xfree86/os-support/bsd/libusb/parse.c deleted file mode 100644 index 0a846e42b..000000000 --- a/xorg-server/hw/xfree86/os-support/bsd/libusb/parse.c +++ /dev/null @@ -1,401 +0,0 @@ -/* - * Copyright (c) 1999 Lennart Augustsson - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include -#include -#include - -#include -#include - -#include "usb.h" -#include "usbvar.h" - -#define MAXUSAGE 100 -struct hid_data { - u_char *start; - u_char *end; - u_char *p; - hid_item_t cur; - unsigned int usages[MAXUSAGE]; - int nusage; - int minset; - int multi; - int multimax; - int kindset; -}; - -static int min(int x, int y) { return x < y ? x : y; } - -static void -hid_clear_local(hid_item_t *c) -{ - - _DIAGASSERT(c != NULL); - - c->usage = 0; - c->usage_minimum = 0; - c->usage_maximum = 0; - c->designator_index = 0; - c->designator_minimum = 0; - c->designator_maximum = 0; - c->string_index = 0; - c->string_minimum = 0; - c->string_maximum = 0; - c->set_delimiter = 0; -} - -hid_data_t -hid_start_parse(report_desc_t d, int kindset) -{ - struct hid_data *s; - - _DIAGASSERT(d != NULL); - - s = malloc(sizeof *s); - memset(s, 0, sizeof *s); - s->start = s->p = d->data; - s->end = d->data + d->size; - s->kindset = kindset; - return (s); -} - -void -hid_end_parse(hid_data_t s) -{ - - _DIAGASSERT(s != NULL); - - while (s->cur.next) { - hid_item_t *hi = s->cur.next->next; - free(s->cur.next); - s->cur.next = hi; - } - free(s); -} - -int -hid_get_item(hid_data_t s, hid_item_t *h) -{ - hid_item_t *c; - unsigned int bTag = 0, bType = 0, bSize; - unsigned char *data; - int dval; - unsigned char *p; - hid_item_t *hi; - int i; - - _DIAGASSERT(s != NULL); - _DIAGASSERT(h != NULL); - - c = &s->cur; - - top: - if (s->multimax) { - if (s->multi < s->multimax) { - c->usage = s->usages[min(s->multi, s->nusage-1)]; - s->multi++; - *h = *c; - c->pos += c->report_size; - h->next = 0; - return (1); - } else { - c->report_count = s->multimax; - s->multimax = 0; - s->nusage = 0; - hid_clear_local(c); - } - } - for (;;) { - p = s->p; - if (p >= s->end) - return (0); - - bSize = *p++; - if (bSize == 0xfe) { - /* long item */ - bSize = *p++; - bSize |= *p++ << 8; - bTag = *p++; - data = p; - p += bSize; - } else { - /* short item */ - bTag = bSize >> 4; - bType = (bSize >> 2) & 3; - bSize &= 3; - if (bSize == 3) bSize = 4; - data = p; - p += bSize; - } - s->p = p; - /* - * The spec is unclear if the data is signed or unsigned. - */ - switch(bSize) { - case 0: - dval = 0; - break; - case 1: - dval = (int8_t)*data++; - break; - case 2: - dval = *data++; - dval |= *data++ << 8; - dval = (int16_t)dval; - break; - case 4: - dval = *data++; - dval |= *data++ << 8; - dval |= *data++ << 16; - dval |= *data++ << 24; - break; - default: - return (-1); - } - - switch (bType) { - case 0: /* Main */ - switch (bTag) { - case 8: /* Input */ - if (!(s->kindset & (1 << hid_input))) - continue; - c->kind = hid_input; - c->flags = dval; - ret: - if (c->flags & HIO_VARIABLE) { - s->multimax = c->report_count; - s->multi = 0; - c->report_count = 1; - if (s->minset) { - for (i = c->usage_minimum; - i <= c->usage_maximum; - i++) { - s->usages[s->nusage] = i; - if (s->nusage < MAXUSAGE-1) - s->nusage++; - } - s->minset = 0; - } - goto top; - } else { - if (s->minset) - c->usage = c->usage_minimum; - *h = *c; - h->next = 0; - c->pos += c->report_size * c->report_count; - hid_clear_local(c); - s->minset = 0; - return (1); - } - case 9: /* Output */ - if (!(s->kindset & (1 << hid_output))) - continue; - c->kind = hid_output; - c->flags = dval; - goto ret; - case 10: /* Collection */ - c->kind = hid_collection; - c->collection = dval; - c->collevel++; - *h = *c; - hid_clear_local(c); - s->nusage = 0; - return (1); - case 11: /* Feature */ - if (!(s->kindset & (1 << hid_feature))) - continue; - c->kind = hid_feature; - c->flags = dval; - goto ret; - case 12: /* End collection */ - c->kind = hid_endcollection; - c->collevel--; - *h = *c; - hid_clear_local(c); - s->nusage = 0; - return (1); - default: - return (-2); - } - - case 1: /* Global */ - switch (bTag) { - case 0: - c->_usage_page = dval << 16; - break; - case 1: - c->logical_minimum = dval; - break; - case 2: - c->logical_maximum = dval; - break; - case 3: - c->physical_maximum = dval; - break; - case 4: - c->physical_maximum = dval; - break; - case 5: - c->unit_exponent = dval; - break; - case 6: - c->unit = dval; - break; - case 7: - c->report_size = dval; - break; - case 8: - c->report_ID = dval; - break; - case 9: - c->report_count = dval; - break; - case 10: /* Push */ - hi = malloc(sizeof *hi); - *hi = s->cur; - c->next = hi; - break; - case 11: /* Pop */ - hi = c->next; - s->cur = *hi; - free(hi); - break; - default: - return (-3); - } - break; - case 2: /* Local */ - switch (bTag) { - case 0: - if (bSize == 1) - dval = c->_usage_page | (dval&0xff); - else if (bSize == 2) - dval = c->_usage_page | (dval&0xffff); - c->usage = dval; - if (s->nusage < MAXUSAGE) - s->usages[s->nusage++] = dval; - /* else XXX */ - break; - case 1: - s->minset = 1; - if (bSize == 1) - dval = c->_usage_page | (dval&0xff); - else if (bSize == 2) - dval = c->_usage_page | (dval&0xffff); - c->usage_minimum = dval; - break; - case 2: - if (bSize == 1) - dval = c->_usage_page | (dval&0xff); - else if (bSize == 2) - dval = c->_usage_page | (dval&0xffff); - c->usage_maximum = dval; - break; - case 3: - c->designator_index = dval; - break; - case 4: - c->designator_minimum = dval; - break; - case 5: - c->designator_maximum = dval; - break; - case 7: - c->string_index = dval; - break; - case 8: - c->string_minimum = dval; - break; - case 9: - c->string_maximum = dval; - break; - case 10: - c->set_delimiter = dval; - break; - default: - return (-4); - } - break; - default: - return (-5); - } - } -} - -int -hid_report_size(report_desc_t r, enum hid_kind k, int *idp) -{ - struct hid_data *d; - hid_item_t h; - int size, id; - - _DIAGASSERT(r != NULL); - /* idp may be NULL */ - - id = 0; - if (idp) - *idp = 0; - memset(&h, 0, sizeof h); - for (d = hid_start_parse(r, 1<kind == k && !(h->flags & HIO_CONST) && h->usage == u) { - hid_end_parse(d); - return (1); - } - } - hid_end_parse(d); - h->report_size = 0; - return (0); -} diff --git a/xorg-server/hw/xfree86/os-support/bsd/libusb/usage.c b/xorg-server/hw/xfree86/os-support/bsd/libusb/usage.c deleted file mode 100644 index 9b491c57a..000000000 --- a/xorg-server/hw/xfree86/os-support/bsd/libusb/usage.c +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (c) 1999 Lennart Augustsson - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include - -#include "usb.h" - -#define _PATH_HIDTABLE "/usr/share/misc/usb_hid_usages" - -struct usage_in_page { - char *name; - int usage; -}; - -static struct usage_page { - char *name; - int usage; - struct usage_in_page *page_contents; - int pagesize, pagesizemax; -} *pages; -static int npages, npagesmax; - -#ifdef DEBUG -void -dump_hid_table(void) -{ - int i, j; - - for (i = 0; i < npages; i++) { - printf("%d\t%s\n", pages[i].usage, pages[i].name); - for (j = 0; j < pages[i].pagesize; j++) { - printf("\t%d\t%s\n", pages[i].page_contents[j].usage, - pages[i].page_contents[j].name); - } - } -} -#endif - -void -hid_init(char *hidname) -{ - FILE *f; - char line[100], name[100], *p, *n; - int no; - int lineno; - struct usage_page *curpage = 0; - - if (hidname == 0) - hidname = _PATH_HIDTABLE; - - f = fopen(hidname, "r"); - if (f == NULL) - err(1, "%s", hidname); - for (lineno = 1; ; lineno++) { - if (fgets(line, sizeof line, f) == NULL) - break; - if (line[0] == '#') - continue; - for (p = line; *p && isspace(*p); p++) - ; - if (!*p) - continue; - if (sscanf(line, " * %[^\n]", name) == 1) - no = -1; - else if (sscanf(line, " 0x%x %[^\n]", &no, name) != 2 && - sscanf(line, " %d %[^\n]", &no, name) != 2) - errx(1, "file %s, line %d, syntax error\n", - hidname, lineno); - for (p = name; *p; p++) - if (isspace(*p) || *p == '.') - *p = '_'; - n = strdup(name); - if (!n) - err(1, "strdup"); - if (isspace(line[0])) { - if (!curpage) - errx(1, "file %s, line %d, syntax error\n", - hidname, lineno); - if (curpage->pagesize >= curpage->pagesizemax) { - curpage->pagesizemax += 10; - curpage->page_contents = - realloc(curpage->page_contents, - curpage->pagesizemax * - sizeof (struct usage_in_page)); - if (!curpage->page_contents) - err(1, "realloc"); - } - curpage->page_contents[curpage->pagesize].name = n; - curpage->page_contents[curpage->pagesize].usage = no; - curpage->pagesize++; - } else { - if (npages >= npagesmax) { - if (pages == 0) { - npagesmax = 5; - pages = malloc(npagesmax * - sizeof (struct usage_page)); - } else { - npagesmax += 5; - pages = realloc(pages, - npagesmax * - sizeof (struct usage_page)); - } - if (!pages) - err(1, "alloc"); - } - curpage = &pages[npages++]; - curpage->name = n; - curpage->usage = no; - curpage->pagesize = 0; - curpage->pagesizemax = 10; - curpage->page_contents = - malloc(curpage->pagesizemax * - sizeof (struct usage_in_page)); - if (!curpage->page_contents) - err(1, "malloc"); - } - } - fclose(f); -#ifdef DEBUG - dump_hid_table(); -#endif -} - -char * -hid_usage_page(int i) -{ - static char b[10]; - int k; - - if (!pages) - errx(1, "no hid table\n"); - - for (k = 0; k < npages; k++) - if (pages[k].usage == i) - return pages[k].name; - sprintf(b, "0x%02x", i); - return b; -} - -char * -hid_usage_in_page(unsigned int u) -{ - int page = HID_PAGE(u); - int i = HID_USAGE(u); - static char b[100]; - int j, k, us; - - for (k = 0; k < npages; k++) - if (pages[k].usage == page) - break; - if (k >= npages) - goto bad; - for (j = 0; j < pages[k].pagesize; j++) { - us = pages[k].page_contents[j].usage; - if (us == -1) { - sprintf(b, pages[k].page_contents[j].name, i); - return b; - } - if (us == i) - return pages[k].page_contents[j].name; - } - bad: - sprintf(b, "0x%02x", i); - return b; -} diff --git a/xorg-server/hw/xfree86/os-support/bsd/libusb/usb.3 b/xorg-server/hw/xfree86/os-support/bsd/libusb/usb.3 deleted file mode 100644 index f88a28cd6..000000000 --- a/xorg-server/hw/xfree86/os-support/bsd/libusb/usb.3 +++ /dev/null @@ -1,191 +0,0 @@ -.\" $NetBSD: usb.3,v 1.9 1999/11/08 22:33:40 augustss Exp $ -.\" -.\" Copyright (c) 1999 Lennart Augustsson -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/libusb/usb.3,v 1.1 2000/02/11 18:06:50 dawes Exp $ -.\" -.Dd May 11, 1999 -.Dt USB 3 -.Os -.Sh NAME -.Nm usb , -.Nm hid_get_report_desc , -.Nm hid_dispose_report_desc , -.Nm hid_start_parse , -.Nm hid_end_parse , -.Nm hid_get_item , -.Nm hid_report_size , -.Nm hid_locate , -.Nm hid_usage_page , -.Nm hid_usage_in_page , -.Nm hid_init , -.Nm hid_get_data , -.Nm hid_set_data -.Nd USB HID access routines -.Sh LIBRARY -.Lb libusb -.Sh SYNOPSIS -.Fd #include -.Ft report_desc_t -.Fn hid_get_report_desc "int file" -.Ft void -.Fn hid_dispose_report_desc "report_desc_t d" -.Ft hid_data_t -.Fn hid_start_parse "report_desc_t d" "int kindset" -.Ft void -.Fn hid_end_parse "hid_data_t s" -.Ft int -.Fn hid_get_item "hid_data_t s" "hid_item_t *h" -.Ft int -.Fn hid_report_size "report_desc_t d" "hid_kind_t k" "int *idp" -.Ft int -.Fn hid_locate "report_desc_t d" "u_int usage" "hid_kind_t k" "hid_item_t *h" -.Ft char * -.Fn hid_usage_page "int i" -.Ft char * -.Fn hid_usage_in_page "u_int u" -.Ft void -.Fn hid_init "char *file" -.Ft int -.Fn hid_get_data "void *data" "hid_item_t *h" -.Ft void -.Fn hid_set_data "void *data" "hid_item_t *h" "u_int data" -.Sh DESCRIPTION -The -.Nm -library provides routines to extract data from USB Human Interface Devices. -.Ss INTRODUCTION -USB HID devices send and receive data layed out a device dependent -way. The -.Nm -library contains routines to extract the -.Em report descriptor -which contains the data layout information and then use this information. -.Pp -The routines can be divided into four parts: extraction of the descriptor, -parsing of the descriptor, translating to/from symbolic names, and -data manipulation. -.Ss DESCRIPTOR FUNCTIONS -A report descriptor can be obtained by calling -.Fn hid_get_report_desc -with a file descriptor obtained by opening a -.Xr uhid 4 -device. -When the report descriptor is no longer needed it should be freed -by calling -.Fn hid_dispose_report_desc . -The type -.Fa report_desc_t -is opaque and should be used when calling the parsing functions. -.Ss DESCRIPTOR PARSING FUNCTIONS -To parse the report descriptor the -.Fn hid_start_parse -function should be called with a report descriptor and a set that -describes which items that are interesting. The set is obtained -by oring together values -.Fa "(1 << k)" -where -.Fa k -is an item of type -.Fa hid_kind_t . -The function returns -.Fa NULL -if the initialization fails, otherwise an opaque value to be used -in subsequent calls. -After parsing the -.Fn hid_end_parse -function should be called to free internal data structures. -.Pp -To iterate through all the items in the report descriptor -.Fn hid_get_item -should be called while it returns a value greater than 0. -When the report descriptor ends it will returns 0; a syntax -error within the report descriptor will cause a return value less -than 0. -The struct pointed to by -.Fa h -will be filled with the relevant data for the item. -The definition of -.Fa hid_item_t -can be found in -.Pa -and the meaning of the components in the USB HID documentation. -.Pp -Data should be read/written to the device in the size of -the report. The size of a report (of a certain kind) can be -computed by the -.Fn hid_report_size -function. If the report is prefixed by an ID byte it is -stored at -.Fa idp , -otherwise it will contain 0. -.Pp -To locate a single item the -.Fn hid_locate -function can be used. It should be given the usage code of -the item and its kind and it will fill the item and return -non-zero if the item was found. -.Pp -.Ss NAME TRANSLATION FUNCTIONS -The function -.Fn hid_usage_page -will return the symbolic name of a usage page, and the function -.Fn hid_usage_in_page -will return the symbolic name of the usage within the page. -Both these functions may return a pointer to static data. -Before either of these functions can be called the usage table -must be parsed, this is done by calling -.Fn hid_init -with the name of the table. Passing -.Fa NULL -to this function will cause it to use the default table. -.Ss DATA EXTRACTION FUNCTIONS -Given the data obtained from a HID device and an item in the -report descriptor the -.Fn hid_get_data -function extracts the value of the item. -Conversely -.Fn hid_set_data -can be used to put data into a report (which must be zeroed first). -.Sh EXAMPLE -Not yet. -.Sh FILES -.Pa /usr/share/misc/usb_hid_usages -The default HID usage table. -.Sh BUGS -This man page is woefully incomplete. -.Sh SEE ALSO -The -.Tn USB -specifications can be found at -.Dv http://www.usb.org/developers/docs.htm . -.Pp -.Xr hid 4 , -.Xr usb 4 . -.Sh HISTORY -The -.Nm -library first appeared in -.Nx 1.5 . diff --git a/xorg-server/hw/xfree86/os-support/bsd/libusb/usb.h b/xorg-server/hw/xfree86/os-support/bsd/libusb/usb.h deleted file mode 100644 index c39dc063a..000000000 --- a/xorg-server/hw/xfree86/os-support/bsd/libusb/usb.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 1999 Lennart Augustsson - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#define _DIAGASSERT(e) assert(e) - -typedef struct report_desc *report_desc_t; - -typedef struct hid_data *hid_data_t; - -typedef enum hid_kind { - hid_input, hid_output, hid_feature, hid_collection, hid_endcollection -}hid_kind_t; - -typedef struct hid_item { - /* Global */ - int _usage_page; - int logical_minimum; - int logical_maximum; - int physical_minimum; - int physical_maximum; - int unit_exponent; - int unit; - int report_size; - int report_ID; - int report_count; - /* Local */ - unsigned int usage; - int usage_minimum; - int usage_maximum; - int designator_index; - int designator_minimum; - int designator_maximum; - int string_index; - int string_minimum; - int string_maximum; - int set_delimiter; - /* Misc */ - int collection; - int collevel; - enum hid_kind kind; - unsigned int flags; - /* Absolute data position (bits) */ - unsigned int pos; - /* */ - struct hid_item *next; -} hid_item_t; - -#define HID_PAGE(u) ((u) >> 16) -#define HID_USAGE(u) ((u) & 0xffff) - -/* Obtaining a report descriptor, descr.c: */ -report_desc_t hid_get_report_desc __P((int file)); -void hid_dispose_report_desc __P((report_desc_t)); - -/* Parsing of a HID report descriptor, parse.c: */ -hid_data_t hid_start_parse __P((report_desc_t d, int kindset)); -void hid_end_parse __P((hid_data_t s)); -int hid_get_item __P((hid_data_t s, hid_item_t *h)); -int hid_report_size __P((report_desc_t d, enum hid_kind k, int *idp)); -int hid_locate __P((report_desc_t d, unsigned int usage, enum hid_kind k, hid_item_t *h)); - -/* Conversion to/from usage names, usage.c: */ -char *hid_usage_page __P((int i)); -char *hid_usage_in_page __P((unsigned int u)); -void hid_init __P((char *file)); - -/* Extracting/insertion of data, data.c: */ -int hid_get_data __P((void *p, hid_item_t *h)); -void hid_set_data __P((void *p, hid_item_t *h, int data)); diff --git a/xorg-server/hw/xfree86/os-support/bsd/libusb/usb_hid_usages b/xorg-server/hw/xfree86/os-support/bsd/libusb/usb_hid_usages deleted file mode 100644 index 02f122028..000000000 --- a/xorg-server/hw/xfree86/os-support/bsd/libusb/usb_hid_usages +++ /dev/null @@ -1,1079 +0,0 @@ -# $NetBSD: usb_hid_usages,v 1.3 1999/07/02 15:46:53 simonb Exp $ -# -# USB HID usage table -# Syntax: -# - lines that do not start with a white space give the number and name of -# a usage page. -# - lines that start with a white space give the number and name of -# a usage with the last given page. -# If the number is * then the line matches all usages and the name -# is a printf formatting string that will be given the usage number. -# -# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/libusb/usb_hid_usages,v 1.1.2.2 1999/12/03 10:12:43 hohndel Exp $ -# -1 Generic Desktop - 0x00 Undefined - 0x01 Pointer - 0x02 Mouse - 0x03 Reserved - 0x04 Joystick - 0x05 Game Pad - 0x06 Keyboard - 0x07 Keypad - 0x08 Multi-axis Controller - 0x30 X - 0x31 Y - 0x32 Z - 0x33 Rx - 0x34 Ry - 0x35 Rz - 0x36 Slider - 0x37 Dial - 0x38 Wheel - 0x39 Hat Switch - 0x3A Counted Buffer - 0x3B Byte Count - 0x3C Motion Wakeup - 0x40 Vx - 0x41 Vy - 0x42 Vz - 0x43 Vbrx - 0x44 Vbry - 0x45 Vbrx - 0x46 Vno - 0x80 System Control - 0x81 System Power Down - 0x82 System Sleep - 0x83 System Wake Up - 0x84 System Context Menu - 0x85 System Main Menu - 0x86 System App Menu - 0x87 System Menu Help - 0x88 System Menu Exit - 0x89 System Menu Select - 0x8A System Menu Right - 0x8B System Menu Left - 0x8C System Menu Up - 0x8D System Menu Down - 0x90 D-pad Up - 0x91 D-pad Down - 0x92 D-pad Right - 0x93 D-pad Left - -2 Simulation Controls - 0x00 Undefined - 0x01 Flight Simulation Device - 0x02 Automobile Simulation Device - 0x03 Tank Simulation Device - 0x04 Spaceship Simulation Device - 0x05 Submarine Simulation Device - 0x06 Sailing Simulation Device - 0x07 Motorcycle Simulation Device - 0x08 Sports Simulation Device - 0x09 Airplane Simulation Device - 0x0A Helicopter Simulation Device - 0x0B Magic Carpet Simulation Device - 0x0C Bicycle - 0x20 Flight Control Stick - 0x21 Flight Stick - 0x22 Cyclic Control - 0x23 Cyclic Trim - 0x24 Flight Yoke - 0x25 Track Control - 0x26 Driving Control - 0xB0 Aileron - 0xB1 Aileron Trim - 0xB2 Anti-Torque Control - 0xB3 Auto-pilot Enable - 0xB4 Chaff Release - 0xB5 Collective Control - 0xB6 Dive Brake - 0xB7 Electronic Counter Measures - 0xB8 Elevator - 0xB9 Elevator Trim - 0xBA Rudder - 0xBB Throttle - 0xBC Flight Communication - 0xBD Flare Release - 0xBE Landing Gear - 0xBF Toe Brake - 0xC0 Trigger - 0xC1 Weapons Arm - 0xC2 Weapons Select - 0xC3 Wing Flaps - 0xC4 Accelerator - 0xC5 Brake - 0xC6 Clutch - 0xC7 Shifter - 0xC8 Steering - 0xC9 Turret Direction - 0xCA Barrel Elevation - 0xCB Dive Plane - 0xCC Ballast - 0xCD Bicycle Crank - 0xCE Handle Bars - 0xCF Front Brake - 0xD0 Rear Brake - -3 VR Controls - 0x00 Unidentified - 0x01 Belt - 0x02 Body Suit - 0x03 Flexor - 0x04 Glove - 0x05 Head Tracker - 0x06 Head Mounted Display - 0x07 Hand Tracker - 0x08 Oculometer - 0x09 Vest - 0x0A Animatronic Device - 0x20 Stereo Enable - 0x21 Display Enable - -4 Sports Controls - 0x00 Unidentified - 0x01 Baseball Bat - 0x02 Golf Club - 0x03 Rowing Machine - 0x04 Treadmill - 0x30 Oar - 0x31 Slope - 0x32 Rate - 0x33 Stick Speed - 0x34 Stick Face Angle - 0x35 Stick Heel/Toe - 0x36 Stick Follow Through - 0x37 Stick Tempo - 0x38 Stick Type - 0x39 Stick Height - 0x50 Putter - 0x51 1 Iron - 0x52 2 Iron - 0x53 3 Iron - 0x54 4 Iron - 0x55 5 Iron - 0x56 6 Iron - 0x57 7 Iron - 0x58 8 Iron - 0x59 9 Iron - 0x5A 10 Iron - 0x5B 11 Iron - 0x5C Sand Wedge - 0x5D Loft Wedge - 0x5E Power Wedge - 0x5F 1 Wood - 0x60 3 Wood - 0x61 5 Wood - 0x62 7 Wood - 0x63 9 Wood - -5 Game Controls - 0x00 Undefined - 0x01 3D Game Controller - 0x02 Pinball Device - 0x03 Gun Device - 0x20 Point of View - 0x21 Turn Right/Left - 0x22 Pitch Right/Left - 0x23 Roll Forward/Backward - 0x24 Move Right/Left - 0x25 Move Forward/Backward - 0x26 Move Up/Down - 0x27 Lean Right/Left - 0x28 Lean Forward/Backward - 0x29 Height of POV - 0x2A Flipper - 0x2B Secondary Flipper - 0x2C Bump - 0x2D New Game - 0x2E Shoot Ball - 0x2F Player - 0x30 Gun Bolt - 0x31 Gun Clip - 0x32 Gun Selector - 0x33 Gun Single Shot - 0x34 Gun Burst - 0x35 Gun Automatic - 0x36 Gun Safety - 0x37 Gamepad Fire/Jump - 0x39 Gamepad Trigger - -7 Keyboard - 0x00 Reserved (no event indicated) - 0x01 Keyboard ErrorRollOver - 0x02 Keyboard POSTFail - 0x03 Keyboard ErrorUndefined - 0x04 Keyboard a and A - 0x05 Keyboard b and B - 0x06 Keyboard c and C - 0x07 Keyboard d and D - 0x08 Keyboard e and E - 0x09 Keyboard f and F - 0x0A Keyboard g and G - 0x0B Keyboard h and H - 0x0C Keyboard i and I - 0x0D Keyboard j and J - 0x0E Keyboard k and K - 0x0F Keyboard l and L - 0x10 Keyboard m and M - 0x11 Keyboard n and N - 0x12 Keyboard o and O - 0x13 Keyboard p and P - 0x14 Keyboard q and Q - 0x15 Keyboard r and R - 0x16 Keyboard s and S - 0x17 Keyboard t and T - 0x18 Keyboard u and U - 0x19 Keyboard v and V - 0x1A Keyboard w and W - 0x1B Keyboard x and X - 0x1C Keyboard y and Y - 0x1D Keyboard z and Z - 0x1E Keyboard 1 and ! - 0x1F Keyboard 2 and @ - 0x20 Keyboard 3 and # - 0x21 Keyboard 4 and $ - 0x22 Keyboard 5 and % - 0x23 Keyboard 6 and ^ - 0x24 Keyboard 7 and & - 0x25 Keyboard 8 and * - 0x26 Keyboard 9 and ( - 0x27 Keyboard 0 and ) - 0x28 Keyboard Return (ENTER) - 0x29 Keyboard ESCAPE - 0x2A Keyboard DELETE (Backspace) - 0x2B Keyboard Tab - 0x2C Keyboard Spacebar - 0x2D Keyboard - and (underscore) - 0x2E Keyboard = and + - 0x2F Keyboard [ and { - 0x30 Keyboard ] and } - 0x31 Keyboard \ and | - 0x32 Keyboard Non-US # and ~ - 0x33 Keyboard ; and : - 0x34 Keyboard ' and " - 0x35 Keyboard Grave Accent and Tilde - 0x36 Keyboard, and < - 0x37 Keyboard . and > - 0x38 Keyboard / and ? - 0x39 Keyboard Caps Lock - 0x3A Keyboard F1 - 0x3B Keyboard F2 - 0x3C Keyboard F3 - 0x3D Keyboard F4 - 0x3E Keyboard F5 - 0x3F Keyboard F6 - 0x40 Keyboard F7 - 0x41 Keyboard F8 - 0x42 Keyboard F9 - 0x43 Keyboard F10 - 0x44 Keyboard F11 - 0x45 Keyboard F12 - 0x46 Keyboard PrintScreen - 0x47 Keyboard Scroll Lock - 0x48 Keyboard Pause - 0x49 Keyboard Insert - 0x4A Keyboard Home - 0x4B Keyboard PageUp - 0x4C Keyboard Delete Forward - 0x4D Keyboard End - 0x4E Keyboard PageDown - 0x4F Keyboard RightArrow - 0x50 Keyboard LeftArrow - 0x51 Keyboard DownArrow - 0x52 Keyboard UpArrow - 0x53 Keypad Num Lock and Clear - 0x54 Keypad / - 0x55 Keypad * - 0x56 Keypad - - 0x57 Keypad + - 0x58 Keypad ENTER - 0x59 Keypad 1 and End - 0x5A Keypad 2 and Down Arrow - 0x5B Keypad 3 and PageDn - 0x5C Keypad 4 and Left Arrow - 0x5D Keypad 5 - 0x5E Keypad 6 and Right Arrow - 0x5F Keypad 7 and Home - 0x60 Keypad 8 and Up Arrow - 0x61 Keypad 9 and PageUp - 0x62 Keypad 0 and Insert - 0x63 Keypad . and Delete - 0x64 Keyboard Non-US \ and | - 0x65 Keyboard Application - 0x66 Keyboard Power - 0x67 Keypad = - 0x68 Keyboard F13 - 0x69 Keyboard F14 - 0x6A Keyboard F15 - 0x6B Keyboard F16 - 0x6C Keyboard F17 - 0x6D Keyboard F18 - 0x6E Keyboard F19 - 0x6F Keyboard F20 - 0x70 Keyboard F21 - 0x71 Keyboard F22 - 0x72 Keyboard F23 - 0x73 Keyboard F24 - 0x74 Keyboard Execute - 0x75 Keyboard Help - 0x76 Keyboard Menu - 0x77 Keyboard Select - 0x78 Keyboard Stop - 0x79 Keyboard Again - 0x7A Keyboard Undo - 0x7B Keyboard Cut - 0x7C Keyboard Copy - 0x7D Keyboard Paste - 0x7E Keyboard Find - 0x7F Keyboard Mute - 0x80 Keyboard Volume Up - 0x81 Keyboard Volume Down - 0x82 Keyboard Locking Caps Lock - 0x83 Keyboard Locking Num Lock - 0x84 Keyboard Locking Scroll Lock - 0x85 Keypad Comma - 0x86 Keypad Equal Sign - 0x87 Keyboard International1 - 0x88 Keyboard International2 - 0x89 Keyboard International3 - 0x8A Keyboard International4 - 0x8B Keyboard International5 - 0x8C Keyboard International6 - 0x8D Keyboard International7 - 0x8E Keyboard International8 - 0x8F Keyboard International9 - 0x90 Keyboard LANG1 - 0x91 Keyboard LANG2 - 0x92 Keyboard LANG3 - 0x93 Keyboard LANG4 - 0x94 Keyboard LANG5 - 0x95 Keyboard LANG6 - 0x96 Keyboard LANG7 - 0x97 Keyboard LANG8 - 0x98 Keyboard LANG9 - 0x99 Keyboard Alternate Erase - 0x9A Keyboard SysReq/Attention - 0x9B Keyboard Cancel - 0x9C Keyboard Clear - 0x9D Keyboard Prior - 0x9E Keyboard Return - 0x9F Keyboard Separator - 0xA0 Keyboard Out - 0xA1 Keyboard Oper - 0xA2 Keyboard Clear/Again - 0xA3 Keyboard CrSel/Props - 0xA4 Keyboard ExSel - 0xE0 Keyboard LeftControl - 0xE1 Keyboard LeftShift - 0xE2 Keyboard LeftAlt - 0xE3 Keyboard Left GUI - 0xE4 Keyboard RightControl - 0xE5 Keyboard RightShift - 0xE6 Keyboard RightAlt - 0xE7 Keyboard Right GUI - -8 LEDs - 0x00 Undefined - 0x01 Num Lock - 0x02 Caps Lock - 0x03 Scroll Lock - 0x04 Compose - 0x05 Kana - 0x06 Power - 0x07 Shift - 0x08 Do Not Disturb - 0x09 Mute - 0x0A Tone Enable - 0x0B High Cut Filter - 0x0C Low Cut Filter - 0x0D Equalizer Enable - 0x0E Sound Field On - 0x0F Surround Field On - 0x10 Repeat - 0x11 Stereo - 0x12 Sampling Rate Detect - 0x13 Spinning - 0x14 CAV - 0x15 CLV - 0x16 Recording Format Detect - 0x17 Off-Hook - 0x18 Ring - 0x19 Message Waiting - 0x1A Data Mode - 0x1B Battery Operation - 0x1C Battery OK - 0x1D Battery Low - 0x1E Speaker - 0x1F Head Set - 0x20 Hold - 0x21 Microphone - 0x22 Coverage - 0x23 Night Mode - 0x24 Send Calls - 0x25 Call Pickup - 0x26 Conference - 0x27 Stand-by - 0x28 Camera On - 0x29 Camera Off - 0x2A On-Line - 0x2B Off-Line - 0x2C Busy - 0x2D Ready - 0x2E Paper-Out - 0x2F Paper-Jam - 0x30 Remote - 0x31 Forward - 0x32 Reverse - 0x33 Stop - 0x34 Rewind - 0x35 Fast Forward - 0x36 Play - 0x37 Pause - 0x38 Record - 0x39 Error - 0x3A Usage Selected Indicator - 0x3B Usage In Use Indicator - 0x3C Usage Multi Mode Indicator - 0x3D Indicator On - 0x3E Indicator Flash - 0x3F Indicator Slow Blink - 0x40 Indicator Fast Blink - 0x41 Indicator Off - 0x42 Flash On Time - 0x43 Slow Blink On Time - 0x44 Slow Blink Off Time - 0x45 Fast Blink On Time - 0x46 Fast Blink Off Time - 0x47 Usage Indicator Color - 0x48 Red - 0x49 Green - 0x4A Amber - 0x4B Generic Indicator - 0x4C System Suspend - 0x4D External Power Connected - 0x4C-FFFF Reserved - -9 Button - 0x00 No Button Pressed - * Button %d - -10 Ordinal - 0x00 Unused - * Instance %d - -11 Telephony - 0x00 Unassigned - 0x01 Phone - 0x02 Answering Machine - 0x03 Message Controls - 0x04 Handset - 0x05 Headset - 0x06 Telephony Key Pad - 0x07 Programmable Button - 0x20 Hook Switch - 0x21 Flash - 0x22 Feature - 0x23 Hold - 0x24 Redial - 0x25 Transfer - 0x26 Drop - 0x27 Park - 0x28 Forward Calls - 0x29 Alternate Function - 0x2A Line - 0x2B Speaker Phone - 0x2C Conference - 0x2D Ring Enable - 0x2E Ring Select - 0x2F Phone Mute - 0x30 Caller ID - 0x50 Speed Dial - 0x51 Store Number - 0x52 Recall Number - 0x53 Phone Directory - 0x70 Voice Mail - 0x71 Screen Calls - 0x72 Do Not Disturb - 0x73 Message - 0x74 Answer On/Off - 0x90 Inside Dial Tone - 0x91 Outside Dial Tone - 0x92 Inside Ring Tone - 0x93 Outside Ring Tone - 0x94 Priority Ring Tone - 0x95 Inside Ringback - 0x96 Priority Ringback - 0x97 Line Busy Tone - 0x98 Reorder Tone - 0x99 Call Waiting Tone - 0x9A Confirmation Tone 1 - 0x9B Confirmation Tone 2 - 0x9C Tones Off - 0xB0 Phone Key 0 - 0xB1 Phone Key 1 - 0xB2 Phone Key 2 - 0xB3 Phone Key 3 - 0xB4 Phone Key 4 - 0xB5 Phone Key 5 - 0xB6 Phone Key 6 - 0xB7 Phone Key 7 - 0xB8 Phone Key 8 - 0xB9 Phone Key 9 - 0xBA Phone Key Star - 0xBB Phone Key Pound - 0xBC Phone Key A - 0xBD Phone Key B - 0xBE Phone Key C - 0xBF Phone Key D - -12 Consumer - 0x00 Unassigned - 0x01 Consumer Control - 0x02 Numeric Key Pad - 0x03 Programmable Buttons - 0x20 +10 - 0x21 +100 - 0x22 AM/PM - 0x30 Power - 0x31 Reset - 0x32 Sleep - 0x33 Sleep After - 0x34 Sleep Mode - 0x35 Illumination - 0x36 Function Buttons - 0x40 Menu - 0x41 Menu Pick - 0x42 Menu Up - 0x43 Menu Down - 0x44 Menu Left - 0x45 Menu Right - 0x46 Menu Escape - 0x47 Menu Value Increase - 0x48 Menu Value Decrease - 0x60 Data On Screen - 0x61 Closed Caption - 0x62 Closed Caption Select - 0x63 VCR/TV - 0x64 Broadcast Mode - 0x65 Snapshot - 0x66 Still - 0x80 Selection - 0x81 Assign Selection - 0x82 Mode Step - 0x83 Recall Last - 0x84 Enter Channel - 0x85 Order Movie - 0x86 Channel - 0x87 Media Selection - 0x88 Media Select Computer - 0x89 Media Select TV - 0x8A Media Select WWW - 0x8B Media Select DVD - 0x8C Media Select Telephone - 0x8D Media Select Program Guide - 0x8E Media Select Video Phone - 0x8F Media Select Games - 0x90 Media Select Messages - 0x91 Media Select CD - 0x92 Media Select VCR - 0x93 Media Select Tuner - 0x94 Quit - 0x95 Help - 0x96 Media Select Tape - 0x97 Media Select Cable - 0x98 Media Select Satellite - 0x99 Media Select Security - 0x9A Media Select Home - 0x9B Media Select Call - 0x9C Channel Increment - 0x9D Channel Decrement - 0x9E Media Select SAP - 0xA0 VCR Plus - 0xA1 Once - 0xA2 Daily - 0xA3 Weekly - 0xA4 Monthly - 0xB0 Play - 0xB1 Pause - 0xB2 Record - 0xB3 Fast Forward - 0xB4 Rewind - 0xB5 Scan Next Track - 0xB6 Scan Previous Track - 0xB7 Stop - 0xB8 Eject - 0xB9 Random Play - 0xBA Select DisC - 0xBB Enter Disc - 0xBC Repeat - 0xBD Tracking - 0xBE Track Normal - 0xBF Slow Tracking - 0xC0 Frame Forward - 0xC1 Frame Back - 0xC2 Mark - 0xC3 Clear Mark - 0xC4 Repeat From Mark - 0xC5 Return To Mark - 0xC6 Search Mark Forward - 0xC7 Search Mark Backwards - 0xC8 Counter Reset - 0xC9 Show Counter - 0xCA Tracking Increment - 0xCB Tracking Decrement - 0xE0 Volume - 0xE1 Balance - 0xE2 Mute - 0xE3 Bass - 0xE4 Treble - 0xE5 Bass Boost - 0xE6 Surround Mode - 0xE7 Loudness - 0xE8 MPX - 0xE9 Volume Up - 0xEA Volume Down - 0xF0 Speed Select - 0xF1 Playback Speed - 0xF2 Standard Play - 0xF3 Long Play - 0xF4 Extended Play - 0xF5 Slow - 0x100 Fan Enable - 0x101 Fan Speed - 0x102 Light - 0x103 Light Illumination Level - 0x104 Climate Control Enable - 0x105 Room Temperature - 0x106 Security Enable - 0x107 Fire Alarm - 0x108 Police Alarm - 0x150 Balance Right - 0x151 Balance Left - 0x152 Bass Increment - 0x153 Bass Decrement - 0x154 Treble Increment - 0x155 Treble Decrement - 0x160 Speaker System - 0x161 Channel Left - 0x162 Channel Right - 0x163 Channel Center - 0x164 Channel Front - 0x165 Channel Center Front - 0x166 Channel Side - 0x167 Channel Surround - 0x168 Channel Low Frequency Enhancement - 0x169 Channel Top - 0x16A Channel Unknown - 0x170 Sub-channel - 0x171 Sub-channel Increment - 0x172 Sub-channel Decrement - 0x173 Alternate Audio Increment - 0x174 Alternate Audio Decrement - 0x180 Application Launch Buttons - 0x181 AL Launch Button Configuration Tool - 0x182 AL Programmable Button Configuration - 0x183 AL Consumer Control Configuration - 0x184 AL Word Processor - 0x185 AL Text Editor - 0x186 AL Spreadsheet - 0x187 AL Graphics Editor - 0x188 AL Presentation App - 0x189 AL Database App - 0x18A AL Email Reader - 0x18B AL Newsreader - 0x18C AL Voicemail - 0x18D AL Contacts/Address Book - 0x18E AL Calendar/Schedule - 0x18F AL Task/Project Manager - 0x190 AL Log/Journal/Timecard - 0x191 AL Checkbook/Finance - 0x192 AL Calculator - 0x193 AL A/V Capture/Playback - 0x194 AL Local Machine Browser - 0x195 AL LAN/WAN Browser - 0x196 AL Internet Browser - 0x197 AL Remote Networking/ISP Connect - 0x198 AL Network Conference - 0x199 AL Network Chat - 0x19A AL Telephony/Dialer - 0x19B AL Logon - 0x19C AL Logoff - 0x19D AL Logon/Logoff - 0x19E AL Terminal Lock/Screensaver - 0x19F AL Control Panel - 0x1A0 AL Command Line Processor/Run - 0x1A1 AL Process/Task Manager - 0x1A2 AL Select Tast/Application - 0x1A3 AL Next Task/Application - 0x1A4 AL Previous Task/Application - 0x1A5 AL Preemptive Halt Task/Application - 0x200 Generic GUI Application Controls - 0x201 AC New - 0x202 AC Open - 0x203 AC Close - 0x204 AC Exit - 0x205 AC Maximize - 0x206 AC Minimize - 0x207 AC Save - 0x208 AC Print - 0x209 AC Properties - 0x21A AC Undo - 0x21B AC Copy - 0x21C AC Cut - 0x21D AC Paste - 0x21E AC Select All - 0x21F AC Find - 0x220 AC Find and Replace - 0x221 AC Search - 0x222 AC Go To - 0x223 AC Home - 0x224 AC Back - 0x225 AC Forward - 0x226 AC Stop - 0x227 AC Refresh - 0x228 AC Previous Link - 0x229 AC Next Link - 0x22A AC Bookmarks - 0x22B AC History - 0x22C AC Subscriptions - 0x22D AC Zoom In - 0x22E AC Zoom Out - 0x22F AC Zoom - 0x230 AC Full Screen View - 0x231 AC Normal View - 0x232 AC View Toggle - 0x233 AC Scroll Up - 0x234 AC Scroll Down - 0x235 AC Scroll - 0x236 AC Pan Left - 0x237 AC Pan Right - 0x238 AC Pan - 0x239 AC New Window - 0x23A AC Tile Horizontally - 0x23B AC Tile Vertically - 0x23C AC Format - -13 Digitizer - 0x00 Undefined - 0x01 Digitizer - 0x02 Pen - 0x03 Light Pen - 0x04 Touch Screen - 0x05 Touch Pad - 0x06 White Board - 0x07 Coordinate Measuring Machine - 0x08 3-D Digitizer - 0x09 Stereo Plotter - 0x0A Articulated Arm - 0x0B Armature - 0x0C Multiple Point Digitizer - 0x0D Free Space Wand - 0x20 Stylus - 0x21 Puck - 0x22 Finger - 0x30 Tip Pressure - 0x31 Barrel Pressure - 0x32 In Range - 0x33 Touch - 0x34 Untouch - 0x35 Tap - 0x36 Quality - 0x37 Data Valid - 0x38 Transducer Index - 0x39 Tablet Function Keys - 0x3A Program Change Keys - 0x3B Battery Strength - 0x3C Invert - 0x3D X Tilt - 0x3E Y Tilt - 0x3F Azimuth - 0x40 Altitude - 0x41 Twist - 0x42 Tip Switch - 0x43 Secondary Tip Switch - 0x44 Barrel Switch - 0x45 Eraser - 0x46 Tablet Pick - -15 Physical Interface Device - -16 Unicode - * Unicode Char u%04x - -20 Alphnumeric Display - 0x00 Undefined - 0x01 Alphanumeric Display - 0x20 Display Attributes Report - 0x21 ASCII Character Set - 0x22 Data Read Back - 0x23 Font Read Back - 0x24 Display Control Report - 0x25 Clear Display - 0x26 Display Enable - 0x27 Screen Saver Delay - 0x28 Screen Saver Enable - 0x29 Vertical Scroll - 0x2A Horizontal Scroll - 0x2B Character Report - 0x2C Display Data - 0x2D Display Status - 0x2E Stat Not Ready - 0x2F Stat Ready - 0x30 Err Not a loadable character - 0x31 Err Font data cannot be read - 0x32 Cursor Position Report - 0x33 Row - 0x34 Column - 0x35 Rows - 0x36 Columns - 0x37 Cursor Pixel Positioning - 0x38 Cursor Mode - 0x39 Cursor Enable - 0x3A Cursor Blink - 0x3B Font Report - 0x3C Font Data - 0x3D Character Width - 0x3E Character Height - 0x3F Character Spacing Horizontal - 0x40 Character Spacing Vertical - 0x41 Unicode Character Set - -128 Monitor - 0x00 Undefined - 0x01 Monitor Control - 0x02 EDID Information - 0x03 VDIF Information - 0x04 VESA Version - 0x05 On Screen Display - 0x06 Auto Size Center - 0x07 Polarity Horz Synch - 0x08 Polarity Vert Synch - 0x09 Sync Type - 0x0A Screen Position - 0x0B Horizontal Frequency - 0x0C Vertical Frequency - -129 Monitor Enumerated Values - 0x00 unassigned - * ENUM %d - -130 VESA Virtual Controls - 0x10 Brightness - 0x12 Contrast - 0x16 Video Gain Red - 0x18 Video Gain Green - 0x1A Video Gain Blue - 0x1C Focus - 0x20 Horizontal Position - 0x22 Horizontal Size - 0x24 Horizontal Pincushion - 0x26 Horizontal Pincushion Balance - 0x28 Horizontal Misconvergence - 0x2A Horizontal Linearity - 0x2C Horizontal Linearity Balance - 0x30 Vertical Position - 0x32 Vertical Size - 0x34 Vertical Pincushion - 0x36 Vertical Pincushion Balance - 0x38 Vertical Misconvergence - 0x3A Vertical Linearity - 0x3C Vertical Linearity Balance - 0x40 Parallelogram Distortion - 0x42 Trapezoidal Distortion - 0x44 Tilt - 0x46 Top Corner Distortion Control - 0x48 Top Corner Distortion Balance - 0x4A Bottom Corner Distortion Control - 0x4C Bottom Corner Distortion Balance - 0x56 Moiré Horizontal - 0x58 Moiré Vertical - 0x5E Input Level Select - 0x60 Input Source Select - 0x62 Stereo Mode - 0x6C Video Black Level Red - 0x6E Video Black Level Green - 0x70 Video Black Level Blue - -131 VESA Command - 0x00 Undefined - 0x01 Settings - 0x02 Degauss - -132 Power Device - 0x00 Undefined - 0x01 iName - 0x02 PresentStatus - 0x03 ChangedStatus - 0x04 UPS - 0x05 PowerSupply - 0x10 BatterySystem - 0x11 BatterySystemID - 0x12 Battery - 0x13 BatteryID - 0x14 Charger - 0x15 ChargerID - 0x16 PowerConverter - 0x17 PowerConverterID - 0x18 OutletSystem - 0x19 OutletSystemID - 0x1A Input - 0x1B InputID - 0x1C Output - 0x1D OutputID - 0x1E Flow - 0x1F FlowID - 0x20 Outlet - 0x21 OutletID - 0x22 Gang - 0x23 GangID - 0x24 Sink - 0x25 SinkID - 0x30 Voltage - 0x31 Current - 0x32 Frequency - 0x33 ApparentPower - 0x34 ActivePower - 0x35 PercentLoad - 0x36 Temperature - 0x37 Humidity - 0x40 ConfigVoltage - 0x41 ConfigCurrent - 0x42 ConfigFrequency - 0x43 ConfigApparentPower - 0x44 ConfigActivePower - 0x45 ConfigPercentLoad - 0x46 ConfigTemperature - 0x47 ConfigHumidity - 0x50 SwitchOnControl - 0x51 SwitchOffControl - 0x52 ToggleControl - 0x53 LowVoltageTransfer - 0x54 HighVoltageTransfer - 0x55 DelayBeforeReboot - 0x56 DelayBeforeStartup - 0x57 DelayBeforeShutdown - 0x58 Test - 0x59 Vendorspecificcommand - 0x60 Present - 0x61 Good - 0x62 InternalFailure - 0x63 VoltageOutOfRange - 0x64 FrequencyOutOfRange - 0x65 Overload - 0x66 OverCharged - 0x67 OverTemperature - 0x68 ShutdownRequested - 0x69 ShutdownImminent - 0x6A VendorSpecificAnswerValid - 0x6B SwitchOn/Off - 0x6C Switcheble - 0x6D Used - 0x6E Boost - 0x6F Buck - 0x70 Initialized - 0x71 Tested - -133 Battery System - 0x00 Undefined - 0x01 SMBBatteryMode - 0x02 SMBBatteryStatus - 0x03 SMBAlarmWarning - 0x04 SMBChargerMode - 0x05 SMBChargerStatus - 0x06 SMBChargerSpecInfo - 0x07 SMBSelectorState - 0x08 SMBSelectorPreset - 0x09 SMBSelectorInfo - 0x10 OptionalMfgFunction1 - 0x11 OptionalMfgFunction2 - 0x12 OptionalMfgFunction3 - 0x13 OptionalMfgFunction4 - 0x14 OptionalMfgFunction5 - 0x15 ConnectionToSMBus - 0x16 OutputConnection - 0x17 ChargerConnection - 0x18 BatteryInsertion - 0x19 Usenext - 0x1A OKToUse - 0x28 ManufacturerAccess - 0x29 RemainingCapacityLimit - 0x2A RemainingTimeLimit - 0x2B AtRate - 0x2C CapacityMode - 0x2D BroadcastToCharger - 0x2E PrimaryBattery - 0x2F ChargeController - 0x40 TerminateCharge - 0x41 TermminateDischarge - 0x42 BelowRemainingCapacityLimit - 0x43 RemainingTimeLimitExpired - 0x44 Charging - 0x45 Discharging - 0x46 FullyCharged - 0x47 FullyDischarged - 0x48 ConditionningFlag - 0x49 AtRateOK - 0x4A SMBErrorCode - 0x4B NeedReplacement - 0x60 AtRateTimeToFull - 0x61 AtRateTimeToEmpty - 0x62 AverageCurrent - 0x63 Maxerror - 0x64 RelativeStateOfCharge - 0x65 AbsoluteStateOfCharge - 0x66 RemainingCapacity - 0x67 FullChargeCapacity - 0x68 RunTimeToEmpty - 0x69 AverageTimeToEmpty - 0x6A AverageTimeToFull - 0x6B CycleCount - 0x80 BattPackModelLevel - 0x81 InternalChargeController - 0x82 PrimaryBatterySupport - 0x83 DesignCapacity - 0x84 SpecificationInfo - 0x85 ManufacturerDate - 0x86 SerialNumber - 0x87 iManufacturerName - 0x88 iDevicename - 0x89 iDeviceChemistery - 0x8A iManufacturerData - 0x8B Rechargeable - 0x8C WarningCapacityLimit - 0x8D CapacityGranularity1 - 0x8E CapacityGranularity2 - 0xC0 InhibitCharge - 0xC1 EnablePolling - 0xC2 ResetToZero - 0xD0 ACPresent - 0xD1 BatteryPresent - 0xD2 PowerFail - 0xD3 AlarmInhibited - 0xD4 ThermistorUnderRange - 0xD5 ThermistorHot - 0xD6 ThermistorCold - 0xD7 ThermistorOverRange - 0xD8 VoltageOutOfRange - 0xD9 CurrentOutOfRange - 0xDA CurrentNotRegulated - 0xDB VoltageNotRegulated - 0xDC MasterMode - 0xDD ChargerBattery/HostControlled - 0xF0 ChargerSpecInfo - 0xF1 ChargerSpecRef - 0xF2 Level2 - 0xF3 Level3 - -140 Bar Code Scanner - -141 Scale Device - -144 Camera Control - -145 Arcade Device - -# Some Micro$oft non-standard extensions -0xff00 Microsoft - 0xe9 Base Up - 0xea Base Down diff --git a/xorg-server/hw/xfree86/os-support/bsd/libusb/usbvar.h b/xorg-server/hw/xfree86/os-support/bsd/libusb/usbvar.h deleted file mode 100644 index ce38a0730..000000000 --- a/xorg-server/hw/xfree86/os-support/bsd/libusb/usbvar.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 1999 Lennart Augustsson - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -struct report_desc { - unsigned int size; - unsigned char data[1]; -}; - diff --git a/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c b/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c index 06be654e1..f1ff64c2a 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c @@ -123,24 +123,6 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, return rv; } -/***************************************************************************/ -/* Interrupt Handling section */ -/***************************************************************************/ - -_X_EXPORT Bool -xf86DisableInterrupts() -{ - - return(TRUE); -} - -_X_EXPORT void -xf86EnableInterrupts() -{ - - return; -} - Bool xf86EnableIO() { int fd = xf86Info.screenFd; diff --git a/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c b/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c index fb5e8529b..fe3b5e7f2 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c @@ -89,21 +89,3 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, return (0); } - -/***************************************************************************/ -/* Interrupt Handling section */ -/***************************************************************************/ - -_X_EXPORT Bool -xf86DisableInterrupts() -{ - - return(TRUE); -} - -_X_EXPORT void -xf86EnableInterrupts() -{ - - return; -} diff --git a/xorg-server/hw/xfree86/os-support/bus/Makefile.am b/xorg-server/hw/xfree86/os-support/bus/Makefile.am index d48fcb67d..92a519bcc 100644 --- a/xorg-server/hw/xfree86/os-support/bus/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/bus/Makefile.am @@ -11,18 +11,6 @@ if XORG_BUS_BSDPCI PCI_SOURCES += bsd_pci.c endif -if XORG_BUS_IX86PCI -PCI_SOURCES += ix86Pci.c -endif - -if XORG_BUS_PPCPCI -PCI_SOURCES += ppcPci.c -endif - -if XORG_BUS_SPARCPCI -PCI_SOURCES += sparcPci.c -endif - if XORG_BUS_SPARC PLATFORM_SOURCES = Sbus.c sdk_HEADERS += xf86Sbus.h diff --git a/xorg-server/hw/xfree86/os-support/bus/Makefile.in b/xorg-server/hw/xfree86/os-support/bus/Makefile.in index fb2391280..77110b7d2 100644 --- a/xorg-server/hw/xfree86/os-support/bus/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/bus/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -35,10 +35,7 @@ build_triplet = @build@ host_triplet = @host@ @XORG_BUS_LINUXPCI_TRUE@am__append_1 = linuxPci.c @XORG_BUS_BSDPCI_TRUE@am__append_2 = bsd_pci.c -@XORG_BUS_IX86PCI_TRUE@am__append_3 = ix86Pci.c -@XORG_BUS_PPCPCI_TRUE@am__append_4 = ppcPci.c -@XORG_BUS_SPARCPCI_TRUE@am__append_5 = sparcPci.c -@XORG_BUS_SPARC_TRUE@am__append_6 = xf86Sbus.h +@XORG_BUS_SPARC_TRUE@am__append_3 = xf86Sbus.h subdir = hw/xfree86/os-support/bus DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -51,7 +48,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -59,26 +55,18 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbus_la_LIBADD = -am__libbus_la_SOURCES_DIST = Pci.c Pci.h linuxPci.c bsd_pci.c \ - ix86Pci.c ppcPci.c sparcPci.c Sbus.c +am__libbus_la_SOURCES_DIST = Pci.c Pci.h linuxPci.c bsd_pci.c Sbus.c @XORG_BUS_LINUXPCI_TRUE@am__objects_1 = linuxPci.lo @XORG_BUS_BSDPCI_TRUE@am__objects_2 = bsd_pci.lo -@XORG_BUS_IX86PCI_TRUE@am__objects_3 = ix86Pci.lo -@XORG_BUS_PPCPCI_TRUE@am__objects_4 = ppcPci.lo -@XORG_BUS_SPARCPCI_TRUE@am__objects_5 = sparcPci.lo -am__objects_6 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \ - $(am__objects_4) $(am__objects_5) -@XORG_BUS_SPARC_TRUE@am__objects_7 = Sbus.lo -am_libbus_la_OBJECTS = Pci.lo $(am__objects_6) $(am__objects_7) +am__objects_3 = $(am__objects_1) $(am__objects_2) +@XORG_BUS_SPARC_TRUE@am__objects_4 = Sbus.lo +am_libbus_la_OBJECTS = Pci.lo $(am__objects_3) $(am__objects_4) libbus_la_OBJECTS = $(am_libbus_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -103,8 +91,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -125,10 +114,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -150,6 +135,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -159,18 +145,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -189,7 +172,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -203,7 +186,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -215,8 +201,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -225,8 +210,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -259,7 +244,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -269,27 +253,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -300,10 +269,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -312,13 +277,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -351,8 +311,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -372,7 +331,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -382,12 +340,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -405,12 +363,9 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ noinst_LTLIBRARIES = libbus.la -sdk_HEADERS = xf86Pci.h $(am__append_6) -PCI_SOURCES = $(am__append_1) $(am__append_2) $(am__append_3) \ - $(am__append_4) $(am__append_5) +sdk_HEADERS = xf86Pci.h $(am__append_3) +PCI_SOURCES = $(am__append_1) $(am__append_2) @XORG_BUS_SPARC_TRUE@PLATFORM_SOURCES = Sbus.c libbus_la_SOURCES = Pci.c Pci.h $(PCI_SOURCES) $(PLATFORM_PCI_SOURCES) \ $(PLATFORM_SOURCES) @@ -426,8 +381,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -472,10 +427,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Pci.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Sbus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_pci.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ix86Pci.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linuxPci.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcPci.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparcPci.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -526,7 +478,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/os-support/bus/Pci.c b/xorg-server/hw/xfree86/os-support/bus/Pci.c index 064533c77..8ca2f1f9b 100644 --- a/xorg-server/hw/xfree86/os-support/bus/Pci.c +++ b/xorg-server/hw/xfree86/os-support/bus/Pci.c @@ -136,28 +136,17 @@ #include -#define PCI_MFDEV_SUPPORT 1 /* Include PCI multifunction device support */ -#define PCI_BRIDGE_SUPPORT 1 /* Include support for PCI-to-PCI bridges */ - -/* - * Global data - */ - -pciBusInfo_t *pciBusInfo[MAX_PCI_BUSES] = { NULL, }; -_X_EXPORT int pciNumBuses = 0; /* Actual number of PCI buses */ -int pciMaxBusNum = MAX_PCI_BUSES; +/* Global data */ +pciBusFuncs_t *pciBusFuncs = NULL; _X_EXPORT ADDRESS pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr) { - int bus = PCI_BUS_FROM_TAG(tag); - - if ((bus >= 0) && (bus < pciNumBuses) && pciBusInfo[bus] && - pciBusInfo[bus]->funcs->pciAddrBusToHost) - return (*pciBusInfo[bus]->funcs->pciAddrBusToHost)(tag, type, addr); - else - return(addr); + if (pciBusFuncs && pciBusFuncs->pciAddrBusToHost) + return pciBusFuncs->pciAddrBusToHost(tag, type, addr); + else + return addr; } _X_EXPORT PCITAG @@ -172,7 +161,7 @@ pciAddrNOOP(PCITAG tag, PciAddrType type, ADDRESS addr) return(addr); } -_X_EXPORT Bool +Bool xf86scanpci(void) { Bool success = FALSE; diff --git a/xorg-server/hw/xfree86/os-support/bus/Pci.h b/xorg-server/hw/xfree86/os-support/bus/Pci.h index 557483b9b..5feb73349 100644 --- a/xorg-server/hw/xfree86/os-support/bus/Pci.h +++ b/xorg-server/hw/xfree86/os-support/bus/Pci.h @@ -115,16 +115,10 @@ /* * Global Definitions */ -#define MAX_PCI_DEVICES 128 /* Max number of devices accomodated */ - /* by xf86scanpci */ -#if defined(sun) && defined(SVR4) && defined(sparc) -# define MAX_PCI_BUSES 4096 /* Max number of PCI buses */ -#elif (defined(__alpha__) || defined(__ia64__)) && defined (linux) -# define MAX_PCI_DOMAINS 512 -# define PCI_DOM_MASK 0x01fful -# define MAX_PCI_BUSES (MAX_PCI_DOMAINS*256) /* 256 per domain */ +#if (defined(__alpha__) || defined(__ia64__)) && defined (linux) +#define PCI_DOM_MASK 0x01fful #else -# define MAX_PCI_BUSES 256 /* Max number of PCI buses */ +#define PCI_DOM_MASK 0x0ffu #endif #define DEVID(vendor, device) \ @@ -174,58 +168,21 @@ #endif /* !defined(DEBUGPCI) */ -/* - * PCI Config mechanism definitions - */ -#define PCI_EN 0x80000000 - -#define PCI_CFGMECH1_ADDRESS_REG 0xCF8 -#define PCI_CFGMECH1_DATA_REG 0xCFC - -#define PCI_CFGMECH1_MAXDEV 32 - #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || \ - defined(__DragonFly__) + defined(__DragonFly__) || defined(__sun) #define ARCH_PCI_INIT bsdPciInit #endif #if defined(linux) -# define ARCH_PCI_INIT linuxPciInit -# if defined(__m32r__) -# define INCLUDE_XF86_MAP_PCI_MEM -# define INCLUDE_XF86_NO_DOMAIN -# endif +#define ARCH_PCI_INIT linuxPciInit #endif /* defined(linux) */ - -#if !defined(ARCH_PCI_INIT) -/* - * Select architecture specific PCI init function - */ -#if defined(__i386__) || defined(__i386) || defined(__amd64__) || defined(__amd64) || defined(__x86_64__) -# define ARCH_PCI_INIT ix86PciInit -#elif defined(__powerpc__) || defined(__powerpc64__) -# define ARCH_PCI_INIT ppcPciInit -#elif defined(__sparc__) || defined(sparc) -# define ARCH_PCI_INIT sparcPciInit -# define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge -#endif -#endif /* !defined(ARCH_PCI_INIT) */ - #ifndef ARCH_PCI_INIT #error No PCI support available for this architecture/OS combination #endif extern void ARCH_PCI_INIT(void); -#if defined(XF86SCANPCI_WRAPPER) -typedef enum { - SCANPCI_INIT, - SCANPCI_TERM -} scanpciWrapperOpt; -extern void XF86SCANPCI_WRAPPER(scanpciWrapperOpt flags); -#endif - /* * Table of functions used to access a specific PCI bus domain * (e.g. a primary PCI bus and all of its secondaries) @@ -234,36 +191,9 @@ typedef struct pci_bus_funcs { ADDRESS (*pciAddrBusToHost)(PCITAG, PciAddrType, ADDRESS); } pciBusFuncs_t, *pciBusFuncs_p; -/* - * pciBusInfo_t - One structure per defined PCI bus - */ -typedef struct pci_bus_info { - unsigned char configMech; /* PCI config type to use */ - unsigned char numDevices; /* Range of valid devnums */ - unsigned char secondary; /* Boolean: bus is a secondary */ - int primary_bus; /* Parent bus */ - pciBusFuncs_p funcs; /* PCI access functions */ - void *pciBusPriv; /* Implementation private data */ - struct pci_device *bridge; /* bridge that opens this bus */ -} pciBusInfo_t; - -#define HOST_NO_BUS ((pciBusInfo_t *)(-1)) - -/* configMech values */ -#define PCI_CFG_MECH_UNKNOWN 0 /* Not yet known */ -#define PCI_CFG_MECH_1 1 /* Most machines */ -#define PCI_CFG_MECH_2 2 /* Older PC's */ -#define PCI_CFG_MECH_OTHER 3 /* Something else */ - /* Generic PCI service functions and helpers */ -CARD32 pciCfgMech1Read(PCITAG tag, int offset); -void pciCfgMech1Write(PCITAG tag, int offset, CARD32 val); -void pciCfgMech1SetBits(PCITAG tag, int offset, CARD32 mask, - CARD32 val); ADDRESS pciAddrNOOP(PCITAG tag, PciAddrType type, ADDRESS); -extern int pciMaxBusNum; - -extern pciBusInfo_t *pciBusInfo[]; +extern pciBusFuncs_t *pciBusFuncs; #endif /* _PCI_H */ diff --git a/xorg-server/hw/xfree86/os-support/bus/Sbus.c b/xorg-server/hw/xfree86/os-support/bus/Sbus.c index ff257a8c7..1363d5746 100644 --- a/xorg-server/hw/xfree86/os-support/bus/Sbus.c +++ b/xorg-server/hw/xfree86/os-support/bus/Sbus.c @@ -54,20 +54,20 @@ static struct openpromio *promOpio; sbusDevicePtr *xf86SbusInfo = NULL; struct sbus_devtable sbusDeviceTable[] = { - { SBUS_DEVICE_BW2, FBTYPE_SUN2BW, "bwtwo", "Sun Monochrome (bwtwo)" }, - { SBUS_DEVICE_CG2, FBTYPE_SUN2COLOR, "cgtwo", "Sun Color2 (cgtwo)" }, - { SBUS_DEVICE_CG3, FBTYPE_SUN3COLOR, "cgthree", "Sun Color3 (cgthree)" }, - { SBUS_DEVICE_CG4, FBTYPE_SUN4COLOR, "cgfour", "Sun Color4 (cgfour)" }, - { SBUS_DEVICE_CG6, FBTYPE_SUNFAST_COLOR, "cgsix", "Sun GX" }, - { SBUS_DEVICE_CG8, FBTYPE_MEMCOLOR, "cgeight", "Sun CG8/RasterOps" }, - { SBUS_DEVICE_CG12, FBTYPE_SUNGP3, "cgtwelve", "Sun GS (cgtwelve)" }, - { SBUS_DEVICE_CG14, FBTYPE_MDICOLOR, "cgfourteen", "Sun SX" }, - { SBUS_DEVICE_GT, FBTYPE_SUNGT, "gt", "Sun Graphics Tower" }, - { SBUS_DEVICE_MGX, -1, "mgx", "Quantum 3D MGXplus" }, - { SBUS_DEVICE_LEO, FBTYPE_SUNLEO, "leo", "Sun ZX or Turbo ZX" }, - { SBUS_DEVICE_TCX, FBTYPE_TCXCOLOR, "tcx", "Sun TCX" }, - { SBUS_DEVICE_FFB, FBTYPE_CREATOR, "ffb", "Sun FFB" }, - { SBUS_DEVICE_FFB, FBTYPE_CREATOR, "afb", "Sun Elite3D" }, + { SBUS_DEVICE_BW2, FBTYPE_SUN2BW, "bwtwo", "sunbw2", "Sun Monochrome (bwtwo)" }, + { SBUS_DEVICE_CG2, FBTYPE_SUN2COLOR, "cgtwo", NULL, "Sun Color2 (cgtwo)" }, + { SBUS_DEVICE_CG3, FBTYPE_SUN3COLOR, "cgthree", "suncg3", "Sun Color3 (cgthree)" }, + { SBUS_DEVICE_CG4, FBTYPE_SUN4COLOR, "cgfour", NULL, "Sun Color4 (cgfour)" }, + { SBUS_DEVICE_CG6, FBTYPE_SUNFAST_COLOR, "cgsix", "suncg6", "Sun GX" }, + { SBUS_DEVICE_CG8, FBTYPE_MEMCOLOR, "cgeight", NULL, "Sun CG8/RasterOps" }, + { SBUS_DEVICE_CG12, FBTYPE_SUNGP3, "cgtwelve", NULL, "Sun GS (cgtwelve)" }, + { SBUS_DEVICE_CG14, FBTYPE_MDICOLOR, "cgfourteen", "suncg14", "Sun SX" }, + { SBUS_DEVICE_GT, FBTYPE_SUNGT, "gt", NULL, "Sun Graphics Tower" }, + { SBUS_DEVICE_MGX, -1, "mgx", NULL, "Quantum 3D MGXplus" }, + { SBUS_DEVICE_LEO, FBTYPE_SUNLEO, "leo", "sunleo", "Sun ZX or Turbo ZX" }, + { SBUS_DEVICE_TCX, FBTYPE_TCXCOLOR, "tcx", "suntcx", "Sun TCX" }, + { SBUS_DEVICE_FFB, FBTYPE_CREATOR, "ffb", "sunffb", "Sun FFB" }, + { SBUS_DEVICE_FFB, FBTYPE_CREATOR, "afb", "sunffb", "Sun Elite3D" }, { 0, 0, NULL } }; @@ -240,6 +240,60 @@ sparcPromGetBool(sbusPromNodePtr pnode, const char *prop) return promGetBool(prop); } +static char * +promWalkGetDriverName(int node, int oldnode) +{ + int nextnode; + int len; + char *prop; + int devId, i; + + prop = promGetProperty("device_type", &len); + if (prop && (len > 0)) do { + if (!strcmp(prop, "display")) { + prop = promGetProperty("name", &len); + if (!prop || len <= 0) + break; + while ((*prop >= 'A' && *prop <= 'Z') || *prop == ',') + prop++; + for (i = 0; sbusDeviceTable[i].devId; i++) + if (!strcmp(prop, sbusDeviceTable[i].promName)) + break; + devId = sbusDeviceTable[i].devId; + if (!devId) + break; + if (sbusDeviceTable[i].driverName) + return sbusDeviceTable[i].driverName; + } + } while (0); + + nextnode = promGetChild(node); + if (nextnode) { + char *name; + name = promWalkGetDriverName(nextnode, node); + if (name) + return name; + } + + nextnode = promGetSibling(node); + if (nextnode) + return promWalkGetDriverName(nextnode, node); + return NULL; +} + +char * +sparcDriverName(void) +{ + char *name; + + if (sparcPromInit() < 0) + return NULL; + promGetSibling(0); + name = promWalkGetDriverName(promRootNode, 0); + sparcPromClose(); + return name; +} + static void promWalkAssignNodes(int node, int oldnode, int flags, sbusDevicePtr *devicePtrs) { @@ -321,7 +375,7 @@ sparcPromAssignNodes(void) FILE *f; sbusDevicePtr devicePtrs[32]; - (void)memset(devicePtrs, 0, sizeof(devicePtrs)); + memset(devicePtrs, 0, sizeof(devicePtrs)); for (psdpp = xf86SbusInfo, n = 0; (psdp = *psdpp); psdpp++, n++) { if (psdp->fbNum != n) holes = 1; diff --git a/xorg-server/hw/xfree86/os-support/bus/bsd_pci.c b/xorg-server/hw/xfree86/os-support/bus/bsd_pci.c index 57ad09b6a..9b55d3a44 100644 --- a/xorg-server/hw/xfree86/os-support/bus/bsd_pci.c +++ b/xorg-server/hw/xfree86/os-support/bus/bsd_pci.c @@ -48,20 +48,6 @@ #include "pciaccess.h" -static pciBusFuncs_t bsd_funcs = { - .pciAddrBusToHost = pciAddrNOOP, -}; - -static pciBusInfo_t bsd_pci = { - .configMech = PCI_CFG_MECH_OTHER, - .numDevices = 32, - .secondary = FALSE, - .primary_bus = 0, - .funcs = &bsd_funcs, - .pciBusPriv = NULL, - .bridge = NULL, -}; - _X_EXPORT pointer xf86MapDomainMemory(int ScreenNum, int Flags, struct pci_device *dev, ADDRESS Base, unsigned long Size) @@ -79,8 +65,5 @@ xf86MapLegacyIO(struct pci_device *dev) void bsdPciInit(void) { - pciNumBuses = 1; - pciBusInfo[0] = &bsd_pci; - xf86InitVidMem(); } diff --git a/xorg-server/hw/xfree86/os-support/bus/ix86Pci.c b/xorg-server/hw/xfree86/os-support/bus/ix86Pci.c deleted file mode 100644 index e54246355..000000000 --- a/xorg-server/hw/xfree86/os-support/bus/ix86Pci.c +++ /dev/null @@ -1,718 +0,0 @@ -/* - * ix86Pci.c - x86 PCI driver - * - * The XFree86 server PCI access functions have been reimplemented as a - * framework that allows each supported platform/OS to have their own - * platform/OS specific PCI driver. - * - * Most of the code of these functions was simply lifted from the - * Intel architecture specifric portion of the original Xfree86 - * PCI code in hw/xfree86/common_hw/xf86_PCI.C... - * - * Gary Barton - * Concurrent Computer Corporation - * garyb@gate.net - */ - -/* - * Copyright 1998 by Concurrent Computer Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of Concurrent Computer - * Corporation not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior - * permission. Concurrent Computer Corporation makes no representations - * about the suitability of this software for any purpose. It is - * provided "as is" without express or implied warranty. - * - * CONCURRENT COMPUTER CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD - * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CONCURRENT COMPUTER CORPORATION BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * - * Copyright 1998 by Metro Link Incorporated - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of Metro Link - * Incorporated not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior - * permission. Metro Link Incorporated makes no representations - * about the suitability of this software for any purpose. It is - * provided "as is" without express or implied warranty. - * - * METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD - * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * - * This software is derived from the original XFree86 PCI code - * which includes the following copyright notices as well: - * - * Copyright 1995 by Robin Cutshaw - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the names of the above listed copyright holder(s) - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. The above listed - * copyright holder(s) make(s) no representations about the suitability of this - * software for any purpose. It is provided "as is" without express or - * implied warranty. - * - * THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD - * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER - * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * This code is also based heavily on the code in FreeBSD-current, which was - * written by Wolfgang Stanglmeier, and contains the following copyright: - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -/* - * Copyright (c) 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 - -#include -#include "compiler.h" -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" -#include "Pci.h" - -#ifdef PC98 -#define outb(port,data) _outb(port,data) -#define outl(port,data) _outl(port,data) -#define inb(port) _inb(port) -#define inl(port) _inl(port) -#endif - -#define PCI_CFGMECH2_ENABLE_REG 0xCF8 -#ifdef PC98 -#define PCI_CFGMECH2_FORWARD_REG 0xCF9 -#else -#define PCI_CFGMECH2_FORWARD_REG 0xCFA -#endif - -#define PCI_CFGMECH2_MAXDEV 16 - -#define PCI_ADDR_FROM_TAG_CFG1(tag,reg) (PCI_EN | tag | (reg & 0xfc)) -#define PCI_FORWARD_FROM_TAG(tag) PCI_BUS_FROM_TAG(tag) -#define PCI_ENABLE_FROM_TAG(tag) (0xf0 | (((tag) & 0x00000700) >> 7)) -#define PCI_ADDR_FROM_TAG_CFG2(tag,reg) (0xc000 | (((tag) & 0x0000f800) >> 3) \ - | (reg & 0xfc)) - -/* - * Intel x86 platform specific PCI access functions - */ -#if 0 -static CARD32 ix86PciReadLongSetup(PCITAG tag, int off); -static void ix86PciWriteLongSetup(PCITAG, int off, CARD32 val); -static void ix86PciSetBitsLongSetup(PCITAG, int off, CARD32 mask, CARD32 val); -static CARD32 ix86PciReadLongCFG1(PCITAG tag, int off); -static void ix86PciWriteLongCFG1(PCITAG, int off, CARD32 val); -static void ix86PciSetBitsLongCFG1(PCITAG, int off, CARD32 mask, CARD32 val); -static CARD32 ix86PciReadLongCFG2(PCITAG tag, int off); -static void ix86PciWriteLongCFG2(PCITAG, int off, CARD32 val); -static void ix86PciSetBitsLongCFG2(PCITAG, int off, CARD32 mask, CARD32 val); -#endif - -static pciBusFuncs_t ix86Funcs0 = { -#if 0 -/* pciReadLong */ ix86PciReadLongSetup, -/* pciWriteLong */ ix86PciWriteLongSetup, -/* pciSetBitsLong */ ix86PciSetBitsLongSetup, -/* pciAddrHostToBus */ pciAddrNOOP, -#endif -/* pciAddrBusToHost */ pciAddrNOOP -}; - -static pciBusFuncs_t ix86Funcs1 = { -#if 0 -/* pciReadLong */ ix86PciReadLongCFG1, -/* pciWriteLong */ ix86PciWriteLongCFG1, -/* pciSetBitsLong */ ix86PciSetBitsLongCFG1, -/* pciAddrHostToBus */ pciAddrNOOP, -#endif -/* pciAddrBusToHost */ pciAddrNOOP -}; - -static pciBusFuncs_t ix86Funcs2 = { -#if 0 -/* pciReadLong */ ix86PciReadLongCFG2, -/* pciWriteLong */ ix86PciWriteLongCFG2, -/* pciSetBitsLong */ ix86PciSetBitsLongCFG2, -/* pciAddrHostToBus */ pciAddrNOOP, -#endif -/* pciAddrBusToHost */ pciAddrNOOP -}; - -static pciBusInfo_t ix86Pci0 = { -/* configMech */ PCI_CFG_MECH_UNKNOWN, /* Set by ix86PciInit() */ -/* numDevices */ 0, /* Set by ix86PciInit() */ -/* secondary */ FALSE, -/* primary_bus */ 0, -/* funcs */ &ix86Funcs0, /* Set by ix86PciInit() */ -/* pciBusPriv */ NULL, -/* bridge */ NULL -}; - -_X_EXPORT pointer -xf86MapDomainMemory(int ScreenNum, int Flags, struct pci_device *dev, - ADDRESS Base, unsigned long Size) -{ - return xf86MapVidMem(ScreenNum, Flags, Base, Size); -} - -IOADDRESS -xf86MapLegacyIO(struct pci_device *dev) -{ - (void)dev; - return 0; -} - -static Bool -ix86PciBusCheck(void) -{ -#if 0 - PCITAG tag; - CARD32 id, class; - CARD8 device; - - for (device = 0; device < ix86Pci0.numDevices; device++) { - tag = PCI_MAKE_TAG(0, device, 0); - id = (*ix86Pci0.funcs->pciReadLong)(tag, PCI_ID_REG); - - if ((CARD16)(id + 1U) <= (CARD16)1UL) - continue; - - /* The rest of this is inspired by the Linux kernel */ - class = (*ix86Pci0.funcs->pciReadLong)(tag, PCI_CLASS_REG); - - /* Ignore revision id and programming interface */ - switch (class >> 16) { - case (PCI_CLASS_PREHISTORIC << 8) | PCI_SUBCLASS_PREHISTORIC_MISC: - /* Check for vendors of known buggy chipsets */ - id &= 0x0000ffff; - if ((id == PCI_VENDOR_INTEL) || (id == PCI_VENDOR_COMPAQ)) - return TRUE; - continue; - - case (PCI_CLASS_PREHISTORIC << 8) | PCI_SUBCLASS_PREHISTORIC_VGA: - case (PCI_CLASS_DISPLAY << 8) | PCI_SUBCLASS_DISPLAY_VGA: - case (PCI_CLASS_BRIDGE << 8) | PCI_SUBCLASS_BRIDGE_HOST: - return TRUE; - - default: - break; - } - } -#endif - return FALSE; -} - -static -void ix86PciSelectCfgmech(void) -{ - static Bool beenhere = FALSE; - CARD32 mode1Res1 = 0, mode1Res2 = 0, oldVal1 = 0; - CARD8 mode2Res1 = 0, mode2Res2 = 0, oldVal2 = 0; - int stages = 0; - - if (beenhere) - return; /* Been there, done that */ - - beenhere = TRUE; - - /* - * Determine if motherboard chipset supports PCI Config Mech 1 or 2 - * We rely on xf86Info.pciFlags to tell which mechanisms to try.... - */ - switch (xf86Info.pciFlags) { - case PCIOsConfig: - case PCIProbe1: - if (!xf86EnableIO()) - return; - - xf86MsgVerb(X_INFO, 2, - "PCI: Probing config type using method 1\n"); - oldVal1 = inl(PCI_CFGMECH1_ADDRESS_REG); - -#ifdef DEBUGPCI - if (xf86Verbose > 2) { - ErrorF("Checking config type 1:\n" - "\tinitial value of MODE1_ADDR_REG is 0x%08x\n", oldVal1); - ErrorF("\tChecking that all bits in mask 0x7f000000 are clear\n"); - } -#endif - - /* Assuming config type 1 to start with */ - if ((oldVal1 & 0x7f000000) == 0) { - - stages |= 0x01; - -#ifdef DEBUGPCI - if (xf86Verbose > 2) { - ErrorF("\tValue indicates possibly config type 1\n"); - ErrorF("\tWriting 32-bit value 0x%08x to MODE1_ADDR_REG\n", PCI_EN); -#if 0 - ErrorF("\tWriting 8-bit value 0x00 to MODE1_ADDR_REG + 3\n"); -#endif - } -#endif - - ix86Pci0.configMech = PCI_CFG_MECH_1; - ix86Pci0.numDevices = PCI_CFGMECH1_MAXDEV; - ix86Pci0.funcs = &ix86Funcs1; - - outl(PCI_CFGMECH1_ADDRESS_REG, PCI_EN); - -#if 0 - /* - * This seems to cause some Neptune-based PCI machines to switch - * from config type 1 to config type 2 - */ - outb(PCI_CFGMECH1_ADDRESS_REG + 3, 0); -#endif - mode1Res1 = inl(PCI_CFGMECH1_ADDRESS_REG); - -#ifdef DEBUGPCI - if (xf86Verbose > 2) { - ErrorF("\tValue read back from MODE1_ADDR_REG is 0x%08x\n", - mode1Res1); - ErrorF("\tRestoring original contents of MODE1_ADDR_REG\n"); - } -#endif - - outl(PCI_CFGMECH1_ADDRESS_REG, oldVal1); - - if (mode1Res1) { - - stages |= 0x02; - -#ifdef DEBUGPCI - if (xf86Verbose > 2) { - ErrorF("\tValue read back is non-zero, and indicates possible" - " config type 1\n"); - } -#endif - - if (ix86PciBusCheck()) { - -#ifdef DEBUGPCI - if (xf86Verbose > 2) - ErrorF("\tBus check Confirms this: "); -#endif - - xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n"); - xf86MsgVerb(X_INFO, 3, - "PCI: stages = 0x%02x, oldVal1 = 0x%08lx, mode1Res1" - " = 0x%08lx\n", stages, (unsigned long)oldVal1, - (unsigned long)mode1Res1); - return; - } - -#ifdef DEBUGPCI - if (xf86Verbose > 2) { - ErrorF("\tBus check fails to confirm this, continuing type 1" - " check ...\n"); - } -#endif - - } - - stages |= 0x04; - -#ifdef DEBUGPCI - if (xf86Verbose > 2) { - ErrorF("\tWriting 0xff000001 to MODE1_ADDR_REG\n"); - } -#endif - outl(PCI_CFGMECH1_ADDRESS_REG, 0xff000001); - mode1Res2 = inl(PCI_CFGMECH1_ADDRESS_REG); - -#ifdef DEBUGPCI - if (xf86Verbose > 2) { - ErrorF("\tValue read back from MODE1_ADDR_REG is 0x%08x\n", - mode1Res2); - ErrorF("\tRestoring original contents of MODE1_ADDR_REG\n"); - } -#endif - - outl(PCI_CFGMECH1_ADDRESS_REG, oldVal1); - - if ((mode1Res2 & 0x80000001) == 0x80000000) { - - stages |= 0x08; - -#ifdef DEBUGPCI - if (xf86Verbose > 2) { - ErrorF("\tValue read back has only the msb set\n" - "\tThis indicates possible config type 1\n"); - } -#endif - - if (ix86PciBusCheck()) { - -#ifdef DEBUGPCI - if (xf86Verbose > 2) - ErrorF("\tBus check Confirms this: "); -#endif - - xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n"); - xf86MsgVerb(X_INFO, 3, - "PCI: stages = 0x%02x, oldVal1 = 0x%08lx,\n" - "\tmode1Res1 = 0x%08lx, mode1Res2 = 0x%08lx\n", - stages, (unsigned long)oldVal1, - (unsigned long)mode1Res1, (unsigned long)mode1Res2); - return; - } - -#ifdef DEBUGPCI - if (xf86Verbose > 2) { - ErrorF("\tBus check fails to confirm this.\n"); - } -#endif - - } - } - - xf86MsgVerb(X_INFO, 3, "PCI: Standard check for type 1 failed.\n"); - xf86MsgVerb(X_INFO, 3, "PCI: stages = 0x%02x, oldVal1 = 0x%08lx,\n" - "\tmode1Res1 = 0x%08lx, mode1Res2 = 0x%08lx\n", - stages, (unsigned long)oldVal1, (unsigned long)mode1Res1, - (unsigned long)mode1Res2); - - /* Try config type 2 */ - oldVal2 = inb(PCI_CFGMECH2_ENABLE_REG); - if ((oldVal2 & 0xf0) == 0) { - ix86Pci0.configMech = PCI_CFG_MECH_2; - ix86Pci0.numDevices = PCI_CFGMECH2_MAXDEV; - ix86Pci0.funcs = &ix86Funcs2; - - outb(PCI_CFGMECH2_ENABLE_REG, 0x0e); - mode2Res1 = inb(PCI_CFGMECH2_ENABLE_REG); - outb(PCI_CFGMECH2_ENABLE_REG, oldVal2); - - if (mode2Res1 == 0x0e) { - if (ix86PciBusCheck()) { - xf86MsgVerb(X_INFO, 2, "PCI: Config type is 2\n"); - return; - } - } - } - break; /* } */ - - case PCIProbe2: /* { */ - if (!xf86EnableIO()) - return; - - /* The scanpci-style detection method */ - - xf86MsgVerb(X_INFO, 2, "PCI: Probing config type using method 2\n"); - - outb(PCI_CFGMECH2_ENABLE_REG, 0x00); - outb(PCI_CFGMECH2_FORWARD_REG, 0x00); - mode2Res1 = inb(PCI_CFGMECH2_ENABLE_REG); - mode2Res2 = inb(PCI_CFGMECH2_FORWARD_REG); - - if (mode2Res1 == 0 && mode2Res2 == 0) { - xf86MsgVerb(X_INFO, 2, "PCI: Config type is 2\n"); - ix86Pci0.configMech = PCI_CFG_MECH_2; - ix86Pci0.numDevices = PCI_CFGMECH2_MAXDEV; - ix86Pci0.funcs = &ix86Funcs2; - return; - } - - oldVal1 = inl(PCI_CFGMECH1_ADDRESS_REG); - outl(PCI_CFGMECH1_ADDRESS_REG, PCI_EN); - mode1Res1 = inl(PCI_CFGMECH1_ADDRESS_REG); - outl(PCI_CFGMECH1_ADDRESS_REG, oldVal1); - if (mode1Res1 == PCI_EN) { - xf86MsgVerb(X_INFO, 2, "PCI: Config type is 1\n"); - ix86Pci0.configMech = PCI_CFG_MECH_1; - ix86Pci0.numDevices = PCI_CFGMECH1_MAXDEV; - ix86Pci0.funcs = &ix86Funcs1; - return; - } - break; /* } */ - - case PCIForceConfig1: - if (!xf86EnableIO()) - return; - - xf86MsgVerb(X_INFO, 2, "PCI: Forcing config type 1\n"); - - ix86Pci0.configMech = PCI_CFG_MECH_1; - ix86Pci0.numDevices = PCI_CFGMECH1_MAXDEV; - ix86Pci0.funcs = &ix86Funcs1; - return; - - case PCIForceConfig2: - if (!xf86EnableIO()) - return; - - xf86MsgVerb(X_INFO, 2, "PCI: Forcing config type 2\n"); - - ix86Pci0.configMech = PCI_CFG_MECH_2; - ix86Pci0.numDevices = PCI_CFGMECH2_MAXDEV; - ix86Pci0.funcs = &ix86Funcs2; - return; - - case PCIForceNone: - break; - } - - /* No PCI found */ - ix86Pci0.configMech = PCI_CFG_MECH_UNKNOWN; - xf86MsgVerb(X_INFO, 2, "PCI: No PCI bus found or probed for\n"); -} - -#if 0 -static pciTagRec -ix86PcibusTag(CARD8 bus, CARD8 cardnum, CARD8 func) -{ - pciTagRec tag; - - tag.cfg1 = 0; - - if (func > 7 || cardnum >= pciBusInfo[bus]->numDevices) - return tag; - - switch (ix86Pci0.configMech) { - case PCI_CFG_MECH_1: - tag.cfg1 = PCI_EN | ((CARD32)bus << 16) | - ((CARD32)cardnum << 11) | - ((CARD32)func << 8); - break; - - case PCI_CFG_MECH_2: - tag.cfg2.port = 0xc000 | ((CARD16)cardnum << 8); - tag.cfg2.enable = 0xf0 | (func << 1); - tag.cfg2.forward = bus; - break; - } - - return tag; -} -#endif - -#if 0 -static CARD32 -ix86PciReadLongSetup(PCITAG Tag, int reg) -{ - ix86PciSelectCfgmech(); - return (*ix86Pci0.funcs->pciReadLong)(Tag,reg); -} - -static CARD32 -ix86PciReadLongCFG1(PCITAG Tag, int reg) -{ - CARD32 addr, data = 0; - -#ifdef DEBUGPCI - ErrorF("ix86PciReadLong 0x%lx, %d\n", Tag, reg); -#endif - - addr = PCI_ADDR_FROM_TAG_CFG1(Tag,reg); - outl(PCI_CFGMECH1_ADDRESS_REG, addr); - data = inl(PCI_CFGMECH1_DATA_REG); - outl(PCI_CFGMECH1_ADDRESS_REG, 0); - -#ifdef DEBUGPCI - ErrorF("ix86PciReadLong 0x%lx\n", data); -#endif - - return data; -} - -static CARD32 -ix86PciReadLongCFG2(PCITAG Tag, int reg) -{ - CARD32 addr, data = 0; - CARD8 forward, enable; - -#ifdef DEBUGPCI - ErrorF("ix86PciReadLong 0x%lx, %d\n", Tag, reg); -#endif - - forward = PCI_FORWARD_FROM_TAG(Tag); - enable = PCI_ENABLE_FROM_TAG(Tag); - addr = PCI_ADDR_FROM_TAG_CFG2(Tag,reg); - - outb(PCI_CFGMECH2_ENABLE_REG, enable); - outb(PCI_CFGMECH2_FORWARD_REG, forward); - data = inl((CARD16)addr); - outb(PCI_CFGMECH2_ENABLE_REG, 0); - outb(PCI_CFGMECH2_FORWARD_REG, 0); - -#ifdef DEBUGPCI - ErrorF("ix86PciReadLong 0x%lx\n", data); -#endif - - return data; -} - -static void -ix86PciWriteLongSetup(PCITAG Tag, int reg, CARD32 data) -{ - ix86PciSelectCfgmech(); - (*ix86Pci0.funcs->pciWriteLong)(Tag,reg,data); -} - -static void -ix86PciWriteLongCFG1(PCITAG Tag, int reg, CARD32 data) -{ - CARD32 addr; - - addr = PCI_ADDR_FROM_TAG_CFG1(Tag,reg); - outl(PCI_CFGMECH1_ADDRESS_REG, addr); - outl(PCI_CFGMECH1_DATA_REG, data); - outl(PCI_CFGMECH1_ADDRESS_REG, 0); -} - -static void -ix86PciWriteLongCFG2(PCITAG Tag, int reg, CARD32 data) -{ - CARD32 addr; - CARD8 forward, enable; - - forward = PCI_FORWARD_FROM_TAG(Tag); - enable = PCI_ENABLE_FROM_TAG(Tag); - addr = PCI_ADDR_FROM_TAG_CFG2(Tag,reg); - - outb(PCI_CFGMECH2_ENABLE_REG, enable); - outb(PCI_CFGMECH2_FORWARD_REG, forward); - outl((CARD16)addr, data); - outb(PCI_CFGMECH2_ENABLE_REG, 0); - outb(PCI_CFGMECH2_FORWARD_REG, 0); -} - -static void -ix86PciSetBitsLongSetup(PCITAG Tag, int reg, CARD32 mask, CARD32 val) -{ - ix86PciSelectCfgmech(); - (*ix86Pci0.funcs->pciSetBitsLong)(Tag,reg,mask,val); -} - -static void -ix86PciSetBitsLongCFG1(PCITAG Tag, int reg, CARD32 mask, CARD32 val) -{ - CARD32 addr, data = 0; - -#ifdef DEBUGPCI - ErrorF("ix86PciSetBitsLong 0x%lx, %d\n", Tag, reg); -#endif - - addr = PCI_ADDR_FROM_TAG_CFG1(Tag,reg); - outl(PCI_CFGMECH1_ADDRESS_REG, addr); - data = inl(PCI_CFGMECH1_DATA_REG); - data = (data & ~mask) | (val & mask); - outl(PCI_CFGMECH1_DATA_REG, data); - outl(PCI_CFGMECH1_ADDRESS_REG, 0); -} - -static void -ix86PciSetBitsLongCFG2(PCITAG Tag, int reg, CARD32 mask, CARD32 val) -{ - CARD32 addr, data = 0; - CARD8 enable, forward; - -#ifdef DEBUGPCI - ErrorF("ix86PciSetBitsLong 0x%lx, %d\n", Tag, reg); -#endif - - forward = PCI_FORWARD_FROM_TAG(Tag); - enable = PCI_ENABLE_FROM_TAG(Tag); - addr = PCI_ADDR_FROM_TAG_CFG2(Tag,reg); - - outb(PCI_CFGMECH2_ENABLE_REG, enable); - outb(PCI_CFGMECH2_FORWARD_REG, forward); - data = inl((CARD16)addr); - data = (data & ~mask) | (val & mask); - outl((CARD16)addr, data); - outb(PCI_CFGMECH2_ENABLE_REG, 0); - outb(PCI_CFGMECH2_FORWARD_REG, 0); -} -#endif - -void -ix86PciInit() -{ - /* Initialize pciBusInfo[] array and function pointers */ - pciNumBuses = 1; - pciBusInfo[0] = &ix86Pci0; - - /* Make sure that there is a PCI bus present. */ - ix86PciSelectCfgmech(); - if (ix86Pci0.configMech == PCI_CFG_MECH_UNKNOWN) { - pciNumBuses = 0; - pciBusInfo[0] = NULL; - } -} diff --git a/xorg-server/hw/xfree86/os-support/bus/linuxPci.c b/xorg-server/hw/xfree86/os-support/bus/linuxPci.c index 11eb4f9e8..263fd8ff1 100644 --- a/xorg-server/hw/xfree86/os-support/bus/linuxPci.c +++ b/xorg-server/hw/xfree86/os-support/bus/linuxPci.c @@ -79,44 +79,28 @@ static pciBusFuncs_t linuxFuncs0 = { #endif }; -static pciBusInfo_t linuxPci0 = { -/* configMech */ PCI_CFG_MECH_OTHER, -/* numDevices */ 32, -/* secondary */ FALSE, -/* primary_bus */ 0, -/* funcs */ &linuxFuncs0, -/* pciBusPriv */ NULL, -/* bridge */ NULL -}; - static const struct pci_id_match match_host_bridge = { PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, (PCI_CLASS_BRIDGE << 16) | (PCI_SUBCLASS_BRIDGE_HOST << 8), 0x0000ffff00, 0 }; -#ifndef INCLUDE_XF86_NO_DOMAIN #define MAX_DOMAINS 257 static pointer DomainMmappedIO[MAX_DOMAINS]; -#endif void linuxPciInit(void) { - struct stat st; + struct stat st; -#ifndef INCLUDE_XF86_NO_DOMAIN - (void) memset(DomainMmappedIO, 0, sizeof(DomainMmappedIO)); -#endif + memset(DomainMmappedIO, 0, sizeof(DomainMmappedIO)); - if ((xf86Info.pciFlags == PCIForceNone) || - (-1 == stat("/proc/bus/pci", &st))) { - /* when using this as default for all linux architectures, - we'll need a fallback for 2.0 kernels here */ - return; - } - pciNumBuses = 1; - pciBusInfo[0] = &linuxPci0; + if (-1 == stat("/proc/bus/pci", &st)) { + /* when using this as default for all linux architectures, + we'll need a fallback for 2.0 kernels here */ + return; + } + pciBusFuncs = &linuxFuncs0; } /** @@ -239,7 +223,6 @@ linuxPpcBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr) #endif /* __powerpc__ */ -#ifndef INCLUDE_XF86_NO_DOMAIN /* * Compiling the following simply requires the presence of . @@ -603,4 +586,3 @@ xf86AccResFromOS(resPtr pRes) return pRes; } -#endif /* !INCLUDE_XF86_NO_DOMAIN */ diff --git a/xorg-server/hw/xfree86/os-support/bus/ppcPci.c b/xorg-server/hw/xfree86/os-support/bus/ppcPci.c deleted file mode 100644 index 49c1a2a39..000000000 --- a/xorg-server/hw/xfree86/os-support/bus/ppcPci.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * ppcPci.c - PowerPC PCI access functions - * - * PCI driver functions supporting Motorola PowerPC platforms - * including Powerstack(RiscPC/RiscPC+), PowerStackII, MTX, and - * MVME 160x/260x/360x/460x VME boards - * - * Gary Barton - * Concurrent Computer Corporation - * garyb@gate.net - * - */ - -/* - * Copyright 1998 by Concurrent Computer Corporation - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of Concurrent Computer - * Corporation not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior - * permission. Concurrent Computer Corporation makes no representations - * about the suitability of this software for any purpose. It is - * provided "as is" without express or implied warranty. - * - * CONCURRENT COMPUTER CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD - * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CONCURRENT COMPUTER CORPORATION BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * - * Copyright 1998 by Metro Link Incorporated - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of Metro Link - * Incorporated not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior - * permission. Metro Link Incorporated makes no representations - * about the suitability of this software for any purpose. It is - * provided "as is" without express or implied warranty. - * - * METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD - * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include "compiler.h" -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" -#include "Pci.h" - -#ifndef MAP_FAILED -#define MAP_FAILED (pointer)(-1) -#endif - -void -ppcPciInit() -{ - - static void motoppcPciInit(void); - motoppcPciInit(); - -} diff --git a/xorg-server/hw/xfree86/os-support/bus/sparcPci.c b/xorg-server/hw/xfree86/os-support/bus/sparcPci.c deleted file mode 100644 index 2d8039c29..000000000 --- a/xorg-server/hw/xfree86/os-support/bus/sparcPci.c +++ /dev/null @@ -1,979 +0,0 @@ -/* - * Copyright (C) 2001-2003 The XFree86 Project, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the XFree86 Project shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from the - * XFree86 Project. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" -#include "Pci.h" -#include "xf86sbusBus.h" - -#if defined(sun) - -extern char *apertureDevName; -static int apertureFd = -1; - -/* - * A version of xf86MapVidMem() that allows for 64-bit displacements (but not - * sizes). Areas thus mapped can be unmapped by xf86UnMapVidMem(). - */ -static pointer -sparcMapAperture(int iScreen, int Flags, - unsigned long long Base, unsigned long Size) -{ - pointer result; - static int lastFlags = 0; - - /* Assume both Base & Size are multiples of the page size */ - - if ((apertureFd < 0) || (Flags != lastFlags)) { - if (apertureFd >= 0) - close(apertureFd); - lastFlags = Flags; - apertureFd = open(apertureDevName, - (Flags & VIDMEM_READONLY) ? O_RDONLY : O_RDWR); - if (apertureFd < 0) - FatalError("sparcMapAperture: open failure: %s\n", - strerror(errno)); - } - - result = mmap(NULL, Size, - (Flags & VIDMEM_READONLY) ? - PROT_READ : (PROT_READ | PROT_WRITE), - MAP_SHARED, apertureFd, (off_t)Base); - - if (result == MAP_FAILED) - FatalError("sparcMapAperture: mmap failure: %s\n", strerror(errno)); - - return result; -} - -/* - * Platform-specific bus privates. - */ -typedef struct _sparcDomainRec { - unsigned long long io_addr, io_size; - unsigned long long mem_addr, mem_size; - pointer pci, io; - int bus_min, bus_max; - unsigned char dfn_mask[256 / 8]; -} sparcDomainRec, *sparcDomainPtr; - -#define SetBitInMap(bit, map) \ - do { \ - int _bit = (bit); \ - (map)[_bit >> 3] |= 1 << (_bit & 7); \ - } while (0) - -#define IsBitSetInMap(bit, map) \ - ((map)[(bit) >> 3] & (1 << ((bit) & 7))) - -/* - * Domain 0 is reserved for the one that represents the system as a whole, i.e. - * the one without any resource relocations. - */ -#define MAX_DOMAINS (MAX_PCI_BUSES / 256) -static sparcDomainPtr xf86DomainInfo[MAX_DOMAINS]; -static int pciNumDomains = 1; - -/* Variables that are assigned this must be declared volatile */ -#define PciReg(base, tag, off, type) \ - *(volatile type *)(pointer)((char *)(base) + \ - (PCI_TAG_NO_DOMAIN(tag) | (off))) - -/* Generic SPARC PCI access functions */ -static CARD32 -sparcPciCfgRead32(PCITAG tag, int off) -{ - pciBusInfo_t *pBusInfo; - sparcDomainPtr pDomain; - volatile CARD32 result = (CARD32)(-1); /* Must be volatile */ - int bus; - - if ((off >= 0) && (off <= 252) && !(off & 3) && - ((bus = PCI_BUS_FROM_TAG(tag)) < pciNumBuses) && - (pBusInfo = pciBusInfo[bus]) && (pDomain = pBusInfo->pciBusPriv) && - (bus >= pDomain->bus_min) && (bus < pDomain->bus_max) && - ((bus > pDomain->bus_min) || - IsBitSetInMap(PCI_DFN_FROM_TAG(tag), pDomain->dfn_mask))) { - result = PciReg(pDomain->pci, tag, off, CARD32); - - result = PCI_CPU(result); - } - - return result; -} - -static void -sparcPciCfgWrite32(PCITAG tag, int off, CARD32 val) -{ - pciBusInfo_t *pBusInfo; - sparcDomainPtr pDomain; - int bus; - - if ((off < 0) || (off > 252) || (off & 3) || - ((bus = PCI_BUS_FROM_TAG(tag)) >= pciNumBuses) || - !(pBusInfo = pciBusInfo[bus]) || !(pDomain = pBusInfo->pciBusPriv) || - (bus < pDomain->bus_min) || (bus >= pDomain->bus_max) || - ((bus == pDomain->bus_min) && - !IsBitSetInMap(PCI_DFN_FROM_TAG(tag), pDomain->dfn_mask))) - return; - - val = PCI_CPU(val); - PciReg(pDomain->pci, tag, off, CARD32) = val; -} - -static void -sparcPciCfgSetBits32(PCITAG tag, int off, CARD32 mask, CARD32 bits) -{ - CARD32 PciVal; - - PciVal = sparcPciCfgRead32(tag, off); - PciVal &= ~mask; - PciVal |= bits; - sparcPciCfgWrite32(tag, off, PciVal); -} - -static pciBusFuncs_t sparcPCIFunctions = -{ - sparcPciCfgRead32, - sparcPciCfgWrite32, - sparcPciCfgSetBits32, - pciAddrNOOP, - pciAddrNOOP -}; - -/* - * Sabre-specific versions of the above because of its peculiar access size - * requirements. - */ -static CARD32 -sabrePciCfgRead32(PCITAG tag, int off) -{ - pciBusInfo_t *pBusInfo; - sparcDomainPtr pDomain; - volatile CARD32 result; /* Must be volatile */ - int bus; - - if (PCI_BDEV_FROM_TAG(tag)) - return sparcPciCfgRead32(tag, off); - - if (PCI_FUNC_FROM_TAG(tag) || (off < 0) || (off > 252) || (off & 3) || - ((bus = PCI_BUS_FROM_TAG(tag)) >= pciNumBuses) || - !(pBusInfo = pciBusInfo[bus]) || !(pDomain = pBusInfo->pciBusPriv) || - (bus != pDomain->bus_min)) - return (CARD32)(-1); - - if (off < 8) { - result = (PciReg(pDomain->pci, tag, off, CARD16) << 16) | - PciReg(pDomain->pci, tag, off + 2, CARD16); - return PCI_CPU(result); - } - - result = (PciReg(pDomain->pci, tag, off + 3, CARD8) << 24) | - (PciReg(pDomain->pci, tag, off + 2, CARD8) << 16) | - (PciReg(pDomain->pci, tag, off + 1, CARD8) << 8) | - (PciReg(pDomain->pci, tag, off , CARD8) ); - return result; -} - -static void -sabrePciCfgWrite32(PCITAG tag, int off, CARD32 val) -{ - pciBusInfo_t *pBusInfo; - sparcDomainPtr pDomain; - int bus; - - if (PCI_BDEV_FROM_TAG(tag)) - sparcPciCfgWrite32(tag, off, val); - else if (!PCI_FUNC_FROM_TAG(tag) && - (off >= 0) && (off <= 252) && !(off & 3) && - ((bus = PCI_BUS_FROM_TAG(tag)) < pciNumBuses) && - (pBusInfo = pciBusInfo[bus]) && - (pDomain = pBusInfo->pciBusPriv) && - (bus == pDomain->bus_min)) { - if (off < 8) { - val = PCI_CPU(val); - PciReg(pDomain->pci, tag, off , CARD16) = val >> 16; - PciReg(pDomain->pci, tag, off + 2, CARD16) = val; - } else { - PciReg(pDomain->pci, tag, off , CARD8) = val; - PciReg(pDomain->pci, tag, off + 1, CARD8) = val >> 8; - PciReg(pDomain->pci, tag, off + 2, CARD8) = val >> 16; - PciReg(pDomain->pci, tag, off + 3, CARD8) = val >> 24; - } - } -} - -static void -sabrePciCfgSetBits32(PCITAG tag, int off, CARD32 mask, CARD32 bits) -{ - CARD32 PciVal; - - PciVal = sabrePciCfgRead32(tag, off); - PciVal &= ~mask; - PciVal |= bits; - sabrePciCfgWrite32(tag, off, PciVal); -} - -static pciBusFuncs_t sabrePCIFunctions = -{ - sabrePciCfgRead32, - sabrePciCfgWrite32, - sabrePciCfgSetBits32, - pciAddrNOOP, - pciAddrNOOP -}; - -static int pagemask; - -/* Scan PROM for all PCI host bridges in the system */ -void -sparcPciInit(void) -{ - int node, node2; - - if (!xf86LinearVidMem()) - return; - - apertureFd = open(apertureDevName, O_RDWR); - if (apertureFd < 0) { - xf86Msg(X_ERROR, - "sparcPciInit: open failure: %s\n", strerror(errno)); - return; - } - - sparcPromInit(); - pagemask = getpagesize() - 1; - - for (node = promGetChild(promRootNode); - node; - node = promGetSibling(node)) { - unsigned long long pci_addr; - sparcDomainRec domain; - sparcDomainPtr pDomain; - pciBusFuncs_p pFunctions; - char *prop_val; - int prop_len, bus; - - prop_val = promGetProperty("name", &prop_len); - /* Some PROMs include the trailing null; some don't */ - if (!prop_val || (prop_len < 3) || (prop_len > 4) || - strcmp(prop_val, "pci")) - continue; - - prop_val = promGetProperty("model", &prop_len); - if (!prop_val || (prop_len <= 0)) { - prop_val = promGetProperty("compatible", &prop_len); - if (!prop_val || (prop_len <= 0)) - continue; - } - - pFunctions = &sparcPCIFunctions; - (void)memset(&domain, 0, sizeof(domain)); - - if (!strncmp("SUNW,sabre", prop_val, prop_len) || - !strncmp("pci108e,a000", prop_val, prop_len) || - !strncmp("pci108e,a001", prop_val, prop_len)) { - /* - * There can only be one "Sabre" bridge in a system. It provides - * PCI configuration space, a 24-bit I/O space and a 32-bit memory - * space, all three of which are at fixed physical CPU addresses. - */ - static Bool sabre_seen = FALSE; - - xf86Msg(X_INFO, - "Sabre or Hummingbird PCI host bridge found (\"%s\")\n", - prop_val); - - /* There can only be one Sabre */ - if (sabre_seen) - continue; - sabre_seen = TRUE; - - /* Get "bus-range" property */ - prop_val = promGetProperty("bus-range", &prop_len); - if (!prop_val || (prop_len != 8) || - (((unsigned int *)prop_val)[0]) || - (((unsigned int *)prop_val)[1] >= 256)) - continue; - - pci_addr = 0x01fe01000000ull; - domain.io_addr = 0x01fe02000000ull; - domain.io_size = 0x000001000000ull; - domain.mem_addr = 0x01ff00000000ull; - domain.mem_size = 0x000100000000ull; - domain.bus_min = 0; /* Always */ - domain.bus_max = ((int *)prop_val)[1]; - - pFunctions = &sabrePCIFunctions; - } else - if (!strncmp("SUNW,psycho", prop_val, prop_len) || - !strncmp("pci108e,8000", prop_val, prop_len)) { - /* - * A "Psycho" host bridge provides two PCI interfaces, each with - * its own 16-bit I/O and 31-bit memory spaces. Both share the - * same PCI configuration space. Here, they are assigned separate - * domain numbers to prevent unintentional I/O and/or memory - * resource conflicts. - */ - xf86Msg(X_INFO, - "Psycho PCI host bridge found (\"%s\")\n", prop_val); - - /* Get "bus-range" property */ - prop_val = promGetProperty("bus-range", &prop_len); - if (!prop_val || (prop_len != 8) || - (((unsigned int *)prop_val)[1] >= 256) || - (((unsigned int *)prop_val)[0] > ((unsigned int *)prop_val)[1])) - continue; - - domain.bus_min = ((int *)prop_val)[0]; - domain.bus_max = ((int *)prop_val)[1]; - - /* Get "ranges" property */ - prop_val = promGetProperty("ranges", &prop_len); - if (!prop_val || (prop_len != 112) || - prop_val[0] || (prop_val[28] != 0x01u) || - (prop_val[56] != 0x02u) || (prop_val[84] != 0x03u) || - (((unsigned int *)prop_val)[4] != 0x01000000u) || - ((unsigned int *)prop_val)[5] || - ((unsigned int *)prop_val)[12] || - (((unsigned int *)prop_val)[13] != 0x00010000u) || - ((unsigned int *)prop_val)[19] || - (((unsigned int *)prop_val)[20] != 0x80000000u) || - ((((unsigned int *)prop_val)[11] & ~0x00010000u) != - 0x02000000u) || - (((unsigned int *)prop_val)[18] & ~0x80000000u) || - (((unsigned int *)prop_val)[3] != - ((unsigned int *)prop_val)[10]) || - (((unsigned int *)prop_val)[17] != - ((unsigned int *)prop_val)[24]) || - (((unsigned int *)prop_val)[18] != - ((unsigned int *)prop_val)[25]) || - (((unsigned int *)prop_val)[19] != - ((unsigned int *)prop_val)[26]) || - (((unsigned int *)prop_val)[20] != - ((unsigned int *)prop_val)[27])) - continue; - - /* Use memcpy() to avoid alignment issues */ - (void)memcpy(&pci_addr, prop_val + 12, - sizeof(pci_addr)); - (void)memcpy(&domain.io_addr, prop_val + 40, - sizeof(domain.io_addr)); - (void)memcpy(&domain.mem_addr, prop_val + 68, - sizeof(domain.mem_addr)); - - domain.io_size = 0x000000010000ull; - domain.mem_size = 0x000080000000ull; - } else - if (!strncmp("SUNW,schizo", prop_val, prop_len) || - !strncmp("pci108e,8001", prop_val, prop_len)) { - /* - * I have no docs on the "Schizo", but judging from the Linux - * kernel, it also provides two PCI domains. Each PCI - * configuration space is the usual 16M in size, followed by a - * variable-length I/O space. Each domain also provides a - * variable-length memory space. The kernel seems to think the I/O - * spaces are 16M long, and the memory spaces, 2G, but these - * assumptions are actually only present in source code comments. - * Sun has, however, confirmed to me the validity of these - * assumptions. - */ - volatile unsigned long long mem_match, mem_mask, io_match, io_mask; - unsigned long Offset; - pointer pSchizo; - - xf86Msg(X_INFO, - "Schizo PCI host bridge found (\"%s\")\n", prop_val); - - /* Get "bus-range" property */ - prop_val = promGetProperty("bus-range", &prop_len); - if (!prop_val || (prop_len != 8) || - (((unsigned int *)prop_val)[1] >= 256) || - (((unsigned int *)prop_val)[0] > ((unsigned int *)prop_val)[1])) - continue; - - domain.bus_min = ((int *)prop_val)[0]; - domain.bus_max = ((int *)prop_val)[1]; - - /* Get "reg" property */ - prop_val = promGetProperty("reg", &prop_len); - if (!prop_val || (prop_len != 48)) - continue; - - /* Temporarily map some of Schizo's registers */ - pSchizo = sparcMapAperture(-1, VIDMEM_MMIO, - ((unsigned long long *)prop_val)[2] - 0x000000010000ull, - 0x00010000ul); - - /* Determine where PCI config, I/O and memory spaces reside */ - if ((((unsigned long long *)prop_val)[0] & 0x000000700000ull) == - 0x000000600000ull) - Offset = 0x0040; - else - Offset = 0x0060; - - mem_match = PciReg(pSchizo, 0, Offset, unsigned long long); - mem_mask = PciReg(pSchizo, 0, Offset + 8, unsigned long long); - io_match = PciReg(pSchizo, 0, Offset + 16, unsigned long long); - io_mask = PciReg(pSchizo, 0, Offset + 24, unsigned long long); - - /* Unmap Schizo registers */ - xf86UnMapVidMem(-1, pSchizo, 0x00010000ul); - - /* Calculate sizes */ - mem_mask = (((mem_mask - 1) ^ mem_mask) >> 1) + 1; - io_mask = (((io_mask - 1) ^ io_mask ) >> 1) + 1; - - if (io_mask <= 0x000001000000ull) /* Nothing left for I/O */ - continue; - - domain.mem_addr = mem_match & ~0x8000000000000000ull; - domain.mem_size = mem_mask; - pci_addr = io_match & ~0x8000000000000000ull; - domain.io_addr = pci_addr + 0x0000000001000000ull; - domain.io_size = io_mask - 0x0000000001000000ull; - } else { - xf86Msg(X_WARNING, "Unknown PCI host bridge: \"%s\"\n", prop_val); - continue; - } - - /* Only map as much PCI configuration as we need */ - domain.pci = (char *)sparcMapAperture(-1, VIDMEM_MMIO, - pci_addr + PCI_MAKE_TAG(domain.bus_min, 0, 0), - PCI_MAKE_TAG(domain.bus_max - domain.bus_min + 1, 0, 0)) - - PCI_MAKE_TAG(domain.bus_min, 0, 0); - - /* Allocate a domain record */ - pDomain = xnfalloc(sizeof(sparcDomainRec)); - *pDomain = domain; - - /* - * Allocate and prime pciBusInfo records. These are allocated one at a - * time because those for empty buses are eventually released. - */ - bus = pDomain->bus_min = - PCI_MAKE_BUS(pciNumDomains, domain.bus_min); - pciNumBuses = pDomain->bus_max = - PCI_MAKE_BUS(pciNumDomains, domain.bus_max) + 1; - - pciBusInfo[bus] = xnfcalloc(1, sizeof(pciBusInfo_t)); - pciBusInfo[bus]->configMech = PCI_CFG_MECH_OTHER; - pciBusInfo[bus]->numDevices = 32; - pciBusInfo[bus]->funcs = pFunctions; - pciBusInfo[bus]->pciBusPriv = pDomain; - while (++bus < pciNumBuses) { - pciBusInfo[bus] = xnfalloc(sizeof(pciBusInfo_t)); - *(pciBusInfo[bus]) = *(pciBusInfo[bus - 1]); - pciBusInfo[bus]->funcs = &sparcPCIFunctions; - } - - /* Next domain, please... */ - xf86DomainInfo[pciNumDomains++] = pDomain; - - /* - * OK, enough of the straight-forward stuff. Time to deal with some - * brokenness... - * - * The PCI specs require that when a bus transaction remains unclaimed - * for too long, the master entity on that bus is to cancel the - * transaction it issued or passed on with a master abort. Two - * outcomes are possible: - * - * - the master abort can be treated as an error that is propogated - * back through the bus tree to the entity that ultimately originated - * the transaction; or - * - the transaction can be allowed to complete normally, which means - * that writes are ignored and reads return all ones. - * - * In the first case, if the CPU happens to be at the tail end of the - * tree path through one of its host bridges, it will be told there is - * a hardware mal-function, despite being generated by software. - * - * For a software function (be it firmware, OS or userland application) - * to determine how a PCI bus tree is populated, it must be able to - * detect when master aborts occur. Obviously, PCI discovery is much - * simpler when master aborts are allowed to complete normally. - * - * Unfortunately, a number of non-Intel PCI implementations have chosen - * to treat master aborts as severe errors. The net effect is to - * cripple PCI discovery algorithms in userland. - * - * On SPARCs, master aborts cause a number of different behaviours, - * including delivering a signal to the userland application, rebooting - * the system, "dropping down" to firmware, or, worst of all, bus - * lockouts. Even in the first case, the SIGBUS signal that is - * eventually generated isn't delivered in a timely enough fashion to - * allow an application to reliably detect the master abort that - * ultimately caused it. - * - * This can be somewhat mitigated. On all architectures, master aborts - * that occur on secondary buses can be forced to complete normally - * because the PCI-to-PCI bridges that serve them are governed by an - * industry-wide specification. (This is just another way of saying - * that whatever justification there might be for erroring out master - * aborts is deemed by the industry as insufficient to generate more - * PCI non-compliance than there already is...) - * - * This leaves us with master aborts that occur on primary buses. - * There is no specification for host-to-PCI bridges. Bridges used in - * SPARCs can be told to ignore all PCI errors, but not specifically - * master aborts. Not only is this too coarse-grained, but - * master-aborted read transactions on the primary bus end up returning - * garbage rather than all ones. - * - * I have elected to work around this the only way I can think of doing - * so right now. The following scans an additional PROM level and - * builds a device/function map for the primary bus. I can only hope - * this PROM information represents all devices on the primary bus, - * rather than only a subset of them. - * - * Master aborts are useful in other ways too, that are not addressed - * here. These include determining whether or not a domain provides - * VGA, or if a PCI device actually implements PCI disablement. - * - * --- TSI @ UQV 2001.09.19 - */ - for (node2 = promGetChild(node); - node2; - node2 = promGetSibling(node2)) { - /* Get "reg" property */ - prop_val = promGetProperty("reg", &prop_len); - if (!prop_val || (prop_len % 20)) - continue; - - /* - * It's unnecessary to scan the entire "reg" property, but I'll do - * so anyway. - */ - prop_len /= 20; - for (; prop_len--; prop_val += 20) - SetBitInMap(PCI_DFN_FROM_TAG(*(PCITAG *)prop_val), - pDomain->dfn_mask); - } - - /* Assume the host bridge is device 0, function 0 on its bus */ - SetBitInMap(0, pDomain->dfn_mask); - } - - sparcPromClose(); - - close(apertureFd); - apertureFd = -1; -} - -#ifndef INCLUDE_XF86_NO_DOMAIN - -_X_EXPORT int -xf86GetPciDomain(PCITAG Tag) -{ - return PCI_DOM_FROM_TAG(Tag); -} - -_X_EXPORT pointer -xf86MapDomainMemory(int ScreenNum, int Flags, PCITAG Tag, - ADDRESS Base, unsigned long Size) -{ - sparcDomainPtr pDomain; - pointer result; - int domain = PCI_DOM_FROM_TAG(Tag); - - if ((domain <= 0) || (domain >= pciNumDomains) || - !(pDomain = xf86DomainInfo[domain]) || - (((unsigned long long)Base + (unsigned long long)Size) > - pDomain->mem_size)) - FatalError("xf86MapDomainMemory() called with invalid parameters.\n"); - - result = sparcMapAperture(ScreenNum, Flags, pDomain->mem_addr + Base, Size); - - if (apertureFd >= 0) { - close(apertureFd); - apertureFd = -1; - } - - return result; -} - -_X_EXPORT IOADDRESS -xf86MapLegacyIO(int ScreenNum, int Flags, PCITAG Tag, - IOADDRESS Base, unsigned long Size) -{ - sparcDomainPtr pDomain; - int domain = PCI_DOM_FROM_TAG(Tag); - - if ((domain <= 0) || (domain >= pciNumDomains) || - !(pDomain = xf86DomainInfo[domain]) || - (((unsigned long long)Base + (unsigned long long)Size) > - pDomain->io_size)) - FatalError("xf86MapLegacyIO() called with invalid parameters.\n"); - - /* Permanently map all of I/O space */ - if (!pDomain->io) { - pDomain->io = sparcMapAperture(ScreenNum, Flags, - pDomain->io_addr, pDomain->io_size); - - if (apertureFd >= 0) { - close(apertureFd); - apertureFd = -1; - } - } - - return (IOADDRESS)pDomain->io + Base; -} - -resPtr -xf86AccResFromOS(resPtr pRes) -{ - sparcDomainPtr pDomain; - resRange range; - int domain; - - for (domain = 1; domain < pciNumDomains; domain++) { - if (!(pDomain = xf86DomainInfo[domain])) - continue; - - /* - * At minimum, the top and bottom resources must be claimed, so that - * resources that are (or appear to be) unallocated can be relocated. - */ - RANGE(range, 0x00000000u, 0x0009ffffu, - RANGE_TYPE(ResExcMemBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - RANGE(range, 0x000c0000u, 0x000effffu, - RANGE_TYPE(ResExcMemBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - RANGE(range, 0x000f0000u, 0x000fffffu, - RANGE_TYPE(ResExcMemBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - - RANGE(range, pDomain->mem_size - 1, pDomain->mem_size - 1, - RANGE_TYPE(ResExcMemBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - - RANGE(range, 0x00000000u, 0x00000000u, - RANGE_TYPE(ResExcIoBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - RANGE(range, pDomain->io_size - 1, pDomain->io_size - 1, - RANGE_TYPE(ResExcIoBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - } - - return pRes; -} - -#endif /* !INCLUDE_XF86_NO_DOMAIN */ - -#endif /* defined(sun) */ - -#if defined(ARCH_PCI_PCI_BRIDGE) - -/* Definitions specific to Sun's APB P2P bridge (a.k.a. Simba) */ -#define APB_IO_ADDRESS_MAP 0xDE -#define APB_MEM_ADDRESS_MAP 0xDF - -/* - * Simba's can only occur on bus 0. Furthermore, Simba's must have a non-zero - * device/function number because the Sabre interface they must connect to - * occupies the 0:0:0 slot. Also, there can be only one Sabre interface in the - * system, and therefore, only one Simba function can route any particular - * resource. Thus, it is appropriate to use a single set of static variables - * to hold the tag of the Simba function routing a VGA resource range at any - * one time, and to test these variables for non-zero to determine whether or - * not the Sabre would master-abort a VGA access (and kill the system). - * - * The trick is to determine when it is safe to re-route VGA, because doing so - * re-routes much more. - */ -static PCITAG simbavgaIOTag = 0, simbavgaMemTag = 0; -static Bool simbavgaRoutingAllow = TRUE; - -/* - * Scan the bus subtree rooted at 'bus' for a non-display device that might be - * decoding the bottom 2 MB of I/O space and/or the bottom 512 MB of memory - * space. Reset simbavgaRoutingAllow if such a device is found. - * - * XXX For now, this is very conservative and should be made less so as the - * need arises. - */ -static void -simbaCheckBus(CARD16 pcicommand, int bus) -{ - pciConfigPtr pPCI, *ppPCI = xf86scanpci(0); - - while ((pPCI = *ppPCI++)) { - if (pPCI->busnum < bus) - continue; - if (pPCI->busnum > bus) - break; - - /* XXX Assume all devices respect PCI disablement */ - if (!(pcicommand & pPCI->pci_command)) - continue; - - /* XXX This doesn't deal with mis-advertised classes */ - switch (pPCI->pci_base_class) { - case PCI_CLASS_PREHISTORIC: - if (pPCI->pci_sub_class == PCI_SUBCLASS_PREHISTORIC_VGA) - continue; /* Ignore VGA */ - break; - - case PCI_CLASS_DISPLAY: - continue; - - case PCI_CLASS_BRIDGE: - switch (pPCI->pci_sub_class) { - case PCI_SUBCLASS_BRIDGE_PCI: - case PCI_SUBCLASS_BRIDGE_CARDBUS: - /* Scan secondary bus */ - /* XXX First check bridge routing? */ - simbaCheckBus(pcicommand & pPCI->pci_command, - PCI_SECONDARY_BUS_EXTRACT(pPCI->pci_pp_bus_register, - pPCI->tag)); - if (!simbavgaRoutingAllow) - return; - - default: - break; - } - - default: - break; - } - - /* - * XXX We could check the device's bases here, but PCI doesn't limit - * the device's decoding to them. - */ - - simbavgaRoutingAllow = FALSE; - break; - } -} - -static pciConfigPtr -simbaVerifyBus(int bus) -{ - pciConfigPtr pPCI; - if ((bus < 0) || (bus >= pciNumBuses) || - !pciBusInfo[bus] || !(pPCI = pciBusInfo[bus]->bridge) || - (pPCI->pci_device_vendor != DEVID(VENDOR_SUN, CHIP_SIMBA))) - return NULL; - - return pPCI; -} - -static CARD16 -simbaControlBridge(int bus, CARD16 mask, CARD16 value) -{ - pciConfigPtr pPCI; - CARD16 current = 0, tmp; - CARD8 iomap, memmap; - - if ((pPCI = simbaVerifyBus(bus))) { - /* - * The Simba does not implement VGA enablement as described in the P2P - * spec. It does however route I/O and memory in large enough chunks - * so that we can determine were VGA resources would be routed - * (including ISA VGA I/O aliases). We can allow changes to that - * routing only under certain circumstances. - */ - iomap = pciReadByte(pPCI->tag, APB_IO_ADDRESS_MAP); - memmap = pciReadByte(pPCI->tag, APB_MEM_ADDRESS_MAP); - if (iomap & memmap & 0x01) { - current |= PCI_PCI_BRIDGE_VGA_EN; - if ((mask & PCI_PCI_BRIDGE_VGA_EN) && - !(value & PCI_PCI_BRIDGE_VGA_EN)) { - if (!simbavgaRoutingAllow) { - xf86MsgVerb(X_WARNING, 3, "Attempt to disable VGA routing" - " through Simba at %x:%x:%x disallowed.\n", - pPCI->busnum, pPCI->devnum, pPCI->funcnum); - value |= PCI_PCI_BRIDGE_VGA_EN; - } else { - pciWriteByte(pPCI->tag, APB_IO_ADDRESS_MAP, - iomap & ~0x01); - pciWriteByte(pPCI->tag, APB_MEM_ADDRESS_MAP, - memmap & ~0x01); - simbavgaIOTag = simbavgaMemTag = 0; - } - } - } else { - if (mask & value & PCI_PCI_BRIDGE_VGA_EN) { - if (!simbavgaRoutingAllow) { - xf86MsgVerb(X_WARNING, 3, "Attempt to enable VGA routing" - " through Simba at %x:%x:%x disallowed.\n", - pPCI->busnum, pPCI->devnum, pPCI->funcnum); - value &= ~PCI_PCI_BRIDGE_VGA_EN; - } else { - if (pPCI->tag != simbavgaIOTag) { - if (simbavgaIOTag) { - tmp = pciReadByte(simbavgaIOTag, - APB_IO_ADDRESS_MAP); - pciWriteByte(simbavgaIOTag, APB_IO_ADDRESS_MAP, - tmp & ~0x01); - } - - pciWriteByte(pPCI->tag, APB_IO_ADDRESS_MAP, - iomap | 0x01); - simbavgaIOTag = pPCI->tag; - } - - if (pPCI->tag != simbavgaMemTag) { - if (simbavgaMemTag) { - tmp = pciReadByte(simbavgaMemTag, - APB_MEM_ADDRESS_MAP); - pciWriteByte(simbavgaMemTag, APB_MEM_ADDRESS_MAP, - tmp & ~0x01); - } - - pciWriteByte(pPCI->tag, APB_MEM_ADDRESS_MAP, - memmap | 0x01); - simbavgaMemTag = pPCI->tag; - } - } - } - } - - /* Move on to master abort failure enablement (as per P2P spec) */ - tmp = pciReadWord(pPCI->tag, PCI_PCI_BRIDGE_CONTROL_REG); - current |= tmp; - if (tmp & PCI_PCI_BRIDGE_MASTER_ABORT_EN) { - if ((mask & PCI_PCI_BRIDGE_MASTER_ABORT_EN) && - !(value & PCI_PCI_BRIDGE_MASTER_ABORT_EN)) - pciWriteWord(pPCI->tag, PCI_PCI_BRIDGE_CONTROL_REG, - tmp & ~PCI_PCI_BRIDGE_MASTER_ABORT_EN); - } else { - if (mask & value & PCI_PCI_BRIDGE_MASTER_ABORT_EN) - pciWriteWord(pPCI->tag, PCI_PCI_BRIDGE_CONTROL_REG, - tmp | PCI_PCI_BRIDGE_MASTER_ABORT_EN); - } - - /* Insert emulation of other P2P controls here */ - } - - return (current & ~mask) | (value & mask); -} - -static void -simbaGetBridgeResources(int bus, - pointer *ppIoRes, - pointer *ppMemRes, - pointer *ppPmemRes) -{ - pciConfigPtr pPCI = simbaVerifyBus(bus); - resRange range; - int i; - - if (!pPCI) - return; - - if (ppIoRes) { - xf86FreeResList(*ppIoRes); - *ppIoRes = NULL; - - if (pPCI->pci_command & PCI_CMD_IO_ENABLE) { - unsigned char iomap = pciReadByte(pPCI->tag, APB_IO_ADDRESS_MAP); - if (simbavgaRoutingAllow) - iomap |= 0x01; - for (i = 0; i < 8; i++) { - if (iomap & (1 << i)) { - RANGE(range, i << 21, ((i + 1) << 21) - 1, - RANGE_TYPE(ResExcIoBlock, - xf86GetPciDomain(pPCI->tag))); - *ppIoRes = xf86AddResToList(*ppIoRes, &range, -1); - } - } - } - } - - if (ppMemRes) { - xf86FreeResList(*ppMemRes); - *ppMemRes = NULL; - - if (pPCI->pci_command & PCI_CMD_MEM_ENABLE) { - unsigned char memmap = pciReadByte(pPCI->tag, APB_MEM_ADDRESS_MAP); - if (simbavgaRoutingAllow) - memmap |= 0x01; - for (i = 0; i < 8; i++) { - if (memmap & (1 << i)) { - RANGE(range, i << 29, ((i + 1) << 29) - 1, - RANGE_TYPE(ResExcMemBlock, - xf86GetPciDomain(pPCI->tag))); - *ppMemRes = xf86AddResToList(*ppMemRes, &range, -1); - } - } - } - } - - if (ppPmemRes) { - xf86FreeResList(*ppPmemRes); - *ppPmemRes = NULL; - } -} - -void ARCH_PCI_PCI_BRIDGE(pciConfigPtr pPCI) -{ - static pciBusFuncs_t simbaBusFuncs; - pciBusInfo_t *pBusInfo; - CARD16 pcicommand; - - if (pPCI->pci_device_vendor != DEVID(VENDOR_SUN, CHIP_SIMBA)) - return; - - pBusInfo = pPCI->businfo; - - simbaBusFuncs = *(pBusInfo->funcs); - simbaBusFuncs.pciControlBridge = simbaControlBridge; - simbaBusFuncs.pciGetBridgeResources = simbaGetBridgeResources; - - pBusInfo->funcs = &simbaBusFuncs; - - if (!simbavgaRoutingAllow) - return; - - pcicommand = 0; - - if (pciReadByte(pPCI->tag, APB_IO_ADDRESS_MAP) & 0x01) { - pcicommand |= PCI_CMD_IO_ENABLE; - simbavgaIOTag = pPCI->tag; - } - - if (pciReadByte(pPCI->tag, APB_MEM_ADDRESS_MAP) & 0x01) { - pcicommand |= PCI_CMD_MEM_ENABLE; - simbavgaMemTag = pPCI->tag; - } - - if (!pcicommand) - return; - - simbaCheckBus(pcicommand, - PCI_SECONDARY_BUS_EXTRACT(pPCI->pci_pp_bus_register, pPCI->tag)); -} - -#endif /* defined(ARCH_PCI_PCI_BRIDGE) */ diff --git a/xorg-server/hw/xfree86/os-support/bus/xf86Pci.h b/xorg-server/hw/xfree86/os-support/bus/xf86Pci.h index 2b8a4f76b..3a73678b3 100644 --- a/xorg-server/hw/xfree86/os-support/bus/xf86Pci.h +++ b/xorg-server/hw/xfree86/os-support/bus/xf86Pci.h @@ -255,8 +255,6 @@ ADDRESS pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr); PCITAG pciTag(int busnum, int devnum, int funcnum); Bool xf86scanpci(void); -extern int pciNumBuses; - /* Domain access functions. Some of these probably shouldn't be public */ pointer xf86MapDomainMemory(int ScreenNum, int Flags, struct pci_device *dev, ADDRESS Base, unsigned long Size); diff --git a/xorg-server/hw/xfree86/os-support/hurd/Makefile.am b/xorg-server/hw/xfree86/os-support/hurd/Makefile.am index 2214b1c2d..b405b1f2a 100644 --- a/xorg-server/hw/xfree86/os-support/hurd/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/hurd/Makefile.am @@ -1,7 +1,7 @@ noinst_LTLIBRARIES = libhurd.la libhurd_la_SOURCES = hurd_bell.c hurd_init.c hurd_mmap.c \ - hurd_mouse.c hurd_video.c \ + hurd_video.c \ $(srcdir)/../shared/VTsw_noop.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/stdResource.c \ diff --git a/xorg-server/hw/xfree86/os-support/hurd/Makefile.in b/xorg-server/hw/xfree86/os-support/hurd/Makefile.in index 4f7be3e1e..56206bd51 100644 --- a/xorg-server/hw/xfree86/os-support/hurd/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/hurd/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,7 +43,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -52,18 +51,14 @@ CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libhurd_la_LIBADD = am_libhurd_la_OBJECTS = hurd_bell.lo hurd_init.lo hurd_mmap.lo \ - hurd_mouse.lo hurd_video.lo VTsw_noop.lo posix_tty.lo \ - stdResource.lo sigiostubs.lo pm_noop.lo kmod_noop.lo \ - agp_noop.lo + hurd_video.lo VTsw_noop.lo posix_tty.lo stdResource.lo \ + sigiostubs.lo pm_noop.lo kmod_noop.lo agp_noop.lo libhurd_la_OBJECTS = $(am_libhurd_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -78,8 +73,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -100,10 +96,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -125,6 +117,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -134,18 +127,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -164,7 +154,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -178,7 +168,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -190,8 +183,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -200,8 +192,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -234,7 +226,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -244,27 +235,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -275,10 +251,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -287,13 +259,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -326,8 +293,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -347,7 +313,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -357,12 +322,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -380,11 +345,9 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ noinst_LTLIBRARIES = libhurd.la libhurd_la_SOURCES = hurd_bell.c hurd_init.c hurd_mmap.c \ - hurd_mouse.c hurd_video.c \ + hurd_video.c \ $(srcdir)/../shared/VTsw_noop.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/stdResource.c \ @@ -403,8 +366,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -451,7 +414,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hurd_bell.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hurd_init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hurd_mmap.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hurd_mouse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hurd_video.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kmod_noop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pm_noop.Plo@am__quote@ @@ -540,7 +502,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/os-support/hurd/hurd_mouse.c b/xorg-server/hw/xfree86/os-support/hurd/hurd_mouse.c deleted file mode 100644 index 089cba38d..000000000 --- a/xorg-server/hw/xfree86/os-support/hurd/hurd_mouse.c +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright 1997,1998 by UCHIYAMA Yasushi - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of UCHIYAMA Yasushi not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. UCHIYAMA Yasushi makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * UCHIYAMA YASUSHI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL UCHIYAMA YASUSHI BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - */ - -#define NEED_EVENTS -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include -#include "inputstr.h" -#include "scrnintstr.h" -#include "mipointer.h" - -#include "xf86.h" -#include "xf86Xinput.h" -#include "xf86OSmouse.h" -#include "xf86_OSlib.h" -#include "xisb.h" - -#include -#include -#include -#include -#include -#include -#include - -#define DEFAULT_MOUSE_DEV "/dev/mouse" - -typedef unsigned short kev_type; /* kd event type */ -typedef unsigned char Scancode; - -struct mouse_motion { - short mm_deltaX; /* units? */ - short mm_deltaY; -}; - -typedef struct { - kev_type type; /* see below */ - struct timeval time; /* timestamp */ - union { /* value associated with event */ - boolean_t up; /* MOUSE_LEFT .. MOUSE_RIGHT */ - Scancode sc; /* KEYBD_EVENT */ - struct mouse_motion mmotion; /* MOUSE_MOTION */ - } value; -} kd_event; - -/* - * kd_event ID's. - */ -#define MOUSE_LEFT 1 /* mouse left button up/down */ -#define MOUSE_MIDDLE 2 -#define MOUSE_RIGHT 3 -#define MOUSE_MOTION 4 /* mouse motion */ -#define KEYBD_EVENT 5 /* key up/down */ - -#define NUMEVENTS 64 - -/* - * OsMouseReadInput -- - * Get some events from our queue. Process all outstanding events now. - */ -static void -OsMouseReadInput(InputInfoPtr pInfo) -{ - MouseDevPtr pMse; - static kd_event eventList[NUMEVENTS]; - int n, c; - kd_event *event = eventList; - unsigned char *pBuf; - - pMse = pInfo->private; - - XisbBlockDuration(pMse->buffer, -1); - pBuf = (unsigned char *)eventList; - n = 0; - while ((c = XisbRead(pMse->buffer)) >= 0 && n < sizeof(eventList)) - pBuf[n++] = (unsigned char)c; - - if (n == 0) - return; - - n /= sizeof(kd_event); - while( n-- ) { - int buttons = pMse->lastButtons; - int dx = 0, dy = 0; - switch (event->type) { - case MOUSE_RIGHT: - buttons = buttons & 6 |(event->value.up ? 0 : 1); - break; - case MOUSE_MIDDLE: - buttons = buttons & 5 |(event->value.up ? 0 : 2); - break; - case MOUSE_LEFT: - buttons = buttons & 3 |(event->value.up ? 0 : 4) ; - break; - case MOUSE_MOTION: - dx = event->value.mmotion.mm_deltaX; - dy = - event->value.mmotion.mm_deltaY; - break; - default: - ErrorF("Bad mouse event (%d)\n",event->type); - continue; - } - pMse->PostEvent(pInfo, buttons, dx, dy, 0, 0); - ++event; - } - return; -} - -static Bool -OsMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags) -{ - MouseDevPtr pMse; - - /* This is called when the protocol is "OSMouse". */ - - pMse = pInfo->private; - pMse->protocol = protocol; - xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol); - - /* Collect the options, and process the common options. */ - xf86CollectInputOptions(pInfo, NULL, NULL); - xf86ProcessCommonOptions(pInfo, pInfo->options); - - /* Check if the device can be opened. */ - pInfo->fd = xf86OpenSerial(pInfo->options); - if (pInfo->fd == -1) { - if (xf86GetAllowMouseOpenFail()) - xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name); - else { - xf86Msg(X_ERROR, "%s: cannot open input device\n", pInfo->name); - xfree(pMse); - return FALSE; - } - } - xf86CloseSerial(pInfo->fd); - pInfo->fd = -1; - - /* Process common mouse options (like Emulate3Buttons, etc). */ - pMse->CommonOptions(pInfo); - - /* Setup the local procs. */ - pInfo->read_input = OsMouseReadInput; - - pInfo->flags |= XI86_CONFIGURED; - return TRUE; -} - -static const char * -FindDevice(InputInfoPtr pInfo, const char *protocol, int flags) -{ - const char path[] = DEFAULT_MOUSE_DEV; - int fd; - - SYSCALL (fd = open(path, O_RDWR | O_NONBLOCK | O_EXCL)); - - if (fd == -1) - return NULL; - - close(fd); - pInfo->conf_idev->commonOptions = - xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", path); - xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n", pInfo->name, - path); - - return path; -} - -static int -SupportedInterfaces(void) -{ - /* XXX Need to check this. */ - return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO; -} - -static const char *internalNames[] = { - "OSMouse", - NULL -}; - -static const char ** -BuiltinNames(void) -{ - return internalNames; -} - -static Bool -CheckProtocol(const char *protocol) -{ - int i; - - for (i = 0; internalNames[i]; i++) - if (xf86NameCmp(protocol, internalNames[i]) == 0) - return TRUE; - return FALSE; -} - -static const char * -DefaultProtocol(void) -{ - return "OSMouse"; -} - -OSMouseInfoPtr -xf86OSMouseInit(int flags) -{ - OSMouseInfoPtr p; - - p = xcalloc(sizeof(OSMouseInfoRec), 1); - if (!p) - return NULL; - p->SupportedInterfaces = SupportedInterfaces; - p->BuiltinNames = BuiltinNames; - p->FindDevice = FindDevice; - p->DefaultProtocol = DefaultProtocol; - p->CheckProtocol = CheckProtocol; - p->PreInit = OsMousePreInit; - return p; -} - diff --git a/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c b/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c index 04763ada7..b814072cb 100644 --- a/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c +++ b/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c @@ -142,20 +142,6 @@ xf86DisableIO() return; } -/************************************************************************** - * Interrupt Handling section - **************************************************************************/ -Bool -xf86DisableInterrupts() -{ - return TRUE; -} -void -xf86EnableInterrupts() -{ - return; -} - void xf86MapReadSideEffects(int ScreenNum, int Flags, pointer Base, unsigned long Size) diff --git a/xorg-server/hw/xfree86/os-support/linux/Makefile.am b/xorg-server/hw/xfree86/os-support/linux/Makefile.am index beaae3d5b..da1dcf690 100644 --- a/xorg-server/hw/xfree86/os-support/linux/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/linux/Makefile.am @@ -2,7 +2,6 @@ noinst_LTLIBRARIES = liblinux.la if LINUX_IA64 PLATFORM_PCI_SUPPORT = $(srcdir)/../shared/ia64Pci.c -PLATFORM_DEFINES = -DOS_PROBE_PCI_CHIPSET=lnxProbePciChipset PLATFORM_INCLUDES = -I$(srcdir)/../shared endif if LINUX_ALPHA @@ -26,7 +25,7 @@ APM_SRCS = lnx_apm.c XORG_CFLAGS += -DHAVE_APM endif -liblinux_la_SOURCES = lnx_init.c lnx_video.c lnx_mouse.c \ +liblinux_la_SOURCES = lnx_init.c lnx_video.c \ lnx_pci.c lnx_agp.c lnx_kmod.c lnx_bell.c \ $(srcdir)/../shared/bios_mmap.c \ $(srcdir)/../shared/VTsw_usl.c \ @@ -40,13 +39,11 @@ liblinux_la_SOURCES = lnx_init.c lnx_video.c lnx_mouse.c \ AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES) -INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) -I/usr/include/drm # FIXME this last part is crack +INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS) # FIXME: These need to be added to the build LNX_EXTRA_SRCS = \ - lnx_font.c \ - lnx_jstk.c \ - lnxResource.c + lnx_font.c EXTRA_DIST = \ $(LNX_EXTRA_SRCS) \ diff --git a/xorg-server/hw/xfree86/os-support/linux/Makefile.in b/xorg-server/hw/xfree86/os-support/linux/Makefile.in index a753ac9a0..2d3aa3e34 100644 --- a/xorg-server/hw/xfree86/os-support/linux/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/linux/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -46,7 +46,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -54,8 +53,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @LINUX_ALPHA_TRUE@liblinux_la_DEPENDENCIES = liblinuxev56.la -am__liblinux_la_SOURCES_DIST = lnx_init.c lnx_video.c lnx_mouse.c \ - lnx_pci.c lnx_agp.c lnx_kmod.c lnx_bell.c \ +am__liblinux_la_SOURCES_DIST = lnx_init.c lnx_video.c lnx_pci.c \ + lnx_agp.c lnx_kmod.c lnx_bell.c \ $(srcdir)/../shared/bios_mmap.c $(srcdir)/../shared/VTsw_usl.c \ $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/sigio.c $(srcdir)/../shared/stdResource.c \ @@ -65,9 +64,9 @@ am__liblinux_la_SOURCES_DIST = lnx_init.c lnx_video.c lnx_mouse.c \ @LNXAPM_TRUE@am__objects_2 = lnx_apm.lo @LINUX_ALPHA_FALSE@@LINUX_IA64_TRUE@am__objects_3 = ia64Pci.lo @LINUX_ALPHA_TRUE@am__objects_3 = lnx_axp.lo xf86Axp.lo -am_liblinux_la_OBJECTS = lnx_init.lo lnx_video.lo lnx_mouse.lo \ - lnx_pci.lo lnx_agp.lo lnx_kmod.lo lnx_bell.lo bios_mmap.lo \ - VTsw_usl.lo posix_tty.lo vidmem.lo sigio.lo stdResource.lo \ +am_liblinux_la_OBJECTS = lnx_init.lo lnx_video.lo lnx_pci.lo \ + lnx_agp.lo lnx_kmod.lo lnx_bell.lo bios_mmap.lo VTsw_usl.lo \ + posix_tty.lo vidmem.lo sigio.lo stdResource.lo \ $(am__objects_1) $(am__objects_2) $(am__objects_3) liblinux_la_OBJECTS = $(am_liblinux_la_OBJECTS) liblinuxev56_la_LIBADD = @@ -84,9 +83,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -102,8 +98,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -124,10 +121,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -149,6 +142,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -158,18 +152,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -188,7 +179,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -202,7 +193,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -214,8 +208,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -224,8 +217,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -258,7 +251,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -268,27 +260,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -299,10 +276,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ $(am__append_2) $(am__append_3) XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -311,13 +284,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -350,8 +318,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -371,7 +338,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -381,12 +347,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -404,21 +370,18 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ noinst_LTLIBRARIES = liblinux.la $(am__append_1) @LINUX_ALPHA_TRUE@PLATFORM_PCI_SUPPORT = \ @LINUX_ALPHA_TRUE@ $(srcdir)/lnx_axp.c \ @LINUX_ALPHA_TRUE@ $(srcdir)/../shared/xf86Axp.c @LINUX_IA64_TRUE@PLATFORM_PCI_SUPPORT = $(srcdir)/../shared/ia64Pci.c -@LINUX_IA64_TRUE@PLATFORM_DEFINES = -DOS_PROBE_PCI_CHIPSET=lnxProbePciChipset @LINUX_IA64_TRUE@PLATFORM_INCLUDES = -I$(srcdir)/../shared @LINUX_ALPHA_TRUE@liblinuxev56_la_CFLAGS = $(AM_CFLAGS) -mcpu=ev56 @LINUX_ALPHA_TRUE@liblinuxev56_la_SOURCES = lnx_ev56.c @LNXACPI_TRUE@ACPI_SRCS = lnx_acpi.c lnx_apm.c @LNXAPM_TRUE@APM_SRCS = lnx_apm.c -liblinux_la_SOURCES = lnx_init.c lnx_video.c lnx_mouse.c \ +liblinux_la_SOURCES = lnx_init.c lnx_video.c \ lnx_pci.c lnx_agp.c lnx_kmod.c lnx_bell.c \ $(srcdir)/../shared/bios_mmap.c \ $(srcdir)/../shared/VTsw_usl.c \ @@ -431,13 +394,11 @@ liblinux_la_SOURCES = lnx_init.c lnx_video.c lnx_mouse.c \ $(PLATFORM_PCI_SUPPORT) AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES) -INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) -I/usr/include/drm # FIXME this last part is crack +INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS) # FIXME: These need to be added to the build LNX_EXTRA_SRCS = \ - lnx_font.c \ - lnx_jstk.c \ - lnxResource.c + lnx_font.c EXTRA_DIST = \ $(LNX_EXTRA_SRCS) \ @@ -453,8 +414,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -509,7 +470,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_bell.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_kmod.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_mouse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_pci.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_video.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix_tty.Plo@am__quote@ @@ -620,7 +580,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/os-support/linux/int10/linux.c b/xorg-server/hw/xfree86/os-support/linux/int10/linux.c index 9e2c6199c..8274bbbfb 100644 --- a/xorg-server/hw/xfree86/os-support/linux/int10/linux.c +++ b/xorg-server/hw/xfree86/os-support/linux/int10/linux.c @@ -1,6 +1,6 @@ /* * linux specific part of the int10 module - * Copyright 1999, 2000, 2001, 2002, 2003, 2004 Egbert Eich + * Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2008 Egbert Eich */ #ifdef HAVE_XORG_CONFIG_H #include @@ -245,14 +245,15 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) * 64K bytes at a time. */ if (!videoBiosMapped) { - (void)memset((pointer)V_BIOS, 0, SYS_BIOS - V_BIOS); + memset((pointer)V_BIOS, 0, SYS_BIOS - V_BIOS); #ifdef DEBUG ErrorF("Reading BIOS\n"); #endif for (cs = V_BIOS; cs < SYS_BIOS; cs += V_BIOS_SIZE) if (xf86ReadBIOS(cs, 0, (pointer)cs, V_BIOS_SIZE) < V_BIOS_SIZE) xf86DrvMsg(screen, X_WARNING, - "Unable to retrieve all of segment 0x%06lX.\n", cs); + "Unable to retrieve all of segment 0x%06lX.\n", + (long)cs); #ifdef DEBUG ErrorF("done\n"); #endif @@ -292,10 +293,6 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) pInt->BIOSseg = V_BIOS >> 4; break; } - case BUS_ISA: - if (!xf86int10GetBiosSegment(pInt, NULL)) - goto error3; - break; default: goto error3; } @@ -357,7 +354,10 @@ MapCurrentInt10(xf86Int10InfoPtr pInt) "shmat(low_mem) error: %s\n",strerror(errno)); return FALSE; } - + if (mprotect((void*)0, V_RAM, PROT_READ|PROT_WRITE|PROT_EXEC) != 0) + xf86DrvMsg(pInt->scrnIndex, X_ERROR, + "Cannot set EXEC bit on low memory: %s\n", strerror(errno)); + if (((linuxInt10Priv*)pInt->private)->highMem >= 0) { addr = shmat(((linuxInt10Priv*)pInt->private)->highMem, (char*)HIGH_MEM, 0); @@ -368,6 +368,11 @@ MapCurrentInt10(xf86Int10InfoPtr pInt) "shmget error: %s\n",strerror(errno)); return FALSE; } + if (mprotect((void*)HIGH_MEM, HIGH_MEM_SIZE, + PROT_READ|PROT_WRITE|PROT_EXEC) != 0) + xf86DrvMsg(pInt->scrnIndex, X_ERROR, + "Cannot set EXEC bit on high memory: %s\n", + strerror(errno)); } else { if ((fd = open(DEV_MEM, O_RDWR, 0)) >= 0) { if (mmap((void *)(V_BIOS), SYS_BIOS - V_BIOS, diff --git a/xorg-server/hw/xfree86/os-support/linux/lnxResource.c b/xorg-server/hw/xfree86/os-support/linux/lnxResource.c deleted file mode 100644 index 67af9db3d..000000000 --- a/xorg-server/hw/xfree86/os-support/linux/lnxResource.c +++ /dev/null @@ -1,104 +0,0 @@ - -/* Resource information code */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86Privstr.h" -#include "xf86Pci.h" -#include "xf86Resources.h" -#define NEED_OS_RAC_PROTOS -#include "xf86_OSlib.h" -#include "lnx.h" - -/* Avoid Imakefile changes */ -#include "bus/Pci.h" - -#ifdef INCLUDE_XF86_NO_DOMAIN - -#ifdef __alpha__ - -resPtr -xf86AccResFromOS(resPtr ret) -{ - resRange range; - - /* - * Fallback is to claim the following areas: - * - * 0x000c0000 - 0x000effff location of VGA and other extensions ROMS - */ - - RANGE(range, 0x000c0000, 0x000effff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - - /* - * Fallback would be to claim well known ports in the 0x0 - 0x3ff range - * along with their sparse I/O aliases, but that's too imprecise. Instead - * claim a bare minimum here. - */ - RANGE(range, 0x00000000, 0x000000ff, ResExcIoBlock); /* For mainboard */ - ret = xf86AddResToList(ret, &range, -1); - - /* - * At minimum, the top and bottom resources must be claimed, so that - * resources that are (or appear to be) unallocated can be relocated. - */ - RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); -/* RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); */ - RANGE(range, 0xffffffff, 0xffffffff, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); - - /* XXX add others */ - return ret; -} - -#elif defined(__powerpc__) || \ - defined(__sparc__) || \ - defined(__mips__) || \ - defined(__sh__) || \ - defined(__mc68000__) || \ - defined(__arm__) || \ - defined(__s390__) || \ - defined(__hppa__) - -resPtr -xf86AccResFromOS(resPtr ret) -{ - resRange range; - - /* - * At minimum, the top and bottom resources must be claimed, so that - * resources that are (or appear to be) unallocated can be relocated. - */ - RANGE(range, 0x00000000, 0x00000000, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0xffffffff, 0xffffffff, ResExcMemBlock); - ret = xf86AddResToList(ret, &range, -1); - RANGE(range, 0x00000000, 0x00000000, ResExcIoBlock); - ret = xf86AddResToList(ret, &range, -1); -#if defined(__sparc__) || defined(__powerpc__) - RANGE(range, 0x00ffffff, 0x00ffffff, ResExcIoBlock); -#else - RANGE(range, 0x0000ffff, 0x0000ffff, ResExcIoBlock); -#endif - ret = xf86AddResToList(ret, &range, -1); - - return ret; -} - -#else - -#error : Put your platform dependent code here!! - -#endif - -#endif /* INCLUDE_XF86_NO_DOMAIN */ diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c b/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c index a8ad161b6..e8b6d4749 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c @@ -179,7 +179,6 @@ _alpha_iobase_query(unsigned flags, int hose, int bus, int devfn) */ _iobase = _alpha_iobase; -#ifndef INCLUDE_XF86_NO_DOMAIN /* * Only take over the inx/outx functions if this is a dense I/O * system *and* addressing domains are being used. The dense I/O @@ -191,7 +190,6 @@ _alpha_iobase_query(unsigned flags, int hose, int bus, int devfn) _alpha_inb = _dense_inb; _alpha_inw = _dense_inw; _alpha_inl = _dense_inl; -#endif /* !INCLUDE_XF86_NO_DOMAIN */ } else _iobase = _alpha_iobase_legacy; return _iobase(flags, hose, bus, devfn); 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 93ad680d7..702dfa675 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c @@ -32,6 +32,7 @@ #include "xf86.h" #include "xf86Priv.h" +#include "xf86_OSproc.h" _X_EXPORT void xf86OSRingBell(int loudness, int pitch, int duration) 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 11c45e538..e751da2d0 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c @@ -90,7 +90,6 @@ writeDense32(int Value, pointer Base, register unsigned long Offset) } -#ifndef INCLUDE_XF86_NO_DOMAIN void _dense_outb(char val, unsigned long port) @@ -146,5 +145,4 @@ _dense_inl(unsigned long port) return *(volatile CARD32 *)port; } -#endif /* !INCLUDE_XF86_NO_DOMAIN */ diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c index da5ca57cc..7f408573a 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c @@ -250,6 +250,8 @@ xf86OpenConsole(void) if (!ShareVTs) { + struct termios nTty; + #if defined(DO_OS_FONTRESTORE) lnx_savefont(); #endif @@ -282,37 +284,27 @@ xf86OpenConsole(void) FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed %s\n", strerror(errno)); - /* Set the keyboard to RAW mode. If we're using the keyboard - * driver, the driver does it for us. If we have AEI on, then - * we're expecting the devices to be added (i.e. evdev) and we - * have to set it manually. - */ - if (xf86Info.allowEmptyInput) - { - struct termios nTty; - - tcgetattr(xf86Info.consoleFd, &tty_attr); - ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode); - - if (ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW) < 0) - FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n", - strerror(errno)); - - nTty = tty_attr; - nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP); - nTty.c_oflag = 0; - nTty.c_cflag = CREAD | CS8; - nTty.c_lflag = 0; - nTty.c_cc[VTIME]=0; - nTty.c_cc[VMIN]=1; - cfsetispeed(&nTty, 9600); - cfsetospeed(&nTty, 9600); - tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty); - - /* need to keep the buffer clean, else the kernel gets angry */ - console_handler = xf86AddGeneralHandler(xf86Info.consoleFd, - drain_console, NULL); - } + tcgetattr(xf86Info.consoleFd, &tty_attr); + ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode); + + if (ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW) < 0) + FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n", + strerror(errno)); + + nTty = tty_attr; + nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP); + nTty.c_oflag = 0; + nTty.c_cflag = CREAD | CS8; + nTty.c_lflag = 0; + nTty.c_cc[VTIME]=0; + nTty.c_cc[VMIN]=1; + cfsetispeed(&nTty, 9600); + cfsetospeed(&nTty, 9600); + tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty); + + /* need to keep the buffer clean, else the kernel gets angry */ + console_handler = xf86AddGeneralHandler(xf86Info.consoleFd, + drain_console, NULL); /* we really should have a InitOSInputDevices() function instead * of Init?$#*&Device(). So I just place it here */ diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_jstk.c b/xorg-server/hw/xfree86/os-support/linux/lnx_jstk.c deleted file mode 100644 index d77631ba4..000000000 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_jstk.c +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright 1995 by Frederic Lepied, France. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Frederic Lepied not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Frederic Lepied makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * FREDERIC LEPIED DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL FREDERIC LEPIED BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - */ - - -static const char rcs_id[] = "Id: lnx_jstk.c,v 1.1 1995/12/20 14:06:09 lepied Exp"; - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#define inline __inline__ -#include -#include -#include - -#include "xf86.h" - -#if !defined(JSIOCGTIMELIMIT) -/* make 2.1.x joystick.h backward compatable */ -#define JSIOCGTIMELIMIT JS_GET_TIMELIMIT -#define JSIOCSTIMELIMIT JS_SET_TIMELIMIT -#define js_status JS_DATA_TYPE -#endif - - -/*********************************************************************** - * - * xf86JoystickOn -- - * - * open the device and init timeout according to the device value. - * - *********************************************************************** - */ - -int -xf86JoystickOn(char *name, int *timeout, int *centerX, int *centerY) -{ - int fd; - struct js_status js; - -#ifdef DEBUG - ErrorF("xf86JoystickOn %s\n", name); -#endif - - if ((fd = open(name, O_RDWR | O_NDELAY, 0)) < 0) - { - xf86Msg(X_WARNING, "Cannot open joystick '%s' (%s)\n", name, - strerror(errno)); - return -1; - } - - if (*timeout == 0) { - if (ioctl (fd, JSIOCGTIMELIMIT, timeout) == -1) { - Error("joystick JSIOCGTIMELIMIT ioctl"); - } - else { - xf86Msg(X_CONFIG, "Joystick: timeout value = %d\n", *timeout); - } - } - else { - if (ioctl(fd, JSIOCSTIMELIMIT, timeout) == -1) { - Error("joystick JSIOCSTIMELIMIT ioctl"); - } - } - - /* Assume the joystick is centred when this is called */ - read(fd, &js, JS_RETURN); - if (*centerX < 0) { - *centerX = js.x; - xf86Msg(X_CONFIG, "Joystick: CenterX set to %d\n", *centerX); - } - if (*centerY < 0) { - *centerY = js.y; - xf86Msg(X_CONFIG, "Joystick: CenterY set to %d\n", *centerY); - } - - return fd; -} - -/*********************************************************************** - * - * xf86JoystickInit -- - * - * called when X device is initialized. - * - *********************************************************************** - */ - -void -xf86JoystickInit() -{ - return; -} - -/*********************************************************************** - * - * xf86JoystickOff -- - * - * close the handle. - * - *********************************************************************** - */ - -int -xf86JoystickOff(int *fd, int doclose) -{ - int oldfd; - - if (((oldfd = *fd) >= 0) && doclose) { - close(*fd); - *fd = -1; - } - return oldfd; -} - -/*********************************************************************** - * - * xf86JoystickGetState -- - * - * return the state of buttons and the position of the joystick. - * - *********************************************************************** - */ - -int -xf86JoystickGetState(int fd, int *x, int *y, int *buttons) -{ - struct js_status js; - int status; - - status = read(fd, &js, JS_RETURN); - - if (status != JS_RETURN) - { - Error("Joystick read"); - return 0; - } - - *x = js.x; - *y = js.y; - *buttons = js.buttons; - - return 1; -} - -/* - * Entry point for XFree86 Loader - */ -void -linux_jstkModuleInit(pointer *data, INT32 *magic) -{ - *magic = MAGIC_DONE; - *data = NULL; -} - -/* end of lnx_jstk.c */ diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_mouse.c b/xorg-server/hw/xfree86/os-support/linux/lnx_mouse.c deleted file mode 100644 index d2822153f..000000000 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_mouse.c +++ /dev/null @@ -1,221 +0,0 @@ - -/* - * Copyright 1999 by The XFree86 Project, Inc. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include "xf86.h" -#include "xf86Xinput.h" -#include "xf86OSmouse.h" -#include "xf86_OSlib.h" -#include -#include -#include - -static int -SupportedInterfaces(void) -{ - return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO; -} - -static const char * -DefaultProtocol(void) -{ - return "Auto"; -} - -#define DEFAULT_MOUSE_DEV "/dev/input/mice" -#define DEFAULT_PS2_DEV "/dev/psaux" -#define DEFAULT_GPM_DATA_DEV "/dev/gpmdata" -#define DEFAULT_GPM_CTL_DEV "/dev/gpmdata" - -static const char *mouseDevs[] = { - DEFAULT_MOUSE_DEV, - DEFAULT_PS2_DEV, - DEFAULT_GPM_DATA_DEV, - NULL -}; - -typedef enum { - MOUSE_PROTO_UNKNOWN = 0, - MOUSE_PROTO_SERIAL, - MOUSE_PROTO_PS2, - MOUSE_PROTO_MSC, - MOUSE_PROTO_GPM, - MOUSE_PROTO_EXPPS2, -} protocolTypes; - -static struct { - protocolTypes proto; - const char *name; -} devproto[] = { - { MOUSE_PROTO_UNKNOWN, NULL }, - { MOUSE_PROTO_PS2, "PS/2" }, - { MOUSE_PROTO_MSC, "MouseSystems" }, - { MOUSE_PROTO_GPM, "GPM" }, - { MOUSE_PROTO_EXPPS2, "ExplorerPS/2" }, -}; - -static const char * -FindDevice(InputInfoPtr pInfo, const char *protocol, int flags) -{ - int fd = -1; - const char **pdev; - - for (pdev = mouseDevs; *pdev; pdev++) { - SYSCALL (fd = open(*pdev, O_RDWR | O_NONBLOCK | O_EXCL)); - if (fd == -1) { -#ifdef DEBUG - ErrorF("Cannot open %s (%s)\n", *pdev, strerror(errno)); -#endif - } else - break; - } - - if (*pdev) { - close(fd); - /* Set the Device option. */ - pInfo->conf_idev->commonOptions = - xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", *pdev); - xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n", - pInfo->name, *pdev); - } - - return *pdev; -} - -static const char * -lnxMouseMagic(InputInfoPtr pInfo) -{ - int fd = -1; - const char *dev; - char *realdev; - struct stat sbuf; - int i; - int proto = MOUSE_PROTO_UNKNOWN; - - dev = xf86SetStrOption(pInfo->conf_idev->commonOptions, "Device", NULL); - if (!dev) { -#ifdef DEBUG - ErrorF("xf86SetStrOption failed to return the device name\n"); -#endif - return NULL; - } - /* Look at the device name to guess the protocol. */ - realdev = NULL; - if (strcmp(dev, DEFAULT_MOUSE_DEV) == 0) { - if (lstat(dev, &sbuf) != 0) { -#ifdef DEBUG - ErrorF("lstat failed for %s (%s)\n", dev, strerror(errno)); -#endif - return NULL; - } - if (S_ISLNK(sbuf.st_mode)) { - realdev = xnfalloc(PATH_MAX + 1); - i = readlink(dev, realdev, PATH_MAX); - if (i <= 0) { -#ifdef DEBUG - ErrorF("readlink failed for %s (%s)\n", dev, strerror(errno)); -#endif - xfree(realdev); - return NULL; - } - realdev[i] = '\0'; - } - } - if (!realdev) - realdev = xnfstrdup(dev); - else { - /* If realdev doesn't contain a '/' then prepend "/dev/" */ - if (!strchr(realdev, '/')) { - char *tmp = xnfalloc(strlen(realdev) + 5 + 1); - sprintf(tmp, "/dev/%s", realdev); - xfree(realdev); - realdev = tmp; - } - } - - if (strcmp(realdev, DEFAULT_MOUSE_DEV) == 0) - proto = MOUSE_PROTO_EXPPS2; - else if (strcmp(realdev, DEFAULT_PS2_DEV) == 0) - proto = MOUSE_PROTO_EXPPS2; - else if (strcmp(realdev, DEFAULT_GPM_DATA_DEV) == 0) - proto = MOUSE_PROTO_MSC; - else if (strcmp(realdev, DEFAULT_GPM_CTL_DEV) == 0) - proto = MOUSE_PROTO_GPM; - xfree(realdev); - /* - * If the protocol can't be guessed from the device name, - * try to characterise it. - */ - if (proto == MOUSE_PROTO_UNKNOWN) { - SYSCALL (fd = open(dev, O_RDWR | O_NONBLOCK | O_EXCL)); - if (isatty(fd)) { - /* Serial PnP has already failed, so give up. */ - } else { - if (fstat(fd, &sbuf) != 0) { -#ifdef DEBUG - ErrorF("fstat failed for %s (%s)\n", dev, strerror(errno)); -#endif - close(fd); - return NULL; - } - if (S_ISFIFO(sbuf.st_mode)) { - /* Assume GPM data in MSC format. */ - proto = MOUSE_PROTO_MSC; - } else { - /* Default to PS/2 */ - proto = MOUSE_PROTO_PS2; - } - } - close(fd); - } - if (proto == MOUSE_PROTO_UNKNOWN) { - xf86Msg(X_ERROR, "%s: Cannot find mouse protocol.\n", - pInfo->name); - return NULL; - } else { - for (i = 0; i < sizeof(devproto)/sizeof(devproto[0]); i++) { - if (devproto[i].proto == proto) { - xf86Msg(X_INFO, - "%s: Setting mouse protocol to \"%s\"\n", - pInfo->name, devproto[i].name); - return devproto[i].name; - } - } - } - return NULL; -} - -static const char * -GuessProtocol(InputInfoPtr pInfo, int flags) -{ - return lnxMouseMagic(pInfo); -} - -static const char * -SetupAuto(InputInfoPtr pInfo, int *protoPara) -{ - return lnxMouseMagic(pInfo); -} - -_X_EXPORT OSMouseInfoPtr -xf86OSMouseInit(int flags) -{ - OSMouseInfoPtr p; - - p = xcalloc(sizeof(OSMouseInfoRec), 1); - if (!p) - return NULL; - p->SupportedInterfaces = SupportedInterfaces; - p->DefaultProtocol = DefaultProtocol; - p->FindDevice = FindDevice; - p->GuessProtocol = GuessProtocol; - p->SetupAuto = SetupAuto; - return p; -} - diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c index 1bd2d575f..688106af4 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c @@ -75,19 +75,7 @@ extern int iopl(int __level); #ifdef __alpha__ -# ifdef LIBC_IS_FIXED extern void sethae(unsigned long hae); -# else -# include -# define sethae(x) syscall(301,x); -# endif - -/* define to test the Sparse addressing on a non-Jensen */ -# ifdef TEST_JENSEN_CODE -# define isJensen (1) -# else -# define isJensen (axpSystem == JENSEN) -# endif # define BUS_BASE bus_base @@ -107,10 +95,6 @@ static void unmapVidMem(int, pointer, unsigned long); static pointer mapVidMemSparse(int, unsigned long, unsigned long, int); extern axpDevice lnxGetAXP(void); static void unmapVidMemSparse(int, pointer, unsigned long); -# if defined(JENSEN_SUPPORT) -static pointer mapVidMemJensen(int, unsigned long, unsigned long, int); -static void unmapVidMemJensen(int, pointer, unsigned long); -# endif static axpDevice axpSystem = -1; static Bool needSparse; static unsigned long hae_thresh; @@ -398,17 +382,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) } bus_base = _bus_base(); } - if (isJensen) { -# ifndef JENSEN_SUPPORT - FatalError("Jensen is not supported any more\n" - "If you are intereseted in fixing Jensen support\n" - "please contact xorg@lists.freedesktop.org\n"); -# else - xf86Msg(X_INFO,"Machine type is Jensen\n"); - pVidMem->mapMem = mapVidMemJensen; - pVidMem->unmapMem = unmapVidMemJensen; -# endif /* JENSEN_SUPPORT */ - } else if (needSparse) { + if (needSparse) { xf86Msg(X_INFO,"Machine needs sparse mapping\n"); pVidMem->mapMem = mapVidMemSparse; pVidMem->unmapMem = unmapVidMemSparse; @@ -558,7 +532,7 @@ xf86EnableIO(void) #endif } close(fd); -#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) +#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) && !defined(__m32r__) if (ioperm(0, 1024, 1) || iopl(3)) { if (errno == ENODEV) ErrorF("xf86EnableIOPorts: no I/O ports found\n"); @@ -585,7 +559,7 @@ xf86DisableIO(void) #if defined(__powerpc__) munmap(ioBase, 0x20000); ioBase = NULL; -#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__) +#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__) && !defined(__m32r__) iopl(0); ioperm(0, 1024, 0); #endif @@ -594,24 +568,6 @@ xf86DisableIO(void) return; } -/* - * Don't use these two functions. They can't possibly work. If you actually - * need interrupts off for something, you ought to be doing it in the kernel - * anyway. - */ - -_X_EXPORT Bool -xf86DisableInterrupts() -{ - return (TRUE); -} - -_X_EXPORT void -xf86EnableInterrupts() -{ - return; -} - #if defined (__alpha__) #define vuip volatile unsigned int * @@ -932,175 +888,4 @@ _X_EXPORT int (*xf86ReadMmio16)(pointer Base, unsigned long Offset) _X_EXPORT int (*xf86ReadMmio32)(pointer Base, unsigned long Offset) = readDense32; -#ifdef JENSEN_SUPPORT - -static int -readSparseJensen8(pointer Base, register unsigned long Offset); -static int -readSparseJensen16(pointer Base, register unsigned long Offset); -static int -readSparseJensen32(pointer Base, register unsigned long Offset); -static void -writeSparseJensen8(int Value, pointer Base, register unsigned long Offset); -static void -writeSparseJensen16(int Value, pointer Base, register unsigned long Offset); -static void -writeSparseJensen32(int Value, pointer Base, register unsigned long Offset); -static void -writeSparseJensenNB8(int Value, pointer Base, register unsigned long Offset); -static void -writeSparseJensenNB16(int Value, pointer Base, register unsigned long Offset); -static void -writeSparseJensenNB32(int Value, pointer Base, register unsigned long Offset); - -/* - * The Jensen lacks dense memory, thus we have to address the bus via - * the sparse addressing scheme. - * - * Martin Ostermann (ost@comnets.rwth-aachen.de) - Apr.-Sep. 1996 - */ - -#ifdef TEST_JENSEN_CODE -#define SPARSE (5) -#else -#define SPARSE (7) -#endif - -#define JENSEN_SHIFT(x) ((long)x<>= shift; - return 0xffUL & result; -} - -static int -readSparseJensen16(pointer Base, register unsigned long Offset) -{ - register unsigned long result, shift; - - mem_barrier(); - shift = (Offset & 0x2) << 3; - - result = *(vuip)((unsigned long)Base+(Offset<>= shift; - return 0xffffUL & result; -} - -static int -readSparseJensen32(pointer Base, register unsigned long Offset) -{ - register unsigned long result; - - mem_barrier(); - result = *(vuip)((unsigned long)Base+(Offset< -#endif - -#include -#include - -#include "compiler.h" - -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" - -static int VTnum = -1; - -void -xf86OpenConsole() -{ - struct vt_mode VT; - char vtname1[11]; - int fd, pgrp; - MessageType from = X_PROBED; - - if (serverGeneration == 1) - { - /* check if we're run with euid==0 */ - if (geteuid() != 0) - { - FatalError("xf86OpenConsole: Server must be suid root\n"); - } - - /* - * setup the virtual terminal manager - * NOTE: - * We use the out-of-the-box atc terminal driver, - * not the GE contributed vdt driver. - * Also, we do setup signals for VT switching which - * is not really necessary because we don't feed the - * VT switch keystrokes to the kernel in xf86Events.c - * (it bombs occasionally...) - */ - if (VTnum != -1) - { - xf86Info.vtno = VTnum; - from = X_CMDLINE; - } - else - { - /* We could use /dev/con which is usually a symlink - * to /dev/atc0 but one could configure the system - * to use a serial line as console device, so to - * be sure we take /dev/atc0. - */ - if ((fd = open("/dev/atc0",O_WRONLY,0)) < 0) - { - FatalError( - "xf86OpenConsole: Cannot open /dev/atc0 (%s)\n", - strerror(errno)); - } - if ((ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) || - (xf86Info.vtno == -1)) - { - FatalError("xf86OpenConsole: Cannot find a free VT\n"); - } - close(fd); - } - xf86Msg(from, "using VT number %d\n", xf86Info.vtno); - - sprintf(vtname1,"/dev/atc%d",xf86Info.vtno); - - pgrp = getpgrp(); /* POSIX version ! */ - ioctl(xf86Info.consoleFd, TIOCSPGRP, &pgrp); - - if ((xf86Info.consoleFd = open(vtname1,O_RDWR|O_NDELAY,0)) < 0) - { - FatalError( - "xf86OpenConsole: Cannot open %s (%s)\n", - vtname1, strerror(errno)); - } - /* change ownership of the vt */ - chown(vtname1, getuid(), getgid()); - - /* - * now get the VT - */ - if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0) - { - xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n"); - } - if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0) - { - FatalError("xf86OpenConsole: VT_GETMODE failed\n"); - } - - /* for future use... */ - signal(SIGUSR1, xf86VTRequest); - - VT.mode = VT_PROCESS; - VT.relsig = SIGUSR1; - VT.acqsig = SIGUSR1; - if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0) - { - FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n"); - } - } - else - { - /* serverGeneration != 1 */ - /* - * now get the VT - */ - if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0) - { - xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n"); - } - /* - * If the server doesn't have the VT when the reset occurs, - * this is to make sure we don't continue until the activate - * signal is received. - */ - if (!xf86Screens[0]->vtSema) - sleep(5); - } - return; -} - -void -xf86CloseConsole() -{ - struct vt_mode VT; - -#if 0 - ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno); - ioctl(xf86Info.consoleFd, VT_WAITACTIVE, 0); -#endif - if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1) - { - VT.mode = VT_AUTO; - ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); /* set dflt vt handling */ - } - close(xf86Info.consoleFd); /* make the vt-manager happy */ - return; -} - -int -xf86ProcessArgument(int argc, char *argv[], int i) -{ - if ((argv[i][0] == 'v') && (argv[i][1] == 't')) - { - if (sscanf(argv[i], "vt%2d", &VTnum) == 0) - { - UseMsg(); - VTnum = -1; - return(0); - } - return(1); - } - return(0); -} - -void -xf86UseMsg() -{ - ErrorF("vtXX use the specified VT number\n"); - return; -} - diff --git a/xorg-server/hw/xfree86/os-support/lynxos/lynx_mmap.c b/xorg-server/hw/xfree86/os-support/lynxos/lynx_mmap.c deleted file mode 100644 index 3364399aa..000000000 --- a/xorg-server/hw/xfree86/os-support/lynxos/lynx_mmap.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 1993 by Thomas Mueller - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Thomas Mueller not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Thomas Mueller makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * THOMAS MUELLER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL THOMAS MUELLER BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - */ - - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include - -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" - -/* - * Read BIOS using smem_create facility - */ - -_X_EXPORT int -xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, - int Len) -{ -#if defined(__powerpc__) - xf86Msg(X_WARNING, "xf86ReadBios: no BIOS-probe on PowerPC\n"); - return(-1); -#else - char *p; - int mlen; - - mlen = (Offset + Len + 4095) & ~4095; - p = smem_create("BIOS-probe", (char *)Base, mlen, SM_READ); - if (p == NULL) - { - /* check if there is a stale segment around */ - if (smem_remove("BIOS-probe") == 0) { - xf86Msg(X_INFO, - "xf86ReadBios: removed stale smem_ segment\n"); - p = smem_create("BIOS-probe", (char *)Base, mlen, SM_READ); - } - if (p == NULL) { - xf86Msg(X_WARNING, "xf86ReadBios: Failed to smem_create " - "Base %x len %x %s \n", - Base, mlen, strerror(errno)); - return(-1); - } - } - memcpy(Buf, p + Offset, Len); - smem_create(NULL, p, 0, SM_DETACH); - smem_remove("BIOS-probe"); - return(Len); -#endif -} diff --git a/xorg-server/hw/xfree86/os-support/lynxos/lynx_mouse.c b/xorg-server/hw/xfree86/os-support/lynxos/lynx_mouse.c deleted file mode 100644 index b48202977..000000000 --- a/xorg-server/hw/xfree86/os-support/lynxos/lynx_mouse.c +++ /dev/null @@ -1,33 +0,0 @@ - -/* - * Copyright 1999 by The XFree86 Project, Inc. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include "xf86.h" -#include "xf86Xinput.h" -#include "xf86OSmouse.h" - -static int -SupportedInterfaces(void) -{ - /* XXX Need to check this. */ - return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO; -} - -_X_EXPORT OSMouseInfoPtr -xf86OSMouseInit(int flags) -{ - OSMouseInfoPtr p; - - p = xcalloc(sizeof(OSMouseInfoRec), 1); - if (!p) - return NULL; - p->SupportedInterfaces = SupportedInterfaces; - return p; -} - diff --git a/xorg-server/hw/xfree86/os-support/lynxos/lynx_noinline.c b/xorg-server/hw/xfree86/os-support/lynxos/lynx_noinline.c deleted file mode 100644 index d4db82cca..000000000 --- a/xorg-server/hw/xfree86/os-support/lynxos/lynx_noinline.c +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright 1998 by Metro Link Incorporated - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of Metro Link - * Incorporated not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior - * permission. Metro Link Incorporated makes no representations - * about the suitability of this software for any purpose. It is - * provided "as is" without express or implied warranty. - * - * METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD - * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#if /* NO_INLINE && */ defined(__powerpc__) - -#include "xf86Pci.h" - -extern volatile unsigned char *ioBase; - -_X_EXPORT void -eieio() -{ - __asm__ __volatile__ ("eieio"); -} - -_X_EXPORT unsigned long -ldl_brx(volatile unsigned char *base, int ndx) -{ - register unsigned long tmp = *(volatile unsigned long *)(base+ndx); - return( ((tmp & 0x000000ff) << 24) | - ((tmp & 0x0000ff00) << 8) | - ((tmp & 0x00ff0000) >> 8) | - ((tmp & 0xff000000) >> 24) ); -} - -_X_EXPORT unsigned short -ldw_brx(volatile unsigned char *base, int ndx) -{ - register unsigned short tmp = *(volatile unsigned short *)(base+ndx); - return((tmp << 8) | (tmp >> 8)); -} - -_X_EXPORT void -stl_brx(unsigned long val, volatile unsigned char *base, int ndx) -{ - unsigned char *p = (unsigned char *)&val; - unsigned long tmp = (p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0] << 0); - *(volatile unsigned long *)(base+ndx) = tmp; -} - -_X_EXPORT void -stw_brx(unsigned short val, volatile unsigned char *base, int ndx) -{ - unsigned char *p = (unsigned char *)&val; - unsigned short tmp = (p[1] << 8) | p[0]; - *(volatile unsigned short *)(base+ndx) = tmp; -} - -_X_EXPORT void -outb(IOADDRESS port, unsigned char value) -{ - *((volatile unsigned char *)(ioBase + port)) = value; eieio(); -} - -_X_EXPORT void -outw(IOADDRESS port, unsigned short value) -{ - stw_brx(value, ioBase, port); eieio(); -} - -_X_EXPORT void -outl(IOADDRESS port, unsigned int value) -{ - stl_brx(value, ioBase, port); eieio(); -} - -_X_EXPORT unsigned char -inb(IOADDRESS port) -{ - unsigned char val; - - val = *((volatile unsigned char *)(ioBase + port)); eieio(); - return(val); -} - -_X_EXPORT unsigned short -inw(IOADDRESS port) -{ - unsigned short val; - - val = ldw_brx(ioBase, port); eieio(); - return(val); -} - -_X_EXPORT unsigned int -inl(IOADDRESS port) -{ - unsigned int val; - - val = ldl_brx(ioBase, port); eieio(); - return(val); -} - -_X_EXPORT unsigned long -ldl_u(void *p) -{ - return (((*(unsigned char *)(p)) | - (*((unsigned char *)(p)+1)<<8) | - (*((unsigned char *)(p)+2)<<16) | - (*((unsigned char *)(p)+3)<<24))); -} - -_X_EXPORT unsigned long -ldq_u(void *p) -{ - return ldl_u(p); -} - -_X_EXPORT unsigned short -ldw_u(void *p) -{ - return(((*(unsigned char *)(p)) | - (*((unsigned char *)(p)+1)<<8))); -} - -_X_EXPORT void -stl_u(unsigned long v, void *p) -{ - - (*(unsigned char *)(p)) = (v); - (*((unsigned char *)(p)+1)) = ((v) >> 8); - (*((unsigned char *)(p)+2)) = ((v) >> 16); - (*((unsigned char *)(p)+3)) = ((v) >> 24); -} - -_X_EXPORT void -stq_u(unsigned long v, void *p) -{ - stl_u(v,p); -} - -_X_EXPORT void -stw_u(unsigned short v, void *p) -{ - (*(unsigned char *)(p)) = (v); - (*((unsigned char *)(p)+1)) = ((v) >> 8); -} - - -_X_EXPORT void -mem_barrier(void) -{ - __asm__ __volatile__("eieio"); -} - -_X_EXPORT void -write_mem_barrier(void) -{ - __asm__ __volatile__("eieio"); -} - -#endif /* NO_INLINE && __powerpc__ */ diff --git a/xorg-server/hw/xfree86/os-support/lynxos/lynx_ppc.S b/xorg-server/hw/xfree86/os-support/lynxos/lynx_ppc.S deleted file mode 100644 index 3865850d1..000000000 --- a/xorg-server/hw/xfree86/os-support/lynxos/lynx_ppc.S +++ /dev/null @@ -1,70 +0,0 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_ppc.S,v 1.1 1999/07/10 07:24:49 dawes Exp $ */ -/* - * Copyright 1998 by Metro Link Incorporated - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of Metro Link - * Incorporated not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior - * permission. Metro Link Incorporated makes no representations - * about the suitability of this software for any purpose. It is - * provided "as is" without express or implied warranty. - * - * METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD - * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - - .file "ppc.s" -.toc - .csect .text[PR] - .balign 4 - .globl ppc_flush_icache - .globl .ppc_flush_icache -.csect ppc_flush_icache[DS] -ppc_flush_icache: - .long .ppc_flush_icache, TOC[tc0], 0 -.csect .text[PR] -.ppc_flush_icache: - mflr 0 - stw 31,-4(1) - stw 0,8(1) - stwu 1,-64(1) - mr 31,1 - stw 3,88(31) - li 6, 0 /* __inst_dcbf (addr, 0); */ - dcbf 3, 6 - li 5, 32 /* __inst_dcbf (addr, LINESIZE); */ - dcbf 3, 5 - sync /* __inst_sync (); */ - li 4,0 /* __inst_icbi (addr, 0); */ - icbi 3,4 - li 7,32 /* __inst_icbi (addr, LINESIZE); */ - icbi 3,7 - sync /* __inst_sync (); */ - isync /* __inst_isync (); */ -L..1: - lwz 1,0(1) - lwz 0,8(1) - mtlr 0 - lwz 31,-4(1) - blr -LT..ppc_flush_icache: - .long 0 - .byte 0,0,32,97,128,1,1,1 - .long 0 - .long LT..ppc_flush_icache-.ppc_flush_icache - .short 16 - .byte "ppc_flush_icache" - .byte 31 -_section_.text: - .csect .data[RW] - .long _section_.text diff --git a/xorg-server/hw/xfree86/os-support/lynxos/lynx_ppc.c b/xorg-server/hw/xfree86/os-support/lynxos/lynx_ppc.c deleted file mode 100644 index 6300f38c8..000000000 --- a/xorg-server/hw/xfree86/os-support/lynxos/lynx_ppc.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 1998 by Metro Link Incorporated - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of Metro Link - * Incorporated not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior - * permission. Metro Link Incorporated makes no representations - * about the suitability of this software for any purpose. It is - * provided "as is" without express or implied warranty. - * - * METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD - * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -void ppc_flush_icache() -{ -__asm__ __volatile__ (" \ - mflr 0 ;\ - stw 31,-4(1) ;\ - stw 0,8(1) ;\ - stwu 1,-64(1) ;\ - mr 31,1 ;\ - stw 3,88(31) ;\ - li 6, 0 ;\ - dcbf 3, 6 ;\ - li 5, 32 ;\ - dcbf 3, 5 ;\ - sync ;\ - li 4,0 ;\ - icbi 3,4 ;\ - li 7,32 ;\ - icbi 3,7 ;\ - sync ;\ - isync ;\ - lwz 1,0(1) ;\ - lwz 0,8(1) ;\ - mtlr 0 ;\ - lwz 31,-4(1) ;\ - blr ;\ -"); -} diff --git a/xorg-server/hw/xfree86/os-support/lynxos/lynx_video.c b/xorg-server/hw/xfree86/os-support/lynxos/lynx_video.c deleted file mode 100644 index 4602076c7..000000000 --- a/xorg-server/hw/xfree86/os-support/lynxos/lynx_video.c +++ /dev/null @@ -1,710 +0,0 @@ -/* - * Copyright 1993 by Thomas Mueller - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Thomas Mueller not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Thomas Mueller makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * THOMAS MUELLER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL THOMAS MUELLER BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - */ - - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include "input.h" -#include "scrnintstr.h" - -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" -#include "xf86OSpriv.h" - -#if defined(__powerpc__) - -# if defined(USE_MACHINE_ABSOLUTE) -# include -# else -# define __USER_SPACE_INCLUDE -# include -# endif - -void ppcPciIoMap(int bus); -#endif - -#if 0 -#define DEBUG -#endif - -#ifdef HAS_MTRR_SUPPORT -#include -#define X_MTRR_ID "XFree86" - -static pointer setWC(int, unsigned long, unsigned long, Bool, MessageType); -static void undoWC(int, pointer); -static Bool cleanMTRR(void); -static int devMemFd = -1; -#define MTRR_DEVICE "/dev/mtrr" -#endif - - -#if !defined(NO_MMAP) -#include - -int smem_remove(char *name) -{ - return(0); -} - -char *smem_create(char *name, char *arg_addr, long size, int mode) -{ - int fd; - void *addr = 0; - char *retval; - size_t len = size; - int prot = PROT_READ|PROT_WRITE|PROT_UNCACHE; - int flags = MAP_SHARED; - off_t off = (off_t)arg_addr; - - if ((fd = open("/dev/mem" , O_RDWR)) < 0) - { - retval = (char *)-1; - } - else - { - if (mode == SM_DETACH) - { - munmap(arg_addr, len); - retval = 0; - } - else - { - if ((retval = mmap (addr, len, prot, flags, fd, off) ) == MAP_FAILED) - { - retval = (char *)-1; - } - } - - close(fd); - } - - return(retval); -} - -#endif - - -/***************************************************************************/ -/* Video Memory Mapping section */ -/***************************************************************************/ - -typedef struct -{ - char name[16]; - unsigned long Base; - unsigned long Size; - char *ptr; - int RefCnt; -} -_SMEMS; - -#define MAX_SMEMS 16 - -static _SMEMS smems[MAX_SMEMS]; - - -#ifndef MAP_FAILED -#define MAP_FAILED ((void *)-1) -#endif - -static void -smemCleanup(void) -{ - int i; - - for (i = 0; i < MAX_SMEMS; i++) { - if (*smems[i].name && smems[i].ptr) { - (void)smem_create(NULL, smems[i].ptr, 0, SM_DETACH); - (void)smem_remove(smems[i].name); - *smems[i].name = '\0'; - smems[i].ptr = NULL; - smems[i].Base = 0; - smems[i].Size = 0; - smems[i].RefCnt = 0; - } - } -} - -static pointer -MapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) -{ - static int once; - int free_slot = -1; - int i; - - if (!once) - { - atexit(smemCleanup); - once = 1; - } - for (i = 0; i < MAX_SMEMS; i++) - { - if (!*smems[i].name && free_slot == -1) - free_slot = i; - if (smems[i].Base == Base && smems[i].Size == Size - && *smems[i].name) { - smems[i].RefCnt++; - return smems[i].ptr; - } - } - if (i == MAX_SMEMS && free_slot == -1) - { - FatalError("MapVidMem: failed to smem_create Base %x Size %x (out of SMEMS entries)\n", - Base, Size); - } - - i = free_slot; - sprintf(smems[i].name, "Video-%d", i); - smems[i].Base = Base; - smems[i].Size = Size; - - xf86MsgVerb(X_INFO, 3, "MapVidMem: Base=0x%x Size=0x%x\n", - Base, Size); - -#if defined(__powerpc__) - if (((unsigned long)Base & PHYS_IO_MEM_START) != PHYS_IO_MEM_START) { - Base = Base | PHYS_IO_MEM_START; - } -#endif - - smems[i].ptr = smem_create(smems[i].name, (char *)Base, Size, SM_READ|SM_WRITE); - smems[i].RefCnt = 1; - if (smems[i].ptr == NULL) - { - /* check if there is a stale segment around */ - if (smem_remove(smems[i].name) == 0) { - xf86Msg(X_INFO, - "MapVidMem: removed stale smem_ segment %s\n", - smems[i].name); - smems[i].ptr = smem_create(smems[i].name, - (char *)Base, Size, SM_READ|SM_WRITE); - } - if (smems[i].ptr == NULL) { - *smems[i].name = '\0'; - FatalError("MapVidMem: failed to smem_create Base %x Size %x (%s)\n", - Base, Size, strerror(errno)); - } - } - xf86MsgVerb(X_INFO, 3, "MapVidMem: Base=0x%x Size=0x%x Ptr=0x%x\n", - Base, Size, smems[i].ptr); - return smems[i].ptr; -} - -static void -UnMapVidMem(int ScreenNum, pointer Base, unsigned long Size) -{ - int i; - - xf86MsgVerb(X_INFO, 3, "UnMapVidMem: Base/Ptr=0x%x Size=0x%x\n", - Base, Size); - for (i = 0; i < MAX_SMEMS; i++) - { - if (*smems[i].name && smems[i].ptr == Base - && smems[i].Size == Size) - { - if (--smems[i].RefCnt > 0) - return; - - (void)smem_create(NULL, smems[i].ptr, 0, SM_DETACH); - xf86MsgVerb(X_INFO, 3, - "UnMapVidMem: smem_create(%s, 0x%08x, ... " - "SM_DETACH)\n", smems[i].name, smems[i].ptr); - (void)smem_remove(smems[i].name); - *smems[i].name = '\0'; - smems[i].RefCnt = 0; - return; - } - } - xf86MsgVerb(X_WARNING, 2, - "UnMapVidMem: no SMEM found for Base = %lx Size = %lx\n", - Base, Size); -} - - -void -xf86OSInitVidMem(VidMemInfoPtr pVidMem) -{ - pVidMem->linearSupported = TRUE; - pVidMem->mapMem = MapVidMem; - pVidMem->unmapMem = UnMapVidMem; - pVidMem->setWC = 0; - pVidMem->undoWC = 0; -#ifdef HAS_MTRR_SUPPORT - if (cleanMTRR()) { - pVidMem->setWC = setWC; - pVidMem->undoWC = undoWC; - } -#endif - pVidMem->initialised = TRUE; -} - - -/***************************************************************************/ -/* Interrupt Handling section */ -/***************************************************************************/ - -_X_EXPORT Bool -xf86DisableInterrupts() -{ - return(TRUE); -} - -_X_EXPORT void -xf86EnableInterrupts() -{ - return; -} - -/***************************************************************************/ -/* I/O Permissions section for PowerPC */ -/***************************************************************************/ - -#if defined(__powerpc__) - -_X_EXPORT volatile unsigned char *ioBase = MAP_FAILED; -volatile unsigned char *pciConfBase = MAP_FAILED; - -static int IOEnabled; - - -static void -removeIOSmem(void) -{ - smem_create(NULL, (char *) ioBase, 0, SM_DETACH); - smem_remove("IOBASE"); - ioBase = MAP_FAILED; -} - -_X_EXPORT Bool -xf86EnableIO() -{ - if (IOEnabled++ == 0) { - ioBase = (unsigned char *) smem_create("IOBASE", - (char *)PHYS_ISA_IO_SPACE, 64*1024, SM_READ|SM_WRITE); - if (ioBase == MAP_FAILED) { - --IOEnabled; - xf86Msg(X_WARNING,"xf86EnableIO: Failed to map I/O\n"); - return FALSE; - } else { -#ifdef DEBUG - ErrorF("xf86EnableIO: mapped I/O at vaddr 0x%08x\n", - ioBase); -#endif - atexit(removeIOSmem); - } - } - return TRUE; -} - -_X_EXPORT void -xf86DisableIO() -{ - if (!IOEnabled) - return; - - if (--IOEnabled == 0) - removeIOSmem(); - return; -} - -#if 0 -void -xf86DisableIOPrivs(void) -{ - return; -} -#endif -void -ppcPciIoMap(int bus) -{ - xf86EnableIO(); -} - -#endif - - -#ifdef HAS_MTRR_SUPPORT -/* memory range (MTRR) support for LynxOS (taken from BSD MTRR support) */ - -/* - * This code is experimental. Some parts may be overkill, and other parts - * may be incomplete. - */ - -/* - * getAllRanges returns the full list of memory ranges with attributes set. - */ - -static struct mem_range_desc * -getAllRanges(int *nmr) -{ - struct mem_range_desc *mrd; - struct mem_range_op mro; - - /* - * Find how many ranges there are. If this fails, then the kernel - * probably doesn't have MTRR support. - */ - mro.mo_arg[0] = 0; - if (ioctl(devMemFd, MEMRANGE_GET, &mro)) - return NULL; - *nmr = mro.mo_arg[0]; - mrd = xnfalloc(*nmr * sizeof(struct mem_range_desc)); - mro.mo_arg[0] = *nmr; - mro.mo_desc = mrd; - if (ioctl(devMemFd, MEMRANGE_GET, &mro)) { - xfree(mrd); - return NULL; - } - return mrd; -} - -/* - * cleanMTRR removes any memory attribute that may be left by a previous - * X server. Normally there won't be any, but this takes care of the - * case where a server crashed without being able finish cleaning up. - */ - -static Bool -cleanMTRR() -{ - struct mem_range_desc *mrd; - struct mem_range_op mro; - int nmr, i; - - /* This shouldn't happen */ - if (devMemFd < 0) { - if ((devMemFd = open(MTRR_DEVICE, O_RDONLY)) < 0) { -perror("open MTRR"); - return FALSE; - } - } - - if (!(mrd = getAllRanges(&nmr))) - return FALSE; - - for (i = 0; i < nmr; i++) { - if (strcmp(mrd[i].mr_owner, X_MTRR_ID) == 0 && - (mrd[i].mr_flags & MDF_ACTIVE)) { -#ifdef DEBUG - ErrorF("Clean for (0x%lx,0x%lx)\n", - (unsigned long)mrd[i].mr_base, - (unsigned long)mrd[i].mr_len); -#endif - if (mrd[i].mr_flags & MDF_FIXACTIVE) { - mro.mo_arg[0] = MEMRANGE_SET_UPDATE; - mrd[i].mr_flags = MDF_UNCACHEABLE; - } else { - mro.mo_arg[0] = MEMRANGE_SET_REMOVE; - } - mro.mo_desc = mrd + i; - ioctl(devMemFd, MEMRANGE_SET, &mro); - } - } -#ifdef DEBUG - sleep(10); -#endif - xfree(mrd); - return TRUE; -} - -typedef struct x_RangeRec { - struct mem_range_desc mrd; - Bool wasWC; - struct x_RangeRec * next; -} RangeRec, *RangePtr; - -static void -freeRangeList(RangePtr range) -{ - RangePtr rp; - - while (range) { - rp = range; - range = rp->next; - xfree(rp); - } -} - -static RangePtr -dupRangeList(RangePtr list) -{ - RangePtr new = NULL, rp, p; - - rp = list; - while (rp) { - p = xnfalloc(sizeof(RangeRec)); - *p = *rp; - p->next = new; - new = p; - rp = rp->next; - } - return new; -} - -static RangePtr -sortRangeList(RangePtr list) -{ - RangePtr rp1, rp2, copy, sorted = NULL, minp, prev, minprev; - unsigned long minBase; - - /* Sort by base address */ - rp1 = copy = dupRangeList(list); - while (rp1) { - minBase = rp1->mrd.mr_base; - minp = rp1; - minprev = NULL; - prev = rp1; - rp2 = rp1->next; - while (rp2) { - if (rp2->mrd.mr_base < minBase) { - minBase = rp2->mrd.mr_base; - minp = rp2; - minprev = prev; - } - prev = rp2; - rp2 = rp2->next; - } - if (minprev) { - minprev->next = minp->next; - rp1 = copy; - } else { - rp1 = minp->next; - } - minp->next = sorted; - sorted = minp; - } - return sorted; -} - -/* - * findRanges returns a list of ranges that overlap the specified range. - */ - -static void -findRanges(unsigned long base, unsigned long size, RangePtr *ucp, RangePtr *wcp) -{ - struct mem_range_desc *mrd; - int nmr, i; - RangePtr rp, *p; - - if (!(mrd = getAllRanges(&nmr))) - return; - - for (i = 0; i < nmr; i++) { - if ((mrd[i].mr_flags & MDF_ACTIVE) && - mrd[i].mr_base < base + size && - mrd[i].mr_base + mrd[i].mr_len > base) { - if (mrd[i].mr_flags & MDF_WRITECOMBINE) - p = wcp; - else if (mrd[i].mr_flags & MDF_UNCACHEABLE) - p = ucp; - else - continue; - rp = xnfalloc(sizeof(RangeRec)); - rp->mrd = mrd[i]; - rp->next = *p; - *p = rp; - } - } - xfree(mrd); -} - -/* - * This checks if the existing overlapping ranges fully cover the requested - * range. Is this overkill? - */ - -static Bool -fullCoverage(unsigned long base, unsigned long size, RangePtr overlap) -{ - RangePtr rp1, sorted = NULL; - unsigned long end; - - sorted = sortRangeList(overlap); - /* Look for gaps */ - rp1 = sorted; - end = base + size; - while (rp1) { - if (rp1->mrd.mr_base > base) { - freeRangeList(sorted); - return FALSE; - } else { - base = rp1->mrd.mr_base + rp1->mrd.mr_len; - } - if (base >= end) { - freeRangeList(sorted); - return TRUE; - } - rp1 = rp1->next; - } - freeRangeList(sorted); - return FALSE; -} - -static pointer -addWC(int screenNum, unsigned long base, unsigned long size, MessageType from) -{ - RangePtr uc = NULL, wc = NULL, retlist = NULL; - struct mem_range_desc mrd; - struct mem_range_op mro; - - findRanges(base, size, &uc, &wc); - - /* See of the full range is already WC */ - if (!uc && fullCoverage(base, size, wc)) { - xf86DrvMsg(screenNum, from, - "Write-combining range (0x%lx,0x%lx) was already set\n", - base, size); - return NULL; - } - - /* Otherwise, try to add the new range */ - mrd.mr_base = base; - mrd.mr_len = size; - strcpy(mrd.mr_owner, X_MTRR_ID); - mrd.mr_flags = MDF_WRITECOMBINE; - mro.mo_desc = &mrd; - mro.mo_arg[0] = MEMRANGE_SET_UPDATE; - if (ioctl(devMemFd, MEMRANGE_SET, &mro)) { - xf86DrvMsg(screenNum, X_WARNING, - "Failed to set write-combining range " - "(0x%lx,0x%lx)\n", base, size); - return NULL; - } else { - xf86DrvMsg(screenNum, from, - "Write-combining range (0x%lx,0x%lx)\n", base, size); - retlist = xnfalloc(sizeof(RangeRec)); - retlist->mrd = mrd; - retlist->wasWC = FALSE; - retlist->next = NULL; - return retlist; - } -} - -static pointer -delWC(int screenNum, unsigned long base, unsigned long size, MessageType from) -{ - RangePtr uc = NULL, wc = NULL, retlist = NULL; - struct mem_range_desc mrd; - struct mem_range_op mro; - - findRanges(base, size, &uc, &wc); - - /* - * See of the full range is already not WC, or if there is full - * coverage from UC ranges. - */ - if (!wc || fullCoverage(base, size, uc)) { - xf86DrvMsg(screenNum, from, - "Write-combining range (0x%lx,0x%lx) was already clear\n", - base, size); - return NULL; - } - - /* Otherwise, try to add the new range */ - mrd.mr_base = base; - mrd.mr_len = size; - strcpy(mrd.mr_owner, X_MTRR_ID); - mrd.mr_flags = MDF_UNCACHEABLE; - mro.mo_desc = &mrd; - mro.mo_arg[0] = MEMRANGE_SET_UPDATE; - if (ioctl(devMemFd, MEMRANGE_SET, &mro)) { - xf86DrvMsg(screenNum, X_WARNING, - "Failed to remove write-combining range " - "(0x%lx,0x%lx)\n", base, size); - /* XXX Should then remove all of the overlapping WC ranges */ - return NULL; - } else { - xf86DrvMsg(screenNum, from, - "Removed Write-combining range (0x%lx,0x%lx)\n", - base, size); - retlist = xnfalloc(sizeof(RangeRec)); - retlist->mrd = mrd; - retlist->wasWC = TRUE; - retlist->next = NULL; - return retlist; - } -} - -static pointer -setWC(int screenNum, unsigned long base, unsigned long size, Bool enable, - MessageType from) -{ - if (enable) - return addWC(screenNum, base, size, from); - else - return delWC(screenNum, base, size, from); -} - -static void -undoWC(int screenNum, pointer list) -{ - RangePtr rp; - struct mem_range_op mro; - Bool failed; - - rp = list; - while (rp) { -#ifdef DEBUG - ErrorF("Undo for (0x%lx,0x%lx), %d\n", - (unsigned long)rp->mrd.mr_base, - (unsigned long)rp->mrd.mr_len, rp->wasWC); -#endif - failed = FALSE; - if (rp->wasWC) { - mro.mo_arg[0] = MEMRANGE_SET_UPDATE; - rp->mrd.mr_flags = MDF_WRITECOMBINE; - strcpy(rp->mrd.mr_owner, "unknown"); - } else { - mro.mo_arg[0] = MEMRANGE_SET_REMOVE; - } - mro.mo_desc = &rp->mrd; - - if (ioctl(devMemFd, MEMRANGE_SET, &mro)) { - if (!rp->wasWC) { - mro.mo_arg[0] = MEMRANGE_SET_UPDATE; - rp->mrd.mr_flags = MDF_UNCACHEABLE; - strcpy(rp->mrd.mr_owner, "unknown"); - if (ioctl(devMemFd, MEMRANGE_SET, &mro)) - failed = TRUE; - } else - failed = TRUE; - } - if (failed) { - xf86DrvMsg(screenNum, X_WARNING, - "Failed to restore MTRR range (0x%lx,0x%lx)\n", - (unsigned long)rp->mrd.mr_base, - (unsigned long)rp->mrd.mr_len); - } - rp = rp->next; - } -} - -#endif /* HAS_MTRR_SUPPORT */ - diff --git a/xorg-server/hw/xfree86/os-support/misc/BUSmemcpy.S b/xorg-server/hw/xfree86/os-support/misc/BUSmemcpy.S deleted file mode 100644 index 373723c7d..000000000 --- a/xorg-server/hw/xfree86/os-support/misc/BUSmemcpy.S +++ /dev/null @@ -1,153 +0,0 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/BUSmemcpy.s,v 1.2 1998/07/25 16:56:49 dawes Exp $ */ -/****************************************************************************** - Copyright 1993 by Glenn G. Lai - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Glenn G. Lai not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -Glenn G. Lai DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -Glenn G. Lai -P.O. Box 4314 -Austin, Tx 78765 -(glenn@cs.utexas.edu) -8/9/93 -******************************************************************************/ -/* $XConsortium: BUSmemcpy.s /main/4 1996/02/21 17:39:34 kaleb $ */ - -/* - * Modified to use long-alignment of video memory rather than word-alignment - * to improve performance for LocalBus video cards. Function names changed - * from ISAToMem and MemToISA to BusToMem and MemToBus. - * - * David Dawes , 25 August 1993. - */ - - -#include "assyntax.h" - - FILE("BUSmemcpy.s") - - AS_BEGIN - -/* BusToMem copies from video memory to main memory - MemToBus copies from main memory to video memory - - void xf86BusToMem(unsigned char *dst, unsigned char *src, int len); - void xf86MemToBus(unsigned char *dst, unsigned char *src, int len); -*/ - -#define dst REGOFF(4,ESP) -#define src REGOFF(8,ESP) -#define len REGOFF(12,ESP) - - GLOBL GLNAME(xf86BusToMem) - GLOBL GLNAME(xf86MemToBus) - - SEG_DATA -copyright: - STRING("Copyright 8/9/1993 by Glenn G. Lai") - - SEG_TEXT - ALIGNTEXT4 -GLNAME(xf86BusToMem): - CLD - PUSH_L (ESI) - MOV_L (EDI, EDX) - - MOV_L (src, ESI) - MOV_L (dst, EDI) - MOV_L (len, ECX) - - CMP_L (CONST(7), ECX) - JC (quickBM) - - TEST_L (CONST(1), ESI) - JZ (BwM) - - MOVS_B - DEC_L (ECX) - -BwM: - TEST_L (CONST(2), ESI) - JZ (BlM) - - MOVS_W - DEC_L (ECX) - DEC_L (ECX) - -BlM: - MOV_L (ECX, EAX) - AND_L (CONST(3), EAX) - SHR_L (CONST(2), ECX) - REP - MOVS_L - MOV_L (EAX, ECX) -quickBM: - OR_L (ECX, ECX) - JZ (return) - REP - MOVS_B -return: - POP_L (ESI) - MOV_L (EDX, EDI) - RET -/************************/ - - ALIGNTEXT4 -GLNAME(xf86MemToBus): - CLD - PUSH_L (ESI) - MOV_L (EDI, EDX) - - MOV_L (src, ESI) - MOV_L (dst, EDI) - MOV_L (len, ECX) - - CMP_L (CONST(7), ECX) - JC (quickMB) - - TEST_L (CONST(1), EDI) - JZ (MwB) - - MOVS_B - DEC_L (ECX) - -MwB: - TEST_L (CONST(2), EDI) - JZ (MlB) - - MOVS_W - DEC_L (ECX) - DEC_L (ECX) - -MlB: - MOV_L (ECX, EAX) - AND_L (CONST(3), EAX) - SHR_L (CONST(2), ECX) - REP - MOVS_L - MOV_L (EAX, ECX) -quickMB: - OR_L (ECX, ECX) - JZ (return) - REP - MOVS_B - - POP_L (ESI) - MOV_L (EDX, EDI) - RET - diff --git a/xorg-server/hw/xfree86/os-support/misc/BUSmemcpy.c b/xorg-server/hw/xfree86/os-support/misc/BUSmemcpy.c index b482b867a..0500bf6c1 100644 --- a/xorg-server/hw/xfree86/os-support/misc/BUSmemcpy.c +++ b/xorg-server/hw/xfree86/os-support/misc/BUSmemcpy.c @@ -26,233 +26,8 @@ Thanks to Linus Torvalds for contributing this code. #include "compiler.h" -/* - * The Jensen lacks dense memory, thus we have to address the bus via - * the sparse addressing scheme. These routines are only used in s3im.c - * Non time critical code uses SlowBCopy_{from/to} bus. - * - * Martin Ostermann (ost@comnets.rwth-aachen.de) - Apr.-Sep. 1996 - */ - -#ifdef TEST_JENSEN_CODE /* define to test the Sparse addressing on a non-Jensen */ -#define LWORD_CODING (0x18) -#define SPARSE (5) -#else #define LWORD_CODING (0x60) #define SPARSE (7) -#endif - -void -xf86JensenMemToBus(char *Base, long dst, long src, int count) -{ - if( ((long)src^((long)dst)) & 3) { - /* src & dst are NOT aligned to each other */ - unsigned long addr; - unsigned long low_word, high_word,last_read; - long rm,loop; - unsigned long tmp,org,org2,mask,src_org,count_org; - - src_org=src; - count_org=count; - - /* add EISA longword coding and round off*/ - addr = (long)(Base+(dst< 4 ) { - last_read = src_org+count_org - 1; - __asm__("ldq_u %0,%1" - :"=r" (high_word):"m" (*(unsigned long *)(src+4))); - __asm__("extll %1,%2,%0" - :"=r" (low_word) - :"r" (low_word), "r" ((unsigned long)(src))); - __asm__("extlh %1,%2,%0" - :"=r" (tmp) - :"r" (high_word), "r" ((unsigned long)(src))); - tmp |= low_word; - src += 4; - __asm__("mskqh %1,%2,%0" - :"=r" (tmp) - :"r" (tmp), "r" (rm)); - __asm__("mskql %1,%2,%0" - :"=r" (org2) - :"r" (org), "r" (rm)); - tmp |= org2; - - loop = (count-4) >> 2; /* loop eqv. count>=4 ; count -= 4 */ - while (loop) { - /* tmp to be stored completly -- need to read next word*/ - low_word = high_word; - *(volatile unsigned int *) (addr) = tmp; - __asm__("ldq_u %0,%1" - :"=r" (high_word):"m" (*(unsigned long*)(src+4))); - loop --; - __asm__("extll %1,%2,%0" - :"=r" (low_word) - :"r" (low_word), "r" ((unsigned long)src)); - __asm__("extlh %1,%2,%0" - :"=r" (tmp) - :"r" (high_word), "r" ((unsigned long)src)); - src += 4; - tmp |= low_word; - addr += 4< 4 */ - __asm__("ldq_u %0,%1" - :"=r" (high_word):"m" (*(unsigned long *)(src+4))); - __asm__("extll %1,%2,%0" - :"=r" (low_word) - :"r" (low_word), "r" ((unsigned long)(src))); - __asm__("extlh %1,%2,%0" - :"=r" (tmp) - :"r" (high_word), "r" ((unsigned long)(src))); - tmp |= low_word; - if( count < 4 ) { - - mask = -1; - __asm__("mskqh %1,%2,%0" - :"=r" (mask) - :"r" (mask), "r" (rm)); - __asm__("mskql %1,%2,%0" - :"=r" (mask) - :"r" (mask), "r" (count)); - tmp = (tmp & mask) | (org & ~mask); - *(volatile unsigned int *) (addr) = tmp; - return; - } else { - __asm__("mskqh %1,%2,%0" - :"=r" (tmp) - :"r" (tmp), "r" (rm)); - __asm__("mskql %1,%2,%0" - :"=r" (org2) - :"r" (org), "r" (rm)); - - tmp |= org2; - *(volatile unsigned int *) (addr) = tmp; - return; - } - } - } else { /* src & dst are aligned to each other */ - unsigned long addr; - unsigned int tmp,org,rm; - unsigned int *src_r; - - /* add EISA longword coding and round off*/ - addr = (long)(Base+(dst< 4) { - *(volatile unsigned int *) addr = tmp; - addr += 4<>= ((addr>>SPARSE) & 3) * 8; - *dst++ = (char) result; - addr += 1<= 0){ - int i; - - result = *(volatile int *) (addr+LWORD_CODING); - for(i=4;i--;) { - *dst++ = (char) result; - result >>= 8; - } - addr += 4<>= ((addr>>SPARSE) & 3) * 8; - *dst++ = (char) result; - addr += 1< -#endif - -#include -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" - -/* - * All we really need is a delay of about 40ns for I/O recovery for just - * about any occasion, but we'll be more conservative here: On a - * 100-MHz CPU, produce at least a delay of 1,000ns. - */ -_X_EXPORT void -xf86IODelay() -{ - xf86UDelay(1); -} - diff --git a/xorg-server/hw/xfree86/os-support/misc/Makefile.am b/xorg-server/hw/xfree86/os-support/misc/Makefile.am index 65fbe92b4..3d4b8ff0e 100644 --- a/xorg-server/hw/xfree86/os-support/misc/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/misc/Makefile.am @@ -1,18 +1,7 @@ -# FIXME: Add the *.S files to build when applicable -I386_SRCS = BUSmemcpy.S IODelay.S SlowBcopy.S -OTHER_SRCS = BUSmemcpy.c IODelay.c SlowBcopy.c - -ARCH_SRCS = $(OTHER_SRCS) - -# FIXME: Add to the build (NeedPortIO) -PORTIO_SRCS = PortIO.S - -# FIXME: Add to the build (if HasGcc || HasGcc2) -ILHACK_SRCS = xf86_IlHack.c noinst_LTLIBRARIES = libmisc.la -libmisc_la_SOURCES = xf86_Util.c Delay.c $(ARCH_SRCS) +libmisc_la_SOURCES = Delay.c BUSmemcpy.c SlowBcopy.c #AM_LDFLAGS = -r @@ -20,4 +9,4 @@ INCLUDES = $(XORG_INCS) AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) -EXTRA_DIST = $(I386_SRCS) $(PORTIO_SRCS) $(ILHACK_SRCS) +EXTRA_DIST = $(I386_SRCS) $(PORTIO_SRCS) diff --git a/xorg-server/hw/xfree86/os-support/misc/Makefile.in b/xorg-server/hw/xfree86/os-support/misc/Makefile.in index 19a94d7cc..a641ebf57 100644 --- a/xorg-server/hw/xfree86/os-support/misc/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/misc/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,7 +43,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -51,18 +50,13 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmisc_la_LIBADD = -am__objects_1 = BUSmemcpy.lo IODelay.lo SlowBcopy.lo -am__objects_2 = $(am__objects_1) -am_libmisc_la_OBJECTS = xf86_Util.lo Delay.lo $(am__objects_2) +am_libmisc_la_OBJECTS = Delay.lo BUSmemcpy.lo SlowBcopy.lo libmisc_la_OBJECTS = $(am_libmisc_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -77,8 +71,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -99,10 +94,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -124,6 +115,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -133,18 +125,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -163,7 +152,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -177,7 +166,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -189,8 +181,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -199,8 +190,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -233,7 +224,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -243,27 +233,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -274,10 +249,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -286,13 +257,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -325,8 +291,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -346,7 +311,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -356,12 +320,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -379,26 +343,13 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ - -# FIXME: Add the *.S files to build when applicable -I386_SRCS = BUSmemcpy.S IODelay.S SlowBcopy.S -OTHER_SRCS = BUSmemcpy.c IODelay.c SlowBcopy.c -ARCH_SRCS = $(OTHER_SRCS) - -# FIXME: Add to the build (NeedPortIO) -PORTIO_SRCS = PortIO.S - -# FIXME: Add to the build (if HasGcc || HasGcc2) -ILHACK_SRCS = xf86_IlHack.c noinst_LTLIBRARIES = libmisc.la -libmisc_la_SOURCES = xf86_Util.c Delay.c $(ARCH_SRCS) +libmisc_la_SOURCES = Delay.c BUSmemcpy.c SlowBcopy.c #AM_LDFLAGS = -r INCLUDES = $(XORG_INCS) AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) -EXTRA_DIST = $(I386_SRCS) $(PORTIO_SRCS) $(ILHACK_SRCS) +EXTRA_DIST = $(I386_SRCS) $(PORTIO_SRCS) all: all-am .SUFFIXES: @@ -407,8 +358,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -452,9 +403,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BUSmemcpy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Delay.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IODelay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SlowBcopy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86_Util.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -488,7 +437,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/os-support/misc/PortIO.S b/xorg-server/hw/xfree86/os-support/misc/PortIO.S deleted file mode 100644 index 75db31156..000000000 --- a/xorg-server/hw/xfree86/os-support/misc/PortIO.S +++ /dev/null @@ -1,57 +0,0 @@ -/* $XFree86$ */ - -/* Port I/O functions for platforms with no inlining. */ - -#include "assyntax.h" - - FILE("PortIO.s") - - AS_BEGIN - - GLOBL GLNAME(outb) - GLOBL GLNAME(outw) - GLOBL GLNAME(outl) - GLOBL GLNAME(inb) - GLOBL GLNAME(inw) - GLOBL GLNAME(inl) - - SEG_TEXT - ALIGNTEXT4 -GLNAME(outb): - MOV_L (REGOFF(4,ESP), EDX) - MOV_L (REGOFF(8,ESP), EAX) - OUT_B - RET - - ALIGNTEXT4 -GLNAME(outw): - MOV_L (REGOFF(4,ESP), EDX) - MOV_L (REGOFF(8,ESP), EAX) - OUT_W - RET - - ALIGNTEXT4 -GLNAME(outl): - MOV_L (REGOFF(4,ESP), EDX) - MOV_L (REGOFF(8,ESP), EAX) - OUT_L - RET - - ALIGNTEXT4 -GLNAME(inb): - MOV_L (REGOFF(4,ESP), EDX) - IN_B - RET - - ALIGNTEXT4 -GLNAME(inw): - MOV_L (REGOFF(4,ESP), EDX) - IN_L - RET - - ALIGNTEXT4 -GLNAME(inl): - MOV_L (REGOFF(4,ESP), EDX) - IN_L - RET - diff --git a/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.S b/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.S deleted file mode 100644 index 9b6af1d69..000000000 --- a/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.S +++ /dev/null @@ -1,108 +0,0 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/misc/SlowBcopy.S,v 1.1 1999/07/10 07:24:51 dawes Exp $ */ -/******************************************************************************* - Copyright 1994 by Glenn G. Lai - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyr notice appear in all copies and that -both that copyr notice and this permission notice appear in -supporting documentation, and that the name of Glenn G. Lai not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -Glenn G. Lai DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -Glenn G. Lai -P.O. Box 4314 -Austin, Tx 78765 -glenn@cs.utexas.edu) -7/21/94 -*******************************************************************************/ -/* $XConsortium: SlowBcopy.s /main/4 1996/02/21 17:40:52 kaleb $ */ - -/* - * Modified from the output generated by GCC - * - * Create a dependency that should be immune from the effect of register - * renaming as is commonly seen in superscalar processors. This should - * insert a minimum of 100-ns delays between reads/writes at clock rates - * up to 100 MHz---GGL - * - * Slowbcopy(char *src, char *dst, int count) - * - */ - -#include "assyntax.h" - - FILE("SlowBcopy.s") - - AS_BEGIN - -gcc2_compiled.: -___gnu_compiled_c: - - GLOBL GLNAME(xf86SlowBcopy) - - SEG_TEXT - ALIGNTEXT4 -GLNAME(xf86SlowBcopy): - PUSH_L (EBP) - MOV_L (ESP,EBP) - PUSH_L (ESI) - PUSH_L (EBX) - MOV_L (REGOFF(8,EBP),ECX) - MOV_L (REGOFF(12,EBP),EDX) - MOV_L (REGOFF(16,EBP),ESI) - XOR_L (EAX,EAX) - CMP_L (ESI,EAX) - JGE (L3) - - ALIGNTEXT4 -L5: - MOV_B (REGIND(ECX),BL) - - MOV_B (BL, BH) - MOV_B (BH, BL) - MOV_B (BL, BH) - MOV_B (BH, BL) - MOV_B (BL, BH) - MOV_B (BH, BL) - MOV_B (BL, BH) - MOV_B (BH, BL) - MOV_B (BL, BH) - MOV_B (BH, BL) - - MOV_B (BL,REGIND(EDX)) - - INC_L (ECX) - DEC_L (ECX) - INC_L (ECX) - DEC_L (ECX) - INC_L (ECX) - DEC_L (ECX) - INC_L (ECX) - DEC_L (ECX) - INC_L (ECX) - DEC_L (ECX) - - INC_L (ECX) - INC_L (EDX) - INC_L (EAX) - CMP_L (ESI,EAX) - JL (L5) -L3: - LEA_L (REGOFF(-8,EBP),ESP) - POP_L (EBX) - POP_L (ESI) - MOV_L (EBP,ESP) - POP_L (EBP) - RET - diff --git a/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c b/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c index 5cd716823..be69b9dd1 100644 --- a/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c +++ b/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c @@ -30,7 +30,7 @@ xf86SetReallySlowBcopy(void) really_slow_bcopy = 1; } -#if defined(__i386__) || defined(__x86_64__) +#if defined(__i386__) || defined(__amd64__) static void xf86_really_slow_bcopy(unsigned char *src, unsigned char *dst, int len) { while(len--) @@ -45,7 +45,7 @@ static void xf86_really_slow_bcopy(unsigned char *src, unsigned char *dst, int l _X_EXPORT void xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len) { -#if defined(__i386__) || defined(__x86_64__) +#if defined(__i386__) || defined(__amd64__) if (really_slow_bcopy) { xf86_really_slow_bcopy(src, dst, len); return; @@ -56,29 +56,13 @@ xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len) } #ifdef __alpha__ -/* - * The Jensen lacks dense memory, thus we have to address the bus via - * the sparse addressing scheme. Time critical code uses routines from - * BUSmemcpy.c - * - * Martin Ostermann (ost@comnets.rwth-aachen.de) - Apr.-Sep. 1996 - */ #ifdef linux -unsigned long _bus_base(void); - -#ifdef TEST_JENSEN_CODE /* define to test the Sparse addressing on a non-Jensen */ -#define SPARSE (5) -#else #define SPARSE (7) -#endif - -#define isJensen() (!_bus_base()) #else -#define isJensen() 0 #define SPARSE 0 #endif @@ -86,42 +70,32 @@ unsigned long _bus_base(void); _X_EXPORT void xf86SlowBCopyFromBus(unsigned char *src, unsigned char *dst, int count) { - if (isJensen()) - { - unsigned long addr; - long result; - - addr = (unsigned long) src; - while( count ){ - result = *(volatile int *) addr; - result >>= ((addr>>SPARSE) & 3) * 8; - *dst++ = (unsigned char) (0xffUL & result); - addr += 1<>= ((addr>>SPARSE) & 3) * 8; + *dst++ = (unsigned char) (0xffUL & result); + addr += 1< -#endif - -#include "compiler.h" diff --git a/xorg-server/hw/xfree86/os-support/misc/xf86_Util.c b/xorg-server/hw/xfree86/os-support/misc/xf86_Util.c deleted file mode 100644 index 9e690591d..000000000 --- a/xorg-server/hw/xfree86/os-support/misc/xf86_Util.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 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. - * - */ - -/* - * This file is for utility functions that will be shared by other pieces - * of the system. Putting things here ensure that all the linking order - * dependencies are dealt with, as this library will be linked in last. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include - -/* To prevent empty source file warnings */ -int _xf86misc; - -#if 0 -/* For use only with gcc */ -#ifdef __GNUC__ - -#include "os.h" - -char * -debug_alloca(char *file, int line, int size) -{ - char *ptr; - - ptr = Xalloc(size); - ErrorF("Alloc: %s line %d; ptr = 0x%x, length = %d\n", file, line, - ptr, size); - return ptr; -} - -void -debug_dealloca(char *file, int line, char *ptr) -{ - ErrorF("Dealloc: %s line %d; ptr = 0x%x\n", file, line, ptr); - Xfree(ptr); -} -#endif -#endif - -#if defined(ISC) || defined(Lynx) - -#include - -/* Needed for apm_driver.c */ -/* These functions are modeled after the functions inside gnu's libc */ - -static double -copysign(double x, double y) -{ - x = fabs(x); - return y < 0 ? - x : x; -} - -double -RInt(double x) -{ - double s,t; - const double one = 1.0; - const static double L = 4503599627370496.0E0; - - if (x!=x) - return(x); - if (copysign(x,one) >= L) - return(x); - s = copysign(L,x); - t = x + s; - return (t - s); -} -#endif diff --git a/xorg-server/hw/xfree86/os-support/sco/Makefile.am b/xorg-server/hw/xfree86/os-support/sco/Makefile.am index 9cb5011fb..b5d40f7a5 100644 --- a/xorg-server/hw/xfree86/os-support/sco/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/sco/Makefile.am @@ -2,5 +2,4 @@ EXTRA_DIST = \ VTsw_sco.c \ sco_init.c \ sco_iop.c \ - sco_mouse.c \ sco_video.c diff --git a/xorg-server/hw/xfree86/os-support/sco/Makefile.in b/xorg-server/hw/xfree86/os-support/sco/Makefile.in index a417e9a94..a5156c488 100644 --- a/xorg-server/hw/xfree86/os-support/sco/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/sco/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -42,7 +42,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -56,8 +55,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -78,10 +78,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -103,6 +99,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -112,18 +109,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -142,7 +136,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -156,7 +150,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -168,8 +165,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -178,8 +174,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -212,7 +208,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -222,27 +217,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -253,10 +233,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -265,13 +241,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -304,8 +275,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -325,7 +295,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -335,12 +304,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -358,13 +327,10 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ EXTRA_DIST = \ VTsw_sco.c \ sco_init.c \ sco_iop.c \ - sco_mouse.c \ sco_video.c all: all-am @@ -374,8 +340,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ diff --git a/xorg-server/hw/xfree86/os-support/sco/sco_iop.c b/xorg-server/hw/xfree86/os-support/sco/sco_iop.c index bb8d06d2e..86210d71a 100644 --- a/xorg-server/hw/xfree86/os-support/sco/sco_iop.c +++ b/xorg-server/hw/xfree86/os-support/sco/sco_iop.c @@ -88,47 +88,3 @@ xf86DisableIO(void) sysi86(SI86V86, V86SC_IOPL, 0); IOEnabled = FALSE; } - -/***************************************************************************/ -/* Interrupt Handling section */ -/***************************************************************************/ - -_X_EXPORT Bool -xf86DisableInterrupts(void) -{ - if (!IOEnabled) { - if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0) - return FALSE; - } - -#ifdef __GNUC__ - __asm__ __volatile__("cli"); -#else - asm("cli"); -#endif /* __GNUC__ */ - - if (!IOEnabled) { - sysi86(SI86V86, V86SC_IOPL, PS_IOPL); - } - - return(TRUE); -} - -_X_EXPORT void -xf86EnableInterrupts(void) -{ - if (!IOEnabled) { - if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0) - return; - } - -#ifdef __GNUC__ - __asm__ __volatile__("sti"); -#else - asm("sti"); -#endif /* __GNUC__ */ - - if (!IOEnabled) { - sysi86(SI86V86, V86SC_IOPL, PS_IOPL); - } -} diff --git a/xorg-server/hw/xfree86/os-support/sco/sco_mouse.c b/xorg-server/hw/xfree86/os-support/sco/sco_mouse.c deleted file mode 100644 index af57cdedf..000000000 --- a/xorg-server/hw/xfree86/os-support/sco/sco_mouse.c +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright 2001 by J. Kean Johnston - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name J. Kean Johnston not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. J. Kean Johnston makes no - * representations about the suitability of this software for any purpose. - * It is provided "as is" without express or implied warranty. - * - * J. KEAN JOHNSTON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL J. KEAN JOHNSTON BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF - * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include "compiler.h" - -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" -#include "xf86Xinput.h" -#include "xf86OSmouse.h" -#include "mipointer.h" -#include -#include - -static int -SupportedInterfaces (void) -{ - return MSE_MISC; -} - -static const char *internalNames[] = { - "OSMouse", - NULL -}; - -static const char ** -BuiltinNames (void) -{ - return internalNames; -} - -static Bool -CheckProtocol (const char *protocol) -{ - int i; - - for (i = 0; internalNames[i]; i++) { - if (xf86NameCmp (protocol, internalNames[i]) == 0) - return TRUE; - } - - return FALSE; -} - -static const char * -DefaultProtocol (void) -{ - return "OSMouse"; -} - -static const char * -evtErrStr (int evterr) -{ - switch (evterr) { - case -1: return "error in config files"; - case -2: return "no mouse devices to attach"; - case -3: return "unable to open device"; - case -4: return "unable to open event queue"; - case -999: return "unable to initialize event driver"; - default: return "unknown event driver error"; - } -} - -static int -OsMouseProc (DeviceIntPtr pPointer, int what) -{ - InputInfoPtr pInfo; - MouseDevPtr pMse; - unsigned char map[9]; - dmask_t dmask; - MessageType from = X_CONFIG; - int evi; - - pInfo = pPointer->public.devicePrivate; - pMse = pInfo->private; - pMse->device = pPointer; - - switch (what) { - case DEVICE_INIT: - pPointer->public.on = FALSE; - - dmask = D_ABS | D_REL | D_BUTTON; - if ((evi = ev_initf(xf86Info.consoleFd)) < 0) { - FatalError ("OsMouseProc: Event driver initialization failed (%s)\n", - evtErrStr(evi)); - } - pInfo->fd = ev_open (&dmask); - if (pInfo->fd < 0) { - FatalError ("OsMouseProc: DEVICE_INIT failed (%s)\n", evtErrStr(pInfo->fd)); - } - - pMse->buttons = xf86SetIntOption (pInfo->options, "Buttons", 0); - if (pMse->buttons == 0) { - pMse->buttons = 8; - from = X_DEFAULT; - } - xf86Msg (from, "%s: Buttons: %d\n", pInfo->name, pMse->buttons); - - for (evi = 0; evi <= 8; evi++) - map[evi] = evi; - - InitPointerDeviceStruct((DevicePtr)pPointer, map, 8, - miPointerGetMotionEvents, pMse->Ctrl, - miPointerGetMotionBufferSize()); - - /* X valuator */ - xf86InitValuatorAxisStruct(pPointer, 0, 0, -1, 1, 0, 1); - xf86InitValuatorDefaults(pPointer, 0); - - /* Y valuator */ - xf86InitValuatorAxisStruct(pPointer, 1, 0, -1, 1, 0, 1); - xf86InitValuatorDefaults(pPointer, 1); - - xf86MotionHistoryAllocate(pInfo); - - ev_flush(); - ev_suspend(); - break; - - case DEVICE_ON: - pMse->lastButtons = 0; - pMse->lastMappedButtons = 0; - pMse->emulateState = 0; - pPointer->public.on = TRUE; - ev_resume(); - AddEnabledDevice (pInfo->fd); - break; - - case DEVICE_OFF: - case DEVICE_CLOSE: - pPointer->public.on = FALSE; - RemoveEnabledDevice (pInfo->fd); - if (what == DEVICE_CLOSE) { - ev_close(); - pInfo->fd = -1; - } else { - ev_suspend(); - } - break; - } - - return Success; -} - -static void -OsMouseReadInput (InputInfoPtr pInfo) -{ - MouseDevPtr pMse; - EVENT *evp; - - pMse = pInfo->private; - - while ((evp = ev_read()) != (EVENT *)0) { - int buttons = EV_BUTTONS(*evp); - int dx = EV_DX(*evp), dy = -(EV_DY(*evp)), dz = 0; - - if (buttons & WHEEL_FWD) - dz = -1; - else if (buttons & WHEEL_BACK) - dz = 1; - - buttons &= ~(WHEEL_FWD | WHEEL_BACK); - - pMse->PostEvent (pInfo, buttons, dx, dy, dz, 0); - ev_pop(); - } -} - -static Bool -OsMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags) -{ - MouseDevPtr pMse; - - /* This is called when the protocol is "OSMouse". */ - - pMse = pInfo->private; - pMse->protocol = protocol; - xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol); - - /* Collect the options, and process the common options. */ - xf86CollectInputOptions(pInfo, NULL, NULL); - xf86ProcessCommonOptions(pInfo, pInfo->options); - - /* Check if the device can be opened. */ - pInfo->fd = ev_initf(xf86Info.consoleFd); - if (pInfo->fd != -1) { - dmask_t dmask = (D_ABS | D_REL | D_BUTTON); - pInfo->fd = ev_open(&dmask); - } else { - pInfo->fd = -999; - } - - if (pInfo->fd < 0) { - if (xf86GetAllowMouseOpenFail()) - xf86Msg(X_WARNING, "%s: cannot open event manager (%s)\n", - pInfo->name, evtErrStr(pInfo->fd)); - else { - xf86Msg(X_ERROR, "%s: cannot open event manager (%s)\n", - pInfo->name, evtErrStr(pInfo->fd)); - xfree(pMse); - return FALSE; - } - } - ev_close(); - pInfo->fd = -1; - - /* Process common mouse options (like Emulate3Buttons, etc). */ - pMse->CommonOptions(pInfo); - - /* Setup the local procs. */ - pInfo->device_control = OsMouseProc; - pInfo->read_input = OsMouseReadInput; - - pInfo->flags |= XI86_CONFIGURED; - return TRUE; -} - -_X_EXPORT OSMouseInfoPtr -xf86OSMouseInit (int flags) -{ - OSMouseInfoPtr p; - - p = xcalloc(sizeof(OSMouseInfoRec), 1); - if (!p) - return NULL; - - p->SupportedInterfaces = SupportedInterfaces; - p->BuiltinNames = BuiltinNames; - p->DefaultProtocol = DefaultProtocol; - p->CheckProtocol = CheckProtocol; - p->PreInit = OsMousePreInit; - - return p; -} diff --git a/xorg-server/hw/xfree86/os-support/shared/bios_mmap.c b/xorg-server/hw/xfree86/os-support/shared/bios_mmap.c index 8bac87ebe..0c368e713 100644 --- a/xorg-server/hw/xfree86/os-support/shared/bios_mmap.c +++ b/xorg-server/hw/xfree86/os-support/shared/bios_mmap.c @@ -91,33 +91,15 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, * re: boundaries and sizes and such... */ -/* - * The Jensen lacks dense memory, thus we have to address the bus via - * the sparse addressing scheme. - * - * Martin Ostermann (ost@comnets.rwth-aachen.de) - Apr.-Sep. 1996 - */ - #ifdef linux -#ifdef TEST_JENSEN_CODE /* define to test the Sparse addressing on a non-Jensen */ -#define SPARSE (5) -#define isJensen (1) -#else -#define isJensen (!_bus_base()) -#define SPARSE (7) -#endif - extern unsigned long _bus_base(void); -extern unsigned long _bus_base_sparse(void); -#define BUS_BASE (isJensen ? _bus_base_sparse() : _bus_base()) -#define JENSEN_SHIFT(x) (isJensen ? ((long)x< $@ noinst_LTLIBRARIES = libsolaris.la -libsolaris_la_SOURCES = sun_bios.c sun_init.c \ - sun_mouse.c sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \ +libsolaris_la_SOURCES = sun_init.c \ + sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \ $(srcdir)/../shared/kmod_noop.c \ $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/sigiostubs.c \ $(srcdir)/../shared/stdResource.c \ + $(srcdir)/../shared/vidmem.c \ $(VTSW_SRC) nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC) diff --git a/xorg-server/hw/xfree86/os-support/solaris/Makefile.in b/xorg-server/hw/xfree86/os-support/solaris/Makefile.in index cf4e440c8..f248e41d2 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/solaris/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,7 +45,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -53,20 +52,18 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libsolaris_la_LIBADD = -am__libsolaris_la_SOURCES_DIST = sun_bios.c sun_init.c sun_mouse.c \ - sun_vid.c sun_bell.c sun_agp.c sun_apm.c \ - $(srcdir)/../shared/kmod_noop.c \ +am__libsolaris_la_SOURCES_DIST = sun_init.c sun_vid.c sun_bell.c \ + sun_agp.c sun_apm.c $(srcdir)/../shared/kmod_noop.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/sigiostubs.c \ - $(srcdir)/../shared/stdResource.c \ + $(srcdir)/../shared/stdResource.c $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/VTsw_noop.c $(srcdir)/../shared/VTsw_usl.c am__objects_1 = sun_agp.lo @SOLARIS_USL_CONSOLE_FALSE@am__objects_2 = VTsw_noop.lo @SOLARIS_USL_CONSOLE_TRUE@am__objects_2 = VTsw_usl.lo -am_libsolaris_la_OBJECTS = sun_bios.lo sun_init.lo sun_mouse.lo \ - sun_vid.lo sun_bell.lo $(am__objects_1) sun_apm.lo \ - kmod_noop.lo posix_tty.lo sigiostubs.lo stdResource.lo \ - $(am__objects_2) +am_libsolaris_la_OBJECTS = sun_init.lo sun_vid.lo sun_bell.lo \ + $(am__objects_1) sun_apm.lo kmod_noop.lo posix_tty.lo \ + sigiostubs.lo stdResource.lo vidmem.lo $(am__objects_2) am__objects_3 = solaris-@SOLARIS_INOUT_ARCH@.lo nodist_libsolaris_la_OBJECTS = $(am__objects_3) libsolaris_la_OBJECTS = $(am_libsolaris_la_OBJECTS) \ @@ -81,9 +78,6 @@ LTCPPASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -108,8 +102,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -130,10 +125,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -155,6 +146,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -164,18 +156,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -194,7 +183,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -208,7 +197,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -220,8 +212,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -230,8 +221,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -264,7 +255,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -274,27 +264,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -305,10 +280,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -317,13 +288,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -356,8 +322,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -377,7 +342,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -387,12 +351,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -410,8 +374,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ @SOLARIS_USL_CONSOLE_FALSE@VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c @SOLARIS_USL_CONSOLE_TRUE@VTSW_SRC = $(srcdir)/../shared/VTsw_usl.c @@ -424,11 +386,12 @@ AGP_SRC = sun_agp.c SOLARIS_INOUT_SRC = solaris-@SOLARIS_INOUT_ARCH@.S DISTCLEANFILES = solaris-@SOLARIS_INOUT_ARCH@.il noinst_LTLIBRARIES = libsolaris.la -libsolaris_la_SOURCES = sun_bios.c sun_init.c \ - sun_mouse.c sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \ +libsolaris_la_SOURCES = sun_init.c \ + sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \ $(srcdir)/../shared/kmod_noop.c \ $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/sigiostubs.c \ $(srcdir)/../shared/stdResource.c \ + $(srcdir)/../shared/vidmem.c \ $(VTSW_SRC) nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC) @@ -447,8 +410,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -500,10 +463,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_agp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_apm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_bell.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_bios.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_init.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_mouse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_vid.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vidmem.Plo@am__quote@ .S.o: @am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -575,6 +537,13 @@ stdResource.lo: $(srcdir)/../shared/stdResource.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdResource.lo `test -f '$(srcdir)/../shared/stdResource.c' || echo '$(srcdir)/'`$(srcdir)/../shared/stdResource.c +vidmem.lo: $(srcdir)/../shared/vidmem.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vidmem.lo -MD -MP -MF $(DEPDIR)/vidmem.Tpo -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/vidmem.Tpo $(DEPDIR)/vidmem.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/vidmem.c' object='vidmem.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c + VTsw_noop.lo: $(srcdir)/../shared/VTsw_noop.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VTsw_noop.lo -MD -MP -MF $(DEPDIR)/VTsw_noop.Tpo -c -o VTsw_noop.lo `test -f '$(srcdir)/../shared/VTsw_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_noop.c @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/VTsw_noop.Tpo $(DEPDIR)/VTsw_noop.Plo @@ -634,7 +603,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_bios.c b/xorg-server/hw/xfree86/os-support/solaris/sun_bios.c deleted file mode 100644 index a27a5a5a7..000000000 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_bios.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany - * Copyright 1993 by David Wexelblat - * Copyright 1999 by David Holland - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting documentation, and - * that the names of the copyright holders not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. The copyright holders make no representations - * about the suitability of this software for any purpose. It is provided "as - * is" without express or implied warranty. - * - * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT - * SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#if defined(__i386__) || defined(__i386) -#define _NEED_SYSI86 -#endif -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" - -#ifndef MAP_FAILED -#define MAP_FAILED ((void *)-1) -#endif - -extern char *apertureDevName; - -/* - * Read BIOS via mmap()ing physical memory. - */ -_X_EXPORT int -xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, - int Len) -{ - int fd; - unsigned char *ptr; - char solx86_vtname[20]; - int psize; - int mlen; - - /* - * Solaris 2.1 x86 SVR4 (10/27/93) - * The server must treat the virtual terminal device file - * as the standard SVR4 /dev/pmem. By default, then used VT - * is considered the "default" file to open. - * - * Solaris 2.8 x86 (7/26/99) - DWH - * - * Use /dev/xsvc for everything. - */ - psize = getpagesize(); - Offset += Base & (psize - 1); - Base &= ~(psize - 1); - mlen = (Offset + Len + psize - 1) & ~(psize - 1); -#if (defined(__i386__) || defined(__i386)) && !defined(__SOL8__) - if (Base >= 0xA0000 && Base + mlen < 0xFFFFF && xf86Info.vtno >= 0) - sprintf(solx86_vtname, "/dev/vt%02d", xf86Info.vtno); - else -#endif - { - if (!xf86LinearVidMem()) - FatalError("xf86ReadBIOS: Could not mmap BIOS" - " [a=%lx]\n", Base); - sprintf(solx86_vtname, apertureDevName); - } - - if ((fd = open(solx86_vtname, O_RDONLY)) < 0) - { - xf86Msg(X_WARNING, "xf86ReadBIOS: Failed to open %s (%s)\n", - solx86_vtname, strerror(errno)); - return(-1); - } - ptr = (unsigned char *)mmap((caddr_t)0, mlen, PROT_READ, - MAP_SHARED, fd, (off_t)Base); - if (ptr == MAP_FAILED) - { - xf86Msg(X_WARNING, "xf86ReadBIOS: %s mmap failed " - "[0x%08lx, 0x%04x]\n", - solx86_vtname, Base, mlen); - close(fd); - return -1; - } - - (void)memcpy(Buf, (void *)(ptr + Offset), Len); - (void)munmap((caddr_t)ptr, mlen); - (void)close(fd); - - return Len; -} diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_init.c b/xorg-server/hw/xfree86/os-support/solaris/sun_init.c index 1f389cb40..795b0c13c 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_init.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_init.c @@ -29,7 +29,7 @@ #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" -#if defined(__i386__) || defined(__i386) || defined(__x86) +#ifdef HAVE_SYS_KD_H # include #endif @@ -49,8 +49,9 @@ static char fb_dev[PATH_MAX] = "/dev/console"; void xf86OpenConsole(void) { + int i; #ifdef HAS_USL_VTS - int fd, i; + int fd; struct vt_mode VT; struct vt_stat vtinfo; int FreeVTslot; @@ -173,9 +174,14 @@ xf86OpenConsole(void) if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0) FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n"); #endif + #ifdef KDSETMODE - if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0) - FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed\n"); + SYSCALL(i = ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS)); + if (i < 0) { + xf86Msg(X_WARNING, + "xf86OpenConsole: KDSETMODE KD_GRAPHICS failed on %s (%s)\n", + fb_dev, strerror(errno)); + } #endif } else /* serverGeneration != 1 */ @@ -244,8 +250,8 @@ xf86CloseConsole(void) "xf86CloseConsole(): unable to mmap framebuffer" " (%s)\n", strerror(errno)); } else { - (void)memset(fbdata, 0, fbattr.fbtype.fb_size); - (void)munmap(fbdata, fbattr.fbtype.fb_size); + memset(fbdata, 0, fbattr.fbtype.fb_size); + munmap(fbdata, fbattr.fbtype.fb_size); } } @@ -257,7 +263,7 @@ xf86CloseConsole(void) #ifdef KDSETMODE /* Reset the display back to text mode */ - ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT); + SYSCALL(ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT)); #endif #ifdef HAS_USL_VTS @@ -329,8 +335,6 @@ xf86ProcessArgument(int argc, char **argv, int i) #endif /* HAS_USL_VTS */ -#if defined(__SOL8__) || (!defined(__i386__) && !defined(__i386)) - if ((i + 1) < argc) { if (!strcmp(argv[i], "-dev")) { strncpy(fb_dev, argv[i+1], PATH_MAX); @@ -339,8 +343,6 @@ xf86ProcessArgument(int argc, char **argv, int i) } } -#endif - return 0; } @@ -349,9 +351,7 @@ void xf86UseMsg() #ifdef HAS_USL_VTS ErrorF("vtXX Use the specified VT number\n"); #endif -#if defined(__SOL8__) || !defined(__i386__) ErrorF("-dev Framebuffer device\n"); -#endif ErrorF("-keeptty Don't detach controlling tty\n"); ErrorF(" (for debugging only)\n"); } diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_mouse.c b/xorg-server/hw/xfree86/os-support/solaris/sun_mouse.c deleted file mode 100644 index a5955ef2c..000000000 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_mouse.c +++ /dev/null @@ -1,717 +0,0 @@ -/* - * Copyright 1999-2001 The XFree86 Project, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the XFree86 Project shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from the - * XFree86 Project. - */ -/* Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, and/or sell copies of the Software, and to permit persons - * to whom the Software is furnished to do so, provided that the above - * copyright notice(s) and this permission notice appear in all copies of - * the Software and that both the above copyright notice(s) and this - * permission notice appear in supporting documentation. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT - * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR - * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL - * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING - * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION - * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Except as contained in this notice, the name of a copyright holder - * shall not be used in advertising or otherwise to promote the sale, use - * or other dealings in this Software without prior written authorization - * of the copyright holder. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf86.h" -#include "xf86_OSlib.h" -#include "xf86OSmouse.h" - -#if defined(__SOL8__) || !defined(__i386) - -#include "xisb.h" -#include "mipointer.h" -#include -#include -#include - -/* Wheel mouse support in VUID drivers in Solaris 9 updates & Solaris 10 */ -#ifdef WHEEL_DEVID /* Defined in vuid_event.h if VUID wheel support present */ -# define HAVE_VUID_WHEEL -#endif -#ifdef HAVE_VUID_WHEEL -# include -#endif - -/* Support for scaling absolute coordinates to screen size in - * Solaris 10 updates and beyond */ -#if !defined(HAVE_ABSOLUTE_MOUSE_SCALING) -# ifdef MSIOSRESOLUTION /* Defined in msio.h if scaling support present */ -# define HAVE_ABSOLUTE_MOUSE_SCALING -# endif -#endif - -/* Names of protocols that are handled internally here. */ - -static const char *internalNames[] = { - "VUID", - NULL -}; - -static const char *solarisMouseDevs[] = { - /* Device file: Protocol: */ - "/dev/mouse", "VUID", /* USB or SPARC */ -#if defined(__i386) || defined(__x86) - "/dev/kdmouse", "PS/2", /* PS/2 */ -#endif - NULL -}; - -typedef struct _VuidMseRec { - struct _VuidMseRec *next; - InputInfoPtr pInfo; - Firm_event event; - unsigned char * buffer; - char * strmod; - Bool(*wrapped_device_control)(DeviceIntPtr device, int what); -#ifdef HAVE_ABSOLUTE_MOUSE_SCALING - Ms_screen_resolution absres; -#endif -} VuidMseRec, *VuidMsePtr; - -static VuidMsePtr vuidMouseList = NULL; - -static int vuidMouseProc(DeviceIntPtr pPointer, int what); -static void vuidReadInput(InputInfoPtr pInfo); - -#ifdef HAVE_ABSOLUTE_MOUSE_SCALING -static void vuidMouseSendScreenSize(ScreenPtr pScreen, VuidMsePtr pVuidMse); -static void vuidMouseAdjustFrame(int index, int x, int y, int flags); - -static int vuidMouseGeneration = 0; -static DevPrivateKey vuidMouseScreenKey = &vuidMouseScreenKey; -#define vuidMouseGetScreenPrivate(s) ( \ - dixLookupPrivate(&(s)->devPrivates, vuidMouseScreenKey)) -#define vuidMouseSetScreenPrivate(s,p) \ - dixSetPrivate(&(s)->devPrivates, vuidMouseScreenKey, (void *) p) -#endif /* HAVE_ABSOLUTE_MOUSE_SCALING */ - -static inline -VuidMsePtr getVuidMsePriv(InputInfoPtr pInfo) -{ - VuidMsePtr m = vuidMouseList; - - while ((m != NULL) && (m->pInfo != pInfo)) { - m = m->next; - } - - return m; -} - - -/* - * Initialize and enable the mouse wheel, if present. - * - * Returns 1 if mouse wheel was successfully enabled. - * Returns 0 if an error occurred or if there is no mouse wheel. - */ -static int -vuidMouseWheelInit(InputInfoPtr pInfo) -{ -#ifdef HAVE_VUID_WHEEL - wheel_state wstate; - int nwheel = -1; - int i; - - wstate.vers = VUID_WHEEL_STATE_VERS; - wstate.id = 0; - wstate.stateflags = -1; - - SYSCALL(i = ioctl(pInfo->fd, VUIDGWHEELCOUNT, &nwheel)); - if (i != 0) - return (0); - - SYSCALL(i = ioctl(pInfo->fd, VUIDGWHEELSTATE, &wstate)); - if (i != 0) { - xf86Msg(X_WARNING, "%s: couldn't get wheel state\n", pInfo->name); - return (0); - } - - wstate.stateflags |= VUID_WHEEL_STATE_ENABLED; - - SYSCALL(i = ioctl(pInfo->fd, VUIDSWHEELSTATE, &wstate)); - if (i != 0) { - xf86Msg(X_WARNING, "%s: couldn't enable wheel\n", pInfo->name); - return (0); - } - - return (1); -#else - return (0); -#endif -} - - -/* This function is called when the protocol is "VUID". */ -static Bool -vuidPreInit(InputInfoPtr pInfo, const char *protocol, int flags) -{ - MouseDevPtr pMse = pInfo->private; - VuidMsePtr pVuidMse; - int buttons, i; - - pVuidMse = xcalloc(sizeof(VuidMseRec), 1); - if (pVuidMse == NULL) { - xf86Msg(X_ERROR, "%s: cannot allocate VuidMouseRec\n", pInfo->name); - xfree(pMse); - return FALSE; - } - - pMse->protocol = protocol; - xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol); - - /* Collect the options, and process the common options. */ - xf86CollectInputOptions(pInfo, NULL, NULL); - xf86ProcessCommonOptions(pInfo, pInfo->options); - - /* Check if the device can be opened. */ - pInfo->fd = xf86OpenSerial(pInfo->options); - if (pInfo->fd == -1) { - if (xf86GetAllowMouseOpenFail()) - xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name); - else { - xf86Msg(X_ERROR, "%s: cannot open input device\n", pInfo->name); - xfree(pVuidMse); - xfree(pMse); - return FALSE; - } - } - - pVuidMse->buffer = (unsigned char *)&pVuidMse->event; - - pVuidMse->strmod = xf86SetStrOption(pInfo->options, "StreamsModule", NULL); - if (pVuidMse->strmod) { - SYSCALL(i = ioctl(pInfo->fd, I_PUSH, pVuidMse->strmod)); - if (i < 0) { - xf86Msg(X_ERROR, - "%s: cannot push module '%s' onto mouse device: %s\n", - pInfo->name, pVuidMse->strmod, strerror(errno)); - xf86CloseSerial(pInfo->fd); - pInfo->fd = -1; - xfree(pVuidMse->strmod); - xfree(pVuidMse); - xfree(pMse); - return FALSE; - } - } - - buttons = xf86SetIntOption(pInfo->options, "Buttons", 0); - if (buttons == 0) { - SYSCALL(i = ioctl(pInfo->fd, MSIOBUTTONS, &buttons)); - if (i == 0) { - pInfo->conf_idev->commonOptions = - xf86ReplaceIntOption(pInfo->conf_idev->commonOptions, - "Buttons", buttons); - xf86Msg(X_INFO, "%s: Setting Buttons option to \"%d\"\n", - pInfo->name, buttons); - } - } - - if (pVuidMse->strmod) { - SYSCALL(i = ioctl(pInfo->fd, I_POP, pVuidMse->strmod)); - if (i == -1) { - xf86Msg(X_WARNING, - "%s: cannot pop module '%s' off mouse device: %s\n", - pInfo->name, pVuidMse->strmod, strerror(errno)); - } - } - - xf86CloseSerial(pInfo->fd); - pInfo->fd = -1; - - /* Process common mouse options (like Emulate3Buttons, etc). */ - pMse->CommonOptions(pInfo); - - /* Setup the local procs. */ - pVuidMse->wrapped_device_control = pInfo->device_control; - pInfo->device_control = vuidMouseProc; - pInfo->read_input = vuidReadInput; - - pMse->xisbscale = sizeof(Firm_event); - -#ifdef HAVE_ABSOLUTE_MOUSE_SCALING - pVuidMse->absres.height = pVuidMse->absres.width = 0; -#endif - pVuidMse->pInfo = pInfo; - pVuidMse->next = vuidMouseList; - vuidMouseList = pVuidMse; - - pInfo->flags |= XI86_CONFIGURED; - return TRUE; -} - -static void -vuidFlushAbsEvents(InputInfoPtr pInfo, int absX, int absY, - Bool *absXset, Bool *absYset) -{ -#ifdef DEBUG - ErrorF("vuidFlushAbsEvents: %d,%d (set: %d, %d)\n", absX, absY, - *absXset, *absYset); -#endif - if ((*absXset) && (*absYset)) { - xf86PostMotionEvent(pInfo->dev, - /* is_absolute: */ TRUE, - /* first_valuator: */ 0, - /* num_valuators: */ 2, - absX, absY); - } else if (*absXset) { - xf86PostMotionEvent(pInfo->dev, - /* is_absolute: */ TRUE, - /* first_valuator: */ 0, - /* num_valuators: */ 1, - absX); - } else if (*absYset) { - xf86PostMotionEvent(pInfo->dev, - /* is_absolute: */ TRUE, - /* first_valuator: */ 1, - /* num_valuators: */ 1, - absY); - } - - *absXset = FALSE; - *absYset = FALSE; -} - -static void -vuidReadInput(InputInfoPtr pInfo) -{ - MouseDevPtr pMse; - VuidMsePtr pVuidMse; - int buttons; - int dx = 0, dy = 0, dz = 0, dw = 0; - unsigned int n; - int c; - unsigned char *pBuf; - int wmask; - int absX, absY; - Bool absXset = FALSE, absYset = FALSE; - - pMse = pInfo->private; - pVuidMse = getVuidMsePriv(pInfo); - buttons = pMse->lastButtons; - XisbBlockDuration(pMse->buffer, -1); - pBuf = pVuidMse->buffer; - n = 0; - - do { - while (n < sizeof(Firm_event) && (c = XisbRead(pMse->buffer)) >= 0) { - pBuf[n++] = (unsigned char)c; - } - - if (n == 0) - return; - - if (n != sizeof(Firm_event)) { - xf86Msg(X_WARNING, "%s: incomplete packet, size %d\n", - pInfo->name, n); - } - -#ifdef DEBUG - ErrorF("vuidReadInput: event type: %3d value: %5d\n", - pVuidMse->event.id, pVuidMse->event.value); -#endif - - if (pVuidMse->event.id >= BUT_FIRST && pVuidMse->event.id <= BUT_LAST) { - /* button */ - int butnum = pVuidMse->event.id - BUT_FIRST; - - if (butnum < 3) - butnum = 2 - butnum; - if (!pVuidMse->event.value) - buttons &= ~(1 << butnum); - else - buttons |= (1 << butnum); - } else if (pVuidMse->event.id >= VLOC_FIRST && - pVuidMse->event.id <= VLOC_LAST) { - /* axis */ - int delta = pVuidMse->event.value; - switch(pVuidMse->event.id) { - case LOC_X_DELTA: - dx += delta; - break; - case LOC_Y_DELTA: - dy -= delta; - break; - case LOC_X_ABSOLUTE: - if (absXset) { - vuidFlushAbsEvents(pInfo, absX, absY, &absXset, &absYset); - } - absX = delta; - absXset = TRUE; - break; - case LOC_Y_ABSOLUTE: - if (absYset) { - vuidFlushAbsEvents(pInfo, absX, absY, &absXset, &absYset); - } - absY = delta; - absYset = TRUE; - break; - } - } -#ifdef HAVE_VUID_WHEEL - else if (vuid_in_range(VUID_WHEEL, pVuidMse->event.id)) { - if (vuid_id_offset(pVuidMse->event.id) == 0) - dz -= VUID_WHEEL_GETDELTA(pVuidMse->event.value); - else - dw -= VUID_WHEEL_GETDELTA(pVuidMse->event.value); - } -#endif -#ifdef HAVE_ABSOLUTE_MOUSE_SCALING - else if (pVuidMse->event.id == MOUSE_TYPE_ABSOLUTE) { - /* force sending absolute resolution scaling ioctl */ - pVuidMse->absres.height = pVuidMse->absres.width = 0; - vuidMouseSendScreenSize(miPointerCurrentScreen(), pVuidMse); - } -#endif - - n = 0; - if ((c = XisbRead(pMse->buffer)) >= 0) { - /* Another packet. Handle it right away. */ - pBuf[n++] = c; - } - } while (n != 0); - - if (absXset || absYset) { - vuidFlushAbsEvents(pInfo, absX, absY, &absXset, &absYset); - } - - pMse->PostEvent(pInfo, buttons, dx, dy, dz, dw); - return; -} - -#ifdef HAVE_ABSOLUTE_MOUSE_SCALING -static void vuidMouseSendScreenSize(ScreenPtr pScreen, VuidMsePtr pVuidMse) -{ - InputInfoPtr pInfo = pVuidMse->pInfo; - ScrnInfoPtr pScr = XF86SCRNINFO(pScreen); - int result; - - if ((pVuidMse->absres.width != pScr->currentMode->HDisplay) || - (pVuidMse->absres.height != pScr->currentMode->VDisplay)) - { - pVuidMse->absres.width = pScr->currentMode->HDisplay; - pVuidMse->absres.height = pScr->currentMode->VDisplay; - - do { - result = ioctl(pInfo->fd, MSIOSRESOLUTION, &(pVuidMse->absres)); - } while ( (result != 0) && (errno == EINTR) ); - - if (result != 0) { - xf86Msg(X_WARNING, - "%s: couldn't set absolute mouse scaling resolution: %s\n", - pInfo->name, strerror(errno)); -#ifdef DEBUG - } else { - xf86Msg(X_INFO, - "%s: absolute mouse scaling resolution set to %d x %d\n", - pInfo->name, - pVuidMse->absres.width, pVuidMse->absres.height); -#endif - } - } -} - -static void vuidMouseAdjustFrame(int index, int x, int y, int flags) -{ - ScrnInfoPtr pScrn = xf86Screens[index]; - ScreenPtr pScreen = pScrn->pScreen; - xf86AdjustFrameProc *wrappedAdjustFrame - = (xf86AdjustFrameProc *) vuidMouseGetScreenPrivate(pScreen); - VuidMsePtr m; - - if(wrappedAdjustFrame) { - pScrn->AdjustFrame = wrappedAdjustFrame; - (*pScrn->AdjustFrame)(index, x, y, flags); - pScrn->AdjustFrame = vuidMouseAdjustFrame; - } - - if (miPointerCurrentScreen() == pScreen) { - for (m = vuidMouseList; m != NULL ; m = m->next) { - vuidMouseSendScreenSize(pScreen, m); - } - } -} -#endif /* HAVE_ABSOLUTE_MOUSE_SCALING */ - - -static int -vuidMouseProc(DeviceIntPtr pPointer, int what) -{ - InputInfoPtr pInfo; - MouseDevPtr pMse; - VuidMsePtr pVuidMse; - int ret = Success; - int i; - - pInfo = pPointer->public.devicePrivate; - pMse = pInfo->private; - pMse->device = pPointer; - - pVuidMse = getVuidMsePriv(pInfo); - if (pVuidMse == NULL) { - return BadImplementation; - } - - switch (what) { - - case DEVICE_INIT: -#ifdef HAVE_ABSOLUTE_MOUSE_SCALING - if (vuidMouseGeneration != serverGeneration) { - for (i = 0; i < screenInfo.numScreens; i++) { - ScreenPtr pScreen = screenInfo.screens[i]; - ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen); - vuidMouseSetScreenPrivate(pScreen, pScrn->AdjustFrame); - pScrn->AdjustFrame = vuidMouseAdjustFrame; - } - vuidMouseGeneration = serverGeneration; - } -#endif - ret = pVuidMse->wrapped_device_control(pPointer, what); - break; - - case DEVICE_ON: - ret = pVuidMse->wrapped_device_control(pPointer, DEVICE_ON); - - if ((ret == Success) && (pInfo->fd != -1)) { - int fmt = VUID_FIRM_EVENT; - - if (pVuidMse->strmod) { - SYSCALL(i = ioctl(pInfo->fd, I_PUSH, pVuidMse->strmod)); - if (i < 0) { - xf86Msg(X_WARNING, - "%s: cannot push module '%s' onto mouse device: %s\n", - pInfo->name, pVuidMse->strmod, strerror(errno)); - xfree(pVuidMse->strmod); - pVuidMse->strmod = NULL; - } - } - SYSCALL(i = ioctl(pInfo->fd, VUIDSFORMAT, &fmt)); - if (i < 0) { - xf86Msg(X_WARNING, - "%s: cannot set mouse device to VUID mode: %s\n", - pInfo->name, strerror(errno)); - } - vuidMouseWheelInit(pInfo); -#ifdef HAVE_ABSOLUTE_MOUSE_SCALING - vuidMouseSendScreenSize(screenInfo.screens[0], pVuidMse); -#endif - xf86FlushInput(pInfo->fd); - } - break; - - case DEVICE_OFF: - case DEVICE_CLOSE: - if (pInfo->fd != -1) { - if (pVuidMse->strmod) { - SYSCALL(i = ioctl(pInfo->fd, I_POP, pVuidMse->strmod)); - if (i == -1) { - xf86Msg(X_WARNING, - "%s: cannot pop module '%s' off mouse device: %s\n", - pInfo->name, pVuidMse->strmod, strerror(errno)); - } - } - } - ret = pVuidMse->wrapped_device_control(pPointer, what); - break; - - default: /* Should never be called, but just in case */ - ret = pVuidMse->wrapped_device_control(pPointer, what); - break; - } - return ret; -} - -static Bool -sunMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags) -{ - /* The protocol is guaranteed to be one of the internalNames[] */ - if (xf86NameCmp(protocol, "VUID") == 0) { - return vuidPreInit(pInfo, protocol, flags); - } - return TRUE; -} - -static const char ** -BuiltinNames(void) -{ - return internalNames; -} - -static Bool -CheckProtocol(const char *protocol) -{ - int i; - - for (i = 0; internalNames[i]; i++) - if (xf86NameCmp(protocol, internalNames[i]) == 0) - return TRUE; - - return FALSE; -} - -static const char * -DefaultProtocol(void) -{ - return "Auto"; -} - -static Bool -solarisMouseAutoProbe(InputInfoPtr pInfo, const char **protocol, - const char **device) -{ - const char **pdev, **pproto, *dev = NULL; - int fd = -1; - Bool found; - - for (pdev = solarisMouseDevs; *pdev; pdev += 2) { - pproto = pdev + 1; - if ((*protocol != NULL) && (strcmp(*protocol, "Auto") != 0) && - (*pproto != NULL) && (strcmp(*pproto, *protocol) != 0)) { - continue; - } - if ((*device != NULL) && (strcmp(*device, *pdev) != 0)) { - continue; - } - SYSCALL (fd = open(*pdev, O_RDWR | O_NONBLOCK)); - if (fd == -1) { -#ifdef DEBUG - ErrorF("Cannot open %s (%s)\n", pdev, strerror(errno)); -#endif - } else { - found = TRUE; - if ((*pproto != NULL) && (strcmp(*pproto, "VUID") == 0)) { - int i, r; - SYSCALL(r = ioctl(fd, VUIDGFORMAT, &i)); - if (r < 0) { - found = FALSE; - } - } - close(fd); - if (found == TRUE) { - if (*pproto != NULL) { - *protocol = *pproto; - } - *device = *pdev; - return TRUE; - } - } - } - return FALSE; -} - -static const char * -SetupAuto(InputInfoPtr pInfo, int *protoPara) -{ - const char *pdev = NULL; - const char *pproto = NULL; - MouseDevPtr pMse = pInfo->private; - - if (pInfo->fd == -1) { - /* probe to find device/protocol to use */ - if (solarisMouseAutoProbe(pInfo, &pproto, &pdev) != FALSE) { - /* Set the Device option. */ - pInfo->conf_idev->commonOptions = - xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", pdev); - xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n", - pInfo->name, pdev); - } - } else if (pMse->protocolID == PROT_AUTO) { - pdev = xf86CheckStrOption(pInfo->conf_idev->commonOptions, - "Device", NULL); - solarisMouseAutoProbe(pInfo, &pproto, &pdev); - } - return pproto; -} - -static const char * -FindDevice(InputInfoPtr pInfo, const char *protocol, int flags) -{ - const char *pdev = NULL; - const char *pproto = protocol; - - if (solarisMouseAutoProbe(pInfo, &pproto, &pdev) != FALSE) { - /* Set the Device option. */ - pInfo->conf_idev->commonOptions = - xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", pdev); - xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n", - pInfo->name, pdev); - } - return pdev; -} - -#else /* __SOL8__ || !__i386 */ - -#undef MSE_MISC -#define MSE_MISC 0 - -#endif /* !__SOL8__ && __i386 */ - -static int -SupportedInterfaces(void) -{ - /* XXX This needs to be checked. */ - return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO | MSE_XPS2 | MSE_MISC; -} - -_X_EXPORT OSMouseInfoPtr -xf86OSMouseInit(int flags) -{ - OSMouseInfoPtr p; - - p = xcalloc(sizeof(OSMouseInfoRec), 1); - if (!p) - return NULL; - p->SupportedInterfaces = SupportedInterfaces; -#if defined(__SOL8__) || !defined(__i386) - p->BuiltinNames = BuiltinNames; - p->CheckProtocol = CheckProtocol; - p->PreInit = sunMousePreInit; - p->DefaultProtocol = DefaultProtocol; - p->SetupAuto = SetupAuto; - p->FindDevice = FindDevice; -#endif - return p; -} - diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c b/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c index e7b529ccb..3982f631f 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c @@ -1,6 +1,7 @@ /* * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany * Copyright 1993 by David Wexelblat + * Copyright 1999 by David Holland * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -21,6 +22,33 @@ * OF THIS SOFTWARE. * */ +/* Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, and/or sell copies of the Software, and to permit persons + * to whom the Software is furnished to do so, provided that the above + * copyright notice(s) and this permission notice appear in all copies of + * the Software and that both the above copyright notice(s) and this + * permission notice appear in supporting documentation. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT + * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL + * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder + * shall not be used in advertising or otherwise to promote the sale, use + * or other dealings in this Software without prior written authorization + * of the copyright holder. + */ #ifdef HAVE_XORG_CONFIG_H #include @@ -29,121 +57,176 @@ #include /* get __x86 definition if not set by compiler */ #if defined(__i386__) || defined(__i386) || defined(__x86) -#define _NEED_SYSI86 +# define _NEED_SYSI86 #endif #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" - -#ifndef MAP_FAILED -#define MAP_FAILED ((void *)-1) -#endif +#include "xf86OSpriv.h" +#include /***************************************************************************/ /* Video Memory Mapping section */ /***************************************************************************/ -char *apertureDevName = NULL; +static char *apertureDevName = NULL; +static int apertureDevFD_ro = -1; +static int apertureDevFD_rw = -1; -_X_EXPORT Bool -xf86LinearVidMem(void) +static Bool +solOpenAperture(void) { - int mmapFd; - - if (apertureDevName) - return TRUE; - + if (apertureDevName == NULL) + { apertureDevName = "/dev/xsvc"; - if ((mmapFd = open(apertureDevName, O_RDWR)) < 0) + if ((apertureDevFD_rw = open(apertureDevName, O_RDWR)) < 0) { + xf86MsgVerb(X_WARNING, 0, + "solOpenAperture: failed to open %s (%s)\n", + apertureDevName, strerror(errno)); apertureDevName = "/dev/fbs/aperture"; - if((mmapFd = open(apertureDevName, O_RDWR)) < 0) + apertureDevFD_rw = open(apertureDevName, O_RDWR); + } + apertureDevFD_ro = open(apertureDevName, O_RDONLY); + + if ((apertureDevFD_rw < 0) || (apertureDevFD_ro < 0)) + { + xf86MsgVerb(X_WARNING, 0, + "solOpenAperture: failed to open %s (%s)\n", + apertureDevName, strerror(errno)); + xf86MsgVerb(X_WARNING, 0, + "solOpenAperture: either /dev/fbs/aperture" + " or /dev/xsvc required\n"); + + apertureDevName = NULL; + + if (apertureDevFD_rw >= 0) + { + close(apertureDevFD_rw); + } + apertureDevFD_rw = -1; + + if (apertureDevFD_ro >= 0) { - xf86MsgVerb(X_WARNING, 0, - "xf86LinearVidMem: failed to open %s (%s)\n", - apertureDevName, strerror(errno)); - xf86MsgVerb(X_WARNING, 0, - "xf86LinearVidMem: either /dev/fbs/aperture or /dev/xsvc" - " device driver required\n"); - xf86MsgVerb(X_WARNING, 0, - "xf86LinearVidMem: linear memory access disabled\n"); - apertureDevName = NULL; - return FALSE; + close(apertureDevFD_ro); } + apertureDevFD_ro = -1; + + return FALSE; } - close(mmapFd); - return TRUE; + } + return TRUE; } -_X_EXPORT pointer -xf86MapVidMem(int ScreenNum, int Flags, unsigned long Base, unsigned long Size) +static pointer +solMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int Flags) { - pointer base; - int fd; - char vtname[20]; - - /* - * Solaris 2.1 x86 SVR4 (10/27/93) - * The server must treat the virtual terminal device file as the - * standard SVR4 /dev/pmem. - * - * Using the /dev/vtXX device as /dev/pmem only works for the - * A0000-FFFFF region - If we wish you mmap the linear aperture - * it requires a device driver. - * - * So what we'll do is use /dev/vtXX for the A0000-FFFFF stuff, and - * try to use the /dev/fbs/aperture or /dev/xsvc driver if the server - * tries to mmap anything > FFFFF. Its very very unlikely that the - * server will try to mmap anything below FFFFF that can't be handled - * by /dev/vtXX. - * - * DWH - 2/23/94 - * DWH - 1/31/99 (Gee has it really been 5 years?) - * - * Solaris 2.8 7/26/99 - * Use /dev/xsvc for everything - * - * DWH - 7/26/99 - Solaris8/dev/xsvc changes - * - * TSI - 2001.09 - SPARC changes - */ - -#if defined(__i386__) && !defined(__SOL8__) - if(Base < 0xFFFFF) - sprintf(vtname, "/dev/vt%02d", xf86Info.vtno); - else -#endif - { - if (!xf86LinearVidMem()) - FatalError("xf86MapVidMem: no aperture device\n"); + pointer base; + int fd; + int prot; + + if (Flags & VIDMEM_READONLY) + { + fd = apertureDevFD_ro; + prot = PROT_READ; + } + else + { + fd = apertureDevFD_rw; + prot = PROT_READ | PROT_WRITE; + } + + if (fd < 0) + { + xf86DrvMsg(ScreenNum, X_ERROR, + "solMapVidMem: failed to open %s (%s)\n", + apertureDevName, strerror(errno)); + return NULL; + } + + base = mmap(NULL, Size, prot, MAP_SHARED, fd, (off_t)Base); + + if (base == MAP_FAILED) { + xf86DrvMsg(ScreenNum, X_ERROR, + "solMapVidMem: failed to mmap %s (0x%08lx,0x%lx) (%s)\n", + apertureDevName, Base, Size, strerror(errno)); + return NULL; + } + + return base; +} - strcpy(vtname, apertureDevName); - } +/* ARGSUSED */ +static void +solUnMapVidMem(int ScreenNum, pointer Base, unsigned long Size) +{ + if (munmap(Base, Size) != 0) { + xf86DrvMsgVerb(ScreenNum, X_WARNING, 0, + "solUnMapVidMem: failed to unmap %s" + " (0x%08lx,0x%lx) (%s)\n", + apertureDevName, Base, Size, + strerror(errno)); + } +} - fd = open(vtname, (Flags & VIDMEM_READONLY) ? O_RDONLY : O_RDWR); - if (fd < 0) - FatalError("xf86MapVidMem: failed to open %s (%s)\n", - vtname, strerror(errno)); - - base = mmap(NULL, Size, - (Flags & VIDMEM_READONLY) ? - PROT_READ : (PROT_READ | PROT_WRITE), - MAP_SHARED, fd, (off_t)Base); - close(fd); - if (base == MAP_FAILED) - FatalError("xf86MapVidMem: mmap failure: %s\n", - strerror(errno)); - - return(base); +_X_HIDDEN void +xf86OSInitVidMem(VidMemInfoPtr pVidMem) +{ + pVidMem->linearSupported = solOpenAperture(); + if (pVidMem->linearSupported) { + pVidMem->mapMem = solMapVidMem; + pVidMem->unmapMem = solUnMapVidMem; + } else { + xf86MsgVerb(X_WARNING, 0, + "xf86OSInitVidMem: linear memory access disabled\n"); + } + pVidMem->initialised = TRUE; } -/* ARGSUSED */ -_X_EXPORT void -xf86UnMapVidMem(int ScreenNum, pointer Base, unsigned long Size) +/* + * Read BIOS via mmap()ing physical memory. + */ +_X_EXPORT int +xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, + int Len) { - munmap(Base, Size); + unsigned char *ptr; + int psize; + int mlen; + + psize = getpagesize(); + Offset += Base & (psize - 1); + Base &= ~(psize - 1); + mlen = (Offset + Len + psize - 1) & ~(psize - 1); + + if (solOpenAperture() == FALSE) + { + xf86Msg(X_WARNING, + "xf86ReadBIOS: Failed to open aperture to read BIOS\n"); + return -1; + } + + ptr = (unsigned char *)mmap(NULL, mlen, PROT_READ, + MAP_SHARED, apertureDevFD_ro, (off_t)Base); + if (ptr == MAP_FAILED) + { + xf86Msg(X_WARNING, "xf86ReadBIOS: %s mmap failed [0x%08lx, 0x%04x]\n", + apertureDevName, Base, mlen); + return -1; + } + + (void)memcpy(Buf, (void *)(ptr + Offset), Len); + if (munmap((caddr_t)ptr, mlen) != 0) { + xf86MsgVerb(X_WARNING, 0, + "solUnMapVidMem: failed to unmap %s" + " (0x%08lx,0x%lx) (%s)\n", + apertureDevName, ptr, mlen, strerror(errno)); + } + + return Len; } + /***************************************************************************/ /* I/O Permissions section */ /***************************************************************************/ @@ -156,81 +239,27 @@ _X_EXPORT Bool xf86EnableIO(void) { #if defined(__i386__) || defined(__i386) || defined(__x86) - if (ExtendedEnabled) - return TRUE; + if (ExtendedEnabled) + return TRUE; - if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0) { - xf86Msg(X_WARNING,"xf86EnableIOPorts: Failed to set IOPL for I/O\n"); - return FALSE; - } - ExtendedEnabled = TRUE; + if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0) { + xf86Msg(X_WARNING, "xf86EnableIOPorts: Failed to set IOPL for I/O\n"); + return FALSE; + } + ExtendedEnabled = TRUE; #endif /* i386 */ - return TRUE; + return TRUE; } _X_EXPORT void xf86DisableIO(void) { #if defined(__i386__) || defined(__i386) || defined(__x86) - if(!ExtendedEnabled) - return; + if(!ExtendedEnabled) + return; - sysi86(SI86V86, V86SC_IOPL, 0); + sysi86(SI86V86, V86SC_IOPL, 0); - ExtendedEnabled = FALSE; + ExtendedEnabled = FALSE; #endif /* i386 */ } - - -/***************************************************************************/ -/* Interrupt Handling section */ -/***************************************************************************/ - -_X_EXPORT Bool xf86DisableInterrupts(void) -{ -#if defined(__i386__) || defined(__i386) || defined(__x86) - if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0)) - return FALSE; - -#ifdef __GNUC__ - __asm__ __volatile__("cli"); -#else - asm("cli"); -#endif /* __GNUC__ */ - - if (!ExtendedEnabled) - sysi86(SI86V86, V86SC_IOPL, 0); -#endif /* i386 */ - - return TRUE; -} - -_X_EXPORT void xf86EnableInterrupts(void) -{ -#if defined(__i386__) || defined(__i386) || defined(__x86) - if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0)) - return; - -#ifdef __GNUC__ - __asm__ __volatile__("sti"); -#else - asm("sti"); -#endif /* __GNUC__ */ - - if (!ExtendedEnabled) - sysi86(SI86V86, V86SC_IOPL, 0); -#endif /* i386 */ -} - -_X_EXPORT void -xf86MapReadSideEffects(int ScreenNum, int Flags, pointer Base, - unsigned long Size) -{ -} - -_X_EXPORT Bool -xf86CheckMTRR(int ScreenNum) -{ - return FALSE; -} - diff --git a/xorg-server/hw/xfree86/os-support/sysv/Makefile.am b/xorg-server/hw/xfree86/os-support/sysv/Makefile.am index f9d2f237a..e86e70ad1 100644 --- a/xorg-server/hw/xfree86/os-support/sysv/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/sysv/Makefile.am @@ -1 +1 @@ -EXTRA_DIST = sysv_init.c sysv_mouse.c sysv_video.c +EXTRA_DIST = sysv_init.c sysv_video.c diff --git a/xorg-server/hw/xfree86/os-support/sysv/Makefile.in b/xorg-server/hw/xfree86/os-support/sysv/Makefile.in index 2a27a19e1..b574c0288 100644 --- a/xorg-server/hw/xfree86/os-support/sysv/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/sysv/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -42,7 +42,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -56,8 +55,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -78,10 +78,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -103,6 +99,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -112,18 +109,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -142,7 +136,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -156,7 +150,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -168,8 +165,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -178,8 +174,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -212,7 +208,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -222,27 +217,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -253,10 +233,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -265,13 +241,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -304,8 +275,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -325,7 +295,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -335,12 +304,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -358,9 +327,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ -EXTRA_DIST = sysv_init.c sysv_mouse.c sysv_video.c +EXTRA_DIST = sysv_init.c sysv_video.c all: all-am .SUFFIXES: @@ -368,8 +335,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ diff --git a/xorg-server/hw/xfree86/os-support/sysv/sysv_mouse.c b/xorg-server/hw/xfree86/os-support/sysv/sysv_mouse.c deleted file mode 100644 index e62010515..000000000 --- a/xorg-server/hw/xfree86/os-support/sysv/sysv_mouse.c +++ /dev/null @@ -1,60 +0,0 @@ - -/* - * Copyright 1999 by The XFree86 Project, Inc. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include "xf86.h" -#include "xf86Xinput.h" -#include "xf86OSmouse.h" - -static int -SupportedInterfaces(void) -{ - /* XXX Need to check this. */ - return MSE_SERIAL | MSE_AUTO; -} - -#ifndef ISC -static const char *internalNames[] = { - NULL -}; - -static const char ** -BuiltinNames(void) -{ - return internalNames; -} - -static Bool -CheckProtocol(const char *protocol) -{ - int i; - - for (i = 0; internalNames[i]; i++) - if (xf86NameCmp(protocol, internalNames[i]) == 0) - return TRUE; - return FALSE; -} -#endif - -_X_EXPORT OSMouseInfoPtr -xf86OSMouseInit(int flags) -{ - OSMouseInfoPtr p; - - p = xcalloc(sizeof(OSMouseInfoRec), 1); - if (!p) - return NULL; - p->SupportedInterfaces = SupportedInterfaces; -#ifndef ISC - p->BuiltinNames = BuiltinNames; - p->CheckProtocol = CheckProtocol; -#endif - return p; -} - diff --git a/xorg-server/hw/xfree86/os-support/sysv/sysv_video.c b/xorg-server/hw/xfree86/os-support/sysv/sysv_video.c index 9972bcaa4..a9bbd6580 100644 --- a/xorg-server/hw/xfree86/os-support/sysv/sysv_video.c +++ b/xorg-server/hw/xfree86/os-support/sysv/sysv_video.c @@ -313,55 +313,3 @@ xf86DisableIO() return; } - -/***************************************************************************/ -/* Interrupt Handling section */ -/***************************************************************************/ - -_X_EXPORT Bool -xf86DisableInterrupts() -{ - if (!ExtendedEnabled) - { - if (SET_IOPL() < 0) - { - return(FALSE); - } - } - -#ifdef __GNUC__ - __asm__ __volatile__("cli"); -#else - asm("cli"); -#endif /* __GNUC__ */ - - if (!ExtendedEnabled) - { - RESET_IOPL(); - } - return(TRUE); -} - -_X_EXPORT void -xf86EnableInterrupts() -{ - if (!ExtendedEnabled) - { - if (SET_IOPL() < 0) - { - return; - } - } - -#ifdef __GNUC__ - __asm__ __volatile__("sti"); -#else - asm("sti"); -#endif /* __GNUC__ */ - - if (!ExtendedEnabled) - { - RESET_IOPL(); - } - return; -} diff --git a/xorg-server/hw/xfree86/os-support/usl/Makefile.am b/xorg-server/hw/xfree86/os-support/usl/Makefile.am deleted file mode 100644 index db08f5d85..000000000 --- a/xorg-server/hw/xfree86/os-support/usl/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -EXTRA_DIST = \ - usl_init.c \ - usl_iop.c \ - usl_mouse.c \ - usl_video.c \ - usl_vtsw.c diff --git a/xorg-server/hw/xfree86/os-support/usl/Makefile.in b/xorg-server/hw/xfree86/os-support/usl/Makefile.in deleted file mode 100644 index bf5c2ac17..000000000 --- a/xorg-server/hw/xfree86/os-support/usl/Makefile.in +++ /dev/null @@ -1,538 +0,0 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = hw/xfree86/os-support/usl -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ - $(top_builddir)/include/xorg-server.h \ - $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ - $(top_builddir)/include/xorg-config.h \ - $(top_builddir)/include/xkb-config.h \ - $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ -ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ -APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ -APP_MAN_DIR = @APP_MAN_DIR@ -APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASE_FONT_PATH = @BASE_FONT_PATH@ -BUILD_DATE = @BUILD_DATE@ -BUILD_TIME = @BUILD_TIME@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DARWIN_LIBS = @DARWIN_LIBS@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ -DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ -DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DGA_CFLAGS = @DGA_CFLAGS@ -DGA_LIBS = @DGA_LIBS@ -DIX_CFLAGS = @DIX_CFLAGS@ -DLLTOOL = @DLLTOOL@ -DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ -DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ -DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ -DMXMODULES_LIBS = @DMXMODULES_LIBS@ -DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ -DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ -DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ -DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ -DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ -DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ -DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ -DRIPROTO_LIBS = @DRIPROTO_LIBS@ -DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ -DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ -DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ -DSYMUTIL = @DSYMUTIL@ -DTRACE = @DTRACE@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -FILE_MAN_DIR = @FILE_MAN_DIR@ -FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ -GLX_DEFINES = @GLX_DEFINES@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -HAL_CFLAGS = @HAL_CFLAGS@ -HAL_LIBS = @HAL_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ -KDRIVE_INCS = @KDRIVE_INCS@ -KDRIVE_LIBS = @KDRIVE_LIBS@ -KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ -KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ -KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ -LDFLAGS = @LDFLAGS@ -LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ -LIBDRM_LIBS = @LIBDRM_LIBS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_MAN_DIR = @LIB_MAN_DIR@ -LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ -MISC_MAN_DIR = @MISC_MAN_DIR@ -MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ -MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCCLD = @OBJCCLD@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJCLINK = @OBJCLINK@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ -PCIACCESS_LIBS = @PCIACCESS_LIBS@ -PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ -PERL = @PERL@ -PKG_CONFIG = @PKG_CONFIG@ -PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ -RANLIB = @RANLIB@ -RAWCPP = @RAWCPP@ -RAWCPPFLAGS = @RAWCPPFLAGS@ -SED = @SED@ -SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ -SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ -STRIP = @STRIP@ -TSLIB_CFLAGS = @TSLIB_CFLAGS@ -TSLIB_LIBS = @TSLIB_LIBS@ -UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ -VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ -VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ -X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ -X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ -XDMCP_CFLAGS = @XDMCP_CFLAGS@ -XDMCP_LIBS = @XDMCP_LIBS@ -XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ -XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ -XDMX_CFLAGS = @XDMX_CFLAGS@ -XDMX_LIBS = @XDMX_LIBS@ -XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ -XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ -XEPHYR_INCS = @XEPHYR_INCS@ -XEPHYR_LIBS = @XEPHYR_LIBS@ -XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ -XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ -XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ -XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ -XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ -XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ -XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ -XLIB_CFLAGS = @XLIB_CFLAGS@ -XLIB_LIBS = @XLIB_LIBS@ -XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ -XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ -XNEST_LIBS = @XNEST_LIBS@ -XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ -XORG_CFLAGS = @XORG_CFLAGS@ -XORG_INCS = @XORG_INCS@ -XORG_LIBS = @XORG_LIBS@ -XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ -XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ -XORG_OS = @XORG_OS@ -XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ -XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ -XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ -XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ -XSDL_INCS = @XSDL_INCS@ -XSDL_LIBS = @XSDL_LIBS@ -XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ -XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ -XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ -XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ -XSERVER_LIBS = @XSERVER_LIBS@ -XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ -XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ -XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ -XVFB_LIBS = @XVFB_LIBS@ -XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ -XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ -XWINMODULES_LIBS = @XWINMODULES_LIBS@ -XWIN_LIBS = @XWIN_LIBS@ -XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ -XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -__XCONFIGFILE__ = @__XCONFIGFILE__@ -abi_ansic = @abi_ansic@ -abi_extension = @abi_extension@ -abi_font = @abi_font@ -abi_videodrv = @abi_videodrv@ -abi_xinput = @abi_xinput@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -driverdir = @driverdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -extdir = @extdir@ -ft_config = @ft_config@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -logdir = @logdir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -moduledir = @moduledir@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sdkdir = @sdkdir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ -EXTRA_DIST = \ - usl_init.c \ - usl_iop.c \ - usl_mouse.c \ - usl_video.c \ - usl_vtsw.c - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/os-support/usl/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign hw/xfree86/os-support/usl/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/xorg-server/hw/xfree86/os-support/usl/usl_init.c b/xorg-server/hw/xfree86/os-support/usl/usl_init.c deleted file mode 100644 index d27b206c8..000000000 --- a/xorg-server/hw/xfree86/os-support/usl/usl_init.c +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Copyright 2001-2005 by Kean Johnston - * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany - * Copyright 1993 by David Wexelblat - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the names of Thomas Roell, David Wexelblat - * and Kean Johnston not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior permission. - * Thomas Roell, David Wexelblat and Kean Johnston make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * THOMAS ROELL, DAVID WEXELBLAT AND KEAN JOHNSTON DISCLAIM ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THOMAS ROELLm DAVID WEXELBLAT - * OR KEAN JOHNSTON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - * - */ - -#include "X.h" -#include "Xmd.h" - -#include "compiler.h" - -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" - -#include - -static Bool KeepTty = FALSE; -static Bool Protect0 = FALSE; -static Bool CRTSpecified = FALSE; -static int VTnum = -1; -static char vtdevice[48]; - -int usl_is_osr6 = -1; - -static Bool -IsConsoleDevice(const char *dev) -{ - if ((!strcmp (dev, "/dev/console")) || - (!strcmp (dev, "/dev/syscon")) || - (!strcmp (dev, "/dev/systty"))) - return TRUE; - - return FALSE; -} - -static int -is_osr6 (void) -{ - struct utsname uts; - - if (usl_is_osr6 == -1) { - if (uname (&uts) < 0) { - FatalError ("get_usl_ver: Failed to determine UNIX name (%s)\n", - strerror (errno)); - } - - if (uts.version[0] == '6') - usl_is_osr6 = 1; - else - usl_is_osr6 = 0; - } - - return usl_is_osr6; -} - - -void -xf86OpenConsole(void) -{ - int fd, i, ioctl_ret; - struct vt_mode VT; - struct vt_stat vts; - MessageType from = X_PROBED; - struct sigaction sigvtsw; - char *ttn; - - if (serverGeneration == 1) { - int isconsole = 0, consdev = 0; - - /* check if we're run with euid==0 */ - if (geteuid() != 0) { - FatalError("xf86OpenConsole: Server must be suid root\n"); - } - - /* If we are run in the background we will get SIGTTOU. Ignore it. */ - OsSignal (SIGTTOU, SIG_IGN); - - /* Protect page 0 to help find NULL dereferencing */ - /* mprotect() doesn't seem to work */ - if (Protect0) { - int fd = -1; - - if ((fd = open("/dev/zero", O_RDONLY, 0)) < 0) { - xf86Msg(X_WARNING, "xf86OpenConsole: cannot open /dev/zero (%s)\n", - strerror(errno)); - } else { - if ((int)mmap(0, 0x1000, PROT_NONE, - MAP_FIXED | MAP_SHARED, fd, 0) == -1) { - xf86Msg(X_WARNING, "xf86OpenConsole: failed to protect page 0 (%s)\n", - strerror(errno)); - } - close(fd); - } - } - - /* - * setup the virtual terminal manager - */ - if (VTnum == -1) { - /* - * No device was specified. We need to query the kernel to see which - * console device we are on (and in fact if we are on a console at all). - */ - if (ioctl (0, VT_GETSTATE, &vts) < 0) { - FatalError("xf86OpenConsole: Could not query active VT: %s\n", - strerror(errno)); - } - VTnum = vts.v_active; - if (is_osr6()) - snprintf (vtdevice, sizeof(vtdevice), "/dev/tty%02d", VTnum + 1); - else - snprintf (vtdevice, sizeof(vtdevice), "/dev/vt%02d", VTnum); - } else { - from = X_CMDLINE; - if (is_osr6()) - snprintf (vtdevice, sizeof(vtdevice), "/dev/tty%02d", VTnum + 1); - else - snprintf (vtdevice, sizeof(vtdevice), "/dev/vt%02d", VTnum); - } - - if (IsConsoleDevice(vtdevice)) { - isconsole = 1; - CRTSpecified = FALSE; /* Dont honour -crt /dev/console */ - } - - if (ioctl (0, KIOCINFO, 0) >= 0) - consdev = 1 + isconsole; - - if ((!CRTSpecified) && (isconsole || (!consdev))) { - /* - * Need to find a free VT - */ - if ((fd = open ("/dev/console", O_WRONLY | O_NOCTTY)) < 0) { - FatalError ("xf86OpenConsole: Could not open /dev/console: %s\n", - strerror (errno)); - } - - if (ioctl (fd, VT_OPENQRY, &VTnum) < 0) { - FatalError ("xf86OpenConsole: Cannot find a free VT: %s\n", - strerror(errno)); - } - close (fd); - if (usl_is_osr6) - snprintf (vtdevice, sizeof(vtdevice), "/dev/tty%02d", VTnum + 1); - else - snprintf (vtdevice, sizeof(vtdevice), "/dev/vt%02d", VTnum); - } - - /* - * Now we can dispose of stdin/stdout - */ - fclose (stdin); - fclose (stdout); - - if (CRTSpecified || isconsole || consdev != 1) { - if (!KeepTty) { - setpgrp(); - } - } - - if ((xf86Info.consoleFd = open(vtdevice, O_RDWR | O_NONBLOCK, 0)) < 0) { - FatalError("xf86OpenConsole: Cannot open %s: %s\n", vtdevice, - strerror(errno)); - } - - xf86Msg (from, "using VT number %d (%s)\n\n", VTnum, vtdevice); - xf86Info.vtno = VTnum; - - /* change ownership of the vt */ - chown(vtdevice, getuid(), getgid()); - - /* - * now get the VT - */ - if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0) { - FatalError("xf86OpenConsole: VT_ACTIVATE failed: %s\n", - strerror(errno)); - } - if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0) { - FatalError("xf86OpenConsole: VT_WAITACTIVE failed: %s\n",strerror(errno)); - } - - if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0) { - FatalError("xf86OpenConsole: VT_GETMODE failed: %s\n", strerror(errno)); - } - - sigvtsw.sa_handler = xf86VTRequest; - sigfillset(&sigvtsw.sa_mask); - sigvtsw.sa_flags = 0; - sigaction(SIGUSR1, &sigvtsw, NULL); - - VT.mode = VT_PROCESS; - VT.relsig = SIGUSR1; - VT.acqsig = SIGUSR1; - - ioctl_ret = ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); - if (ioctl_ret < 0) { - FatalError("xf86OpenConsole: VT_SETMODE failed: %s\n", strerror(errno)); - } - - if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0) { - FatalError("xf86OpenConsole: KD_GRAPHICS failed: %s\n", strerror(errno)); - } - } else { /* serverGeneration != 1 */ - /* - * now get the VT - */ - if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0) { - FatalError("xf86OpenConsole: VT_ACTIVATE failed: %s\n", strerror(errno)); - } - if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0) { - FatalError("xf86OpenConsole: VT_WAITACTIVE failed: %s\n",strerror(errno)); - } - /* - * If the server doesn't have the VT when the reset occurs, - * this is to make sure we don't continue until the activate - * signal is received. - */ - if (!xf86Screens[0]->vtSema) - sleep(5); - } - return; -} - -void -xf86CloseConsole(void) -{ - struct vt_mode VT; - struct sigaction sigvtsw; - - ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT); /* Back to text mode ... */ - - sigvtsw.sa_handler = SIG_DFL; - sigfillset(&sigvtsw.sa_mask); - sigvtsw.sa_flags = 0; - sigaction(SIGUSR1, &sigvtsw, NULL); - - if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1) { - VT.mode = VT_AUTO; - VT.waitv = 0; - ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); /* set dflt vt handling */ - } - close(xf86Info.consoleFd); /* make the vt-manager happy */ - return; -} - -int -xf86ProcessArgument(int argc, char *argv[], int i) -{ - /* - * Keep server from detaching from controlling tty. This is useful - * when debugging (so the server can receive keyboard signals. - */ - if (!strcmp(argv[i], "-keeptty")) { - KeepTty = TRUE; - return(1); - } - - /* - * Undocumented flag to protect page 0 from read/write to help - * catch NULL pointer dereferences. This is purely a debugging - * flag. - */ - if (!strcmp(argv[i], "-protect0")) { - Protect0 = TRUE; - return(1); - } - - if ((argv[i][0] == 'v') && (argv[i][1] == 't')) { - if (sscanf(argv[i], "vt%2d", &VTnum) == 0) { - UseMsg(); - VTnum = -1; - return(0); - } - VTnum -= is_osr6(); - CRTSpecified = TRUE; - return(1); - } - - /* - * Use a device the user specifies. - */ - if (!strcmp(argv[i], "-crt")) { - if (++i > argc) { - UseMsg(); - VTnum = -1; - return(0); - } else { - char *mytty = ttyname(0); - char *arg = argv[i]; - - if (!mytty) - mytty = "\1"; - if (!arg[0]) - arg = "\2"; /* Prevent idiots from using -crt "" */ - - if (strcmp (mytty, arg) != 0) { - char *fmt; - - if (is_osr6()) - fmt = "/dev/tty%02d"; - else - fmt = "/dev/vt%02d"; - - if (sscanf(arg, fmt, &VTnum) == 0) { - UseMsg(); - VTnum = -1; - return(0); - } - - /* OSR6 devices start names at 1, UW7 starts at 0 */ - VTnum -= is_osr6(); - CRTSpecified = TRUE; - } - return(2); - } - } - return(0); -} - -void -xf86UseMsg(void) -{ - if (is_osr6()) { - ErrorF("-crt /dev/ttyXX use the specified VT device\n"); - ErrorF("vtXX use the specified VT number (01-16)\n"); - } else { - ErrorF("-crt /dev/vtXX use the specified VT device\n"); - ErrorF("vtXX use the specified VT number (00-15)\n"); - } - - ErrorF("-keeptty "); - ErrorF("don't detach controlling tty (for debugging only)\n"); - return; -} diff --git a/xorg-server/hw/xfree86/os-support/usl/usl_iop.c b/xorg-server/hw/xfree86/os-support/usl/usl_iop.c deleted file mode 100644 index c6382fc7e..000000000 --- a/xorg-server/hw/xfree86/os-support/usl/usl_iop.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2001,2005 by Kean Johnston - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name Kean Johnston not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Kean Johnston makes no - * representations about the suitability of this software for any purpose. - * It is provided "as is" without express or implied warranty. - * - * KEAN JOHNSTON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEAN JOHNSTON BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF - * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - - -#include "X.h" - -#include "compiler.h" - -#define _NEED_SYSI86 -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86OSpriv.h" -#include "xf86_OSlib.h" - - -/***************************************************************************/ -/* I/O Permissions section */ -/***************************************************************************/ - -static Bool IOEnabled = FALSE; - -_X_EXPORT Bool -xf86EnableIO(void) -{ - if (IOEnabled) - return TRUE; - - if (sysi86(SI86IOPL, 3) < 0) - FatalError("Failed to set IOPL for extended I/O\n"); - IOEnabled = TRUE; - return TRUE; -} - -_X_EXPORT void -xf86DisableIO(void) -{ - if (!IOEnabled) - return; - - sysi86(SI86IOPL, 0); - IOEnabled = FALSE; -} - -/***************************************************************************/ -/* Interrupt Handling section */ -/***************************************************************************/ - -_X_EXPORT Bool -xf86DisableInterrupts(void) -{ - if (!IOEnabled) { - if (sysi86(SI86IOPL, 3) < 0) - return FALSE; - } - -#ifdef __GNUC__ - __asm__ __volatile__("cli"); -#else - asm("cli"); -#endif /* __GNUC__ */ - - if (!IOEnabled) { - sysi86(SI86IOPL, 0); - } - - return(TRUE); -} - -_X_EXPORT void -xf86EnableInterrupts(void) -{ - if (!IOEnabled) { - if (sysi86(SI86IOPL, 3) < 0) - return; - } - -#ifdef __GNUC__ - __asm__ __volatile__("sti"); -#else - asm("sti"); -#endif /* __GNUC__ */ - - if (!IOEnabled) { - sysi86(SI86IOPL, 0); - } -} - diff --git a/xorg-server/hw/xfree86/os-support/usl/usl_mouse.c b/xorg-server/hw/xfree86/os-support/usl/usl_mouse.c deleted file mode 100644 index aa4600f79..000000000 --- a/xorg-server/hw/xfree86/os-support/usl/usl_mouse.c +++ /dev/null @@ -1,177 +0,0 @@ - -/* - * Copyright 2005 Kean Johnston - * Copyright 1999 by The XFree86 Project, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the names of The XFree86 Project, Inc - * and Kean Johnston not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior permission. - * The XFree86 Project, Inc and Kean Johnston make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * THE XFREE86 PROJECT, INC AND KEAN JOHNSTON DISCLAIM ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THOMAS ROELLm DAVID WEXELBLAT - * OR KEAN JOHNSTON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - * - */ - -#include "X.h" -#include "compiler.h" -#include "xf86.h" -#include "xf86Xinput.h" -#include "xf86OSmouse.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" -#include "mipointer.h" - -static int -SupportedInterfaces(void) -{ - return MSE_MISC; -} - -static const char *internalNames[] = { - NULL -}; - -static const char ** -BuiltinNames(void) -{ - return internalNames; -} - -static const char * -DefaultProtocol (void) -{ - return "OSMouse"; -} - -static Bool -CheckProtocol(const char *protocol) -{ - int i; - - for (i = 0; internalNames[i]; i++) - if (xf86NameCmp(protocol, internalNames[i]) == 0) - return TRUE; - return FALSE; -} - -static int -OsMouseProc(DeviceIntPtr pPointer, int what) -{ - InputInfoPtr pInfo; - MouseDevPtr pMse; - unsigned char map[9]; - int ret; - - pInfo = pPointer->public.devicePrivate; - pMse = pInfo->private; - pMse->device = pPointer; - - switch (what) { - case DEVICE_INIT: - pPointer->public.on = FALSE; - - for (ret = 0; ret <= 8; ret++) - map[ret] = ret; - - InitPointerDeviceStruct((DevicePtr)pPointer, map, 8, - miPointerGetMotionEvents, pMse->Ctrl, - miPointerGetMotionBufferSize()); - /* X valuator */ - xf86InitValuatorAxisStruct(pPointer, 0, 0, -1, 1, 0, 1); - xf86InitValuatorDefaults(pPointer, 0); - - /* Y valuator */ - xf86InitValuatorAxisStruct(pPointer, 1, 0, -1, 1, 0, 1); - xf86InitValuatorDefaults(pPointer, 1); - - xf86MotionHistoryAllocate(pInfo); - break; - - case DEVICE_ON: - pMse->lastButtons = 0; - pMse->emulateState = 0; - pPointer->public.on = TRUE; - XqMseOnOff (pInfo, 1); - break; - - case DEVICE_CLOSE: - case DEVICE_OFF: - pPointer->public.on = FALSE; - XqMseOnOff (pInfo, 0); - break; - } - return Success; -} - -static Bool -OsMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags) -{ - MouseDevPtr pMse; - - pMse = pInfo->private; - pMse->protocol = protocol; - xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol); - - /* Collect the options, and process the common options. */ - xf86CollectInputOptions(pInfo, NULL, NULL); - xf86ProcessCommonOptions(pInfo, pInfo->options); - - pInfo->fd = -1; -#if 0 - /* Make sure we can open the mouse */ - pInfo->fd = open ("/dev/mouse", O_RDONLY | O_NONBLOCK); - - if (pInfo->fd < 0) { - if (xf86GetAllowMouseOpenFail()) { - xf86Msg(X_WARNING, "%s: cannot open /dev/mouse (%s)\n", - pInfo->name, strerror(errno)); - } else { - xf86Msg(X_ERROR, "%s: cannot open /dev/mouse (%s)\n", - pInfo->name, strerror(errno)); - xfree(pMse); - return FALSE; - } - } -#endif - - /* Process common mouse options (like Emulate3Buttons, etc). */ - pMse->CommonOptions(pInfo); - - /* Setup the local procs. */ - pInfo->device_control = OsMouseProc; - pInfo->read_input = NULL; - - pInfo->flags |= XI86_CONFIGURED; - return TRUE; -} - -_X_EXPORT OSMouseInfoPtr -xf86OSMouseInit(int flags) -{ - OSMouseInfoPtr p; - - p = xcalloc(sizeof(OSMouseInfoRec), 1); - if (!p) - return NULL; - - p->SupportedInterfaces = SupportedInterfaces; - p->BuiltinNames = BuiltinNames; - p->DefaultProtocol = DefaultProtocol; - p->CheckProtocol = CheckProtocol; - p->PreInit = OsMousePreInit; - return p; -} - diff --git a/xorg-server/hw/xfree86/os-support/usl/usl_video.c b/xorg-server/hw/xfree86/os-support/usl/usl_video.c deleted file mode 100644 index 41abd2259..000000000 --- a/xorg-server/hw/xfree86/os-support/usl/usl_video.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyrught 2005 Kean Johnston - * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany - * Copyright 1993 by David Wexelblat - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the names of Thomas Roell, David Dawes - * and Kean Johnston not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior permission. - * Thomas Roell, David Dawes and Kean Johnston make no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * THOMAS ROELL, DAVID DAWES AND KEAN JOHNSTON DISCLAIM ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THOMAS ROELLm DAVID WEXELBLAT - * OR KEAN JOHNSTON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - * - */ - -#include "X.h" - -#define _NEED_SYSI86 -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" -#include "xf86OSpriv.h" - -#ifndef MAP_FAILED -#define MAP_FAILED ((void *)-1) -#endif - -static Bool -linearVidMem(void) -{ - return TRUE; -} - -static pointer -mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) -{ - pointer base; - int fd; - - fd = open(DEV_MEM, (flags & VIDMEM_READONLY) ? O_RDONLY : O_RDWR); - if (fd < 0) { - FatalError("xf86MapVidMem: failed to open %s (%s)\n", - DEV_MEM, strerror(errno)); - } - base = mmap((caddr_t)0, Size, (flags & VIDMEM_READONLY) ? - PROT_READ : (PROT_READ | PROT_WRITE), - MAP_SHARED, fd, (off_t)Base); - close(fd); - - if (base == MAP_FAILED) { - FatalError("%s: Could not mmap framebuffer [s=%x,a=%x] (%s)\n", - "xf86MapVidMem", Size, Base, strerror(errno)); - } - return(base); -} - -/* ARGSUSED */ -static void -unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) -{ - munmap(Base, Size); -} - -/* - * For some SVR4 versions, a 32-bit read is done for the first location - * in each page when the page is first mapped. If this is done while - * memory access is enabled for regions that have read side-effects, - * this can cause unexpected results, including lockups on some hardware. - * This function is called to make sure each page is mapped while it is - * safe to do so. - */ - -#define X_PAGE_SIZE 4096 - -static void -readSideEffects(int ScreenNum, pointer Base, unsigned long Size) -{ - unsigned long base, end, addr; - CARD32 val; - - base = (unsigned long)Base; - end = base + Size; - - for (addr = base; addr < end; addr += X_PAGE_SIZE) - val = *(volatile CARD32 *)addr; -} - -void -xf86OSInitVidMem(VidMemInfoPtr pVidMem) -{ - pVidMem->linearSupported = linearVidMem(); - pVidMem->mapMem = mapVidMem; - pVidMem->unmapMem = unmapVidMem; - pVidMem->readSideEffects = readSideEffects; - pVidMem->initialised = TRUE; -} - diff --git a/xorg-server/hw/xfree86/os-support/usl/usl_vtsw.c b/xorg-server/hw/xfree86/os-support/usl/usl_vtsw.c deleted file mode 100644 index 812e5bddb..000000000 --- a/xorg-server/hw/xfree86/os-support/usl/usl_vtsw.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2005 by Kean Johnston - * Copyright 1993 by David Wexelblat - * Copyright 1993 by David McCullough - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of David Wexelblat not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. David Wexelblat makes no representations - * about the suitability of this software for any purpose. It is provided - * "as is" without express or implied warranty. - * - * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * - */ - -#include "X.h" - -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" - -/* - * Handle the VT-switching interface for SCO UnixWare / OpenServer 6 - */ - -/* - * This function is the signal handler for the VT-switching signal. It - * is only referenced inside the OS-support layer. NOTE: we do NOT need - * to re-arm the signal here, since we used sigaction() to set the signal - * disposition in usl_init.c. If we had used signal(), we would need to - * re-arm the signal here. All we need to do now is record the fact that - * we got the signal. XFree86 handles the rest. - */ -void -xf86VTRequest(int sig) -{ - xf86Info.vtRequestsPending = TRUE; - return; -} - -Bool -xf86VTSwitchPending(void) -{ - return(xf86Info.vtRequestsPending ? TRUE : FALSE); -} - -static int usl_ledstatus = -1; -static unsigned int usl_ledstate = 0; - -Bool -xf86VTSwitchAway(void) -{ - usl_ledstatus = ioctl(xf86Info.consoleFd, KDGETLED, &usl_ledstate); - - 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 { - if (usl_ledstatus >= 0) { - ioctl (xf86Info.consoleFd, KDSETLED, usl_ledstate); - } - usl_ledstatus = -1; - - /* - * Convince the console driver this screen is in graphics mode, - * otherwise it assumes it can do more to the screen than it should. - */ - if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0) { - ErrorF("Failed to set graphics mode (%s)\n", strerror(errno)); - } - - return TRUE; - } -} diff --git a/xorg-server/hw/xfree86/os-support/xf86OSmouse.h b/xorg-server/hw/xfree86/os-support/xf86OSmouse.h deleted file mode 100644 index 600683866..000000000 --- a/xorg-server/hw/xfree86/os-support/xf86OSmouse.h +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Copyright (c) 1999-2003 by The XFree86 Project, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the copyright holder(s) - * and author(s) shall not be used in advertising or otherwise to promote - * the sale, use or other dealings in this Software without prior written - * authorization from the copyright holder(s) and author(s). - */ - -/* Public interface to OS-specific mouse support. */ - -#ifndef _XF86OSMOUSE_H_ -#define _XF86OSMOUSE_H_ - -#include "xf86Xinput.h" - -/* Mouse interface classes */ -#define MSE_NONE 0x00 -#define MSE_SERIAL 0x01 /* serial port */ -#define MSE_BUS 0x02 /* old bus mouse */ -#define MSE_PS2 0x04 /* standard read-only PS/2 */ -#define MSE_XPS2 0x08 /* extended PS/2 */ -#define MSE_AUTO 0x10 /* auto-detect (PnP) */ -#define MSE_MISC 0x20 /* The OS layer will identify the - * specific protocol names that are - * supported for this class. */ - -/* Mouse Protocol IDs. */ -typedef enum { - PROT_UNKNOWN = -2, - PROT_UNSUP = -1, /* protocol is not supported */ - PROT_MS = 0, - PROT_MSC, - PROT_MM, - PROT_LOGI, - PROT_LOGIMAN, - PROT_MMHIT, - PROT_GLIDE, - PROT_IMSERIAL, - PROT_THINKING, - PROT_ACECAD, - PROT_VALUMOUSESCROLL, - PROT_PS2, - PROT_GENPS2, - PROT_IMPS2, - PROT_EXPPS2, - PROT_THINKPS2, - PROT_MMPS2, - PROT_GLIDEPS2, - PROT_NETPS2, - PROT_NETSCPS2, - PROT_BM, - PROT_AUTO, - PROT_SYSMOUSE, - PROT_NUMPROTOS /* This must always be last. */ -} MouseProtocolID; - -struct _MouseDevRec; - -typedef int (*GetInterfaceTypesProc)(void); -typedef const char **(*BuiltinNamesProc)(void); -typedef Bool (*CheckProtocolProc)(const char *protocol); -typedef Bool (*BuiltinPreInitProc)(InputInfoPtr pInfo, const char *protocol, - int flags); -typedef const char *(*DefaultProtocolProc)(void); -typedef const char *(*SetupAutoProc)(InputInfoPtr pInfo, int *protoPara); -typedef void (*SetResProc)(InputInfoPtr pInfo, const char* protocol, int rate, - int res); -typedef const char *(*FindDeviceProc)(InputInfoPtr pInfo, const char *protocol, - int flags); -typedef const char *(*GuessProtocolProc)(InputInfoPtr pInfo, int flags); - -/* - * OSMouseInfoRec is used to pass information from the OSMouse layer to the - * OS-independent mouse driver. - */ -typedef struct { - GetInterfaceTypesProc SupportedInterfaces; - BuiltinNamesProc BuiltinNames; - CheckProtocolProc CheckProtocol; - BuiltinPreInitProc PreInit; - DefaultProtocolProc DefaultProtocol; - SetupAutoProc SetupAuto; - SetResProc SetPS2Res; - SetResProc SetBMRes; - SetResProc SetMiscRes; - FindDeviceProc FindDevice; - GuessProtocolProc GuessProtocol; -} OSMouseInfoRec, *OSMouseInfoPtr; - -/* - * SupportedInterfaces: Returns the mouse interface types that the OS support. - * If MSE_MISC is returned, then the BuiltinNames and - * CheckProtocol should be set. - * - * BuiltinNames: Returns the names of the protocols that are fully handled - * in the OS-specific code. These are names that don't appear - * directly in the main "mouse" driver. - * - * CheckProtocol: Checks if the protocol name given is supported by the - * OS. It should return TRUE for both "builtin" protocols and - * protocols of type MSE_MISC that are supported by the OS. - * - * PreInit: The PreInit function for protocols that are builtin. This - * function is passed the protocol name. - * - * DefaultProtocol: Returns the name of a default protocol that should be used - * for the OS when none has been supplied in the config file. - * This should only be set when there is a reasonable default. - * - * SetupAuto: This function can be used to do OS-specific protocol - * auto-detection. It returns the name of the detected protocol, - * or NULL when detection fails. It may also adjust one or more - * of the "protoPara" values for the detected protocol by setting - * then to something other than -1. SetupAuto gets called in two - * ways. The first is before any devices have been opened. This - * can be used when the protocol "Auto" always maps to a single - * protocol type. The second is with the device open, allowing - * OS-specific probing to be done. - * - * SetPS2Res: Set the resolution and sample rate for MSE_PS2 and MSE_XPS2 - * protocol types. - * - * SetBMRes: Set the resolution and sample rate for MSE_BM protocol types. - * - * SetMiscRes: Set the resolution and sample rate for MSE_MISC protocol types. - * - * FindDevice: This function gets called when no Device has been specified - * in the config file. OS-specific methods may be used to guess - * which input device to use. This function is called after the - * pre-open attempts at protocol discovery are done, but before - * the device is open. I.e., after the first SetupAuto() call, - * after the DefaultProtocol() call, but before the PreInit() - * call. Available protocol information may be used in locating - * the default input device. - * - * GuessProtocol: A last resort attempt at guessing the mouse protocol by - * whatever OS-specific means might be available. OS-independent - * things should be in the mouse driver. This function gets - * called after the mouse driver's OS-independent methods have - * failed. - */ - -extern OSMouseInfoPtr xf86OSMouseInit(int flags); - -/* Adjust this when the mouse interface changes. */ - -/* - * History: - * - * 1.0.0 - Everything up to when versioning was started. - * 1.1.0 - FindDevice and GuessProtocol added to OSMouseInfoRec - * 1.2.0 - xisbscale added to MouseDevRec - * - */ - -#define OS_MOUSE_VERSION_MAJOR 1 -#define OS_MOUSE_VERSION_MINOR 2 -#define OS_MOUSE_VERSION_PATCH 0 - -#define OS_MOUSE_VERSION_CURRENT \ - BUILTIN_INTERFACE_VERSION_NUMERIC(OS_MOUSE_VERSION_MAJOR, \ - OS_MOUSE_VERSION_MINOR, \ - OS_MOUSE_VERSION_PATCH) - -#define HAVE_GUESS_PROTOCOL \ - (xf86GetBuiltinInterfaceVersion(BUILTIN_IF_OSMOUSE, 0) >= \ - BUILTIN_INTERFACE_VERSION_NUMERIC(1, 1, 0)) - -#define HAVE_FIND_DEVICE \ - (xf86GetBuiltinInterfaceVersion(BUILTIN_IF_OSMOUSE, 0) >= \ - BUILTIN_INTERFACE_VERSION_NUMERIC(1, 1, 0)) - -/* Z axis mapping */ -#define MSE_NOZMAP 0 -#define MSE_MAPTOX -1 -#define MSE_MAPTOY -2 -#define MSE_MAPTOZ -3 -#define MSE_MAPTOW -4 - -/* Generalize for other axes. */ -#define MSE_NOAXISMAP MSE_NOZMAP - -#define MSE_MAXBUTTONS 24 -#define MSE_DFLTBUTTONS 3 - -/* - * Mouse device record. This is shared by the mouse driver and the OSMouse - * layer. - */ - -typedef void (*checkMovementsProc)(InputInfoPtr,int, int); -typedef void (*autoProbeProc)(InputInfoPtr, Bool, Bool); -typedef Bool (*collectDataProc)(struct _MouseDevRec *, unsigned char); -typedef Bool (*dataGoodProc)(struct _MouseDevRec *); - -typedef void (*PostMseEventProc)(InputInfoPtr pInfo, int buttons, - int dx, int dy, int dz, int dw); -typedef void (*MouseCommonOptProc)(InputInfoPtr pInfo); - -typedef struct _MouseDevRec { - PtrCtrlProcPtr Ctrl; - PostMseEventProc PostEvent; - MouseCommonOptProc CommonOptions; - DeviceIntPtr device; - const char * mseDevice; - const char * protocol; - MouseProtocolID protocolID; - MouseProtocolID oldProtocolID; /* hack */ - int class; - int mseModel; - int baudRate; - int oldBaudRate; - int sampleRate; - int lastButtons; - int threshold; /* acceleration */ - int num; - int den; - int buttons; /* # of buttons */ - int emulateState; /* automata state for 2 button mode */ - Bool emulate3Buttons; - Bool emulate3ButtonsSoft; - int emulate3Timeout;/* Timeout for 3 button emulation */ - Bool chordMiddle; - Bool flipXY; - int invX; - int invY; - int mouseFlags; /* Flags to Clear after opening - * mouse dev */ - int truebuttons; /* (not used) - * Arg to maintain before - * emulate3buttons timer callback */ - int resolution; - int negativeZ; /* button mask */ - int positiveZ; /* button mask */ - int negativeW; /* button mask */ - int positiveW; /* button mask */ - pointer buffer; /* usually an XISBuffer* */ - int protoBufTail; - unsigned char protoBuf[8]; - unsigned char protoPara[8]; - unsigned char inSync; /* driver in sync with datastream */ - pointer mousePriv; /* private area */ - InputInfoPtr pInfo; - int origProtocolID; - const char * origProtocol; - Bool emulate3Pending;/* timer waiting */ - CARD32 emulate3Expires;/* time to fire emulation code */ - Bool emulateWheel; - int wheelInertia; - int wheelButton; - int negativeX; /* Button values. Unlike the Z and */ - int positiveX; /* W equivalents, these are button */ - int negativeY; /* values rather than button masks. */ - int positiveY; - int wheelYDistance; - int wheelXDistance; - Bool autoProbe; - checkMovementsProc checkMovements; - autoProbeProc autoProbeMouse; - collectDataProc collectData; - dataGoodProc dataGood; - int angleOffset; - pointer pDragLock; /* drag lock area */ - int xisbscale; /* buffer size for 1 event */ - int wheelButtonTimeout;/* Timeout for the wheel button emulation */ - CARD32 wheelButtonExpires; - int doubleClickSourceButtonMask; - int doubleClickTargetButton; - int doubleClickTargetButtonMask; - int doubleClickOldSourceState; - int lastMappedButtons; - int buttonMap[MSE_MAXBUTTONS]; -} MouseDevRec, *MouseDevPtr; - -#endif /* _XF86OSMOUSE_H_ */ diff --git a/xorg-server/hw/xfree86/os-support/xf86_OSlib.h b/xorg-server/hw/xfree86/os-support/xf86_OSlib.h index aba47581f..48d922301 100644 --- a/xorg-server/hw/xfree86/os-support/xf86_OSlib.h +++ b/xorg-server/hw/xfree86/os-support/xf86_OSlib.h @@ -84,7 +84,6 @@ /* SYSV386 (SVR3, SVR4), including Solaris */ /**************************************************************************/ #if (defined(SYSV) || defined(SVR4)) && \ - !defined(DGUX) && !defined(sgi) && \ (defined(sun) || defined(__i386__)) # ifdef SCO325 # ifndef _SVID3 @@ -99,16 +98,10 @@ # include # include # include -# if defined(__SCO__) || defined(ISC) +# if defined(__SCO__) # include # endif -# ifdef ISC -# define TIOCMSET (TIOC|26) /* set all modem bits */ -# define TIOCMBIS (TIOC|27) /* bis modem bits */ -# define TIOCMBIC (TIOC|28) /* bic modem bits */ -# define TIOCMGET (TIOC|29) /* get all modem bits */ -# endif # include @@ -204,90 +197,13 @@ # define POSIX_TTY # endif /* SVR4 */ -# ifdef ISC -# include -# define POSIX_TTY -# endif # if defined(sun) && (defined (__i386__) || defined(__i386)) && defined (SVR4) && !defined(__SOL8__) # define USE_VT_SYSREQ # define VT_SYSREQ_DEFAULT TRUE # endif -# ifdef SYSV -# if !defined(ISC) || defined(ISC202) || defined(ISC22) -# define NEED_STRERROR -# endif -# endif - -#endif /* (SYSV || SVR4) && !DGUX */ - - - -/**************************************************************************/ -/* DG/ux R4.20MU03 Intel AViion Machines */ -/**************************************************************************/ -#if defined(DGUX) && defined(SVR4) -#include -#include -#include -#include /* Use termios for BSD Flavor ttys */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* Memory handling */ -#include /* definitios for KDENABIO KDDISABIO needed for IOPL s */ -#include -#include -#include -#include -#include - -#include -#include -#include -#include - - -#define POSIX_TTY - -#undef HAS_USL_VTS -#undef USE_VT_SYSREQ -#undef VT_ACKACQ - -#define LED_CAP KBD_LED_CAPS_LOCK -#define LED_NUM KBD_LED_NUM_LOCK -#define LED_SCR KBD_LED_SCROLL_LOCK - -#define KDGKBTYPE KBD_GET_LANGUAGE - - -/* General keyboard types */ -# define KB_84 2 -# define KB_101 1 /* Because ioctl(dgkeybdFd,KBD_GET_LANGUAGE,&type) gives 1=US keyboard */ -# define KB_OTHER 3 - -#define KDSETLED KBD_SET_LED -#define KDGETLED KBD_GET_STATE -#undef KDMKTONE -#define KDMKTONE KBD_TONE_HIGH - - -#undef DEV_MEM -#define DEV_MEM "/dev/mem" -#define CLEARDTR_SUPPORT - -#undef VT_SYSREQ_DEFAULT -#define VT_SYSREQ_DEFAULT FALSE /* Make sure that we dont define any VTs since DG/ux has none */ - -#endif /* DGUX && SVR4 */ +#endif /* (SYSV || SVR4) */ /**************************************************************************/ /* Linux or Glibc-based system */ @@ -299,10 +215,6 @@ # include # include -#ifdef __GNU__ /* GNU/Hurd */ -# define USE_OSMOUSE -#endif - # ifdef __linux__ # include # else /* __GLIBC__ */ @@ -332,46 +244,6 @@ #endif /* __linux__ || __GLIBC__ */ -/**************************************************************************/ -/* LynxOS AT */ -/**************************************************************************/ -#if defined(Lynx) - -# include -# include -# include -# include -# include -# include -# include - -# include -extern int errno; - -/* smem_create et.al. to access physical memory */ -# include - -/* keyboard types */ -# define KB_84 1 -# define KB_101 2 -# define KB_OTHER 3 - -/* atc drivers ignores argument to VT_RELDISP ioctl */ -# define VT_ACKACQ 2 - -# include -# define POSIX_TTY -# define CLEARDTR_SUPPORT - -/* LynxOS 2.5.1 has these */ -# ifdef LED_NUMLOCK -# define LED_CAP LED_CAPSLOCK -# define LED_NUM LED_NUMLOCK -# define LED_SCR LED_SCROLLOCK -# endif - -#endif /* Lynx */ - /**************************************************************************/ /* 386BSD and derivatives, BSD/386 */ /**************************************************************************/ @@ -526,85 +398,9 @@ extern int errno; #endif /* __FreeBSD_kernel__ || __NetBSD__ || __OpenBSD__ || __bsdi__ */ -/**************************************************************************/ -/* QNX4 */ -/**************************************************************************/ -/* This is the QNX code for Watcom 10.6 and QNX 4.x */ -#if defined(QNX4) -#include -#include -#include -#include -#include -#include - -/* Warning: by default, the fd_set size is 32 in QNX! */ -#define FD_SETSIZE 256 -#include - - /* keyboard types */ -# define KB_84 1 -# define KB_101 2 -# define KB_OTHER 3 - - /* LEDs */ -# define LED_CAP 0x04 -# define LED_NUM 0x02 -# define LED_SCR 0x01 - -# define POSIX_TTY -# define OSMOUSE_ONLY -# define MOUSE_PROTOCOL_IN_KERNEL - -#define TIOCM_DTR 0x0001 /* data terminal ready */ -#define TIOCM_RTS 0x0002 /* request to send */ -#define TIOCM_CTS 0x1000 /* clear to send */ -#define TIOCM_DSR 0x2000 /* data set ready */ -#define TIOCM_RI 0x4000 /* ring */ -#define TIOCM_RNG TIOCM_RI -#define TIOCM_CD 0x8000 /* carrier detect */ -#define TIOCM_CAR TIOCM_CD -#define TIOCM_LE 0x0100 /* line enable */ -#define TIOCM_ST 0x0200 /* secondary transmit */ -#define TIOCM_SR 0x0400 /* secondary receive */ - -#endif - -/**************************************************************************/ -/* QNX/Neutrino */ -/**************************************************************************/ -/* This is the Neutrino code for for NTO2.0 and GCC */ -#if defined(__QNXNTO__) -#include -#include -#include -#include -#include -#include - -/* Warning: by default, the fd_set size is 32 in NTO! */ -#define FD_SETSIZE 256 -#include - - /* keyboard types */ -# define KB_84 1 -# define KB_101 2 -# define KB_OTHER 3 - -# define POSIX_TTY - -#endif - /**************************************************************************/ /* IRIX */ /**************************************************************************/ -#if defined(sgi) - -#include -#include -#include - -#endif /**************************************************************************/ /* Generic */ @@ -624,15 +420,14 @@ extern int errno; # define MAXHOSTNAMELEN 32 #endif /* !MAXHOSTNAMELEN */ -#if !defined(X_NOT_POSIX) -# if defined(_POSIX_SOURCE) -# include -# else -# define _POSIX_SOURCE -# include -# undef _POSIX_SOURCE -# endif /* _POSIX_SOURCE */ -#endif /* !X_NOT_POSIX */ +#if defined(_POSIX_SOURCE) +# include +#else +# define _POSIX_SOURCE +# include +# undef _POSIX_SOURCE +#endif /* _POSIX_SOURCE */ + #if !defined(PATH_MAX) # if defined(MAXPATHLEN) # define PATH_MAX MAXPATHLEN @@ -641,21 +436,6 @@ extern int errno; # endif /* MAXPATHLEN */ #endif /* !PATH_MAX */ -#ifdef NEED_STRERROR -# ifndef strerror -extern char *sys_errlist[]; -extern int sys_nerr; -# define strerror(n) \ - ((n) >= 0 && (n) < sys_nerr) ? sys_errlist[n] : "unknown error" -# endif /* !strerror */ -#endif /* NEED_STRERROR */ - -#if defined(ISC) || defined(Lynx) -#define rint(x) RInt(x) -double RInt( - double x -); -#endif #ifndef DEV_MEM #define DEV_MEM "/dev/mem" @@ -665,12 +445,6 @@ double RInt( #define VT_SYSREQ_DEFAULT FALSE #endif -#ifdef OSMOUSE_ONLY -# ifndef MOUSE_PROTOCOL_IN_KERNEL -# define MOUSE_PROTOCOL_IN_KERNEL -# endif -#endif - #define SYSCALL(call) while(((call) == -1) && (errno == EINTR)) #define XF86_OS_PRIVS diff --git a/xorg-server/hw/xfree86/os-support/xf86_OSproc.h b/xorg-server/hw/xfree86/os-support/xf86_OSproc.h index abf5a47c2..b4513d65f 100644 --- a/xorg-server/hw/xfree86/os-support/xf86_OSproc.h +++ b/xorg-server/hw/xfree86/os-support/xf86_OSproc.h @@ -146,18 +146,11 @@ extern void xf86MapReadSideEffects(int, int, pointer, unsigned long); extern int xf86ReadBIOS(unsigned long, unsigned long, unsigned char *, int); extern Bool xf86EnableIO(void); extern void xf86DisableIO(void); -extern Bool xf86DisableInterrupts(void); -extern void xf86EnableInterrupts(void); extern void xf86SetTVOut(int); extern void xf86SetRGBOut(void); extern void xf86OSRingBell(int, int, int); -#if defined(QNX4) -#pragma aux xf86BusToMem modify [eax ebx ecx edx esi edi]; -#pragma aux xf86MemToBus modify [eax ebx ecx edx esi edi]; -#endif extern void xf86BusToMem(unsigned char *, unsigned char *, int); extern void xf86MemToBus(unsigned char *, unsigned char *, int); -extern void xf86IODelay(void); extern void xf86UDelay(long usec); extern void xf86SetReallySlowBcopy(void); extern void xf86SlowBcopy(unsigned char *, unsigned char *, int); diff --git a/xorg-server/hw/xfree86/parser/Configint.h b/xorg-server/hw/xfree86/parser/Configint.h index 684a001fc..815c1a376 100644 --- a/xorg-server/hw/xfree86/parser/Configint.h +++ b/xorg-server/hw/xfree86/parser/Configint.h @@ -100,12 +100,10 @@ LexRec, *LexPtr; #define TestFree(a) if (a) { xf86conffree (a); a = NULL; } #define parsePrologue(typeptr,typerec) typeptr ptr; \ -if( (ptr=(typeptr)xf86confcalloc(1,sizeof(typerec))) == NULL ) { return NULL; } \ -memset(ptr,0,sizeof(typerec)); +if( (ptr=(typeptr)xf86confcalloc(1,sizeof(typerec))) == NULL ) { return NULL; } #define parsePrologueVoid(typeptr,typerec) int token; typeptr ptr; \ -if( (ptr=(typeptr)xf86confcalloc(1,sizeof(typerec))) == NULL ) { return; } \ -memset(ptr,0,sizeof(typerec)); +if( (ptr=(typeptr)xf86confcalloc(1,sizeof(typerec))) == NULL ) { return; } #define HANDLE_RETURN(f,func)\ if ((ptr->f=func) == NULL)\ diff --git a/xorg-server/hw/xfree86/parser/Files.c b/xorg-server/hw/xfree86/parser/Files.c index 3777432b1..c3523024d 100644 --- a/xorg-server/hw/xfree86/parser/Files.c +++ b/xorg-server/hw/xfree86/parser/Files.c @@ -72,6 +72,9 @@ static xf86ConfigSymTabRec FilesTab[] = {MODULEPATH, "modulepath"}, {INPUTDEVICES, "inputdevices"}, {LOGFILEPATH, "logfile"}, + {XKBDIR, "xkbdir"}, + /* Obsolete keywords that aren't used but shouldn't cause errors: */ + {OBSOLETE_TOKEN, "rgbpath"}, {-1, ""}, }; @@ -180,9 +183,18 @@ xf86parseFilesSection (void) Error (QUOTE_MSG, "LogFile"); ptr->file_logfile = val.str; break; + case XKBDIR: + if (xf86getSubToken (&(ptr->file_xkbdir)) != STRING) + Error (QUOTE_MSG, "XkbDir"); + ptr->file_xkbdir = val.str; + break; case EOF_TOKEN: Error (UNEXPECTED_EOF_MSG, NULL); break; + case OBSOLETE_TOKEN: + xf86parseError (OBSOLETE_MSG, xf86tokenString ()); + xf86getSubToken (&(ptr->file_comment)); + break; default: Error (INVALID_KEYWORD_MSG, xf86tokenString ()); break; @@ -255,6 +267,8 @@ xf86printFileSection (FILE * cf, XF86ConfFilesPtr ptr) } fprintf (cf, "\tFontPath \"%s\"\n", s); } + if (ptr->file_xkbdir) + fprintf (cf, "\tXkbDir \"%s\"\n", ptr->file_xkbdir); } void @@ -268,6 +282,7 @@ xf86freeFiles (XF86ConfFilesPtr p) TestFree (p->file_inputdevs); TestFree (p->file_fontpath); TestFree (p->file_comment); + TestFree (p->file_xkbdir); xf86conffree (p); } diff --git a/xorg-server/hw/xfree86/parser/Makefile.am b/xorg-server/hw/xfree86/parser/Makefile.am index 849ee8bab..6ed181461 100644 --- a/xorg-server/hw/xfree86/parser/Makefile.am +++ b/xorg-server/hw/xfree86/parser/Makefile.am @@ -32,10 +32,7 @@ EXTRA_DIST = \ configProcs.h \ xf86Optrec.h \ xf86Parser.h \ - xf86tokens.h \ - cpconfig.c + xf86tokens.h sdk_HEADERS = \ - $(LIBHEADERS) \ - xf86Parser.h \ - xf86Optrec.h + $(LIBHEADERS) diff --git a/xorg-server/hw/xfree86/parser/Makefile.in b/xorg-server/hw/xfree86/parser/Makefile.in index 1298ecdbc..ce3156ec1 100644 --- a/xorg-server/hw/xfree86/parser/Makefile.in +++ b/xorg-server/hw/xfree86/parser/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,7 +45,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -75,9 +74,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -95,8 +91,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -117,10 +114,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -142,6 +135,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -151,18 +145,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -181,7 +172,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -195,7 +186,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -207,8 +201,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -217,8 +210,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -251,7 +244,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -261,27 +253,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -292,10 +269,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -304,13 +277,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -343,8 +311,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -364,7 +331,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -374,12 +340,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -397,8 +363,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ @INSTALL_LIBXF86CONFIG_TRUE@lib_LIBRARIES = libxf86config.a @INSTALL_LIBXF86CONFIG_TRUE@LIBHEADERS = \ @INSTALL_LIBXF86CONFIG_TRUE@ xf86Optrec.h \ @@ -429,13 +393,10 @@ EXTRA_DIST = \ configProcs.h \ xf86Optrec.h \ xf86Parser.h \ - xf86tokens.h \ - cpconfig.c + xf86tokens.h sdk_HEADERS = \ - $(LIBHEADERS) \ - xf86Parser.h \ - xf86Optrec.h + $(LIBHEADERS) all: all-am @@ -445,8 +406,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -579,7 +540,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/parser/cpconfig.c b/xorg-server/hw/xfree86/parser/cpconfig.c deleted file mode 100644 index 0347f7d2a..000000000 --- a/xorg-server/hw/xfree86/parser/cpconfig.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - * - * Copyright (c) 1997 Metro Link Incorporated - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of the Metro Link shall not be - * used in advertising or otherwise to promote the sale, use or other dealings - * in this Software without prior written authorization from Metro Link. - * - */ - -/* View/edit this file with tab stops set to 4 */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include "xf86Parser.h" -#include "configProcs.h" - -#ifdef MALLOC_FUNCTIONS -void -xfree (void *p) -{ - free (p); - return; -} - -void * -xalloc (int size) -{ - return malloc (size); -} - -void * -xrealloc (void *p, int size) -{ - return realloc (p, size); -} - -#endif - -#define CONFPATH "%A,%R,/etc/X11/%R,%P/etc/X11/%R,%E,%F,/etc/X11/%F," \ - "%P/etc/X11/%F,/etc/X11/%X,/etc/%X,%P/etc/X11/%X.%H," \ - "%P/etc/X11/%X,%P/lib/X11/%X.%H,%P/lib/X11/%X" - -int -main (int argc, char *argv[]) -{ - const char *filename; - char *cmdline = NULL; - XF86ConfigPtr conf; - - if (argc > 1) - { - cmdline = argv[1]; - } - if ((filename = xf86openConfigFile (CONFPATH, cmdline, NULL))) - { - fprintf (stderr, "Opened %s for the config file\n", filename); - } - else - { - fprintf (stderr, "Unable to open config file\n"); - exit (1); - } - - if ((conf = xf86readConfigFile ()) == NULL) - { - fprintf (stderr, "Problem when parsing config file\n"); - } - else - { - fprintf (stderr, "Config file parsed OK\n"); - } - xf86closeConfigFile (); - - if (argc > 2) { - fprintf(stderr, "Writing config file to `%s'\n", argv[2]); - xf86writeConfigFile (argv[2], conf); - } - exit(0); -} - -/* Functions that the parser requires */ - -_X_EXPORT void -VErrorF(const char *f, va_list args) -{ - vfprintf(stderr, f, args); -} - -_X_EXPORT void -ErrorF(const char *f, ...) -{ - va_list args; - - va_start(args, f); - vfprintf(stderr, f, args); - va_end(args); -} diff --git a/xorg-server/hw/xfree86/parser/read.c b/xorg-server/hw/xfree86/parser/read.c index 430da0a5a..b044a6af8 100644 --- a/xorg-server/hw/xfree86/parser/read.c +++ b/xorg-server/hw/xfree86/parser/read.c @@ -100,7 +100,6 @@ xf86readConfigFile (void) { return NULL; } - memset (ptr, 0, sizeof (XF86ConfigRec)); while ((token = xf86getToken (TopLevelTab)) != EOF_TOKEN) { diff --git a/xorg-server/hw/xfree86/parser/scan.c b/xorg-server/hw/xfree86/parser/scan.c index 851b91161..7f10c0daa 100644 --- a/xorg-server/hw/xfree86/parser/scan.c +++ b/xorg-server/hw/xfree86/parser/scan.c @@ -66,7 +66,6 @@ #include #include -#if !defined(X_NOT_POSIX) #if defined(_POSIX_SOURCE) #include #else @@ -74,7 +73,7 @@ #include #undef _POSIX_SOURCE #endif /* _POSIX_SOURCE */ -#endif /* !X_NOT_POSIX */ + #if !defined(PATH_MAX) #if defined(MAXPATHLEN) #define PATH_MAX MAXPATHLEN @@ -436,7 +435,7 @@ again: i = 0; do { - configRBuf[++i] = (c = configBuf[configPos++]);; + configRBuf[++i] = (c = configBuf[configPos++]); } while ((c != ' ') && (c != '\t') && (c != '\n') && (c != '\r') && (c != '\0') && (c != '#')); --configPos; diff --git a/xorg-server/hw/xfree86/parser/write.c b/xorg-server/hw/xfree86/parser/write.c index 6589fdc72..3b77b9314 100644 --- a/xorg-server/hw/xfree86/parser/write.c +++ b/xorg-server/hw/xfree86/parser/write.c @@ -68,15 +68,6 @@ #include #include -#if ((defined(sun) && !defined(SVR4)) || defined(macII)) && !defined(__GLIBC__) -#ifndef strerror -extern char *sys_errlist[]; -extern int sys_nerr; -#define strerror(n) \ - (((n) >= 0 && (n) < sys_nerr) ? sys_errlist[n] : "unknown error") -#endif -#endif - #if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED) #define HAS_SAVED_IDS_AND_SETEUID #endif diff --git a/xorg-server/hw/xfree86/parser/xf86Parser.h b/xorg-server/hw/xfree86/parser/xf86Parser.h index fd6cc530b..1c7b285c8 100644 --- a/xorg-server/hw/xfree86/parser/xf86Parser.h +++ b/xorg-server/hw/xfree86/parser/xf86Parser.h @@ -75,6 +75,7 @@ typedef struct char *file_inputdevs; char *file_fontpath; char *file_comment; + char *file_xkbdir; } XF86ConfFilesRec, *XF86ConfFilesPtr; diff --git a/xorg-server/hw/xfree86/parser/xf86tokens.h b/xorg-server/hw/xfree86/parser/xf86tokens.h index 6e4fdeab5..b2d23508d 100644 --- a/xorg-server/hw/xfree86/parser/xf86tokens.h +++ b/xorg-server/hw/xfree86/parser/xf86tokens.h @@ -70,6 +70,7 @@ typedef enum { /* errno-style tokens */ + OBSOLETE_TOKEN = -5, EOF_TOKEN = -4, LOCK_TOKEN = -3, ERROR_TOKEN = -2, @@ -100,6 +101,7 @@ typedef enum { MODULEPATH, INPUTDEVICES, LOGFILEPATH, + XKBDIR, /* Server Flag tokens. These are deprecated in favour of generic Options */ NOTRAPSIGNALS, diff --git a/xorg-server/hw/xfree86/rac/Makefile.am b/xorg-server/hw/xfree86/rac/Makefile.am deleted file mode 100644 index b25068271..000000000 --- a/xorg-server/hw/xfree86/rac/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -noinst_LIBRARIES = librac.a -librac_a_SOURCES = xf86RAC.c - -sdk_HEADERS = xf86RAC.h - -INCLUDES = $(XORG_INCS) - -AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) diff --git a/xorg-server/hw/xfree86/rac/Makefile.in b/xorg-server/hw/xfree86/rac/Makefile.in deleted file mode 100644 index 03a1c920b..000000000 --- a/xorg-server/hw/xfree86/rac/Makefile.in +++ /dev/null @@ -1,674 +0,0 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = hw/xfree86/rac -DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ - $(top_builddir)/include/xorg-server.h \ - $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ - $(top_builddir)/include/xorg-config.h \ - $(top_builddir)/include/xkb-config.h \ - $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h -CONFIG_CLEAN_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -librac_a_AR = $(AR) $(ARFLAGS) -librac_a_LIBADD = -am_librac_a_OBJECTS = xf86RAC.$(OBJEXT) -librac_a_OBJECTS = $(am_librac_a_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(librac_a_SOURCES) -DIST_SOURCES = $(librac_a_SOURCES) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(sdkdir)" -sdkHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(sdk_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ -ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ -APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ -APP_MAN_DIR = @APP_MAN_DIR@ -APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASE_FONT_PATH = @BASE_FONT_PATH@ -BUILD_DATE = @BUILD_DATE@ -BUILD_TIME = @BUILD_TIME@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DARWIN_LIBS = @DARWIN_LIBS@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ -DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ -DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DGA_CFLAGS = @DGA_CFLAGS@ -DGA_LIBS = @DGA_LIBS@ -DIX_CFLAGS = @DIX_CFLAGS@ -DLLTOOL = @DLLTOOL@ -DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ -DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ -DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ -DMXMODULES_LIBS = @DMXMODULES_LIBS@ -DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ -DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ -DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ -DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ -DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ -DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ -DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ -DRIPROTO_LIBS = @DRIPROTO_LIBS@ -DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ -DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ -DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ -DSYMUTIL = @DSYMUTIL@ -DTRACE = @DTRACE@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -FILE_MAN_DIR = @FILE_MAN_DIR@ -FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ -GLX_DEFINES = @GLX_DEFINES@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -HAL_CFLAGS = @HAL_CFLAGS@ -HAL_LIBS = @HAL_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ -KDRIVE_INCS = @KDRIVE_INCS@ -KDRIVE_LIBS = @KDRIVE_LIBS@ -KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ -KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ -KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ -LDFLAGS = @LDFLAGS@ -LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ -LIBDRM_LIBS = @LIBDRM_LIBS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_MAN_DIR = @LIB_MAN_DIR@ -LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ -MISC_MAN_DIR = @MISC_MAN_DIR@ -MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ -MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCCLD = @OBJCCLD@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJCLINK = @OBJCLINK@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ -PCIACCESS_LIBS = @PCIACCESS_LIBS@ -PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ -PERL = @PERL@ -PKG_CONFIG = @PKG_CONFIG@ -PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ -RANLIB = @RANLIB@ -RAWCPP = @RAWCPP@ -RAWCPPFLAGS = @RAWCPPFLAGS@ -SED = @SED@ -SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ -SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ -STRIP = @STRIP@ -TSLIB_CFLAGS = @TSLIB_CFLAGS@ -TSLIB_LIBS = @TSLIB_LIBS@ -UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ -VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ -VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ -X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ -X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ -XDMCP_CFLAGS = @XDMCP_CFLAGS@ -XDMCP_LIBS = @XDMCP_LIBS@ -XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ -XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ -XDMX_CFLAGS = @XDMX_CFLAGS@ -XDMX_LIBS = @XDMX_LIBS@ -XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ -XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ -XEPHYR_INCS = @XEPHYR_INCS@ -XEPHYR_LIBS = @XEPHYR_LIBS@ -XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ -XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ -XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ -XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ -XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ -XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ -XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ -XLIB_CFLAGS = @XLIB_CFLAGS@ -XLIB_LIBS = @XLIB_LIBS@ -XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ -XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ -XNEST_LIBS = @XNEST_LIBS@ -XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ -XORG_CFLAGS = @XORG_CFLAGS@ -XORG_INCS = @XORG_INCS@ -XORG_LIBS = @XORG_LIBS@ -XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ -XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ -XORG_OS = @XORG_OS@ -XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ -XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ -XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ -XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ -XSDL_INCS = @XSDL_INCS@ -XSDL_LIBS = @XSDL_LIBS@ -XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ -XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ -XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ -XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ -XSERVER_LIBS = @XSERVER_LIBS@ -XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ -XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ -XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ -XVFB_LIBS = @XVFB_LIBS@ -XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ -XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ -XWINMODULES_LIBS = @XWINMODULES_LIBS@ -XWIN_LIBS = @XWIN_LIBS@ -XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ -XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -__XCONFIGFILE__ = @__XCONFIGFILE__@ -abi_ansic = @abi_ansic@ -abi_extension = @abi_extension@ -abi_font = @abi_font@ -abi_videodrv = @abi_videodrv@ -abi_xinput = @abi_xinput@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -driverdir = @driverdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -extdir = @extdir@ -ft_config = @ft_config@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -logdir = @logdir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -moduledir = @moduledir@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sdkdir = @sdkdir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ -noinst_LIBRARIES = librac.a -librac_a_SOURCES = xf86RAC.c -sdk_HEADERS = xf86RAC.h -INCLUDES = $(XORG_INCS) -AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/rac/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign hw/xfree86/rac/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -librac.a: $(librac_a_OBJECTS) $(librac_a_DEPENDENCIES) - -rm -f librac.a - $(librac_a_AR) librac.a $(librac_a_OBJECTS) $(librac_a_LIBADD) - $(RANLIB) librac.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RAC.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-sdkHEADERS: $(sdk_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(sdkdir)" || $(MKDIR_P) "$(DESTDIR)$(sdkdir)" - @list='$(sdk_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(sdkHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(sdkdir)/$$f'"; \ - $(sdkHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(sdkdir)/$$f"; \ - done - -uninstall-sdkHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(sdk_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(sdkdir)/$$f'"; \ - rm -f "$(DESTDIR)$(sdkdir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(sdkdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-sdkHEADERS - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-sdkHEADERS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-sdkHEADERS install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-sdkHEADERS - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/xorg-server/hw/xfree86/rac/xf86RAC.c b/xorg-server/hw/xfree86/rac/xf86RAC.c deleted file mode 100644 index 8985f38b0..000000000 --- a/xorg-server/hw/xfree86/rac/xf86RAC.c +++ /dev/null @@ -1,1157 +0,0 @@ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "misc.h" -#include "xf86.h" -#include "xf86_OSproc.h" - -#include -#include "colormapst.h" -#include "scrnintstr.h" -#include "screenint.h" -#include "gcstruct.h" -#include "pixmapstr.h" -#include "pixmap.h" -#include "windowstr.h" -#include "window.h" -#include "xf86str.h" -#include "xf86RAC.h" -#include "mipointer.h" -#include "mipointrst.h" -#ifdef RENDER -# include "picturestr.h" -#endif - -#ifdef DEBUG -#define DPRINT_S(x,y) ErrorF(x ": %i\n",y); -#define DPRINT(x) ErrorF(x "\n"); -#else -#define DPRINT_S(x,y) -#define DPRINT(x) -#endif - -#define WRAP_SCREEN(x,y) {pScreenPriv->x = pScreen->x;\ - pScreen->x = y;} -#define WRAP_SCREEN_COND(x,y,cond) \ - {pScreenPriv->x = pScreen->x;\ - if (flag & (cond))\ - pScreen->x = y;} -#define UNWRAP_SCREEN(x) pScreen->x = pScreenPriv->x - -#define SCREEN_PROLOG(x) pScreen->x = ((RACScreenPtr) \ - dixLookupPrivate(&(pScreen)->devPrivates, RACScreenKey))->x -#define SCREEN_EPILOG(x,y) pScreen->x = y; - -#define WRAP_PICT_COND(x,y,cond) if (ps)\ - {pScreenPriv->x = ps->x;\ - if (flag & (cond))\ - ps->x = y;} -#define UNWRAP_PICT(x) if (ps) {ps->x = pScreenPriv->x;} - -#define PICTURE_PROLOGUE(field) ps->field = \ - ((RACScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, RACScreenKey))->field -#define PICTURE_EPILOGUE(field, wrap) \ - ps->field = wrap - -#define WRAP_SCREEN_INFO(x,y) {pScreenPriv->x = pScrn->x;\ - pScrn->x = y;} -#define WRAP_SCREEN_INFO_COND(x,y,cond) \ - {pScreenPriv->x = pScrn->x;\ - if (flag & (cond))\ - pScrn->x = y;} -#define UNWRAP_SCREEN_INFO(x) pScrn->x = pScreenPriv->x - -#define SPRITE_PROLOG miPointerScreenPtr PointPriv = \ - (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); \ - RACScreenPtr pScreenPriv = \ - ((RACScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, RACScreenKey));\ - PointPriv->spriteFuncs = pScreenPriv->miSprite; -#define SPRITE_EPILOG pScreenPriv->miSprite = PointPriv->spriteFuncs;\ - PointPriv->spriteFuncs = &RACSpriteFuncs; -#define WRAP_SPRITE_COND(cond){pScreenPriv->miSprite = PointPriv->spriteFuncs;\ - if(flag & (cond))\ - PointPriv->spriteFuncs = &RACSpriteFuncs;} -#define UNWRAP_SPRITE PointPriv->spriteFuncs = pScreenPriv->miSprite - - -#define GC_WRAP(x) pGCPriv->wrapOps = (x)->ops;\ - pGCPriv->wrapFuncs = (x)->funcs;\ - (x)->ops = &RACGCOps;\ - (x)->funcs = &RACGCFuncs; -#define GC_UNWRAP(x)\ - RACGCPtr pGCPriv = (RACGCPtr)dixLookupPrivate(&(x)->devPrivates, RACGCKey);\ - (x)->ops = pGCPriv->wrapOps;\ - (x)->funcs = pGCPriv->wrapFuncs; - -#define GC_SCREEN register ScrnInfoPtr pScrn \ - = xf86Screens[pGC->pScreen->myNum] - -#define ENABLE xf86EnableAccess(xf86Screens[pScreen->myNum]) -#define ENABLE_GC xf86EnableAccess(xf86Screens[pGC->pScreen->myNum]) - -typedef struct _RACScreen { - CreateGCProcPtr CreateGC; - CloseScreenProcPtr CloseScreen; - GetImageProcPtr GetImage; - GetSpansProcPtr GetSpans; - SourceValidateProcPtr SourceValidate; - CopyWindowProcPtr CopyWindow; - ClearToBackgroundProcPtr ClearToBackground; - CreatePixmapProcPtr CreatePixmap; - SaveScreenProcPtr SaveScreen; - /* Colormap */ - StoreColorsProcPtr StoreColors; - /* Cursor */ - DisplayCursorProcPtr DisplayCursor; - RealizeCursorProcPtr RealizeCursor; - UnrealizeCursorProcPtr UnrealizeCursor; - RecolorCursorProcPtr RecolorCursor; - SetCursorPositionProcPtr SetCursorPosition; - void (*AdjustFrame)(int,int,int,int); - Bool (*SwitchMode)(int, DisplayModePtr,int); - Bool (*EnterVT)(int, int); - void (*LeaveVT)(int, int); - void (*FreeScreen)(int, int); - miPointerSpriteFuncPtr miSprite; -#ifdef RENDER - CompositeProcPtr Composite; - GlyphsProcPtr Glyphs; - CompositeRectsProcPtr CompositeRects; -#endif -} RACScreenRec, *RACScreenPtr; - -typedef struct _RACGC { - GCOps *wrapOps; - GCFuncs *wrapFuncs; -} RACGCRec, *RACGCPtr; - -/* Screen funcs */ -static Bool RACCloseScreen (int i, ScreenPtr pScreen); -static void RACGetImage (DrawablePtr pDrawable, int sx, int sy, - int w, int h, unsigned int format, - unsigned long planemask, char *pdstLine); -static void RACGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, - int *pwidth, int nspans, char *pdstStart); -static void RACSourceValidate (DrawablePtr pDrawable, - int x, int y, int width, int height ); -static void RACCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, - RegionPtr prgnSrc ); -static void RACClearToBackground (WindowPtr pWin, int x, int y, - int w, int h, Bool generateExposures ); -static PixmapPtr RACCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, - unsigned usage_hint); -static Bool RACCreateGC(GCPtr pGC); -static Bool RACSaveScreen(ScreenPtr pScreen, Bool unblank); -static void RACStoreColors (ColormapPtr pmap, int ndef, xColorItem *pdefs); -static void RACRecolorCursor (ScreenPtr pScreen, CursorPtr pCurs, - Bool displayed); -static Bool RACRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor); -static Bool RACUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor); -static Bool RACDisplayCursor (ScreenPtr pScreen, CursorPtr pCursor); -static Bool RACSetCursorPosition (ScreenPtr pScreen, int x, int y, - Bool generateEvent); -static void RACAdjustFrame(int index, int x, int y, int flags); -static Bool RACSwitchMode(int index, DisplayModePtr mode, int flags); -static Bool RACEnterVT(int index, int flags); -static void RACLeaveVT(int index, int flags); -static void RACFreeScreen(int index, int flags); -/* GC funcs */ -static void RACValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDraw); -static void RACChangeGC(GCPtr pGC, unsigned long mask); -static void RACCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); -static void RACDestroyGC(GCPtr pGC); -static void RACChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects); -static void RACDestroyClip(GCPtr pGC); -static void RACCopyClip(GCPtr pgcDst, GCPtr pgcSrc); -/* GC ops */ -static void RACFillSpans( DrawablePtr pDraw, GC *pGC, int nInit, - DDXPointPtr pptInit, int *pwidthInit, int fSorted ); -static void RACSetSpans(DrawablePtr pDraw, GCPtr pGC, char *pcharsrc, - register DDXPointPtr ppt, int *pwidth, int nspans, - int fSorted ); -static void RACPutImage(DrawablePtr pDraw, GCPtr pGC, int depth, - int x, int y, int w, int h, int leftPad, - int format, char *pImage ); -static RegionPtr RACCopyArea(DrawablePtr pSrc, DrawablePtr pDst, - GC *pGC, int srcx, int srcy, - int width, int height, - int dstx, int dsty ); -static RegionPtr RACCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, - GCPtr pGC, int srcx, int srcy, - int width, int height, int dstx, int dsty, - unsigned long bitPlane ); -static void RACPolyPoint(DrawablePtr pDraw, GCPtr pGC, int mode, - int npt, xPoint *pptInit ); -static void RACPolylines(DrawablePtr pDraw, GCPtr pGC, int mode, - int npt, DDXPointPtr pptInit ); -static void RACPolySegment(DrawablePtr pDraw, GCPtr pGC, int nseg, - xSegment *pSeg ); -static void RACPolyRectangle(DrawablePtr pDraw, GCPtr pGC, int nRectsInit, - xRectangle *pRectsInit ); -static void RACPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, - xArc *parcs ); -static void RACFillPolygon(DrawablePtr pDraw, GCPtr pGC, int shape, int mode, - int count, DDXPointPtr ptsIn ); -static void RACPolyFillRect( DrawablePtr pDraw, GCPtr pGC, int nrectFill, - xRectangle *prectInit ); -static void RACPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs, - xArc *parcs ); -static int RACPolyText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, - int count, char *chars ); -static int RACPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, - int count, unsigned short *chars ); -static void RACImageText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, - int count, char *chars ); -static void RACImageText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, - int count, unsigned short *chars ); -static void RACImageGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit, - int yInit, unsigned int nglyph, - CharInfoPtr *ppci, pointer pglyphBase ); -static void RACPolyGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit, - int yInit, unsigned int nglyph, - CharInfoPtr *ppci, pointer pglyphBase ); -static void RACPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDraw, - int dx, int dy, int xOrg, int yOrg ); -/* miSpriteFuncs */ -static Bool RACSpriteRealizeCursor(ScreenPtr pScreen, CursorPtr pCur); -static Bool RACSpriteUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCur); -static void RACSpriteSetCursor(ScreenPtr pScreen, CursorPtr pCur, - int x, int y); -static void RACSpriteMoveCursor(ScreenPtr pScreen, int x, int y); -#ifdef RENDER -static void RACComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, - PicturePtr pDst, INT16 xSrc, INT16 ySrc, - INT16 xMask, INT16 yMask, INT16 xDst, - INT16 yDst, CARD16 width, CARD16 height); -static void RACGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, - PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, - int nlist, GlyphListPtr list, GlyphPtr *glyphs); -static void RACCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color, - int nRect, xRectangle *rects); -#endif - -static GCFuncs RACGCFuncs = { - RACValidateGC, RACChangeGC, RACCopyGC, RACDestroyGC, - RACChangeClip, RACDestroyClip, RACCopyClip -}; - -static GCOps RACGCOps = { - RACFillSpans, RACSetSpans, RACPutImage, RACCopyArea, - RACCopyPlane, RACPolyPoint, RACPolylines, RACPolySegment, - RACPolyRectangle, RACPolyArc, RACFillPolygon, RACPolyFillRect, - RACPolyFillArc, RACPolyText8, RACPolyText16, RACImageText8, - RACImageText16, RACImageGlyphBlt, RACPolyGlyphBlt, RACPushPixels, - {NULL} /* devPrivate */ -}; - -static miPointerSpriteFuncRec RACSpriteFuncs = { - RACSpriteRealizeCursor, RACSpriteUnrealizeCursor, RACSpriteSetCursor, - RACSpriteMoveCursor -}; - -static DevPrivateKey RACScreenKey = &RACScreenKey; -static DevPrivateKey RACGCKey = &RACGCKey; - - -Bool -xf86RACInit(ScreenPtr pScreen, unsigned int flag) -{ - ScrnInfoPtr pScrn; - RACScreenPtr pScreenPriv; - miPointerScreenPtr PointPriv; -#ifdef RENDER - PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); -#endif - - pScrn = xf86Screens[pScreen->myNum]; - PointPriv = (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miPointerScreenKey); - DPRINT_S("RACInit",pScreen->myNum); - - if (!dixRequestPrivate(RACGCKey, sizeof(RACGCRec))) - return FALSE; - - if (!(pScreenPriv = xalloc(sizeof(RACScreenRec)))) - return FALSE; - - dixSetPrivate(&pScreen->devPrivates, RACScreenKey, pScreenPriv); - - WRAP_SCREEN(CloseScreen, RACCloseScreen); - WRAP_SCREEN(SaveScreen, RACSaveScreen); - WRAP_SCREEN_COND(CreateGC, RACCreateGC, RAC_FB); - WRAP_SCREEN_COND(GetImage, RACGetImage, RAC_FB); - WRAP_SCREEN_COND(GetSpans, RACGetSpans, RAC_FB); - WRAP_SCREEN_COND(SourceValidate, RACSourceValidate, RAC_FB); - WRAP_SCREEN_COND(CopyWindow, RACCopyWindow, RAC_FB); - WRAP_SCREEN_COND(ClearToBackground, RACClearToBackground, RAC_FB); - WRAP_SCREEN_COND(CreatePixmap, RACCreatePixmap, RAC_FB); - WRAP_SCREEN_COND(StoreColors, RACStoreColors, RAC_COLORMAP); - WRAP_SCREEN_COND(DisplayCursor, RACDisplayCursor, RAC_CURSOR); - WRAP_SCREEN_COND(RealizeCursor, RACRealizeCursor, RAC_CURSOR); - WRAP_SCREEN_COND(UnrealizeCursor, RACUnrealizeCursor, RAC_CURSOR); - WRAP_SCREEN_COND(RecolorCursor, RACRecolorCursor, RAC_CURSOR); - WRAP_SCREEN_COND(SetCursorPosition, RACSetCursorPosition, RAC_CURSOR); -#ifdef RENDER - WRAP_PICT_COND(Composite,RACComposite,RAC_FB); - WRAP_PICT_COND(Glyphs,RACGlyphs,RAC_FB); - WRAP_PICT_COND(CompositeRects,RACCompositeRects,RAC_FB); -#endif - WRAP_SCREEN_INFO_COND(AdjustFrame, RACAdjustFrame, RAC_VIEWPORT); - WRAP_SCREEN_INFO(SwitchMode, RACSwitchMode); - WRAP_SCREEN_INFO(EnterVT, RACEnterVT); - WRAP_SCREEN_INFO(LeaveVT, RACLeaveVT); - WRAP_SCREEN_INFO(FreeScreen, RACFreeScreen); - WRAP_SPRITE_COND(RAC_CURSOR); - - return TRUE; -} - -/* Screen funcs */ -static Bool -RACCloseScreen (int i, ScreenPtr pScreen) -{ - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( - &pScreen->devPrivates, RACScreenKey); - miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate( - &pScreen->devPrivates, miPointerScreenKey); -#ifdef RENDER - PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); -#endif - - DPRINT_S("RACCloseScreen",pScreen->myNum); - UNWRAP_SCREEN(CreateGC); - UNWRAP_SCREEN(CloseScreen); - UNWRAP_SCREEN(GetImage); - UNWRAP_SCREEN(GetSpans); - UNWRAP_SCREEN(SourceValidate); - UNWRAP_SCREEN(CopyWindow); - UNWRAP_SCREEN(ClearToBackground); - UNWRAP_SCREEN(SaveScreen); - UNWRAP_SCREEN(StoreColors); - UNWRAP_SCREEN(DisplayCursor); - UNWRAP_SCREEN(RealizeCursor); - UNWRAP_SCREEN(UnrealizeCursor); - UNWRAP_SCREEN(RecolorCursor); - UNWRAP_SCREEN(SetCursorPosition); -#ifdef RENDER - UNWRAP_PICT(Composite); - UNWRAP_PICT(Glyphs); - UNWRAP_PICT(CompositeRects); -#endif - UNWRAP_SCREEN_INFO(AdjustFrame); - UNWRAP_SCREEN_INFO(SwitchMode); - UNWRAP_SCREEN_INFO(EnterVT); - UNWRAP_SCREEN_INFO(LeaveVT); - UNWRAP_SCREEN_INFO(FreeScreen); - UNWRAP_SPRITE; - - xfree ((pointer) pScreenPriv); - - if (xf86Screens[pScreen->myNum]->vtSema) { - xf86EnterServerState(SETUP); - ENABLE; - } - return (*pScreen->CloseScreen) (i, pScreen); -} - -static void -RACGetImage ( - DrawablePtr pDrawable, - int sx, int sy, int w, int h, - unsigned int format, - unsigned long planemask, - char *pdstLine - ) -{ - ScreenPtr pScreen = pDrawable->pScreen; - DPRINT_S("RACGetImage",pScreen->myNum); - SCREEN_PROLOG(GetImage); - if (xf86Screens[pScreen->myNum]->vtSema) { - ENABLE; - } - (*pScreen->GetImage) (pDrawable, sx, sy, w, h, - format, planemask, pdstLine); - SCREEN_EPILOG (GetImage, RACGetImage); -} - -static void -RACGetSpans ( - DrawablePtr pDrawable, - int wMax, - DDXPointPtr ppt, - int *pwidth, - int nspans, - char *pdstStart - ) -{ - ScreenPtr pScreen = pDrawable->pScreen; - - DPRINT_S("RACGetSpans",pScreen->myNum); - SCREEN_PROLOG (GetSpans); - ENABLE; - (*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart); - SCREEN_EPILOG (GetSpans, RACGetSpans); -} - -static void -RACSourceValidate ( - DrawablePtr pDrawable, - int x, int y, int width, int height ) -{ - ScreenPtr pScreen = pDrawable->pScreen; - DPRINT_S("RACSourceValidate",pScreen->myNum); - SCREEN_PROLOG (SourceValidate); - ENABLE; - if (pScreen->SourceValidate) - (*pScreen->SourceValidate) (pDrawable, x, y, width, height); - SCREEN_EPILOG (SourceValidate, RACSourceValidate); -} - -static void -RACCopyWindow( - WindowPtr pWin, - DDXPointRec ptOldOrg, - RegionPtr prgnSrc ) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - - DPRINT_S("RACCopyWindow",pScreen->myNum); - SCREEN_PROLOG (CopyWindow); - ENABLE; - (*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc); - SCREEN_EPILOG (CopyWindow, RACCopyWindow); -} - -static void -RACClearToBackground ( - WindowPtr pWin, - int x, int y, - int w, int h, - Bool generateExposures ) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - - DPRINT_S("RACClearToBackground",pScreen->myNum); - SCREEN_PROLOG ( ClearToBackground); - ENABLE; - (*pScreen->ClearToBackground) (pWin, x, y, w, h, generateExposures); - SCREEN_EPILOG (ClearToBackground, RACClearToBackground); -} - -static PixmapPtr -RACCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint) -{ - PixmapPtr pPix; - - DPRINT_S("RACCreatePixmap",pScreen->myNum); - SCREEN_PROLOG ( CreatePixmap); - ENABLE; - pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, usage_hint); - SCREEN_EPILOG (CreatePixmap, RACCreatePixmap); - - return pPix; -} - -static Bool -RACSaveScreen(ScreenPtr pScreen, Bool unblank) -{ - Bool val; - - DPRINT_S("RACSaveScreen",pScreen->myNum); - SCREEN_PROLOG (SaveScreen); - ENABLE; - val = (*pScreen->SaveScreen) (pScreen, unblank); - SCREEN_EPILOG (SaveScreen, RACSaveScreen); - - return val; -} - -static void -RACStoreColors ( - ColormapPtr pmap, - int ndef, - xColorItem *pdefs) -{ - ScreenPtr pScreen = pmap->pScreen; - - DPRINT_S("RACStoreColors",pScreen->myNum); - SCREEN_PROLOG (StoreColors); - ENABLE; - (*pScreen->StoreColors) (pmap,ndef,pdefs); - - SCREEN_EPILOG ( StoreColors, RACStoreColors); -} - -static void -RACRecolorCursor ( - ScreenPtr pScreen, - CursorPtr pCurs, - Bool displayed - ) -{ - DPRINT_S("RACRecolorCursor",pScreen->myNum); - SCREEN_PROLOG (RecolorCursor); - ENABLE; - (*pScreen->RecolorCursor) (pScreen,pCurs,displayed); - - SCREEN_EPILOG ( RecolorCursor, RACRecolorCursor); -} - -static Bool -RACRealizeCursor ( - ScreenPtr pScreen, - CursorPtr pCursor - ) -{ - Bool val; - - DPRINT_S("RACRealizeCursor",pScreen->myNum); - SCREEN_PROLOG (RealizeCursor); - ENABLE; - val = (*pScreen->RealizeCursor) (pScreen,pCursor); - - SCREEN_EPILOG ( RealizeCursor, RACRealizeCursor); - return val; -} - -static Bool -RACUnrealizeCursor ( - ScreenPtr pScreen, - CursorPtr pCursor - ) -{ - Bool val; - - DPRINT_S("RACUnrealizeCursor",pScreen->myNum); - SCREEN_PROLOG (UnrealizeCursor); - ENABLE; - val = (*pScreen->UnrealizeCursor) (pScreen,pCursor); - - SCREEN_EPILOG ( UnrealizeCursor, RACUnrealizeCursor); - return val; -} - -static Bool -RACDisplayCursor ( - ScreenPtr pScreen, - CursorPtr pCursor - ) -{ - Bool val; - - DPRINT_S("RACDisplayCursor",pScreen->myNum); - SCREEN_PROLOG (DisplayCursor); - ENABLE; - val = (*pScreen->DisplayCursor) (pScreen,pCursor); - - SCREEN_EPILOG ( DisplayCursor, RACDisplayCursor); - return val; -} - -static Bool -RACSetCursorPosition ( - ScreenPtr pScreen, - int x, int y, - Bool generateEvent) -{ - Bool val; - - DPRINT_S("RACSetCursorPosition",pScreen->myNum); - SCREEN_PROLOG (SetCursorPosition); - ENABLE; - val = (*pScreen->SetCursorPosition) (pScreen,x,y,generateEvent); - - SCREEN_EPILOG ( SetCursorPosition, RACSetCursorPosition); - return val; -} - -static void -RACAdjustFrame(int index, int x, int y, int flags) -{ - ScreenPtr pScreen = screenInfo.screens[index]; - RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( - &pScreen->devPrivates, RACScreenKey); - - DPRINT_S("RACAdjustFrame",index); - xf86EnableAccess(xf86Screens[index]); - - (*pScreenPriv->AdjustFrame)(index, x, y, flags); -} - -static Bool -RACSwitchMode(int index, DisplayModePtr mode, int flags) -{ - ScreenPtr pScreen = screenInfo.screens[index]; - RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( - &pScreen->devPrivates, RACScreenKey); - - DPRINT_S("RACSwitchMode",index); - xf86EnableAccess(xf86Screens[index]); - - return (*pScreenPriv->SwitchMode)(index, mode, flags); -} - -static Bool -RACEnterVT(int index, int flags) -{ - ScreenPtr pScreen = screenInfo.screens[index]; - RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( - &pScreen->devPrivates, RACScreenKey); - - DPRINT_S("RACEnterVT",index); - xf86EnableAccess(xf86Screens[index]); - - return (*pScreenPriv->EnterVT)(index, flags); -} - -static void -RACLeaveVT(int index, int flags) -{ - ScreenPtr pScreen = screenInfo.screens[index]; - RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( - &pScreen->devPrivates, RACScreenKey); - - DPRINT_S("RACLeaveVT",index); - xf86EnableAccess(xf86Screens[index]); - - (*pScreenPriv->LeaveVT)(index, flags); -} - -static void -RACFreeScreen(int index, int flags) -{ - ScreenPtr pScreen = screenInfo.screens[index]; - RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( - &pScreen->devPrivates, RACScreenKey); - - DPRINT_S("RACFreeScreen",index); - xf86EnableAccess(xf86Screens[index]); - - (*pScreenPriv->FreeScreen)(index, flags); -} - -static Bool -RACCreateGC(GCPtr pGC) -{ - ScreenPtr pScreen = pGC->pScreen; - RACGCPtr pGCPriv = (RACGCPtr)dixLookupPrivate(&pGC->devPrivates, RACGCKey); - Bool ret; - - DPRINT_S("RACCreateGC",pScreen->myNum); - SCREEN_PROLOG(CreateGC); - - ret = (*pScreen->CreateGC)(pGC); - - GC_WRAP(pGC); - SCREEN_EPILOG(CreateGC,RACCreateGC); - - return ret; -} - -/* GC funcs */ -static void -RACValidateGC( - GCPtr pGC, - unsigned long changes, - DrawablePtr pDraw ) -{ - GC_UNWRAP(pGC); - DPRINT("RACValidateGC"); - (*pGC->funcs->ValidateGC)(pGC, changes, pDraw); - GC_WRAP(pGC); -} - - -static void -RACDestroyGC(GCPtr pGC) -{ - GC_UNWRAP (pGC); - DPRINT("RACDestroyGC"); - (*pGC->funcs->DestroyGC)(pGC); - GC_WRAP (pGC); -} - -static void -RACChangeGC ( - GCPtr pGC, - unsigned long mask) -{ - GC_UNWRAP (pGC); - DPRINT("RACChangeGC"); - (*pGC->funcs->ChangeGC) (pGC, mask); - GC_WRAP (pGC); -} - -static void -RACCopyGC ( - GCPtr pGCSrc, - unsigned long mask, - GCPtr pGCDst) -{ - GC_UNWRAP (pGCDst); - DPRINT("RACCopyGC"); - (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); - GC_WRAP (pGCDst); -} - -static void -RACChangeClip ( - GCPtr pGC, - int type, - pointer pvalue, - int nrects ) -{ - GC_UNWRAP (pGC); - DPRINT("RACChangeClip"); - (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); - GC_WRAP (pGC); -} - -static void -RACCopyClip(GCPtr pgcDst, GCPtr pgcSrc) -{ - GC_UNWRAP (pgcDst); - DPRINT("RACCopyClip"); - (* pgcDst->funcs->CopyClip)(pgcDst, pgcSrc); - GC_WRAP (pgcDst); -} - -static void -RACDestroyClip(GCPtr pGC) -{ - GC_UNWRAP (pGC); - DPRINT("RACDestroyClip"); - (* pGC->funcs->DestroyClip)(pGC); - GC_WRAP (pGC); -} - -/* GC Ops */ -static void -RACFillSpans( - DrawablePtr pDraw, - GC *pGC, - int nInit, - DDXPointPtr pptInit, - int *pwidthInit, - int fSorted ) -{ - GC_UNWRAP(pGC); - DPRINT("RACFillSpans"); - ENABLE_GC; - (*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted); - GC_WRAP(pGC); -} - -static void -RACSetSpans( - DrawablePtr pDraw, - GCPtr pGC, - char *pcharsrc, - register DDXPointPtr ppt, - int *pwidth, - int nspans, - int fSorted ) -{ - GC_UNWRAP(pGC); - DPRINT("RACSetSpans"); - ENABLE_GC; - (*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, ppt, pwidth, nspans, fSorted); - GC_WRAP(pGC); -} - -static void -RACPutImage( - DrawablePtr pDraw, - GCPtr pGC, - int depth, - int x, int y, int w, int h, - int leftPad, - int format, - char *pImage ) -{ - GC_UNWRAP(pGC); - DPRINT("RACPutImage"); - ENABLE_GC; - (*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h, - leftPad, format, pImage); - GC_WRAP(pGC); -} - -static RegionPtr -RACCopyArea( - DrawablePtr pSrc, - DrawablePtr pDst, - GC *pGC, - int srcx, int srcy, - int width, int height, - int dstx, int dsty ) -{ - RegionPtr ret; - - GC_UNWRAP(pGC); - DPRINT("RACCopyArea"); - ENABLE_GC; - ret = (*pGC->ops->CopyArea)(pSrc, pDst, - pGC, srcx, srcy, width, height, dstx, dsty); - GC_WRAP(pGC); - return ret; -} - -static RegionPtr -RACCopyPlane( - DrawablePtr pSrc, - DrawablePtr pDst, - GCPtr pGC, - int srcx, int srcy, - int width, int height, - int dstx, int dsty, - unsigned long bitPlane ) -{ - RegionPtr ret; - - GC_UNWRAP(pGC); - DPRINT("RACCopyPlane"); - ENABLE_GC; - ret = (*pGC->ops->CopyPlane)(pSrc, pDst, pGC, srcx, srcy, - width, height, dstx, dsty, bitPlane); - GC_WRAP(pGC); - return ret; -} - -static void -RACPolyPoint( - DrawablePtr pDraw, - GCPtr pGC, - int mode, - int npt, - xPoint *pptInit ) -{ - GC_UNWRAP(pGC); - DPRINT("RACPolyPoint"); - ENABLE_GC; - (*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit); - GC_WRAP(pGC); -} - - -static void -RACPolylines( - DrawablePtr pDraw, - GCPtr pGC, - int mode, - int npt, - DDXPointPtr pptInit ) -{ - GC_UNWRAP(pGC); - DPRINT("RACPolylines"); - ENABLE_GC; - (*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit); - GC_WRAP(pGC); -} - -static void -RACPolySegment( - DrawablePtr pDraw, - GCPtr pGC, - int nseg, - xSegment *pSeg ) -{ - GC_UNWRAP(pGC); - DPRINT("RACPolySegment"); - ENABLE_GC; - (*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg); - GC_WRAP(pGC); -} - -static void -RACPolyRectangle( - DrawablePtr pDraw, - GCPtr pGC, - int nRectsInit, - xRectangle *pRectsInit ) -{ - GC_UNWRAP(pGC); - DPRINT("RACPolyRectangle"); - ENABLE_GC; - (*pGC->ops->PolyRectangle)(pDraw, pGC, nRectsInit, pRectsInit); - GC_WRAP(pGC); -} - -static void -RACPolyArc( - DrawablePtr pDraw, - GCPtr pGC, - int narcs, - xArc *parcs ) -{ - GC_UNWRAP(pGC); - DPRINT("RACPolyArc"); - ENABLE_GC; - (*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs); - GC_WRAP(pGC); -} - -static void -RACFillPolygon( - DrawablePtr pDraw, - GCPtr pGC, - int shape, - int mode, - int count, - DDXPointPtr ptsIn ) -{ - GC_UNWRAP(pGC); - DPRINT("RACFillPolygon"); - ENABLE_GC; - (*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, ptsIn); - GC_WRAP(pGC); -} - - -static void -RACPolyFillRect( - DrawablePtr pDraw, - GCPtr pGC, - int nrectFill, - xRectangle *prectInit ) -{ - GC_UNWRAP(pGC); - DPRINT("RACPolyFillRect"); - ENABLE_GC; - (*pGC->ops->PolyFillRect)(pDraw, pGC, nrectFill, prectInit); - GC_WRAP(pGC); -} - - -static void -RACPolyFillArc( - DrawablePtr pDraw, - GCPtr pGC, - int narcs, - xArc *parcs ) -{ - GC_UNWRAP(pGC); - DPRINT("RACPolyFillArc"); - ENABLE_GC; - (*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs); - GC_WRAP(pGC); -} - -static int -RACPolyText8( - DrawablePtr pDraw, - GCPtr pGC, - int x, - int y, - int count, - char *chars ) -{ - int ret; - - GC_UNWRAP(pGC); - DPRINT("RACPolyText8"); - ENABLE_GC; - ret = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars); - GC_WRAP(pGC); - return ret; -} - -static int -RACPolyText16( - DrawablePtr pDraw, - GCPtr pGC, - int x, - int y, - int count, - unsigned short *chars ) -{ - int ret; - - GC_UNWRAP(pGC); - DPRINT("RACPolyText16"); - ENABLE_GC; - ret = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars); - GC_WRAP(pGC); - return ret; -} - -static void -RACImageText8( - DrawablePtr pDraw, - GCPtr pGC, - int x, - int y, - int count, - char *chars ) -{ - GC_UNWRAP(pGC); - DPRINT("RACImageText8"); - ENABLE_GC; - (*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars); - GC_WRAP(pGC); -} - -static void -RACImageText16( - DrawablePtr pDraw, - GCPtr pGC, - int x, - int y, - int count, - unsigned short *chars ) -{ - GC_UNWRAP(pGC); - DPRINT("RACImageText16"); - ENABLE_GC; - (*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars); - GC_WRAP(pGC); -} - - -static void -RACImageGlyphBlt( - DrawablePtr pDraw, - GCPtr pGC, - int xInit, int yInit, - unsigned int nglyph, - CharInfoPtr *ppci, - pointer pglyphBase ) -{ - GC_UNWRAP(pGC); - DPRINT("RACImageGlyphBlt"); - ENABLE_GC; - (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, xInit, yInit, - nglyph, ppci, pglyphBase); - GC_WRAP(pGC); -} - -static void -RACPolyGlyphBlt( - DrawablePtr pDraw, - GCPtr pGC, - int xInit, int yInit, - unsigned int nglyph, - CharInfoPtr *ppci, - pointer pglyphBase ) -{ - GC_UNWRAP(pGC); - DPRINT("RACPolyGlyphBlt"); - ENABLE_GC; - (*pGC->ops->PolyGlyphBlt)(pDraw, pGC, xInit, yInit, - nglyph, ppci, pglyphBase); - GC_WRAP(pGC); -} - -static void -RACPushPixels( - GCPtr pGC, - PixmapPtr pBitMap, - DrawablePtr pDraw, - int dx, int dy, int xOrg, int yOrg ) -{ - GC_UNWRAP(pGC); - DPRINT("RACPushPixels"); - ENABLE_GC; - (*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg); - GC_WRAP(pGC); -} - - -/* miSpriteFuncs */ -static Bool -RACSpriteRealizeCursor(ScreenPtr pScreen, CursorPtr pCur) -{ - Bool val; - SPRITE_PROLOG; - DPRINT_S("RACSpriteRealizeCursor",pScreen->myNum); - ENABLE; - val = PointPriv->spriteFuncs->RealizeCursor(pScreen, pCur); - SPRITE_EPILOG; - return val; -} - -static Bool -RACSpriteUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCur) -{ - Bool val; - SPRITE_PROLOG; - DPRINT_S("RACSpriteUnrealizeCursor",pScreen->myNum); - ENABLE; - val = PointPriv->spriteFuncs->UnrealizeCursor(pScreen, pCur); - SPRITE_EPILOG; - return val; -} - -static void -RACSpriteSetCursor(ScreenPtr pScreen, CursorPtr pCur, int x, int y) -{ - SPRITE_PROLOG; - DPRINT_S("RACSpriteSetCursor",pScreen->myNum); - ENABLE; - PointPriv->spriteFuncs->SetCursor(pScreen, pCur, x, y); - SPRITE_EPILOG; -} - -static void -RACSpriteMoveCursor(ScreenPtr pScreen, int x, int y) -{ - SPRITE_PROLOG; - DPRINT_S("RACSpriteMoveCursor",pScreen->myNum); - ENABLE; - PointPriv->spriteFuncs->MoveCursor(pScreen, x, y); - SPRITE_EPILOG; -} - -#ifdef RENDER -static void -RACComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, - PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, - INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, - CARD16 height) -{ - ScreenPtr pScreen = pDst->pDrawable->pScreen; - PictureScreenPtr ps = GetPictureScreen(pScreen); - - PICTURE_PROLOGUE(Composite); - - ENABLE; - (*ps->Composite) (op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, - yDst, width, height); - - PICTURE_EPILOGUE(Composite, RACComposite); -} - -static void -RACGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, - PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, - GlyphListPtr list, GlyphPtr *glyphs) -{ - ScreenPtr pScreen = pDst->pDrawable->pScreen; - PictureScreenPtr ps = GetPictureScreen(pScreen); - - PICTURE_PROLOGUE(Glyphs); - - ENABLE; - (*ps->Glyphs)(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); - - PICTURE_EPILOGUE (Glyphs, RACGlyphs); -} - -static void -RACCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color, int nRect, - xRectangle *rects) -{ - ScreenPtr pScreen = pDst->pDrawable->pScreen; - PictureScreenPtr ps = GetPictureScreen(pScreen); - - PICTURE_PROLOGUE(CompositeRects); - - ENABLE; - (*ps->CompositeRects)(op, pDst, color, nRect, rects); - - PICTURE_EPILOGUE (CompositeRects, RACCompositeRects); -} -#endif - diff --git a/xorg-server/hw/xfree86/rac/xf86RAC.h b/xorg-server/hw/xfree86/rac/xf86RAC.h deleted file mode 100644 index 366c21485..000000000 --- a/xorg-server/hw/xfree86/rac/xf86RAC.h +++ /dev/null @@ -1,17 +0,0 @@ - -#ifndef __XF86RAC_H -#define __XF86RAC_H 1 - -#include "screenint.h" -#include "misc.h" -#include "xf86.h" - -Bool xf86RACInit(ScreenPtr pScreen, unsigned int flag); - -/* flags */ -#define RAC_FB 0x01 -#define RAC_CURSOR 0x02 -#define RAC_COLORMAP 0x04 -#define RAC_VIEWPORT 0x08 - -#endif /* __XF86RAC_H */ diff --git a/xorg-server/hw/xfree86/ramdac/Makefile.in b/xorg-server/hw/xfree86/ramdac/Makefile.in index dc47ab102..9be7b8179 100644 --- a/xorg-server/hw/xfree86/ramdac/Makefile.in +++ b/xorg-server/hw/xfree86/ramdac/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,7 +45,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -64,9 +63,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -90,8 +86,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -112,10 +109,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -137,6 +130,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -146,18 +140,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -176,7 +167,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -190,7 +181,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -202,8 +196,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -212,8 +205,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -246,7 +239,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -256,27 +248,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -287,10 +264,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -299,13 +272,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -338,8 +306,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -359,7 +326,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -369,12 +335,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -392,8 +358,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ noinst_LIBRARIES = libramdac.a libramdac_a_SOURCES = xf86RamDac.c xf86RamDacCmap.c \ xf86Cursor.c xf86HWCurs.c IBM.c BT.c TI.c \ @@ -416,8 +380,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -513,7 +477,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/ramdac/xf86Cursor.c b/xorg-server/hw/xfree86/ramdac/xf86Cursor.c index 5b1ce5e1f..896ed3700 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86Cursor.c +++ b/xorg-server/hw/xfree86/ramdac/xf86Cursor.c @@ -8,26 +8,41 @@ #include "colormapst.h" #include "cursorstr.h" -DevPrivateKey xf86CursorScreenKey = &xf86CursorScreenKey; +/* FIXME: This was added with the ABI change of the miPointerSpriteFuncs for + * MPX. + * inputInfo is needed to pass the core pointer as the default argument into + * the cursor functions. + * + * Externing inputInfo is not the nice way to do it but it works. + */ +#include "inputstr.h" +extern InputInfo inputInfo; + +static int xf86CursorScreenKeyIndex; +DevPrivateKey xf86CursorScreenKey = &xf86CursorScreenKeyIndex; /* sprite functions */ -static Bool xf86CursorRealizeCursor(ScreenPtr, CursorPtr); -static Bool xf86CursorUnrealizeCursor(ScreenPtr, CursorPtr); -static void xf86CursorSetCursor(ScreenPtr, CursorPtr, int, int); -static void xf86CursorMoveCursor(ScreenPtr, int, int); +static Bool xf86CursorRealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr); +static Bool xf86CursorUnrealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr); +static void xf86CursorSetCursor(DeviceIntPtr, ScreenPtr, CursorPtr, int, int); +static void xf86CursorMoveCursor(DeviceIntPtr, ScreenPtr, int, int); +static Bool xf86DeviceCursorInitialize(DeviceIntPtr, ScreenPtr); +static void xf86DeviceCursorCleanup(DeviceIntPtr, ScreenPtr); static miPointerSpriteFuncRec xf86CursorSpriteFuncs = { xf86CursorRealizeCursor, xf86CursorUnrealizeCursor, xf86CursorSetCursor, - xf86CursorMoveCursor + xf86CursorMoveCursor, + xf86DeviceCursorInitialize, + xf86DeviceCursorCleanup }; /* Screen functions */ static void xf86CursorInstallColormap(ColormapPtr); -static void xf86CursorRecolorCursor(ScreenPtr, CursorPtr, Bool); +static void xf86CursorRecolorCursor(DeviceIntPtr pDev, ScreenPtr, CursorPtr, Bool); static Bool xf86CursorCloseScreen(int, ScreenPtr); static void xf86CursorQueryBestSize(int, unsigned short*, unsigned short*, ScreenPtr); @@ -164,6 +179,7 @@ xf86CursorInstallColormap(ColormapPtr pMap) static void xf86CursorRecolorCursor( + DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, Bool displayed) @@ -175,7 +191,7 @@ xf86CursorRecolorCursor( return; if (ScreenPriv->SWCursor) - (*ScreenPriv->RecolorCursor)(pScreen, pCurs, displayed); + (*ScreenPriv->RecolorCursor)(pDev, pScreen, pCurs, displayed); else xf86RecolorCursor(pScreen, pCurs, displayed); } @@ -187,14 +203,17 @@ xf86CursorEnableDisableFBAccess( int index, Bool enable) { + DeviceIntPtr pDev = inputInfo.pointer; + ScreenPtr pScreen = screenInfo.screens[index]; xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( &pScreen->devPrivates, xf86CursorScreenKey); if (!enable && ScreenPriv->CurrentCursor != NullCursor) { - CursorPtr currentCursor = ScreenPriv->CurrentCursor; - xf86CursorSetCursor(pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y); - ScreenPriv->isUp = FALSE; + CursorPtr currentCursor = ScreenPriv->CurrentCursor; + xf86CursorSetCursor(pDev, pScreen, NullCursor, ScreenPriv->x, + ScreenPriv->y); + ScreenPriv->isUp = FALSE; ScreenPriv->SWCursor = TRUE; ScreenPriv->SavedCursor = currentCursor; } @@ -208,7 +227,7 @@ xf86CursorEnableDisableFBAccess( * Re-set current cursor so drivers can react to FB access having been * temporarily disabled. */ - xf86CursorSetCursor(pScreen, ScreenPriv->SavedCursor, + xf86CursorSetCursor(pDev, pScreen, ScreenPriv->SavedCursor, ScreenPriv->x, ScreenPriv->y); ScreenPriv->SavedCursor = NULL; } @@ -245,123 +264,141 @@ xf86CursorSwitchMode(int index, DisplayModePtr mode, int flags) /****** miPointerSpriteFunctions *******/ static Bool -xf86CursorRealizeCursor(ScreenPtr pScreen, CursorPtr pCurs) +xf86CursorRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( &pScreen->devPrivates, xf86CursorScreenKey); if (pCurs->refcnt <= 1) - dixSetPrivate(&pCurs->devPrivates, pScreen, NULL); + dixSetPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen), NULL); - return (*ScreenPriv->spriteFuncs->RealizeCursor)(pScreen, pCurs); + return (*ScreenPriv->spriteFuncs->RealizeCursor)(pDev, pScreen, pCurs); } static Bool -xf86CursorUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCurs) +xf86CursorUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCurs) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( &pScreen->devPrivates, xf86CursorScreenKey); if (pCurs->refcnt <= 1) { - xfree(dixLookupPrivate(&pCurs->devPrivates, pScreen)); - dixSetPrivate(&pCurs->devPrivates, pScreen, NULL); + xfree(dixLookupPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen))); + dixSetPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen), NULL); } - return (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pScreen, pCurs); + return (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pDev, pScreen, pCurs); } static void -xf86CursorSetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) +xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, + int x, int y) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( &pScreen->devPrivates, xf86CursorScreenKey); xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr; - miPointerScreenPtr PointPriv; - - ScreenPriv->CurrentCursor = pCurs; - ScreenPriv->x = x; - ScreenPriv->y = y; - ScreenPriv->CursorToRestore = NULL; + miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, miPointerScreenKey); - if (!infoPtr->pScrn->vtSema) - ScreenPriv->SavedCursor = pCurs; if (pCurs == NullCursor) { /* means we're supposed to remove the cursor */ - if (ScreenPriv->SWCursor) - (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, NullCursor, x, y); - else if (ScreenPriv->isUp) { - xf86SetCursor(pScreen, NullCursor, x, y); - ScreenPriv->isUp = FALSE; - } - return; + if (ScreenPriv->SWCursor || + !(pDev == inputInfo.pointer || !pDev->isMaster && pDev->u.master == inputInfo.pointer)) + (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y); + else if (ScreenPriv->isUp) { + xf86SetCursor(pScreen, NullCursor, x, y); + ScreenPriv->isUp = FALSE; + } + return; } - ScreenPriv->HotX = pCurs->bits->xhot; - ScreenPriv->HotY = pCurs->bits->yhot; + /* only update for VCP, otherwise we get cursor jumps when removing a + sprite. The second cursor is never HW rendered anyway. */ + if (pDev == inputInfo.pointer || + (!pDev->isMaster && pDev->u.master == inputInfo.pointer)) + { + ScreenPriv->CurrentCursor = pCurs; + ScreenPriv->x = x; + ScreenPriv->y = y; + ScreenPriv->CursorToRestore = NULL; + ScreenPriv->HotX = pCurs->bits->xhot; + ScreenPriv->HotY = pCurs->bits->yhot; - PointPriv = (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miPointerScreenKey); - if (infoPtr->pScrn->vtSema && (ScreenPriv->ForceHWCursorCount || (( + if (!infoPtr->pScrn->vtSema) + ScreenPriv->SavedCursor = pCurs; + + if (infoPtr->pScrn->vtSema && (ScreenPriv->ForceHWCursorCount || (( #ifdef ARGB_CURSOR - pCurs->bits->argb && infoPtr->UseHWCursorARGB && - (*infoPtr->UseHWCursorARGB) (pScreen, pCurs) ) || ( - pCurs->bits->argb == 0 && + pCurs->bits->argb && infoPtr->UseHWCursorARGB && + (*infoPtr->UseHWCursorARGB) (pScreen, pCurs) ) || ( + pCurs->bits->argb == 0 && #endif - (pCurs->bits->height <= infoPtr->MaxHeight) && - (pCurs->bits->width <= infoPtr->MaxWidth) && - (!infoPtr->UseHWCursor || (*infoPtr->UseHWCursor)(pScreen, pCurs)))))) - { + (pCurs->bits->height <= infoPtr->MaxHeight) && + (pCurs->bits->width <= infoPtr->MaxWidth) && + (!infoPtr->UseHWCursor || (*infoPtr->UseHWCursor)(pScreen, pCurs)))))) + { - if (ScreenPriv->SWCursor) /* remove the SW cursor */ - (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, NullCursor, x, y); + if (ScreenPriv->SWCursor) /* remove the SW cursor */ + (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y); - xf86SetCursor(pScreen, pCurs, x, y); - ScreenPriv->SWCursor = FALSE; - ScreenPriv->isUp = TRUE; - PointPriv->waitForUpdate = !infoPtr->pScrn->silkenMouse; - return; - } + xf86SetCursor(pScreen, pCurs, x, y); + ScreenPriv->SWCursor = FALSE; + ScreenPriv->isUp = TRUE; + PointPriv->waitForUpdate = !infoPtr->pScrn->silkenMouse; + return; + } - PointPriv->waitForUpdate = TRUE; + PointPriv->waitForUpdate = TRUE; - if (ScreenPriv->isUp) { - /* Remove the HW cursor, or make it transparent */ - if (infoPtr->Flags & HARDWARE_CURSOR_SHOW_TRANSPARENT) { - xf86SetTransparentCursor(pScreen); - } else { - xf86SetCursor(pScreen, NullCursor, x, y); - ScreenPriv->isUp = FALSE; - } - } + if (ScreenPriv->isUp) { + /* Remove the HW cursor, or make it transparent */ + if (infoPtr->Flags & HARDWARE_CURSOR_SHOW_TRANSPARENT) { + xf86SetTransparentCursor(pScreen); + } else { + xf86SetCursor(pScreen, NullCursor, x, y); + ScreenPriv->isUp = FALSE; + } + } - ScreenPriv->SWCursor = TRUE; + if (!ScreenPriv->SWCursor) + ScreenPriv->SWCursor = TRUE; + + } if (pCurs->bits->emptyMask && !ScreenPriv->showTransparent) pCurs = NullCursor; - (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, pCurs, x, y); + + (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, pCurs, x, y); } static void -xf86CursorMoveCursor(ScreenPtr pScreen, int x, int y) +xf86CursorMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( &pScreen->devPrivates, xf86CursorScreenKey); - ScreenPriv->x = x; - ScreenPriv->y = y; - - if (ScreenPriv->CursorToRestore) - xf86CursorSetCursor(pScreen, ScreenPriv->CursorToRestore, - ScreenPriv->x, ScreenPriv->y); - else if (ScreenPriv->SWCursor) - (*ScreenPriv->spriteFuncs->MoveCursor)(pScreen, x, y); - else if (ScreenPriv->isUp) - xf86MoveCursor(pScreen, x, y); + /* only update coordinate state for first sprite, otherwise we get jumps + when removing a sprite. The second sprite is never HW rendered anyway */ + if (pDev == inputInfo.pointer || + (!pDev->isMaster && pDev->u.master == inputInfo.pointer)) + { + ScreenPriv->x = x; + ScreenPriv->y = y; + + if (ScreenPriv->CursorToRestore) + xf86CursorSetCursor(pDev, pScreen, ScreenPriv->CursorToRestore, x, y); + else if (ScreenPriv->SWCursor) + (*ScreenPriv->spriteFuncs->MoveCursor)(pDev, pScreen, x, y); + else if (ScreenPriv->isUp) + xf86MoveCursor(pScreen, x, y); + } else + (*ScreenPriv->spriteFuncs->MoveCursor)(pDev, pScreen, x, y); } void xf86ForceHWCursor (ScreenPtr pScreen, Bool on) { + DeviceIntPtr pDev = inputInfo.pointer; xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( &pScreen->devPrivates, xf86CursorScreenKey); @@ -372,7 +409,7 @@ xf86ForceHWCursor (ScreenPtr pScreen, Bool on) if (ScreenPriv->SWCursor && ScreenPriv->CurrentCursor) { ScreenPriv->HWCursorForced = TRUE; - xf86CursorSetCursor (pScreen, ScreenPriv->CurrentCursor, + xf86CursorSetCursor (pDev, pScreen, ScreenPriv->CurrentCursor, ScreenPriv->x, ScreenPriv->y); } else @@ -384,7 +421,7 @@ xf86ForceHWCursor (ScreenPtr pScreen, Bool on) if (--ScreenPriv->ForceHWCursorCount == 0) { if (ScreenPriv->HWCursorForced && ScreenPriv->CurrentCursor) - xf86CursorSetCursor (pScreen, ScreenPriv->CurrentCursor, + xf86CursorSetCursor (pDev, pScreen, ScreenPriv->CurrentCursor, ScreenPriv->x, ScreenPriv->y); } } @@ -401,3 +438,33 @@ xf86DestroyCursorInfoRec(xf86CursorInfoPtr infoPtr) { xfree(infoPtr); } + +/** + * New cursor has been created. Do your initalizations here. + */ +static Bool +xf86DeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) +{ + int ret; + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); + + /* Init SW cursor */ + ret = (*ScreenPriv->spriteFuncs->DeviceCursorInitialize)(pDev, pScreen); + + return ret; +} + +/** + * Cursor has been removed. Clean up after yourself. + */ +static void +xf86DeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) +{ + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); + + /* Clean up SW cursor */ + (*ScreenPriv->spriteFuncs->DeviceCursorCleanup)(pDev, pScreen); +} + diff --git a/xorg-server/hw/xfree86/ramdac/xf86HWCurs.c b/xorg-server/hw/xfree86/ramdac/xf86HWCurs.c index d10e283d7..4374e51d4 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86HWCurs.c +++ b/xorg-server/hw/xfree86/ramdac/xf86HWCurs.c @@ -123,7 +123,7 @@ xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) return; } - bits = (unsigned char *)dixLookupPrivate(&pCurs->devPrivates, pScreen); + bits = dixLookupPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen)); x -= infoPtr->pScrn->frameX0 + ScreenPriv->HotX; y -= infoPtr->pScrn->frameY0 + ScreenPriv->HotY; @@ -133,7 +133,7 @@ xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) #endif if (!bits) { bits = (*infoPtr->RealizeCursor)(infoPtr, pCurs); - dixSetPrivate(&pCurs->devPrivates, pScreen, bits); + dixSetPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen), bits); } if (!(infoPtr->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN)) @@ -255,7 +255,7 @@ RealizeCursorInterleave0(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) DstM = (SCANLINE*)mem; if (!(infoPtr->Flags & HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK)) DstM += words; - (void)memset(DstM, -1, words * sizeof(SCANLINE)); + memset(DstM, -1, words * sizeof(SCANLINE)); } return mem; } diff --git a/xorg-server/hw/xfree86/shadowfb/Makefile.in b/xorg-server/hw/xfree86/shadowfb/Makefile.in index ad684bff8..05c16caea 100644 --- a/xorg-server/hw/xfree86/shadowfb/Makefile.in +++ b/xorg-server/hw/xfree86/shadowfb/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,7 +45,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -71,9 +70,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -90,8 +86,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -112,10 +109,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -137,6 +130,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -146,18 +140,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -176,7 +167,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -190,7 +181,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -202,8 +196,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -212,8 +205,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -246,7 +239,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -256,27 +248,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -287,10 +264,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -299,13 +272,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -338,8 +306,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -359,7 +326,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -369,12 +335,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -392,8 +358,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ module_LTLIBRARIES = libshadowfb.la libshadowfb_la_LDFLAGS = -avoid-version libshadowfb_la_SOURCES = sfbmodule.c shadow.c @@ -408,8 +372,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -521,7 +485,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/shadowfb/shadow.c b/xorg-server/hw/xfree86/shadowfb/shadow.c index 74beefb67..ff775efbd 100644 --- a/xorg-server/hw/xfree86/shadowfb/shadow.c +++ b/xorg-server/hw/xfree86/shadowfb/shadow.c @@ -94,8 +94,10 @@ typedef struct { } ShadowGCRec, *ShadowGCPtr; -static DevPrivateKey ShadowScreenKey = &ShadowScreenKey; -static DevPrivateKey ShadowGCKey = &ShadowGCKey; +static int ShadowScreenKeyIndex; +static DevPrivateKey ShadowScreenKey = &ShadowScreenKeyIndex; +static int ShadowGCKeyIndex; +static DevPrivateKey ShadowGCKey = &ShadowGCKeyIndex; #define GET_SCREEN_PRIVATE(pScreen) \ (ShadowScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, ShadowScreenKey) diff --git a/xorg-server/hw/xfree86/utils/Makefile.am b/xorg-server/hw/xfree86/utils/Makefile.am index e3e7a6177..d27861b03 100644 --- a/xorg-server/hw/xfree86/utils/Makefile.am +++ b/xorg-server/hw/xfree86/utils/Makefile.am @@ -1,7 +1,3 @@ SUBDIRS = \ gtf \ - cvt \ - ioport \ - kbd_mode \ - xorgcfg \ - xorgconfig + cvt diff --git a/xorg-server/hw/xfree86/utils/Makefile.in b/xorg-server/hw/xfree86/utils/Makefile.in index 1a7c5f3b2..1fdee4a54 100644 --- a/xorg-server/hw/xfree86/utils/Makefile.in +++ b/xorg-server/hw/xfree86/utils/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -42,7 +42,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -68,8 +67,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -90,10 +90,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -115,6 +111,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -124,18 +121,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -154,7 +148,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -168,7 +162,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -180,8 +177,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -190,8 +186,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -224,7 +220,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -234,27 +229,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -265,10 +245,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -277,13 +253,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -316,8 +287,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -337,7 +307,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -347,12 +316,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -370,15 +339,9 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ SUBDIRS = \ gtf \ - cvt \ - ioport \ - kbd_mode \ - xorgcfg \ - xorgconfig + cvt all: all-recursive @@ -387,8 +350,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -494,7 +457,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/utils/cvt/Makefile.in b/xorg-server/hw/xfree86/utils/cvt/Makefile.in index 9c1b9c585..7cf615b34 100644 --- a/xorg-server/hw/xfree86/utils/cvt/Makefile.in +++ b/xorg-server/hw/xfree86/utils/cvt/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -77,7 +77,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -98,9 +97,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -118,8 +114,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -140,10 +137,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -165,6 +158,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -174,18 +168,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -204,7 +195,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -218,7 +209,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -230,8 +224,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -240,8 +233,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -274,7 +267,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -284,27 +276,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -315,10 +292,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -327,13 +300,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -366,8 +334,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -387,7 +354,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -397,12 +363,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -420,8 +386,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ INCLUDES = $(XORG_INCS) \ -I$(top_srcdir)/hw/xfree86/ddc \ -I$(top_srcdir)/hw/xfree86/parser @@ -477,8 +441,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -608,8 +572,8 @@ install-man1: $(man1_MANS) $(man_MANS) esac; \ done; \ for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ + if test -f $$i; then file=$$i; \ + else file=$(srcdir)/$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ @@ -648,7 +612,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/utils/gtf/Makefile.in b/xorg-server/hw/xfree86/utils/gtf/Makefile.in index 2dd8c08f5..0e33af399 100644 --- a/xorg-server/hw/xfree86/utils/gtf/Makefile.in +++ b/xorg-server/hw/xfree86/utils/gtf/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -78,7 +78,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -98,9 +97,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -123,8 +119,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -145,10 +142,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -170,6 +163,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -179,18 +173,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -209,7 +200,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -223,7 +214,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -235,8 +229,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -245,8 +238,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -279,7 +272,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -289,27 +281,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -320,10 +297,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -332,13 +305,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -371,8 +339,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -392,7 +359,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -402,12 +368,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -425,8 +391,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ gtf_SOURCES = gtf.c gtf_CFLAGS = $(XORG_CFLAGS) gtf_LDADD = -lm @@ -479,8 +443,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -607,7 +571,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/utils/gtf/gtf.c b/xorg-server/hw/xfree86/utils/gtf/gtf.c index fd4a4f23c..8ce93276a 100644 --- a/xorg-server/hw/xfree86/utils/gtf/gtf.c +++ b/xorg-server/hw/xfree86/utils/gtf/gtf.c @@ -112,11 +112,6 @@ #include #include - -#if defined(__Lynx__) -#define rint(x) floor(x) -#endif - #define MARGIN_PERCENT 1.8 /* % of active vertical image */ #define CELL_GRAN 8.0 /* assumed character cell granularity */ #define MIN_PORCH 1 /* minimum front porch */ diff --git a/xorg-server/hw/xfree86/utils/ioport/Makefile.am b/xorg-server/hw/xfree86/utils/ioport/Makefile.am deleted file mode 100644 index 12f861372..000000000 --- a/xorg-server/hw/xfree86/utils/ioport/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, and/or sell copies of the Software, and to permit persons -# to whom the Software is furnished to do so, provided that the above -# copyright notice(s) and this permission notice appear in all copies of -# the Software and that both the above copyright notice(s) and this -# permission notice appear in supporting documentation. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL -# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING -# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# -# Except as contained in this notice, the name of a copyright holder -# shall not be used in advertising or otherwise to promote the sale, use -# or other dealings in this Software without prior written authorization -# of the copyright holder. -# - -bin_PROGRAMS = ioport - -XFREE86_SRCDIR = $(top_srcdir)/hw/xfree86 -DUMMYLIB_SRCDIR = $(XFREE86_SRCDIR)/dummylib - -INCLUDES = $(XORG_INCS) -I$(DUMMYLIB_SRCDIR) - -ioport_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) -ioport_LDADD = \ - ../../os-support/libxorgos.la \ - ../../dummylib/libdummy-nonserver.a \ - ${UTILS_SYS_LIBS} ${PCIACCESS_LIBS} - - -ioport_SOURCES = \ - ioport.c - -ioport_PROGRAM_LINKS = inb inw inl outb outw outl - -all-local: - @for i in $(ioport_PROGRAM_LINKS); do (set -x; \ - rm -f $$i; $(LN_S) ioport $$i); \ - done - -install-exec-hook: - @for i in $(ioport_PROGRAM_LINKS); do (set -x; \ - rm -f $(DESTDIR)$(bindir)/$$i; \ - (cd $(DESTDIR)$(bindir); $(LN_S) ioport $$i)); \ - done - diff --git a/xorg-server/hw/xfree86/utils/ioport/Makefile.in b/xorg-server/hw/xfree86/utils/ioport/Makefile.in deleted file mode 100644 index f2afaa3cc..000000000 --- a/xorg-server/hw/xfree86/utils/ioport/Makefile.in +++ /dev/null @@ -1,739 +0,0 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, and/or sell copies of the Software, and to permit persons -# to whom the Software is furnished to do so, provided that the above -# copyright notice(s) and this permission notice appear in all copies of -# the Software and that both the above copyright notice(s) and this -# permission notice appear in supporting documentation. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL -# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING -# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# -# Except as contained in this notice, the name of a copyright holder -# shall not be used in advertising or otherwise to promote the sale, use -# or other dealings in this Software without prior written authorization -# of the copyright holder. -# - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = ioport$(EXEEXT) -subdir = hw/xfree86/utils/ioport -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ - $(top_builddir)/include/xorg-server.h \ - $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ - $(top_builddir)/include/xorg-config.h \ - $(top_builddir)/include/xkb-config.h \ - $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_ioport_OBJECTS = ioport-ioport.$(OBJEXT) -ioport_OBJECTS = $(am_ioport_OBJECTS) -am__DEPENDENCIES_1 = -ioport_DEPENDENCIES = ../../os-support/libxorgos.la \ - ../../dummylib/libdummy-nonserver.a $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -ioport_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(ioport_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(ioport_SOURCES) -DIST_SOURCES = $(ioport_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ -ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ -APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ -APP_MAN_DIR = @APP_MAN_DIR@ -APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASE_FONT_PATH = @BASE_FONT_PATH@ -BUILD_DATE = @BUILD_DATE@ -BUILD_TIME = @BUILD_TIME@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DARWIN_LIBS = @DARWIN_LIBS@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ -DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ -DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DGA_CFLAGS = @DGA_CFLAGS@ -DGA_LIBS = @DGA_LIBS@ -DIX_CFLAGS = @DIX_CFLAGS@ -DLLTOOL = @DLLTOOL@ -DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ -DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ -DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ -DMXMODULES_LIBS = @DMXMODULES_LIBS@ -DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ -DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ -DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ -DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ -DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ -DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ -DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ -DRIPROTO_LIBS = @DRIPROTO_LIBS@ -DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ -DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ -DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ -DSYMUTIL = @DSYMUTIL@ -DTRACE = @DTRACE@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -FILE_MAN_DIR = @FILE_MAN_DIR@ -FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ -GLX_DEFINES = @GLX_DEFINES@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -HAL_CFLAGS = @HAL_CFLAGS@ -HAL_LIBS = @HAL_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ -KDRIVE_INCS = @KDRIVE_INCS@ -KDRIVE_LIBS = @KDRIVE_LIBS@ -KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ -KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ -KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ -LDFLAGS = @LDFLAGS@ -LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ -LIBDRM_LIBS = @LIBDRM_LIBS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_MAN_DIR = @LIB_MAN_DIR@ -LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ -MISC_MAN_DIR = @MISC_MAN_DIR@ -MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ -MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCCLD = @OBJCCLD@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJCLINK = @OBJCLINK@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ -PCIACCESS_LIBS = @PCIACCESS_LIBS@ -PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ -PERL = @PERL@ -PKG_CONFIG = @PKG_CONFIG@ -PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ -RANLIB = @RANLIB@ -RAWCPP = @RAWCPP@ -RAWCPPFLAGS = @RAWCPPFLAGS@ -SED = @SED@ -SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ -SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ -STRIP = @STRIP@ -TSLIB_CFLAGS = @TSLIB_CFLAGS@ -TSLIB_LIBS = @TSLIB_LIBS@ -UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ -VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ -VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ -X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ -X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ -XDMCP_CFLAGS = @XDMCP_CFLAGS@ -XDMCP_LIBS = @XDMCP_LIBS@ -XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ -XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ -XDMX_CFLAGS = @XDMX_CFLAGS@ -XDMX_LIBS = @XDMX_LIBS@ -XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ -XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ -XEPHYR_INCS = @XEPHYR_INCS@ -XEPHYR_LIBS = @XEPHYR_LIBS@ -XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ -XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ -XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ -XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ -XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ -XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ -XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ -XLIB_CFLAGS = @XLIB_CFLAGS@ -XLIB_LIBS = @XLIB_LIBS@ -XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ -XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ -XNEST_LIBS = @XNEST_LIBS@ -XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ -XORG_CFLAGS = @XORG_CFLAGS@ -XORG_INCS = @XORG_INCS@ -XORG_LIBS = @XORG_LIBS@ -XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ -XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ -XORG_OS = @XORG_OS@ -XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ -XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ -XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ -XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ -XSDL_INCS = @XSDL_INCS@ -XSDL_LIBS = @XSDL_LIBS@ -XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ -XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ -XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ -XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ -XSERVER_LIBS = @XSERVER_LIBS@ -XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ -XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ -XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ -XVFB_LIBS = @XVFB_LIBS@ -XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ -XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ -XWINMODULES_LIBS = @XWINMODULES_LIBS@ -XWIN_LIBS = @XWIN_LIBS@ -XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ -XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -__XCONFIGFILE__ = @__XCONFIGFILE__@ -abi_ansic = @abi_ansic@ -abi_extension = @abi_extension@ -abi_font = @abi_font@ -abi_videodrv = @abi_videodrv@ -abi_xinput = @abi_xinput@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -driverdir = @driverdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -extdir = @extdir@ -ft_config = @ft_config@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -logdir = @logdir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -moduledir = @moduledir@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sdkdir = @sdkdir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ -XFREE86_SRCDIR = $(top_srcdir)/hw/xfree86 -DUMMYLIB_SRCDIR = $(XFREE86_SRCDIR)/dummylib -INCLUDES = $(XORG_INCS) -I$(DUMMYLIB_SRCDIR) -ioport_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) -ioport_LDADD = \ - ../../os-support/libxorgos.la \ - ../../dummylib/libdummy-nonserver.a \ - ${UTILS_SYS_LIBS} ${PCIACCESS_LIBS} - -ioport_SOURCES = \ - ioport.c - -ioport_PROGRAM_LINKS = inb inw inl outb outw outl -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/utils/ioport/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign hw/xfree86/utils/ioport/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -ioport$(EXEEXT): $(ioport_OBJECTS) $(ioport_DEPENDENCIES) - @rm -f ioport$(EXEEXT) - $(ioport_LINK) $(ioport_OBJECTS) $(ioport_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioport-ioport.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -ioport-ioport.o: ioport.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ioport_CFLAGS) $(CFLAGS) -MT ioport-ioport.o -MD -MP -MF $(DEPDIR)/ioport-ioport.Tpo -c -o ioport-ioport.o `test -f 'ioport.c' || echo '$(srcdir)/'`ioport.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ioport-ioport.Tpo $(DEPDIR)/ioport-ioport.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ioport.c' object='ioport-ioport.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ioport_CFLAGS) $(CFLAGS) -c -o ioport-ioport.o `test -f 'ioport.c' || echo '$(srcdir)/'`ioport.c - -ioport-ioport.obj: ioport.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ioport_CFLAGS) $(CFLAGS) -MT ioport-ioport.obj -MD -MP -MF $(DEPDIR)/ioport-ioport.Tpo -c -o ioport-ioport.obj `if test -f 'ioport.c'; then $(CYGPATH_W) 'ioport.c'; else $(CYGPATH_W) '$(srcdir)/ioport.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ioport-ioport.Tpo $(DEPDIR)/ioport-ioport.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ioport.c' object='ioport-ioport.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ioport_CFLAGS) $(CFLAGS) -c -o ioport-ioport.obj `if test -f 'ioport.c'; then $(CYGPATH_W) 'ioport.c'; else $(CYGPATH_W) '$(srcdir)/ioport.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) all-local -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-exec-am install-strip - -.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ - clean-binPROGRAMS clean-generic clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-exec-hook install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS - - -all-local: - @for i in $(ioport_PROGRAM_LINKS); do (set -x; \ - rm -f $$i; $(LN_S) ioport $$i); \ - done - -install-exec-hook: - @for i in $(ioport_PROGRAM_LINKS); do (set -x; \ - rm -f $(DESTDIR)$(bindir)/$$i; \ - (cd $(DESTDIR)$(bindir); $(LN_S) ioport $$i)); \ - done -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/xorg-server/hw/xfree86/utils/ioport/ioport.c b/xorg-server/hw/xfree86/utils/ioport/ioport.c deleted file mode 100644 index 737043462..000000000 --- a/xorg-server/hw/xfree86/utils/ioport/ioport.c +++ /dev/null @@ -1,491 +0,0 @@ -/* - * Copyright 2002 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting documentation, and - * that the name of Marc Aurele La France not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. Marc Aurele La France makes no representations - * about the suitability of this software for any purpose. It is provided - * "as-is" without express or implied warranty. - * - * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO - * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - * OF THIS SOFTWARE. - */ - -#include "compiler.h" -#include "xf86_OSproc.h" - -#include - -static char *MyName; -static int Port = -1, Index = -1; -static unsigned int Value; - -static void -inb_usage -( -#ifdef __STDC__ - void -#endif -) -{ - fprintf(stderr, "inb [-i ] \n"); -} - -static void -inw_usage -( -#ifdef __STDC__ - void -#endif -) -{ - fprintf(stderr, "inw [-i ] \n"); -} - -static void -inl_usage -( -#ifdef __STDC__ - void -#endif -) -{ - fprintf(stderr, "inl [-i ] \n"); -} - - -static void -outb_usage -( -#ifdef __STDC__ - void -#endif -) -{ - fprintf(stderr, "outb [-i ] \n"); -} - -static void -outw_usage -( -#ifdef __STDC__ - void -#endif -) -{ - fprintf(stderr, "outw [-i ] \n"); -} - -static void -outl_usage -( -#ifdef __STDC__ - void -#endif -) -{ - fprintf(stderr, "outl [-i ] \n"); -} - -static int -#ifdef __STDC__ -parse_number -( - const char *String, - void (* Usage)(void), - unsigned int Maximum) -#else -parse_number(String, Usage, Maximum) - const char *String; - void (* Usage)(); - unsigned int Maximum; -#endif -{ - char *BadString = (char *)0; - unsigned int Number = strtoul(String, &BadString, 0); - if ((Number > Maximum) || errno || - (BadString && *BadString)) - { - (*Usage)(); - exit(1); - } - - return (Number); -} - -static void -#ifdef __STDC__ -input_parse -( - int argc, - char **argv, - void (* Usage)(void)) -#else -input_parse(argc, argv, Usage) - int argc; - char **argv; - void (* Usage)(); -#endif -{ - if ((argc < 2) || (argc > 4)) - { - (*Usage)(); - exit(1); - } - - for(; (++argv, --argc); ) - { - if ((Index < 0) && - (argv[0][0] == '-') && - (argv[0][1] == 'i')) - { - if ((++argv[0], *(++argv[0])) || (++argv, --argc)) - Index = parse_number(argv[0], Usage, 0xFFU); - else - { - (*Usage)(); - exit(1); - } - } - else if (Port < 0) - { - Port = parse_number(argv[0], Usage, 0xFFFFU); - } - else - { - (*Usage)(); - exit(1); - } - } -} - -static void -#ifdef __STDC__ -output_parse -( - int argc, - char **argv, - void (* Usage)(void), - unsigned int Maximum -) -#else -output_parse(argc, argv, Usage, Maximum) - int argc; - char **argv; - void (* Usage)(); - unsigned int Maximum; -#endif -{ - char ValueSpecified = 0; - - if ((argc < 3) || (argc > 5)) - { - (*Usage)(); - exit(1); - } - - for (; (++argv, --argc); ) - { - if ((Index < 0) && - (argv[0][0] == '-') && - (argv[0][1] == 'i')) - { - if ((++argv[0], *(++argv[0])) || (++argv, --argc)) - Index = parse_number(argv[0], Usage, 0xFFU); - else - { - (*Usage)(); - exit(1); - } - } - else if (Port < 0) - { - Port = parse_number(argv[0], Usage, 0xFFFFU); - } - else if (!ValueSpecified) - { - Value = parse_number(argv[0], Usage, Maximum); - ValueSpecified = 1; - } - else - { - (*Usage)(); - exit(1); - } - } - - if (!ValueSpecified) - { - (*Usage)(); - exit(1); - } -} - -static void -#ifdef __STDC__ -do_inb -( - int argc, - char **argv -) -#else -do_inb(argc, argv) - int argc; - char **argv; -#endif -{ - input_parse(argc, argv, inb_usage); - - xf86EnableIO(); - - if (Index >= 0) - { - if (Port == 0x03C0U) - { /* Attribute Controller is different */ - unsigned short gens1; - - gens1 = ((inb(0x03CCU) & 0x01U) << 5) + 0x03BA; - (void) inb(gens1); - Index = (Index & 0x1FU) | 0x20U; - } - outb(Port, Index); - Port++; - } - Value = inb(Port); - - xf86DisableIO(); - - printf("0x%02X\n", Value); -} - -static void -#ifdef __STDC__ -do_inw -( - int argc, - char **argv -) -#else -do_inw(argc, argv) - int argc; - char **argv; -#endif -{ - input_parse(argc, argv, inw_usage); - - xf86EnableIO(); - - if (Index >= 0) - { - outb(Port, Index); - Port++; - } - Value = inw(Port); - - xf86DisableIO(); - - printf("0x%04X\n", Value); -} - -static void -#ifdef __STDC__ -do_inl -( - int argc, - char **argv -) -#else -do_inl(argc, argv) - int argc; - char **argv; -#endif -{ - input_parse(argc, argv, inl_usage); - - xf86EnableIO(); - - if (Index >= 0) - { - outb(Port, Index); - Port++; - } - Value = inl(Port); - - xf86DisableIO(); - - printf("0x%08X\n", Value); -} - -static void -#ifdef __STDC__ -do_outb -( - int argc, - char **argv -) -#else -do_outb(argc, argv) - int argc; - char **argv; -#endif -{ - output_parse(argc, argv, outb_usage, 0xFFU); - - xf86EnableIO(); - - if (Index >= 0) - { - if (Port == 0x03C0U) - { /* Attribute controller is different */ - unsigned short gens1; - - gens1 = ((inb(0x03CCU) & 0x01U) << 5) + 0x03BA; - (void) inb(gens1); - outb(0x03C0U, (Index & 0x1FU) | 0x20U); - } - else - { - outb(Port, Index); - Port++; - } - } - outb(Port, Value); - - xf86DisableIO(); - -} - -static void -#ifdef __STDC__ -do_outw -( - int argc, - char **argv -) -#else -do_outw(argc, argv) - int argc; - char **argv; -#endif -{ - output_parse(argc, argv, outw_usage, 0xFFFFU); - - xf86EnableIO(); - - if (Index >= 0) - { - outb(Port, Index); - Port++; - } - outw(Port, Value); - - xf86DisableIO(); - -} - -static void -#ifdef __STDC__ -do_outl -( - int argc, - char **argv -) -#else -do_outl(argc, argv) - int argc; - char **argv; -#endif -{ - output_parse(argc, argv, outl_usage, 0xFFFFFFFFU); - - xf86EnableIO(); - - if (Index >= 0) - { - outb(Port, Index); - Port++; - } - outl(Port, Value); - - xf86DisableIO(); - -} - -static void -usage -( -#ifdef __STDC__ - void -#endif -) -{ - inb_usage(); - inw_usage(); - inl_usage(); - outb_usage(); - outw_usage(); - outl_usage(); - exit(1); -} - -int -#ifdef __STDC__ -main -( - int argc, - char **argv -) -#else -main(argc, argv) - int argc; - char **argv; -#endif -{ - struct - { - char *Name; -#ifdef __STDC__ - void (* Function)(int, char **); -#else - void (* Function)(); -#endif - } - *Function_Entry, Function_Table[] = - { - {"inb", do_inb}, - {"inw", do_inw}, - {"inl", do_inl}, - {"outb", do_outb}, - {"outw", do_outw}, - {"outl", do_outl}, -#ifdef __STDC__ - {(char *)0, (void (*)(int, char **))usage} -#else - {(char *)0, usage} -#endif - }; - - /* Get name by which we were invoked */ - for (MyName = argv[0]; argv[0][0]; ) - if (*(argv[0]++) == '/') - MyName = argv[0]; - - /* Look up name in table and call corresponding function */ - for (Function_Entry = Function_Table; - Function_Entry->Name && - strcmp(MyName, Function_Entry->Name); - Function_Entry++); - (*Function_Entry->Function)(argc, argv); - - return (0); -} - diff --git a/xorg-server/hw/xfree86/utils/kbd_mode/Makefile.am b/xorg-server/hw/xfree86/utils/kbd_mode/Makefile.am deleted file mode 100644 index 1b28411cf..000000000 --- a/xorg-server/hw/xfree86/utils/kbd_mode/Makefile.am +++ /dev/null @@ -1,70 +0,0 @@ -# $Id$ -# -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, and/or sell copies of the Software, and to permit persons -# to whom the Software is furnished to do so, provided that the above -# copyright notice(s) and this permission notice appear in all copies of -# the Software and that both the above copyright notice(s) and this -# permission notice appear in supporting documentation. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL -# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING -# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# -# Except as contained in this notice, the name of a copyright holder -# shall not be used in advertising or otherwise to promote the sale, use -# or other dealings in this Software without prior written authorization -# of the copyright holder. -# - -if BUILD_KBD_MODE -bin_PROGRAMS = kbd_mode - -if BSD_KBD_MODE -INCLUDES = $(XORG_INCS) -kbd_mode_CFLAGS = $(XORG_CFLAGS) -kbd_mode_SOURCES = bsd-kbd_mode.c -MAN_SRC = bsd-kbd_mode.man.pre -endif - -if SUN_KBD_MODE -kbd_mode_SOURCES = sun-kbd_mode.c -MAN_SRC = sun-kbd_mode.man.pre -endif - -appmandir = $(APP_MAN_DIR) - -appman_PRE = kbd_mode.man -appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) -BUILT_SOURCES = $(appman_PRE) -CLEANFILES = $(appman_PRE) $(appman_DATA) - -all-local: kbd_mode.man.pre $(appman_DATA) - -kbd_mode.man.pre: $(MAN_SRC) - $(LN_S) $(MAN_SRC) kbd_mode.man.pre - -else -all-local: -endif - -include $(top_srcdir)/cpprules.in - -SUFFIXES += .$(APP_MAN_SUFFIX) .man - -.man.$(APP_MAN_SUFFIX): - -rm -f $@ - $(LN_S) $< $@ - -EXTRA_DIST = bsd-kbd_mode.man.pre sun-kbd_mode.man.pre diff --git a/xorg-server/hw/xfree86/utils/kbd_mode/Makefile.in b/xorg-server/hw/xfree86/utils/kbd_mode/Makefile.in deleted file mode 100644 index 2de3e8eaa..000000000 --- a/xorg-server/hw/xfree86/utils/kbd_mode/Makefile.in +++ /dev/null @@ -1,829 +0,0 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# $Id$ -# -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, and/or sell copies of the Software, and to permit persons -# to whom the Software is furnished to do so, provided that the above -# copyright notice(s) and this permission notice appear in all copies of -# the Software and that both the above copyright notice(s) and this -# permission notice appear in supporting documentation. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL -# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING -# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# -# Except as contained in this notice, the name of a copyright holder -# shall not be used in advertising or otherwise to promote the sale, use -# or other dealings in this Software without prior written authorization -# of the copyright holder. -# - -# -*- Makefile -*- -# Rules for generating files using the C pre-processor -# (Replaces CppFileTarget from Imake) - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@BUILD_KBD_MODE_TRUE@bin_PROGRAMS = kbd_mode$(EXEEXT) -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/cpprules.in -subdir = hw/xfree86/utils/kbd_mode -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ - $(top_builddir)/include/xorg-server.h \ - $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ - $(top_builddir)/include/xorg-config.h \ - $(top_builddir)/include/xkb-config.h \ - $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am__kbd_mode_SOURCES_DIST = bsd-kbd_mode.c sun-kbd_mode.c -@BSD_KBD_MODE_FALSE@@BUILD_KBD_MODE_TRUE@@SUN_KBD_MODE_TRUE@am_kbd_mode_OBJECTS = kbd_mode-sun-kbd_mode.$(OBJEXT) -@BSD_KBD_MODE_TRUE@@BUILD_KBD_MODE_TRUE@am_kbd_mode_OBJECTS = kbd_mode-bsd-kbd_mode.$(OBJEXT) -kbd_mode_OBJECTS = $(am_kbd_mode_OBJECTS) -kbd_mode_LDADD = $(LDADD) -kbd_mode_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(kbd_mode_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(kbd_mode_SOURCES) -DIST_SOURCES = $(am__kbd_mode_SOURCES_DIST) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -appmanDATA_INSTALL = $(INSTALL_DATA) -DATA = $(appman_DATA) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ -ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ -APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ -APP_MAN_DIR = @APP_MAN_DIR@ -APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASE_FONT_PATH = @BASE_FONT_PATH@ -BUILD_DATE = @BUILD_DATE@ -BUILD_TIME = @BUILD_TIME@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DARWIN_LIBS = @DARWIN_LIBS@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ -DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ -DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DGA_CFLAGS = @DGA_CFLAGS@ -DGA_LIBS = @DGA_LIBS@ -DIX_CFLAGS = @DIX_CFLAGS@ -DLLTOOL = @DLLTOOL@ -DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ -DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ -DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ -DMXMODULES_LIBS = @DMXMODULES_LIBS@ -DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ -DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ -DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ -DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ -DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ -DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ -DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ -DRIPROTO_LIBS = @DRIPROTO_LIBS@ -DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ -DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ -DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ -DSYMUTIL = @DSYMUTIL@ -DTRACE = @DTRACE@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -FILE_MAN_DIR = @FILE_MAN_DIR@ -FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ -GLX_DEFINES = @GLX_DEFINES@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -HAL_CFLAGS = @HAL_CFLAGS@ -HAL_LIBS = @HAL_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ -KDRIVE_INCS = @KDRIVE_INCS@ -KDRIVE_LIBS = @KDRIVE_LIBS@ -KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ -KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ -KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ -LDFLAGS = @LDFLAGS@ -LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ -LIBDRM_LIBS = @LIBDRM_LIBS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_MAN_DIR = @LIB_MAN_DIR@ -LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ -MISC_MAN_DIR = @MISC_MAN_DIR@ -MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ -MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCCLD = @OBJCCLD@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJCLINK = @OBJCLINK@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ -PCIACCESS_LIBS = @PCIACCESS_LIBS@ -PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ -PERL = @PERL@ -PKG_CONFIG = @PKG_CONFIG@ -PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ -RANLIB = @RANLIB@ -RAWCPP = @RAWCPP@ -RAWCPPFLAGS = @RAWCPPFLAGS@ -SED = sed -SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ -SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ -STRIP = @STRIP@ -TSLIB_CFLAGS = @TSLIB_CFLAGS@ -TSLIB_LIBS = @TSLIB_LIBS@ -UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ -VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ -VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ -X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ -X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ -XDMCP_CFLAGS = @XDMCP_CFLAGS@ -XDMCP_LIBS = @XDMCP_LIBS@ -XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ -XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ -XDMX_CFLAGS = @XDMX_CFLAGS@ -XDMX_LIBS = @XDMX_LIBS@ -XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ -XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ -XEPHYR_INCS = @XEPHYR_INCS@ -XEPHYR_LIBS = @XEPHYR_LIBS@ -XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ -XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ -XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ -XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ -XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ -XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ -XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ -XLIB_CFLAGS = @XLIB_CFLAGS@ -XLIB_LIBS = @XLIB_LIBS@ -XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ -XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ -XNEST_LIBS = @XNEST_LIBS@ -XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ -XORG_CFLAGS = @XORG_CFLAGS@ -XORG_INCS = @XORG_INCS@ -XORG_LIBS = @XORG_LIBS@ -XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ -XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ -XORG_OS = @XORG_OS@ -XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ -XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ -XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ -XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ -XSDL_INCS = @XSDL_INCS@ -XSDL_LIBS = @XSDL_LIBS@ -XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ -XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ -XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ -XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ -XSERVER_LIBS = @XSERVER_LIBS@ -XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ -XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ -XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ -XVFB_LIBS = @XVFB_LIBS@ -XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ -XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ -XWINMODULES_LIBS = @XWINMODULES_LIBS@ -XWIN_LIBS = @XWIN_LIBS@ -XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ -XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -__XCONFIGFILE__ = @__XCONFIGFILE__@ -abi_ansic = @abi_ansic@ -abi_extension = @abi_extension@ -abi_font = @abi_font@ -abi_videodrv = @abi_videodrv@ -abi_xinput = @abi_xinput@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -driverdir = @driverdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -extdir = @extdir@ -ft_config = @ft_config@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -logdir = @logdir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -moduledir = @moduledir@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sdkdir = @sdkdir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ -@BSD_KBD_MODE_TRUE@@BUILD_KBD_MODE_TRUE@INCLUDES = $(XORG_INCS) -@BSD_KBD_MODE_TRUE@@BUILD_KBD_MODE_TRUE@kbd_mode_CFLAGS = $(XORG_CFLAGS) -@BSD_KBD_MODE_TRUE@@BUILD_KBD_MODE_TRUE@kbd_mode_SOURCES = bsd-kbd_mode.c -@BUILD_KBD_MODE_TRUE@@SUN_KBD_MODE_TRUE@kbd_mode_SOURCES = sun-kbd_mode.c -@BSD_KBD_MODE_TRUE@@BUILD_KBD_MODE_TRUE@MAN_SRC = bsd-kbd_mode.man.pre -@BUILD_KBD_MODE_TRUE@@SUN_KBD_MODE_TRUE@MAN_SRC = sun-kbd_mode.man.pre -@BUILD_KBD_MODE_TRUE@appmandir = $(APP_MAN_DIR) -@BUILD_KBD_MODE_TRUE@appman_PRE = kbd_mode.man -@BUILD_KBD_MODE_TRUE@appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) -@BUILD_KBD_MODE_TRUE@BUILT_SOURCES = $(appman_PRE) -@BUILD_KBD_MODE_TRUE@CLEANFILES = $(appman_PRE) $(appman_DATA) -SUFFIXES = .pre .man .man.pre .$(APP_MAN_SUFFIX) .man - -# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM -# to cpp, because that trick does not work on all ANSI C preprocessors. -# Delete line numbers from the cpp output (-P is not portable, I guess). -# Allow XCOMM to be preceded by whitespace and provide a means of generating -# output lines with trailing backslashes. -# Allow XHASH to always be substituted, even in cases where XCOMM isn't. -CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ - -e '/^\#line *[0-9][0-9]* *.*$$/d' \ - -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ - -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ - -e '/^[ ]*XHASH/s/XHASH/\#/' \ - -e '/\@\@$$/s/\@\@$$/\\/' - - -# Strings to replace in man pages -XORGRELSTRING = @PACKAGE_STRING@ -XORGMANNAME = X Version 11 -XSERVERNAME = Xorg -MANDEFS = \ - -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ - -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ - -D__appmansuffix__=$(APP_MAN_SUFFIX) \ - -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ - -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ - -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ - -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ - -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ - -D__mandir__=$(mandir) \ - -D__projectroot__=$(prefix) \ - -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \ - -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) - -EXTRA_DIST = bsd-kbd_mode.man.pre sun-kbd_mode.man.pre -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .pre .man .man.pre .$(APP_MAN_SUFFIX) .man .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/utils/kbd_mode/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign hw/xfree86/utils/kbd_mode/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -kbd_mode$(EXEEXT): $(kbd_mode_OBJECTS) $(kbd_mode_DEPENDENCIES) - @rm -f kbd_mode$(EXEEXT) - $(kbd_mode_LINK) $(kbd_mode_OBJECTS) $(kbd_mode_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kbd_mode-bsd-kbd_mode.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kbd_mode-sun-kbd_mode.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -kbd_mode-bsd-kbd_mode.o: bsd-kbd_mode.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kbd_mode_CFLAGS) $(CFLAGS) -MT kbd_mode-bsd-kbd_mode.o -MD -MP -MF $(DEPDIR)/kbd_mode-bsd-kbd_mode.Tpo -c -o kbd_mode-bsd-kbd_mode.o `test -f 'bsd-kbd_mode.c' || echo '$(srcdir)/'`bsd-kbd_mode.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/kbd_mode-bsd-kbd_mode.Tpo $(DEPDIR)/kbd_mode-bsd-kbd_mode.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bsd-kbd_mode.c' object='kbd_mode-bsd-kbd_mode.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kbd_mode_CFLAGS) $(CFLAGS) -c -o kbd_mode-bsd-kbd_mode.o `test -f 'bsd-kbd_mode.c' || echo '$(srcdir)/'`bsd-kbd_mode.c - -kbd_mode-bsd-kbd_mode.obj: bsd-kbd_mode.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kbd_mode_CFLAGS) $(CFLAGS) -MT kbd_mode-bsd-kbd_mode.obj -MD -MP -MF $(DEPDIR)/kbd_mode-bsd-kbd_mode.Tpo -c -o kbd_mode-bsd-kbd_mode.obj `if test -f 'bsd-kbd_mode.c'; then $(CYGPATH_W) 'bsd-kbd_mode.c'; else $(CYGPATH_W) '$(srcdir)/bsd-kbd_mode.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/kbd_mode-bsd-kbd_mode.Tpo $(DEPDIR)/kbd_mode-bsd-kbd_mode.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bsd-kbd_mode.c' object='kbd_mode-bsd-kbd_mode.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kbd_mode_CFLAGS) $(CFLAGS) -c -o kbd_mode-bsd-kbd_mode.obj `if test -f 'bsd-kbd_mode.c'; then $(CYGPATH_W) 'bsd-kbd_mode.c'; else $(CYGPATH_W) '$(srcdir)/bsd-kbd_mode.c'; fi` - -kbd_mode-sun-kbd_mode.o: sun-kbd_mode.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kbd_mode_CFLAGS) $(CFLAGS) -MT kbd_mode-sun-kbd_mode.o -MD -MP -MF $(DEPDIR)/kbd_mode-sun-kbd_mode.Tpo -c -o kbd_mode-sun-kbd_mode.o `test -f 'sun-kbd_mode.c' || echo '$(srcdir)/'`sun-kbd_mode.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/kbd_mode-sun-kbd_mode.Tpo $(DEPDIR)/kbd_mode-sun-kbd_mode.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sun-kbd_mode.c' object='kbd_mode-sun-kbd_mode.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kbd_mode_CFLAGS) $(CFLAGS) -c -o kbd_mode-sun-kbd_mode.o `test -f 'sun-kbd_mode.c' || echo '$(srcdir)/'`sun-kbd_mode.c - -kbd_mode-sun-kbd_mode.obj: sun-kbd_mode.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kbd_mode_CFLAGS) $(CFLAGS) -MT kbd_mode-sun-kbd_mode.obj -MD -MP -MF $(DEPDIR)/kbd_mode-sun-kbd_mode.Tpo -c -o kbd_mode-sun-kbd_mode.obj `if test -f 'sun-kbd_mode.c'; then $(CYGPATH_W) 'sun-kbd_mode.c'; else $(CYGPATH_W) '$(srcdir)/sun-kbd_mode.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/kbd_mode-sun-kbd_mode.Tpo $(DEPDIR)/kbd_mode-sun-kbd_mode.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sun-kbd_mode.c' object='kbd_mode-sun-kbd_mode.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kbd_mode_CFLAGS) $(CFLAGS) -c -o kbd_mode-sun-kbd_mode.obj `if test -f 'sun-kbd_mode.c'; then $(CYGPATH_W) 'sun-kbd_mode.c'; else $(CYGPATH_W) '$(srcdir)/sun-kbd_mode.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-appmanDATA: $(appman_DATA) - @$(NORMAL_INSTALL) - test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)" - @list='$(appman_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \ - $(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \ - done - -uninstall-appmanDATA: - @$(NORMAL_UNINSTALL) - @list='$(appman_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \ - rm -f "$(DESTDIR)$(appmandir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(PROGRAMS) $(DATA) all-local -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-appmanDATA - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ - clean-binPROGRAMS clean-generic clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-appmanDATA install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-appmanDATA \ - uninstall-binPROGRAMS - - -@BUILD_KBD_MODE_TRUE@all-local: kbd_mode.man.pre $(appman_DATA) - -@BUILD_KBD_MODE_TRUE@kbd_mode.man.pre: $(MAN_SRC) -@BUILD_KBD_MODE_TRUE@ $(LN_S) $(MAN_SRC) kbd_mode.man.pre - -@BUILD_KBD_MODE_FALSE@all-local: - -.pre: - $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ - -.man.pre.man: - $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ - -.man.$(APP_MAN_SUFFIX): - -rm -f $@ - $(LN_S) $< $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/xorg-server/hw/xfree86/utils/kbd_mode/bsd-kbd_mode.c b/xorg-server/hw/xfree86/utils/kbd_mode/bsd-kbd_mode.c deleted file mode 100644 index 5f8bdbd7f..000000000 --- a/xorg-server/hw/xfree86/utils/kbd_mode/bsd-kbd_mode.c +++ /dev/null @@ -1,91 +0,0 @@ -/* Keyboard mode control program for 386BSD */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include "input.h" -#include "scrnintstr.h" - -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" - -static int fd; - -void -msg (char* s) -{ - perror (s); - close (fd); - exit (-1); -} - -int -main(int argc, char** argv) -{ -#if defined(SYSCONS_SUPPORT) || defined(PCVT_SUPPORT) - vtmode_t vtmode; -#endif - Bool syscons = FALSE; - - if ((fd = open("/dev/vga",O_RDONLY,0)) <0) - msg ("Cannot open /dev/vga"); - -#if defined(SYSCONS_SUPPORT) || defined(PCVT_SUPPORT) - /* Check if syscons */ - if (ioctl(fd, VT_GETMODE, &vtmode) >= 0) - syscons = TRUE; -#endif - - if (0 == strcmp (argv[1], "-u")) - { - if (syscons) - { -#if defined(SYSCONS_SUPPORT) || defined(PCVT_SUPPORT) - ioctl (fd, KDSKBMODE, K_RAW); -#endif - } - else - { - if (ioctl (fd, CONSOLE_X_MODE_ON, 0) < 0) - { - close (fd); - exit (0); /* Assume codrv, so nothing to do */ - } - } - } - else if (0 == strcmp (argv[1], "-a")) - { - if (syscons) - { -#if defined(SYSCONS_SUPPORT) || defined(PCVT_SUPPORT) - ioctl (fd, KDSKBMODE, K_XLATE); -#endif - } - else - { - if (ioctl (fd, CONSOLE_X_MODE_OFF, 0) < 0) - { - close (fd); - exit (0); /* Assume codrv, so nothing to do */ - } - } - } - else - { - close (fd); - fprintf (stderr,"Usage: %s [-u|-a]\n",argv[0]); - fprintf (stderr,"-u for sending up down key events in x mode.\n"); - fprintf (stderr,"-a for sending ascii keys in normal use.\n"); - exit (-1); - } - close (fd); - exit (0); -} diff --git a/xorg-server/hw/xfree86/utils/kbd_mode/bsd-kbd_mode.man.pre b/xorg-server/hw/xfree86/utils/kbd_mode/bsd-kbd_mode.man.pre deleted file mode 100644 index 3f7842cfd..000000000 --- a/xorg-server/hw/xfree86/utils/kbd_mode/bsd-kbd_mode.man.pre +++ /dev/null @@ -1,36 +0,0 @@ -.\" $XFree86: xc/programs/Xserver/hw/xfree86/etc/kbd_mode.man,v 3.4 1998/04/05 02:28:42 dawes Exp $ -.TH KBD_MODE 1 __vendorversion__ -.SH NAME -kbd_mode \- recover the PC console keyboard -.SH SYNOPSIS -.B kbd_mode -[ -a -u ] -.SH DESCRIPTION -.I Kbd_mode -resets the PC console keyboard to a rational state. -.SH OPTIONS -The following options are supported: -.TP 8 -.B \-a -Set the keyboard so that ASCII characters are read from the console. -.TP 8 -.B \-u -Set the keyboard so that undecoded keyboard values are read from the -console. -.SH EXAMPLES -If the server crashes or otherwise fails to put the keyboard back in -ascii mode when it exits, it can leave your keyboard dead. If you are -able to login remotely, you can reset it typing: -.sp - kbd_mode -a -.sp -.PP -Conversely, changing the keyboard to ascii mode while the server is -running will make the keyboard appear to be dead while the the mouse -continues to work. Again, if you are able to login remotely, you can -reset it typing: -.sp - kbd_mode -u -.sp - -.\" $TOG: kbd_mode.man /main/6 1997/07/19 10:37:14 kaleb $ diff --git a/xorg-server/hw/xfree86/utils/kbd_mode/sun-kbd_mode.c b/xorg-server/hw/xfree86/utils/kbd_mode/sun-kbd_mode.c deleted file mode 100644 index f2802a6b8..000000000 --- a/xorg-server/hw/xfree86/utils/kbd_mode/sun-kbd_mode.c +++ /dev/null @@ -1,152 +0,0 @@ -/************************************************************ -Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, provided that the above copyright no- -tice appear in all copies and that both that copyright no- -tice and this permission notice appear in supporting docu- -mentation, and that the names of Sun or The Open Group -not be used in advertising or publicity pertaining to -distribution of the software without specific prior -written permission. Sun and The Open Group make no -representations about the suitability of this software for -any purpose. It is provided "as is" without any express or -implied warranty. - -SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- -NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI- -ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH -THE USE OR PERFORMANCE OF THIS SOFTWARE. - -********************************************************/ - -/* -static char sccsid[] = "@(#)kbd_mode.c 7.1 87/04/13"; - */ - -/* - * Copyright 1986 by Sun Microsystems, Inc. - * - * kbd_mode: set keyboard encoding mode - */ - -#include -#include -#include -#if defined(SVR4) || defined(__SVR4) || defined(__bsdi__) -#include -#ifndef __bsdi__ -#include -#include -#else -#include -#include -#include -#endif -#else -#ifndef CSRG_BASED -#include -#include -#else -#include -#include -#endif -#endif -#include -#include -#include - -static void die(char*); -static void usage(void); -static int kbd_fd; - -int -main(argc, argv) - int argc; - char** argv; -{ - int code = 0, translate, direct = -1; - char led; - int click; - - if ((kbd_fd = open("/dev/kbd", O_RDONLY, 0)) < 0) { - die("Couldn't open /dev/kbd"); - } - argc--; argv++; - if (argc-- && **argv == '-') { - code = *(++*argv); - } else { - usage(); - } - switch (code) { - case 'a': - case 'A': - translate = TR_ASCII; - direct = 0; - break; - case 'e': - case 'E': - translate = TR_EVENT; - break; - case 'n': - case 'N': - translate = TR_NONE; - break; - case 'u': - case 'U': - translate = TR_UNTRANS_EVENT; - break; - default: - usage(); - } -#ifdef KIOCSLED - led = 0; - if (ioctl(kbd_fd, KIOCSLED, &led)) - die("Couldn't set LEDs"); -#endif -#ifdef KIOCCMD - click = KBD_CMD_NOCLICK; - if (ioctl(kbd_fd, KIOCCMD, &click)) - die("Couldn't set click"); -#endif - if (ioctl(kbd_fd, KIOCTRANS, (caddr_t) &translate)) - die("Couldn't set translation"); - if (direct != -1 && ioctl(kbd_fd, KIOCSDIRECT, (caddr_t) &direct)) - die("Couldn't set redirect"); - return 0; -} - -static void -die(char *msg) -{ - fprintf(stderr, "%s\n", msg); - exit(1); -} - -static void -usage(void) -{ - int translate; - - if (ioctl(kbd_fd, KIOCGTRANS, (caddr_t) &translate)) { - die("Couldn't inquire current translation"); - } - fprintf(stderr, "kbd_mode {-a | -e | -n | -u }\n"); - fprintf(stderr, "\tfor ascii, encoded (normal) SunView events,\n"); - fprintf(stderr, " \tnon-encoded, or unencoded SunView events, resp.\n"); - fprintf(stderr, "Current mode is %s.\n", - ( translate == 0 ? "n (non-translated bytes)" : - ( translate == 1 ? "a (ascii bytes)" : - ( translate == 2 ? "e (encoded events)" : - /* translate == 3 */ "u (unencoded events)")))); - exit(1); -} - - diff --git a/xorg-server/hw/xfree86/utils/kbd_mode/sun-kbd_mode.man.pre b/xorg-server/hw/xfree86/utils/kbd_mode/sun-kbd_mode.man.pre deleted file mode 100644 index 367b4fc9a..000000000 --- a/xorg-server/hw/xfree86/utils/kbd_mode/sun-kbd_mode.man.pre +++ /dev/null @@ -1,53 +0,0 @@ -.\" $Xorg: kbd_mode.man,v 1.4 2001/02/09 02:04:43 xorgcvs Exp $ -.\" Copyright 1987 Sun Microsystems, Inc. -.\" Copyright 1993, 1998 The Open Group -.\" -.\" Permission to use, copy, modify, distribute, and sell this software and its -.\" documentation for any purpose is hereby granted without fee, provided that -.\" the above copyright notice appear in all copies and that both that -.\" copyright notice and this permission notice appear in supporting -.\" documentation. -.\" -.\" The above copyright notice and this permission notice shall be included -.\" in all copies or substantial portions of the Software. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -.\" OTHER DEALINGS IN THE SOFTWARE. -.\" -.\" Except as contained in this notice, the name of The Open Group shall -.\" not be used in advertising or otherwise to promote the sale, use or -.\" other dealings in this Software without prior written authorization -.\" from The Open Group. -.\" -.\" $XFree86: xc/programs/Xserver/hw/sun/kbd_mode.man,v 1.6 2001/01/27 18:20:41 dawes Exp $ -.\" -.TH KBD_MODE 1 __xorgversion__ -.SH NAME -kbd_mode \- recover the Sun console keyboard -.SH SYNOPSIS -.B kbd_mode -[ -a -e -n -u ] -.SH DESCRIPTION -.I Kbd_mode -resets the Sun console keyboard to a rational state. -.SH OPTIONS -The following options are supported, see \fIkb(4S)\fP for details: -.TP 8 -.B \-a -Causes ASCII to be reported. -.TP 8 -.B \-e -Causes \fIFirm_events\fP to be reported. -.TP 8 -.B \-n -Causes up/down key codes to be reported. -.TP 8 -.B \-u -Causes undecoded keyboard values to be reported. -.SH SEE ALSO -kb(4S) diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/Makefile.am b/xorg-server/hw/xfree86/utils/xorgcfg/Makefile.am deleted file mode 100644 index 31d1b3f00..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/Makefile.am +++ /dev/null @@ -1,164 +0,0 @@ -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, and/or sell copies of the Software, and to permit persons -# to whom the Software is furnished to do so, provided that the above -# copyright notice(s) and this permission notice appear in all copies of -# the Software and that both the above copyright notice(s) and this -# permission notice appear in supporting documentation. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL -# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING -# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# -# Except as contained in this notice, the name of a copyright holder -# shall not be used in advertising or otherwise to promote the sale, use -# or other dealings in this Software without prior written authorization -# of the copyright holder. -# - -if BUILD_XORGCFG -bin_PROGRAMS = xorgcfg - -INCLUDES = $(XORG_INCS) -I$(top_srcdir)/hw/xfree86/parser - -OPTIONSPATH=$(libdir)/X11 - -xorgcfg_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) $(CURSESDEFINES) \ - $(XORGCFG_DEP_CFLAGS) -DXKB_RULES_DIR=\"$(XKB_BASE_DIRECTORY)/rules\" \ - -DPROJECT_ROOT=\"$(PROJECTROOT)\" -DOPTIONSPATH=\"$(OPTIONSPATH)\" -xorgcfg_LDADD = $(XORGCFG_DEP_LIBS) ../../parser/libxf86config.a $(LOADERLIB) \ - ../../os-support/libxorgos.la ../../dummylib/libdummy-nonserver.a \ - ${SYS_LIBS} - -#if DoLoadableServer -LDSRCS = \ - loader.c loadmod.c -LOADERLIB = ../../loader/libloader.a -#endif - -if USE_CURSES -TEXTSRC = text-mode.c -TEXTOBJ = text-mode.o -CURSESDEFINES = -DHAS_NCURSES -endif - -if NEED_STRLCAT -STRL_SRCS = $(top_srcdir)/os/strlcat.c $(top_srcdir)/os/strlcpy.c -endif -endif BUILD_XORGCFG - -xorgcfg_SOURCES = \ - accessx.c \ - card-cfg.c \ - cards.c \ - config.c \ - expert.c \ - help.c \ - interface.c \ - keyboard-cfg.c \ - $(LDSRCS) \ - monitor-cfg.c \ - mouse-cfg.c \ - options.c \ - screen-cfg.c \ - screen.c \ - $(SNPRINTFSRCS) \ - startx.c \ - $(STRLSRCS) \ - stubs.c \ - $(TEXTSRC) \ - vidmode.c \ - xf86config.c \ - card-cfg.h \ - cards.h \ - config.h \ - help.h \ - keyboard-cfg.h \ - loader.h \ - monitor-cfg.h \ - mouse-cfg.h \ - options.h \ - screen-cfg.h \ - screen.h \ - stubs.h \ - vidmode.h \ - xf86config.h \ - $(STRL_SRCS) - -BITMAPS = \ - card.xbm \ - keyboard.xbm \ - monitor.xbm \ - mouse.xbm \ - left.xbm \ - right.xbm \ - up.xbm \ - down.xbm \ - wider.xbm \ - narrower.xbm \ - shorter.xbm \ - taller.xbm - -PIXMAPS = \ - card.xpm \ - computer.xpm \ - keyboard.xpm \ - monitor.xpm \ - mouse.xpm - -# Rules needed to cpp man page & app-defaults -include $(top_srcdir)/cpprules.in - -if BUILD_XORGCFG -XBMdir = $(includedir)/X11/bitmaps -XPMdir = $(includedir)/X11/pixmaps - -XBM_DATA = $(BITMAPS) -XPM_DATA = $(PIXMAPS) - -# App default files (*.ad) - -appdefaultdir = @APPDEFAULTDIR@ - -APPDEFAULTFILES = XOrgCfg - -appdefault_DATA = $(APPDEFAULTFILES) - -CPP_FILES_FLAGS = -D__VENDORNAME__="@VENDOR_STRING_SHORT@" \ - -D__VENDORVERS__="@VENDOR_MAN_VERSION@" - -# dear automake: it would be really nice if you would actually put things into -# .SUFFIXES so i wouldnt' have to do this. -XOrgCfg: XOrgCfg.pre - $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < XOrgCfg.pre | $(CPP_SED_MAGIC) > $@ - -# Man page -appmandir = $(APP_MAN_DIR) - -appman_PRE = xorgcfg.man -appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) - -all-local: $(appman_PRE) $(appman_DATA) - -BUILT_SOURCES = $(appman_PRE) -CLEANFILES = $(APPDEFAULTFILES) $(BUILT_SOURCES) $(appman_DATA) - -SUFFIXES += .$(APP_MAN_SUFFIX) .man - -.man.$(APP_MAN_SUFFIX): - -rm -f $@ - $(LN_S) $< $@ - -endif BUILD_XORGCFG - -EXTRA_DIST = $(BITMAPS) $(PIXMAPS) XOrgCfg.pre xorgcfg.man.pre diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/Makefile.in b/xorg-server/hw/xfree86/utils/xorgcfg/Makefile.in deleted file mode 100644 index df043f868..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/Makefile.in +++ /dev/null @@ -1,1305 +0,0 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, and/or sell copies of the Software, and to permit persons -# to whom the Software is furnished to do so, provided that the above -# copyright notice(s) and this permission notice appear in all copies of -# the Software and that both the above copyright notice(s) and this -# permission notice appear in supporting documentation. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL -# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING -# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# -# Except as contained in this notice, the name of a copyright holder -# shall not be used in advertising or otherwise to promote the sale, use -# or other dealings in this Software without prior written authorization -# of the copyright holder. -# - -# -*- Makefile -*- -# Rules for generating files using the C pre-processor -# (Replaces CppFileTarget from Imake) - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@BUILD_XORGCFG_TRUE@bin_PROGRAMS = xorgcfg$(EXEEXT) -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/cpprules.in TODO -@BUILD_XORGCFG_TRUE@am__append_1 = .$(APP_MAN_SUFFIX) .man -subdir = hw/xfree86/utils/xorgcfg -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ - $(top_builddir)/include/xorg-server.h \ - $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ - $(top_builddir)/include/xorg-config.h \ - $(top_builddir)/include/xkb-config.h \ - $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(XBMdir)" \ - "$(DESTDIR)$(XPMdir)" "$(DESTDIR)$(appdefaultdir)" \ - "$(DESTDIR)$(appmandir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am__xorgcfg_SOURCES_DIST = accessx.c card-cfg.c cards.c config.c \ - expert.c help.c interface.c keyboard-cfg.c loader.c loadmod.c \ - monitor-cfg.c mouse-cfg.c options.c screen-cfg.c screen.c \ - startx.c stubs.c text-mode.c vidmode.c xf86config.c card-cfg.h \ - cards.h config.h help.h keyboard-cfg.h loader.h monitor-cfg.h \ - mouse-cfg.h options.h screen-cfg.h screen.h stubs.h vidmode.h \ - xf86config.h $(top_srcdir)/os/strlcat.c \ - $(top_srcdir)/os/strlcpy.c -@BUILD_XORGCFG_TRUE@am__objects_1 = xorgcfg-loader.$(OBJEXT) \ -@BUILD_XORGCFG_TRUE@ xorgcfg-loadmod.$(OBJEXT) -@BUILD_XORGCFG_TRUE@@USE_CURSES_TRUE@am__objects_2 = xorgcfg-text-mode.$(OBJEXT) -@BUILD_XORGCFG_TRUE@@NEED_STRLCAT_TRUE@am__objects_3 = xorgcfg-strlcat.$(OBJEXT) \ -@BUILD_XORGCFG_TRUE@@NEED_STRLCAT_TRUE@ xorgcfg-strlcpy.$(OBJEXT) -am_xorgcfg_OBJECTS = xorgcfg-accessx.$(OBJEXT) \ - xorgcfg-card-cfg.$(OBJEXT) xorgcfg-cards.$(OBJEXT) \ - xorgcfg-config.$(OBJEXT) xorgcfg-expert.$(OBJEXT) \ - xorgcfg-help.$(OBJEXT) xorgcfg-interface.$(OBJEXT) \ - xorgcfg-keyboard-cfg.$(OBJEXT) $(am__objects_1) \ - xorgcfg-monitor-cfg.$(OBJEXT) xorgcfg-mouse-cfg.$(OBJEXT) \ - xorgcfg-options.$(OBJEXT) xorgcfg-screen-cfg.$(OBJEXT) \ - xorgcfg-screen.$(OBJEXT) xorgcfg-startx.$(OBJEXT) \ - xorgcfg-stubs.$(OBJEXT) $(am__objects_2) \ - xorgcfg-vidmode.$(OBJEXT) xorgcfg-xf86config.$(OBJEXT) \ - $(am__objects_3) -xorgcfg_OBJECTS = $(am_xorgcfg_OBJECTS) -am__DEPENDENCIES_1 = -@BUILD_XORGCFG_TRUE@xorgcfg_DEPENDENCIES = $(am__DEPENDENCIES_1) \ -@BUILD_XORGCFG_TRUE@ ../../parser/libxf86config.a $(LOADERLIB) \ -@BUILD_XORGCFG_TRUE@ ../../os-support/libxorgos.la \ -@BUILD_XORGCFG_TRUE@ ../../dummylib/libdummy-nonserver.a -xorgcfg_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(xorgcfg_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(xorgcfg_SOURCES) -DIST_SOURCES = $(am__xorgcfg_SOURCES_DIST) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -XBMDATA_INSTALL = $(INSTALL_DATA) -XPMDATA_INSTALL = $(INSTALL_DATA) -appdefaultDATA_INSTALL = $(INSTALL_DATA) -appmanDATA_INSTALL = $(INSTALL_DATA) -DATA = $(XBM_DATA) $(XPM_DATA) $(appdefault_DATA) $(appman_DATA) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ -ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ -APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ -APP_MAN_DIR = @APP_MAN_DIR@ -APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASE_FONT_PATH = @BASE_FONT_PATH@ -BUILD_DATE = @BUILD_DATE@ -BUILD_TIME = @BUILD_TIME@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DARWIN_LIBS = @DARWIN_LIBS@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ -DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ -DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DGA_CFLAGS = @DGA_CFLAGS@ -DGA_LIBS = @DGA_LIBS@ -DIX_CFLAGS = @DIX_CFLAGS@ -DLLTOOL = @DLLTOOL@ -DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ -DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ -DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ -DMXMODULES_LIBS = @DMXMODULES_LIBS@ -DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ -DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ -DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ -DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ -DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ -DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ -DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ -DRIPROTO_LIBS = @DRIPROTO_LIBS@ -DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ -DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ -DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ -DSYMUTIL = @DSYMUTIL@ -DTRACE = @DTRACE@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -FILE_MAN_DIR = @FILE_MAN_DIR@ -FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ -GLX_DEFINES = @GLX_DEFINES@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -HAL_CFLAGS = @HAL_CFLAGS@ -HAL_LIBS = @HAL_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ -KDRIVE_INCS = @KDRIVE_INCS@ -KDRIVE_LIBS = @KDRIVE_LIBS@ -KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ -KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ -KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ -LDFLAGS = @LDFLAGS@ -LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ -LIBDRM_LIBS = @LIBDRM_LIBS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_MAN_DIR = @LIB_MAN_DIR@ -LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ -MISC_MAN_DIR = @MISC_MAN_DIR@ -MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ -MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCCLD = @OBJCCLD@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJCLINK = @OBJCLINK@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ -PCIACCESS_LIBS = @PCIACCESS_LIBS@ -PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ -PERL = @PERL@ -PKG_CONFIG = @PKG_CONFIG@ -PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ -RANLIB = @RANLIB@ -RAWCPP = @RAWCPP@ -RAWCPPFLAGS = @RAWCPPFLAGS@ -SED = sed -SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ -SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ -STRIP = @STRIP@ -TSLIB_CFLAGS = @TSLIB_CFLAGS@ -TSLIB_LIBS = @TSLIB_LIBS@ -UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ -VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ -VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ -X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ -X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ -XDMCP_CFLAGS = @XDMCP_CFLAGS@ -XDMCP_LIBS = @XDMCP_LIBS@ -XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ -XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ -XDMX_CFLAGS = @XDMX_CFLAGS@ -XDMX_LIBS = @XDMX_LIBS@ -XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ -XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ -XEPHYR_INCS = @XEPHYR_INCS@ -XEPHYR_LIBS = @XEPHYR_LIBS@ -XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ -XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ -XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ -XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ -XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ -XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ -XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ -XLIB_CFLAGS = @XLIB_CFLAGS@ -XLIB_LIBS = @XLIB_LIBS@ -XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ -XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ -XNEST_LIBS = @XNEST_LIBS@ -XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ -XORG_CFLAGS = @XORG_CFLAGS@ -XORG_INCS = @XORG_INCS@ -XORG_LIBS = @XORG_LIBS@ -XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ -XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ -XORG_OS = @XORG_OS@ -XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ -XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ -XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ -XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ -XSDL_INCS = @XSDL_INCS@ -XSDL_LIBS = @XSDL_LIBS@ -XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ -XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ -XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ -XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ -XSERVER_LIBS = @XSERVER_LIBS@ -XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ -XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ -XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ -XVFB_LIBS = @XVFB_LIBS@ -XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ -XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ -XWINMODULES_LIBS = @XWINMODULES_LIBS@ -XWIN_LIBS = @XWIN_LIBS@ -XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ -XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -__XCONFIGFILE__ = @__XCONFIGFILE__@ -abi_ansic = @abi_ansic@ -abi_extension = @abi_extension@ -abi_font = @abi_font@ -abi_videodrv = @abi_videodrv@ -abi_xinput = @abi_xinput@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -driverdir = @driverdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -extdir = @extdir@ -ft_config = @ft_config@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -logdir = @logdir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -moduledir = @moduledir@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sdkdir = @sdkdir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ -@BUILD_XORGCFG_TRUE@INCLUDES = $(XORG_INCS) -I$(top_srcdir)/hw/xfree86/parser -@BUILD_XORGCFG_TRUE@OPTIONSPATH = $(libdir)/X11 -@BUILD_XORGCFG_TRUE@xorgcfg_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) $(CURSESDEFINES) \ -@BUILD_XORGCFG_TRUE@ $(XORGCFG_DEP_CFLAGS) -DXKB_RULES_DIR=\"$(XKB_BASE_DIRECTORY)/rules\" \ -@BUILD_XORGCFG_TRUE@ -DPROJECT_ROOT=\"$(PROJECTROOT)\" -DOPTIONSPATH=\"$(OPTIONSPATH)\" - -@BUILD_XORGCFG_TRUE@xorgcfg_LDADD = $(XORGCFG_DEP_LIBS) ../../parser/libxf86config.a $(LOADERLIB) \ -@BUILD_XORGCFG_TRUE@ ../../os-support/libxorgos.la ../../dummylib/libdummy-nonserver.a \ -@BUILD_XORGCFG_TRUE@ ${SYS_LIBS} - - -#if DoLoadableServer -@BUILD_XORGCFG_TRUE@LDSRCS = \ -@BUILD_XORGCFG_TRUE@ loader.c loadmod.c - -@BUILD_XORGCFG_TRUE@LOADERLIB = ../../loader/libloader.a -#endif -@BUILD_XORGCFG_TRUE@@USE_CURSES_TRUE@TEXTSRC = text-mode.c -@BUILD_XORGCFG_TRUE@@USE_CURSES_TRUE@TEXTOBJ = text-mode.o -@BUILD_XORGCFG_TRUE@@USE_CURSES_TRUE@CURSESDEFINES = -DHAS_NCURSES -@BUILD_XORGCFG_TRUE@@NEED_STRLCAT_TRUE@STRL_SRCS = $(top_srcdir)/os/strlcat.c $(top_srcdir)/os/strlcpy.c -xorgcfg_SOURCES = \ - accessx.c \ - card-cfg.c \ - cards.c \ - config.c \ - expert.c \ - help.c \ - interface.c \ - keyboard-cfg.c \ - $(LDSRCS) \ - monitor-cfg.c \ - mouse-cfg.c \ - options.c \ - screen-cfg.c \ - screen.c \ - $(SNPRINTFSRCS) \ - startx.c \ - $(STRLSRCS) \ - stubs.c \ - $(TEXTSRC) \ - vidmode.c \ - xf86config.c \ - card-cfg.h \ - cards.h \ - config.h \ - help.h \ - keyboard-cfg.h \ - loader.h \ - monitor-cfg.h \ - mouse-cfg.h \ - options.h \ - screen-cfg.h \ - screen.h \ - stubs.h \ - vidmode.h \ - xf86config.h \ - $(STRL_SRCS) - -BITMAPS = \ - card.xbm \ - keyboard.xbm \ - monitor.xbm \ - mouse.xbm \ - left.xbm \ - right.xbm \ - up.xbm \ - down.xbm \ - wider.xbm \ - narrower.xbm \ - shorter.xbm \ - taller.xbm - -PIXMAPS = \ - card.xpm \ - computer.xpm \ - keyboard.xpm \ - monitor.xpm \ - mouse.xpm - -SUFFIXES = .pre .man .man.pre $(am__append_1) - -# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM -# to cpp, because that trick does not work on all ANSI C preprocessors. -# Delete line numbers from the cpp output (-P is not portable, I guess). -# Allow XCOMM to be preceded by whitespace and provide a means of generating -# output lines with trailing backslashes. -# Allow XHASH to always be substituted, even in cases where XCOMM isn't. -CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ - -e '/^\#line *[0-9][0-9]* *.*$$/d' \ - -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ - -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ - -e '/^[ ]*XHASH/s/XHASH/\#/' \ - -e '/\@\@$$/s/\@\@$$/\\/' - - -# Strings to replace in man pages -XORGRELSTRING = @PACKAGE_STRING@ -XORGMANNAME = X Version 11 -XSERVERNAME = Xorg -MANDEFS = \ - -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ - -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ - -D__appmansuffix__=$(APP_MAN_SUFFIX) \ - -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ - -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ - -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ - -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ - -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ - -D__mandir__=$(mandir) \ - -D__projectroot__=$(prefix) \ - -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \ - -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) - - -# Rules needed to cpp man page & app-defaults -@BUILD_XORGCFG_TRUE@XBMdir = $(includedir)/X11/bitmaps -@BUILD_XORGCFG_TRUE@XPMdir = $(includedir)/X11/pixmaps -@BUILD_XORGCFG_TRUE@XBM_DATA = $(BITMAPS) -@BUILD_XORGCFG_TRUE@XPM_DATA = $(PIXMAPS) - -# App default files (*.ad) -@BUILD_XORGCFG_TRUE@appdefaultdir = @APPDEFAULTDIR@ -@BUILD_XORGCFG_TRUE@APPDEFAULTFILES = XOrgCfg -@BUILD_XORGCFG_TRUE@appdefault_DATA = $(APPDEFAULTFILES) -@BUILD_XORGCFG_TRUE@CPP_FILES_FLAGS = -D__VENDORNAME__="@VENDOR_STRING_SHORT@" \ -@BUILD_XORGCFG_TRUE@ -D__VENDORVERS__="@VENDOR_MAN_VERSION@" - - -# Man page -@BUILD_XORGCFG_TRUE@appmandir = $(APP_MAN_DIR) -@BUILD_XORGCFG_TRUE@appman_PRE = xorgcfg.man -@BUILD_XORGCFG_TRUE@appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) -@BUILD_XORGCFG_TRUE@BUILT_SOURCES = $(appman_PRE) -@BUILD_XORGCFG_TRUE@CLEANFILES = $(APPDEFAULTFILES) $(BUILT_SOURCES) $(appman_DATA) -EXTRA_DIST = $(BITMAPS) $(PIXMAPS) XOrgCfg.pre xorgcfg.man.pre -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .pre .man .man.pre .$(APP_MAN_SUFFIX) .man .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/utils/xorgcfg/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign hw/xfree86/utils/xorgcfg/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -xorgcfg$(EXEEXT): $(xorgcfg_OBJECTS) $(xorgcfg_DEPENDENCIES) - @rm -f xorgcfg$(EXEEXT) - $(xorgcfg_LINK) $(xorgcfg_OBJECTS) $(xorgcfg_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-accessx.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-card-cfg.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-cards.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-config.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-expert.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-help.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-interface.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-keyboard-cfg.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-loader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-loadmod.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-monitor-cfg.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-mouse-cfg.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-options.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-screen-cfg.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-screen.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-startx.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-strlcat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-strlcpy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-stubs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-text-mode.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-vidmode.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgcfg-xf86config.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -xorgcfg-accessx.o: accessx.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-accessx.o -MD -MP -MF $(DEPDIR)/xorgcfg-accessx.Tpo -c -o xorgcfg-accessx.o `test -f 'accessx.c' || echo '$(srcdir)/'`accessx.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-accessx.Tpo $(DEPDIR)/xorgcfg-accessx.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='accessx.c' object='xorgcfg-accessx.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-accessx.o `test -f 'accessx.c' || echo '$(srcdir)/'`accessx.c - -xorgcfg-accessx.obj: accessx.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-accessx.obj -MD -MP -MF $(DEPDIR)/xorgcfg-accessx.Tpo -c -o xorgcfg-accessx.obj `if test -f 'accessx.c'; then $(CYGPATH_W) 'accessx.c'; else $(CYGPATH_W) '$(srcdir)/accessx.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-accessx.Tpo $(DEPDIR)/xorgcfg-accessx.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='accessx.c' object='xorgcfg-accessx.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-accessx.obj `if test -f 'accessx.c'; then $(CYGPATH_W) 'accessx.c'; else $(CYGPATH_W) '$(srcdir)/accessx.c'; fi` - -xorgcfg-card-cfg.o: card-cfg.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-card-cfg.o -MD -MP -MF $(DEPDIR)/xorgcfg-card-cfg.Tpo -c -o xorgcfg-card-cfg.o `test -f 'card-cfg.c' || echo '$(srcdir)/'`card-cfg.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-card-cfg.Tpo $(DEPDIR)/xorgcfg-card-cfg.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='card-cfg.c' object='xorgcfg-card-cfg.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-card-cfg.o `test -f 'card-cfg.c' || echo '$(srcdir)/'`card-cfg.c - -xorgcfg-card-cfg.obj: card-cfg.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-card-cfg.obj -MD -MP -MF $(DEPDIR)/xorgcfg-card-cfg.Tpo -c -o xorgcfg-card-cfg.obj `if test -f 'card-cfg.c'; then $(CYGPATH_W) 'card-cfg.c'; else $(CYGPATH_W) '$(srcdir)/card-cfg.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-card-cfg.Tpo $(DEPDIR)/xorgcfg-card-cfg.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='card-cfg.c' object='xorgcfg-card-cfg.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-card-cfg.obj `if test -f 'card-cfg.c'; then $(CYGPATH_W) 'card-cfg.c'; else $(CYGPATH_W) '$(srcdir)/card-cfg.c'; fi` - -xorgcfg-cards.o: cards.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-cards.o -MD -MP -MF $(DEPDIR)/xorgcfg-cards.Tpo -c -o xorgcfg-cards.o `test -f 'cards.c' || echo '$(srcdir)/'`cards.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-cards.Tpo $(DEPDIR)/xorgcfg-cards.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cards.c' object='xorgcfg-cards.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-cards.o `test -f 'cards.c' || echo '$(srcdir)/'`cards.c - -xorgcfg-cards.obj: cards.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-cards.obj -MD -MP -MF $(DEPDIR)/xorgcfg-cards.Tpo -c -o xorgcfg-cards.obj `if test -f 'cards.c'; then $(CYGPATH_W) 'cards.c'; else $(CYGPATH_W) '$(srcdir)/cards.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-cards.Tpo $(DEPDIR)/xorgcfg-cards.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cards.c' object='xorgcfg-cards.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-cards.obj `if test -f 'cards.c'; then $(CYGPATH_W) 'cards.c'; else $(CYGPATH_W) '$(srcdir)/cards.c'; fi` - -xorgcfg-config.o: config.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-config.o -MD -MP -MF $(DEPDIR)/xorgcfg-config.Tpo -c -o xorgcfg-config.o `test -f 'config.c' || echo '$(srcdir)/'`config.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-config.Tpo $(DEPDIR)/xorgcfg-config.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config.c' object='xorgcfg-config.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-config.o `test -f 'config.c' || echo '$(srcdir)/'`config.c - -xorgcfg-config.obj: config.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-config.obj -MD -MP -MF $(DEPDIR)/xorgcfg-config.Tpo -c -o xorgcfg-config.obj `if test -f 'config.c'; then $(CYGPATH_W) 'config.c'; else $(CYGPATH_W) '$(srcdir)/config.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-config.Tpo $(DEPDIR)/xorgcfg-config.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config.c' object='xorgcfg-config.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-config.obj `if test -f 'config.c'; then $(CYGPATH_W) 'config.c'; else $(CYGPATH_W) '$(srcdir)/config.c'; fi` - -xorgcfg-expert.o: expert.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-expert.o -MD -MP -MF $(DEPDIR)/xorgcfg-expert.Tpo -c -o xorgcfg-expert.o `test -f 'expert.c' || echo '$(srcdir)/'`expert.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-expert.Tpo $(DEPDIR)/xorgcfg-expert.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='expert.c' object='xorgcfg-expert.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-expert.o `test -f 'expert.c' || echo '$(srcdir)/'`expert.c - -xorgcfg-expert.obj: expert.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-expert.obj -MD -MP -MF $(DEPDIR)/xorgcfg-expert.Tpo -c -o xorgcfg-expert.obj `if test -f 'expert.c'; then $(CYGPATH_W) 'expert.c'; else $(CYGPATH_W) '$(srcdir)/expert.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-expert.Tpo $(DEPDIR)/xorgcfg-expert.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='expert.c' object='xorgcfg-expert.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-expert.obj `if test -f 'expert.c'; then $(CYGPATH_W) 'expert.c'; else $(CYGPATH_W) '$(srcdir)/expert.c'; fi` - -xorgcfg-help.o: help.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-help.o -MD -MP -MF $(DEPDIR)/xorgcfg-help.Tpo -c -o xorgcfg-help.o `test -f 'help.c' || echo '$(srcdir)/'`help.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-help.Tpo $(DEPDIR)/xorgcfg-help.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='help.c' object='xorgcfg-help.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-help.o `test -f 'help.c' || echo '$(srcdir)/'`help.c - -xorgcfg-help.obj: help.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-help.obj -MD -MP -MF $(DEPDIR)/xorgcfg-help.Tpo -c -o xorgcfg-help.obj `if test -f 'help.c'; then $(CYGPATH_W) 'help.c'; else $(CYGPATH_W) '$(srcdir)/help.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-help.Tpo $(DEPDIR)/xorgcfg-help.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='help.c' object='xorgcfg-help.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-help.obj `if test -f 'help.c'; then $(CYGPATH_W) 'help.c'; else $(CYGPATH_W) '$(srcdir)/help.c'; fi` - -xorgcfg-interface.o: interface.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-interface.o -MD -MP -MF $(DEPDIR)/xorgcfg-interface.Tpo -c -o xorgcfg-interface.o `test -f 'interface.c' || echo '$(srcdir)/'`interface.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-interface.Tpo $(DEPDIR)/xorgcfg-interface.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='interface.c' object='xorgcfg-interface.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-interface.o `test -f 'interface.c' || echo '$(srcdir)/'`interface.c - -xorgcfg-interface.obj: interface.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-interface.obj -MD -MP -MF $(DEPDIR)/xorgcfg-interface.Tpo -c -o xorgcfg-interface.obj `if test -f 'interface.c'; then $(CYGPATH_W) 'interface.c'; else $(CYGPATH_W) '$(srcdir)/interface.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-interface.Tpo $(DEPDIR)/xorgcfg-interface.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='interface.c' object='xorgcfg-interface.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-interface.obj `if test -f 'interface.c'; then $(CYGPATH_W) 'interface.c'; else $(CYGPATH_W) '$(srcdir)/interface.c'; fi` - -xorgcfg-keyboard-cfg.o: keyboard-cfg.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-keyboard-cfg.o -MD -MP -MF $(DEPDIR)/xorgcfg-keyboard-cfg.Tpo -c -o xorgcfg-keyboard-cfg.o `test -f 'keyboard-cfg.c' || echo '$(srcdir)/'`keyboard-cfg.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-keyboard-cfg.Tpo $(DEPDIR)/xorgcfg-keyboard-cfg.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keyboard-cfg.c' object='xorgcfg-keyboard-cfg.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-keyboard-cfg.o `test -f 'keyboard-cfg.c' || echo '$(srcdir)/'`keyboard-cfg.c - -xorgcfg-keyboard-cfg.obj: keyboard-cfg.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-keyboard-cfg.obj -MD -MP -MF $(DEPDIR)/xorgcfg-keyboard-cfg.Tpo -c -o xorgcfg-keyboard-cfg.obj `if test -f 'keyboard-cfg.c'; then $(CYGPATH_W) 'keyboard-cfg.c'; else $(CYGPATH_W) '$(srcdir)/keyboard-cfg.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-keyboard-cfg.Tpo $(DEPDIR)/xorgcfg-keyboard-cfg.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keyboard-cfg.c' object='xorgcfg-keyboard-cfg.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-keyboard-cfg.obj `if test -f 'keyboard-cfg.c'; then $(CYGPATH_W) 'keyboard-cfg.c'; else $(CYGPATH_W) '$(srcdir)/keyboard-cfg.c'; fi` - -xorgcfg-loader.o: loader.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-loader.o -MD -MP -MF $(DEPDIR)/xorgcfg-loader.Tpo -c -o xorgcfg-loader.o `test -f 'loader.c' || echo '$(srcdir)/'`loader.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-loader.Tpo $(DEPDIR)/xorgcfg-loader.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader.c' object='xorgcfg-loader.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-loader.o `test -f 'loader.c' || echo '$(srcdir)/'`loader.c - -xorgcfg-loader.obj: loader.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-loader.obj -MD -MP -MF $(DEPDIR)/xorgcfg-loader.Tpo -c -o xorgcfg-loader.obj `if test -f 'loader.c'; then $(CYGPATH_W) 'loader.c'; else $(CYGPATH_W) '$(srcdir)/loader.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-loader.Tpo $(DEPDIR)/xorgcfg-loader.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loader.c' object='xorgcfg-loader.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-loader.obj `if test -f 'loader.c'; then $(CYGPATH_W) 'loader.c'; else $(CYGPATH_W) '$(srcdir)/loader.c'; fi` - -xorgcfg-loadmod.o: loadmod.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-loadmod.o -MD -MP -MF $(DEPDIR)/xorgcfg-loadmod.Tpo -c -o xorgcfg-loadmod.o `test -f 'loadmod.c' || echo '$(srcdir)/'`loadmod.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-loadmod.Tpo $(DEPDIR)/xorgcfg-loadmod.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loadmod.c' object='xorgcfg-loadmod.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-loadmod.o `test -f 'loadmod.c' || echo '$(srcdir)/'`loadmod.c - -xorgcfg-loadmod.obj: loadmod.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-loadmod.obj -MD -MP -MF $(DEPDIR)/xorgcfg-loadmod.Tpo -c -o xorgcfg-loadmod.obj `if test -f 'loadmod.c'; then $(CYGPATH_W) 'loadmod.c'; else $(CYGPATH_W) '$(srcdir)/loadmod.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-loadmod.Tpo $(DEPDIR)/xorgcfg-loadmod.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='loadmod.c' object='xorgcfg-loadmod.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-loadmod.obj `if test -f 'loadmod.c'; then $(CYGPATH_W) 'loadmod.c'; else $(CYGPATH_W) '$(srcdir)/loadmod.c'; fi` - -xorgcfg-monitor-cfg.o: monitor-cfg.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-monitor-cfg.o -MD -MP -MF $(DEPDIR)/xorgcfg-monitor-cfg.Tpo -c -o xorgcfg-monitor-cfg.o `test -f 'monitor-cfg.c' || echo '$(srcdir)/'`monitor-cfg.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-monitor-cfg.Tpo $(DEPDIR)/xorgcfg-monitor-cfg.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='monitor-cfg.c' object='xorgcfg-monitor-cfg.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-monitor-cfg.o `test -f 'monitor-cfg.c' || echo '$(srcdir)/'`monitor-cfg.c - -xorgcfg-monitor-cfg.obj: monitor-cfg.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-monitor-cfg.obj -MD -MP -MF $(DEPDIR)/xorgcfg-monitor-cfg.Tpo -c -o xorgcfg-monitor-cfg.obj `if test -f 'monitor-cfg.c'; then $(CYGPATH_W) 'monitor-cfg.c'; else $(CYGPATH_W) '$(srcdir)/monitor-cfg.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-monitor-cfg.Tpo $(DEPDIR)/xorgcfg-monitor-cfg.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='monitor-cfg.c' object='xorgcfg-monitor-cfg.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-monitor-cfg.obj `if test -f 'monitor-cfg.c'; then $(CYGPATH_W) 'monitor-cfg.c'; else $(CYGPATH_W) '$(srcdir)/monitor-cfg.c'; fi` - -xorgcfg-mouse-cfg.o: mouse-cfg.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-mouse-cfg.o -MD -MP -MF $(DEPDIR)/xorgcfg-mouse-cfg.Tpo -c -o xorgcfg-mouse-cfg.o `test -f 'mouse-cfg.c' || echo '$(srcdir)/'`mouse-cfg.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-mouse-cfg.Tpo $(DEPDIR)/xorgcfg-mouse-cfg.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mouse-cfg.c' object='xorgcfg-mouse-cfg.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-mouse-cfg.o `test -f 'mouse-cfg.c' || echo '$(srcdir)/'`mouse-cfg.c - -xorgcfg-mouse-cfg.obj: mouse-cfg.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-mouse-cfg.obj -MD -MP -MF $(DEPDIR)/xorgcfg-mouse-cfg.Tpo -c -o xorgcfg-mouse-cfg.obj `if test -f 'mouse-cfg.c'; then $(CYGPATH_W) 'mouse-cfg.c'; else $(CYGPATH_W) '$(srcdir)/mouse-cfg.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-mouse-cfg.Tpo $(DEPDIR)/xorgcfg-mouse-cfg.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mouse-cfg.c' object='xorgcfg-mouse-cfg.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-mouse-cfg.obj `if test -f 'mouse-cfg.c'; then $(CYGPATH_W) 'mouse-cfg.c'; else $(CYGPATH_W) '$(srcdir)/mouse-cfg.c'; fi` - -xorgcfg-options.o: options.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-options.o -MD -MP -MF $(DEPDIR)/xorgcfg-options.Tpo -c -o xorgcfg-options.o `test -f 'options.c' || echo '$(srcdir)/'`options.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-options.Tpo $(DEPDIR)/xorgcfg-options.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='options.c' object='xorgcfg-options.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-options.o `test -f 'options.c' || echo '$(srcdir)/'`options.c - -xorgcfg-options.obj: options.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-options.obj -MD -MP -MF $(DEPDIR)/xorgcfg-options.Tpo -c -o xorgcfg-options.obj `if test -f 'options.c'; then $(CYGPATH_W) 'options.c'; else $(CYGPATH_W) '$(srcdir)/options.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-options.Tpo $(DEPDIR)/xorgcfg-options.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='options.c' object='xorgcfg-options.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-options.obj `if test -f 'options.c'; then $(CYGPATH_W) 'options.c'; else $(CYGPATH_W) '$(srcdir)/options.c'; fi` - -xorgcfg-screen-cfg.o: screen-cfg.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-screen-cfg.o -MD -MP -MF $(DEPDIR)/xorgcfg-screen-cfg.Tpo -c -o xorgcfg-screen-cfg.o `test -f 'screen-cfg.c' || echo '$(srcdir)/'`screen-cfg.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-screen-cfg.Tpo $(DEPDIR)/xorgcfg-screen-cfg.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='screen-cfg.c' object='xorgcfg-screen-cfg.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-screen-cfg.o `test -f 'screen-cfg.c' || echo '$(srcdir)/'`screen-cfg.c - -xorgcfg-screen-cfg.obj: screen-cfg.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-screen-cfg.obj -MD -MP -MF $(DEPDIR)/xorgcfg-screen-cfg.Tpo -c -o xorgcfg-screen-cfg.obj `if test -f 'screen-cfg.c'; then $(CYGPATH_W) 'screen-cfg.c'; else $(CYGPATH_W) '$(srcdir)/screen-cfg.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-screen-cfg.Tpo $(DEPDIR)/xorgcfg-screen-cfg.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='screen-cfg.c' object='xorgcfg-screen-cfg.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-screen-cfg.obj `if test -f 'screen-cfg.c'; then $(CYGPATH_W) 'screen-cfg.c'; else $(CYGPATH_W) '$(srcdir)/screen-cfg.c'; fi` - -xorgcfg-screen.o: screen.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-screen.o -MD -MP -MF $(DEPDIR)/xorgcfg-screen.Tpo -c -o xorgcfg-screen.o `test -f 'screen.c' || echo '$(srcdir)/'`screen.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-screen.Tpo $(DEPDIR)/xorgcfg-screen.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='screen.c' object='xorgcfg-screen.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-screen.o `test -f 'screen.c' || echo '$(srcdir)/'`screen.c - -xorgcfg-screen.obj: screen.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-screen.obj -MD -MP -MF $(DEPDIR)/xorgcfg-screen.Tpo -c -o xorgcfg-screen.obj `if test -f 'screen.c'; then $(CYGPATH_W) 'screen.c'; else $(CYGPATH_W) '$(srcdir)/screen.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-screen.Tpo $(DEPDIR)/xorgcfg-screen.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='screen.c' object='xorgcfg-screen.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-screen.obj `if test -f 'screen.c'; then $(CYGPATH_W) 'screen.c'; else $(CYGPATH_W) '$(srcdir)/screen.c'; fi` - -xorgcfg-startx.o: startx.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-startx.o -MD -MP -MF $(DEPDIR)/xorgcfg-startx.Tpo -c -o xorgcfg-startx.o `test -f 'startx.c' || echo '$(srcdir)/'`startx.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-startx.Tpo $(DEPDIR)/xorgcfg-startx.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='startx.c' object='xorgcfg-startx.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-startx.o `test -f 'startx.c' || echo '$(srcdir)/'`startx.c - -xorgcfg-startx.obj: startx.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-startx.obj -MD -MP -MF $(DEPDIR)/xorgcfg-startx.Tpo -c -o xorgcfg-startx.obj `if test -f 'startx.c'; then $(CYGPATH_W) 'startx.c'; else $(CYGPATH_W) '$(srcdir)/startx.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-startx.Tpo $(DEPDIR)/xorgcfg-startx.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='startx.c' object='xorgcfg-startx.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-startx.obj `if test -f 'startx.c'; then $(CYGPATH_W) 'startx.c'; else $(CYGPATH_W) '$(srcdir)/startx.c'; fi` - -xorgcfg-stubs.o: stubs.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-stubs.o -MD -MP -MF $(DEPDIR)/xorgcfg-stubs.Tpo -c -o xorgcfg-stubs.o `test -f 'stubs.c' || echo '$(srcdir)/'`stubs.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-stubs.Tpo $(DEPDIR)/xorgcfg-stubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stubs.c' object='xorgcfg-stubs.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-stubs.o `test -f 'stubs.c' || echo '$(srcdir)/'`stubs.c - -xorgcfg-stubs.obj: stubs.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-stubs.obj -MD -MP -MF $(DEPDIR)/xorgcfg-stubs.Tpo -c -o xorgcfg-stubs.obj `if test -f 'stubs.c'; then $(CYGPATH_W) 'stubs.c'; else $(CYGPATH_W) '$(srcdir)/stubs.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-stubs.Tpo $(DEPDIR)/xorgcfg-stubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stubs.c' object='xorgcfg-stubs.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-stubs.obj `if test -f 'stubs.c'; then $(CYGPATH_W) 'stubs.c'; else $(CYGPATH_W) '$(srcdir)/stubs.c'; fi` - -xorgcfg-text-mode.o: text-mode.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-text-mode.o -MD -MP -MF $(DEPDIR)/xorgcfg-text-mode.Tpo -c -o xorgcfg-text-mode.o `test -f 'text-mode.c' || echo '$(srcdir)/'`text-mode.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-text-mode.Tpo $(DEPDIR)/xorgcfg-text-mode.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='text-mode.c' object='xorgcfg-text-mode.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-text-mode.o `test -f 'text-mode.c' || echo '$(srcdir)/'`text-mode.c - -xorgcfg-text-mode.obj: text-mode.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-text-mode.obj -MD -MP -MF $(DEPDIR)/xorgcfg-text-mode.Tpo -c -o xorgcfg-text-mode.obj `if test -f 'text-mode.c'; then $(CYGPATH_W) 'text-mode.c'; else $(CYGPATH_W) '$(srcdir)/text-mode.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-text-mode.Tpo $(DEPDIR)/xorgcfg-text-mode.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='text-mode.c' object='xorgcfg-text-mode.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-text-mode.obj `if test -f 'text-mode.c'; then $(CYGPATH_W) 'text-mode.c'; else $(CYGPATH_W) '$(srcdir)/text-mode.c'; fi` - -xorgcfg-vidmode.o: vidmode.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-vidmode.o -MD -MP -MF $(DEPDIR)/xorgcfg-vidmode.Tpo -c -o xorgcfg-vidmode.o `test -f 'vidmode.c' || echo '$(srcdir)/'`vidmode.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-vidmode.Tpo $(DEPDIR)/xorgcfg-vidmode.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vidmode.c' object='xorgcfg-vidmode.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-vidmode.o `test -f 'vidmode.c' || echo '$(srcdir)/'`vidmode.c - -xorgcfg-vidmode.obj: vidmode.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-vidmode.obj -MD -MP -MF $(DEPDIR)/xorgcfg-vidmode.Tpo -c -o xorgcfg-vidmode.obj `if test -f 'vidmode.c'; then $(CYGPATH_W) 'vidmode.c'; else $(CYGPATH_W) '$(srcdir)/vidmode.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-vidmode.Tpo $(DEPDIR)/xorgcfg-vidmode.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vidmode.c' object='xorgcfg-vidmode.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-vidmode.obj `if test -f 'vidmode.c'; then $(CYGPATH_W) 'vidmode.c'; else $(CYGPATH_W) '$(srcdir)/vidmode.c'; fi` - -xorgcfg-xf86config.o: xf86config.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-xf86config.o -MD -MP -MF $(DEPDIR)/xorgcfg-xf86config.Tpo -c -o xorgcfg-xf86config.o `test -f 'xf86config.c' || echo '$(srcdir)/'`xf86config.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-xf86config.Tpo $(DEPDIR)/xorgcfg-xf86config.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xf86config.c' object='xorgcfg-xf86config.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-xf86config.o `test -f 'xf86config.c' || echo '$(srcdir)/'`xf86config.c - -xorgcfg-xf86config.obj: xf86config.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-xf86config.obj -MD -MP -MF $(DEPDIR)/xorgcfg-xf86config.Tpo -c -o xorgcfg-xf86config.obj `if test -f 'xf86config.c'; then $(CYGPATH_W) 'xf86config.c'; else $(CYGPATH_W) '$(srcdir)/xf86config.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-xf86config.Tpo $(DEPDIR)/xorgcfg-xf86config.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xf86config.c' object='xorgcfg-xf86config.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-xf86config.obj `if test -f 'xf86config.c'; then $(CYGPATH_W) 'xf86config.c'; else $(CYGPATH_W) '$(srcdir)/xf86config.c'; fi` - -xorgcfg-strlcat.o: $(top_srcdir)/os/strlcat.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-strlcat.o -MD -MP -MF $(DEPDIR)/xorgcfg-strlcat.Tpo -c -o xorgcfg-strlcat.o `test -f '$(top_srcdir)/os/strlcat.c' || echo '$(srcdir)/'`$(top_srcdir)/os/strlcat.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-strlcat.Tpo $(DEPDIR)/xorgcfg-strlcat.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/os/strlcat.c' object='xorgcfg-strlcat.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-strlcat.o `test -f '$(top_srcdir)/os/strlcat.c' || echo '$(srcdir)/'`$(top_srcdir)/os/strlcat.c - -xorgcfg-strlcat.obj: $(top_srcdir)/os/strlcat.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-strlcat.obj -MD -MP -MF $(DEPDIR)/xorgcfg-strlcat.Tpo -c -o xorgcfg-strlcat.obj `if test -f '$(top_srcdir)/os/strlcat.c'; then $(CYGPATH_W) '$(top_srcdir)/os/strlcat.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/os/strlcat.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-strlcat.Tpo $(DEPDIR)/xorgcfg-strlcat.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/os/strlcat.c' object='xorgcfg-strlcat.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-strlcat.obj `if test -f '$(top_srcdir)/os/strlcat.c'; then $(CYGPATH_W) '$(top_srcdir)/os/strlcat.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/os/strlcat.c'; fi` - -xorgcfg-strlcpy.o: $(top_srcdir)/os/strlcpy.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-strlcpy.o -MD -MP -MF $(DEPDIR)/xorgcfg-strlcpy.Tpo -c -o xorgcfg-strlcpy.o `test -f '$(top_srcdir)/os/strlcpy.c' || echo '$(srcdir)/'`$(top_srcdir)/os/strlcpy.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-strlcpy.Tpo $(DEPDIR)/xorgcfg-strlcpy.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/os/strlcpy.c' object='xorgcfg-strlcpy.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-strlcpy.o `test -f '$(top_srcdir)/os/strlcpy.c' || echo '$(srcdir)/'`$(top_srcdir)/os/strlcpy.c - -xorgcfg-strlcpy.obj: $(top_srcdir)/os/strlcpy.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -MT xorgcfg-strlcpy.obj -MD -MP -MF $(DEPDIR)/xorgcfg-strlcpy.Tpo -c -o xorgcfg-strlcpy.obj `if test -f '$(top_srcdir)/os/strlcpy.c'; then $(CYGPATH_W) '$(top_srcdir)/os/strlcpy.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/os/strlcpy.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgcfg-strlcpy.Tpo $(DEPDIR)/xorgcfg-strlcpy.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/os/strlcpy.c' object='xorgcfg-strlcpy.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgcfg_CFLAGS) $(CFLAGS) -c -o xorgcfg-strlcpy.obj `if test -f '$(top_srcdir)/os/strlcpy.c'; then $(CYGPATH_W) '$(top_srcdir)/os/strlcpy.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/os/strlcpy.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-XBMDATA: $(XBM_DATA) - @$(NORMAL_INSTALL) - test -z "$(XBMdir)" || $(MKDIR_P) "$(DESTDIR)$(XBMdir)" - @list='$(XBM_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(XBMDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(XBMdir)/$$f'"; \ - $(XBMDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(XBMdir)/$$f"; \ - done - -uninstall-XBMDATA: - @$(NORMAL_UNINSTALL) - @list='$(XBM_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(XBMdir)/$$f'"; \ - rm -f "$(DESTDIR)$(XBMdir)/$$f"; \ - done -install-XPMDATA: $(XPM_DATA) - @$(NORMAL_INSTALL) - test -z "$(XPMdir)" || $(MKDIR_P) "$(DESTDIR)$(XPMdir)" - @list='$(XPM_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(XPMDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(XPMdir)/$$f'"; \ - $(XPMDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(XPMdir)/$$f"; \ - done - -uninstall-XPMDATA: - @$(NORMAL_UNINSTALL) - @list='$(XPM_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(XPMdir)/$$f'"; \ - rm -f "$(DESTDIR)$(XPMdir)/$$f"; \ - done -install-appdefaultDATA: $(appdefault_DATA) - @$(NORMAL_INSTALL) - test -z "$(appdefaultdir)" || $(MKDIR_P) "$(DESTDIR)$(appdefaultdir)" - @list='$(appdefault_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(appdefaultDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appdefaultdir)/$$f'"; \ - $(appdefaultDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appdefaultdir)/$$f"; \ - done - -uninstall-appdefaultDATA: - @$(NORMAL_UNINSTALL) - @list='$(appdefault_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(appdefaultdir)/$$f'"; \ - rm -f "$(DESTDIR)$(appdefaultdir)/$$f"; \ - done -install-appmanDATA: $(appman_DATA) - @$(NORMAL_INSTALL) - test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)" - @list='$(appman_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \ - $(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \ - done - -uninstall-appmanDATA: - @$(NORMAL_UNINSTALL) - @list='$(appman_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \ - rm -f "$(DESTDIR)$(appmandir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -@BUILD_XORGCFG_FALSE@all-local: -all-am: Makefile $(PROGRAMS) $(DATA) all-local -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(XBMdir)" "$(DESTDIR)$(XPMdir)" "$(DESTDIR)$(appdefaultdir)" "$(DESTDIR)$(appmandir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-XBMDATA install-XPMDATA \ - install-appdefaultDATA install-appmanDATA - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-XBMDATA uninstall-XPMDATA \ - uninstall-appdefaultDATA uninstall-appmanDATA \ - uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ - clean-binPROGRAMS clean-generic clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-XBMDATA install-XPMDATA install-am \ - install-appdefaultDATA install-appmanDATA install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-XBMDATA uninstall-XPMDATA \ - uninstall-am uninstall-appdefaultDATA uninstall-appmanDATA \ - uninstall-binPROGRAMS - - -.pre: - $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ - -.man.pre.man: - $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ - -# dear automake: it would be really nice if you would actually put things into -# .SUFFIXES so i wouldnt' have to do this. -@BUILD_XORGCFG_TRUE@XOrgCfg: XOrgCfg.pre -@BUILD_XORGCFG_TRUE@ $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < XOrgCfg.pre | $(CPP_SED_MAGIC) > $@ - -@BUILD_XORGCFG_TRUE@all-local: $(appman_PRE) $(appman_DATA) - -@BUILD_XORGCFG_TRUE@.man.$(APP_MAN_SUFFIX): -@BUILD_XORGCFG_TRUE@ -rm -f $@ -@BUILD_XORGCFG_TRUE@ $(LN_S) $< $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/TODO b/xorg-server/hw/xfree86/utils/xorgcfg/TODO deleted file mode 100644 index d8d1cd5ee..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/TODO +++ /dev/null @@ -1,33 +0,0 @@ -$XFree86$ - -o Have code to fetch the SymTabRec chipset list from a video driver. - This is mostly useful for the testing tool/interface, so that the - Cards file "uptodate" state can also be verified. - Probably it is better to forgot about the Cards file, and - either parse the output of scanpci, or link libscanpci.a - (and whatever else be required) in xorgcfg. - -o Check if a module is "certified", there was some talk about a - certification process in the past. - -o Rewrite mouse driver to use the same code as video drivers, so that - it is possible to store all available options in a single place. - This would also require rewriting all existing input device modules. - (Probably most of this can be made with cpp macros). - -o Create a protocol to allow 3rd part xorgcfg modules. - -o Write an interface for testing extensions/accel, maybe a frontend to - xdpyinfo, x11perf, glxinfo, etc. - -o Write a "wizard" mode, as several users find the graphical interface - too complicated, but find the text one easier to user. - -o Write code to use a Monitors database, either update the old Monitors - file or use RedHat MonitorsDB. - Chris Morgan is writting code to use MonitorsDB. - If xorgcfg could be changed to ddcprobe (in all supported platforms), - it would be even be a better solution than using a database. - -o Add interface to allow changing comments without the need of editing - config file with a text editor. diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/XOrgCfg.pre b/xorg-server/hw/xfree86/utils/xorgcfg/XOrgCfg.pre deleted file mode 100644 index 0e7148de6..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/XOrgCfg.pre +++ /dev/null @@ -1,1852 +0,0 @@ -!! $XdotOrg: $ -!! -!! Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) -!! -!! Permission is hereby granted, free of charge, to any person obtaining a -!! copy of this software and associated documentation files (the "Software"), -!! to deal in the Software without restriction, including without limitation -!! the rights to use, copy, modify, merge, publish, distribute, sublicense, -!! and/or sell copies of the Software, and to permit persons to whom the -!! Software is furnished to do so, subject to the following conditions: -!! -!! The above copyright notice and this permission notice shall be included in -!! all copies or substantial portions of the Software. -!! -!! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -!! IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -!! FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -!! CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -!! WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -!! OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -!! SOFTWARE. -!! -!! Except as contained in this notice, the name of Conectiva Linux shall -!! not be used in advertising or otherwise to promote the sale, use or other -!! dealings in this Software without prior written authorization from -!! Conectiva Linux. -!! -!! Author: Paulo César Pereira de Andrade -!! -!! $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/XF86Cfg.ad,v 1.13 2001/05/15 18:22:23 paulo Exp $ -!! - -*Form.background: gray85 -*Label.background: gray85 -!! keyboard -*Core.background: gray85 -*Label.foreground: gray20 -*Command.background: gray80 -*Command.foreground: gray20 -*Command.borderWidth: 0 -*Command.displayList:\ -foreground gray60;\ -lines 1,-1,-1,-1,-1,1;\ -foreground gray90;\ -lines -1,0,0,0,0,-1 - -*Text.?.foreground: gray20 -*Text.borderWidth: 0 -*Text.background: gray96 -*Text.?.cursorColor: rgb:d/5/5 -*Text.displayList:\ -foreground white;\ -lines 1,-1,-1,-1,-1,1;\ -foreground gray40;\ -lines -1,0,0,0,0,-1 - -*baseTranslations: #override \ -Escape: vidmode-restore() - -*List.background: gray96 -*List.foreground: gray20 -*Viewport.borderColor: gray40 -*List.borderColor: gray40 - -*MenuButton.background: gray80 -*MenuButton.foreground: gray20 -*MenuButton.borderWidth: 0 -*MenuButton.displayList:\ -line-style solid;\ -foreground gray40;\ -lines 1,-1,-1,-1,-1,1;\ -foreground gray90;\ -lines -1,0,0,0,0,-1;\ -line-style onoffdash;\ -foreground gray80;\ -draw-rect 1,1,-2,-2 - -*SimpleMenu.background: gray80 -*SimpleMenu.?.foreground: gray20 -*SimpleMenu.borderWidth: 0 -*SimpleMenu.displayList:\ -foreground gray40;\ -lines 1,-1,-1,-1,-1,1;\ -foreground gray90;\ -lines -1,0,0,0,0,-1 - -*Dialog.displayList:\ -foreground gray40;\ -lines 1,-1,-1,-1,-1,1;\ -foreground gray90;\ -lines -1,0,0,0,0,-1 - -*Toggle.background: gray80 -*Toggle.foreground: gray20 -*Toggle.borderWidth: 0 -*Toggle.displayList:\ -foreground gray90;\ -lines 1,-1,-1,-1,-1,1;\ -foreground gray40;\ -lines -1,0,0,0,0,-1 - -*mouse.bitmap: mouse.xbm -*keyboard.bitmap: keyboard.xbm -*card.bitmap: card.xbm -*monitor.bitmap: monitor.xbm - -*Label.borderWidth: 0 -*Viewport.forceBars: True -*Viewport.allowVert: True -*Viewport.useRight: True - -.xorgcfg.geometry: 320x400 -.xorgcfg.minWidth: 320 -.xorgcfg.minHeight: 400 -.xorgcfg.maxWidth: 320 -.xorgcfg.maxHeight: 400 - -.xorgcfg.config.geometry: 320x369 -.xorgcfg.config.minWidth: 320 -.xorgcfg.config.maxWidth: 320 -.xorgcfg.config.minHeight: 369 -.xorgcfg.config.maxHeight: 369 - -*work.width: 320 -*work.height: 240 - -*error.label.label:\ -Not all required fields\n\ -were filled, or the specified\n\ -identifier is duplicated. -*error.label.vertDistance: 30 -*error.label.borderWidth: 0 -*error.label.leftBitmap: Excl -*error.command.fromVert: label -*error.command.label: Ok -*error.command.vertDistance: 20 - -*Scrollbar.translations:\ -: StartScroll(Continuous) MoveThumb() NotifyThumb()\n\ -: MoveThumb() NotifyThumb()\n\ -: NotifyScroll(Proportional) EndScroll() - -*Scrollbar.background: gray80 -*Scrollbar.foreground: rgb:a/5/5 -*Scrollbar.borderWidth: 0 -*Scrollbar.thumb: vlines2 -*Scrollbar.displayList:\ -foreground gray90;\ -lines 1,-1,-1,-1,-1,1;\ -foreground gray40;\ -lines -1,0,0,0,0,-1 - -*Text.Translations: #override \ -: no-op()\n\ -: no-op()\n\ -: set-keyboard-focus() select-start() - -*top.identifier.Translations: #override \ -: no-op()\n\ -: no-op()\n\ -Return: no-op()\n\ -: set-keyboard-focus() select-start() - -*List.showCurrent: True -*Tip.timeout: 100 -*Tip.background: rgb:f/f/8 -*Tip.foreground: gray20 -*Tip.borderWidth: 0 -*Tip.displayList:\ -foreground rgb:8/8/4;\ -lines 1,-1,-1,-1,-1,1;\ -foreground rgb:f/f/c;\ -lines -1,0,0,0,0,-1 - -*Toggle.internalHeight: 2 -*Toggle.internalWidth: 2 -*mouse.label: Mouse -*keyboard.label: Keyboard -*card.label: Card -*monitor.label: Monitor - -*commands.borderWidth: 0 -*commands.defaultDistance: 2 -*commands.?.bottom: chainTop -*commands.height: 50 - -*commands.keyboard.fromHoriz: mouse -*card.fromHoriz: keyboard -*monitor.fromHoriz: card - -*commands.mouse*new.label: Add new mouse -*commands.keyboard*new.label: Add new keyboard -*commands.card*new.label: Add new video card -*commands.monitor*new.label: Add new monitor -*commands.mouse*configure.label: Configure mouse(s) -*commands.keyboard*configure.label: Configure keyboard(s) -*commands.card*configure.label: Configure video card(s) -*commands.monitor*configure.label: Configure monitor(s) -*commands.mouse*SimpleMenu*newMouse.label: New mouse -*commands.keyboard*SimpleMenu*newKeyboard.label:New keyboard -*commands.card*SimpleMenu*newcard.label: New card -*commands.monitor*SimpleMenu*newMonitor.label: New monitor - -*commands.MenuButton.translations: \ -: highlight()\n\ -: reset()\n\ -Any: highlight() set() PopupMenu() - -*hpane.showGrip: False -*hpane.expert.label: Expert Mode -*topM.min: 200 -*topM.max: 200 -*topM.justify: left -*topM.label: Configure Layout -*topM*layout.label: Configure Layout -*topM*screen.label: Configure Screen -*topM*modeline.label: Configure Modeline -*topM*accessx.label: Configure AccessX -*topM.showGrip: False -*work.showGrip: False - -*MenuButton.leftBitmap: menu10 -*SmeBSB.HorizontalMargins: 18 - -*back.label: << Back -*next.label: Next >> -*ok.label: Ok -*cancel.label: Cancel -*yes.label: Yes -*no.label: No - -*help.label: Help -*quit.label: Quit -*next.fromHoriz: back -*config*ok.fromHoriz: next -*bottom*cancel.fromHoriz: ok -*top.displayList:\ -foreground gray60;\ -lines 1,-1,-1,-1,-1,1;\ -foreground white;\ -lines -1,0,0,0,0,-1 -*bottom.displayList:\ -foreground gray60;\ -lines 1,-1,-1,-1,-1,1;\ -foreground white;\ -lines -1,0,0,0,0,-1 -*work.displayList:\ -foreground gray60;\ -lines 1,-1,-1,-1,-1,1;\ -foreground white;\ -lines -1,0,0,0,0,-1 -*options.pane.Form.displayList:\ -foreground gray60;\ -lines 1,-1,-1,-1,-1,1;\ -foreground white;\ -lines -1,0,0,0,0,-1 - -*top.label.label: Identifier: -*top.label.borderWidth: 0 -*top.identifier.fromHoriz: label -*top.label.internalHeight: 3 -*top.label.justify: left -*top.label.left: chainLeft -*top.label.right: chainLeft -*top.identifier.left: chainLeft -*top.identifier.right: chainRight - -*bottom.layout.translations: #override \ -Return: rename-layout() -*bottom.layout.label: New server layout -*bottom.layout.tip: Type a text and press Return to rename this layout -*bottom.Command.height: 19 -*bottom.Text.height: 19 -*bottom.MenuButton.height: 19 -*bottom*new.label: New server layout -*layout.fromHoriz: select -*help.fromHoriz: layout -*bottom.layout.justify: left -*bottom.select.label: Layout -*bottom.select.left: chainLeft -*bottom.select.right: chainLeft -*bottom.layout.left: chainLeft -*quit.fromHoriz: help -*bottom.?.left: chainRight -*bottom.?.right: chainRight -*bottom.?.top: chainBottom -*bottom.?.bottom: chainBottom - -*pane.bottom.min: 30 -*pane.bottom.max: 30 -*pane.bottom.showGrip: False -*pane.bottom.defaultDistance: 5 - -!! Wellcome message -*work.wellcome.borderWidth: 0 -*work.wellcome.label: Welcome to __VENDORNAME__ __VENDORVERS__ setup program -*work.?.borderWidth: 0 -!*work.?.width: 310 -*work.?.height: 290 - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! mouseDP widget -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -*mouseDP*Label.internalHeight: 0 -*mouseDP*Label.borderWidth: 0 -*mouseDP.labelD.vertDistance: 0 -*mouseDP.labelD.label: Select mouse device -*mouseDP.device.fromVert: labelD -*mouseDP.viewportD.fromVert: device -*mouseDP.device.width: 302 -*mouseDP.viewportD.vertDistance: 2 -*mouseDP.viewportD.listD.longest: 135 -*mouseDP.viewportD.width: 302 -*mouseDP.viewportD.height: 87 -*mouseDP.labelP.label: Select mouse protocol -*mouseDP.labelP.vertDistance: 10 -*mouseDP.labelP.fromVert: viewportD -*mouseDP.viewportP.fromVert: labelP -*mouseDP.viewportP.forceBars: True -*mouseDP.viewportP.allowVert: True -*mouseDP.viewportP.useRight: True -*mouseDP.viewportP.listP.longest: 135 -*mouseDP.viewportP.width: 302 -*mouseDP.viewportP.height: 110 -*mouseDP.viewportP.vertDistance: 6 -*mouseDP*List.verticalList: True -*mouseDP.emulate3.fromVert: viewportP -*mouseDP.emulate3.width: 180 -*mouseDP.apply.label: Apply changes -*mouseDP.apply.fromVert: viewportP -*mouseDP.apply.fromHoriz: emulate3 -*mouseDP.apply.width: 116 -*mouseDP.emulate3.vertDistance: 10 -*mouseDP.apply.vertDistance: 10 -*mouseDP.emulate3.label: Emulate 3 buttons -*mouseDP.emulate3.tip: Select if your mouse has only two buttons - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! keyboardML widget -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -*keyboardML.Label.vertDistance: 8 -*keyboardML.MenuButton.vertDistance: 8 -*keyboardML.keyboard.vertDistance: 10 -*keyboardML.Label.borderWidth: 0 -*keyboardML.Label.width: 115 -*keyboardML.MenuButton.width: 185 -*keyboardML.MenuButton.justify: left -*keyboardML.Label.internalWidth: 0 -*keyboardML.Label.justify: right -*keyboardML.labelR.label: Xkb rules: -*keyboardML.rules.left: chainRight -*keyboardML.rules.right: chainRight -*keyboardML.rules.fromHoriz: labelR -*keyboardML.model.fromVert: rules -*keyboardML.labelM.fromVert: rules -*keyboardML.model.left: chainRight -*keyboardML.model.right: chainRight -*keyboardML.model.fromHoriz: labelM -*keyboardML.labelM.label: Keyboard model: -*keyboardML.layout.left: chainRight -*keyboardML.layout.right: chainRight -*keyboardML.layout.fromVert: model -*keyboardML.labelL.fromVert: model -*keyboardML.layout.fromHoriz: labelL -*keyboardML.labelL.label: Keyboard layout: -*keyboardML.variant.fromVert: labelL -*keyboardML.variant.fromHoriz: labelV -*keyboardML.labelV.fromVert: labelL -*keyboardML.labelV.label: Xkb variant: -*keyboardML.options.fromVert: labelV -*keyboardML.options.fromHoriz: labelO -*keyboardML.labelO.fromVert: labelV -*keyboardML.labelO.label: Xkb options: -*keyboardML.keyboard.fromVert: labelO -*keyboardML.keyboard.borderWidth: 0 -*keyboardML.keyboard.width: 305 -*keyboardML.keyboard.height: 121 -*keyboardML.apply.vertDistance: 16 -*keyboardML.apply.fromVert: keyboard -*keyboardML.apply.label: Apply changes - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! cardModel widget -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -*cardModel.label.internalHeight: 0 -*cardModel.keyboard.borderWidth: 0 -*cardModel.label.label: Card model filter -*cardModel.label.internalHeight: 2 -*cardModel.label.borderWidth: 0 -*cardModel.viewport.vertDistance: 2 -*cardModel.viewport.fromVert: filter -*cardModel.filter.fromHoriz: label -*cardModel.filter.width: 171 -*cardModel.viewport.width: 302 -*cardModel.viewport.height: 212 -*cardModel.driver.justify: left -*cardModel.driverL.label: Driver -*cardModel.driverL.fromVert: viewport -*cardModel.driverL.width: 50 -*cardModel.driverL.justify: right -*cardModel.driver.fromVert: viewport -*cardModel.driver.fromHoriz: driverL -*cardModel.driver.width: 250 -*cardModel.driver.left: chainRight -*cardModel.driver.right: chainRight -*cardModel.busidL.label: BusID -*cardModel.busidL.fromVert: driver -*cardModel.busidL.width: 50 -*cardModel.busidL.justify: right -*cardModel.busid.fromVert: driver -*cardModel.busid.fromHoriz: busidL -*cardModel.busid.width: 250 -*cardModel.busid.left: chainRight -*cardModel.busid.right: chainRight -*cardModel.viewport.forceBars: True -*cardModel.viewport.allowVert: True -*cardModel.viewport.useRight: True -*cardModel.viewport.list.longest: 277 -*cardModel.filter.tip: Type name or vendor of your card and press enter -*cardModel.filter.translations: #override \ -Return: filter-card() - - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! main widget -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -*work.cpu.backgroundPixmap: computer.xpm -*work.mouse.backgroundPixmap: mouse.xpm -*work.keyboard.backgroundPixmap: keyboard.xpm -*work.card.backgroundPixmap: card.xpm -*work.monitor.backgroundPixmap: monitor.xpm - -*work.cpu.x: 130 -*work.cpu.y: 160 -*work.cpu.width: 30 -*work.cpu.height: 50 -*work.mouse.width: 26 -*work.mouse.height: 35 -*work.keyboard.width: 60 -*work.keyboard.height: 28 -*work.card.width: 41 -*work.card.height: 40 -*work.monitor.width: 47 -*work.monitor.height: 40 - -.xorgcfg.pane.work.Simple.borderWidth: 1 -.xorgcfg.pane.work.Simple.translations:\ -Any: select-device()\n\ -Any: move-device()\n\ -Any: unselect-device()\n\ -Any: device-popup()\n\ -Any: device-popdown() - -.xorgcfg.pane.work.screen.translations:\ -Any: select-device()\n\ -Any: move-device()\n\ -Any: unselect-device()\n\ -Any: device-popup()\n\ -Any: device-popdown() - -Xorgcfg.translations: #override \ -WM_PROTOCOLS: quit() -.xorgcfg.config.translations: #override \ -WM_PROTOCOLS: config-cancel() -.xorgcfg.options.translations: #override \ -WM_PROTOCOLS: options-cancel() -.xorgcfg.quit.translations: #override \ -WM_PROTOCOLS: quit-cancel() -.xorgcfg.error.translations: #override \ -WM_PROTOCOLS: error-cancel() -.xorgcfg.force.translations: #override \ -WM_PROTOCOLS: addmode-cancel() -.xorgcfg.addMode.translations: #override \ -WM_PROTOCOLS: addmode-cancel() -.xorgcfg.accessx.translations: #override \ -WM_PROTOCOLS: accessx-close() -.xorgcfg.test.translations: #override \ -WM_PROTOCOLS: testmode-cancel() -.xorgcfg.Expert.translations: #override \ -WM_PROTOCOLS: expert-close() -.xorgcfg.options.moduleOptions.translations: #override \ -WM_PROTOCOLS: module-options-close() - - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! Options -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -.xorgcfg.options.geometry: 400x176 -.xorgcfg.options.minWidth: 400 -.xorgcfg.options.maxWidth: 400 -.xorgcfg.options.minHeight: 176 -.xorgcfg.options.maxHeight: 176 - -*options*commands.remove.fromHoriz: add -*options*commands.update.fromHoriz: remove -*options*commands.help.fromHoriz: update -*options*commands.min: 30 -*options*commands.max: 30 -*options*commands.showGrip: False -*options*commands.defaultDistance: 4 -*options*commands.?.width: 100 -*options*commands.?.height: 20 - -*options*name.fromHoriz: label1 -*options*label2.fromHoriz: name -*options*value.fromHoriz: label2 -*options*label3.fromHoriz: value -*options*viewport.fromVert: name -*options*Label.borderWidth: 0 -*options.pane.form.Label.internalWidth: 0 -*options.pane.form.Label.height: 21 -*options.pane.form.Text.height: 19 -*options.pane.form.Label.top: chainTop -*options.pane.form.Text.top: chainTop -*options.pane.form.Label.bottom: chainTop -*options.pane.form.Text.bottom: chainTop -*options.pane.form.Label.horizDistance: 0 -*options.pane.form.Text.horizDistance: 0 -*options.pane.form.Label.vertDistance: 8 -*options.pane.form.Text.vertDistance: 8 -*options.pane.form.Text.width: 147 -*options*viewport.width: 390 -*options*viewport.height: 50 - -*options*viewport.horizDistance: 7 -*options*label1.horizDistance: 5 -*options*viewport.left: chainLeft -*options*viewport.right: chainRight -*options*list.longest: 376 - -*options*driverOpts.label: Options for module -*options*driverOpts.justify: left -*options*driverOpts.width: 278 -*options*popdown.label: Popdown dialog -*options*driverOpts.tip: This menu shows:\n\ - o option name\n\ - o option type - -.xorgcfg*options.moduleOptions.geometry: 360x245 -.xorgcfg*options.moduleOptions.minWidth: 360 -.xorgcfg*options.moduleOptions.maxWidth: 360 -.xorgcfg*options.moduleOptions.minHeight: 245 -.xorgcfg*options.moduleOptions.maxHeight: 245 -*options.moduleOptions*descriptions*labelType.label: Select option -*options.moduleOptions*descriptions*labelType.width: 348 -*options.moduleOptions*descriptions*module.fromVert: labelType -*options.moduleOptions*descriptions*module.label: Module -*options.moduleOptions*descriptions*Label.horizDistance: 8 -*options.moduleOptions*descriptions*option.fromVert: labelType -*options.moduleOptions*descriptions*option.label: Option -*options.moduleOptions*descriptions*option.fromHoriz: viewM -*options.moduleOptions*descriptions*viewM.fromVert: module -*options.moduleOptions*descriptions*viewM.width: 120 -*options.moduleOptions*descriptions*viewM.height: 94 -*options.moduleOptions*descriptions*modL.longest: 100 -*options.moduleOptions*descriptions*viewO.fromHoriz: viewM -*options.moduleOptions*descriptions*viewO.fromVert: option -*options.moduleOptions*descriptions*viewO.width: 220 -*options.moduleOptions*descriptions*viewO.height: 94 -*options.moduleOptions*descriptions*optL.longest: 220 -*options.moduleOptions*descriptions*desc.horizDistance: 4 -*options.moduleOptions*descriptions*desc.fromVert: viewM -*options.moduleOptions*descriptions*desc.width: 348 -*options.moduleOptions*descriptions*desc.height: 62 -*options.moduleOptions*descriptions*desc.wrap: word -*options.moduleOptions*descriptions*desc.scrollVertical: Always -*options.moduleOptions*descriptions*desc.Scrollbar.foreground: rgb:a/5/5 -*options.moduleOptions*descriptions*desc.Scrollbar.borderWidth: 1 -*options.moduleOptions*descriptions*desc.Scrollbar.borderColor: gray60 -*options.moduleOptions*descriptions.showGrip: False -*options.moduleOptions*popdown.label: Popdown dialog - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! monitor -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -*monitorl*Viewport.width: 302 -*monitorl*Text.width: 160 -*monitorl*Text.tip:\ -Select standard value from the list\n\ -below, or enter specific value here. - -*monitorl*hlabel.justify: right -*monitorl*hlabel.width: 138 -*monitorl*hlabel.label: Horizontal sync -*monitorl*hsync.fromHoriz: hlabel -*monitorl*hviewport.fromVert: hsync -*monitorl*hviewport.height: 156 -*monitorl*hlist.longest: 288 - -*monitorl*vlabel.justify: right -*monitorl*vlabel.width: 138 -*monitorl*vlabel.vertDistance: 12 -*monitorl*vsync.vertDistance: 12 -*monitorl*vlabel.fromVert: hviewport -*monitorl*vsync.fromVert: hviewport -*monitorl*vlabel.label: Vertical sync -*monitorl*vsync.fromHoriz: vlabel -*monitorl*vviewport.fromVert: vsync -*monitorl*vviewport.height: 20 -*monitorl*vlist.longest: 64 - -*monitorl*clabel.vertDistance: 12 -*monitorl*clabel.fromVert: vviewport -*monitorl*clabel.label: Select card connected to monitor -*monitorl*cmenu.fromVert: clabel -*monitorl*cmenu.width: 302 -*monitorl*cmenu.justify: left -*monitorl*none.label: None - -!! vidtune -*vidtune.Repeater.borderWidth: 1 -*vidtune.Repeater.borderColor: gray90 -*vidtune.Repeater.shapeStyle: ellipse -*vidtune.Repeater.foreground: gray30 -*vidtune.Repeater.background: gray80 -*vidtune.Repeater.width: 31 -*vidtune.Repeater.height: 29 -*vidtune.Repeater.repeatDelay: 200 -*vidtune.Repeater.decay: 0 -*vidtune.Repeater.displayList:\ -line-width 2;\ -foreground gray65;\ -draw-arc 0,0,-0,-0,230,180;\ -foreground gray95;\ -draw-arc 0,0,-0,-0,40,180;\ -foreground gray80;\ -draw-arc 0,0,-0,-0,220,10;\ -draw-arc 0,0,-0,-0,40,10 -*vidtune.Repeater.translations:\ -: set-values(1, borderColor, gray50)\n\ -: set-values(1, borderColor, gray90)\n\ -: set-values(1, borderColor, gray90) set() start()\n\ -: stop() unset() -*vidtune.left.bitmap: left.xbm -*vidtune.right.bitmap: right.xbm -*vidtune.up.bitmap: up.xbm -*vidtune.down.bitmap: down.xbm -*vidtune.wider.bitmap: wider.xbm -*vidtune.narrower.bitmap: narrower.xbm -*vidtune.shorter.bitmap: shorter.xbm -*vidtune.taller.bitmap: taller.xbm - -*vidtune.vesaB.label: Add standard VESA mode to current screen -*vidtune.vesaB.width: 312 - -*vidtune.screenB.fromVert: mode -*vidtune.screenB.width: 160 -*vidtune.screenB.horizDistance: 80 -*vidtune.prev.fromVert: vesaB -*vidtune.mode.fromVert: vesaB -*vidtune.next.fromVert: vesaB -*vidtune.prev.horizDistance: 54 -*vidtune.prev.label: << -*vidtune.mode.fromHoriz: prev -*vidtune.mode.width: 160 -*vidtune.next.label: >> -*vidtune.next.fromHoriz: mode - -*vidtune.up.fromVert: screenB -*vidtune.up.horizDistance: 143 -*vidtune.left.horizDistance: 98 -*vidtune.left.vertDistance: 16 -*vidtune.left.fromVert: up -*vidtune.monitor.fromVert: up -*vidtune.monitor.vertDistance: 0 -*vidtune.monitor.fromHoriz: left -*vidtune.right.vertDistance: 16 -*vidtune.right.fromVert: up -*vidtune.right.fromHoriz: monitor -*vidtune.down.horizDistance: 143 -*vidtune.down.fromVert: monitor -*vidtune.wider.fromVert: left -*vidtune.wider.horizDistance: 91 -*vidtune.narrower.fromVert: down -*vidtune.narrower.fromHoriz: wider -*vidtune.shorter.fromVert: down -*vidtune.shorter.fromHoriz: narrower -*vidtune.taller.fromVert: right -*vidtune.taller.fromHoriz: shorter -*vidtune.monitor.width: 47 -*vidtune.monitor.height: 40 -*vidtune.monitor.backgroundPixmap: monitor.xpm -*vidtune.narrower.horizDistance: 0 -*vidtune.shorter.horizDistance: 2 -*vidtune.taller.horizDistance: 0 -*vidtune.wider.vertDistance: 20 -*vidtune.taller.vertDistance: 20 -*vidtune.narrower.vertDistance: 0 -*vidtune.shorter.vertDistance: 0 -*vidtune.down.vertDistance: 0 - -*vidtune.monitor.tip:\ -\ WARNING\n\ -\ Using the controls here may damage your\n\ -monitor. You can safely skip this section\n\ -of the configuration process.\n\ -\n\ -Press ESC if your monitor goes out of sync. - -*vidtune.background: white -*vidtune.form.borderWidth: 0 -*vidtune.form.background: white -*vidtune.form.defaultDistance: 0 -*vidtune.form.vertDistance: 3 -*vidtune.form.horizDistance: 4 -*vidtune.form.Label.foreground: gray20 -*vidtune.form.Label.background: white -*vidtune.form.Label.font: -*-fixed-*-*-*-*-10-*-*-*-*-*-*-1 -*vidtune.form.Label.vertDistance: 0 -*vidtune*Label.justify: right - -*vidtune.form.fromVert: auto -*vidtune*hsyncstart.label: HSyncStart: -*vidtune*hsyncstart.width: 95 -*vidtune*v-hsyncstart.width: 40 -*vidtune*v-hsyncstart.fromHoriz: hsyncstart -*vidtune*vsyncstart.fromHoriz: v-hsyncstart -*vidtune*v-vsyncstart.fromHoriz: vsyncstart -*vidtune*vsyncstart.label: VSyncStart: -*vidtune*vsyncstart.width: 95 -*vidtune*v-vsyncstart.width: 40 -*vidtune*hsyncend.label: HSyncEnd: -*vidtune*hsyncend.width: 95 -*vidtune*v-hsyncend.width: 40 -*vidtune*v-hsyncend.fromHoriz: hsyncend -*vidtune*hsyncend.fromVert: hsyncstart -*vidtune*v-hsyncend.fromVert: v-hsyncstart -*vidtune*vsyncend.label: VSyncEnd: -*vidtune*vsyncend.width: 95 -*vidtune*v-vsyncend.width: 40 -*vidtune*vsyncend.fromHoriz: v-hsyncend -*vidtune*v-vsyncend.fromHoriz: vsyncend -*vidtune*vsyncend.fromVert: hsyncstart -*vidtune*v-vsyncend.fromVert: v-vsyncstart -*vidtune*htotal.label: HTotal: -*vidtune*htotal.width: 95 -*vidtune*v-htotal.width: 40 -*vidtune*v-htotal.fromHoriz: htotal -*vidtune*htotal.fromVert: hsyncend -*vidtune*v-htotal.fromVert: v-hsyncend -*vidtune*vtotal.label: VTotal: -*vidtune*vtotal.width: 95 -*vidtune*v-vtotal.width: 40 -*vidtune*vtotal.fromHoriz: v-htotal -*vidtune*v-vtotal.fromHoriz: vtotal -*vidtune*vtotal.fromVert: vsyncend -*vidtune*v-vtotal.fromVert: v-vsyncend -*vidtune*flags.label: Flags: -*vidtune*flags.width: 142 -*vidtune*v-flags.width: 156 -*vidtune*v-flags.justify: left -*vidtune*v-flags.fromHoriz: flags -*vidtune*flags.fromVert: vtotal -*vidtune*v-flags.fromVert: v-vtotal -*vidtune*clock.label: Pixel Clock (MHz): -*vidtune*clock.width: 142 -*vidtune*v-clock.width: 48 -*vidtune*v-clock.fromHoriz: clock -*vidtune*clock.fromVert: flags -*vidtune*v-clock.fromVert: v-flags -*vidtune*hsync.label: Horizontal Sync (kHz): -*vidtune*hsync.width: 142 -*vidtune*v-hsync.width: 48 -*vidtune*v-hsync.fromHoriz: hsync -*vidtune*hsync.fromVert: clock -*vidtune*v-hsync.fromVert: v-clock -*vidtune*vsync.label: Vertical Sync (Hz): -*vidtune*vsync.width: 142 -*vidtune*v-vsync.width: 48 -*vidtune*v-vsync.fromHoriz: vsync -*vidtune*vsync.fromVert: hsync -*vidtune*v-vsync.fromVert: v-hsync - -*vidtune.auto.horizDistance: 43 -*vidtune.auto.fromVert: narrower -*vidtune.auto.label: Auto -!*vidtune.auto.state: True -*vidtune.apply.fromVert: narrower -*vidtune.apply.fromHoriz: auto -*vidtune.apply.label: Apply -*vidtune.restore.fromHoriz: apply -*vidtune.restore.horizDistance: 4 -*vidtune.restore.fromVert: narrower -*vidtune.restore.label: Restore -*vidtune.update.fromVert: narrower -*vidtune.update.fromHoriz: restore -*vidtune.update.label: Update -*vidtune.test.fromVert: narrower -*vidtune.test.fromHoriz: update -*vidtune.test.label: Test - -*vidtune.Label.background: white -*vidtune.addto.vertDistance: 4 -*vidtune.addto.fromHoriz: add -*vidtune.addto.fromVert: form -*vidtune.addto.label: mode to -*vidtune.addto.horizDistance: 0 -*vidtune.ident.vertDistance: 4 -*vidtune.ident.horizDistance: 0 -*vidtune.ident.fromVert: form -*vidtune.ident.fromHoriz: addto -*vidtune.ident.width: 98 -*vidtune.ident.justify: left -*vidtune.as.vertDistance: 4 -*vidtune.as.horizDistance: 0 -*vidtune.as.fromVert: form -*vidtune.as.fromHoriz: ident -*vidtune.as.label: as: -*vidtune.text.vertDistance: 4 -*vidtune.text.horizDistance: 0 -*vidtune.text.fromVert: form -*vidtune.text.fromHoriz: as -*vidtune.text.width: 98 -*vidtune.add.vertDistance: 4 -*vidtune.add.fromVert: form -*vidtune.add.label: Add -.xorgcfg.force.geometry: 268x58 -.xorgcfg.force.minWidth: 268 -.xorgcfg.force.maxWidth: 268 -.xorgcfg.force.minHeight: 58 -.xorgcfg.force.maxHeight: 58 -.xorgcfg.force.?.label: There is already a modeline with the\n\ -specified identifier. Add anyway? - -.xorgcfg.addMode.geometry: 350x80 -.xorgcfg.addMode.minWidth: 350 -.xorgcfg.addMode.maxWidth: 350 -.xorgcfg.addMode.minHeight: 80 -.xorgcfg.addMode.maxHeight: 80 -.xorgcfg.addMode.?.label: XF86VidModeAddModeLine returned True,\n\ -but no modeline was added to the current Screen.\n\ -Do you want to add it to the Monitor section? - -.xorgcfg.test.?.label: \ Testing modeline...\n\n\ -Press ESC or stop button to quit. -.xorgcfg.test.geometry: 250x72 -.xorgcfg.test.minWidth: 250 -.xorgcfg.test.maxWidth: 250 -.xorgcfg.test.minHeight: 72 -.xorgcfg.test.maxHeight: 72 - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! screen -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -*screenD*depthL.label: Default color depth: -*screenD*depthL.height: 20 -*screenD*1.fromHoriz: depthL -*screenD*4.fromHoriz: 1 -*screenD*8.fromHoriz: 4 -*screenD*16.fromHoriz: 8 -*screenD*24.fromHoriz: 16 -*screenD*1.width: 24 -*screenD*4.width: 24 -*screenD*8.width: 24 -*screenD*16.width: 24 -*screenD*24.width: 24 -*screenD*1.horizDistance: 5 -*screenD*4.horizDistance: 5 -*screenD*8.horizDistance: 5 -*screenD*16.horizDistance: 5 -*screenD*24.horizDistance: 5 -*screenD*modeL.fromVert: depthL -*screenD*modeL.vertDistance: 14 -*screenD*modeL.label: Select resolution(s): -*screenD*viewL.fromVert: modeL -*screenD*select.fromHoriz: viewL -*screenD*unselect.fromHoriz: viewL -*screenD*select.fromVert: modeL -*screenD*unselect.fromVert: select -*screenD*up.fromHoriz: viewL -*screenD*down.fromHoriz: viewL -*screenD*up.fromVert: unselect -*screenD*down.fromVert: up -*screenD*viewR.fromHoriz: select -*screenD*viewR.fromVert: modeL -*screenD*select.bitmap: right.xbm -*screenD*unselect.bitmap: left.xbm -*screenD*up.bitmap: up.xbm -*screenD*down.bitmap: down.xbm -*screenD*viewL.width: 133 -*screenD*viewR.width: 133 -*screenD*viewL.height: 184 -*screenD*viewR.height: 184 -*screenD*listLeft.longest: 128 -*screenD*listRight.longest: 128 -*screenD*rotate.tip: Don't select any option if\n\ -your monitor is not rotated. -*screenD*rotate.vertDistance: 14 -*screenD*rotate.fromVert: viewL -*screenD*rotate.label: Rotate screen: -*screenD*CW.tip: Clock wise -*screenD*CW.vertDistance: 14 -*screenD*CW.fromVert: viewL -*screenD*CW.fromHoriz: rotate -*screenD*CW.label: CW -*screenD*CW.width: 40 -*screenD*CCW.tip: Counter-clock wise -*screenD*CCW.vertDistance: 14 -*screenD*CCW.fromVert: viewL -*screenD*CCW.fromHoriz: CW -*screenD*CCW.label: CCW -*screenD*CCW.width: 40 - -*work.screen.width: 100 -*work.screen.height: 80 - - -*Dialog.background: gray85 -*quit.ask.label: Write configuration to -*quit.ask.value.translations: #override \ -Return: write-config() -*quit.ask.label.justify: left -*quit.ask.value.width: 222 -*quit.ask.icon: Excl -.xorgcfg.quit.geometry: 230x92 -.xorgcfg.quit.minWidth: 230 -.xorgcfg.quit.maxWidth: 230 -.xorgcfg.quit.minHeight: 92 -.xorgcfg.quit.maxHeight: 92 - -*error.notice.label: Failed to write configuration file. -.xorgcfg.error.geometry: 280x50 -.xorgcfg.error.minWidth: 260 -.xorgcfg.error.maxWidth: 260 -.xorgcfg.error.minHeight: 50 -.xorgcfg.error.maxHeight: 50 - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! accessx -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -*Accessx*Label.font: -*-fixed-medium-r-*-*-13-*-*-*-*-*-iso8859-1 -*Accessx.Form.Toggle.font: -*-fixed-medium-r-*-*-13-*-*-*-*-*-iso8859-1 -*Accessx*Label.background: white -*Accessx*Label.justify: left -*Accessx*Label.internalHeight: 0 -*Accessx*Label.internalWidth: 0 -*Accessx*Label.foreground: gray35 -*Accessx*Toggle.internalHeight: 0 -*Accessx.Toggle.internalWidth: 18 -*Accessx.Toggle.justify: left -*Accessx.Toggle.foreground: gray30 -*Accessx.Toggle.background: white -*Accessx*Toggle.highlightThickness: 0 -*Accessx.Toggle.foreground: rgb:f/7/7 -*Accessx.Toggle.displayList:\ -foreground white;\ -points 0,0,-1,0;\ -foreground rgb:f/7/7;\ -fill-poly 0,2,0,-3,8,6 -*Accessx.Toggle.translations: \ -,: toggle() notify()\n\ -: set-values(1, displayList, "foreground white;points 0,0,-1,0;fill-poly 0,1,10,6,0,-2;foreground rgb:7/7/f;fill-poly 0,2,0,-3,8,6")\n\ -: set-values(1, displayList, "foreground white;points 0,0,-1,0;foreground rgb:f/7/7;fill-poly 0,2,0,-3,8,6") -*Accessx.Form.borderWidth: 1 -*Accessx.Form.borderColor: rgb:f/a/a -*Accessx.Form.vertDistance: 0 -*Accessx.Form.defaultDistance: 2 -*Accessx.borderWidth: 0 -*accessxForm.background: white -*Accessx*Form.background: white -*Accessx.background: white -*accessxForm.enable.label: Enable AccessX -*accessxForm.enable.width: 208 -*accessxForm.apply.fromHoriz: enable -*accessxForm.apply.label: Apply changes -*accessxForm.Accessx.fromVert: enable -*Accessx.timeoutToggle.background: white -*Accessx.timeoutToggle.foreground: rgb:7/7/f -*Accessx.timeoutToggle.displayList:\ -foreground rgb:a/a/f;\ -lines 1,-1,-1,-1,-1,1;\ -foreground rgb:2/2/a;\ -lines -1,0,0,0,0,-1 - -*Accessx.Form.Toggle.background: white -*Accessx.Form.Toggle.foreground: rgb:7/7/f -*Accessx.Form.Toggle.displayList:\ -foreground rgb:a/a/f;\ -lines 1,-1,-1,-1,-1,1;\ -foreground rgb:2/2/a;\ -lines -1,0,0,0,0,-1 -*Accessx.Form.Toggle.translations: \ -,: toggle() notify()\n\ -: set-values(1, displayList, "foreground rgb:a/a/f;lines 1,-1,-1,-1,-1,1;foreground rgb:2/2/a;lines -1,0,0,0,0,-1;foreground rgb:f/7/7;draw-rect 1,1,-2,-2")\n\ -: set-values(1, displayList, "foreground rgb:a/a/f;lines 1,-1,-1,-1,-1,1;foreground rgb:2/2/a;lines -1,0,0,0,0,-1") - -*Accessx.timeoutToggle.internalWidth: 4 -*Accessx.timeoutToggle.translations:\ -,: toggle() notify() -*Accessx.timeoutToggle.internalWidth: 4 -*Accessx.timeoutToggle.internalHeight: 1 -*Accessx.timeoutToggle.vertDistance: 6 -*Accessx.timeoutToggle.label: Time Out -*Accessx.timeoutLabel.fromHoriz: timeoutToggle -*Accessx.timeoutLabel.vertDistance: 7 -*Accessx.timeoutLabel.label: Time (min) -*Accessx.Label.background: white -*Accessx.timeoutNumber.vertDistance: 1 -*Accessx.timeoutNumber.fromHoriz: timeoutLabel -*Accessx.timeoutNumber.font: 6x9 -*Accessx.timeoutNumber.label: ?? -*Accessx.timeoutScroller.fromVert: timeoutNumber -*Accessx.timeoutScroller.fromHoriz: timeoutLabel -*Accessx.timeoutScroller.width: 133 -*Accessx.timeoutScroller.horizDistance: 31 -*Accessx*Scrollbar.vertDistance: 0 -*Accessx*Scrollbar.orientation: horizontal -*Accessx*Scrollbar.thumb: black -*Accessx*Scrollbar.height: 8 -*Accessx*Scrollbar.minimumThumb: 5 -*Accessx*Scrollbar.borderWidth: 1 -*Accessx*Scrollbar.borderColor: white -*Accessx*Scrollbar.foreground: rgb:f/7/7 -*Accessx*Scrollbar.background: gray95 -*Accessx*Scrollbar.displayList:\ -foreground gray80;\ -lines 1,-1,-1,-1,-1,1;\ -foreground gray90;\ -lines -1,0,0,0,0,-1 -*Accessx.sticky.fromVert: timeoutToggle -*Accessx.sticky.vertDistance: 6 -*Accessx.sticky.label: Enable StickyKeys -*Accessx.sticky.width: 304 -*Accessx.stickyForm.fromVert: sticky -*Accessx.stickyForm.Toggle.width: 148 -*Accessx.stickyForm.Toggle.internalHeight: 1 -*Accessx.stickyForm.auto.label: Auto off -*Accessx.stickyForm.beep.fromHoriz: auto -*Accessx.stickyForm.beep.label: Modifiers beep -*Accessx.mouseKeys.fromVert: stickyForm -*Accessx.mouseKeys.width: 304 -*Accessx.mouseKeys.vertDistance: 6 -*Accessx.mouseKeys.label: Enable MouseKeys -*Accessx.mouseForm.fromVert: mouseKeys -*Accessx.mouseForm.speedLabel.vertDistance: 7 -*Accessx.mouseForm.speedLabel.label: Peak speed (pixels/sec) -*Accessx.mouseForm.speedNumber.fromHoriz: speedLabel -*Accessx.mouseForm.speedNumber.font: 6x9 -*Accessx.mouseForm.speedNumber.label: ??? -*Accessx.mouseForm.speedScroller.fromHoriz: speedLabel -*Accessx.mouseForm.speedScroller.fromVert: speedNumber -*Accessx.mouseForm.speedScroller.width: 133 -*Accessx.mouseForm.timeLabel.fromVert: speedScroller -*Accessx.mouseForm.timeLabel.label: Time to peak (sec) -*Accessx.mouseForm.timeLabel.vertDistance: 7 -*Accessx.mouseForm.timeNumber.label: ??? -*Accessx.mouseForm.timeNumber.fromVert: speedScroller -*Accessx.mouseForm.timeNumber.fromHoriz: timeLabel -*Accessx.mouseForm.timeNumber.font: 6x9 -*Accessx.mouseForm.timeScroller.fromHoriz: timeLabel -*Accessx.mouseForm.timeScroller.fromVert: timeNumber -*Accessx.mouseForm.timeScroller.width: 133 -*Accessx.mouseForm.timeScroller.horizDistance: 37 -*Accessx.mouseForm.delayLabel.fromVert: timeScroller -*Accessx.mouseForm.delayLabel.label: Motion delay (sec) -*Accessx.mouseForm.delayLabel.tip:\ -Time between the initial key press\n\ -and the first repeated motion event -*Accessx.mouseForm.delayLabel.vertDistance: 7 -*Accessx.mouseForm.delayNumber.label: ??? -*Accessx.mouseForm.delayNumber.fromVert: timeScroller -*Accessx.mouseForm.delayNumber.fromHoriz: delayLabel -*Accessx.mouseForm.delayNumber.font: 6x9 -*Accessx.mouseForm.delayScroller.fromHoriz: delayLabel -*Accessx.mouseForm.delayScroller.fromVert: delayNumber -*Accessx.mouseForm.delayScroller.width: 133 -*Accessx.mouseForm.delayScroller.horizDistance: 37 -*Accessx.repeatKeys.fromVert: mouseForm -*Accessx.repeatKeys.width: 304 -*Accessx.repeatKeys.vertDistance: 6 -*Accessx.repeatKeys.label: Enable RepeatKeys -*Accessx.repeatForm.fromVert: repeatKeys -*Accessx.repeatForm.rateLabel.vertDistance: 7 -*Accessx.repeatForm.rateLabel.label: Repeat rate (sec/key) -*Accessx.repeatForm.rateNumber.fromHoriz: rateLabel -*Accessx.repeatForm.rateNumber.font: 6x9 -*Accessx.repeatForm.rateNumber.label: ???? -*Accessx.repeatForm.rateScroller.fromHoriz: rateLabel -*Accessx.repeatForm.rateScroller.fromVert: rateNumber -*Accessx.repeatForm.rateScroller.width: 133 -*Accessx.repeatForm.rateScroller.horizDistance: 16 -*Accessx.repeatForm.delayLabel.fromVert: rateScroller -*Accessx.repeatForm.delayLabel.label: Repeat delay (sec) -*Accessx.repeatForm.delayLabel.vertDistance: 7 -*Accessx.repeatForm.delayNumber.label: ???? -*Accessx.repeatForm.delayNumber.fromVert: rateScroller -*Accessx.repeatForm.delayNumber.fromHoriz: delayLabel -*Accessx.repeatForm.delayNumber.font: 6x9 -*Accessx.repeatForm.delayScroller.fromHoriz: delayLabel -*Accessx.repeatForm.delayScroller.fromVert: delayNumber -*Accessx.repeatForm.delayScroller.width: 133 -*Accessx.repeatForm.delayScroller.horizDistance: 37 -*Accessx.slow.fromVert: repeatForm -*Accessx.slow.vertDistance: 6 -*Accessx.slow.label: Enable SlowKeys -*Accessx.slow.width: 304 -*Accessx.slowForm.fromVert: slow -*Accessx.slowForm.Toggle.horizDistance: 4 -*Accessx.slowForm.Toggle.internalWidth: 4 -*Accessx.slowForm.Toggle.internalHeight: 1 -*Accessx.slowForm.beep.label: Beep when key is -*Accessx.slowForm.beep.vertDistance: 3 -*Accessx.slowForm.pressed.fromHoriz: beep -*Accessx.slowForm.pressed.label: pressed -*Accessx.slowForm.accepted.fromHoriz: pressed -*Accessx.slowForm.accepted.label: accepted -*Accessx.slowForm.slowLabel.fromVert: accepted -*Accessx.slowForm.slowLabel.label: Key delay (sec) -*Accessx.slowForm.slowLabel.vertDistance: 7 -*Accessx.slowForm.slowNumber.label: ??? -*Accessx.slowForm.slowNumber.fromVert: accepted -*Accessx.slowForm.slowNumber.fromHoriz: slowLabel -*Accessx.slowForm.slowNumber.font: 6x9 -*Accessx.slowForm.slowScroller.fromHoriz: slowLabel -*Accessx.slowForm.slowScroller.fromVert: slowNumber -*Accessx.slowForm.slowScroller.width: 133 -*Accessx.slowForm.slowScroller.horizDistance: 58 -*Accessx.bounce.fromVert: slowForm -*Accessx.bounce.vertDistance: 6 -*Accessx.bounce.label: Enable BounceKeys -*Accessx.bounce.width: 304 -*Accessx.bounceForm.fromVert: bounce -*Accessx.bounceForm.bounceLabel.label: Debounce time (sec) -*Accessx.bounceForm.bounceLabel.vertDistance: 7 -*Accessx.bounceForm.bounceNumber.label: ??? -*Accessx.bounceForm.bounceNumber.fromHoriz: bounceLabel -*Accessx.bounceForm.bounceNumber.font: 6x9 -*Accessx.bounceForm.bounceScroller.fromHoriz: bounceLabel -*Accessx.bounceForm.bounceScroller.fromVert: bounceNumber -*Accessx.bounceForm.bounceScroller.width: 133 -*Accessx.bounceForm.bounceScroller.horizDistance: 30 - -*accessx.geometry: 220x253 -*accessx.minWidth: 220 -*accessx.maxWidth: 220 -*accessx.minHeight: 253 -*accessx.maxHeight: 253 -*accessx*lock.fromVert: label -*accessx*div.fromVert: label -*accessx*div.fromHoriz: lock -*accessx*mul.fromVert: label -*accessx*mul.fromHoriz: div -*accessx*minus.fromVert: label -*accessx*minus.fromHoriz: mul -*accessx*7.fromVert: lock -*accessx*8.fromVert: div -*accessx*8.fromHoriz: 7 -*accessx*9.fromVert: mul -*accessx*9.fromHoriz: 8 -*accessx*plus.fromVert: minus -*accessx*plus.fromHoriz: 9 -*accessx*4.fromVert: 7 -*accessx*5.fromVert: 8 -*accessx*5.fromHoriz: 4 -*accessx*6.fromVert: 9 -*accessx*6.fromHoriz: 5 -*accessx*1.fromVert: 4 -*accessx*2.fromVert: 5 -*accessx*2.fromHoriz: 1 -*accessx*3.fromVert: 6 -*accessx*3.fromHoriz: 2 -*accessx*enter.fromVert: plus -*accessx*enter.fromHoriz: 3 -*accessx*0.fromVert: 2 -*accessx*del.fromVert: 3 -*accessx*del.fromHoriz: 0 -*accessx.form.background: gray80 -*accessx*Label.displayList:\ -foreground gray20;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground white;\ -lines -1,0,0,0,0,-1 -*accessx*label.font: fixed -*accessx*Label.font: -*-helvetica-bold-o-*-*-10-*-*-*-*-*-*-1 -*accessx*Label.width: 50 -*accessx*Label.height: 35 -*accessx*label.width: 212 -*accessx*label.height: 50 -*accessx*plus.height: 74 -*accessx*enter.height: 74 -*accessx*0.width: 104 -*accessx*lock.label: Num\nLock -*accessx*div.label: /\n -*accessx*mul.label: *\n -*accessx*minus.label: -\n -*accessx*7.label: 7\n -*accessx*8.label: 8\n -*accessx*9.label: 9\n -*accessx*plus.label: +\n\ \n\ \n\ \n -*accessx*4.label: 4\n -*accessx*5.label: 5\n -*accessx*6.label: 6\n -*accessx*1.label: 1\n -*accessx*2.label: 2\n -*accessx*3.label: 3\n -*accessx*enter.label: Enter\n\ \n\ \n\ \n -*accessx*0.label: 0\n -*accessx*del.label: .\n\ \n -*accessx*label.displayList:\ -foreground white;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground gray20;\ -lines -1,0,0,0,0,-1 -*accessx*label.label:\ -If your mouse does not work, use\n\ -the numeric keypad, following\n\ -the diagram bellow. -*accessx*div.displayList:\ -foreground gray20;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground white;\ -lines -1,0,0,0,0,-1;\ -foreground red;\ -font -*-helvetica-bold-o-*-*-10-*-*-*-*-*-*-1;\ -draw-string 4,30, "Button 1" -*accessx*mul.displayList:\ -foreground gray20;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground white;\ -lines -1,0,0,0,0,-1;\ -foreground red;\ -font -*-helvetica-bold-o-*-*-10-*-*-*-*-*-*-1;\ -draw-string 4,30, "Button 2" -*accessx*minus.displayList:\ -foreground gray20;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground white;\ -lines -1,0,0,0,0,-1;\ -foreground red;\ -font -*-helvetica-bold-o-*-*-10-*-*-*-*-*-*-1;\ -draw-string 4,30, "Button 3" -*accessx*7.displayList:\ -foreground gray20;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground white;\ -lines -1,0,0,0,0,-1;\ -foreground red;\ -fill-poly 20,20,20,30,30,20 -*accessx*8.displayList:\ -foreground gray20;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground white;\ -lines -1,0,0,0,0,-1;\ -foreground red;\ -fill-poly 30,20,20,30,40,30 -*accessx*9.displayList:\ -foreground gray20;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground white;\ -lines -1,0,0,0,0,-1;\ -foreground red;\ -fill-poly 20,20,30,30,30,20 -*accessx*plus.displayList:\ -foreground gray20;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground white;\ -lines -1,0,0,0,0,-1;\ -foreground red;\ -font -*-helvetica-bold-o-*-*-10-*-*-*-*-*-*-1;\ -draw-string 9,46, "Double";\ -draw-string 14,60, "Click" -*accessx*4.displayList:\ -foreground gray20;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground white;\ -lines -1,0,0,0,0,-1;\ -foreground red;\ -fill-poly 22,22,30,30,30,14 -*accessx*5.displayList:\ -foreground gray20;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground white;\ -lines -1,0,0,0,0,-1;\ -foreground red;\ -font -*-helvetica-bold-o-*-*-10*-*-*-*-*-*-1;\ -draw-string 14,30, "Click" -*accessx*6.displayList:\ -foreground gray20;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground white;\ -lines -1,0,0,0,0,-1;\ -foreground red;\ -fill-poly 30,22,22,30,22,14 -*accessx*1.displayList:\ -foreground gray20;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground white;\ -lines -1,0,0,0,0,-1;\ -foreground red;\ -fill-poly 20,20,20,30,30,30 -*accessx*2.displayList:\ -foreground gray20;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground white;\ -lines -1,0,0,0,0,-1;\ -foreground red;\ -fill-poly 28,30,20,22,36,22 -*accessx*3.displayList:\ -foreground gray20;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground white;\ -lines -1,0,0,0,0,-1;\ -foreground red;\ -fill-poly 20,30,30,30,30,20 -*accessx*enter.displayList:\ -foreground gray20;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground white;\ -lines -1,0,0,0,0,-1;\ -foreground red;\ -font -*-helvetica-bold-o-*-*-10-*-*-*-*-*-*-1;\ -draw-string 9,46, "Toggle";\ -draw-string 10,60, "Speed" -*accessx*0.displayList:\ -foreground gray20;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground white;\ -lines -1,0,0,0,0,-1;\ -foreground red;\ -font -*-helvetica-bold-o-*-*-10-*-*-*-*-*-*-1;\ -draw-string 26,30, "Button Lock" -*accessx*del.displayList:\ -foreground gray20;\ -lines +1,-1,-1,-1,-1,+1;\ -foreground white;\ -lines -1,0,0,0,0,-1;\ -foreground red;\ -font -*-helvetica-bold-o-*-*-8-*-*-*-*-*-*-1;\ -draw-string 12,21, "Button";\ -draw-string 9,30, "Release" - -*panner.width: 100 -*panner.height: 100 - -*help*text.properties:\ -default?family=Times&weight=Medium&slant=R&pixelsize=12®istry=ISO8859&encoding=1,\ -b?weight=Bold,\ -strong?weight=Bold,\ -i?slant=I,\ -em?slant=I,\ -address?slant=I,\ -h1?pixelsize=24&weight=Bold,\ -h2?pixelsize=20&weight=Bold,\ -h3?pixelsize=17&weight=Bold,\ -h4?pixelsize=14&weight=Bold,\ -h5?pixelsize=12&weight=Bold,\ -h6?pixelsize=10&weight=Bold,\ -pre?family=Courier&pixelsize=10,\ -kbd?family=Courier&pixelsize=10,\ -code?family=Courier&pixelsize=10,\ -samp?family=Courier&pixelsize=10,\ -tt?family=Courier&pixelsize=10 -*help*commands.min: 22 -*help*commands.max: 22 -*help*commands.showGrip:False -*help*wrap: word -*help*commands.close.label: Close -.xorgcfg.help.geometry: 320x369 -.xorgcfg.help.minWidth: 320 -.xorgcfg.help.maxWidth: 320 -.xorgcfg.help.minHeight: 369 -.xorgcfg.help.maxHeight: 369 -.xorgcfg.help.translations: #override \ -WM_PROTOCOLS: help-close() -*help*text.translations:\ -Up: scroll-one-line-down()\n\ -Down: scroll-one-line-up()\n\ -Next: next-page()\n\ -Prior: previous-page()\n\ -space: next-page()\n\ -BackSpace: previous-page()\n\ -Home: beginning-of-file()\n\ -End: end-of-file() -*help*text*displayCaret: False -*help*text.leftMargin: 10 -*help*text.rightMargin: 10 - -*help.helpDevices:\ -

Configuring devices

\ -You can arrange the icons pressing the left mouse button \ -and dragging them.\ -

\ -To configure a device, press the right mouse button and choose the \ -configure option.\ - -*help.helpScreen:\ -

Configuring screens

\ -You can drag the monitors to set the screen layout form Xinerama \ -pressing the left mouse button and moving them.\ -

\ -Press the right mouse button to set configure or set options for \ -the given screen. - -*help.helpModeline:\ -

Configuring modelines

\ -The controls here may damage your \ -monitor. \ -

\ -You can safelly skip this stage of the configuration process.\ -

\ -When not running in Xinerama mode, you can configure modelines \ -for every configured monitor. Set the Auto toggle to see the changes \ -while the control buttons are pressed.\ -

\ -Note that the arrow buttons are repeaters. Press they only once \ -and they will show the changes in the text labels.\ -

\ -Press ESC if the monitor goes out of sync. - -*help.helpAccessX:\ -

Configuring accessx

\ -This interface is expected to allow customizing most of the accessx \ -options.\ -

\ -Press in the Enable ??? label to set specific options.\ -

\ -Note: currently, if you press the \ -Apply changes button there is no way to undo your changes. - - -*Expert.geometry: 640x460 -*Expert*vpane.min: 64 -*Expert*vpane.max: 64 -*Expert*vpane.showGrip: False -*Expert*vpane.close.showGrip: False -*Expert*vpane.close.min: 26 -*Expert*vpane.close.max: 26 -*panner.internalSpace: 1 -*panner.shadowThickness: 0 -*panner.shadowColor: gray60 -*panner.backgroundStipple: black -*panner.borderColor: gray40 - -*expert*tree.hSpace: 12 -*expert*tree*Box.hSpace: 4 -*expert*tree*vSpace: 4 -*expert*tree*LogFile.Text.width: 192 -*expert*tree*RgbPath.Text.width: 192 -*expert*tree*ModulePath.Text.width: 192 - -*expert*tree*Form.defaultDistance: 4 - -*expert*tree.backgroundPixmap: xlogo64?foreground=gray90&background=gray92 -*expert*tree.foreground: gray45 - -*expert*tree*Label.backgroundPixmap: ParentRelative - -*expert*tree*Box.backgroundPixmap: gradient:vertical?dimension=3&start=gray85&end=gray95 -*expert*tree*Box.borderWidth: 0 -*expert*tree*Box.background: gray85 -*expert*Box.displayList:\ -foreground gray40;\ -lines 1,-1,-1,-1,-1,1;\ -foreground white;\ -lines -1,0,0,0,0,-1 - -*expert*tree*Form.backgroundPixmap: gradient:vertical?dimension=3&start=gray85&end=gray95 -*expert*tree*Form.borderWidth: 0 -*expert*tree*Form.background: gray85 -*expert*Form.displayList:\ -foreground gray40;\ -lines 1,-1,-1,-1,-1,1;\ -foreground white;\ -lines -1,0,0,0,0,-1 - -*expert*tree*Text.width: 160 - -*expert*tree*fontpath.Text.width: 228 -*expert*tree*fontpath.up.fromHoriz: remove -*expert*tree*fontpath.down.fromHoriz: up -*expert*tree*fontpath.value.fromVert: remove -*expert*tree*fontpath.valueNew.fromVert: new - -*expert*tree*modulepath.Text.width: 228 -*expert*tree*modulepath.value.fromVert: remove -*expert*tree*modulepath.valueNew.fromVert: new - -*expert*tree*module.options.fromHoriz: remove -*expert*tree*module.label.fromVert: remove -*expert*tree*module.value.fromHoriz: new -*expert*tree*module.value.width: 78 - -*expert*tree*video*Label.justify: left -*expert*tree*video.options.fromHoriz: remove -*expert*tree*video.adaptor.fromHoriz: options -*expert*tree*video.vendorL.width: 78 -*expert*tree*video.vendorL.label: VendorName -*expert*tree*video.vendorL.fromVert: remove -*expert*tree*video.vendor.fromVert: remove -*expert*tree*video.vendor.fromHoriz: vendorL -*expert*tree*video.boardL.width: 78 -*expert*tree*video.boardL.label: BoardName -*expert*tree*video.boardL.fromVert: vendor -*expert*tree*video.board.fromVert: vendor -*expert*tree*video.board.fromHoriz: boardL -*expert*tree*video.busidL.width: 78 -*expert*tree*video.busidL.label: BusID -*expert*tree*video.busidL.fromVert: board -*expert*tree*video.busid.fromVert: board -*expert*tree*video.busid.fromHoriz: busidL -*expert*tree*video.driverL.width: 78 -*expert*tree*video.driverL.label: Driver -*expert*tree*video.driverL.fromVert: busid -*expert*tree*video.driver.fromVert: busid -*expert*tree*video.driver.fromHoriz: driverL -*expert*tree*video.value.fromHoriz: new -*expert*tree*video.value.width: 78 -*expert*tree*VideoPort.fromVert: driver -*expert*tree*VideoPort.horizDistance: 120 -*expert*tree*video.value.width: 149 - -*expert*tree*port.value.fromHoriz: new -*expert*tree*port.options.fromHoriz: remove -*expert*tree*port.label.fromVert: remove -*expert*tree*port.value.width: 78 - -*expert*tree*modes.mode.fromHoriz: remove -*expert*tree*modes.value.fromHoriz: new -*expert*tree*modes.value.width: 78 - -*expert*tree*modeline.label.fromHoriz: remove -*expert*tree*modeline.modeline.fromVert: remove -*expert*tree*modeline.modeline.width: 480 -*expert*tree*modeline.value.fromHoriz: new -*expert*tree*modeline.value.width: 120 -*expert*tree*modeline.modelineNew.fromVert: value -*expert*tree*modeline.modelineNew.width: 480 - -*expert*tree*monitor.options.fromHoriz: remove -*expert*tree*monitor.label.fromHoriz: options - -*expert*tree*monitor.Label.justify: left -*expert*tree*monitor.Text.width: 120 -*expert*tree*monitor.vendorL.width: 100 -*expert*tree*monitor.vendorL.label: VendorName -*expert*tree*monitor.vendorL.fromVert: remove -*expert*tree*monitor.vendor.fromVert: remove -*expert*tree*monitor.vendor.fromHoriz: vendorL -*expert*tree*monitor.modelnameL.width: 100 -*expert*tree*monitor.modelnameL.label: ModelName -*expert*tree*monitor.modelnameL.fromVert: vendor -*expert*tree*monitor.modelname.fromVert: vendor -*expert*tree*monitor.modelname.fromHoriz: modelnameL -*expert*tree*monitor.widthL.width: 100 -*expert*tree*monitor.widthL.label: Width (mm) -*expert*tree*monitor.widthL.fromVert: modelname -*expert*tree*monitor.width.fromVert: modelname -*expert*tree*monitor.width.fromHoriz: widthL -*expert*tree*monitor.heightL.width: 100 -*expert*tree*monitor.heightL.label: Height (mm) -*expert*tree*monitor.heightL.fromVert: width -*expert*tree*monitor.height.fromVert: width -*expert*tree*monitor.height.fromHoriz: heightL -*expert*tree*monitor.hsyncL.width: 100 -*expert*tree*monitor.hsyncL.label: Hsync -*expert*tree*monitor.hsyncL.fromVert: heightL -*expert*tree*monitor.hsync.fromVert: height -*expert*tree*monitor.hsync.fromHoriz: hsyncL -*expert*tree*monitor.vrefreshL.width: 100 -*expert*tree*monitor.vrefreshL.label: Vrefresh -*expert*tree*monitor.vrefreshL.fromVert: hsync -*expert*tree*monitor.vrefresh.fromVert: hsync -*expert*tree*monitor.vrefresh.fromHoriz: vrefreshL -*expert*tree*monitor.gammaRedL.width: 100 -*expert*tree*monitor.gammaRedL.label: Gamma (red) -*expert*tree*monitor.gammaRedL.fromVert: vrefresh -*expert*tree*monitor.gammaRed.fromVert: vrefresh -*expert*tree*monitor.gammaRed.fromHoriz: gammaRedL -*expert*tree*monitor.gammaGreenL.width: 100 -*expert*tree*monitor.gammaGreenL.label: Gamma (green) -*expert*tree*monitor.gammaGreenL.fromVert: gammaRed -*expert*tree*monitor.gammaGreen.fromVert: gammaRed -*expert*tree*monitor.gammaGreen.fromHoriz: gammaGreenL -*expert*tree*monitor.gammaBlueL.width: 100 -*expert*tree*monitor.gammaBlueL.label: Gamma (blue) -*expert*tree*monitor.gammaBlueL.fromVert: gammaGreen -*expert*tree*monitor.gammaBlue.fromVert: gammaGreen -*expert*tree*monitor.gammaBlue.fromHoriz: gammaBlueL -*expert*tree*monitor.value.width: 191 -*expert*tree*monitor.value.fromHoriz: new - -*expert*tree*device.Label.justify: left -*expert*tree*device.options.fromHoriz: remove -*expert*tree*device.label.fromHoriz: options -*expert*tree*device.vendorL.label: VendorName -*expert*tree*device.vendorL.width: 100 -*expert*tree*device.vendorL.fromVert: remove -*expert*tree*device.vendor.fromVert: remove -*expert*tree*device.vendor.fromHoriz: vendorL -*expert*tree*device.boardL.label: BoardName -*expert*tree*device.boardL.width: 100 -*expert*tree*device.boardL.fromVert: vendor -*expert*tree*device.board.fromVert: vendor -*expert*tree*device.board.fromHoriz: boardL -*expert*tree*device.chipsetL.label: Chipset -*expert*tree*device.chipsetL.width: 100 -*expert*tree*device.chipsetL.fromVert: board -*expert*tree*device.chipset.fromVert: board -*expert*tree*device.chipset.fromHoriz: chipsetL -*expert*tree*device.busidL.label: BusID -*expert*tree*device.busidL.width: 100 -*expert*tree*device.busidL.fromVert: chipset -*expert*tree*device.busid.fromVert: chipset -*expert*tree*device.busid.fromHoriz: chipsetL -*expert*tree*device.cardL.label: Card -*expert*tree*device.cardL.width: 100 -*expert*tree*device.cardL.fromVert: busid -*expert*tree*device.card.fromVert: busid -*expert*tree*device.card.fromHoriz: cardL -*expert*tree*device.driverL.label: Driver -*expert*tree*device.driverL.width: 100 -*expert*tree*device.driverL.fromVert: card -*expert*tree*device.driver.fromVert: card -*expert*tree*device.driver.fromHoriz: driverL -*expert*tree*device.ramdacL.label: Ramdac -*expert*tree*device.ramdacL.width: 100 -*expert*tree*device.ramdacL.fromVert: driverL -*expert*tree*device.ramdac.fromVert: driver -*expert*tree*device.ramdac.fromHoriz: ramdacL -*expert*tree*device.dacSpeedL.label: DacSpeed -*expert*tree*device.dacSpeedL.width: 100 -*expert*tree*device.dacSpeedL.fromVert: ramdac -*expert*tree*device.dacSpeed.fromVert: ramdac -*expert*tree*device.dacSpeed.fromHoriz: dacSpeedL -*expert*tree*device.videoRamL.label: VideoRam -*expert*tree*device.videoRamL.width: 100 -*expert*tree*device.videoRamL.fromVert: dacSpeed -*expert*tree*device.videoRam.fromVert: dacSpeed -*expert*tree*device.videoRam.fromHoriz: videoRamL -*expert*tree*device.textClockFreqL.label: TextClockFreq -*expert*tree*device.textClockFreqL.width: 100 -*expert*tree*device.textClockFreqL.fromVert: videoRam -*expert*tree*device.textClockFreq.fromVert: videoRam -*expert*tree*device.textClockFreq.fromHoriz: textClockFreqL -*expert*tree*device.biosBaseL.label: BiosBase -*expert*tree*device.biosBaseL.width: 100 -*expert*tree*device.biosBaseL.fromVert: textClockFreq -*expert*tree*device.biosBase.fromVert: textClockFreq -*expert*tree*device.biosBase.fromHoriz: biosBaseL -*expert*tree*device.memBaseL.label: MemBase -*expert*tree*device.memBaseL.width: 100 -*expert*tree*device.memBaseL.fromVert: biosBase -*expert*tree*device.memBase.fromVert: biosBase -*expert*tree*device.memBase.fromHoriz: memBaseL -*expert*tree*device.ioBaseL.label: IOBase -*expert*tree*device.ioBaseL.width: 100 -*expert*tree*device.ioBaseL.fromVert: memBase -*expert*tree*device.ioBase.fromVert: memBase -*expert*tree*device.ioBase.fromHoriz: ioBaseL -*expert*tree*device.clockChipL.label: ClockChip -*expert*tree*device.clockChipL.width: 100 -*expert*tree*device.clockChipL.fromVert: ioBase -*expert*tree*device.clockChip.fromVert: ioBase -*expert*tree*device.clockChip.fromHoriz: clockChipL -*expert*tree*device.devClockL.label: Clocks -*expert*tree*device.devClockL.width: 100 -*expert*tree*device.devClockL.fromVert: clockChip -*expert*tree*device.devClock.fromVert: clockChip -*expert*tree*device.devClock.fromHoriz: devClockL -*expert*tree*device.chipIdL.label: ChipId -*expert*tree*device.chipIdL.width: 100 -*expert*tree*device.chipIdL.fromVert: devClock -*expert*tree*device.chipId.fromVert: devClock -*expert*tree*device.chipId.fromHoriz: chipIdL -*expert*tree*device.chipRevL.label: ChipRev -*expert*tree*device.chipRevL.width: 100 -*expert*tree*device.chipRevL.fromVert: chipId -*expert*tree*device.chipRev.fromVert: chipId -*expert*tree*device.chipRev.fromHoriz: chipRevL -*expert*tree*device.irqL.label: IRQ -*expert*tree*device.irqL.width: 100 -*expert*tree*device.irqL.fromVert: chipRev -*expert*tree*device.irq.fromVert: chipRev -*expert*tree*device.irq.fromHoriz: irqL -*expert*tree*device.screenL.label: Screen -*expert*tree*device.screenL.width: 100 -*expert*tree*device.screenL.fromVert: irq -*expert*tree*device.screen.fromVert: irq -*expert*tree*device.screen.fromHoriz: screenL -*expert*tree*device.value.fromHoriz: new - -*expert*tree*screen.Label.justify: left -*expert*tree*screen.options.fromHoriz: remove -*expert*tree*screen.label.fromHoriz: options -*expert*tree*screen.defaultDepthL.label: DefaultDepth -*expert*tree*screen.defaultDepthL.width: 92 -*expert*tree*screen.defaultDepthL.fromVert: remove -*expert*tree*screen.defaultDepth.fromVert: remove -*expert*tree*screen.defaultDepth.fromHoriz: defaultDepthL -*expert*tree*screen.defaultBppL.label: DefaultBpp -*expert*tree*screen.defaultBppL.width: 92 -*expert*tree*screen.defaultBppL.fromVert: defaultDepth -*expert*tree*screen.defaultBpp.fromVert: defaultDepth -*expert*tree*screen.defaultBpp.fromHoriz: defaultBppL -*expert*tree*screen.defaultFbBppL.label: DefaultFbBpp -*expert*tree*screen.defaultFbBppL.width: 92 -*expert*tree*screen.defaultFbBppL.fromVert: defaultBpp -*expert*tree*screen.defaultFbBpp.fromVert: defaultBpp -*expert*tree*screen.defaultFbBpp.fromHoriz: defaultFbBppL -*expert*tree*screen.monitorL.label: Monitor -*expert*tree*screen.monitorL.width: 92 -*expert*tree*screen.monitorL.fromVert: defaultFbBpp -*expert*tree*screen.monitor.fromVert: defaultFbBpp -*expert*tree*screen.monitor.fromHoriz: monitorL -*expert*tree*screen.deviceL.label: Device -*expert*tree*screen.deviceL.width: 92 -*expert*tree*screen.deviceL.fromVert: monitor -*expert*tree*screen.device.fromVert: monitor -*expert*tree*screen.device.fromHoriz: deviceL -*expert*tree*screen.value.fromHoriz: new - -*expert*tree*adaptor.label.fromHoriz: remove - -*expert*tree*display.Label.width: 64 -*expert*tree*display.Label.justify: left -*expert*tree*display.options.fromHoriz: remove -*expert*tree*display.viewportL.label: Viewport -*expert*tree*display.viewportL.fromVert: remove -*expert*tree*display.viewport.fromVert: remove -*expert*tree*display.viewport.fromHoriz: viewportL -*expert*tree*display.virtualL.label: Virtual -*expert*tree*display.virtualL.fromVert: viewport -*expert*tree*display.virtual.fromVert: viewport -*expert*tree*display.virtual.fromHoriz: virtualL -*expert*tree*display.depthL.label: Depth -*expert*tree*display.depthL.fromVert: virtual -*expert*tree*display.depth.fromVert: virtual -*expert*tree*display.depth.fromHoriz: depthL -*expert*tree*display.bppL.label: FbBPP -*expert*tree*display.bppL.fromVert: depth -*expert*tree*display.bpp.fromVert: depth -*expert*tree*display.bpp.fromHoriz: bppL -*expert*tree*display.visualL.label: Visual -*expert*tree*display.visualL.fromVert: bpp -*expert*tree*display.visual.fromVert: bpp -*expert*tree*display.visual.fromHoriz: visualL -*expert*tree*display.weightL.label: Weight -*expert*tree*display.weightL.fromVert: visual -*expert*tree*display.weight.fromVert: visual -*expert*tree*display.weight.fromHoriz: weightL -*expert*tree*display.blackL.label: Black -*expert*tree*display.blackL.fromVert: weight -*expert*tree*display.black.fromVert: weight -*expert*tree*display.black.fromHoriz: blackL -*expert*tree*display.whiteL.label: White -*expert*tree*display.whiteL.fromVert: black -*expert*tree*display.white.fromVert: black -*expert*tree*display.white.fromHoriz: whiteL - -*expert*tree*mode.label.fromHoriz: remove -*expert*tree*mode.value.fromHoriz: new -*expert*tree*mode.value.width: 100 - -*expert*tree*input.options.fromHoriz: remove -*expert*tree*input.label.fromHoriz: options -*expert*tree*input.driverL.label: Driver -*expert*tree*input.driverL.fromVert: remove -*expert*tree*input.driver.fromVert: remove -*expert*tree*input.driver.fromHoriz: driverL -*expert*tree*input.value.fromHoriz: new - -*expert*tree*layout.options.fromHoriz: remove -*expert*tree*layout.label.fromHoriz: options -*expert*tree*layout.value.fromHoriz: new - -*expert*tree*adjacency.Text.width: 46 -*expert*tree*adjacency.MenuButton.width: 122 -*expert*tree*adjacency.label.fromHoriz: remove -*expert*tree*adjacency.scrnumL.label: Screen number -*expert*tree*adjacency.scrnumL.horizDistance: 50 -*expert*tree*adjacency.scrnum.width: 32 -*expert*tree*adjacency.scrnumL.fromVert: remove -*expert*tree*adjacency.scrnum.fromVert: remove -*expert*tree*adjacency.scrnum.fromHoriz: scrnumL -*expert*tree*adjacency.above.label: Above -*expert*tree*adjacency.above.fromVert: scrnumL -*expert*tree*adjacency.above.vertDistance: 20 -*expert*tree*adjacency.above.horizDistance: 96 -*expert*tree*adjacency.below.label: Below -*expert*tree*adjacency.below.horizDistance: 96 -*expert*tree*adjacency.leftOf.label: LeftOf -*expert*tree*adjacency.leftOf.fromVert: above -*expert*tree*adjacency.screen.fromVert: above -*expert*tree*adjacency.screen.fromHoriz: leftOf -*expert*tree*adjacency.rightOf.label: RightOf -*expert*tree*adjacency.rightOf.fromVert: above -*expert*tree*adjacency.rightOf.fromHoriz: screen -*expert*tree*adjacency.below.fromVert: screen -*expert*tree*adjacency.relative.label: Relative -*expert*tree*adjacency.relative.horizDistance: 53 -*expert*tree*adjacency.relative.fromVert: below -*expert*tree*adjacency.absolute.fromVert: below -*expert*tree*adjacency*absolute.label: Absolute -*expert*tree*adjacency*absolute.fromHoriz: relative -*expert*tree*adjacency*adjxL.label: X -*expert*tree*adjacency*adjxL.horizDistance: 42 -*expert*tree*adjacency*adjxL.fromVert: absolute -*expert*tree*adjacency*adjx.fromVert: absolute -*expert*tree*adjacency*adjx.fromHoriz: adjxL -*expert*tree*adjacency*adjyL.label: Y -*expert*tree*adjacency*adjyL.horizDistance: 12 -*expert*tree*adjacency*adjyL.fromVert: absolute -*expert*tree*adjacency*adjyL.fromHoriz: adjx -*expert*tree*adjacency*adjy.fromVert: absolute -*expert*tree*adjacency*adjy.fromHoriz: adjyL - -*expert*tree*inputref.options.fromHoriz: remove -*expert*tree*inputref.label.fromHoriz: options - -*expert*tree*vendor.Text.width: 100 -*expert*tree*vendor.options.fromHoriz: remove -*expert*tree*vendor.label.fromHoriz: options -*expert*tree*vendor.value.fromHoriz: new - -*expert*tree*vendorSub.Text.width: 140 -*expert*tree*vendorSub.options.fromHoriz: remove -*expert*tree*vendorSub.label.fromHoriz: options -*expert*tree*vendorSub.nameL.label: Name -*expert*tree*vendorSub.nameL.fromVert: remove -*expert*tree*vendorSub.name.fromVert: remove -*expert*tree*vendorSub.name.fromHoriz: nameL -*expert*tree*vendorSub.value.fromHoriz: new - -*expert*tree*dri.Text.width: 100 -*expert*tree*dri.Label.width: 78 -*expert*tree*dri.Label.justify: left -*expert*tree*dri.nameL.label: Group name -*expert*tree*dri.name.fromHoriz: nameL -*expert*tree*dri.groupL.label: Group -*expert*tree*dri.groupL.fromVert: name -*expert*tree*dri.group.fromVert: name -*expert*tree*dri.group.fromHoriz: groupL -*expert*tree*dri.modeL.label: Mode -*expert*tree*dri.modeL.fromVert: group -*expert*tree*dri.mode.fromVert: group -*expert*tree*dri.mode.fromHoriz: modeL - -*expert*tree*buffers.Label.width: 50 -*expert*tree*buffers.Text.width: 100 -*expert*tree*buffers.countL.label: Count -*expert*tree*buffers.countL.fromVert: remove -*expert*tree*buffers.count.fromVert: remove -*expert*tree*buffers.count.fromHoriz: countL -*expert*tree*buffers.sizeL.label: Size -*expert*tree*buffers.sizeL.fromVert: count -*expert*tree*buffers.size.fromVert: count -*expert*tree*buffers.size.fromHoriz: sizeL -*expert*tree*buffers.flagsL.label: Flags -*expert*tree*buffers.flagsL.fromVert: size -*expert*tree*buffers.flags.fromVert: size -*expert*tree*buffers.flags.fromHoriz: flagsL -*Expert*close.label: Close diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/accessx.c b/xorg-server/hw/xfree86/utils/xorgcfg/accessx.c deleted file mode 100644 index 38bda383a..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/accessx.c +++ /dev/null @@ -1,681 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "config.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "keyboard-cfg.h" - -#define MAX_TIMEOUT 20 -#define MAX_MOUSE_SPEED 500 -#define MAX_MOUSE_TIME 4 -#define MAX_MOUSE_DELAY 2.09 -#define MAX_REPEAT_RATE 8.04 -#define MAX_REPEAT_DELAY 6.04 -#define MAX_SLOW_TIME 4 -#define MAX_BOUNCE_TIME 4 - -/* - * Types - */ -typedef struct { - Widget label, number, scroller; - double min, max, value, resolution; - Bool integer; -} Scale; - -/* - * Initialization - */ -static Widget shell, accessx, enable, timeoutToggle, form, apply; -static Widget sticky, stickyAuto, stickyBeep; -static Widget mouse; -static Widget repeat; -static Widget slowToggle, slowPressed, slowAccepted; -static Widget bounceToggle; -static Scale *timeout, *mouseSpeed, *mouseTime, *mouseDelay, *slow, - *repeatRate, *repeatDelay, *bounce; -extern Widget work; - -/* - * Prototypes - */ -static void CreateAccessXHelpDialog(void); -static void EnableCallback(Widget, XtPointer, XtPointer); -static void ScaleEnableCallback(Widget, XtPointer, XtPointer); -static void ScaleJumpCallback(Widget, XtPointer, XtPointer); - -static void ApplyCallback(Widget, XtPointer, XtPointer); -static void AccessXInitialize(void); - -void CloseAccessXAction(Widget, XEvent*, String*, Cardinal*); -void AccessXConfigureStart(void); -void AccessXConfigureEnd(void); - -/* - * Implementation - */ -void -startaccessx(void) -{ - InitializeKeyboard(); - - if (xkb_info->xkb) { - XkbGetControls(DPY, XkbAllControlsMask, xkb_info->xkb); - if (xkb_info->xkb->ctrls == NULL) - xkb_info->xkb->ctrls = (XkbControlsPtr) - XtCalloc(1, sizeof(XkbControlsRec)); - - xkb_info->xkb->ctrls->enabled_ctrls |= XkbMouseKeysMask | - XkbMouseKeysAccelMask; - xkb_info->xkb->ctrls->mk_delay = 40; - xkb_info->xkb->ctrls->mk_interval = 10; - xkb_info->xkb->ctrls->mk_time_to_max = 1000; - xkb_info->xkb->ctrls->mk_max_speed = 500; - xkb_info->xkb->ctrls->mk_curve = 0; - XkbSetControls(DPY, XkbAllControlsMask, xkb_info->xkb); - (void)UpdateKeyboard(True); - CreateAccessXHelpDialog(); - } -} - -void -CreateAccessXHelpDialog() -{ - Widget form; - - shell = XtVaCreatePopupShell("accessx", transientShellWidgetClass, toplevel, - XtNx, toplevel->core.x + toplevel->core.width, - XtNy, toplevel->core.y, NULL); - form = XtCreateManagedWidget("form", formWidgetClass, shell, NULL, 0); - XtCreateManagedWidget("label", labelWidgetClass, form, NULL, 0); - XtCreateManagedWidget("lock", labelWidgetClass, form, NULL, 0); - XtCreateManagedWidget("div", labelWidgetClass, form, NULL, 0); - XtCreateManagedWidget("mul", labelWidgetClass, form, NULL, 0); - XtCreateManagedWidget("minus", labelWidgetClass, form, NULL, 0); - XtCreateManagedWidget("7", labelWidgetClass, form, NULL, 0); - XtCreateManagedWidget("8", labelWidgetClass, form, NULL, 0); - XtCreateManagedWidget("9", labelWidgetClass, form, NULL, 0); - XtCreateManagedWidget("plus", labelWidgetClass, form, NULL, 0); - XtCreateManagedWidget("4", labelWidgetClass, form, NULL, 0); - XtCreateManagedWidget("5", labelWidgetClass, form, NULL, 0); - XtCreateManagedWidget("6", labelWidgetClass, form, NULL, 0); - XtCreateManagedWidget("1", labelWidgetClass, form, NULL, 0); - XtCreateManagedWidget("2", labelWidgetClass, form, NULL, 0); - XtCreateManagedWidget("3", labelWidgetClass, form, NULL, 0); - XtCreateManagedWidget("enter", labelWidgetClass, form, NULL, 0); - XtCreateManagedWidget("0", labelWidgetClass, form, NULL, 0); - XtCreateManagedWidget("del", labelWidgetClass, form, NULL, 0); - - XtRealizeWidget(shell); - XSetWMProtocols(DPY, XtWindow(shell), &wm_delete_window, 1); - XtPopup(shell, XtGrabNone); -} - -/*ARGSUSED*/ -void -CloseAccessXAction(Widget w, XEvent *event, String *params, Cardinal *num_params) -{ - XtPopdown(shell); -} - -static void -AccessXInitialize(void) -{ - static int first = 1; - Arg args[1]; - Boolean state; - Widget stickyForm, mouseForm, repeatForm, slowForm, bounceForm; - float val, tmp; - - if (!first) - return; - first = 0; - - InitializeKeyboard(); - - XkbGetControls(DPY, XkbAllControlsMask, xkb_info->xkb); - if (xkb_info->xkb->ctrls == NULL) - xkb_info->xkb->ctrls = (XkbControlsPtr) - XtCalloc(1, sizeof(XkbControlsRec)); - - timeout = XtNew(Scale); - accessx = XtCreateWidget("accessxForm", formWidgetClass, work, NULL, 0); - enable = XtVaCreateManagedWidget("enable", toggleWidgetClass, accessx, - XtNstate, - (xkb_info->xkb->ctrls->enabled_ctrls & - (XkbAccessXKeysMask | XkbStickyKeysMask | - XkbSlowKeysMask | XkbBounceKeysMask)) != 0, NULL); - - apply = XtCreateManagedWidget("apply", commandWidgetClass, accessx, NULL, 0); - XtAddCallback(apply, XtNcallback, ApplyCallback, NULL); - - form = XtCreateManagedWidget("Accessx", formWidgetClass, accessx, NULL, 0); - timeoutToggle = XtVaCreateManagedWidget("timeoutToggle", toggleWidgetClass, - form, XtNstate, - xkb_info->xkb->ctrls->ax_timeout > 60 - && xkb_info->xkb->ctrls->ax_timeout - < 30000, NULL); - XtAddCallback(timeoutToggle, XtNcallback, ScaleEnableCallback, - (XtPointer)timeout); - timeout->label = XtCreateManagedWidget("timeoutLabel", labelWidgetClass, - form, NULL, 0); - timeout->number = XtCreateManagedWidget("timeoutNumber", labelWidgetClass, - form, NULL, 0); - timeout->scroller = XtCreateManagedWidget("timeoutScroller", - scrollbarWidgetClass, - form, NULL, 0); - XtAddCallback(timeout->scroller, XtNjumpProc, ScaleJumpCallback, - (XtPointer)timeout); - timeout->min = 1; - timeout->max = MAX_TIMEOUT; - timeout->resolution = 1; - timeout->integer = True; - - sticky = XtVaCreateManagedWidget("sticky", toggleWidgetClass, form, - XtNstate, - (xkb_info->xkb->ctrls->enabled_ctrls & - XkbStickyKeysMask) != 0, NULL); - stickyForm = XtCreateManagedWidget("stickyForm", formWidgetClass, - form, NULL, 0); - XtAddCallback(sticky, XtNcallback, EnableCallback, (XtPointer)stickyForm); - stickyAuto = XtVaCreateManagedWidget("auto", toggleWidgetClass, stickyForm, - XtNstate, - (xkb_info->xkb->ctrls->ax_options & - XkbAX_LatchToLockMask) == 0, NULL); - stickyBeep = XtVaCreateManagedWidget("beep", toggleWidgetClass, stickyForm, - XtNstate, - (xkb_info->xkb->ctrls->ax_options & - XkbAX_StickyKeysFBMask) != 0, NULL); - - mouse = XtVaCreateManagedWidget("mouseKeys", toggleWidgetClass, form, - XtNstate, - (xkb_info->xkb->ctrls->enabled_ctrls & - (XkbMouseKeysMask | XkbMouseKeysAccelMask)) - != 0, NULL); - mouseForm = XtCreateManagedWidget("mouseForm", formWidgetClass, - form, NULL, 0); - XtAddCallback(mouse, XtNcallback, EnableCallback, (XtPointer)mouseForm); - mouseSpeed = XtNew(Scale); - mouseSpeed->label = XtCreateManagedWidget("speedLabel", labelWidgetClass, - mouseForm, NULL, 0); - mouseSpeed->number = XtCreateManagedWidget("speedNumber", labelWidgetClass, - mouseForm, NULL, 0); - mouseSpeed->scroller = XtCreateManagedWidget("speedScroller", - scrollbarWidgetClass, - mouseForm, NULL, 0); - XtAddCallback(mouseSpeed->scroller, XtNjumpProc, ScaleJumpCallback, - (XtPointer)mouseSpeed); - mouseSpeed->min = 10; - mouseSpeed->max = MAX_MOUSE_SPEED; - mouseSpeed->resolution = 10; - mouseSpeed->integer = True; - mouseTime = XtNew(Scale); - mouseTime->label = XtCreateManagedWidget("timeLabel", labelWidgetClass, - mouseForm, NULL, 0); - mouseTime->number = XtCreateManagedWidget("timeNumber", labelWidgetClass, - mouseForm, NULL, 0); - mouseTime->scroller = XtCreateManagedWidget("timeScroller", - scrollbarWidgetClass, - mouseForm, NULL, 0); - XtAddCallback(mouseTime->scroller, XtNjumpProc, ScaleJumpCallback, - (XtPointer)mouseTime); - mouseTime->min = .1; - mouseTime->max = MAX_MOUSE_TIME; - mouseTime->resolution = .1; - mouseTime->integer = False; - mouseDelay = XtNew(Scale); - mouseDelay->label = XtCreateManagedWidget("delayLabel", labelWidgetClass, - mouseForm, NULL, 0); - mouseDelay->number = XtCreateManagedWidget("delayNumber", labelWidgetClass, - mouseForm, NULL, 0); - mouseDelay->scroller = XtCreateManagedWidget("delayScroller", - scrollbarWidgetClass, - mouseForm, NULL, 0); - XtAddCallback(mouseDelay->scroller, XtNjumpProc, ScaleJumpCallback, - (XtPointer)mouseDelay); - mouseDelay->min = .1; - mouseDelay->max = MAX_MOUSE_DELAY; - mouseDelay->resolution = .1; - mouseDelay->integer = False; - - repeat = XtVaCreateManagedWidget("repeatKeys", toggleWidgetClass, form, - XtNstate, - (xkb_info->xkb->ctrls->enabled_ctrls & - XkbRepeatKeysMask) != 0, NULL); - repeatForm = XtCreateManagedWidget("repeatForm", formWidgetClass, - form, NULL, 0); - XtAddCallback(repeat, XtNcallback, EnableCallback, (XtPointer)repeatForm); - repeatRate = XtNew(Scale); - repeatRate->label = XtCreateManagedWidget("rateLabel", labelWidgetClass, - repeatForm, NULL, 0); - repeatRate->number = XtCreateManagedWidget("rateNumber", labelWidgetClass, - repeatForm, NULL, 0); - repeatRate->scroller = XtCreateManagedWidget("rateScroller", - scrollbarWidgetClass, - repeatForm, NULL, 0); - XtAddCallback(repeatRate->scroller, XtNjumpProc, ScaleJumpCallback, - (XtPointer)repeatRate); - repeatRate->min = .05; - repeatRate->max = MAX_REPEAT_RATE; - repeatRate->resolution = .05; - repeatRate->integer = False; - repeatDelay = XtNew(Scale); - repeatDelay->label = XtCreateManagedWidget("delayLabel", labelWidgetClass, - repeatForm, NULL, 0); - repeatDelay->number = XtCreateManagedWidget("delayNumber", labelWidgetClass, - repeatForm, NULL, 0); - repeatDelay->scroller = XtCreateManagedWidget("delayScroller", - scrollbarWidgetClass, - repeatForm, NULL, 0); - XtAddCallback(repeatDelay->scroller, XtNjumpProc, ScaleJumpCallback, - (XtPointer)repeatDelay); - repeatDelay->min = .05; - repeatDelay->max = MAX_REPEAT_DELAY; - repeatDelay->resolution = .05; - repeatDelay->integer = False; - - slowToggle = XtVaCreateManagedWidget("slow", toggleWidgetClass, - form, XtNstate, - (xkb_info->xkb->ctrls->enabled_ctrls & - XkbSlowKeysMask) != 0, NULL); - slowForm = XtCreateManagedWidget("slowForm", formWidgetClass, - form, NULL, 0); - XtAddCallback(slowToggle, XtNcallback, EnableCallback, (XtPointer)slowForm); - XtCreateManagedWidget("beep", labelWidgetClass, slowForm, NULL, 0); - slowPressed = XtVaCreateManagedWidget("pressed", toggleWidgetClass, - slowForm, XtNstate, - (xkb_info->xkb->ctrls->ax_options & - XkbAX_SKPressFBMask) != 0, - NULL); - slowAccepted = XtVaCreateManagedWidget("accepted", toggleWidgetClass, - slowForm, XtNstate, - (xkb_info->xkb->ctrls->ax_options & - XkbAX_SKAcceptFBMask) != 0, - NULL); - slow = XtNew(Scale); - slow->label = XtCreateManagedWidget("slowLabel", labelWidgetClass, - slowForm, NULL, 0); - slow->number = XtCreateManagedWidget("slowNumber", labelWidgetClass, - slowForm, NULL, 0); - slow->scroller = XtCreateManagedWidget("slowScroller", - scrollbarWidgetClass, - slowForm, NULL, 0); - XtAddCallback(slow->scroller, XtNjumpProc, ScaleJumpCallback, - (XtPointer)slow); - slow->min = 0.1; - slow->max = MAX_SLOW_TIME; - slow->resolution = 0.1; - slow->integer = False; - - bounceToggle = XtVaCreateManagedWidget("bounce", toggleWidgetClass, - form, XtNstate, - (xkb_info->xkb->ctrls->enabled_ctrls & - XkbBounceKeysMask) != 0, - NULL); - bounceForm = XtCreateManagedWidget("bounceForm", formWidgetClass, - form, NULL, 0); - XtAddCallback(bounceToggle, XtNcallback, EnableCallback, (XtPointer)bounceForm); - bounce = XtNew(Scale); - bounce->label = XtCreateManagedWidget("bounceLabel", labelWidgetClass, - bounceForm, NULL, 0); - bounce->number = XtCreateManagedWidget("bounceNumber", labelWidgetClass, - bounceForm, NULL, 0); - bounce->scroller = XtCreateManagedWidget("bounceScroller", - scrollbarWidgetClass, - bounceForm, NULL, 0); - XtAddCallback(bounce->scroller, XtNjumpProc, ScaleJumpCallback, - (XtPointer)bounce); - bounce->min = 0.1; - bounce->max = MAX_BOUNCE_TIME; - bounce->resolution = 0.1; - bounce->integer = False; - - XtRealizeWidget(accessx); - - XtSetArg(args[0], XtNstate, &state); - XtGetValues(timeoutToggle, args, 1); - ScaleEnableCallback(enable, (XtPointer)timeout, (XtPointer)(long)state); - if (xkb_info->xkb->ctrls->ax_timeout > 60) - val = (float)(xkb_info->xkb->ctrls->ax_timeout - 60) / - (float)(MAX_TIMEOUT * 60); - else - val = 0; - ScaleJumpCallback(timeout->scroller, (XtPointer)timeout, (XtPointer)&val); - - XtSetArg(args[0], XtNstate, &state); - XtGetValues(sticky, args, 1); - EnableCallback(sticky, (XtPointer)stickyForm, (XtPointer)(long)state); - - XtSetArg(args[0], XtNstate, &state); - XtGetValues(mouse, args, 1); - EnableCallback(mouse, (XtPointer)mouseForm, (XtPointer)(long)state); - if (xkb_info->xkb->ctrls->mk_time_to_max > 10) - val = (float)((xkb_info->xkb->ctrls->mk_time_to_max * (40. / 10.))) / - (float)(MAX_MOUSE_TIME * 100); - else - val = 10.0 / (float)(MAX_MOUSE_TIME * 100); - ScaleJumpCallback(mouseTime->scroller, (XtPointer)mouseTime, - (XtPointer)&val); - tmp = mouseTime->value; - if (xkb_info->xkb->ctrls->mk_max_speed != 0) - val = (float)(xkb_info->xkb->ctrls->mk_max_speed / tmp - 10) / - (float)MAX_MOUSE_SPEED; - else - val = 10.0 / (float)MAX_MOUSE_SPEED; - ScaleJumpCallback(mouseSpeed->scroller, (XtPointer)mouseSpeed, - (XtPointer)&val); - if (xkb_info->xkb->ctrls->mk_delay > 10) - val = (float)(xkb_info->xkb->ctrls->mk_delay - 10) / - (float)(MAX_MOUSE_DELAY * 100); - else - val = 10.0 / (float)(MAX_MOUSE_DELAY * 100); - ScaleJumpCallback(mouseDelay->scroller, (XtPointer)mouseDelay, - (XtPointer)&val); - - XtSetArg(args[0], XtNstate, &state); - XtGetValues(repeat, args, 1); - EnableCallback(repeat, (XtPointer)repeatForm, (XtPointer)(long)state); - if (xkb_info->xkb->ctrls->repeat_interval > 5) - val = (float)(xkb_info->xkb->ctrls->repeat_interval - 5) / - (float)(MAX_REPEAT_RATE * 1000); - else - val = 5.0 / (float)(MAX_REPEAT_RATE * 1000); - ScaleJumpCallback(repeatRate->scroller, (XtPointer)repeatRate, - (XtPointer)&val); - if (xkb_info->xkb->ctrls->repeat_delay > 5) - val = (float)(xkb_info->xkb->ctrls->repeat_delay - 5) / - (float)(MAX_REPEAT_DELAY * 1000); - else - val = 5.0 / (float)(MAX_REPEAT_DELAY * 1000); - ScaleJumpCallback(repeatDelay->scroller, (XtPointer)repeatDelay, - (XtPointer)&val); - - XtSetArg(args[0], XtNstate, &state); - XtGetValues(slowToggle, args, 1); - EnableCallback(slowToggle, (XtPointer)slowForm, (XtPointer)(long)state); - if (xkb_info->xkb->ctrls->slow_keys_delay > 10) - val = (float)(xkb_info->xkb->ctrls->repeat_delay - 10) / - (float)(MAX_SLOW_TIME * 1000); - else - val = 10.0 / (float)(MAX_SLOW_TIME * 1000); - ScaleJumpCallback(slow->scroller, (XtPointer)slow, (XtPointer)&val); - - XtSetArg(args[0], XtNstate, &state); - XtGetValues(bounceToggle, args, 1); - EnableCallback(bounceToggle, (XtPointer)bounceForm, (XtPointer)(long)state); - if (xkb_info->xkb->ctrls->debounce_delay > 10) - val = (float)(xkb_info->xkb->ctrls->debounce_delay - 10) / - (float)(MAX_BOUNCE_TIME * 1000); - else - val = 10.0 / (float)(MAX_BOUNCE_TIME * 1000); - ScaleJumpCallback(bounce->scroller, (XtPointer)bounce, (XtPointer)&val); - - XtSetArg(args[0], XtNstate, &state); - XtGetValues(enable, args, 1); -} - -void -AccessXConfigureStart(void) -{ - AccessXInitialize(); - - XtMapWidget(accessx); -} - -void -AccessXConfigureEnd(void) -{ - XtUnmapWidget(accessx); -} - -/*ARGSUSED*/ -static void -EnableCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - XtSetSensitive((Widget)user_data, (long)call_data); -} - -/*ARGSUSED*/ -static void -ScaleEnableCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - Scale *scale = (Scale*)user_data; - - XtSetSensitive(scale->label, (long)call_data); - XtSetSensitive(scale->number, (long)call_data); - XtSetSensitive(scale->scroller, (long)call_data); -} - -static void -ScaleJumpCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - Scale *scale = (Scale*)user_data; - float percent = *(float *)call_data, timeout = percent * scale->max; - int x; - char str[8]; - Arg args[1]; - - if (timeout >= scale->max - scale->min) - timeout = scale->max - scale->min; - - if (scale->integer) { - int tm = timeout + scale->min; - - tm -= tm % (int)scale->resolution; - XmuSnprintf(str, sizeof(str), "%i", tm); - scale->value = tm; - } - else { - long tm = (timeout + scale->min) * 1e+6; - - tm -= tm % (long)(scale->resolution * 1e+6); - scale->value = (double)tm / 1e+6; - XmuSnprintf(str, sizeof(str), "%f", scale->value); - } - - XtSetArg(args[0], XtNlabel, str); - XtSetValues(scale->number, args, 1); - x = w->core.x + w->core.border_width; - x += ((double)(w->core.width - scale->number->core.width) / scale->max) * timeout; - XtMoveWidget(scale->number, x, scale->number->core.y); - XawScrollbarSetThumb(w, timeout / (scale->max - scale->min), - scale->resolution / (scale->max - scale->min)); -} - -/*ARGSUSED*/ -static void -ApplyCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - Arg args[1]; - Boolean state; - - XkbGetControls(DPY, XkbAllControlsMask, xkb_info->xkb); - - /* Enable AccessX */ - XtSetArg(args[0], XtNstate, &state); - XtGetValues(enable, args, 1); - if (state) { - xkb_info->config.initial_ctrls |= XkbAccessXKeysMask; - xkb_info->xkb->ctrls->enabled_ctrls |= XkbAccessXKeysMask; - } - else { - xkb_info->config.initial_ctrls &= ~XkbAccessXKeysMask; - xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbAccessXKeysMask; - } - - /* Timeout */ - XtSetArg(args[0], XtNstate, &state); - XtGetValues(timeoutToggle, args, 1); - if (state) - xkb_info->config.ax_timeout = - xkb_info->xkb->ctrls->ax_timeout = timeout->value * 60; - else - xkb_info->config.ax_timeout = - xkb_info->xkb->ctrls->ax_timeout = 65535; - - /* Enable StickyKeys */ - XtSetArg(args[0], XtNstate, &state); - XtGetValues(sticky, args, 1); - if (state) { - xkb_info->config.initial_ctrls |= XkbStickyKeysMask; - xkb_info->xkb->ctrls->enabled_ctrls |= XkbStickyKeysMask; - } - else { - xkb_info->config.initial_ctrls &= ~XkbStickyKeysMask; - xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbStickyKeysMask; - } - XtSetArg(args[0], XtNstate, &state); - XtGetValues(stickyAuto, args, 1); - if (state) { - xkb_info->config.initial_opts &= ~XkbAX_TwoKeysMask; - xkb_info->config.initial_opts &= ~XkbAX_LatchToLockMask; - xkb_info->xkb->ctrls->ax_options &= ~XkbAX_TwoKeysMask; - xkb_info->xkb->ctrls->ax_options &= ~XkbAX_LatchToLockMask; - } - else { - xkb_info->config.initial_opts &= ~XkbAX_TwoKeysMask; - xkb_info->config.initial_opts |= XkbAX_LatchToLockMask; - xkb_info->xkb->ctrls->ax_options &= ~XkbAX_TwoKeysMask; - xkb_info->xkb->ctrls->ax_options |= XkbAX_LatchToLockMask; - } - XtSetArg(args[0], XtNstate, &state); - XtGetValues(stickyBeep, args, 1); - if (state) { - xkb_info->config.initial_opts |= XkbAX_StickyKeysFBMask; - xkb_info->xkb->ctrls->ax_options |= XkbAX_StickyKeysFBMask; - } - else { - xkb_info->config.initial_opts &= ~XkbAX_StickyKeysFBMask; - xkb_info->xkb->ctrls->ax_options &= ~XkbAX_StickyKeysFBMask; - } - - /* Enable MouseKeys */ - XtSetArg(args[0], XtNstate, &state); - XtGetValues(mouse, args, 1); - if (state) { - xkb_info->config.initial_ctrls |= XkbMouseKeysAccelMask; - xkb_info->xkb->ctrls->enabled_ctrls |= XkbMouseKeysMask | - XkbMouseKeysAccelMask; - xkb_info->config.mk_delay = - xkb_info->xkb->ctrls->mk_delay = mouseDelay->value * 100; - xkb_info->config.mk_interval = - xkb_info->xkb->ctrls->mk_interval = 40; - xkb_info->config.mk_time_to_max = - xkb_info->xkb->ctrls->mk_time_to_max = - (mouseTime->value * 1000) / xkb_info->xkb->ctrls->mk_interval; - xkb_info->config.mk_max_speed = - xkb_info->xkb->ctrls->mk_max_speed = - mouseSpeed->value * mouseTime->value; - xkb_info->config.mk_curve = xkb_info->xkb->ctrls->mk_curve = 0; - } - else { - xkb_info->config.initial_ctrls &= ~(XkbMouseKeysMask | - XkbMouseKeysAccelMask); - xkb_info->xkb->ctrls->enabled_ctrls &= ~(XkbMouseKeysMask | - XkbMouseKeysAccelMask); - } - - /* Enable RepeatKeys */ - XtSetArg(args[0], XtNstate, &state); - XtGetValues(repeat, args, 1); - if (state) { - xkb_info->config.initial_ctrls |= XkbRepeatKeysMask; - xkb_info->xkb->ctrls->enabled_ctrls |= XkbRepeatKeysMask; - xkb_info->config.repeat_interval = - xkb_info->xkb->ctrls->repeat_interval = repeatRate->value * 1000; - xkb_info->config.repeat_delay = - xkb_info->xkb->ctrls->repeat_delay = repeatDelay->value * 1000; - } - else { - xkb_info->config.initial_ctrls &= ~XkbRepeatKeysMask; - xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbRepeatKeysMask; - } - - /* Enable SlowKeys */ - XtSetArg(args[0], XtNstate, &state); - XtGetValues(slowToggle, args, 1); - if (state) { - xkb_info->config.initial_ctrls |= XkbSlowKeysMask; - xkb_info->xkb->ctrls->enabled_ctrls |= XkbSlowKeysMask; - xkb_info->config.slow_keys_delay = - xkb_info->xkb->ctrls->slow_keys_delay = slow->value * 1000; - } - else { - xkb_info->config.initial_ctrls &= ~XkbSlowKeysMask; - xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbSlowKeysMask; - } - XtSetArg(args[0], XtNstate, &state); - XtGetValues(slowPressed, args, 1); - if (state) { - xkb_info->config.initial_opts |= XkbAX_SKPressFBMask; - xkb_info->xkb->ctrls->ax_options |= XkbAX_SKPressFBMask; - } - else { - xkb_info->config.initial_opts &= ~XkbAX_SKPressFBMask; - xkb_info->xkb->ctrls->ax_options &= ~XkbAX_SKPressFBMask; - } - XtSetArg(args[0], XtNstate, &state); - XtGetValues(slowAccepted, args, 1); - if (state) { - xkb_info->config.initial_opts |= XkbAX_SKAcceptFBMask; - xkb_info->xkb->ctrls->ax_options |= XkbAX_SKAcceptFBMask; - } - else { - xkb_info->config.initial_opts &= ~XkbAX_SKAcceptFBMask; - xkb_info->xkb->ctrls->ax_options &= ~XkbAX_SKAcceptFBMask; - } - - /* Enable BounceKeys */ - XtSetArg(args[0], XtNstate, &state); - XtGetValues(bounceToggle, args, 1); - if (state) { - xkb_info->config.initial_ctrls |= XkbBounceKeysMask; - xkb_info->xkb->ctrls->enabled_ctrls |= XkbBounceKeysMask; - xkb_info->config.debounce_delay = - xkb_info->xkb->ctrls->debounce_delay = bounce->value * 1000; - } - else { - xkb_info->config.initial_ctrls &= ~XkbBounceKeysMask; - xkb_info->xkb->ctrls->enabled_ctrls &= ~XkbBounceKeysMask; - } - - XkbSetControls(DPY, XkbAllControlsMask, xkb_info->xkb); - XSync(DPY, False); - (void)UpdateKeyboard(True); -} diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/card-cfg.c b/xorg-server/hw/xfree86/utils/xorgcfg/card-cfg.c deleted file mode 100644 index 1f3b7555e..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/card-cfg.c +++ /dev/null @@ -1,433 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "xf86config.h" -#include "mouse-cfg.h" -#include "cards.h" -#include "card-cfg.h" -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef USE_MODULES -#include "loader.h" -#endif - -/* - * Prototypes - */ -static Bool CardConfigCheck(void); -static void CardModelCallback(Widget, XtPointer, XtPointer); -#ifdef USE_MODULES -static void DriverCallback(Widget, XtPointer, XtPointer); -#endif - -/* - * Initialization - */ -static CardsEntry *card_entry; -static XF86ConfDevicePtr current_device; -static Widget filter, list, driver, busid; -static char **cards = NULL; -static int ncards; -#ifdef USE_MODULES -static char *driver_str; -#endif - -/* - * Implementation - */ -/*ARGSUSED*/ -XtPointer -CardConfig(XtPointer config) -{ - XF86ConfDevicePtr card = (XF86ConfDevicePtr)config; -/* XF86OptionPtr option;*/ - char card_name[32]; - Arg args[1]; - char *bus, *drv_nam; - - xf86info.cur_list = CARD; - XtSetSensitive(back, xf86info.lists[CARD].cur_function > 0); - XtSetSensitive(next, xf86info.lists[CARD].cur_function < - xf86info.lists[CARD].num_functions - 1); - (xf86info.lists[CARD].functions[xf86info.lists[CARD].cur_function]) - (&xf86info); - - card_entry = NULL; - current_device = card; - XawListUnhighlight(list); - XtSetArg(args[0], XtNstring, ""); - XtSetValues(filter, args, 1); - - if (card != NULL) { - if (card->dev_card != NULL) { - int i; - - for (i = 0; i < ncards; i++) { - if (strcasecmp(cards[i], card->dev_card) == 0) { - card_entry = LookupCard(cards[i]); - XawListHighlight(list, i); - XtSetArg(args[0], XtNstring, cards[i]); - XtSetValues(filter, args, 1); - break; - } - } - } - XtSetArg(args[0], XtNstring, card->dev_identifier); - XtSetValues(ident_widget, args, 1); - XtSetArg(args[0], XtNstring, card->dev_busid); - XtSetValues(busid, args, 1); -#ifdef USE_MODULES - if (!nomodules) - XtSetArg(args[0], XtNlabel, driver_str = XtNewString(card->dev_driver)); - else -#endif - XtSetArg(args[0], XtNstring, card->dev_driver); - XtSetValues(driver, args, 1); - } - else { - XF86ConfDevicePtr device = XF86Config->conf_device_lst; - int ndevices = 0; - - while (device != NULL) { - ++ndevices; - device = (XF86ConfDevicePtr)(device->list.next); - } - do { - XmuSnprintf(card_name, sizeof(card_name), "Card%d", ndevices); - ++ndevices; - } while (xf86findDevice(card_name, - XF86Config->conf_device_lst)); - - XtSetArg(args[0], XtNstring, card_name); - XtSetValues(ident_widget, args, 1); - XtSetArg(args[0], XtNstring, ""); - XtSetValues(busid, args, 1); -#ifdef USE_MODULES - if (!nomodules) - XtSetArg(args[0], XtNlabel, driver_str = XtNewString("vga")); - else -#endif - XtSetArg(args[0], XtNstring, "vga"); - XtSetValues(driver, args, 1); - } - - if (ConfigLoop(CardConfigCheck) == True) { - if (card_entry != NULL && card_entry->driver == NULL) { - fprintf(stderr, "No driver field in Cards database.\n" - "Please make sure you have the correct files installed.\n"); - exit(1); - } - if (card == NULL) { - card = (XF86ConfDevicePtr)XtCalloc(1, sizeof(XF86ConfDeviceRec)); - card->dev_identifier = XtNewString(ident_string); - if (card_entry) { - card->dev_driver = XtNewString(card_entry->driver); - card->dev_card = XtNewString(card_entry->name); - if (card_entry->chipset) - card->dev_chipset = XtNewString(card_entry->chipset); - if (card_entry->ramdac) - card->dev_ramdac = XtNewString(card_entry->ramdac); - if (card_entry->clockchip) - card->dev_clockchip = XtNewString(card_entry->clockchip); - } - /* else will fallback to "vga" */ - } - else if (card_entry != NULL) { - XtFree(card->dev_driver); - card->dev_driver = XtNewString(card_entry->driver); - if (card_entry->chipset) { - XtFree(card->dev_chipset); - card->dev_chipset = XtNewString(card_entry->chipset); - } - if (card_entry->ramdac) { - XtFree(card->dev_ramdac); - card->dev_ramdac = XtNewString(card_entry->ramdac); - } - if (card_entry->clockchip) { - XtFree(card->dev_clockchip); - card->dev_clockchip = XtNewString(card_entry->clockchip); - } - } - if (strcasecmp(card->dev_identifier, ident_string)) - xf86renameDevice(XF86Config, card, ident_string); - XtSetArg(args[0], XtNstring, &bus); - XtGetValues(busid, args, 1); - XtFree(card->dev_busid); - card->dev_busid = XtNewString(bus); - -#ifdef USE_MODULES - if (!nomodules) - drv_nam = driver_str; - else -#endif - { - XtSetArg(args[0], XtNstring, &drv_nam); - XtGetValues(driver, args, 1); - } - - XtFree(card->dev_driver); - card->dev_driver = XtNewString(drv_nam); - -#ifdef USE_MODULES - if (!nomodules) - XtFree(driver_str); -#endif - - return ((XtPointer)card); - } -#ifdef USE_MODULES - if (!nomodules) - XtFree(driver_str); -#endif - - return (NULL); -} - -static Bool -CardConfigCheck(void) -{ - XF86ConfDevicePtr device = XF86Config->conf_device_lst; - char *drv_nam; - -#ifdef USE_MODULES - if (!nomodules) - drv_nam = driver_str; - else -#endif - { - Arg args[1]; - - XtSetArg(args[0], XtNstring, &drv_nam); - XtGetValues(driver, args, 1); - } - - if (ident_string == NULL || strlen(ident_string) == 0 || -#if 0 - /* not all available cards are in the Cards database */ - (current_device == NULL && card_entry == NULL) || -#endif - drv_nam == NULL || *drv_nam == '\0') - return (False); - - while (device != NULL) { - if (device != current_device && - strcasecmp(ident_string, device->dev_identifier) == 0) - return (False); - device = (XF86ConfDevicePtr)(device->list.next); - } - - return (True); -} - -static void -CardModelCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - Arg args[1]; - XawListReturnStruct *info = (XawListReturnStruct *)call_data; - char tip[4096]; - int len; - - XtSetArg(args[0], XtNstring, info->string); - XtSetValues(filter, args, 1); - card_entry = LookupCard(info->string); - - if (card_entry == NULL) - return; - - len = XmuSnprintf(tip, sizeof(tip), "Name: %s\n", card_entry->name); - if (card_entry->flags & F_UNSUPPORTED) - len += XmuSnprintf(tip + len, sizeof(tip) - len, - "**THIS CARD IS UNSUPPORTED**\n"); - if (card_entry->chipset != NULL) - len += XmuSnprintf(tip + len, sizeof(tip) - len, - "Chipset: %s\n", card_entry->chipset); - if (card_entry->driver != NULL) { -#ifdef USE_MODULES - if (!nomodules) { - XtFree(driver_str); - driver_str = XtNewString(card_entry->driver); - XtVaSetValues(driver, XtNlabel, driver_str, NULL); - } -#endif - len += XmuSnprintf(tip + len, sizeof(tip) - len, - "Driver: %s\n", card_entry->driver); - } - if (card_entry->ramdac != NULL) - len += XmuSnprintf(tip + len, sizeof(tip), - "Ramdac: %s\n", card_entry->ramdac); - if (card_entry->clockchip != NULL) - len += XmuSnprintf(tip + len, sizeof(tip) - len, - "Clockchip: %s\n", card_entry->clockchip); - if (card_entry->dacspeed != NULL) - len += XmuSnprintf(tip + len, sizeof(tip) - len, - "Dacspeed: %s\n", card_entry->dacspeed); - if (card_entry->lines != NULL) - len += XmuSnprintf(tip + len, sizeof(tip) - len, - "\n%s\n", card_entry->lines); - -#ifndef USE_MODULES - XtSetArg(args[0], XtNstring, - card_entry->driver ? card_entry->driver : "vga"); - XtSetValues(driver, args, 1); -#endif - - XtSetArg(args[0], XtNtip, tip); - XtSetValues(filter, args, 1); -} - -/*ARGSUSED*/ -void -CardFilterAction(Widget w, XEvent *ev, String *params, Cardinal *num_params) -{ - char **cards, *pattern, **old_cards; - int ncards, old_ncards; - Arg args[2]; - - XtSetArg(args[0], XtNstring, &pattern); - XtGetValues(w, args, 1); - - XtSetArg(args[0], XtNlist, &old_cards); - XtSetArg(args[1], XtNnumberStrings, &old_ncards); - XtGetValues(list, args, 2); - - cards = FilterCardNames(pattern, &ncards); - - if (ncards == 0) { - cards = (char**)XtMalloc(sizeof(char*)); - cards[0] = XtNewString(""); - ncards = 1; - } - - XtSetArg(args[0], XtNlist, cards); - XtSetArg(args[1], XtNnumberStrings, ncards); - XtSetValues(list, args, 2); - - if (old_ncards > 1 || (XtName(list) != old_cards[0])) { - while (--old_ncards > -1) - XtFree(old_cards[old_ncards]); - XtFree((char*)old_cards); - } - - /* force relayout */ - XtUnmanageChild(list); - XtManageChild(list); -} - -#ifdef USE_MODULES -/*ARGSUSED*/ -static void -DriverCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - Arg args[1]; - - XtFree(driver_str); - driver_str = XtNewString(XtName(w)); - XtSetArg(args[0], XtNlabel, driver_str); - XtSetValues(driver, args, 1); -} -#endif - -void -CardModel(XF86SetupInfo *info) -{ - static int first = 1; - static Widget model; - - if (first) { - Widget viewport; - - first = 0; - - cards = GetCardNames(&ncards); - - model = XtCreateWidget("cardModel", formWidgetClass, - configp, NULL, 0); - (void) XtCreateManagedWidget("label", labelWidgetClass, - model, NULL, 0); - filter = XtVaCreateManagedWidget("filter", asciiTextWidgetClass, - model, - XtNeditType, XawtextEdit, - NULL); - viewport = XtCreateManagedWidget("viewport", viewportWidgetClass, - model, NULL, 0); - list = XtVaCreateManagedWidget("list", listWidgetClass, - viewport, - XtNlist, cards, - XtNnumberStrings, ncards, - NULL); - XtAddCallback(list, XtNcallback, CardModelCallback, - (XtPointer)info); - XtCreateManagedWidget("driverL", labelWidgetClass, model, NULL, 0); -#ifdef USE_MODULES - if (!nomodules) { - driver = XtVaCreateManagedWidget("driver", menuButtonWidgetClass, - model, - XtNmenuName, "driverM", - NULL); - { - Widget menu, sme; - xf86cfgModuleOptions *opts = module_options; - - menu = XtCreatePopupShell("driverM", simpleMenuWidgetClass, - driver, NULL, 0); - while (opts) { - if (opts->type == VideoModule) { - sme = XtCreateManagedWidget(opts->name, smeBSBObjectClass, - menu, NULL, 0); - XtAddCallback(sme, XtNcallback, DriverCallback, NULL); - } - opts = opts->next; - } - } - } - else -#endif - driver = XtVaCreateManagedWidget("driver", asciiTextWidgetClass, - model, - XtNeditType, XawtextEdit, - NULL); - - XtCreateManagedWidget("busidL", labelWidgetClass, model, NULL, 0); - busid = XtVaCreateManagedWidget("busid", asciiTextWidgetClass, - model, - XtNeditType, XawtextEdit, - NULL); - - XtRealizeWidget(model); - } - XtChangeManagedSet(¤t, 1, NULL, NULL, &model, 1); - current = model; -} diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/card-cfg.h b/xorg-server/hw/xfree86/utils/xorgcfg/card-cfg.h deleted file mode 100644 index fbb02a7ab..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/card-cfg.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "config.h" - -#ifndef _xf86cfg_card_h -#define _xf86cfg_card_h - -/* - * Prototypes - */ -XtPointer CardConfig(XtPointer); -void CardModel(XF86SetupInfo*); -void CardFilterAction(Widget, XEvent*, String*, Cardinal*); - -#endif /* _xf86cfg_card_h */ diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/card.xbm b/xorg-server/hw/xfree86/utils/xorgcfg/card.xbm deleted file mode 100644 index aad07a90a..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/card.xbm +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - * $XFree86$ - */ -#define card_width 50 -#define card_height 44 -static unsigned char card_bits[] = { - 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfd, 0xff, 0xff, 0xff, 0x07, - 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x80, 0x07, 0x00, 0x00, - 0x00, 0x1c, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x80, 0x01, - 0x00, 0x00, 0xf8, 0x19, 0x00, 0x80, 0xf9, 0x00, 0x00, 0xf8, 0x19, 0x00, - 0x80, 0xf9, 0xf8, 0x7f, 0x98, 0x19, 0x00, 0x80, 0x01, 0xf8, 0x7f, 0x98, - 0x19, 0x00, 0x80, 0x01, 0x18, 0x60, 0xf8, 0x19, 0x00, 0x80, 0xf9, 0x18, - 0x60, 0xf8, 0x19, 0x00, 0x80, 0xf9, 0x18, 0x60, 0x00, 0x18, 0x00, 0x80, - 0x01, 0x18, 0x60, 0xf8, 0x19, 0x00, 0x80, 0x01, 0x18, 0x60, 0xf8, 0x19, - 0x00, 0x80, 0xf9, 0x18, 0x60, 0x98, 0x19, 0x00, 0x80, 0xf9, 0x18, 0x60, - 0x98, 0x19, 0x00, 0x80, 0x01, 0x18, 0x60, 0xf8, 0x19, 0x00, 0x80, 0x01, - 0xf8, 0x7f, 0xf8, 0x19, 0x00, 0x80, 0xf9, 0xf8, 0x7f, 0x00, 0x18, 0x00, - 0x80, 0xf9, 0x00, 0x00, 0xf8, 0x19, 0x00, 0x80, 0x01, 0x00, 0x00, 0xf8, - 0x19, 0x00, 0x80, 0x01, 0x30, 0x33, 0x98, 0x19, 0x00, 0x80, 0xf9, 0x30, - 0x33, 0x98, 0x19, 0x00, 0x80, 0xf9, 0x30, 0x33, 0xf8, 0x19, 0x00, 0x80, - 0x01, 0x30, 0x33, 0xf8, 0x19, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x18, - 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x80, 0xff, 0x07, 0x00, - 0x80, 0x0f, 0x00, 0x80, 0xfd, 0x0f, 0x00, 0xc0, 0x07, 0x00, 0x80, 0x01, - 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x80, 0x01, 0xcc, 0xcc, 0xcc, 0x00, 0x00, - 0x80, 0x01, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x80, 0x01, 0xcc, 0xcc, 0xcc, - 0x00, 0x00, 0x80, 0x01, 0xfc, 0xff, 0xff, 0x00, 0x00, 0x80, 0x01, 0xf8, - 0xff, 0x7f, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/card.xpm b/xorg-server/hw/xfree86/utils/xorgcfg/card.xpm deleted file mode 100644 index 32bccb689..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/card.xpm +++ /dev/null @@ -1,81 +0,0 @@ -/* XPM */ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - * $XFree86$ - */ -static char * card_xpm[] = { -"41 40 8 1", -" c none", -"A c #B6DABAEAB6DA", -"X c #0000AAAA0000", -"o c #000071C60000", -"O c #000041030000", -"+ c #618561856185", -"@ c #186118611861", -"# c #CF3CA2892081", -"AAA ", -" A ", -" A ", -" A ", -" A ", -" A ", -" A ", -" AXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", -" AooooooooooooooooooooooooooooooooooooO", -" AooooooooooooooooooooooooooooooooooooO", -" AooooooooooooooooooooooooooooooooooooO", -" AooooooooooooooooooooooooOOOOOOOOOOOOO", -" AooooooooooooooooooAoAoAoAooAAAAAAA+oO", -" AooooooooooooooooooAoAoAoAooA++++++@oO", -" AooooooooooooooooooAoAoAoAooA+oooo+@oO", -" AoooooooooooooooooooooooooooA+AAAA+@oO", -" AoooooooooooooooooooooooooooA+oooo+@oO", -" AoooooooooooooooooooooooooooA++++++@oO", -" Aooooooooooooooooooooooooooo+@@@@@@@oO", -" AooooooooooooooooooooooooooooooooooooO", -" AoooooooooooooooooooooooooooAAAAAAA+oO", -" +AoooooooooooooooooAAAAAAAA@oA++++++@oO", -" AoooooooooooooooooA+++++++@oA+oooo+@oO", -" AoooooooooooooooooA+++++++@oA+AAAA+@oO", -" ++AoooooooooooooooooA+++++++@oA+oooo+@oO", -" ++AoooooooooooooooooA+++++++@oA++++++@oO", -" ++Aooooooooooooooooo@@@@@@@@@o+@@@@@@@oO", -" ++AooooooooooooooooooooooooooooooooooooO", -" AooooooooooooooooooooooooooooooooooooO", -" AooooooooooooooooooooooooooooooooooooO", -" +AooooooooooooooooooooooooooooooooooooO", -" AooooooooooooooooooooooooooooooooooooO", -" AoooOOOOooooooooooooooooooooOoooooOOO ", -" AooO X#o#o#o#o#o#o#o#o#oO X#o#O ", -" AOO X#o#o#o#o#o#o#o#o#oO X#o#O ", -" A X#o#o#o#o#o#o#o#o#oO X#o#O ", -" A X#o#o#o#o#o#o#o#o#oO X#o#O ", -" A OOOOOOOOOOOOOOOOOO OOO ", -" A ", -" A "}; diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/cards.c b/xorg-server/hw/xfree86/utils/xorgcfg/cards.c deleted file mode 100644 index dcd5828cb..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/cards.c +++ /dev/null @@ -1,695 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#define CARDS_PRIVATE -#include "cards.h" - -#undef SERVER /* defined in config.h, but of no use here */ - -/* return values from ReadCardsLine. */ -#define ERROR -3 -#define UNKNOWN -2 -#define END -1 -#define NOTUSEFUL 0 -#define NAME 1 -#define CHIPSET 2 -#define SERVER 3 -#define DRIVER 4 -#define RAMDAC 5 -#define CLOCKCHIP 6 -#define DACSPEED 7 -#define NOCLOCKPROBE 8 -#define UNSUPPORTED 9 -#define SEE 10 -#define LINE 11 - -/* - * Prototypes - */ -static int ReadCardsLine(FILE*, char*); /* must have 256 bytes */ -static int CompareCards(_Xconst void *left, _Xconst void *right); -static int BCompareCards(_Xconst void *left, _Xconst void *right); -static void DoReadCardsDatabase(void); -static char **DoFilterCardNames(char *pattern, int *result); - -#ifdef USE_MODULES - -typedef struct { - int ivendor; - unsigned short vendor; - unsigned short valid_vendor; - char *chipsets; - int num_chipsets; -} chipset_check; -#endif - -/* - * Initialization - */ -static int linenum = 0; -static char *Cards = "lib/X11/Cards"; -CardsEntry **CardsDB; -int NumCardsEntry; - -/* - * Implementation - */ -#ifdef USE_MODULES -const pciVendorInfo *xf86PCIVendorInfo; -#endif - -#ifdef USE_MODULES -void -InitializePciInfo(void) -{ - xf86PCIVendorInfo = pciVendorInfoList; -} - -void -CheckChipsets(xf86cfgModuleOptions *opts, int *err) -{ - int i, j, ichk, ivnd = 0, vendor = -1, device; - const pciDeviceInfo **pDev; - SymTabPtr chips = opts->chipsets; - chipset_check *check = NULL; - int num_check = 0; - - if (!chips) { - CheckMsg(CHECKER_NO_CHIPSETS, "WARNING No chipsets specified.\n"); - ++*err; - return; - } - - while (chips->name) { - device = chips->token & 0xffff; - vendor = (chips->token & 0xffff0000) >> 16; - if (vendor == 0) - vendor = opts->vendor; - - for (ichk = 0; ichk < num_check; ichk++) - if (check[ichk].vendor == vendor) - break; - if (ichk >= num_check) { - check = (chipset_check*) - XtRealloc((XtPointer)check, - sizeof(chipset_check) * (num_check + 1)); - check[num_check].vendor = vendor; - memset(&check[num_check], 0, sizeof(chipset_check)); - ++num_check; - } - - /* Search for vendor in xf86PCIVendorInfo */ - if (xf86PCIVendorInfo) { - for (ivnd = 0; xf86PCIVendorInfo[ivnd].VendorID; ivnd++) - if (vendor == xf86PCIVendorInfo[ivnd].VendorID) - break; - } - if (xf86PCIVendorInfo && xf86PCIVendorInfo[ivnd].VendorID) { - check[ichk].valid_vendor = 1; - check[ichk].ivendor = ivnd; - } - else { - CheckMsg(CHECKER_CANNOT_VERIFY_CHIPSET, - "WARNING Cannot verify chipset \"%s\" (0x%x)\n", - chips->name, device); - ++*err; - ++chips; - continue; - } - - if (xf86PCIVendorInfo && - (pDev = xf86PCIVendorInfo[ivnd].Device) != NULL) { - if (check[ichk].chipsets == NULL) { - for (j = 0; pDev[j]; j++) - ; - check[ichk].chipsets = (char*)XtCalloc(1, j); - } - for (j = 0; pDev[j]; j++) { - if (device == pDev[j]->DeviceID) { - if (strcmp(chips->name, pDev[j]->DeviceName)) { - CheckMsg(CHECKER_NOMATCH_CHIPSET_STRINGS, - "WARNING chipset strings don't match: \"%s\" \"%s\" (0x%x)\n", - chips->name, xf86PCIVendorInfo[ivnd].Device[j]->DeviceName, - device); - ++*err; - } - break; - } - } - if (!pDev[j]) { - CheckMsg(CHECKER_CHIPSET_NOT_LISTED, - "WARNING chipset \"%s\" (0x%x) not in list.\n", chips->name, device); - ++*err; - } - else - check[ichk].chipsets[j] = 1; - } - ++chips; - } - - for (i = 0; i < num_check; i++) { - if (!check[i].valid_vendor) { - CheckMsg(CHECKER_CHIPSET_NO_VENDOR, - "WARNING No such vendor 0x%x\n", vendor); - ++*err; - } - for (j = 0; j < check[i].num_chipsets; j++) { - if (xf86PCIVendorInfo && !check[i].chipsets[j]) { - CheckMsg(CHECKER_CHIPSET_NOT_SUPPORTED, - "NOTICE chipset \"%s\" (0x%x) not listed as supported.\n", - xf86PCIVendorInfo[check[i].ivendor].Device[j]->DeviceName, - xf86PCIVendorInfo[check[i].ivendor].Device[j]->DeviceID); - } - } - XtFree(check[i].chipsets); - } - - XtFree((XtPointer)check); -} -#endif - -void -ReadCardsDatabase(void) -{ -#ifdef USE_MODULES - if (!nomodules) { - int i, j, ivendor, idevice; - char name[256]; - _Xconst char *vendor, *device; - CardsEntry *entry = NULL, *tmp; - xf86cfgModuleOptions *opts = module_options; - const pciDeviceInfo **pDev; - - /* Only list cards that have a driver installed */ - while (opts) { - if (opts->chipsets) { - SymTabPtr chips = opts->chipsets; - - while (chips->name) { - vendor = opts->name; - device = chips->name; - ivendor = (chips->token & 0xffff0000) >> 16; - idevice = chips->token & 0xffff0; - if (ivendor == 0) - ivendor = opts->vendor; - - if (xf86PCIVendorInfo) { - for (i = 0; xf86PCIVendorInfo[i].VendorName; i++) - if (ivendor == xf86PCIVendorInfo[i].VendorID) { - vendor = xf86PCIVendorInfo[i].VendorName; - break; - } - if (xf86PCIVendorInfo[i].VendorName) { - if ((pDev = xf86PCIVendorInfo[i].Device)) { - for (j = 0; pDev[j]; j++) - if (idevice == pDev[j]->DeviceID) { - device = pDev[j]->DeviceName; - break; - } - } - } - } - - /* Since frequently there is more than one driver for a - * single vendor, it is required to avoid duplicates. - */ - XmuSnprintf(name, sizeof(name), "%s %s", vendor, device); - tmp = LookupCard(name); - - if (tmp == NULL || strcmp(tmp->chipset, chips->name) || - strcmp(tmp->driver, opts->name)) { - entry = (CardsEntry*)XtCalloc(1, sizeof(CardsEntry)); - if (NumCardsEntry % 16 == 0) { - CardsDB = (CardsEntry**)XtRealloc((XtPointer)CardsDB, - sizeof(CardsEntry*) * (NumCardsEntry + 16)); - } - CardsDB[NumCardsEntry++] = entry; - entry->name = XtNewString(name); - - /* XXX no private copy of strings */ - entry->chipset = (char*)chips->name; - entry->driver = opts->name; - - /* better than linear searchs to find duplicates */ - qsort(CardsDB, NumCardsEntry, sizeof(CardsEntry*), - CompareCards); - } - ++chips; - } - } - opts = opts->next; - } - - /* fix entries with the same name */ - for (i = 0; i < NumCardsEntry - 2;) { - for (j = i + 1; j < NumCardsEntry - 1 && - strcmp(CardsDB[i]->name, CardsDB[j]->name) == 0; j++) - ; - - if (i + 1 != j) { - while (i < j) { - char *str; - - if (strcmp(CardsDB[i]->chipset, CardsDB[j]->chipset)) - str = CardsDB[i]->chipset; - else - str = CardsDB[i]->driver; - - XmuSnprintf(name, sizeof(name), "%s (%s)", - CardsDB[i]->name, str); - XtFree(CardsDB[i]->name); - CardsDB[i]->name = XtNewString(name); - - ++i; - } - } - else - ++i; - } - - /* make sure data is valid to bsearch in */ - qsort(CardsDB, NumCardsEntry, sizeof(CardsEntry*), CompareCards); - } - else -#endif - DoReadCardsDatabase(); -} - -static void -DoReadCardsDatabase(void) -{ - char buffer[256]; - FILE *fp = fopen(Cards, "r"); - int i, result; - CardsEntry *entry = NULL; - static char *CardsError = "Error reading Cards database, at line %d (%s).\n"; - - if (fp == NULL) { - fprintf(stderr, "Cannot open Cards database.\n"); - exit(1); - } - - while ((result = ReadCardsLine(fp, buffer)) != END) { - switch (result) { - case ERROR: - fprintf(stderr, CardsError, linenum, buffer); - break; - case UNKNOWN: - fprintf(stderr, - "Unknown field type in Cards database, at line %d (%s).\n", - linenum, buffer); - break; - case NAME: - entry = calloc(1, sizeof(CardsEntry)); - if (NumCardsEntry % 16 == 0) { - CardsDB = realloc(CardsDB, sizeof(CardsEntry*) * - (NumCardsEntry + 16)); - if (CardsDB == NULL) { - fprintf(stderr, "Out of memory reading Cards database.\n"); - exit(1); - } - } - CardsDB[NumCardsEntry++] = entry; - entry->name = strdup(buffer); - break; - case CHIPSET: - if (entry == NULL || entry->chipset != NULL) { - fprintf(stderr, CardsError, linenum, buffer); - } -#if 0 - else - entry->chipset = strdup(buffer); -#endif - break; - case SERVER: - if (entry == NULL || entry->server != NULL) { - fprintf(stderr, CardsError, linenum, buffer); - } - else - entry->server = strdup(buffer); - break; - case DRIVER: - if (entry == NULL || entry->driver != NULL) { - fprintf(stderr, CardsError, linenum, buffer); - } - else - entry->driver = strdup(buffer); - break; - case RAMDAC: - if (entry == NULL || entry->ramdac != NULL) { - fprintf(stderr, CardsError, linenum, buffer); - } - else - entry->ramdac = strdup(buffer); - break; - case CLOCKCHIP: - if (entry == NULL || entry->clockchip != NULL) { - fprintf(stderr, CardsError, linenum, buffer); - } - else - entry->clockchip = strdup(buffer); - break; - case DACSPEED: - if (entry == NULL || entry->dacspeed != NULL) { - fprintf(stderr, CardsError, linenum, buffer); - } - else - entry->dacspeed = strdup(buffer); - break; - case NOCLOCKPROBE: - if (entry == NULL) { - fprintf(stderr, CardsError, linenum, buffer); - } - else - entry->flags |= F_NOCLOCKPROBE; - break; - case UNSUPPORTED: - if (entry == NULL) { - fprintf(stderr, CardsError, linenum, buffer); - } - else - entry->flags |= F_UNSUPPORTED; - break; - case SEE: - if (entry == NULL || entry->see != NULL) { - fprintf(stderr, CardsError, linenum, buffer); - } - else - entry->see = strdup(buffer); - break; - case LINE: - if (entry == NULL) { - fprintf(stderr, CardsError, linenum, buffer); - } - else if (entry->lines == NULL) - entry->lines = strdup(buffer); - else { - char *str = malloc(strlen(entry->lines) + strlen(buffer) + 2); - - sprintf(str, "%s\n%s", entry->lines, buffer); - free(entry->lines); - entry->lines = str; - } - break; - } - } - - fclose(fp); - - qsort(CardsDB, NumCardsEntry, sizeof(CardsEntry*), CompareCards); - -#ifdef DEBUG - for (i = 0; i < NumCardsEntry - 1; i++) { - if (strcmp(CardsDB[i]->name, CardsDB[i+1]->name) == 0) - fprintf(stderr, "Duplicate entry in Cards database: (%s).\n", - CardsDB[i]->name); - } -#endif - - for (i = 0; i < NumCardsEntry - 1; i++) { - if (CardsDB[i]->see != NULL) { - if ((entry = LookupCard(CardsDB[i]->see)) == NULL) { - fprintf(stderr, "Cannot find card '%s' for filling defaults.\n", - CardsDB[i]->see); - continue; - } - if (CardsDB[i]->chipset == NULL && entry->chipset != NULL) - CardsDB[i]->chipset = strdup(entry->chipset); - if (CardsDB[i]->server == NULL && entry->server != NULL) - CardsDB[i]->server = strdup(entry->server); - if (CardsDB[i]->driver == NULL && entry->driver != NULL) - CardsDB[i]->driver = strdup(entry->driver); - if (CardsDB[i]->ramdac == NULL && entry->ramdac != NULL) - CardsDB[i]->ramdac = strdup(entry->ramdac); - if (CardsDB[i]->clockchip == NULL && entry->clockchip != NULL) - CardsDB[i]->clockchip = strdup(entry->clockchip); - if (CardsDB[i]->dacspeed == NULL && entry->dacspeed != NULL) - CardsDB[i]->dacspeed = strdup(entry->dacspeed); - if (CardsDB[i]->flags & F_NOCLOCKPROBE) - CardsDB[i]->flags |= F_NOCLOCKPROBE; - if (CardsDB[i]->flags & F_UNSUPPORTED) - CardsDB[i]->flags |= F_UNSUPPORTED; - if (entry->lines != NULL) { - if (CardsDB[i]->lines == NULL) - CardsDB[i]->lines = strdup(entry->lines); - else { - char *str = malloc(strlen(entry->lines) + - strlen(CardsDB[i]->lines) + 2); - - sprintf(str, "%s\n%s", CardsDB[i]->lines, entry->lines); - free(CardsDB[i]->lines); - CardsDB[i]->lines = str; - } - } - if (entry->see != NULL) { -#ifdef DEBUG - fprintf(stderr, "Nested SEE entry: %s -> %s -> %s\n", - CardsDB[i]->name, CardsDB[i]->see, entry->see); -#endif - CardsDB[i]->see = strdup(entry->see); - --i; - continue; - } - free(CardsDB[i]->see); - CardsDB[i]->see = NULL; - } - } -} - -CardsEntry * -LookupCard(char *name) -{ - CardsEntry **ptr; - - if (NumCardsEntry == 0 || CardsDB == 0) - return NULL; - - ptr = (CardsEntry**)bsearch(name, CardsDB, NumCardsEntry, - sizeof(CardsEntry*), BCompareCards); - - return (ptr != NULL ? *ptr : NULL); -} - -char ** -GetCardNames(int *result) -{ - char **cards = NULL; - int ncards; - - for (ncards = 0; ncards < NumCardsEntry; ncards++) { - if (ncards % 16 == 0) { - if ((cards = (char**)realloc(cards, sizeof(char*) * - (ncards + 16))) == NULL) { - fprintf(stderr, "Out of memory.\n"); - exit(1); - } - } - cards[ncards] = strdup(CardsDB[ncards]->name); - } - - *result = ncards; - - return (cards); -} - -char ** -FilterCardNames(char *pattern, int *result) -{ -#ifdef USE_MODULES - if (!nomodules) { - char **cards = NULL; - int i, ncards = 0; - - for (i = 0; i < NumCardsEntry; i++) { - if (strstr(CardsDB[i]->name, pattern) == NULL) - continue; - if (ncards % 16 == 0) { - if ((cards = (char**)realloc(cards, sizeof(char*) * - (ncards + 16))) == NULL) { - fprintf(stderr, "Out of memory.\n"); - exit(1); - } - } - cards[ncards] = strdup(CardsDB[i]->name); - ++ncards; - } - - *result = ncards; - - return (cards); - } -#endif - return (DoFilterCardNames(pattern, result)); -} - -static char ** -DoFilterCardNames(char *pattern, int *result) -{ - FILE *fp; - char **cards = NULL; - int len, ncards = 0; - char *cmd, *ptr, buffer[256]; - - cmd = malloc(32 + (strlen(pattern) * 2) + strlen(Cards)); - - strcpy(cmd, "egrep -i '^NAME\\ .*"); - len = strlen(cmd); - ptr = pattern; - while (*ptr) { - if (!isalnum(*ptr)) { - cmd[len++] = '\\'; - } - cmd[len++] = *ptr++; - } - cmd[len] = '\0'; - strcat(cmd, ".*$' "); - strcat(cmd, Cards); - strcat(cmd, " | sort"); - /*sprintf(cmd, "egrep -i '^NAME\\ .*%s.*$' %s | sort", pattern, Cards);*/ - - if ((fp = popen(cmd, "r")) == NULL) { - fprintf(stderr, "Cannot read Cards database.\n"); - exit(1); - } - while (fgets(buffer, sizeof(buffer), fp) != NULL) { - ptr = buffer + strlen(buffer) - 1; - while (isspace(*ptr) && ptr > buffer) - --ptr; - if (!isspace(*ptr) && ptr > buffer) - ptr[1] = '\0'; - ptr = buffer; - while (!isspace(*ptr) && *ptr) /* skip NAME */ - ++ptr; - while (isspace(*ptr) && *ptr) - ++ptr; - if (ncards % 16 == 0) { - if ((cards = (char**)realloc(cards, sizeof(char*) * - (ncards + 16))) == NULL) { - fprintf(stderr, "Out of memory.\n"); - exit(1); - } - } - cards[ncards++] = strdup(ptr); - } - free(cmd); - - *result = ncards; - - return (cards); -} - -static int -ReadCardsLine(FILE *fp, char *value) -{ - char name[32], buffer[256], *ptr, *end; - int result = NOTUSEFUL; - - ++linenum; - - if (fgets(buffer, sizeof(buffer), fp) == NULL) - return (END); - - ptr = buffer; - /* skip initial spaces; should'nt bother about this.. */ - while (isspace(*ptr) && *ptr) - ++ptr; - - if (*ptr == '#' || *ptr == '\0') - return (NOTUSEFUL); - - end = ptr; - while (!isspace(*end) && *end) - ++end; - if (end - ptr > sizeof(buffer) - 1) { - strncpy(value, buffer, 255); - value[255] = '\0'; - return (ERROR); - } - strncpy(name, ptr, end - ptr); - name[end - ptr] = '\0'; - - /* read the optional arguments */ - ptr = end; - while (isspace(*ptr) && *ptr) - ++ptr; - - end = ptr + strlen(ptr) - 1; - while (isspace(*end) && end > ptr) - --end; - if (!isspace(*end)) - ++end; - *end = '\0'; - - if (strcmp(name, "NAME") == 0) - result = NAME; - else if (strcmp(name, "CHIPSET") == 0) - result = CHIPSET; - else if (strcmp(name, "SERVER") == 0) - result = SERVER; - else if (strcmp(name, "DRIVER") == 0) - result = DRIVER; - else if (strcmp(name, "RAMDAC") == 0) - result = RAMDAC; - else if (strcmp(name, "CLOCKCHIP") == 0) - result = CLOCKCHIP; - else if (strcmp(name, "DACSPEED") == 0) - result = DACSPEED; - else if (strcmp(name, "NOCLOCKPROBE") == 0) - result = NOCLOCKPROBE; - else if (strcmp(name, "UNSUPPORTED") == 0) - result = UNSUPPORTED; - else if (strcmp(name, "SEE") == 0) - result = SEE; - else if (strcmp(name, "LINE") == 0) - result = LINE; - else if (strcmp(name, "END") == 0) - result = END; - else { - strcpy(value, name); - return (UNKNOWN); - } - - /* value *must* have at least 256 bytes */ - strcpy(value, ptr); - - return (result); -} - -static int -CompareCards(_Xconst void *left, _Xconst void *right) -{ - return strcasecmp((*(CardsEntry**)left)->name, (*(CardsEntry**)right)->name); -} - -static int -BCompareCards(_Xconst void *name, _Xconst void *card) -{ - return (strcasecmp((char*)name, (*(CardsEntry**)card)->name)); -} diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/cards.h b/xorg-server/hw/xfree86/utils/xorgcfg/cards.h deleted file mode 100644 index 8557e96df..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/cards.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _xf86cfg_cards_h -#define _xf86cfg_cards_h - -#ifdef USE_MODULES -#ifdef CARDS_PRIVATE -#include "loader.h" - -#include "xf86PciStr.h" -#include "xf86PciIds.h" -#endif /* CARDS_PRIVATE */ -#endif /* USE_MODULES */ - -/* Flags in CardsEntry */ -#define F_NOCLOCKPROBE 0x1 /* Never probe clocks of the card. */ -#define F_UNSUPPORTED 0x2 /* Card is not supported (only VGA). */ - -/* - * Types - */ -typedef struct { - char *name; /* Name of the card. */ - char *chipset; /* Chipset (decriptive). */ - char *server; /* Server identifier. */ - char *driver; /* Driver identifier. */ - char *ramdac; /* Ramdac identifier. */ - char *clockchip; /* Clockchip identifier. */ - char *dacspeed; /* DAC speed rating. */ - int flags; - char *lines; /* Additional Device section lines. */ - char *see; /* Must resolve in a last step. - * Allow more than one SEE entry? */ -} CardsEntry; - -extern CardsEntry **CardsDB; -extern int NumCardsEntry; - -/* - * Prototypes - */ -void ReadCardsDatabase(void); -CardsEntry *LookupCard(char*); -char **GetCardNames(int*); -char **FilterCardNames(char*, int*); -#ifdef USE_MODULES -void InitializePciInfo(void); -typedef struct _xf86cfgModuleOptions *xf86cfgModuleOptionsPtr; -void CheckChipsets(xf86cfgModuleOptionsPtr, int*); -#endif - -#endif /* _xf86cfg_cards_h */ diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/computer.xpm b/xorg-server/hw/xfree86/utils/xorgcfg/computer.xpm deleted file mode 100644 index 9167e3eaf..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/computer.xpm +++ /dev/null @@ -1,91 +0,0 @@ -/* XPM */ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - * $XFree86$ - */ -static char * computer_xpm[] = { -"30 50 8 1", -" c none", -". c #CF3CCF3CCF3C", -"X c #B6DABAEAB6DA", -"o c #8E388E388E38", -"O c #FFFFFFFFFFFF", -"+ c #FFFF00000000", -"@ c #514451445144", -"# c #0000FFFF0000", -" ............................ ", -"..XXXXXXXXXXXXXXXXXXXXXXXXXXXo", -".XXXXXXXXXXXXXXXXXXXXXXXXXXXXo", -".XXooooooooooooooooooooooooXXo", -".XXo.......................XXo", -".XXo.XXXXXXXXXXXXXXXXXXXXo.XXo", -".XXo.XX....XXXXXXXXXXXOoXo.XXo", -".XXo.XXooooXXXXXXXXXXXooXo.XXo", -".XXo.XXXXXXXXXXXXXXXXXXXXo.XXo", -".XXo.......................XXo", -".XXooooooooooooooooooooooooXXo", -".XXo.......................XXo", -".XXo.XXXXXXXXXXXXXXXXXXXXo.XXo", -".XXo.XXXXXXXXXXXXXXXXXXXXo.XXo", -".XXo.XXXXXXXXXXXXXXXXXXXXo.XXo", -".XXooooooooooooooooooooooo.XXo", -".XXo.......................XXo", -".XXoooooooooooooo.XXXXXXXo.XXo", -".XXo..............XXXXXXXo.XXo", -".XXo.XXXXXXXXXXXX.XX.O.XXo.XXo", -".XXo.oooooooooooX.XXO+OXXo.XXo", -".XXo.XXXXXXXXXOOX.XX.O.XXo.XXo", -".XXo.XXXXXXXXXXXX.XXXXXXXo.XXo", -".XXo..............XXXXXXXo.XXo", -".XXooooooooooooooooooooooo.XXo", -".XXo.XXXXXXXXXXXXXXXXXXXXo.XXo", -".XXo.XXXXXXXXXXXXXXXXXXXXo.XXo", -".XXo.XXX@@@@@@@@@XXX...XXo.XXo", -".XXo.XX@@+@@@@@#@@X.OXXoXo.XXo", -".XXo.XXX@@@@@@@@@XXXoooXXo.XXo", -".XXo.XXXXXXXXXXXXXXXXXXXXo.XXo", -".XXo.XXXXXXXXXXXXXXXXXXXXo.XXo", -".XXo.XXXXXXXXXXXXXXX..XXXo.XXo", -".XXo.XXXXXXXXXXXXXX.OXoXXo.XXo", -".XXo.XXXXXXXXXXXXXXXooXXXo.XXo", -".XXo.XXXXXXXXXXXXXXXXXXXXo.XXo", -".XXo.XXXXXXXXXXXXXXXXXXXXo.XXo", -".XXo.XXXXXXXXXXXXXXXXXXXXo.XXo", -".XXXo.XXXXXXXXXXXXXXXXXXo.XXXo", -".XXXo.XXXXXXXXXXXXXXXXXXo.XXXo", -".XXXo.XXXXXXXXXXXXXXXXXXo.XXXo", -".XXXo.oXXXoXXXoXXXoXXXoXo.XXXo", -".XXXXo.XXXXXXXXXXXXXXXXo.XXXXo", -".XXXXo..oXXXoXXXoXXoXXoo.XXXXo", -".XXXXXoo..XXXXXXXXXXoo..XXXXXo", -".XXXXXXXoo......oooo..XXXXXXXo", -".XXXXXXXXXoooooo....XXXXXXXXXo", -".XXXXXXXXXXXXXXXXXXXXXXXXXXXXo", -".XXXXXXXXXXXXXXXXXXXXXXXXXXXoo", -" oooooooooooooooooooooooooooo "}; diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/config.c b/xorg-server/hw/xfree86/utils/xorgcfg/config.c deleted file mode 100644 index 8c985bf34..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/config.c +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "config.h" -#include "mouse-cfg.h" -#include "keyboard-cfg.h" -#include "card-cfg.h" -#include "monitor-cfg.h" -#include "screen-cfg.h" -#include -#include -#include -#include -#include -#include - -/* - * Prototypes - */ -void BackCallback(Widget, XtPointer, XtPointer); -void NextCallback(Widget, XtPointer, XtPointer); -void ApplyCallback(Widget, XtPointer, XtPointer); -void CloseCallback(Widget, XtPointer, XtPointer); -void ErrorCallback(Widget, XtPointer, XtPointer); - -/* - * Initialization - */ -XF86SetupFunction mouse_functions[] = { - MouseDeviceAndProtocol, -}; - -XF86SetupFunction keyboard_functions[] = { - KeyboardModelAndLayout, -}; - -XF86SetupFunction card_functions[] = { - CardModel, -}; - -XF86SetupFunction monitor_functions[] = { - MonitorLayout, -}; - -XF86SetupFunction screen_functions[] = { - ScreenDialog, -}; - -XF86SetupFunctionList function_lists[] = { - {mouse_functions, sizeof(mouse_functions) / sizeof(mouse_functions[0]),}, - {keyboard_functions, sizeof(keyboard_functions) / sizeof(keyboard_functions[0]),}, - {card_functions, sizeof(card_functions) / sizeof(card_functions[0]),}, - {monitor_functions, sizeof(monitor_functions) / sizeof(monitor_functions[0]),}, - {screen_functions, sizeof(screen_functions) / sizeof(screen_functions[0]),}, -}; - -XF86SetupInfo xf86info = { - sizeof(function_lists) / sizeof(function_lists[0]), - MOUSE, - function_lists, -}; - -Widget configp, current, ok, back, next; -static Widget shell, errcurrent, oldcurrent; - -static int config_status, config_popped; - -static ConfigCheckFunction config_function; - -Widget ident_widget; -char *ident_string; -XF86ConfigPtr XF86Config; - -/* - * Implementation - */ -void -StartConfig(void) -{ - static int first = 1; - Widget pane, top, bottom, cancel; - const char *filename; - - if (!first) - return; - first = 0; - - /* Read initial configuration */ - if ((filename = xf86openConfigFile(getuid() == 0 ? CONFPATH : USER_CONFPATH, - XF86Config_path, NULL)) == NULL) { - int length = XF86Config_path ? strlen(XF86Config_path) : -1; - - if (length > 2 && - XF86Config_path[length - 2] == '-' && - XF86Config_path[length - 1] == '4') { - XF86Config_path[length - 2] = '\0'; - filename = xf86openConfigFile(getuid() == 0 ? - CONFPATH : USER_CONFPATH, - XF86Config_path, NULL); - } - - if (filename == NULL) { - fprintf(stderr, "Cannot open config file.\n"); - exit(1); - } - } - XF86Config_path = (char *)filename; - if ((XF86Config = xf86readConfigFile()) == NULL) { - fprintf(stderr, "Problem when parsing config file\n"); - exit(1); - } - - shell = XtCreatePopupShell("config", transientShellWidgetClass, - toplevel, NULL, 0); - pane = XtCreateManagedWidget("pane", panedWidgetClass, - shell, NULL, 0); - top = XtCreateManagedWidget("top", formWidgetClass, - pane, NULL, 0); - (void) XtCreateManagedWidget("label", labelWidgetClass, - top, NULL, 0); - ident_widget = XtVaCreateManagedWidget("identifier", asciiTextWidgetClass, - top, - XtNeditType, XawtextEdit, - NULL); - configp = XtCreateManagedWidget("work", formWidgetClass, - pane, NULL, 0); - current = XtCreateManagedWidget("wellcome", labelWidgetClass, - configp, NULL, 0); - bottom = XtCreateManagedWidget("bottom", formWidgetClass, - pane, NULL, 0); - back = XtCreateManagedWidget("back", commandWidgetClass, - bottom, NULL, 0); - XtAddCallback(back, XtNcallback, BackCallback, (XtPointer)&xf86info); - next = XtCreateManagedWidget("next", commandWidgetClass, - bottom, NULL, 0); - XtAddCallback(next, XtNcallback, NextCallback, (XtPointer)&xf86info); - ok = XtCreateManagedWidget("ok", commandWidgetClass, - bottom, NULL, 0); - XtAddCallback(ok, XtNcallback, ApplyCallback, (XtPointer)NULL); - cancel = XtCreateManagedWidget("cancel", commandWidgetClass, - bottom, NULL, 0); - XtAddCallback(cancel, XtNcallback, CloseCallback, (XtPointer)NULL); - - XtRealizeWidget(shell); - - XSetWMProtocols(DPY, XtWindow(shell), &wm_delete_window, 1); -} - -/*ARGSUSED*/ -Bool -ConfigLoop(ConfigCheckFunction config_fn) -{ - Arg args[1]; - config_popped = True; - XtPopup(shell, XtGrabExclusive); - - config_function = config_fn; - while (config_popped) - XtAppProcessEvent(XtWidgetToApplicationContext(shell), XtIMAll); - - XtSetArg(args[0], XtNstring, &ident_string); - XtGetValues(ident_widget, args, 1); - - return (config_status); -} - -/*ARGSUSED*/ -void -ConfigError(void) -{ - static int first = 1; - - if (first) { - Widget command; - - errcurrent = XtCreateWidget("error", formWidgetClass, - configp, NULL, 0); - (void) XtCreateManagedWidget("label", labelWidgetClass, - errcurrent, NULL, 0); - command = XtCreateManagedWidget("command", commandWidgetClass, - errcurrent, NULL, 0); - XtAddCallback(command, XtNcallback, ErrorCallback, NULL); - - XtRealizeWidget(errcurrent); - } - - oldcurrent = current; - XtChangeManagedSet(¤t, 1, NULL, NULL, &errcurrent, 1); - current = errcurrent; - - XtSetSensitive(ok, False); -} - -/*ARGSUSED*/ -void -ErrorCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - XtChangeManagedSet(&errcurrent, 1, NULL, NULL, &oldcurrent, 1); - current = oldcurrent; - - XtSetSensitive(ok, True); -} - -/*ARGSUSED*/ -void -BackCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - XF86SetupInfo *info = (XF86SetupInfo*)user_data; - int idx = info->lists[info->cur_list].cur_function - 1; - - if (idx >= 0 && info->lists[info->cur_list].num_functions > 0) { - info->lists[info->cur_list].cur_function = idx; - if (idx - 1 == -1) - XtSetSensitive(back, False); - if (!XtIsSensitive(next)) - XtSetSensitive(next, True); - (info->lists[info->cur_list].functions[idx])(info); - } -} - -/*ARGSUSED*/ -void -NextCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - XF86SetupInfo *info = (XF86SetupInfo*)user_data; - int idx = info->lists[info->cur_list].cur_function + 1; - - if (idx < info->lists[info->cur_list].num_functions) { - info->lists[info->cur_list].cur_function = idx; - if (idx + 1 == info->lists[info->cur_list].num_functions) - XtSetSensitive(next, False); - if (!XtIsSensitive(back)) - XtSetSensitive(back, True); - (info->lists[info->cur_list].functions[idx])(info); - } -} - -/*ARGSUSED*/ -void -CloseCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - XtPopdown(shell); - config_popped = False; - config_status = False; - /* make sure it is sensitive */ - XtSetSensitive(ok, True); - xf86info.lists[xf86info.cur_list].cur_function = 0; -} - -/*ARGSUSED*/ -void -ApplyCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - Arg args[1]; - - XtSetArg(args[0], XtNstring, &ident_string); - XtGetValues(ident_widget, args, 1); - - if (config_function == NULL || (*config_function)()) { - XtPopdown(shell); - config_popped = False; - config_status = True; - xf86info.lists[xf86info.cur_list].cur_function = 0; - } - else - ConfigError(); -} - -/*ARGSUSED*/ -void -ConfigCancelAction(Widget w, XEvent *event, String *params, Cardinal *num_params) -{ - CloseCallback(w, NULL, NULL); -} diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/config.h b/xorg-server/hw/xfree86/utils/xorgcfg/config.h deleted file mode 100644 index ea12e8879..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/config.h +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#ifdef HAVE_CONFIG_H -# include "xorg-config.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef sun -#undef index -#undef rindex -#include -#endif -#include - -#include - -/* Get PATH_MAX */ -#ifndef PATH_MAX -# if defined(_POSIX_SOURCE) -# include -# else -# define _POSIX_SOURCE -# include -# undef _POSIX_SOURCE -# endif -# ifndef PATH_MAX -# ifdef MAXPATHLEN -# define PATH_MAX MAXPATHLEN -# else -# define PATH_MAX 1024 -# endif -# endif -#endif - -#include -#include -#include -#include -#include -#include -#include - -#ifndef _xf86cfg_config_h -#define _xf86cfg_config_h - -/* Must match the offset in the xf86info structure at config.c, - * and is used also by interface.c - */ -#define MOUSE 0 -#define KEYBOARD 1 -#define CARD 2 -#define MONITOR 3 -#define SCREEN 4 -#define SERVER 5 - -#define UNUSED 0 -#define USED 1 - -#define CONFIG_LAYOUT 0 -#define CONFIG_SCREEN 1 -#define CONFIG_MODELINE 2 -#define CONFIG_ACCESSX 3 -extern int config_mode; - -#define CONFPATH "%A," "%R," \ - "/etc/X11/%R," "%P/etc/X11/%R," \ - "%E," "%F," \ - "/etc/X11/%F," "%P/etc/X11/%F," \ - "/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \ - "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \ - "%P/etc/X11/%X," \ - "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \ - "%P/lib/X11/%X" -#define USER_CONFPATH "/etc/X11/%S," "%P/etc/X11/%S," \ - "/etc/X11/%G," "%P/etc/X11/%G," \ - "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \ - "%P/etc/X11/%X," \ - "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \ - "%P/lib/X11/%X" - -/* - * Types - */ -typedef struct _XF86SetupInfo XF86SetupInfo; -typedef void (*XF86SetupFunction)(XF86SetupInfo*); - -typedef struct _XF86SetupFunctionList { - XF86SetupFunction *functions; - int num_functions; - int cur_function; -} XF86SetupFunctionList; - -struct _XF86SetupInfo { - int num_lists; - int cur_list; - XF86SetupFunctionList *lists; -}; - -typedef Bool (*ConfigCheckFunction)(void); - -typedef struct _xf86cfgDevice xf86cfgDevice; - -struct _xf86cfgDevice { - XtPointer config; - Widget widget; - int type, state, refcount; -}; - -typedef struct { - XF86ConfScreenPtr screen; - Widget widget; - int type, state, refcount; - xf86cfgDevice *card; - xf86cfgDevice *monitor; - short row, column; - XRectangle rect; - short rotate; -} xf86cfgScreen; - -/* this structure is used just to restore - properly the monitors layout in the - screen window configuration. - */ -typedef struct { - XF86ConfLayoutPtr layout; - xf86cfgScreen **screen; - XPoint *position; - int num_layouts; -} xf86cfgLayout; - -/* The vidmode extension usage is controlled by this structure. - * The information is read at startup, and added monitors cannot - * be configured, since they are not attached to a particular screen. - */ -typedef struct _xf86cfgVidMode xf86cfgVidmode; - -typedef struct { - XF86ConfLayoutPtr layout; /* current layout */ - Widget cpu; - xf86cfgLayout **layouts; - Cardinal num_layouts; - xf86cfgScreen **screens; - Cardinal num_screens; - xf86cfgDevice **devices; - Cardinal num_devices; - xf86cfgVidmode **vidmodes; - Cardinal num_vidmodes; -} xf86cfgComputer; - -/* - * Prototypes - */ -void StartConfig(void); -Bool ConfigLoop(ConfigCheckFunction); -void ConfigError(void); -void ChangeScreen(XF86ConfMonitorPtr, XF86ConfMonitorPtr, - XF86ConfDevicePtr, XF86ConfDevicePtr); -void SetTip(xf86cfgDevice*); -Bool startx(void); -void endx(void); -void startaccessx(void); -void ConfigCancelAction(Widget, XEvent*, String*, Cardinal*); -void ExpertConfigureStart(void); -void ExpertConfigureEnd(void); -void ExpertCloseAction(Widget, XEvent*, String*, Cardinal*); -void ExpertCallback(Widget, XtPointer, XtPointer); - -/* - * Initialization - */ -extern Widget toplevel, configp, current, back, next; -extern XtAppContext appcon; -extern XF86SetupInfo xf86info; -extern Widget ident_widget; -extern char *ident_string; -extern XF86ConfigPtr XF86Config; -extern char *XF86Config_path; -extern char *XF86Module_path; -extern char *XFree86_path; -extern char *XF86Font_path; -extern char *XF86RGB_path; -extern char *XFree86Dir; -extern xf86cfgComputer computer; -extern Atom wm_delete_window; -extern Display *DPY; -extern Pixmap menuPixmap; -#ifdef USE_MODULES -extern int nomodules; -#endif - -#endif /* _xf86cfg_config_h */ diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/down.xbm b/xorg-server/hw/xfree86/utils/xorgcfg/down.xbm deleted file mode 100644 index 742adf202..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/down.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define down_width 19 -#define down_height 19 -static unsigned char down_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, - 0x80, 0x0f, 0x00, 0x80, 0x0f, 0x00, 0x80, 0x0f, 0x00, 0x80, 0x0f, 0x00, - 0x80, 0x0f, 0x00, 0xfc, 0xff, 0x01, 0xf8, 0xff, 0x00, 0xf0, 0x7f, 0x00, - 0xe0, 0x3f, 0x00, 0xc0, 0x1f, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x07, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/expert.c b/xorg-server/hw/xfree86/utils/xorgcfg/expert.c deleted file mode 100644 index bb6960ce7..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/expert.c +++ /dev/null @@ -1,4839 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "config.h" -#include "xf86config.h" -#include "options.h" -#include "screen.h" -#include "vidmode.h" -#include "monitor-cfg.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Types - */ -typedef struct _TreeNode TreeNode; -typedef union _TreeData TreeData; -typedef void (*NodeDeleteFunc)(TreeNode*); -typedef void (*NodeUpdateFunc)(TreeNode*); - -union _TreeData { - struct { - Widget text; - } files; - struct { - Widget text; - XF86LoadPtr load; - } module; - struct { - Widget text; - XF86ConfModesPtr modes; - } modes; - struct { - Widget text, value; - XF86ConfModeLinePtr modeline; - } modeline; - struct { - Widget text, vendor, board, busid, driver; - XF86ConfVideoAdaptorPtr video; - } video; - struct { - Widget text; - XF86ConfVideoPortPtr port; - } port; - struct { - Widget text, vendor, model, width, height, hsync, vrefresh, - gammaRed, gammaGreen, gammaBlue; - XF86ConfMonitorPtr monitor; - } monitor; - struct { - Widget menu; - XF86ConfModesLinkPtr modeslink; - } modeslink; - struct { - Widget text, vendor, board, chipset, busid, card, driver, ramdac, - dacSpeed, videoRam, textClockFreq, biosBase, memBase, ioBase, - clockChip, devClock, chipId, chipRev, irq, screen; - XF86ConfDevicePtr device; - } device; - struct { - Widget text, defaultDepth, defaultBpp, defaultFbBpp, - monitor, device; - XF86ConfScreenPtr screen; - } screen; - struct { - Widget menu; - XF86ConfAdaptorLinkPtr adaptorlink; - } adaptorlink; - struct { - Widget viewport, c_virtual, depth, bpp, visual, weight, black, white; - XF86ConfDisplayPtr display; - } display; - struct { - Widget text; - XF86ModePtr mode; - } mode; - struct { - Widget text; - XF86ConfInputPtr input; - } input; - struct { - Widget text; - XF86ConfLayoutPtr layout; - } layout; - struct { - Widget menu, button, scrnum, adjx, adjy; - XF86ConfScreenPtr screen; - XF86ConfAdjacencyPtr adjacency; - } adjacency; - struct { - Widget menu; - XF86ConfInputrefPtr inputref; - } inputref; - struct { - Widget text; - XF86ConfVendorPtr vendor; - } vendor; - struct { - Widget text; - XF86ConfVendSubPtr vendsub; - } vendsub; - struct { - Widget name, group, mode; - XF86ConfDRIPtr dri; - } dri; - struct { - Widget count, size, flags; - XF86ConfBuffersPtr buffers; - } buffers; -}; - -struct _TreeNode { - Widget node, toggle, treeParent; - TreeNode *parent, *child, *next; - TreeData *data; - NodeDeleteFunc destroy; - NodeUpdateFunc update; -}; - -/* - * Prototypes - */ -static Bool ExpertInitialize(void); -static TreeNode *NewNode(TreeNode*, Widget, Widget, Widget, TreeData*); -static void DeleteNode(TreeNode*); -static void DestroyCallback(Widget, XtPointer, XtPointer); -static void PannerCallback(Widget, XtPointer, XtPointer); -static void PortholeCallback(Widget, XtPointer, XtPointer); -static void ToggleCallback(Widget, XtPointer, XtPointer); -static void ToggleNode(TreeNode*, Bool); -static void ToggleNodeRecursive(TreeNode*); -static void OptionsCallback(Widget, XtPointer, XtPointer); -static void RelayoutTree(void); -static void PopdownCallback(Widget, XtPointer, XtPointer); -static void UpdateConfig(TreeNode*); -static void DestroyTree(TreeNode*); - -static void CreateFiles(TreeNode*); -static void CreateFilesField(TreeNode*, char*, char*); -static void UpdateFiles(TreeNode*); - -static void CreateFontPath(TreeNode*, char*); -static Widget CreateFontPathField(TreeNode*, char*, Bool); -static void FontPathChanged(TreeNode*); -static void NewFontPathCallback(Widget, XtPointer, XtPointer); -static void FontPathCallback(Widget, XtPointer, XtPointer); - -static void CreateModulePath(TreeNode*, char*); -static Widget CreateModulePathField(TreeNode*, char*, Bool); -static void ModulePathChanged(TreeNode*); -static void NewModulePathCallback(Widget, XtPointer, XtPointer); - -static void CreateModule(TreeNode*, XF86LoadPtr); -static void CreateModuleField(TreeNode*, Bool); -static void ModuleDestroy(TreeNode*); -static void NewModuleCallback(Widget, XtPointer, XtPointer); - -static void CreateModes(TreeNode*, XF86ConfModesPtr); -static void CreateModesField(TreeNode*, Bool); -static void ModesDestroy(TreeNode*); -static void NewModesCallback(Widget, XtPointer, XtPointer); -static void CreateModesModeLine(TreeNode*, XF86ConfModeLinePtr); -static void ModesModeLineDestroy(TreeNode*); -static void NewModesModeLineCallback(Widget, XtPointer, XtPointer); - -static void CreateModeLineField(TreeNode*, Bool, Bool); -static XF86ConfModeLinePtr ParseModeLine(char*, char*); - -static void CreateVideoAdaptor(TreeNode*, XF86ConfVideoAdaptorPtr); -static void CreateVideoAdaptorField(TreeNode*, Bool); -static void VideoAdaptorDestroy(TreeNode*); -static void NewVideoAdaptorCallback(Widget, XtPointer, XtPointer); -static void VideoAdaptorUpdate(TreeNode*); -static void CreateVideoPort(TreeNode*, XF86ConfVideoPortPtr); -static void CreateVideoPortField(TreeNode*, Bool); -static void VideoPortDestroy(TreeNode*); -static void NewVideoPortCallback(Widget, XtPointer, XtPointer); - -static void CreateMonitor(TreeNode*, XF86ConfMonitorPtr); -static void CreateMonitorField(TreeNode*, Bool); -static void MonitorDestroy(TreeNode*); -static void NewMonitorCallback(Widget, XtPointer, XtPointer); -static void MonitorUpdate(TreeNode*); -static void CreateMonitorModeLine(TreeNode*, XF86ConfModeLinePtr); -static void MonitorModeLineDestroy(TreeNode*); -static void NewMonitorModeLineCallback(Widget, XtPointer, XtPointer); -static void CreateMonitorModes(TreeNode*, XF86ConfModesLinkPtr); -static void CreateMonitorModesField(TreeNode*, Bool); -static void MonitorModesLinkDestroy(TreeNode*); -static void NewMonitorModesCallback(Widget, XtPointer, XtPointer); - -static void CreateDevice(TreeNode*, XF86ConfDevicePtr); -static void CreateDeviceField(TreeNode*, Bool); -static void NewDeviceCallback(Widget, XtPointer, XtPointer); -static void DeviceDestroy(TreeNode*); -static void DeviceUpdate(TreeNode*); - -static void CreateScreen(TreeNode*, XF86ConfScreenPtr); -static void CreateScreenField(TreeNode*, Bool); -static void NewScreenCallback(Widget, XtPointer, XtPointer); -static void ScreenDestroy(TreeNode*); -static void ScreenUpdate(TreeNode*); -static void CreateScreenAdaptor(TreeNode*, XF86ConfAdaptorLinkPtr); -static void CreateScreenAdaptorField(TreeNode*, Bool); -static void NewScreenAdaptorCallback(Widget, XtPointer, XtPointer); -static void ScreenAdaptorDestroy(TreeNode*); -static void CreateScreenDisplay(TreeNode*, XF86ConfDisplayPtr); -static void CreateScreenDisplayField(TreeNode*, Bool); -static void NewScreenDisplayCallback(Widget, XtPointer, XtPointer); -static void ScreenDisplayDestroy(TreeNode*); -static void ScreenDisplayUpdate(TreeNode*); -static void CreateDisplayMode(TreeNode*, XF86ModePtr); -static void CreateDisplayModeField(TreeNode*, Bool); -static void NewDisplayModeCallback(Widget, XtPointer, XtPointer); -static void DisplayModeDestroy(TreeNode*); - -static void CreateInput(TreeNode*, XF86ConfInputPtr); -static void CreateInputField(TreeNode*, Bool); -static void InputDestroy(TreeNode*); -static void NewInputCallback(Widget, XtPointer, XtPointer); -static void InputUpdate(TreeNode*); - -static void CreateLayout(TreeNode*, XF86ConfLayoutPtr); -static void CreateLayoutField(TreeNode*, Bool); -static void LayoutDestroy(TreeNode*); -static void NewLayoutCallback(Widget, XtPointer, XtPointer); -static void CreateAdjacency(TreeNode*, XF86ConfAdjacencyPtr); -static void CreateAdjacencyField(TreeNode*, Bool); -static void AdjacencyDestroy(TreeNode*); -static void NewAdjacencyCallback(Widget, XtPointer, XtPointer); -static void AdjacencyMenuCallback(Widget, XtPointer, XtPointer); -static void AdjacencyToggleCallback(Widget, XtPointer, XtPointer); -static void CreateInputref(TreeNode*, XF86ConfInputrefPtr); -static void CreateInputrefField(TreeNode*, Bool); -static void InputrefDestroy(TreeNode*); -static void NewInputrefCallback(Widget, XtPointer, XtPointer); - -static void CreateVendor(TreeNode*, XF86ConfVendorPtr); -static void CreateVendorField(TreeNode*, Bool); -static void VendorDestroy(TreeNode*); -static void NewVendorCallback(Widget, XtPointer, XtPointer); -static void CreateVendorSub(TreeNode*, XF86ConfVendSubPtr); -static void CreateVendorSubField(TreeNode*, Bool); -static void NewVendorSubCallback(Widget, XtPointer, XtPointer); -static void VendorSubDestroy(TreeNode*); -static void VendorSubUpdate(TreeNode*); - -static void CreateDRI(TreeNode*, XF86ConfDRIPtr); -static void CreateDRIField(TreeNode*); -static void DRIUpdate(TreeNode*); - -static void CreateBuffers(TreeNode*, XF86ConfBuffersPtr); -static void CreateBuffersField(TreeNode*, Bool); -static void BuffersDestroy(TreeNode*); -static void NewBuffersCallback(Widget, XtPointer, XtPointer); -static void BuffersUpdate(TreeNode*); - -extern void RemoveDeviceCallback(Widget, XtPointer, XtPointer); - -/* interface.c */ -extern void InitializeDevices(void); -extern void SelectLayoutCallback(Widget, XtPointer, XtPointer); -extern void UpdateMenuDeviceList(int); -extern void SetConfigModeCallback(Widget, XtPointer, XtPointer); -extern void DefaultLayoutCallback(Widget, XtPointer, XtPointer); -extern void RemoveLayoutCallback(Widget, XtPointer, XtPointer); - -/* - * Initialization - */ -static Widget shell, expert, tree, panner; -extern Widget work, optionsShell, config, layoutp, topMenu; -extern xf86cfgDevice cpu_device; -static TreeNode *mainNode, *monitorTree, *screenTree, *layoutTree; - -/* - * Implementation - */ -void -ExpertConfigureStart(void) -{ - ExpertInitialize(); - - XtPopup(shell, XtGrabExclusive); - if (optionsShell == NULL) - CreateOptionsShell(); - XtVaSetValues(optionsShell, XtNtransientFor, shell, NULL); -} - -void -ExpertConfigureEnd(void) -{ - int i, save_config_mode = config_mode; - Widget sme, layopt, layoutsme = NULL; - XF86ConfLayoutPtr lay; - - XtVaSetValues(optionsShell, XtNtransientFor, toplevel, NULL); - XtPopdown(shell); - - /* Need to do this to avoid all code elsewhere needing to update the - * "expert" widget tree - */ - UpdateConfig(mainNode); - DestroyTree(mainNode); - XtDestroyWidget(shell); - expert = NULL; - - if (save_config_mode != CONFIG_LAYOUT) - SetConfigModeCallback(topMenu, (XtPointer)CONFIG_LAYOUT, NULL); - - /* Reset everything as the "expert" interface can do almost anything - * to the configuration. - */ - for (i = 0; i < computer.num_screens; i++) { - XtDestroyWidget(computer.screens[i]->widget); - XtFree((XtPointer)computer.screens[i]); - } - XtFree((XtPointer)computer.screens); - computer.screens = NULL; - computer.num_screens = 0; - - for (i = 0; i < computer.num_devices; i++) { - XtDestroyWidget(computer.devices[i]->widget); - XtFree((XtPointer)computer.devices[i]); - } - XtFree((XtPointer)computer.devices); - computer.devices = NULL; - computer.num_devices = 0; - - for (i = 0; i < computer.num_layouts; i++) { - XtFree((XtPointer)computer.layouts[i]->position); - XtFree((XtPointer)computer.layouts[i]); - } - XtFree((XtPointer)computer.layouts); - computer.layouts = NULL; - computer.num_layouts = 0; - - for (i = 0; i < computer.num_vidmodes; i++) - XtFree((XtPointer)computer.vidmodes[i]); - XtFree((XtPointer)computer.vidmodes); - computer.vidmodes = NULL; - computer.num_vidmodes = 0; - - /* Reinitialize devices/screens */ - InitializeDevices(); - UpdateMenuDeviceList(MOUSE); - UpdateMenuDeviceList(KEYBOARD); - UpdateMenuDeviceList(CARD); - UpdateMenuDeviceList(MONITOR); - - /* Update layout menu */ - /* first entry is "New server layout" */ - for (i = 1; i < ((CompositeWidget)layoutp)->composite.num_children; i++) - XtDestroyWidget(((CompositeWidget)layoutp)->composite.children[i]); - for (i = 0; i < layoutp->core.num_popups; i++) - XtDestroyWidget(layoutp->core.popup_list[i]); - lay = XF86Config->conf_layout_lst; - while (lay != NULL) { - sme = XtVaCreateManagedWidget("sme", smeBSBObjectClass, - layoutp, - XtNlabel, lay->lay_identifier, - XtNmenuName, lay->lay_identifier, - XtNleftBitmap, menuPixmap, - NULL); - XtAddCallback(sme, XtNcallback, SelectLayoutCallback, (XtPointer)lay); - if (layoutsme == NULL) - layoutsme = sme; - layopt = XtCreatePopupShell(lay->lay_identifier, simpleMenuWidgetClass, - layoutp, NULL, 0); - sme = XtCreateManagedWidget("default", smeBSBObjectClass, - layopt, NULL, 0); - XtAddCallback(sme, XtNcallback, DefaultLayoutCallback, NULL); - sme = XtCreateManagedWidget("remove", smeBSBObjectClass, - layopt, NULL, 0); - XtAddCallback(sme, XtNcallback, RemoveLayoutCallback, NULL); - XtRealizeWidget(layopt); - - lay = (XF86ConfLayoutPtr)(lay->list.next); - } - computer.layout = NULL; - SelectLayoutCallback(layoutsme, - XF86Config->conf_layout_lst, NULL); - - - if (XF86Config->conf_flags && XF86Config->conf_flags->flg_option_lst) - SetTip(&cpu_device); - for (i = 0; i < computer.num_devices; i++) - SetTip(computer.devices[i]); - - /* Reinitialize vidmodes */ - InitializeVidmodes(); - - if (save_config_mode != CONFIG_LAYOUT) - SetConfigModeCallback(topMenu, (XtPointer)(long)save_config_mode, NULL); -} - -/*ARGSUSED*/ -void -ExpertCloseAction(Widget w, XEvent *event, String *params, Cardinal *num_params) -{ - ExpertConfigureEnd(); -} - -/*ARGSUSED*/ -void -ExpertCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - ExpertConfigureStart(); -} - -/*ARGSUSED*/ -static void -PopdownCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - ExpertConfigureEnd(); -} - -/* Files */ -static void -CreateFiles(TreeNode *files) -{ - XF86ConfFilesPtr file = XF86Config->conf_files; - TreeNode *node, *fontpath, *modulepath; - Widget w; - char *value; - - value = file->file_logfile ? file->file_logfile : ""; - node = NewNode(files, NULL, NULL, files->node, - (TreeData*)XtCalloc(1, sizeof(TreeData))); - CreateFilesField(node, "LogFile", value); - files->child = node; - files->update = UpdateFiles; - - w = XtVaCreateManagedWidget("ModulePath", toggleWidgetClass, tree, - XtNtreeParent, files->node, NULL); - node->next = modulepath = NewNode(files, w, w, files->node, NULL); - node = node->next; - CreateModulePath(modulepath, NULL); - - w = XtVaCreateManagedWidget("FontPath", toggleWidgetClass, tree, - XtNtreeParent, files->node, NULL); - node->next = fontpath = NewNode(files, w, w, files->node, NULL); - node = node->next; - CreateFontPath(fontpath, NULL); -} - -static void -CreateFilesField(TreeNode *node, char *name, char *value) -{ - Widget box, text; - - box = XtVaCreateManagedWidget(name, boxWidgetClass, tree, - XtNtreeParent, node->node, NULL); - node->node = box; - (void) XtVaCreateManagedWidget("label", labelWidgetClass, box, - XtNlabel, name, NULL); - text = XtVaCreateManagedWidget("value", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, XtNstring, value, - NULL); - node->data->files.text = text; -} - -static void -UpdateFiles(TreeNode *files) -{ - char *str; - - /* LogFile */ - files = files->child; - XtVaGetValues(files->data->files.text, XtNstring, &str, NULL); - XtFree(XF86Config->conf_files->file_logfile); - if (*str) - XF86Config->conf_files->file_logfile = XtNewString(str); - else - XF86Config->conf_files->file_logfile = NULL; -} - -/* FontPath */ -/* Don't need to set the update tree field, as it is already set - * as the destroy field */ -static void -CreateFontPath(TreeNode *fontpath, char *path) -{ - TreeNode *prev = NULL, *node; - - if (path == NULL) { - if (XF86Font_path) { - path = XtNewString(XF86Font_path); - if (XF86Config->conf_files && XF86Config->conf_files->file_fontpath) { - XtFree(XF86Config->conf_files->file_fontpath); - XF86Config->conf_files->file_fontpath = XtNewString(path); - } - } - else if (XF86Config->conf_files && XF86Config->conf_files->file_fontpath) - path = XtNewString(XF86Config->conf_files->file_fontpath); - } - else { - path = XtNewString(path); - if ((prev = fontpath->child) != NULL) - while (prev->next) - prev = prev->next; - } - - if (path) { - char *s; - - for (s = strtok(path, ","); s != NULL; s = strtok(NULL, ",")) { - node = NewNode(fontpath, NULL, NULL, fontpath->node, NULL); - node->destroy = FontPathChanged; - (void) CreateFontPathField(node, s, False); - if (fontpath->child == NULL) - fontpath->child = node; - else - prev->next = node; - prev = node; - } - XtFree(path); - } - - node = NewNode(fontpath, NULL, NULL, fontpath->node, NULL); - (void) CreateFontPathField(node, "", True); - if (fontpath->child == NULL) - fontpath->child = node; - else - prev->next = node; -} - -static Widget -CreateFontPathField(TreeNode *fontpath, char *value, Bool addnew) -{ - Widget box, command, text; - TreeData *data; - - box = XtVaCreateWidget("fontpath", formWidgetClass, tree, - XtNtreeParent, fontpath->treeParent, NULL); - fontpath->node = box; - if (!addnew) { - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, - (XtPointer)fontpath); - command = XtCreateManagedWidget("up", commandWidgetClass, box, NULL, 0); - XtAddCallback(command, XtNcallback, FontPathCallback, - (XtPointer)fontpath); - command = XtCreateManagedWidget("down", commandWidgetClass, box, NULL, 0); - XtAddCallback(command, XtNcallback, FontPathCallback, - (XtPointer)fontpath); - text = XtVaCreateManagedWidget("value", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, value, NULL); - } - else { - command = XtCreateManagedWidget("new", commandWidgetClass, box, NULL, 0); - XtAddCallback(command, XtNcallback, NewFontPathCallback, - (XtPointer)fontpath); - text = XtVaCreateManagedWidget("valueNew", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, value, NULL); - } - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->files.text = text; - fontpath->data = data; - - if (fontpath->treeParent && XtIsRealized(fontpath->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); - - return (box); -} - -static void -FontPathChanged(TreeNode *node) -{ - TreeNode *parent = node->parent; - char *fontpath = NULL, *str; - Arg args[1]; - int pos = 0, len; - - /* last node is the "new" */ - for (node = parent->child; node->next != NULL; node = node->next) { - if (pos) - fontpath[pos++] = ','; - XtSetArg(args[0], XtNstring, &str); - XtGetValues(node->data->files.text, args, 1); - len = strlen(str) + 2; - fontpath = XtRealloc(fontpath, pos + len); - strcpy(fontpath + pos, str); - pos += len - 2; - } - - if (XF86Config->conf_files->file_fontpath) - XtFree(XF86Config->conf_files->file_fontpath); - XF86Config->conf_files->file_fontpath = fontpath; -} - -static void -NewFontPathCallback(Widget unused, XtPointer user_data, XtPointer call_data) -{ - TreeNode *fontpath, *node = (TreeNode*)user_data; - Arg args[1]; - char *str; - - XtSetArg(args[0], XtNstring, &str); - XtGetValues(node->data->files.text, args, 1); - if (*str == '\0') - return; - - fontpath = node->parent; - DeleteNode(node); - CreateFontPath(fontpath, str); - - FontPathChanged(fontpath->child); - RelayoutTree(); -} - -/*ARGSUSED*/ -static void -FontPathCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node, *fontpath = (TreeNode*)user_data; - char *t1, *t2; - Widget w1, w2; - - parent = fontpath->parent; - node = parent->child; - if (!node->next->next) - return; - if (strcmp(XtName(w), "up") == 0) { - if (node == fontpath) - while (node->next->next) - node = node->next; - else - while (node && node->next != fontpath) - node = node->next; - } - else { - if (fontpath->next->next) - node = fontpath->next; - /* else is already correct */ - } - - w1 = node->data->files.text; - w2 = fontpath->data->files.text; - - XtVaGetValues(w1, XtNstring, &t1, NULL); - XtVaGetValues(w2, XtNstring, &t2, NULL); - t1 = XtNewString(t1); - XtVaSetValues(w1, XtNstring, t2, NULL); - XtVaSetValues(w2, XtNstring, t1, NULL); - XtFree(t1); -} - - -/* ModulePath */ -/* Don't need to set the update tree field, as it is already set - * as the destroy field */ -static void -CreateModulePath(TreeNode *modulepath, char *path) -{ - TreeNode *prev = NULL, *node; - - if (path == NULL) { - if (XF86Module_path) { - path = XtNewString(XF86Module_path); - if (XF86Config->conf_files && XF86Config->conf_files->file_modulepath) { - XtFree(XF86Config->conf_files->file_modulepath); - XF86Config->conf_files->file_modulepath = XtNewString(path); - } - } - else if (XF86Config->conf_files && XF86Config->conf_files->file_modulepath) - path = XtNewString(XF86Config->conf_files->file_modulepath); - } - else { - path = XtNewString(path); - if ((prev = modulepath->child) != NULL) - while (prev->next) - prev = prev->next; - } - - if (path) { - char *s; - - for (s = strtok(path, ","); s != NULL; s = strtok(NULL, ",")) { - node = NewNode(modulepath, NULL, NULL, modulepath->node, NULL); - node->destroy = ModulePathChanged; - (void) CreateModulePathField(node, s, False); - if (modulepath->child == NULL) - modulepath->child = node; - else - prev->next = node; - prev = node; - } - XtFree(path); - } - - node = NewNode(modulepath, NULL, NULL, modulepath->node, NULL); - (void) CreateModulePathField(node, "", True); - if (modulepath->child == NULL) - modulepath->child = node; - else - prev->next = node; -} - -static Widget -CreateModulePathField(TreeNode *modulepath, char *value, Bool addnew) -{ - Widget box, command, text; - TreeData *data; - - box = XtVaCreateWidget("modulepath", formWidgetClass, tree, - XtNtreeParent, modulepath->treeParent, NULL); - modulepath->node = box; - if (!addnew) { - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, - (XtPointer)modulepath); - text = XtVaCreateManagedWidget("value", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, value, NULL); - } - else { - command = XtCreateManagedWidget("new", commandWidgetClass, box, NULL, 0); - XtAddCallback(command, XtNcallback, NewModulePathCallback, - (XtPointer)modulepath); - text = XtVaCreateManagedWidget("valueNew", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, value, NULL); - } - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->files.text = text; - modulepath->data = data; - - if (modulepath->treeParent && XtIsRealized(modulepath->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); - - return (box); -} - -static void -ModulePathChanged(TreeNode *node) -{ - TreeNode *parent = node->parent; - char *modulepath = NULL, *str; - Arg args[1]; - int pos = 0, len; - - /* last node is the "new" */ - for (node = parent->child; node->next != NULL; node = node->next) { - if (pos) - modulepath[pos++] = ','; - XtSetArg(args[0], XtNstring, &str); - XtGetValues(node->data->files.text, args, 1); - len = strlen(str) + 2; - modulepath = XtRealloc(modulepath, pos + len); - strcpy(modulepath + pos, str); - pos += len - 2; - } - - if (XF86Config->conf_files->file_modulepath) - XtFree(XF86Config->conf_files->file_modulepath); - XF86Config->conf_files->file_modulepath = modulepath; -} - -static void -NewModulePathCallback(Widget unused, XtPointer user_data, XtPointer call_data) -{ - TreeNode *modulepath, *node = (TreeNode*)user_data; - Arg args[1]; - char *str; - - XtSetArg(args[0], XtNstring, &str); - XtGetValues(node->data->files.text, args, 1); - if (*str == '\0') - return; - - modulepath = node->parent; - DeleteNode(node); - CreateModulePath(modulepath, str); - - ModulePathChanged(modulepath->child); - RelayoutTree(); -} - -/* Module */ -static void -CreateModule(TreeNode *module, XF86LoadPtr load) -{ - TreeNode *prev, *node; - TreeData *data; - - if ((prev = module->child) != NULL) - while (prev->next) - prev = prev->next; - - while (load) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->module.load = load; - node = NewNode(module, NULL, NULL, module->node, data); - node->destroy = ModuleDestroy; - CreateModuleField(node, False); - if (module->child == NULL) - module->child = node; - else - prev->next = node; - prev = node; - load = (XF86LoadPtr)(load->list.next); - } - - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(module, NULL, NULL, module->node, data); - CreateModuleField(node, True); - if (module->child == NULL) - module->child = node; - else - prev->next = node; -} - -static void -CreateModuleField(TreeNode *node, Bool addnew) -{ - Widget box, command, label; - - box = XtVaCreateWidget("module", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - if (!addnew) { - XF86OptionPtr *options; - XF86LoadPtr load = node->data->module.load; - - options = &(load->load_opt); - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - command = XtCreateManagedWidget("options", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, OptionsCallback, (XtPointer)options); - label = XtVaCreateManagedWidget("label", labelWidgetClass, box, - XtNlabel, load->load_name, NULL); - } - else { - command = XtCreateManagedWidget("new", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, NewModuleCallback, (XtPointer)node); - label = XtVaCreateManagedWidget("value", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - NULL); - node->data->module.text = label; - } - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -/*ARGUSED*/ -static void -ModuleDestroy(TreeNode *node) -{ - if (node->data->module.load) - xf86removeModule(XF86Config, node->data->module.load); -} - -/*ARGSUSED*/ -static void -NewModuleCallback(Widget unused, XtPointer user_data, XtPointer call_data) -{ - TreeNode *module, *node = (TreeNode*)user_data; - XF86LoadPtr load; - Arg args[1]; - char *label; - - XtSetArg(args[0], XtNstring, &label); - XtGetValues(node->data->module.text, args, 1); - if (*label == '\0') - return; - - module = node->parent; - DeleteNode(node); - load = (XF86LoadPtr)XtCalloc(1, sizeof(XF86LoadRec)); - load->load_name = XtNewString(label); - XF86Config->conf_modules->mod_load_lst = - xf86addModule(XF86Config->conf_modules->mod_load_lst, load); - - CreateModule(module, load); - RelayoutTree(); -} - -/* Modes */ -static void -CreateModes(TreeNode *parent, XF86ConfModesPtr modes) -{ - TreeNode *node, *prev; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (modes) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->modes.modes = modes; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = ModesDestroy; - CreateModesField(node, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - - modes = (XF86ConfModesPtr)(modes->list.next); - } - - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(parent, NULL, NULL, parent->node, data); - CreateModesField(node, True); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; -} - -static void -CreateModesField(TreeNode *node, Bool addnew) -{ - Widget box, command, label; - - box = XtVaCreateWidget("modes", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - if (!addnew) { - XF86ConfModesPtr modes = node->data->modes.modes; - - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - label = XtVaCreateManagedWidget("mode", toggleWidgetClass, box, - XtNlabel, modes->modes_identifier, - XtNstate, True, - NULL); - node->toggle = label; - XtAddCallback(label, XtNcallback, ToggleCallback, (XtPointer)node); - CreateModesModeLine(node, node->data->modes.modes->mon_modeline_lst); - } - else { - command = XtCreateManagedWidget("new", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, NewModesCallback, (XtPointer)node); - label = XtVaCreateManagedWidget("value", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - NULL); - node->data->modes.text = label; - } - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -/*ARGUSED*/ -static void -ModesDestroy(TreeNode *node) -{ - if (node->data->modes.modes) { - int i; - TreeNode *mon = monitorTree->child; - - /* last one is the "new" entry */ - while (mon && mon->next) { - /* UseModes is the second entry */ - TreeNode *mod = mon->child->next->child; - CompositeWidget composite; - - while (mod && mod->next) { - TreeNode *next = mod->next; - - if (mod && strcmp(mod->data->modeslink.modeslink->ml_modes_str, - node->data->modes.modes->modes_identifier) == 0) - /* Needs to do string comparison because may be deleting - * a "test" Modes section, with no Modelines. - */ - DeleteNode(mod); - mod = next; - } - composite = (CompositeWidget)mod->data->modeslink.menu; - - for (i = 0; i < composite->composite.num_children; ++i) - if (strcmp(XtName(composite->composite.children[i]), - node->data->modes.modes->modes_identifier) == 0) - XtDestroyWidget(composite->composite.children[i]); - - mon = mon->next; - } - - xf86removeModes(XF86Config, node->data->modes.modes); - } -} - -/*ARGSUSED*/ -static void -NewModesCallback(Widget unused, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ConfModesPtr modes; - Arg args[1]; - char *label; - - XtSetArg(args[0], XtNstring, &label); - XtGetValues(node->data->modes.text, args, 1); - if (*label == '\0') - return; - - parent = node->parent; - DeleteNode(node); - modes = (XF86ConfModesPtr)XtCalloc(1, sizeof(XF86ConfModesRec)); - modes->modes_identifier = XtNewString(label); - XF86Config->conf_modes_lst = - xf86addModes(XF86Config->conf_modes_lst, modes); - - { - TreeNode *mon = monitorTree->child; - Widget sme; - - /* last one is the "new" entry */ - while (mon && mon->next) { - /* UseModes is the second entry */ - TreeNode *mod = mon->child->next->child; - - while (mod && mod->next) - mod = mod->next; - - sme = XtCreateManagedWidget(modes->modes_identifier, - smeBSBObjectClass, - mod->data->modeslink.menu, NULL, 0); - XtAddCallback(sme, XtNcallback, NewMonitorModesCallback, - (XtPointer)mod); - - mon = mon->next; - } - } - - CreateModes(parent, modes); - RelayoutTree(); -} - -static void -CreateModesModeLine(TreeNode *parent, XF86ConfModeLinePtr modeline) -{ - TreeNode *node, *prev; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (modeline) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->modeline.modeline = modeline; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = ModesModeLineDestroy; - CreateModeLineField(node, False, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - modeline = (XF86ConfModeLinePtr)(modeline->list.next); - } - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(parent, NULL, NULL, parent->node, data); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - CreateModeLineField(node, True, False); -} - -/* This function should allow creating modelines for the - Mode and Monitor section */ -static void -CreateModeLineField(TreeNode *node, Bool addnew, Bool monitor) -{ - Widget box, command; - char buf[512], tmp[32]; - - box = XtVaCreateWidget("modeline", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - if (!addnew) { - XF86ConfModeLinePtr mod = node->data->modeline.modeline; - - command = XtCreateManagedWidget("remove", commandWidgetClass, - box, NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - XtVaCreateManagedWidget("label", labelWidgetClass, box, - XtNlabel, mod->ml_identifier, NULL); - - XmuSnprintf(buf, sizeof(buf), "%g %d %d %d %d %d %d %d %d", - mod->ml_clock / 1000., mod->ml_hdisplay, mod->ml_hsyncstart, - mod->ml_hsyncend, mod->ml_htotal, mod->ml_vdisplay, - mod->ml_vsyncstart, mod->ml_vsyncend, mod->ml_vtotal); - if (mod->ml_flags & XF86CONF_INTERLACE) - strcat(buf, " interlace"); - if (mod->ml_flags & XF86CONF_PHSYNC) - strcat(buf, " +hsync"); - if (mod->ml_flags & XF86CONF_NHSYNC) - strcat(buf, " -hsync"); - if (mod->ml_flags & XF86CONF_PVSYNC) - strcat(buf, " +vsync"); - if (mod->ml_flags & XF86CONF_NVSYNC) - strcat(buf, " -vsync"); - if (mod->ml_flags & XF86CONF_CSYNC) - strcat(buf, " composite"); - if (mod->ml_flags & XF86CONF_PCSYNC) - strcat(buf, " +csync"); - if (mod->ml_flags & XF86CONF_NCSYNC) - strcat(buf, " -csync"); - if (mod->ml_flags & XF86CONF_DBLSCAN) - strcat(buf, " doublescan"); - if (mod->ml_flags & XF86CONF_BCAST) - strcat(buf, " bcast"); - if (mod->ml_flags & XF86CONF_HSKEW) { - XmuSnprintf(tmp, sizeof(tmp), " hskew %d", mod->ml_hskew); - strcat(buf, tmp); - } - if (mod->ml_flags & XF86CONF_VSCAN) { - XmuSnprintf(tmp, sizeof(tmp), " vscan %d", mod->ml_vscan); - strcat(buf, tmp); - } - if (mod->ml_flags & XF86CONF_CUSTOM) - strcat(buf, " custom"); - node->data->modeline.value = - XtVaCreateManagedWidget("modeline", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, NULL); - } - else { - *buf = '\0'; - command = XtCreateManagedWidget("new", commandWidgetClass, - box, NULL, 0); - XtAddCallback(command, XtNcallback, monitor ? - NewMonitorModeLineCallback : NewModesModeLineCallback, - (XtPointer)node); - node->data->modeline.text = - XtVaCreateManagedWidget("value", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, NULL); - node->data->modeline.value = - XtVaCreateManagedWidget("modelineNew", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, NULL); - } - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -/*ARGUSED*/ -static void -ModesModeLineDestroy(TreeNode *node) -{ - if (node->data->modeline.modeline) - xf86removeModesModeLine(node->parent->data->modes.modes, - node->data->modeline.modeline); -} - -/*ARGSUSED*/ -static void -NewModesModeLineCallback(Widget unused, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ConfModeLinePtr modeline; - Arg args[1]; - char *ident, *value; - - XtSetArg(args[0], XtNstring, &ident); - XtGetValues(node->data->modeline.text, args, 1); - XtSetArg(args[0], XtNstring, &value); - XtGetValues(node->data->modeline.value, args, 1); - if (*ident == '\0' || *value == '\0') - return; - - parent = node->parent; - DeleteNode(node); - modeline = ParseModeLine(ident, value); - parent->data->modes.modes->mon_modeline_lst = - xf86addModeLine(parent->data->modes.modes->mon_modeline_lst, modeline); - - CreateModesModeLine(parent, modeline); - RelayoutTree(); -} - -static XF86ConfModeLinePtr -ParseModeLine(char *identifier, char *modeline) -{ - XF86ConfModeLinePtr ml = (XF86ConfModeLinePtr) - XtCalloc(1, sizeof(XF86ConfModeLineRec)); - char *s, *ptr = modeline; - - /* Identifier */ - ml->ml_identifier = XtNewString(identifier); - - ml->ml_clock = (int)(strtod(ptr, &ptr) * 1000.0 + 0.5); - while (*ptr && isspace(*ptr)) ++ptr; - - ml->ml_hdisplay = strtol(ptr, &ptr, 10); - while (*ptr && isspace(*ptr)) ++ptr; - - ml->ml_hsyncstart = strtol(ptr, &ptr, 10); - while (*ptr && isspace(*ptr)) ++ptr; - - ml->ml_hsyncend = strtol(ptr, &ptr, 10); - while (*ptr && isspace(*ptr)) ++ptr; - - ml->ml_htotal = strtol(ptr, &ptr, 10); - while (*ptr && isspace(*ptr)) ++ptr; - - ml->ml_vdisplay = strtol(ptr, &ptr, 10); - while (*ptr && isspace(*ptr)) ++ptr; - - ml->ml_vsyncstart = strtol(ptr, &ptr, 10); - while (*ptr && isspace(*ptr)) ++ptr; - - ml->ml_vsyncend = strtol(ptr, &ptr, 10); - while (*ptr && isspace(*ptr)) ++ptr; - - ml->ml_vtotal = strtol(ptr, &ptr, 10); - while (*ptr && isspace(*ptr)) ++ptr; - - s = ptr; - while (*s) { - *s = tolower(*s); - ++s; - } - s = ptr; - - while (*ptr) { - while (*s && isspace(*s)) - s++; - ptr = s; - while (*s && !isspace(*s)) - s++; - - if (s != ptr) { - Bool done = *s == '\0'; - - *s = '\0'; - if (strcmp(ptr, "interlace") == 0) - ml->ml_flags |= XF86CONF_INTERLACE; - else if (strcmp(ptr, "+hsync") == 0) - ml->ml_flags |= XF86CONF_PHSYNC; - else if (strcmp(ptr, "-hsync") == 0) - ml->ml_flags |= XF86CONF_NHSYNC; - else if (strcmp(ptr, "+vsync") == 0) - ml->ml_flags |= XF86CONF_PVSYNC; - else if (strcmp(ptr, "-vsync") == 0) - ml->ml_flags |= XF86CONF_NVSYNC; - else if (strcmp(ptr, "composite") == 0) - ml->ml_flags |= XF86CONF_CSYNC; - else if (strcmp(ptr, "+csync") == 0) - ml->ml_flags |= XF86CONF_PCSYNC; - else if (strcmp(ptr, "-csync") == 0) - ml->ml_flags |= XF86CONF_NCSYNC; - else if (strcmp(ptr, "doublescan") == 0) - ml->ml_flags |= XF86CONF_DBLSCAN; - else if (strcmp(ptr, "bcast") == 0) - ml->ml_flags |= XF86CONF_BCAST; - else if (strcmp(ptr, "hskew") == 0) { - ++s; - while (*s && isspace(*s)) - ++s; - ptr = s; - while (*s && !isspace(*s)) - ++s; - if (ptr != s) { - ml->ml_hskew = strtol(ptr, &s, 10); - ml->ml_flags |= XF86CONF_HSKEW; - --s; - } - } - else if (strcmp(ptr, "vscan") == 0) { - ++s; - while (*s && isspace(*s)) - ++s; - ptr = s; - while (*s && !isspace(*s)) - ++s; - if (ptr != s) { - ml->ml_vscan = strtol(ptr, &s, 10); - ml->ml_flags |= XF86CONF_VSCAN; - --s; - } - } - else if (strcmp(ptr, "custom") == 0) - ml->ml_flags |= XF86CONF_CUSTOM; - ++s; - if (done) - break; - ptr = s; - } - } - - return (ml); -} - -/* VideoAdpator */ -static void -CreateVideoAdaptor(TreeNode *parent, XF86ConfVideoAdaptorPtr video) -{ - TreeNode *node, *prev; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (video) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->video.video = video; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = VideoAdaptorDestroy; - node->update = VideoAdaptorUpdate; - CreateVideoAdaptorField(node, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - - video = (XF86ConfVideoAdaptorPtr)(video->list.next); - } - - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(parent, NULL, NULL, parent->node, data); - CreateVideoAdaptorField(node, True); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; -} - -static void -CreateVideoAdaptorField(TreeNode *node, Bool addnew) -{ - Widget box, command, label; - - box = XtVaCreateWidget("video", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - if (!addnew) { - char *str; - TreeNode *port; - XF86ConfVideoAdaptorPtr video = node->data->video.video; - - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - command = XtCreateManagedWidget("options", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, OptionsCallback, - (XtPointer)&(video->va_option_lst)); - label = XtVaCreateManagedWidget("adaptor", labelWidgetClass, box, - XtNlabel, video->va_identifier, - NULL); - - XtCreateManagedWidget("vendorL", labelWidgetClass, box, NULL, 0); - str = video->va_vendor ? video->va_vendor : ""; - node->data->video.vendor = - XtVaCreateManagedWidget("vendor", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, - NULL); - - XtCreateManagedWidget("boardL", labelWidgetClass, box, NULL, 0); - str = video->va_board ? video->va_board : ""; - node->data->video.board = - XtVaCreateManagedWidget("board", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, - NULL); - - XtCreateManagedWidget("busidL", labelWidgetClass, box, NULL, 0); - str = video->va_busid ? video->va_busid : ""; - node->data->video.busid = - XtVaCreateManagedWidget("busid", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, - NULL); - - XtCreateManagedWidget("driverL", labelWidgetClass, box, NULL, 0); - str = video->va_driver ? video->va_driver : ""; - node->data->video.driver = - XtVaCreateManagedWidget("driver", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, - NULL); - - label = XtVaCreateManagedWidget("VideoPort", toggleWidgetClass, tree, - XtNstate, True, - XtNtreeParent, box, - NULL); - port = NewNode(node, label, label, node->node, NULL); - node->child = port; - CreateVideoPort(port, video->va_port_lst); - } - else { - command = XtCreateManagedWidget("new", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, NewVideoAdaptorCallback, - (XtPointer)node); - label = XtVaCreateManagedWidget("value", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - NULL); - node->data->video.text = label; - } - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -/*ARGUSED*/ -static void -VideoAdaptorDestroy(TreeNode *node) -{ - if (node->data->video.video) { - int i; - TreeNode *scrn = screenTree->child; - - /* last one is the "new" entry */ - while (scrn && scrn->next) { - /* VideoAdator is the first entry */ - TreeNode *ad = scrn->child->child; - CompositeWidget composite; - - while (ad && ad->next) { - TreeNode *next = ad->next; - - if (ad && strcmp(ad->data->adaptorlink.adaptorlink->al_adaptor_str, - node->data->video.video->va_identifier) == 0) - DeleteNode(ad); - ad = next; - } - composite = (CompositeWidget)ad->data->adaptorlink.menu; - - for (i = 0; i < composite->composite.num_children; ++i) - if (strcmp(XtName(composite->composite.children[i]), - node->data->video.video->va_identifier) == 0) - XtDestroyWidget(composite->composite.children[i]); - - scrn = scrn->next; - } - - xf86removeVideoAdaptor(XF86Config, node->data->video.video); - } -} - -/*ARGSUSED*/ -static void -NewVideoAdaptorCallback(Widget unused, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ConfVideoAdaptorPtr video; - Arg args[1]; - char *label; - - XtSetArg(args[0], XtNstring, &label); - XtGetValues(node->data->video.text, args, 1); - if (*label == '\0') - return; - - parent = node->parent; - DeleteNode(node); - video = (XF86ConfVideoAdaptorPtr) - XtCalloc(1, sizeof(XF86ConfVideoAdaptorRec)); - video->va_identifier = XtNewString(label); - XF86Config->conf_videoadaptor_lst = - xf86addVideoAdaptor(XF86Config->conf_videoadaptor_lst, video); - - { - TreeNode *scrn = screenTree->child; - Widget sme; - - /* last one is the "new" entry */ - while (scrn && scrn->next) { - /* VideoAdaptor is the first entry */ - TreeNode *ad = scrn->child->child; - - while (ad && ad->next) - ad = ad->next; - - sme = XtCreateManagedWidget(video->va_identifier, - smeBSBObjectClass, - ad->data->adaptorlink.menu, NULL, 0); - XtAddCallback(sme, XtNcallback, NewScreenAdaptorCallback, - (XtPointer)ad); - - scrn = scrn->next; - } - } - - CreateVideoAdaptor(parent, video); - RelayoutTree(); -} - -static void -VideoAdaptorUpdate(TreeNode *node) -{ - char *str; - - /* vendor */ - XtVaGetValues(node->data->video.vendor, XtNstring, &str, NULL); - XtFree(node->data->video.video->va_vendor); - if (*str) - node->data->video.video->va_vendor = XtNewString(str); - else - node->data->video.video->va_vendor = NULL; - - /* board */ - XtVaGetValues(node->data->video.board, XtNstring, &str, NULL); - XtFree(node->data->video.video->va_board); - if (*str) - node->data->video.video->va_board = XtNewString(str); - else - node->data->video.video->va_board = NULL; - - /* busid */ - XtVaGetValues(node->data->video.busid, XtNstring, &str, NULL); - XtFree(node->data->video.video->va_busid); - if (*str) - node->data->video.video->va_busid = XtNewString(str); - else - node->data->video.video->va_busid = NULL; - - /* driver */ - XtVaGetValues(node->data->video.driver, XtNstring, &str, NULL); - XtFree(node->data->video.video->va_driver); - if (*str) - node->data->video.video->va_driver = XtNewString(str); - else - node->data->video.video->va_driver = NULL; -} - -static void -CreateVideoPort(TreeNode *parent, XF86ConfVideoPortPtr port) -{ - TreeNode *prev, *node; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (port) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->port.port = port; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = VideoPortDestroy; - CreateVideoPortField(node, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - port = (XF86ConfVideoPortPtr)(port->list.next); - } - - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(parent, NULL, NULL, parent->node, data); - CreateVideoPortField(node, True); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; -} - -static void -CreateVideoPortField(TreeNode *node, Bool addnew) -{ - Widget box, command, label; - - box = XtVaCreateWidget("port", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - if (!addnew) { - XF86OptionPtr *options; - XF86ConfVideoPortPtr port = node->data->port.port; - - options = &(port->vp_option_lst); - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - command = XtCreateManagedWidget("options", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, OptionsCallback, (XtPointer)options); - label = XtVaCreateManagedWidget("label", labelWidgetClass, box, - XtNlabel, port->vp_identifier, NULL); - } - else { - command = XtCreateManagedWidget("new", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, NewVideoPortCallback, (XtPointer)node); - label = XtVaCreateManagedWidget("value", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - NULL); - node->data->port.text = label; - } - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -/*ARGUSED*/ -static void -VideoPortDestroy(TreeNode *node) -{ - if (node->data->port.port) - xf86removeVideoPort(node->parent->parent->data->video.video, - node->data->port.port); -} - -/*ARGSUSED*/ -static void -NewVideoPortCallback(Widget unused, XtPointer user_data, XtPointer call_data) -{ - TreeNode *video, *node = (TreeNode*)user_data; - XF86ConfVideoPortPtr port; - Arg args[1]; - char *label; - - XtSetArg(args[0], XtNstring, &label); - XtGetValues(node->data->port.text, args, 1); - if (*label == '\0') - return; - - video = node->parent->parent; - DeleteNode(node); - port = (XF86ConfVideoPortPtr)XtCalloc(1, sizeof(XF86ConfVideoPortRec)); - port->vp_identifier = XtNewString(label); - video->data->video.video->va_port_lst = - xf86addVideoPort(video->data->video.video->va_port_lst, port); - - CreateVideoPort(video, port); - RelayoutTree(); -} - -/* Monitor */ -static void -CreateMonitor(TreeNode *parent, XF86ConfMonitorPtr mon) -{ - TreeNode *prev, *node; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (mon) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->monitor.monitor = mon; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = MonitorDestroy; - node->update = MonitorUpdate; - CreateMonitorField(node, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - mon = (XF86ConfMonitorPtr)(mon->list.next); - } - - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(parent, NULL, NULL, parent->node, data); - CreateMonitorField(node, True); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; -} - -static void -CreateMonitorField(TreeNode *node, Bool addnew) -{ - Widget box, command, label; - - box = XtVaCreateWidget("monitor", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - if (!addnew) { - char *str, buf[256]; - XF86OptionPtr *options; - XF86ConfMonitorPtr mon = node->data->monitor.monitor; - Widget useModes; - TreeNode *modeline, *modes, *prev; - - options = &(mon->mon_option_lst); - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - command = XtCreateManagedWidget("options", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, OptionsCallback, (XtPointer)options); - label = XtVaCreateManagedWidget("label", labelWidgetClass, box, - XtNlabel, mon->mon_identifier, NULL); - - XtCreateManagedWidget("vendorL", labelWidgetClass, box, NULL, 0); - str = mon->mon_vendor ? mon->mon_vendor : ""; - node->data->monitor.vendor = - XtVaCreateManagedWidget("vendor", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, - NULL); - - XtCreateManagedWidget("modelnameL", labelWidgetClass, box, NULL, 0); - str = mon->mon_modelname ? mon->mon_modelname : ""; - node->data->monitor.model = - XtVaCreateManagedWidget("modelname", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, - NULL); - - XtCreateManagedWidget("widthL", labelWidgetClass, box, NULL, 0); - if (mon->mon_width) - XmuSnprintf(buf, sizeof(buf), "%d", mon->mon_width); - else - *buf = '\0'; - node->data->monitor.width = - XtVaCreateManagedWidget("width", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("heightL", labelWidgetClass, box, NULL, 0); - if (mon->mon_height) - XmuSnprintf(buf, sizeof(buf), "%d", mon->mon_height); - else - *buf = '\0'; - node->data->monitor.height = - XtVaCreateManagedWidget("height", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("hsyncL", labelWidgetClass, box, NULL, 0); - if (mon->mon_n_hsync > 0) - parser_range_to_string(buf, &(mon->mon_hsync[0]), - mon->mon_n_hsync); - else - *buf = '\0'; - node->data->monitor.hsync = - XtVaCreateManagedWidget("hsync", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("vrefreshL", labelWidgetClass, box, NULL, 0); - if (mon->mon_n_vrefresh > 0) - parser_range_to_string(buf, &(mon->mon_vrefresh[0]), - mon->mon_n_vrefresh); - else - *buf = '\0'; - node->data->monitor.vrefresh = - XtVaCreateManagedWidget("vrefresh", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("gammaRedL", labelWidgetClass, box, NULL, 0); - if (mon->mon_gamma_red) - XmuSnprintf(buf, sizeof(buf), "%g", mon->mon_gamma_red); - else - *buf = '\0'; - node->data->monitor.gammaRed = - XtVaCreateManagedWidget("gammaRed", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("gammaGreenL", labelWidgetClass, box, NULL, 0); - if (mon->mon_gamma_green) - XmuSnprintf(buf, sizeof(buf), "%g", mon->mon_gamma_green); - else - *buf = '\0'; - node->data->monitor.gammaGreen = - XtVaCreateManagedWidget("gammaGreen", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("gammaBlueL", labelWidgetClass, box, NULL, 0); - if (mon->mon_gamma_blue) - XmuSnprintf(buf, sizeof(buf), "%g", mon->mon_gamma_blue); - else - *buf = '\0'; - node->data->monitor.gammaBlue = - XtVaCreateManagedWidget("gammaBlue", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - if ((prev = node->child) != NULL) - while (prev->next) - prev = prev->next; - command = XtVaCreateManagedWidget("ModeLine", toggleWidgetClass, tree, - XtNstate, True, - XtNtreeParent, box, NULL); - modeline = NewNode(node, command, command, node->node, NULL); - CreateMonitorModeLine(modeline, - node->data->monitor.monitor->mon_modeline_lst); - if (prev == NULL) - prev = node->child = modeline; - else { - prev->next = modeline; - prev = prev->next; - } - - useModes = XtVaCreateManagedWidget("UseModes", toggleWidgetClass, tree, - XtNstate, True, - XtNtreeParent, box, NULL); - prev->next = modes = NewNode(node, useModes, useModes, node->node, NULL); - CreateMonitorModes(modes, - node->data->monitor.monitor->mon_modes_sect_lst); - } - else { - command = XtCreateManagedWidget("new", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, NewMonitorCallback, (XtPointer)node); - label = XtVaCreateManagedWidget("value", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - NULL); - node->data->monitor.text = label; - } - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -static void -MonitorDestroy(TreeNode *node) -{ - int i; - TreeNode *sc = screenTree; - - for (i = 0; i < computer.num_devices; i++) - if ((XF86ConfMonitorPtr)(computer.devices[i]->config) == - node->data->monitor.monitor) { - config = computer.devices[i]->widget; - RemoveDeviceCallback(NULL, NULL, NULL); - } - - if (sc) { - TreeNode *prev; - - sc = prev = sc->child; - while (sc->next) { - TreeNode *next = sc->next; - - if (sc->data->screen.screen->scrn_monitor == - node->data->monitor.monitor) { - XtDestroyWidget(sc->node); - - if (sc->child) - DestroyTree(sc->child); - if (sc->data) - XtFree((XtPointer)sc->data); - XtFree((XtPointer)sc); - - if (sc == screenTree->child) - sc = prev = next = screenTree->child = next; - else - prev->next = sc = next; - continue; - } - prev = sc; - sc = next; - } - } -} - -static void -NewMonitorCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ConfMonitorPtr mon; - Arg args[1]; - char *label; - - XtSetArg(args[0], XtNstring, &label); - XtGetValues(node->data->monitor.text, args, 1); - if (*label == '\0') - return; - - parent = node->parent; - DeleteNode(node); - mon = (XF86ConfMonitorPtr)XtCalloc(1, sizeof(XF86ConfMonitorRec)); - mon->mon_identifier = XtNewString(label); - XF86Config->conf_monitor_lst = - xf86addMonitor(XF86Config->conf_monitor_lst, mon); - - CreateMonitor(parent, mon); - - RelayoutTree(); -} - -static void -MonitorUpdate(TreeNode *node) -{ - char *str; - - /* vendor */ - XtVaGetValues(node->data->monitor.vendor, XtNstring, &str, NULL); - XtFree(node->data->monitor.monitor->mon_vendor); - if (*str) - node->data->monitor.monitor->mon_vendor = XtNewString(str); - else - node->data->monitor.monitor->mon_vendor = NULL; - - /* model */ - XtVaGetValues(node->data->monitor.model, XtNstring, &str, NULL); - XtFree(node->data->monitor.monitor->mon_modelname); - if (*str) - node->data->monitor.monitor->mon_modelname = XtNewString(str); - else - node->data->monitor.monitor->mon_modelname = NULL; - - /* width */ - XtVaGetValues(node->data->monitor.width, XtNstring, &str, NULL); - node->data->monitor.monitor->mon_width = strtoul(str, NULL, 0); - - /* height */ - XtVaGetValues(node->data->monitor.height, XtNstring, &str, NULL); - node->data->monitor.monitor->mon_height = strtoul(str, NULL, 0); - - /* hsync */ - XtVaGetValues(node->data->monitor.hsync, XtNstring, &str, NULL); - node->data->monitor.monitor->mon_n_hsync = - string_to_parser_range(str, - &(node->data->monitor.monitor->mon_hsync[0]), - CONF_MAX_HSYNC); - - /* vrefresh */ - XtVaGetValues(node->data->monitor.vrefresh, XtNstring, &str, NULL); - node->data->monitor.monitor->mon_n_vrefresh = - string_to_parser_range(str, - &(node->data->monitor.monitor->mon_vrefresh[0]), - CONF_MAX_VREFRESH); - - /* gammaRed */ - XtVaGetValues(node->data->monitor.gammaRed, XtNstring, &str, NULL); - node->data->monitor.monitor->mon_gamma_red = strtod(str, NULL); - - /* gammaGreen */ - XtVaGetValues(node->data->monitor.gammaGreen, XtNstring, &str, NULL); - node->data->monitor.monitor->mon_gamma_green = strtod(str, NULL); - - /* gammaBlue */ - XtVaGetValues(node->data->monitor.gammaBlue, XtNstring, &str, NULL); - node->data->monitor.monitor->mon_gamma_blue = strtod(str, NULL); -} - -static void -CreateMonitorModeLine(TreeNode *parent, XF86ConfModeLinePtr modeline) -{ - TreeNode *node, *prev; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (modeline) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->modeline.modeline = modeline; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = MonitorModeLineDestroy; - CreateModeLineField(node, False, True); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - modeline = (XF86ConfModeLinePtr)(modeline->list.next); - } - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(parent, NULL, NULL, parent->node, data); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - CreateModeLineField(node, True, True); -} - -/*ARGUSED*/ -static void -MonitorModeLineDestroy(TreeNode *node) -{ - if (node->data->modeline.modeline) - xf86removeMonitorModeLine(node->parent->parent->data->monitor.monitor, - node->data->modeline.modeline); -} - -/*ARGSUSED*/ -static void -NewMonitorModeLineCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ConfModeLinePtr modeline; - Arg args[1]; - char *ident, *value; - - XtSetArg(args[0], XtNstring, &ident); - XtGetValues(node->data->modeline.text, args, 1); - XtSetArg(args[0], XtNstring, &value); - XtGetValues(node->data->modeline.value, args, 1); - if (*ident == '\0' || *value == '\0') - return; - - parent = node->parent; - DeleteNode(node); - modeline = ParseModeLine(ident, value); - parent->parent->data->monitor.monitor->mon_modeline_lst = - xf86addModeLine(parent->parent->data->monitor.monitor->mon_modeline_lst, - modeline); - - CreateMonitorModeLine(parent, modeline); - RelayoutTree(); -} - -static void -CreateMonitorModes(TreeNode *parent, XF86ConfModesLinkPtr lnk) -{ - TreeNode *node, *prev; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (lnk) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->modeslink.modeslink = lnk; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = MonitorModesLinkDestroy; - CreateMonitorModesField(node, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - lnk = (XF86ConfModesLinkPtr)(lnk->list.next); - } - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(parent, NULL, NULL, parent->node, data); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - CreateMonitorModesField(node, True); -} - -static void -CreateMonitorModesField(TreeNode *node, Bool addnew) -{ - Widget box, command; - - box = XtVaCreateWidget("modes", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - if (!addnew) { - XF86ConfModesLinkPtr lnk = node->data->modeslink.modeslink; - - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - (void) XtVaCreateManagedWidget("mode", labelWidgetClass, box, - XtNlabel, lnk->ml_modes_str, NULL); - } - else { - Widget sme; - XF86ConfModesPtr ptr = XF86Config->conf_modes_lst; - - command = XtVaCreateManagedWidget("new", menuButtonWidgetClass, box, - XtNmenuName, "modesMenu", NULL); - node->data->modeslink.menu = - XtVaCreatePopupShell("modesMenu", simpleMenuWidgetClass, box, - XtNleftMargin, 1, XtNrightMargin, 1, - XtNtopMargin, 1, XtNbottomMargin, 1, - NULL); - while (ptr) { - sme = XtCreateManagedWidget(ptr->modes_identifier, smeBSBObjectClass, - node->data->modeslink.menu, NULL, 0); - XtAddCallback(sme, XtNcallback, NewMonitorModesCallback, - (XtPointer)node); - ptr = (XF86ConfModesPtr)(ptr->list.next); - } - } - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -/*ARGUSED*/ -static void -MonitorModesLinkDestroy(TreeNode *node) -{ - if (node->data->modeslink.modeslink) - xf86removeMonitorModesLink(node->parent->parent->data->monitor.monitor, - node->data->modeslink.modeslink); -} - -/*ARGSUSED*/ -static void -NewMonitorModesCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ConfModesLinkPtr link; - char *ident = XtName(w); - - parent = node->parent; - DeleteNode(node); - link = (XF86ConfModesLinkPtr)XtCalloc(1, sizeof(XF86ConfModesLinkRec)); - link->ml_modes_str = XtNewString(ident); - parent->parent->data->monitor.monitor->mon_modes_sect_lst = - xf86addModesLink(parent->parent->data->monitor.monitor->mon_modes_sect_lst, - link); - - CreateMonitorModes(parent, link); - RelayoutTree(); -} - -/* Device */ -static void -CreateDevice(TreeNode *parent, XF86ConfDevicePtr dev) -{ - TreeNode *prev, *node; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (dev) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->device.device = dev; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = DeviceDestroy; - node->update = DeviceUpdate; - CreateDeviceField(node, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - dev = (XF86ConfDevicePtr)(dev->list.next); - } - - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(parent, NULL, NULL, parent->node, data); - CreateDeviceField(node, True); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; -} - -static void -CreateDeviceField(TreeNode *node, Bool addnew) -{ - Widget box, command, label; - - box = XtVaCreateWidget("device", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - if (!addnew) { - int i, tmp, len; - char buf[1024], *str; - XF86OptionPtr *options; - XF86ConfDevicePtr dev = node->data->device.device; - - options = &(dev->dev_option_lst); - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - command = XtCreateManagedWidget("options", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, OptionsCallback, (XtPointer)options); - label = XtVaCreateManagedWidget("label", labelWidgetClass, box, - XtNlabel, dev->dev_identifier, NULL); - - XtCreateManagedWidget("vendorL", labelWidgetClass, box, NULL, 0); - str = dev->dev_vendor ? dev->dev_vendor : ""; - node->data->device.vendor = - XtVaCreateManagedWidget("vendor", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, - NULL); - - XtCreateManagedWidget("boardL", labelWidgetClass, box, NULL, 0); - str = dev->dev_board ? dev->dev_board : ""; - node->data->device.board = - XtVaCreateManagedWidget("board", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, - NULL); - - XtCreateManagedWidget("chipsetL", labelWidgetClass, box, NULL, 0); - str = dev->dev_chipset ? dev->dev_chipset : ""; - node->data->device.chipset = - XtVaCreateManagedWidget("chipset", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, - NULL); - - XtCreateManagedWidget("busidL", labelWidgetClass, box, NULL, 0); - str = dev->dev_busid ? dev->dev_busid : ""; - node->data->device.busid = - XtVaCreateManagedWidget("busid", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, - NULL); - - XtCreateManagedWidget("cardL", labelWidgetClass, box, NULL, 0); - str = dev->dev_card ? dev->dev_card : ""; - node->data->device.card = - XtVaCreateManagedWidget("card", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, - NULL); - - XtCreateManagedWidget("driverL", labelWidgetClass, box, NULL, 0); - str = dev->dev_driver ? dev->dev_driver : ""; - node->data->device.driver = - XtVaCreateManagedWidget("driver", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, - NULL); - - XtCreateManagedWidget("ramdacL", labelWidgetClass, box, NULL, 0); - str = dev->dev_ramdac ? dev->dev_ramdac : ""; - node->data->device.ramdac = - XtVaCreateManagedWidget("ramdac", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, - NULL); - - XtCreateManagedWidget("dacSpeedL", labelWidgetClass, box, NULL, 0); - if (dev->dev_dacSpeeds[0] > 0) { - for (i = len = 0; i < CONF_MAXDACSPEEDS && - dev->dev_dacSpeeds[i] > 0; i++) { - tmp = XmuSnprintf(buf + len, sizeof(buf) - len, "%g ", - dev->dev_dacSpeeds[i] / 1000.); - len += tmp; - } - } - else - *buf = '\0'; - node->data->device.dacSpeed = - XtVaCreateManagedWidget("dacSpeed", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("videoRamL", labelWidgetClass, box, NULL, 0); - if (dev->dev_videoram) - XmuSnprintf(buf, sizeof(buf), "%d", dev->dev_videoram); - else - *buf = '\0'; - node->data->device.videoRam = - XtVaCreateManagedWidget("videoRam", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("textClockFreqL", labelWidgetClass, box, NULL, 0); - if (dev->dev_textclockfreq) - XmuSnprintf(buf, sizeof(buf), "%.1f", - (double)dev->dev_textclockfreq / 1000.0); - else - *buf = '\0'; - node->data->device.textClockFreq = - XtVaCreateManagedWidget("textClockFreq", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("biosBaseL", labelWidgetClass, box, NULL, 0); - if (dev->dev_bios_base) - XmuSnprintf(buf, sizeof(buf), "0x%lx", dev->dev_bios_base); - else - *buf = '\0'; - node->data->device.biosBase = - XtVaCreateManagedWidget("biosBase", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("memBaseL", labelWidgetClass, box, NULL, 0); - if (dev->dev_mem_base) - XmuSnprintf(buf, sizeof(buf), "0x%lx", dev->dev_mem_base); - else - *buf = '\0'; - node->data->device.memBase = - XtVaCreateManagedWidget("memBase", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("ioBaseL", labelWidgetClass, box, NULL, 0); - if (dev->dev_io_base) - XmuSnprintf(buf, sizeof(buf), "0x%lx", dev->dev_io_base); - else - *buf = '\0'; - node->data->device.ioBase = - XtVaCreateManagedWidget("ioBase", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("clockChipL", labelWidgetClass, box, NULL, 0); - str = dev->dev_clockchip ? dev->dev_clockchip : ""; - node->data->device.clockChip = - XtVaCreateManagedWidget("clockChip", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, - NULL); - - *buf = '\0'; - for (i = len = 0; i < dev->dev_clocks; i++) { - tmp = XmuSnprintf(buf + len, sizeof(buf) - len, "%.1f ", - (double)dev->dev_clock[i] / 1000.0); - len += tmp; - } - XtCreateManagedWidget("devClockL", labelWidgetClass, box, NULL, 0); - node->data->device.devClock = - XtVaCreateManagedWidget("devClock", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("chipIdL", labelWidgetClass, box, NULL, 0); - if (dev->dev_chipid != -1) - XmuSnprintf(buf, sizeof(buf), "0x%x", dev->dev_chipid); - else - *buf = '\0'; - node->data->device.chipId = - XtVaCreateManagedWidget("chipId", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("chipRevL", labelWidgetClass, box, NULL, 0); - if (dev->dev_chiprev != -1) - XmuSnprintf(buf, sizeof(buf), "0x%x", dev->dev_chiprev); - else - *buf = '\0'; - node->data->device.chipRev = - XtVaCreateManagedWidget("chipRev", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("irqL", labelWidgetClass, box, NULL, 0); - if (dev->dev_irq != -1) - XmuSnprintf(buf, sizeof(buf), "%d", dev->dev_irq); - else - *buf = '\0'; - node->data->device.irq = - XtVaCreateManagedWidget("irq", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("screenL", labelWidgetClass, box, NULL, 0); - if (dev->dev_screen > 0) - XmuSnprintf(buf, sizeof(buf), "%d", dev->dev_screen); - else - *buf = '\0'; - node->data->device.screen = - XtVaCreateManagedWidget("screen", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - } - else { - command = XtCreateManagedWidget("new", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, NewDeviceCallback, (XtPointer)node); - label = XtVaCreateManagedWidget("value", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - NULL); - node->data->device.text = label; - } - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -static void -NewDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ConfDevicePtr dev; - Arg args[1]; - char *label; - - XtSetArg(args[0], XtNstring, &label); - XtGetValues(node->data->device.text, args, 1); - if (*label == '\0') - return; - - parent = node->parent; - DeleteNode(node); - dev = (XF86ConfDevicePtr)XtCalloc(1, sizeof(XF86ConfDeviceRec)); - dev->dev_identifier = XtNewString(label); - dev->dev_chipid = -1; - dev->dev_chiprev = -1; - dev->dev_irq = -1; - - XF86Config->conf_device_lst = - xf86addDevice(XF86Config->conf_device_lst, dev); - - CreateDevice(parent, dev); - - RelayoutTree(); -} - -static void -DeviceDestroy(TreeNode *node) -{ - int i; - TreeNode *sc = screenTree; - - for (i = 0; i < computer.num_devices; i++) - if ((XF86ConfDevicePtr)(computer.devices[i]->config) == - node->data->device.device) { - config = computer.devices[i]->widget; - RemoveDeviceCallback(NULL, NULL, NULL); - } - - if (sc) { - TreeNode *prev; - - sc = prev = sc->child; - while (sc->next) { - TreeNode *next = sc->next; - - if (sc->data->screen.screen->scrn_monitor == - node->data->monitor.monitor) { - XtDestroyWidget(sc->node); - - if (sc->child) - DestroyTree(sc->child); - if (sc->data) - XtFree((XtPointer)sc->data); - XtFree((XtPointer)sc); - - if (sc == screenTree->child) - sc = prev = next = screenTree->child = next; - else - prev->next = sc = next; - continue; - } - prev = sc; - sc = next; - } - } -} - -static void -DeviceUpdate(TreeNode *node) -{ - int i; - char *str, *tmp; - - /* vendor */ - XtVaGetValues(node->data->device.vendor, XtNstring, &str, NULL); - XtFree(node->data->device.device->dev_vendor); - if (*str) - node->data->device.device->dev_vendor = XtNewString(str); - else - node->data->device.device->dev_vendor = NULL; - - /* board */ - XtVaGetValues(node->data->device.board, XtNstring, &str, NULL); - XtFree(node->data->device.device->dev_board); - if (*str) - node->data->device.device->dev_board = XtNewString(str); - else - node->data->device.device->dev_board = NULL; - - /* chipset */ - XtVaGetValues(node->data->device.chipset, XtNstring, &str, NULL); - XtFree(node->data->device.device->dev_chipset); - if (*str) - node->data->device.device->dev_chipset = XtNewString(str); - else - node->data->device.device->dev_chipset = NULL; - - /* busid */ - XtVaGetValues(node->data->device.busid, XtNstring, &str, NULL); - XtFree(node->data->device.device->dev_busid); - if (*str) - node->data->device.device->dev_busid = XtNewString(str); - else - node->data->device.device->dev_busid = NULL; - - /* card */ - XtVaGetValues(node->data->device.card, XtNstring, &str, NULL); - XtFree(node->data->device.device->dev_card); - if (*str) - node->data->device.device->dev_card = XtNewString(str); - else - node->data->device.device->dev_card = NULL; - - /* driver */ - XtVaGetValues(node->data->device.driver, XtNstring, &str, NULL); - XtFree(node->data->device.device->dev_driver); - if (*str) - node->data->device.device->dev_driver = XtNewString(str); - else - node->data->device.device->dev_driver = NULL; - - /* ramdac */ - XtVaGetValues(node->data->device.ramdac, XtNstring, &str, NULL); - XtFree(node->data->device.device->dev_ramdac); - if (*str) - node->data->device.device->dev_ramdac = XtNewString(str); - else - node->data->device.device->dev_ramdac = NULL; - - /* dacSpeed */ - tmp = NULL; - XtVaGetValues(node->data->device.dacSpeed, XtNstring, &str, NULL); - for (i = 0; i < CONF_MAXDACSPEEDS && str != tmp; i++) { - if ((node->data->device.device->dev_dacSpeeds[i] = - (strtod(str, &tmp) * 1000. + .5)) == 0) - break; - str = tmp; - while (isspace(*str)) - ++str; - } - - /* videoRam */ - XtVaGetValues(node->data->device.videoRam, XtNstring, &str, NULL); - node->data->device.device->dev_videoram = strtoul(str, NULL, 0); - - /* textClockFreq */ - XtVaGetValues(node->data->device.textClockFreq, XtNstring, &str, NULL); - node->data->device.device->dev_textclockfreq = - strtod(str, NULL) * 1000. + .5; - - /* biosBase */ - XtVaGetValues(node->data->device.biosBase, XtNstring, &str, NULL); - node->data->device.device->dev_bios_base = strtoul(str, NULL, 0); - - /* memBase */ - XtVaGetValues(node->data->device.memBase, XtNstring, &str, NULL); - node->data->device.device->dev_mem_base = strtoul(str, NULL, 0); - - /* ioBase */ - XtVaGetValues(node->data->device.ioBase, XtNstring, &str, NULL); - node->data->device.device->dev_io_base = strtoul(str, NULL, 0); - - /* clockChip */ - XtVaGetValues(node->data->device.clockChip, XtNstring, &str, NULL); - XtFree(node->data->device.device->dev_clockchip); - if (*str) - node->data->device.device->dev_clockchip = XtNewString(str); - else - node->data->device.device->dev_clockchip = NULL; - - /* devSpeed */ - tmp = NULL; - XtVaGetValues(node->data->device.devClock, XtNstring, &str, NULL); - for (i = 0; i < CONF_MAXCLOCKS && str != tmp; i++) { - if ((node->data->device.device->dev_clock[i] = - (strtod(str, &tmp) * 1000. + .5)) == 0) - break; - str = tmp; - while (isspace(*str)) - ++str; - } - node->data->device.device->dev_clocks = i; - - /* chipId */ - XtVaGetValues(node->data->device.chipId, XtNstring, &str, NULL); - if (*str) - node->data->device.device->dev_chipid = strtoul(str, NULL, 0); - else - node->data->device.device->dev_chipid = -1; - - /* chipRev */ - XtVaGetValues(node->data->device.chipRev, XtNstring, &str, NULL); - if (*str) - node->data->device.device->dev_chiprev = strtoul(str, NULL, 0); - else - node->data->device.device->dev_chiprev = -1; - - /* irq */ - XtVaGetValues(node->data->device.irq, XtNstring, &str, NULL); - if (*str) - node->data->device.device->dev_irq = strtoul(str, NULL, 0); - else - node->data->device.device->dev_irq = -1; - - /* screen */ - XtVaGetValues(node->data->device.screen, XtNstring, &str, NULL); - if (*str) - node->data->device.device->dev_screen = strtoul(str, NULL, 0); - else - node->data->device.device->dev_screen = -1; -} - -/* Screen */ -static void -CreateScreen(TreeNode *parent, XF86ConfScreenPtr scrn) -{ - TreeNode *prev, *node; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (scrn) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->screen.screen = scrn; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = ScreenDestroy; - node->update = ScreenUpdate; - CreateScreenField(node, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - scrn = (XF86ConfScreenPtr)(scrn->list.next); - } - - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(parent, NULL, NULL, parent->node, data); - CreateScreenField(node, True); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; -} - -static void -CreateScreenField(TreeNode *node, Bool addnew) -{ - Widget box, command, label; - - box = XtVaCreateWidget("screen", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - if (!addnew) { - char buf[256], *str; - XF86OptionPtr *options; - TreeNode *adaptor, *display; - XF86ConfScreenPtr scrn = node->data->screen.screen; - - options = &(scrn->scrn_option_lst); - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - command = XtCreateManagedWidget("options", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, OptionsCallback, (XtPointer)options); - label = XtVaCreateManagedWidget("label", labelWidgetClass, box, - XtNlabel, scrn->scrn_identifier, NULL); - - XtCreateManagedWidget("defaultDepthL", labelWidgetClass, box, NULL, 0); - if (scrn->scrn_defaultdepth) - XmuSnprintf(buf, sizeof(buf), "%d", scrn->scrn_defaultdepth); - else - *buf = '\0'; - node->data->screen.defaultDepth = - XtVaCreateManagedWidget("defaultDepth", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("defaultBppL", labelWidgetClass, box, NULL, 0); - if (scrn->scrn_defaultbpp) - XmuSnprintf(buf, sizeof(buf), "%d", scrn->scrn_defaultbpp); - else - *buf = '\0'; - node->data->screen.defaultBpp = - XtVaCreateManagedWidget("defaultBpp", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("defaultFbBppL", labelWidgetClass, box, NULL, 0); - if (scrn->scrn_defaultfbbpp) - XmuSnprintf(buf, sizeof(buf), "%d", scrn->scrn_defaultfbbpp); - else - *buf = '\0'; - node->data->screen.defaultFbBpp = - XtVaCreateManagedWidget("defaultFbBpp", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, - NULL); - - XtCreateManagedWidget("monitorL", labelWidgetClass, box, NULL, 0); - str = scrn->scrn_monitor_str ? scrn->scrn_monitor_str : ""; - node->data->screen.monitor = - XtVaCreateManagedWidget("monitor", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, - NULL); - - XtCreateManagedWidget("deviceL", labelWidgetClass, box, NULL, 0); - str = scrn->scrn_device_str ? scrn->scrn_device_str : ""; - node->data->screen.device = - XtVaCreateManagedWidget("device", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, - NULL); - - command = XtVaCreateManagedWidget("videoAdaptor", toggleWidgetClass, - tree, XtNstate, True, - XtNtreeParent, box, NULL); - adaptor = NewNode(node, command, command, node->node, NULL); - CreateScreenAdaptor(adaptor, scrn->scrn_adaptor_lst); - node->child = adaptor; - - command = XtVaCreateManagedWidget("Display", toggleWidgetClass, - tree, XtNstate, True, - XtNtreeParent, box, NULL); - display = NewNode(node, command, command, node->node, NULL); - CreateScreenDisplay(display, scrn->scrn_display_lst); - adaptor->next = display; - } - else { - command = XtCreateManagedWidget("new", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, NewScreenCallback, (XtPointer)node); - label = XtVaCreateManagedWidget("value", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - NULL); - node->data->screen.text = label; - } - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -static void -NewScreenCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ConfScreenPtr scrn; - Arg args[1]; - char *label; - - XtSetArg(args[0], XtNstring, &label); - XtGetValues(node->data->screen.text, args, 1); - if (*label == '\0') - return; - - parent = node->parent; - DeleteNode(node); - scrn = (XF86ConfScreenPtr)XtCalloc(1, sizeof(XF86ConfScreenRec)); - scrn->scrn_identifier = XtNewString(label); - XF86Config->conf_screen_lst = - xf86addScreen(XF86Config->conf_screen_lst, scrn); - - { - TreeNode *lay = layoutTree->child; - Widget sme; - - /* last one is the "new" entry */ - while (lay && lay->next != NULL) { - /* Adjacency is the first entry */ - TreeNode *adj = lay->child->child; - - while (adj != NULL) { - sme = XtCreateManagedWidget(label, smeBSBObjectClass, - adj->data->adjacency.menu, NULL, 0); - XtAddCallback(sme, XtNcallback, adj->next != NULL ? - AdjacencyMenuCallback : NewAdjacencyCallback, - (XtPointer)adj); - adj = adj->next; - } - lay = lay->next; - } - } - - CreateScreen(parent, scrn); - - RelayoutTree(); -} - -static void -ScreenDestroy(TreeNode *node) -{ - if (node->data->screen.screen) { - int i; - TreeNode *lay = layoutTree->child; - - /* last one is the "new" entry */ - while (lay && lay->next) { - /* Adjacency is the first entry */ - TreeNode *adj = lay->child->child; - CompositeWidget composite; - - while (adj) { - TreeNode *next = adj->next; - - composite = (CompositeWidget)adj->data->adjacency.menu; - - for (i = 0; i < composite->composite.num_children; ++i) - if (strcmp(XtName(composite->composite.children[i]), - node->data->screen.screen->scrn_identifier) == 0) { - XtDestroyWidget(composite->composite.children[i]); - break; - } - - if (adj->data->adjacency.screen == node->data->screen.screen) - DeleteNode(adj); - - adj = next; - } - - lay = lay->next; - } - - for (i = 0; i < computer.num_screens; i++) - if (computer.screens[i]->screen == node->data->screen.screen) { - config = computer.screens[i]->widget; - RemoveDeviceCallback(NULL, NULL, NULL); - } - - /* for the case of screens added and removed in the expert dialog */ - xf86removeScreen(XF86Config, node->data->screen.screen); - } -} - -static void -ScreenUpdate(TreeNode *node) -{ - char *str; - - /* defautDepth */ - XtVaGetValues(node->data->screen.defaultDepth, XtNstring, &str, NULL); - node->data->screen.screen->scrn_defaultdepth = strtoul(str, NULL, 0); - - /* defautBpp */ - XtVaGetValues(node->data->screen.defaultBpp, XtNstring, &str, NULL); - node->data->screen.screen->scrn_defaultbpp = strtoul(str, NULL, 0); - - /* defautFbBpp */ - XtVaGetValues(node->data->screen.defaultFbBpp, XtNstring, &str, NULL); - node->data->screen.screen->scrn_defaultfbbpp = strtoul(str, NULL, 0); - - - /* XXX Monitor and Device should be changed to a menu interface */ - /* monitor */ - XtVaGetValues(node->data->screen.monitor, XtNstring, &str, NULL); - XtFree(node->data->screen.screen->scrn_monitor_str); - if (*str) - node->data->screen.screen->scrn_monitor_str = XtNewString(str); - else - node->data->screen.screen->scrn_monitor_str = NULL; - - /* XXX Monitor and Device should be changed to a menu interface */ - /* device */ - XtVaGetValues(node->data->screen.device, XtNstring, &str, NULL); - XtFree(node->data->screen.screen->scrn_device_str); - if (*str) - node->data->screen.screen->scrn_device_str = XtNewString(str); - else - node->data->screen.screen->scrn_device_str = NULL; -} - -static void -CreateScreenAdaptor(TreeNode *parent, XF86ConfAdaptorLinkPtr lnk) -{ - TreeNode *node, *prev; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (lnk) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->adaptorlink.adaptorlink = lnk; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = ScreenAdaptorDestroy; - CreateScreenAdaptorField(node, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - lnk = (XF86ConfAdaptorLinkPtr)(lnk->list.next); - } - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(parent, NULL, NULL, parent->node, data); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - CreateScreenAdaptorField(node, True); -} - -static void -CreateScreenAdaptorField(TreeNode *node, Bool addnew) -{ - Widget box, command; - - box = XtVaCreateWidget("adaptor", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - if (!addnew) { - XF86ConfAdaptorLinkPtr lnk = node->data->adaptorlink.adaptorlink; - - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - (void) XtVaCreateManagedWidget("label", labelWidgetClass, box, - XtNlabel, lnk->al_adaptor_str, NULL); - } - else { - Widget sme; - XF86ConfVideoAdaptorPtr ptr = XF86Config->conf_videoadaptor_lst; - - command = XtVaCreateManagedWidget("new", menuButtonWidgetClass, box, - XtNmenuName, "adaptorMenu", NULL); - node->data->adaptorlink.menu = - XtVaCreatePopupShell("adaptorMenu", simpleMenuWidgetClass, box, - XtNleftMargin, 1, XtNrightMargin, 1, - XtNtopMargin, 1, XtNbottomMargin, 1, - NULL); - while (ptr) { - sme = XtCreateManagedWidget(ptr->va_identifier, smeBSBObjectClass, - node->data->adaptorlink.menu, NULL, 0); - XtAddCallback(sme, XtNcallback, NewScreenAdaptorCallback, - (XtPointer)node); - ptr = (XF86ConfVideoAdaptorPtr)(ptr->list.next); - } - } - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -/*ARGSUSED*/ -static void -NewScreenAdaptorCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ConfAdaptorLinkPtr link; - char *ident = XtName(w); - - parent = node->parent; - DeleteNode(node); - link = (XF86ConfAdaptorLinkPtr)XtCalloc(1, sizeof(XF86ConfAdaptorLinkRec)); - link->al_adaptor_str = XtNewString(ident); - parent->parent->data->screen.screen->scrn_adaptor_lst = - xf86addScreenAdaptor(parent->parent->data->screen.screen->scrn_adaptor_lst, - link); - - CreateScreenAdaptor(parent, link); - RelayoutTree(); -} - -/*ARGUSED*/ -static void -ScreenAdaptorDestroy(TreeNode *node) -{ - if (node->data->adaptorlink.adaptorlink) - xf86removeScreenAdaptorLink(node->parent->parent->data->screen.screen, - node->data->adaptorlink.adaptorlink); -} - -static void -CreateScreenDisplay(TreeNode *parent, XF86ConfDisplayPtr dsp) -{ - TreeNode *node, *prev; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (dsp) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->display.display = dsp; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = ScreenDisplayDestroy; - node->update = ScreenDisplayUpdate; - CreateScreenDisplayField(node, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - dsp = (XF86ConfDisplayPtr)(dsp->list.next); - } - node = NewNode(parent, NULL, NULL, parent->node, NULL); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - CreateScreenDisplayField(node, True); -} - -static void -CreateScreenDisplayField(TreeNode *node, Bool addnew) -{ - Widget box, command; - - box = XtVaCreateWidget("display", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - if (!addnew) { - char *str, buf[256]; - XF86OptionPtr *options; - XF86ConfDisplayPtr dsp = node->data->display.display; - TreeNode *modes; - - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - options = &(dsp->disp_option_lst); - command = XtCreateManagedWidget("options", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, OptionsCallback, (XtPointer)options); - - XtCreateManagedWidget("viewportL", labelWidgetClass, box, NULL, 0); - if (dsp->disp_frameX0 != 0 || dsp->disp_frameY0 != 0) - XmuSnprintf(buf, sizeof(buf), "%d %d", dsp->disp_frameX0, dsp->disp_frameY0); - else - *buf = '\0'; - node->data->display.viewport = - XtVaCreateManagedWidget("viewport", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, NULL); - - XtCreateManagedWidget("virtualL", labelWidgetClass, box, NULL, 0); - if (dsp->disp_virtualX != 0 || dsp->disp_virtualY != 0) - XmuSnprintf(buf, sizeof(buf), "%d %d", dsp->disp_virtualX, dsp->disp_virtualY); - else - *buf = '\0'; - node->data->display.c_virtual = - XtVaCreateManagedWidget("virtual", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, NULL); - - XtCreateManagedWidget("depthL", labelWidgetClass, box, NULL, 0); - if (dsp->disp_depth != 0) - XmuSnprintf(buf, sizeof(buf), "%d", dsp->disp_depth); - else - *buf = '\0'; - node->data->display.depth = - XtVaCreateManagedWidget("depth", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, NULL); - - XtCreateManagedWidget("bppL", labelWidgetClass, box, NULL, 0); - if (dsp->disp_bpp != 0) - XmuSnprintf(buf, sizeof(buf), "%d", dsp->disp_bpp); - else - *buf = '\0'; - node->data->display.bpp = - XtVaCreateManagedWidget("bpp", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, NULL); - - XtCreateManagedWidget("visualL", labelWidgetClass, box, NULL, 0); - str = dsp->disp_visual != NULL ? dsp->disp_visual : ""; - node->data->display.visual = - XtVaCreateManagedWidget("visual", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, NULL); - - XtCreateManagedWidget("weightL", labelWidgetClass, box, NULL, 0); - if (dsp->disp_weight.red > 0) - XmuSnprintf(buf, sizeof(buf), "%d %d %d", - dsp->disp_weight.red, dsp->disp_weight.green, dsp->disp_weight.blue); - else - *buf = '\0'; - node->data->display.weight = - XtVaCreateManagedWidget("weight", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, NULL); - - XtCreateManagedWidget("blackL", labelWidgetClass, box, NULL, 0); - if (dsp->disp_black.red >= 0) - XmuSnprintf(buf, sizeof(buf), "0x%04x 0x%04x 0x%04x", - dsp->disp_black.red, dsp->disp_black.green, dsp->disp_black.blue); - else - *buf = '\0'; - node->data->display.black = - XtVaCreateManagedWidget("black", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, NULL); - - XtCreateManagedWidget("whiteL", labelWidgetClass, box, NULL, 0); - if (dsp->disp_white.red >= 0) - XmuSnprintf(buf, sizeof(buf), "0x%04x 0x%04x 0x%04x", - dsp->disp_white.red, dsp->disp_white.green, dsp->disp_white.blue); - else - *buf = '\0'; - node->data->display.white = - XtVaCreateManagedWidget("white", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, NULL); - - command = XtVaCreateManagedWidget("Modes", toggleWidgetClass, tree, - XtNstate, True, XtNtreeParent, box, - NULL); - modes = NewNode(node, command, command, node->node, NULL); - node->child = modes; - CreateDisplayMode(modes, dsp->disp_mode_lst); - } - else { - command = XtCreateManagedWidget("new", commandWidgetClass, box, NULL, 0); - XtAddCallback(command, XtNcallback, NewScreenDisplayCallback, - (XtPointer)node); - } - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -/*ARGSUSED*/ -static void -NewScreenDisplayCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ConfDisplayPtr dsp; - - parent = node->parent; - DeleteNode(node); - dsp = (XF86ConfDisplayPtr)XtCalloc(1, sizeof(XF86ConfDisplayRec)); - dsp->disp_black.red = dsp->disp_black.green = dsp->disp_black.blue = - dsp->disp_white.red = dsp->disp_white.green = dsp->disp_white.blue = -1; - parent->parent->data->screen.screen->scrn_display_lst = - xf86addScreenDisplay(parent->parent->data->screen.screen->scrn_display_lst, - dsp); - - CreateScreenDisplay(parent, dsp); - RelayoutTree(); -} - -static void -ScreenDisplayDestroy(TreeNode *node) -{ - if (node->data->display.display) - xf86removeScreenDisplay(node->parent->parent->data->screen.screen, - node->data->display.display); -} - -static void -ScreenDisplayUpdate(TreeNode *node) -{ - char *str, *tmp; - int x, y; - - /* viewport */ - XtVaGetValues(node->data->display.viewport, XtNstring, &str, NULL); - if (sscanf(str, "%d %d", &x, &y) == 2) { - node->data->display.display->disp_frameX0 = x; - node->data->display.display->disp_frameY0 = y; - } - - /* virtual */ - XtVaGetValues(node->data->display.c_virtual, XtNstring, &str, NULL); - if (sscanf(str, "%d %d", &x, &y) == 2) { - node->data->display.display->disp_virtualX = x; - node->data->display.display->disp_virtualY = y; - } - - /* depth */ - XtVaGetValues(node->data->display.depth, XtNstring, &str, NULL); - node->data->display.display->disp_depth = strtoul(str, NULL, 0); - - /* bpp */ - XtVaGetValues(node->data->display.bpp, XtNstring, &str, NULL); - node->data->display.display->disp_bpp = strtoul(str, NULL, 0); - - /* visual */ - XtVaGetValues(node->data->display.visual, XtNstring, &str, NULL); - XtFree(node->data->display.display->disp_visual); - if (*str) - node->data->display.display->disp_visual = XtNewString(str); - else - node->data->display.display->disp_visual = NULL; - - /* weight */ - XtVaGetValues(node->data->display.weight, XtNstring, &str, NULL); - node->data->display.display->disp_weight.red = strtoul(str, &tmp, 0); - if (str == tmp) - node->data->display.display->disp_weight.red = 0; - else { - str = tmp; - while (isspace(*str)) - ++str; - node->data->display.display->disp_weight.green = strtoul(str, &tmp, 0); - if (str != tmp) { - str = tmp; - while (isspace(*str)) - ++str; - node->data->display.display->disp_weight.blue = strtoul(str, &tmp, 0); - } - } - - /* black */ - XtVaGetValues(node->data->display.black, XtNstring, &str, NULL); - node->data->display.display->disp_black.red = strtoul(str, &tmp, 0); - if (str == tmp) - node->data->display.display->disp_black.red = -1; - else { - str = tmp; - while (isspace(*str)) - ++str; - node->data->display.display->disp_black.green = strtoul(str, &tmp, 0); - if (str != tmp) { - str = tmp; - while (isspace(*str)) - ++str; - node->data->display.display->disp_black.blue = strtoul(str, &tmp, 0); - } - } - - /* white */ - XtVaGetValues(node->data->display.white, XtNstring, &str, NULL); - node->data->display.display->disp_white.red = strtoul(str, &tmp, 0); - if (str == tmp) - node->data->display.display->disp_white.red = -1; - else { - str = tmp; - while (isspace(*str)) - ++str; - node->data->display.display->disp_white.green = strtoul(str, &tmp, 0); - if (str != tmp) { - str = tmp; - while (isspace(*str)) - ++str; - node->data->display.display->disp_white.blue = strtoul(str, &tmp, 0); - } - } -} - -static void -CreateDisplayMode(TreeNode *parent, XF86ModePtr modes) -{ - TreeNode *node, *prev; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (modes) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->mode.mode = modes; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = DisplayModeDestroy; - CreateDisplayModeField(node, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - modes = (XF86ModePtr)(modes->list.next); - } - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(parent, NULL, NULL, parent->node, data); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - CreateDisplayModeField(node, True); -} - -static void -CreateDisplayModeField(TreeNode *node, Bool addnew) -{ - Widget box, command, text; - - box = XtVaCreateWidget("mode", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - if (!addnew) { - XF86ModePtr mode = node->data->mode.mode; - - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, - (XtPointer)node); - text = XtVaCreateManagedWidget("label", labelWidgetClass, box, - XtNlabel, mode->mode_name, NULL); - } - else { - command = XtCreateManagedWidget("new", commandWidgetClass, box, NULL, 0); - XtAddCallback(command, XtNcallback, NewDisplayModeCallback, - (XtPointer)node); - text = XtVaCreateManagedWidget("value", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, NULL); - } - node->data->mode.text = text; - if (node->treeParent && XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -/*ARGSUSED*/ -static void -NewDisplayModeCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ModePtr mode; - Arg args[1]; - char *ident; - - XtSetArg(args[0], XtNstring, &ident); - XtGetValues(node->data->mode.text, args, 1); - if (*ident == '\0') - return; - - parent = node->parent; - DeleteNode(node); - mode = (XF86ModePtr)XtCalloc(1, sizeof(XF86ModeRec)); - mode->mode_name = XtNewString(ident); - parent->parent->data->display.display->disp_mode_lst = - xf86addDisplayMode(parent->parent->data->display.display->disp_mode_lst, - mode); - - CreateDisplayMode(parent, mode); - RelayoutTree(); -} - -/*ARGUSED*/ -static void -DisplayModeDestroy(TreeNode *node) -{ - if (node->data->mode.mode) - xf86removeDisplayMode(node->parent->parent->data->display.display, - node->data->mode.mode); -} - -/* Input */ -static void -CreateInput(TreeNode *parent, XF86ConfInputPtr input) -{ - TreeNode *prev, *node; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (input) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->input.input = input; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = InputDestroy; - node->update = InputUpdate; - CreateInputField(node, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - input = (XF86ConfInputPtr)(input->list.next); - } - - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(parent, NULL, NULL, parent->node, data); - CreateInputField(node, True); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; -} - -static void -CreateInputField(TreeNode *node, Bool addnew) -{ - Widget box, command; - - box = XtVaCreateWidget("input", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - if (!addnew) { - char *str; - XF86OptionPtr *options; - XF86ConfInputPtr inp = node->data->input.input; - - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - options = &(inp->inp_option_lst); - command = XtCreateManagedWidget("options", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, OptionsCallback, (XtPointer)options); - XtVaCreateManagedWidget("label", labelWidgetClass, box, - XtNlabel, inp->inp_identifier, NULL); - - XtCreateManagedWidget("driverL", labelWidgetClass, box, NULL, 0); - str = inp->inp_driver != NULL ? inp->inp_driver : ""; - node->data->input.text = - XtVaCreateManagedWidget("driver", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, str, NULL); - } - else { - command = XtCreateManagedWidget("new", commandWidgetClass, box, NULL, 0); - XtAddCallback(command, XtNcallback, NewInputCallback, - (XtPointer)node); - node->data->input.text = - XtVaCreateManagedWidget("value", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, NULL); - } - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -/*ARGSUSED*/ -static void -NewInputCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ConfInputPtr input; - Arg args[1]; - char *ident; - - XtSetArg(args[0], XtNstring, &ident); - XtGetValues(node->data->input.text, args, 1); - if (*ident == '\0') - return; - - parent = node->parent; - DeleteNode(node); - input = (XF86ConfInputPtr)XtCalloc(1, sizeof(XF86ConfInputRec)); - input->inp_identifier = XtNewString(ident); - XF86Config->conf_input_lst = - xf86addInput(XF86Config->conf_input_lst, input); - - { - TreeNode *lay = layoutTree->child; - Widget sme; - - /* last one is the "new" entry */ - while (lay && lay->next != NULL) { - /* Inputref is the second entry */ - TreeNode *iref = lay->child->next->child; - - while (iref && iref->next) - iref = iref->next; - sme = XtCreateManagedWidget(ident, smeBSBObjectClass, - iref->data->inputref.menu, NULL, 0); - XtAddCallback(sme, XtNcallback, NewInputrefCallback, - (XtPointer)iref); - lay = lay->next; - } - } - - CreateInput(parent, input); - RelayoutTree(); -} - -/*ARGUSED*/ -static void -InputDestroy(TreeNode *node) -{ - if (node->data->input.input) { - int i; - TreeNode *lay = layoutTree->child; - - /* last one is the "new" entry */ - while (lay && lay->next) { - /* Inputref is the second entry */ - TreeNode *iref = lay->child->next->child; - CompositeWidget composite; - - while (iref && iref->next) { - TreeNode *next = iref->next; - - if (iref && strcmp(iref->data->inputref.inputref->iref_inputdev_str, - node->data->input.input->inp_identifier) == 0) - DeleteNode(iref); - iref = next; - } - - composite = (CompositeWidget)iref->data->inputref.menu; - - for (i = 0; i < composite->composite.num_children; ++i) - if (strcmp(XtName(composite->composite.children[i]), - node->data->input.input->inp_identifier) == 0) - XtDestroyWidget(composite->composite.children[i]); - - lay = lay->next; - } - - for (i = 0; i < computer.num_devices; i++) - if ((XF86ConfInputPtr)(computer.devices[i]->config) == - node->data->input.input) { - config = computer.devices[i]->widget; - RemoveDeviceCallback(NULL, NULL, NULL); - } - } -} - -static void -InputUpdate(TreeNode *node) -{ - char *str; - - /* vendor */ - XtVaGetValues(node->data->input.text, XtNstring, &str, NULL); - XtFree(node->data->input.input->inp_driver); - if (*str) - node->data->input.input->inp_driver = XtNewString(str); - else - node->data->input.input->inp_driver = NULL; -} - -/* Layout */ -static void -CreateLayout(TreeNode *parent, XF86ConfLayoutPtr lay) -{ - TreeNode *prev, *node; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (lay) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->layout.layout = lay; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = LayoutDestroy; - CreateLayoutField(node, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - lay = (XF86ConfLayoutPtr)(lay->list.next); - } - - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(parent, NULL, NULL, parent->node, data); - CreateLayoutField(node, True); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; -} - -static void -CreateLayoutField(TreeNode *node, Bool addnew) -{ - Widget box, command, label; - - box = XtVaCreateWidget("layout", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - if (!addnew) { - TreeNode *adjacency, *inputref; - XF86OptionPtr *options; - XF86ConfLayoutPtr lay = node->data->layout.layout; - - options = &(lay->lay_option_lst); - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - command = XtCreateManagedWidget("options", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, OptionsCallback, (XtPointer)options); - label = XtVaCreateManagedWidget("label", labelWidgetClass, box, - XtNlabel, lay->lay_identifier, NULL); - - command = XtVaCreateManagedWidget("Adjacency", toggleWidgetClass, tree, - XtNstate, True, XtNtreeParent, box, - NULL); - adjacency = NewNode(node, command, command, box, NULL); - node->child = adjacency; - CreateAdjacency(adjacency, lay->lay_adjacency_lst); - - command = XtVaCreateManagedWidget("Inputref", toggleWidgetClass, tree, - XtNstate, True, XtNtreeParent, box, - NULL); - inputref = NewNode(node, command, command, box, NULL); - adjacency->next = inputref; - CreateInputref(inputref, lay->lay_input_lst); - } - else { - command = XtCreateManagedWidget("new", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, NewLayoutCallback, (XtPointer)node); - label = XtVaCreateManagedWidget("value", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - NULL); - node->data->layout.text = label; - } - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -/*ARGUSED*/ -static void -LayoutDestroy(TreeNode *node) -{ - if (node->data->layout.layout) - xf86removeLayout(XF86Config, node->data->layout.layout); -} - -/*ARGSUSED*/ -static void -NewLayoutCallback(Widget unused, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ConfLayoutPtr lay; - Arg args[1]; - char *label; - - XtSetArg(args[0], XtNstring, &label); - XtGetValues(node->data->layout.text, args, 1); - if (*label == '\0') - return; - - parent = node->parent; - DeleteNode(node); - lay = (XF86ConfLayoutPtr)XtCalloc(1, sizeof(XF86ConfLayoutRec)); - lay->lay_identifier = XtNewString(label); - XF86Config->conf_layout_lst = xf86addLayout(XF86Config->conf_layout_lst, lay); - - CreateLayout(parent, lay); - RelayoutTree(); -} - -static void -CreateAdjacency(TreeNode *parent, XF86ConfAdjacencyPtr adj) -{ - TreeNode *prev, *node; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (adj) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->adjacency.screen = adj ? adj->adj_screen : NULL; - data->adjacency.adjacency = adj; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = AdjacencyDestroy; - CreateAdjacencyField(node, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - adj = (XF86ConfAdjacencyPtr)(adj->list.next); - } - - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(parent, NULL, NULL, parent->node, data); - CreateAdjacencyField(node, True); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; -} - -static void -CreateAdjacencyField(TreeNode *node, Bool addnew) -{ - Widget box, command, sme; - XF86ConfScreenPtr ptr = XF86Config->conf_screen_lst; - - box = XtVaCreateWidget("adjacency", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - node->data->adjacency.menu = - XtVaCreatePopupShell("screenMenu", simpleMenuWidgetClass, box, - XtNleftMargin, 1, XtNrightMargin, 1, - XtNtopMargin, 1, XtNbottomMargin, 1, - NULL); - while (ptr) { - sme = XtCreateManagedWidget(ptr->scrn_identifier, smeBSBObjectClass, - node->data->adjacency.menu, NULL, 0); - XtAddCallback(sme, XtNcallback, !addnew ? - AdjacencyMenuCallback : NewAdjacencyCallback, - (XtPointer)node); - ptr = (XF86ConfScreenPtr)(ptr->list.next); - } - - if (!addnew) { - char buf[32]; - Cardinal width, height; - Widget left, right, above, below, relative, absolute; - XF86ConfAdjacencyPtr adj = node->data->adjacency.adjacency; - - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - (void) XtVaCreateManagedWidget("label", labelWidgetClass, box, - XtNlabel, adj->adj_screen->scrn_identifier, - NULL); - - XtCreateManagedWidget("scrnumL", labelWidgetClass, box, NULL, 0); - if (adj->adj_scrnum >= 0) - XmuSnprintf(buf, sizeof(buf), "%d", adj->adj_scrnum); - else - *buf = 0; - node->data->adjacency.scrnum = - XtVaCreateManagedWidget("scrnum", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, NULL); - above = XtVaCreateManagedWidget("above", toggleWidgetClass, box, - XtNstate, adj->adj_where == CONF_ADJ_ABOVE ? - True : False, NULL); - XtAddCallback(above, XtNcallback, AdjacencyToggleCallback, (XtPointer)node); - left = XtVaCreateManagedWidget("leftOf", toggleWidgetClass, box, - XtNradioGroup, above, - XtNstate, adj->adj_where == CONF_ADJ_LEFTOF ? - True : False, NULL); - XtAddCallback(left, XtNcallback, AdjacencyToggleCallback, (XtPointer)node); - - node->data->adjacency.button = - XtVaCreateManagedWidget("screen", menuButtonWidgetClass, box, - XtNmenuName, "screenMenu", NULL); - - right = XtVaCreateManagedWidget("rightOf", toggleWidgetClass, box, - XtNradioGroup, left, - XtNstate, adj->adj_where == CONF_ADJ_RIGHTOF ? - True : False, NULL); - XtAddCallback(right, XtNcallback, AdjacencyToggleCallback, (XtPointer)node); - below = XtVaCreateManagedWidget("below", toggleWidgetClass, box, - XtNradioGroup, right, - XtNstate, adj->adj_where == CONF_ADJ_BELOW ? - True : False, NULL); - XtAddCallback(below, XtNcallback, AdjacencyToggleCallback, (XtPointer)node); - relative = XtVaCreateManagedWidget("relative", toggleWidgetClass, box, - XtNradioGroup, below, - XtNstate, adj->adj_where == CONF_ADJ_RELATIVE ? - True : False, NULL); - XtAddCallback(relative, XtNcallback, AdjacencyToggleCallback, (XtPointer)node); - absolute = XtVaCreateManagedWidget("absolute", toggleWidgetClass, box, - XtNradioGroup, relative, - XtNstate, adj->adj_where == CONF_ADJ_ABSOLUTE ? - True : False, NULL); - XtAddCallback(absolute, XtNcallback, AdjacencyToggleCallback, (XtPointer)node); - - XtCreateManagedWidget("adjxL", labelWidgetClass, box, NULL, 0); - XmuSnprintf(buf, sizeof(buf), "%d", adj->adj_x); - node->data->adjacency.adjx = - XtVaCreateManagedWidget("adjx", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, NULL); - - XtCreateManagedWidget("adjyL", labelWidgetClass, box, NULL, 0); - XmuSnprintf(buf, sizeof(buf), "%d", adj->adj_y); - node->data->adjacency.adjy = - XtVaCreateManagedWidget("adjy", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, - XtNstring, buf, NULL); - - XtVaGetValues(node->data->adjacency.button, XtNwidth, &width, - XtNheight, &height, NULL); - if (adj->adj_where > CONF_ADJ_ABSOLUTE && - adj->adj_where <= CONF_ADJ_RELATIVE) - XtVaSetValues(node->data->adjacency.button, XtNlabel, - adj->adj_refscreen, XtNwidth, width, - XtNheight, height, NULL); - else - XtVaSetValues(node->data->adjacency.button, XtNlabel, "", - XtNwidth, width, XtNheight, height, NULL); - } - else - XtVaCreateManagedWidget("new", menuButtonWidgetClass, box, - XtNmenuName, "screenMenu", NULL); - - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -static void -AdjacencyDestroy(TreeNode *node) -{ - if (node->data->adjacency.adjacency) - xf86removeAdjacency(node->parent->parent->data->layout.layout, - node->data->adjacency.adjacency); -} - -/*ARGSUSED*/ -static void -NewAdjacencyCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ConfAdjacencyPtr adj; - char *ident = XtName(w); - - parent = node->parent; - DeleteNode(node); - adj = (XF86ConfAdjacencyPtr)XtCalloc(1, sizeof(XF86ConfAdjacencyRec)); - adj->adj_screen = xf86findScreen(ident, XF86Config->conf_screen_lst); - if (adj->adj_screen) - adj->adj_screen_str = XtNewString(adj->adj_screen->scrn_identifier); - parent->parent->data->layout.layout->lay_adjacency_lst = - xf86addAdjacency(parent->parent->data->layout.layout->lay_adjacency_lst, - adj); - - CreateAdjacency(parent, adj); - RelayoutTree(); -} - -/*ARGUSED*/ -static void -AdjacencyMenuCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *node = (TreeNode*)user_data; - XF86ConfAdjacencyPtr adj = node->data->adjacency.adjacency; - - XtFree(adj->adj_refscreen); - adj->adj_refscreen = XtNewString(XtName(w)); - XtVaSetValues(node->data->adjacency.button, XtNlabel, XtName(w), NULL); -} - -static void -AdjacencyToggleCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *node = (TreeNode*)user_data; - XF86ConfAdjacencyPtr adj = node->data->adjacency.adjacency; - char *x, *y; - - if ((Bool)(long)call_data == False) - return; - - XtVaGetValues(node->data->adjacency.adjx, XtNstring, &x, NULL); - XtVaGetValues(node->data->adjacency.adjy, XtNstring, &y, NULL); - - adj->adj_x = strtol(x, NULL, 0); - adj->adj_y = strtol(y, NULL, 0); - - if (strcmp(XtName(w), "absolute") == 0) { - XtVaSetValues(node->data->adjacency.button, XtNlabel, "", NULL); - adj->adj_where = CONF_ADJ_ABSOLUTE; - return; - } - if (strcmp(XtName(w), "relative") == 0) - adj->adj_where = CONF_ADJ_RELATIVE; - else if (strcmp(XtName(w), "leftOf") == 0) - adj->adj_where = CONF_ADJ_LEFTOF; - else if (strcmp(XtName(w), "rightOf") == 0) - adj->adj_where = CONF_ADJ_RIGHTOF; - else if (strcmp(XtName(w), "above") == 0) - adj->adj_where = CONF_ADJ_ABOVE; - else if (strcmp(XtName(w), "below") == 0) - adj->adj_where = CONF_ADJ_BELOW; -} - -/* Inputref */ -static void -CreateInputref(TreeNode *parent, XF86ConfInputrefPtr input) -{ - TreeNode *prev, *node; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (input) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->inputref.inputref = input; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = InputrefDestroy; - CreateInputrefField(node, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - input = (XF86ConfInputrefPtr)(input->list.next); - } - - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(parent, NULL, NULL, parent->node, data); - CreateInputrefField(node, True); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; -} - -static void -CreateInputrefField(TreeNode *node, Bool addnew) -{ - Widget box, command; - - box = XtVaCreateWidget("inputref", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - if (!addnew) { - XF86OptionPtr *options; - XF86ConfInputrefPtr inp = node->data->inputref.inputref; - - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - options = &(inp->iref_option_lst); - command = XtCreateManagedWidget("options", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, OptionsCallback, (XtPointer)options); - XtVaCreateManagedWidget("label", labelWidgetClass, box, - XtNlabel, inp->iref_inputdev_str, NULL); - } - else { - Widget sme; - XF86ConfInputPtr ptr = XF86Config->conf_input_lst; - - XtVaCreateManagedWidget("new", menuButtonWidgetClass, box, - XtNmenuName, "inputMenu", NULL); - node->data->inputref.menu = - XtVaCreatePopupShell("inputMenu", simpleMenuWidgetClass, box, - XtNleftMargin, 1, XtNrightMargin, 1, - XtNtopMargin, 1, XtNbottomMargin, 1, - NULL); - - while (ptr) { - sme = XtCreateManagedWidget(ptr->inp_identifier, smeBSBObjectClass, - node->data->inputref.menu, NULL, 0); - XtAddCallback(sme, XtNcallback, NewInputrefCallback, - (XtPointer)node); - ptr = (XF86ConfInputPtr)(ptr->list.next); - } - } - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -/*ARGSUSED*/ -static void -NewInputrefCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ConfInputrefPtr input; - char *ident = XtName(w); - - parent = node->parent; - DeleteNode(node); - input = (XF86ConfInputrefPtr)XtCalloc(1, sizeof(XF86ConfInputrefRec)); - input->iref_inputdev_str = XtNewString(ident); - parent->parent->data->layout.layout->lay_input_lst = - xf86addInputref(parent->parent->data->layout.layout->lay_input_lst, input); - - CreateInputref(parent, input); - RelayoutTree(); -} - -/*ARGUSED*/ -static void -InputrefDestroy(TreeNode *node) -{ - if (node->data->inputref.inputref) - xf86removeInputRef(node->parent->parent->data->layout.layout, node->data->inputref.inputref->iref_inputdev); -} - -/* Vendor */ -static void -CreateVendor(TreeNode *parent, XF86ConfVendorPtr vendor) -{ - TreeNode *prev, *node; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (vendor) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->vendor.vendor = vendor; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = VendorDestroy; - CreateVendorField(node, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - vendor = (XF86ConfVendorPtr)(vendor->list.next); - } - - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(parent, NULL, NULL, parent->node, data); - CreateVendorField(node, True); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; -} - -static void -CreateVendorField(TreeNode *node, Bool addnew) -{ - Widget box, command; - - box = XtVaCreateWidget("vendor", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - if (!addnew) { - TreeNode *sub; - XF86OptionPtr *options; - XF86ConfVendorPtr vendor = node->data->vendor.vendor; - - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - options = &(vendor->vnd_option_lst); - command = XtCreateManagedWidget("options", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, OptionsCallback, (XtPointer)options); - XtVaCreateManagedWidget("label", labelWidgetClass, box, - XtNlabel, vendor->vnd_identifier, NULL); - - command = XtVaCreateManagedWidget("VendSub", toggleWidgetClass, tree, - XtNstate, True, - XtNtreeParent, box, - NULL); - sub = NewNode(node, command, command, box, NULL); - node->child = sub; - CreateVendorSub(sub, vendor->vnd_sub_lst); - } - else { - command = XtCreateManagedWidget("new", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, NewVendorCallback, (XtPointer)node); - node->data->vendor.text = - XtVaCreateManagedWidget("value", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, NULL); - } - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -static void -VendorDestroy(TreeNode *node) -{ - if (node->data->vendor.vendor) - xf86removeVendor(XF86Config, node->data->vendor.vendor); -} - -static void -NewVendorCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ConfVendorPtr vnd; - Arg args[1]; - char *label; - - XtSetArg(args[0], XtNstring, &label); - XtGetValues(node->data->vendor.text, args, 1); - if (*label == '\0') - return; - - parent = node->parent; - DeleteNode(node); - vnd = (XF86ConfVendorPtr)XtCalloc(1, sizeof(XF86ConfVendorRec)); - vnd->vnd_identifier = XtNewString(label); - XF86Config->conf_vendor_lst = xf86addVendor(XF86Config->conf_vendor_lst, vnd); - - CreateVendor(parent, vnd); - RelayoutTree(); -} - -/* VendorSub */ -static void -CreateVendorSub(TreeNode *parent, XF86ConfVendSubPtr vendor) -{ - TreeNode *prev, *node; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (vendor) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->vendsub.vendsub = vendor; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = VendorSubDestroy; - node->update = VendorSubUpdate; - CreateVendorSubField(node, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - vendor = (XF86ConfVendSubPtr)(vendor->list.next); - } - - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - node = NewNode(parent, NULL, NULL, parent->node, data); - CreateVendorSubField(node, True); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; -} - -static void -CreateVendorSubField(TreeNode *node, Bool addnew) -{ - Widget box, command; - - box = XtVaCreateWidget("vendorSub", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - if (!addnew) { - XF86OptionPtr *options; - XF86ConfVendSubPtr vendor = node->data->vendsub.vendsub; - - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - options = &(vendor->vs_option_lst); - command = XtCreateManagedWidget("options", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, OptionsCallback, (XtPointer)options); - XtVaCreateManagedWidget("label", labelWidgetClass, box, - XtNlabel, vendor->vs_identifier, NULL); - - XtCreateManagedWidget("nameL", labelWidgetClass, box, NULL, 0); - node->data->vendsub.text = - XtVaCreateManagedWidget("name", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, XtNstring, - vendor->vs_name ? vendor->vs_name : "", - NULL); - } - else { - command = XtCreateManagedWidget("new", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, NewVendorSubCallback, (XtPointer)node); - node->data->vendsub.text = - XtVaCreateManagedWidget("value", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, NULL); - } - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -static void -VendorSubDestroy(TreeNode *node) -{ - if (node->data->vendsub.vendsub) - xf86removeVendorSub(node->parent->parent->data->vendor.vendor, - node->data->vendsub.vendsub); -} - -static void -VendorSubUpdate(TreeNode *node) -{ - char *str; - - XtVaGetValues(node->data->vendsub.text, XtNstring, &str, NULL); - XtFree(node->data->vendsub.vendsub->vs_name); - if (*str) - node->data->vendsub.vendsub->vs_name = XtNewString(str); - else - node->data->vendsub.vendsub->vs_name = NULL; -} - -static void -NewVendorSubCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ConfVendSubPtr vnd; - Arg args[1]; - char *label; - - XtSetArg(args[0], XtNstring, &label); - XtGetValues(node->data->vendsub.text, args, 1); - if (*label == '\0') - return; - - parent = node->parent; - DeleteNode(node); - vnd = (XF86ConfVendSubPtr)XtCalloc(1, sizeof(XF86ConfVendSubRec)); - vnd->vs_identifier = XtNewString(label); - parent->parent->data->vendor.vendor->vnd_sub_lst = - xf86addVendorSub(parent->parent->data->vendor.vendor->vnd_sub_lst, vnd); - - CreateVendorSub(parent, vnd); - RelayoutTree(); -} - -/* DRI */ -static void -CreateDRI(TreeNode *parent, XF86ConfDRIPtr dri) -{ - TreeNode *node; - TreeData *data; - - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->dri.dri = dri; - node = NewNode(parent, NULL, NULL, parent->node, data); - parent->child = node; - node->update = DRIUpdate; - CreateDRIField(node); -} - -static void -CreateDRIField(TreeNode *node) -{ - Widget box, toggle; - XF86ConfDRIPtr dri = node->data->dri.dri; - TreeNode *buffers; - char buf[32]; - - box = XtVaCreateWidget("dri", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - XtCreateManagedWidget("nameL", labelWidgetClass, box, NULL, 0); - node->data->dri.name = - XtVaCreateManagedWidget("name", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, XtNstring, - dri->dri_group_name ? dri->dri_group_name : "", - NULL); - - XtCreateManagedWidget("groupL", labelWidgetClass, box, NULL, 0); - if (dri->dri_group >= 0) - XmuSnprintf(buf, sizeof(buf), "%d", dri->dri_group); - else - *buf = '\0'; - node->data->dri.group = - XtVaCreateManagedWidget("group", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, XtNstring, buf, - NULL); - - XtCreateManagedWidget("modeL", labelWidgetClass, box, NULL, 0); - if (dri->dri_mode > 0) - XmuSnprintf(buf, sizeof(buf), "0%o", dri->dri_mode); - else - *buf = '\0'; - node->data->dri.mode = - XtVaCreateManagedWidget("mode", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, XtNstring, buf, - NULL); - - toggle = XtVaCreateManagedWidget("Buffers", toggleWidgetClass, tree, - XtNstate, True, XtNtreeParent, box, - NULL); - buffers = NewNode(node, toggle, toggle, box, NULL); - node->child = buffers; - CreateBuffers(buffers, dri->dri_buffers_lst); - - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -static void -DRIUpdate(TreeNode *node) -{ - char *str; - - /* name */ - XtVaGetValues(node->data->dri.name, XtNstring, &str, NULL); - XtFree(node->data->dri.dri->dri_group_name); - if (*str) - node->data->dri.dri->dri_group_name = XtNewString(str); - else - node->data->dri.dri->dri_group_name = NULL; - - /* group */ - XtVaGetValues(node->data->dri.group, XtNstring, &str, NULL); - if (*str) - node->data->dri.dri->dri_group = strtoul(str, NULL, 0); - else - node->data->dri.dri->dri_group = -1; - - /* mode */ - XtVaGetValues(node->data->dri.mode, XtNstring, &str, NULL); - node->data->dri.dri->dri_mode = strtoul(str, NULL, 0); -} - -/* Buffers */ -static void -CreateBuffers(TreeNode *parent, XF86ConfBuffersPtr buf) -{ - TreeNode *node, *prev; - TreeData *data; - - if ((prev = parent->child) != NULL) - while (prev->next) - prev = prev->next; - - while (buf) { - data = (TreeData*)XtCalloc(1, sizeof(TreeData)); - data->buffers.buffers = buf; - node = NewNode(parent, NULL, NULL, parent->node, data); - node->destroy = BuffersDestroy; - node->update = BuffersUpdate; - CreateBuffersField(node, False); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; - prev = node; - - buf = (XF86ConfBuffersPtr)(buf->list.next); - } - node = NewNode(parent, NULL, NULL, parent->node, NULL); - CreateBuffersField(node, True); - if (parent->child == NULL) - parent->child = node; - else - prev->next = node; -} - -static void -CreateBuffersField(TreeNode *node, Bool addnew) -{ - Widget box, command; - - box = XtVaCreateWidget("buffers", formWidgetClass, tree, - XtNtreeParent, node->treeParent, NULL); - node->node = box; - - if (!addnew) { - char str[32]; - XF86ConfBuffersPtr buf = node->data->buffers.buffers; - - command = XtCreateManagedWidget("remove", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, DestroyCallback, (XtPointer)node); - - XtCreateManagedWidget("countL", labelWidgetClass, box, NULL, 0); - XmuSnprintf(str, sizeof(str), "%d", buf->buf_count); - node->data->buffers.count = - XtVaCreateManagedWidget("count", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, XtNstring, str, - NULL); - - XtCreateManagedWidget("sizeL", labelWidgetClass, box, NULL, 0); - XmuSnprintf(str, sizeof(str), "%d", buf->buf_size); - node->data->buffers.size = - XtVaCreateManagedWidget("size", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, XtNstring, str, - NULL); - - XtCreateManagedWidget("flagsL", labelWidgetClass, box, NULL, 0); - node->data->buffers.flags = - XtVaCreateManagedWidget("flags", asciiTextWidgetClass, box, - XtNeditType, XawtextEdit, XtNstring, - buf->buf_flags ? buf->buf_flags : "", - NULL); - } - else { - command = XtCreateManagedWidget("new", commandWidgetClass, box, - NULL, 0); - XtAddCallback(command, XtNcallback, NewBuffersCallback, (XtPointer)node); - } - if (XtIsRealized(node->treeParent)) - XtRealizeWidget(box); - XtManageChild(box); -} - -/*ARGUSED*/ -static void -BuffersDestroy(TreeNode *node) -{ - if (node->data->buffers.buffers) - xf86removeBuffers(XF86Config->conf_dri, node->data->buffers.buffers); -} - -/*ARGSUSED*/ -static void -NewBuffersCallback(Widget unused, XtPointer user_data, XtPointer call_data) -{ - TreeNode *parent, *node = (TreeNode*)user_data; - XF86ConfBuffersPtr buf; - - parent = node->parent; - DeleteNode(node); - buf = (XF86ConfBuffersPtr)XtCalloc(1, sizeof(XF86ConfBuffersRec)); - XF86Config->conf_dri->dri_buffers_lst = - xf86addBuffers(XF86Config->conf_dri->dri_buffers_lst, buf); - - CreateBuffers(parent, buf); - RelayoutTree(); -} - -static void -BuffersUpdate(TreeNode *node) -{ - char *str; - - /* count */ - XtVaGetValues(node->data->buffers.count, XtNstring, &str, NULL); - node->data->buffers.buffers->buf_count = strtoul(str, NULL, 0); - - /* size */ - XtVaGetValues(node->data->buffers.size, XtNstring, &str, NULL); - node->data->buffers.buffers->buf_size = strtoul(str, NULL, 0); - - /* flags */ - XtVaGetValues(node->data->buffers.flags, XtNstring, &str, NULL); - if (*str) - node->data->buffers.buffers->buf_flags = XtNewString(str); - else - node->data->buffers.buffers->buf_flags = NULL; -} - -static TreeNode * -NewNode(TreeNode *parent, Widget node, Widget toggle, Widget treeParent, - TreeData *data) -{ - TreeNode *tree = (TreeNode*)XtCalloc(1, sizeof(TreeNode)); - - tree->parent = parent; - tree->node = node; - if ((tree->toggle = toggle) != NULL) - XtAddCallback(toggle, XtNcallback, ToggleCallback, (XtPointer)tree); - tree->treeParent = treeParent; - tree->data = data; - - return (tree); -} - -static void -DeleteNode(TreeNode *node) -{ - TreeNode *ptr = node->child; - - while (ptr != NULL) { - TreeNode *next = ptr->next; - - DeleteNode(ptr); - ptr = next; - } - - if (node->parent && node->parent->child == node) - node->parent->child = node->next; - else if (node->parent) { - for (ptr = node->parent->child; ptr && ptr->next != node; - ptr = ptr->next) - ; - if (ptr) - ptr->next = node->next; - } - - if (node->destroy) - (node->destroy)(node); - if (node->data) - XtFree((XtPointer)node->data); - - /* sets treeParent to NULL so that RelayoutTree works correctly, - * as the tree will properly calculate it's new size. - */ - XtVaSetValues(node->node, XtNtreeParent, NULL, NULL); - - XtDestroyWidget(node->node); - XtFree((XtPointer)node); -} - -/*ARGUSED*/ -static void -DestroyCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *node = (TreeNode*)user_data; - - DeleteNode(node); - RelayoutTree(); -} - -static void -ToggleNodeRecursive(TreeNode *node) -{ - while (node) { - if (!XtIsRealized(node->node)) - XtRealizeWidget(node->node); - XtVaSetValues(node->node, XtNtreeParent, node->treeParent, NULL); - XtManageChild(node->node); - - if (node->child && !node->toggle) - ToggleNodeRecursive(node->child); - - node = node->next; - } -} - -static void -ToggleNode(TreeNode *node, Bool toggle) -{ - while (node) { - if (toggle) { - if (!XtIsRealized(node->node)) - XtRealizeWidget(node->node); - XtVaSetValues(node->node, XtNtreeParent, node->treeParent, NULL); - XtManageChild(node->node); - - if (node->child && !node->toggle) - ToggleNodeRecursive(node->child); - } - else { - if (node->child) - ToggleNode(node->child, False); - XtVaSetValues(node->node, XtNtreeParent, NULL, NULL); - XtUnmanageChild(node->node); - if (node->toggle) - XtVaSetValues(node->toggle, XtNstate, False, NULL); - } - node = node->next; - } -} - -/* - * XXX This callback can show side effects in the way it is called. If - * the structure holding the XF86OptionPtr is reallocated, a bogus pointer - * will be passed to this callback. - */ -static void -OptionsCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - XF86OptionPtr *options = (XF86OptionPtr*)user_data; - -#ifdef USE_MODULES - OptionsPopup(options, NULL, NULL); -#else - OptionsPopup(options); -#endif -} - -static void -RelayoutTree(void) -{ - Arg args[4]; - Dimension sliderWidth, sliderHeight, canvasWidth, canvasHeight; - - XtSetArg(args[0], XtNwidth, &sliderWidth); - XtSetArg(args[1], XtNheight, &sliderHeight); - XtGetValues(shell, args, 2); - - XtSetArg(args[2], XtNwidth, &canvasWidth); - XtSetArg(args[3], XtNheight, &canvasHeight); - XtGetValues(tree, args + 2, 2); - - XtSetArg(args[0], XtNsliderWidth, sliderWidth); - XtSetArg(args[1], XtNsliderHeight, sliderHeight); - XtSetArg(args[2], XtNcanvasWidth, canvasWidth); - XtSetArg(args[3], XtNcanvasHeight, canvasHeight); - XtSetValues(panner, args, 4); -} - -static void -ToggleCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - TreeNode *nodeParent = (TreeNode*)user_data; - - if (nodeParent->child) { - if (XtIsRealized(tree)) - XtUnmapWidget(tree); - ToggleNode(nodeParent->child, (Bool)(long)call_data); - RelayoutTree(); - if (XtIsRealized(tree)) - XtMapWidget(tree); - } -} - -/*ARGSUSED*/ -static void -PannerCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - Arg args[2]; - XawPannerReport *rep = (XawPannerReport *)call_data; - - XtSetArg (args[0], XtNx, -rep->slider_x); - XtSetArg (args[1], XtNy, -rep->slider_y); - XtSetValues(tree, args, 2); -} - -/*ARGSUSED*/ -static void -PortholeCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - XawPannerReport *rep = (XawPannerReport*)call_data; - Arg args[6]; - Cardinal n = 2; - - XtSetArg (args[0], XtNsliderX, rep->slider_x); - XtSetArg (args[1], XtNsliderY, rep->slider_y); - if (rep->changed != (XawPRSliderX | XawPRSliderY)) { - XtSetArg (args[2], XtNsliderWidth, rep->slider_width); - XtSetArg (args[3], XtNsliderHeight, rep->slider_height); - XtSetArg (args[4], XtNcanvasWidth, rep->canvas_width); - XtSetArg (args[5], XtNcanvasHeight, rep->canvas_height); - n = 6; - } - XtSetValues(panner, args, n); -} - -static void -DestroyTree(TreeNode *node) -{ - while (node) { - TreeNode *next = node->next; - if (node->child) - DestroyTree(node->child); - - if (node->data) - XtFree((XtPointer)node->data); - XtFree((XtPointer)node); - - node = next; - } -} - -static void -UpdateConfig(TreeNode *node) -{ - while (node) { - if (node->child) - UpdateConfig(node->child); - if (node->update) - (node->update)(node); - node = node->next; - } -} - -static Bool -ExpertInitialize(void) -{ - Widget paned, vpane, close, config, files, modules, flags, video, modes, - monitor, device, screen, input, layout, vendor, dri; - Arg args[4]; - Dimension width, height, canvasWidth, canvasHeight; - TreeNode *node; - - if (expert != NULL) - return (False); - - shell = XtCreatePopupShell("Expert", transientShellWidgetClass, - toplevel, NULL, 0); - paned = XtVaCreateManagedWidget("paned", panedWidgetClass, shell, - XtNorientation, XtorientHorizontal, NULL); - vpane = XtCreateManagedWidget("vpane", panedWidgetClass, paned, NULL, 0); - panner = XtCreateManagedWidget ("panner", pannerWidgetClass, vpane, NULL, 0); - close = XtCreateManagedWidget("close", commandWidgetClass, vpane, NULL, 0); - XtAddCallback(close, XtNcallback, PopdownCallback, NULL); - - expert = XtCreateManagedWidget("expert", portholeWidgetClass, paned, NULL, 0); - XtAddCallback(expert, XtNreportCallback, PortholeCallback, NULL); - XtAddCallback(panner, XtNreportCallback, PannerCallback, NULL); - tree = XtCreateManagedWidget("tree", treeWidgetClass, expert, NULL, 0); - - config = XtVaCreateManagedWidget(__XCONFIGFILE__, toggleWidgetClass, tree, - XtNstate, True, NULL); - mainNode = NewNode(NULL, config, config, NULL, NULL); - - files = XtVaCreateManagedWidget("Files", toggleWidgetClass, tree, - XtNtreeParent, config, NULL); - node = NewNode(mainNode, files, files, config, NULL); - mainNode->child = node; - CreateFiles(node); - - modules = XtVaCreateManagedWidget("Module", toggleWidgetClass, tree, - XtNtreeParent, config, NULL); - node->next = NewNode(mainNode, modules, modules, config, NULL); - node = node->next; - CreateModule(node, XF86Config->conf_modules ? - XF86Config->conf_modules->mod_load_lst : NULL); - - flags = XtVaCreateManagedWidget("ServerFlags", commandWidgetClass, tree, - XtNtreeParent, config, NULL); - node->next = NewNode(mainNode, flags, NULL, config, NULL); - node = node->next; - if (XF86Config->conf_flags == NULL) - XF86Config->conf_flags = (XF86ConfFlagsPtr) - XtCalloc(1, sizeof(XF86ConfFlagsRec)); - XtAddCallback(flags, XtNcallback, OptionsCallback, - (XtPointer)&(XF86Config->conf_flags->flg_option_lst)); - - video = XtVaCreateManagedWidget("VideoAdaptor", toggleWidgetClass, tree, - XtNtreeParent, config, NULL); - node->next = NewNode(mainNode, video, video, config, NULL); - node = node->next; - CreateVideoAdaptor(node, XF86Config->conf_videoadaptor_lst); - - modes = XtVaCreateManagedWidget("Mode", toggleWidgetClass, tree, - XtNtreeParent, config, NULL); - node->next = NewNode(mainNode, modes, modes, config, NULL); - node = node->next; - CreateModes(node, XF86Config->conf_modes_lst); - - monitor = XtVaCreateManagedWidget("Monitor", toggleWidgetClass, tree, - XtNtreeParent, config, NULL); - node->next = NewNode(mainNode, monitor, monitor, config, NULL); - node = node->next; - CreateMonitor(monitorTree = node, XF86Config->conf_monitor_lst); - - device = XtVaCreateManagedWidget("Device", toggleWidgetClass, tree, - XtNtreeParent, config, NULL); - node->next = NewNode(mainNode, device, device, config, NULL); - node = node->next; - CreateDevice(node, XF86Config->conf_device_lst); - - screen = XtVaCreateManagedWidget("Screen", toggleWidgetClass, tree, - XtNtreeParent, config, NULL); - node->next = NewNode(mainNode, screen, screen, config, NULL); - node = node->next; - CreateScreen(screenTree = node, XF86Config->conf_screen_lst); - - input = XtVaCreateManagedWidget("Input", toggleWidgetClass, tree, - XtNtreeParent, config, NULL); - node->next = NewNode(mainNode, input, input, config, NULL); - node = node->next; - CreateInput(node, XF86Config->conf_input_lst); - - layout = XtVaCreateManagedWidget("Layout", toggleWidgetClass, tree, - XtNtreeParent, config, NULL); - node->next = NewNode(mainNode, layout, layout, config, NULL); - node = node->next; - CreateLayout(layoutTree = node, XF86Config->conf_layout_lst); - - vendor = XtVaCreateManagedWidget("Vendor", toggleWidgetClass, tree, - XtNtreeParent, config, NULL); - node->next = NewNode(mainNode, vendor, vendor, config, NULL); - node = node->next; - CreateVendor(node, XF86Config->conf_vendor_lst); - - dri = XtVaCreateManagedWidget("DRI", toggleWidgetClass, tree, - XtNtreeParent, config, NULL); - node->next = NewNode(mainNode, dri, dri, config, NULL); - node = node->next; - if (XF86Config->conf_dri == NULL) - XF86Config->conf_dri = (XF86ConfDRIPtr) - XtCalloc(1, sizeof(XF86ConfDRIRec)); - CreateDRI(node, XF86Config->conf_dri); - - XtRealizeWidget(shell); - - XtSetArg(args[0], XtNwidth, &width); - XtSetArg(args[1], XtNheight, &height); - XtGetValues(shell, args, 2); - XtSetArg(args[0], XtNwidth, width); - XtSetArg(args[1], XtNheight, height); - XtSetValues(expert, args, 2); - - XtSetArg(args[0], XtNsliderWidth, width); - XtSetArg(args[1], XtNsliderHeight, height); - XtSetArg(args[2], XtNwidth, &canvasWidth); - XtSetArg(args[3], XtNheight, &canvasHeight); - XtGetValues(tree, args + 2, 2); - XtSetArg(args[2], XtNcanvasWidth, canvasWidth); - XtSetArg(args[3], XtNcanvasHeight, canvasHeight); - XtSetValues(panner, args, 4); - - /* needs to do the apparently NOP code bellow to correctly layout the - * tree widget */ - - /* close all open entries */ - ToggleCallback(config, mainNode, (XtPointer)0); - /* open first level */ - ToggleCallback(config, mainNode, (XtPointer)1); - - XSetWMProtocols(DPY, XtWindow(shell), &wm_delete_window, 1); - - return (True); -} diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/help.c b/xorg-server/hw/xfree86/utils/xorgcfg/help.c deleted file mode 100644 index cd5c2c2f4..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/help.c +++ /dev/null @@ -1,1785 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include /* for bsearch() */ -#include -#include "help.h" -#include "options.h" - -/* - * Prototypes - */ -static void CloseCallback(Widget, XtPointer, XtPointer); -static void StartHelp(void); -void Html_ModeStart(Widget); - -/* - * Initialization - */ -static Widget shell, text; -static Bool popped_up = False; - -/* - * Implementation - */ -void -Help(char *topic) -{ - Widget source; - char *str = NULL; - Bool error = False; - static char *def_text = "

Help Error

" - "No help available for the topic %s."; - XtResource resource = { - NULL, "HelpMessage", XtRString, sizeof(char*), - 0, XtRString, NULL - }; - - StartHelp(); - source = XawTextGetSource(text); - XawTextSourceClearEntities(source, 0, - XawTextSourceScan(source, 0, XawstAll, - XawsdRight, 1, True)); - if (topic != NULL) { - resource.resource_name = topic; - XtGetApplicationResources(shell, (XtPointer)&str, - &resource, 1, NULL, 0); - } - if (str == NULL) { - int len; - - error = True; - if (topic == NULL) - topic = "(null argument)"; - str = XtMalloc(len = strlen(topic) + strlen(def_text) + 1); - XmuSnprintf(str, len, def_text, topic); - } - XtVaSetValues(text, XtNstring, str, NULL); - if (error) - XtFree(str); - - Html_ModeStart(source); - _XawTextBuildLineTable((TextWidget)text, - XawTextTopPosition(text), True); - XawTextDisplay(text); - if (popped_up == False) { - popped_up = True; - XtPopup(shell, XtGrabNone); - XtSetKeyboardFocus(shell, text); - } -} - -static void -StartHelp(void) -{ - static XtResource resource = { - "properties", "Properties", XtRString, sizeof(char*), - 0, XtRString, NULL - }; - - if (shell == NULL) { - Widget pane, commands, close; - char *props; - XawTextPropertyList *propl; - - shell = XtCreatePopupShell("help", transientShellWidgetClass, - toplevel, NULL, 0); - pane = XtCreateManagedWidget("pane", panedWidgetClass, - shell, NULL, 0); - text = XtVaCreateManagedWidget("text", asciiTextWidgetClass, - pane, XtNeditType, XawtextRead, NULL); - commands = XtCreateManagedWidget("commands", formWidgetClass, pane, - NULL, 0); - close = XtCreateManagedWidget("close", commandWidgetClass, - commands, NULL, 0); - XtAddCallback(close, XtNcallback, CloseCallback, NULL); - XtRealizeWidget(shell); - XSetWMProtocols(DPY, XtWindow(shell), &wm_delete_window, 1); - XtGetApplicationResources(text, (XtPointer)&props, - &resource, 1, NULL, 0); - propl = XawTextSinkConvertPropertyList("html", props, - toplevel->core.screen, - toplevel->core.colormap, - toplevel->core.depth); - XtVaSetValues(XawTextGetSink(text), XawNtextProperties, propl, NULL); - } -} - -/*ARGSUSED*/ -static void -CloseCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - XtPopdown(shell); - popped_up = False; -} - -/*ARGSUSED*/ -void -HelpCancelAction(Widget w, XEvent *event, String *params, Cardinal *num_params) -{ - CloseCallback(w, NULL, NULL); -} - - -/* bellow is a modified version of the html-mode.c I wrote for xedit - * (at least) temporarily dead. - */ - -/* - * 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 XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of the XFree86 Project shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from the - * XFree86 Project. - * - * Author: Paulo César Pereira de Andrade - */ - -#define Html_Peek(parser) ((parser)->next) - -/* - * Types - */ -typedef struct _Html_Parser Html_Parser; -typedef struct _Html_Item Html_Item; - -typedef struct _Html_TagInfo { - char *name; - unsigned int entity : 1; /* it changes the type of the text */ - unsigned int nest : 1; /* does not close tags automatically */ - unsigned int end : 1; /* need a close markup */ - unsigned int adnl : 1; /* add newline before/after tag contents */ - unsigned int para : 1; /* changes the paragraph formatting */ - unsigned long mask; /* enforce use of attributes of this tag-info */ - unsigned long xlfd_mask; - void (*parse_args)(Html_Parser*, Html_Item*); - XawTextProperty *override; - XrmQuark ident; -} Html_TagInfo; - -struct _Html_Item { - XrmQuark ident; - XawTextPosition start, end; - Html_TagInfo *info; - - XawTextProperty *combine; - Bool override; - int li; - - XtPointer replace; - - Html_Item *parent, *child, *next; -}; - -struct _Html_Parser { - Widget source; - XawTextBlock block, replace; - XawTextPosition position, offset, start, end, last; - XrmQuark quark; - int i, ch, next; - Html_Item *item, *head; - XmuScanline *mask; - int space, pre, adnl, list, desc, column; - Bool spc; - XawTextBlock *entity; - - Pixel alink; -}; - -typedef struct _Html_SourceInfo Html_SourceInfo; -struct _Html_SourceInfo { - Widget source; - XawTextBlock block; - XawTextPosition last; - Html_SourceInfo *next; -}; - -/* - * Proptotypes - */ -void Html_ModeEnd(Widget); -static void Html_ModeInit(void); -static void Html_ParseCallback(Widget, XtPointer, XtPointer); -static Html_TagInfo *Html_GetInfo(char*); -static int Html_Get(Html_Parser*); -static int Html_Parse1(Html_Parser*); -static int Html_Parse2(Html_Parser*); -static void Html_ParseTag(Html_Parser*); -static void Html_Commit(Html_Parser*); -static void Html_AddEntities(Html_Parser*, Html_Item*); - -static int Html_Put(Html_Parser*, int); -static void Html_Puts(Html_Parser*, char*); -static int Html_Format1(Html_Parser*); -static int Html_Format2(Html_Parser*); -static int Html_Format3(Html_Parser*); -static void Html_FormatTag(Html_Parser*); - -static void Html_AArgs(Html_Parser*, Html_Item*); -static void Html_FontArgs(Html_Parser*, Html_Item*); - -/* - * Initialization - */ -static XrmQuark - Qbr, - Qdefault, - Qdd, - Qdl, - Qdt, - Qentity, - Qetag, - Qhide, - Qli, - Qol, - Qp, - Qpre, - Qspace, - Qtag, - Qul; - -static Html_TagInfo tag_info[] = { - {"a", 1, 0, 1, 0, 0, - 0, 0, - Html_AArgs}, - {"address", 1, 0, 1, 0, 0, - 0, XAW_TPROP_SLANT, - }, - {"b", 1, 0, 1, 0, 0, - 0, XAW_TPROP_WEIGHT, - }, - {"blockquote", 0, 1, 1, 1, 1, - 0, 0, - }, - {"body", 0, 0, 1, 0, 0, - 0, 0, - }, - {"br", 0, 0, 0, 0, 0, - }, - {"code", 1, 0, 1, 0, 0, - 0, XAW_TPROP_FAMILY | XAW_TPROP_PIXELSIZE, - }, - {"dd", 0, 1, 1, 0, 1, - 0, 0}, - {"dl", 0, 1, 1, 0, 0, - 0, 0, - }, - {"dt", 0, 0, 1, 0, 0, - 0, 0}, - {"em", 1, 0, 1, 0, 0, - 0, XAW_TPROP_SLANT, - }, - {"font", 1, 1, 1, 0, 0, - 0, 0, - Html_FontArgs}, - {"h1", 1, 0, 1, 1, 0, - 0, XAW_TPROP_WEIGHT | XAW_TPROP_PIXELSIZE, - }, - {"h2", 1, 0, 1, 1, 0, - 0, XAW_TPROP_WEIGHT | XAW_TPROP_PIXELSIZE, - }, - {"h3", 1, 0, 1, 1, 0, - 0, XAW_TPROP_WEIGHT | XAW_TPROP_PIXELSIZE, - }, - {"h4", 1, 0, 1, 1, 0, - 0, XAW_TPROP_WEIGHT | XAW_TPROP_PIXELSIZE, - }, - {"h5", 1, 0, 1, 1, 0, - 0, XAW_TPROP_WEIGHT | XAW_TPROP_PIXELSIZE, - }, - {"h6", 1, 0, 1, 1, 0, - 0, XAW_TPROP_WEIGHT | XAW_TPROP_PIXELSIZE, - }, - {"head", 0, 0, 1, 0, 0, - 0, 0, - }, - {"html", 0, 0, 1, 0, 0, - 0, 0, - }, - {"i", 1, 0, 1, 0, 0, - 0, XAW_TPROP_SLANT, - }, - {"kbd", 1, 0, 1, 0, 0, - 0, XAW_TPROP_FAMILY | XAW_TPROP_PIXELSIZE, - }, - {"li", 0, 0, 0, 0, 0, - 0, 0}, - {"ol", 0, 1, 1, 0, 1, - 0, 0, - }, - {"p", 0, 0, 0, 1, 0, - }, - {"pre", 1, 0, 1, 1, 0, - 0, XAW_TPROP_FAMILY | XAW_TPROP_PIXELSIZE, - }, - {"samp", 1, 0, 1, 0, 0, - 0, XAW_TPROP_FAMILY | XAW_TPROP_PIXELSIZE, - }, - {"strong", 1, 0, 1, 0, 0, - 0, XAW_TPROP_WEIGHT, - }, - {"tt", 1, 0, 1, 0, 0, - 0, XAW_TPROP_FAMILY | XAW_TPROP_PIXELSIZE, - }, - {"ul", 0, 1, 1, 0, 1, - 0, 0, - }, -}; - -static char *pnl = "

\n", *nlpnl = "\n

\n"; -static Html_SourceInfo *source_info; - -/* - * Implementation - */ -static char * -Html_GetText(Widget src, XawTextPosition position) -{ - char *result, *tempResult; - XawTextPosition offset = 0; - XawTextBlock text; - - tempResult = result = XtMalloc((unsigned)(position + 1)); - - while (offset < position) { - offset = XawTextSourceRead(src, offset, &text, position - offset); - if (!text.length) - break; - memcpy(tempResult, text.ptr, (unsigned)text.length); - tempResult += text.length; - } - - *tempResult = '\0'; - - return (result); -} - -void -Html_ModeStart(Widget src) -{ - Html_Parser *parser = XtNew(Html_Parser); - Html_Item *next, *item; - XColor color, exact; - Html_SourceInfo *info = XtNew(Html_SourceInfo); - - if (XAllocNamedColor(XtDisplay(toplevel), toplevel->core.colormap, - "blue", &color, &exact)) - parser->alink = color.pixel; - else - parser->alink = 0L; - - XtVaSetValues(src, XtNeditType, XawtextEdit, NULL); - - Html_ModeInit(); - - /* initialize parser state */ - parser->source = src; - parser->position = XawTextSourceRead(parser->source, 0, - &parser->block, 4096); - parser->replace.ptr = NULL; - parser->replace.firstPos = 0; - parser->replace.length = 0; - parser->replace.format = FMT8BIT; - parser->offset = -1; - parser->quark = NULLQUARK; - parser->i = 0; - parser->i = parser->ch = parser->next = 0; - parser->last = XawTextSourceScan(src, 0, XawstAll, XawsdRight, 1, 1); - if (parser->block.length == 0) - parser->ch = parser->next = EOF; - else - (void)Html_Get(parser); - parser->pre = 0; - parser->adnl = 1; - parser->list = parser->desc = parser->column = 0; - parser->spc = True; - - info->source = src; - info->block.ptr = Html_GetText(src, parser->last); - info->block.length = parser->last; - info->block.format = FMT8BIT; - info->block.firstPos = 0; - info->next = NULL; - if (source_info == NULL) - source_info = info; - else { - Html_SourceInfo *tmp = source_info; - - while (tmp->next) - tmp = tmp->next; - tmp->next = info; - } - - while (Html_Format1(parser) != EOF) - ; - XawTextSourceReplace(parser->source, 0, parser->last, &parser->replace); - XtFree(parser->replace.ptr); - - /* re-initialize parser state */ - parser->position = XawTextSourceRead(parser->source, 0, - &parser->block, 4096); - parser->offset = -1; - parser->quark = NULLQUARK; - parser->i = parser->ch = parser->next = 0; - parser->last = XawTextSourceScan(src, 0, XawstAll, XawsdRight, 1, 1); - info->last = parser->last; - if (parser->block.length == 0) - parser->ch = parser->next = EOF; - else - (void)Html_Get(parser); - parser->adnl = 1; - parser->list = parser->desc = parser->column = 0; - parser->spc = True; - parser->head = parser->item = NULL; - - parser->mask = XmuNewScanline(0, 0, 0); - - /* build html structure information */ - while (Html_Parse1(parser) != EOF) - ; - - /* create top level entity mask */ - (void)XmuScanlineNot(parser->mask, 0, parser->last); - - item = parser->item; - while (item) { - next = item->next; - Html_AddEntities(parser, item); - if (item->combine) - XtFree((XtPointer)item->combine); - XtFree((XtPointer)item); - item = next; - } - XmuDestroyScanline(parser->mask); - - XtVaSetValues(src, XtNeditType, XawtextRead, NULL); - - XtFree((XtPointer)parser); - - /* add callbacks for interactive changes */ - XtAddCallback(src, XtNpropertyCallback, Html_ParseCallback, NULL); -} - -void -Html_ModeEnd(Widget src) -{ - Html_SourceInfo *info, *pinfo; - - XtRemoveCallback(src, XtNpropertyCallback, Html_ParseCallback, NULL); - for (pinfo = info = source_info; info; pinfo = info, info = info->next) - if (info->source == src) - break; - - if (info == NULL) - return; - - XawTextSourceClearEntities(src, 0, info->last); - XtVaSetValues(src, XtNeditType, XawtextEdit, NULL); - XawTextSourceReplace(src, 0, info->last, &info->block); - XtVaSetValues(src, XtNeditType, XawtextRead, NULL); - - if (info == source_info) - source_info = source_info->next; - else - pinfo->next = info->next; - XtFree(info->block.ptr); - XtFree((XtPointer)info); -} - -static void -Html_ParseCallback(Widget w, XtPointer client_data, XtPointer call_data) -{ -} - -static int -bcmp_tag_info(_Xconst void *left, _Xconst void *right) -{ - return (strcmp((char*)left, ((Html_TagInfo*)right)->name)); -} - -static Html_TagInfo * -Html_GetInfo(char *name) -{ - return (bsearch(name, tag_info, sizeof(tag_info) / sizeof(tag_info[0]), - sizeof(Html_TagInfo), bcmp_tag_info)); -} - -static int -Html_Get(Html_Parser *parser) -{ - if (parser->ch == EOF) - return (EOF); - if (parser->i >= parser->block.length) { - parser->i = 0; - parser->position = XawTextSourceRead(parser->source, parser->position, - &parser->block, 4096); - } - parser->ch = parser->next; - if (parser->block.length == 0) - parser->next = EOF; - else - parser->next = (unsigned char)parser->block.ptr[parser->i++]; - parser->offset++; - - return (parser->ch); -} - -static void -Html_ModeInit(void) -{ - static int initialized; - int i; - - if (initialized) - return; - - Qbr = XrmPermStringToQuark("br"); - Qdd = XrmPermStringToQuark("dd"); - Qdefault = XrmPermStringToQuark("default"); - Qdl = XrmPermStringToQuark("dl"); - Qdt = XrmPermStringToQuark("dt"); - Qentity = XrmPermStringToQuark("entity"); - Qetag = XrmPermStringToQuark("/tag"); - Qhide = XrmPermStringToQuark("hide"); - Qli = XrmPermStringToQuark("li"); - Qol = XrmPermStringToQuark("ol"); - Qp = XrmPermStringToQuark("p"); - Qpre = XrmPermStringToQuark("pre"); - Qspace = XrmPermStringToQuark("space"); - Qtag = XrmPermStringToQuark("tag"); - Qul = XrmPermStringToQuark("ul"); - - for (i = 0; i < sizeof(tag_info) / sizeof(tag_info[0]); i++) - tag_info[i].ident = XrmPermStringToQuark(tag_info[i].name); - - initialized = True; -} - -/************************************************************************/ -/* PARSE */ -/************************************************************************/ -static void -Html_AddEntities(Html_Parser *parser, Html_Item *item) -{ - Html_Item *parent, *next, *child = item->child; - XmuSegment segment, *ent; - XmuScanline *mask = XmuNewScanline(0, 0, 0); - XawTextProperty *tprop, *property = NULL; - Widget sink; - Bool changed = False; - - /* combine properties */ - if (item->info && - (item->info->entity || - (item->parent && item->parent->ident != item->parent->info->ident))) { - sink = XawTextGetSink(text); - parent = item->parent; - property = XawTextSinkCopyProperty(sink, item->ident); - property->mask = item->info->mask; - property->xlfd_mask = item->info->xlfd_mask; - if (parent) { - (void)XawTextSinkCombineProperty(sink, property, - XawTextSinkGetProperty(sink, parent->ident), False); - if (item->combine && parent->combine) - (void)XawTextSinkCombineProperty(sink, item->combine, - parent->combine, - item->override); - } - if (item->combine) - XawTextSinkCombineProperty(sink, property, item->combine, True); - tprop = property; - property = XawTextSinkAddProperty(sink, property); - XtFree((XtPointer)tprop); - if (property && item->ident != property->identifier) { - item->ident = property->identifier; - changed = True; - } - } - - if (item->end < 0) { - if (item->next) - item->end = item->next->start; - else if (item->parent) - item->end = item->parent->end; - else - item->end = parser->last; - } - - while (child) { - next = child->next; - segment.x1 = child->start; - segment.x2 = child->end; - (void)XmuScanlineOrSegment(mask, &segment); - Html_AddEntities(parser, child); - if (child->combine) - XtFree((XtPointer)child->combine); - XtFree((XtPointer)child); - child = next; - } - - /* build entity mask */ - (void)XmuScanlineNot(mask, item->start, item->end); - (void)XmuScanlineAnd(mask, parser->mask); - - /* add entities */ - if (item->info && changed) { - for (ent = mask->segment; ent; ent = ent->next) - (void)XawTextSourceAddEntity(parser->source, 0, 0, NULL, ent->x1, - ent->x2 - ent->x1, item->ident); - } - else if (item->info == NULL) - (void)XawTextSourceAddEntity(parser->source, 0, - XAW_TENTF_READ | XAW_TENTF_REPLACE, - item->replace, item->start, - item->end - item->start, - item->parent->ident); - - /* set mask for parent entities */ - (void)XmuScanlineOr(parser->mask, mask); - XmuDestroyScanline(mask); - -#if 0 - if (item->info && item->info->para) { - XawTextSourceSetParagraph(parser->source, item->start, item->end, - 40, /* arbitrary value, for testing */ - 0, 0); - } -#endif -} - -static void -Html_Commit(Html_Parser *parser) -{ - XawTextPosition position; - int length; - - position = parser->start; - length = parser->end - parser->start; - if (position < 0) { - length += position; - position = 0; - } - if (position + length > parser->last + 1) - length -= (position + length) - parser->last + 1; - - if (parser->quark != Qdefault && parser->quark != NULLQUARK && length > 0) { - XmuSegment segment; - Html_Item *head = parser->head; - XrmQuark quark = parser->quark; - - parser->quark = Qdefault; - - if (quark == Qli && head && - (head->info->ident == Qol || head->info->ident == Qul)) { - if (parser->head == NULL || head->info->ident != Qol) - XawTextSourceAddEntity(parser->source, 0, /*XAW_TENT_BULLET,*/ - XAW_TENTF_HIDE, NULL, - position, length, Qli); - else - XawTextSourceAddEntity(parser->source, 0, /*XAW_TENT_LITEM,*/ - XAW_TENTF_HIDE, - (XtPointer)(long)head->li++, - position, length, Qli); - } - else if (quark == Qhide) - XawTextSourceAddEntity(parser->source, 0, XAW_TENTF_HIDE, NULL, - position, length, quark); - else if (quark == Qentity) { - if (head && head->end == -1) { - Html_Item *item, *it; - - item = XtNew(Html_Item); - item->ident = Qentity; - item->start = position; - item->end = position + length; - item->info = NULL; - item->combine = NULL; - item->override = False; - item->replace = (XtPointer)parser->entity; - item->child = item->next = NULL; - - it = head->child; - - item->parent = head; - if (it == NULL) - head->child = item; - else { - while (it->next) - it = it->next; - it->next = item; - } - - return; - } - XawTextSourceAddEntity(parser->source, 0, - XAW_TENTF_READ | XAW_TENTF_REPLACE, - (XtPointer)parser->entity, - position, length, Qentity); - } - - segment.x1 = position; - segment.x2 = position + length; - (void)XmuScanlineOrSegment(parser->mask, &segment); - } -} - -static void -Html_ParseTag(Html_Parser *parser) -{ - int ch, sz; - char buf[32]; - Html_TagInfo *info; - Html_Item *item = NULL; - XawTextPosition offset = parser->offset - 1; - - switch (Html_Peek(parser)) { - case '!': - (void)Html_Get(parser); /* eat `!' */ - if (Html_Peek(parser) == '-') { - /* comment */ - (void)Html_Get(parser); /* eat `-' */ - if (Html_Peek(parser) == '-') { - int count = 0; - - (void)Html_Get(parser); - while ((ch = Html_Peek(parser)) != EOF) { - if (ch == '>' && count >= 2) - break; - else if (ch == '-') - ++count; - else - count = 0; - (void)Html_Get(parser); - } - } - } - break; - case '?': - break; - case '/': - (void)Html_Get(parser); /* eat `/' */ - sz = 0; - while (isalnum(Html_Peek(parser)) && - ((sz + 1) < sizeof(buf))) - buf[sz++] = tolower(Html_Get(parser)); - buf[sz] = '\0'; - if ((info = Html_GetInfo(buf)) != NULL) { - if (parser->head) { - Html_Item *it = parser->head; - - while (it) { - if (it->info == info) - break; - it = it->parent; - } - - if (it) { - if (it == parser->head) - parser->head->end = offset; - else { - it->end = offset; - do { - parser->head->end = offset; - parser->head = parser->head->parent; - } while (parser->head != it); - } - if (parser->head->parent) - parser->head = parser->head->parent; - else - parser->head = parser->item; - } - } - } - break; - default: - sz = 0; - while (isalnum(Html_Peek(parser)) && - ((sz + 1) < sizeof(buf))) - buf[sz++] = tolower(Html_Get(parser)); - buf[sz] = '\0'; - if ((info = Html_GetInfo(buf)) != NULL) { - if (info->end == False) { - if (info->ident == Qli) - parser->quark = Qli; - if (!info->para) - break; /* no more processing required */ - } - item = XtNew(Html_Item); - item->info = info; - item->ident = item->info->ident; - item->combine = NULL; - item->override = False; - item->start = item->end = -1; - if (info->ident == Qol) - item->li = 1; - else - item->li = 0; - item->parent = item->child = item->next = NULL; - if (parser->item == NULL) - parser->item = parser->head = item; - else if (parser->head->end == -1) { - if (parser->head->info != item->info || info->nest) { - Html_Item *it = parser->head; - - /* first, see if we need to close a long list of tags */ - if (info->ident == Qdd) { - if (parser->head && - parser->head->info->ident == Qdt) { - parser->head->end = offset; - parser->head = parser->head->parent; - } - } - else if (info->ident == Qdt) { - if (parser->head && - parser->head->info->ident == Qdd) { - parser->head->end = offset; - parser->head = parser->head->parent; - } - } - else if (!info->nest) { - while (it) { - if (it->info == info || it->info->end) - break; - it = it->parent; - } - if (it) { - /* close the items */ - while (parser->head != it) { - if (parser->head->info->ident == Qpre) - --parser->pre; - parser->head->end = offset; - parser->head = parser->head->parent; - } - } - } - - /* add child item */ - it = parser->head->child; - - item->parent = parser->head; - if (it == NULL) - parser->head->child = item; - else { - while (it->next) - it = it->next; - it->next = item; - } - parser->head = item; - } - else { - /* close the `head' item and start a new one */ - Html_Item *it; - - parser->head->end = offset; - if (parser->head->parent) - parser->head = parser->head->parent; - else - parser->head = parser->item; - - if ((it = parser->head->child) != NULL) { - item->parent = parser->head; - while (it->next) - it = it->next; - it->next = item; - parser->head = item; - } - else { - parser->head->child = item; - parser->head = item; - } - } - } - else { - /* this is not common, but handle it */ - Html_Item *it = parser->item; - - while (it->next) - it = it->next; - it->next = item; - parser->head = item; - } - if (info->parse_args) - (info->parse_args)(parser, item); - } - break; - } - - /* skip anything not processed */ - while ((ch = Html_Peek(parser)) != '>' && ch != EOF) - (void)Html_Get(parser); - if (item && item->start == -1) - item->start = parser->offset + 1; -} - -/* tags */ -static int -Html_Parse2(Html_Parser *parser) -{ - int ch; - - for (;;) { - if ((ch = Html_Get(parser)) == '<') { - parser->end = parser->offset - 1; - Html_Commit(parser); - parser->quark = Qhide; - parser->start = parser->end; - - Html_ParseTag(parser); - - (void)Html_Get(parser); /* eat `>' */ - parser->end = parser->offset; - Html_Commit(parser); - } - else - return (ch); - } - /*NOTREACHED*/ -} - -/* entities */ -static int -Html_Parse1(Html_Parser *parser) -{ - static XawTextBlock *entities[256]; - static char chars[256]; - int ch; - - for (;;) { - if ((ch = Html_Parse2(parser)) == EOF) - return (EOF); - - if (ch == '&') { - unsigned char idx = '?'; - char buf[32]; - int sz = 0; - - /* the string comparisons need a big optmization! */ - parser->end = parser->offset - 1; - Html_Commit(parser); - parser->start = parser->end; - while ((ch = Html_Peek(parser)) != ';' - && ch != EOF && !isspace(ch)) { - ch = Html_Get(parser); - if (sz + 1 < sizeof(buf)) - buf[sz++] = ch; - } - buf[sz] = '\0'; - if (ch == ';') - (void)Html_Get(parser); - if (sz == 0) - idx = '&'; - else if (strcasecmp(buf, "lt") == 0) - idx = '<'; - else if (strcasecmp(buf, "gt") == 0) - idx = '>'; - else if (strcasecmp(buf, "nbsp") == 0) - idx = ' '; - else if (strcasecmp(buf, "amp") == 0) - idx = '&'; - else if (strcasecmp(buf, "quot") == 0) - idx = '"'; - else if (*buf == '#') { - if (sz == 1) - idx = '#'; - else { - char *tmp; - - idx = strtol(buf + 1, &tmp, 10); - if (*tmp) - idx = '?'; - } - } - else if (strcmp(buf + 1, "acute") == 0) { - switch (*buf) { - case 'a': idx = 0xe1; break; case 'e': idx = 0xe9; break; - case 'i': idx = 0xed; break; case 'o': idx = 0xf3; break; - case 'u': idx = 0xfa; break; case 'A': idx = 0xc1; break; - case 'E': idx = 0xc9; break; case 'I': idx = 0xcd; break; - case 'O': idx = 0xd3; break; case 'U': idx = 0xda; break; - case 'y': idx = 0xfd; break; case 'Y': idx = 0xdd; break; - } - } - else if (strcmp(buf + 1, "grave") == 0) { - switch (*buf) { - case 'a': idx = 0xe0; break; case 'e': idx = 0xe8; break; - case 'i': idx = 0xec; break; case 'o': idx = 0xf2; break; - case 'u': idx = 0xf9; break; case 'A': idx = 0xc0; break; - case 'E': idx = 0xc8; break; case 'I': idx = 0xcc; break; - case 'O': idx = 0xd2; break; case 'U': idx = 0xd9; break; - } - } - else if (strcmp(buf + 1, "tilde") == 0) { - switch (*buf) { - case 'a': idx = 0xe3; break; case 'o': idx = 0xf5; break; - case 'n': idx = 0xf1; break; case 'A': idx = 0xc3; break; - case 'O': idx = 0xd5; break; case 'N': idx = 0xd1; break; - } - } - else if (strcmp(buf + 1, "circ") == 0) { - switch (*buf) { - case 'a': idx = 0xe2; break; case 'e': idx = 0xea; break; - case 'i': idx = 0xee; break; case 'o': idx = 0xf4; break; - case 'u': idx = 0xfb; break; case 'A': idx = 0xc2; break; - case 'E': idx = 0xca; break; case 'I': idx = 0xce; break; - case 'O': idx = 0xd4; break; case 'U': idx = 0xdb; break; - } - } - else if (strcmp(buf + 1, "uml") == 0) { - switch (*buf) { - case 'a': idx = 0xe4; break; case 'e': idx = 0xeb; break; - case 'i': idx = 0xef; break; case 'o': idx = 0xf6; break; - case 'u': idx = 0xfc; break; case 'A': idx = 0xc4; break; - case 'E': idx = 0xcb; break; case 'I': idx = 0xfc; break; - case 'O': idx = 0xd6; break; case 'U': idx = 0xdc; break; - case 'y': idx = 0xff; break; - } - } - else if (strcmp(buf + 1, "cedil") == 0) { - switch (*buf) { - case 'c': idx = 0xe7; break; case 'C': idx = 0xc7; break; - } - } - else if (strcmp(buf + 1, "slash") == 0) { - switch (*buf) { - case 'o': idx = 0xf8; break; case 'O': idx = 0xd8; break; - } - } - else if (strcmp(buf + 1, "ring") == 0) { - switch (*buf) { - case 'a': idx = 0xe5; break; case 'A': idx = 0xc5; break; - } - } - else if (strcasecmp(buf, "iexcl") == 0) - idx = 0xa1; - else if (strcasecmp(buf, "cent") == 0) - idx = 0xa2; - else if (strcasecmp(buf, "pound") == 0) - idx = 0xa3; - else if (strcasecmp(buf, "curren") == 0) - idx = 0xa4; - else if (strcasecmp(buf, "yen") == 0) - idx = 0xa5; - else if (strcasecmp(buf, "brvbar") == 0) - idx = 0xa6; - else if (strcasecmp(buf, "sect") == 0) - idx = 0xa7; - else if (strcasecmp(buf, "uml") == 0) - idx = 0xa8; - else if (strcasecmp(buf, "copy") == 0) - idx = 0xa9; - else if (strcasecmp(buf, "ordf") == 0) - idx = 0xaa; - else if (strcasecmp(buf, "laquo") == 0) - idx = 0xab; - else if (strcasecmp(buf, "not") == 0) - idx = 0xac; - else if (strcasecmp(buf, "shy") == 0) - idx = 0xad; - else if (strcasecmp(buf, "reg") == 0) - idx = 0xae; - else if (strcasecmp(buf, "macr") == 0) - idx = 0xaf; - else if (strcasecmp(buf, "deg") == 0) - idx = 0xb0; - else if (strcasecmp(buf, "plusmn") == 0) - idx = 0xb1; - else if (strcasecmp(buf, "sup2") == 0) - idx = 0xb2; - else if (strcasecmp(buf, "sup3") == 0) - idx = 0xb3; - else if (strcasecmp(buf, "acute") == 0) - idx = 0xb4; - else if (strcasecmp(buf, "micro") == 0) - idx = 0xb5; - else if (strcasecmp(buf, "para") == 0) - idx = 0xb6; - else if (strcasecmp(buf, "middot") == 0) - idx = 0xb7; - else if (strcasecmp(buf, "cedil") == 0) - idx = 0xb8; - else if (strcasecmp(buf, "supl") == 0) - idx = 0xb9; - else if (strcasecmp(buf, "ordm") == 0) - idx = 0xba; - else if (strcasecmp(buf, "raquo") == 0) - idx = 0xbb; - else if (strcasecmp(buf, "frac14") == 0) - idx = 0xbc; - else if (strcasecmp(buf, "frac12") == 0) - idx = 0xbd; - else if (strcasecmp(buf, "frac34") == 0) - idx = 0xbe; - else if (strcasecmp(buf, "iquest") == 0) - idx = 0xbf; - else if (strcasecmp(buf, "AElig") == 0) - idx = 0xc6; - else if (strcasecmp(buf, "ETH") == 0) - idx = 0xd0; - else if (strcasecmp(buf, "THORN") == 0) - idx = 0xde; - else if (strcasecmp(buf, "szlig") == 0) - idx = 0xdf; - else if (strcasecmp(buf, "aelig") == 0) - idx = 0xe6; - else if (strcasecmp(buf, "eth") == 0) - idx = 0xf0; - else if (strcasecmp(buf, "thorn") == 0) - idx = 0xfe; - - parser->quark = Qentity; - if (entities[idx] == NULL) { - entities[idx] = XtNew(XawTextBlock); - entities[idx]->firstPos = 0; - entities[idx]->length = 1; - entities[idx]->ptr = chars + idx; - entities[idx]->format = FMT8BIT; - chars[idx] = idx; - } - parser->entity = entities[idx]; - parser->end = parser->offset; - Html_Commit(parser); - parser->start = parser->end; - } - } - /*NOTREACHED*/ -} - -/************************************************************************/ -/* FORMAT */ -/************************************************************************/ -static int -Html_Put(Html_Parser *parser, int ch) -{ - if (ch != '\r') { - if (parser->replace.length % 4096 == 0) - parser->replace.ptr = XtRealloc(parser->replace.ptr, - parser->replace.length + 4096); - parser->replace.ptr[parser->replace.length++] = ch; - } - - return (ch); -} - -static void -Html_Puts(Html_Parser *parser, char *str) -{ - int len = strlen(str); - - if (parser->replace.length % 4096 == 0 || - parser->replace.length + len > parser->replace.length + - (4096 - (parser->replace.length % 4096))) - parser->replace.ptr = XtRealloc(parser->replace.ptr, - parser->replace.length + 4096); - memcpy(parser->replace.ptr + parser->replace.length, str, len); - parser->replace.length += len; -} - -static void -Html_FormatTag(Html_Parser *parser) -{ - int ch = 0, sz = 0; - char buf[32]; - Html_TagInfo *info = NULL; - - switch (Html_Peek(parser)) { - case '!': - Html_Put(parser, '<'); - Html_Put(parser, Html_Get(parser)); /* eat `!' */ - if (Html_Peek(parser) == '-') { - /* comment */ - Html_Put(parser, Html_Get(parser)); /* eat `-' */ - if (Html_Peek(parser) == '-') { - int count = 0; - - Html_Put(parser, Html_Get(parser)); - while ((ch = Html_Peek(parser)) != EOF) { - if (ch == '>' && count >= 2) - break; - else if (ch == '-') - ++count; - else - count = 0; - Html_Put(parser, Html_Get(parser)); - } - (void)Html_Get(parser); /* eat `>' */ - Html_Put(parser, '>'); - return; - } - } - break; - case '?': - Html_Put(parser, '<'); - break; - case '/': - (void)Html_Get(parser); /* eat `/' */ - while (isalnum(Html_Peek(parser)) && - ((sz + 1) < sizeof(buf))) - buf[sz++] = ch = tolower(Html_Get(parser)); - buf[sz] = '\0'; - if ((info = Html_GetInfo(buf)) != NULL && info->adnl) { - if (info->ident == Qpre && parser->pre) { - if (--parser->pre == 0) - parser->column = 0; - } - parser->quark = Qetag; - parser->spc = True; - if (info->ident == Qp) { - while ((ch = Html_Peek(parser) != '>' && ch != EOF)) - (void)Html_Get(parser); - (void)Html_Get(parser); /* eat '>' */ - return; - } - } - else if (info) { - if (info->ident == Qol || info->ident == Qul) { - if (parser->list && --parser->list == 0 && - parser->desc == 0) { - parser->quark = Qetag; - Html_Put(parser, '\n'); - ++parser->adnl; - parser->column = 0; - } - } - else if (info->ident == Qdl) { - if (parser->desc && --parser->desc == 0 && - parser->list == 0) { - parser->quark = Qetag; - Html_Put(parser, '\n'); - ++parser->adnl; - parser->column = 0; - } - } - } - Html_Puts(parser, "adnl) { - if (info->ident == Qpre) - ++parser->pre; - if (parser->quark != Qtag) { - if (parser->adnl < 2) { - Html_Puts(parser, parser->adnl ? pnl : nlpnl); - parser->adnl = 2; - parser->spc = True; - parser->column = 0; - } - } - parser->quark = Qtag; - if (info->ident == Qp) { - while ((ch = Html_Peek(parser) != '>' && ch != EOF)) - (void)Html_Get(parser); - (void)Html_Get(parser); /* eat '>' */ - return; - } - } - else if (info) { - if (info->ident == Qol || info->ident == Qul) { - if (++parser->list == 1 && !parser->desc) { - if (parser->adnl < 2) { - Html_Puts(parser, parser->adnl ? pnl : nlpnl); - parser->adnl = 2; - parser->column = 0; - } - } - else if (parser->adnl == 0) { - Html_Put(parser, '\n'); - parser->adnl = 1; - parser->column = 0; - } - parser->spc = True; - } - else if (info->ident == Qli) { - if (parser->adnl == 0) { - Html_Put(parser, '\n'); - parser->adnl = 1; - parser->column = 0; - } - } - - else if (info->ident == Qdl) { - if (++parser->desc == 1 && !parser->list) { - if (parser->adnl < 2) { - Html_Puts(parser, parser->adnl ? pnl : nlpnl); - parser->adnl = 2; - parser->column = 0; - } - } - else if (parser->adnl == 0) { - Html_Put(parser, '\n'); - parser->adnl = 1; - parser->column = 0; - } - parser->spc = True; - } - else if (info->ident == Qdd) { - if (parser->desc == 0) { - if (parser->adnl < 2) { - Html_Puts(parser, parser->adnl ? pnl : nlpnl); - parser->adnl = 2; - parser->column = 0; - } - } - else if (parser->adnl == 0) { - Html_Put(parser, '\n'); - parser->adnl = 1; - parser->column = 0; - } - parser->spc = True; - } - else if (info->ident == Qdt) { - if (parser->adnl == 0) { - Html_Put(parser, '\n'); - parser->adnl = 1; - parser->spc = True; - parser->column = 0; - } - } - } - Html_Put(parser, '<'); - Html_Puts(parser, buf); - break; - } - - sz = 0; - while ((ch = Html_Peek(parser)) != '>' && ch != EOF) { - if (isspace(ch)) { - (void)Html_Get(parser); - ++sz; - continue; - } - else if (sz) { - Html_Put(parser, ' '); - sz = 0; - } - Html_Put(parser, Html_Get(parser)); - } - Html_Put(parser, Html_Get(parser)); /* eat `>' */ - if (info && info->ident == Qbr) { - ++parser->adnl; - parser->spc = True; - Html_Put(parser, '\n'); - parser->quark = info->ident; - parser->column = 0; - } -} - -/* tags */ -static int -Html_Format3(Html_Parser *parser) -{ - int ch; - - for (;;) { - if ((ch = Html_Get(parser)) == '<') { - if (parser->quark == Qspace && parser->spc == False) { - Html_Put(parser, ' '); - parser->spc = True; - } - -/* parser->quark = Qhide;*/ - Html_FormatTag(parser); - } - else - return (ch); - } - /*NOTREACHED*/ -} - -/* entities */ -static int -Html_Format2(Html_Parser *parser) -{ - int ch; - - for (ch = Html_Format3(parser); ch == '&'; ch = Html_Format3(parser)) { - Html_Put(parser, '&'); - while ((ch = Html_Peek(parser)) != ';') { - if (isspace(ch) || ch == EOF) - break; - Html_Put(parser, Html_Get(parser)); - } - if (ch != EOF) - Html_Put(parser, Html_Get(parser)); - else - break; - if (parser->pre) - ++parser->column; - } - - return (ch); -} - -/* spaces */ -static int -Html_Format1(Html_Parser *parser) -{ - int ch; - - for (;;) { - if ((ch = Html_Format2(parser)) == EOF) - return (ch); - - if (parser->quark == Qetag) { - if (parser->adnl < 2) { - Html_Puts(parser, parser->adnl ? pnl : nlpnl); - parser->adnl = 2; - parser->spc = True; - } - } - else if (parser->quark == Qspace && parser->spc == False) { - Html_Put(parser, ' '); - parser->spc = True; - } - - if (!parser->pre && isspace(ch)) - parser->quark = Qspace; - else { - if (parser->pre) { - if (parser->spc) { - /* did not yet see any non space character */ - if (isspace(ch)) { - if (ch == '\n') { - parser->column = 0; - parser->spc = False; - parser->adnl = 1; - } - else if (ch == '\t') - parser->column += 8 - (parser->column % 8); - else - ++parser->column; - continue; - } - else { - int column = parser->column; - - while (column-- > 0) - Html_Put(parser, ' '); - parser->spc = False; - parser->adnl = 0; - } - } - else if (ch == '\n') { - ++parser->adnl; - parser->column = 0; - } - else if (ch == '\t') { - int column = parser->column + (8 - (parser->column % 8)); - - parser->adnl = 0; - while (parser->column < column) { - Html_Put(parser, ' '); - ++parser->column; - } - continue; - } - else { - parser->adnl = 0; - ++parser->column; - } - } - else - parser->adnl = 0; - Html_Put(parser, ch); - parser->quark = Qdefault; - parser->spc = False; - } - } -} - -/************************************************************************/ -/* ARGUMENTS */ -/************************************************************************/ -static void -Html_AArgs(Html_Parser *parser, Html_Item *item) -{ - int ch, sz; - char buf[32]; - - /*CONSTCOND*/ - while (True) { - sz = 0; - while ((ch = Html_Peek(parser)) != '>' && ch != EOF) { - if (isalnum(ch)) - break; - else - (void)Html_Get(parser); - } - - if (ch == '>' || ch == EOF) - return; - buf[sz++] = tolower(Html_Get(parser)); - while ((ch = Html_Peek(parser)) != '>' && ch != EOF) - if (isalnum(ch)) - buf[sz++] = tolower(Html_Get(parser)); - else - break; - buf[sz] = '\0'; - if (strcmp(buf, "href") == 0) { - item->combine = XawTextSinkCopyProperty(XawTextGetSink(text), - item->info->ident); - item->override = True; - item->combine->xlfd_mask = 0L; - item->combine->mask = XAW_TPROP_UNDERLINE | XAW_TPROP_FOREGROUND; - item->combine->foreground = parser->alink; - return; - } - while ((ch = Html_Peek(parser)) != '>' && ch != EOF) { - if (isspace(ch)) - break; - else - (void)Html_Get(parser); - } - } -} - -static void -Html_FontArgs(Html_Parser *parser, Html_Item *item) -{ - int ch, sz; - char name[32], value[256], xlfd[128]; - - item->combine = XawTextSinkCopyProperty(XawTextGetSink(text), - Qdefault); - item->override = True; - item->combine->mask = item->combine->xlfd_mask = 0L; - - /*CONSTCOND*/ - while (True) { - /* skip white spaces */ - while ((ch = Html_Peek(parser)) != '>' && ch != EOF) { - if (isalnum(ch)) - break; - else - (void)Html_Get(parser); - } - - if (ch == '>' || ch == EOF) - return; - - /* read option name */ - sz = 0; - name[sz++] = tolower(Html_Get(parser)); - while ((ch = Html_Peek(parser)) != '>' && ch != EOF) - if (isalnum(ch) && (sz + 1 < sizeof(name))) - name[sz++] = tolower(Html_Get(parser)); - else - break; - name[sz] = '\0'; - - if (ch != '=') - continue; - (void)Html_Get(parser); /* skip `=' */ - if (Html_Peek(parser) == '"') - (void)Html_Get(parser); - - sz = 0; - while ((ch = Html_Peek(parser)) != '>' && ch != EOF) { - if (!isspace(ch) && (sz + 1 < sizeof(value))) - value[sz++] = Html_Get(parser); - else - break; - } - value[sz] = '\0'; - if (sz > 0 && value[sz - 1] == '"') - value[--sz] = '\0'; - - if (strcmp(name, "color") == 0) { - XColor color, exact; - - if (XAllocNamedColor(XtDisplay(toplevel), toplevel->core.colormap, - value, &color, &exact)) { - item->combine->mask |= XAW_TPROP_FOREGROUND; - item->combine->foreground = color.pixel; - } - } - else if (strcmp(name, "face") == 0) { - int count = 0; - char *ptr, *family, **font_list; - - ptr = value; - do { - family = ptr; - ptr = strchr(ptr, ','); - if (ptr) - *ptr++ = '\0'; - XmuSnprintf(xlfd, sizeof(xlfd), "-*-%s-*-*-*-*-*-*-*-*-*-*-*-*", - family); - font_list = XListFonts(XtDisplay(toplevel), xlfd, 1, &count); - if (font_list) - XFreeFontNames(font_list); - if (count) - break; - } while (ptr); - if (count) { - item->combine->xlfd_mask |= XAW_TPROP_FAMILY; - item->combine->family = XrmStringToQuark(family); - } - } - else if (strcmp(name, "size") == 0) { - int size, sign = 0; - - if (isalnum(*value)) { - size = atoi(value); - sign = 0; - } - else { - char *str = XrmQuarkToString(item->combine->pixel_size); - - size = str ? atoi(str) : 12; - if (*value == '+') { - size += atoi(value + 1); - sign = 1; - } - else if (*value == '-') { - size -= atoi(value + 1); - sign = -1; - } - } - - if (item->combine->xlfd != NULLQUARK) { - int count, ucount, dcount, usize, dsize; - char **current, **result, **up, **down; - - current = result = up = down = NULL; - /* try to load an appropriate font */ - XmuSnprintf(value, sizeof(value), - "-*-%s-%s-%s-*--%%d-*-*-*-*-*-%s-%s", - XrmQuarkToString(item->combine->family), - XrmQuarkToString(item->combine->weight), - XrmQuarkToString(item->combine->slant), - XrmQuarkToString(item->combine->registry), - XrmQuarkToString(item->combine->encoding)); - XmuSnprintf(xlfd, sizeof(xlfd), value, - atoi(XrmQuarkToString(item->combine->pixel_size))); - current = XListFonts(XtDisplay(toplevel), xlfd, 1, &count); - if (count) { - ucount = dcount = usize = dsize = 0; - - XmuSnprintf(xlfd, sizeof(xlfd), value, size); - result = XListFonts(XtDisplay(toplevel), xlfd, 1, &count); - if (count == 0 || strstr(*result, "-0-")) { - if (sign <= 0) { - sz = dsize = size; - while (dcount == 0 && --sz > size - 8 && sz > 1) { - XmuSnprintf(xlfd, sizeof(xlfd), value, sz); - down = XListFonts(XtDisplay(toplevel), xlfd, - 1, &dcount); - if (dcount && strstr(*down, "-0-") != NULL) { - XFreeFontNames(down); - down = NULL; - dcount = 0; - } - } - if (dcount) - dsize = sz; - } - if (sign >= 0) { - sz = usize = size; - while (ucount == 0 && ++sz < size + 8) { - XmuSnprintf(xlfd, sizeof(xlfd), value, sz); - up = XListFonts(XtDisplay(toplevel), xlfd, - 1, &ucount); - if (ucount && strstr(*up, "-0-") != NULL) { - XFreeFontNames(up); - up = NULL; - ucount = 0; - } - } - if (ucount) - usize = sz; - } - if (ucount && dcount) - size = size - dsize < usize - size ? dsize : usize; - else if (ucount) - size = usize; - else if (dcount) - size = dsize; - } - if (current) - XFreeFontNames(current); - if (result) - XFreeFontNames(result); - if (up) - XFreeFontNames(up); - if (down) - XFreeFontNames(down); - } - } - - XmuSnprintf(value, sizeof(value), "%d", size); - item->combine->xlfd_mask |= XAW_TPROP_PIXELSIZE; - item->combine->pixel_size = XrmStringToQuark(value); - } - - while ((ch = Html_Peek(parser)) != '>' && ch != EOF) { - if (isspace(ch)) - break; - else - (void)Html_Get(parser); - } - } -} diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/help.h b/xorg-server/hw/xfree86/utils/xorgcfg/help.h deleted file mode 100644 index 141f50402..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/help.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - */ - -/* help string definitions */ -#define HELP_DEVICES "helpDevices" /* Configure Layout */ -#define HELP_SCREEN "helpScreen" /* Configure Screen */ -#define HELP_MODELINE "helpModeline" /* Configure Modeline */ -#define HELP_ACCESSX "helpAccessX" /* Configure AccessX */ - -/* - * Prototypes - */ -void Help(char*); -void HelpCancelAction(Widget, XEvent*, String*, Cardinal*); diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/interface.c b/xorg-server/hw/xfree86/utils/xorgcfg/interface.c deleted file mode 100644 index cb39624ca..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/interface.c +++ /dev/null @@ -1,2278 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "xf86config.h" -#include "mouse-cfg.h" -#include "keyboard-cfg.h" -#include "card-cfg.h" -#include "monitor-cfg.h" -#include "screen-cfg.h" -#include "screen.h" -#include "cards.h" -#include "options.h" -#include "vidmode.h" -#include "help.h" -#include "stubs.h" - -#define randomize() srand((unsigned)time((time_t*)NULL)) -#ifdef PROJECT_ROOT -#define DefaultXFree86Dir PROJECT_ROOT -#else -#define DefaultXFree86Dir "/usr" -#endif - -#define IS_KBDDRIV(S) ((strcasecmp((S),"kbd") == 0)) - -/* - * Prototypes - */ -void DrawCables(void); -static void DrawCable(Display*, Window, int, int, int, int); -static void ComputerEventHandler(Widget, XtPointer, XEvent*, Boolean*); -void SelectDeviceAction(Widget, XEvent*, String*, Cardinal*); -void MoveDeviceAction(Widget, XEvent*, String*, Cardinal*); -void UnselectDeviceAction(Widget, XEvent*, String*, Cardinal*); -void RenameLayoutAction(Widget, XEvent*, String*, Cardinal*); -void DevicePopupMenu(Widget, XEvent*, String*, Cardinal*); -void DevicePopdownMenu(Widget, XEvent*, String*, Cardinal*); -void AddDeviceCallback(Widget, XtPointer, XtPointer); -void QuitCallback(Widget, XtPointer, XtPointer); -void SmeConfigureDeviceCallback(Widget, XtPointer, XtPointer); -void ConfigureDeviceCallback(Widget, XtPointer, XtPointer); -void EnableDeviceCallback(Widget, XtPointer, XtPointer); -void DisableDeviceCallback(Widget, XtPointer, XtPointer); -void RemoveDeviceCallback(Widget, XtPointer, XtPointer); -void InitializeDevices(void); -void SetConfigModeCallback(Widget, XtPointer, XtPointer); -void SelectLayoutCallback(Widget, XtPointer, XtPointer); -void DefaultLayoutCallback(Widget, XtPointer, XtPointer); -void RemoveLayoutCallback(Widget, XtPointer, XtPointer); -void OptionsCallback(Widget, XtPointer, XtPointer); -xf86cfgDevice *AddDevice(int, XtPointer, int, int); -static Bool AskConfig(void); -void WriteConfigAction(Widget, XEvent*, String*, Cardinal*); -static void ScreenSetup(Bool); -void QuitAction(Widget, XEvent*, String*, Cardinal*); -void PopdownErrorCallback(Widget, XtPointer, XtPointer); -static void ErrorCancelAction(Widget, XEvent*, String*, Cardinal*); -static void QuitCancelAction(Widget, XEvent*, String*, Cardinal*); -static void HelpCallback(Widget, XtPointer, XtPointer); -void UpdateMenuDeviceList(int); - -extern void AccessXConfigureStart(void); -extern void AccessXConfigureEnd(void); -extern void CloseAccessXAction(Widget, XEvent*, String*, Cardinal*); - -#ifdef HAS_NCURSES -extern void TextMode(void); -#endif - -static void Usage(void); - -/* - * Initialization - */ -Widget toplevel, work, config, layout, layoutsme, layoutp, topMenu; -XtAppContext appcon; - -Pixmap menuPixmap; - -char *XF86Config_path = NULL; -char *XF86Module_path = NULL; -char *XFree86_path = NULL; -char *XF86Font_path = NULL; -char *XF86RGB_path = NULL; -char *XkbConfig_path = NULL; -char *XFree86Dir; -static char XF86Config_path_static[1024]; -static char XkbConfig_path_static[1024]; -Bool xf86config_set = False; - -int textmode = False; -#ifdef USE_MODULES -int nomodules = False; -#endif -int noverify = False; - -xf86cfgComputer computer; -xf86cfgDevice cpu_device; -Cursor no_cursor; -static Widget device, layoutm, popup, commands; -static int xpos, ypos; -int sxpos, sypos; -static char no_cursor_data[] = { 0,0,0,0, 0,0,0,0 }; -static GC cablegc, cablegcshadow; -Atom wm_delete_window; -static Bool config_set = False; -static Widget mouseSme, mouseMenu, keyboardSme, keyboardMenu, - cardSme, cardMenu, monitorSme, monitorMenu; - -int config_mode = CONFIG_LAYOUT; - -static XtActionsRec actions[] = { - {"filter-card", CardFilterAction}, - {"select-device", SelectDeviceAction}, - {"move-device", MoveDeviceAction}, - {"unselect-device", UnselectDeviceAction}, - {"device-popup", DevicePopupMenu}, - {"device-popdown", DevicePopdownMenu}, - {"rename-layout", RenameLayoutAction}, - {"write-config", WriteConfigAction}, - {"quit", QuitAction}, - {"vidmode-restore", VidmodeRestoreAction}, - {"config-cancel", ConfigCancelAction}, - {"options-cancel", OptionsCancelAction}, - {"error-cancel", ErrorCancelAction}, - {"quit-cancel", QuitCancelAction}, - {"addmode-cancel", CancelAddModeAction}, - {"accessx-close", CloseAccessXAction}, - {"testmode-cancel", CancelTestModeAction}, - {"help-close", HelpCancelAction}, - {"expert-close", ExpertCloseAction}, -#ifdef USE_MODULES - {"module-options-close", ModuleOptionsCancelAction}, -#endif -}; - -static char *device_names[] = { -/* MOUSE */ - "mouse", -/* KEYBOARD */ - "keyboard", -/* CARD */ - "card", -/* MONITOR */ - "monitor", -/* SCREEN */ - "screen", -}; - -static XtResource appResources[] = { -#if 0 - {"config", __XCONFIGFILE__, XtRString, sizeof(char*), - 0, XtRString, "/etc/X11/"__XCONFIGFILE__}, -#endif - {"menuBitmap", "MenuBitmap", XtRString, sizeof(char*), - 0, XtRString, "menu10"}, -}; - -static void -Usage(void) -{ - fprintf(stderr, -"Usage:\n" -" xorgcfg [-option ...]\n" -"\n" -"Options:\n" -" -config <"__XCONFIGFILE__"> Alternate configuration file.\n" -" -modulepath "__XSERVERNAME__" modules location.\n" -" -serverpath X server to start (if $DISPLAY is not defined).\n" -" -fontpath Font path for fonts.\n" -#ifdef HAS_NCURSES -" -textmode Use this option for the text only interface.\n" -#endif -#ifdef USE_MODULES -" -nomodules Use this option if xorgcfg is slow to start.\n" -" -verbose Verbosity used in the loader (default 1).\n" -#endif -" -verify Verify modules/options integrity.\n" -); - - exit(1); -} - -/* - * Implementation - */ -int -main(int argc, char *argv[]) -{ - Widget pane, hpane, expert, popup, mouse, keyboard, card, monitor; - Widget bottom, sme, smemodeline, help, quit, layopt; - XColor color, tmp; - Pixmap pixmap; - XGCValues values; - XF86ConfLayoutPtr lay; - int i, startedx; - char *menuPixmapPath = NULL; - XrmValue from, to; - - if ((XFree86Dir = getenv("XWINHOME")) == NULL) - XFree86Dir = DefaultXFree86Dir; - - chdir(XFree86Dir); - -#ifdef USE_MODULES - xf86Verbose = 1; -#endif - noverify = True; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-config") == 0 || - strcmp(argv[i], "-xorgconfig") == 0 || - strcmp(argv[i], "-xf86config") == 0) { - if (i + 1 < argc) { - XF86Config_path = argv[++i]; - config_set = True; - } - } else if (strcmp(argv[i], "-modulepath") == 0) { - if (i + 1 < argc) - XF86Module_path = argv[++i]; - } else if (strcmp(argv[i], "-serverpath") == 0) { - if (i + 1 < argc) - XFree86_path = argv[++i]; - } else if (strcmp(argv[i], "-fontpath") == 0) { - if (i + 1 < argc) - XF86Font_path = argv[++i]; - } -#ifdef HAS_NCURSES - else if (strcmp(argv[i], "-textmode") == 0) - textmode = True; -#endif -#ifdef USE_MODULES - else if (strcmp(argv[i], "-nomodules") == 0) - nomodules = True; - else if (strcmp(argv[i], "-verbose") == 0) { - if (i + 1 < argc) - xf86Verbose = atoi(argv[++i]); - } -#endif - else if (strcmp(argv[i], "-verify") == 0) - noverify = False; - else - Usage(); - } - -#ifdef HAS_NCURSES - if (textmode) { - TextMode(); - exit(0); - } -#endif - - startedx = startx(); - if (XF86Config_path == NULL) - XF86Config_path = XtNewString(__XCONFIGFILE__); - if (XkbConfig_path == NULL) { - XmuSnprintf(XkbConfig_path_static, sizeof(XkbConfig_path_static), - "%s/%s%s", XFree86Dir, XkbConfigDir, XkbConfigFile); - XkbConfig_path = XkbConfig_path_static; - } - toplevel = XtAppInitialize(&appcon, "XOrgCfg", - NULL, 0, - &argc, argv, - NULL, NULL, 0); - if (DPY == NULL) - DPY = XtDisplay(toplevel); - - XtGetApplicationResources(toplevel, (XtPointer)&menuPixmapPath, - appResources, XtNumber(appResources), NULL, 0); - if (menuPixmapPath && strlen(menuPixmapPath)) { - from.size = strlen(menuPixmapPath); - from.addr = menuPixmapPath; - to.size = sizeof(Pixmap); - to.addr = (XtPointer)&(menuPixmap); - XtConvertAndStore(toplevel, XtRString, &from, XtRBitmap, &to); - } - - XtAppAddActions(appcon, actions, XtNumber(actions)); - - XawSimpleMenuAddGlobalActions(appcon); - XtRegisterGrabAction(DevicePopupMenu, True, - ButtonPressMask | ButtonReleaseMask, - GrabModeAsync, GrabModeAsync); - - pane = XtCreateManagedWidget("pane", panedWidgetClass, - toplevel, NULL, 0); - hpane = XtVaCreateManagedWidget("hpane", panedWidgetClass, pane, - XtNorientation, XtorientHorizontal, NULL); - topMenu = XtCreateManagedWidget("topM", menuButtonWidgetClass, - hpane, NULL, 0); - expert = XtCreateManagedWidget("expert", commandWidgetClass, hpane, NULL, 0); - XtAddCallback(expert, XtNcallback, ExpertCallback, NULL); - popup = XtCreatePopupShell("menu", simpleMenuWidgetClass, - topMenu, NULL, 0); - sme = XtCreateManagedWidget("layout", smeBSBObjectClass, - popup, NULL, 0); - XtAddCallback(sme, XtNcallback, SetConfigModeCallback, - (XtPointer)CONFIG_LAYOUT); - sme = XtCreateManagedWidget("screen", smeBSBObjectClass, - popup, NULL, 0); - XtAddCallback(sme, XtNcallback, SetConfigModeCallback, - (XtPointer)CONFIG_SCREEN); - smemodeline = XtCreateManagedWidget("modeline", smeBSBObjectClass, - popup, NULL, 0); - XtAddCallback(smemodeline, XtNcallback, SetConfigModeCallback, - (XtPointer)CONFIG_MODELINE); - sme = XtCreateManagedWidget("accessx", smeBSBObjectClass, - popup, NULL, 0); - XtAddCallback(sme, XtNcallback, SetConfigModeCallback, - (XtPointer)CONFIG_ACCESSX); - - commands = XtCreateManagedWidget("commands", formWidgetClass, - pane, NULL, 0); - - mouse = XtVaCreateManagedWidget("mouse", menuButtonWidgetClass, - commands, XtNmenuName, "mouseP", NULL); - popup = XtCreatePopupShell("mouseP", simpleMenuWidgetClass, - mouse, NULL, 0); - sme = XtCreateManagedWidget("new", smeBSBObjectClass, - popup, NULL, 0); - XtAddCallback(sme, XtNcallback, AddDeviceCallback, (XtPointer)MOUSE); - mouseSme = XtCreateManagedWidget("configure", smeBSBObjectClass, - popup, NULL, 0); - XtAddCallback(mouseSme, XtNcallback, SmeConfigureDeviceCallback, - (XtPointer)MOUSE); - - keyboard = XtVaCreateManagedWidget("keyboard", menuButtonWidgetClass, - commands, XtNmenuName, "keyboardP", NULL); - popup = XtCreatePopupShell("keyboardP", simpleMenuWidgetClass, - keyboard, NULL, 0); - sme = XtCreateManagedWidget("new", smeBSBObjectClass, - popup, NULL, 0); - XtAddCallback(sme, XtNcallback, AddDeviceCallback, (XtPointer)KEYBOARD); - keyboardSme = XtCreateManagedWidget("configure", smeBSBObjectClass, - popup, NULL, 0); - XtAddCallback(keyboardSme, XtNcallback, SmeConfigureDeviceCallback, - (XtPointer)KEYBOARD); - - card = XtVaCreateManagedWidget("card", menuButtonWidgetClass, - commands, XtNmenuName, "cardP", NULL); - popup = XtCreatePopupShell("cardP", simpleMenuWidgetClass, - card, NULL, 0); - sme = XtCreateManagedWidget("new", smeBSBObjectClass, - popup, NULL, 0); - XtAddCallback(sme, XtNcallback, AddDeviceCallback, (XtPointer)CARD); - cardSme = XtCreateManagedWidget("configure", smeBSBObjectClass, - popup, NULL, 0); - XtAddCallback(cardSme, XtNcallback, SmeConfigureDeviceCallback, - (XtPointer)CARD); - - monitor = XtVaCreateManagedWidget("monitor", menuButtonWidgetClass, - commands, XtNmenuName, "monitorP", NULL); - popup = XtCreatePopupShell("monitorP", simpleMenuWidgetClass, - monitor, NULL, 0); - sme = XtCreateManagedWidget("new", smeBSBObjectClass, - popup, NULL, 0); - XtAddCallback(sme, XtNcallback, AddDeviceCallback, (XtPointer)MONITOR); - monitorSme = XtCreateManagedWidget("configure", smeBSBObjectClass, - popup, NULL, 0); - XtAddCallback(monitorSme, XtNcallback, SmeConfigureDeviceCallback, - (XtPointer)MONITOR); - - work = XtCreateManagedWidget("work", compositeWidgetClass, - pane, NULL, 0); - - bottom = XtCreateManagedWidget("bottom", formWidgetClass, - pane, NULL, 0); - layoutm = XtCreateManagedWidget("select", menuButtonWidgetClass, - bottom, NULL, 0); - layout = XtVaCreateManagedWidget("layout", asciiTextWidgetClass, - bottom, - XtNeditType, XawtextEdit, - NULL); - layoutp = XtCreatePopupShell("menu", simpleMenuWidgetClass, - bottom, NULL, 0); - sme = XtCreateManagedWidget("new", smeBSBObjectClass, layoutp, - NULL, 0); - XtAddCallback(sme, XtNcallback, SelectLayoutCallback, NULL); - help = XtCreateManagedWidget("help", commandWidgetClass, - bottom, NULL, 0); - XtAddCallback(help, XtNcallback, HelpCallback, NULL); - quit = XtCreateManagedWidget("quit", commandWidgetClass, - bottom, NULL, 0); - XtAddCallback(quit, XtNcallback, QuitCallback, NULL); - - XtRealizeWidget(toplevel); - XtRealizeWidget(topMenu); - - pixmap = XCreateBitmapFromData(XtDisplay(toplevel), XtWindow(toplevel), - no_cursor_data, 8, 8); - XAllocNamedColor(XtDisplay(toplevel), toplevel->core.colormap, "black", - &color, &tmp); - no_cursor = XCreatePixmapCursor(XtDisplay(toplevel), pixmap, pixmap, - &color, &color, 0, 0); - - XAllocNamedColor(XtDisplay(toplevel), toplevel->core.colormap, "gray55", - &color, &tmp); - values.line_width = 3; - values.foreground = color.pixel; - cablegcshadow = XCreateGC(XtDisplay(toplevel), XtWindow(toplevel), - GCForeground | GCLineWidth, &values); - XAllocNamedColor(XtDisplay(toplevel), toplevel->core.colormap, "gray85", - &color, &tmp); - values.line_width = 1; - values.foreground = color.pixel; - cablegc = XCreateGC(XtDisplay(toplevel), XtWindow(toplevel), - GCForeground | GCLineWidth, &values); - - computer.cpu = XtCreateManagedWidget("cpu", simpleWidgetClass, - work, NULL, 0); - cpu_device.widget = computer.cpu; - cpu_device.type = SERVER; - - XtAddEventHandler(work, ExposureMask, False, - ComputerEventHandler, (XtPointer)NULL); - - wm_delete_window = XInternAtom(DPY, "WM_DELETE_WINDOW", False); - XSetWMProtocols(DPY, XtWindow(toplevel), &wm_delete_window, 1); - - StartConfig(); - InitializeDevices(); - UpdateMenuDeviceList(MOUSE); - UpdateMenuDeviceList(KEYBOARD); - UpdateMenuDeviceList(CARD); - UpdateMenuDeviceList(MONITOR); - XtSetSensitive(smemodeline, VideoModeInitialize()); - - lay = XF86Config->conf_layout_lst; - while (lay != NULL) { - sme = XtVaCreateManagedWidget("sme", smeBSBObjectClass, - layoutp, - XtNlabel, lay->lay_identifier, - XtNmenuName, lay->lay_identifier, - XtNleftBitmap, menuPixmap, - NULL); - XtAddCallback(sme, XtNcallback, SelectLayoutCallback, (XtPointer)lay); - if (layoutsme == NULL) - layoutsme = sme; - layopt = XtCreatePopupShell(lay->lay_identifier, simpleMenuWidgetClass, - layoutp, NULL, 0); - sme = XtCreateManagedWidget("default", smeBSBObjectClass, - layopt, NULL, 0); - XtAddCallback(sme, XtNcallback, DefaultLayoutCallback, NULL); - sme = XtCreateManagedWidget("remove", smeBSBObjectClass, - layopt, NULL, 0); - XtAddCallback(sme, XtNcallback, RemoveLayoutCallback, NULL); - XtRealizeWidget(layopt); - - lay = (XF86ConfLayoutPtr)(lay->list.next); - } - SelectLayoutCallback(layoutsme, - XF86Config->conf_layout_lst, NULL); - - startaccessx(); - if (startedx) { - switch (fork()) { - case 0: { - char path[PATH_MAX]; - - XmuSnprintf(path, sizeof(path), "%s/bin/twm", XFree86Dir); - execl(path, "twm", (void *)NULL); - exit(-127); - } break; - case -1: - fprintf(stderr, "Cannot fork.\n"); - exit(1); - break; - default: - break; - } - } - -#ifdef USE_MODULES - if (!nomodules) - LoaderInitializeOptions(); -#endif - - /* ReadCardsDatabase() must be called after LoaderInitializeOptions() */ - ReadCardsDatabase(); - - if (!config_set && startedx) { - XtFree(XF86Config_path); -#ifndef XF86CONFIG -# define XF86CONFIG __XCONFIGFILE__ -#endif -#ifdef XF86CONFIGDIR - XF86Config_path = XtNewString(XF86CONFIGDIR "/" XF86CONFIG); -#else - XF86Config_path = XtNewString("/etc/X11/" XF86CONFIG); -#endif - } - XtAppMainLoop(appcon); - if (startedx) - endx(); - - return (0); -} - -static Widget shell_cf; -static int write_cf, asking_cf; -static int cf_state = 0; -#define CF_XF86Config 1 -#define CF_XKBConfig 2 -#define CF_First CF_XF86Config -#define CF_Last CF_XKBConfig - -/*ARGSUSED*/ -static void -WriteConfig(Widget w, XtPointer user_data, XtPointer call_data) -{ - asking_cf = 0; - XtPopdown(shell_cf); - write_cf = (long)user_data; -} - -/*ARGSUSED*/ -void -QuitCancelAction(Widget w, XEvent *event, String *params, Cardinal *num_params) -{ - WriteConfig(w, (XtPointer)-1, NULL); -} - -/*ARGSUSED*/ -void -WriteConfigAction(Widget w, XEvent *event, - String *params, Cardinal *num_params) -{ - WriteConfig(w, (XtPointer)True, NULL); -} - -static Bool -AskConfig(void) -{ - static Widget dialog; - - if (shell_cf == NULL) { - Arg args[1]; - char *l, *label; - int len; - - shell_cf = XtCreatePopupShell("quit", transientShellWidgetClass, - toplevel, NULL, 0); - dialog = XtVaCreateManagedWidget("ask", dialogWidgetClass, shell_cf, - XtNvalue, XF86Config_path, NULL); - XawDialogAddButton(dialog, "yes", WriteConfig, (XtPointer)1); - XawDialogAddButton(dialog, "no", WriteConfig, (XtPointer)0); - XawDialogAddButton(dialog, "cancel", WriteConfig, (XtPointer)-1); - XtRealizeWidget(shell_cf); - XSetWMProtocols(DPY, XtWindow(shell_cf), &wm_delete_window, 1); - XtSetArg(args[0], XtNlabel, &l); - XtGetValues(dialog, args, 1); - label = XtMalloc(len = (strlen(l) + strlen(XF86CONFIG) + 2)); - XmuSnprintf(label, len, "%s\n", XF86CONFIG); - strcat(label, l); - XtSetArg(args[0], XtNlabel, label); - XtSetValues(dialog, args, 1); - XtFree(label); - } - else { - Arg args[2]; - Cardinal num_args = 0; - char *l, *label = NULL, *str = ""; - - XtSetArg(args[0], XtNlabel, &l); - XtGetValues(dialog, args, 1); - switch (cf_state) { - case CF_XF86Config: - str = XF86CONFIG; - XtSetArg(args[num_args], XtNvalue, XF86Config_path); - ++num_args; - break; - case CF_XKBConfig: - str = "XKB"; - XtSetArg(args[num_args], XtNvalue, XkbConfig_path); - ++num_args; - break; - } - l = strchr(l, '\n'); - if (l != NULL) { - label = XtMalloc(strlen(str) + strlen(l) + 1); - strcpy(label, str); - strcat(label, l); - XtSetArg(args[num_args], XtNlabel, label); - ++num_args; - } - XtSetValues(dialog, args, num_args); - if (l != NULL) - XtFree(label); - } - - asking_cf = 1; - - XtPopup(shell_cf, XtGrabExclusive); - while (asking_cf) - XtAppProcessEvent(XtWidgetToApplicationContext(shell_cf), XtIMAll); - - if (write_cf > 0) { - switch (cf_state) { - case CF_XF86Config: - XF86Config_path = XawDialogGetValueString(dialog); - XmuSnprintf(XF86Config_path_static, - sizeof(XF86Config_path_static), - "%s", XF86Config_path); - XF86Config_path = XF86Config_path_static; - break; - case CF_XKBConfig: - XkbConfig_path = XawDialogGetValueString(dialog); - XmuSnprintf(XkbConfig_path_static, - sizeof(XkbConfig_path_static), - "%s", XkbConfig_path); - XkbConfig_path = XkbConfig_path_static; - break; - } - } - - return (write_cf); -} - -/*ARGSUSED*/ -void -PopdownErrorCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - XtPopdown((Widget)user_data); -} - -/*ARGSUSED*/ -void -ErrorCancelAction(Widget w, XEvent *event, String *params, Cardinal *num_params) -{ - XtPopdown((Widget)w); -} - -/*ARGSUSED*/ -void -QuitAction(Widget w, XEvent *event, String *params, Cardinal *num_params) -{ - QuitCallback(w, NULL, NULL); -} - -/*ARGSUSED*/ -void -QuitCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - for (cf_state = CF_First; cf_state <= CF_Last; cf_state++) { - if (cf_state == CF_XKBConfig && xkb_info == NULL) - continue; - - switch (AskConfig()) { - case 0: - break; - case 1: - if ((cf_state == CF_XF86Config && - !xf86writeConfigFile(XF86Config_path, XF86Config)) || - (cf_state == CF_XKBConfig && - !WriteXKBConfiguration(XkbConfig_path, - &xkb_info->config))) { - static Widget shell; - - if (shell == NULL) { - Widget dialog; - - shell = XtCreatePopupShell("error", - transientShellWidgetClass, - toplevel, NULL, 0); - dialog = XtVaCreateManagedWidget("notice", - dialogWidgetClass, - shell, XtNvalue, NULL, - NULL); - XawDialogAddButton(dialog, "ok", PopdownErrorCallback, - (XtPointer)shell); - XtRealizeWidget(shell); - XSetWMProtocols(DPY, XtWindow(shell), - &wm_delete_window, 1); - } - XtPopup(shell, XtGrabExclusive); - return; - } - break; - default: - return; - } - } - - endx(); - exit(0); -} - -void -InitializeDevices(void) -{ - xf86cfgDevice *device; - int mouse_x, mouse_y, keyboard_x, keyboard_y, - card_x, card_y, monitor_x, monitor_y, len; - XF86ConfInputPtr input = XF86Config->conf_input_lst; - XF86ConfDevicePtr card = XF86Config->conf_device_lst; - XF86ConfMonitorPtr monitor = XF86Config->conf_monitor_lst; - XF86OptionPtr flags = NULL; - char buffer[4096], *tip; - Arg args[1]; - - if (XF86Config->conf_flags != NULL) - flags = XF86Config->conf_flags->flg_option_lst; - - len = 0; - while (flags && len < sizeof(buffer) - 1) { - len += XmuSnprintf(buffer + len, sizeof(buffer) - len, - "Option \"%s\"", - flags->opt_name); - if (flags->opt_val != NULL) - len += XmuSnprintf(buffer + len, sizeof(buffer) - len, - " \"%s\"\n", - flags->opt_val); - else - len += XmuSnprintf(buffer + len, sizeof(buffer) - len, - "%s", "\n"); - flags = (XF86OptionPtr)(flags->list.next); - } - - if (len) { - tip = XtNewString(buffer); - XtSetArg(args[0], XtNtip, tip); - XtSetValues(computer.cpu, args, 1); - } - -#define DEFAULT_MOUSE_WIDTH 30 -#define DEFAULT_MOUSE_HEIGHT 40 -#define DEFAULT_KEYBOARD_WIDTH 48 -#define DEFAULT_KEYBOARD_HEIGHT 36 - mouse_x = work->core.width - (work->core.width >> 2); - mouse_y = work->core.height - DEFAULT_MOUSE_HEIGHT; - keyboard_x = 6; - keyboard_y = work->core.height - DEFAULT_KEYBOARD_HEIGHT; - - while (input != NULL) { - if (input->inp_driver) { - if (strcasecmp(input->inp_driver, "mouse") == 0) { - device = AddDevice(MOUSE, (XtPointer)input, mouse_x, mouse_y); - SetTip(device); - if ((mouse_x += DEFAULT_MOUSE_WIDTH) > work->core.width) { - if ((mouse_y -= DEFAULT_MOUSE_HEIGHT) < (work->core.height >> 1)) - mouse_y = work->core.height >> 1; - mouse_x = work->core.width - (work->core.width >> 2); - } - } - else if (IS_KBDDRIV(input->inp_driver)) { - device = AddDevice(KEYBOARD, (XtPointer)input, keyboard_x, keyboard_y); - SetTip(device); - if ((keyboard_x += DEFAULT_KEYBOARD_WIDTH) > - work->core.width - (work->core.width >> 2)) { - if ((keyboard_y -= DEFAULT_KEYBOARD_HEIGHT) < (work->core.height >> 1)) - keyboard_y = work->core.height >> 1; - keyboard_x = 6; - } - } - } - input = (XF86ConfInputPtr)(input->list.next); - } - -#define DEFAULT_CARD_WIDTH 45 -#define DEFAULT_CARD_HEIGHT 46 - card_x = 6; - card_y = (work->core.height >> 1) - 20 - DEFAULT_CARD_HEIGHT; - while (card != NULL) { - device = AddDevice(CARD, (XtPointer)card, card_x, card_y); - SetTip(device); - if ((card_x += DEFAULT_CARD_WIDTH) > work->core.width) { - if ((card_y -= DEFAULT_CARD_HEIGHT) < (work->core.height >> 2)) - card_y = work->core.height >> 2; - card_x = 6; - } - card = (XF86ConfDevicePtr)(card->list.next); - } - -#define DEFAULT_MONITOR_WIDTH 48 -#define DEFAULT_MONITOR_HEIGHT 48 - monitor_x = 6; - monitor_y = 6; - while (monitor != NULL) { - XF86ConfScreenPtr screen = XF86Config->conf_screen_lst; - - device = AddDevice(MONITOR, (XtPointer)monitor, monitor_x, monitor_y); - SetTip(device); - if ((monitor_x += DEFAULT_MONITOR_WIDTH) > work->core.width) { - if ((monitor_y += DEFAULT_MONITOR_HEIGHT) > - (work->core.height >> 2) - DEFAULT_MONITOR_HEIGHT) - monitor_y = (work->core.height >> 2) - DEFAULT_MONITOR_HEIGHT; - monitor_x = 6; - } - - while (screen != NULL) { - if (screen->scrn_monitor == monitor) { - card = XF86Config->conf_device_lst; - while (card != NULL) { - if (screen->scrn_device == card) { - xf86cfgScreen *scr = (xf86cfgScreen*) - XtCalloc(1, sizeof(xf86cfgScreen)); - int i; - - for (i = 0; i < computer.num_devices; i++) - if ((XF86ConfDevicePtr)(computer.devices[i]->config) - == card) - break; - scr->screen = screen; - scr->card = computer.devices[i]; - scr->monitor = device; - scr->refcount = 0; - ++scr->card->refcount; - ++scr->monitor->refcount; - computer.screens = (xf86cfgScreen**) - XtRealloc((XtPointer)computer.screens, - sizeof(xf86cfgScreen*) * - (computer.num_screens + 1)); - CreateScreenWidget(scr); - scr->type = SCREEN; - computer.screens[computer.num_screens++] = scr; - SetTip((xf86cfgDevice*)scr); - break; - } - card = (XF86ConfDevicePtr)(card->list.next); - } - device->state = USED; - } - screen = (XF86ConfScreenPtr)(screen->list.next); - } - - monitor = (XF86ConfMonitorPtr)(monitor->list.next); - } -} - -xf86cfgDevice * -AddDevice(int type, XtPointer config, int x, int y) -{ - switch (type) { - case MOUSE: - case KEYBOARD: - case CARD: - case MONITOR: - computer.devices = (xf86cfgDevice**) - XtRealloc((XtPointer)computer.devices, - sizeof(xf86cfgDevice*) * (computer.num_devices + 1)); - computer.devices[computer.num_devices] = (xf86cfgDevice*) - XtCalloc(1, sizeof(xf86cfgDevice)); - computer.devices[computer.num_devices]->config = config; - computer.devices[computer.num_devices]->widget = - XtVaCreateManagedWidget(device_names[type], simpleWidgetClass, - work, - XtNx, x, - XtNy, y, - XtNtip, NULL, - NULL); - computer.devices[computer.num_devices]->type = type; - computer.devices[computer.num_devices]->state = UNUSED; - computer.devices[computer.num_devices]->refcount = 0; - ++computer.num_devices; - break; - default: - fprintf(stderr, "Bad argument to AddDevice.\n"); - exit(1); - return (NULL); - } - - UpdateMenuDeviceList(type); - - return (computer.devices[computer.num_devices - 1]); -} - -/*ARGSUSED*/ -static void -HelpCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - char *topic = NULL; - - switch (config_mode) { - case CONFIG_LAYOUT: - topic = HELP_DEVICES; - break; - case CONFIG_SCREEN: - topic = HELP_SCREEN; - break; - case CONFIG_MODELINE: - topic = HELP_MODELINE; - break; - case CONFIG_ACCESSX: - topic = HELP_ACCESSX; - break; - } - Help(topic); -} - -void -SelectLayoutCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - int i, j; - XF86ConfLayoutPtr lay = (XF86ConfLayoutPtr)user_data; - XF86ConfInputrefPtr input; - XF86ConfAdjacencyPtr adj; - Widget sme, layopt; - Arg args[1]; - char *str; - - /* XXX Needs to check computer.layout, - * because this function should also create - * a new layout... - */ - if (lay == computer.layout && computer.layout) - return; - - if (computer.layout != NULL) { - for (i = 0; i < computer.num_layouts; i++) { - if (computer.layouts[i]->layout == computer.layout) - break; - } - if (i < computer.num_layouts) { - XtFree((XtPointer)computer.layouts[i]->screen); - XtFree((XtPointer)computer.layouts[i]->position); - } - else { - computer.layouts = (xf86cfgLayout**) - XtRealloc((XtPointer)computer.layouts, sizeof(xf86cfgLayout*) * - (computer.num_layouts + 1)); - ++computer.num_layouts; - } - computer.layouts[i] = (xf86cfgLayout*)XtCalloc(1, sizeof(xf86cfgLayout)); - computer.layouts[i]->layout = computer.layout; - computer.layouts[i]->num_layouts = computer.num_screens; - computer.layouts[i]->screen = (xf86cfgScreen**) - XtMalloc(sizeof(xf86cfgScreen*) * computer.num_screens); - computer.layouts[i]->position = (XPoint*) - XtMalloc(sizeof(XPoint) * computer.num_screens); - for (j = 0; j < computer.num_screens; j++) { - computer.layouts[i]->screen[j] = computer.screens[j]; - computer.layouts[i]->position[j].x = computer.screens[j]->widget->core.x; - computer.layouts[i]->position[j].y = computer.screens[j]->widget->core.y; - } - } - - if (lay != NULL) { - for (i = 0; i < computer.num_layouts; i++) - if (computer.layouts[i]->layout == lay) { - for (j = 0; j < computer.layouts[i]->num_layouts; j++) { - int k; - - for (k = 0; k < computer.num_screens; k++) - if (computer.screens[k] == computer.layouts[i]->screen[j]) { - XtMoveWidget(computer.screens[k]->widget, - computer.layouts[i]->position[j].x, - computer.layouts[i]->position[j].y); - } - } - break; - } - - layoutsme = w; - XtSetArg(args[0], XtNlabel, &str); - XtGetValues(w, args, 1); - XtSetArg(args[0], XtNstring, str); - XtSetValues(layout, args, 1); - } - - computer.layout = lay; - - for (i = 0; i < computer.num_devices; i++) - computer.devices[i]->state = UNUSED; - for (i = 0; i < computer.num_screens; i++) - computer.screens[i]->state = UNUSED; - - if (lay == NULL) { - char name[64]; - XF86ConfLayoutPtr l; - int num_layouts = 0; - - l = XF86Config->conf_layout_lst; - while (l != NULL) { - if (l->lay_adjacency_lst == NULL && - l->lay_inactive_lst == NULL && - l->lay_input_lst == NULL && - l->lay_option_lst == NULL && - l->lay_comment == NULL) { - for (i = 0; - i < ((CompositeWidget)layout)->composite.num_children; i++) - if (strcmp(XtName(((CompositeWidget)layout)->composite. - children[i]), l->lay_identifier) == 0) { - layoutsme = ((CompositeWidget)layout)->composite.children[i]; - } - computer.layout = l; - XtSetArg(args[0], XtNstring, l->lay_identifier); - XtSetValues(layout, args, 1); - if (config_mode == CONFIG_LAYOUT) - DrawCables(); - if (config_mode == CONFIG_SCREEN) - ScreenSetup(True); - return; - } - ++num_layouts; - l = (XF86ConfLayoutPtr)(l->list.next); - } - do { - XmuSnprintf(name, sizeof(name), "Layout%d", num_layouts); - ++num_layouts; - } while (xf86findLayout(name, - XF86Config->conf_layout_lst) != NULL); - l = (XF86ConfLayoutPtr)XtCalloc(1, sizeof(XF86ConfLayoutRec)); - - l->lay_identifier = XtNewString(name); - XF86Config->conf_layout_lst = - xf86addLayout(XF86Config->conf_layout_lst, l); - layoutsme = XtVaCreateManagedWidget("sme", smeBSBObjectClass, - layoutp, - XtNlabel, name, - XtNmenuName, l->lay_identifier, - XtNleftBitmap, menuPixmap, - NULL); - XtAddCallback(layoutsme, XtNcallback, - SelectLayoutCallback, (XtPointer)l); - - layopt = XtCreatePopupShell(l->lay_identifier, simpleMenuWidgetClass, - layoutp, NULL, 0); - sme = XtCreateManagedWidget("default", smeBSBObjectClass, - layopt, NULL, 0); - XtAddCallback(sme, XtNcallback, DefaultLayoutCallback, NULL); - sme = XtCreateManagedWidget("remove", smeBSBObjectClass, - layopt, NULL, 0); - XtAddCallback(sme, XtNcallback, RemoveLayoutCallback, NULL); - XtRealizeWidget(layopt); - - computer.layout = l; - XtSetArg(args[0], XtNstring, name); - XtSetValues(layout, args, 1); - if (config_mode == CONFIG_LAYOUT) - DrawCables(); - if (config_mode == CONFIG_SCREEN) - ScreenSetup(True); - return; - } - - input = lay->lay_input_lst; - adj = lay->lay_adjacency_lst; - - for (i = 0; i < computer.num_devices; i++) - if (computer.devices[i]->config != NULL && - (computer.devices[i]->type == MOUSE || - computer.devices[i]->type == KEYBOARD)) { - while (input != NULL) { - if (strcmp(input->iref_inputdev_str, ((XF86ConfInputPtr) - (computer.devices[i]->config))->inp_identifier) == 0) { - computer.devices[i]->state = USED; - break; - } - input = (XF86ConfInputrefPtr)(input->list.next); - } - input = lay->lay_input_lst; - } - - for (i = 0; i < computer.num_devices; i++) - if (computer.devices[i]->type == CARD) { - while (adj != NULL) { - XF86ConfScreenPtr screen = adj->adj_screen; - - if (computer.devices[i]->config != NULL && - strcmp(screen->scrn_device_str, ((XF86ConfDevicePtr) - (computer.devices[i]->config))->dev_identifier) == 0) { - int j; - - for (j = 0; j < computer.num_screens; j++) - if (computer.screens[j]->card == computer.devices[i]) - break; - computer.screens[j]->card->state = USED; - if (computer.screens[j]->monitor != NULL) - computer.screens[j]->monitor->state = USED; - computer.screens[j]->state = USED; - } - - adj = (XF86ConfAdjacencyPtr)(adj->list.next); - } - adj = lay->lay_adjacency_lst; - } - - if (config_mode == CONFIG_LAYOUT) - DrawCables(); - else if (config_mode == CONFIG_SCREEN) - ScreenSetup(True); -} - -/*ARGSUSED*/ -void -DefaultLayoutCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - Widget layopt, sme; - int i; - char *str; - XF86ConfLayoutPtr prev, tmp, lay; - - str = w && XtParent(w) ? XtName(XtParent(w)) : NULL; - if (str == NULL) - return; - - prev = XF86Config->conf_layout_lst; - lay = xf86findLayout(str, prev); - if (prev == lay) - return; - - tmp = prev; - while (tmp != NULL) { - if (tmp == lay) - break; - prev = tmp; - tmp = (XF86ConfLayoutPtr)(tmp->list.next); - } - - for (i = 1; i < ((CompositeWidget)layoutp)->composite.num_children; i++) - XtDestroyWidget(((CompositeWidget)layoutp)->composite.children[i]); - for (i = 0; i < layoutp->core.num_popups; i++) - XtDestroyWidget(layoutp->core.popup_list[i]); - - prev->list.next = lay->list.next; - lay->list.next = XF86Config->conf_layout_lst; - XF86Config->conf_layout_lst = lay; - - layoutsme = NULL; - lay = XF86Config->conf_layout_lst; - while (lay != NULL) { - sme = XtVaCreateManagedWidget("sme", smeBSBObjectClass, - layoutp, - XtNlabel, lay->lay_identifier, - XtNmenuName, lay->lay_identifier, - XtNleftBitmap, menuPixmap, - NULL); - XtAddCallback(sme, XtNcallback, SelectLayoutCallback, (XtPointer)lay); - if (layoutsme == NULL) - layoutsme = sme; - layopt = XtCreatePopupShell(lay->lay_identifier, simpleMenuWidgetClass, - layoutp, NULL, 0); - sme = XtCreateManagedWidget("default", smeBSBObjectClass, - layopt, NULL, 0); - XtAddCallback(sme, XtNcallback, DefaultLayoutCallback, NULL); - sme = XtCreateManagedWidget("remove", smeBSBObjectClass, - layopt, NULL, 0); - XtAddCallback(sme, XtNcallback, RemoveLayoutCallback, NULL); - XtRealizeWidget(layopt); - - lay = (XF86ConfLayoutPtr)(lay->list.next); - } - SelectLayoutCallback(layoutsme, - XF86Config->conf_layout_lst, NULL); -} - -/*ARGSUSED*/ -void -RemoveLayoutCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - XF86ConfLayoutPtr prev, tmp, lay, rem; - Widget sme = NULL; - int i; - char *str; - Arg args[1]; - - str = w && XtParent(w) ? XtName(XtParent(w)) : NULL; - if (str == NULL) - return; - - prev = XF86Config->conf_layout_lst; - lay = xf86findLayout(str, prev); - tmp = prev; - while (tmp != NULL) { - if (tmp == lay) - break; - prev = tmp; - tmp = (XF86ConfLayoutPtr)(tmp->list.next); - } - - rem = lay; - if (tmp != NULL) - lay = (XF86ConfLayoutPtr)(tmp->list.next); - if (lay == NULL && prev != tmp) - lay = prev; - - if (lay != NULL) { - int i; - - for (i = 0; i < ((CompositeWidget)layoutp)->composite.num_children; - i++) { - XtSetArg(args[0], XtNlabel, &str); - XtGetValues(((CompositeWidget)layoutp)->composite.children[i], - args, 1); - if (strcmp(lay->lay_identifier, str) == 0) { - layoutsme = ((CompositeWidget)layoutp)->composite.children[i]; - break; - } - } - SelectLayoutCallback(layoutsme, lay, NULL); - } - else { - computer.layout = NULL; - XtSetArg(args[0], XtNstring, ""); - XtSetValues(layout, args, 1); - - for (i = 0; i < computer.num_devices; i++) - computer.devices[i]->state = UNUSED; - DrawCables(); - } - - for (i = 0; i < ((CompositeWidget)layoutp)->composite.num_children; i++) { - XtSetArg(args[0], XtNlabel, &str); - XtGetValues(((CompositeWidget)layoutp)->composite.children[i], args, 1); - if (strcmp(rem->lay_identifier, str) == 0) { - sme = ((CompositeWidget)layoutp)->composite.children[i]; - break; - } - } - - xf86removeLayout(XF86Config, rem); - if (sme) - XtDestroyWidget(sme); -} - -void -SetTip(xf86cfgDevice *device) -{ - XF86OptionPtr option = NULL; - char *tip, buffer[4096]; - Arg args[1]; - int len = 0; - - XtSetArg(args[0], XtNtip, &tip); - XtGetValues(device->widget, args, 1); - - switch (device->type) { - case MOUSE: { - XF86ConfInputPtr mouse = (XF86ConfInputPtr)device->config; - - if (mouse == NULL) - return; - len = XmuSnprintf(buffer, sizeof(buffer), - "Identifier \"%s\"\n" - "Driver \"mouse\"\n", - mouse->inp_identifier); - option = mouse->inp_option_lst; - } break; - case KEYBOARD: { - XF86ConfInputPtr keyboard = (XF86ConfInputPtr)device->config; - - if (keyboard == NULL) - return; - len = XmuSnprintf(buffer, sizeof(buffer), - "Identifier \"%s\"\n" - "Driver \"keyboard\"\n", - keyboard->inp_identifier); - option = keyboard->inp_option_lst; - } break; - case CARD: { - XF86ConfDevicePtr card = (XF86ConfDevicePtr)device->config; - - if (card == NULL) - return; - len = XmuSnprintf(buffer, sizeof(buffer), - "Identifier \"%s\"\n" - "Driver \"%s\"\n", - card->dev_identifier, - card->dev_driver); - option = card->dev_option_lst; - } break; - case MONITOR: { - XF86ConfMonitorPtr monitor = (XF86ConfMonitorPtr)device->config; - - if (monitor == NULL) - return; - if (monitor->mon_vendor != NULL) - len = XmuSnprintf(buffer, sizeof(buffer), - "Identifier \"%s\"\n" - "Vendor \"%s\"\n", - monitor->mon_identifier, - monitor->mon_vendor); - else - len = XmuSnprintf(buffer, sizeof(buffer), - "Identifier \"%s\"\n", - monitor->mon_identifier); - option = monitor->mon_option_lst; - } break; - case SCREEN: { - XF86ConfScreenPtr screen = (XF86ConfScreenPtr)device->config; - - if (screen == NULL) - return; - len = XmuSnprintf(buffer, sizeof(buffer), - "Identifier \"%s\"\n", - screen->scrn_identifier); - if (screen->scrn_device_str != NULL) - len += XmuSnprintf(buffer + len, sizeof(buffer), - "Device \"%s\"\n", - screen->scrn_device_str); - if (screen->scrn_monitor_str != NULL) - len += XmuSnprintf(buffer + len, sizeof(buffer), - "Monitor \"%s\"\n", - screen->scrn_monitor_str); - option = screen->scrn_option_lst; - } break; - case SERVER: { - len = XmuSnprintf(buffer, sizeof(buffer), - "%s\n", "Server Flags"); - option = XF86Config->conf_flags->flg_option_lst; - } break; - } - - while (option && len < sizeof(buffer) - 1) { - len += XmuSnprintf(buffer + len, sizeof(buffer) - len, - "Option \"%s\"", - option->opt_name); - if (option->opt_val != NULL) - len += XmuSnprintf(buffer + len, sizeof(buffer) - len, - " \"%s\"\n", - option->opt_val); - else - len += XmuSnprintf(buffer + len, sizeof(buffer) - len, - "%s", "\n"); - option = (XF86OptionPtr)(option->list.next); - } - - tip = buffer; - XtSetArg(args[0], XtNtip, tip); - XtSetValues(device->widget, args, 1); -} - -/*ARGSUSED*/ -void -AddDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - AddDevice((long)user_data, NULL, 6, 6); -} - -void -SmeConfigureDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - int i; - - switch ((long)user_data) { - case MOUSE: - case KEYBOARD: - case CARD: - case MONITOR: - for (i = 0; i < computer.num_devices; i++) - if (computer.devices[i]->type == (long)user_data) { - config = computer.devices[i]->widget; - ConfigureDeviceCallback(w, NULL, NULL); - } - break; - - /* hack for newly added devices */ - case -(MOUSE + 100): - case -(KEYBOARD + 100): - case -(CARD + 100): - case -(MONITOR + 100): - for (i = 0; i < computer.num_devices; i++) - if (-(computer.devices[i]->type + 100) == (long)user_data && - computer.devices[i]->config == NULL) { - config = computer.devices[i]->widget; - ConfigureDeviceCallback(w, NULL, NULL); - } - break; - - default: - for (i = 0; i < computer.num_devices; i++) - if (computer.devices[i]->config == user_data) { - config = computer.devices[i]->widget; - ConfigureDeviceCallback(w, NULL, NULL); - } - break; - } -} - -void -ConfigureDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - int i, j; - - if (config_mode == CONFIG_LAYOUT) { - for (i = 0; i < computer.num_devices; i++) { - if (computer.devices[i]->widget == config) { - switch (computer.devices[i]->type) { - case MOUSE: { - XF86ConfInputPtr mouse = - MouseConfig(computer.devices[i]->config); - - if (mouse != NULL && computer.devices[i]->config == NULL) { - XF86Config->conf_input_lst = - xf86addInput(XF86Config->conf_input_lst, - mouse); - computer.devices[i]->config = (XtPointer)mouse; - } - SetTip(computer.devices[i]); - } break; - case KEYBOARD: { - XF86ConfInputPtr keyboard = - KeyboardConfig(computer.devices[i]->config); - - if (keyboard != NULL && computer.devices[i]->config == NULL) { - XF86Config->conf_input_lst = - xf86addInput(XF86Config->conf_input_lst, - keyboard); - computer.devices[i]->config = (XtPointer)keyboard; - } - SetTip(computer.devices[i]); - } break; - case CARD: { - XF86ConfDevicePtr card = - CardConfig(computer.devices[i]->config); - - if (card != NULL && computer.devices[i]->config == NULL) { - XF86Config->conf_device_lst = - xf86addDevice(XF86Config->conf_device_lst, - card); - computer.devices[i]->config = (XtPointer)card; - } - SetTip(computer.devices[i]); - for (j = 0; j < computer.num_screens; j++) - if (computer.screens[j]->card->widget == config) - SetTip((xf86cfgDevice*)computer.screens[j]); - } break; - case MONITOR: { - XF86ConfMonitorPtr monitor = - MonitorConfig(computer.devices[i]->config); - - if (monitor != NULL && computer.devices[i]->config == NULL) { - XF86Config->conf_monitor_lst = - xf86addMonitor(XF86Config->conf_monitor_lst, - monitor); - computer.devices[i]->config = (XtPointer)monitor; - } - SetTip(computer.devices[i]); - for (j = 0; j < computer.num_screens; j++) - if (computer.screens[j]->monitor->widget == config) - SetTip((xf86cfgDevice*)computer.screens[j]); - } break; - } - /* Need to update because it may have been renamed */ - UpdateMenuDeviceList(computer.devices[i]->type); - break; - } - } - } - else if (config_mode == CONFIG_SCREEN) { - for (i = 0; i < computer.num_screens; i++) - if (computer.screens[i]->widget == config) { - if (ScreenConfig(computer.screens[i]->screen) != NULL) - SetTip((xf86cfgDevice*)computer.screens[i]); - } - } -} - -void -OptionsCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - int i; - XF86OptionPtr *options = NULL; -#ifdef USE_MODULES - xf86cfgModuleOptions *drv_opts = NULL; -#endif - - if (config_mode == CONFIG_SCREEN) { - for (i = 0; i < computer.num_screens; i++) - if (computer.screens[i]->widget == config) { - options = &(computer.screens[i]->screen->scrn_option_lst); - break; - } - } - else { - for (i = 0; i < computer.num_devices; i++) - if (computer.devices[i]->widget == config) - break; - - if (i >= computer.num_devices) { - if (XF86Config->conf_flags == NULL) - XF86Config->conf_flags = (XF86ConfFlagsPtr) - XtCalloc(1, sizeof(XF86ConfFlagsRec)); - options = &(XF86Config->conf_flags->flg_option_lst); - } - else { - switch (computer.devices[i]->type) { - case MOUSE: - case KEYBOARD: - options = (XF86OptionPtr*)&(((XF86ConfInputPtr) - (computer.devices[i]->config))->inp_option_lst); -#ifdef USE_MODULES - if (!nomodules) { - char *drv = ((XF86ConfInputPtr) - (computer.devices[i]->config))->inp_driver; - - if (drv) { - drv_opts = module_options; - while (drv_opts) { - if (drv_opts->type == InputModule && - strcmp(drv_opts->name, drv) == 0) - break; - drv_opts = drv_opts->next; - } - } - } -#endif - - break; - case CARD: - options = (XF86OptionPtr*)&(((XF86ConfDevicePtr) - (computer.devices[i]->config))->dev_option_lst); -#ifdef USE_MODULES - if (!nomodules) { - char *drv = ((XF86ConfDevicePtr) - (computer.devices[i]->config))->dev_driver; - - if (drv) { - drv_opts = module_options; - while (drv_opts) { - if (drv_opts->type == VideoModule && - strcmp(drv_opts->name, drv) == 0) - break; - drv_opts = drv_opts->next; - } - } - } -#endif - break; - case MONITOR: - options = (XF86OptionPtr*)&(((XF86ConfMonitorPtr) - (computer.devices[i]->config))->mon_option_lst); - break; - } - } - } - -#ifdef USE_MODULES - OptionsPopup(options, drv_opts ? drv_opts->name : NULL, - drv_opts ? drv_opts->option : NULL); -#else - OptionsPopup(options); -#endif - if (config_mode == CONFIG_SCREEN) { - XF86OptionPtr option, options; - int rotate = 0; - - options = computer.screens[i]->screen->scrn_option_lst; - if ((option = xf86findOption(options, "Rotate")) != NULL) { - if (option->opt_val != NULL) - rotate = strcasecmp(option->opt_val, "CW") == 0 ? 1 : - strcasecmp(option->opt_val, "CCW") == 0 ? -1 : 0; - XtFree(option->opt_val); - option->opt_val = XtNewString(rotate > 0 ? "CW" : "CCW"); - computer.screens[i]->rotate = rotate; - } - else - computer.screens[i]->rotate = 0; - UpdateScreenUI(); - AdjustScreenUI(); - SetTip((xf86cfgDevice*)computer.screens[i]); - } - else { - if (i >= computer.num_devices) - SetTip(&cpu_device); - else - SetTip(computer.devices[i]); - } -} - -void -EnableDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - int i; - - if (config_mode == CONFIG_SCREEN) { - for (i = 0; i < computer.num_screens; i++) - if (computer.screens[i]->widget == config) { - computer.screens[i]->state = USED; - computer.screens[i]->card->state = USED; - ScreenSetup(False); - return; - } - } - - for (i = 0; i < computer.num_devices; i++) - if (computer.devices[i]->widget == config) { - if (computer.devices[i]->state == USED) - return; - computer.devices[i]->state = USED; - DrawCables(); - break; - } - if (i >= computer.num_devices || computer.layout == NULL) - return; - switch (computer.devices[i]->type) { - case MOUSE: - case KEYBOARD: { - int nmouses = 0, nkeyboards = 0; - XF86ConfInputPtr input = (XF86ConfInputPtr) - (computer.devices[i]->config); - XF86ConfInputrefPtr nex, iref = computer.layout->lay_input_lst; - XF86OptionPtr option; - - nex = iref; - while (nex != NULL) { - if (strcasecmp(nex->iref_inputdev->inp_driver, "mouse") == 0) - ++nmouses; - else if (IS_KBDDRIV(nex->iref_inputdev->inp_driver)) - ++nkeyboards; - iref = nex; - nex = (XF86ConfInputrefPtr)(nex->list.next); - } - nex = (XF86ConfInputrefPtr)XtCalloc(1, sizeof(XF86ConfInputrefRec)); - nex->list.next = NULL; - nex->iref_inputdev = input; - nex->iref_inputdev_str = XtNewString(input->inp_identifier); - if (nmouses == 0 && computer.devices[i]->type == MOUSE) - option = xf86newOption(XtNewString("CorePointer"), NULL); - else if (nkeyboards == 0 && computer.devices[i]->type == KEYBOARD) - option = xf86newOption(XtNewString("CoreKeyboard"), NULL); - else - option = xf86newOption(XtNewString("SendCoreEvents"), NULL); - nex->iref_option_lst = option; - computer.layout->lay_input_lst = - xf86addInputref(computer.layout->lay_input_lst, nex); - } break; - case CARD: - for (i = 0; i < computer.num_screens; i++) { - if (computer.screens[i]->card->widget == config && - computer.screens[i]->state != USED) { - XF86ConfAdjacencyPtr adj; - - adj = (XF86ConfAdjacencyPtr) - XtCalloc(1, sizeof(XF86ConfAdjacencyRec)); - adj->adj_screen = computer.screens[i]->screen; - adj->adj_screen_str = XtNewString(computer.screens[i]-> - screen->scrn_identifier); - computer.layout->lay_adjacency_lst = (XF86ConfAdjacencyPtr) - xf86addListItem((GenericListPtr)computer.layout-> - lay_adjacency_lst, (GenericListPtr)adj); - computer.screens[i]->state = USED; - } - } - break; - case MONITOR: - break; - } -} - -void -DisableDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - int i; - - if (config_mode == CONFIG_SCREEN) { - for (i = 0; i < computer.num_screens; i++) - if (computer.screens[i]->widget == config) { - computer.screens[i]->state = UNUSED; - computer.screens[i]->card->state = UNUSED; - ScreenSetup(False); - return; - } - } - - for (i = 0; i < computer.num_devices; i++) - if (computer.devices[i]->widget == config) { - if (computer.devices[i]->state == UNUSED) - return; - computer.devices[i]->state = UNUSED; - DrawCables(); - break; - } - if (i >= computer.num_devices || computer.layout == NULL) - return; - switch (computer.devices[i]->type) { - case MOUSE: - case KEYBOARD: - xf86removeInputRef(computer.layout, - (XF86ConfInputPtr)(computer.devices[i]->config)); - break; - case CARD: { - XF86ConfAdjacencyPtr adj; - int j; - - if (computer.layout == NULL) - break; - for (j = 0; j < computer.num_screens; j++) - if (computer.screens[j]->card->widget == config) { - adj = computer.layout->lay_adjacency_lst; - while (adj != NULL) { - if (adj->adj_screen == computer.screens[j]->screen) { - xf86removeAdjacency(computer.layout, adj); - break; - } - adj = (XF86ConfAdjacencyPtr)(adj->list.next); - } - computer.screens[j]->state = UNUSED; - break; - } - } break; - case MONITOR: - break; - } -} - -/* ARGSUSED */ -void -RemoveDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - int i, j; - - for (i = 0; i < computer.num_screens; i++) - if (computer.screens[i]->widget == config) { - RemoveScreen(computer.screens[i]->monitor, - computer.screens[i]->card); - ScreenSetup(False); - return; - } - - for (i = 0; i < computer.num_devices; i++) { - if (computer.devices[i]->widget == config) { - switch (computer.devices[i]->type) { - case MOUSE: - case KEYBOARD: - xf86removeInput(XF86Config, - (XF86ConfInputPtr)(computer.devices[i]->config)); - break; - case CARD: - case MONITOR: - break; - } - - if (computer.devices[i]->type == CARD) { - for (j = 0; j < computer.num_screens; j++) - if (computer.screens[j]->card == computer.devices[i]) { - RemoveScreen(computer.screens[j]->monitor, - computer.devices[i]); - --j; - } - if (computer.devices[i]->refcount <= 0) - xf86removeDevice(XF86Config, - (XF86ConfDevicePtr)(computer.devices[i]->config)); - } - else if (computer.devices[i]->type == MONITOR) { - for (j = 0; j < computer.num_screens; j++) - if (computer.screens[j]->monitor == computer.devices[i]) { - RemoveScreen(computer.devices[i], - computer.screens[j]->card); - --j; - } - if (computer.devices[i]->refcount <= 0) - xf86removeMonitor(XF86Config, - (XF86ConfMonitorPtr)(computer.devices[i]->config)); - } - - if (computer.devices[i]->refcount <= 0) { - int type = computer.devices[i]->type; - - XtDestroyWidget(computer.devices[i]->widget); - XtFree((XtPointer)computer.devices[i]); - if (--computer.num_devices > i) - memmove(&computer.devices[i], &computer.devices[i + 1], - (computer.num_devices - i) * sizeof(xf86cfgDevice*)); - - DrawCables(); - UpdateMenuDeviceList(type); - } - - break; - } - } -} - -void -UpdateMenuDeviceList(int type) -{ - Widget sme = NULL, menu = NULL; - int i, count; - static char *mouseM = "mouseM", *keyboardM = "keyboardM", - *cardM = "cardM", *monitorM = "monitorM"; - - for (i = count = 0; i < computer.num_devices; i++) - if (computer.devices[i]->type == type) - ++count; - - switch (type) { - case MOUSE: - sme = mouseSme; - menu = mouseMenu; - break; - case KEYBOARD: - sme = keyboardSme; - menu = keyboardMenu; - break; - case CARD: - sme = cardSme; - menu = cardMenu; - break; - case MONITOR: - sme = monitorSme; - menu = monitorMenu; - break; - } - - if (menu) - for (i = ((CompositeWidget)menu)->composite.num_children - 1; i >= 0; i--) - XtDestroyWidget(((CompositeWidget)menu)->composite.children[i]); - - if (count < 2) { - XtVaSetValues(sme, XtNmenuName, NULL, XtNleftBitmap, None, NULL); - return; - } - - switch (type) { - case MOUSE: - if (mouseMenu == NULL) - menu = mouseMenu = - XtCreatePopupShell(mouseM, simpleMenuWidgetClass, - XtParent(mouseSme), NULL, 0); - XtVaSetValues(mouseSme, XtNmenuName, mouseM, - XtNleftBitmap, menuPixmap, NULL); - break; - case KEYBOARD: - if (keyboardMenu == NULL) - menu = keyboardMenu = - XtCreatePopupShell(keyboardM, simpleMenuWidgetClass, - XtParent(keyboardSme), NULL, 0); - XtVaSetValues(keyboardSme, XtNmenuName, keyboardM, - XtNleftBitmap, menuPixmap, NULL); - break; - case CARD: - if (cardMenu == NULL) - menu = cardMenu = - XtCreatePopupShell(cardM, simpleMenuWidgetClass, - XtParent(cardSme), NULL, 0); - XtVaSetValues(cardSme, XtNmenuName, cardM, - XtNleftBitmap, menuPixmap, NULL); - break; - case MONITOR: - if (monitorMenu == NULL) - menu = monitorMenu = - XtCreatePopupShell(monitorM, simpleMenuWidgetClass, - XtParent(monitorSme), NULL, 0); - XtVaSetValues(monitorSme, XtNmenuName, monitorM, - XtNleftBitmap, menuPixmap, NULL); - break; - } - - for (i = 0; i < computer.num_devices; i++) - if (computer.devices[i]->type == type) { - char *label = NULL; - - if (computer.devices[i]->config) { - switch (type) { - case MOUSE: - case KEYBOARD: - label = ((XF86ConfInputPtr)computer.devices[i]->config) - ->inp_identifier; - break; - case CARD: - label = ((XF86ConfDevicePtr)computer.devices[i]->config) - ->dev_identifier; - break; - case MONITOR: - label = ((XF86ConfMonitorPtr)computer.devices[i]->config) - ->mon_identifier; - break; - } - } - else { - switch (type) { - case MOUSE: - label = "newMouse"; - break; - case KEYBOARD: - label = "newKeyboard"; - break; - case CARD: - label = "newCard"; - break; - case MONITOR: - label = "newMonitor"; - break; - } - } - - sme = XtCreateManagedWidget(label, smeBSBObjectClass, menu, NULL, 0); - XtAddCallback(sme, XtNcallback, SmeConfigureDeviceCallback, - computer.devices[i]->config ? - computer.devices[i]->config : - (XtPointer) (-((long)type + 100))); - } -} - -/*ARGSUSED*/ -void -SelectDeviceAction(Widget w, XEvent *event, String *params, Cardinal *num_params) -{ - device = w; - xpos = event->xbutton.x_root; - ypos = event->xbutton.y_root; - XDefineCursor(XtDisplay(device), XtWindow(device), no_cursor); - - if (config_mode == CONFIG_SCREEN) { - sxpos = device->core.x; - sypos = device->core.y; - } -} - -/*ARGSUSED*/ -void -MoveDeviceAction(Widget w, XEvent *event, String *params, Cardinal *num_params) -{ - int dx, dy, x, y, oldx, oldy; - - if (device == NULL || device != w) - return; - - dx = event->xbutton.x_root - xpos; - dy = event->xbutton.y_root - ypos; - - oldx = device->core.x; - oldy = device->core.y; - x = device->core.x + dx; - y = device->core.y + dy; - - if (x < 0) - x = 0; - else if (x + device->core.width > XtParent(device)->core.width) - x = XtParent(device)->core.width - device->core.width; - if (y < 0) - y = 0; - else if (y + device->core.height > XtParent(device)->core.height) - y = XtParent(device)->core.height - device->core.height; - - dx = x - oldx; - dy = y - oldy; - - XRaiseWindow(XtDisplay(device), XtWindow(device)); - XtMoveWidget(device, x, y); - - xpos += dx; - ypos += dy; -} - -/*ARGSUSED*/ -void -UnselectDeviceAction(Widget w, XEvent *ev, String *params, Cardinal *num_params) -{ - if (device != NULL) { - XUndefineCursor(XtDisplay(device), XtWindow(device)); - - if (config_mode == CONFIG_SCREEN) - ScreenSetup(False); - device = NULL; - } -} - -/*ARGSUSED*/ -void -DevicePopupMenu(Widget w, XEvent *event, String *params, Cardinal *num_params) -{ - static Widget configure, options, enable, disable, remove; - static int first = 1; - int i; - xf86cfgDevice *dev; - - if (first) { - first = 0; - - popup = XtCreatePopupShell("popup", simpleMenuWidgetClass, - toplevel, NULL, 0); - configure = XtCreateManagedWidget("configure", smeBSBObjectClass, - popup, NULL, 0); - XtAddCallback(configure, XtNcallback, ConfigureDeviceCallback, NULL); - options = XtCreateManagedWidget("options", smeBSBObjectClass, - popup, NULL, 0); - XtAddCallback(options, XtNcallback, OptionsCallback, NULL); - XtCreateManagedWidget("line", smeLineObjectClass, - popup, NULL, 0); - enable = XtCreateManagedWidget("enable", smeBSBObjectClass, - popup, NULL, 0); - XtAddCallback(enable, XtNcallback, EnableDeviceCallback, NULL); - disable = XtCreateManagedWidget("disable", smeBSBObjectClass, - popup, NULL, 0); - XtAddCallback(disable, XtNcallback, DisableDeviceCallback, NULL); - XtCreateManagedWidget("line", smeLineObjectClass, - popup, NULL, 0); - remove = XtCreateManagedWidget("remove", smeBSBObjectClass, - popup, NULL, 0); - XtAddCallback(remove, XtNcallback, RemoveDeviceCallback, NULL); - - XtRealizeWidget(popup); - } - - dev = NULL; - if (config_mode == CONFIG_LAYOUT) { - for (i = 0; i < computer.num_devices; i++) - if (computer.devices[i]->widget == w) { - dev = computer.devices[i]; - break; - } - if (i >= computer.num_devices && strcmp(XtName(w), "cpu")) - return; - if (dev == NULL) - dev = &cpu_device; - } - else if (config_mode == CONFIG_SCREEN) { - for (i = 0; i < computer.num_screens; i++) - if (computer.screens[i]->widget == w) { - dev = (xf86cfgDevice*)computer.screens[i]; - break; - } - } - if (dev == NULL) - return; - - config = w; - - if (dev->type != SERVER) { - XtSetSensitive(configure, True); - XtSetSensitive(remove, True); - XtSetSensitive(options, dev->config != NULL); - if (computer.layout == NULL || dev->config == NULL || - dev->type == MONITOR) { - XtSetSensitive(enable, False); - XtSetSensitive(disable, False); - } - else if (dev->state == USED) { - XtSetSensitive(enable, False); - XtSetSensitive(disable, True); - } - else { - XtSetSensitive(enable, True); - XtSetSensitive(disable, False); - } - } - else { - XtSetSensitive(configure, False); - XtSetSensitive(options, True); - XtSetSensitive(enable, False); - XtSetSensitive(disable, False); - XtSetSensitive(remove, False); - } - - XtMoveWidget(popup, event->xbutton.x_root, event->xbutton.y_root); - XtPopup(popup, XtGrabNone); -} - -/*ARGSUSED*/ -void -DevicePopdownMenu(Widget w, XEvent *event, String *params, Cardinal *num_params) -{ - if (popup && XtIsRealized(popup)) - XtPopdown(popup); -} - -void RenameLayoutAction(Widget w, XEvent *event, - String *params, Cardinal *num_params) -{ - XF86ConfLayoutPtr lay = XF86Config->conf_layout_lst; - Arg args[1]; - char *name; - - XtSetArg(args[0], XtNstring, &name); - XtGetValues(layout, args, 1); - - if (computer.layout == NULL || (computer.layout && - strcasecmp(name, computer.layout->lay_identifier)) == 0) - return; - - if (name == NULL && *name == '\0') { - /* tell user about error */ - return; - } - - while (lay) { - if (strcasecmp(name, lay->lay_identifier) == 0) - /* tell user about error */ - return; - lay = (XF86ConfLayoutPtr)(lay->list.next); - } - - XtSetArg(args[0], XtNlabel, name); - XtSetValues(layoutsme, args, 1); - xf86renameLayout(XF86Config, computer.layout, name); -} - -/*ARGSUSED*/ -static void -ComputerEventHandler(Widget w, XtPointer closure, - XEvent *event, Boolean *continue_to_dispatch) -{ - if (event->xexpose.count > 1) - return; - - if (config_mode == CONFIG_LAYOUT) - DrawCables(); -} - -void -DrawCables(void) -{ - Display *display; - Window window; - int ox, oy, i; - xf86cfgScreen **scr = computer.screens; - - if (config_mode != CONFIG_LAYOUT) - return; - - ox = computer.cpu->core.x + (computer.cpu->core.width >> 1); - oy = computer.cpu->core.y + (computer.cpu->core.height >> 1); - - display = XtDisplay(work); - window = XtWindow(work); - XClearWindow(display, window); - - for (i = 0; i < computer.num_devices; i++) { - if (computer.devices[i]->state == USED && - computer.devices[i]->type != MONITOR) - DrawCable(display, window, ox, oy, - computer.devices[i]->widget->core.x + - (computer.devices[i]->widget->core.width>>1), - computer.devices[i]->widget->core.y + - (computer.devices[i]->widget->core.height>>1)); - - } - for (i = 0; i < computer.num_screens; i++) { - if (scr[i]->monitor != NULL) - DrawCable(display, window, - scr[i]->card->widget->core.x + - (scr[i]->card->widget->core.width>>1), - scr[i]->card->widget->core.y + - (scr[i]->card->widget->core.height>>1), - scr[i]->monitor->widget->core.x + - (scr[i]->monitor->widget->core.width>>1), - scr[i]->monitor->widget->core.y + - (scr[i]->monitor->widget->core.height>>1)); - } -} - -static void -DrawCable(Display *display, Window window, int o_x, int o_y, int d_x, int d_y) -{ - XDrawLine(display, window, cablegcshadow, o_x, o_y, d_x, d_y); - XDrawLine(display, window, cablegc, o_x, o_y, d_x, d_y); -} - -/*ARGSUSED*/ -void -SetConfigModeCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - int i, mode = (long)user_data; - Arg args[3]; - char *ptr; - static Dimension height; - - if (mode == config_mode) - return; - XtSetArg(args[0], XtNlabel, &ptr); - XtGetValues(w, args, 1); - XtSetArg(args[0], XtNlabel, ptr); - XtSetValues(topMenu, args, 1); - - if (config_mode == CONFIG_LAYOUT) { - XtSetArg(args[0], XtNheight, &height); - XtGetValues(commands, args, 1); - for (i = 0; i < computer.num_devices; i++) - XtUnmapWidget(computer.devices[i]->widget); - XtUnmapWidget(commands); - XtUnmapWidget(computer.cpu); - XtSetSensitive(commands, False); - XtSetArg(args[0], XtNheight, 1); - XtSetArg(args[1], XtNmin, 1); - XtSetArg(args[2], XtNmax, 1); - XtSetValues(commands, args, 3); - } - else if (config_mode == CONFIG_SCREEN) { - for (i = 0; i < computer.num_screens; i++) - XtUnmapWidget(computer.screens[i]->widget); - } - else if (config_mode == CONFIG_MODELINE) { - VideoModeConfigureEnd(); - XtSetSensitive(layout, True); - XtSetSensitive(layoutm, True); - } - else if (config_mode == CONFIG_ACCESSX) { - AccessXConfigureEnd(); - XtSetSensitive(layout, True); - XtSetSensitive(layoutm, True); - } - - config_mode = mode; - XClearWindow(XtDisplay(work), XtWindow(work)); - if (mode == CONFIG_LAYOUT) { - for (i = 0; i < computer.num_devices; i++) - XtMapWidget(computer.devices[i]->widget); - XtSetArg(args[0], XtNheight, height); - XtSetArg(args[1], XtNmin, height); - XtSetArg(args[2], XtNmax, height); - XtSetValues(commands, args, 3); - XtMapWidget(commands); - XtMapWidget(computer.cpu); - XtSetSensitive(commands, True); - DrawCables(); - } - else if (mode == CONFIG_SCREEN) { - for (i = 0; i < computer.num_screens; i++) - XtMapWidget(computer.screens[i]->widget); - ScreenSetup(True); - } - else if (mode == CONFIG_MODELINE) { - VideoModeConfigureStart(); - XtSetSensitive(layout, False); - XtSetSensitive(layoutm, False); - } - else if (mode == CONFIG_ACCESSX) { - AccessXConfigureStart(); - XtSetSensitive(layout, False); - XtSetSensitive(layoutm, False); - } -} - -static void -ScreenSetup(Bool check) -{ - if (check) { - int i; - - for (i = 0; i < computer.num_layouts; i++) - if (computer.layouts[i]->layout == computer.layout) - break; - - /* Just to put the screens in the correct positions */ - if (i >= computer.num_layouts) - AdjustScreenUI(); - } - - UpdateScreenUI(); - AdjustScreenUI(); -} diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/keyboard-cfg.c b/xorg-server/hw/xfree86/utils/xorgcfg/keyboard-cfg.c deleted file mode 100644 index 545a67067..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/keyboard-cfg.c +++ /dev/null @@ -1,1378 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "xf86config.h" -#include "keyboard-cfg.h" -#include -#include -#include -#include -#include -#include - -#define IS_KBDDRIV(X) ((strcasecmp((X),"kbd") == 0)) - -/* - * Types - */ -typedef struct { - char *rules; - XkbRF_RulesPtr list; - XF86XkbDescInfo model; - XF86XkbDescInfo layout; - XF86XkbDescInfo variant; - XF86XkbDescInfo option; -} XF86XkbRulesDescInfo; - -/* - * Prototypes - */ -static void KeyboardRulesCallback(Widget, XtPointer, XtPointer); -static void KeyboardModelCallback(Widget, XtPointer, XtPointer); -static void KeyboardLayoutCallback(Widget, XtPointer, XtPointer); -static void KeyboardVariantCallback(Widget, XtPointer, XtPointer); -static void KeyboardOptionsCallback(Widget, XtPointer, XtPointer); -static void KeyboardApplyCallback(Widget, XtPointer, XtPointer); -static Bool KeyboardConfigCheck(void); -static void XkbUIEventHandler(Widget, XtPointer, XEvent*, Boolean*); -static XF86XkbRulesDescInfo *GetXkbRulesDesc(char*); -static void UpdateRulesPopups(void); - -/* - * Initialization - */ -static XF86XkbRulesDescInfo **xkb_desc, *xkb_rules; -static int num_xkb_desc; -static char *XkbRulesDir = "share/X11/xkb/rules/"; -#ifdef XFREE98_XKB -static char *XkbRulesFile = "xfree98"; -#else -static char *XkbRulesFile = __XKBDEFRULES__; -#endif -static XF86ConfInputPtr current_input; - -static char *rules, *model, *layout, *variant, *options; -static Widget kbd, rulesb, modelb, layoutb, variantb, optionsb, - modelp, layoutp, variantp, optionsp; -static XkbInfo **xkb_infos; -static int num_xkb_infos; -XkbInfo *xkb_info; - -static Widget apply; - -/* - * Implementation - */ -/*ARGSUSED*/ -XtPointer -KeyboardConfig(XtPointer config) -{ - XF86ConfInputPtr keyboard = (XF86ConfInputPtr)config; - XF86OptionPtr option; - Arg args[1]; - static char *XkbRules = "XkbRules", *XkbModel = "XkbModel", - *XkbLayout = "XkbLayout", *XkbVariant = "XkbVariant", - *XkbOptions = "XkbOptions"; - XF86XkbRulesDescInfo *info; - char *omodel, *olayout, *ovariant, *ooptions; - - InitializeKeyboard(); - rules = xkb_rules->rules; - if (xkb_info->config.rules_file == NULL) - xkb_info->config.rules_file = rules; - - if (options) - XtFree(options); - options = NULL; - - if (xkb_info->conf == NULL) - xkb_info->conf = keyboard; - - if (xkb_info->conf != keyboard) { - int i; - - for (i = 0; i < num_xkb_infos; i++) - if (xkb_infos[i]->conf == keyboard) { - xkb_info = xkb_infos[i]; - break; - } - - if (i >= num_xkb_infos) { - int timeout = 10; - - xkb_info = (XkbInfo*)XtCalloc(1, sizeof(XkbInfo)); - xkb_info->conf = keyboard; - xkb_infos = (XkbInfo**) - XtRealloc((XtPointer)xkb_infos, sizeof(XkbInfo*) * - (num_xkb_infos + 1)); - xkb_infos[num_xkb_infos++] = xkb_info; - - xkb_info->conf = keyboard; - bzero((char*)&(xkb_info->defs), sizeof(XkbRF_VarDefsRec)); - while (timeout > 0) { - xkb_info->xkb = - XkbGetKeyboard(XtDisplay(configp), - XkbGBN_AllComponentsMask, XkbUseCoreKbd); - if (xkb_info->xkb == NULL) { - timeout -= 1; - sleep(1); - } - else - break; - } - if (timeout <= 0) { - fprintf(stderr, "Couldn't get keyboard\n"); - } - if (xkb_info->xkb && xkb_info->xkb->names && xkb_info->xkb->geom && - xkb_info->xkb->names->geometry == 0) - xkb_info->xkb->names->geometry = xkb_info->xkb->geom->name; - } - - /* check for removed devices */ - for (i = 0; i < num_xkb_infos; i++) { - XF86ConfInputPtr key = XF86Config->conf_input_lst; - - while (key != NULL) { - if (IS_KBDDRIV(key->inp_driver) && xkb_infos[i]->conf == key) - break; - key = (XF86ConfInputPtr)(key->list.next); - } - if (xkb_infos[i]->conf != NULL && key == NULL) { - XkbFreeKeyboard(xkb_infos[i]->xkb, 0, False); - XtFree((XtPointer)xkb_infos[i]); - if (--num_xkb_infos > i) - memmove(&xkb_infos[i], &xkb_infos[i + 1], - (num_xkb_infos - i) * sizeof(XkbInfo*)); - } - } - } - - current_input = keyboard; - - if (keyboard != NULL) { - if ((option = xf86findOption(keyboard->inp_option_lst, XkbRules)) != NULL) { - if (strcmp(rules, option->opt_val)) { - XF86XkbRulesDescInfo *info = GetXkbRulesDesc(option->opt_val); - - if (info) { - rules = info->rules; - UpdateRulesPopups(); - } - } - } - if ((option = xf86findOption(keyboard->inp_option_lst, XkbModel)) != NULL) - xkb_info->defs.model = model = option->opt_val; - else - xkb_info->defs.model = model = xkb_rules->model.name[0]; - if ((option = xf86findOption(keyboard->inp_option_lst, XkbLayout)) != NULL) - xkb_info->defs.layout = layout = option->opt_val; - else - xkb_info->defs.layout = layout = xkb_rules->layout.name[0]; - if ((option = xf86findOption(keyboard->inp_option_lst, XkbVariant)) != NULL) - xkb_info->defs.variant = variant = option->opt_val; - else - xkb_info->defs.variant = variant = NULL; - - if ((option = xf86findOption(keyboard->inp_option_lst, XkbOptions)) != NULL) - xkb_info->defs.options = options = XtNewString(option->opt_val); - else - xkb_info->defs.options = options = NULL; - - XtSetArg(args[0], XtNstring, keyboard->inp_identifier); - XtSetValues(ident_widget, args, 1); - - (void)UpdateKeyboard(False); - } - else { - XF86ConfInputPtr input = XF86Config->conf_input_lst; - char keyboard_name[48]; - int nkeyboards = 0; - - while (input != NULL) { - if (IS_KBDDRIV(input->inp_driver)) - ++nkeyboards; - input = (XF86ConfInputPtr)(input->list.next); - } - do { - XmuSnprintf(keyboard_name, sizeof(keyboard_name), - "Keyboard%d", nkeyboards); - ++nkeyboards; - } while (xf86findInput(keyboard_name, - XF86Config->conf_input_lst)); - - model = xkb_rules->model.name[0]; - layout = xkb_rules->layout.name[0]; - variant = ""; - options = XtNewString(""); - XtSetArg(args[0], XtNstring, keyboard_name); - XtSetValues(ident_widget, args, 1); - } - - info = xkb_rules; - omodel = model; - olayout = layout; - ovariant = variant; - ooptions = options ? XtNewString(options) : NULL; - - xf86info.cur_list = KEYBOARD; - XtSetSensitive(back, xf86info.lists[KEYBOARD].cur_function > 0); - XtSetSensitive(next, xf86info.lists[KEYBOARD].cur_function < - xf86info.lists[KEYBOARD].num_functions - 1); - (xf86info.lists[KEYBOARD].functions[xf86info.lists[KEYBOARD].cur_function]) - (&xf86info); - - if (ConfigLoop(KeyboardConfigCheck) == True) { - if (keyboard == NULL) { - keyboard = XtNew(XF86ConfInputRec); - keyboard->list.next = NULL; - keyboard->inp_identifier = XtNewString(ident_string); - keyboard->inp_driver = XtNewString("kbd"); - keyboard->inp_option_lst = xf86newOption(XtNewString(XkbRules), - XtNewString(rules)); - xf86addNewOption(keyboard->inp_option_lst, - XtNewString(XkbModel), XtNewString(model)); - xf86addNewOption(keyboard->inp_option_lst, - XtNewString(XkbLayout), XtNewString(layout)); - if (variant && *variant) - xf86addNewOption(keyboard->inp_option_lst, - XtNewString(XkbVariant), XtNewString(variant)); - if (options && *options) { - xf86addNewOption(keyboard->inp_option_lst, - XtNewString(XkbOptions), options); - options = NULL; - } - keyboard->inp_comment = NULL; - } - else { - int i; - char *str; - - XtSetArg(args[0], XtNlabel, &str); - XtGetValues(modelb, args, 1); - for (i = 0; i < xkb_rules->model.nelem; i++) - if (strcmp(xkb_rules->model.desc[i], str) == 0) { - model = xkb_rules->model.name[i]; - break; - } - - XtSetArg(args[0], XtNlabel, &str); - XtGetValues(layoutb, args, 1); - for (i = 0; i < xkb_rules->layout.nelem; i++) - if (strcmp(xkb_rules->layout.desc[i], str) == 0) { - layout = xkb_rules->layout.name[i]; - break; - } - - if ((option = xf86findOption(keyboard->inp_option_lst, XkbRules)) - != NULL) { - XtFree(option->opt_val); - option->opt_val = XtNewString(rules); - XtFree(option->opt_comment); - option->opt_comment = NULL; - } - else - keyboard->inp_option_lst = - xf86addNewOption(keyboard->inp_option_lst, - XtNewString(XkbRules), XtNewString(rules)); - - if ((option = xf86findOption(keyboard->inp_option_lst, XkbModel)) - != NULL) { - XtFree(option->opt_val); - option->opt_val = XtNewString(model); - XtFree(option->opt_comment); - option->opt_comment = NULL; - } - else - keyboard->inp_option_lst = - xf86addNewOption(keyboard->inp_option_lst, - XtNewString(XkbModel), XtNewString(model)); - XtFree(xkb_info->config.model); - xkb_info->config.model = XtNewString(model); - - if ((option = xf86findOption(keyboard->inp_option_lst, XkbLayout)) - != NULL) { - XtFree(option->opt_val); - option->opt_val = XtNewString(layout); - } - else - keyboard->inp_option_lst = - xf86addNewOption(keyboard->inp_option_lst, - XtNewString(XkbLayout), XtNewString(layout)); - XtFree(xkb_info->config.layout); - xkb_info->config.layout = XtNewString(layout); - - if ((option = xf86findOption(keyboard->inp_option_lst, XkbVariant)) - != NULL) { - if (variant && *variant) { - XtFree(option->opt_val); - option->opt_val = XtNewString(variant); - } - else - xf86removeOption(&keyboard->inp_option_lst, XkbVariant); - } - else if (variant && *variant) - xf86addNewOption(keyboard->inp_option_lst, - XtNewString(XkbVariant), XtNewString(variant)); - XtFree(xkb_info->config.variant); - xkb_info->config.variant = variant && *variant ? - XtNewString(variant) : NULL; - - XtFree(xkb_info->config.options); - xkb_info->config.options = options && *options ? - XtNewString(options) : NULL; - if ((option = xf86findOption(keyboard->inp_option_lst, XkbOptions)) - != NULL) { - if (options && *options) { - XtFree(option->opt_val); - option->opt_val = options; - options = NULL; - } - else - xf86removeOption(&keyboard->inp_option_lst, XkbOptions); - } - else if (options && *options) { - xf86addNewOption(keyboard->inp_option_lst, - XtNewString(XkbOptions), options); - options = NULL; - } - } - if (strcasecmp(keyboard->inp_identifier, ident_string)) - xf86renameInput(XF86Config, keyboard, ident_string); - - xkb_info->conf = keyboard; - xkb_info->config.rules_file = rules; - - return ((XtPointer)keyboard); - } - - xkb_rules = info; - rules = info->rules; - model = omodel; - layout = olayout; - variant = ovariant; - XtFree(options); - options = ooptions; - - return (NULL); -} - -static Bool -KeyboardConfigCheck(void) -{ - XF86ConfInputPtr keyboard = XF86Config->conf_input_lst; - - while (keyboard != NULL) { - if (keyboard != current_input && - strcasecmp(ident_string, keyboard->inp_identifier) == 0) - return (False); - keyboard = (XF86ConfInputPtr)(keyboard->list.next); - } - - return (True); -} - -/*ARGSUSED*/ -static void -XkbUIEventHandler(Widget w, XtPointer closure, - XEvent *event, Boolean *continue_to_dispatch) -{ - XkbUI_ViewOptsRec opts; - XkbUI_ViewPtr view; - int width, height, bd; - - if (event->xexpose.count > 1) - return; - - bzero((char *)&opts, sizeof(opts)); - bd = 1; - opts.present = XkbUI_SizeMask | XkbUI_ColormapMask | - XkbUI_MarginMask | XkbUI_OffsetMask; - opts.margin_width = opts.margin_height = 0; - opts.viewport.x = opts.viewport.y = bd; - width = opts.viewport.width = w->core.width - 2 * bd; - height = opts.viewport.height = w->core.height - 2 * bd; - opts.cmap = w->core.colormap; - - if ((view = XkbUI_Init(XtDisplay(w), XtWindow(w), width, height, - xkb_info->xkb, &opts)) != NULL) { - XkbUI_DrawRegion(view, NULL); - free(view); - } -} - -void -InitializeKeyboard(void) -{ - int major, minor, op, event, error; - static int first = 1; - int timeout = 5; - XF86ConfInputPtr keyboard = XF86Config->conf_input_lst; - XF86OptionPtr option; - char name[PATH_MAX]; - FILE *file; - - if (!first) - return; - first = 0; - - major = XkbMajorVersion; - minor = XkbMinorVersion; - if (XkbQueryExtension(DPY, &op, &event, &error, &major, &minor) == 0) { - fprintf(stderr, "Unable to initialize XKEYBOARD extension"); - exit(1); - } - - xkb_info = (XkbInfo *)XtCalloc(1, sizeof(XkbInfo)); - xkb_info->conf = NULL; - xkb_infos = (XkbInfo**)XtCalloc(1, sizeof(XkbInfo*)); - num_xkb_infos = 1; - xkb_infos[0] = xkb_info; - bzero((char*)&(xkb_info->defs), sizeof(XkbRF_VarDefsRec)); - - while (timeout > 0) { - xkb_info->xkb = - XkbGetKeyboard(DPY, XkbGBN_AllComponentsMask, XkbUseCoreKbd); - if (xkb_info->xkb == NULL) { - timeout -= 1; - sleep(1); - } - else - break; - } - if (timeout <= 0) { - fprintf(stderr, "Couldn't get keyboard\n"); - } - if (xkb_info->xkb && xkb_info->xkb->names && xkb_info->xkb->geom && - xkb_info->xkb->names->geometry == 0) - xkb_info->xkb->names->geometry = xkb_info->xkb->geom->name; - - /* Load configuration */ - XmuSnprintf(name, sizeof(name), "%s%s", XkbConfigDir, XkbConfigFile); - file = fopen(name, "r"); - if (file != NULL) { - if (XkbCFParse(file, XkbCFDflts, xkb_info->xkb, &xkb_info->config) == 0) { - fprintf(stderr, "Error parsing config file: "); - XkbCFReportError(stderr, name, xkb_info->config.error, - xkb_info->config.line); - } - fclose(file); - } - - xkb_rules = GetXkbRulesDesc(xkb_info->config.rules_file != NULL ? - xkb_info->config.rules_file : XkbRulesFile); - if (xkb_rules == NULL) - /* error message was printed */ - exit(1); - - /* XXX Assumes the first keyboard is the core keyboard */ - while (keyboard != NULL) { - if (IS_KBDDRIV(keyboard->inp_driver)) - break; - keyboard = (XF86ConfInputPtr)(keyboard->list.next); - } - if (keyboard == NULL) - return; - - if (xkb_info->config.rules_file != NULL) - rules = xkb_info->config.rules_file; - else if ((option = xf86findOption(keyboard->inp_option_lst, "XkbRules")) - != NULL) - rules = option->opt_val; - else - rules = XkbRulesFile; - - if (strcmp(rules, xkb_rules->rules)) { - xkb_rules = GetXkbRulesDesc(rules); - if (xkb_rules == NULL) - /* error message was printed */ - exit(1); - } - { - FILE *fp; - char filename[1024]; - - XmuSnprintf(filename, sizeof(filename), "%s%s", - XkbRulesDir, xkb_rules->rules); - if ((fp = fopen(filename, "r")) == NULL) { - fprintf(stderr, "Can't open rules file\n"); - exit(1); - } - - if (!XkbRF_LoadRules(fp, xkb_rules->list)) { - fclose(fp); - fprintf(stderr, "Can't load rules\n"); - exit(1); - } - fclose(fp); - } - - if (xkb_info->config.rules_file == NULL) - xkb_info->config.rules_file = xkb_rules->rules; - - if (xkb_info->config.model != NULL) - xkb_info->defs.model = xkb_info->config.model; - else if ((option = xf86findOption(keyboard->inp_option_lst, "XkbModel")) - != NULL) - xkb_info->defs.model = option->opt_val; - else - xkb_info->defs.model = xkb_rules->model.name[0]; - - if (xkb_info->config.layout != NULL) - xkb_info->defs.layout = xkb_info->config.layout; - else if ((option = xf86findOption(keyboard->inp_option_lst, "XkbLayout")) - != NULL) - xkb_info->defs.layout = option->opt_val; - else - xkb_info->defs.layout = xkb_rules->layout.name[0]; - - if (xkb_info->config.variant != NULL) - xkb_info->defs.variant = xkb_info->config.variant; - else if ((option = xf86findOption(keyboard->inp_option_lst, "XkbVariant")) - != NULL) - xkb_info->defs.variant = option->opt_val; - else - xkb_info->defs.variant = NULL; - - if (xkb_info->config.options != NULL) - xkb_info->defs.options = xkb_info->config.options; - else if ((option = xf86findOption(keyboard->inp_option_lst, "XkbOptions")) - != NULL) - xkb_info->defs.options = option->opt_val; - else - xkb_info->defs.options = NULL; - - if (xkb_info->xkb == NULL) { - /* Try again */ - XkbComponentNamesRec comps; - - bzero((char*)&comps, sizeof(XkbComponentNamesRec)); - XkbRF_GetComponents(xkb_rules->list, &(xkb_info->defs), &comps); - - xkb_info->xkb = XkbGetKeyboardByName(DPY, XkbUseCoreKbd, &comps, - XkbGBN_AllComponentsMask, 0, 0); - } -} - -static XF86XkbRulesDescInfo * -GetXkbRulesDesc(char *rules) -{ - int i; - XkbRF_RulesPtr list; - char filename[1024]; - XF86XkbRulesDescInfo *info; - - if (rules == NULL) - return (NULL); - - for (i = 0; i < num_xkb_desc; i++) - if (strcmp(rules, xkb_desc[i]->rules) == 0) - return (xkb_desc[i]); - - XmuSnprintf(filename, sizeof(filename), "%s%s", XkbRulesDir, rules); - if ((list = XkbRF_Create(0, 0)) == NULL || - !XkbRF_LoadDescriptionsByName(filename, NULL, list)) { - fprintf(stderr, "Can't create rules structure\n"); - return (NULL); - } - - info = (XF86XkbRulesDescInfo*)XtCalloc(1, sizeof(XF86XkbRulesDescInfo)); - xkb_desc = (XF86XkbRulesDescInfo**) - XtRealloc((XtPointer)xkb_desc, - sizeof(XF86XkbRulesDescInfo*) * (num_xkb_desc + 1)); - xkb_desc[num_xkb_desc++] = info; - info->rules = XtNewString(rules); - for (i = 0; i < list->models.num_desc; i++) { - if (i % 16 == 0) { - info->model.name = (char**)XtRealloc((XtPointer)info->model.name, - (i + 16) * sizeof(char*)); - info->model.desc = (char**)XtRealloc((XtPointer)info->model.desc, - (i + 16) * sizeof(char*)); - } - info->model.name[i] = XtNewString(list->models.desc[i].name); - info->model.desc[i] = XtNewString(list->models.desc[i].desc); - } - info->model.nelem = i; - - for (i = 0; i < list->layouts.num_desc; i++) { - if (i % 16 == 0) { - info->layout.name = (char**)XtRealloc((XtPointer)info->layout.name, - (i + 16) * sizeof(char*)); - info->layout.desc = (char**)XtRealloc((XtPointer)info->layout.desc, - (i + 16) * sizeof(char*)); - } - info->layout.name[i] = XtNewString(list->layouts.desc[i].name); - info->layout.desc[i] = XtNewString(list->layouts.desc[i].desc); - } - info->layout.nelem = i; - - for (i = 0; i < list->variants.num_desc; i++) { - if (i % 16 == 0) { - info->variant.name = (char**)XtRealloc((XtPointer)info->variant.name, - (i + 16) * sizeof(char*)); - info->variant.desc = (char**)XtRealloc((XtPointer)info->variant.desc, - (i + 16) * sizeof(char*)); - } - info->variant.name[i] = XtNewString(list->variants.desc[i].name); - info->variant.desc[i] = XtNewString(list->variants.desc[i].desc); - } - info->variant.nelem = i; - - for (i = 0; i < list->options.num_desc; i++) { - if (i % 16 == 0) { - info->option.name = (char**)XtRealloc((XtPointer)info->option.name, - (i + 16) * sizeof(char*)); - info->option.desc = (char**)XtRealloc((XtPointer)info->option.desc, - (i + 16) * sizeof(char*)); - } - info->option.name[i] = XtNewString(list->options.desc[i].name); - info->option.desc[i] = XtNewString(list->options.desc[i].desc); - } - info->option.nelem = i; - info->list = list; - - return (info); -} - -static xf86ConfigSymTabRec ax_controls[] = -{ - {XkbRepeatKeysMask, "RepeatKeys"}, - {XkbSlowKeysMask, "SlowKeys"}, - {XkbBounceKeysMask, "BounceKeys"}, - {XkbStickyKeysMask, "StickyKeys"}, - {XkbMouseKeysMask, "MouseKeys"}, - {XkbMouseKeysAccelMask, "MouseKeysAccel"}, - {XkbAccessXKeysMask, "AccessxKeys"}, - {XkbAccessXTimeoutMask, "AccessxTimeout"}, - {XkbAccessXFeedbackMask, "AccessxFeedback"}, - {XkbAudibleBellMask, "AudibleBell"}, - {XkbOverlay1Mask, "Overlay1"}, - {XkbOverlay2Mask, "Overlay2"}, - {XkbIgnoreGroupLockMask, "IgnoreGroupLock"}, - {-1, ""}, -}; - -static xf86ConfigSymTabRec ax_feedback[] = -{ - {XkbAX_SKPressFBMask, "SlowKeysPress"}, - {XkbAX_SKAcceptFBMask, "SlowKeysAccept"}, - {XkbAX_FeatureFBMask, "Feature"}, - {XkbAX_SlowWarnFBMask, "SlowWarn"}, - {XkbAX_IndicatorFBMask, "Indicator"}, - {XkbAX_StickyKeysFBMask, "StickyKeys"}, - {XkbAX_TwoKeysMask, "TwoKeys"}, - {XkbAX_LatchToLockMask, "LatchToLock"}, - {XkbAX_SKReleaseFBMask, "SlowKeysRelease"}, - {XkbAX_SKRejectFBMask, "SlowkeysReject"}, - {XkbAX_BKRejectFBMask, "BounceKeysReject"}, - {XkbAX_DumbBellFBMask, "DumbBell"}, - {-1, ""}, -}; - -Bool -WriteXKBConfiguration(char *filename, XkbConfigRtrnPtr conf) -{ - FILE *fp; - int i, count; - - if (filename == NULL || conf == NULL || - (fp = fopen(filename, "w")) == NULL) - return (False); - - if (conf->rules_file != NULL) - fprintf(fp, "Rules = \"%s\"\n", - conf->rules_file); - if (conf->model != NULL) - fprintf(fp, "Model = \"%s\"\n", - conf->model); - if (conf->layout != NULL) - fprintf(fp, "Layout = \"%s\"\n", - conf->layout); - if (conf->variant != NULL) - fprintf(fp, "Variant = \"%s\"\n", - conf->variant); - if (conf->options != NULL) - fprintf(fp, "Options = \"%s\"\n", - conf->options); - if (conf->keymap != NULL) - fprintf(fp, "Keymap = %s\n", - conf->keymap); - if (conf->keycodes != NULL) - fprintf(fp, "Keycodes = %s\n", - conf->keycodes); - if (conf->geometry != NULL) - fprintf(fp, "Geometry = %s\n", - conf->geometry); - if (conf->phys_symbols != NULL) - fprintf(fp, "RealSymbols = %s\n", - conf->phys_symbols); - if (conf->symbols != NULL) - fprintf(fp, "Symbols = %s\n", - conf->symbols); - if (conf->types != NULL) - fprintf(fp, "Types = %s\n", - conf->types); - if (conf->compat != NULL) - fprintf(fp, "Compat = %s\n", - conf->compat); - - if (conf->click_volume > 0) - fprintf(fp, "ClickVolume = %d\n", - conf->click_volume); - if (conf->bell_volume > 0) - fprintf(fp, "BellVolume = %d\n", - conf->bell_volume); - if (conf->bell_pitch > 0) - fprintf(fp, "BellPitch = %d\n", - conf->bell_pitch); - if (conf->bell_duration > 0) - fprintf(fp, "BellDuration = %d\n", - conf->bell_duration); - - if (conf->repeat_delay > 0) - fprintf(fp, "RepeatDelay = %d\n", - conf->repeat_delay); - if (conf->repeat_interval > 0) - fprintf(fp, "RepeatInterval = %d\n", - conf->repeat_interval); - - if (conf->slow_keys_delay > 0) - fprintf(fp, "SlowKeysDelay = %d\n", - conf->slow_keys_delay); - - if (conf->debounce_delay > 0) - fprintf(fp, "DebounceDelay = %d\n", - conf->debounce_delay); - - if (conf->mk_delay > 0) - fprintf(fp, "MouseKeysDelay = %d\n", - conf->mk_delay); - if (conf->mk_interval > 0) - fprintf(fp, "MouseKeysInterval = %d\n", - conf->mk_interval); - if (conf->mk_time_to_max > 0) - fprintf(fp, "MouseKeysTimeToMax = %d\n", - conf->mk_time_to_max); - if (conf->mk_max_speed > 0) - fprintf(fp, "MouseKeysMaxSpeed = %d\n", - conf->mk_max_speed); - fprintf(fp, "MouseKeysCurve = %d\n", conf->mk_curve); - - if (conf->ax_timeout) - fprintf(fp, "AccessXTimeout = %d\n", - conf->ax_timeout); - if (conf->initial_ctrls != 0) { - fprintf(fp, "Controls %c= ", - conf->replace_initial_ctrls ? ' ' : '+'); - for (i = count = 0; *ax_controls[i].name; i++) - if ((conf->initial_ctrls & ax_controls[i].token) - == ax_controls[i].token) - fprintf(fp, "%s%s", count++ ? " + " : "", - ax_controls[i].name); - fprintf(fp, "\n"); - } - if (conf->axt_ctrls_on != 0) { - fprintf(fp, "AcessXTimeoutCtrlsOn %c= ", - conf->replace_axt_ctrls_on ? ' ' : '+'); - for (i = count = 0; *ax_controls[i].name; i++) - if ((conf->axt_ctrls_on & ax_controls[i].token) - == ax_controls[i].token) - fprintf(fp, "%s%s", count++ ? " + " : "", - ax_controls[i].name); - fprintf(fp, "\n"); - } - if (conf->axt_ctrls_off != 0) { - fprintf(fp, "AcessXTimeoutCtrlsOff %c= ", - conf->replace_axt_ctrls_off ? ' ' : '-'); - for (i = count = 0; *ax_controls[i].name; i++) - if ((conf->axt_ctrls_off & ax_controls[i].token) - == ax_controls[i].token) - fprintf(fp, "%s%s", count++ ? " + " : "", - ax_controls[i].name); - fprintf(fp, "\n"); - } - - if (conf->initial_opts != 0) { - fprintf(fp, "Feedback %c= ", - conf->replace_initial_opts ? ' ' : '+'); - for (i = count = 0; *ax_feedback[i].name; i++) - if ((conf->initial_opts & ax_feedback[i].token) - == ax_feedback[i].token) - fprintf(fp, "%s%s", count++ ? " + " : "", - ax_feedback[i].name); - fprintf(fp, "\n"); - } - if (conf->axt_opts_on != 0) { - fprintf(fp, "AcessXTimeoutFeedbackOn %c= ", - conf->replace_axt_opts_on ? ' ' : '+'); - for (i = count = 0; *ax_controls[i].name; i++) - if ((conf->axt_opts_on & ax_feedback[i].token) - == ax_feedback[i].token) - fprintf(fp, "%s%s", count++ ? " + " : "", - ax_feedback[i].name); - fprintf(fp, "\n"); - } - if (conf->axt_opts_off != 0) { - fprintf(fp, "AcessXTimeoutFeedbackOff%c= ", - conf->replace_axt_opts_off ? ' ' : '-'); - for (i = count = 0; *ax_feedback[i].name; i++) - if ((conf->axt_opts_off & ax_feedback[i].token) - == ax_feedback[i].token) - fprintf(fp, "%s%s", count++ ? " + " : "", - ax_feedback[i].name); - fprintf(fp, "\n"); - } - - fclose(fp); - - return (True); -} - -Bool -UpdateKeyboard(Bool load) -{ - XkbComponentNamesRec comps; - XkbDescPtr xkb; - - bzero((char*)&comps, sizeof(XkbComponentNamesRec)); - XkbRF_GetComponents(xkb_rules->list, &(xkb_info->defs), &comps); - - xkb = XkbGetKeyboardByName(DPY, XkbUseCoreKbd, &comps, - XkbGBN_AllComponentsMask, 0, load); - - if (xkb == NULL || xkb->geom == NULL) { - fprintf(stderr, "Couldn't get keyboard\n"); - return (False); - } - if (xkb_info->xkb && xkb_info->xkb->names && xkb_info->xkb->geom && - xkb_info->xkb->names->geometry == 0) - xkb_info->xkb->names->geometry = xkb_info->xkb->geom->name; - - XkbFreeKeyboard(xkb_info->xkb, 0, False); - - xkb_info->xkb = xkb; - - XtFree(comps.keymap); - XtFree(comps.keycodes); - XtFree(comps.compat); - XtFree(comps.types); - XtFree(comps.symbols); - XtFree(comps.geometry); - - if (kbd != NULL) - XClearArea(XtDisplay(configp), XtWindow(kbd), 0, 0, 0, 0, True); - - return (True); -} - -static void -KeyboardRulesCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - int i; - FILE *fp; - Arg args[1]; - char filename[1024], *omodel, *olayout, *ovariant, *ooptions, - *dmodel, *dlayout, *dvariant; - XF86XkbRulesDescInfo *oxkb_rules, *info = GetXkbRulesDesc(XtName(w)); - - if (strcmp(XtName(w), rules) == 0 || info == NULL) - /* a error message was printed */ - return; - - XmuSnprintf(filename, sizeof(filename), "%s%s", - XkbRulesDir, info->rules); - if ((fp = fopen(filename, "r")) == NULL) { - fprintf(stderr, "Can't open rules file\n"); - return; - } - - if (!XkbRF_LoadRules(fp, info->list)) { - fclose(fp); - fprintf(stderr, "Can't load rules\n"); - return; - } - fclose(fp); - - oxkb_rules = xkb_rules; - omodel = xkb_info->defs.model; - olayout = xkb_info->defs.layout; - ovariant = xkb_info->defs.variant; - ooptions = xkb_info->defs.options; - - if (omodel) { - for (i = 0; i < info->model.nelem; i++) { - if (strcmp(omodel, info->model.name[i]) == 0) - break; - } - } - else - i = 0; - model = xkb_info->defs.model = info->model.name - [i < info->model.nelem ? i : 0]; - dmodel = info->model.desc[i < info->model.nelem ? i : 0]; - - if (olayout) { - for (i = 0; i < info->layout.nelem; i++) { - if (strcmp(olayout, info->layout.name[i]) == 0) - break; - } - } - else - i = 0; - layout = xkb_info->defs.layout = info->layout.name - [i < info->layout.nelem ? i : 0]; - dlayout = info->layout.desc[i < info->layout.nelem ? i : 0]; - - if (ovariant) { - for (i = 0; i < info->variant.nelem; i++) { - if (strcmp(ovariant, info->variant.name[i]) == 0) - break; - } - } - else - i = info->variant.nelem; - variant = xkb_info->defs.variant = i < info->variant.nelem ? - info->variant.name[i] : NULL; - dvariant = i < info->variant.nelem ? - info->variant.desc[i] : NULL; - - if (ooptions) { - char *ptr, *tmp = XtNewString(options); - - for (ptr = strtok(tmp, ","); ptr != NULL; ptr = strtok(NULL, ",")) { - if (strchr(ptr, ':') == NULL) - continue; - - for (i = 0; i < xkb_rules->option.nelem; i++) - if (strcmp(xkb_rules->option.name[i], ptr) == 0) - break; - - if (i == xkb_rules->option.nelem) { - XtFree(options); - options = NULL; - /* no option with the same name */ - break; - } - } - XtFree(tmp); - } - else { - XtFree(options); - options = NULL; - } - - oxkb_rules = xkb_rules; - xkb_rules = info; - rules = info->rules; - - if (!UpdateKeyboard(False)) { - model = xkb_info->defs.model = omodel; - layout = xkb_info->defs.layout = olayout; - variant = xkb_info->defs.variant = ovariant; - options = XtNewString(xkb_info->defs.options = ooptions); - xkb_rules = oxkb_rules; - rules = xkb_rules->rules; - - XmuSnprintf(filename, sizeof(filename), "%s%s", - XkbRulesDir, rules); - if ((fp = fopen(filename, "r")) == NULL) { - fprintf(stderr, "Can't open rules file\n"); - return; - } - - if (!XkbRF_LoadRules(fp, xkb_rules->list)) { - fprintf(stderr, "Can't load rules\n"); - } - fclose(fp); - - return; - } - - UpdateRulesPopups(); - - XtSetArg(args[0], XtNlabel, rules); - XtSetValues(rulesb, args, 1); - - XtSetArg(args[0], XtNlabel, dmodel); - XtSetValues(modelb, args, 1); - - XtSetArg(args[0], XtNlabel, dlayout); - XtSetValues(layoutb, args, 1); - - XtSetArg(args[0], XtNlabel, dvariant ? dvariant : ""); - XtSetValues(variantb, args, 1); - - XtSetArg(args[0], XtNlabel, options ? options : ""); - XtSetValues(variantb, args, 1); -} - -static void -KeyboardModelCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - Arg args[1]; - int i; - char *oldval = xkb_info->defs.model; - - for (i = 0; i < xkb_rules->model.nelem; i++) - if (strcmp(XtName(w), xkb_rules->model.name[i]) == 0) - break; - model = xkb_info->defs.model = xkb_rules->model.name[i]; - if (!UpdateKeyboard(False)) - model = xkb_info->defs.model = oldval; - else { - XtSetArg(args[0], XtNlabel, xkb_rules->model.desc[i]); - XtSetValues(modelb, args, 1); - } -} - -static void -KeyboardLayoutCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - Arg args[1]; - int i; - char *oldval = xkb_info->defs.layout; - - for (i = 0; i < xkb_rules->layout.nelem; i++) - if (strcmp(XtName(w), xkb_rules->layout.name[i]) == 0) - break; - layout = xkb_info->defs.layout = xkb_rules->layout.name[i]; - if (!UpdateKeyboard(False)) - layout = xkb_info->defs.layout = oldval; - else { - XtSetArg(args[0], XtNlabel, xkb_rules->layout.desc[i]); - XtSetValues(layoutb, args, 1); - } -} - -static void -KeyboardVariantCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - Arg args[1]; - int i; - char *label, *oldval = xkb_info->defs.variant; - - for (i = 0; i < xkb_rules->variant.nelem; i++) - if (strcmp(XtName(w), xkb_rules->variant.name[i]) == 0) - break; - variant = i < xkb_rules->variant.nelem ? xkb_rules->variant.name[i] : ""; - xkb_info->defs.variant = variant && *variant ? variant : NULL; - - if (!UpdateKeyboard(False)) - xkb_info->defs.variant = variant = oldval; - else { - label = i < xkb_rules->variant.nelem ? xkb_rules->variant.desc[i] : ""; - XtSetArg(args[0], XtNlabel, label); - XtSetValues(variantb, args, 1); - } -} - -static void -KeyboardOptionsCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - Arg args[1]; - int i; - - for (i = 0; i < xkb_rules->option.nelem; i++) - if (strcmp(XtName(w), xkb_rules->option.name[i]) == 0) - break; - - if (i < xkb_rules->option.nelem) { - char *delim, *ptr, str[256]; - - /* remove old string, don't check if the same */ - if ((delim = strchr(XtName(w), ':')) != NULL) { - if (delim - XtName(w) >= sizeof(str) - 2) - return; - strncpy(str, XtName(w), delim - XtName(w) + 1); - str[delim - XtName(w) + 1] = '\0'; - } - else - XmuSnprintf(str, sizeof(str), "%s:", XtName(w)); - if (options && (delim = strstr(options, str)) != NULL) { - if ((ptr = strchr(delim, ',')) != NULL) { - *delim = *ptr = '\0'; - XmuSnprintf(str, sizeof(str), "%s%s", options, ptr + 1); - XtFree(options); - options = XtNewString(str); - } - else { - if (delim > options) - delim[-1] = '\0'; - else - delim[0] = '\0'; - } - } - - /* update string, if required */ - if ((delim = strchr(XtName(w), ':')) != NULL) { - if (options && *options) - XmuSnprintf(str, sizeof(str), "%s,%s", options, XtName(w)); - else - XmuSnprintf(str, sizeof(str), "%s", XtName(w)); - XtFree(options); - options = XtNewString(str); - } - } - else { - XtFree(options); - options = XtNewString(""); - } - - if (options == NULL) - options = XtNewString(""); - - xkb_info->defs.options = options; - if (!UpdateKeyboard(False)) { - *options = '\0'; - xkb_info->defs.options = NULL; - } - XtSetArg(args[0], XtNlabel, options); - XtSetValues(optionsb, args, 1); - XtSetArg(args[0], XtNtip, options); - XtSetValues(optionsb, args, 1); -} - -/*ARGSUSED*/ -static void -KeyboardApplyCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - (void)UpdateKeyboard(True); -} - -static void -UpdateRulesPopups(void) -{ - int i; - char *optname; - Widget sme, optpopup = NULL, optparent; - - /* MODEL */ - if (modelp) - XtDestroyWidget(modelp); - modelp = XtCreatePopupShell("modelP", simpleMenuWidgetClass, - modelb, NULL, 0); - for (i = 0; i < xkb_rules->model.nelem; i++) { - sme = XtVaCreateManagedWidget(xkb_rules->model.name[i], smeBSBObjectClass, - modelp, - XtNlabel, xkb_rules->model.desc[i], - NULL); - XtAddCallback(sme, XtNcallback, KeyboardModelCallback, NULL); - } - - /* LAYOUT */ - if (layoutp) - XtDestroyWidget(layoutp); - layoutp = XtCreatePopupShell("layoutP", simpleMenuWidgetClass, - layoutb, NULL, 0); - for (i = 0; i < xkb_rules->layout.nelem; i++) { - sme = XtVaCreateManagedWidget(xkb_rules->layout.name[i], smeBSBObjectClass, - layoutp, - XtNlabel, xkb_rules->layout.desc[i], - NULL); - XtAddCallback(sme, XtNcallback, KeyboardLayoutCallback, NULL); - } - - /* VARIANT */ - if (variantp) - XtDestroyWidget(variantp); - variantp = XtCreatePopupShell("variantP", simpleMenuWidgetClass, - variantb, NULL, 0); - sme = XtVaCreateManagedWidget("None", smeBSBObjectClass, - variantp, - XtNlabel, "None", - NULL); - XtAddCallback(sme, XtNcallback, KeyboardVariantCallback, NULL); - for (i = 0; i < xkb_rules->variant.nelem; i++) { - sme = XtVaCreateManagedWidget(xkb_rules->variant.name[i], smeBSBObjectClass, - variantp, - XtNlabel, xkb_rules->variant.desc[i], - NULL); - XtAddCallback(sme, XtNcallback, KeyboardVariantCallback, NULL); - } - - /* OPTIONS */ - if (optionsp) - XtDestroyWidget(optionsp); - optionsp = XtCreatePopupShell("optionsP", simpleMenuWidgetClass, - optionsb, NULL, 0); - sme = XtVaCreateManagedWidget("None", smeBSBObjectClass, - optionsp, - XtNlabel, "None", - NULL); - XtAddCallback(sme, XtNcallback, KeyboardOptionsCallback, NULL); - optparent = optionsp; - optname = NULL; - for (i = 0; i < xkb_rules->option.nelem; i++) { - if (!strchr(xkb_rules->option.name[i], ':')) { - optpopup = - XtCreatePopupShell(optname = xkb_rules->option.desc[i], - simpleMenuWidgetClass, - optparent = optionsp, NULL, 0); - sme = XtVaCreateManagedWidget(xkb_rules->option.name[i], - smeBSBObjectClass, - optpopup, - XtNlabel, "None", - NULL); - XtAddCallback(sme, XtNcallback, KeyboardOptionsCallback, NULL); - } - else { - optparent = optpopup; - optname = NULL; - } - sme = XtVaCreateManagedWidget(xkb_rules->option.name[i], smeBSBObjectClass, - optparent, - XtNlabel, xkb_rules->option.desc[i], - XtNmenuName, optname, - XtNleftBitmap, optname ? menuPixmap : None, - NULL); - if (optparent != optionsp) - XtAddCallback(sme, XtNcallback, KeyboardOptionsCallback, NULL); - } -} - -void -KeyboardModelAndLayout(XF86SetupInfo *info) -{ - static int first = 1; - static Widget kbdml; - Arg args[1]; - int i; - - if (first) { - Widget popup, sme; - - first = 0; - - kbdml = XtCreateWidget("keyboardML", formWidgetClass, - configp, NULL, 0); - - /* RULES */ - XtCreateManagedWidget("labelR", labelWidgetClass, kbdml, NULL, 0); - rulesb = XtVaCreateManagedWidget("rules", menuButtonWidgetClass, kbdml, - XtNmenuName, "rulesP", - NULL); - popup = XtCreatePopupShell("rulesP", simpleMenuWidgetClass, - rulesb, NULL, 0); - { - struct dirent *ent; - DIR *dir; - - if ((dir = opendir(XkbRulesDir)) != NULL) { - (void)readdir(dir); - (void)readdir(dir); - while ((ent = readdir(dir)) != NULL) { - if (strchr(ent->d_name, '.')) - continue; - - sme = XtVaCreateManagedWidget(ent->d_name, smeBSBObjectClass, - popup, - XtNlabel, ent->d_name, - NULL); - XtAddCallback(sme, XtNcallback, KeyboardRulesCallback, NULL); - } - closedir(dir); - } - } - - /* MODEL */ - XtCreateManagedWidget("labelM", labelWidgetClass, kbdml, NULL, 0); - modelb = XtVaCreateManagedWidget("model", menuButtonWidgetClass, kbdml, - XtNmenuName, "modelP", - NULL); - - /* LAYOUT */ - XtCreateManagedWidget("labelL", labelWidgetClass, kbdml, NULL, 0); - layoutb = XtVaCreateManagedWidget("layout", menuButtonWidgetClass, kbdml, - XtNmenuName, "layoutP", - XtNlabel, xkb_rules->layout.desc[0], - NULL); - - /* VARIANT */ - XtCreateManagedWidget("labelV", labelWidgetClass, kbdml, NULL, 0); - variantb = XtVaCreateManagedWidget("variant", menuButtonWidgetClass, kbdml, - XtNmenuName, "variantP", - XtNlabel, "", - NULL); - - /* OPTIONS */ - XtCreateManagedWidget("labelO", labelWidgetClass, kbdml, NULL, 0); - optionsb = XtVaCreateManagedWidget("options", menuButtonWidgetClass, kbdml, - XtNmenuName, "optionsP", - XtNlabel, "", - NULL); - - UpdateRulesPopups(); - - kbd = XtCreateManagedWidget("keyboard", coreWidgetClass, - kbdml, NULL, 0); - - apply = XtCreateManagedWidget("apply", commandWidgetClass, - kbdml, NULL, 0); - XtAddCallback(apply, XtNcallback, KeyboardApplyCallback, NULL); - - XtRealizeWidget(kbdml); - - XtAddEventHandler(kbd, ExposureMask, False, XkbUIEventHandler, NULL); - /* Force the first update */ - XClearArea(XtDisplay(kbd), XtWindow(kbd), 0, 0, 0, 0, True); - } - - XtSetArg(args[0], XtNlabel, xkb_rules->rules); - XtSetValues(rulesb, args, 1); - - for (i = 0; i < xkb_rules->model.nelem; i++) - if (strcmp(model, xkb_rules->model.name[i]) == 0) { - XtSetArg(args[0], XtNlabel, xkb_rules->model.desc[i]); - XtSetValues(modelb, args, 1); - break; - } - - for (i = 0; i < xkb_rules->layout.nelem; i++) - if (strcmp(layout, xkb_rules->layout.name[i]) == 0) { - XtSetArg(args[0], XtNlabel, xkb_rules->layout.desc[i]); - XtSetValues(layoutb, args, 1); - break; - } - - if (variant) - for (i = 0; i < xkb_rules->variant.nelem; i++) - if (strcmp(variant, xkb_rules->variant.name[i]) == 0) { - XtSetArg(args[0], XtNlabel, xkb_rules->variant.desc[i]); - XtSetValues(variantb, args, 1); - break; - } - - if (options) { - XtSetArg(args[0], XtNlabel, options); - XtSetValues(optionsb, args, 1); - } - - XtChangeManagedSet(¤t, 1, NULL, NULL, &kbdml, 1); - current = kbdml; -} diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/keyboard-cfg.h b/xorg-server/hw/xfree86/utils/xorgcfg/keyboard-cfg.h deleted file mode 100644 index 512a19d7a..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/keyboard-cfg.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "config.h" -#include - -#ifndef _xf86cfg_keyboard_h -#define _xf86cfg_keyboard_h - -/* - * All file names are from XProjectRoot or XWINHOME environment variable. - */ -#define XkbConfigDir "share/X11/xkb/" -#define XkbConfigFile "X0-config.keyboard" - -/* - * Types - */ -typedef struct { - char **name; - char **desc; - int nelem; -} XF86XkbDescInfo; - -typedef struct { - XF86ConfInputPtr conf; - XkbDescPtr xkb; - XkbRF_VarDefsRec defs; - XkbConfigRtrnRec config; -} XkbInfo; - -/* - * Prototypes - */ -XtPointer KeyboardConfig(XtPointer); -void KeyboardModelAndLayout(XF86SetupInfo*); -void InitializeKeyboard(void); -Bool UpdateKeyboard(Bool); -Bool WriteXKBConfiguration(char*, XkbConfigRtrnPtr); - -/* - * Initialization - */ -extern XkbInfo *xkb_info; - -#endif /* _xf86cfg_keyboard_h */ diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/keyboard.xbm b/xorg-server/hw/xfree86/utils/xorgcfg/keyboard.xbm deleted file mode 100644 index 0346a8ccd..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/keyboard.xbm +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - * $XFree86$ - */ -#define keyboard_width 50 -#define keyboard_height 44 -static unsigned char keyboard_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xe0, 0xff, 0xff, 0xff, - 0xff, 0x1f, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x78, 0x9e, - 0xe7, 0x3d, 0xef, 0x79, 0x00, 0x18, 0x9a, 0xa6, 0x35, 0xad, 0x61, 0x00, - 0x18, 0x9e, 0xe7, 0x3d, 0xef, 0x61, 0x00, 0x18, 0x9e, 0xe7, 0x3d, 0xef, - 0x61, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x18, 0x00, 0x00, - 0x00, 0x00, 0x60, 0x00, 0x98, 0xf7, 0xde, 0x7b, 0xef, 0x67, 0x00, 0x98, - 0xd6, 0x5a, 0x6b, 0x2d, 0x66, 0x00, 0x98, 0xf7, 0xde, 0x7b, 0xef, 0x66, - 0x00, 0x98, 0xf7, 0xde, 0x7b, 0xef, 0x66, 0x00, 0x18, 0x00, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x98, 0xdf, 0x7b, 0xef, 0xbd, 0x66, 0x00, 0x98, 0x58, - 0x6b, 0xad, 0xb5, 0x66, 0x00, 0x98, 0xdf, 0x7b, 0xef, 0xbd, 0x67, 0x00, - 0x98, 0xdf, 0x7b, 0xef, 0xbd, 0x67, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, - 0x60, 0x00, 0x98, 0xf7, 0xde, 0x7b, 0xef, 0x67, 0x00, 0x98, 0xd6, 0x5a, - 0x6b, 0x2d, 0x66, 0x00, 0x98, 0xf7, 0xde, 0x7b, 0xef, 0x67, 0x00, 0x98, - 0xf7, 0xde, 0x7b, 0xef, 0x67, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x60, - 0x00, 0x98, 0xf7, 0xfd, 0xf7, 0xbd, 0x67, 0x00, 0x98, 0x96, 0x05, 0x96, - 0xb5, 0x66, 0x00, 0x98, 0xf7, 0xfd, 0xf7, 0xbd, 0x67, 0x00, 0x98, 0xf7, - 0xfd, 0xf7, 0xbd, 0x67, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, - 0x38, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, - 0x3f, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/keyboard.xpm b/xorg-server/hw/xfree86/utils/xorgcfg/keyboard.xpm deleted file mode 100644 index 200ba7f42..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/keyboard.xpm +++ /dev/null @@ -1,66 +0,0 @@ -/* XPM */ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - * $XFree86$ - */ -static char * card_xpm[] = { -"60 28 5 1", -" c none", -". c #AEBAAEBAAEBA", -"X c #CF3CCF3CCF3C", -"o c #8E388A288E38", -"O c #69A671C669A6", -" ........................ ", -" .............................XXXXXXXXXXXXXXXXXXXXXXXX..... ", -".XXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................XXXXoO", -".X........................................................oO", -".X........................................................oO", -".X.Xo..Xo.Xo.Xo..Xo.Xo.Xo.Xo.Xo.Xo..Xo.Xo.Xo..ooooooooooo.oO", -".X.oo..oo.oo.oo..oo.oo.oo.oo.oo.oo..oo.oo.oo..XXXXXXXXXXX.oO", -".X........................................................oO", -".X........................................................oO", -".X.Xo.Xo.Xo.Xo.Xo.Xo.Xo.Xo.Xo.Xo.o..Xo.Xo.Xo..Xo.Xo.Xo.Xo.oO", -".X.oo.oo.oo.oo.oo.oo.oo.oo.oo.oo.o..oo.oo.oo..oo.oo.oo.oo.oO", -".X........................................................oO", -".X.XXo.Xo.Xo.Xo.Xo.Xo.Xo.Xo.Xo.oXo..Xo.Xo.Xo..Xo.Xo.Xo.Xo.oO", -".X.ooo.oo.oo.oo.oo.oo.oo.oo.oo..Xo..oo.oo.oo..oo.oo.oo.Xo.oO", -".X..............................Xo.....................Xo.oO", -".X.Xo.Xo.Xo.Xo.Xo.Xo.Xo.Xo.Xo.XXXo..Xo.Xo.Xo..Xo.Xo.Xo.Xo.oO", -".X.oo.oo.oo.oo.oo.oo.oo.oo.oo.oooo..oo.oo.oo..oo.oo.oo.oo.oO", -".X........................................................oO", -".X.XXo.Xo.Xo.Xo.Xo.Xo.Xo.Xo.Xo.XXo.....Xo.....Xo.Xo.Xo.Xo.oO", -".X.ooo.oo.oo.oo.oo.oo.oo.oo.oo.ooo.....oo.....oo.oo.oo.Xo.oO", -".X.....................................................Xo.oO", -".X.Xo.Xo.Xo.XXXXXXXXXXXXo.Xo.Xo.Xo..Xo.Xo.Xo..XXXXo.Xo.Xo.oO", -".X.oo.oo.oo.ooooooooooooo.oo.oo.oo..oo.oo.oo..ooooo.oo.oo.oO", -".X........................................................oO", -".X........................................................oO", -".Xooooo.......................oooooooooooooooooooooooooooooO", -" XOOOOOoooooooooooooooooooooooOOOOOOOOOOOOOOOOOOOOOOOOOOOOO ", -" OOOOOOOOOOOOOOOOOOOOOOO "}; diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/left.xbm b/xorg-server/hw/xfree86/utils/xorgcfg/left.xbm deleted file mode 100644 index bfb8f3ba8..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/left.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define left_width 19 -#define left_height 19 -static unsigned char left_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x00, - 0x00, 0x07, 0x00, 0x80, 0x07, 0x00, 0xc0, 0x07, 0x00, 0xe0, 0xff, 0x01, - 0xf0, 0xff, 0x01, 0xf8, 0xff, 0x01, 0xf0, 0xff, 0x01, 0xe0, 0xff, 0x01, - 0xc0, 0x07, 0x00, 0x80, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x06, 0x00, - 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/loader.c b/xorg-server/hw/xfree86/utils/xorgcfg/loader.c deleted file mode 100644 index 8a9ad1aef..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/loader.c +++ /dev/null @@ -1,405 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "config.h" -#include "cards.h" -#include "options.h" -#include "loader.h" -#include "stubs.h" -#include -#include - -#ifdef USE_MODULES -#include -#include -#include -#if defined(X_POSIX_C_SOURCE) -#define _POSIX_C_SOURCE X_POSIX_C_SOURCE -#include -#undef _POSIX_C_SOURCE -#else -#include -#endif -#include -#include - -#include - -#ifndef OPTIONSPATH -#define OPTIONSPATH "/usr/lib/X11" -#endif - -#ifndef SIGNALRETURNSINT -void sig_handler(int); -#else -int sig_handler(int); -#endif /* SIGNALRETURNSINT */ - -static Bool EnumDatabase(XrmDatabase*, XrmBindingList, XrmQuarkList, - XrmRepresentation*, XrmValue*, XPointer); - -static sigjmp_buf jmp; -int signal_caught; -int error_level; -char *loaderPath, **loaderList, **ploaderList; -extern XrmDatabase options_xrm; -extern int noverify; -extern ModuleType module_type; -static OptionInfoPtr option; - -extern FontModule *font_module; -extern int numFontModules; - -char **checkerLegend; -int *checkerErrors; - -#ifndef SIGNALRETURNSINT -void -#else -int -#endif -sig_handler(int sig) -{ - char *str; - - switch (sig) { - case SIGTRAP: - str = "TRAP"; - break; - case SIGBUS: - str = "BUS"; - break; - case SIGSEGV: - str = "SEGV"; - break; - case SIGILL: - str = "ILL"; - break; - case SIGFPE: - str = "FPE"; - break; - default: - str = "???"; - break; - } - - if (signal_caught == 1) { - ErrorF(" ERROR I am dead.\n"); - exit(1); - } - else if (signal_caught == 2) - abort(); - ++signal_caught; - ErrorF(" ERROR SIG%s caught!\n", str); - if (!noverify) - error_level += 50; - siglongjmp(jmp, 1); - /*NOTREACHED*/ -} - -void -CheckMsg(int code, char *fmt, ...) -{ - va_list ap; - - ++checkerErrors[code]; - ErrorF("%3d ", code); - - va_start(ap, fmt); - VErrorF(fmt, ap); - va_end(ap); -} - -static Bool -EnumDatabase(XrmDatabase *db, XrmBindingList bindings, XrmQuarkList quarks, - XrmRepresentation *type, XrmValue *value, XPointer closure) -{ - char *res = XrmQuarkToString(quarks[1]); - - if (res) { - option = module_options->option; - while (option->name) { - if (strcasecmp(option->name, res) == 0) - return (False); - ++option; - } - CheckMsg(CHECKER_OPTION_UNUSED, - "WARNING %s.%s is not used\n", - XrmQuarkToString(quarks[0]), res); - ++error_level; - } - - return (False); -} - -Bool -LoaderInitializeOptions(void) -{ - static int first = 1; - static char *modules = "lib/modules"; - volatile Bool options_ok = False; - char *ptr, query[256]; - char *ptr2, query2[256]; - char *type; - XrmValue value; - XrmQuark names[2]; - XrmQuark classes[2]; - volatile int i; - static ModuleType module_types[] = { - GenericModule, FontRendererModule, InputModule, VideoModule, NullModule - }; - - /* The offset in this vector must match loader.h:enum ModuleType values */ - static char *module_strs[] = { - "Null Module", "Video Module", "Input Module", "Generic Module", "Font Module" - }; - - if (first) { - checkerLegend = (char**) - XtCalloc(1, sizeof(char*) * (CHECKER_LAST_MESSAGE + 1)); - checkerErrors = (int*) - XtCalloc(1, sizeof(int) * (CHECKER_LAST_MESSAGE + 1)); - xf86cfgLoaderInit(); - first = 0; - - checkerLegend[CHECKER_OPTIONS_FILE_MISSING] = - "The Options file, normally " OPTIONSPATH "/Options was not found.\n"; - checkerLegend[CHECKER_OPTION_DESCRIPTION_MISSING] = - "No description for the module option. The description should be in\n" - "in the Options file, and using the sintax:\n" - "Module.Option: any text describing the option"; - checkerLegend[CHECKER_LOAD_FAILED] = - "Failed to load the module. Usually the loader will print a complete\n" - "description for the reason the module was not loaded. Use the -verbose\n" - "command line option if it is not printing any messages."; - checkerLegend[CHECKER_RECOGNIZED_AS] = - "This message means the module code did not follow what was expected\n" - "by the checker. For video drivers, it did not call xf86AddDriver,\n" - "a input module did not call xf86AddInputDriver and a font renderer\n" - "module did not call LoadFont. This message can also be printed if\n" - "the module is in the incorrect directory."; - checkerLegend[CHECKER_NO_OPTIONS_AVAILABLE] = - "The driver does not have an AvailableOptions function, or that\n" - "function is returning NULL. If the driver is returning NULL, and\n" - "really does not need any options from "__XCONFIGFILE__", than the message\n" - "can be ignored."; - checkerLegend[CHECKER_NO_VENDOR_CHIPSET] = - "The checker could not fetch the PCI chipset/vendor information from\n" - "the module. The checker currently wraps xf86PrintChipsets and\n" - "xf86MatchPciInstances to read the information from the module."; - checkerLegend[CHECKER_CANNOT_VERIFY_CHIPSET] = - "The vendor id was not found, so it is not possible to search the list\n" - "of chipsets."; - checkerLegend[CHECKER_OPTION_UNUSED] = - "The option description is defined in the Options file, but the option\n" - "was name not retrieved when calling the module AvailableOptions."; - checkerLegend[CHECKER_NOMATCH_CHIPSET_STRINGS] = - "The string specified in the module does not match the one in\n" - "common/xf86PciInfo.h"; - checkerLegend[CHECKER_CHIPSET_NOT_LISTED] = - "This means that common/xf86PciInfo.h does not have an entry for the\n" - "given vendor and id."; - checkerLegend[CHECKER_CHIPSET_NOT_SUPPORTED] = - "The chipset is listed in common/xf86PciInfo.h, but the driver does\n" - "not support it, or does not list it in the chipsets fetched by the checker."; - checkerLegend[CHECKER_CHIPSET_NO_VENDOR] = - "The vendor id specified to xf86MatchPciInstances is not defined in\n" - "common/xf86PciInfo.h"; - checkerLegend[CHECKER_NO_CHIPSETS] = - "No chipsets were passed to xf86MatchPciIntances."; - checkerLegend[CHECKER_FILE_MODULE_NAME_MISMATCH] = - "The module name string does not match the the modname field of the\n" - "XF86ModuleVersionInfo structure. This generally is not an error, but\n" - "to may be a good idea to use the same string to avoid confusion."; - } - - if (XF86Module_path == NULL) { - XF86Module_path = malloc(strlen(XFree86Dir) + strlen(modules) + 2); - sprintf(XF86Module_path, "%s/%s", XFree86Dir, modules); - } - - if (loaderPath == NULL || strcmp(XF86Module_path, loaderPath)) - loaderPath = strdup(XF86Module_path); - else - /* nothing new */ - return (True); - - if (!noverify) { - options_ok = InitializeOptionsDatabase(); - InitializePciInfo(); - } - - for (i = 0; module_types[i] != NullModule; i++) { - xf86cfgLoaderInitList(module_types[i]); - if (!noverify) - ErrorF("================= Checking modules of type \"%s\" =================\n", - module_strs[module_types[i]]); - - if (loaderList) { - for (ploaderList = loaderList; *ploaderList; ploaderList++) { - signal_caught = 0; - signal(SIGTRAP, sig_handler); - signal(SIGBUS, sig_handler); - signal(SIGSEGV, sig_handler); - signal(SIGILL, sig_handler); - signal(SIGFPE, sig_handler); - if (sigsetjmp(jmp, 1) == 0) { - if (!noverify) { - int ok, nfont_modules; - - nfont_modules = numFontModules; - error_level = 0; - ErrorF("CHECK MODULE %s\n", *ploaderList); - if ((ok = xf86cfgCheckModule()) == 0) { - CheckMsg(CHECKER_LOAD_FAILED, - "ERROR Failed to load module.\n"); - error_level += 50; - } - else if (module_type != module_types[i]) { - CheckMsg(CHECKER_RECOGNIZED_AS, - "WARNING %s recognized as a \"%s\"\n", *ploaderList, - module_strs[module_type]); - ++error_level; - } - if (ok) { - if (options_ok) { - if ((module_options == NULL || module_options->option == NULL) && - module_type != GenericModule) { - CheckMsg(CHECKER_NO_OPTIONS_AVAILABLE, - "WARNING Not a generic module, but no options available.\n"); - ++error_level; - } - else if (module_options && strcmp(module_options->name, *ploaderList) == 0) { - ErrorF(" CHECK OPTIONS\n"); - option = module_options->option; - - while (option->name) { - XmuSnprintf(query, sizeof(query), "%s.%s", *ploaderList, option->name); - for (ptr = query, ptr2 = query2; *ptr; ptr++) { - if (*ptr != '_' && *ptr != ' ' && *ptr != '\t') - *ptr2 = tolower(*ptr); - } - *ptr2 = '\0'; - /* all resources are in lowercase */ - if (!XrmGetResource(options_xrm, query2, "Module.Option", &type, &value) || - value.addr == NULL) { - CheckMsg(CHECKER_OPTION_DESCRIPTION_MISSING, - "WARNING no description for %s\n", query); - ++error_level; - } - ++option; - } - - /* now do a linear search for Options file entries that are not - * in the driver. - */ - names[0] = XrmPermStringToQuark(module_options->name); - classes[0] = XrmPermStringToQuark("Option"); - names[1] = classes[1] = NULLQUARK; - (void)XrmEnumerateDatabase(options_xrm, (XrmNameList)&names, (XrmClassList)&classes, - XrmEnumOneLevel, EnumDatabase, NULL); - } - } - else { - CheckMsg(CHECKER_OPTIONS_FILE_MISSING, - "ERROR Options file missing.\n"); - error_level += 10; - } - - if (module_type == VideoModule && - (module_options == NULL || module_options->vendor < 0 || - module_options->chipsets == NULL)) { - CheckMsg(CHECKER_NO_VENDOR_CHIPSET, - "WARNING No vendor/chipset information available.\n"); - ++error_level; - } - else if (module_type == VideoModule) { - if (module_options == NULL) { - /* No description for this, if this happen, - * something really strange happened. */ - ErrorF(" ERROR No module_options!?!\n"); - error_level += 50; - } - else { - ErrorF(" CHECK CHIPSETS\n"); - CheckChipsets(module_options, &error_level); - } - } - - /* font modules check */ - if (module_type == FontRendererModule) { - if (strcmp(*ploaderList, font_module->name)) { - /* not an error */ - ErrorF(" NOTICE FontModule->name specification mismatch: \"%s\" \"%s\"\n", - *ploaderList, font_module->name); - } - if (nfont_modules + 1 != numFontModules) { - /* not an error */ - ErrorF(" NOTICE font module \"%s\" loaded more than one font renderer.\n", - *ploaderList); - } - } - else if (nfont_modules != numFontModules) { - ErrorF(" WARNING number of font modules changed from %d to %d.\n", - nfont_modules, numFontModules); - ++error_level; - } - } - ErrorF(" SUMMARY error_level set to %d.\n\n", error_level); - } - else - (void)xf86cfgCheckModule(); - } - signal(SIGTRAP, SIG_DFL); - signal(SIGBUS, SIG_DFL); - signal(SIGSEGV, SIG_DFL); - signal(SIGILL, SIG_DFL); - signal(SIGFPE, SIG_DFL); - } - xf86cfgLoaderFreeList(); - } - else - ErrorF(" ERROR Failed to initialize module list.\n"); - } - - if (!noverify) { - ErrorF("===================================== LEGEND ===============================\n"); - ErrorF("NOTICE lines are just informative.\n"); - ErrorF("WARNING lines add 1 to error_level.\n"); - ErrorF("ERROR lines add 2 or more (based on the severity of the error) to error_level.\n\n"); - for (i = 0; i <= CHECKER_LAST_MESSAGE; i++) - if (checkerErrors[i]) { - ErrorF("%3d\n%s\n\n", i, checkerLegend[i]); - } - } - - return (True); -} -#endif diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/loader.h b/xorg-server/hw/xfree86/utils/xorgcfg/loader.h deleted file mode 100644 index 16c527327..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/loader.h +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#ifdef USE_MODULES -#ifndef LOADER_PRIVATE -#include "config.h" -#include "stubs.h" - -#else - -#define IN_LOADER - -#include "xf86.h" -#include "xf86str.h" -#include "xf86Opt.h" -#include "xf86Module.h" - -#ifndef XINPUT -#define XINPUT -#endif -#include "xf86Xinput.h" - -#include -#include "loaderProcs.h" - -#include - -void LoaderDefaultFunc(void); -#endif - -#ifndef _xf86cfg_loader_h -#define _xf86cfg_loader_h - -void xf86cfgLoaderInit(void); -void xf86cfgLoaderInitList(int); -void xf86cfgLoaderFreeList(void); -int xf86cfgCheckModule(void); - -#ifndef LOADER_PRIVATE -/* common/xf86Opt.h */ -typedef struct { - double freq; - int units; -} OptFrequency; - -typedef union { - unsigned long num; - char * str; - double realnum; - Bool xbool; - OptFrequency freq; -} ValueUnion; - -typedef enum { - OPTV_NONE = 0, - OPTV_INTEGER, - OPTV_STRING, /* a non-empty string */ - OPTV_ANYSTR, /* Any string, including an empty one */ - OPTV_REAL, - OPTV_BOOLEAN, - OPTV_FREQ -} OptionValueType; - -typedef enum { - OPTUNITS_HZ = 1, - OPTUNITS_KHZ, - OPTUNITS_MHZ -} OptFreqUnits; - -typedef struct { - int token; - const char* name; - OptionValueType type; - ValueUnion value; - Bool found; -} OptionInfoRec, *OptionInfoPtr; - -/* fontmod.h */ -typedef void (*InitFont)(void); - -typedef struct { - InitFont initFunc; - char * name; - void *module; -} FontModule; - -extern FontModule *FontModuleList; - -typedef struct { - int token; /* id of the token */ - const char * name; /* token name */ -} SymTabRec, *SymTabPtr; -#endif /* !LOADER_PRIVATE */ - -typedef enum { - NullModule = 0, - VideoModule, - InputModule, - GenericModule, - FontRendererModule -} ModuleType; - -typedef struct _xf86cfgModuleOptions { - char *name; - ModuleType type; - OptionInfoPtr option; - int vendor; - SymTabPtr chipsets; - struct _xf86cfgModuleOptions *next; -} xf86cfgModuleOptions; - -extern xf86cfgModuleOptions *module_options; - -/* When adding a new code to the LEGEND, also update checkerLegend - * in loader.c - */ -extern char **checkerLegend; -extern int *checkerErrors; -#define CHECKER_OPTIONS_FILE_MISSING 1 -#define CHECKER_OPTION_DESCRIPTION_MISSING 2 -#define CHECKER_LOAD_FAILED 3 -#define CHECKER_RECOGNIZED_AS 4 -#define CHECKER_NO_OPTIONS_AVAILABLE 5 -#define CHECKER_NO_VENDOR_CHIPSET 6 -#define CHECKER_CANNOT_VERIFY_CHIPSET 7 -#define CHECKER_OPTION_UNUSED 8 -#define CHECKER_NOMATCH_CHIPSET_STRINGS 9 -#define CHECKER_CHIPSET_NOT_LISTED 10 -#define CHECKER_CHIPSET_NOT_SUPPORTED 11 -#define CHECKER_CHIPSET_NO_VENDOR 12 -#define CHECKER_NO_CHIPSETS 13 -#define CHECKER_FILE_MODULE_NAME_MISMATCH 14 - -#define CHECKER_LAST_MESSAGE 14 - -extern void CheckMsg(int, char*, ...); - -#ifndef LOADER_PRIVATE -int LoaderInitializeOptions(void); -#endif -#endif /* USE_MODULES */ - -#endif /* _xf86cfg_loader_h */ diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/loadmod.c b/xorg-server/hw/xfree86/utils/xorgcfg/loadmod.c deleted file mode 100644 index 629dfe118..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/loadmod.c +++ /dev/null @@ -1,663 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#ifdef USE_MODULES -#include - -#ifndef HAS_GLIBC_SIGSETJMP -#if defined(setjmp) && defined(__GNU_LIBRARY__) && \ - (!defined(__GLIBC__) || (__GLIBC__ < 2) || \ - ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 3))) -#define HAS_GLIBC_SIGSETJMP 1 -#endif -#endif - -#define LOADER_PRIVATE -#include "loader.h" - -#define True 1 -#define False 0 -#define XtPointer char* -#define XtMalloc malloc -#define XtCalloc calloc -#define XtRealloc realloc -#define XtFree free -#define XtNew(t) malloc(sizeof(t)) -#define XtNewString(s) ((s) ? strdup(s) : NULL) - -#define pointer void* - -/* XXX beware (or fix it) libc functions called here are the xf86 ones */ - -static void AddModuleOptions(char*, const OptionInfoRec*); -#if 0 -void xf86AddDriver(DriverPtr, void*, int); -Bool xf86ServerIsOnlyDetecting(void); -void xf86AddInputDriver(InputDriverPtr, pointer, int); -void xf86AddModuleInfo(ModuleInfoPtr, void*); -Bool xf86LoaderCheckSymbol(const char*); -void xf86LoaderRefSymLists(const char **, ...); -void xf86LoaderReqSymLists(const char **, ...); -void xf86Msg(int, const char*, ...); -void xf86MsgVerb(int, int, const char*, ...); -void xf86PrintChipsets(const char*, const char*, SymTabPtr); -void xf86ErrorFVerb(int verb, const char *format, ...); -int xf86MatchDevice(const char*, GDevPtr**); -int xf86MatchPciInstances(const char*, int, SymTabPtr, PciChipsets*, GDevPtr*, int, DriverPtr,int**); -int xf86MatchIsaInstances(const char*, SymTabPtr, pointer*, DriverPtr, pointer, GDevPtr*, int, int**); -void *xf86LoadDrvSubModule(DriverPtr drv, const char*); -void xf86DrvMsg(int, int, const char*, ...); -Bool xf86IsPrimaryPci(pcVideoPtr*); -Bool xf86CheckPciSlot( const struct pci_device * ); -#endif - -extern char *loaderPath, **loaderList, **ploaderList; -xf86cfgModuleOptions *module_options; -FontModule *font_module; -int numFontModules; - -extern int noverify, error_level; - -int xf86ShowUnresolved = 1; - -LOOKUP miLookupTab[] = {{0,0}}; -LOOKUP dixLookupTab[] = {{0,0}}; -LOOKUP fontLookupTab[] = {{0,0}}; -LOOKUP extLookupTab[] = {{0,0}}; -LOOKUP xfree86LookupTab[] = { - /* Loader functions */ - SYMFUNC(LoaderDefaultFunc) - SYMFUNC(LoadSubModule) - SYMFUNC(DuplicateModule) - SYMFUNC(LoaderErrorMsg) - SYMFUNC(LoaderCheckUnresolved) - SYMFUNC(LoadExtension) - SYMFUNC(LoadFont) - SYMFUNC(LoaderReqSymbols) - SYMFUNC(LoaderReqSymLists) - SYMFUNC(LoaderRefSymbols) - SYMFUNC(LoaderRefSymLists) - SYMFUNC(UnloadSubModule) - SYMFUNC(LoaderSymbol) - SYMFUNC(LoaderListDirs) - SYMFUNC(LoaderFreeDirList) - SYMFUNC(LoaderGetOS) - - /* - * these here are our own interfaces to libc functions - */ - SYMFUNC(xf86abort) - SYMFUNC(xf86abs) - SYMFUNC(xf86acos) - SYMFUNC(xf86asin) - SYMFUNC(xf86atan) - SYMFUNC(xf86atan2) - SYMFUNC(xf86atof) - SYMFUNC(xf86atoi) - SYMFUNC(xf86atol) - SYMFUNC(xf86bsearch) - SYMFUNC(xf86ceil) - SYMFUNC(xf86calloc) - SYMFUNC(xf86clearerr) - SYMFUNC(xf86close) - SYMFUNC(xf86cos) - SYMFUNC(xf86exit) - SYMFUNC(xf86exp) - SYMFUNC(xf86fabs) - SYMFUNC(xf86fclose) - SYMFUNC(xf86feof) - SYMFUNC(xf86ferror) - SYMFUNC(xf86fflush) - SYMFUNC(xf86fgetc) - SYMFUNC(xf86fgetpos) - SYMFUNC(xf86fgets) - SYMFUNC(xf86finite) - SYMFUNC(xf86floor) - SYMFUNC(xf86fmod) - SYMFUNC(xf86fopen) - SYMFUNC(xf86fprintf) - SYMFUNC(xf86fputc) - SYMFUNC(xf86fputs) - SYMFUNC(xf86fread) - SYMFUNC(xf86free) - SYMFUNC(xf86freopen) - SYMFUNC(xf86frexp) - SYMFUNC(xf86fscanf) - SYMFUNC(xf86fseek) - SYMFUNC(xf86fsetpos) - SYMFUNC(xf86ftell) - SYMFUNC(xf86fwrite) - SYMFUNC(xf86getc) - SYMFUNC(xf86getenv) - SYMFUNC(xf86getpagesize) - SYMFUNC(xf86hypot) - SYMFUNC(xf86ioctl) - SYMFUNC(xf86isalnum) - SYMFUNC(xf86isalpha) - SYMFUNC(xf86iscntrl) - SYMFUNC(xf86isdigit) - SYMFUNC(xf86isgraph) - SYMFUNC(xf86islower) - SYMFUNC(xf86isprint) - SYMFUNC(xf86ispunct) - SYMFUNC(xf86isspace) - SYMFUNC(xf86isupper) - SYMFUNC(xf86isxdigit) - SYMFUNC(xf86labs) - SYMFUNC(xf86ldexp) - SYMFUNC(xf86log) - SYMFUNC(xf86log10) - SYMFUNC(xf86lseek) - SYMFUNC(xf86malloc) - SYMFUNC(xf86memchr) - SYMFUNC(xf86memcmp) - SYMFUNC(xf86memcpy) -#if (defined(__powerpc__) && (defined(Lynx) || defined(linux))) || \ - defined(__sparc__) || defined(__sparc) || defined(__ia64__) || \ - defined (__amd64__) || defined(__x86_64__) - /* - * Some PPC, SPARC, and IA64 compilers generate calls to memcpy to handle - * structure copies. This causes a problem both here and in shared - * libraries as there is no way to map the name of the call to the - * correct function. - */ - SYMFUNC(memcpy) - /* - * Some PPC, SPARC, and IA64 compilers generate calls to memset to handle - * aggregate initializations. - */ - SYMFUNC(memset) -#endif - SYMFUNC(xf86memmove) - SYMFUNC(xf86memset) - SYMFUNC(xf86mmap) - SYMFUNC(xf86modf) - SYMFUNC(xf86munmap) - SYMFUNC(xf86open) - SYMFUNC(xf86perror) - SYMFUNC(xf86pow) - SYMFUNC(xf86printf) - SYMFUNC(xf86qsort) - SYMFUNC(xf86read) - SYMFUNC(xf86realloc) - SYMFUNC(xf86remove) - SYMFUNC(xf86rename) - SYMFUNC(xf86rewind) - SYMFUNC(xf86setbuf) - SYMFUNC(xf86setvbuf) - SYMFUNC(xf86sin) - SYMFUNC(xf86snprintf) - SYMFUNC(xf86sprintf) - SYMFUNC(xf86sqrt) - SYMFUNC(xf86sscanf) - SYMFUNC(xf86strcat) - SYMFUNC(xf86strcmp) - SYMFUNC(xf86strcasecmp) - SYMFUNC(xf86strcpy) - SYMFUNC(xf86strcspn) - SYMFUNC(xf86strerror) - SYMFUNC(xf86strlen) - SYMFUNC(xf86strncmp) - SYMFUNC(xf86strncasecmp) - SYMFUNC(xf86strncpy) - SYMFUNC(xf86strpbrk) - SYMFUNC(xf86strchr) - SYMFUNC(xf86strrchr) - SYMFUNC(xf86strspn) - SYMFUNC(xf86strstr) - SYMFUNC(xf86strtod) - SYMFUNC(xf86strtok) - SYMFUNC(xf86strtol) - SYMFUNC(xf86strtoul) - SYMFUNC(xf86tan) - SYMFUNC(xf86tmpfile) - SYMFUNC(xf86tolower) - SYMFUNC(xf86toupper) - SYMFUNC(xf86ungetc) - SYMFUNC(xf86vfprintf) - SYMFUNC(xf86vsnprintf) - SYMFUNC(xf86vsprintf) - SYMFUNC(xf86write) - -/* non-ANSI C functions */ - SYMFUNC(xf86opendir) - SYMFUNC(xf86closedir) - SYMFUNC(xf86readdir) - SYMFUNC(xf86rewinddir) - SYMFUNC(xf86ffs) - SYMFUNC(xf86strdup) - SYMFUNC(xf86bzero) - SYMFUNC(xf86usleep) - SYMFUNC(xf86execl) - - SYMFUNC(xf86getsecs) - SYMFUNC(xf86fpossize) /* for returning sizeof(fpos_t) */ - - SYMFUNC(xf86stat) - SYMFUNC(xf86fstat) - SYMFUNC(xf86access) - SYMFUNC(xf86geteuid) - SYMFUNC(xf86getegid) - SYMFUNC(xf86getpid) - SYMFUNC(xf86mknod) - SYMFUNC(xf86chmod) - SYMFUNC(xf86chown) - SYMFUNC(xf86sleep) - SYMFUNC(xf86mkdir) - SYMFUNC(xf86shmget) - SYMFUNC(xf86shmat) - SYMFUNC(xf86shmdt) - SYMFUNC(xf86shmctl) -#ifdef HAS_GLIBC_SIGSETJMP - SYMFUNC(xf86setjmp) - SYMFUNC(xf86setjmp0) -#if defined(__GLIBC__) && (__GLIBC__ >= 2) - SYMFUNCALIAS("xf86setjmp1",__sigsetjmp) -#else - SYMFUNC(xf86setjmp1) -#endif -#else - SYMFUNCALIAS("xf86setjmp",setjmp) - SYMFUNCALIAS("xf86setjmp0",setjmp) - SYMFUNC(xf86setjmp1) -#endif - SYMFUNCALIAS("xf86longjmp",longjmp) - SYMFUNC(xf86getjmptype) - SYMFUNC(xf86setjmp1_arg2) - SYMFUNC(xf86setjmperror) - - SYMFUNC(xf86AddDriver) - SYMFUNC(xf86ServerIsOnlyDetecting) - SYMFUNC(xf86AddInputDriver) - SYMFUNC(xf86AddModuleInfo) - SYMFUNC(xf86LoaderCheckSymbol) - - SYMFUNC(xf86LoaderRefSymLists) - SYMFUNC(xf86LoaderReqSymLists) - SYMFUNC(xf86Msg) - SYMFUNC(xf86MsgVerb) - SYMFUNC(ErrorF) - SYMFUNC(xf86PrintChipsets) - SYMFUNC(xf86ErrorFVerb) - SYMFUNC(xf86MatchDevice) - SYMFUNC(xf86MatchPciInstances) - SYMFUNC(xf86MatchIsaInstances) - SYMFUNC(Xfree) - SYMFUNC(xf86LoadDrvSubModule) - SYMFUNC(xf86DrvMsg) - SYMFUNC(xf86IsPrimaryPci) - SYMFUNC(xf86CheckPciSlot) - SYMFUNC(XNFalloc) - SYMFUNC(XNFrealloc) - SYMFUNC(XNFcalloc) - {0,0} -}; - -static DriverPtr driver; -static ModuleInfoPtr info; -static SymTabPtr chips; -static int vendor; -ModuleType module_type = GenericModule; - -static void -AddModuleOptions(char *name, const OptionInfoRec *option) -{ - xf86cfgModuleOptions *ptr; - const OptionInfoRec *tmp; - SymTabPtr ctmp; - int count; - - /* XXX If the module is already in the list, then it means that - * it is now being properly loaded by xf86cfg and the "fake" entry - * added in xf86cfgLoaderInitList() isn't required anymore. - * Currently: - * ati and vmware are known to fail. */ - for (ptr = module_options; ptr; ptr = ptr->next) - if (strcmp(name, ptr->name) == 0) { - fprintf(stderr, "Module %s already in list!\n", name); - return; - } - - ptr = XtNew(xf86cfgModuleOptions); - ptr->name = XtNewString(name); - ptr->type = module_type; - if (option) { - for (count = 0, tmp = option; tmp->name != NULL; tmp++, count++) - ; - ++count; - ptr->option = XtCalloc(1, count * sizeof(OptionInfoRec)); - for (count = 0, tmp = option; tmp->name != NULL; count++, tmp++) { - memcpy(&ptr->option[count], tmp, sizeof(OptionInfoRec)); - ptr->option[count].name = XtNewString(tmp->name); - if (tmp->type == OPTV_STRING || tmp->type == OPTV_ANYSTR) - ptr->option[count].value.str = XtNewString(tmp->value.str); - } - } - else - ptr->option = NULL; - if (vendor != -1 && chips) { - ptr->vendor = vendor; - for (count = 0, ctmp = chips; ctmp->name; ctmp++, count++) - ; - ++count; - ptr->chipsets = XtCalloc(1, count * sizeof(SymTabRec)); - for (count = 0, ctmp = chips; ctmp->name != NULL; count++, ctmp++) { - memcpy(&ptr->chipsets[count], ctmp, sizeof(SymTabRec)); - ptr->chipsets[count].name = XtNewString(ctmp->name); - } - } - else - ptr->chipsets = NULL; - - ptr->next = module_options; - module_options = ptr; -} - -extern void xf86WrapperInit(void); - -void -xf86cfgLoaderInit(void) -{ - LoaderInit(); - xf86WrapperInit(); -} - -void -xf86cfgLoaderInitList(int type) -{ - static const char *generic[] = { - ".", - NULL - }; - static const char *video[] = { - "drivers", - NULL - }; - static const char *input[] = { - "input", - NULL - }; - static const char *font[] = { - "fonts", - NULL - }; - const char **subdirs; - - switch (type) { - case GenericModule: - subdirs = generic; - break; - case VideoModule: - subdirs = video; - break; - case InputModule: - subdirs = input; - break; - case FontRendererModule: - subdirs = font; - break; - default: - fprintf(stderr, "Invalid value passed to xf86cfgLoaderInitList.\n"); - subdirs = generic; - break; - } - LoaderSetPath(loaderPath); - loaderList = LoaderListDirs(subdirs, NULL); - - /* XXX Xf86cfg isn't able to provide enough wrapper functions - * to these drivers. Maybe the drivers could also be changed - * to work better when being loaded "just for testing" */ - if (type == VideoModule) { - module_type = VideoModule; - AddModuleOptions("vmware", NULL); - AddModuleOptions("ati", NULL); - module_type = NullModule; - } -} - -void -xf86cfgLoaderFreeList(void) -{ - LoaderFreeDirList(loaderList); -} - -int -xf86cfgCheckModule(void) -{ - int errmaj, errmin; - ModuleDescPtr module; - int nfonts; - FontModule *fonts, *pfont_module; - - driver = NULL; - chips = NULL; - info = NULL; - pfont_module = NULL; - vendor = -1; - module_type = GenericModule; - - if ((module = LoadModule(*ploaderList, NULL, NULL, NULL, NULL, - NULL, &errmaj, &errmin)) == NULL) { - LoaderErrorMsg(NULL, *ploaderList, errmaj, errmin); - return (0); - } - else if (driver && driver->AvailableOptions) { - /* at least fbdev does not call xf86MatchPciInstances in Probe */ - if (driver->Identify) - (*driver->Identify)(-1); - if (driver->Probe) - (*driver->Probe)(driver, PROBE_DETECT); - AddModuleOptions(*ploaderList, (*driver->AvailableOptions)(-1, -1)); - } - else if (info && info->AvailableOptions) - AddModuleOptions(*ploaderList, (*info->AvailableOptions)(NULL)); - - if (!noverify) { - XF86ModuleData *initdata = NULL; - char *p; - - p = XtMalloc(strlen(*ploaderList) + strlen("ModuleData") + 1); - strcpy(p, *ploaderList); - strcat(p, "ModuleData"); - initdata = LoaderSymbol(p); - if (initdata) { - XF86ModuleVersionInfo *vers; - - vers = initdata->vers; - if (vers && strcmp(*ploaderList, vers->modname)) { - /* This was a problem at some time for some video drivers */ - CheckMsg(CHECKER_FILE_MODULE_NAME_MISMATCH, - "WARNING file/module name mismatch: \"%s\" \"%s\"\n", - *ploaderList, vers->modname); - ++error_level; - } - } - XtFree(p); - } - - nfonts = numFontModules; - numFontModules = 0; - fonts = FontModuleList; - if (fonts) { - Bool dup = FALSE; - while (fonts->name) { - if (strcasecmp(fonts->name, *ploaderList) == 0) { - pfont_module = fonts; - /* HACK: - * fonts->names points into modules. - * Duplicate string of all remaining names to survive - * unloading. Since new fonts are appended to list - * this will only happen once per renderer. - */ - dup = TRUE; - } - if (dup) - fonts->name = strdup(fonts->name); - ++numFontModules; - ++fonts; - } - } - if (pfont_module) - module_type = FontRendererModule; - else if (nfonts + 1 <= numFontModules) { - /* loader.c will flag a warning if -noverify is not set */ - pfont_module = &FontModuleList[nfonts]; - module_type = FontRendererModule; - } - - if (font_module) { - XtFree((XtPointer)font_module->name); - XtFree((XtPointer)font_module); - font_module = NULL; - } - if (pfont_module) { - font_module = XtNew(FontModule); - memcpy(font_module, pfont_module, sizeof(FontModule)); - font_module->name = XtNewString(pfont_module->name); - } - - UnloadModule(module); - - return (1); -} - -_X_EXPORT void -xf86AddDriver(DriverPtr drv, void *module, int flags) -{ - driver = drv; - if (driver) - driver->module = module; - module_type = VideoModule; -} - -_X_EXPORT Bool -xf86ServerIsOnlyDetecting(void) -{ - return (True); -} - -_X_EXPORT void -xf86AddInputDriver(InputDriverPtr inp, void *module, int flags) -{ - module_type = InputModule; -} - -_X_EXPORT void -xf86AddModuleInfo(ModuleInfoPtr inf, void *module) -{ - info = inf; -} - -_X_EXPORT Bool -xf86LoaderCheckSymbol(const char *symbol) -{ - return LoaderSymbol(symbol) != NULL; -} - -_X_EXPORT void -xf86LoaderRefSymLists(const char **list0, ...) -{ -} - -_X_EXPORT void -xf86LoaderReqSymLists(const char **list0, ...) -{ -} - -#if 0 -void xf86Msg(int type, const char *format, ...) -{ -} -#endif - -/*ARGSUSED*/ -_X_EXPORT void -xf86PrintChipsets(const char *name, const char *msg, SymTabPtr chipsets) -{ - vendor = 0; - chips = chipsets; -} - -_X_EXPORT int -xf86MatchDevice(const char *name, GDevPtr **gdev) -{ - *gdev = NULL; - - return (1); -} - -_X_EXPORT int -xf86MatchPciInstances(const char *name, int VendorID, SymTabPtr chipsets, PciChipsets *PCIchipsets, - GDevPtr *devList, int numDevs, DriverPtr drvp, int **foundEntities) -{ - vendor = VendorID; - if (chips == NULL) - chips = chipsets; - *foundEntities = NULL; - - return (0); -} - -_X_EXPORT int -xf86MatchIsaInstances(const char *name, SymTabPtr chipsets, IsaChipsets *ISAchipsets, DriverPtr drvp, - FindIsaDevProc FindIsaDevice, GDevPtr *devList, int numDevs, int **foundEntities) -{ - *foundEntities = NULL; - - return (0); -} - -/*ARGSUSED*/ -_X_EXPORT void * -xf86LoadDrvSubModule(DriverPtr drv, const char *name) -{ - pointer ret; - int errmaj = 0, errmin = 0; - - ret = LoadSubModule(drv->module, name, NULL, NULL, NULL, NULL, - &errmaj, &errmin); - if (!ret) - LoaderErrorMsg(NULL, name, errmaj, errmin); - return (ret); -} - -_X_EXPORT Bool -xf86IsPrimaryPci(pciVideoPtr pPci) -{ - return (True); -} - -_X_EXPORT Bool -xf86CheckPciSlot( const struct pci_device * d ) -{ - (void) d; - return (False); -} -#endif diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/monitor-cfg.c b/xorg-server/hw/xfree86/utils/xorgcfg/monitor-cfg.c deleted file mode 100644 index a443c54c2..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/monitor-cfg.c +++ /dev/null @@ -1,456 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "xf86config.h" -#include "monitor-cfg.h" -#include "screen.h" -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Prototypes - */ -static Bool MonitorConfigCheck(void); -static void MonitorHsyncCallback(Widget, XtPointer, XtPointer); -static void MonitorVsyncCallback(Widget, XtPointer, XtPointer); -static void MonitorSelectCardCallback(Widget, XtPointer, XtPointer); - -extern void DrawCables(void); - -/* - * Initialization - */ -static char *hmodes[] = { - "Standard VGA, 640x480 @ 60 Hz", - "Super VGA, 800x600 @ 56 Hz", - "1024x768 @ 87 Hz int. (no 800x600)", - "1024x768 @ 87 Hz int., 800x600 @ 56 Hz", - "800x600 @ 60 Hz, 640x480 @ 72 Hz", - "1024x768 @ 60 Hz, 800x600 @ 72 Hz", - "High Frequency SVGA, 1024x768 @ 70 Hz", - "Monitor that can do 1280x1024 @ 60 Hz", - "Monitor that can do 1280x1024 @ 74 Hz", - "Monitor that can do 1280x1024 @ 76 Hz", - "Monitor that can do 1280x1024 @ 85 Hz", - "Monitor that can do 1600x1200 @ 85 Hz", - "Monitor that can do 1920x1440 @ 85 Hz", - "Monitor that can do 2048x1536 @ 85 Hz" -}; - -static char *hmodes_trans[] = { - "31.5", - "31.5 - 35.1", - "31.5, 35.5", - "31.5, 35.15, 35.5", - "31.5 - 37.9", - "31.5 - 48.5", - "31.5 - 57.0", - "31.5 - 64.3", - "31.5 - 79.0", - "31.5 - 82.0", - "31.5 - 92.0", - "31.5 - 108.0", - "31.5 - 128.5", - "31.5 - 137.0" -}; - -static char *vmodes [] = { "50 - 70", "50 - 90", "50 - 100", "40 - 150", }; - -extern Widget config; -static Widget hsync, vsync, hlist, vlist, cmenu; - -static parser_range mon_hsync[CONF_MAX_HSYNC]; -static parser_range mon_vrefresh[CONF_MAX_VREFRESH]; -static int mon_n_hsync, mon_n_vrefresh; -static XF86ConfDevicePtr oldcard, card; -static XF86ConfMonitorPtr current_monitor; - -/* - * Implementation - */ -XtPointer -MonitorConfig(XtPointer conf) -{ - XF86ConfMonitorPtr monitor = (XF86ConfMonitorPtr)conf; - char monitor_name[48]; - Arg args[1]; - - current_monitor = monitor; - - xf86info.cur_list = MONITOR; - XtSetSensitive(back, xf86info.lists[MONITOR].cur_function > 0); - XtSetSensitive(next, xf86info.lists[MONITOR].cur_function < - xf86info.lists[MONITOR].num_functions - 1); - (xf86info.lists[MONITOR].functions[xf86info.lists[MONITOR].cur_function]) - (&xf86info); - - XawListUnhighlight(hlist); - XawListUnhighlight(vlist); - - if (monitor != NULL) { - XF86ConfScreenPtr screen = XF86Config->conf_screen_lst; - char str[PARSER_RANGE_SIZE]; - - XtSetArg(args[0], XtNstring, monitor->mon_identifier); - XtSetValues(ident_widget, args, 1); - - while (screen != NULL) { - if (screen->scrn_monitor == monitor) - break; - - screen = (XF86ConfScreenPtr)(screen->list.next); - } - if (screen != NULL) { - oldcard = card = screen->scrn_device; - XtSetArg(args[0], XtNlabel, card->dev_identifier); - } - else { - oldcard = card = NULL; - XtSetArg(args[0], XtNlabel, ""); - } - XtSetValues(cmenu, args, 1); - - mon_n_hsync = monitor->mon_n_hsync; - memcpy(mon_hsync, monitor->mon_hsync, - sizeof(parser_range) * mon_n_hsync); - *str = '\0'; - parser_range_to_string(str, mon_hsync, mon_n_hsync); - XtSetArg(args[0], XtNstring, str); - XtSetValues(hsync, args, 1); - - mon_n_vrefresh = monitor->mon_n_vrefresh; - memcpy(mon_vrefresh, monitor->mon_vrefresh, - sizeof(parser_range) * mon_n_vrefresh); - *str = '\0'; - parser_range_to_string(str, mon_vrefresh, mon_n_vrefresh); - XtSetArg(args[0], XtNstring, str); - XtSetValues(vsync, args, 1); - } - else { - XF86ConfMonitorPtr monitor = XF86Config->conf_monitor_lst; - int nmonitors = 0; - - oldcard = card = NULL; - while (monitor != NULL) { - ++nmonitors; - monitor = (XF86ConfMonitorPtr)(monitor->list.next); - } - do { - XmuSnprintf(monitor_name, sizeof(monitor_name), - "Monitor%d", nmonitors); - ++nmonitors; - } while (xf86findMonitor(monitor_name, - XF86Config->conf_monitor_lst)); - - XtSetArg(args[0], XtNstring, monitor_name); - XtSetValues(ident_widget, args, 1); - - XtSetArg(args[0], XtNstring, ""); - XtSetValues(hsync, args, 1); - XtSetValues(vsync, args, 1); - - XtSetArg(args[0], XtNlabel, ""); - XtSetValues(cmenu, args, 1); - } - - if (ConfigLoop(MonitorConfigCheck) == True) { - if (monitor == NULL) { - monitor = (XF86ConfMonitorPtr) - XtCalloc(1, sizeof(XF86ConfMonitorRec)); - monitor->mon_identifier = XtNewString(ident_string); - } - - memcpy(monitor->mon_hsync, mon_hsync, sizeof(parser_range) * - (monitor->mon_n_hsync = mon_n_hsync)); - memcpy(monitor->mon_vrefresh, mon_vrefresh, sizeof(parser_range) * - (monitor->mon_n_vrefresh = mon_n_vrefresh)); - - if (strcasecmp(monitor->mon_identifier, ident_string)) - xf86renameMonitor(XF86Config, monitor, ident_string); - - if (oldcard != card) { - int i; - - for (i = 0; i < computer.num_devices; i++) - if (computer.devices[i]->widget == config) - break; - if (computer.devices[i]->config == NULL) - XF86Config->conf_monitor_lst = - xf86addMonitor(XF86Config->conf_monitor_lst, - monitor); - computer.devices[i]->config = (XtPointer)monitor; - ChangeScreen(monitor, monitor, card, oldcard); - DrawCables(); - } - - return (monitor); - } - - return (NULL); -} - -static Bool -MonitorConfigCheck(void) -{ - char *str; - Arg args[1]; - XF86ConfMonitorPtr monitor = XF86Config->conf_monitor_lst; - - if (ident_string == NULL || strlen(ident_string) == 0) - return (False); - - bzero(mon_hsync, sizeof(parser_range) * CONF_MAX_HSYNC); - bzero(mon_vrefresh, sizeof(parser_range) * CONF_MAX_VREFRESH); - - XtSetArg(args[0], XtNstring, &str); - XtGetValues(hsync, args, 1); - if ((mon_n_hsync = string_to_parser_range(str, mon_hsync, - CONF_MAX_HSYNC)) <= 0) - return (False); - - XtSetArg(args[0], XtNstring, &str); - XtGetValues(vsync, args, 1); - if ((mon_n_vrefresh = string_to_parser_range(str, mon_vrefresh, - CONF_MAX_VREFRESH)) <= 0) - return (False); - - while (monitor != NULL) { - if (monitor != current_monitor && - strcasecmp(ident_string, monitor->mon_identifier) == 0) - return (False); - monitor = (XF86ConfMonitorPtr)(monitor->list.next); - } - - return (True); -} - -int -string_to_parser_range(char *str, parser_range *range, int nrange) -{ - double val; - int i = 0; - - if (str == NULL || *str == '\0' || range == NULL || nrange == 0) - return (0); - - while (*str) { - while (*str && isspace(*str)) - ++str; - if (!isdigit(*str)) { - ++str; - continue; - } - val = strtod(str, &str); - while (*str && isspace(*str)) - ++str; - if (*str == ',' || *str == '\0') { - if (*str) - ++str; - range[i].lo = range[i].hi = val; - if (++i >= nrange || *str == '\0') - break; - continue; - } - else if (*str != '-') - return (0); - ++str; - range[i].lo = val; - while (*str && isspace(*str)) - ++str; - if ((range[i].hi = strtod(str, &str)) < range[i].lo) - return (0); - if (++i >= nrange) - break; - } - - return (i); -} - -int -parser_range_to_string(char *str, parser_range *range, int nrange) -{ - int i, len; - - if (str == NULL || range == NULL || nrange <= 0) - return (0); - - for (i = len = 0; i < nrange; i++) { - if (i > 0) - len += XmuSnprintf(str + len, PARSER_RANGE_SIZE - len, "%s", - ", "); - if (range[i].lo == range[i].hi) - len += XmuSnprintf(str + len, PARSER_RANGE_SIZE - len, "%g", - range[i].lo); - else if (range[i].lo < range[i].hi) - len += XmuSnprintf(str + len, PARSER_RANGE_SIZE - len, "%g - %g", - range[i].lo, range[i].hi); - else - return (0); - } - - return (i); -} - -/*ARGSUSED*/ -static void -MonitorHsyncCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - XawListReturnStruct *info = (XawListReturnStruct *)call_data; - Arg args[1]; - - XtSetArg(args[0], XtNstring, hmodes_trans[info->list_index]); - XtSetValues(hsync, args, 1); -} - -/*ARGSUSED*/ -static void -MonitorVsyncCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - XawListReturnStruct *info = (XawListReturnStruct *)call_data; - Arg args[1]; - - XtSetArg(args[0], XtNstring, info->string); - XtSetValues(vsync, args, 1); -} - -/*ARGSUSED*/ -static void -MonitorSelectCardCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - Arg args[1]; - - card = (XF86ConfDevicePtr)user_data; - XtSetArg(args[0], XtNlabel, card != NULL ? card->dev_identifier : ""); - XtSetValues(cmenu, args, 1); -} - -void -MonitorLayout(XF86SetupInfo *info) -{ - static int first = 1, men; - static Widget layout, menu; - XF86ConfDevicePtr device = XF86Config->conf_device_lst; - Widget sme; - Arg args[1]; - char *menuname; - - if (first) { - Widget viewport; - - first = 0; - - layout = XtCreateWidget("monitorl", formWidgetClass, - configp, NULL, 0); - XtCreateManagedWidget("hlabel", labelWidgetClass, layout, NULL, 0); - hsync = XtVaCreateManagedWidget("hsync", asciiTextWidgetClass, layout, - XtNeditType, XawtextEdit, - NULL); - viewport = XtCreateManagedWidget("hviewport", viewportWidgetClass, - layout, NULL, 0); - hlist = XtVaCreateManagedWidget("hlist", listWidgetClass, viewport, - XtNlist, hmodes, - XtNnumberStrings, sizeof(hmodes) / - sizeof(hmodes[0]), NULL); - XtAddCallback(hlist, XtNcallback, MonitorHsyncCallback, NULL); - - XtCreateManagedWidget("vlabel", labelWidgetClass, layout, NULL, 0); - vsync = XtVaCreateManagedWidget("vsync", asciiTextWidgetClass, layout, - XtNeditType, XawtextEdit, - NULL); - viewport = XtCreateManagedWidget("vviewport", viewportWidgetClass, - layout, NULL, 0); - vlist = XtVaCreateManagedWidget("vlist", listWidgetClass, viewport, - XtNlist, vmodes, - XtNnumberStrings, sizeof(vmodes) / - sizeof(vmodes[0]), NULL); - XtAddCallback(vlist, XtNcallback, MonitorVsyncCallback, NULL); - - XtCreateManagedWidget("clabel", labelWidgetClass, layout, NULL, 0); - cmenu = XtCreateManagedWidget("cmenu", menuButtonWidgetClass, - layout, NULL, 0); - - XtRealizeWidget(layout); - } - - if (menu != NULL) - XtDestroyWidget(menu); - - /* - * swaps names because XtDestroyWidget will only really destroy it - * when the code returns to XtAppMainLoop - */ - menuname = men & 1 ? "mena" : "menb"; - menu = XtCreatePopupShell(menuname, simpleMenuWidgetClass, - cmenu, NULL, 0); - XtSetArg(args[0], XtNmenuName, menuname); - XtSetValues(cmenu, args, 1); - ++men; - sme = XtVaCreateManagedWidget("none", smeBSBObjectClass, menu, - NULL); - XtAddCallback(sme, XtNcallback, MonitorSelectCardCallback, NULL); - - while (device != NULL) { - XF86ConfScreenPtr screen = XF86Config->conf_screen_lst; - Widget sme; - Bool sensitive = True; - - while (screen != NULL) { - if (screen->scrn_device == device) { - sensitive = screen->scrn_monitor == NULL || - screen->scrn_monitor == current_monitor; - break; - } - screen = (XF86ConfScreenPtr)(screen->list.next); - } - sme = XtCreateManagedWidget(device->dev_identifier, - smeBSBObjectClass, menu, - NULL, 0); - if (sensitive) - XtAddCallback(sme, XtNcallback, MonitorSelectCardCallback, device); - XtSetSensitive(sme, sensitive); - - device = (XF86ConfDevicePtr)(device->list.next); - } - - XtRealizeWidget(menu); - - XtChangeManagedSet(¤t, 1, NULL, NULL, &layout, 1); - current = layout; -} diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/monitor-cfg.h b/xorg-server/hw/xfree86/utils/xorgcfg/monitor-cfg.h deleted file mode 100644 index 48fc804bf..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/monitor-cfg.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "config.h" - -#ifndef _xf86cfg_monitor_h -#define _xf86cfg_monitor_h - -/* - * Prototypes - */ -XtPointer MonitorConfig(XtPointer); -void MonitorLayout(XF86SetupInfo*); -void MonitorVidtune(XF86SetupInfo*); -int string_to_parser_range(char*, parser_range*, int); -#define PARSER_RANGE_SIZE 256 -/* string must have at least 256 bytes */ -int parser_range_to_string(char*, parser_range*, int); - -#endif /* _xf86cfg_monitor_h */ diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/monitor.xbm b/xorg-server/hw/xfree86/utils/xorgcfg/monitor.xbm deleted file mode 100644 index a2d4c6863..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/monitor.xbm +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - * $XFree86$ - */ -#define monitor_width 50 -#define monitor_height 44 -static unsigned char monitor_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x03, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0xe0, 0x01, 0x00, - 0x00, 0x00, 0x1e, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x70, - 0xfc, 0xff, 0xff, 0xff, 0x38, 0x00, 0x30, 0xfe, 0xff, 0xff, 0xff, 0x31, - 0x00, 0x30, 0x03, 0x00, 0x00, 0x00, 0x33, 0x00, 0x30, 0x03, 0x00, 0x00, - 0x00, 0x33, 0x00, 0x30, 0x03, 0x00, 0x00, 0x00, 0x33, 0x00, 0x30, 0x03, - 0x00, 0x00, 0x00, 0x33, 0x00, 0x30, 0x03, 0x00, 0x00, 0x00, 0x33, 0x00, - 0x30, 0x03, 0x00, 0x00, 0x00, 0x33, 0x00, 0x30, 0x03, 0x00, 0x00, 0x00, - 0x33, 0x00, 0x30, 0x03, 0x00, 0x00, 0x00, 0x33, 0x00, 0x30, 0x03, 0x00, - 0x00, 0x00, 0x33, 0x00, 0x30, 0x03, 0x00, 0x00, 0x00, 0x33, 0x00, 0x30, - 0x03, 0x00, 0x00, 0x00, 0x33, 0x00, 0x30, 0x03, 0x00, 0x00, 0x00, 0x33, - 0x00, 0x30, 0x03, 0x00, 0x00, 0x00, 0x33, 0x00, 0x30, 0x03, 0x00, 0x00, - 0x00, 0x33, 0x00, 0x30, 0x03, 0x00, 0x00, 0x00, 0x33, 0x00, 0x30, 0x03, - 0x00, 0x00, 0x00, 0x33, 0x00, 0x30, 0x03, 0x00, 0x00, 0x00, 0x33, 0x00, - 0x30, 0x03, 0x00, 0x00, 0x00, 0x33, 0x00, 0x30, 0x03, 0x00, 0x00, 0x00, - 0x33, 0x00, 0x30, 0x03, 0x00, 0x00, 0x00, 0x33, 0x00, 0x30, 0xfe, 0xff, - 0xff, 0xff, 0x31, 0x00, 0x70, 0xfc, 0xff, 0xff, 0xff, 0x38, 0x00, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x1e, - 0x00, 0xc0, 0x1f, 0x00, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0x03, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0xc0, 0x0f, - 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x30, 0x00, - 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, - 0xf8, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x3f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/monitor.xpm b/xorg-server/hw/xfree86/utils/xorgcfg/monitor.xpm deleted file mode 100644 index e647e3cc1..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/monitor.xpm +++ /dev/null @@ -1,79 +0,0 @@ -/* XPM */ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - * $XFree86$ - */ -static char * monitor_xpm[] = { -"47 40 6 1", -" c none", -"Z c #DF7DE38DDF7D", -". c #BEFBBEFBBEFB", -"X c #9E799A699E79", -"o c #30C230C230C2", -"O c #96589E799658", -"ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ..", -"Z..............................................", -"Z.............................................X", -"Z.............................................X", -"Z...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....X", -"Z...Xooooooooooooooooooooooooooooooooooooo....X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z...XoooooooooooooooooooooooooooooooooooooZ...X", -"Z....oooooooooooooooooooooooooooooooooooooZ...X", -"Z.....ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ...X", -"Z.............................................X", -"Z.............................................X", -"..............................................X", -"..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", -" OOOOOOOOOOOOOOOOOOOOOOOOOo ", -" XXXXXXXXXXXXXXXXXXXXXXXXXX ", -" OOOOOOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo. ", -" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ", -" ooooooooooooooooooooooooooooooooooooooo "}; diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/mouse-cfg.c b/xorg-server/hw/xfree86/utils/xorgcfg/mouse-cfg.c deleted file mode 100644 index 24aec6ae4..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/mouse-cfg.c +++ /dev/null @@ -1,449 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "xf86config.h" -#include "mouse-cfg.h" -#include -#include -#include -#include -#include -#include -#include - -/* - * Prototypes - */ -static void MouseDeviceCallback(Widget, XtPointer, XtPointer); -static void MouseProtocolCallback(Widget, XtPointer, XtPointer); -static void MouseEmulateCallback(Widget, XtPointer, XtPointer); -static void MouseApplyCallback(Widget, XtPointer, XtPointer); -static Bool MouseConfigCheck(void); - -/* - * Initialization - */ -static struct MouseProtocol { - char *name; - int type; -} protocols[] = { -#ifdef __SCO__ - {"OsMouse", MTYPE_AUTOMOUSE}, -#endif -#ifdef WSCONS_SUPPORT - {"wsmouse", MTYPE_AUTOMOUSE}, -#endif - {"Auto", MTYPE_AUTOMOUSE}, - {"SysMouse", MTYPE_SYSMOUSE}, - {"MouseSystems", MTYPE_MOUSESYS}, - {"BusMouse", MTYPE_BUSMOUSE}, - {"PS/2", MTYPE_PS_2}, - {"Microsoft", MTYPE_MICROSOFT}, -#ifndef __FreeBSD__ - {"ImPS/2", MTYPE_IMPS2}, - {"ExplorerPS/2", MTYPE_EXPPS2}, - {"GlidePointPS/2", MTYPE_GLIDEPOINTPS2}, - {"MouseManPlusPS/2", MTYPE_MMANPLUSPS2}, - {"NetMousePS/2", MTYPE_NETPS2}, - {"NetScrollPS/2", MTYPE_NETSCROLLPS2}, - {"ThinkingMousePS/2", MTYPE_THINKINGPS2}, -#endif - {"AceCad", MTYPE_ACECAD}, - {"GlidePoint", MTYPE_GLIDEPOINT}, - {"IntelliMouse", MTYPE_IMSERIAL}, - {"Logitech", MTYPE_LOGITECH}, - {"MMHitTab", MTYPE_MMHIT}, - {"MMSeries", MTYPE_MMSERIES}, - {"MouseMan", MTYPE_LOGIMAN}, - {"ThinkingMouse", MTYPE_THINKING}, -}; - -static Widget text; -static char *device, *protocol; -static Bool emulate; -static XF86ConfInputPtr current_input; - -/* - * Implementation - */ -/*ARGSUSED*/ -XtPointer -MouseConfig(XtPointer config) -{ - XF86ConfInputPtr mouse = (XF86ConfInputPtr)config; - XF86OptionPtr option; - char mouse_name[32]; - Arg args[1]; - - static char *Device = "Device", *Protocol = "Protocol", - *Emulate3Buttons = "Emulate3Buttons", - *Emulate3Timeout = "Emulate3Timeout"; - - current_input = mouse; - - if (mouse != NULL) { - emulate = xf86findOption(mouse->inp_option_lst, - Emulate3Buttons) != NULL; - if ((option = xf86findOption(mouse->inp_option_lst, Device)) != NULL) - device = option->opt_val; - else - device = NULL; - if ((option = xf86findOption(mouse->inp_option_lst, Protocol)) != NULL) - protocol = option->opt_val; - else - protocol = NULL; - - XtSetArg(args[0], XtNstring, mouse->inp_identifier); - XtSetValues(ident_widget, args, 1); - } - else { - XF86ConfInputPtr input = XF86Config->conf_input_lst; - int nmouses = 0; - - while (input != NULL) { - if (strcasecmp(input->inp_driver, "mouse") == 0) - ++nmouses; - input = (XF86ConfInputPtr)(input->list.next); - } - do { - XmuSnprintf(mouse_name, sizeof(mouse_name), "Mouse%d", nmouses); - ++nmouses; - } while (xf86findInput(mouse_name, - XF86Config->conf_input_lst)); - - XtSetArg(args[0], XtNstring, mouse_name); - XtSetValues(ident_widget, args, 1); - - emulate = True; - device = NULL; - protocol = NULL; - } - - xf86info.cur_list = MOUSE; - XtSetSensitive(back, xf86info.lists[MOUSE].cur_function > 0); - XtSetSensitive(next, xf86info.lists[MOUSE].cur_function < - xf86info.lists[MOUSE].num_functions - 1); - (xf86info.lists[MOUSE].functions[xf86info.lists[MOUSE].cur_function]) - (&xf86info); - - if (ConfigLoop(MouseConfigCheck) == True) { - XtSetArg(args[0], XtNstring, &device); - XtGetValues(text, args, 1); - if (mouse == NULL) { - mouse = XtNew(XF86ConfInputRec); - mouse->list.next = NULL; - mouse->inp_identifier = XtNewString(ident_string); - mouse->inp_driver = XtNewString("mouse"); - mouse->inp_option_lst = xf86newOption(XtNewString(Device), - XtNewString(device)); - xf86addNewOption(mouse->inp_option_lst, - XtNewString(Protocol), XtNewString(protocol)); - if (emulate) { - xf86addNewOption(mouse->inp_option_lst, - XtNewString(Emulate3Buttons), NULL); - xf86addNewOption(mouse->inp_option_lst, - XtNewString(Emulate3Timeout), - XtNewString("50")); - } - mouse->inp_comment = NULL; - } - else { - if ((option = xf86findOption(mouse->inp_option_lst, Device)) != NULL) { - XtFree(option->opt_val); - option->opt_val = XtNewString(device); - XtFree(option->opt_comment); - } - else { - if (mouse->inp_option_lst == NULL) - mouse->inp_option_lst = xf86newOption(XtNewString(Device), - XtNewString(device)); - else - xf86addNewOption(mouse->inp_option_lst, - XtNewString(Device), XtNewString(device)); - } - - if ((option = xf86findOption(mouse->inp_option_lst, Protocol)) != NULL) { - XtFree(option->opt_val); - option->opt_val = XtNewString(protocol); - XtFree(option->opt_comment); - } - else - xf86addNewOption(mouse->inp_option_lst, - XtNewString(Protocol), XtNewString(protocol)); - - if (emulate == False) { - xf86removeOption(&(mouse->inp_option_lst), Emulate3Buttons); - xf86removeOption(&(mouse->inp_option_lst), Emulate3Timeout); - } - else if (emulate) { - xf86addNewOption(mouse->inp_option_lst, - XtNewString(Emulate3Buttons), NULL); - xf86addNewOption(mouse->inp_option_lst, - XtNewString(Emulate3Timeout), XtNewString("50")); - } - } - if (strcasecmp(mouse->inp_identifier, ident_string)) - xf86renameInput(XF86Config, mouse, ident_string); - - return ((XtPointer)mouse); - } - - return (NULL); -} - -static Bool -MouseConfigCheck(void) -{ - Arg args[1]; - XF86ConfInputPtr mouse = XF86Config->conf_input_lst; - - XtSetArg(args[0], XtNstring, &device); - XtGetValues(text, args, 1); - - if (ident_string == NULL || strlen(ident_string) == 0 || - device == NULL || strlen(device) == 0 || protocol == NULL) - return (False); - while (mouse != NULL) { - if (mouse != current_input && - strcasecmp(ident_string, mouse->inp_identifier) == 0) - return (False); - mouse = (XF86ConfInputPtr)(mouse->list.next); - } - - return (True); -} - -static void -MouseDeviceCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - XawListReturnStruct *info = (XawListReturnStruct *)call_data; - Arg args[1]; - - XtSetArg(args[0], XtNstring, info->string); - XtSetValues((Widget)user_data, args, 1); - XawTextSetInsertionPoint((Widget)user_data, strlen(info->string)); -} - -static void -MouseProtocolCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - XawListReturnStruct *info = (XawListReturnStruct *)call_data; - - protocol = info->string; -} - -static void -MouseEmulateCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - emulate = (Bool)(long)call_data; -} - -static void -MouseApplyCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - int i; - XF86MiscMouseSettings mouse; - - XF86MiscGetMouseSettings(XtDisplay(w), &mouse); - XtFree(mouse.device); - - if (mouse.baudrate == 0 || mouse.baudrate < 0 || mouse.baudrate > 9600 || - mouse.baudrate % 1200) - mouse.baudrate = 1200; - - mouse.type = MTYPE_AUTOMOUSE; - for (i = 0; i < sizeof(protocols) / sizeof(protocols[0]); i++) - if (strcmp(protocols[i].name, protocol) == 0) { - mouse.type = protocols[i].type; - break; - } - - mouse.emulate3buttons = emulate; - mouse.flags |= MF_REOPEN; - - mouse.device = device; - - XFlush(XtDisplay(w)); - XF86MiscSetMouseSettings(XtDisplay(w), &mouse); -} - -void -MouseDeviceAndProtocol(XF86SetupInfo *info) -{ - static int first = 1, ndevices; - static Widget mouse_dp, listD, listP, emul3, apply; - static char **devices; - static char *dirs[] = { - "/dev", -#ifdef __linux__ - "/dev/input" -#endif - }; - static char *patterns[] = { -#ifdef WSCONS_SUPPORT - "wsmouse", -#endif - "cuaa", - "mice", - "mouse", - "ps", - "sysmouse", - "ttyS", - }; - Arg args[2]; - int i; - - if (first) { - Widget viewport; - struct dirent *ent; - DIR *dir; - char **list; - int count; - - first = 0; - - mouse_dp = XtCreateWidget("mouseDP", formWidgetClass, - configp, NULL, 0); - - /* DEVICE */ - for (count = 0; count < sizeof(dirs) / sizeof(dirs[0]); count++) { - if ((dir = opendir(dirs[count])) != NULL) { - int i, len, xlen = strlen(dirs[count]) + 2; - - (void)readdir(dir); - (void)readdir(dir); - while ((ent = readdir(dir)) != NULL) { - for (i = 0; i < sizeof(patterns) / sizeof(patterns[0]); i++) { - len = strlen(patterns[i]); - - if (strncmp(patterns[i], ent->d_name, len) == 0) { - len = strlen(ent->d_name) + xlen; - - devices = (char**)XtRealloc((XtPointer)devices, - sizeof(char*) * ++ndevices); - devices[ndevices - 1] = XtMalloc(len); - XmuSnprintf(devices[ndevices - 1], len, "%s/%s", - dirs[count], ent->d_name); - } - } - } - closedir(dir); - } - } - - (void) XtCreateManagedWidget("labelD", labelWidgetClass, - mouse_dp, NULL, 0); - text = XtVaCreateManagedWidget("device", asciiTextWidgetClass, - mouse_dp, - XtNeditType, XawtextEdit, - NULL); - viewport = XtCreateManagedWidget("viewportD", viewportWidgetClass, - mouse_dp, NULL, 0); - - listD = XtVaCreateManagedWidget("listD", listWidgetClass, - viewport, - XtNlist, devices, - XtNnumberStrings, ndevices, - NULL); - XtAddCallback(listD, XtNcallback, MouseDeviceCallback, (XtPointer)text); - - /* PROTOCOL */ - (void) XtCreateManagedWidget("labelP", labelWidgetClass, - mouse_dp, NULL, 0); - viewport = XtCreateManagedWidget("viewportP", viewportWidgetClass, - mouse_dp, NULL, 0); - - list = (char**)XtMalloc(sizeof(char*) * - sizeof(protocols)/sizeof(protocols[0])); - for (count = 0; count < sizeof(protocols)/sizeof(protocols[0]); count++) - list[count] = XtNewString(protocols[count].name); - listP = XtVaCreateManagedWidget("listP", listWidgetClass, - viewport, - XtNlist, list, - XtNnumberStrings, count, - NULL); - XtAddCallback(listP, XtNcallback, MouseProtocolCallback, NULL); - - emul3 = XtVaCreateManagedWidget("emulate3", toggleWidgetClass, - mouse_dp, XtNstate, True, NULL); - XtAddCallback(emul3, XtNcallback, MouseEmulateCallback, NULL); - apply = XtCreateManagedWidget("apply", commandWidgetClass, - mouse_dp, NULL, 0); - XtAddCallback(apply, XtNcallback, MouseApplyCallback, NULL); - - XtRealizeWidget(mouse_dp); - } - - if (device != NULL) { - for (i = 0; i < ndevices; i++) - if (strcmp(device, devices[i]) == 0) { - XtSetArg(args[0], XtNstring, device); - XtSetValues(text, args, 1); - XawListHighlight(listD, i); - break; - } - - if (i >= ndevices) { - devices = (char**)XtRealloc((XtPointer)devices, - sizeof(char*) * ++ndevices); - devices[ndevices - 1] = XtNewString(device); - XawListHighlight(listD, ndevices - 1); - XtSetArg(args[0], XtNlist, devices); - XtSetArg(args[1], XtNnumberStrings, ndevices); - XtSetValues(listD, args, 2); - } - device = devices[i]; - } - else { - XtSetArg(args[0], XtNstring, ""); - XtSetValues(text, args, 1); - XawListUnhighlight(listD); - } - - if (protocol != NULL) { - for (i = 0; i < sizeof(protocols) / sizeof(protocols[0]); i++) - if (strcasecmp(protocol, protocols[i].name) == 0) { - protocol = protocols[i].name; - XawListHighlight(listP, i); - break; - } - } - else { - /* "Auto" is the default */ - protocol = protocols[0].name; - XawListHighlight(listP, 0); - } - - XtSetArg(args[0], XtNstate, emulate); - XtSetValues(emul3, args, 1); - - XtChangeManagedSet(¤t, 1, NULL, NULL, &mouse_dp, 1); - current = mouse_dp; -} diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/mouse-cfg.h b/xorg-server/hw/xfree86/utils/xorgcfg/mouse-cfg.h deleted file mode 100644 index 90e5980e6..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/mouse-cfg.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - */ - -#include "config.h" - -#ifndef _xf86cfg_mouse_h -#define _xf86cfg_mouse_h - -/* - * Prototypes - */ -XtPointer MouseConfig(XtPointer); -void MouseDeviceAndProtocol(XF86SetupInfo*); - -#endif /* _xf86cfg_mouse_h */ - diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/mouse.xbm b/xorg-server/hw/xfree86/utils/xorgcfg/mouse.xbm deleted file mode 100644 index dce92d24a..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/mouse.xbm +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - * $XFree86$ - */ -#define mouse_width 50 -#define mouse_height 44 -static unsigned char mouse_bits[] = { - 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcf, 0xcf, 0x03, 0x00, - 0x00, 0x00, 0xc0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xe0, 0x79, 0x78, - 0x1e, 0x00, 0x00, 0x00, 0x60, 0x38, 0x70, 0x18, 0x00, 0x00, 0x00, 0x70, - 0x30, 0x30, 0x38, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, - 0x00, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, - 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x30, 0x30, - 0x30, 0x30, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x3f, 0x00, - 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, - 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, - 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, - 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, - 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, - 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, - 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, - 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, - 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, - 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, - 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xe0, 0x01, - 0x00, 0x1e, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/mouse.xpm b/xorg-server/hw/xfree86/utils/xorgcfg/mouse.xpm deleted file mode 100644 index ea157c266..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/mouse.xpm +++ /dev/null @@ -1,76 +0,0 @@ -/* XPM */ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - * $XFree86$ - */ -static char * mouse_xpm[] = { -"26 35 8 1", -" c none", -". c #E79DE79DE79D", -"X c #CF3CCF3CCF3C", -"o c #BEFBBAEABEFB", -"O c #8E3896588E38", -"+ c #AEBAAAAAAEBA", -"@ c #9E79AAAA9E79", -"# c #A699A289A699", -" .....XXXX. ", -" X..o.XXXXXXXo... ", -" X..XXo.XXXXXXXo.XX.X ", -" X.XXXXo.XXXXXXXo.XXX.X ", -" .XXXXXo.XXXXXXXo.XXXXoo ", -" X.XXXXXo.XXXoXXXo.XXXXoXo", -"oX.XXXXXo.XXXXXXXo.XXXXXoo", -"oX.XoXoXo.XXoXoXXo.XXXXXoO", -"oX.XXXXXo.XXXXXXXo.XXoXX+O", -"oX.XXXoXo.XXoXoXXo.XXXXX+O", -"oX.XXXXXo.XXXXXXXo.XX...+O", -"ooooo...o........oooo@@@OO", -"oX.XX#@@@@@@@@@@@@@@@XXX+O", -"oX.XXXXXXXXXXXXXXXXXXXXX+O", -"oX.XXXXXXXXXXXXXXXXXXXXX+O", -"oX.XXXXXXXXXXXXXXXXXXXXX+O", -"oX.XXXXXXXXXXXXXXXXXXXXX+O", -"oX.XXXXXXXXXXXXXXXXXXXXX+O", -"oX.XXXXXXXXXXXXXXXXXXXXX+O", -"oX.XXXXXXXXXXXXXXXXXXXXX+O", -"oX.XXXXXXXXXXXXXXXXXXXXX+O", -"oX.XXXXXXXXXXXXXXXXXXXX+oO", -" #X.XXXXXXXXXXXXXXXXXXooO ", -" #X.XXXXXXXXXXXXXXXXXXooO ", -" #X.XXXXXXXXXXXXXXXXXX+oO ", -" #X.XXXXXXXXXXXXXXXXXX+oO ", -" #.XXXXXXXXXXXXXXXXX++O ", -" #X..XXXXXXXXXXXXXXX+oO ", -" #X.XXXXXXXXXXXXXX+oO ", -" #.XXXXXXXXXXXXXX+O ", -" #X..XXXXXXXXXo++oO ", -" #XX..XXXXXoo+ooO ", -" ##XXooooo+ooOO ", -" ooooooooOO ", -" oOOOOO "}; diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/narrower.xbm b/xorg-server/hw/xfree86/utils/xorgcfg/narrower.xbm deleted file mode 100644 index 0649ef8b4..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/narrower.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define narrower_width 19 -#define narrower_height 19 -static unsigned char narrower_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x18, 0xc0, 0x00, - 0x38, 0xe0, 0x00, 0x78, 0xf0, 0x00, 0xf8, 0xf8, 0x00, 0xff, 0xfd, 0x07, - 0xff, 0xff, 0x07, 0xff, 0xff, 0x07, 0xff, 0xff, 0x07, 0xff, 0xfd, 0x07, - 0xf8, 0xf8, 0x00, 0x78, 0xf0, 0x00, 0x38, 0xe0, 0x00, 0x18, 0xc0, 0x00, - 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/options.c b/xorg-server/hw/xfree86/utils/xorgcfg/options.c deleted file mode 100644 index d229bb17f..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/options.c +++ /dev/null @@ -1,787 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "options.h" -#include "xf86config.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Prototypes - */ -static void PopdownCallback(Widget, XtPointer, XtPointer); -static void SelectOptionCallback(Widget, XtPointer, XtPointer); -static void AddOption(Widget, XtPointer, XtPointer); -static void RemoveOption(Widget, XtPointer, XtPointer); -static void UpdateOption(Widget, XtPointer, XtPointer); -static void UpdateOptionList(void); -#ifdef USE_MODULES -static void AddDriverOption(Widget, XtPointer, XtPointer); -static void SelectModuleCallback(Widget, XtPointer, XtPointer); -static void SelectModuleOptionCallback(Widget, XtPointer, XtPointer); -static void ModuleOptionsPopdown(Widget, XtPointer, XtPointer); -#endif -static Bool EnumDatabase(XrmDatabase*, XrmBindingList, XrmQuarkList, - XrmRepresentation*, XrmValue*, XPointer); - -/* - * Initialization - */ -Widget optionsShell; -static XF86OptionPtr *options; -static Widget add, remov, update, list, name, value; -static char *option_str; -static int option_index, popped = False; -static char *Options = "lib/X11/Options"; -XrmDatabase options_xrm; -struct { - char *string; - int offset; -} rebuild_xrm; -#ifdef USE_MODULES -static Widget modList, optList, desc, modOptionsShell, labelType; -static char *module_sel; -static char *types[] = { - "none", "integer", "(non null) string", "string", "real", - "boolean", "frequency", -}; -#endif - -/* - * Implementation - */ -#ifdef USE_MODULES -static int -qcmp_str(_Xconst void *a, _Xconst void *b) -{ - return (strcmp(*(char**)a, *(char**)b)); -} - -void -ModuleOptionsPopup(Widget w, XtPointer user_data, XtPointer call_data) -{ - xf86cfgModuleOptions *info = module_options; - - if (modOptionsShell == NULL) { - char **ops; - int nops; - Widget pane, form, viewport, bottom, popdown; - - modOptionsShell = XtCreatePopupShell("moduleOptions", - transientShellWidgetClass, - optionsShell, NULL, 0); - - pane = XtCreateManagedWidget("pane", panedWidgetClass, - modOptionsShell, NULL, 0); - - form = XtCreateManagedWidget("descriptions", formWidgetClass, - pane, NULL, 0); - labelType = XtCreateManagedWidget("labelType", labelWidgetClass, - form, NULL, 0); - XtCreateManagedWidget("module", labelWidgetClass, form, NULL, 0); - viewport = XtCreateManagedWidget("viewM", viewportWidgetClass, - form, NULL, 0); - ops = NULL; - nops = 0; - while (info) { - ++nops; - ops = (char**)XtRealloc((XtPointer)ops, sizeof(char*) * nops); - ops[nops - 1] = XtNewString(info->name); - info = info->next; - } - if (nops == 0) { - ops = (char**)XtMalloc(sizeof(char*)); - ops[0] = XtNewString(""); - nops = 1; - } - else - qsort(ops, nops, sizeof(char*), qcmp_str); - modList = XtVaCreateManagedWidget("modL", listWidgetClass, - viewport, XtNlist, ops, - XtNnumberStrings, nops, - NULL); - XtAddCallback(modList, XtNcallback, SelectModuleCallback, NULL); - XtCreateManagedWidget("option", labelWidgetClass, form, NULL, 0); - viewport = XtCreateManagedWidget("viewO", viewportWidgetClass, - form, NULL, 0); - ops = (char**)XtMalloc(sizeof(char*)); - ops[0] = XtNewString(""); - optList = XtVaCreateManagedWidget("optL", listWidgetClass, - viewport, XtNlist, ops, - XtNnumberStrings, 1, NULL); - XtAddCallback(optList, XtNcallback, SelectModuleOptionCallback, NULL); - desc = XtVaCreateManagedWidget("desc", asciiTextWidgetClass, - form, XtNeditType, XawtextRead, - NULL); - - bottom = XtCreateManagedWidget("bottom", formWidgetClass, - pane, NULL, 0); - popdown = XtVaCreateManagedWidget("popdown", commandWidgetClass, - bottom, NULL); - XtAddCallback(popdown, XtNcallback, ModuleOptionsPopdown, NULL); - XtRealizeWidget(modOptionsShell); - XSetWMProtocols(DPY, XtWindow(modOptionsShell), &wm_delete_window, 1); - - info = module_options; - } - - if (module_sel && *module_sel) { - XawListReturnStruct list; /* hack to call ballbacks */ - char **strs; - int nstrs, idx = 0; - - XtVaGetValues(modList, XtNlist, &strs, XtNnumberStrings, &nstrs, NULL); - for (idx = nstrs - 1; idx > 0; idx--) - if (strcmp(module_sel, strs[idx]) == 0) - break; - while (info) { - if (strcmp(module_sel, info->name) == 0) - break; - info = info->next; - } - if (info) { - list.string = info->name; - list.list_index = idx; - XawListHighlight(modList, idx); - SelectModuleCallback(modList, NULL, (XtPointer)&list); - } - if (option_str && *option_str) { - OptionInfoPtr opts = info->option; - - idx = 0; - while (opts && opts->name) { - if (strcmp(opts->name, option_str) == 0) - break; - ++idx; - ++opts; - } - - if (opts && opts->name) { - list.string = (char *)opts->name; - list.list_index = idx; - XawListHighlight(optList, idx); - SelectModuleOptionCallback(optList, NULL, (XtPointer)&list); - } - } - } - XtPopup(modOptionsShell, XtGrabNone); -} - -/*ARGSUSED*/ -static void -ModuleOptionsPopdown(Widget w, XtPointer user_data, XtPointer call_data) -{ - XtPopdown(modOptionsShell); -} - -/*ARGSUSED*/ -void -ModuleOptionsCancelAction(Widget w, XEvent *event, - String *params, Cardinal *num_params) -{ - ModuleOptionsPopdown(w, NULL, NULL); -} -#endif - -void -CreateOptionsShell(void) -{ - optionsShell = XtCreatePopupShell("options", transientShellWidgetClass, - toplevel, NULL, 0); -} - -#ifdef USE_MODULES -void -OptionsPopup(XF86OptionPtr *opts, char *driver, OptionInfoPtr drv_opts) -#else -void -OptionsPopup(XF86OptionPtr *opts) -#endif -{ - static int first = 1; -#ifdef USE_MODULES - static Widget button, menu; - static char label[256], menuName[16]; - Widget sme; - char buf[256]; - int i = 0; - Arg args[1]; - static int menuN; -#endif - - option_str = NULL; - options = opts; - if (first) { - Widget pane, form, viewport, bottom, popdown; - - first = 0; - - if (optionsShell == NULL) - CreateOptionsShell(); - pane = XtCreateManagedWidget("pane", panedWidgetClass, - optionsShell, NULL, 0); - - form = XtCreateManagedWidget("commands", formWidgetClass, - pane, NULL, 0); - add = XtCreateManagedWidget("add", commandWidgetClass, - form, NULL, 0); - XtAddCallback(add, XtNcallback, AddOption, NULL); - remov = XtCreateManagedWidget("remove", commandWidgetClass, - form, NULL, 0); - XtAddCallback(remov, XtNcallback, RemoveOption, NULL); - update = XtCreateManagedWidget("update", commandWidgetClass, - form, NULL, 0); - XtAddCallback(update, XtNcallback, UpdateOption, NULL); -#ifdef USE_MODULES - if (!nomodules) { - Widget command; - - command = XtCreateManagedWidget("help", commandWidgetClass, - form, NULL, 0); - XtAddCallback(command, XtNcallback, ModuleOptionsPopup, NULL); - } -#endif - form = XtCreateManagedWidget("form", formWidgetClass, - pane, NULL, 0); - XtVaCreateManagedWidget("label1", labelWidgetClass, form, - XtNlabel, " Option \"", - NULL); - name = XtVaCreateManagedWidget("name", asciiTextWidgetClass, form, - XtNeditType, XawtextEdit, - NULL); - XtVaCreateManagedWidget("label2", labelWidgetClass, - form, - XtNlabel, "\" \"", - NULL); - value = XtVaCreateManagedWidget("value", asciiTextWidgetClass, form, - XtNeditType, XawtextEdit, - NULL); - XtVaCreateManagedWidget("label3", labelWidgetClass, form, - XtNlabel, "\" ", - NULL); - viewport = XtCreateManagedWidget("viewport", viewportWidgetClass, - form, NULL, 0); - list = XtCreateManagedWidget("list", listWidgetClass, - viewport, NULL, 0); - XtAddCallback(list, XtNcallback, SelectOptionCallback, NULL); - bottom = XtCreateManagedWidget("bottom", formWidgetClass, - pane, NULL, 0); -#ifdef USE_MODULES - if (!nomodules) - button = XtCreateManagedWidget("driverOpts", menuButtonWidgetClass, - bottom, NULL, 0); -#endif - popdown = XtVaCreateManagedWidget("popdown", commandWidgetClass, - bottom, NULL); -#ifdef USE_MODULES - if (!nomodules) - XtVaSetValues(popdown, XtNfromHoriz, button, NULL); -#endif - - XtAddCallback(popdown, XtNcallback, PopdownCallback, NULL); - XtRealizeWidget(optionsShell); - XSetWMProtocols(DPY, XtWindow(optionsShell), &wm_delete_window, 1); - -#ifdef USE_MODULES - if (!nomodules) { - char *str; - - XtSetArg(args[0], XtNlabel, &str); - XtGetValues(button, args, 1); - XmuSnprintf(label, sizeof(label), "%s", str); - } -#endif - } - -#ifdef USE_MODULES - if (!nomodules) { - if (menu) - XtDestroyWidget(menu); - XmuSnprintf(menuName, sizeof(menuName), "optionM%d", menuN); - menuN = !menuN; - menu = XtCreatePopupShell(menuName, simpleMenuWidgetClass, button, - NULL, 0); - XtVaSetValues(button, XtNmenuName, menuName, NULL); - if (drv_opts) { - int len, longest = 0; - char fmt[32]; - - for (i = 0; drv_opts[i].name != NULL; i++) { - len = strlen(drv_opts[i].name); - if (len > longest) - longest = len; - } - XmuSnprintf(fmt, sizeof(fmt), "%c-%ds %%s", '%', longest); - for (; drv_opts->name != NULL; drv_opts++) { - char *type; - - if (drv_opts->type >= OPTV_NONE && drv_opts->type <= OPTV_FREQ) - type = types[drv_opts->type]; - else - type = "UNKNOWN"; - - XmuSnprintf(buf, sizeof(buf), fmt, drv_opts->name, type); - sme = XtVaCreateManagedWidget(drv_opts->name, smeBSBObjectClass, - menu, XtNlabel, buf, NULL); - XtAddCallback(sme, XtNcallback, AddDriverOption, (XtPointer)drv_opts); - } - } - if (i) { - xf86cfgModuleOptions *mod = module_options; - - while (mod) { - if (strcmp(mod->name, driver) == 0) { - /* don't assign to driver, as it may be a temp string */ - module_sel = mod->name; - break; - } - mod = mod->next; - } - XmuSnprintf(buf, sizeof(buf), "%s%s", label, driver); - XtSetArg(args[0], XtNlabel, buf); - XtSetValues(button, args, 1); - XtMapWidget(button); - } - else - XtUnmapWidget(button); - } -#endif - - UpdateOptionList(); - popped = True; - XtPopup(optionsShell, XtGrabExclusive); - - while (popped) - XtAppProcessEvent(XtWidgetToApplicationContext(optionsShell), XtIMAll); -} - -static void -UpdateOptionList(void) -{ - Arg args[2]; - char **ops, **oldops; - int nops, oldnops; - XF86OptionPtr opt; - - ops = NULL; - nops = 0; - XawListUnhighlight(list); - XtSetArg(args[0], XtNlist, &oldops); - XtSetArg(args[1], XtNnumberStrings, &oldnops); - XtGetValues(list, args, 2); - opt = *options; - while (opt != NULL) { - if (nops % 16 == 0) - ops = (char**)XtRealloc((XtPointer)ops, (nops + 16) * - sizeof(char*)); - ops[nops++] = XtNewString(opt->opt_name); - opt = (XF86OptionPtr)(opt->list.next); - } - if (nops == 0) { - ops = (char**)XtMalloc(sizeof(char*)); - ops[0] = XtNewString(""); - nops = 1; - } - XtSetArg(args[0], XtNlist, ops); - XtSetArg(args[1], XtNnumberStrings, nops); - XtSetValues(list, args, 2); - if (oldnops > 0 && - (oldnops != 1 || XtName(list) != oldops[0])) { - while (--oldnops >= 0) - XtFree(oldops[oldnops]); - XtFree((XtPointer)oldops); - } - - XtSetArg(args[0], XtNstring, ""); - XtSetValues(name, args, 1); - XtSetValues(value, args, 1); - - /* force relayout */ - XtUnmanageChild(list); - XtManageChild(list); - - XtSetSensitive(remov, False); - XtSetSensitive(update, False); -} - -/*ARGSUSED*/ -static void -PopdownCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - XtPopdown(optionsShell); - popped = False; -} - -/*ARGSUSED*/ -void -OptionsCancelAction(Widget w, XEvent *event, - String *params, Cardinal *num_params) -{ - PopdownCallback(w, NULL, NULL); -} - -/*ARGSUSED*/ -static void -SelectOptionCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - Arg args[1]; - XF86OptionPtr option; - XawListReturnStruct *info = (XawListReturnStruct *)call_data; - - option_str = info->string; - option_index = info->list_index; - if ((option = xf86findOption(*options, info->string)) != NULL) { - XtSetArg(args[0], XtNstring, option->opt_name); - XtSetValues(name, args, 1); - XtSetArg(args[0], XtNstring, - option->opt_val != NULL ? option->opt_val : ""); - XtSetValues(value, args, 1); - } - XtSetSensitive(remov, True); - XtSetSensitive(update, True); -} - -/*ARGSUSED*/ -static void -AddOption(Widget w, XtPointer user_data, XtPointer call_data) -{ - Arg args[1]; - char *nam, *val; - - XtSetArg(args[0], XtNstring, &nam); - XtGetValues(name, args, 1); - XtSetArg(args[0], XtNstring, &val); - XtGetValues(value, args, 1); - if (xf86findOption(*options, nam) != NULL || strlen(nam) == 0) - /* XXX xf86addNewOption will trash the option linked list if - * the options being added already exists. - */ - return; - *options = xf86addNewOption(*options, XtNewString(nam), - val && strlen(val) ? XtNewString(val) : NULL); - UpdateOptionList(); -} - -#ifdef USE_MODULES -/*ARGSUSED*/ -static void -AddDriverOption(Widget w, XtPointer user_data, XtPointer call_data) -{ - Arg args[1]; - OptionInfoPtr opt = (OptionInfoPtr)user_data; - XF86OptionPtr option; - - option_str = (char *)opt->name; - XtSetArg(args[0], XtNstring, opt->name); - XtSetValues(name, args, 1); - if ((option = xf86findOption(*options, opt->name)) == NULL) - XtSetArg(args[0], XtNstring, ""); - else - XtSetArg(args[0], XtNstring, option->opt_val); - XtSetValues(value, args, 1); -} - -/*ARGSUSED*/ -static void -SelectModuleCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - xf86cfgModuleOptions *mod = module_options; - XawListReturnStruct *info = (XawListReturnStruct *)call_data; - - while (mod) { - if (strcmp(mod->name, info->string) == 0) - break; - mod = mod->next; - } - - if (mod) { - Arg args[2]; - char **list = NULL, **old; - OptionInfoPtr opts = mod->option; - int num = 0, oldnum; - - module_sel = mod->name; - XtSetArg(args[0], XtNlist, &old); - XtSetArg(args[1], XtNnumberStrings, &oldnum); - XtGetValues(optList, args, 2); - while (opts && opts->name) { - ++num; - list = (char**)XtRealloc((XtPointer)list, sizeof(char*) * num); - list[num - 1] = XtNewString(opts->name); - ++opts; - } - if (num == 0) { - list = (char**)XtMalloc(sizeof(char*)); - list[0] = XtNewString(""); - num = 1; - } - XtSetArg(args[0], XtNlist, list); - XtSetArg(args[1], XtNnumberStrings, num); - XtSetValues(optList, args, 2); - while (--oldnum >= 0) - XtFree(old[oldnum]); - XtFree((XtPointer)old); - - XtVaSetValues(desc, XtNstring, "", NULL); - XawListUnhighlight(optList); - - /* force relayout */ - XtUnmanageChild(optList); - XtManageChild(optList); - } -} - -static void -SelectModuleOptionCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - xf86cfgModuleOptions *mod = module_options; - XawListReturnStruct *info = (XawListReturnStruct *)call_data; - char *description = NULL, *type = "undefined"; - char label[256]; - - if (module_sel && info->string) - description = GetOptionDescription(module_sel, info->string); - if (description == NULL) - description = "** NO DESCRIPTION AVAILABLE **"; - - XtVaSetValues(desc, XtNstring, description, NULL); - - while (mod) { - if (strcmp(module_sel, mod->name) == 0) - break; - mod = mod->next; - } - if (mod) { - OptionInfoPtr opts = mod->option; - - while (opts && opts->name) { - if (strcasecmp(opts->name, info->string) == 0) - break; - ++opts; - } - if (opts && opts->name && opts->type >= OPTV_NONE && - opts->type <= OPTV_FREQ) - type = types[opts->type]; - } - - XmuSnprintf(label, sizeof(label), "%s.%s (%s)", module_sel, info->string, - type); - XtVaSetValues(labelType, XtNlabel, label, NULL); -} -#endif - -/*ARGSUSED*/ -static void -RemoveOption(Widget w, XtPointer user_data, XtPointer call_data) -{ - Arg args[1]; - char *str; - - XtSetArg(args[0], XtNstring, &str); - XtGetValues(name, args, 1); - xf86removeOption(options, str); - UpdateOptionList(); -} - -/*ARGSUSED*/ -static void -UpdateOption(Widget w, XtPointer user_data, XtPointer call_data) -{ -/* xf86removeOption(options, option_str); - AddOption(w, user_data, call_data); - UpdateOptionList();*/ - - Arg args[1]; - char *nam, *val; - XF86OptionPtr option; - - XtSetArg(args[0], XtNstring, &nam); - XtGetValues(name, args, 1); - XtSetArg(args[0], XtNstring, &val); - XtGetValues(value, args, 1); - if ((option = xf86findOption(*options, option_str)) == NULL) - return; - XtFree(option->opt_name); - option->opt_name = option_str = XtNewString(nam); - XtFree(option->opt_val); - if (val && strlen(val)) - option->opt_val = XtNewString(val); - else - option->opt_val = NULL; - - UpdateOptionList(); - XawListHighlight(list, option_index); - XtSetArg(args[0], XtNstring, option->opt_name); - XtSetValues(name, args, 1); - XtSetArg(args[0], XtNstring, option->opt_val); - XtSetValues(value, args, 1); - - XtSetSensitive(remov, True); - XtSetSensitive(update, True); -} - -/*ARGUSED*/ -static Bool -EnumDatabase(XrmDatabase *db, XrmBindingList bindings, XrmQuarkList quarks, - XrmRepresentation *type, XrmValue *value, XPointer closure) -{ - char *module = XrmQuarkToString(quarks[0]), - *option = XrmQuarkToString(quarks[1]); - - /* handle *.Option: value */ - if (module && option == NULL) { - option = module; - module = "*"; - } - - /* - * NOTE: If the Options file is changed to support any other format than - * - * Module.Option: description text - * - * this code will also need to be updated. - */ - - if (module) { - XrmValue xrm; - char *type, *value, query[256]; - - XmuSnprintf(query, sizeof(query), "%s.%s", module, option); - if (XrmGetResource(options_xrm, query, "Module.Option", &type, &xrm)) - value = (char*)xrm.addr; - else - value = NULL; - - if (value) { - char *norm; - unsigned char *ptr; - int position; - int length = strlen(module) + strlen(option) + strlen(value) + 4; - - rebuild_xrm.string = XtRealloc(rebuild_xrm.string, - rebuild_xrm.offset + length); - position = rebuild_xrm.offset + - sprintf(rebuild_xrm.string + rebuild_xrm.offset, "%s.%s:", - module, option); - - /* removes underlines and spaces */ - norm = strchr(rebuild_xrm.string + rebuild_xrm.offset, '.') + 1; - for (; *norm; norm++) { - if (*norm == '_' || *norm == ' ' || *norm == '\t') { - memmove(norm, norm + 1, strlen(norm) + 1); - --position; - --length; - } - } - - for (ptr = (unsigned char*)rebuild_xrm.string + rebuild_xrm.offset; - *ptr; ptr++) - *ptr = tolower(*ptr); - sprintf(rebuild_xrm.string + position, "%s\n", value); - rebuild_xrm.offset += length - 1; - } - } - - return (False); -} - -Bool -InitializeOptionsDatabase(void) -{ - static int first = 1; - static Bool result = True; - - if (first) { - XrmQuark names[2]; - XrmQuark classes[2]; - - first = 0; - XrmInitialize(); - if ((options_xrm = XrmGetFileDatabase(Options)) == (XrmDatabase)0) { - fprintf(stderr, "Cannot open '%s' database.\n", Options); - return (False); - } - - /* rebuild database, using only lowercase characters */ - names[0] = classes[0] = names[1] = classes[1] = NULLQUARK; - (void)XrmEnumerateDatabase(options_xrm, (XrmNameList)&names, - (XrmClassList)&classes, XrmEnumAllLevels, - EnumDatabase, NULL); - - /* free previous database, as it is not guaranteed to be - * "case insensitive" */ - XrmDestroyDatabase(options_xrm); - - /* create case insensitive database by making everything lowercase */ - if (rebuild_xrm.string == NULL || - (options_xrm = XrmGetStringDatabase(rebuild_xrm.string)) == - (XrmDatabase)0) { - fprintf(stderr, "Cannot rebuild '%s' database.\n", Options); - XtFree(rebuild_xrm.string); - return (False); - } - XtFree(rebuild_xrm.string); - } - - return (result); -} - -char * -GetOptionDescription(char *module, char *option) -{ - char *type; - XrmValue value; - char query[256]; - unsigned char *ptr; - - InitializeOptionsDatabase(); - - XmuSnprintf(query, sizeof(query), "%s.%s", module, option); - ptr = (unsigned char*)strchr(query, '.') + 1; - for (; *ptr; ptr++) { - if (*ptr == '_' || *ptr == ' ' || *ptr == '\t') - memmove(ptr, ptr + 1, strlen((char*)ptr) + 1); - } - for (ptr = (unsigned char*)query; *ptr; ptr++) - *ptr = tolower(*ptr); - if (XrmGetResource(options_xrm, query, "Module.Option", &type, &value)) - return ((char*)value.addr); - - return (NULL); -} diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/options.h b/xorg-server/hw/xfree86/utils/xorgcfg/options.h deleted file mode 100644 index 2d08ca448..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/options.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "config.h" -#ifdef USE_MODULES -#include "loader.h" -#endif - -/* - * Prototypes - */ -#ifdef USE_MODULES -void OptionsPopup(XF86OptionPtr*, char*, OptionInfoPtr); -void ModuleOptionsPopup(Widget, XtPointer, XtPointer); -#else -void OptionsPopup(XF86OptionPtr*); -#endif -void OptionsCancelAction(Widget, XEvent*, String*, Cardinal*); -void ModuleOptionsCancelAction(Widget, XEvent*, String*, Cardinal*); -char *GetOptionDescription(char *module, char *option); -Bool InitializeOptionsDatabase(void); - -void CreateOptionsShell(void); diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/right.xbm b/xorg-server/hw/xfree86/utils/xorgcfg/right.xbm deleted file mode 100644 index a2f2ce2d1..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/right.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define right_width 19 -#define right_height 19 -static unsigned char right_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x06, 0x00, - 0x00, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x3e, 0x00, 0xf8, 0x7f, 0x00, - 0xf8, 0xff, 0x00, 0xf8, 0xff, 0x01, 0xf8, 0xff, 0x00, 0xf8, 0x7f, 0x00, - 0x00, 0x3e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x06, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/screen-cfg.c b/xorg-server/hw/xfree86/utils/xorgcfg/screen-cfg.c deleted file mode 100644 index 4c67d725a..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/screen-cfg.c +++ /dev/null @@ -1,555 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "xf86config.h" -#include "screen-cfg.h" -#include -#include -#include -#include -#include -#include -#ifdef USE_MODULES -#include "loader.h" -#endif - -#define CW 1 -#define CCW -1 - -/* - * Prototypes - */ -static void DepthCallback(Widget, XtPointer, XtPointer); -static void SelectIndexCallback(Widget, XtPointer, XtPointer); -static void UnselectIndexCallback(Widget, XtPointer, XtPointer); -static void SelectCallback(Widget, XtPointer, XtPointer); -static void UnselectCallback(Widget, XtPointer, XtPointer); -static void MoveCallback(Widget, XtPointer, XtPointer); -static void RotateCallback(Widget, XtPointer, XtPointer); - -/* - * Initialization - */ -static char *standard_modes[] = { - "640x400", - "640x480", - "800x600", - "1024x768", - "1280x960", - "1280x1024", - "320x200", - "320x240", - "400x300", - "1152x864", - "1600x1200", - "1800x1400", - "512x384", - "1400x1050", - "2048x1536", - "1920x1440", -}; - -static char **modes; -static int nmodes; -static int default_depth, sel_index, unsel_index; -static Widget listL, listR; -static char **defmodes; -static int ndefmodes; -static XF86ConfScreenPtr screen; -static int rotate; - -/* - * Implementation - */ -XtPointer -ScreenConfig(XtPointer conf) -{ - XF86ConfDisplayPtr disp; - Arg args[2]; - int i, oldrotate; - - screen = (XF86ConfScreenPtr)conf; - if (screen == NULL) - return (NULL); - - XtSetArg(args[0], XtNstring, screen->scrn_identifier); - XtSetValues(ident_widget, args, 1); - if ((default_depth = screen->scrn_defaultdepth) <= 0) - default_depth = 8; - sel_index = unsel_index = -1; - for (i = 0; i < computer.num_screens; i++) - if (computer.screens[i]->screen == screen) { - SetScreenRotate(computer.screens[i]); - rotate = computer.screens[i]->rotate; - } - oldrotate = rotate; - - ndefmodes = 0; - disp = screen->scrn_display_lst; - while (disp != NULL) { - if (disp->disp_depth == default_depth) { - XF86ModePtr mod = disp->disp_mode_lst; - - while (mod != NULL) { - if (ndefmodes % 16 == 0) - defmodes = (char**) - XtRealloc((XtPointer)defmodes, - (ndefmodes + 16) * sizeof(char*)); - defmodes[ndefmodes++] = XtNewString(mod->mode_name); - mod = (XF86ModePtr)(mod->list.next); - } - break; - } - disp = (XF86ConfDisplayPtr)(disp->list.next); - } - if (ndefmodes == 0) { - defmodes = (char**)XtMalloc(sizeof(char*)); - defmodes[0] = XtNewString("640x480"); - ndefmodes = 1; - } - - if (listL != NULL) { - XawListUnhighlight(listL); - XawListUnhighlight(listR); - } - - xf86info.cur_list = SCREEN; - XtSetSensitive(back, xf86info.lists[SCREEN].cur_function > 0); - XtSetSensitive(next, xf86info.lists[SCREEN].cur_function < - xf86info.lists[SCREEN].num_functions - 1); - (xf86info.lists[SCREEN].functions[xf86info.lists[SCREEN].cur_function]) - (&xf86info); - - if (ConfigLoop(NULL) == True) { - XF86ModePtr prev = NULL, mod; - - /* user may have changed the default depth, read variables again */ - disp = screen->scrn_display_lst; - while (disp != NULL) { - if (disp->disp_depth == default_depth) - break; - disp = (XF86ConfDisplayPtr)(disp->list.next); - } - - if (disp == NULL) { - disp = (XF86ConfDisplayPtr)XtCalloc(1, sizeof(XF86ConfDisplayRec)); - screen->scrn_display_lst = (XF86ConfDisplayPtr) - xf86addListItem((GenericListPtr)(screen->scrn_display_lst), - (GenericListPtr)(disp)); - disp->disp_depth = default_depth; - } - - if (strcasecmp(screen->scrn_identifier, ident_string)) - xf86renameScreen(XF86Config, screen, ident_string); - - screen->scrn_defaultdepth = default_depth; - - XtSetArg(args[0], XtNlist, NULL); - XtSetArg(args[1], XtNnumberStrings, 0); - XtSetValues(listL, args, 2); - - XtSetArg(args[0], XtNlist, NULL); - XtSetArg(args[1], XtNnumberStrings, 0); - XtSetValues(listR, args, 2); - - mod = disp->disp_mode_lst; - /* free all modes */ - while (mod != NULL) { - prev = mod; - mod = (XF86ModePtr)(mod->list.next); - XtFree(prev->mode_name); - XtFree((XtPointer)prev); - } - /* readd modes */ - for (i = 0; i < ndefmodes; i++) { - mod = XtNew(XF86ModeRec); - mod->mode_name = XtNewString(defmodes[i]); - XtFree(defmodes[i]); - if (i == 0) - disp->disp_mode_lst = mod; - else - prev->list.next = mod; - prev = mod; - } - if (i == 0) - disp->disp_mode_lst = NULL; - else - mod->list.next = NULL; - - XtFree((XtPointer)defmodes); - defmodes = NULL; - ndefmodes = 0; - - for (i = 0; i < computer.num_screens; i++) - if (computer.screens[i]->screen == screen) - computer.screens[i]->rotate = rotate; - - if (oldrotate != rotate) { - static char *Rotate = "Rotate"; - - if (screen->scrn_option_lst != NULL) - xf86removeOption(&screen->scrn_option_lst, Rotate); - if (rotate) - screen->scrn_option_lst = - xf86addNewOption(screen->scrn_option_lst, - XtNewString(Rotate), - XtNewString(rotate > 0 ? "CW" : "CCW")); - UpdateScreenUI(); - AdjustScreenUI(); - } - - return ((XtPointer)screen); - } - - XtSetArg(args[0], XtNlist, NULL); - XtSetArg(args[1], XtNnumberStrings, 0); - XtSetValues(listL, args, 2); - - XtSetArg(args[0], XtNlist, NULL); - XtSetArg(args[1], XtNnumberStrings, 0); - XtSetValues(listR, args, 2); - - for (i = 0; i < ndefmodes; i++) - XtFree(defmodes[i]); - XtFree((XtPointer)defmodes); - defmodes = NULL; - ndefmodes = 0; - - return (NULL); -} - -/*ARGSUSED*/ -static void -DepthCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - if (call_data != NULL) - default_depth = (long)user_data; -} - -/*ARGSUSED*/ -static void -SelectIndexCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - XawListReturnStruct *info = (XawListReturnStruct *)call_data; - - sel_index = info->list_index; -} - -/*ARGSUSED*/ -static void -UnselectIndexCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - XawListReturnStruct *info = (XawListReturnStruct *)call_data; - - unsel_index = info->list_index; -} - -/*ARGSUSED*/ -static void -SelectCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - Arg args[2]; - - if (sel_index < 0 || sel_index >= nmodes) - return; - - if (ndefmodes == 1 && *defmodes[0] == '\0') { - /* make sure tmp and defentries are not the same pointer */ - char **tmp = defmodes; - - XtFree(defmodes[0]); - defmodes = (char**)XtMalloc(sizeof(char*)); - --ndefmodes; - XtFree((char*)tmp); - } - else - defmodes = (char**)XtRealloc((XtPointer)defmodes, - sizeof(char*) * (ndefmodes + 1)); - defmodes[ndefmodes++] = XtNewString(modes[sel_index]); - - XtSetArg(args[0], XtNlist, defmodes); - XtSetArg(args[1], XtNnumberStrings, ndefmodes); - XtSetValues(listR, args, 2); - - XawListUnhighlight(listR); - if (ndefmodes > 1 || (ndefmodes == 1 && *defmodes[0] != '\0')) { - if (unsel_index >= ndefmodes) - unsel_index = ndefmodes - 1; - XawListHighlight(listR, unsel_index = ndefmodes - 1); - } - else - unsel_index = -1; - - /* force realyout */ - XtUnmanageChild(listR); - XtManageChild(listR); -} - -/*ARGSUSED*/ -static void -UnselectCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - Arg args[2]; - char **modes; - Cardinal num_modes; - - if (unsel_index < 0 || unsel_index >= ndefmodes) - return; - - XawListUnhighlight(listL); - XtSetArg(args[0], XtNlist, &modes); - XtSetArg(args[1], XtNnumberStrings, &num_modes); - XtGetValues(listL, args, 2); - if (modes) { - for (sel_index = 0; sel_index < num_modes; sel_index++) - if (strcmp(defmodes[unsel_index], modes[sel_index]) == 0) - break; - if (sel_index < num_modes) - XawListHighlight(listL, sel_index); - else - sel_index = -1; - } - - XtFree(defmodes[unsel_index]); - if (--ndefmodes > unsel_index) - memmove(&defmodes[unsel_index], &defmodes[unsel_index + 1], - (ndefmodes - unsel_index) * sizeof(char*)); - if (ndefmodes == 0) { - char **tmp = defmodes; - - defmodes = (char**)XtMalloc(sizeof(char*)); - defmodes[0] = XtNewString(""); - ndefmodes = 1; - XtFree((char*)tmp); - } - - XtSetArg(args[0], XtNlist, defmodes); - XtSetArg(args[1], XtNnumberStrings, ndefmodes); - XtSetValues(listR, args, 2); - - XawListUnhighlight(listR); - if (ndefmodes > 1 || (ndefmodes == 1 && *defmodes[0] != '\0')) { - if (unsel_index >= ndefmodes) - unsel_index = ndefmodes - 1; - XawListHighlight(listR, unsel_index); - } - else - unsel_index = -1; -} - -/*ARGSUSED*/ -static void -MoveCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - char *tmp; - Bool down = (long)user_data; - - if (unsel_index < 0 || unsel_index >= ndefmodes) - return; - - if ((down && unsel_index + 1 >= ndefmodes) || - (!down && unsel_index - 1 < 0)) - return; - - tmp = defmodes[unsel_index]; - if (down) { - defmodes[unsel_index] = defmodes[unsel_index + 1]; - unsel_index++; - } else { - defmodes[unsel_index] = defmodes[unsel_index - 1]; - unsel_index--; - } - defmodes[unsel_index] = tmp; - - XawListUnhighlight(listR); - XawListHighlight(listR, unsel_index); -} - -/*ARGSUSED*/ -void -RotateCallback(Widget w, XtPointer user_data, XtPointer call_data) -{ - if (call_data != NULL) - rotate = (long)user_data; - else - rotate = 0; -} - -void -ScreenDialog(XF86SetupInfo *info) -{ - static Widget dialog, d1, d4, d8, d16, d24, labelRotate, cw, ccw; - Arg args[2]; - XF86ConfMonitorPtr mon = screen->scrn_monitor; - XF86ConfModeLinePtr mline = mon != NULL ? mon->mon_modeline_lst : NULL; - int i; -#ifdef USE_MODULES - xf86cfgModuleOptions *drv_opts = module_options; - Bool foundRotate = False; -#endif - - while (nmodes > 0) - XtFree(modes[--nmodes]); - XtFree((XtPointer)modes); - modes = NULL; - while (mline) { - if (nmodes % 16 == 0) - modes = (char**)XtRealloc((XtPointer)modes, - sizeof(char*) * (nmodes + 16)); - modes[nmodes++] = XtNewString(mline->ml_identifier); - mline = (XF86ConfModeLinePtr)(mline->list.next); - } - for (i = 0; i < sizeof(standard_modes) / sizeof(standard_modes[0]); i++) { - if (nmodes % 16 == 0) - modes = (char**)XtRealloc((XtPointer)modes, - sizeof(char*) * (nmodes + 16)); - modes[nmodes++] = XtNewString(standard_modes[i]); - } - - if (dialog == NULL) { - Widget command, viewport; - - dialog = XtCreateWidget("screenD", formWidgetClass, - configp, NULL, 0); - XtCreateManagedWidget("depthL", labelWidgetClass, - dialog, NULL, 0); - d1 = XtCreateManagedWidget("1", toggleWidgetClass, dialog, NULL, 0); - XtAddCallback(d1, XtNcallback, DepthCallback, (XtPointer)1); - d4 = XtVaCreateManagedWidget("4", toggleWidgetClass, dialog, - XtNradioGroup, d1, NULL); - XtAddCallback(d4, XtNcallback, DepthCallback, (XtPointer)4); - d8 = XtVaCreateManagedWidget("8", toggleWidgetClass, dialog, - XtNradioGroup, d4, NULL); - XtAddCallback(d8, XtNcallback, DepthCallback, (XtPointer)8); - d16 = XtVaCreateManagedWidget("16", toggleWidgetClass, dialog, - XtNradioGroup, d8, NULL); - XtAddCallback(d16, XtNcallback, DepthCallback, (XtPointer)16); - d24 = XtVaCreateManagedWidget("24", toggleWidgetClass, dialog, - XtNradioGroup, d16, NULL); - XtAddCallback(d24, XtNcallback, DepthCallback, (XtPointer)24); - - XtCreateManagedWidget("modeL", labelWidgetClass, dialog, NULL, 0); - viewport = XtCreateManagedWidget("viewL", viewportWidgetClass, dialog, - NULL, 0); - listL = XtCreateManagedWidget("listLeft", listWidgetClass, viewport, - NULL, 0); - XtAddCallback(listL, XtNcallback, SelectIndexCallback, NULL); - command = XtCreateManagedWidget("select", commandWidgetClass, - dialog, NULL, 0); - XtAddCallback(command, XtNcallback, SelectCallback, NULL); - command = XtCreateManagedWidget("unselect", commandWidgetClass, - dialog, NULL, 0); - XtAddCallback(command, XtNcallback, UnselectCallback, NULL); - command = XtCreateManagedWidget("up", commandWidgetClass, - dialog, NULL, 0); - XtAddCallback(command, XtNcallback, MoveCallback, (XtPointer)False); - command = XtCreateManagedWidget("down", commandWidgetClass, - dialog, NULL, 0); - XtAddCallback(command, XtNcallback, MoveCallback, (XtPointer)True); - viewport = XtCreateManagedWidget("viewR", viewportWidgetClass, dialog, - NULL, 0); - listR = XtCreateManagedWidget("listRight", listWidgetClass, viewport, - NULL, 0); - XtAddCallback(listR, XtNcallback, UnselectIndexCallback, NULL); - - labelRotate = XtCreateManagedWidget("rotate", labelWidgetClass, - dialog, NULL, 0); - cw = XtCreateManagedWidget("CW", toggleWidgetClass, dialog, NULL, 0); - XtAddCallback(cw, XtNcallback, RotateCallback, (XtPointer)CW); - ccw = XtVaCreateManagedWidget("CCW", toggleWidgetClass, dialog, - XtNradioGroup, cw, NULL); - XtAddCallback(ccw, XtNcallback, RotateCallback, (XtPointer)CCW); - - XtRealizeWidget(dialog); - } - -#ifdef USE_MODULES - if (!nomodules) { - while (drv_opts) { - if (drv_opts->type == VideoModule && - strcmp(drv_opts->name, screen->scrn_device->dev_driver) == 0) { - OptionInfoPtr opts = drv_opts->option; - - while (opts->name) { - if (xf86nameCompare(opts->name, "Rotate") == 0) { - foundRotate = True; - break; - } - opts++; - } - break; - } - drv_opts = drv_opts->next; - } - - if (!foundRotate) { - XtUnmapWidget(labelRotate); - XtUnmapWidget(cw); - XtUnmapWidget(ccw); - } - else { - XtMapWidget(labelRotate); - XtMapWidget(cw); - XtMapWidget(ccw); - } - } -#else - (void)labelRotate; -#endif - if (rotate == CW) { - XtVaSetValues(cw, XtNstate, True, NULL); - XtVaSetValues(ccw, XtNstate, False, NULL); - } - else if (rotate == CCW) { - XtVaSetValues(cw, XtNstate, False, NULL); - XtVaSetValues(ccw, XtNstate, True, NULL); - } - else { - XtVaSetValues(cw, XtNstate, False, NULL); - XtVaSetValues(ccw, XtNstate, False, NULL); - } - - XtSetArg(args[0], XtNlist, modes); - XtSetArg(args[1], XtNnumberStrings, nmodes); - XtSetValues(listL, args, 2); - - XtSetArg(args[0], XtNlist, defmodes); - XtSetArg(args[1], XtNnumberStrings, ndefmodes); - XtSetValues(listR, args, 2); - - XtSetArg(args[0], XtNstate, True); - XtSetValues(default_depth == 1 ? d1 : - default_depth == 4 ? d4 : - default_depth == 16 ? d16 : - default_depth == 24 ? d24 : d8, args, 1); - - XtChangeManagedSet(¤t, 1, NULL, NULL, &dialog, 1); - current = dialog; -} diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/screen-cfg.h b/xorg-server/hw/xfree86/utils/xorgcfg/screen-cfg.h deleted file mode 100644 index 07e9bc3ee..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/screen-cfg.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "config.h" -#include "screen.h" - -#ifndef _xf86cfg_screencfg_h -#define _xf86cfg_screencfg_h - -/* - * Prototypes - */ -XtPointer ScreenConfig(XtPointer); -void ScreenDialog(XF86SetupInfo*); - -#endif /* _xf86cfg_screencfg_h */ diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/screen.c b/xorg-server/hw/xfree86/utils/xorgcfg/screen.c deleted file mode 100644 index 6b411de15..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/screen.c +++ /dev/null @@ -1,983 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include -#include -#include -#include "screen.h" - -#define CW 1 -#define CCW -1 - -/* - * Prototypes - */ -void ReshapeScreenWidget(xf86cfgScreen*); -static int qcmp_screen(_Xconst void*, _Xconst void*); - -/* - * Initialization - */ -extern Widget work; - -static int rows, columns; /* number of rows/columns of monitors */ - -static int mon_width, mon_height; -static int *mon_widths, *mon_heights; - -/* - * Implementation - */ -void -SetScreenRotate(xf86cfgScreen *screen) -{ - static char *Rotate = "Rotate", *_CW = "CW", *_CCW = "CCW"; - int rotate = 0; - XF86OptionPtr option, options; - - /* This is the only place where xf86cfg is intrusive, and deletes options - * added by the user directly in the config file. The "Rotate" option - * will be kept in the screen section. - */ - if (screen->monitor != NULL) { - options = ((XF86ConfMonitorPtr)(screen->monitor->config))->mon_option_lst; - if ((option = xf86findOption(options, Rotate)) != NULL) { - if (option->opt_val != NULL) - rotate = strcasecmp(option->opt_val, _CW) == 0 ? CW : - strcasecmp(option->opt_val, _CCW) == 0 ? CCW : 0; - xf86removeOption(&((XF86ConfMonitorPtr)(screen->monitor->config)) - ->mon_option_lst, Rotate); - } - } - if (screen->card != NULL) { - options = ((XF86ConfDevicePtr)(screen->card->config))->dev_option_lst; - if ((option = xf86findOption(options, Rotate)) != NULL) { - if (option->opt_val != NULL) - rotate += strcasecmp(option->opt_val, _CW) == 0 ? CW : - strcasecmp(option->opt_val, _CCW) == 0 ? CCW : 0; - xf86removeOption(&((XF86ConfDevicePtr)(screen->card->config)) - ->dev_option_lst, Rotate); - } - } - - options = screen->screen->scrn_option_lst; - if ((option = xf86findOption(options, Rotate)) != NULL) { - if (option->opt_val != NULL) - rotate += strcasecmp(option->opt_val, _CW) == 0 ? CW : - strcasecmp(option->opt_val, _CCW) == 0 ? CCW : 0; - xf86removeOption(&screen->screen->scrn_option_lst, Rotate); - } - - rotate = rotate > 0 ? CW : rotate < 0 ? CCW : 0; - if (rotate) - screen->screen->scrn_option_lst = - xf86addNewOption(screen->screen->scrn_option_lst, - XtNewString(Rotate), - XtNewString(rotate > 0 ? _CW : _CCW)); - screen->rotate = rotate; -} - -void -CreateScreenWidget(xf86cfgScreen *screen) -{ - Widget w = XtCreateWidget("screen", simpleWidgetClass, - XtParent(computer.cpu), NULL, 0); - - SetScreenRotate(screen); - XtRealizeWidget(w); - screen->widget = w; - screen->column = screen->row = -1; - - ReshapeScreenWidget(screen); -} - -void -ReshapeScreenWidget(xf86cfgScreen *screen) -{ - Pixmap pixmap; - XGCValues values; - GC gc; - int x = 0, y = 0, width = screen->rect.width, height = screen->rect.height; - Widget w = screen->widget; - - if (screen->state == USED && screen->row >= 0) { - if (screen->column == 0) - x = w->core.width - width; - else if (screen->column == columns - 1) - x = w->core.width - mon_widths[screen->column]; - else - x = (w->core.width - mon_widths[screen->column]) + - ((mon_widths[screen->column] - width) >> 1); - - if (screen->row == 0) - y = w->core.height - height; - else if (screen->row == rows - 1) - y = w->core.height - mon_heights[screen->row]; - else - y = (w->core.height - mon_heights[screen->row]) + - ((mon_heights[screen->row] - height) >> 1); - } - else if (screen->rect.width == 0) { - width = w->core.width; - height = w->core.height; - } - - screen->rect.x = x; - screen->rect.y = y; - screen->rect.width = width; - screen->rect.height = height; - pixmap = XCreatePixmap(XtDisplay(w), XtWindow(w), - w->core.width, w->core.height, 1); - values.foreground = 0; - values.background = 1; - gc = XCreateGC(XtDisplay(w), pixmap, GCForeground | GCBackground, &values); - XFillRectangle(XtDisplay(w), pixmap, gc, 0, 0, w->core.width, w->core.height); - XSetForeground(XtDisplay(w), gc, 1); - - DrawScreenMask(XtDisplay(w), pixmap, gc, x, y, x + width, y + height, - screen->rotate); - XShapeCombineMask(XtDisplay(w), XtWindow(w), ShapeBounding, - 0, 0, pixmap, ShapeSet); - - /* Do not call XtSetValues, to avoid all extra code for caching pixmaps */ - XFreePixmap(XtDisplay(w), pixmap); - if (XtIsRealized(w)) { - pixmap = XCreatePixmap(XtDisplay(w), XtWindow(w), - w->core.width, w->core.height, - DefaultDepthOfScreen(XtScreen(w))); - DrawScreen(XtDisplay(w), pixmap, x, y, x + width, y + height, - screen->state == USED ? True : False, screen->rotate); - XSetWindowBackgroundPixmap(XtDisplay(w), XtWindow(w), pixmap); - XClearWindow(XtDisplay(w), XtWindow(w)); - XFreePixmap(XtDisplay(w), pixmap); - } - XFreeGC(XtDisplay(w), gc); -} - -void -AddScreen(xf86cfgDevice *mon, xf86cfgDevice *dev) -{ - int nscreens = 0; - char screen_name[48]; - XF86ConfScreenPtr screen = XF86Config->conf_screen_lst; - XF86ConfAdjacencyPtr adj; - - while (screen != NULL) { - ++nscreens; - screen = (XF86ConfScreenPtr)(screen->list.next); - } - do { - XmuSnprintf(screen_name, sizeof(screen_name), "Screen%d", - nscreens); - ++nscreens; - } while (xf86findScreen(screen_name, - XF86Config->conf_screen_lst) != NULL); - - screen = (XF86ConfScreenPtr)XtCalloc(1, sizeof(XF86ConfScreenRec)); - screen->scrn_identifier = XtNewString(screen_name); - screen->scrn_device_str = XtNewString(((XF86ConfDevicePtr)(dev->config))->dev_identifier); - screen->scrn_device = (XF86ConfDevicePtr)(dev->config); - screen->scrn_monitor_str = XtNewString(((XF86ConfMonitorPtr)(mon->config))->mon_identifier); - screen->scrn_monitor = (XF86ConfMonitorPtr)(mon->config); - XF86Config->conf_screen_lst = - xf86addScreen(XF86Config->conf_screen_lst, screen); - - adj = (XF86ConfAdjacencyPtr)XtCalloc(1, sizeof(XF86ConfAdjacencyRec)); - adj->adj_screen = screen; - adj->adj_screen_str = XtNewString(screen_name); - if (computer.layout == NULL) - computer.layout = XF86Config->conf_layout_lst = (XF86ConfLayoutPtr) - XtCalloc(1, sizeof(XF86ConfLayoutRec)); - computer.layout->lay_adjacency_lst = (XF86ConfAdjacencyPtr) - xf86addListItem((GenericListPtr)computer.layout->lay_adjacency_lst, - (GenericListPtr)adj); - - computer.screens = (xf86cfgScreen**) - XtRealloc((XtPointer)computer.screens, sizeof(xf86cfgScreen*) * - (computer.num_screens + 1)); - computer.screens[computer.num_screens] = - (xf86cfgScreen*)XtCalloc(1, sizeof(xf86cfgScreen)); - computer.screens[computer.num_screens]->screen = screen; - computer.screens[computer.num_screens]->card = dev; - computer.screens[computer.num_screens]->monitor = mon; - - ++dev->refcount; - ++mon->refcount; - - CreateScreenWidget(computer.screens[computer.num_screens]); - computer.screens[computer.num_screens]->type = SCREEN; - SetTip((xf86cfgDevice*)computer.screens[computer.num_screens]); - - ++computer.num_screens; -} - -void -RemoveScreen(xf86cfgDevice *mon, xf86cfgDevice *dev) -{ - XF86ConfScreenPtr screen = XF86Config->conf_screen_lst; - int i; - - mon->state = dev->state = UNUSED; - while (screen != NULL) { - if ((XtPointer)screen->scrn_monitor == mon->config && - (XtPointer)screen->scrn_device == dev->config) - break; - - screen = (XF86ConfScreenPtr)(screen->list.next); - } - --mon->refcount; - --dev->refcount; - - for (i = 0; i < computer.num_screens; i++) { - if (computer.screens[i]->screen == screen) { - XtDestroyWidget(computer.screens[i]->widget); - if (i < --computer.num_screens) - memmove(&computer.screens[i], &computer.screens[i + 1], - (computer.num_screens - i) * sizeof(xf86cfgScreen*)); - break; - } - } - - xf86removeScreen(XF86Config, screen); -} - -void -ChangeScreen(XF86ConfMonitorPtr mon, XF86ConfMonitorPtr oldmon, - XF86ConfDevicePtr dev, XF86ConfDevicePtr olddev) -{ - int ioldm, im, ioldc, ic; - - if (mon == oldmon && dev == olddev) - return; - - if (mon != NULL) { - for (im = 0; im < computer.num_devices; im++) - if (computer.devices[im]->config == (XtPointer)mon) - break; - } - else - im = -1; - if (oldmon != NULL) { - for (ioldm = 0; ioldm < computer.num_devices; ioldm++) - if (computer.devices[ioldm]->config == (XtPointer)oldmon) - break; - } - else - ioldm = -1; - - if (dev != NULL) { - for (ic = 0; ic < computer.num_devices; ic++) - if (computer.devices[ic]->config == (XtPointer)dev) - break; - } - else - ic = -1; - if (olddev != NULL) { - for (ioldc = 0; ioldc < computer.num_devices; ioldc++) - if (computer.devices[ioldc]->config == (XtPointer)olddev) - break; - } - else - ioldc = -1; - - if (ioldm >= 0 && ioldc >= 0) { - RemoveScreen(computer.devices[ioldm], computer.devices[ioldc]); - computer.devices[ioldm]->state = UNUSED; -/* computer.devices[ioldc]->state = UNUSED;*/ - } - - if (im >= 0 && ic >= 0) { - AddScreen(computer.devices[im], computer.devices[ic]); - computer.devices[im]->state = USED; -/* computer.devices[ic]->state = USED;*/ - } -} - -/* - -+------------------------------------------------+ -| | -| +------------------------------------------+ | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| | | | -| +------------------------------------------+ | -| | -+------------------------------------------------+ - | | - +-------+ +-------+ - | | - +----------------------------------------+ - - */ -static double oxs = 0.0, oys = 0.0, oxe = 100.0, oye = 70.0; -static double ixs = 7.0, iys = 7.0, ixe = 93.0, iye = 63.0; -static double lin[] = { 25.0, 70.0, 25.0, 75.0, 5.0, 75.0, 5.0, 80.0, - 95.0, 80.0, 95.0, 75.0, 75.0, 75.0, 75.0, 70.0 }; - -void -DrawScreen(Display *dpy, Drawable win, int xs, int ys, int xe, int ye, - Bool active, int rotate) -{ - double xfact, yfact; - XPoint points[(sizeof(lin) / sizeof(lin[0])) >> 1]; - int i; - static GC gray0, gray1, gray2, black, red; - - if (black == NULL) { - XColor color, exact; - XGCValues values; - - XAllocNamedColor(XtDisplay(toplevel), toplevel->core.colormap, "gray95", - &color, &exact); - values.foreground = color.pixel; - gray0 = XCreateGC(XtDisplay(toplevel), win, GCForeground, &values); - XAllocNamedColor(XtDisplay(toplevel), toplevel->core.colormap, "gray75", - &color, &exact); - values.foreground = color.pixel; - gray1 = XCreateGC(XtDisplay(toplevel), win, GCForeground, &values); - - XAllocNamedColor(XtDisplay(toplevel), toplevel->core.colormap, "gray60", - &color, &exact); - values.foreground = color.pixel; - gray2 = XCreateGC(XtDisplay(toplevel), win, GCForeground, &values); - - XAllocNamedColor(XtDisplay(toplevel), toplevel->core.colormap, "gray20", - &color, &exact); - values.foreground = color.pixel; - black = XCreateGC(XtDisplay(toplevel), win, GCForeground, &values); - - XAllocNamedColor(XtDisplay(toplevel), toplevel->core.colormap, "red", - &color, &exact); - values.foreground = color.pixel; - values.line_width = 4; - values.cap_style = CapButt; - red = XCreateGC(XtDisplay(toplevel), win, - GCForeground | GCLineWidth | GCCapStyle, &values); - } - - if (rotate) { - xfact = (xe - xs) / 80.0; - yfact = (ye - ys) / 100.0; - if (rotate == CW) { - /* outer rectangle */ - XFillRectangle(dpy, win, gray1, - oxs * xfact + xs + .5, - oys * yfact + ys + .5, - (oye - oys) * xfact + .5, - (oxe - oxs) * yfact + .5); - XDrawLine(dpy, win, gray2, - xs, ye - 1, - 70 * xfact + xs - 1 + .5, ye - 1); - XDrawLine(dpy, win, gray2, - 70 * xfact + xs - 1 + .5, ye - 1, - 70 * xfact + xs - 1 + .5, ys); - /* inner rectangle */ - XFillRectangle(dpy, win, black, - ixs * xfact + xs + .5, - iys * yfact + ys + .5, - (iye - iys) * xfact + .5, - (ixe - ixs) * yfact + .5); - for (i = 0; i < sizeof(points) / sizeof(points[0]); i++) { - points[i].x = lin[(i<<1) + 1] * xfact + xs + .5; - points[i].y = lin[(i<<1)] * yfact + ys + .5; - } - XFillPolygon(dpy, win, gray2, points, i, Convex, CoordModeOrigin); - XDrawLine(dpy, win, gray0, - (oxe - 10) * xfact + xs + .5, oys * yfact + ys + .5, - xs, oys * yfact + ys + .5); - XDrawLine(dpy, win, gray0, - xs, ys, - xs, xe); - XDrawLine(dpy, win, black, - lin[7] * xfact + xs - 1 + .5, lin[6] * yfact + ys + .5, - lin[9] * xfact + xs - 1 + .5, lin[8] * yfact + ys - 1 + .5); - XDrawLine(dpy, win, black, - lin[9] * xfact + xs - 1 + .5, lin[8] * yfact + ys - 1 + .5, - lin[11] * xfact + xs + .5, lin[10] * yfact + ys - 1 + .5); - XDrawLine(dpy, win, black, - lin[13] * xfact + xs + .5, lin[12] * yfact + ys - 1 + .5, - lin[15] * xfact + xs + .5, lin[14] * yfact + ys - 1 + .5); - - if (!active) { - XDrawLine(dpy, win, red, - iys * xfact, ixs * yfact, iye * xfact, ixe * yfact); - XDrawLine(dpy, win, red, - iye * xfact, ixs * yfact, iys * xfact, ixe * yfact); - } - } - else if (rotate == CCW) { - /* outer rectangle */ - XFillRectangle(dpy, win, gray1, - 10 * xfact + xs + .5, - oys * yfact + ys + .5, - (oye - oys) * xfact + .5, - (oxe - oxs) * yfact + .5); - - XDrawLine(dpy, win, gray2, - 10 * xfact + xs + .5, ye - 1, - oxe * xfact + xs - 1 + .5, ye - 1); - XDrawLine(dpy, win, gray2, - xe - 1, ye - 1, - xe - 1, ys); - /* inner rectangle */ - XFillRectangle(dpy, win, black, - (ixs + 10) * xfact + xs + .5, - iys * yfact + ys + .5, - (iye - iys) * xfact + .5, - (ixe - ixs) * yfact + .5); - for (i = 0; i < sizeof(points) / sizeof(points[0]); i++) { - points[i].x = (-lin[(i<<1) + 1] + 80.0) * xfact + xs + .5; - points[i].y = lin[(i<<1)] * yfact + ys + .5; - } - XFillPolygon(dpy, win, gray2, points, i, Convex, CoordModeOrigin); - XDrawLine(dpy, win, gray0, - oxe * xfact + xs + .5, oys * yfact + ys + .5, - (oxs - 10) * xfact + xs + .5, oys * yfact + ys + .5); - XDrawLine(dpy, win, gray0, - (oxs + 10) * xfact + xs + .5, ys, - (oxs + 10) * xfact + xs + .5, xe); - - XDrawLine(dpy, win, black, - xs, lin[8] * yfact - 1 + ys + .5, - 4 * xfact + xs + .5, lin[8] * yfact - 1 + ys + .5); - XDrawLine(dpy, win, black, - 4 * xfact + xs, lin[8] * yfact - 1 + ys + .5, - 4 * xfact + xs, lin[3] * yfact - 1 + ys + .5); - XDrawLine(dpy, win, black, - 4 * xfact + xs + .5, lin[3] * yfact - 1 + ys + .5, - 10 * xfact + xs + .5 - 1, lin[3] * yfact - 1 + ys + .5); - XDrawLine(dpy, win, black, - 4 * xfact + xs, lin[0] * yfact - 1 + ys + .5, - 4 * xfact + xs, lin[4] * yfact - 1 + ys + .5); - - if (!active) { - XDrawLine(dpy, win, red, - (iys + 10) * xfact, ixs * yfact, - (iye + 10) * xfact, ixe * yfact); - XDrawLine(dpy, win, red, - (iye + 10) * xfact, ixs * yfact, - (iys + 10) * xfact, ixe * yfact); - } - } - } - else { - xfact = (xe - xs) / 100.0; - yfact = (ye - ys) / 80.0; - - /* outer rectangle */ - XFillRectangle(dpy, win, gray1, - oxs * xfact + xs + .5, - oys * yfact + ys + .5, - (oxe - oxs) * xfact + .5, - (oye - oys) * yfact + .5); - - XDrawLine(dpy, win, gray2, - oxs * xfact + xs + .5, oye * yfact + ys - 1 + .5, - oxe * xfact + xs - 1 + .5, oye * yfact + ys - 1 + .5); - XDrawLine(dpy, win, gray2, - oxe * xfact + xs - 1 + .5, oys * yfact + ys + .5, - oxe * xfact + xs - 1 + .5, oye * yfact + ys - 1 + .5); - - /* inner rectangle */ - XFillRectangle(dpy, win, black, - ixs * xfact + xs + .5, - iys * yfact + ys + .5, - (ixe - ixs) * xfact + .5, - (iye - iys) * yfact + .5); - - for (i = 0; i < sizeof(points) / sizeof(points[0]); i++) { - points[i].x = lin[i<<1] * xfact + xs + .5; - points[i].y = lin[(i<<1) + 1] * yfact + ys + .5; - } - - XFillPolygon(dpy, win, gray2, points, i, Convex, CoordModeOrigin); - - XDrawLine(dpy, win, black, - lin[6] * xfact + xs + .5, lin[7] * yfact + ys - 1 + .5, - lin[8] * xfact + xs - 1 + .5, lin[9] * yfact + ys - 1 + .5); - XDrawLine(dpy, win, black, - lin[8] * xfact + xs - 1 + .5, lin[9] * yfact + ys - 1 + .5, - lin[10] * xfact + xs - 1 + .5, lin[11] * yfact + ys + .5); - XDrawLine(dpy, win, black, - lin[12] * xfact + xs - 1 + .5, lin[13] * yfact + ys + .5, - lin[14] * xfact + xs - 1 + .5, lin[15] * yfact + ys + .5); - - XDrawLine(dpy, win, gray0, - oxe * xfact + xs + .5, oys * yfact + ys + .5, - oxs * xfact + xs + .5, oys * yfact + ys + .5); - XDrawLine(dpy, win, gray0, - oxs * xfact + xs + .5, oys * yfact + ys + .5, - oxs * xfact + xs + .5, lin[1] * yfact + ys + .5); - - if (!active) { - XDrawLine(dpy, win, red, - ixs * xfact, iys * yfact, ixe * xfact, iye * yfact); - XDrawLine(dpy, win, red, - ixe * xfact, iys * yfact, ixs * xfact, iye * yfact); - } - } -} - -void -DrawScreenMask(Display *dpy, Drawable win, GC gc, int xs, int ys, int xe, int ye, - int rotate) -{ - double xfact, yfact; - XPoint points[(sizeof(lin) / sizeof(lin[0])) >> 1]; - int i = 0, x = 0, y = 0, width, height; - - if (rotate) { - xfact = (xe - xs) / 80.0; - yfact = (ye - ys) / 100.0; - width = (oye - oys) * xfact + .5; - height = (oxe - oxs) * yfact + .5; - if (rotate == CW) { - x = oxs * xfact + xs + .5; - y = oys * yfact + ys + .5; - for (i = 0; i < sizeof(points) / sizeof(points[0]); i++) { - points[i].x = lin[(i<<1) + 1] * xfact + xs + .5; - points[i].y = lin[(i<<1)] * yfact + ys + .5; - } - } - else if (rotate == CCW) { - x = 10 * xfact + xs + .5; - y = oys * yfact + ys + .5; - for (i = 0; i < sizeof(points) / sizeof(points[0]); i++) { - points[i].x = (-lin[(i<<1) + 1] + 80.0) * xfact + xs + .5; - points[i].y = lin[(i<<1)] * yfact + ys + .5; - } - } - } - else { - xfact = (xe - xs) / 100.0; - yfact = (ye - ys) / 80.0; - x = oxs * xfact + xs + .5; - y = oys * yfact + ys + .5; - width = (oxe - oxs) * xfact + .5; - height = (oye - oys) * yfact + .5; - for (i = 0; i < sizeof(points) / sizeof(points[0]); i++) { - points[i].x = lin[(i<<1)] * xfact + xs + .5; - points[i].y = lin[(i<<1) + 1] * yfact + ys + .5; - } - } - - /* rectangle */ - XFillRectangle(dpy, win, gc, x, y, width, height); - - - XFillPolygon(dpy, win, gc, points, i, Convex, CoordModeOrigin); -} - -void -AdjustScreenUI(void) -{ - XF86ConfLayoutPtr lay = computer.layout; - XF86ConfAdjacencyPtr adj; - int i, dx, dy, x, y, w, h, base = -1; - double xf, yf; - - if (lay == NULL) - return; - - adj = lay->lay_adjacency_lst; - -#define USED1 -USED - - XtFree((XtPointer)mon_widths); - XtFree((XtPointer)mon_heights); - mon_widths = (int*)XtCalloc(1, sizeof(int) * columns); - mon_heights = (int*)XtCalloc(1, sizeof(int) * rows); - - mon_width = mon_height = 0; - for (i = 0; i < computer.num_screens; i++) { - if (base == -1 && computer.screens[i]->state == USED) - base = i; - if (computer.screens[i]->screen->scrn_monitor->mon_width > mon_width) - mon_width = computer.screens[i]->screen->scrn_monitor->mon_width; - if (computer.screens[i]->screen->scrn_monitor->mon_height > mon_height) - mon_height = computer.screens[i]->screen->scrn_monitor->mon_height; - } - if (base < 0) { - for (i = 0; i < computer.num_screens; i++) - ReshapeScreenWidget(computer.screens[i]); - return; - } - - if (mon_width == 0) { - mon_width = 10; - mon_height = 8; - } - - XtUnmapWidget(work); - - while (adj) { - xf86cfgScreen *scr = NULL, - *topscr = NULL, *botscr = NULL, *lefscr = NULL, *rigscr = NULL; - - for (i = 0; i < computer.num_screens; i++) - if (computer.screens[i]->screen == adj->adj_screen) - break; - if (i < computer.num_screens) - scr = computer.screens[i]; - - if (adj->adj_top != NULL) { - for (i = 0; i < computer.num_screens; i++) - if (computer.screens[i]->screen == adj->adj_top) - break; - if (i < computer.num_screens) - topscr = computer.screens[i]; - } - - if (adj->adj_bottom != NULL) { - for (i = 0; i < computer.num_screens; i++) - if (computer.screens[i]->screen == adj->adj_bottom) - break; - if (i < computer.num_screens) - botscr = computer.screens[i]; - } - - if (adj->adj_left != NULL) { - for (i = 0; i < computer.num_screens; i++) - if (computer.screens[i]->screen == adj->adj_left) - break; - if (i < computer.num_screens) - lefscr = computer.screens[i]; - } - - if (adj->adj_right != NULL) { - for (i = 0; i < computer.num_screens; i++) - if (computer.screens[i]->screen == adj->adj_right) - break; - if (i < computer.num_screens) - rigscr = computer.screens[i]; - } - - if (lefscr == NULL && rigscr == NULL && topscr == NULL && lefscr == NULL) { - XF86ConfScreenPtr s; - - if (adj->adj_where >= CONF_ADJ_RIGHTOF && adj->adj_where <= CONF_ADJ_BELOW) { - s = xf86findScreen(adj->adj_refscreen, XF86Config->conf_screen_lst); - for (i = 0; i < computer.num_screens; i++) - if (computer.screens[i]->screen == s) - break; - if (i < computer.num_screens) { - switch (adj->adj_where) { - case CONF_ADJ_RIGHTOF: - lefscr = computer.screens[i]; - break; - case CONF_ADJ_LEFTOF: - rigscr = computer.screens[i]; - break; - case CONF_ADJ_ABOVE: - botscr = computer.screens[i]; - break; - case CONF_ADJ_BELOW: - topscr = computer.screens[i]; - break; - } - } - } - } - - XtMoveWidget(scr->widget, 0, 0); - scr->state = USED1; - if (lefscr != NULL) { - if (lefscr->state == USED1) - XtMoveWidget(scr->widget, - lefscr->widget->core.x + lefscr->widget->core.width, - lefscr->widget->core.y); - else - XtMoveWidget(lefscr->widget, - -(int)(lefscr->widget->core.width), - scr->widget->core.y); - } - - if (rigscr != NULL) { - if (rigscr->state == USED1) { - dx = rigscr->widget->core.x - scr->widget->core.width - scr->widget->core.x; - dy = rigscr->widget->core.y - scr->widget->core.y; - - XtMoveWidget(scr->widget, scr->widget->core.x + dx, - scr->widget->core.y + dy); - if (lefscr != NULL && lefscr->state != USED1) - XtMoveWidget(lefscr->widget, lefscr->widget->core.x + dx, - lefscr->widget->core.y + dy); - } - else - XtMoveWidget(rigscr->widget, scr->widget->core.width, - scr->widget->core.y); - } - - if (topscr != NULL) { - if (topscr->state == USED1) { - dx = topscr->widget->core.x - scr->widget->core.x; - dy = topscr->widget->core.y + topscr->widget->core.height - - scr->widget->core.y; - - XtMoveWidget(scr->widget, scr->widget->core.x + dx, - scr->widget->core.y + dy); - if (lefscr != NULL && lefscr->state != USED1) - XtMoveWidget(lefscr->widget, lefscr->widget->core.x + dx, - lefscr->widget->core.y + dy); - if (rigscr != NULL && rigscr->state != USED1) - XtMoveWidget(rigscr->widget, rigscr->widget->core.x + dx, - rigscr->widget->core.y + dy); - } - else - XtMoveWidget(topscr->widget, scr->widget->core.x, - scr->widget->core.y - topscr->widget->core.height); - } - - if (botscr != NULL) { - if (botscr->state == USED1) { - dx = botscr->widget->core.x - scr->widget->core.x; - dy = botscr->widget->core.y - scr->widget->core.height - scr->widget->core.y; - - XtMoveWidget(scr->widget, scr->widget->core.x + dx, - scr->widget->core.y + dy); - if (lefscr != NULL && lefscr->state != USED1) - XtMoveWidget(lefscr->widget, lefscr->widget->core.x + dx, - lefscr->widget->core.y + dy); - if (rigscr != NULL && rigscr->state != USED1) - XtMoveWidget(rigscr->widget, rigscr->widget->core.x + dx, - rigscr->widget->core.y + dy); - if (botscr != NULL && botscr->state != USED1) - XtMoveWidget(botscr->widget, botscr->widget->core.x + dx, - botscr->widget->core.y + dy); - } - else - XtMoveWidget(botscr->widget, scr->widget->core.x, - scr->widget->core.y + scr->widget->core.height); - } - - adj = (XF86ConfAdjacencyPtr)(adj->list.next); - } - - for (i = 0; i < computer.num_screens; i++) - if (computer.screens[i]->state == USED1) - computer.screens[i]->state = USED; - else - XLowerWindow(XtDisplay(computer.screens[i]->widget), - XtWindow(computer.screens[i]->widget)); - - w = work->core.width / (columns + 1) - 5; - h = work->core.height / (rows + 1) - 5; - - if (w > h) - w = h; - else - h = w; - - dx = (work->core.width - (columns * w)) >> 1; - dy = (work->core.height - (rows * h)) >> 1; - - xf = (double)w / (double)computer.screens[0]->widget->core.width; - yf = (double)h / (double)computer.screens[0]->widget->core.height; - - for (i = 0; i < computer.num_screens; i++) { - Widget z = computer.screens[i]->widget; - - if (computer.screens[i]->state == USED) - XtConfigureWidget(z, z->core.x * xf + dx, - z->core.y * yf + dy, w, h, 0); - else - XtConfigureWidget(z, z->core.x, z->core.y, w, h, 0); - } - - if (computer.screens[base]->row >= 0) { - double xf, yf; - int width, height; - - for (i = 0; i < computer.num_screens; i++) { - width = computer.screens[i]->screen->scrn_monitor->mon_width; - height = computer.screens[i]->screen->scrn_monitor->mon_height; - if (width <= 0) { - width = mon_width; - height = mon_height; - } - - if (computer.screens[i]->rotate) { - xf = (double)width / (double)mon_width * 8. / 10.; - yf = (double)height / (double)mon_height; - } - else { - xf = (double)width / (double)mon_width; - yf = (double)height / (double)mon_height * 8. / 10.; - } - width = computer.screens[i]->widget->core.width * xf; - height = computer.screens[i]->widget->core.height * yf; - if (computer.screens[i]->state == USED) { - if (mon_widths[computer.screens[i]->column] < width) - mon_widths[computer.screens[i]->column] = width; - if (mon_heights[computer.screens[i]->row] < height) - mon_heights[computer.screens[i]->row] = height; - } - - /* do it here to avoid recalculation */ - computer.screens[i]->rect.width = width; - computer.screens[i]->rect.height = height; - } - } - - for (i = 0; i < computer.num_screens; i++) - ReshapeScreenWidget(computer.screens[i]); - - /* do a new pass, to avoid gaps if the monitors have different - * sizes. - */ - if (computer.screens[base]->row >= 0) { - x = computer.screens[base]->widget->core.x; - y = computer.screens[base]->widget->core.y; - - /* screens representations are already ordered */ - for (i = base; i < computer.num_screens; i++) { - if (computer.screens[i]->state == UNUSED) - continue; - if (computer.screens[i]->column != 0) - x += mon_widths[computer.screens[i]->column]; - else { - x = computer.screens[base]->widget->core.x; - if (i != base) - y += mon_heights[computer.screens[i]->row]; - } - XtMoveWidget(computer.screens[i]->widget, x, y); - } - } - XtMapWidget(work); -} - -static int -qcmp_screen(_Xconst void *a, _Xconst void *b) -{ - xf86cfgScreen *s1, *s2; - - s1 = *(xf86cfgScreen**)a; - s2 = *(xf86cfgScreen**)b; - - if (s1->widget->core.x > s2->widget->core.x) { - if (s2->widget->core.y >= - s1->widget->core.y + (s1->widget->core.height >> 1)) - return (-1); - return (1); - } - else { - if (s1->widget->core.y >= - s2->widget->core.y + (s2->widget->core.height >> 1)) - return (1); - return (-1); - } - /*NOTREACHED*/ -} - -void -UpdateScreenUI(void) -{ - XF86ConfLayoutPtr lay = computer.layout; - XF86ConfAdjacencyPtr adj, prev, left, base; - int i, p, cols, scrno; - - if (lay == NULL) - return; - - rows = columns = cols = 1; - - qsort(computer.screens, computer.num_screens, sizeof(xf86cfgScreen*), - qcmp_screen); - - adj = prev = left = base = NULL; - for (i = p = scrno = 0; i < computer.num_screens; i++) { - XF86ConfScreenPtr scr = computer.screens[i]->screen; - - if (computer.screens[i]->state == UNUSED) - continue; - - adj = (XF86ConfAdjacencyPtr)XtCalloc(1, sizeof(XF86ConfAdjacencyRec)); - adj->adj_scrnum = scrno++; - adj->adj_screen = scr; - adj->adj_screen_str = XtNewString(scr->scrn_identifier); - if (base == NULL) { - base = left = adj; - computer.screens[i]->row = computer.screens[i]->column = 0; - } - else { - int dy = computer.screens[i]->widget->core.y - - computer.screens[p]->widget->core.y; - - prev->list.next = adj; - if (dy > (computer.screens[i]->widget->core.height >> 1)) { - adj->adj_where = CONF_ADJ_BELOW; - adj->adj_refscreen = XtNewString(left->adj_screen_str); - left = adj; - computer.screens[i]->row = rows; - computer.screens[i]->column = 0; - cols = 1; - ++rows; - } - else { - computer.screens[i]->row = rows - 1; - computer.screens[i]->column = cols; - adj->adj_where = CONF_ADJ_RIGHTOF; - if (++cols > columns) - columns = cols; - adj->adj_refscreen = XtNewString(prev->adj_screen_str); - } - } - prev = adj; - p = i; - } - - adj = lay->lay_adjacency_lst; - - while (adj != NULL) { - prev = adj; - adj = (XF86ConfAdjacencyPtr)(adj->list.next); - XtFree(prev->adj_screen_str); - XtFree(prev->adj_right_str); - XtFree(prev->adj_left_str); - XtFree(prev->adj_top_str); - XtFree(prev->adj_bottom_str); - XtFree(prev->adj_refscreen); - XtFree((char*)prev); - } - - lay->lay_adjacency_lst = base; -} diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/screen.h b/xorg-server/hw/xfree86/utils/xorgcfg/screen.h deleted file mode 100644 index 293820db4..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/screen.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "xf86config.h" -#include "config.h" - -#ifndef _xf86cfg_screen_h -#define _xf86cfg_screen_h - -/* - * Prototypes - */ -void AddScreen(xf86cfgDevice*, xf86cfgDevice*); -void RemoveScreen(xf86cfgDevice*, xf86cfgDevice*); - -void DrawScreen(Display*, Drawable, int, int, int, int, Bool, int); -void DrawScreenMask(Display*, Drawable, GC, int, int, int, int, int); -void CreateScreenWidget(xf86cfgScreen*); -void SetScreenRotate(xf86cfgScreen*); - -void AdjustScreenUI(void); -void UpdateScreenUI(void); - -#endif /* _xf86cfg_screen_h */ diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/shorter.xbm b/xorg-server/hw/xfree86/utils/xorgcfg/shorter.xbm deleted file mode 100644 index 878f219d4..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/shorter.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define shorter_width 19 -#define shorter_height 19 -static unsigned char shorter_bits[] = { - 0x80, 0x0f, 0x00, 0x80, 0x0f, 0x00, 0x80, 0x0f, 0x00, 0xfc, 0xff, 0x01, - 0xf8, 0xff, 0x00, 0xf0, 0x7f, 0x00, 0xe0, 0x3f, 0x00, 0xc0, 0x1f, 0x00, - 0x80, 0x0f, 0x00, 0x00, 0x07, 0x00, 0x80, 0x0f, 0x00, 0xc0, 0x1f, 0x00, - 0xe0, 0x3f, 0x00, 0xf0, 0x7f, 0x00, 0xf8, 0xff, 0x00, 0xfc, 0xff, 0x01, - 0x80, 0x0f, 0x00, 0x80, 0x0f, 0x00, 0x80, 0x0f, 0x00}; diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/startx.c b/xorg-server/hw/xfree86/utils/xorgcfg/startx.c deleted file mode 100644 index 507afbf15..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/startx.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "config.h" -#include -#include -#include - -/* - * Initialization - */ -static int xpid; -Display *DPY; - -/* - * Implementation - */ -Bool -startx(void) -{ - int timeout = 8; - - if (getenv("DISPLAY") != NULL) - /* already running Xserver */ - return (False); - - if (XF86Config_path == NULL) { - char *home, filename[PATH_MAX]; - char commandline[PATH_MAX * 4]; - int c_pos; - int len; - /* - * The name of the 4.0 binary is XFree86. X might also - * be the name of the 3.3 binary. Therefore don't change - * name to 'X'. - */ - if (XFree86_path) - c_pos = XmuSnprintf(commandline, sizeof(commandline), - "%s/"__XSERVERNAME__" :8 -configure ",XFree86_path); - else - c_pos = XmuSnprintf(commandline, sizeof(commandline), - "%s/bin/"__XSERVERNAME__" :8 -configure ", XFree86Dir); - if (XF86Module_path && ((len = sizeof(commandline) - c_pos) > 0)) - c_pos += XmuSnprintf(commandline + c_pos,len, - " -modulepath %s",XF86Module_path); - if (XF86Font_path && ((len = sizeof(commandline) - c_pos) > 0)) - c_pos += XmuSnprintf(commandline + c_pos,len, - " -fontpath %s",XF86Font_path); - - if (system(commandline) != 0) { - fprintf(stderr, "Failed to run \"X -configure\".\n"); - exit(1); - } - - if ((home = getenv("HOME")) == NULL) - home = "/"; - -#ifndef QNX4 - XmuSnprintf(filename, sizeof(filename), "%s/"__XCONFIGFILE__".new", home); -#else - XmuSnprintf(filename, sizeof(filename), "//%d%s/"__XCONFIGFILE__".new", - getnid(), home); -#endif - - /* this memory is never released, even if the value of XF86Config_path is - * changed. - */ - XF86Config_path = XtNewString(filename); - } - - putenv("DISPLAY=:8"); - - switch (xpid = fork()) { - case 0: { - char path[PATH_MAX]; - /* Don't change to X! see above */ - if (XFree86_path) - XmuSnprintf(path, sizeof(path), "%s/"__XSERVERNAME__, XFree86_path); - else - XmuSnprintf(path, sizeof(path), "%s/bin/"__XSERVERNAME__, XFree86Dir); - execl(path, "X", ":8", /*"+xinerama",*/ "+accessx","-allowMouseOpenFail", - "-xf86config", XF86Config_path, (void *)NULL); - exit(-127); - } break; - case -1: - fprintf(stderr, "Cannot fork.\n"); - exit(1); - break; - default: - break; - } - - while (timeout > 0) { - int status; - - sleep(timeout -= 2); - if (waitpid(xpid, &status, WNOHANG | WUNTRACED) == xpid) - break; - else { - DPY = XOpenDisplay(NULL); - if (DPY != NULL) - break; - } - } - - if (DPY == NULL) { - fprintf(stderr, "Cannot connect to X server.\n"); - exit(1); - } - - return (True); -} - -void -endx(void) -{ - if (xpid != 0) - kill(xpid, SIGTERM); -} diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/stubs.c b/xorg-server/hw/xfree86/utils/xorgcfg/stubs.c deleted file mode 100644 index fdc840a7e..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/stubs.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include -#include -#include "stubs.h" - -/* - * Implementation - */ - -#if !defined(USE_MODULES) -/* these are defined in libdummy.a */ -int -ErrorF(const char *fmt, ...) -{ - int retval; - va_list ap; - - va_start(ap, fmt); - retval = vfprintf(stderr, fmt, ap); - - va_end(ap); - - return (retval); -} - -int -VErrorF(const char *fmt, va_list ap) -{ - int retval; - - retval = vfprintf(stderr, fmt, ap); - - return (retval); -} - -#endif /* !defined(USE_MODULES) */ diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/stubs.h b/xorg-server/hw/xfree86/utils/xorgcfg/stubs.h deleted file mode 100644 index c2f9f76b0..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/stubs.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#ifndef _xf86cfg_stubs_h -#define _xf86cfg_stubs_h - -#include - -int ErrorF(const char*, ...); -int VErrorF(const char*, va_list); -#if defined(USE_MODULES) -extern int xf86Verbose; -#endif - -#endif /* _xf86cfg_stubs_h */ diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/taller.xbm b/xorg-server/hw/xfree86/utils/xorgcfg/taller.xbm deleted file mode 100644 index c779300ea..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/taller.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define taller_width 19 -#define taller_height 19 -static unsigned char taller_bits[] = { - 0x00, 0x02, 0x00, 0x00, 0x07, 0x00, 0x80, 0x0f, 0x00, 0xc0, 0x1f, 0x00, - 0xe0, 0x3f, 0x00, 0xf0, 0x7f, 0x00, 0xf8, 0xff, 0x00, 0xfc, 0xff, 0x01, - 0x80, 0x0f, 0x00, 0x80, 0x0f, 0x00, 0x80, 0x0f, 0x00, 0xfc, 0xff, 0x01, - 0xf8, 0xff, 0x00, 0xf0, 0x7f, 0x00, 0xe0, 0x3f, 0x00, 0xc0, 0x1f, 0x00, - 0x80, 0x0f, 0x00, 0x00, 0x07, 0x00, 0x00, 0x02, 0x00}; diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/text-mode.c b/xorg-server/hw/xfree86/utils/xorgcfg/text-mode.c deleted file mode 100644 index 0b6e65482..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/text-mode.c +++ /dev/null @@ -1,3379 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include -#include -#include -#if defined(__SCO__) || defined(__UNIXWARE__) || \ - (defined(sun) && defined(__SVR4)) || defined(__NetBSD__) -#include -#else -#include -#endif -#include -#include -#include -#include -#include "cards.h" -#include "config.h" -#include "xf86config.h" -#include "loader.h" - -#define IS_KBDDRIV(X) ((strcmp((X),"kbd") == 0)) - -#ifndef PROJECT_ROOT -#define PROJECT_ROOT "/usr" -#endif - -#ifndef XKB_RULES_DIR -#define XKB_RULES_DIR PROJECT_ROOT "/share/X11/xkb/rules" -#endif - -#define CONTROL_A 1 -#define CONTROL_D 4 -#define CONTROL_E 5 -#define CONTROL_K 11 -#define TAB 9 -#define MIN(a, b) ((a) < (b) ? (a) : (b)) -#define MAX(a, b) ((a) > (b) ? (a) : (b)) - -void TextMode(void); - -static void ClearScreen(void); -static void PaintWindow(WINDOW*, char*, int, int, int, int); -static void PaintBox(WINDOW*, int, int, int, int); -static void PaintButton(WINDOW*, char*, int, int, int); -static void PrintWrap(WINDOW*, char*, int, int, int); -static int Dialog(char*, char*, int, int, char*, char*, int); -static void PaintItem(WINDOW*, char*, int, int); -static int DialogMenu(char*, char*, int, int, int, int, char**, char*, char*, int); -static void PaintCheckItem(WINDOW*, char*, int, int, int); -static int DialogCheckBox(char*, char*, int, int, int, int, char**, char*, char*, char*); -static char *DialogInput(char*, char*, int, int, char*, char*, char*, int); -static void PaintScroller(WINDOW*, int, int, int); - -static int MouseConfig(void); -static int KeyboardConfig(void); -static int MonitorConfig(void); -static int CardConfig(void); -static int ScreenConfig(void); -static int LayoutConfig(void); -static int WriteXF86Config(void); - -static XF86ConfLayoutPtr CopyLayout(XF86ConfLayoutPtr); -static XF86ConfAdjacencyPtr CopyAdjacency(XF86ConfAdjacencyPtr); -static XF86ConfInputrefPtr CopyInputref(XF86ConfInputrefPtr); -static XF86ConfInactivePtr CopyInactive(XF86ConfInactivePtr); -static void FreeLayout(XF86ConfLayoutPtr); - -extern int string_to_parser_range(char*, parser_range*, int); -#define PARSER_RANGE_SIZE 256 -/* string must have at least 256 bytes */ -extern int parser_range_to_string(char*, parser_range*, int); - -static Bool newconfig; - -static chtype screen_attr = A_NORMAL; -static chtype dialog_attr = A_REVERSE; -static chtype highlight_border_attr = A_REVERSE; -static chtype shadow_border_attr = A_REVERSE; -static chtype title_attr = A_NORMAL; -static chtype button_active_attr = A_NORMAL; -static chtype button_inactive_attr = A_NORMAL; -static int menu_width, item_x; -static char Edit[] = "Edit "; - -static char *main_menu[] = { -#define CONF_MOUSE 0 - "Configure mouse", -#define CONF_KEYBOARD 1 - "Configure keyboard", -#define CONF_MONITOR 2 - "Configure monitor", -#define CONF_CARD 3 - "Configure card", -#define CONF_SCREEN 4 - "Configure screen", -#define CONF_LAYOUT 5 - "Configure layout", -#define CONF_FINISH 6 - "Write "__XCONFIGFILE__" and quit", -#define CONF_QUIT 7 - "Quit", -}; - -void -TextMode(void) -{ - static int first = 1; - int i, choice = CONF_MOUSE; - -#ifdef USE_MODULES - if (!nomodules) - LoaderInitializeOptions(); -#endif - initscr(); - noecho(); - nonl(); - keypad(stdscr, TRUE); - - if (first) { - const char *filename; - - first = 0; - - if (has_colors()) { - start_color(); - init_pair(1, COLOR_BLACK, COLOR_BLACK); - screen_attr = A_BOLD | COLOR_PAIR(1); - - init_pair(2, COLOR_BLACK, COLOR_WHITE); - dialog_attr = COLOR_PAIR(2); - - init_pair(3, COLOR_BLACK, COLOR_WHITE); - shadow_border_attr = A_BOLD | COLOR_PAIR(3); - - init_pair(4, COLOR_WHITE, COLOR_WHITE); - highlight_border_attr = A_BOLD | COLOR_PAIR(4); - - init_pair(5, COLOR_WHITE, COLOR_BLUE); - title_attr = A_BOLD | COLOR_PAIR(5); - button_active_attr = title_attr; - - init_pair(6, COLOR_WHITE, COLOR_BLACK); - button_inactive_attr = A_BOLD | COLOR_PAIR(6); - } - - if ((filename = xf86openConfigFile(getuid() == 0 ? - CONFPATH : USER_CONFPATH, - XF86Config_path, NULL)) != NULL) { - XF86Config_path = (char *)filename; - if ((XF86Config = xf86readConfigFile()) == NULL) { - ClearScreen(); - refresh(); - Dialog("Configuration error", - "Error parsing configuration file.", - 7, 50, " Ok ", NULL, 0); - } - } - if (XF86Config == NULL) { - XF86Config = (XF86ConfigPtr)XtCalloc(1, sizeof(XF86ConfigRec)); - newconfig = True; - } - else - newconfig = False; - } - - ClearScreen(); - refresh(); - - /*CONSTCOND*/ - while (1) { - int cancel = FALSE; - - ClearScreen(); - refresh(); - if (Dialog( __XSERVERNAME__" Configuration", - "This program will create the "__XCONFIGFILE__" file, based on " - "menu selections you make.\n" - "\n" -#if defined(__SCO__) || defined(__UNIXWARE__) - "The "__XCONFIGFILE__" file usually resides in /etc. A " - "sample "__XCONFIGFILE__" file is supplied with " -#else - "The "__XCONFIGFILE__" file usually resides in " PROJECT_ROOT "/etc/X11 " - "or /etc/X11. A sample "__XCONFIGFILE__" file is supplied with " -#endif - __XSERVERNAME__"; it is configured for a standard VGA card and " - "monitor with 640x480 resolution. This program will ask for " - "a pathname when it is ready to write the file.\n" - "\n" - "You can either take the sample "__XCONFIGFILE__" as a base and " - "edit it for your configuration, or let this program " - "produce a base "__XCONFIGFILE__" file for your configuration and " - "fine-tune it.", - 20, 60, " Ok ", " Cancel ", 0) != 0) - break; - - while (!cancel) { - ClearScreen(); - refresh(); - switch (DialogMenu("Main menu", - "Choose one of the options:", - 17, 60, 8, sizeof(main_menu) / - sizeof(main_menu[0]), main_menu, - " Ok ", " Cancel ", choice)) { - case CONF_MOUSE: - i = MouseConfig(); - if (i > 0 && choice == CONF_MOUSE) - choice = CONF_KEYBOARD; - else if (i == 0) - choice = CONF_MOUSE; - break; - case CONF_KEYBOARD: - i = KeyboardConfig(); - if (i > 0 && choice <= CONF_KEYBOARD) - choice = CONF_MONITOR; - else if (i == 0) - choice = CONF_KEYBOARD; - break; - case CONF_MONITOR: - i = MonitorConfig(); - if (i > 0 && choice <= CONF_MONITOR) - choice = CONF_CARD; - else if (i == 0) - choice = CONF_MONITOR; - break; - case CONF_CARD: - i = CardConfig(); - if (i > 0 && choice <= CONF_CARD) - choice = CONF_SCREEN; - else if (i == 0) - choice = CONF_CARD; - break; - case CONF_SCREEN: - i = ScreenConfig(); - if (i > 0 && choice <= CONF_SCREEN) - choice = CONF_LAYOUT; - else if (i == 0) - choice = CONF_SCREEN; - break; - case CONF_LAYOUT: - i = LayoutConfig(); - if (i > 0 && choice <= CONF_LAYOUT) - choice = CONF_FINISH; - else if (i == 0) - choice = CONF_LAYOUT; - break; - case CONF_FINISH: - if (WriteXF86Config() < 0) - break; - /*FALLTROUGH*/ - case CONF_QUIT: - endwin(); - exit(0); - default: - cancel = TRUE; - break; - } - } - } - - endwin(); -} - -static int -WriteXF86Config(void) -{ - char *xf86config; - - ClearScreen(); - refresh(); - xf86config = DialogInput("Write "__XCONFIGFILE__, "Write configuration to file:", - 10, 60, XF86Config_path ? XF86Config_path : - "/etc/X11/"__XCONFIGFILE__, " Ok ", " Cancel ", 0); - - if (xf86config == NULL) - return (-1); - - if (newconfig) { - if (XF86Config->conf_modules == NULL) { - static char *modules[] = {"extmod", "glx", "dri", "dbe", - "record", "xtrap", "type1"}; - XF86LoadPtr load; - int i; - - XF86Config->conf_modules = (XF86ConfModulePtr) - XtCalloc(1, sizeof(XF86ConfModuleRec)); - - XF86Config->conf_modules->mod_comment = - XtNewString("\tLoad \"freetype\"\n" - "\t# Load \"xtt\"\n"); - - for (i = 0; i < sizeof(modules) / sizeof(modules[0]); i++) { - load = (XF86LoadPtr)XtCalloc(1, sizeof(XF86LoadRec)); - load->load_name = XtNewString(modules[i]); - XF86Config->conf_modules->mod_load_lst = - xf86addModule(XF86Config->conf_modules->mod_load_lst, load); - } - } - } - - if (!xf86writeConfigFile(xf86config, XF86Config)) { - char msg[1024]; - - XmuSnprintf(msg, sizeof(msg), "Failed to write configuration file %s.", - xf86config); - ClearScreen(); - refresh(); - (void)Dialog("Write failed!", msg, 8, 60, " Ok ", NULL, 0); - XtFree(xf86config); - return (-1); - } - XtFree(xf86config); - - return (1); -} - -static char *protocols[] = { -#ifdef __SCO__ - "OsMouse", -#endif -#ifdef WSCONS_SUPPORT - "wsmouse", -#endif - "Auto", - "SysMouse", - "MouseSystems", - "BusMouse", - "PS/2", - "Microsoft", -#ifndef __FreeBSD__ - "ImPS/2", - "ExplorerPS/2", - "GlidePointPS/2", - "MouseManPlusPS/2", - "NetMousePS/2", - "NetScrollPS/2", - "ThinkingMousePS/2", -#endif - "AceCad", - "GlidePoint", - "IntelliMouse", - "Logitech", - "MMHitTab", - "MMSeries", - "MouseMan", - "ThinkingMouse", -}; - -static int -MouseConfig(void) -{ - int i, nlist, def, proto, emul; - char **list = NULL, *device, *str; - XF86ConfInputPtr *inputs = NULL; - XF86ConfInputPtr input = XF86Config->conf_input_lst; - XF86OptionPtr option; - - nlist = 0; - while (input) { - if (strcmp(input->inp_driver, "mouse") == 0) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 1) * sizeof(char*)); - list[nlist] = XtMalloc(sizeof(Edit) + - strlen(input->inp_identifier) + 1); - sprintf(list[nlist], "%s%s", Edit, input->inp_identifier); - inputs = (XF86ConfInputPtr*)XtRealloc((XtPointer)inputs, (nlist + 1) * - sizeof(XF86ConfInputPtr)); - inputs[nlist] = input; - ++nlist; - } - input = (XF86ConfInputPtr)(input->list.next); - } - - input = NULL; - - if (nlist) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 2) * sizeof(char*)); - list[nlist++] = XtNewString("Add new mouse"); - if (nlist == 2) { - i = strlen("Remove ") + strlen(inputs[0]->inp_identifier) + 1; - list[nlist] = XtMalloc(i); - XmuSnprintf(list[nlist], i, "Remove %s", inputs[0]->inp_identifier); - ++nlist; - } - else - list[nlist++] = XtNewString("Remove mouse"); - ClearScreen(); - refresh(); - i = DialogMenu("Mouse configuration", - "You can edit or remove a previously configured mouse, " - "or add a new one.", 14, 60, 4, nlist, list, - " Ok ", " Cancel ", 0); - if (i < 0) { - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)inputs); - return (-1); - } - if (nlist > 2 && i == nlist - 1) { - if (nlist > 3) { - for (i = 0; i < nlist - 2; i++) { - /* XXX Remove the "Edit " from list entries */ - memmove(list[i], list[i] + sizeof(Edit) - 1, - strlen(list[i]) - sizeof(Edit) + 2); - } - ClearScreen(); - refresh(); - i = DialogMenu("Remove mouse", - "Select which mouse to remove", - 13, 60, 4, nlist - 2, list, - " Remove ", " Cancel ", 0); - if (i < 0) { - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)inputs); - return (-1); - } - input = inputs[i]; - } - else - input = inputs[0]; - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)inputs); - xf86removeInput(XF86Config, input); - return (0); - } - if (i < nlist - 2) - input = inputs[i]; - } - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)inputs); - - if (input == NULL) { - char label[32]; - - input = (XF86ConfInputPtr)XtCalloc(1, sizeof(XF86ConfInputRec)); - XmuSnprintf(label, sizeof(label), "Mouse%d", nlist ? nlist - 2 : 0); - ClearScreen(); - refresh(); - input->inp_identifier = - DialogInput("Mouse identifier", - "Enter an identifier for your mouse definition:", - 11, 40, label, - " Next >>", " Cancel ", 0); - if (input->inp_identifier == NULL) { - XtFree((XtPointer)input); - return (-1); - } - } - - def = 0; - option = xf86findOption(input->inp_option_lst, "Protocol"); - if (option) - for (i = 0; i < sizeof(protocols)/sizeof(protocols[0]); i++) - if (strcasecmp(option->opt_val, protocols[i]) == 0) { - def = i; - break; - } - - ClearScreen(); - refresh(); - i = DialogMenu("Select mouse protocol", - "If you have a serial mouse, it probably will work with " - "the \"Auto\" protocol. But, if it is an old serial " - "mouse probably it is not PNP; in that case, most serial " - "mouses understand the \"Microsoft\" protocol.", - 19, 60, 7, sizeof(protocols) / - sizeof(protocols[0]), protocols, " Next >>", " Cancel ", def); - if (i < 0) { - if (input->inp_driver == NULL) { - XtFree(input->inp_driver); - XtFree((XtPointer)input); - } - return (i); - } - proto = i; - - def = 0; - if (input->inp_driver) { - option = xf86findOption(input->inp_option_lst, "Emulate3Buttons"); - def = option ? 0 : 1; - } - ClearScreen(); - refresh(); - i = Dialog("Mouse 3 buttons emulation", - "If your mouse has only two buttons, it is recommended that " - "you enable Emulate3Buttons.\n" - "\n" - "Do you want to enable Emulate3Buttons?", - 10, 60, " Yes ", " No ", def); - if (i < 0) - return (i); - emul = !i; - - str = NULL; - option = xf86findOption(input->inp_option_lst, "Device"); - if (option) - str = option->opt_val; - if (str == NULL) -#ifdef WSCONS_SUPPORT - str = "/dev/wsmouse"; -#elif defined(__FreeBSD__) || defined(__DragonFly__) - str = "/dev/sysmouse"; -#elif defined(__linux__) - str = "/dev/input/mice"; -#else - str = "/dev/mouse"; -#endif - - ClearScreen(); - refresh(); - device = DialogInput("Select mouse device", - "Enter mouse device:", 10, 40, str, - " Finish ", " Cancel ", 0); - if (device == NULL) { - if (input->inp_driver == NULL) { - XtFree(input->inp_driver); - XtFree((XtPointer)input); - } - return (-1); - } - - /* Finish mouse configuration */ - option = xf86findOption(input->inp_option_lst, "Protocol"); - if (option) { - XtFree((XtPointer)option->opt_val); - option->opt_val = XtNewString(protocols[proto]); - } - else - input->inp_option_lst = xf86addNewOption(input->inp_option_lst, - XtNewString("Protocol"), XtNewString(protocols[proto])); - - option = xf86findOption(input->inp_option_lst, "Emulate3Buttons"); - if (option && !emul) { - xf86removeOption(&input->inp_option_lst, "Emulate3Buttons"); - } - else if (option == NULL && emul) - input->inp_option_lst = xf86addNewOption(input->inp_option_lst, - XtNewString("Emulate3Buttons"), NULL); - - option = xf86findOption(input->inp_option_lst, "Device"); - if (option) { - XtFree((XtPointer)option->opt_val); - option->opt_val = device; - } - else - input->inp_option_lst = xf86addNewOption(input->inp_option_lst, - XtNewString("Device"), device); - - if (input->inp_driver == NULL) { - input->inp_driver = XtNewString("mouse"); - XF86Config->conf_input_lst = - xf86addInput(XF86Config->conf_input_lst, input); - } - - return (1); -} - -static int -KeyboardConfig(void) -{ - int i; - char *rulesfile; - static int first = 1; - static XkbRF_RulesPtr rules; - static char **models, **layouts; - XF86ConfInputPtr *inputs = NULL, input = XF86Config->conf_input_lst; - char **list = NULL, *model, *layout; - int nlist, def; - XF86OptionPtr option; - - nlist = 0; - while (input) { - if (IS_KBDDRIV(input->inp_driver)) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 1) * sizeof(char*)); - list[nlist] = XtMalloc(sizeof(Edit) + - strlen(input->inp_identifier) + 1); - sprintf(list[nlist], "%s%s", Edit, input->inp_identifier); - inputs = (XF86ConfInputPtr*)XtRealloc((XtPointer)inputs, (nlist + 1) * - sizeof(XF86ConfInputPtr)); - inputs[nlist] = input; - ++nlist; - } - input = (XF86ConfInputPtr)(input->list.next); - } - - input = NULL; - - if (nlist) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 2) * sizeof(char*)); - list[nlist++] = XtNewString("Add new keyboard"); - if (nlist == 2) { - i = strlen("Remove ") + strlen(inputs[0]->inp_identifier) + 1; - list[nlist] = XtMalloc(i); - XmuSnprintf(list[nlist], i, "Remove %s", inputs[0]->inp_identifier); - ++nlist; - } - else - list[nlist++] = XtNewString("Remove keyboard"); - ClearScreen(); - refresh(); - i = DialogMenu("Keyboard configuration", - "You can edit or remove a previously configured " - "keyboard, or add a new one.", 14, 60, 4, nlist, list, - " Ok ", " Cancel ", 0); - if (i < 0) { - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)inputs); - return (-1); - } - if (nlist > 2 && i == nlist - 1) { - if (nlist > 3) { - for (i = 0; i < nlist - 2; i++) { - /* XXX Remove the "Edit " from list entries */ - memmove(list[i], list[i] + sizeof(Edit) - 1, - strlen(list[i]) - sizeof(Edit) + 2); - } - ClearScreen(); - refresh(); - i = DialogMenu("Remove keyboard", - "Select which keyboard to remove", - 13, 60, 4, nlist - 2, list, - " Remove ", " Cancel ", 0); - if (i < 0) { - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)inputs); - return (-1); - } - input = inputs[i]; - } - else - input = inputs[0]; - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)inputs); - xf86removeInput(XF86Config, input); - return (0); - } - if (i < nlist - 2) - input = inputs[i]; - } - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)inputs); - - if (input == NULL) { - char label[32]; - - input = (XF86ConfInputPtr)XtCalloc(1, sizeof(XF86ConfInputRec)); - XmuSnprintf(label, sizeof(label), "Keyboard%d", nlist ? nlist - 2 : 0); - ClearScreen(); - refresh(); - input->inp_identifier = - DialogInput("Keyboard identifier", - "Enter an identifier for your keyboard definition:", - 11, 40, label, - " Next >>", " Cancel ", 0); - if (input->inp_identifier == NULL) { - XtFree((XtPointer)input); - return (-1); - } - } - - if (first) { - first = 0; -#ifdef XFREE98_XKB - rulesfile = XKB_RULES_DIR "/xfree98"; -#else - rulesfile = XKB_RULES_DIR "/"__XKBDEFRULES__; -#endif - rules = XkbRF_Load(rulesfile, "", True, False); - if (rules == NULL) { - ClearScreen(); - refresh(); - Dialog("Configuration error", - "XKB rules file not found.\n" - "\n" - "Keyboard XKB options will be set to default values.", - 10, 50, " Ok ", NULL, 0); - if (input->inp_driver == NULL) { - input->inp_option_lst = - xf86addNewOption(input->inp_option_lst, - XtNewString("XkbModel"), XtNewString("pc101")); - input->inp_option_lst = - xf86addNewOption(input->inp_option_lst, - XtNewString("XkbLayout"), XtNewString("us")); - input->inp_driver = XtNewString("kbd"); - XF86Config->conf_input_lst = - xf86addInput(XF86Config, input); - } - return (0); - } - models = (char**)XtMalloc(sizeof(char*) * rules->models.num_desc); - for (i = 0; i < rules->models.num_desc; i++) - models[i] = XtNewString(rules->models.desc[i].desc); - layouts = (char**)XtMalloc(sizeof(char*) * rules->layouts.num_desc); - for (i = 0; i < rules->layouts.num_desc; i++) - layouts[i] = XtNewString(rules->layouts.desc[i].desc); - } - else if (rules == NULL) - return (-1); - - def = 0; - option = xf86findOption(input->inp_option_lst, "XkbModel"); - if (option) { - for (i = 0; i < rules->models.num_desc; i++) - if (strcasecmp(option->opt_val, rules->models.desc[i].name) == 0) { - def = i; - break; - } - } - ClearScreen(); - refresh(); - i = DialogMenu("Keyboard model", - "Please select one of the following keyboard types that is " - "the better description of your keyboard. If nothing really " - "matches, choose \"Generic 101-key PC\".\n", - 20, 60, 9, rules->models.num_desc, - models, " Next >>", " Cancel ", def); - if (i < 0) - return (i); - model = rules->models.desc[i].name; - - def = 0; - option = xf86findOption(input->inp_option_lst, "XkbLayout"); - if (option) { - for (i = 0; i < rules->layouts.num_desc; i++) - if (strcasecmp(option->opt_val, rules->layouts.desc[i].name) == 0) { - def = i; - break; - } - } - ClearScreen(); - refresh(); - i = DialogMenu("Keyboard layout", - "Select keyboard layout:", - 20, 60, 11, rules->layouts.num_desc, - layouts, " Finish ", " Cancel ", def); - if (i < 0) - return (i); - layout = rules->layouts.desc[i].name; - - /* Finish keyboard configuration */ - option = xf86findOption(input->inp_option_lst, "XkbModel"); - if (option) { - XtFree((XtPointer)option->opt_val); - option->opt_val = XtNewString(model); - } - else - input->inp_option_lst = xf86addNewOption(input->inp_option_lst, - XtNewString("XkbModel"), XtNewString(model)); - - option = xf86findOption(input->inp_option_lst, "XkbLayout"); - if (option) { - XtFree((XtPointer)option->opt_val); - option->opt_val = XtNewString(layout); - } - else - input->inp_option_lst = xf86addNewOption(input->inp_option_lst, - XtNewString("XkbLayout"), XtNewString(layout)); - - if (input->inp_driver == NULL) { - input->inp_driver = XtNewString("kbd"); - XF86Config->conf_input_lst = - xf86addInput(XF86Config->conf_input_lst, input); - } - - return (1); -} - -static char *hsync[] = { -#define CONF_MONITOR_HSYNC 0 - "Enter your own horizontal sync range", - "31.5; Standard VGA, 640x480 @ 60 Hz", - "31.5 - 35.1; Super VGA, 800x600 @ 56 Hz", - "31.5, 35.5; 8514 Compatible, 1024x768 @ 87 Hz interlaced (no 800x600)", - "31.5, 35.15, 35.5; Super VGA, 1024x768 @ 87 Hz int., 800x600 @ 56 Hz", - "31.5 - 37.9; Extended Super VGA, 800x600 @ 60 Hz, 640x480 @ 72 Hz", - "31.5 - 48.5; Non-Interlaced SVGA, 1024x768 @ 60 Hz, 800x600 @ 72 Hz", - "31.5 - 57.0; High Frequency SVGA, 1024x768 @ 70 Hz", - "31.5 - 64.3; Monitor that can do 1280x1024 @ 60 Hz", - "31.5 - 79.0; Monitor that can do 1280x1024 @ 74 Hz", - "31.5 - 82.0; Monitor that can do 1280x1024 @ 76 Hz", - "31.5 - 92.0; Monitor that can do 1280x1024 @ 85 Hz", - "31.5 - 108.0; Monitor that can do 1600x1200 @ 85 Hz", - "31.5 - 128.5; Monitor that can do 1920x1440 @ 85 Hz", - "31.5 - 137.0; Monitor that can do 2048x1536 @ 85 Hz" -}; - -static char *vrefresh[] = { -#define CONF_MONITOR_VREFRESH 0 - "Enter your own vertical sync range", - "50 - 70", - "50 - 90", - "50 - 100", - "40 - 150", -}; - -static int -MonitorConfig(void) -{ - int i; - XF86ConfMonitorPtr *monitors = NULL, monitor = XF86Config->conf_monitor_lst; - char **list = NULL, *identifier = NULL, *tmp; - int nlist, def; - char hsync_str[256], vrefresh_str[256]; - - hsync_str[0] = vrefresh_str[0] = '\0'; - nlist = 0; - while (monitor) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 1) * sizeof(char*)); - list[nlist] = XtMalloc(sizeof(Edit) + - strlen(monitor->mon_identifier) + 1); - sprintf(list[nlist], "%s%s", Edit, monitor->mon_identifier); - monitors = (XF86ConfMonitorPtr*)XtRealloc((XtPointer)monitors, (nlist + 1) * - sizeof(XF86ConfMonitorPtr)); - monitors[nlist] = monitor; - ++nlist; - monitor = (XF86ConfMonitorPtr)(monitor->list.next); - } - - monitor = NULL; - - if (nlist) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 2) * sizeof(char*)); - list[nlist++] = XtNewString("Add new monitor"); - if (nlist == 2) { - i = strlen("Remove ") + strlen(monitors[0]->mon_identifier) + 1; - list[nlist] = XtMalloc(i); - XmuSnprintf(list[nlist], i, "Remove %s", monitors[0]->mon_identifier); - ++nlist; - } - else - list[nlist++] = XtNewString("Remove monitor"); - ClearScreen(); - refresh(); - i = DialogMenu("Monitor configuration", - "You can edit or remove a previously configured " - "monitor, or add a new one.", 14, 60, 4, nlist, list, - " Ok ", " Cancel ", 0); - if (i < 0) { - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)monitors); - return (-1); - } - if (nlist > 2 && i == nlist - 1) { - if (nlist > 3) { - for (i = 0; i < nlist - 2; i++) { - /* XXX Remove the "Edit " from list entries */ - memmove(list[i], list[i] + sizeof(Edit) - 1, - strlen(list[i]) - sizeof(Edit) + 2); - } - ClearScreen(); - refresh(); - i = DialogMenu("Remove monitor", - "Select which monitor to remove", - 13, 60, 4, nlist - 2, list, - " Remove ", " Cancel ", 0); - if (i < 0) { - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)monitors); - return (-1); - } - monitor = monitors[i]; - } - else - monitor = monitors[0]; - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)monitors); - xf86removeMonitor(XF86Config, monitor); - return (0); - } - if (i < nlist - 2) - monitor = monitors[i]; - } - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)monitors); - - if (monitor == NULL) { - char label[32]; - - monitor = (XF86ConfMonitorPtr)XtCalloc(1, sizeof(XF86ConfMonitorRec)); - XmuSnprintf(label, sizeof(label), "Monitor%d", nlist ? nlist - 2 : 0); - ClearScreen(); - refresh(); - identifier = - DialogInput("Monitor identifier", - "Enter an identifier for your monitor definition:", - 11, 40, label, - " Next >>", " Cancel ", 0); - if (identifier == NULL) { - XtFree((XtPointer)monitor); - return (-1); - } - } - - if (monitor->mon_identifier == NULL) { - ClearScreen(); - refresh(); - i = Dialog("Monitor configuration", - "Now we want to set the specifications of the monitor. The " - "two critical parameters are the vertical refresh rate, which " - "is the rate at which the whole screen is refreshed, and most " - "importantly the horizontal sync rate, which is the rate at " - "which scanlines are displayed.\n" - "\n" - "The valid range for horizontal sync and vertical sync should " - "be documented in the manual of your monitor.", - 15, 60, " Next >>", " Cancel ", 0); - if (i != 0) { - XtFree(identifier); - XtFree((XtPointer)monitor); - return (-1); - } - } - - def = 0; - if (monitor->mon_identifier) { - int len; - - parser_range_to_string(hsync_str, &(monitor->mon_hsync[0]), - monitor->mon_n_hsync); - len = strlen(hsync_str); - for (i = 1; i < sizeof(hsync) / sizeof(hsync[0]); i++) { - tmp = strchr(hsync[i], ';'); - if (strncmp(hsync_str, hsync[i], len) == 0) { - def = i; - break; - } - } - } - if (hsync_str[0] == '\0') - strcpy(hsync_str, "31.5"); - - ClearScreen(); - refresh(); - i = DialogMenu("Monitor HorizSync", - "You must indicate the horizontal sync range of your " - "monitor. You can either select one of the predefined " - "ranges below that correspond to industry-standard monitor " - "types, or give a specific range.", - 22, 78, 11, sizeof(hsync) / - sizeof(hsync[0]), hsync, " Next >>", " Cancel ", def); - if (i < 0) { - if (monitor->mon_identifier == NULL) { - XtFree(identifier); - XtFree((XtPointer)monitor); - } - return (-1); - } - if (i == CONF_MONITOR_HSYNC) { - ClearScreen(); - refresh(); - tmp = DialogInput("Monitor HorizSync", - "Please enter the horizontal sync range of your " - "monitor, in the format used in the table of monitor " - "types above. You can either specify one or more " - "continuous ranges (e.g. 15-25, 30-50), or one or more " - "fixed sync frequencies.\n" - "\n" - "Horizontal sync range:", 16, 62, hsync_str, - " Ok ", " Cancel ", def); - if (tmp == NULL) { - if (monitor->mon_identifier == NULL) { - XtFree(identifier); - XtFree((XtPointer)monitor); - } - return (-1); - } - XmuSnprintf(hsync_str, sizeof(hsync_str), "%s", tmp); - XtFree(tmp); - } - else { - tmp = strchr(hsync[i], ';'); - strncpy(hsync_str, hsync[i], tmp - hsync[i]); - hsync_str[tmp - hsync[i]] = '\0'; - } - - def = 0; - if (monitor->mon_identifier) { - parser_range_to_string(vrefresh_str, &(monitor->mon_vrefresh[0]), - monitor->mon_n_vrefresh); - for (i = 1; i < sizeof(vrefresh) / sizeof(vrefresh[0]); i++) { - if (strcmp(vrefresh_str, vrefresh[i]) == 0) { - def = i; - break; - } - } - } - if (vrefresh_str[0] == '\0') - strcpy(vrefresh_str, "50 - 70"); - ClearScreen(); - refresh(); - i = DialogMenu("Monitor VertRefresh", - "You must indicate the vertical sync range of your monitor. " - "You can either select one of the predefined ranges below " - "that correspond to industry-standard monitor types, or " - "give a specific range. For interlaced modes, the number " - "that counts is the high one (e.g. 87 Hz rather than 43 Hz).", - 19, 60, 5, sizeof(vrefresh) / - sizeof(vrefresh[0]), vrefresh, " Finish ", " Cancel ", def); - if (i < 0) { - if (monitor->mon_identifier == NULL) { - XtFree(identifier); - XtFree((XtPointer)monitor); - } - return (i); - } - if (i == CONF_MONITOR_VREFRESH) { - ClearScreen(); - refresh(); - tmp = DialogInput("Monitor VertRefresh", - "Vertical sync range:", 10, 50, vrefresh_str, - " Done ", " Cancel ", 0); - if (tmp == NULL) { - if (monitor->mon_identifier == NULL) { - XtFree(identifier); - XtFree((XtPointer)monitor); - } - return (-1); - } - XmuSnprintf(vrefresh_str, sizeof(vrefresh_str), "%s", tmp); - XtFree(tmp); - } - else - strcpy(vrefresh_str, vrefresh[i]); - - /* Finish monitor configuration */ - monitor->mon_n_hsync = string_to_parser_range(hsync_str, - &(monitor->mon_hsync[0]), CONF_MAX_HSYNC); - monitor->mon_n_vrefresh = string_to_parser_range(vrefresh_str, - &(monitor->mon_vrefresh[0]), CONF_MAX_VREFRESH); - if (monitor->mon_identifier == NULL) { - monitor->mon_identifier = identifier; - XF86Config->conf_monitor_lst = - xf86addMonitor(XF86Config->conf_monitor_lst, monitor); - } - - return (1); -} - -static int -CardConfig(void) -{ - int i; - XF86ConfDevicePtr *devices = NULL, device = XF86Config->conf_device_lst; - char **list = NULL, *identifier = NULL, *driver, *busid, *tmp; - int nlist, def; - CardsEntry *entry = NULL; - static char **drivers; - static int ndrivers; - static char *xdrivers[] = { - "apm", - "ark", - "ast", - "ati", - "r128", - "radeon", - "chips", - "cirrus", - "cyrix", - "fbdev", - "glint", - "i128", - "i740", - "i810", - "imstt", - "mga", - "neomagic", - "nv", - "rendition", - "s3", - "s3virge", - "savage", - "siliconmotion", - "sis", - "tdfx", - "tga", - "trident", - "tseng", - "vmware", - "vga", - "vesa", - }; - -#ifdef USE_MODULES - if (!nomodules) { - xf86cfgModuleOptions *opts = module_options; - - drivers = NULL; - ndrivers = 0; - while (opts) { - if (opts->type == VideoModule) { - ++ndrivers; - drivers = (char**)XtRealloc((XtPointer)drivers, - ndrivers * sizeof(char*)); - /* XXX no private copy */ - drivers[ndrivers - 1] = opts->name; - } - opts = opts->next; - } - } - else -#endif - { - ndrivers = sizeof(xdrivers) / sizeof(xdrivers[0]); - drivers = xdrivers; - } - - nlist = 0; - while (device) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 1) * sizeof(char*)); - list[nlist] = XtMalloc(sizeof(Edit) + - strlen(device->dev_identifier) + 1); - sprintf(list[nlist], "%s%s", Edit, device->dev_identifier); - devices = (XF86ConfDevicePtr*)XtRealloc((XtPointer)devices, (nlist + 1) * - sizeof(XF86ConfDevicePtr)); - devices[nlist] = device; - ++nlist; - device = (XF86ConfDevicePtr)(device->list.next); - } - - device = NULL; - - if (nlist) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 2) * sizeof(char*)); - list[nlist++] = XtNewString("Add new card"); - if (nlist == 2) { - i = strlen("Remove ") + strlen(devices[0]->dev_identifier) + 1; - list[nlist] = XtMalloc(i); - XmuSnprintf(list[nlist], i, "Remove %s", devices[0]->dev_identifier); - ++nlist; - } - else - list[nlist++] = XtNewString("Remove device"); - ClearScreen(); - refresh(); - i = DialogMenu("Card configuration", - "You can edit or remove a previously configured " - "card, or add a new one.", 14, 60, 4, nlist, list, - " Ok ", " Cancel ", 0); - if (i < 0) { - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)devices); - return (-1); - } - if (nlist > 2 && i == nlist - 1) { - if (nlist > 3) { - for (i = 0; i < nlist - 2; i++) { - /* XXX Remove the "Edit " from list entries */ - memmove(list[i], list[i] + sizeof(Edit) - 1, - strlen(list[i]) - sizeof(Edit) + 2); - } - ClearScreen(); - refresh(); - i = DialogMenu("Remove card", - "Select which card to remove", - 13, 60, 4, nlist - 2, list, - " Remove ", " Cancel ", 0); - if (i < 0) { - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)devices); - return (-1); - } - device = devices[i]; - } - else - device = devices[0]; - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)devices); - xf86removeDevice(XF86Config, device); - return (0); - } - if (i < nlist - 2) - device = devices[i]; - } - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)devices); - - if (device == NULL) { - char label[32]; - - device = (XF86ConfDevicePtr)XtCalloc(1, sizeof(XF86ConfDeviceRec)); - device->dev_chipid = device->dev_chiprev = device->dev_irq = -1; - XmuSnprintf(label, sizeof(label), "Card%d", nlist ? nlist - 2 : 0); - ClearScreen(); - refresh(); - identifier = - DialogInput("Card identifier", - "Enter an identifier for your card definition:", - 11, 40, label, - " Next >>", " Cancel ", 0); - if (identifier == NULL) { - XtFree((XtPointer)device); - return (-1); - } - } - - ClearScreen(); - refresh(); - if (Dialog("Card configuration", - "Now we must configure video card specific settings. At this " - "point you can choose to make a selection out of a database of " - "video card definitions.\n" - "\n" - "The database entries include information about the chipset, " - "what driver to run, the Ramdac and ClockChip, and comments " - "that will be included in the Device section. However, a lot " - "of definitions only hint about what driver to run (based on " - "the chipset the card uses) and are untested.\n" - "\n" - "Do you want to look at the card database?", - 18, 60, " Yes ", " No ", device->dev_identifier != NULL) == 0) { - static char **cards; - static int ncards; - - if (cards == NULL) { - ReadCardsDatabase(); - cards = GetCardNames(&ncards); - cards = (char**)XtRealloc((XtPointer)cards, - (ncards + 1) * sizeof(char*)); - for (i = ncards; i > 0; i--) - cards[i] = cards[i - 1]; - cards[0] = "** Unlisted card **"; - ++ncards; - } - if (device->dev_card) - entry = LookupCard(device->dev_card); - def = 0; - if (entry) { - for (i = 0; i < NumCardsEntry; i++) - if (strcasecmp(CardsDB[i]->name, entry->name) == 0) { - def = i + 1; - break; - } - /* make sure entry is set to null again */ - entry = NULL; - } - - i = DialogMenu("Card database", - "Select name that better matches your card:", - 20, 70, 11, ncards, cards, "Next >>", " Cancel ", def); - if (i > 0) - entry = LookupCard(cards[i]); - } - - def = 0; - tmp = device->dev_driver ? device->dev_driver : entry && entry->driver ? - entry->driver : "vga"; - for (i = 0; i < ndrivers; i++) - if (strcmp(drivers[i], tmp) == 0) { - def = i; - break; - } - - ClearScreen(); - refresh(); - i = DialogMenu("Card driver", - "You can select the driver for your card here, or just press " - "Enter to use the default/current:", 20, 50, 9, - ndrivers, drivers, " Ok ", " Cancel ", def); - if (i < 0) { - if (device->dev_identifier == NULL) { - XtFree(identifier); - XtFree((XtPointer)device); - } - return (-1); - } - driver = ndrivers ? drivers[i] : "vga"; - - ClearScreen(); - refresh(); - tmp = device->dev_busid ? device->dev_busid : ""; - busid = DialogInput("Card BusID", - "You normally does not need to fill this field " - "if you have only one video card:", 11, 50, tmp, - " Finish ", " Cancel ", 0); - - /* Finish card configuration */ - if (entry) { - XtFree(device->dev_card); - device->dev_card = XtNewString(entry->name); - if (entry->chipset) { - XtFree(device->dev_chipset); - device->dev_chipset = XtNewString(entry->chipset); - } - if (entry->ramdac) { - XtFree(device->dev_ramdac); - device->dev_ramdac = XtNewString(entry->ramdac); - } - if (entry->clockchip) { - XtFree(entry->clockchip); - device->dev_clockchip = XtNewString(entry->clockchip); - } - } - if (busid) { - XtFree(device->dev_busid); - if (*busid) - device->dev_busid = busid; - else { - device->dev_busid = NULL; - XtFree(busid); - } - } - XtFree(device->dev_driver); - device->dev_driver = XtNewString(driver); - if (device->dev_identifier == NULL) { - device->dev_identifier = identifier; - XF86Config->conf_device_lst = - xf86addDevice(XF86Config->conf_device_lst, device); - } - - return (1); -} - -static char *depths[] = { - "1 bit, monochrome", - "4 bit, 16 colors", - "8 bit, 256 colors", - "15 bits, 32Kb colors", - "16 bits, 65Kb colors", - "24 bits, 16Mb colors", -}; - -static char *modes[] = { - "2048x1536", - "1920x1440", - "1800x1400", - "1600x1200", - "1400x1050", - "1280x1024", - "1280x960", - "1152x864", - "1024x768", - "800x600", - "640x480", - "640x400", - "512x384", - "400x300", - "320x240", - "320x200", -}; - -static int -ScreenConfig(void) -{ - int i, disp_allocated; - XF86ConfScreenPtr *screens = NULL, screen = XF86Config->conf_screen_lst; - char **list = NULL, *identifier = NULL; - int nlist, def; - XF86ConfDevicePtr device = NULL; - XF86ConfMonitorPtr monitor = NULL; - XF86ConfDisplayPtr display; - XF86ModePtr mode, ptr = NULL; - char *checks; - - nlist = 0; - while (screen) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 1) * sizeof(char*)); - list[nlist] = XtMalloc(sizeof(Edit) + - strlen(screen->scrn_identifier) + 1); - sprintf(list[nlist], "%s%s", Edit, screen->scrn_identifier); - screens = (XF86ConfScreenPtr*)XtRealloc((XtPointer)screens, (nlist + 1) * - sizeof(XF86ConfScreenPtr)); - screens[nlist] = screen; - ++nlist; - screen = (XF86ConfScreenPtr)(screen->list.next); - } - - screen = NULL; - - if (nlist) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 2) * sizeof(char*)); - list[nlist++] = XtNewString("Add new screen"); - if (nlist == 2) { - i = strlen("Remove ") + strlen(screens[0]->scrn_identifier) + 1; - list[nlist] = XtMalloc(i); - XmuSnprintf(list[nlist], i, "Remove %s", screens[0]->scrn_identifier); - ++nlist; - } - else - list[nlist++] = XtNewString("Remove screen"); - ClearScreen(); - refresh(); - i = DialogMenu("Screen configuration", - "You can edit or remove a previously configured " - "screen, or add a new one.", 14, 60, 4, nlist, list, - " Ok ", " Cancel ", 0); - if (i < 0) { - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)screens); - return (-1); - } - if (nlist > 2 && i == nlist - 1) { - if (nlist > 3) { - for (i = 0; i < nlist - 2; i++) { - /* XXX Remove the "Edit " from list entries */ - memmove(list[i], list[i] + sizeof(Edit) - 1, - strlen(list[i]) - sizeof(Edit) + 2); - } - ClearScreen(); - refresh(); - i = DialogMenu("Remove screen", - "Select which screen to remove", - 13, 60, 4, nlist - 2, list, - " Remove ", " Cancel ", 0); - if (i < 0) { - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)screens); - return (-1); - } - screen = screens[i]; - } - else - screen = screens[0]; - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)screens); - xf86removeScreen(XF86Config, screen); - return (0); - } - if (i < nlist - 2) - screen = screens[i]; - } - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)screens); - - if (screen == NULL) { - char label[256]; - XF86ConfDevicePtr *devices = NULL; - XF86ConfMonitorPtr *monitors = NULL; - - device = XF86Config->conf_device_lst; - monitor = XF86Config->conf_monitor_lst; - - if (device == NULL || monitor == NULL) { - ClearScreen(); - refresh(); - Dialog("Configuration error", - "You need to configure (at least) one card and one " - "monitor before creating a screen definition.", - 9, 50, " Ok ", NULL, 0); - - return (-1); - } - - XmuSnprintf(label, sizeof(label), "Screen%d", nlist ? nlist - 2 : 0); - ClearScreen(); - refresh(); - identifier = - DialogInput("Screen identifier", - "Enter an identifier for your screen definition:", - 11, 40, label, - " Next >>", " Cancel ", 0); - if (identifier == NULL) - return (-1); - - nlist = 0; - list = NULL; - while (device) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 1) * sizeof(char*)); - list[nlist] = XtNewString(device->dev_identifier); - devices = (XF86ConfDevicePtr*)XtRealloc((XtPointer)devices, (nlist + 1) * - sizeof(XF86ConfDevicePtr)); - devices[nlist] = device; - ++nlist; - device = (XF86ConfDevicePtr)(device->list.next); - } - ClearScreen(); - refresh(); - i = DialogMenu("Screen card", "Please select a video card:", - 13, 60, 4, nlist, list, " Next >>", " Cancel ", 0); - for (def = 0; def < nlist; def++) - XtFree(list[def]); - XtFree((XtPointer)list); - if (i < 0) { - XtFree(identifier); - XtFree((XtPointer)devices); - return (-1); - } - device = devices[i]; - XtFree((XtPointer)devices); - - nlist = 0; - list = NULL; - while (monitor) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 1) * sizeof(char*)); - list[nlist] = XtNewString(monitor->mon_identifier); - monitors = (XF86ConfMonitorPtr*)XtRealloc((XtPointer)monitors, (nlist + 1) * - sizeof(XF86ConfMonitorPtr)); - monitors[nlist] = monitor; - ++nlist; - monitor = (XF86ConfMonitorPtr)(monitor->list.next); - } - XmuSnprintf(label, sizeof(label), - "Select the monitor connected to \"%s\":", - device->dev_identifier); - ClearScreen(); - refresh(); - i = DialogMenu("Screen monitor", label, - 13, 60, 4, nlist, list, " Next >>", " Cancel ", 0); - for (def = 0; def < nlist; def++) - XtFree(list[def]); - XtFree((XtPointer)list); - if (i < 0) { - XtFree(identifier); - XtFree((XtPointer)monitors); - return (-1); - } - monitor = monitors[i]; - XtFree((XtPointer)monitors); - - screen = (XF86ConfScreenPtr)XtCalloc(1, sizeof(XF86ConfScreenRec)); - screen->scrn_device = device; - screen->scrn_monitor = monitor; - } - - if (screen->scrn_defaultdepth == 1) - def = 0; - else if (screen->scrn_defaultdepth == 4) - def = 1; - else if (screen->scrn_defaultdepth == 8) - def = 2; - else if (screen->scrn_defaultdepth == 15) - def = 3; - else if (screen->scrn_defaultdepth == 16) - def = 4; - else if (screen->scrn_defaultdepth == 24) - def = 5; - else { - if (screen->scrn_device && screen->scrn_device->dev_driver && - strcmp(screen->scrn_device->dev_driver, "vga") == 0) - def = 1; /* 4bpp */ - else - def = 2; /* 8bpp */ - } - ClearScreen(); - refresh(); - i = DialogMenu("Screen depth", - "Please specify which color depth you want to use by default:", - 15, 60, 6, sizeof(depths) / sizeof(depths[0]), depths, - " Next >>", " Cancel ", def); - if (i < 0) { - if (screen->scrn_identifier == NULL) { - XtFree(identifier); - XtFree((XtPointer)screen); - } - return (-1); - } - else - /* XXX depths must begin with the depth number */ - screen->scrn_defaultdepth = atoi(depths[i]); - - def = 0; /* use def to count how many modes are selected*/ - nlist = 0; - list = NULL; - checks = XtMalloc(sizeof(modes) / sizeof(modes[0])); - /* XXX list fields in the code below are not allocated */ - disp_allocated = 0; - display = screen->scrn_display_lst; - while (display && display->disp_depth != screen->scrn_defaultdepth) - display = (XF86ConfDisplayPtr)(display->list.next); - if (display == NULL) { - display = (XF86ConfDisplayPtr)XtCalloc(1, sizeof(XF86ConfDisplayRec)); - display->disp_white.red = display->disp_black.red = -1; - display->disp_depth = screen->scrn_defaultdepth; - disp_allocated = 1; - } - else { - mode = display->disp_mode_lst; - while (mode) { - for (i = 0; i < sizeof(modes) / sizeof(modes[0]); i++) - if (strcmp(modes[i], mode->mode_name) == 0) { - break; - } - - if (i == sizeof(modes) / sizeof(modes[0])) { - list = (char**)XtRealloc((XtPointer)list, - (nlist + 1) * sizeof(char*)); - list[nlist] = mode->mode_name; - checks = XtRealloc(checks, sizeof(modes) / sizeof(modes[0]) + - nlist + 1); - checks[nlist] = 1; - ++def; - nlist++; - break; - } - mode = (XF86ModePtr)(mode->list.next); - } - } - - for (i = 0; i < sizeof(modes) / sizeof(modes[0]); i++) - checks[i + nlist] = 0; - - mode = display->disp_mode_lst; - while (mode) { - for (i = 0; i < sizeof(modes) / sizeof(modes[0]); i++) - if (strcmp(modes[i], mode->mode_name) == 0) { - ++def; - checks[i + nlist] = 1; - break; - } - mode = (XF86ModePtr)(mode->list.next); - } - - if (nlist == 0 && def == 0) - checks[7] = 1; /* 640x480 */ - list = (char**)XtRealloc((XtPointer)list, (nlist + sizeof(modes) / - sizeof(modes[0])) * sizeof(char*)); - for (i = 0; i < sizeof(modes) / sizeof(modes[0]); i++) - list[i + nlist] = modes[i]; - nlist += sizeof(modes) / sizeof(modes[0]); - - ClearScreen(); - refresh(); - i = DialogCheckBox("Screen modes", - "Select the video modes for this screen:", - 17, 60, 8, sizeof(modes) / sizeof(modes[0]), modes, - " Finish ", " Cancel ", checks); - if (i < 0) { - if (screen->scrn_identifier == NULL) { - XtFree(identifier); - XtFree((XtPointer)screen); - XtFree((XtPointer)list); - if (disp_allocated) - XtFree((XtPointer)display); - } - return (-1); - } - - mode = display->disp_mode_lst; - while (mode) { - ptr = (XF86ModePtr)(mode->list.next); - XtFree(mode->mode_name); - XtFree((XtPointer)mode); - mode = ptr; - } - display->disp_mode_lst = NULL; - - for (i = 0; i < nlist; i++) { - if (checks[i]) { - mode = (XF86ModePtr)XtCalloc(1, sizeof(XF86ModeRec)); - mode->mode_name = XtNewString(list[i]); - if (display->disp_mode_lst == NULL) - display->disp_mode_lst = ptr = mode; - else { - ptr->list.next = mode; - ptr = mode; - } - } - } - XtFree((XtPointer)list); - - if (disp_allocated) { - display->list.next = NULL; - if (screen->scrn_display_lst == NULL) - screen->scrn_display_lst = display; - else - screen->scrn_display_lst->list.next = display; - } - - if (screen->scrn_identifier == NULL) { - screen->scrn_identifier = identifier; - screen->scrn_monitor_str = XtNewString(monitor->mon_identifier); - screen->scrn_device_str = XtNewString(device->dev_identifier); - XF86Config->conf_screen_lst = - xf86addScreen(XF86Config->conf_screen_lst, screen); - } - - return (1); -} - -static XF86ConfAdjacencyPtr -CopyAdjacency(XF86ConfAdjacencyPtr ptr) -{ - XF86ConfAdjacencyPtr adj = (XF86ConfAdjacencyPtr) - XtCalloc(1, sizeof(XF86ConfAdjacencyRec)); - - adj->adj_scrnum = ptr->adj_scrnum; - adj->adj_screen = ptr->adj_screen; - adj->adj_screen_str = XtNewString(ptr->adj_screen_str); - adj->adj_top = ptr->adj_top; - if (ptr->adj_top_str) - adj->adj_top_str = XtNewString(ptr->adj_top_str); - adj->adj_bottom = ptr->adj_bottom; - if (ptr->adj_bottom_str) - adj->adj_bottom_str = XtNewString(ptr->adj_bottom_str); - adj->adj_left = ptr->adj_left; - if (ptr->adj_left_str) - adj->adj_left_str = XtNewString(ptr->adj_left_str); - adj->adj_right = ptr->adj_right; - if (ptr->adj_right_str) - adj->adj_right_str = XtNewString(ptr->adj_right_str); - adj->adj_where = ptr->adj_where; - adj->adj_x = ptr->adj_x; - adj->adj_y = ptr->adj_y; - if (ptr->adj_refscreen) - adj->adj_refscreen = XtNewString(ptr->adj_refscreen); - - return (adj); -} - -static XF86ConfInactivePtr -CopyInactive(XF86ConfInactivePtr ptr) -{ - XF86ConfInactivePtr inac = (XF86ConfInactivePtr) - XtCalloc(1, sizeof(XF86ConfInactiveRec)); - - inac->inactive_device = ptr->inactive_device; - if (ptr->inactive_device_str) - inac->inactive_device_str = XtNewString(ptr->inactive_device_str); - - return (inac); -} - -static XF86ConfInputrefPtr -CopyInputref(XF86ConfInputrefPtr ptr) -{ - XF86ConfInputrefPtr iref = (XF86ConfInputrefPtr) - XtCalloc(1, sizeof(XF86ConfInputrefRec)); - XF86OptionPtr opt = ptr->iref_option_lst; - - iref->iref_inputdev = ptr->iref_inputdev; - if (ptr->iref_inputdev_str) - iref->iref_inputdev_str = XtNewString(ptr->iref_inputdev_str); - while (opt) { - iref->iref_option_lst = xf86addNewOption(iref->iref_option_lst, - XtNewString(opt->opt_name), - opt->opt_val ? XtNewString(opt->opt_val) : NULL); - opt = (XF86OptionPtr)(opt->list.next); - } - - return (iref); -} - -static XF86ConfLayoutPtr -CopyLayout(XF86ConfLayoutPtr ptr) -{ - XF86ConfLayoutPtr lay = (XF86ConfLayoutPtr) - XtCalloc(1, sizeof(XF86ConfLayoutRec)); - XF86ConfAdjacencyPtr adj = ptr->lay_adjacency_lst, padj; - XF86ConfInactivePtr inac = ptr->lay_inactive_lst, pinac; - XF86ConfInputrefPtr iref = ptr->lay_input_lst, piref; - XF86OptionPtr opt = ptr->lay_option_lst; - - if (ptr->lay_identifier) - lay->lay_identifier = XtNewString(ptr->lay_identifier); - if (adj) { - padj = lay->lay_adjacency_lst = CopyAdjacency(adj); - adj = (XF86ConfAdjacencyPtr)(adj->list.next); - while (adj) { - padj->list.next = CopyAdjacency(adj); - padj = (XF86ConfAdjacencyPtr)(padj->list.next); - adj = (XF86ConfAdjacencyPtr)(adj->list.next); - } - } - if (inac) { - pinac = lay->lay_inactive_lst = CopyInactive(inac); - inac = (XF86ConfInactivePtr)(inac->list.next); - while (inac) { - pinac->list.next = CopyInactive(inac); - pinac = (XF86ConfInactivePtr)(pinac->list.next); - inac = (XF86ConfInactivePtr)(inac->list.next); - } - } - if (iref) { - piref = lay->lay_input_lst = CopyInputref(iref); - iref = (XF86ConfInputrefPtr)(iref->list.next); - while (iref) { - piref->list.next = CopyInputref(iref); - piref = (XF86ConfInputrefPtr)(piref->list.next); - iref = (XF86ConfInputrefPtr)(iref->list.next); - } - } - - while (opt) { - lay->lay_option_lst = xf86addNewOption(lay->lay_option_lst, - XtNewString(opt->opt_name), - opt->opt_val ? XtNewString(opt->opt_val) : NULL); - opt = (XF86OptionPtr)(opt->list.next); - } - - return (lay); -} - -static void -FreeLayout(XF86ConfLayoutPtr lay) -{ - static XF86ConfigRec xf86config; - - xf86config.conf_layout_lst = lay; - xf86removeLayout(&xf86config, lay); -} - -static int -LayoutConfig(void) -{ - int i; - XF86ConfLayoutPtr *layouts = NULL, rlayout = NULL, - layout = XF86Config->conf_layout_lst; - XF86ConfInputPtr input = XF86Config->conf_input_lst; - char **list = NULL, *identifier = NULL; - XF86ConfInputPtr *mouses = NULL, *keyboards = NULL, mouse, keyboard; - XF86ConfInputrefPtr iref, piref, mref, kref; - XF86ConfAdjacencyPtr adj, padj; - int nmouses, nkeyboards; - int nlist; - XF86OptionPtr option; - XF86ConfScreenPtr screen, *screens; - - nmouses = nkeyboards = 0; - while (input) { - if (strcmp(input->inp_driver, "mouse") == 0) { - mouses = (XF86ConfInputPtr*)XtRealloc((XtPointer)mouses, - (nmouses + 1) * sizeof(XF86ConfInputPtr)); - mouses[nmouses] = input; - ++nmouses; - } - else if (IS_KBDDRIV(input->inp_driver)) { - keyboards = (XF86ConfInputPtr*)XtRealloc((XtPointer)keyboards, - (nkeyboards + 1) * sizeof(XF86ConfInputPtr)); - keyboards[nkeyboards] = input; - ++nkeyboards; - } - input = (XF86ConfInputPtr)(input->list.next); - } - if (XF86Config->conf_screen_lst == NULL || - nmouses == 0 || nkeyboards == 0) { - XtFree((XtPointer)mouses); - XtFree((XtPointer)keyboards); - ClearScreen(); - refresh(); - Dialog("Configuration error", - "You need to configure (at least) one screen, mouse " - "and keyboard before creating a layout definition.", - 9, 50, " Ok ", NULL, 0); - return (-1); - } - - nlist = 0; - while (layout) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 1) * sizeof(char*)); - list[nlist] = XtMalloc(sizeof(Edit) + - strlen(layout->lay_identifier) + 1); - sprintf(list[nlist], "%s%s", Edit, layout->lay_identifier); - layouts = (XF86ConfLayoutPtr*)XtRealloc((XtPointer)layouts, (nlist + 1) * - sizeof(XF86ConfLayoutPtr)); - layouts[nlist] = layout; - ++nlist; - layout = (XF86ConfLayoutPtr)(layout->list.next); - } - - layout = NULL; - - if (nlist) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 2) * sizeof(char*)); - list[nlist++] = XtNewString("Add new layout"); - if (nlist == 2) { - i = strlen("Remove ") + strlen(layouts[0]->lay_identifier) + 1; - list[nlist] = XtMalloc(i); - XmuSnprintf(list[nlist], i, "Remove %s", layouts[0]->lay_identifier); - ++nlist; - } - else - list[nlist++] = XtNewString("Remove layout"); - ClearScreen(); - refresh(); - i = DialogMenu("Layout configuration", - "You can edit or remove a previously configured " - "layout, or add a new one.", 14, 60, 4, nlist, list, - " Ok ", " Cancel ", 0); - if (i < 0) { - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)layouts); - XtFree((XtPointer)mouses); - XtFree((XtPointer)keyboards); - return (-1); - } - if (nlist > 2 && i == nlist - 1) { - if (nlist > 3) { - for (i = 0; i < nlist - 2; i++) { - /* XXX Remove the "Edit " from list entries */ - memmove(list[i], list[i] + sizeof(Edit) - 1, - strlen(list[i]) - sizeof(Edit) + 2); - } - ClearScreen(); - refresh(); - i = DialogMenu("Remove layout", - "Select which layout to remove", - 13, 60, 4, nlist - 2, list, - " Remove ", " Cancel ", 0); - if (i < 0) { - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)layouts); - XtFree((XtPointer)mouses); - XtFree((XtPointer)keyboards); - return (-1); - } - layout = layouts[i]; - } - else - layout = layouts[0]; - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)layouts); - XtFree((XtPointer)mouses); - XtFree((XtPointer)keyboards); - xf86removeLayout(XF86Config, layout); - return (0); - } - if (i < nlist - 2) - layout = layouts[i]; - } - for (i = 0; i < nlist; i++) - XtFree(list[i]); - XtFree((XtPointer)list); - XtFree((XtPointer)layouts); - - if (layout == NULL) { - char label[32]; - - layout = (XF86ConfLayoutPtr)XtCalloc(1, sizeof(XF86ConfLayoutRec)); - XmuSnprintf(label, sizeof(label), "Layout%d", nlist ? nlist - 2 : 0); - ClearScreen(); - refresh(); - identifier = - DialogInput("Layout identifier", - "Enter an identifier for your layout definition:", - 11, 40, label, - " Next >>", " Cancel ", 0); - if (identifier == NULL) { - XtFree((XtPointer)layout); - XtFree((XtPointer)mouses); - XtFree((XtPointer)keyboards); - return (-1); - } - } - else { - /* So that we can safely change it */ - rlayout = layout; - layout = CopyLayout(rlayout); - } - - - mouse = keyboard = NULL; - - /* Mouse */ - piref = NULL; - iref = layout->lay_input_lst; - while (iref) { - if (strcmp(iref->iref_inputdev->inp_driver, "mouse") == 0) { - if (mouse == NULL) - piref = iref; - if (xf86findOption(iref->iref_option_lst, "CorePointer")) { - mouse = iref->iref_inputdev; - piref = iref; - break; - } - } - iref = (XF86ConfInputrefPtr)(iref->list.next); - } - if (mouse == NULL) { - if (piref) { - mref = piref; - mouse = piref->iref_inputdev; - piref->iref_option_lst = - xf86addNewOption(piref->iref_option_lst, - XtNewString("CorePointer"), NULL); - } - else { - mouse = mouses[0]; - mref = iref = (XF86ConfInputrefPtr)XtCalloc(1, sizeof(XF86ConfInputrefRec)); - iref->iref_inputdev_str = XtNewString(mouse->inp_identifier); - iref->iref_inputdev = mouse; - iref->iref_option_lst = - xf86addNewOption(iref->iref_option_lst, - XtNewString("CorePointer"), NULL); - iref->list.next = layout->lay_input_lst; - if (layout->lay_input_lst == NULL) - layout->lay_input_lst = iref; - else { - iref->list.next = layout->lay_input_lst; - layout->lay_input_lst = iref; - } - } - } - else - mref = piref; - - /* XXX list fields are not allocated */ - if (nmouses > 1) { - nlist = 0; - list = (char**)XtMalloc(sizeof(char*)); - list[nlist++] = mouse->inp_identifier; - input = XF86Config->conf_input_lst; - while (input) { - if (input != mouse && strcmp(input->inp_driver, "mouse") == 0) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 1) * sizeof(char*)); - list[nlist++] = input->inp_identifier; - } - input = (XF86ConfInputPtr)(input->list.next); - } - ClearScreen(); - refresh(); - i = DialogMenu("Select Core Pointer", - "Select the mouse connected to you computer", - 12, 60, 4, nlist, list, " Ok ", " Cancel ", 0); - if (i < 0) { - XtFree((XtPointer)mouses); - XtFree((XtPointer)keyboards); - XtFree((XtPointer)list); - if (layout->lay_identifier == NULL) - XtFree(identifier); - FreeLayout(layout); - return (-1); - } - if (i > 0) { - /* Did not select the default one */ - iref = layout->lay_input_lst; - while (iref) { - if (strcasecmp(iref->iref_inputdev_str, list[i]) == 0) { - if ((option = xf86findOption(iref->iref_option_lst, - "SendCoreEvents")) != NULL) { - XtFree(option->opt_name); - option->opt_name = XtNewString("CorePointer"); - } - else - iref->iref_option_lst = - xf86addNewOption(iref->iref_option_lst, - XtNewString("CorePointer"), NULL); - option = xf86findOption(mref->iref_option_lst, - "CorePointer"); - XtFree(option->opt_name); - option->opt_name = XtNewString("SendCoreEvents"); - break; - } - iref = (XF86ConfInputrefPtr)(iref->list.next); - } - } - - /* XXX Write code to add/remove more mouses here */ - } - - - /* Keyboard */ - piref = NULL; - iref = layout->lay_input_lst; - while (iref) { - if (IS_KBDDRIV(iref->iref_inputdev->inp_driver)) { - if (keyboard == NULL) - piref = iref; - if (xf86findOption(iref->iref_option_lst, "CoreKeyboard")) { - keyboard = iref->iref_inputdev; - piref = iref; - break; - } - } - iref = (XF86ConfInputrefPtr)(iref->list.next); - } - if (keyboard == NULL) { - if (piref) { - kref = piref; - keyboard = piref->iref_inputdev; - piref->iref_option_lst = - xf86addNewOption(piref->iref_option_lst, - XtNewString("CoreKeyboard"), NULL); - } - else { - keyboard = keyboards[0]; - kref = iref = (XF86ConfInputrefPtr)XtCalloc(1, sizeof(XF86ConfInputrefRec)); - iref->iref_inputdev_str = XtNewString(keyboard->inp_identifier); - iref->iref_inputdev = keyboard; - iref->iref_option_lst = - xf86addNewOption(iref->iref_option_lst, - XtNewString("CoreKeyboard"), NULL); - iref->list.next = layout->lay_input_lst; - if (layout->lay_input_lst == NULL) - layout->lay_input_lst = iref; - else { - iref->list.next = layout->lay_input_lst; - layout->lay_input_lst = iref; - } - } - } - else - kref = piref; - - /* XXX list fields are not allocated */ - if (nkeyboards > 1) { - nlist = 0; - list = (char**)XtMalloc(sizeof(char*)); - list[nlist++] = keyboard->inp_identifier; - input = XF86Config->conf_input_lst; - while (input) { - if (input != keyboard && IS_KBDDRIV(input->inp_driver)) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 1) * sizeof(char*)); - list[nlist++] = input->inp_identifier; - } - input = (XF86ConfInputPtr)(input->list.next); - } - ClearScreen(); - refresh(); - i = DialogMenu("Select Core Keyboard", - "Select the keyboard connected to you computer", - 12, 60, 4, nlist, list, " Ok ", " Cancel ", 0); - if (i < 0) { - XtFree((XtPointer)mouses); - XtFree((XtPointer)keyboards); - XtFree((XtPointer)list); - if (layout->lay_identifier == NULL) - XtFree(identifier); - FreeLayout(layout); - return (-1); - } - if (i > 0) { - /* Did not select the default one */ - iref = layout->lay_input_lst; - while (iref) { - if (strcasecmp(iref->iref_inputdev_str, list[i]) == 0) { - if ((option = xf86findOption(iref->iref_option_lst, - "SendCoreEvents")) != NULL) { - XtFree(option->opt_name); - option->opt_name = XtNewString("CoreKeyboard"); - } - else - iref->iref_option_lst = - xf86addNewOption(iref->iref_option_lst, - XtNewString("CoreKeyboard"), NULL); - option = xf86findOption(kref->iref_option_lst, - "CoreKeyboard"); - XtFree(option->opt_name); - option->opt_name = XtNewString("SendCoreEvents"); - break; - } - iref = (XF86ConfInputrefPtr)(iref->list.next); - } - } - - /* XXX Write code to add/remove more keyboards here */ - } - - XtFree((XtPointer)mouses); - XtFree((XtPointer)keyboards); - - /* Just one screen */ - if (XF86Config->conf_screen_lst->list.next == NULL) { - ClearScreen(); - refresh(); - Dialog("Layout configuration", - (nmouses > 1 || nkeyboards > 1) ? - "As you have only one screen configured, I can now finish " - "creating this Layout configuration." - : - "As you have only one screen, mouse and keyboard configured, " - "I can now finish creating this Layout configuration.", - 12, 60, " Finish ", NULL, 0); - - goto LayoutFinish; - } - - - /* The code below just adds a screen to the right of the last - * one, or allows removing a screen. - * Needs some review, and adding more options. - */ - - /*CONSTCOND*/ - while (1) { - static char *screen_opts[] = { - "Add a new screen to layout", - "Remove screen from layout", - "Finish layout configuration", - }; - - ClearScreen(); - refresh(); - i = DialogMenu("Layout configuration", "Please choose one option:", - 12, 60, 3, sizeof(screen_opts) / sizeof(screen_opts[0]), - screen_opts, " Done ", " Cancel all changes ", 2); - - /* cancel */ - if (i < 0) { - XtFree(identifier); - FreeLayout(layout); - return (-1); - } - - /* add new screen */ - else if (i == 0) { - nlist = 0; - list = NULL; - screens = NULL; - screen = XF86Config->conf_screen_lst; - while (screen) { - adj = layout->lay_adjacency_lst; - while (adj) { - if (adj->adj_screen == screen) - break; - adj = (XF86ConfAdjacencyPtr)(adj->list.next); - } - if (adj == NULL) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 1) * sizeof(char*)); - screens = (XF86ConfScreenPtr*)XtRealloc((XtPointer)screens, - (nlist + 1) * sizeof(XF86ConfScreenPtr)); - /* NOT duplicated */ - list[nlist] = screen->scrn_identifier; - screens[nlist] = screen; - ++nlist; - } - screen = (XF86ConfScreenPtr)(screen->list.next); - } - - if (nlist == 0) - continue; - - ClearScreen(); - refresh(); - i = DialogMenu("Layout add screen", "Choose screen to add:", - 12, 60, 3, nlist, list, - " Add ", " Cancel ", 0); - if (i >= 0) { - padj = layout->lay_adjacency_lst; - adj = (XF86ConfAdjacencyPtr) - XtCalloc(1, sizeof(XF86ConfAdjacencyRec)); - adj->adj_screen = screens[i]; - if (padj == NULL) { - adj->adj_where = CONF_ADJ_ABSOLUTE; - layout->lay_adjacency_lst = adj; - } - else { - while (padj->list.next) - padj = (XF86ConfAdjacencyPtr)(padj->list.next); - padj->list.next = adj; - adj->adj_where = CONF_ADJ_RIGHTOF; - adj->adj_refscreen = - XtNewString(padj->adj_screen->scrn_identifier); - } - } - XtFree((XtPointer)list); - XtFree((XtPointer)screens); - } - - /* remove a screen */ - else if (i == 1) { - nlist = 0; - list = NULL; - screens = NULL; - adj = layout->lay_adjacency_lst; - - while (adj) { - list = (char**)XtRealloc((XtPointer)list, (nlist + 1) * sizeof(char*)); - screens = (XF86ConfScreenPtr*)XtRealloc((XtPointer)screens, - (nlist + 1) * sizeof(XF86ConfScreenPtr)); - list[nlist] = adj->adj_screen->scrn_identifier; - screens[nlist] = adj->adj_screen; - ++nlist; - adj = (XF86ConfAdjacencyPtr)(adj->list.next); - } - - if (nlist == 0) - continue; - - ClearScreen(); - refresh(); - i = DialogMenu("Layout remove screen", "Choose screen to remove:", - 12, 60, 3, nlist, list, - " Remove ", " Cancel ", 0); - - adj = padj = layout->lay_adjacency_lst; - while (adj) { - if (adj->adj_screen == screens[i]) { - padj = (XF86ConfAdjacencyPtr)(padj->list.next); - if (padj && adj->adj_where == CONF_ADJ_RIGHTOF && - padj->adj_where == CONF_ADJ_RIGHTOF) { - XtFree(padj->adj_refscreen); - padj->adj_refscreen = XtNewString(adj->adj_refscreen); - } - xf86removeAdjacency(layout, adj); - break; - } - padj = adj; - adj = (XF86ConfAdjacencyPtr)(padj->list.next); - } - XtFree((XtPointer)list); - XtFree((XtPointer)screens); - } - - /* finish screen configuration */ - else - break; - } - -LayoutFinish: - if (layout->lay_adjacency_lst == NULL) { - adj = (XF86ConfAdjacencyPtr)XtCalloc(1, sizeof(XF86ConfAdjacencyRec)); - adj->adj_screen = XF86Config->conf_screen_lst; - adj->adj_screen_str = XtNewString(XF86Config->conf_screen_lst->scrn_identifier); - adj->adj_where = CONF_ADJ_ABSOLUTE; - layout->lay_adjacency_lst = adj; - } - if (rlayout) { - /* just edited this layout */ - if (nmouses > 1 || nkeyboards > 1) { - XF86ConfAdjacencyPtr tadj = rlayout->lay_adjacency_lst; - XF86ConfInactivePtr tinac = rlayout->lay_inactive_lst; - XF86ConfInputrefPtr tinp = rlayout->lay_input_lst; - - rlayout->lay_adjacency_lst = layout->lay_adjacency_lst; - rlayout->lay_inactive_lst = layout->lay_inactive_lst; - rlayout->lay_input_lst = layout->lay_input_lst; - - layout->lay_adjacency_lst = tadj; - layout->lay_inactive_lst = tinac; - layout->lay_input_lst = tinp; - FreeLayout(layout); - } - return (0); - } - else { - layout->lay_identifier = identifier; - XF86Config->conf_layout_lst = - xf86addLayout(XF86Config->conf_layout_lst, layout); - } - - return (1); -} - -static void -ClearScreen(void) -{ - int i, j; - - wattrset(stdscr, screen_attr); - for (i = 0; i < LINES; i++) { - wmove(stdscr, i, 0); - for (j = 0; j < COLS; j++) - waddch(stdscr, ACS_PLUS); - } - touchwin(stdscr); -} - -static int -Dialog(char *title, char * prompt, int height, int width, - char *label1, char *label2, int button) -{ - int x, x1, x2, y, key, l1len, l2len; - WINDOW *dialog; - - x = (COLS - width) / 2; - y = (LINES - height) / 2; - - dialog = newwin(height, width, y, x); - keypad(dialog, TRUE); - - PaintWindow(dialog, title, 0, 0, height, width); - wattrset(dialog, dialog_attr); - PrintWrap(dialog, prompt, width - 3, 2, 3); - - l1len = strlen(label1); - if (label2) - l2len = strlen(label2); - else { - l2len = button = 0; - } - - x1 = (width - (l1len + l2len)) / (label2 ? 3 : 2); - x2 = x1 + x1 + l1len; - y = height - 3; - if (!button) { - if (label2) - PaintButton(dialog, label2, y, x2, FALSE); - PaintButton(dialog, label1, y, x1, TRUE); - } - else { - PaintButton(dialog, label1, y, x1, FALSE); - if (label2) - PaintButton(dialog, label2, y, x2, TRUE); - } - wrefresh(dialog); - - /*CONSTCOND*/ - while (1) { - key = wgetch(dialog); - switch (key) { - case KEY_LEFT: - case KEY_RIGHT: - if (!button) { - if (label2) { - button = 1; - PaintButton(dialog, label1, y, x1, FALSE); - PaintButton(dialog, label2, y, x2, TRUE); - } - - } - else { - if (label2) { - button = 0; - PaintButton(dialog, label2, y, x2, FALSE); - PaintButton(dialog, label1, y, x1, TRUE); - } - } - wrefresh(dialog); - break; - case ' ': - case '\r': - case '\n': - delwin(dialog); - return button; - } - } - /*NOTREACHED*/ -} - -static void -PaintWindow(WINDOW *win, char *title_str, int y, int x, int height, int width) -{ - int i, j; - - if (title_str != NULL) { - j = (width - strlen(title_str)) / 2 - 1; - - wattrset(win, title_attr); - wmove(win, x, y); - for (i = 0; i < j; i++) - waddch(win, ' '); - waddstr(win, title_str); - for (; i < width; i++) - waddch(win, ' '); - } - - wattrset(win, 0); - - for (i = 1; i < height; i++) { - wmove(win, y + i, x); - for (j = 0; j < width; j++) - if (i == height - 1 && !j) - waddch(win, highlight_border_attr | ACS_LLCORNER); - else if (i == height - 1 && j == width - 1) - waddch(win, shadow_border_attr | ACS_LRCORNER); - else if (i == height - 1) - waddch(win, shadow_border_attr | ACS_HLINE); - else if (!j) - waddch(win, highlight_border_attr | ACS_VLINE); - else if (j == width - 1) - waddch(win, shadow_border_attr | ACS_VLINE); - else - waddch(win, dialog_attr | ' '); - } - -} - -static void -PaintBox(WINDOW *win, int y, int x, int height, int width) -{ - int i, j; - - wattrset(win, 0); - - for (i = 0; i < height; i++) { - wmove(win, y + i, x); - for (j = 0; j < width; j++) - if (!i && !j) - waddch(win, shadow_border_attr | ACS_ULCORNER); - else if (i == height - 1 && !j) - waddch(win, shadow_border_attr | ACS_LLCORNER); - else if (!i && j == width-1) - waddch(win, highlight_border_attr | ACS_URCORNER); - else if (i == height - 1 && j == width - 1) - waddch(win, highlight_border_attr | ACS_LRCORNER); - else if (!i) - waddch(win, shadow_border_attr | ACS_HLINE); - else if (i == height - 1) - waddch(win, highlight_border_attr | ACS_HLINE); - else if (!j) - waddch(win, shadow_border_attr | ACS_VLINE); - else if (j == width - 1) - waddch(win, highlight_border_attr | ACS_VLINE); - else - waddch(win, dialog_attr | ' '); - } - -} - -static void -PaintButton(WINDOW *win, char *label, int y, int x, int selected) -{ - int i, temp; - - wmove(win, y, x); - wattrset(win, selected ? button_active_attr : button_inactive_attr); - waddstr(win, selected ? "[" : " "); - temp = strspn(label, " "); - label += temp; - wattrset(win, selected ? button_active_attr : button_inactive_attr); - for (i = 0; i < temp; i++) - waddch(win, ' '); - wattrset(win, selected ? button_active_attr : button_inactive_attr); - waddch(win, label[0]); - wattrset(win, selected ? button_active_attr : button_inactive_attr); - waddstr(win, label + 1); - wattrset(win, selected ? button_active_attr : button_inactive_attr); - waddstr(win, selected ? "]" : " "); - wmove(win, y, x + temp + 1); -} - -static void -PrintWrap(WINDOW *win, char *prompt, int width, int y, int x) -{ - int cur_x, cur_y, len, yinc; - char *word, *tempstr = XtMalloc(strlen(prompt) + 1); - - cur_x = x; - cur_y = y; - - while (*prompt == '\n') { - ++cur_y; - ++prompt; - } - - strcpy(tempstr, prompt); - - for (word = strtok(tempstr, " \n"); word != NULL; word = strtok(NULL, " \n")) { - yinc = 0; - len = strlen(word); - while (prompt[word - tempstr + len + yinc] == '\n') - ++yinc; - if (cur_x + strlen(word) > width) { - cur_y++; - cur_x = x; - } - wmove(win, cur_y, cur_x); - waddstr(win, word); - getyx(win, cur_y, cur_x); - if (yinc) { - cur_y += yinc; - cur_x = x; - } - else - cur_x++; - } - - free(tempstr); -} - -static int -DialogMenu(char *title, char *prompt, int height, int width, int menu_height, - int item_no, char **items, char *label1, char *label2, int choice) -{ - int i, x, y, cur_x, cur_y, box_x, box_y, key = 0, button = 0, - scrlx = 0, max_choice, nscroll, max_scroll, x1, x2, l1len, l2len; - WINDOW *dialog, *menu; - - max_choice = MIN(menu_height, item_no); - max_scroll = MAX(0, item_no - max_choice); - - x = (COLS - width) / 2; - y = (LINES - height) / 2; - - dialog = newwin(height, width, y, x); - keypad(dialog, TRUE); - - PaintWindow(dialog, title, 0, 0, height, width); - - wattrset(dialog, dialog_attr); - PrintWrap(dialog, prompt, width - 3, 2, 3); - - l1len = strlen(label1); - l2len = strlen(label2); - - x1 = (width - (l1len + l2len)) / 3; - x2 = x1 + x1 + l1len; - - menu_width = width - 6; - getyx(dialog, cur_y, cur_x); - box_y = cur_y + 1; - box_x = (width - menu_width) / 2 - 1; - - menu = subwin(dialog, menu_height, menu_width, y + box_y + 1, x + box_x + 1); - keypad(menu, TRUE); - - /* draw a box around the menu items */ - PaintBox(dialog, box_y, box_x, menu_height + 2, menu_width + 2); - - item_x = 3; - - if (choice > menu_height) { - scrlx = MIN(max_scroll, choice); - choice -= scrlx; - } - - for (i = 0; i < max_choice; i++) - PaintItem(menu, items[i + scrlx], i, i == choice); - PaintScroller(menu, scrlx + choice, item_no, menu_height); - wnoutrefresh(menu); - - x = width / 2 - 11; - y = height - 3; - PaintButton(dialog, label2, y, x2, FALSE); - PaintButton(dialog, label1, y, x1, TRUE); - wrefresh(dialog); - - /*CONSTCOND*/ - while (1) { - i = choice; - key = wgetch(dialog); - - if (menu_height > 1 && key == KEY_PPAGE) { - if (!choice) { - if (scrlx) { - /* Scroll menu down */ - getyx(dialog, cur_y, cur_x); - - nscroll = max_choice > scrlx ? -scrlx : -max_choice; - scrollok(menu, TRUE); - wscrl(menu, nscroll); - scrollok(menu, FALSE); - - PaintItem(menu, items[i = scrlx + nscroll], 0, TRUE); - for (++i; i <= scrlx; i++) - PaintItem(menu, items[i], i - (scrlx + nscroll), FALSE); - scrlx += nscroll; - PaintScroller(menu, scrlx + choice, item_no, menu_height); - wnoutrefresh(menu); - wrefresh(dialog); - continue; - } - } - i = 0; - } - else if (menu_height > 1 && key == KEY_NPAGE) { - if (choice == max_choice - 1) { - if (scrlx < max_scroll) { - /* Scroll menu up */ - getyx(dialog, cur_y, cur_x); - - nscroll = (scrlx + max_choice > max_scroll ? - max_scroll : scrlx + max_choice) - scrlx; - scrollok(menu, TRUE); - wscrl(menu, nscroll); - scrollok(menu, FALSE); - - scrlx += nscroll; - for (i = 0; i < max_choice - 1; i++) - PaintItem(menu, items[i + scrlx], i, FALSE); - PaintItem(menu, items[i + scrlx], max_choice - 1, TRUE); - PaintScroller(menu, scrlx + choice, item_no, menu_height); - wnoutrefresh(menu); - wrefresh(dialog); - continue; - } - } - i = max_choice - 1; - } - else if (key == KEY_UP) { - if (!choice) { - if (scrlx) { - /* Scroll menu down */ - getyx(dialog, cur_y, cur_x); - if (menu_height > 1) { - PaintItem(menu, items[scrlx], 0, FALSE); - scrollok(menu, TRUE); - wscrl(menu, - 1); - scrollok(menu, FALSE); - } - scrlx--; - PaintItem(menu, items[scrlx], 0, TRUE); - PaintScroller(menu, scrlx + choice, item_no, menu_height); - wnoutrefresh(menu); - wrefresh(dialog); - continue; - } - } - else - i = choice - 1; - } - else if (key == KEY_DOWN) { - if (choice == max_choice - 1) { - if (scrlx + choice < item_no - 1) { - /* Scroll menu up */ - getyx(dialog, cur_y, cur_x); - if (menu_height > 1) { - PaintItem(menu, items[scrlx + max_choice - 1], max_choice - 1, FALSE); - scrollok(menu, TRUE); - scroll(menu); - scrollok(menu, FALSE); - } - scrlx++; - PaintItem(menu, items[scrlx + max_choice - 1], max_choice - 1, TRUE); - PaintScroller(menu, scrlx + choice, item_no, menu_height); - wnoutrefresh(menu); - wrefresh(dialog); - continue; - } - } - else - i = MIN(choice + 1, item_no - 1); - } - - if (i != choice) { - getyx(dialog, cur_y, cur_x); - PaintItem(menu, items[scrlx + choice], choice, FALSE); - - choice = i; - PaintItem(menu, items[scrlx + choice], choice, TRUE); - PaintScroller(menu, scrlx + choice, item_no, menu_height); - wnoutrefresh(menu); - wmove(dialog, cur_y, cur_x); - wrefresh(dialog); - continue; - } - - switch (key) { - case TAB: - case KEY_LEFT: - case KEY_RIGHT: - if (!button) { - button = 1; - PaintButton(dialog, label1, y, x1, FALSE); - PaintButton(dialog, label2, y, x2, TRUE); - } - else { - button = 0; - PaintButton(dialog, label2, y, x2, FALSE); - PaintButton(dialog, label1, y, x1, TRUE); - } - wrefresh(dialog); - break; - case ' ': - case '\r': - case '\n': - delwin(dialog); - return (!button ? scrlx + choice : -1); - default: - for (i = scrlx + choice + 1; i < item_no; i++) - if (toupper(items[i][0]) == toupper(key)) - break; - if (i == item_no) { - for (i = 0; i < scrlx + choice; i++) - if (toupper(items[i][0]) == toupper(key)) - break; - } - getyx(dialog, cur_y, cur_x); - if (i < item_no && i != scrlx + choice) { - if (i >= scrlx && i < scrlx + max_choice) { - /* it is already visible */ - PaintItem(menu, items[scrlx + choice], choice, FALSE); - choice = i - scrlx; - } - else { - scrlx = MIN(i, max_scroll); - choice = i - scrlx; - for (i = 0; i < max_choice; i++) - if (i != choice) - PaintItem(menu, items[scrlx + i], i, FALSE); - } - PaintItem(menu, items[scrlx + choice], choice, TRUE); - PaintScroller(menu, scrlx + choice, item_no, menu_height); - wnoutrefresh(menu); - wmove(dialog, cur_y, cur_x); - wrefresh(dialog); - } - break; - } - } - /*NOTREACHED*/ -} - -static void -PaintItem(WINDOW *win, char *item, int choice, int selected) -{ - int i; - - wattrset(win, selected ? title_attr : dialog_attr); - wmove(win, choice, 1); - for (i = 1; i < menu_width; i++) - waddch(win, ' '); - wmove(win, choice, item_x); - wattrset(win, selected ? title_attr : dialog_attr); - waddstr(win, item); -} - -static void -PaintScroller(WINDOW *win, int offset, int lenght, int visible) -{ - int i, pos; - - if (lenght > visible) - pos = (visible / (double)lenght) * offset; - else - pos = offset; - wattrset(win, shadow_border_attr); - for (i = 0; i < visible; i++) { - wmove(win, i, 0); - waddch(win, i == pos ? ACS_BLOCK : ACS_VLINE); - } -} - -static int -DialogCheckBox(char *title, char *prompt, int height, int width, int menu_height, - int item_no, char **items, char *label1, char *label2, char *checks) -{ - int i, x, y, cur_x, cur_y, box_x, box_y, key = 0, button = 0, choice = 0, - scrlx = 0, max_choice, nscroll, max_scroll, x1, x2, l1len, l2len; - WINDOW *dialog, *menu; - - max_choice = MIN(menu_height, item_no); - max_scroll = MAX(0, item_no - max_choice); - - x = (COLS - width) / 2; - y = (LINES - height) / 2; - - dialog = newwin(height, width, y, x); - keypad(dialog, TRUE); - - PaintWindow(dialog, title, 0, 0, height, width); - - wattrset(dialog, dialog_attr); - PrintWrap(dialog, prompt, width - 3, 2, 3); - - l1len = strlen(label1); - l2len = strlen(label2); - - x1 = (width - (l1len + l2len)) / 3; - x2 = x1 + x1 + l1len; - - menu_width = width - 6; - getyx(dialog, cur_y, cur_x); - box_y = cur_y + 1; - box_x = (width - menu_width) / 2 - 1; - - menu = subwin(dialog, menu_height, menu_width, y + box_y + 1, x + box_x + 1); - keypad(menu, TRUE); - - /* draw a box around the menu items */ - PaintBox(dialog, box_y, box_x, menu_height + 2, menu_width + 2); - - item_x = 3; - - for (i = 0; i < max_choice; i++) - PaintCheckItem(menu, items[i + scrlx], i, i == 0, checks[i + scrlx]); - PaintScroller(menu, scrlx + choice, item_no, menu_height); - wnoutrefresh(menu); - - x = width / 2 - 11; - y = height - 3; - PaintButton(dialog, label2, y, x2, FALSE); - PaintButton(dialog, label1, y, x1, TRUE); - wrefresh(dialog); - - /*CONSTCOND*/ - while (1) { - i = choice; - key = wgetch(dialog); - - if (menu_height > 1 && key == KEY_PPAGE) { - if (!choice) { - if (scrlx) { - /* Scroll menu down */ - getyx(dialog, cur_y, cur_x); - - nscroll = max_choice > scrlx ? -scrlx : -max_choice; - scrollok(menu, TRUE); - wscrl(menu, nscroll); - scrollok(menu, FALSE); - - i = scrlx + nscroll; - PaintCheckItem(menu, items[i], 0, TRUE, checks[i]); - for (++i; i <= scrlx; i++) - PaintCheckItem(menu, items[i], i - (scrlx + nscroll), FALSE, checks[i]); - scrlx += nscroll; - PaintScroller(menu, scrlx + choice, item_no, menu_height); - wnoutrefresh(menu); - wrefresh(dialog); - continue; - } - } - i = 0; - } - else if (menu_height > 1 && key == KEY_NPAGE) { - if (choice == max_choice - 1) { - if (scrlx < max_scroll) { - /* Scroll menu up */ - getyx(dialog, cur_y, cur_x); - - nscroll = (scrlx + max_choice > max_scroll ? - max_scroll : scrlx + max_choice) - scrlx; - scrollok(menu, TRUE); - wscrl(menu, nscroll); - scrollok(menu, FALSE); - - scrlx += nscroll; - for (i = 0; i < max_choice - 1; i++) - PaintCheckItem(menu, items[i + scrlx], i, FALSE, checks[i + scrlx]); - PaintCheckItem(menu, items[i + scrlx], max_choice - 1, TRUE, checks[i + scrlx]); - PaintScroller(menu, scrlx + choice, item_no, menu_height); - wnoutrefresh(menu); - wrefresh(dialog); - continue; - } - } - i = max_choice - 1; - } - else if (key == KEY_UP) { - if (!choice) { - if (scrlx) { - /* Scroll menu down */ - getyx(dialog, cur_y, cur_x); - if (menu_height > 1) { - PaintCheckItem(menu, items[scrlx], 0, FALSE, checks[scrlx]); - scrollok(menu, TRUE); - wscrl(menu, - 1); - scrollok(menu, FALSE); - } - scrlx--; - PaintCheckItem(menu, items[scrlx], 0, TRUE, checks[scrlx]); - PaintScroller(menu, scrlx + choice, item_no, menu_height); - wnoutrefresh(menu); - wrefresh(dialog); - continue; - } - } - else - i = choice - 1; - } - else if (key == KEY_DOWN) { - if (choice == max_choice - 1) { - if (scrlx + choice < item_no - 1) { - /* Scroll menu up */ - getyx(dialog, cur_y, cur_x); - if (menu_height > 1) { - PaintCheckItem(menu, items[scrlx + max_choice - 1], max_choice - 1, FALSE, checks[scrlx + max_choice - 1]); - scrollok(menu, TRUE); - scroll(menu); - scrollok(menu, FALSE); - } - scrlx++; - PaintCheckItem(menu, items[scrlx + max_choice - 1], max_choice - 1, TRUE, checks[scrlx + max_choice - 1]); - PaintScroller(menu, scrlx + choice, item_no, menu_height); - wnoutrefresh(menu); - wrefresh(dialog); - continue; - } - } - else - i = MIN(choice + 1, item_no - 1); - } - - if (i != choice) { - getyx(dialog, cur_y, cur_x); - PaintCheckItem(menu, items[scrlx + choice], choice, FALSE, checks[scrlx + choice]); - - choice = i; - PaintCheckItem(menu, items[scrlx + choice], choice, TRUE, checks[scrlx + choice]); - PaintScroller(menu, scrlx + choice, item_no, menu_height); - wnoutrefresh(menu); - wmove(dialog, cur_y, cur_x); - wrefresh(dialog); - continue; - } - - switch (key) { - case TAB: - case KEY_LEFT: - case KEY_RIGHT: - if (!button) { - button = 1; - PaintButton(dialog, label1, y, x1, FALSE); - PaintButton(dialog, label2, y, x2, TRUE); - } - else { - button = 0; - PaintButton(dialog, label2, y, x2, FALSE); - PaintButton(dialog, label1, y, x1, TRUE); - } - wrefresh(dialog); - break; - case ' ': - getyx(dialog, cur_y, cur_x); - checks[scrlx + choice] = !checks[scrlx + choice]; - PaintCheckItem(menu, items[scrlx + choice], choice, TRUE, checks[scrlx + choice]); - wmove(dialog, cur_y, cur_x); - wnoutrefresh(menu); - wrefresh(dialog); - break; - case '\r': - case '\n': - delwin(dialog); - return (!button ? 0 : -1); - default: - for (i = scrlx + choice + 1; i < item_no; i++) - if (toupper(items[i][0]) == toupper(key)) - break; - if (i == item_no) { - for (i = 0; i < scrlx + choice; i++) - if (toupper(items[i][0]) == toupper(key)) - break; - } - getyx(dialog, cur_y, cur_x); - if (i < item_no && i != scrlx + choice) { - if (i >= scrlx && i < scrlx + max_choice) { - /* it is already visible */ - PaintCheckItem(menu, items[scrlx + choice], choice, FALSE, checks[scrlx + choice]); - choice = i - scrlx; - } - else { - scrlx = MIN(i, max_scroll); - choice = i - scrlx; - for (i = 0; i < max_choice; i++) - if (i != choice) - PaintCheckItem(menu, items[scrlx + i], i, FALSE, checks[scrlx + i]); - } - PaintCheckItem(menu, items[scrlx + choice], choice, TRUE, checks[scrlx + choice]); - PaintScroller(menu, scrlx + choice, item_no, menu_height); - wnoutrefresh(menu); - wmove(dialog, cur_y, cur_x); - wrefresh(dialog); - } - break; - } - } - /*NOTREACHED*/ -} - -static void -PaintCheckItem(WINDOW *win, char *item, int choice, int selected, int checked) -{ - int i; - - wattrset(win, selected ? title_attr : dialog_attr); - wmove(win, choice, 1); - for (i = 1; i < menu_width; i++) - waddch(win, ' '); - wmove(win, choice, item_x); - wattrset(win, selected ? title_attr : dialog_attr); - wprintw(win, "[%c] ", checked ? 'X' : ' '); - waddstr(win, item); -} - -static char * -DialogInput(char *title, char *prompt, int height, int width, char *init, - char *label1, char *label2, int def_button) -{ - int i, x, y, box_y, box_x, box_width, len, - input_x = 0, scrlx = 0, key = 0, button = -1, x1, x2, l1len, l2len; - char instr[1024 + 1]; - WINDOW *dialog; - - x = (COLS - width) / 2; - y = (LINES - height) / 2; - - dialog = newwin(height, width, y, x); - keypad(dialog, TRUE); - - PaintWindow(dialog, title, 0, 0, height, width); - - wattrset(dialog, dialog_attr); - PrintWrap(dialog, prompt, width - 3, 2, 3); - - l1len = strlen(label1); - l2len = strlen(label2); - - x1 = (width - (l1len + l2len)) / 3; - x2 = x1 + x1 + l1len; - - box_width = width - 6; - getyx(dialog, y, x); - box_y = y + 2; - box_x = (width - box_width) / 2; - PaintBox(dialog, y + 1, box_x - 1, 3, box_width + 2); - - x = width / 2 - 11; - y = height - 3; - PaintButton(dialog, label2, y, x2, def_button == 1); - PaintButton(dialog, label1, y, x1, def_button == 0); - - memset(instr, '\0', sizeof(instr)); - wmove(dialog, box_y, box_x); - wattrset(dialog, dialog_attr); - if (init) - strncpy(instr, init, sizeof(instr) - 2); - - input_x = len = strlen(instr); - if (input_x >= box_width) { - scrlx = input_x - box_width + 1; - input_x = box_width - 1; - for (i = 0; i < box_width - 1; i++) - waddch(dialog, instr[scrlx + i]); - } - else - waddstr(dialog, instr); - - wmove(dialog, box_y, box_x + input_x); - - wrefresh(dialog); - - while (1) { - key = wgetch(dialog); - if (button == -1) { /* Input box selected */ - switch (key) { - case TAB: - case KEY_UP: - case KEY_DOWN: - break; - case KEY_LEFT: - if (scrlx && !input_x) { - --scrlx; - wmove(dialog, box_y, box_x); - for (i = 0; i < box_width; i++) - waddch(dialog, instr[scrlx + input_x + i] ? instr[scrlx + input_x + i] : ' '); - wmove(dialog, box_y, input_x + box_x); - wrefresh(dialog); - } - else if (input_x) { - wmove(dialog, box_y, --input_x + box_x); - wrefresh(dialog); - } - continue; - case KEY_RIGHT: - if (input_x + scrlx < len) { - if (input_x == box_width - 1) { - ++scrlx; - wmove(dialog, box_y, box_x); - for (i = scrlx; i < scrlx + box_width; i++) - waddch(dialog, instr[i] ? instr[i] : ' '); - wmove(dialog, box_y, input_x + box_x); - wrefresh(dialog); - } - else { - wmove(dialog, box_y, ++input_x + box_x); - wrefresh(dialog); - } - } - continue; - case KEY_BACKSPACE: - case 0177: -#if defined(__SCO__) || defined(__UNIXWARE__) - case '\b': -#endif - if (input_x || scrlx) { - wattrset(dialog, dialog_attr); - - if (scrlx + input_x < len) - memmove(instr + scrlx + input_x - 1, - instr + scrlx + input_x, - len - (scrlx + input_x)); - instr[--len] = '\0'; - - if (!input_x) { - scrlx = scrlx < box_width - 1 ? 0 : scrlx - (box_width - 1); - wmove(dialog, box_y, box_x); - for (i = 0; i < box_width; i++) - waddch(dialog, instr[scrlx + input_x + i] ? instr[scrlx + input_x + i] : ' '); - input_x = len - scrlx; - } - else { - wmove(dialog, box_y, --input_x + box_x); - for (i = scrlx + input_x; i < len && - i < scrlx + box_width; i++) - waddch(dialog, instr[i]); - if (i < scrlx + box_width) - waddch(dialog, ' '); - } - wmove(dialog, box_y, input_x + box_x); - wrefresh(dialog); - } - continue; - case KEY_HOME: - case CONTROL_A: - wmove(dialog, box_y, box_x); - if (scrlx != 0) { - scrlx = 0; - for (i = 0; i < box_width; i++) - waddch(dialog, instr[i] ? instr[i] : ' '); - } - input_x = 0; - wmove(dialog, box_y, box_x); - wrefresh(dialog); - break; - case CONTROL_D: - if (input_x + scrlx < len) { - memmove(instr + scrlx + input_x, - instr + scrlx + input_x + 1, - len - (scrlx + input_x)); - instr[--len] = '\0'; - for (i = scrlx + input_x; i < len && - i < scrlx + box_width; i++) - waddch(dialog, instr[i]); - if (i < scrlx + box_width) - waddch(dialog, ' '); - wmove(dialog, box_y, input_x + box_x); - wrefresh(dialog); - } - break; - case CONTROL_E: - case KEY_END: - if (box_width + scrlx < len) { - input_x = box_width - 1; - scrlx = len - box_width + 1; - wmove(dialog, box_y, box_x); - for (i = scrlx; i < scrlx + box_width; i++) - waddch(dialog, instr[i] ? instr[i] : ' '); - wmove(dialog, box_y, input_x + box_x); - wrefresh(dialog); - } - else { - input_x = len - scrlx; - wmove(dialog, box_y, input_x + box_x); - wrefresh(dialog); - } - break; - case CONTROL_K: - if (len) { - for (i = input_x; i < box_width; i++) - waddch(dialog, ' '); - for (i = scrlx + input_x; i < len; i++) - instr[i] = '\0'; - len = scrlx + input_x; - wmove(dialog, box_y, box_x + input_x); - wrefresh(dialog); - } - break; - default: - if (key < 0x100 && isprint(key)) { - if (scrlx + input_x < sizeof(instr) - 1) { - wattrset(dialog, dialog_attr); - if (scrlx + input_x < len) { - memmove(instr + scrlx + input_x + 1, - instr + scrlx + input_x, - len - (scrlx + input_x)); - } - instr[scrlx + input_x] = key; - instr[++len] = '\0'; - if (input_x == box_width - 1) { - scrlx++; - wmove(dialog, box_y, box_x); - for (i = 0; i < box_width - 1; i++) - waddch(dialog, instr[scrlx + i]); - } - else { - wmove(dialog, box_y, input_x++ + box_x); - for (i = scrlx + input_x - 1; i < len && - i < scrlx + box_width; i++) - waddch(dialog, instr[i]); - wmove(dialog, box_y, input_x + box_x); - } - wrefresh(dialog); - } - else - flash(); /* Alarm user about overflow */ - continue; - } - } - } - - switch (key) { - case KEY_UP: - case KEY_LEFT: - switch (button) { - case -1: - button = 1; /* Indicates "Cancel" button is selected */ - PaintButton(dialog, label1, y, x1, FALSE); - PaintButton(dialog, label2, y, x2, TRUE); - wrefresh(dialog); - break; - case 0: - button = -1; /* Indicates input box is selected */ - PaintButton(dialog, label2, y, x2, FALSE); - PaintButton(dialog, label1, y, x1, TRUE); - wmove(dialog, box_y, box_x + input_x); - wrefresh(dialog); - break; - case 1: - button = 0; /* Indicates "OK" button is selected */ - PaintButton(dialog, label2, y, x2, FALSE); - PaintButton(dialog, label1, y, x1, TRUE); - wrefresh(dialog); - break; - } - break; - case TAB: - case KEY_DOWN: - case KEY_RIGHT: - switch (button) { - case -1: - button = 0; /* Indicates "OK" button is selected */ - PaintButton(dialog, label2, y, x2, FALSE); - PaintButton(dialog, label1, y, x1, TRUE); - wrefresh(dialog); - break; - case 0: - button = 1; /* Indicates "Cancel" button is selected */ - PaintButton(dialog, label1, y, x1, FALSE); - PaintButton(dialog, label2, y, x2, TRUE); - wrefresh(dialog); - break; - case 1: - button = -1; /* Indicates input box is selected */ - PaintButton(dialog, label2, y, x2, FALSE); - PaintButton(dialog, label1, y, x1, TRUE); - wmove(dialog, box_y, box_x + input_x); - wrefresh(dialog); - break; - } - break; - case ' ': - case '\r': - case '\n': - delwin(dialog); - return (button != 1 ? XtNewString(instr) : NULL); - } - } -} diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/up.xbm b/xorg-server/hw/xfree86/utils/xorgcfg/up.xbm deleted file mode 100644 index 64f8f9ec4..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/up.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define up_width 19 -#define up_height 19 -static unsigned char up_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, - 0x00, 0x07, 0x00, 0x80, 0x0f, 0x00, 0xc0, 0x1f, 0x00, 0xe0, 0x3f, 0x00, - 0xf0, 0x7f, 0x00, 0xf8, 0xff, 0x00, 0xfc, 0xff, 0x01, 0x80, 0x0f, 0x00, - 0x80, 0x0f, 0x00, 0x80, 0x0f, 0x00, 0x80, 0x0f, 0x00, 0x80, 0x0f, 0x00, - 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/vidmode.c b/xorg-server/hw/xfree86/utils/xorgcfg/vidmode.c deleted file mode 100644 index 2d613b6df..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/vidmode.c +++ /dev/null @@ -1,1346 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -/* - * Most of the code here is based on the xvidtune code. - */ - -#include "vidmode.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "xf86config.h" - -#define V_FLAG_MASK 0x1FF -#define V_PHSYNC 0x001 -#define V_NHSYNC 0x002 -#define V_PVSYNC 0x004 -#define V_NVSYNC 0x008 -#define V_INTERLACE 0x010 -#define V_DBLSCAN 0x020 -#define V_CSYNC 0x040 -#define V_PCSYNC 0x080 -#define V_NCSYNC 0x100 - -#define LEFT 0 -#define RIGHT 1 -#define UP 2 -#define DOWN 3 -#define WIDER 4 -#define TALLER 5 -#define NARROWER 6 -#define SHORTER 7 - -#define HDISPLAY 0 -#define VDISPLAY 1 -#define HSYNCSTART 2 -#define HSYNCEND 3 -#define HTOTAL 4 -#define VSYNCSTART 5 -#define VSYNCEND 6 -#define VTOTAL 7 -#define FLAGS 8 -#define CLOCK 9 -#define HSYNC 10 -#define VSYNC 11 - -#define MINMAJOR 2 -#define MINMINOR 0 - -/* - * Types - */ -typedef struct { - char *ident; - XF86VidModeModeInfo info; -} xf86cfgVesaModeInfo; - -/* - * Prototypes - */ -static Bool GetModeLine(Bool); -static void StartAdjustMonitorCallback(Widget, XtPointer, XtPointer); -static void AdjustMonitorCallback(Widget, XtPointer, XtPointer); -static void EndAdjustMonitorCallback(Widget, XtPointer, XtPointer); -static void SetLabel(int, int); -static void UpdateSyncRates(Bool); -static int VidmodeError(Display*, XErrorEvent*); -static void CleanUp(Display*); -static void ApplyCallback(Widget, XtPointer, XtPointer); -static void AutoCallback(Widget, XtPointer, XtPointer); -static void RestoreCallback(Widget, XtPointer, XtPointer); -static void SelectCallback(Widget, XtPointer, XtPointer); -static void SelectMonitorCallback(Widget, XtPointer, XtPointer); -static void SwitchCallback(Widget, XtPointer, XtPointer); -static void SetLabels(void); -static void UpdateCallback(Widget, XtPointer, XtPointer); -static void ChangeScreenCallback(Widget, XtPointer, XtPointer); -static void SetLabelAndModeline(void); -static void AddVesaModeCallback(Widget, XtPointer, XtPointer); -static void GetModes(void); -static void AddModeCallback(Widget, XtPointer, XtPointer); -static void TestCallback(Widget, XtPointer, XtPointer); -static void TestTimeout(XtPointer, XtIntervalId*); -static void StopTestCallback(Widget, XtPointer, XtPointer); -static int ForceAddMode(void); -static int AddMode(void); -/* - * Initialization - */ -extern Widget work; -Widget vtune; -static Widget apply, automatic, restore, mode, menu, screenb, screenp; -static Bool autoflag; -static xf86cfgVidmode *vidtune; -static XF86VidModeModeLine modeline, orig_modeline; -static int dot_clock, hsync_rate, vsync_rate, hitError; -static int screenno; -static int (*XtErrorFunc)(Display*, XErrorEvent*); -static Widget values[VSYNC + 1], repeater, monitor, - monitorb, add, text, vesap, forceshell, testshell, addshell; -static int MajorVersion, MinorVersion, EventBase, ErrorBase; -static XtIntervalId timeout; - -/* The information bellow is extracted from - * xc/programs/Xserver/hw/xfree86/etc/vesamodes - * If that file is changed, please update the table bellow also. Or even - * better, write a script to generate the table. - */ -static xf86cfgVesaModeInfo vesamodes[] = { - { - "640x350 @ 85Hz (VESA) hsync: 37.9kHz", - { - 31500, 640, 672, 736, 832, 0, 350, 382, 385, 445, - V_PHSYNC | V_NVSYNC - } - }, - { - "640x400 @ 85Hz (VESA) hsync: 37.9kHz", - { - 31500, 640, 672, 736, 832, 0, 400, 401, 404, 445, - V_NHSYNC | V_PVSYNC - } - }, - { - "720x400 @ 85Hz (VESA) hsync: 37.9kHz", - { - 35500, 720, 756, 828, 936, 0, 400, 401, 404, 446, - V_NHSYNC | V_PVSYNC - } - }, - { - "640x480 @ 60Hz (Industry standard) hsync: 31.5kHz", - { - 25200, 640, 656, 752, 800, 0, 480, 490, 492, 525, - V_NHSYNC | V_NVSYNC - } - }, - { - "640x480 @ 72Hz (VESA) hsync: 37.9kHz", - { - 31500, 640, 664, 704, 832, 0, 480, 489, 491, 520, - V_NHSYNC | V_NVSYNC - } - }, - { - "640x480 @ 75Hz (VESA) hsync: 37.5kHz", - { - 31500, 640, 656, 720, 840, 0, 480, 481, 484, 500, - V_NHSYNC | V_NVSYNC - } - }, - { - "640x480 @ 85Hz (VESA) hsync: 43.3kHz", - { - 36000, 640, 696, 752, 832, 0, 480, 481, 484, 509, - V_NHSYNC | V_NVSYNC - } - }, - { - "800x600 @ 56Hz (VESA) hsync: 35.2kHz", - { - 36000, 800, 824, 896, 1024, 0, 600, 601, 603, 625, - V_PHSYNC | V_PVSYNC - } - }, - { - "800x600 @ 60Hz (VESA) hsync: 37.9kHz", - { - 400000, 800, 840, 968, 1056, 0, 600, 601, 605, 628, - V_PHSYNC | V_PVSYNC - } - }, - { - "800x600 @ 72Hz (VESA) hsync: 48.1kHz", - { - 50000, 800, 856, 976, 1040, 0, 600, 637, 643, 666, - V_PHSYNC | V_PVSYNC - } - }, - { - "800x600 @ 75Hz (VESA) hsync: 46.9kHz", - { - 49500, 800, 816, 896, 1056, 0, 600, 601, 604, 625, - V_PHSYNC | V_PVSYNC - } - }, - { - "800x600 @ 85Hz (VESA) hsync: 53.7kHz", - { - 563000, 800, 832, 896, 1048, 0, 600, 601, 604, 631, - V_PHSYNC | V_PVSYNC - } - }, - { - "1024x768i @ 43Hz (industry standard) hsync: 35.5kHz", - { - 44900, 1024, 1032, 1208, 1264, 0, 768, 768, 776, 817, - V_PHSYNC | V_PVSYNC | V_INTERLACE - } - }, - { - "1024x768 @ 60Hz (VESA) hsync: 48.4kHz", - { - 65000, 1024, 1048, 1184, 1344, 0, 768, 771, 777, 806, - V_NHSYNC | V_NVSYNC - } - }, - { - "1024x768 @ 70Hz (VESA) hsync: 56.5kHz", - { - 75000, 1024, 1048, 1184, 1328, 0, 768, 771, 777, 806, - V_NHSYNC | V_NVSYNC - } - }, - { - "1024x768 @ 75Hz (VESA) hsync: 60.0kHz", - { - 78800, 1024, 1040, 1136, 1312, 0, 768, 769, 772, 800, - V_PHSYNC | V_PVSYNC - } - }, - { - "1024x768 @ 85Hz (VESA) hsync: 68.7kHz", - { - 94500, 1024, 1072, 1168, 1376, 0, 768, 769, 772, 808, - V_PHSYNC | V_PVSYNC - } - }, - { - "1152x864 @ 75Hz (VESA) hsync: 67.5kHz", - { - 108000, 1152, 1216, 1344, 1600, 0, 864, 865, 868, 900, - V_PHSYNC | V_PVSYNC - } - }, - { - "1280x960 @ 60Hz (VESA) hsync: 60.0kHz", - { - 108000, 1280, 1376, 1488, 1800, 0, 960, 961, 964, 1000, - V_PHSYNC | V_PVSYNC - } - }, - { - "1280x960 @ 85Hz (VESA) hsync: 85.9kHz", - { - 148500, 1280, 1344, 1504, 1728, 0, 960, 961, 964, 1011, - V_PHSYNC | V_PVSYNC - } - }, - { - "1280x1024 @ 60Hz (VESA) hsync: 64.0kHz", - { - 108000, 1280, 1328, 1440, 1688, 0, 1024, 1025, 1028, 1066, - V_PHSYNC | V_PVSYNC - } - }, - { - "1280x1024 @ 75Hz (VESA) hsync: 80.0kHz", - { - 135000, 1280, 1296, 1440, 1688, 0, 1024, 1025, 1028, 1066, - V_PHSYNC | V_PVSYNC - } - }, - { - "1280x1024 @ 85Hz (VESA) hsync: 91.1kHz", - { - 157500, 1280, 1344, 1504, 1728, 0, 1024, 1025, 1028, 1072, - V_PHSYNC | V_PVSYNC - } - }, - { - "1600x1200 @ 60Hz (VESA) hsync: 75.0kHz", - { - 162000, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, - V_PHSYNC | V_PVSYNC - } - }, - { - "1600x1200 @ 65Hz (VESA) hsync: 81.3kHz", - { - 175500, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, - V_PHSYNC | V_PVSYNC - } - }, - { - "1600x1200 @ 70Hz (VESA) hsync: 87.5kHz", - { - 189000, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, - V_PHSYNC | V_PVSYNC - } - }, - { - "1600x1200 @ 75Hz (VESA) hsync: 93.8kHz", - { - 202500, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, - V_PHSYNC | V_PVSYNC - } - }, - { - "1600x1200 @ 85Hz (VESA) hsync: 106.3kHz", - { - 229500, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, - V_PHSYNC | V_PVSYNC - } - }, - { - "1792x1344 @ 60Hz (VESA) hsync: 83.6kHz", - { - 204800, 1792, 1920, 2120, 2448, 0, 1344, 1345, 1348, 1394, - V_NHSYNC | V_PVSYNC - } - }, - { - "1792x1344 @ 75Hz (VESA) hsync: 106.3kHz", - { - 261000, 1792, 1888, 2104, 2456, 0, 1344, 1345, 1348, 1417, - V_NHSYNC | V_PVSYNC - } - }, - { - "1856x1392 @ 60Hz (VESA) hsync: 86.3kHz", - { - 218300, 1856, 1952, 2176, 2528, 0, 1392, 1393, 1396, 1439, - V_NHSYNC | V_PVSYNC - } - }, - { - "1856x1392 @ 75Hz (VESA) hsync: 112.5kHz", - { - 288000, 1856, 1984, 2208, 2560, 0, 1392, 1393, 1396, 1500, - V_NHSYNC | V_PVSYNC - } - }, - { - "1920x1440 @ 60Hz (VESA) hsync: 90.0kHz", - { - 234000, 1920, 2048, 2256, 2600, 0, 1440, 1441, 1444, 1500, - V_NHSYNC | V_PVSYNC - } - }, - { - "1920x1440 @ 75Hz (VESA) hsync: 112.5kHz", - { - 297000, 1920, 2064, 2288, 2640, 0, 1440, 1441, 1444, 1500, - V_NHSYNC | V_PVSYNC - } - }, -}; - -/* - * Implementation - */ -Bool -VideoModeInitialize(void) -{ - Widget form; - char dispstr[128], *ptr, *tmp; - - static char *names[] = { - NULL, - NULL, - "hsyncstart", - "hsyncend", - "htotal", - "vsyncstart", - "vsyncend", - "vtotal", - "flags", - "clock", - "hsync", - "vsync", - }; - static char *vnames[] = { - NULL, - NULL, - "v-hsyncstart", - "v-hsyncend", - "v-htotal", - "v-vsyncstart", - "v-vsyncend", - "v-vtotal", - "v-flags", - "v-clock", - "v-hsync", - "v-vsync", - }; - Widget rep; - int i; - - if (!XF86VidModeQueryVersion(XtDisplay(toplevel), - &MajorVersion, &MinorVersion)) { - fprintf(stderr, "Unable to query video extension version\n"); - return (False); - } - else if (!XF86VidModeQueryExtension(XtDisplay(toplevel), - &EventBase, &ErrorBase)) { - fprintf(stderr, "Unable to query video extension information\n"); - return (False); - } - else if (MajorVersion < MINMAJOR || - (MajorVersion == MINMAJOR && MinorVersion < MINMINOR)) { - fprintf(stderr, - "Xserver is running an old XFree86-VidModeExtension version" - " (%d.%d)\n", MajorVersion, MinorVersion); - fprintf(stderr, "Minimum required version is %d.%d\n", - MINMAJOR, MINMINOR); - return (False); - } - else - InitializeVidmodes(); - - vtune = XtCreateWidget("vidtune", formWidgetClass, - work, NULL, 0); - - (void) XtVaCreateManagedWidget("vesaB", menuButtonWidgetClass, vtune, - XtNmenuName, "vesaP", NULL); - vesap = XtCreatePopupShell("vesaP", simpleMenuWidgetClass, vtune, NULL, 0); - for (i = 0; i < sizeof(vesamodes) / sizeof(vesamodes[0]); i++) { - rep = XtCreateManagedWidget(vesamodes[i].ident, smeBSBObjectClass, - vesap, NULL, 0); - XtAddCallback(rep, XtNcallback, AddVesaModeCallback, - (XtPointer)&vesamodes[i]); - } - - rep = XtCreateManagedWidget("prev", commandWidgetClass, vtune, NULL, 0); - XtAddCallback(rep, XtNcallback, SwitchCallback, (XtPointer)-1); - mode = XtCreateManagedWidget("mode", menuButtonWidgetClass, vtune, NULL, 0); - rep = XtCreateManagedWidget("next", commandWidgetClass, vtune, NULL, 0); - XtAddCallback(rep, XtNcallback, SwitchCallback, (XtPointer)1); - - screenp = XtCreatePopupShell("screenP", simpleMenuWidgetClass, vtune, - NULL, 0); - - XmuSnprintf(dispstr, sizeof(dispstr), "%s", - DisplayString(XtDisplay(toplevel))); - ptr = strrchr(dispstr, '.'); - tmp = strrchr(dispstr, ':'); - if (tmp != NULL && ptr != NULL && ptr > tmp) - *ptr = '\0'; - - for (i = 0; i < ScreenCount(XtDisplay(toplevel)); i++) { - char name[128]; - - XmuSnprintf(name, sizeof(name), "%s.%d", dispstr, i); - rep = XtCreateManagedWidget(name, smeBSBObjectClass, screenp, - NULL, 0); - XtAddCallback(rep, XtNcallback, ChangeScreenCallback, - (XtPointer)(long)i); - if (i == 0) { - screenb = XtVaCreateManagedWidget("screenB", menuButtonWidgetClass, - vtune, - XtNmenuName, "screenP", - XtNlabel, name, - NULL); - } - } - XtRealizeWidget(screenp); - - rep = XtCreateManagedWidget("up", repeaterWidgetClass, - vtune, NULL, 0); - XtAddCallback(rep, XtNstartCallback, StartAdjustMonitorCallback, NULL); - XtAddCallback(rep, XtNcallback, - AdjustMonitorCallback, (XtPointer)UP); - XtAddCallback(rep, XtNstopCallback, EndAdjustMonitorCallback, NULL); - rep = XtCreateManagedWidget("left", repeaterWidgetClass, - vtune, NULL, 0); - XtAddCallback(rep, XtNstartCallback, StartAdjustMonitorCallback, NULL); - XtAddCallback(rep, XtNcallback, - AdjustMonitorCallback, (XtPointer)LEFT); - XtAddCallback(rep, XtNstopCallback, EndAdjustMonitorCallback, NULL); - XtCreateManagedWidget("monitor", simpleWidgetClass, vtune, NULL, 0); - rep = XtCreateManagedWidget("right", repeaterWidgetClass, - vtune, NULL, 0); - XtAddCallback(rep, XtNstartCallback, StartAdjustMonitorCallback, NULL); - XtAddCallback(rep, XtNcallback, - AdjustMonitorCallback, (XtPointer)RIGHT); - XtAddCallback(rep, XtNstopCallback, EndAdjustMonitorCallback, NULL); - rep = XtCreateManagedWidget("down", repeaterWidgetClass, - vtune, NULL, 0); - XtAddCallback(rep, XtNstartCallback, StartAdjustMonitorCallback, NULL); - XtAddCallback(rep, XtNcallback, - AdjustMonitorCallback, (XtPointer)DOWN); - XtAddCallback(rep, XtNstopCallback, EndAdjustMonitorCallback, NULL); - rep = XtCreateManagedWidget("wider", repeaterWidgetClass, - vtune, NULL, 0); - XtAddCallback(rep, XtNstartCallback, StartAdjustMonitorCallback, NULL); - XtAddCallback(rep, XtNcallback, - AdjustMonitorCallback, (XtPointer)WIDER); - XtAddCallback(rep, XtNstopCallback, EndAdjustMonitorCallback, NULL); - rep = XtCreateManagedWidget("narrower", repeaterWidgetClass, - vtune, NULL, 0); - XtAddCallback(rep, XtNstartCallback, StartAdjustMonitorCallback, NULL); - XtAddCallback(rep, XtNcallback, - AdjustMonitorCallback, (XtPointer)NARROWER); - XtAddCallback(rep, XtNstopCallback, EndAdjustMonitorCallback, NULL); - rep = XtCreateManagedWidget("shorter", repeaterWidgetClass, - vtune, NULL, 0); - XtAddCallback(rep, XtNstartCallback, StartAdjustMonitorCallback, NULL); - XtAddCallback(rep, XtNcallback, - AdjustMonitorCallback, (XtPointer)SHORTER); - XtAddCallback(rep, XtNstopCallback, EndAdjustMonitorCallback, NULL); - rep = XtCreateManagedWidget("taller", repeaterWidgetClass, - vtune, NULL, 0); - XtAddCallback(rep, XtNstartCallback, StartAdjustMonitorCallback, NULL); - XtAddCallback(rep, XtNcallback, - AdjustMonitorCallback, (XtPointer)TALLER); - XtAddCallback(rep, XtNstopCallback, EndAdjustMonitorCallback, NULL); - - automatic = XtCreateManagedWidget("auto", toggleWidgetClass, vtune, NULL, 0); - XtAddCallback(automatic, XtNcallback, AutoCallback, NULL); - apply = XtCreateManagedWidget("apply", commandWidgetClass, vtune, NULL, 0); - XtAddCallback(apply, XtNcallback, ApplyCallback, NULL); - restore = XtCreateManagedWidget("restore", commandWidgetClass, vtune, NULL, 0); - XtAddCallback(restore, XtNcallback, RestoreCallback, NULL); - rep = XtCreateManagedWidget("update", commandWidgetClass, vtune, NULL, 0); - XtAddCallback(rep, XtNcallback, UpdateCallback, NULL); - rep = XtCreateManagedWidget("test", commandWidgetClass, vtune, NULL, 0); - XtAddCallback(rep, XtNcallback, TestCallback, NULL); - - form = XtCreateManagedWidget("form", formWidgetClass, vtune, NULL, 0); - for (i = 2; i < VSYNC + 1; i++) { - (void) XtCreateManagedWidget(names[i], labelWidgetClass, - form, NULL, 0); - values[i] = XtCreateManagedWidget(vnames[i], labelWidgetClass, - form, NULL, 0); - } - - add = XtCreateManagedWidget("add", commandWidgetClass, vtune, NULL, 0); - XtAddCallback(add, XtNcallback, AddModeCallback, NULL); - XtCreateManagedWidget("addto", labelWidgetClass, vtune, NULL, 0); - monitorb = XtCreateManagedWidget("ident", menuButtonWidgetClass, vtune, - NULL, 0); - XtCreateManagedWidget("as", labelWidgetClass, vtune, NULL, 0); - text = XtVaCreateManagedWidget("text", asciiTextWidgetClass, vtune, - XtNeditType, XawtextEdit, NULL); - - XtRealizeWidget(vtune); - - return (True); -} - -void -InitializeVidmodes(void) -{ - int i; - Display *display = XtDisplay(toplevel); - - computer.num_vidmodes = ScreenCount(display); - computer.vidmodes = (xf86cfgVidmode**) - XtMalloc(sizeof(xf86cfgVidmode*) * computer.num_vidmodes); - for (i = 0; i < computer.num_vidmodes; i++) { - - computer.vidmodes[i] = (xf86cfgVidmode*) - XtCalloc(1, sizeof(xf86cfgVidmode)); - computer.vidmodes[i]->screen = i; - } -} - -void -VideoModeConfigureStart(void) -{ - vidtune = computer.vidmodes[screenno]; - - XtSetSensitive(vtune, vidtune != NULL); - if (!XtIsManaged(vtune)) - XtManageChild(vtune); - else - XtMapWidget(vtune); - if (vidtune != NULL) { - Arg args[1]; - Boolean state; - XF86ConfMonitorPtr mon; - static char menuName[16]; - static int menuN; - - XtErrorFunc = XSetErrorHandler(VidmodeError); - XF86VidModeLockModeSwitch(XtDisplay(toplevel), vidtune->screen, True); - GetModeLine(True); - GetModes(); - - SetLabels(); - XtSetArg(args[0], XtNstate, &state); - XtGetValues(automatic, args, 1); - XtSetSensitive(apply, !state); - autoflag = state; - - if (monitor) - XtDestroyWidget(monitor); - XmuSnprintf(menuName, sizeof(menuName), "menuP%d", menuN); - menuN = !menuN; - monitor = XtCreatePopupShell(menuName, simpleMenuWidgetClass, - vtune, NULL, 0); - XtVaSetValues(monitorb, XtNmenuName, menuName, NULL); - - mon = XF86Config->conf_monitor_lst; - while (mon != NULL) { - Widget sme = XtCreateManagedWidget(mon->mon_identifier, - smeBSBObjectClass, - monitor, NULL, 0); - XtAddCallback(sme, XtNcallback, - SelectMonitorCallback, (XtPointer)mon); - - /* guess the monitor at a given screen and/or - * updates configuration if a monitor was removed from the - * configuration. - */ - if (XF86Config->conf_layout_lst) { - XF86ConfAdjacencyPtr adj = XF86Config->conf_layout_lst-> - lay_adjacency_lst; - - while (adj != NULL) { - if (adj->adj_screen != NULL) { - if (adj->adj_screen->scrn_monitor == mon && - adj->adj_scrnum >= 0 && - adj->adj_scrnum < ScreenCount(XtDisplay(toplevel))) { - if (computer.vidmodes[adj->adj_scrnum]->monitor == - NULL || computer.vidmodes[adj->adj_scrnum]-> - monitor == adj->adj_screen->scrn_monitor) { - computer.vidmodes[adj->adj_scrnum]->monitor = - adj->adj_screen->scrn_monitor; - break; - } - else - computer.vidmodes[adj->adj_scrnum]->monitor = - NULL; - } - } - adj = (XF86ConfAdjacencyPtr)(adj->list.next); - } - } - mon = (XF86ConfMonitorPtr)(mon->list.next); - } - SetLabelAndModeline(); - } -} - -void -VideoModeConfigureEnd(void) -{ - XtUnmapWidget(vtune); - if (vidtune != NULL) { - XF86VidModeLockModeSwitch(XtDisplay(toplevel), vidtune->screen, False); - XSetErrorHandler(XtErrorFunc); - } - vidtune = NULL; -} - -static void -SetLabelAndModeline(void) -{ - if (vidtune->monitor != NULL) { - char string[32]; - - XtVaSetValues(monitorb, XtNlabel, - vidtune->monitor->mon_identifier, NULL); - XtSetSensitive(add, True); - - if (modeline.htotal && modeline.vtotal) - XmuSnprintf(string, sizeof(string), "%dx%d@%d", - modeline.hdisplay, modeline.vdisplay, - (int)((double)dot_clock / (double)modeline.htotal * 1000.0 / - (double)modeline.vtotal)); - else - XmuSnprintf(string, sizeof(string), "%dx%d", - modeline.hdisplay, modeline.vdisplay); - XtVaSetValues(text, XtNstring, string, NULL); - } - else { - XtVaSetValues(monitorb, XtNlabel, "", NULL); - XtSetSensitive(add, False); - XtVaSetValues(text, XtNstring, "", NULL); - } -} - -/*ARGSUSED*/ -void -VidmodeRestoreAction(Widget w, XEvent *event, - String *params, Cardinal *num_params) -{ - if (vidtune != NULL) { - if (timeout != 0) - StopTestCallback(w, NULL, NULL); - else - RestoreCallback(w, NULL, NULL); - } -} - -static void -UpdateSyncRates(Bool update) -{ - if (modeline.htotal && modeline.vtotal) { - hsync_rate = (dot_clock * 1000) / modeline.htotal; - vsync_rate = (hsync_rate * 1000) / modeline.vtotal; - if (modeline.flags & V_INTERLACE) - vsync_rate *= 2; - else if (modeline.flags & V_DBLSCAN) - vsync_rate /= 2; - if (update) { - SetLabel(HSYNC, hsync_rate); - SetLabel(VSYNC, vsync_rate); - } - } -} - -static void -SetLabel(int ident, int value) -{ - Arg args[1]; - char label[256]; - - if (ident == FLAGS) { - int len = 0; - - *label = '\0'; - if (value & V_PHSYNC) - len += XmuSnprintf(label, sizeof(label), "%s", "+hsync"); - if (modeline.flags & V_NHSYNC) - len += XmuSnprintf(label + len, sizeof(label), "%s%s", - len ? " " : "", "-hsync"); - if (value & V_PVSYNC) - len += XmuSnprintf(label + len, sizeof(label), "%s%s", - len ? " " : "", "+vsync"); - if (value & V_NVSYNC) - len += XmuSnprintf(label + len, sizeof(label), "%s%s", - len ? " " : "", "-vsync"); - if (value & V_INTERLACE) - len += XmuSnprintf(label + len, sizeof(label), "%s%s", - len ? " " : "", "interlace"); - if (value & V_CSYNC) - len += XmuSnprintf(label + len, sizeof(label), "%s%s", - len ? " " : "", "composite"); - if (value & V_PCSYNC) - len += XmuSnprintf(label + len, sizeof(label), "%s%s", - len ? " " : "", "+csync"); - if (value & V_NCSYNC) - len += XmuSnprintf(label + len, sizeof(label), "%s%s", - len ? " " : "", "-csync"); - if (value & V_DBLSCAN) - len += XmuSnprintf(label + len, sizeof(label), "%s%s", - len ? " " : "", "doublescan"); - - } - else if (ident == CLOCK || ident == HSYNC || ident == VSYNC) - XmuSnprintf(label, sizeof(label), "%6.2f", (float)value / 1000.0); - else - XmuSnprintf(label, sizeof(label), "%d", value); - - XtSetArg(args[0], XtNlabel, label); - XtSetValues(values[ident], args, 1); -} - -/*ARGSUSED*/ -static void -StartAdjustMonitorCallback(Widget w, XtPointer client_data, XtPointer call_data) -{ - repeater = w; -} - -static void -AdjustMonitorCallback(Widget w, XtPointer client_data, XtPointer call_data) -{ - if (repeater != w) - return; - switch ((long)client_data) { - case LEFT: - if (modeline.hsyncend + 4 < modeline.htotal) { - modeline.hsyncstart += 4; - modeline.hsyncend += 4; - SetLabel(HSYNCSTART, modeline.hsyncstart); - SetLabel(HSYNCEND, modeline.hsyncend); - } - else - XBell(XtDisplay(w), 80); - break; - case RIGHT: - if (modeline.hsyncstart - 4 > modeline.hdisplay) { - modeline.hsyncstart -= 4; - modeline.hsyncend -= 4; - SetLabel(HSYNCSTART, modeline.hsyncstart); - SetLabel(HSYNCEND, modeline.hsyncend); - } - else - XBell(XtDisplay(w), 80); - break; - case NARROWER: - modeline.htotal += 4; - SetLabel(HTOTAL, modeline.htotal); - UpdateSyncRates(True); - break; - case WIDER: - if (modeline.htotal - 4 > modeline.hsyncend) { - modeline.htotal -= 4; - SetLabel(HTOTAL, modeline.htotal); - UpdateSyncRates(True); - } - else - XBell(XtDisplay(w), 80); - break; - case UP: - if (modeline.vsyncend + 4 < modeline.vtotal) { - modeline.vsyncstart += 4; - modeline.vsyncend += 4; - SetLabel(VSYNCSTART, modeline.vsyncstart); - SetLabel(VSYNCEND, modeline.vsyncend); - } - else - XBell(XtDisplay(w), 80); - break; - case DOWN: - if (modeline.vsyncstart - 4 > modeline.vdisplay) { - modeline.vsyncstart -= 4; - modeline.vsyncend -= 4; - SetLabel(VSYNCSTART, modeline.vsyncstart); - SetLabel(VSYNCEND, modeline.vsyncend); - } - else - XBell(XtDisplay(w), 80); - break; - case SHORTER: - modeline.vtotal += 4; - SetLabel(VTOTAL, modeline.vtotal); - UpdateSyncRates(True); - break; - case TALLER: - if (modeline.vtotal - 4 > modeline.vsyncend) { - modeline.vtotal -= 4; - SetLabel(VTOTAL, modeline.vtotal); - UpdateSyncRates(True); - } - else - XBell(XtDisplay(w), 80); - break; - } - - if (autoflag) - ApplyCallback(w, call_data, client_data); -} - -/*ARGSUSED*/ -static void -EndAdjustMonitorCallback(Widget w, XtPointer client_data, XtPointer call_data) -{ - repeater = NULL; -} - -static Bool -GetModeLine(Bool save) -{ - if (XF86VidModeGetModeLine(XtDisplay(toplevel), vidtune->screen, - &dot_clock, &modeline)) { - if (save) - memcpy(&orig_modeline, &modeline, sizeof(XF86VidModeModeLine)); - UpdateSyncRates(False); - return (True); - } - - return (False); -} - -static void -CleanUp(Display *display) -{ - /* Make sure mode switching is not locked out at exit */ - XF86VidModeLockModeSwitch(display, vidtune->screen, False); - XFlush(display); -} - -static int -VidmodeError(Display *display, XErrorEvent *error) -{ - if ((error->error_code >= ErrorBase && - error->error_code < ErrorBase + XF86VidModeNumberErrors) || - error->error_code == BadValue) { - hitError = 1; - } - else { - CleanUp(display); - if (XtErrorFunc) - (*XtErrorFunc)(display, error); - } - return (0); -} - -/*ARGSUSED*/ -static void -ApplyCallback(Widget w, XtPointer call_data, XtPointer client_data) -{ - hitError = 0; - XF86VidModeModModeLine(XtDisplay(w), vidtune->screen, &modeline); - XSync(XtDisplay(w), False); - if (hitError) { - if (repeater != NULL) { - XtCallActionProc(repeater, "unset", NULL, NULL, 0); - XtCallActionProc(repeater, "stop", NULL, NULL, 0); - repeater = NULL; - } - XBell(XtDisplay(w), 80); - if (timeout) - StopTestCallback(w, NULL, NULL); - GetModeLine(False); - SetLabels(); - } -} - -/*ARGSUSED*/ -static void -AutoCallback(Widget w, XtPointer call_data, XtPointer client_data) -{ - autoflag = (Bool)(long)client_data; - XtSetSensitive(apply, !autoflag); -} - -static void -RestoreCallback(Widget w, XtPointer call_data, XtPointer client_data) -{ - memcpy(&modeline, &orig_modeline, sizeof(XF86VidModeModeLine)); - if (autoflag) - ApplyCallback(w, call_data, client_data); - SetLabels(); -} - -static void -SelectCallback(Widget w, XtPointer call_data, XtPointer client_data) -{ - XF86VidModeModeInfo *info = (XF86VidModeModeInfo*)call_data; - Arg args[1]; - Bool result; - - XF86VidModeLockModeSwitch(XtDisplay(toplevel), vidtune->screen, False); - result = XF86VidModeSwitchToMode(XtDisplay(toplevel), vidtune->screen, info); - XF86VidModeLockModeSwitch(XtDisplay(toplevel), vidtune->screen, True); - if (!result) - return; - - XtSetArg(args[0], XtNlabel, XtName(w)); - XtSetValues(mode, args, 1); - UpdateCallback(w, call_data, client_data); -} - -static void -SwitchCallback(Widget w, XtPointer call_data, XtPointer client_data) -{ - int direction = (long)call_data; - Arg args[1]; - Bool result; - char label[32]; - - XF86VidModeLockModeSwitch(XtDisplay(toplevel), vidtune->screen, False); - result = XF86VidModeSwitchMode(XtDisplay(toplevel), vidtune->screen, - direction); - XF86VidModeLockModeSwitch(XtDisplay(toplevel), vidtune->screen, True); - if (!result) - return; - - UpdateCallback(w, call_data, client_data); - - if (modeline.htotal && modeline.vtotal) - XmuSnprintf(label, sizeof(label), "%dx%d @ %d Hz", - modeline.hdisplay, modeline.vdisplay, - (int)((double)dot_clock / (double)modeline.htotal * 1000.0 / - (double)modeline.vtotal)); - else - XmuSnprintf(label, sizeof(label), "%dx%d", - modeline.hdisplay, modeline.vdisplay); - XtSetArg(args[0], XtNlabel, label); - XtSetValues(mode, args, 1); -} - -/*ARGSUSED*/ -static void -UpdateCallback(Widget w, XtPointer call_data, XtPointer client_data) -{ - GetModeLine(True); - SetLabels(); - SetLabelAndModeline(); -} - -static void -SetLabels(void) -{ - SetLabel(HSYNCSTART, modeline.hsyncstart); - SetLabel(VSYNCSTART, modeline.vsyncstart); - SetLabel(HSYNCEND, modeline.hsyncend); - SetLabel(VSYNCEND, modeline.vsyncend); - SetLabel(HTOTAL, modeline.htotal); - SetLabel(VTOTAL, modeline.vtotal); - SetLabel(FLAGS, modeline.flags); - SetLabel(CLOCK, dot_clock); - UpdateSyncRates(True); -} - -/*ARGSUSED*/ -static void -ChangeScreenCallback(Widget w, XtPointer call_data, XtPointer client_data) -{ - Arg args[1]; - - screenno = (long)call_data; - if (screenno > computer.num_vidmodes || screenno < 0 || - vidtune == computer.vidmodes[screenno]) - return; - - XF86VidModeLockModeSwitch(XtDisplay(toplevel), vidtune->screen, False); - vidtune = computer.vidmodes[screenno]; - XF86VidModeLockModeSwitch(XtDisplay(toplevel), vidtune->screen, True); - UpdateCallback(w, call_data, client_data); - GetModes(); - - XtSetArg(args[0], XtNlabel, XtName(w)); - XtSetValues(screenb, args, 1); - - SetLabelAndModeline(); -} - -/*ARGSUSED*/ -static void -SelectMonitorCallback(Widget w, XtPointer call_data, XtPointer client_data) -{ - vidtune->monitor = (XF86ConfMonitorPtr)(call_data); - SetLabelAndModeline(); -} - -/*ARGSUSED*/ -static void -AddVesaModeCallback(Widget w, XtPointer call_data, XtPointer client_data) -{ - xf86cfgVesaModeInfo *vesa = (xf86cfgVesaModeInfo*)call_data; - XF86VidModeModeInfo mode; - int num_infos = vidtune->num_infos; - - memcpy(&mode, &vesa->info, sizeof(XF86VidModeModeInfo)); - if (XF86VidModeAddModeLine(XtDisplay(toplevel), vidtune->screen, - &vesa->info, &mode)) { - XSync(XtDisplay(toplevel), False); - GetModes(); - } - else { - XBell(XtDisplayOfObject(w), 80); - return; - } - - if (vidtune && num_infos == vidtune->num_infos) { - /* XF86VidModeAddModeLine returned True, but no modeline was added */ - XBell(XtDisplayOfObject(w), 80); - if (vidtune->monitor && AddMode()) { - XF86ConfModeLinePtr mode; - char label[256], *ptr, *str; - - XmuSnprintf(label, sizeof(label), "%s", vesa->ident); - - /* format mode name to not have spaces */ - ptr = strchr(label, ')'); - if (ptr) - *++ptr = '\0'; - ptr = str = label; - while (*ptr) { - if (*ptr != ' ') - *str++ = *ptr; - ++ptr; - } - *str = '\0'; - - if (xf86findModeLine(label, vidtune->monitor->mon_modeline_lst) - != NULL && !ForceAddMode()) - return; - - mode = (XF86ConfModeLinePtr)XtCalloc(1, sizeof(XF86ConfModeLineRec)); - mode->ml_identifier = XtNewString(label); - mode->ml_clock = vesa->info.dotclock; - mode->ml_hdisplay = vesa->info.hdisplay; - mode->ml_hsyncstart = vesa->info.hsyncstart; - mode->ml_hsyncend = vesa->info.hsyncend; - mode->ml_htotal = vesa->info.htotal; - mode->ml_vdisplay = vesa->info.vdisplay; - mode->ml_vsyncstart = vesa->info.vsyncstart; - mode->ml_vsyncend = vesa->info.vsyncend; - mode->ml_vtotal = vesa->info.vtotal; -/* mode->ml_vscan = ???;*/ - mode->ml_flags = vesa->info.flags; - mode->ml_hskew = vesa->info.hskew; - vidtune->monitor->mon_modeline_lst = - xf86addModeLine(vidtune->monitor->mon_modeline_lst, mode); - } - } -} - -static void -GetModes(void) -{ - int i; - char label[32]; - Arg args[1]; - static char menuName[16]; - static int menuN; - - XFree(vidtune->infos); - XF86VidModeGetAllModeLines(XtDisplay(toplevel), vidtune->screen, - &vidtune->num_infos, &vidtune->infos); - - XmuSnprintf(menuName, sizeof(menuName), "menu%d", menuN); - menuN = !menuN; - if (menu) - XtDestroyWidget(menu); - menu = XtCreatePopupShell(menuName, simpleMenuWidgetClass, vtune, NULL, 0); - XtVaSetValues(mode, XtNmenuName, menuName, NULL); - for (i = 0; i < vidtune->num_infos; i++) { - Widget sme; - - if ((double)vidtune->infos[i]->htotal && - (double)vidtune->infos[i]->vtotal) - XmuSnprintf(label, sizeof(label), "%dx%d @ %d Hz", - vidtune->infos[i]->hdisplay, - vidtune->infos[i]->vdisplay, - (int)((double)vidtune->infos[i]->dotclock / - (double)vidtune->infos[i]->htotal * 1000.0 / - (double)vidtune->infos[i]->vtotal)); - else - XmuSnprintf(label, sizeof(label), "%dx%d", - vidtune->infos[i]->hdisplay, - vidtune->infos[i]->vdisplay); - sme = XtCreateManagedWidget(label, smeBSBObjectClass, menu, NULL, 0); - XtAddCallback(sme, XtNcallback, SelectCallback, - (XtPointer)vidtune->infos[i]); - } - - if (modeline.htotal && modeline.vtotal) - XmuSnprintf(label, sizeof(label), "%dx%d @ %d Hz", - modeline.hdisplay, modeline.vdisplay, - (int)((double)dot_clock / (double)modeline.htotal * 1000.0 / - (double)modeline.vtotal)); - else - XmuSnprintf(label, sizeof(label), "%dx%d", - modeline.hdisplay, modeline.vdisplay); - XtSetArg(args[0], XtNlabel, label); - XtSetValues(mode, args, 1); -} - -static int do_force, asking_force; - -static void -PopdownForce(Widget w, XtPointer user_data, XtPointer call_data) -{ - asking_force = 0; - XtPopdown(forceshell); - do_force = (long)user_data; -} - -static int -ForceAddMode(void) -{ - if (forceshell == NULL) { - Widget dialog; - - forceshell = XtCreatePopupShell("force", transientShellWidgetClass, - toplevel, NULL, 0); - dialog = XtVaCreateManagedWidget("dialog", dialogWidgetClass, - forceshell, XtNvalue, NULL, NULL); - XawDialogAddButton(dialog, "yes", PopdownForce, (XtPointer)True); - XawDialogAddButton(dialog, "no", PopdownForce, (XtPointer)False); - XtRealizeWidget(forceshell); - XSetWMProtocols(DPY, XtWindow(forceshell), &wm_delete_window, 1); - } - - asking_force = 1; - - XtPopup(forceshell, XtGrabExclusive); - while (asking_force) - XtAppProcessEvent(XtWidgetToApplicationContext(forceshell), XtIMAll); - - return (do_force); -} - -static int do_add, asking_add; - -static void -PopdownAdd(Widget w, XtPointer user_data, XtPointer call_data) -{ - asking_add = 0; - XtPopdown(addshell); - do_add = (long)user_data; -} - -void -CancelAddModeAction(Widget w, XEvent *event, - String *params, Cardinal *num_params) -{ - if (asking_force) - PopdownForce(w, (XtPointer)False, NULL); - else if (asking_add) - PopdownAdd(w, (XtPointer)False, NULL); -} - -static int -AddMode(void) -{ - if (addshell == NULL) { - Widget dialog; - - addshell = XtCreatePopupShell("addMode", transientShellWidgetClass, - toplevel, NULL, 0); - dialog = XtVaCreateManagedWidget("dialog", dialogWidgetClass, - addshell, XtNvalue, NULL, NULL); - XawDialogAddButton(dialog, "yes", PopdownAdd, (XtPointer)True); - XawDialogAddButton(dialog, "no", PopdownAdd, (XtPointer)False); - XtRealizeWidget(addshell); - XSetWMProtocols(DPY, XtWindow(addshell), &wm_delete_window, 1); - } - - asking_add = 1; - - XtPopup(addshell, XtGrabExclusive); - while (asking_add) - XtAppProcessEvent(XtWidgetToApplicationContext(addshell), XtIMAll); - - return (do_add); -} - -/*ARGSUSED*/ -static void -AddModeCallback(Widget w, XtPointer call_data, XtPointer client_data) -{ - if (vidtune && vidtune->monitor) { - char *label; - Arg args[1]; - XF86ConfModeLinePtr mode; - - XtSetArg(args[0], XtNstring, &label); - XtGetValues(text, args, 1); - if (*label == '\0') { - XBell(XtDisplay(w), 80); - return; - } - if (xf86findModeLine(label, vidtune->monitor->mon_modeline_lst) - != NULL && !ForceAddMode()) - return; - - mode = (XF86ConfModeLinePtr)XtCalloc(1, sizeof(XF86ConfModeLineRec)); - mode->ml_identifier = XtNewString(label); - mode->ml_clock = dot_clock; - mode->ml_hdisplay = modeline.hdisplay; - mode->ml_hsyncstart = modeline.hsyncstart; - mode->ml_hsyncend = modeline.hsyncend; - mode->ml_htotal = modeline.htotal; - mode->ml_vdisplay = modeline.vdisplay; - mode->ml_vsyncstart = modeline.vsyncstart; - mode->ml_vsyncend = modeline.vsyncend; - mode->ml_vtotal = modeline.vtotal; -/* mode->ml_vscan = ???;*/ - mode->ml_flags = modeline.flags; - mode->ml_hskew = modeline.hskew; - vidtune->monitor->mon_modeline_lst = - xf86addModeLine(vidtune->monitor->mon_modeline_lst, mode); - } - else - XBell(XtDisplay(w), 80); -} - -/*ARGSUSED*/ -static void -StopTestCallback(Widget w, XtPointer call_data, XtPointer client_data) -{ - XtRemoveTimeOut(timeout); - TestTimeout((XtPointer)w, NULL); -} - -/*ARGSUSED*/ -void -CancelTestModeAction(Widget w, XEvent *event, - String *params, Cardinal *num_params) -{ - StopTestCallback(w, NULL, NULL); -} - -static void -TestTimeout(XtPointer client_data, XtIntervalId* id) -{ - XF86VidModeModeLine mode; - - XtPopdown(testshell); - timeout = 0; - memcpy(&mode, &modeline, sizeof(XF86VidModeModeLine)); - memcpy(&modeline, &orig_modeline, sizeof(XF86VidModeModeLine)); - ApplyCallback((Widget)client_data, NULL, NULL); -/* if (hitError == 0)*/ - memcpy(&modeline, &mode, sizeof(XF86VidModeModeLine)); - SetLabels(); -} - -static void -TestCallback(Widget w, XtPointer call_data, XtPointer client_data) -{ - if (testshell == NULL) { - Widget dialog; - - testshell = XtCreatePopupShell("test", transientShellWidgetClass, - toplevel, NULL, 0); - dialog = XtVaCreateManagedWidget("dialog", dialogWidgetClass, - testshell, XtNvalue, NULL, NULL); - XawDialogAddButton(dialog, "stop", StopTestCallback, NULL); - XtRealizeWidget(testshell); - XSetWMProtocols(DPY, XtWindow(testshell), &wm_delete_window, 1); - } - - XtPopup(testshell, XtGrabExclusive); - - XSync(XtDisplay(toplevel), False); - timeout = XtAppAddTimeOut(XtWidgetToApplicationContext(w), - /* the timeout probably shoud be converted to a resource */ - 4000, TestTimeout, (XtPointer)w); - ApplyCallback(w, call_data, client_data); -} diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/vidmode.h b/xorg-server/hw/xfree86/utils/xorgcfg/vidmode.h deleted file mode 100644 index d0c71d5c6..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/vidmode.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#ifndef _xf86cfg_vidmode_h -#define _xf86cfg_vidmode_h - -#include "xf86config.h" -#include - -/* - * Types - */ -struct _xf86cfgVidMode { - XF86ConfMonitorPtr monitor; - int screen; - int num_infos; - XF86VidModeModeInfo **infos; -}; - -/* - * Prototypes - */ -Bool VideoModeInitialize(void); -void VideoModeConfigureStart(void); -void VideoModeConfigureEnd(void); -void VidmodeRestoreAction(Widget, XEvent*, String*, Cardinal*); -void CancelAddModeAction(Widget, XEvent*, String*, Cardinal*); -void CancelTestModeAction(Widget, XEvent*, String*, Cardinal*); -void InitializeVidmodes(void); - -/* - * Initialization - */ -extern Widget vtune; - -#endif /* _xf86cfg_vidmode_h */ diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/wider.xbm b/xorg-server/hw/xfree86/utils/xorgcfg/wider.xbm deleted file mode 100644 index 5cf87f25a..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/wider.xbm +++ /dev/null @@ -1,8 +0,0 @@ -#define wider_width 19 -#define wider_height 19 -static unsigned char wider_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0xc0, 0x18, 0x00, - 0xe0, 0x38, 0x00, 0xf0, 0x78, 0x00, 0xf8, 0xf8, 0x00, 0xfc, 0xff, 0x01, - 0xfe, 0xff, 0x03, 0xff, 0xff, 0x07, 0xfe, 0xff, 0x03, 0xfc, 0xff, 0x01, - 0xf8, 0xf8, 0x00, 0xf0, 0x78, 0x00, 0xe0, 0x38, 0x00, 0xc0, 0x18, 0x00, - 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/xf86config.c b/xorg-server/hw/xfree86/utils/xorgcfg/xf86config.c deleted file mode 100644 index 2c667dcde..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/xf86config.c +++ /dev/null @@ -1,982 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "xf86config.h" - -/* - * Implementation - */ -int -xf86removeOption(XF86OptionPtr *options, char *name) -{ - XF86OptionPtr opt = *options, prev = opt; - - while (opt) { - if (strcasecmp(opt->opt_name, name) == 0) { - XtFree(opt->opt_name); - XtFree(opt->opt_val); - XtFree(opt->opt_comment); - if (opt == prev) - *options = (XF86OptionPtr)(opt->list.next); - else - prev->list.next = opt->list.next; - XtFree((XtPointer)opt); - - return (True); - } - - prev = opt; - opt = (XF86OptionPtr)(opt->list.next); - } - - return (False); -} - -int -xf86removeInput(XF86ConfigPtr config, XF86ConfInputPtr input) -{ - XF86ConfInputPtr prev, inp = config->conf_input_lst; - XF86ConfLayoutPtr lay = config->conf_layout_lst; - - /* remove from main structure */ - prev = inp; - while (inp != NULL) { - if (inp == input) { - if (inp == prev) - config->conf_input_lst = (XF86ConfInputPtr)(inp->list.next); - else - prev->list.next = inp->list.next; - break; - } - prev = inp; - inp = (XF86ConfInputPtr)(inp->list.next); - } - - if (inp == NULL) - return (False); - - /* remove references */ - while (lay != NULL) { - xf86removeInputRef(lay, inp); - lay = (XF86ConfLayoutPtr)(lay->list.next); - } - - XtFree(inp->inp_identifier); - XtFree(inp->inp_driver); - XtFree(inp->inp_comment); - xf86optionListFree(inp->inp_option_lst); - XtFree((XtPointer)inp); - - return (True); -} - -int -xf86removeInputRef(XF86ConfLayoutPtr layout, XF86ConfInputPtr input) -{ - XF86ConfInputrefPtr prev, iref = layout->lay_input_lst; - - prev = iref; - while (iref != NULL) { - if (iref->iref_inputdev == input) { - XtFree(iref->iref_inputdev_str); - xf86optionListFree(iref->iref_option_lst); - if (prev == iref) - layout->lay_input_lst = - (XF86ConfInputrefPtr)(iref->list.next); - else - prev->list.next = iref->list.next; - XtFree((XtPointer)iref); - - return (True); - } - prev = iref; - iref = (XF86ConfInputrefPtr)(iref->list.next); - } - - return (False); -} - -int -xf86removeDevice(XF86ConfigPtr config, XF86ConfDevicePtr device) -{ - XF86ConfDevicePtr prev, dev = config->conf_device_lst; - XF86ConfScreenPtr psc, scr = config->conf_screen_lst; - - /* remove from main structure */ - prev = dev; - while (dev != NULL) { - if (dev == device) { - if (dev == prev) - config->conf_device_lst = (XF86ConfDevicePtr)(dev->list.next); - else - prev->list.next = dev->list.next; - break; - } - prev = dev; - dev = (XF86ConfDevicePtr)(dev->list.next); - } - - if (dev == NULL) - return (False); - - /* remove references */ - psc = scr; - while (scr != NULL) { - if (scr->scrn_device == device) { - xf86removeScreen(config, scr); - if (scr == psc) - scr = psc = config->conf_screen_lst; - else - scr = psc; - continue; - } - psc = scr; - scr = (XF86ConfScreenPtr)(scr->list.next); - } - - XtFree(dev->dev_identifier); - XtFree(dev->dev_vendor); - XtFree(dev->dev_board); - XtFree(dev->dev_chipset); - XtFree(dev->dev_busid); - XtFree(dev->dev_card); - XtFree(dev->dev_driver); - XtFree(dev->dev_ramdac); - XtFree(dev->dev_clockchip); - XtFree(dev->dev_comment); - xf86optionListFree(dev->dev_option_lst); - XtFree((XtPointer)dev); - - return (True); -} - -int -xf86removeMonitor(XF86ConfigPtr config, XF86ConfMonitorPtr monitor) -{ - XF86ConfMonitorPtr prev, mon = config->conf_monitor_lst; - XF86ConfScreenPtr psc, scr = config->conf_screen_lst; - - /* remove from main structure */ - prev = mon; - while (mon != NULL) { - if (mon == monitor) { - if (mon == prev) - config->conf_monitor_lst = (XF86ConfMonitorPtr)(mon->list.next); - else - prev->list.next = mon->list.next; - break; - } - prev = mon; - mon = (XF86ConfMonitorPtr)(mon->list.next); - } - - if (mon == NULL) - return (False); - - /* remove references */ - psc = scr; - while (scr != NULL) { - if (scr->scrn_monitor == monitor) { - xf86removeScreen(config, scr); - if (scr == psc) - scr = psc = config->conf_screen_lst; - else - scr = psc; - continue; - } - psc = scr; - scr = (XF86ConfScreenPtr)(scr->list.next); - } - - XtFree(mon->mon_identifier); - XtFree(mon->mon_vendor); - XtFree(mon->mon_modelname); - XtFree(mon->mon_comment); - xf86optionListFree(mon->mon_option_lst); - XtFree((XtPointer)mon); - - return (True); -} - -int -xf86removeScreen(XF86ConfigPtr config, XF86ConfScreenPtr screen) -{ - XF86ConfScreenPtr prev, scrn; - XF86ConfLayoutPtr lay; - - if (config == NULL || screen == NULL) - return (False); - - lay = config->conf_layout_lst; - prev = scrn = config->conf_screen_lst; - - while (scrn != NULL) { - if (scrn == screen) { - if (scrn == prev) - config->conf_screen_lst = (XF86ConfScreenPtr)(scrn->list.next); - else - prev->list.next = scrn->list.next; - break; - } - prev = scrn; - scrn = (XF86ConfScreenPtr)(scrn->list.next); - } - - if (scrn == NULL) - return (False); - - while (lay != NULL) { - XF86ConfAdjacencyPtr pad, ad = NULL, adj = lay->lay_adjacency_lst; - - pad = adj; - while (adj) { - if (adj->adj_screen == screen) - ad = adj; - else { - if (adj->adj_top != NULL && adj->adj_top == screen) { - XtFree(adj->adj_top_str); - adj->adj_top_str = NULL; - adj->adj_top = NULL; - } - else if (adj->adj_bottom != NULL && adj->adj_bottom == screen) { - XtFree(adj->adj_bottom_str); - adj->adj_bottom_str = NULL; - adj->adj_bottom = NULL; - } - else if (adj->adj_left != NULL && adj->adj_left == screen) { - XtFree(adj->adj_left_str); - adj->adj_left_str = NULL; - adj->adj_left = NULL; - } - else if (adj->adj_right != NULL && adj->adj_right == screen) { - XtFree(adj->adj_right_str); - adj->adj_right_str = NULL; - adj->adj_right = NULL; - } - else if (adj->adj_refscreen != NULL && - strcasecmp(scrn->scrn_identifier, - adj->adj_refscreen) == 0) { - XtFree(adj->adj_refscreen); - adj->adj_refscreen = NULL; - adj->adj_where = CONF_ADJ_ABSOLUTE; - adj->adj_x = adj->adj_y = 0; - } - } - if (ad == NULL) - pad = adj; - adj = (XF86ConfAdjacencyPtr)(adj->list.next); - } - - if (ad != NULL) { - if (ad == lay->lay_adjacency_lst) - lay->lay_adjacency_lst = (XF86ConfAdjacencyPtr)(ad->list.next); - else - pad->list.next = (XF86ConfAdjacencyPtr)(ad->list.next); - XtFree(ad->adj_screen_str); - XtFree(ad->adj_top_str); - XtFree(ad->adj_bottom_str); - XtFree(ad->adj_left_str); - XtFree(ad->adj_right_str); - XtFree(ad->adj_refscreen); - XtFree((XtPointer)ad); - } - - lay = (XF86ConfLayoutPtr)(lay->list.next); - } - - xf86freeAdaptorLinkList(screen->scrn_adaptor_lst); - xf86freeDisplayList(screen->scrn_display_lst); - - XtFree(screen->scrn_identifier); - XtFree(screen->scrn_monitor_str); - XtFree(screen->scrn_device_str); - xf86optionListFree(screen->scrn_option_lst); - XtFree((XtPointer)screen); - - return (True); -} - -int -xf86removeAdjacency(XF86ConfLayoutPtr layout, XF86ConfAdjacencyPtr adjacency) -{ - XF86ConfAdjacencyPtr prev, adj = layout->lay_adjacency_lst; - - if (layout == NULL || adjacency == NULL) - return (False); - - prev = adj; - while (adj != NULL) { - if (adj == adjacency) - break; - prev = adj; - adj = (XF86ConfAdjacencyPtr)(adj->list.next); - } - if (adj == NULL) - return (False); - - XtFree(adj->adj_screen_str); - XtFree(adj->adj_top_str); - XtFree(adj->adj_bottom_str); - XtFree(adj->adj_left_str); - XtFree(adj->adj_right_str); - XtFree(adj->adj_refscreen); - if (prev == adj) - layout->lay_adjacency_lst = (XF86ConfAdjacencyPtr)(adj->list.next); - else - prev->list.next = adj->list.next; - XtFree((XtPointer)adj); - - return (True); -} - -int -xf86removeInactive(XF86ConfLayoutPtr layout, XF86ConfInactivePtr inactive) -{ - XF86ConfInactivePtr prev, inac = layout->lay_inactive_lst; - - if (layout == NULL || inactive == NULL) - return (False); - - prev = inac; - while (inac != NULL) { - if (inac == inactive) - break; - prev = inac; - inac = (XF86ConfInactivePtr)(inac->list.next); - } - if (inac == NULL) - return (False); - - XtFree(inac->inactive_device_str); - if (prev == inac) - layout->lay_inactive_lst = (XF86ConfInactivePtr)(inac->list.next); - else - prev->list.next = inac->list.next; - XtFree((XtPointer)inac); - - return (True); -} - -int -xf86removeLayout(XF86ConfigPtr config, XF86ConfLayoutPtr layout) -{ - XF86ConfLayoutPtr prev, lay = config->conf_layout_lst; - XF86ConfAdjacencyPtr adj, nadj; - XF86ConfInactivePtr inac, ninac; - XF86ConfInputrefPtr iref, niref; - - if (config == NULL || layout == NULL) - return (False); - - prev = lay; - while (lay != NULL) { - if (lay == layout) - break; - prev = lay; - lay = (XF86ConfLayoutPtr)(lay->list.next); - } - - if (lay == NULL) - return (False); - - adj = lay->lay_adjacency_lst; - while (adj != NULL) { - nadj = (XF86ConfAdjacencyPtr)(adj->list.next); - xf86removeAdjacency(lay, adj); - adj = nadj; - } - - inac = lay->lay_inactive_lst; - while (inac != NULL) { - ninac = (XF86ConfInactivePtr)(inac->list.next); - xf86removeInactive(lay, inac); - inac = ninac; - } - - iref = lay->lay_input_lst; - while (iref != NULL) { - niref = (XF86ConfInputrefPtr)(iref->list.next); - xf86removeInputRef(lay, iref->iref_inputdev); - iref = niref; - } - - xf86optionListFree(lay->lay_option_lst); - - if (prev == lay) - config->conf_layout_lst = (XF86ConfLayoutPtr)(lay->list.next); - else - prev->list.next = lay->list.next; - XtFree(lay->lay_identifier); - XtFree((XtPointer)lay); - - return (True); -} - -int -xf86removeModule(XF86ConfigPtr config, XF86LoadPtr load) -{ - XF86LoadPtr prev, mod; - - if (config == NULL || config->conf_modules == NULL || - config->conf_modules->mod_load_lst == NULL) - return (False); - - for (mod = prev = config->conf_modules->mod_load_lst; - mod != NULL; prev = mod, mod = (XF86LoadPtr)(mod->list.next)) - if (load == mod) { - if (mod == prev) - config->conf_modules->mod_load_lst = - (XF86LoadPtr)(mod->list.next); - else - prev->list.next = mod->list.next; - XtFree(mod->load_name); - xf86optionListFree(mod->load_opt); - - return (True); - } - - return (False); -} - -int -xf86removeModes(XF86ConfigPtr config, XF86ConfModesPtr modes) -{ - XF86ConfModesPtr mod; - XF86ConfModeLinePtr ml, next; - XF86ConfMonitorPtr mon; - - if (config == NULL || modes == NULL) - return (False); - - /* check if modes is in config */ - if ((mod = config->conf_modes_lst) == modes) - config->conf_modes_lst = (XF86ConfModesPtr)(mod->list.next); - else - for (; mod != NULL; mod = (XF86ConfModesPtr)(mod->list.next)) - if ((XF86ConfModesPtr)(mod->list.next) == modes) { - mod->list.next = modes->list.next; - break; - } - - if (mod == NULL) - return (False); - - /* remove references in monitor sections */ - mon = config->conf_monitor_lst; - while (mon) { - XF86ConfModesLinkPtr m, p; - - m = p = mon->mon_modes_sect_lst; - while (m) { - if (m->ml_modes == modes) { - XtFree(m->ml_modes_str); - if (m == mon->mon_modes_sect_lst) - p = mon->mon_modes_sect_lst = - (XF86ConfModesLinkPtr)(m->list.next); - else { - p->list.next = m->list.next; - p = p->list.next; - } - XtFree((XtPointer)m); - m = p; - continue; - } - p = m; - m = (XF86ConfModesLinkPtr)(m->list.next); - } - mon = (XF86ConfMonitorPtr)(mon->list.next); - } - - /* free modelines */ - ml = modes->mon_modeline_lst; - while (ml) { - next = (XF86ConfModeLinePtr)(ml->list.next); - XtFree(ml->ml_identifier); - XtFree((XtPointer)ml); - ml = next; - } - - /* free mode */ - XtFree(modes->modes_identifier); - XtFree((XtPointer)modes); - - return (True); -} - -int -xf86removeModesModeLine(XF86ConfModesPtr modes, XF86ConfModeLinePtr modeline) -{ - XF86ConfModeLinePtr ml, prev; - - if (modes == NULL || modeline == NULL || modes->mon_modeline_lst == NULL) - return (False); - - for (ml = prev = modes->mon_modeline_lst; ml; - prev = ml, ml = (XF86ConfModeLinePtr)(ml->list.next)) - if (ml == modeline) { - if (prev == ml) - modes->mon_modeline_lst = (XF86ConfModeLinePtr)(ml->list.next); - else - prev->list.next = ml->list.next; - XtFree(modeline->ml_identifier); - XtFree((XtPointer)modeline); - return (True); - } - - return (False); -} - -int -xf86removeMonitorModeLine(XF86ConfMonitorPtr monitor, XF86ConfModeLinePtr modeline) -{ - XF86ConfModeLinePtr ml, prev; - - if (monitor == NULL || modeline == NULL || monitor->mon_modeline_lst == NULL) - return (False); - - for (ml = prev = monitor->mon_modeline_lst; ml; - prev = ml, ml = (XF86ConfModeLinePtr)(ml->list.next)) - if (ml == modeline) { - if (prev == ml) - monitor->mon_modeline_lst = (XF86ConfModeLinePtr)(ml->list.next); - else - prev->list.next = ml->list.next; - XtFree(modeline->ml_identifier); - XtFree((XtPointer)modeline); - return (True); - } - - return (False); -} - -int -xf86removeMonitorModesLink(XF86ConfMonitorPtr monitor, XF86ConfModesLinkPtr link) -{ - XF86ConfModesLinkPtr lnk, prev; - - if (monitor == NULL || link == NULL || monitor->mon_modes_sect_lst == NULL) - return (False); - - for (lnk = prev = monitor->mon_modes_sect_lst; lnk != NULL; - prev = lnk, lnk = (XF86ConfModesLinkPtr)(lnk->list.next)) - if (lnk == link) { - if (prev == lnk) - monitor->mon_modes_sect_lst = (XF86ConfModesLinkPtr)(lnk->list.next); - else - prev->list.next = lnk->list.next; - XtFree(link->ml_modes_str); - XtFree((XtPointer)link); - - return (True); - } - - return (False); -} - -int -xf86removeScreenAdaptorLink(XF86ConfScreenPtr scrn, XF86ConfAdaptorLinkPtr link) -{ - XF86ConfAdaptorLinkPtr lnk, prev; - - if (scrn == NULL || link == NULL || scrn->scrn_adaptor_lst == NULL) - return (False); - - for (lnk = prev = scrn->scrn_adaptor_lst; lnk != NULL; - prev = lnk, lnk = (XF86ConfAdaptorLinkPtr)(lnk->list.next)) - if (lnk == link) { - if (prev == lnk) - scrn->scrn_adaptor_lst = - (XF86ConfAdaptorLinkPtr)(lnk->list.next); - else - prev->list.next = lnk->list.next; - XtFree(link->al_adaptor_str); - XtFree((XtPointer)link); - - return (True); - } - - return (False); -} - -int -xf86removeScreenDisplay(XF86ConfScreenPtr scrn, XF86ConfDisplayPtr display) -{ - XF86ConfDisplayPtr dsp, prev; - - if (scrn == NULL || display == NULL || scrn->scrn_display_lst == NULL) - return (False); - - for (dsp = prev = scrn->scrn_display_lst; dsp != NULL; - prev = dsp, dsp = (XF86ConfDisplayPtr)(dsp->list.next)) - if (dsp == display) { - if (prev == dsp) - scrn->scrn_display_lst = - (XF86ConfDisplayPtr)(dsp->list.next); - else - prev->list.next = dsp->list.next; - xf86optionListFree(display->disp_option_lst); - XtFree((XtPointer)display->disp_visual); - xf86freeModeList(display->disp_mode_lst); - XtFree((XtPointer)display); - - return (True); - } - - return (False); -} - -int -xf86removeVideoAdaptor(XF86ConfigPtr config, XF86ConfVideoAdaptorPtr video) -{ - XF86ConfVideoAdaptorPtr vid; - XF86ConfScreenPtr scrn; - XF86ConfVideoPortPtr vp, next; - - if (config == NULL || video == NULL) - return (False); - - /* check if video is in config and update videoadaptor list */ - if ((vid = config->conf_videoadaptor_lst) == video) - config->conf_videoadaptor_lst = (XF86ConfVideoAdaptorPtr)(vid->list.next); - else - for (; vid != NULL; vid = (XF86ConfVideoAdaptorPtr)(vid->list.next)) - if ((XF86ConfVideoAdaptorPtr)(vid->list.next) == video) { - vid->list.next = video->list.next; - break; - } - - if (vid == NULL) - return (False); - - /* remove references in screen sections */ - scrn = config->conf_screen_lst; - while (scrn) { - XF86ConfAdaptorLinkPtr v, p; - - v = p = scrn->scrn_adaptor_lst; - while (v) { - if (v->al_adaptor == video) { - XtFree(v->al_adaptor_str); - if (v == scrn->scrn_adaptor_lst) - p = scrn->scrn_adaptor_lst = - (XF86ConfAdaptorLinkPtr)(v->list.next); - else { - p->list.next = v->list.next; - p = p->list.next; - } - XtFree((XtPointer)v); - v = p; - continue; - } - p = v; - v = (XF86ConfAdaptorLinkPtr)(v->list.next); - } - scrn = (XF86ConfScreenPtr)(scrn->list.next); - } - - /* free videoports */ - vp = video->va_port_lst; - while (vp) { - next = (XF86ConfVideoPortPtr)(vp->list.next); - XtFree(vp->vp_identifier); - xf86optionListFree(vp->vp_option_lst); - XtFree((XtPointer)vp); - vp = next; - } - - /* free videoadaptor */ - XtFree(video->va_identifier); - XtFree(video->va_vendor); - XtFree(video->va_board); - XtFree(video->va_busid); - XtFree(video->va_driver); - XtFree(video->va_fwdref); - xf86optionListFree(video->va_option_lst); - XtFree((XtPointer)video); - - return (True); -} - -int -xf86removeVideoPort(XF86ConfVideoAdaptorPtr va, XF86ConfVideoPortPtr vp) -{ - XF86ConfVideoPortPtr prev; - - if (va == NULL || vp == NULL) - return (False); - - if ((prev = va->va_port_lst) == vp) - va->va_port_lst = (XF86ConfVideoPortPtr)(va->va_port_lst->list.next); - else { - while (prev && (XF86ConfVideoPortPtr)(prev->list.next) != vp) - prev = (XF86ConfVideoPortPtr)(prev->list.next); - if (prev == NULL) - return (False); - prev->list.next = vp->list.next; - } - - xf86optionListFree(vp->vp_option_lst); - XtFree((XtPointer)vp); - - return (True); -} - -int -xf86removeDisplayMode(XF86ConfDisplayPtr display, XF86ModePtr mode) -{ - XF86ModePtr prev; - - if (display == NULL || mode == NULL) - return (False); - - if ((prev = display->disp_mode_lst) == mode) - display->disp_mode_lst = (XF86ModePtr)(display->disp_mode_lst->list.next); - else { - while (prev && (XF86ModePtr)(prev->list.next) != mode) - prev = (XF86ModePtr)(prev->list.next); - if (prev == NULL) - return (False); - prev->list.next = mode->list.next; - } - - XtFree((XtPointer)mode); - - return (True); -} - -int -xf86removeVendor(XF86ConfigPtr config, XF86ConfVendorPtr vendor) -{ - XF86ConfVendorPtr prev; - - if (config == NULL || vendor == NULL) - return (False); - - if ((prev = config->conf_vendor_lst) == vendor) - config->conf_vendor_lst = (XF86ConfVendorPtr)(config->conf_vendor_lst->list.next); - else { - while (prev && (XF86ConfVendorPtr)(prev->list.next) != vendor) - prev = (XF86ConfVendorPtr)(prev->list.next); - if (prev == NULL) - return (False); - prev->list.next = vendor->list.next; - } - - xf86optionListFree(vendor->vnd_option_lst); - xf86freeVendorSubList(vendor->vnd_sub_lst); - XtFree(vendor->vnd_identifier); - XtFree((XtPointer)vendor); - - return (True); -} - -int -xf86removeVendorSub(XF86ConfVendorPtr vendor, XF86ConfVendSubPtr sub) -{ - XF86ConfVendSubPtr prev; - - if (vendor == NULL || sub == NULL) - return (False); - - if ((prev = vendor->vnd_sub_lst) == sub) - vendor->vnd_sub_lst = (XF86ConfVendSubPtr)(vendor->vnd_sub_lst->list.next); - else { - while (prev && (XF86ConfVendSubPtr)(prev->list.next) != sub) - prev = (XF86ConfVendSubPtr)(prev->list.next); - if (prev == NULL) - return (False); - prev->list.next = sub->list.next; - } - - xf86optionListFree(sub->vs_option_lst); - XtFree(sub->vs_name); - XtFree(sub->vs_identifier); - XtFree((XtPointer)sub); - - return (True); -} - -int -xf86removeBuffers(XF86ConfDRIPtr dri, XF86ConfBuffersPtr buf) -{ - XF86ConfBuffersPtr prev; - - if (dri == NULL || buf == NULL) - return (False); - - if ((prev = dri->dri_buffers_lst) == buf) - dri->dri_buffers_lst = (XF86ConfBuffersPtr)(dri->dri_buffers_lst->list.next); - else { - while (prev && (XF86ConfBuffersPtr)(prev->list.next) != buf) - prev = (XF86ConfBuffersPtr)(prev->list.next); - if (prev == NULL) - return (False); - prev->list.next = buf->list.next; - } - - XtFree(buf->buf_flags); - XtFree((XtPointer)buf); - - return (True); -} - -int -xf86renameInput(XF86ConfigPtr config, XF86ConfInputPtr input, char *name) -{ - XF86ConfLayoutPtr lay = config->conf_layout_lst; - - if (config == NULL || input == NULL || name == NULL || *name == '\0') - return (False); - - while (lay != NULL) { - XF86ConfInputrefPtr iref = lay->lay_input_lst; - - while (iref != NULL) { - if (strcasecmp(input->inp_identifier, iref->iref_inputdev_str) == 0) { - XtFree(iref->iref_inputdev_str); - iref->iref_inputdev_str = XtNewString(name); - } - iref = (XF86ConfInputrefPtr)(iref->list.next); - } - lay = (XF86ConfLayoutPtr)(lay->list.next); - } - - XtFree(input->inp_identifier); - input->inp_identifier = XtNewString(name); - - return (True); -} - -int -xf86renameDevice(XF86ConfigPtr config, XF86ConfDevicePtr dev, char *name) -{ - XF86ConfScreenPtr scr = config->conf_screen_lst; - - if (config == NULL || dev == NULL || name == NULL || *name == '\0') - return (False); - - while (scr != NULL) { - if (scr->scrn_device == dev) { - XtFree(scr->scrn_device_str); - scr->scrn_device_str = XtNewString(name); - } - - scr = (XF86ConfScreenPtr)(scr->list.next); - } - - XtFree(dev->dev_identifier); - dev->dev_identifier = XtNewString(name); - - return (True); -} - -int -xf86renameMonitor(XF86ConfigPtr config, XF86ConfMonitorPtr mon, char *name) -{ - XF86ConfScreenPtr scr = config->conf_screen_lst; - - if (config == NULL || mon == NULL || name == NULL || *name == '\0') - return (False); - - while (scr != NULL) { - if (scr->scrn_monitor == mon) { - XtFree(scr->scrn_monitor_str); - scr->scrn_monitor_str = XtNewString(name); - } - - scr = (XF86ConfScreenPtr)(scr->list.next); - } - - XtFree(mon->mon_identifier); - mon->mon_identifier = XtNewString(name); - - return (True); -} - -int -xf86renameLayout(XF86ConfigPtr config, XF86ConfLayoutPtr layout, char *name) -{ - if (config == NULL || layout == NULL || name == NULL || *name == '\0') - return (False); - - XtFree(layout->lay_identifier); - layout->lay_identifier = XtNewString(name); - - return (True); -} - -int -xf86renameScreen(XF86ConfigPtr config, XF86ConfScreenPtr scrn, char *name) -{ - XF86ConfLayoutPtr lay = config->conf_layout_lst; - - if (config == NULL || scrn == NULL || name == NULL || *name == '\0') - return (False); - - while (lay != NULL) { - XF86ConfAdjacencyPtr adj = lay->lay_adjacency_lst; - - while (adj != NULL) { - if (adj->adj_screen == scrn) { - XtFree(adj->adj_screen_str); - adj->adj_screen_str = XtNewString(name); - } - else if (adj->adj_top == scrn) { - XtFree(adj->adj_top_str); - adj->adj_top_str = XtNewString(name); - } - else if (adj->adj_bottom == scrn) { - XtFree(adj->adj_bottom_str); - adj->adj_bottom_str = XtNewString(name); - } - else if (adj->adj_left == scrn) { - XtFree(adj->adj_left_str); - adj->adj_left_str = XtNewString(name); - } - else if (adj->adj_right == scrn) { - XtFree(adj->adj_right_str); - adj->adj_right_str = XtNewString(name); - } - else if (adj->adj_refscreen != NULL && - strcasecmp(adj->adj_refscreen, name) == 0) { - XtFree(adj->adj_refscreen); - adj->adj_refscreen = XtNewString(name); - } - - adj = (XF86ConfAdjacencyPtr)(adj->list.next); - } - lay = (XF86ConfLayoutPtr)(lay->list.next); - } - - XtFree(scrn->scrn_identifier); - scrn->scrn_identifier = XtNewString(name); - - return (True); -} diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/xf86config.h b/xorg-server/hw/xfree86/utils/xorgcfg/xf86config.h deleted file mode 100644 index 9387d782f..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/xf86config.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Conectiva Linux shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Conectiva Linux. - * - * Author: Paulo César Pereira de Andrade - * - */ - -#include "config.h" - -#ifndef _xf86cfg_xf86config_h -#define _xf86cfg_xf86config_h - -#define xf86addInput(head, ptr) \ - (XF86ConfInputPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addInputref(head, ptr) \ - (XF86ConfInputrefPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addDevice(head, ptr) \ - (XF86ConfDevicePtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addDisplayMode(head, ptr) \ - (XF86ModePtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addMonitor(head, ptr) \ - (XF86ConfMonitorPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addScreen(head, ptr) \ - (XF86ConfScreenPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addLayout(head, ptr) \ - (XF86ConfLayoutPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addModeLine(head, ptr) \ - (XF86ConfModeLinePtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addModes(head, ptr) \ - (XF86ConfModesPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addModesLink(head, ptr) \ - (XF86ConfModesLinkPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addModule(head, ptr) \ - (XF86LoadPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addScreenAdaptor(head, ptr) \ - (XF86ConfAdaptorLinkPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addScreenDisplay(head, ptr) \ - (XF86ConfDisplayPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addVideoAdaptor(head, ptr) \ - (XF86ConfVideoAdaptorPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addVideoPort(head, ptr) \ - (XF86ConfVideoPortPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addAdjacency(head, ptr) \ - (XF86ConfAdjacencyPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addVendor(head, ptr) \ - (XF86ConfVendorPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addVendorSub(head, ptr) \ - (XF86ConfVendSubPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) -#define xf86addBuffers(head, ptr) \ - (XF86ConfBuffersPtr)xf86addListItem((GenericListPtr)(head), (GenericListPtr)(ptr)) - - -int xf86removeOption(XF86OptionPtr*, char*); -int xf86removeInput(XF86ConfigPtr, XF86ConfInputPtr); -int xf86removeInputRef(XF86ConfLayoutPtr, XF86ConfInputPtr); -int xf86removeDevice(XF86ConfigPtr, XF86ConfDevicePtr); -int xf86removeDisplayMode(XF86ConfDisplayPtr, XF86ModePtr); -int xf86removeMonitor(XF86ConfigPtr, XF86ConfMonitorPtr); -int xf86removeScreen(XF86ConfigPtr, XF86ConfScreenPtr); -int xf86removeAdjacency(XF86ConfLayoutPtr, XF86ConfAdjacencyPtr); -int xf86removeInactive(XF86ConfLayoutPtr, XF86ConfInactivePtr); -int xf86removeLayout(XF86ConfigPtr, XF86ConfLayoutPtr); -int xf86removeModule(XF86ConfigPtr, XF86LoadPtr); -int xf86removeModes(XF86ConfigPtr, XF86ConfModesPtr); -int xf86removeModesModeLine(XF86ConfModesPtr, XF86ConfModeLinePtr); -int xf86removeMonitorModeLine(XF86ConfMonitorPtr, XF86ConfModeLinePtr); -int xf86removeMonitorModesLink(XF86ConfMonitorPtr, XF86ConfModesLinkPtr); -int xf86removeScreenAdaptorLink(XF86ConfScreenPtr, XF86ConfAdaptorLinkPtr); -int xf86removeScreenDisplay(XF86ConfScreenPtr, XF86ConfDisplayPtr); -int xf86removeVideoAdaptor(XF86ConfigPtr, XF86ConfVideoAdaptorPtr); -int xf86removeVideoPort(XF86ConfVideoAdaptorPtr, XF86ConfVideoPortPtr); -int xf86removeVendor(XF86ConfigPtr, XF86ConfVendorPtr); -int xf86removeVendorSub(XF86ConfVendorPtr, XF86ConfVendSubPtr); -int xf86removeBuffers(XF86ConfDRIPtr, XF86ConfBuffersPtr); - -int xf86renameInput(XF86ConfigPtr, XF86ConfInputPtr, char*); -int xf86renameDevice(XF86ConfigPtr, XF86ConfDevicePtr, char*); -int xf86renameMonitor(XF86ConfigPtr, XF86ConfMonitorPtr, char*); -int xf86renameLayout(XF86ConfigPtr, XF86ConfLayoutPtr, char*); -int xf86renameScreen(XF86ConfigPtr, XF86ConfScreenPtr, char*); - -extern void xf86freeAdaptorLinkList(XF86ConfAdaptorLinkPtr); -extern void xf86freeDisplayList(XF86ConfDisplayPtr); -extern void xf86freeModeList(XF86ModePtr); -extern void xf86freeVendorSubList(XF86ConfVendSubPtr); - -#endif /* _xf86cfg_xf86config_h */ diff --git a/xorg-server/hw/xfree86/utils/xorgcfg/xorgcfg.man.pre b/xorg-server/hw/xfree86/utils/xorgcfg/xorgcfg.man.pre deleted file mode 100644 index 71e75e2d8..000000000 --- a/xorg-server/hw/xfree86/utils/xorgcfg/xorgcfg.man.pre +++ /dev/null @@ -1,148 +0,0 @@ -.\" -.\" $XdotOrg: $ -.\" Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) -.\" -.\" Permission is hereby granted, free of charge, to any person obtaining a -.\" copy of this software and associated documentation files (the "Software"), -.\" to deal in the Software without restriction, including without limitation -.\" the rights to use, copy, modify, merge, publish, distribute, sublicense, -.\" and/or sell copies of the Software, and to permit persons to whom the -.\" Software is furnished to do so, subject to the following conditions: -.\" -.\" The above copyright notice and this permission notice shall be included in -.\" all copies or substantial portions of the Software. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -.\" CONECTIVA LINUX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -.\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -.\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -.\" SOFTWARE. -.\" -.\" Except as contained in this notice, the name of Conectiva Linux shall -.\" not be used in advertising or otherwise to promote the sale, use or other -.\" dealings in this Software without prior written authorization from -.\" Conectiva Linux. -.\" -.\" Author: Paulo César Pereira de Andrade -.\" -.\" $XFree86: xc/programs/Xserver/hw/xfree86/xf86cfg/xf86cfg.man,v 1.9 2002/12/30 14:34:02 herrb Exp $ -.\" -.TH xorgcfg __appmansuffix__ __vendorversion__ -.SH NAME -xorgcfg - Graphical configuration tool for __xservername__ -.SH SYNOPSIS -.B xorgcfg -[-config \fIconfigfile\fP] [-modulepath \fImoduledir\fP] -[-fontpath \fIfontsdir\fP] [-toolkitoption ...] -.SH DESCRIPTION -.I Xorgcfg -is a tool to configure\fI __xservername__\fP, and can be used to either write the -initial configuration file or make customizations to the current configuration. -.PP -When the \fBDISPLAY\fP environment variable is not set, xorgcfg will run -the command\fI __xservername__ -configure\fP to allow the xserver to detect the -hardware in the computer, and write an initial\fI __xconfigfile__\fP file -in the user's home directory. Then, it will start -__xservername__ and allow customizations. -.PP -If the \fBDISPLAY\fP environment variable is set, xorgcfg will read the -default\fI __xconfigfile__\fP, which may or may not be the one being used by -the current server, and allow customizations. -.PP -To use an alternative location for modules or fonts the respective search -paths may be specified. -.PP -Unless there is an \fBApply\fP button in the current xorgcfg dialog, the -changes made will take place the next time\fI __xservername__\fP is started. -.PP -Xorgcfg allows addition and configuration of new devices, such as video cards, -monitors, keyboards and mouses. -.PP -Screen layout configuration for xinerama or traditional multi-head is also -available. -.PP -Modelines can be configured or optimized. -.PP -AccessX basic configurations can be made in the xorgcfg's accessx section. - -.SH OPTIONS -.TP 8 -.I -config -Specifies an alternate __xconfigfile__ file for configuration. -.TP 8 -.I -modulepath -Specifies where xorgcfg, and the server it may start, should look for -__xservername__ modules. -.TP 8 -.I -serverpath -Specifies the complete path, not including the binary name, of the -__xservername__ binary. -.TP 8 -.I -fontpath -Specifies the path to the fonts that should be used by the server started -by xorgcfg. -.TP 8 -.I -textmode -If xorgcfg was compiled with support for ncurses, this option makes xorgcfg -enter a text mode interface. -.TP 8 -.I -nomodules -When built with support for loading modules, this options changes xorgcfg -behaviour, so that it will not load any modules, and thus start quicker. - -.SH ENVIRONMENT -.TP 8 -.I DISPLAY -Default host and display number. -.TP 8 -.I XWINHOME -Directory where __xservername__ was installed, defaults to __projectroot__. -.TP 8 -.I XENVIRONMENT -Name of a resource file that overrides the global resources -stored in the RESOURCE_MANAGER property. - -.SH FILES -.TP 8 -.I /etc/__xconfigfile__ -Server configuration file -.TP 8 -.I /etc/X11/__xconfigfile__ -Server configuration file -.TP 8 -.I __projectroot__/etc/__xconfigfile__ -Server configuration file -.TP 8 -.IR __projectroot__/lib/X11/__xconfigfile__. hostname -Server configuration file -.TP 8 -.I __projectroot__/lib/X11/__xconfigfile__ -Server configuration file -.TP 8 -.I __projectroot__/lib/X11/app-default/XOrgCfg -Specifies xorgcfg resources -.TP 8 -.I __projectroot__/lib/X11/xkb/X0-config.keyboard -Keyboard specific configuration - -.SH "SEE ALSO" -.IR __xservername__ (__appmansuffix__), -.IR __xconfigfile__ (__filemansuffix__) - -.SH COPYRIGHT -.TP 8 -Copyright 2000, Conectiva Linux S.A. -\fIhttp://www.conectiva.com\fP -.TP 8 -Copyright 2000, The XFree86 Project -\fIhttp://www.XFree86.org\fP - -.SH AUTHORS -.TP 8 -Paulo C\'esar Pereira de Andrade \fI\fP -originally for The XFree86 Project. - -.SH BUGS -Probably. diff --git a/xorg-server/hw/xfree86/utils/xorgconfig/Cards b/xorg-server/hw/xfree86/utils/xorgconfig/Cards deleted file mode 100644 index b95928c37..000000000 --- a/xorg-server/hw/xfree86/utils/xorgconfig/Cards +++ /dev/null @@ -1,3135 +0,0 @@ -# $XConsortium: Cards /main/27 1996/10/28 05:43:53 kaleb $ -# This is the database of card definitions used by xf86config. -# Each definition should have a NAME entry, CHIPSET (descriptive) and -# SERVER (one of Mono, VGA16, SVGA, S3, 8514, Mach8, Mach32, Mach64, AGX, -# P9000, W32, I128). -# A reference to another definition is made with SEE (already defined -# entries are not overridden). -# Optional entries are RAMDAC (identifier), CLOCKCHIP (identifier), -# DACSPEED, NOCLOCKPROBE (advises never to probe clocks), UNSUPPORTED -# (indicates card that is not yet properly supported by a dedicated -# server). A LINE entry adds a line of text to be included in the -# Device section (can include options or comments). -# There's no CLOCKS option (although a Clocks line can be included -# with LINE), as it is very undesirable to have a Clocks line that -# is incorrect. The idea is that the Clocks are probed for to be -# sure (a commented suggested Clocks line can be included). -# -# The majority of entries are just a binding of a model name to a -# chipset/server and untested. -# -# $XFree86: xc/programs/Xserver/hw/xfree86/xf86config/Cards,v 3.79 2002/10/16 01:31:05 dawes Exp $ - -# VGA - -NAME * Generic VGA compatible -SERVER VGA16 -DRIVER vga - -NAME * Generic VESA compatible -SERVER VGA16 -DRIVER vesa - -NAME * Unsupported VGA compatible -SERVER VGA16 -DRIVER vga -UNSUPPORTED - - -# # -# generic # -# # - -NAME ** Alliance Pro Motion (generic) [apm] -#CHIPSET apm -SERVER SVGA -DRIVER apm -LINE #Option "no_accel" - -NAME ** Ark Logic (generic) [ark] -#CHIPSET ark -SERVER SVGA -DRIVER ark - -NAME ** ASPEED Technology (generic) [ast] -#CHIPSET ast -SERVER SVGA -DRIVER ast - -NAME ** ATI (generic) [ati] -#CHIPSET ati -SERVER SVGA -DRIVER ati - -NAME ** ATI Rage 128 based (generic) [r128] -#CHIPSET r128 -SERVER SVGA -DRIVER r128 - -NAME ** ATI Radeon (generic) [radeon] -#CHIPSET radeon -SERVER SVGA -DRIVER radeon - -NAME ** Chips and Technologies (generic) [chips] -#CHIPSET chips -SERVER SVGA -DRIVER chips -LINE # Option "suspend_hack" -LINE # Option "STN" -LINE # Option "no_stretch" -LINE # Option "no_center" -LINE # Option "use_modeline" -LINE # Option "fix_panel_size" -LINE # videoram 512 -LINE # Option "noaccel" -LINE # Option "no_bitblt" -LINE # Option "xaa_no_color_exp" -LINE # Option "xaa_benchmark" -LINE # Option "hw_cursor" -LINE # Option "nolinear" -LINE # MemBase 0x03b00000 -LINE # Option "hw_clocks" -LINE # Textclockfreq 25.175 - -NAME ** Cirrus Logic (generic) [cirrus] -#CHIPSET cirrus -SERVER SVGA -DRIVER cirrus -LINE # MemBase 0x00e00000 # ISA card that maps to 14Mb -LINE # MemBase 0x04000000 # VLB card that maps to 64Mb -LINE # MemBase 0x80000000 # VLB card that maps to 2048Mb -LINE # MemBase 0x02000000 # VLB card that maps to 32Mb -LINE # Option "linear" -LINE # Option "fifo_conservative" - -NAME ** Cyrix MediaGX (generic) [cyrix] -#CHIPSET cyrix -SERVER SVGA -DRIVER cyrix - -NAME ** Linux framebuffer (generic) [fbdev] -#CHIPSET fbdev -SERVER SVGA -DRIVER fbdev - -NAME ** 3DLabs, TI (generic) [glint] -#CHIPSET glint -SERVER SVGA -DRIVER glint -LINE #Option "no_accel" - -NAME ** Number Nine I128 (generic) [i128] -#CHIPSET i128 -SERVER SVGA -DRIVER i128 - -NAME ** Intel i740 (generic) [i740] -#CHIPSET i740 -SERVER SVGA -DRIVER i740 - -NAME ** Intel i810 (generic) [i810] -#CHIPSET i810 -SERVER SVGA -DRIVER i810 - -NAME ** Matrox Graphics (generic) [mga] -#CHIPSET mga -SERVER SVGA -DRIVER mga -LINE # Option "mga_sdram" - -NAME ** NeoMagic (generic) [neomagic] -#CHIPSET neomagic -SERVER SVGA -DRIVER neomagic -LINE # Chipset "NM2160" -LINE # IOBase 0xfea00000 -LINE # MemBase 0xfd000000 -LINE # VideoRam 2048 -LINE # DacSpeed 90 -LINE # Option "linear" -LINE # Option "nolinear" -LINE # Option "sw_cursor" -LINE # Option "hw_cursor" -LINE # Option "no_accel" -LINE # Option "intern_disp" -LINE # Option "extern_disp" -LINE # Option "mmio" -LINE # Option "no_mmio" -LINE # Option "lcd_center" -LINE # Option "no_stretch" - -NAME ** NVIDIA (generic) [nv] -#CHIPSET nv -SERVER SVGA -DRIVER nv - -NAME ** Rendition (generic) [rendition] -#CHIPSET rendition -SERVER SVGA -DRIVER rendition -LINE # Option "sw_cursor" - -NAME ** S3 (not ViRGE or Savage) (generic) [s3] -#CHIPSET s3 -SERVER SVGA -DRIVER s3 - -NAME ** S3 ViRGE (generic) [s3virge] -#CHIPSET s3virge -SERVER SVGA -DRIVER s3virge -LINE # Option "xaa_benchmark" -LINE # Option "fifo_moderate" -LINE # Option "pci_burst_on" -LINE # Option "pci_retry" -LINE # Option "lcd_center" -LINE # Set_LCDClk - -NAME ** S3 Savage (generic) [savage] -#CHIPSET savage -SERVER SVGA -DRIVER savage - -NAME ** Silicon Motion (generic) [siliconmotion] -#CHIPSET siliconmotion -SERVER SVGA -DRIVER siliconmotion - -NAME ** SiS (generic) [sis] -#CHIPSET sis -SERVER SVGA -DRIVER sis -LINE # Option "no_accel" -LINE # Option "fifo_moderate" -LINE # Option "fifo_conserv" -LINE # Option "fifo_aggressive" -LINE # Option "no_BitBlt" -LINE # Option "fast_vram" -LINE # Option "pci_burst_on" -LINE # Option "xaa_benchmark" -LINE # Option "ext_eng_queue" - -NAME ** 3Dfx (generic) [tdfx] -#CHIPSET tdfx -SERVER SVGA -DRIVER tdfx - -NAME ** DEC TGA (generic) [tga] -#CHIPSET tga -SERVER SVGA -DRIVER tga - -NAME ** Trident (generic) [trident] -#CHIPSET trident -SERVER SVGA -DRIVER trident - -NAME ** Tseng Labs (generic) [tseng] -#CHIPSET tseng -SERVER SVGA -DRIVER tseng -LINE # Option "linear" -LINE # Option "noaccel" -LINE # Option "power_saver" -LINE # Option "fast_dram" -LINE # Option "pci_retry" -LINE # Option "hibit_high" -LINE # Option "hibit_low" -LINE # MemBase 0x3C00000 - -NAME ** VMWare guest OS (generic) [vmware] -#CHIPSET vmware -SERVER SVGA -DRIVER vmware - - -#Chips & Technologies - -#untested -NAME Chips & Technologies CT65520 -CHIPSET ct65520 -SERVER SVGA -DRIVER chips -LINE # Device section for C&T cards. -LINE # Option "suspend_hack" -LINE # Option "STN" -LINE # Option "no_stretch" -LINE # Option "no_center" -LINE # Option "use_modeline" -LINE # Option "fix_panel_size" -LINE # videoram 512 - -NAME Chips & Technologies CT65525 -CHIPSET ct65525 -LINE # Option "nolinear" -LINE # MemBase 0x03b00000 -SEE Chips & Technologies CT65520 - -NAME Chips & Technologies CT65530 -CHIPSET ct65530 -SEE Chips & Technologies CT65525 - -NAME Chips & Technologies CT65535 -CHIPSET ct65535 -NOCLOCKPROBE -LINE # Option "hw_clocks" -LINE # Textclockfreq 25.175 -SEE Chips & Technologies CT65530 - -NAME Chips & Technologies CT65540 -CHIPSET ct65540 -NOCLOCKPROBE -LINE # Option "use_18bit_bus" -SEE Chips & Technologies CT65535 - -NAME Chips & Technologies CT65545 -CHIPSET ct65545 -NOCLOCKPROBE -LINE # Option "noaccel" -LINE # Option "no_bitblt" -LINE # Option "xaa_no_color_exp" -LINE # Option "xaa_benchmark" -LINE # Option "hw_cursor" -LINE # Option "mmio" -SEE Chips & Technologies CT65540 - -NAME Chips & Technologies CT65546 -CHIPSET ct65546 -SEE Chips & Technologies CT65545 - -NAME Chips & Technologies CT65548 -CHIPSET ct65548 -SEE Chips & Technologies CT65545 - -NAME Chips & Technologies CT65550 -CHIPSET ct65550 -NOCLOCKPROBE -LINE # Option "noaccel" -LINE # Option "no_bitblt" -LINE # Option "xaa_no_color_exp" -LINE # Option "xaa_benchmark" -LINE # Option "hw_cursor" -LINE # Option "sync_on_green" -LINE # Option "fast_dram" -LINE # Option "use_vclk1" -LINE # Textclockfreq 25.175 -SEE Chips & Technologies CT65530 - -NAME Chips & Technologies CT65554 -CHIPSET ct65554 -SEE Chips & Technologies CT65550 - -NAME Chips & Technologies CT65555 -CHIPSET ct65555 -SEE Chips & Technologies CT65550 - -NAME Chips & Technologies CT68554 -CHIPSET ct68554 -SEE Chips & Technologies CT65550 - -NAME Chips & Technologies CT69000 -CHIPSET ct69000 -SEE Chips & Technologies CT65550 - -NAME Chips & Technologies CT69030 -CHIPSET ct69030 -SEE Chips & Technologies CT65550 - -NAME Chips & Technologies CT64200 -CHIPSET ct64200 -SERVER SVGA -DRIVER chips -LINE # Device section for C&T cards. -LINE # videoram 1024 - -NAME Chips & Technologies CT64300 -CHIPSET ct64300 -SERVER SVGA -DRIVER chips -LINE # Option "noaccel" -LINE # Option "no_bitblt" -LINE # Option "xaa_no_color_exp" -LINE # Option "xaa_benchmark" -LINE # Option "hw_cursor" -LINE # Option "nolinear" -LINE # MemBase 0x03b00000 -LINE # Option "hw_clocks" -LINE # Textclockfreq 25.175 -SEE Chips & Technologies CT64200 - -# Cirrus Logic - -#tested -NAME Cirrus Logic GD542x -SERVER SVGA -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE -LINE # Device section for Cirrus Logic GD5420/2/4/6/8/9-based cards. -LINE #MemBase 0x00e00000 -LINE #MemBase 0x04e00000 -LINE #Option "linear" - -#tested -NAME Cirrus Logic GD543x -CHIPSET CL-GD5430/5434/5436 -SERVER SVGA -DRIVER cirrus -NOCLOCKPROBE -LINE # Device section for Cirrus Logic GD5430/34-based cards. -LINE #MemBase 0x00e00000 # ISA card that maps to 14Mb -LINE #MemBase 0x04000000 # VLB card that maps to 64Mb -LINE #MemBase 0x80000000 # VLB card that maps to 2048Mb -LINE #MemBase 0x02000000 # VLB card that maps to 32Mb -LINE #Option "linear" - -NAME Cirrus Logic GD544x -CHIPSET CL-GD544x -SERVER SVGA -DRIVER cirrus -NOCLOCKPROBE - -NAME Creative Labs Graphics Blaster MA201 -SEE Cirrus Logic GD544x - -NAME Creative Labs Graphics Blaster MA202 -SEE Cirrus Logic GD544x - -#tested -NAME Cirrus Logic GD5462 -CHIPSET CL-GD5462 -SERVER SVGA -DRIVER cirrus -NOCLOCKPROBE -LINE #Option "fifo_conservative" - -#tested -NAME Cirrus Logic GD5464 -CHIPSET CL-GD5464 -SERVER SVGA -DRIVER cirrus -NOCLOCKPROBE -LINE #Option "fifo_conservative" - -#tested -NAME Cirrus Logic GD5465 -CHIPSET CL-GD5465 -SERVER SVGA -DRIVER cirrus -NOCLOCKPROBE -LINE #Option "fifo_conservative" - -NAME Creative Labs Graphics Blaster MA302 -CHIPSET CL-GD5462 -SEE Cirrus Logic GD5462 - -NAME Creative Labs Graphics Blaster MA334 -CHIPSET CL-GD5464 -SEE Cirrus Logic GD5464 - -NAME Creative Labs Graphics Blaster 3D -CHIPSET CL-GD5464 -SEE Cirrus Logic GD5464 - -#tested -NAME Cirrus Logic GD5480 -CHIPSET CL-GD5480 -SERVER SVGA -DRIVER cirrus -NOCLOCKPROBE - -#tested -NAME Diamond SpeedStar 64 -CHIPSET CL-GD5434 -SEE Cirrus Logic GD543x - -NAME Diamond SpeedStar64 Graphics 2000/2200 -CHIPSET CL-GD5434 -SEE Cirrus Logic GD543x - -NAME Diamond SpeedStar Pro SE (CL-GD5430/5434) -SEE Cirrus Logic GD543x - -NAME Diamond SpeedStar Pro 1100 -SEE Cirrus Logic GD542x - -NAME Orchid Kelvin 64 VLB Rev A -CHIPSET CL-GD5434 -SERVER SVGA -DRIVER cirrus -NOCLOCKPROBE -LINE # Device section for Orchid Kelvin 64 VLB Rev A -LINE # Linear framebuffer maps at 2048Mb. Some motherboards make linear addressing -LINE # impossible. Some cards map at 32Mb. -LINE #MemBase 0x02000000 # VLB card that maps to 32Mb -LINE #MemBase 0x04000000 # VLB card that maps to 64Mb -LINE MemBase 0x80000000 # VLB card that maps to 2048Mb -LINE #Option "linear" - -NAME Orchid Kelvin 64 VLB Rev B -CHIPSET CL-GD5434 -SERVER SVGA -DRIVER cirrus -NOCLOCKPROBE -LINE # Device section for Orchid Kelvin 64 VLB Rev B -LINE # Linear framebuffer maps at 32Mb. Some motherboards make linear addressing -LINE # impossible. Some cards map at 2048Mb. -LINE MemBase 0x02000000 # VLB card that maps to 32Mb -LINE #MemBase 0x04000000 # VLB card that maps to 64Mb -LINE #MemBase 0x80000000 # VLB card that maps to 2048Mb -LINE #Option "linear" - -NAME Orchid Kelvin 64 -CHIPSET CL-GD5434 -SEE Cirrus Logic GD543x - -NAME Intel 5430 -CHIPSET CL-GD5430 -SEE Cirrus Logic GD543x - -NAME STB Nitro (64) -CHIPSET CL-GD5434 -SEE Cirrus Logic GD543x - -NAME STB Nitro 64 Video -CHIPSET CL-GD5446 -SEE Cirrus Logic GD544x - -NAME STB Horizon -CHIPSET CL-GD5426/28 -SEE Cirrus Logic GD542x - -NAME STB Horizon Video -CHIPSET CL-GD5440 -SEE Cirrus Logic GD544x - -NAME Genoa 8500VL(-28) -CHIPSET CL-GD5426/28 -SEE Cirrus Logic GD542x - -NAME Diamond SpeedStar Pro (not SE) -CHIPSET CL-GD5426/28 -SEE Cirrus Logic GD542x - -NAME ALG-5434(E) -CHIPSET CL-GD5434 -SEE Cirrus Logic GD543x - -NAME Actix ProStar -CHIPSET CL-GD5426/5428 -SEE Cirrus Logic GD542x - -NAME Actix ProStar 64 -CHIPSET CL-GD5434 -SEE Cirrus Logic GD543x - -#tested -NAME Acumos AVGA3 -SEE Cirrus Logic GD542x - -NAME DFI-WG1000 -SEE Cirrus Logic GD542x - -NAME Spider VLB Plus -CHIPSET CL-GD5428 -SEE Cirrus Logic GD542x - -NAME VI720 -CHIPSET CL-GD5434 -SEE Cirrus Logic GD543x - -NAME Cirrus Logic GD62xx (laptop) -CHIPSET CL-GD6205/15/25/35 -SERVER SVGA -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE - -NAME Cirrus Logic GD64xx (laptop) -CHIPSET CL-GD6420/6440 -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME Cirrus Logic GD754x (laptop) -CHIPSET CL-GD7541/42/43/48 -SERVER SVGA -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE - -NAME Techworks Ultimate 3D -CHIPSET CL-GD5464 -SEE Cirrus Logic GD5464 - -NAME VideoLogic GrafixStar 550 -CHIPSET CL-GD5464 -SEE Cirrus Logic GD5464 - -NAME Jaton Video-70P -CHIPSET CL-GD5464 -SEE Cirrus Logic GD5464 - -NAME PixelView Combo TV Pro (Prolink) -CHIPSET CL-GD5480, 4MB -SERVER SVGA -DRIVER vga -UNSUPPORTED -LINE # COMMENT on card TV Tuner -NOCLOCKPROBE - -NAME PixelView Combo TV 3D AGP (Prolink) -CHIPSET CL-GD5465, 4MB -SERVER SVGA -DRIVER vga -UNSUPPORTED -LINE # COMMENT on card TV+FM Tuner -NOCLOCKPROBE - -NAME Creative Labs Graphics Blaster Eclipse (OEM Model CT6510) -SEE Cirrus Logic GD5465 - -NAME VideoLogic GrafixStar 560 (PCI/AGP) -SEE Cirrus Logic GD5465 - -NAME Cirrus Logic GD5446 (noname card) -CHIPSET CL-GD5446, 1MB (upgradable to 2MB). -SERVER SVGA -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE - -NAME Octek VL-VGA-26 -CHIPSET CL-GD5426 -SEE Cirrus Logic GD542x - -NAME Octek VL-VGA-28 -CHIPSET CL-GD5428 -SEE Cirrus Logic GD542x - -NAME Octek Combo-26 -CHIPSET CL-GD5426 -SEE Cirrus Logic GD542x - -NAME Octek Combo-28 -CHIPSET CL-GD5428 -SEE Cirrus Logic GD542x - -NAME Octek AVGA-20 -SEE Cirrus Logic GD542x - -# S3 801/805 - -NAME S3 801/805 (generic) -CHIPSET S3 801/805 -SERVER S3 -DRIVER vga -UNSUPPORTED - -NAME S3 86C801 (generic) -SEE S3 801/805 (generic) - -NAME S3 86C805 (generic) -SEE S3 801/805 (generic) - -#tested -NAME S3 801/805 with ATT20c490 RAMDAC -CHIPSET S3 801/805 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC att20c490 -LINE #Option "dac_8_bit" # Not supported by some 20c490 clones - -NAME S3 801/805 with SC1148{2,3,4} RAMDAC -CHIPSET S3 801/805 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC sc11482 - -NAME S3 801/805 with SC1148{5,7,9} RAMDAC -CHIPSET S3 801/805 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC sc11485 - -NAME S3 801/805 with S3 GenDAC -CHIPSET S3 801/805 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC s3gendac -CLOCKCHIP s3gendac - -NAME S3 801/805 with ATT20c490 RAMDAC and ICD2061A -CHIPSET S3 801/805 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC att20c490 -CLOCKCHIP icd2061a -LINE #Option "dac_8_bit" # Not supported by some 20c490 clones - -NAME S3 801/805 with Chrontel 8391 -CHIPSET S3 801/805 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC att20c490 -CLOCKCHIP ch8391 -LINE Option "dac_8_bit" - -#tested -NAME Actix GE32+ 2MB -CHIPSET S3 801/805 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC att20c490 -LINE #Option "dac_8_bit" - -NAME Actix GE32i -CHIPSET S3 805i -SERVER S3 -DRIVER vga -UNSUPPORTED - -NAME Orchid Fahrenheit VA -CHIPSET S3 801/805 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC att20c490 - -NAME Orchid Fahrenheit 1280 -CHIPSET S3 801 -SERVER S3 -DRIVER vga -UNSUPPORTED -LINE #Probable clocks: -LINE #Clocks 25.20 28.32 32.50 0.00 40.00 44.90 50.40 65.00 -LINE #Clocks 78.00 56.70 63.10 75.10 80.00 89.90 100.90 31.50 - -NAME Orchid Fahrenheit-1280+ -CHIPSET S3 801/805 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC att20C490 -LINE Dacspeed 110 -LINE Option "dac_8_bit" -LINE #Option "nolinear" # VLB card may require this -LINE #Probable clocks: -LINE #Clocks 25.20 28.32 40.0 0.0 50.10 77.0 36.10 45.0 -LINE #Clocks 130.0 120.20 80.0 31.50 110.30 65.0 75.0 94.60 - -NAME Diamond Stealth 24 -CHIPSET S3 801/805 -SERVER S3 -DRIVER vga -UNSUPPORTED -CLOCKCHIP icd2061a -LINE #Option "nolinear" -LINE #Ramdac "att20c490" # The Diamond RAMDAC is reportedly compatible for 15bpp - -NAME Miro Crystal 8S -SEE S3 801/805 (generic) - -NAME Miro Crystal 10SD with GenDAC -SEE S3 801/805 with S3 GenDAC - -NAME Dell S3 805 -SEE S3 801/805 (generic) - -NAME STB Powergraph X-24 -SEE S3 801/805 with ATT20c490 RAMDAC and ICD2061A - -NAME JAX 8241 -SEE S3 801/805 with Chrontel 8391 - -NAME VL-41 -SEE S3 801/805 with Chrontel 8391 - -NAME SPEA Mirage -SEE S3 801/805 with Chrontel 8391 - -# S3 864/Trio64/Trio32/868 - -NAME S3 864 (generic) -SERVER S3 -DRIVER vga -UNSUPPORTED - -NAME S3 86C864 (generic) -SEE S3 864 (generic) - -NAME S3 Vision864 (generic) -SEE S3 864 (generic) - -NAME S3 864 with SDAC (86C716) -CHIPSET S3 864 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC s3_sdac -CLOCKCHIP s3_sdac -NOCLOCKPROBE - -NAME S3 864 with ATT 20C498 or 21C498 -CHIPSET S3 864 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC att20c498 - -NAME S3 864 with STG1703 -CHIPSET S3 864 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC stg1703 -NOCLOCKPROBE - -NAME S3 868 (generic) -CHIPSET S3 868 -SERVER S3 -DRIVER vga -UNSUPPORTED - -NAME S3 86C868 (generic) -SEE S3 868 (generic) - -NAME S3 Vision868 (generic) -SEE S3 868 (generic) - -NAME S3 868 with SDAC (86C716) -CHIPSET S3 868 -SERVER S3 -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE - -NAME S3 868 with ATT 20C498 or 21C498 -CHIPSET S3 868 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC att20c498 - -NAME S3 868 with ATT 20C409 -CHIPSET S3 868 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC att20c409 -NOCLOCKPROBE - -NAME Number Nine FX Motion 531 -CLOCKCHIP icd2061a -SEE S3 868 with ATT 20C498 or 21C498 - -NAME S3 Trio64 (generic) -SERVER S3 -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE - -NAME S3 86C764 (generic) -SEE S3 Trio64 (generic) - -NAME S3 Trio64V+ (generic) -SERVER S3 -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE - -NAME S3 86C765 (generic) -SEE S3 Trio64V+ (generic) - -NAME S3 Trio32 (generic) -CHIPSET S3 Trio32 -SERVER S3 -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE - -NAME Genoa Phantom 64i with S3 SDAC -DACSPEED 135 -SEE S3 864 with SDAC (86C716) - -NAME Number Nine GXE64 -CHIPSET S3 864 -SERVER S3 -DRIVER vga -UNSUPPORTED -CLOCKCHIP icd2061a -LINE Option "number_nine" - -NAME Number Nine GXE64 with S3 Trio64 -SEE S3 Trio64 (generic) - -NAME Diamond Stealth 64 DRAM with S3 SDAC -DACSPEED 135 -SEE S3 864 with SDAC (86C716) - -NAME Diamond Stealth64 Graphics 2xx0 series (864 + SDAC) -DACSPEED 135 -SEE S3 864 with SDAC (86C716) - -NAME Diamond Stealth 64 DRAM with S3 Trio64 -SEE S3 Trio64 (generic) - -NAME Diamond Stealth64 Graphics 2xx0 series (Trio64) -SEE S3 Trio64 (generic) - -NAME Diamond Stealth 64 DRAM SE -SEE S3 Trio32 (generic) - -NAME Diamond Stealth64 Video 2001 series (2121/2201) -SEE S3 Trio64V+ (generic) - -NAME Actix GE64 -CLOCKCHIP icd2061a -SEE S3 864 (generic) - -NAME ELSA Winner 1000PRO with S3 SDAC -SEE S3 864 with SDAC (86C716) - -NAME ELSA Winner 1000PRO with STG1700 or AT&T RAMDAC -CHIPSET S3 864 -SERVER S3 -DRIVER vga -UNSUPPORTED -CLOCKCHIP icd2061a - -NAME ELSA Winner 1000PRO/X -SEE S3 868 with SDAC (86C716) - -NAME ELSA Winner 1000ISA -CHIPSET S3 805i -SERVER S3 -DRIVER vga -UNSUPPORTED -CLOCKCHIP icd2061a -LINE Option "dac_8_bit" -LINE # the following settings should be detected and set automatically by XF86_S3 -LINE # if the serial number of the ELSA card is printed correctly: -LINE #ClockChip "icd2061a" - -NAME Cardex Trio64 -SEE S3 Trio64 (generic) - -NAME Cardex Trio64Pro -SEE S3 Trio64 (generic) - -NAME Miro Crystal 12SD -SEE S3 Trio32 (generic) - -NAME Miro Crystal 22SD -SEE S3 Trio64 (generic) - -NAME Miro Crystal 20SD with ICS2494 (BIOS 1.xx) -SEE S3 864 with ATT 20C498 or 21C498 - -NAME Miro Crystal 20SD with ICD2061A (BIOS 2.xx) -CLOCKCHIP icd2061a -SEE S3 864 with ATT 20C498 or 21C498 - -NAME Miro Crystal 20SD VLB with S3 SDAC (BIOS 3.xx) -SEE S3 864 with SDAC (86C716) - -NAME Miro Crystal 20SD PCI with S3 SDAC -SEE S3 868 with SDAC (86C716) - -NAME ELSA Winner 1000AVI (SDAC version) -SEE S3 868 with SDAC (86C716) - -NAME ELSA Winner 1000AVI (AT&T 20C409 version) -SEE S3 868 with ATT 20C409 - -NAME Diamond Stealth Video DRAM -SEE S3 868 with SDAC (86C716) - -NAME Diamond Stealth64 Video 2120/2200 -SEE S3 868 with SDAC (86C716) - -NAME SPEA/V7 Mirage P64 -CLOCKCHIP ics2595 -SEE S3 864 (generic) - -NAME SPEA/V7 Mirage P64 with S3 Trio64 -SEE S3 Trio64 (generic) - -NAME Number Nine FX Vision 330 -SEE S3 Trio64 (generic) - -NAME Number Nine FX Motion 331 -SEE S3 Trio64V+ (generic) - -NAME ASUS Video Magic PCI V864 -SEE S3 864 (generic) - -NAME ASUS Video Magic PCI VT64 -SEE S3 Trio64 (generic) - -NAME VidTech FastMax P20 -SEE S3 864 (generic) - -NAME VideoLogic GrafixStar 500 -SEE S3 868 with SDAC (86C716) - -NAME VideoLogic GrafixStar 400 -SEE S3 Trio64V+ (generic) - -NAME VideoLogic GrafixStar 300 -SEE S3 Trio64 (generic) - -NAME 2 the Max MAXColor S3 Trio64V+ -SEE S3 Trio64V+ (generic) - -NAME DataExpert DSV3365 -SEE S3 Trio64V+ (generic) - -NAME ExpertColor DSV3365 -SEE S3 Trio64V+ (generic) - -NAME DSV3326 -SEE S3 Trio64V+ (generic) - -# S3 Trio64V2 - -NAME S3 Trio64V2 (generic) -SERVER S3 -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE - -NAME S3 Trio64V2/DX (generic) -SEE S3 Trio64V2 (generic) - -NAME S3 Trio64V2/GX (generic) -SEE S3 Trio64V2 (generic) - -NAME S3 86C775 (generic) -SEE S3 Trio64V2/DX (generic) - -NAME S3 86C785 (generic) -SEE S3 Trio64V2/GX (generic) - -NAME ELSA WINNER 1000/T2D -SEE S3 Trio64V2/DX (generic) - - -# S3 Aurora64V+ - -NAME S3 Aurora64V+ (generic) -CHIPSET S3 Aurora64V+ -SERVER S3 -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE -LINE # Option "lcd_center" -LINE # Set_LCDClk - -NAME S3 86CM65 -SEE S3 Aurora64V+ (generic) - -NAME SHARP 9080 -SEE S3 Aurora64V+ (generic) - -NAME SHARP 9090 -SEE S3 Aurora64V+ (generic) - -NAME COMPAQ Armada 7730MT -SEE S3 Aurora64V+ (generic) - -NAME COMPAQ Armada 7380DMT -SEE S3 Aurora64V+ (generic) - - -# S3 964/968 - -NAME S3 964 (generic) -CHIPSET S3 964 -SERVER S3 -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE - -NAME S3 86C964 (generic) -SEE S3 964 (generic) - -NAME S3 Vision964 (generic) -SEE S3 964 (generic) - -NAME S3 968 (generic) -CHIPSET S3 968 -SERVER S3 -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE - -NAME S3 86C968 (generic) -SEE S3 968 (generic) - -NAME S3 Vision968 (generic) -SEE S3 968 (generic) - -NAME Number Nine GXE64 Pro -CHIPSET S3 964 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC ti3025 -LINE Option "number_nine" - -NAME Diamond Stealth 64 VRAM -CLOCKCHIP icd2061a -LINE #Option "slow_vram" -SEE S3 964 (generic) - -NAME Diamond Stealth64 Video 3200 -CHIPSET S3 968 -LINE #Option "slow_vram" -SEE S3 968 (generic) - -NAME Diamond Stealth 64 Video VRAM (TI RAMDAC) -CHIPSET S3 968 -LINE #Option "slow_vram" -LINE #DacSpeed 220 -SEE S3 968 (generic) - -NAME Diamond Stealth64 Video 3240/3400 (TI RAMDAC) -CHIPSET S3 968 -LINE #Option "slow_vram" -LINE #DacSpeed 220 -SEE S3 968 (generic) - -NAME Diamond Stealth64 Video 3240/3400 (IBM RAMDAC) -CHIPSET S3 968 -LINE #Option "slow_vram" -RAMDAC ibm_rgb526 -LINE DacSpeed 220 -SEE S3 968 (generic) - -NAME Genoa VideoBlitz III AV -CHIPSET S3 968 -LINE #s3RefClk 50 -LINE #DACspeed 170 -SEE S3 968 (generic) - -NAME STB Velocity 64 Video -CHIPSET S3 968 -LINE #s3RefClk 24 -LINE #DACspeed 220 -SEE S3 968 (generic) - -NAME STB Powergraph 64 Video -SEE S3 Trio64V+ (generic) - -NAME STB Powergraph 64 -SEE S3 Trio64 (generic) - -NAME ELSA Winner 1000TRIO -SEE S3 Trio64 (generic) - -NAME ELSA Winner 1000TRIO/V -SEE S3 Trio64V+ (generic) - -NAME Hercules Graphite Terminator 64 -LINE Option "slow_vram" -LINE #s3RefClk 50 -LINE #DACspeed 170 -SEE S3 964 (generic) - -NAME Hercules Terminator 64/Video -SEE S3 Trio64V+ (generic) - -NAME Hercules Graphite Terminator 64/DRAM -SEE S3 Trio64 (generic) - -NAME Hercules Graphite Terminator Pro 64 -LINE #s3RefClk 16 -LINE #DACspeed 220 -SEE S3 968 (generic) - -NAME Number Nine FX Motion 771 -LINE #s3RefClk 16 -SEE S3 968 (generic) - -NAME Spider Tarantula 64 -SEE S3 964 (generic) - -NAME Miro Crystal 20SV -CHIPSET S3 964 -SERVER S3 -DRIVER vga -UNSUPPORTED -CLOCKCHIP icd2061a - -NAME Miro Crystal 40SV -CHIPSET S3 964 -SERVER S3 -DRIVER vga -UNSUPPORTED -CLOCKCHIP ti3025 - -NAME Miro Crystal 80SV -CHIPSET S3 968 -SERVER S3 -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE - -NAME Miro Video 20SV -CHIPSET S3 968 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC att20c505 -LINE #DacSpeed 150 -CLOCKCHIP ics9161a - -NAME SPEA Mercury 64 -CHIPSET S3 964 -SERVER S3 -DRIVER vga -UNSUPPORTED -CLOCKCHIP ics9161a -LINE #Option "spea_mercury" - -NAME ELSA Winner 2000PRO-2 -CHIPSET S3 964 -SERVER S3 -DRIVER vga -UNSUPPORTED -LINE #Option "ELSA_w2000pro" -NOCLOCKPROBE - -NAME ELSA Winner 2000PRO-4 -CHIPSET S3 964 -SERVER S3 -DRIVER vga -UNSUPPORTED -LINE #Option "ELSA_w2000pro" -NOCLOCKPROBE - -NAME ELSA Winner 2000PRO/X-2 -CHIPSET S3 968 -SERVER S3 -DRIVER vga -UNSUPPORTED -LINE #Option "sync_on_green" -NOCLOCKPROBE - -NAME ELSA Winner 2000PRO/X-4 -CHIPSET S3 968 -SERVER S3 -DRIVER vga -UNSUPPORTED -LINE #Option "sync_on_green" -NOCLOCKPROBE - -NAME ELSA Winner 2000PRO/X-8 -CHIPSET S3 968 -SERVER S3 -DRIVER vga -UNSUPPORTED -LINE #Option "sync_on_green" -NOCLOCKPROBE - -NAME ELSA Winner 2000AVI -CHIPSET S3 968 -SERVER S3 -DRIVER vga -UNSUPPORTED -LINE #Option "sync_on_green" -NOCLOCKPROBE - -NAME ELSA Gloria-4 -CHIPSET S3 968 -SERVER S3 -DRIVER vga -UNSUPPORTED -LINE #Option "sync_on_green" -NOCLOCKPROBE - -NAME ELSA Gloria-8 -CHIPSET S3 968 -SERVER S3 -DRIVER vga -UNSUPPORTED -LINE #Option "sync_on_green" -NOCLOCKPROBE - -NAME VideoLogic GrafixStar 700 -CHIPSET S3 968 -SERVER S3 -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE - -NAME LeadTek WinFast S430 -CHIPSET S3 968 -SERVER S3 -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE - -NAME WinFast S430 -SEE LeadTek WinFast S430 - -NAME LeadTek WinFast S510 -CHIPSET S3 968 -SERVER S3 -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE - -NAME WinFast S510 -SEE LeadTek WinFast S510 - -# S3 928 - -NAME S3 928 (generic) -CHIPSET S3 928 -SERVER S3 -DRIVER vga -UNSUPPORTED - -NAME S3 86C928 (generic) -SEE S3 928 (generic) - -NAME Actix Ultra -CHIPSET S3 928 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC att20c490 -LINE #Option "dac_8_bit" - -NAME Diamond Stealth Pro -CHIPSET S3 928 -SERVER S3 -DRIVER vga -UNSUPPORTED -CLOCKCHIP icd2061a -LINE #Ramdac "att20c490" # The Diamond RAMDAC is reportedly compatible for 15bpp -LINE #Option "no_linear" # Some VLB machines may require this - -NAME ELSA Winner 1000VL -CHIPSET S3 928 -SERVER S3 -DRIVER vga -UNSUPPORTED -LINE # the following settings should be detected and set automatically by XF86_S3 -LINE # if the serial number of the ELSA card is printed correctly: -LINE #ClockChip "icd2061a" -LINE #Membase 0xf8000000 - -NAME ELSA Winner 1000TwinBus -SEE ELSA Winner 1000VL - -NAME ELSA Winner 2000 -SEE S3 928 (generic) - -NAME Miro Crystal 16S -SEE S3 928 (generic) - -NAME SPEA/V7 Mercury -CHIPSET S3 928 -SERVER S3 -DRIVER vga -UNSUPPORTED -CLOCKCHIP sc11412 -LINE Option "spea_mercury" - -NAME STB Pegasus -CHIPSET S3 928 -SERVER S3 -DRIVER vga -UNSUPPORTED -RAMDAC bt485 -CLOCKCHIP icd2061a -LINE Option "stb_pegasus" -LINE #Option "sync_on_green" - -NAME Number Nine GXE Level 14/16 -CHIPSET S3 928 -SERVER S3 -DRIVER vga -UNSUPPORTED -DACSPEED 200 -CLOCKCHIP icd2061a -LINE Option "number_nine" -LINE #Option "nolinear" -LINE #Option "nomemaccess" - -NAME Number Nine GXE Level 10/11/12 -CHIPSET S3 928 -SERVER S3 -DRIVER vga -UNSUPPORTED -CLOCKCHIP icd2061a -LINE Option "number_nine" - -NAME 928Movie -CHIPSET S3 928 -SERVER S3 -DRIVER vga -UNSUPPORTED -CLOCKCHIP icd2595 -RAMDAC bt485 -LINE # pixel multiplexing not supported - -# S3 911/924 - -NAME S3 911/924 (generic) -CHIPSET S3 911/924 -SERVER S3 -DRIVER vga -UNSUPPORTED - -NAME S3 86C911 (generic) -SEE S3 911/924 (generic) - -NAME S3 86C924 (generic) -SEE S3 911/924 (generic) - -NAME Diamond Stealth VRAM -CHIPSET S3 911/924 -SERVER S3 -DRIVER vga -UNSUPPORTED -CLOCKCHIP icd2061a - -#NAME Orchid Fahrenheit 1280 -#SEE S3 911/924 (generic) - -NAME S3 924 with SC1148 DAC -CHIPSET S3 924 -SERVER S3 -DRIVER vga -UNSUPPORTED -LINE #Probable clocks: -LINE #Clocks 25.2 28.3 39.7 1.7 49.9 76.7 35.7 44 -LINE #Clocks 130.2 119.5 79.4 31.2 110.0 65.2 74.9 71.3 - -# S3 ViRGE,/DX,/GX and ViRGE/VX - -NAME S3 ViRGE (old S3V server) -CHIPSET S3 ViRGE -SERVER S3V -DRIVER s3virge -NOCLOCKPROBE - -NAME S3 ViRGE (generic) -CHIPSET S3 ViRGE -SERVER SVGA -DRIVER s3virge -NOCLOCKPROBE -LINE #Option "xaa_benchmark" -LINE #Option "fifo_moderate" -LINE #Option "pci_burst_on" -LINE #Option "pci_retry" - -NAME S3 ViRGE/DX (generic) -CHIPSET S3 ViRGE/DX -SERVER SVGA -DRIVER s3virge -NOCLOCKPROBE -LINE #Option "xaa_benchmark" -LINE #Option "fifo_moderate" -LINE #Option "pci_burst_on" -LINE #Option "pci_retry" - -NAME S3 ViRGE/GX (generic) -CHIPSET S3 ViRGE/GX -SERVER SVGA -DRIVER s3virge -NOCLOCKPROBE -LINE #Option "xaa_benchmark" -LINE #Option "fifo_moderate" -LINE #Option "pci_burst_on" -LINE #Option "pci_retry" - - -NAME S3 ViRGE/GX2 (generic) -CHIPSET S3 ViRGE/GX2 -SERVER SVGA -DRIVER s3virge -NOCLOCKPROBE -LINE #Option "xaa_benchmark" -LINE #Option "fifo_moderate" -LINE #Option "pci_burst_on" -LINE #Option "pci_retry" - -NAME S3 ViRGE/MX (generic) -CHIPSET S3 ViRGE/MX -SERVER SVGA -DRIVER s3virge -NOCLOCKPROBE -LINE #Option "lcd_center" -LINE #Set_LCDClk -LINE #Option "xaa_benchmark" -LINE #Option "fifo_moderate" -LINE #Option "pci_burst_on" -LINE #Option "pci_retry" - -NAME S3 ViRGE/MX+ (generic) -SEE S3 ViRGE/MX (generic) - - - - -NAME S3 86C325 (generic) -SEE S3 ViRGE (generic) - -NAME S3 86C375 (generic) -SEE S3 ViRGE/DX (generic) - -NAME S3 86C385 (generic) -SEE S3 ViRGE/GX (generic) - -NAME S3 86C357 (generic) -SEE S3 ViRGE/GX2 (generic) - -NAME S3 86C260 (generic) -SEE S3 ViRGE/MX (generic) - -NAME S3 86C280 (generic) -SEE S3 ViRGE/MX+ (generic) - - -NAME ELSA Victory 3D -SEE S3 ViRGE (generic) - -NAME ELSA Victory 3DX -SEE S3 ViRGE/DX (generic) - -NAME ELSA Winner 3000-S -SEE S3 ViRGE (generic) - -NAME Number Nine Visual 9FX Reality 332 -SEE S3 ViRGE (generic) - -NAME Number Nine FX Motion 332 -SEE S3 ViRGE (generic) - -NAME Diamond Stealth 3D 2000 -SEE S3 ViRGE (generic) - -NAME Diamond Stealth 3D 2000 PRO -SEE S3 ViRGE/DX (generic) - -NAME Diamond Multimedia Stealth 3D 2000 -SEE S3 ViRGE (generic) - -NAME Diamond Multimedia Stealth 3D 2000 PRO -SEE S3 ViRGE/DX (generic) - -NAME Canopus Co. Power Window 3DV -SEE S3 ViRGE (generic) - -NAME DataExpert DSV3325 -SEE S3 ViRGE (generic) - -NAME ExpertColor DSV3325 -SEE S3 ViRGE (generic) - -NAME DSV3325 -SEE S3 ViRGE (generic) - -NAME Hercules Terminator 64/3D -SEE S3 ViRGE (generic) - -NAME Hercules Terminator 3D/DX -SEE S3 ViRGE/DX (generic) - -NAME LeadTek WinFast 3D S600 -SEE S3 ViRGE (generic) - -NAME WinFast 3D S600 -SEE LeadTek WinFast 3D S600 - -NAME LeadTek WinFast 3D S680 -SEE S3 ViRGE/GX2 (generic) - -NAME Miro MiroMedia 3D -SEE S3 ViRGE (generic) - -NAME Orchid Technology Fahrenheit Video 3D -SEE S3 ViRGE (generic) - -NAME STB Systems Powergraph 3D -SEE S3 ViRGE (generic) - -NAME STB Nitro 3D -CHIPSET S3 ViRGE/GX -SEE S3 ViRGE/GX (generic) - -NAME MELCO WGP-VG4S -LINE #DACSpeed 191 162 111 83 -LINE #SetMClck 75 -SEE S3 ViRGE (generic) - - - -NAME S3 ViRGE/VX (generic) -CHIPSET S3 ViRGE/VX -SERVER SVGA -DRIVER s3virge -NOCLOCKPROBE -LINE #Option "xaa_benchmark" -LINE #Option "fifo_moderate" -LINE #Option "pci_burst_on" -LINE #Option "pci_retry" - - -NAME S3 86C988 (generic) -SEE S3 ViRGE/VX (generic) - -NAME ELSA Winner 3000 -SEE S3 ViRGE/VX (generic) - -NAME ELSA Winner 3000-M-22 -SEE S3 ViRGE/VX (generic) - -NAME ELSA Winner 3000-L-42 -SEE S3 ViRGE/VX (generic) - -NAME ELSA Winner 2000AVI/3D -SEE S3 ViRGE/VX (generic) - -NAME Diamond Stealth 3D 3000 -SEE S3 ViRGE/VX (generic) - -NAME STB Systems Velocity 3D -SEE S3 ViRGE/VX (generic) - -NAME MELCO WGP-VX8 -SEE S3 ViRGE/VX (generic) - -NAME Diamond Stealth 3D 4000 -SEE S3 ViRGE/GX2 (generic) - -NAME Toshiba Tecra 750CDT -SEE S3 ViRGE/MX (generic) - -NAME Toshiba Tecra 750DVD -SEE S3 ViRGE/MX (generic) - -NAME Toshiba Tecra 540CDT -SEE S3 ViRGE/MX (generic) - -NAME Toshiba Tecra 550CDT -SEE S3 ViRGE/MX (generic) - -# currently unsupported S3 - -NAME S3 86C365 (Trio3D) -SEE * Unsupported VGA compatible - -NAME S3 86C391 (Savage3D) -SEE * Unsupported VGA compatible - -NAME S3 Trio3D -SEE * Unsupported VGA compatible - -NAME S3 Savage3D -SEE * Unsupported VGA compatible - -NAME S3 Savage4 -SERVER SVGA -DRIVER vga -UNSUPPORTED - -# ET4000/ET6000 - -NAME ET3000 (generic) -CHIPSET ET3000 -SERVER SVGA -DRIVER tseng - -NAME Genoa 5400 -SEE ET3000 (generic) - -NAME ET4000 (generic) -CHIPSET ET4000 -SERVER SVGA -DRIVER tseng - -NAME ET4000/W32 (generic) -CHIPSET ET4000/W32 -SERVER W32 -DRIVER tseng - -NAME ET4000 W32i, W32p (generic) -CHIPSET ET4000/W32(i/p) -SERVER SVGA -DRIVER tseng -LINE #Option "linear" # for linear mode at 8bpp -LINE #Option "noaccel" # when problems with accelerator -LINE #Option "power_saver" # enable VESA DPMS -LINE #Option "fast_dram" -LINE #Option "pci_retry" # faster, but problematic for ISA DMA -LINE #Option "hibit_high" # see README.tseng -- most cards need this -LINE #Option "hibit_low" # see README.tseng -- mostly for older ET4000 cards -LINE #MemBase 0x3C00000 # when automatic MemBase detection doesn't work -LINE # -- see README.tseng for more (important) information on MemBase - -NAME ET6000 (generic) -CHIPSET ET6000 -SERVER SVGA -DRIVER tseng -NOCLOCKPROBE -LINE #videoram 2304 # 2.25 MB, when memory probe is incorrect -LINE #Option "linear" # for linear mode at 8bpp -LINE #Option "noaccel" # when problems with accelerator -LINE #Option "power_saver" # enable VESA DPMS -LINE #Option "pci_retry" # faster, but problematic for ISA DMA -LINE #Option "hw_cursor" # Use hardware cursor (see docs for limitations) -LINE #Option "xaa_no_color_exp" # When text (or bitmap) is not rendered correctly - -NAME ET6100 (generic) -CHIPSET ET6100 -SEE ET6000 (generic) - -NAME Diamond Stealth 32 -CLOCKCHIP icd2061a -NOCLOCKPROBE -SEE ET4000 W32i, W32p (generic) - -NAME Cardex Cobra -SEE ET4000 W32i, W32p (generic) - -NAME Cardex Challenger (Pro) -SEE ET4000 W32i, W32p (generic) - -NAME Colorgraphic Dual Lightning -SEE ET4000 W32i, W32p (generic) - -NAME Dell onboard ET4000 -SEE ET4000 (generic) - -NAME DFI-WG5000 -SEE ET4000 W32i, W32p (generic) - -NAME Diamond SpeedStar (Plus) -SEE ET4000 (generic) - -NAME Diamond SpeedStar 24 -SEE ET4000 (generic) - -NAME Diamond SpeedStar HiColor -SEE ET4000 (generic) - -NAME Genoa 8900 Phantom 32i -SEE ET4000 W32i, W32p (generic) - -NAME Hercules Dynamite -SEE ET4000/W32 (generic) - -NAME Hercules Dynamite Power -SEE ET4000 W32i, W32p (generic) - -NAME Hercules Dynamite Pro -SEE ET4000 W32i, W32p (generic) - -NAME Integral FlashPoint -SEE ET4000 W32i, W32p (generic) - -NAME LeadTek WinFast S200 -SEE ET4000 W32i, W32p (generic) - -NAME Matrox Comet -SEE ET4000 W32i, W32p (generic) - -NAME Matrox Marvel II -SEE ET4000 W32i, W32p (generic) - -NAME Miro MiroVideo 20TD -SEE ET4000 W32i, W32p (generic) - -NAME WinFast S200 -SEE LeadTek WinFast S200 - -NAME Sigma Concorde -SEE ET4000/W32 (generic) - -NAME Sigma Legend -SEE ET4000 (generic) - -NAME SPEA/V7 ShowTime Plus -SEE ET4000 W32i, W32p (generic) - -NAME STB LightSpeed -SEE ET4000 W32i, W32p (generic) - -NAME STB MVP-2 -SEE ET4000 (generic) - -NAME STB MVP-2 PCI -SEE ET4000 W32i, W32p (generic) - -NAME STB MVP-2X -SEE ET4000 W32i, W32p (generic) - -NAME STB MVP-4 PCI -SEE ET4000 W32i, W32p (generic) - -NAME STB MVP-4X -SEE ET4000 W32i, W32p (generic) - -NAME TechWorks Thunderbolt -SEE ET4000/W32 (generic) - -NAME ViewTop PCI -SEE ET4000 W32i, W32p (generic) - -NAME SNI PC5H W32 -CLOCKCHIP stg1703 -NOCLOCKPROBE -SEE ET4000 W32i, W32p (generic) - -NAME SNI Scenic W32 -CLOCKCHIP stg1703 -NOCLOCKPROBE -SEE ET4000 W32i, W32p (generic) - -NAME Hercules Dynamite 128/Video -SEE ET6000 (generic) - -NAME STB LightSpeed 128 -SEE ET6000 (generic) - -NAME VideoLogic GrafixStar 600 -SEE ET6000 (generic) - -NAME Jazz Multimedia G-Force 128 -SEE ET6000 (generic) - -NAME Mirage Z-128 -SEE ET6000 (generic) - -NAME California Graphics SunTracer 6000 -SEE ET6000 (generic) - -NAME Binar Graphics AnyView -SEE ET6000 (generic) - -NAME MediaVision Proaxcel 128 -SEE ET6000 (generic) - -NAME ATrend ATC-2165A -SEE ET6000 (generic) - -NAME Interay PMC Viper -SEE ET6000 (generic) - -NAME 2-the-Max MAXColor 6000 -SEE ET6000 (generic) - -NAME Gainward Challenger EV -SEE ET6000 (generic) - -NAME MachSpeed VGA ET6000 -SEE ET6000 (generic) - -NAME KouTech KeyVision 128 EV -SEE ET6000 (generic) - -NAME Jaton Video-58P -SEE ET6000 (generic) - -# ATI - -NAME ATI Rage 128 -CHIPSET ati -SERVER SVGA -DRIVER ati - -NAME ATI 8514 Ultra (no VGA) -CHIPSET ati -SERVER Mach8 -DRIVER vga -UNSUPPORTED - -NAME ATI Graphics Ultra -CHIPSET ati -SERVER Mach8 -DRIVER ati - -NAME ATI Graphics Ultra Pro -CHIPSET ati -SERVER Mach32 -DRIVER ati - -NAME ATI Wonder SVGA -CHIPSET ati -SERVER SVGA -DRIVER ati - -NAME ATI Ultra Plus -CHIPSET ati -SERVER Mach32 -DRIVER ati - -NAME ATI Mach32 -CHIPSET ati -SERVER Mach32 -DRIVER ati - -NAME ATI Mach64 -CHIPSET ati -SERVER Mach64 -DRIVER ati -NOCLOCKPROBE - -NAME ATI Mach64 CT (264CT) -SEE ATI Mach64 - -NAME ATI Mach64 VT (264VT) -SEE ATI Mach64 - -NAME ATI Mach64 GT (264GT), aka 3D RAGE -SEE ATI Mach64 - -NAME ATI Mach64 3D RAGE II -SEE ATI Mach64 - -NAME ATI Mach64 3D RAGE II+DVD -SEE ATI Mach64 - -NAME ATI Mach64 3D Rage IIC -SEE ATI Mach64 - -NAME ATI Mach64 3D Rage Pro -SEE ATI Mach64 - -NAME ATI 3D Pro Turbo -SEE ATI Mach64 - -NAME ATI 3D Pro Turbo PC2TV -SEE ATI Mach64 - -NAME ATI 3D Xpression -SEE ATI Mach64 - -NAME ATI 3D Xpression+ -SEE ATI Mach64 - -NAME ATI 3D Xpression+ PC2TV -SEE ATI Mach64 - -NAME ATI All-in-Wonder -SEE ATI Mach64 - -NAME ATI All-in-Wonder Pro -SEE ATI Mach64 - -NAME ATI Graphics Pro Turbo -SEE ATI Mach64 - -NAME ATI Graphics Pro Turbo 1600 -SEE ATI Mach64 - -NAME ATI Graphics Xpression -SEE ATI Mach64 - -NAME ATI Video Boost -SEE ATI Mach64 - -NAME ATI Video Charger -SEE ATI Mach64 - -NAME ATI Video Xpression -SEE ATI Mach64 - -NAME ATI Video Xpression+ -SEE ATI Mach64 - -NAME ATI WinBoost -SEE ATI Mach64 - -NAME ATI WinCharger -SEE ATI Mach64 - -NAME ATI WinTurbo -SEE ATI Mach64 - -NAME ATI Xpert 98 -SEE ATI Mach64 - -NAME ATI Xpert XL -SEE ATI Mach64 - -NAME ATI Xpert@Play -SEE ATI Mach64 - -NAME ATI Xpert@Play 98 -SEE ATI Mach64 - -NAME ATI Xpert@Work -SEE ATI Mach64 - -NAME ATI integrated on Intel Maui MU440EX motherboard -SEE ATI Mach64 - -NAME ASUS PCI-V264CT -SEE ATI Mach64 - -NAME ASUS PCI-AV264CT -SEE ATI Mach64 - -# AGX - -NAME AGX (generic) -CHIPSET AGX-014/15/16 -SERVER AGX -DRIVER vga -UNSUPPORTED - -NAME Boca Vortex (Sierra RAMDAC) -CHIPSET AGX-015 -SERVER AGX -DRIVER vga -UNSUPPORTED -RAMDAC sc15025 -LINE Option "dac_8_bit" -LINE Option "no_wait_state" -LINE #Option "fifo_moderate" # 2x bus bw - may result in random pixels - -NAME EIZO (VRAM) -SEE AGX (generic) - -NAME Orchid Celsius (AT&T RAMDAC) -CHIPSET AGX-015 -SERVER AGX -DRIVER vga -UNSUPPORTED -RAMDAC att20c490 -LINE Option "dac_8_bit" -LINE Option "no_wait_state" -LINE #Option "fifo_moderate" # 2x bus bw - may result in random pixels - -NAME Orchid Celsius (Sierra RAMDAC) -CHIPSET AGX-015 -SERVER AGX -DRIVER vga -UNSUPPORTED -RAMDAC sc15025 -LINE Option "dac_8_bit" -LINE Option "no_wait_state" -LINE #Option "fifo_moderate" # 2x bus bw - may result in random pixels - - -NAME Spider Black Widow -CHIPSET AGX-015 -SERVER AGX -DRIVER vga -UNSUPPORTED -RAMDAC sc15025 -LINE Option "dac_8_bit" -LINE Option "no_wait_state" -LINE #Option "fifo_moderate" # 2x bus bw - may result in random pixels - - -NAME Spider Black Widow Plus -CHIPSET AGX-016 -SERVER AGX -DRIVER vga -UNSUPPORTED -RAMDAC sc15025 -LINE Option "dac_8_bit" -LINE Option "no_wait_state" -LINE #Option "fifo_moderate" # 2x bus bw - may result in random pixels -LINE #Option "fifo_aggressive" # 3x bus bw - may result in random pixels -LINE #Probable clocks: -LINE #Clocks 25.2 28.3 39.9 72.2 50.0 76.9 36.1 44.8 -LINE #Clocks 89.0 119.8 79.9 31.5 110.0 64.9 74.9 94.9 - -NAME Hercules Graphite HG210 -CHIPSET AGX-014 -SERVER AGX -DRIVER vga -UNSUPPORTED -RAMDAC bt482 -DACSPEED 85 -LINE Chipset "AGX-014" -LINE Option "dac_8_bit" -LINE Option "no_wait_state" -LINE #Probable clocks: -LINE #Clocks 25.0 28.0 32.0 36.0 40.0 45.0 50.0 65.0 -LINE #Clocks 70.0 75.0 80.0 85.0 90.0 95.0 100.0 110.0 - -NAME Hercules Graphite Pro -CHIPSET AGX-015 -SERVER AGX -DRIVER vga -UNSUPPORTED -# Card specific DAC, doesn't appear in ramdac menu -LINE Ramdac "herc_dual_dac" -LINE Chipset "AGX-015" -LINE Option "dac_8_bit" -LINE Option "no_wait_state" -LINE #Option "fifo_moderate" # 2x bus bw - may result in random pixels -LINE #Probable clocks: -LINE #Clocks 25.0 28.0 32.0 36.0 40.0 45.0 50.0 65.0 -LINE #Clocks 70.0 75.0 80.0 85.0 90.0 95.0 100.0 110.0 - -NAME Hercules Graphite Power -CHIPSET AGX-016 -SERVER AGX -DRIVER vga -UNSUPPORTED -# Card specific DAC, doesn't appear in ramdac menu -# The glue logic state machine for RAMDAC switching doesn't work as -# documented, for now we're stuck with the small RAMDAC -LINE Ramdac "herc_small_dac" -LINE Chipset "AGX-016" -LINE Option "dac_8_bit" -LINE Option "no_wait_state" -LINE #Option "fifo_moderate" # 2x bus bw - may result in random pixels -LINE #Option "fifo_aggressive" # 3x bus bw - may result in random pixels -LINE #Probable clocks: -LINE #Clocks 25.0 28.0 32.0 36.0 40.0 45.0 50.0 65.0 -LINE #Clocks 70.0 75.0 80.0 85.0 90.0 95.0 100.0 110.0 - -NAME XGA-2 (ISA bus) -CHIPSET XGA-2 -SERVER AGX -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE -LINE #Instance 7 # XGA instance 0-7 -LINE #COPbase 0xC8F00 # XGA memory-mapped register address -LINE #POSbase 0 # Disable probing if above are specified - -NAME XGA-1 (ISA bus) -CHIPSET XGA-1 -SERVER AGX -DRIVER vga -UNSUPPORTED -LINE #Instance 7 # XGA instance 0-7 -LINE #COPbase 0xC8F00 # XGA memory-mapped register address -LINE #POSbase 0 # Disable probing if above are specified - -# WD - -NAME Paradise/WD 90CXX -CHIPSET WD90CXX -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME DFI-WG6000 -CHIPSET WD90C33 -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME Diamond SpeedStar 24X (not fully supported) -CHIPSET WD90C31 -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME WD 90C24 (laptop) -CHIPSET WD90C24 -SERVER SVGA -DRIVER vga -UNSUPPORTED -LINE #Chipset "wd90c24" -LINE #Option "noaccel" # Use this if acceleration is causing problems -LINE #Clocks 25.175 28.322 65 36 # These are not programmable -LINE #Clocks 29.979 77.408 62.195 59.957 # These are programmable -LINE #Clocks 31.5 35.501 75.166 50.114 # These are not programmable -LINE #Clocks 39.822 72.038 44.744 80.092 # These are programmable -LINE #Clocks 44.297 # Must match Mclk - - -NAME WD 90C24A or 90C24A2 (laptop) -CHIPSET WD90C24A -SERVER SVGA -DRIVER vga -UNSUPPORTED -LINE #Chipset "wd90c24" -LINE #Clocks 25.175 28.322 65 36 # These are not programmable -LINE #Clocks 29.979 77.408 62.195 59.957 # These are programmable -LINE #Clocks 31.5 35.501 75.166 50.114 # These are not programmable -LINE #Clocks 39.822 72.038 44.744 80.092 # These are programmable -LINE #Clocks 44.297 # Must match Mclk - -# Avance Logic - -NAME Avance Logic 2101 -CHIPSET Avance Logic -LINE #chipset "al2101" -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME Avance Logic 2228 -CHIPSET Avance Logic -LINE #chipset "ali2228" -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME Avance Logic 2301 -CHIPSET Avance Logic -LINE #chipset "ali2301" -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME Avance Logic 2302 -CHIPSET Avance Logic -LINE #chipset "ali2302" -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME Avance Logic 2308 -CHIPSET Avance Logic -LINE #chipset "ali2308" -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME Avance Logic 2401 -CHIPSET Avance Logic -LINE #chipset "ali2401" -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME Hercules Stingray -CHIPSET ALG-2228/2301/2302 -LINE #chipset "ali2228" -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME SPEA/V7 Mirage VEGA Plus -CHIPSET ALG-2228 -LINE #chipset "ali2228" -SERVER SVGA -DRIVER vga -UNSUPPORTED - -# ARK Logic - -NAME Ark Logic ARK1000PV (generic) -CHIPSET ARK1000PV -SERVER SVGA -DRIVER vga -UNSUPPORTED - -# For now, treat the VL as a PV. This may be changed later -NAME Ark Logic ARK1000VL (generic) -CHIPSET ARK1000VL -LINE Chipset "ark1000pv" -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME Ark Logic ARK2000PV (generic) -CHIPSET ARK1000PV -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME Ark Logic ARK2000MT (generic) -CHIPSET ARK1000MT -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME Hercules Stingray Pro -SEE Ark Logic ARK1000PV (generic) - -NAME Hercules Stingray Pro/V -SEE Ark Logic ARK1000PV (generic) - -NAME Ocean (octek) VL-VGA-1000 -RAMDAC att20c490 -SEE Ark Logic ARK1000VL (generic) - -NAME Hercules Stingray 64/V with ZoomDAC -SEE Ark Logic ARK2000PV (generic) - -NAME Hercules Stingray 64/V with ICS5342 -CHIPSET ARK2000MT -RAMDAC ics5342 -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME Diamond Stealth64 Graphics 2001 series -CHIPSET ARK2000PV -RAMDAC ics5342 -SERVER SVGA -DRIVER vga -UNSUPPORTED - -# Oak - -NAME Oak ISA Card (generic) -CHIPSET Oak OTI-067/77 -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME Oak 87 VLB (generic) -CHIPSET Oak OTI-087 -SERVER SVGA -DRIVER vga -UNSUPPORTED -LINE Option "fifo_aggressive" # Comment this if you experience streaks. -LINE Option "no_wait" # Comment this if you find problems. -LINE #Option "enable_bitblt" # You may enable this and see if it works (see README.Oak file) - -NAME Oak 87 ISA (generic) -CHIPSET Oak OTI-087 -SERVER SVGA -DRIVER vga -UNSUPPORTED -LINE Option "noaccel" # ISA cards seem to have Color Expansion support broken -LINE #Option "enable_bitblt" # This should work on ISA, but lets not make it default just in case. - -NAME Paradise Accelerator Value -SEE Oak 87 ISA (generic) - -# P9000 - -NAME Diamond Viper VLB 2Mb -CHIPSET Weitek 9000 -SERVER P9000 -DRIVER vga -UNSUPPORTED -LINE #Clocks must match the mode clocks (XFree86 3.1 P9000 server) -LINE #Versions later than 3.1 do not require a clocks line -LINE Chipset "vipervlb" # Required for some cards which autodetect as PCI -LINE Videoram 2048 # Required -LINE Membase 0x80000000 # Optional (0x80000000 is default) -NOCLOCKPROBE - -NAME Diamond Viper PCI 2Mb -CHIPSET Weitek 9000 -SERVER P9000 -DRIVER vga -UNSUPPORTED -LINE #Clocks must match the mode clocks (XFree86 3.1 P9000 server) -LINE #Versions later than 3.1 do not require a clocks line -LINE Videoram 2048 # Required -LINE #Membase 0x80000000 # Use scanpci to get the correct Membase -NOCLOCKPROBE - -NAME Orchid P9000 VLB -CHIPSET Weitek 9000 -SERVER P9000 -DRIVER vga -UNSUPPORTED -LINE Chipset "orchid_p9000" -LINE Membase 0xE0000000 -NOCLOCKPROBE - -# P9100 - -NAME Weitek P9100 (generic) -CHIPSET Weitek P9100 -SERVER SVGA -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE - -NAME Diamond Viper Pro Video -SEE Weitek P9100 (generic) - -# Trident - -NAME Trident 8900/9000 (generic) -CHIPSET TVGA8900/9000 -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME Trident 8900D (generic) -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME Trident TVGA9200CXr (generic) -CHIPSET TVGA9200CXr -SERVER SVGA -DRIVER vga -UNSUPPORTED - -NAME Trident TGUI9400CXi (generic) -CHIPSET TGUI9400CXi -SERVER SVGA -DRIVER trident - -NAME Trident TGUI9420DGi (generic) -CHIPSET TGUI9420DGi -SERVER SVGA -DRIVER trident - -NAME Trident TGUI9430DGi (generic) -CHIPSET TGUI9430DGi -SERVER SVGA -DRIVER trident - -NAME Trident TGUI9420 (generic) -CHIPSET TGUI9420 -DRIVER trident -NOCLOCKPROBE - -NAME Trident TGUI9440 (generic) -CHIPSET TGUI9440 -DRIVER trident -NOCLOCKPROBE - -NAME Trident TGUI9660 (generic) -CHIPSET TGUI9660 -DRIVER trident -NOCLOCKPROBE - -NAME Trident TGUI9680 (generic) -CHIPSET TGUI9680 -DRIVER trident -NOCLOCKPROBE - -NAME Trident TGUI9682 (generic) -CHIPSET TGUI9682 -SERVER SVGA -DRIVER trident -NOCLOCKPROBE - -NAME Trident TGUI9685 (generic) -CHIPSET TGUI9685 -SERVER SVGA -DRIVER trident -NOCLOCKPROBE - -NAME Trident Cyber 9320 (generic) -CHIPSET Cyber9320 -DRIVER trident -NOCLOCKPROBE - -NAME Trident Cyber 9382 (generic) -CHIPSET Cyber9382 -SERVER SVGA -DRIVER trident -NOCLOCKPROBE - -NAME Trident Cyber 9385 (generic) -CHIPSET Cyber9385 -SERVER SVGA -DRIVER trident -NOCLOCKPROBE - -NAME Trident Cyber 9388 (generic) -CHIPSET Cyber9388 -SERVER SVGA -DRIVER trident -NOCLOCKPROBE - -NAME Trident Cyber 939a (generic) -CHIPSET Cyber939a -DRIVER trident -NOCLOCKPROBE - -NAME Trident Cyber 9397 (generic) -CHIPSET Cyber9397 -SERVER SVGA -DRIVER trident -NOCLOCKPROBE - -NAME Trident Cyber 9520 (generic) -CHIPSET Cyber9520 -DRIVER trident -NOCLOCKPROBE - -NAME Trident 3DImage975 (generic) -CHIPSET 3dimage975 -SERVER SVGA -DRIVER trident -NOCLOCKPROBE - -NAME Trident 3DImage975 AGP (generic) -CHIPSET 3dimage975 -SERVER SVGA -DRIVER trident -NOCLOCKPROBE - -NAME Trident 3DImage985 (generic) -CHIPSET 3dimage985 -SERVER SVGA -DRIVER trident -NOCLOCKPROBE - -NAME Trident Providia 9682 (generic) -CHIPSET Providia9682 -DRIVER trident -NOCLOCKPROBE - -NAME Trident Providia 9685 (generic) -CHIPSET Providia9685 -DRIVER trident -NOCLOCKPROBE - -NAME Trident TVGA 8800BR -SEE * Generic VGA compatible - -NAME Trident TVGA 8800CS -SEE * Generic VGA compatible - -NAME Trident CyberBlade (generic) -CHIPSET CyberBlade -SERVER SVGA -DRIVER trident -NOCLOCKPROBE - -NAME Trident Blade3D (generic) -CHIPSET Blade3D -SERVER SVGA -DRIVER trident -NOCLOCKPROBE - -# SiS - -NAME SiS 530 -CHIPSET SIS530 -SERVER SVGA -DRIVER sis - -NAME SiS 620 -CHIPSET SIS620 -SERVER SVGA -DRIVER sis - -NAME SiS SG86C201 -CHIPSET SIS86C201 -SERVER SVGA -DRIVER sis - -NAME SiS SG86C205 -CHIPSET SIS86C205 -SERVER SVGA -DRIVER sis -LINE # Option "no_accel" # Use this if acceleration is causing problems -LINE # Option "fifo_moderate" -LINE # Option "fifo_conserv" -LINE # Option "fifo_aggressive" -NOCLOCKPROBE - -NAME SiS SG86C215 -CHIPSET SIS86C215 -SERVER SVGA -DRIVER sis -LINE # This is a cheap version of 86c205. I am not sure if acceleration works -LINE # Option "no_accel" # Use this if acceleration is causing problems -LINE # Option "no_BitBlt" # Use this if acceleration is causing problems -LINE # Option "fifo_moderate" -LINE # Option "fifo_conserv" -LINE # Option "fifo_aggressive" -NOCLOCKPROBE - -NAME SiS SG86C225 -CHIPSET SIS86C225 -SERVER SVGA -DRIVER sis -LINE # Option "no_accel" # Use this if acceleration is causing problems -LINE # Option "fifo_moderate" -LINE # Option "fifo_conserv" -LINE # Option "fifo_aggressive" -NOCLOCKPROBE - -NAME SiS 5597 -CHIPSET SiS5597 -SERVER SVGA -DRIVER sis -LINE # Option "no_accel" # Use this if acceleration is causing problems -LINE # Option "fifo_moderate" -LINE # Option "fifo_conserv" -LINE # Option "fifo_aggressive" -LINE # Option "fast_vram" -LINE # Option "pci_burst_on" -LINE # Option "xaa_benchmark" # DON'T use with "ext_eng_queue" !!! -LINE # Option "ext_eng_queue" # Turbo-queue. This can cause drawing -LINE # errors, but gives some accel -NOCLOCKPROBE - -NAME SiS 5598 -CHIPSET SIS5598 -SERVER SVGA -DRIVER sis -LINE # Option "no_accel" # Use this if acceleration is causing problems -LINE # Option "fifo_moderate" -LINE # Option "fifo_conserv" -LINE # Option "fifo_aggressive" -LINE # Option "fast_vram" -LINE # Option "pci_burst_on" -LINE # Option "xaa_benchmark" # DON'T use with "ext_eng_queue" !!! -LINE # Option "ext_eng_queue" # Turbo-queue. This can cause drawing -LINE # errors, but gives some accel -NOCLOCKPROBE - -NAME SiS 6326 -CHIPSET SiS6326 -SERVER SVGA -DRIVER sis -LINE # Option "no_accel" # Use this if acceleration is causing problems -LINE # Option "fifo_moderate" -LINE # Option "fifo_conserv" -LINE # Option "fifo_aggressive" -LINE # Option "fast_vram" -LINE # Option "pci_burst_on" -LINE # Option "xaa_benchmark" # DON'T use with "ext_eng_queue" !!! -LINE # Option "ext_eng_queue" # Turbo-queue. This can cause drawing -LINE # errors, but gives some accel -NOCLOCKPROBE - -NAME MSI MS-4417 -SEE SiS 6326 - -NAME SiS 3D PRO AGP -SEE SiS 6326 - -NAME Miro Crystal DVD -SEE SiS 6326 - -NAME PC-Chips M567 Mainboard -SEE SiS 5597 - -NAME Diamond SpeedStar A50 -SEE SiS 6326 - -# Cyrix - -NAME MediaGX -CHIPSET mediagx -SERVER SVGA -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE - -# Alliance ProMotion - -NAME Alliance ProMotion 6422 -CHIPSET AP6422 -SERVER SVGA -DRIVER vga -UNSUPPORTED - -# Number 9 I128 - -NAME Number Nine Imagine I-128 -CHIPSET I128 -SERVER I128 -DRIVER i128 -NOCLOCKPROBE - -NAME Number Nine Imagine I-128 Series 2 -CHIPSET I128 -SERVER I128 -DRIVER i128 -NOCLOCKPROBE - -NAME Number Nine Revolution 3D (T2R) -CHIPSET I128 -SERVER I128 -DRIVER i128 -NOCLOCKPROBE - -NAME Number Nine Imagine-128 Revolution IV (T2R4) -CHIPSET I128 -SERVER I128 -DRIVER i128 -NOCLOCKPROBE - -# Matrox - -NAME Matrox Millennium 2MB -CHIPSET mga2064w -SERVER SVGA -DRIVER mga -LINE VideoRam 2048 -NOCLOCKPROBE - -NAME Matrox Millennium 4MB -CHIPSET mga2064w -SERVER SVGA -DRIVER mga -LINE VideoRam 4096 -NOCLOCKPROBE - -NAME Matrox Millennium 8MB -CHIPSET mga2064w -SERVER SVGA -DRIVER mga -LINE VideoRam 8192 -NOCLOCKPROBE - -NAME Matrox Millennium II 4MB -CHIPSET mga2164w -SERVER SVGA -DRIVER mga -LINE VideoRam 4096 -NOCLOCKPROBE - -NAME Matrox Millennium II 8MB -CHIPSET mga2164w -SERVER SVGA -DRIVER mga -LINE VideoRam 8192 -NOCLOCKPROBE - -NAME Matrox Millennium II 16MB -CHIPSET mga2164w -SERVER SVGA -DRIVER mga -LINE VideoRam 16384 -NOCLOCKPROBE - -NAME Matrox Millennium G200 4MB -CHIPSET mgag200 -SERVER SVGA -DRIVER mga -LINE VideoRam 4096 -NOCLOCKPROBE - -NAME Matrox Millennium G200 8MB -CHIPSET mgag200 -SERVER SVGA -DRIVER mga -LINE VideoRam 8192 -NOCLOCKPROBE - -NAME Matrox Millennium G200 16MB -CHIPSET mgag200 -SERVER SVGA -DRIVER mga -LINE VideoRam 16384 -NOCLOCKPROBE - -NAME Matrox Millennium G200 SD 4MB -CHIPSET mgag200 -SERVER SVGA -DRIVER mga -LINE VideoRam 4096 -LINE # Option "mga_sdram" -NOCLOCKPROBE - -NAME Matrox Millennium G200 SD 8MB -CHIPSET mgag200 -SERVER SVGA -DRIVER mga -LINE VideoRam 8192 -LINE # Option "mga_sdram" -NOCLOCKPROBE - -NAME Matrox Millennium G200 SD 16MB -CHIPSET mgag200 -SERVER SVGA -DRIVER mga -LINE VideoRam 16384 -LINE # Option "mga_sdram" -NOCLOCKPROBE - -NAME Matrox Mystique -CHIPSET mga1064sg -SERVER SVGA -DRIVER mga -NOCLOCKPROBE - -NAME Matrox Mystique G200 4MB -CHIPSET mgag200 -SERVER SVGA -DRIVER mga -LINE VideoRam 4096 -NOCLOCKPROBE - -NAME Matrox Mystique G200 8MB -CHIPSET mgag200 -SERVER SVGA -DRIVER mga -LINE VideoRam 8192 -NOCLOCKPROBE - -NAME Matrox Millennium G400 -CHIPSET mgag400 -SERVER SVGA -DRIVER mga -NOCLOCKPROBE - -NAME Matrox Mystique G200 16MB -CHIPSET mgag200 -SERVER SVGA -DRIVER mga -LINE VideoRam 16384 -NOCLOCKPROBE - -NAME Matrox Productiva G100 4MB -CHIPSET mgag100 -SERVER SVGA -DRIVER mga -LINE VideoRam 4096 -NOCLOCKPROBE - -NAME Matrox Productiva G100 8MB -CHIPSET mgag100 -SERVER SVGA -DRIVER mga -LINE VideoRam 8192 -NOCLOCKPROBE - -# NVIDIA - -NAME Diamond Edge 3D -CHIPSET nv1 -SERVER SVGA -DRIVER vga -UNSUPPORTED -NOCLOCKPROBE - -NAME RIVA128 -CHIPSET RIVA128 -SERVER SVGA -DRIVER nv -NOCLOCKPROBE - -NAME RIVA TNT -CHIPSET RIVATNT -SERVER SVGA -DRIVER nv -NOCLOCKPROBE - -NAME RIVA TNT2 -CHIPSET RIVATNT2 -SERVER SVGA -DRIVER nv -NOCLOCKPROBE - -NAME NVIDIA GeForce -CHIPSET GeForce -SERVER SVGA -DRIVER nv -NOCLOCKPROBE - -NAME ELSA VICTORY ERAZOR -SEE RIVA128 - -NAME ELSA Winner 1000 R3D -SEE RIVA128 - -NAME ELSA ERAZOR II -SEE RIVA TNT - -NAME Diamond Viper 330 -SEE RIVA128 - -NAME Diamond Viper 550 -SEE RIVA TNT - -NAME Diamond Viper 770 -SEE RIVA TNT2 - -NAME STB Velocity 128 -SEE RIVA128 - -NAME STB nvidia 128 -SEE RIVA128 - -NAME STB Velocity 4400 -SEE RIVA TNT - -NAME ASUS 3Dexplorer -SEE RIVA128 - -NAME Guillemot Maxi Gamer Xentor -SEE RIVA TNT2 - -NAME Guillemot Maxi Gamer Xentor 32 -SEE RIVA TNT2 - -NAME Creative Graphics Blaster TNT -SEE RIVA TNT - -NAME Creative Graphics Blaster TNT2 -SEE RIVA TNT2 - -# 3Dfx -NAME Voodoo Banshee (generic) -SERVER SVGA -CHIPSET 3dfx Banshee -DRIVER tdfx - -NAME Voodoo3 (generic) -SERVER SVGA -CHIPSET 3dfx Voodoo3 -DRIVER tdfx - -NAME Elsa Victory II -SEE Voodoo Banshee (generic) - -NAME Diamond Monster Fusion -SEE Voodoo Banshee (generic) - -NAME AOpen PA2010 -SEE Voodoo Banshee (generic) - -NAME Chaintech Desperado 3F10 -SEE Voodoo Banshee (generic) - -# 3DLabs - -NAME ELSA GLoria-L/MX -CHIPSET GLINT MX -SERVER 3DLabs -DRIVER glint -LINE #Option "no_accel" -NOCLOCKPROBE - -NAME ELSA GLoria-L -CHIPSET GLINT 500TX -SERVER 3DLabs -DRIVER glint -NOCLOCKPROBE - -NAME ELSA GLoria-XL -CHIPSET GLINT MX -SERVER 3DLabs -DRIVER glint -NOCLOCKPROBE - -NAME Diamond Fire GL 3000 -CHIPSET GLINT 500TX -SERVER 3DLabs -DRIVER glint -LINE Option "firegl_3000" -NOCLOCKPROBE - -NAME ELSA GLoria-S -CHIPSET PERMEDIA -SERVER 3DLabs -DRIVER glint -LINE #Option "no_accel" -LINE #VideoRam 8192 -NOCLOCKPROBE - -NAME Diamond Fire GL 1000 -CHIPSET PERMEDIA -SERVER 3DLabs -DRIVER glint -LINE #Option "no_accel" -LINE #VideoRam 8192 -NOCLOCKPROBE - -NAME ELSA GLoria Synergy -CHIPSET PERMEDIA 2 -SERVER 3DLabs -DRIVER glint -LINE #Option "no_accel" -NOCLOCKPROBE - -NAME ELSA Winner 2000/Office -CHIPSET PERMEDIA 2 -SERVER 3DLabs -DRIVER glint -LINE #Option "no_accel" -NOCLOCKPROBE - -NAME Diamond Fire GL 1000 PRO -CHIPSET PERMEDIA 2 -SERVER 3DLabs -DRIVER glint -LINE #Option "no_accel" -NOCLOCKPROBE - -NAME Creative Blaster Exxtreme -CHIPSET PERMEDIA 2 -SERVER 3DLabs -DRIVER glint -LINE #Option "no_accel" -NOCLOCKPROBE - -NAME AccelStar Permedia II AGP -CHIPSET PERMEDIA 2 -SERVER 3DLabs -DRIVER glint -LINE #Option "no_accel" -NOCLOCKPROBE - -NAME Leadtek WinFast 2300 -CHIPSET PERMEDIA 2 -SERVER 3DLabs -DRIVER glint -NOCLOCKPROBE - -NAME 3DLabs Oxygen GMX -CHIPSET PERMEDIA 2 -SERVER 3DLabs -DRIVER glint -LINE #Option "no_accel" -NOCLOCKPROBE - -NAME Appian Jeronimo 2000 -CHIPSET PERMEDIA 3 -SERVER 3DLabs -DRIVER glint -NOCLOCKPROBE - -# Alliance Semiconductor - -NAME Diamond Stealth Video 2500 -CHIPSET Alliance AT24 -SERVER SVGA -DRIVER apm -NOCLOCKPROBE - -NAME AT3D -CHIPSET Alliance AT3D -SERVER SVGA -DRIVER apm -NOCLOCKPROBE -LINE #Option "no_accel" - -NAME AT25 -SEE AT3D - -NAME Hercules Stingray 128 3D -SEE AT3D - -# NeoMagic - -NAME NeoMagic (laptop/notebook) -CHIPSET MagicGraph 128 series -SERVER SVGA -DRIVER neomagic -LINE # Chipset "NM2160" -LINE # IOBase 0xfea00000 -LINE # MemBase 0xfd000000 -LINE # VideoRam 2048 -LINE # DacSpeed 90 -LINE # Option "linear" -LINE # Option "nolinear" -LINE # Option "sw_cursor" -LINE # Option "hw_cursor" -LINE # Option "no_accel" -LINE # Option "intern_disp" -LINE # Option "extern_disp" -LINE # Option "mmio" -LINE # Option "no_mmio" -LINE # Option "lcd_center" -LINE # Option "no_stretch" - -# Epson SPC8110 - -NAME EPSON SPC8110 (CardPC) -CHIPSET SPC8110 -SERVER SVGA -DRIVER vga -UNSUPPORTED -LINE # Chipset "spc8110" -LINE # MemBase 0x03e00000 -LINE # VideoRam 1024 -LINE # Option "nolinear" -LINE # Option "sw_cursor" -LINE # Option "noaccel" -LINE # Option "fifo_moderate" -LINE # Option "fifo_conservative" - -# Silicon Motion, Inc. - -NAME Silicon Motion Lynx family -CHIPSET Lynx -SERVER SVGA -DRIVER siliconmotion -NOCLOCKPROBE - -# Rendition - -NAME Rendition Verite 1000 -CHIPSET Verite 1000 -SERVER SVGA -DRIVER vga -UNSUPPORTED -LINE # Option "sw_cursor" - -NAME Rendition Verite 2x00 -CHIPSET Verite 2x00 -SERVER SVGA -DRIVER vga -UNSUPPORTED -LINE # Option "sw_cursor" - -NAME Creative Labs 3D Blaster PCI (Verite 1000) -SEE Rendition Verite 1000 - -NAME Canopus Total-3D -SEE Rendition Verite 1000 - -NAME Sierra Screaming 3D -SEE Rendition Verite 1000 - -NAME Miro CRYSTAL VRX -SEE Rendition Verite 1000 - -NAME Diamond Stealth II S220 -CHIPSET Verite 2100 -SEE Rendition Verite 2x00 - -NAME Hercules Thriller3D -CHIPSET Verite 2200 -SEE Rendition Verite 2x00 - -# Digital - -NAME Digital 8-plane TGA (UDB/Multia) -CHIPSET TGA -SERVER TGA -DRIVER tga -RAMDAC Bt485 - -NAME Digital 8-plane TGA (ZLXp-E1) -CHIPSET TGA -SERVER TGA -DRIVER tga -RAMDAC Bt485 - -NAME Digital 24-plane TGA (ZLXp-E2) -CHIPSET TGA -SERVER TGA -DRIVER tga -RAMDAC Bt463 - -NAME Digital 24-plane+3D TGA (ZLXp-E3) -CHIPSET TGA -SERVER TGA -DRIVER tga -RAMDAC Bt463 - -# i810 - -NAME Intel 810 -SERVER SVGA -DRIVER i810 - -# i740 - -NAME Intel 740 (generic) -SERVER SVGA -DRIVER i740 - -# Misc - -END diff --git a/xorg-server/hw/xfree86/utils/xorgconfig/Cards98 b/xorg-server/hw/xfree86/utils/xorgconfig/Cards98 deleted file mode 100644 index ef14a0345..000000000 --- a/xorg-server/hw/xfree86/utils/xorgconfig/Cards98 +++ /dev/null @@ -1,647 +0,0 @@ -# $XFree86: xc/programs/Xserver/hw/xfree98/xf86config/Cards98,v 1.7 1998/06/04 16:43:45 hohndel Exp $ -# -# -# -# $XConsortium: Cards /main/27 1996/10/28 05:43:53 kaleb $ -# This is the database of card definitions used by xf86config. -# Each definition should have a NAME entry, CHIPSET (descriptive) and -# SERVER (one of EGC, GANBWAP, PEGC, NKVNEC, WABS, WABEP, WSNA, TGUI, -# MGA, SVGA, NECS3, PWSKB, PWLB, GA968). -# A reference to another definition is made with SEE (already defined -# entries are not overridden). -# Optional entries are RAMDAC (identifier), CLOCKCHIP (identifier), -# DACSPEED, NOCLOCKPROBE (advises never to probe clocks), UNSUPPORTED -# (indicates card that is not yet properly supported by a dedicated -# server). A LINE entry adds a line of text to be included in the -# Device section (can include options or comments). -# There's no CLOCKS option (although a Clocks line can be included -# with LINE), as it is very undesirable to have a Clocks line that -# is incorrect. The idea is that the Clocks are probed for to be -# sure (a commented suggested Clocks line can be included). -# -# The majority of entries are just a binding of a model name to a -# chipset/server and untested. -# - -# EGC - -NAME EGC16 -CHIPSET EGC -SERVER EGC -LINE Chipset "vga" - -# PEGC - -NAME PEGC -CHIPSET PEGC -SERVER PEGC -LINE VideoRam 512 -LINE Clocks 31.5 -LINE # Virtual resolution for 640x400 -LINE # Clocks 28.322 - -# GANBWAP - -NAME GA-98NBI -CHIPSET CL-GD5434 -SERVER GANBWAP -LINE ClockChip "cirrus" -LINE Option "ga98nb1" -LINE Option "no_mmio" -LINE # Option "sw_cursor" - -NAME GA-98NBII -CHIPSET CL-GD5434 -SERVER GANBWAP -LINE ClockChip "cirrus" -LINE Option "ga98nb2" -LINE Option "no_mmio" -LINE # Option "sw_cursor" - -NAME GA-98NBIV -CHIPSET CL-GD5434 -SERVER GANBWAP -LINE ClockChip "cirrus" -LINE Option "ga98nb4" -LINE Option "no_mmio" -LINE # Option "sw_cursor" - -NAME WAP-2000/4000 -CHIPSET CL-GD5434 -SERVER GANBWAP -LINE Option "wap" -LINE Option "no_mmio" -LINE # Option "epsonmemwin" - -# NKVNEC - -NAME PCNKV/PCNKV2/NEC_CIRRUS -CHIPSET CL-GD5428/5429/5430 -SERVER NKVNEC -LINE # Option "fast_dram" -LINE VideoRam 1024 - -NAME PC9821Bf/U8W -LINE Option "nec_cirrus" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Bp/U8W/U7W -LINE Option "nec_cirrus" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Bs/U7W -LINE Option "nec_cirrus" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Be/U7W -LINE Option "nec_cirrus" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821BA3/U2/W -LINE Option "nec_cirrus" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821BX3/U2/W -LINE Option "nec_cirrus" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821BX4/U2 -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Cb -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Ce -LINE Option "nec_cirrus" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Cf -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Ce2 -LINE Option "nec_cirrus" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Cs -LINE Option "nec_cirrus" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Cs2 -LINE Option "nec_cirrus" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Cx -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Cx2 -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Es -LINE Option "nec_cirrus" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Nd -LINE Option "nec_cirrus" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Ne2 -LINE Option "nec_cirrus" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Nf -LINE Option "nec_cirrus" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Np -LINE Option "nec_cirrus" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Ns -LINE Option "nec_cirrus" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821V7/C -LINE Chipset "clgd5430" -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821V10/C,S -LINE Chipset "clgd5430" -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821V12/S -LINE Chipset "clgd5430" -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821V13/S -LINE Chipset "clgd5430" -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821V16/S -LINE Chipset "clgd5430" -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821V16/S5V,P -LINE Chipset "clgd5446" -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821V20/S7 -LINE Chipset "clgd5430" -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Xb10 -LINE Chipset "clgd5430" -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Xc13/S5 -LINE Chipset "clgd5446" -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Xc16/M,S -LINE Chipset "clgd5446" -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Xc200/M,S -LINE Chipset "clgd5446" -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Xa7e -LINE Chipset "clgd5430" -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Xe -LINE Chipset "clgd5430" -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC9821Xe10 -LINE Chipset "clgd5430" -LINE Option "nec_cirrus" -LINE Option "no_mmio" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC486MR -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC486MS -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC486MU -LINE Chipset "clgd5429" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC486MV -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC586MV -SEE PCNKV/PCNKV2/NEC_CIRRUS - -NAME PC586RV -LINE Chipset "clgd5429" -SEE PCNKV/PCNKV2/NEC_CIRRUS - -# WABS - -NAME WAB-S -CHIPSET CL-GD5426/5428 -SERVER WABS -LINE VideoRam 1024 -LINE # VideoRam 2048 - -NAME WAB-1000/2000 -CHIPSET CL-GD5428 -SERVER WABS -LINE VideoRam 1024 -LINE # VideoRam 2048 - -NAME WSR-E/G -SEE WAB-1000/2000 - -# WABEP - -NAME WAB-EP -CHIPSET CL-GD5428 -SERVER WABEP -LINE Option "med_dram" - -# WSNA - -NAME WSN-A2F -CHIPSET CL-GD5434 -SERVER WSNA -LINE Option "no_mmio" -LINE Option "med_dram" - -# TGUI - -NAME NEC Trident -CHIPSET TGUI9680/9682 -SERVER TGUI -LINE Option "xaa_no_color_exp" -LINE # Option "noaccel" -LINE # Option "Linear" -LINE # Option "med_dram" -LINE # Option "hw_cursor" - -NAME PC9821Ra20/N -SEE NEC Trident - -NAME PC9821RaII23/N,W -SEE NEC Trident - -NAME PC9821Ra266/N,W -SEE NEC Trident - -NAME PC9821Rs20/B20 -SEE NEC Trident - -NAME PC9821RsII26/B40 -SEE NEC Trident - -NAME PC9821V13/M7 -SEE NEC Trident - -NAME PC9821V16/M7 -SEE NEC Trident - -NAME PC9821V20/M7 -SEE NEC Trident - -NAME PC9821Xa7/C,K -SEE NEC Trident - -NAME PC9821Xa9/C,K -SEE NEC Trident - -NAME PC9821Xa10/C,K -SEE NEC Trident - -NAME PC9821Xa12/C,K -SEE NEC Trident - -NAME PC9821Xa13/C,K,W -SEE NEC Trident - -NAME PC9821Xa16/R,W -SEE NEC Trident - -NAME PC9821Xa20/W -SEE NEC Trident - -NAME PC9821Xc13/M,S -SEE NEC Trident - -NAME PC9821Xv13/R -SEE NEC Trident - -NAME GA-DRV/98 -CHIPSET TGUI9680 -SERVER TGUI -LINE Option "noaccel" -LINE # Option "med_dram" -LINE # Option "hw_cursor" - -# MGA - -NAME MGA Millennium -CHIPSET MGA2064W -SERVER MGA - -NAME PC9821Xt13 -SEE MGA Millennium - -NAME PC9821Xt16 -SEE MGA Millennium - -NAME PC9821Xv13/W -SEE MGA Millennium - -NAME PC9821Xv20/W -SEE MGA Millennium - -NAME PC9821St15 -SEE MGA Millennium - -NAME PC9821St20 -SEE MGA Millennium - -NAME PC9821RvII26/N20 -SEE MGA Millennium - -NAME NEC FC-WAB-X2 -SEE MGA Millennium - -NAME MGA Mystique -CHIPSET MGA1064SG -SERVER MGA - -NAME PC9821V166/S -LINE VideoRam 2048 -SEE MGA Mystique - -NAME PC9821V200/S -LINE VideoRam 2048 -SEE MGA Mystique - -NAME PC9821V200/M -LINE VideoRam 4096 -SEE MGA Mystique - -NAME PC9821V233/M7 -LINE VideoRam 2048 -SEE MGA Mystique - -NAME PC9821V233/M7V -LINE VideoRam 4096 -SEE MGA Mystique - -# SVGA - -NAME NEC Cirrus 755x -CHIPSET CL-GD7555 -LINE Chipset "clgd7555" -LINE # VideoRam 2048 -LINE # Option "no_bitblt" -LINE # Option "fast_dram" -LINE Option "linear" -LINE Option "noaccel" -SERVER SVGA - -NAME PC9821Nr12 -SEE NEC Cirrus 755x - -NAME PC9821Nr13 -SEE NEC Cirrus 755x - -NAME PC9821La13 -SEE NEC Cirrus 755x - -NAME PC9821Ls12 -SEE NEC Cirrus 755x - -NAME PC9821Ls13 -SEE NEC Cirrus 755x - -NAME PC9821Ls150 -SEE NEC Cirrus 755x - -# NECS3 - -NAME NEC WAB-A/B -CHIPSET S3 928 -SERVER NECS3 -LINE Chipset "s3_generic" -LINE Dacspeed 110 -LINE Ramdac "sc15025" -LINE Option "dac_8_bit" -LINE # Option "necwab" -LINE # Option "nomemaccess" -LINE Clocks 25.0 28.0 40.0 0.0 50.0 77.0 36.0 45.0 -LINE Clocks 130.0 120.0 80.0 31.0 110.0 65.0 75.0 94.0 - -NAME NEC FC-WAB-A/B -CHIPSET S3 928 -SERVER NECS3 -LINE Chipset "s3_generic" -LINE Dacspeed 110 -LINE Ramdac "bt485" -LINE Option "necwab" -LINE Option "nomemaccess" -LINE Option "noinit" -LINE Option "nolinear" -LINE Clocks 25.0 28.0 40.0 0.0 50.0 77.0 36.0 45.0 -LINE Clocks 130.0 120.0 80.0 31.0 110.0 65.0 75.0 94.0 - -NAME PC9821Af/U9W E09? -SEE NEC WAB-A/B - -NAME PC9821An/U8W -SEE NEC WAB-A/B - -NAME PC9821Ap2/U8W/C9W -SEE NEC WAB-A/B - -NAME PC9821As2/U7W/U8W -SEE NEC WAB-A/B - -NAME NEC 864 -CHIPSET S3 864 -SERVER NECS3 -LINE Chipset "s3_generic" -LINE Option "necwab" -LINE Ramdac "s3_sdac" -LINE ClockChip "s3_sdac" - -NAME PC9821Ap3 -SEE NEC 864 - -NAME PC9821As3 -SEE NEC 864 - -NAME PC9821Xp -SEE NEC 864 - -NAME PC9821Xs -SEE NEC 864 - -# PWSKB - -NAME PowerWindow 928/801 -CHIPSET S3 928 -SERVER PWSKB -LINE Chipset "s3_generic" -LINE # Chipset "mmio_928" -LINE Ramdac "sc15025" -LINE Dacspeed 110 -LINE Option "dac_8_bit" -LINE # Option "epsonmemwin" -LINE # Option "nomemaccess" -LINE ClockChip "icd2061a" - -NAME PowerWindow 928II -CHIPSET S3 928 -SERVER PWSKB -LINE Chipset "s3_generic" -LINE # Chipset "mmio_928" -LINE Ramdac "att20c505" -LINE # Ramdac "bt485" -LINE Dacspeed 110 -LINE Option "dac_8_bit" -LINE # Option "pw_mux" -LINE Option "bt485_curs" -LINE # Option "epsonmemwin" -LINE # Option "nomemaccess" -LINE ClockChip "icd2061a" - -NAME PowerWindow 805i -CHIPSET S3 805 -SERVER PWSKB -LINE Chipset "s3_generic" -LINE Ramdac "s3gendac" -LINE Dacspeed 110 -LINE Option "dac_8_bit" -LINE # Option "pw805i" -LINE # Option "epsonmemwin" -LINE # Option "nomemaccess" -LINE ClockChip "s3_sdac" - -NAME PowerWindow 928G -CHIPSET S3 928 -SERVER PWSKB -LINE Chipset "s3_generic" -LINE # Chipset "mmio_928" -LINE Ramdac "sc15025" -LINE Dacspeed 110 -LINE Option "dac_8_bit" -LINE # Option "nomemaccess" -LINE # Option "nolinear" -LINE ClockChip "icd2061a" - -NAME PCSKB/PCSKB2 -CHIPSET S3 911/924 -SERVER PWSKB -LINE Chipset "s3_generic" -LINE Ramdac "sc15025" -LINE Dacspeed 110 -LINE Option "dac_8_bit" -LINE # Option "nomemaccess" -LINE Option "pcskb" -LINE Clocks 25.0 28.0 40.0 0.0 50.0 77.0 36.0 45.0 -LINE Clocks 130.0 120.0 80.0 31.0 110.0 65.0 75.0 94.0 - -NAME PCSKB3/PCSKB4/PCPKB4 -CHIPSET S3 928 -SERVER PWSKB -LINE Chipset "s3_generic" -LINE Ramdac "sc15025" -LINE # Ramdac "att20c498" -LINE Dacspeed 110 -LINE Option "dac_8_bit" -LINE Option "nomemaccess" -LINE Option "pcskb4" -LINE Clocks 25.0 28.0 40.0 0.0 50.0 77.0 36.0 45.0 -LINE Clocks 130.0 120.0 80.0 31.0 110.0 65.0 75.0 94.0 - -# PWLB - -NAME PowerWindow 928GLB -CHIPSET S3 928 -SERVER PWLB -LINE Chipset "s3_generic" -LINE # Chipset "mmio_928" -LINE Ramdac "sc15025" -LINE Dacspeed 110 -LINE Option "dac_8_bit" -LINE # Option "pw_localbus" -LINE # Option "nomemaccess" -LINE # Option "nolinear" -LINE ClockChip "icd2061a" - -NAME PowerWindow 928IILB -CHIPSET S3 928 -SERVER PWLB -LINE Chipset "s3_generic" -LINE # Chipset "mmio_928" -LINE Ramdac "att20c505" -LINE # Ramdac "bt485" -LINE Dacspeed 110 -LINE Option "dac_8_bit" -LINE Option "bt485_curs" -LINE Option "pw_localbus" -LINE # Option "pw_mux" -LINE # Option "nomemaccess" -LINE # Option "nolinear" -LINE ClockChip "icd2061a" - -NAME PowerWindow 964LB -CHIPSET S3 964 -SERVER PWLB -LINE Chipset "s3_generic" -LINE Option "pw_localbus" -LINE Option "number_nine" -LINE Ramdac "ti3025" -LINE ClockChip "ti3025" -LINE VideoRam 4096 - -# GA968 - -NAME GA-968V4/PCI -CHIPSET S3 968 -SERVER GA968 -LINE Chipset "s3_generic" -LINE # Chipset "mmio_928" -LINE VideoRam 4096 diff --git a/xorg-server/hw/xfree86/utils/xorgconfig/Makefile.am b/xorg-server/hw/xfree86/utils/xorgconfig/Makefile.am deleted file mode 100644 index dabfc3214..000000000 --- a/xorg-server/hw/xfree86/utils/xorgconfig/Makefile.am +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, and/or sell copies of the Software, and to permit persons -# to whom the Software is furnished to do so, provided that the above -# copyright notice(s) and this permission notice appear in all copies of -# the Software and that both the above copyright notice(s) and this -# permission notice appear in supporting documentation. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL -# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING -# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# -# Except as contained in this notice, the name of a copyright holder -# shall not be used in advertising or otherwise to promote the sale, use -# or other dealings in this Software without prior written authorization -# of the copyright holder. -# - -bin_PROGRAMS = xorgconfig - -X11dir = $(libdir)/X11 -dist_X11_DATA = Cards - -xorgconfig_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ \ - -DCARD_DATABASE_FILE='"$(X11dir)/Cards"' \ - -DPROJECTROOT='"$(PROJECTROOT)"' \ - -DFILEMANSUFFIX='"$(FILE_MAN_SUFFIX)"' \ - -DXVERSIONSTRING='"$(PACKAGE_STRING)"' - -xorgconfig_LDADD = @XORGCONFIG_DEP_LIBS@ - -xorgconfig_SOURCES = \ - cards.c \ - cards.h \ - xorgconfig.c - -# Man page -include $(top_srcdir)/cpprules.in - -appmandir = $(APP_MAN_DIR) - -appman_PRE = xorgconfig.man -appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) - -EXTRAMANDEFS = \ - -D__XCONFIGFILE__=$(__XCONFIGFILE__) \ - -D__XSERVERNAME__=$(XSERVERNAME) - -BUILT_SOURCES = $(appman_PRE) -CLEANFILES = $(appman_PRE) $(appman_DATA) - -SUFFIXES += .$(APP_MAN_SUFFIX) .man - -.man.$(APP_MAN_SUFFIX): - -rm -f $@ - $(LN_S) $< $@ - -EXTRA_DIST = \ - Cards98 \ - xorgconfig.man.pre diff --git a/xorg-server/hw/xfree86/utils/xorgconfig/Makefile.in b/xorg-server/hw/xfree86/utils/xorgconfig/Makefile.in deleted file mode 100644 index 4e54d04a1..000000000 --- a/xorg-server/hw/xfree86/utils/xorgconfig/Makefile.in +++ /dev/null @@ -1,857 +0,0 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, and/or sell copies of the Software, and to permit persons -# to whom the Software is furnished to do so, provided that the above -# copyright notice(s) and this permission notice appear in all copies of -# the Software and that both the above copyright notice(s) and this -# permission notice appear in supporting documentation. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL -# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING -# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# -# Except as contained in this notice, the name of a copyright holder -# shall not be used in advertising or otherwise to promote the sale, use -# or other dealings in this Software without prior written authorization -# of the copyright holder. -# - -# -*- Makefile -*- -# Rules for generating files using the C pre-processor -# (Replaces CppFileTarget from Imake) - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = xorgconfig$(EXEEXT) -DIST_COMMON = $(dist_X11_DATA) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/cpprules.in -subdir = hw/xfree86/utils/xorgconfig -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ - $(top_builddir)/include/xorg-server.h \ - $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ - $(top_builddir)/include/xorg-config.h \ - $(top_builddir)/include/xkb-config.h \ - $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" \ - "$(DESTDIR)$(X11dir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_xorgconfig_OBJECTS = xorgconfig-cards.$(OBJEXT) \ - xorgconfig-xorgconfig.$(OBJEXT) -xorgconfig_OBJECTS = $(am_xorgconfig_OBJECTS) -xorgconfig_DEPENDENCIES = -xorgconfig_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(xorgconfig_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(xorgconfig_SOURCES) -DIST_SOURCES = $(xorgconfig_SOURCES) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -appmanDATA_INSTALL = $(INSTALL_DATA) -dist_X11DATA_INSTALL = $(INSTALL_DATA) -DATA = $(appman_DATA) $(dist_X11_DATA) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ -ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ -APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ -APP_MAN_DIR = @APP_MAN_DIR@ -APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASE_FONT_PATH = @BASE_FONT_PATH@ -BUILD_DATE = @BUILD_DATE@ -BUILD_TIME = @BUILD_TIME@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DARWIN_LIBS = @DARWIN_LIBS@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ -DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ -DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DGA_CFLAGS = @DGA_CFLAGS@ -DGA_LIBS = @DGA_LIBS@ -DIX_CFLAGS = @DIX_CFLAGS@ -DLLTOOL = @DLLTOOL@ -DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ -DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ -DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ -DMXMODULES_LIBS = @DMXMODULES_LIBS@ -DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ -DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ -DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ -DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ -DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ -DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ -DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ -DRIPROTO_LIBS = @DRIPROTO_LIBS@ -DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ -DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ -DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ -DSYMUTIL = @DSYMUTIL@ -DTRACE = @DTRACE@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -FILE_MAN_DIR = @FILE_MAN_DIR@ -FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ -GLX_DEFINES = @GLX_DEFINES@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -HAL_CFLAGS = @HAL_CFLAGS@ -HAL_LIBS = @HAL_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ -KDRIVE_INCS = @KDRIVE_INCS@ -KDRIVE_LIBS = @KDRIVE_LIBS@ -KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ -KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ -KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ -LDFLAGS = @LDFLAGS@ -LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ -LIBDRM_LIBS = @LIBDRM_LIBS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_MAN_DIR = @LIB_MAN_DIR@ -LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ -MISC_MAN_DIR = @MISC_MAN_DIR@ -MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ -MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCCLD = @OBJCCLD@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJCLINK = @OBJCLINK@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ -PCIACCESS_LIBS = @PCIACCESS_LIBS@ -PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ -PERL = @PERL@ -PKG_CONFIG = @PKG_CONFIG@ -PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ -RANLIB = @RANLIB@ -RAWCPP = @RAWCPP@ -RAWCPPFLAGS = @RAWCPPFLAGS@ -SED = sed -SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ -SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ -STRIP = @STRIP@ -TSLIB_CFLAGS = @TSLIB_CFLAGS@ -TSLIB_LIBS = @TSLIB_LIBS@ -UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ -VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ -VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ -X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ -X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ -XDMCP_CFLAGS = @XDMCP_CFLAGS@ -XDMCP_LIBS = @XDMCP_LIBS@ -XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ -XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ -XDMX_CFLAGS = @XDMX_CFLAGS@ -XDMX_LIBS = @XDMX_LIBS@ -XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ -XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ -XEPHYR_INCS = @XEPHYR_INCS@ -XEPHYR_LIBS = @XEPHYR_LIBS@ -XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ -XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ -XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ -XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ -XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ -XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ -XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ -XLIB_CFLAGS = @XLIB_CFLAGS@ -XLIB_LIBS = @XLIB_LIBS@ -XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ -XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ -XNEST_LIBS = @XNEST_LIBS@ -XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ -XORG_CFLAGS = @XORG_CFLAGS@ -XORG_INCS = @XORG_INCS@ -XORG_LIBS = @XORG_LIBS@ -XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ -XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ -XORG_OS = @XORG_OS@ -XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ -XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ -XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ -XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ -XSDL_INCS = @XSDL_INCS@ -XSDL_LIBS = @XSDL_LIBS@ -XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ -XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ -XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ -XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ -XSERVER_LIBS = @XSERVER_LIBS@ -XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ -XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ -XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ -XVFB_LIBS = @XVFB_LIBS@ -XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ -XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ -XWINMODULES_LIBS = @XWINMODULES_LIBS@ -XWIN_LIBS = @XWIN_LIBS@ -XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ -XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -__XCONFIGFILE__ = @__XCONFIGFILE__@ -abi_ansic = @abi_ansic@ -abi_extension = @abi_extension@ -abi_font = @abi_font@ -abi_videodrv = @abi_videodrv@ -abi_xinput = @abi_xinput@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -driverdir = @driverdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -extdir = @extdir@ -ft_config = @ft_config@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -logdir = @logdir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -moduledir = @moduledir@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sdkdir = @sdkdir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ -X11dir = $(libdir)/X11 -dist_X11_DATA = Cards -xorgconfig_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ \ - -DCARD_DATABASE_FILE='"$(X11dir)/Cards"' \ - -DPROJECTROOT='"$(PROJECTROOT)"' \ - -DFILEMANSUFFIX='"$(FILE_MAN_SUFFIX)"' \ - -DXVERSIONSTRING='"$(PACKAGE_STRING)"' - -xorgconfig_LDADD = @XORGCONFIG_DEP_LIBS@ -xorgconfig_SOURCES = \ - cards.c \ - cards.h \ - xorgconfig.c - -SUFFIXES = .pre .man .man.pre .$(APP_MAN_SUFFIX) .man - -# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM -# to cpp, because that trick does not work on all ANSI C preprocessors. -# Delete line numbers from the cpp output (-P is not portable, I guess). -# Allow XCOMM to be preceded by whitespace and provide a means of generating -# output lines with trailing backslashes. -# Allow XHASH to always be substituted, even in cases where XCOMM isn't. -CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ - -e '/^\#line *[0-9][0-9]* *.*$$/d' \ - -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ - -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ - -e '/^[ ]*XHASH/s/XHASH/\#/' \ - -e '/\@\@$$/s/\@\@$$/\\/' - - -# Strings to replace in man pages -XORGRELSTRING = @PACKAGE_STRING@ -XORGMANNAME = X Version 11 -XSERVERNAME = Xorg -MANDEFS = \ - -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ - -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ - -D__appmansuffix__=$(APP_MAN_SUFFIX) \ - -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ - -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ - -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ - -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ - -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ - -D__mandir__=$(mandir) \ - -D__projectroot__=$(prefix) \ - -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \ - -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) - - -# Man page -appmandir = $(APP_MAN_DIR) -appman_PRE = xorgconfig.man -appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) -EXTRAMANDEFS = \ - -D__XCONFIGFILE__=$(__XCONFIGFILE__) \ - -D__XSERVERNAME__=$(XSERVERNAME) - -BUILT_SOURCES = $(appman_PRE) -CLEANFILES = $(appman_PRE) $(appman_DATA) -EXTRA_DIST = \ - Cards98 \ - xorgconfig.man.pre - -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .pre .man .man.pre .$(APP_MAN_SUFFIX) .man .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/utils/xorgconfig/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign hw/xfree86/utils/xorgconfig/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - || test -f $$p1 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -xorgconfig$(EXEEXT): $(xorgconfig_OBJECTS) $(xorgconfig_DEPENDENCIES) - @rm -f xorgconfig$(EXEEXT) - $(xorgconfig_LINK) $(xorgconfig_OBJECTS) $(xorgconfig_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgconfig-cards.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgconfig-xorgconfig.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -xorgconfig-cards.o: cards.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgconfig_CFLAGS) $(CFLAGS) -MT xorgconfig-cards.o -MD -MP -MF $(DEPDIR)/xorgconfig-cards.Tpo -c -o xorgconfig-cards.o `test -f 'cards.c' || echo '$(srcdir)/'`cards.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgconfig-cards.Tpo $(DEPDIR)/xorgconfig-cards.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cards.c' object='xorgconfig-cards.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgconfig_CFLAGS) $(CFLAGS) -c -o xorgconfig-cards.o `test -f 'cards.c' || echo '$(srcdir)/'`cards.c - -xorgconfig-cards.obj: cards.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgconfig_CFLAGS) $(CFLAGS) -MT xorgconfig-cards.obj -MD -MP -MF $(DEPDIR)/xorgconfig-cards.Tpo -c -o xorgconfig-cards.obj `if test -f 'cards.c'; then $(CYGPATH_W) 'cards.c'; else $(CYGPATH_W) '$(srcdir)/cards.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgconfig-cards.Tpo $(DEPDIR)/xorgconfig-cards.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cards.c' object='xorgconfig-cards.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgconfig_CFLAGS) $(CFLAGS) -c -o xorgconfig-cards.obj `if test -f 'cards.c'; then $(CYGPATH_W) 'cards.c'; else $(CYGPATH_W) '$(srcdir)/cards.c'; fi` - -xorgconfig-xorgconfig.o: xorgconfig.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgconfig_CFLAGS) $(CFLAGS) -MT xorgconfig-xorgconfig.o -MD -MP -MF $(DEPDIR)/xorgconfig-xorgconfig.Tpo -c -o xorgconfig-xorgconfig.o `test -f 'xorgconfig.c' || echo '$(srcdir)/'`xorgconfig.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgconfig-xorgconfig.Tpo $(DEPDIR)/xorgconfig-xorgconfig.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xorgconfig.c' object='xorgconfig-xorgconfig.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgconfig_CFLAGS) $(CFLAGS) -c -o xorgconfig-xorgconfig.o `test -f 'xorgconfig.c' || echo '$(srcdir)/'`xorgconfig.c - -xorgconfig-xorgconfig.obj: xorgconfig.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgconfig_CFLAGS) $(CFLAGS) -MT xorgconfig-xorgconfig.obj -MD -MP -MF $(DEPDIR)/xorgconfig-xorgconfig.Tpo -c -o xorgconfig-xorgconfig.obj `if test -f 'xorgconfig.c'; then $(CYGPATH_W) 'xorgconfig.c'; else $(CYGPATH_W) '$(srcdir)/xorgconfig.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/xorgconfig-xorgconfig.Tpo $(DEPDIR)/xorgconfig-xorgconfig.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xorgconfig.c' object='xorgconfig-xorgconfig.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xorgconfig_CFLAGS) $(CFLAGS) -c -o xorgconfig-xorgconfig.obj `if test -f 'xorgconfig.c'; then $(CYGPATH_W) 'xorgconfig.c'; else $(CYGPATH_W) '$(srcdir)/xorgconfig.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-appmanDATA: $(appman_DATA) - @$(NORMAL_INSTALL) - test -z "$(appmandir)" || $(MKDIR_P) "$(DESTDIR)$(appmandir)" - @list='$(appman_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(appmanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(appmandir)/$$f'"; \ - $(appmanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(appmandir)/$$f"; \ - done - -uninstall-appmanDATA: - @$(NORMAL_UNINSTALL) - @list='$(appman_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \ - rm -f "$(DESTDIR)$(appmandir)/$$f"; \ - done -install-dist_X11DATA: $(dist_X11_DATA) - @$(NORMAL_INSTALL) - test -z "$(X11dir)" || $(MKDIR_P) "$(DESTDIR)$(X11dir)" - @list='$(dist_X11_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(dist_X11DATA_INSTALL) '$$d$$p' '$(DESTDIR)$(X11dir)/$$f'"; \ - $(dist_X11DATA_INSTALL) "$$d$$p" "$(DESTDIR)$(X11dir)/$$f"; \ - done - -uninstall-dist_X11DATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_X11_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(X11dir)/$$f'"; \ - rm -f "$(DESTDIR)$(X11dir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(PROGRAMS) $(DATA) -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(X11dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-appmanDATA install-dist_X11DATA - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \ - uninstall-dist_X11DATA - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-appmanDATA install-binPROGRAMS install-data \ - install-data-am install-dist_X11DATA install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-appmanDATA uninstall-binPROGRAMS \ - uninstall-dist_X11DATA - - -.pre: - $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ - -.man.pre.man: - $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ - -.man.$(APP_MAN_SUFFIX): - -rm -f $@ - $(LN_S) $< $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/xorg-server/hw/xfree86/utils/xorgconfig/cards.c b/xorg-server/hw/xfree86/utils/xorgconfig/cards.c deleted file mode 100644 index 8116f0a03..000000000 --- a/xorg-server/hw/xfree86/utils/xorgconfig/cards.c +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Functions to manipulate card database. - */ - -#include -#include -#include - -#include "cards.h" - -/* Some vars to make path names in texts more flexible. */ -#ifndef PROJECTROOT -# define PROJECTROOT "/usr" -#endif -#define TREEROOT PROJECTROOT -#define TREEROOTLX TREEROOT "/lib/X11" -#define TREEROOTCFG TREEROOT "/etc/X11" -#ifdef XDOCDIR -# define TREEROOTDOC XDOCDIR -#else -# define TREEROOTDOC TREEROOTLX "/doc" -#endif - -/* - * Database format: - * - * NAME - * CHIPSET - * SERVER - * DRIVER - * - * Optional keywords: - * RAMDAC - * CLOCKCHIP - * DACSPEED - * NOCLOCKPROBE - * UNSUPPORTED - * - * SEE refers to another card definition; parameters that - * are already defined are not overridden. - * - * is one of Mono, VGA16, SVGA, S3, Mach32, Mach8, 8514, - * P9000, AGX, W32. - * - * A useful additional keywords may be CLOCKS. - */ - - - -/* Database vars. */ - -int lastcard; - -Card card[MAX_CARDS]; - - -static int -getnextline(FILE *f, char *l) -{ - if (fgets(l, 128, f) == NULL) - return -1; - return 0; -} - -static void -appendstring(char **destp, char *src) -{ - char *newstr; - newstr = malloc(strlen(*destp) + strlen(src) + 1); - strcpy(newstr, *destp); - strcat(newstr, src); - if (strlen(*destp) > 0) - free(*destp); - *destp = newstr; -} - -int -lookupcard(char *name) { - int i; - for (i = 0; i <= lastcard; i++) - if (strcmp(name, card[i].name) == 0) - return i; - return -1; -} - -static char *s3_comment = -"# Use Option \"nolinear\" if the server doesn't start up correctly\n" -"# (this avoids the linear framebuffer probe). If that fails try\n" -"# option \"nomemaccess\".\n" -"#\n" -"# Refer to " TREEROOTDOC "/README.S3, and the XF86_S3 man page.\n"; - -static char *cirrus_comment = -"# Use Option \"no_bitblt\" if you have graphics problems. If that fails\n" -"# try Option \"noaccel\".\n" -"# Refer to " TREEROOTDOC "/README.cirrus.\n" -"# To allow linear addressing, uncomment the Option line and the\n" -"# address that the card maps the framebuffer to.\n"; - -int parse_database() { - FILE *f; - char buf[128]; - int i, lineno; - char filename[128]; - - strcpy(filename, CARD_DATABASE_FILE); - f = fopen(filename, "r"); - if (f == NULL) - return -1; - - lastcard = -1; - lineno = 0; - - for (;;) { - if (getnextline(f, buf)) - break; - lineno++; - if (buf[0] == '#') - /* Comment. */ - continue; - if (strncmp(buf, "END", 3) == 0) - /* End of database. */ - break; - if (strncmp(buf, "LINE", 4) == 0 && lastcard>=0) { - /* Line of Device comment. */ - /* Append to existing lines. */ - appendstring(&card[lastcard].lines, buf + 5); - continue; - } - /* - * The following keywords require the trailing newline - * to be deleted. - */ - i = strlen(buf); - buf[--i] = '\0'; - - /* remove trailing spaces or tabs */ - for(--i; i>=0 && (buf[i] == ' ' || buf[i] == '\011'); i--) ; - if (i>=0) - buf[i+1] = '\0'; - else - continue; /* skip empty lines */ - - if (strncmp(buf, "NAME", 4) == 0) { - /* New entry. */ - lastcard++; - card[lastcard].name = malloc(strlen(buf + 5) + 1); - strcpy(card[lastcard].name, buf + 5); - card[lastcard].chipset = NULL; - card[lastcard].server = NULL; - card[lastcard].driver = NULL; - card[lastcard].ramdac = NULL; - card[lastcard].clockchip = NULL; - card[lastcard].dacspeed = NULL; - card[lastcard].flags = 0; - card[lastcard].lines = ""; - continue; - } - if (lastcard < 0) /* no NAME line found yet */ - continue; - if (strncmp(buf, "SEE", 3) == 0) { - /* Reference to another entry. */ - int i; - i = lookupcard(buf + 4); - if (i == -1) { - printf("Error in database, invalid reference: %s.\n", - buf + 4); - free(card[lastcard].name); - lastcard--; - continue; - } - if (card[lastcard].chipset == NULL) - card[lastcard].chipset = card[i].chipset; - if (card[lastcard].server == NULL) - card[lastcard].server = card[i].server; - if (card[lastcard].driver == NULL) - card[lastcard].driver = card[i].driver; - if (card[lastcard].ramdac == NULL) - card[lastcard].ramdac = card[i].ramdac; - if (card[lastcard].clockchip == NULL) - card[lastcard].clockchip = card[i].clockchip; - if (card[lastcard].dacspeed == NULL) - card[lastcard].dacspeed = card[i].dacspeed; - card[lastcard].flags |= card[i].flags; - appendstring(&card[lastcard].lines, card[i].lines); - continue; - } - if (strncmp(buf, "CHIPSET", 7) == 0) { - /* Chipset description. */ - card[lastcard].chipset = malloc(strlen(buf + 8) + 1); - strcpy(card[lastcard].chipset, buf + 8); - continue; - } - if (strncmp(buf, "SERVER", 6) == 0) { - /* Server identifier. */ - card[lastcard].server = malloc(strlen(buf + 7) + 1); - strcpy(card[lastcard].server, buf + 7); - continue; - } - if (strncmp(buf, "DRIVER", 6) == 0) { - /* Driver identifier. */ - card[lastcard].driver = malloc(strlen(buf + 7) + 1); - strcpy(card[lastcard].driver, buf + 7); - continue; - } - if (strncmp(buf, "RAMDAC", 6) == 0) { - /* Ramdac indentifier. */ - card[lastcard].ramdac = malloc(strlen(buf + 7) + 1); - strcpy(card[lastcard].ramdac, buf + 7); - continue; - } - if (strncmp(buf, "CLOCKCHIP", 9) == 0) { - /* Clockchip indentifier. */ - card[lastcard].clockchip = malloc(strlen(buf + 10) + 1); - strcpy(card[lastcard].clockchip, buf + 10); - card[lastcard].flags |= NOCLOCKPROBE; - continue; - } - if (strncmp(buf, "DACSPEED", 8) == 0) { - /* Clockchip indentifier. */ - card[lastcard].dacspeed = malloc(strlen(buf + 9) + 1); - strcpy(card[lastcard].dacspeed, buf + 9); - continue; - } - if (strncmp(buf, "NOCLOCKPROBE", 12) == 0) { - card[lastcard].flags |= NOCLOCKPROBE; - continue; - } - if (strncmp(buf, "UNSUPPORTED", 12) == 0) { - card[lastcard].flags |= UNSUPPORTED; - continue; - } - /* test for missing required fields */ - if (card[lastcard].driver == NULL) { - fprintf(stderr, "Warning DRIVER specification missing " - "in Card database entry %s (line %d).\n", - card[lastcard].name, lineno); - keypress(); - card[lastcard].driver = "unknown"; - } - if (card[lastcard].chipset == NULL) { - fprintf(stderr, "Warning CHIPSET specification missing " - "in Card database entry %s (line %d).\n", - card[lastcard].name, lineno); - keypress(); - card[lastcard].chipset = "unknown"; - } - } - - fclose(f); - - /* - * Add general comments. - */ - for (i = 0; i <= lastcard; i++) { - if (card[i].server && strcmp(card[i].server, "S3") == 0) - appendstring(&card[i].lines, s3_comment); - if (card[i].chipset && - strncmp(card[i].chipset, "CL-GD", 5) == 0) - appendstring(&card[i].lines, cirrus_comment); - } - - sort_database(); - - return 0; -} - -static int -compare_card(const void *e1, const void *e2) -{ - return strcmp(((Card *)e1)->name, ((Card *)e2)->name); -} - -void -sort_database() { - /* Each element is a bunch of words, but nothing too bad. */ - qsort(card, lastcard + 1, sizeof(Card), compare_card); -} diff --git a/xorg-server/hw/xfree86/utils/xorgconfig/cards.h b/xorg-server/hw/xfree86/utils/xorgconfig/cards.h deleted file mode 100644 index 7e1438db8..000000000 --- a/xorg-server/hw/xfree86/utils/xorgconfig/cards.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef CARD_DATABASE_FILE -#define CARD_DATABASE_FILE "Cards" -#endif - -#define MAX_CARDS 1000 - -typedef struct { - char *name; /* Name of the card. */ - char *chipset; /* Chipset (decriptive). */ - char *server; /* Server identifier. */ - char *driver; /* Driver identifier. */ - char *ramdac; /* Ramdac identifier. */ - char *clockchip; /* Clockchip identifier. */ - char *dacspeed; /* DAC speed rating. */ - int flags; - char *lines; /* Additional Device section lines. */ -} Card; - -/* Flags: */ -#define NOCLOCKPROBE 0x1 /* Never probe clocks of the card. */ -#define UNSUPPORTED 0x2 /* Card is not supported (only VGA). */ - -extern int lastcard; - -extern Card card[MAX_CARDS]; - -extern int lookupcard ( char *name ); -extern int parse_database ( void ); -extern void sort_database ( void ); -extern void keypress ( void ); diff --git a/xorg-server/hw/xfree86/utils/xorgconfig/xorgconfig.c b/xorg-server/hw/xfree86/utils/xorgconfig/xorgconfig.c deleted file mode 100644 index 30eb83182..000000000 --- a/xorg-server/hw/xfree86/utils/xorgconfig/xorgconfig.c +++ /dev/null @@ -1,2890 +0,0 @@ -/* - * This is a configuration program that will create a base XF86Config - * file based on menu choices. Its main feature is that clueless users - * may be less inclined to select crazy sync rates way over monitor spec, - * by presenting a menu with standard monitor types. Also some people - * don't read docs unless an executable that they can run tells them to. - * - * It assumes a 24-line or bigger text console. - * - * Revision history: - * 25Sep94 Initial version. - * 27Sep94 Fix hsync range of monitor types to match with best possible mode. - * Remove 'const'. - * Tweak descriptions. - * 28Sep94 Fixes from J"org Wunsch: - * Don't use gets(). - * Add mouse device prompt. - * Fix lines overrun for 24-line console. - * Increase buffer size for probeonly output. - * 29Sep94 Fix bad bug with old XF86Config preserving during probeonly run. - * Add note about vertical refresh in interlaced modes. - * Name gets() replacement getstring(). - * Add warning about binary paths. - * Fixes from David Dawes: - * Don't use 'ln -sf'. - * Omit man path reference in comment. - * Generate only a generic 320x200 SVGA section for accel cards. - * Only allow writing to /usr/X11R6/lib/X11 if root, and use - * -xf86config for the -probeonly phase (root only). - * Fix bug that forces screen type to accel in some cases. - * 30Sep94 Continue after clocks probe fails. - * Note about programmable clocks. - * Rename to 'xf86config'. Not to be confused with XF86Config - * or the -xf86config option. - * 07Oct94 Correct hsync in standard mode timings comments, and include - * the proper +/-h/vsync flags. - * 11Oct94 Skip 'numclocks:' and 'pixel clocks:' lines when probing for - * clocks. - * 18Oct94 Add check for existence of /usr/X11R6. - * Add note about ctrl-alt-backspace. - * 06Nov94 Add comment above standard mode timings in XF86Config. - * 24Dec94 Add low-resolution modes using doublescan. - * 29Dec94 Add note in horizontal sync range selection. - * Ask about ClearDTR/RTS option for Mouse Systems mice. - * Ask about writing to /etc/XF86Config. - * Allow link to be set in /var/X11R6/bin. - * Note about X -probeonly crashing. - * Add keyboard Alt binding option for non-ASCII characters. - * Add card database selection. - * Write temporary XF86Config for clock probing in /tmp instead - * of /usr/X11R6/lib/X11. - * Add RAMDAC and Clockchip menu. - * 27Mar99 Modified for XFree86 4.0 config file format - * 06Sep02 Write comment block about 'DontVTSwitch'. - * - * Possible enhancements: - * - Add more standard mode timings (also applies to README.Config). Missing - * are 1024x768 @ 72 Hz, 1152x900 modes, and 1280x1024 @ ~70 Hz. - * I suspect there is a VESA standard for 1024x768 @ 72 Hz with 77 MHz dot - * clock, and 1024x768 @ 75 Hz with 78.7 MHz dot clock. New types of - * monitors probably work better with VESA 75 Hz timings. - * - Add option for creation of clear, minimal XF86Config. - * - The card database doesn't include most of the entries in previous - * databases. - * - * Send comments to H.Hanemaayer@inter.nl.net. - * - * Things to keep up-to-date: - * - Accelerated server names. - * - Ramdac and Clockchip settings. - * - The card database. - * - */ -/* Oct2000 - * New 'Configuration of XKB' section. - * Author: Ivan Pascal The XFree86 Project. - */ -/* - * Nov2002 - * Some enhancements: - * - Add new PS/2 mouse protocol. - * "IMPS/2","ExplorerPS/2","ThinkingMousePS/2","MouseManPlusPS/2", - * "GlidePointPS/2","NetMousePS/2" and "NetScrollPS/2". - * - Add mouse-speed setting for PS/2 mouse. - * - Fix seg.fault problem on Solaris. - * - Add modestring "1400x1050"(for ATI Mobile-Rage). - * - Add videomemory 8192, 16384, 32768, 65536, 131072 and 262144. - * - Ready to DRI. - * - Load xtt module instead of freetype module. - * - Add font path "/TrueType/" and "/freefont/". - * Chisato Yamauchi(cyamauch@phyas.aichi-edu.ac.jp) - */ - -#ifdef HAVE_CONFIG_H -# include "xorg-server.h" -# include "xkb-config.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#define MAX_XKBOPTIONS 5 - -#include "cards.h" - - -/* - * Define the following to 310 to remove references to XFree86 features that - * have been added since XFree86 3.1 (e.g. DoubleScan modes). - * or to 311 to remove certain new modelines - */ -#define XFREE86_VERSION 400 - -/* - * Define this to have /etc/X11/XF86Config prompted for as the default - * location to write the XF86Config file to. - */ -#define PREFER_XF86CONFIG_IN_ETC - -/* - * Define this to force the user to go through XKB configuration section. - * - */ -#define FORCE_XKB_DIALOG - -/* - * Configuration variables. - */ - -#define MAX_CLOCKS_LINES 16 - -#define DUMBCONFIG2 "dumbconfig.2" -#define DUMBCONFIG3 "dumbconfig.3" - -/* some more vars to make path names in texts more flexible. OS/2 users - * may be more irritated than Unix users - */ -#ifndef PROJECTROOT -#define PROJECTROOT "/usr" -#endif -#define TREEROOT PROJECTROOT -#define TREEROOTLX TREEROOT "/lib/X11" -#define TREEROOTCFG TREEROOT "/etc/X11" -#define TREEROOTSHARE TREEROOT "/share/X11" -#ifdef XDOCDIR -# define TREEROOTDOC XDOCDIR -#else -# define TREEROOTDOC TREEROOTLX "/doc" -#endif -#ifdef XFONTDIR -# define TREEROOTFONT XFONTDIR -#else -# define TREEROOTFONT TREEROOTLX "/fonts" -#endif -#define MODULEPATH TREEROOT "/lib/modules" - -#define XSERVERNAME_FOR_PROBE "X" - -#ifndef XCONFIGFILE -#define XCONFIGFILE "xorg.conf" -#endif -#define CONFIGNAME XCONFIGFILE - -/* - * This is the filename of the temporary XF86Config file that is written - * when the program is told to probe clocks (which can only happen for - * root). - */ -#define TEMPORARY_XF86CONFIG_DIR_PREFIX "/tmp/."XCONFIGFILE -#define TEMPORARY_XF86CONFIG_FILENAME XCONFIGFILE".tmp" - -#ifndef XF86_VERSION_MAJOR -#ifdef XVERSION -#if XVERSION > 40000000 -#define XF86_VERSION_MAJOR (XVERSION / 10000000) -#else -#define XF86_VERSION_MAJOR (XVERSION / 1000) -#endif -#else -#define XF86_VERSION_MAJOR 4 -#endif -#endif - - -int config_mousetype; /* Mouse. */ -int config_emulate3buttons; -int config_chordmiddle; -int config_cleardtrrts; -char *config_pointerdevice; -int config_altmeta; /* Keyboard. */ -int config_monitortype; /* Monitor. */ -char *config_hsyncrange; -char *config_vsyncrange; -char *config_monitoridentifier; -int config_videomemory; /* Video card. */ -int config_screentype; /* mono, vga16, svga, accel */ -char *config_deviceidentifier; -int config_numberofclockslines; -char *config_clocksline[MAX_CLOCKS_LINES]; -char *config_modesline8bpp; -char *config_modesline16bpp; -char *config_modesline24bpp; -int config_virtual; /* 1 (yes) or 0 (no) */ -int config_virtualx8bpp, config_virtualy8bpp; -int config_virtualx16bpp, config_virtualy16bpp; -int config_virtualx24bpp, config_virtualy24bpp; -char *config_ramdac; -char *config_dacspeed; -char *config_clockchip; -#if defined(__OpenBSD__) && defined(WSCONS_SUPPORT) && !defined(PCVT_SUPPORT) -char *config_keyboard_dev = "/dev/wskbd0"; -#endif -int config_xkbdisable = 0; -char *config_xkbrules; -char *config_xkbmodel = "pc105"; -char *config_xkblayout = "us"; -char *config_xkbvariant = (char *) 0; -char *config_xkboptions = (char *) 0; -char *config_depth; - -char *temp_dir = ""; - -/* - * These are from the selected card definition. Parameters from the - * definition are offered during the questioning about the video card. - */ - -int card_selected; /* Card selected from database. */ - - -static int write_XF86Config(char *filename); - - -/* - * This is the initial intro text that appears when the program is started. - */ - -static char *intro_text = -"\n" -"This program will create a basic " CONFIGNAME " file, based on menu selections\n" -"you make. It will ask for a pathname when it is ready to write the file.\n" -"\n" -"The " CONFIGNAME " file usually resides in /etc/X11 or " TREEROOTCFG ". If\n" -"no " CONFIGNAME " file is present there, " __XSERVERNAME__" will probe the system to\n" -"autoconfigure itself. You can run " __XSERVERNAME__ " -configure to generate a " CONFIGNAME "\n" -"file based on the results of autoconfiguration, or let this program\n" -"produce a base " CONFIGNAME " file for your configuration, and fine-tune it.\n" -"A sample " CONFIGNAME " file is also supplied with "__XSERVERNAME__"; it is configured \n" -"for a standard VGA card and monitor with 640x480 resolution.\n" -"\n" -"There are also many chipset and card-specific options and settings available,\n" -"but this program does not know about these. On some configurations some of\n" -"these settings must be specified. Refer to the X driver man pages and the\n" -"chipset-specific READMEs in " TREEROOTDOC " for further details.\n" -#if 0 -" Refer to " TREEROOTDOC "/README.Config\n" -"for a detailed overview of the configuration process.\n" -"\n" -"(what should we change this section to?)\n" -"For accelerated servers (including accelerated drivers in the SVGA server),\n" -"there are many chipset and card-specific options and settings. This program\n" -"does not know about these. On some configurations some of these settings must\n" -"be specified. Refer to the server man pages and chipset-specific READMEs.\n" -#endif -"\n" -"Before continuing with this program, make sure you know what video card\n" -"you have, and preferably also the chipset it uses and the amount of video\n" -"memory on your video card, as well as the specifications of your monitor.\n" -"\n" -; - -static char *finalcomment_text = -"File has been written. Take a look at it before starting an X server. Note that\n" -"the " CONFIGNAME " file must be in one of the directories searched by the server\n" -"(e.g. /etc/X11) in order to be used. Within the server press\n" -"ctrl, alt and '+' simultaneously to cycle video resolutions. Pressing ctrl,\n" -"alt and backspace simultaneously immediately exits the server (use if\n" -"the monitor doesn't sync for a particular mode).\n" -"\n" -"For further configuration, refer to the " XCONFIGFILE "(" FILEMANSUFFIX ") manual page.\n" -"\n"; - -static void * -Malloc(int i) { - void *p; - - p = malloc(i); - if (p == NULL) { - printf("Fatal malloc error\n"); - exit(-1); - } - return p; -} - -static char * -Strdup(const char *s){ - char *d; - - d = Malloc(strlen(s) + 1); - strcpy(d, s); - return d; -} - -static void -createtmpdir(void) { - /* length of prefix + 20 (digits in 2**64) + 1 (slash) + 1 */ - temp_dir = Malloc(strlen(TEMPORARY_XF86CONFIG_DIR_PREFIX) + 22); - sprintf(temp_dir, "%s%ld", TEMPORARY_XF86CONFIG_DIR_PREFIX, - (long)getpid()); - if (mkdir(temp_dir, 0700) != 0) { - printf("Cannot create directory %s\n", temp_dir); - exit(-1); - } - /* append a slash */ - strcat(temp_dir, "/"); -} - - -void -keypress(void) { - printf("Press enter to continue, or ctrl-c to abort."); - getchar(); - printf("\n"); -} - -static void -emptylines(void) { - int i; - for (i = 0; i < 50; i++) - printf("\n"); -} - -static int -answerisyes(char *s) -{ - if (s[0] == '\'') /* For fools that type the ' literally. */ - return tolower(s[1]) == 'y'; - return tolower(s[0]) == 'y'; -} - -/* - * This is a replacement for gets(). Limit is 80 chars. - * The 386BSD descendants scream about using gets(), for good reason. - */ - -static void -getstring(char *s) -{ - char *cp; - if (fgets(s, 80, stdin) == NULL) - exit(1); - cp = strchr(s, '\n'); - if (cp) - *cp=0; -} - -/* - * Mouse configuration. - */ - -int M_OSMOUSE, M_WSMOUSE, M_AUTO, - M_SYSMOUSE, M_MOUSESYSTEMS, M_PS2, - M_MICROSOFT, M_BUSMOUSE, M_IMPS2, - M_EXPLORER_PS2, M_GLIDEPOINT_PS2, M_MOUSEMANPLUS_PS2, - M_NETMOUSE_PS2, M_NETSCROLL_PS2, M_THINKINGMOUSE_PS2, - M_ACECAD, M_GLIDEPOINT, M_INTELLIMOUSE, - M_LOGITECH, M_MMHITTAB, M_MMSERIES, - M_MOUSEMAN, M_THINKINGMOUSE, M_VUID; - -struct { - char *name; - int *ident; - char *desc; -} mouse_info[] = { -#if defined(QNX4) -#define DEF_PROTO_STRING "OSMOUSE" - {"OSMOUSE", &M_OSMOUSE, - "OSMOUSE" - }, -#endif -#ifdef WSCONS_SUPPORT -#define WS_MOUSE_STRING "wsmouse" -#define DEF_PROTO_STRING WS_MOUSE_STRING - {WS_MOUSE_STRING, &M_WSMOUSE, - "wsmouse protocol" - }, -#endif -#ifndef DEF_PROTO_STRING -#define DEF_PROTO_STRING "Auto" -#endif - {"Auto", &M_AUTO, - "Auto detect" - }, -#ifdef sun - {"VUID", &M_VUID, - "Solaris VUID protocol (SPARC, USB, or virtual mouse)" - }, -#endif - {"SysMouse", &M_SYSMOUSE, - "SysMouse" - }, -#define M_MOUSESYSTEMS_STRING "MouseSystems" - {M_MOUSESYSTEMS_STRING, &M_MOUSESYSTEMS, - "Mouse Systems (3-button protocol)" - }, - {"PS/2", &M_PS2, - "PS/2 Mouse" - }, -#define M_MICROSOFT_STRING "Microsoft" - {M_MICROSOFT_STRING, &M_MICROSOFT, - "Microsoft compatible (2-button protocol)" - }, - {"Busmouse", &M_BUSMOUSE, - "Bus Mouse" - }, -#ifndef __FreeBSD__ - {"IMPS/2", &M_IMPS2, - "IntelliMouse PS/2" - }, - {"ExplorerPS/2", &M_EXPLORER_PS2, - "Explorer PS/2" - }, - {"GlidePointPS/2", &M_GLIDEPOINT_PS2, - "GlidePoint PS/2" - }, - {"MouseManPlusPS/2", &M_MOUSEMANPLUS_PS2, - "MouseManPlus PS/2" - }, - {"NetMousePS/2", &M_NETMOUSE_PS2, - "NetMouse PS/2" - }, - {"NetScrollPS/2", &M_NETSCROLL_PS2, - "NetScroll PS/2" - }, - {"ThinkingMousePS/2", &M_THINKINGMOUSE_PS2, - "ThinkingMouse PS/2" - }, -#endif - {"AceCad", &M_ACECAD, - "AceCad" - }, - {"GlidePoint", &M_GLIDEPOINT, - "GlidePoint" - }, - {"IntelliMouse", &M_INTELLIMOUSE, - "Microsoft IntelliMouse" - }, - {"Logitech", &M_LOGITECH, - "Logitech Mouse (serial, old type, Logitech protocol)" - }, - {"MMHitTab", &M_MMHITTAB, - "MM HitTablet" - }, - {"MMSeries", &M_MMSERIES, - "MM Series" /* XXXX These descriptions should be improved. */ - }, - {"MouseMan", &M_MOUSEMAN, - "Logitech MouseMan (Microsoft compatible)" - }, - {"ThinkingMouse", &M_THINKINGMOUSE, - "ThinkingMouse" - }, -}; - -#ifdef WSCONS_SUPPORT -# define DEF_MOUSEDEV "/dev/wsmouse"; -#elif defined(__FreeBSD__) || defined(__DragonFly__) -# define DEF_MOUSEDEV "/dev/sysmouse"; -#elif defined(__linux__) -# define DEF_MOUSEDEV "/dev/input/mice"; -#else -# define DEF_MOUSEDEV "/dev/mouse"; -#endif - -static char *mouseintro_text = -"First specify a mouse protocol type. Choose one from the following list:\n" -"\n"; - -static char *mousedev_text = -"Now give the full device name that the mouse is connected to, for example\n" -"/dev/tty00. Just pressing enter will use the default, %s.\n" -"\n"; - -static char *mousecomment_text = -"The recommended protocol is " DEF_PROTO_STRING ". If you have a very old mouse\n" -"or don't want OS support or auto detection, and you have a two-button\n" -"or three-button serial mouse, it is most likely of type " M_MICROSOFT_STRING ".\n" -#ifdef WSCONS_SUPPORT -"\n" -"If your system uses the wscons console driver, with a PS/2 type mouse,\n" -"select " WS_MOUSE_STRING ".\n" -#endif -"\n"; - -static char *twobuttonmousecomment_text = -"You have selected a two-button mouse protocol. It is recommended that you\n" -"enable Emulate3Buttons.\n"; - -static char *threebuttonmousecomment_text = -"You have selected a three-button mouse protocol. It is recommended that you\n" -"do not enable Emulate3Buttons, unless the third button doesn't work.\n"; - -static char *unknownbuttonsmousecomment_text = -"If your mouse has only two buttons, it is recommended that you enable\n" -"Emulate3Buttons.\n"; - -static char *microsoftmousecomment_text = -"You have selected a Microsoft protocol mouse. If your mouse was made by\n" -"Logitech, you might want to enable ChordMiddle which could cause the\n" -"third button to work.\n"; - -static char *mousesystemscomment_text = -"You have selected a Mouse Systems protocol mouse. If your mouse is normally\n" -"in Microsoft-compatible mode, enabling the ClearDTR and ClearRTS options\n" -"may cause it to switch to Mouse Systems mode when the server starts.\n"; - -static char *logitechmousecomment_text = -"You have selected a Logitech protocol mouse. This is only valid for old\n" -"Logitech mice.\n"; - -static char *mousemancomment_text = -"You have selected a Logitech MouseMan type mouse. You might want to enable\n" -"ChordMiddle which could cause the third button to work.\n"; - -static void -mouse_configuration(void) { - -#if !defined(QNX4) - int i, j; - char s[80]; - char *def_mousedev = DEF_MOUSEDEV; - -#define MOUSETYPE_COUNT sizeof(mouse_info)/sizeof(mouse_info[0]) - for (i = 0; i < MOUSETYPE_COUNT; i++) - *(mouse_info[i].ident) = i; - - for (i=0;;) { - emptylines(); - printf("%s", mouseintro_text); - for (j = i; j < i + 14 && j < MOUSETYPE_COUNT; j++) - printf("%2d. %s [%s]\n", j + 1, - mouse_info[j].name, mouse_info[j].desc); - printf("\n"); - printf("%s", mousecomment_text); - printf("Enter a protocol number: "); - getstring(s); - if (strlen(s) == 0) { - i += 14; - if (i >= MOUSETYPE_COUNT) - i = 0; - continue; - } - config_mousetype = atoi(s) - 1; - if (config_mousetype >= 0 && config_mousetype < MOUSETYPE_COUNT) - break; - } - printf("\n"); - - if (config_mousetype == M_LOGITECH) { - /* Logitech. */ - printf("%s", logitechmousecomment_text); - printf("\n"); - printf("Please answer the following question with either 'y' or 'n'.\n"); - printf("Are you sure it's really not a Microsoft compatible one? "); - getstring(s); - if (!answerisyes(s)) - config_mousetype = M_MICROSOFT; - printf("\n"); - } - - config_chordmiddle = 0; - if (config_mousetype == M_MICROSOFT || config_mousetype == M_MOUSEMAN) { - /* Microsoft or MouseMan. */ - if (config_mousetype == M_MICROSOFT) - printf("%s", microsoftmousecomment_text); - else - printf("%s", mousemancomment_text); - printf("\n"); - printf("Please answer the following question with either 'y' or 'n'.\n"); - printf("Do you want to enable ChordMiddle? "); - getstring(s); - if (answerisyes(s)) - config_chordmiddle = 1; - printf("\n"); - } - - config_cleardtrrts = 0; - if (config_mousetype == M_MOUSESYSTEMS) { - /* Mouse Systems. */ - printf("%s", mousesystemscomment_text); - printf("\n"); - printf("Please answer the following question with either 'y' or 'n'.\n"); - printf("Do you want to enable ClearDTR and ClearRTS? "); - getstring(s); - if (answerisyes(s)) - config_cleardtrrts = 1; - printf("\n"); - } - - if (config_mousetype == M_MICROSOFT) { - if (config_chordmiddle) - printf("%s", threebuttonmousecomment_text); - else - printf("%s", twobuttonmousecomment_text); - } - else if (config_mousetype == M_MOUSESYSTEMS || - config_mousetype == M_INTELLIMOUSE) { - printf("%s", threebuttonmousecomment_text); - } - else { - printf("%s", unknownbuttonsmousecomment_text); - } - - printf("\n"); - - printf("Please answer the following question with either 'y' or 'n'.\n"); - printf("Do you want to enable Emulate3Buttons? "); - getstring(s); - if (answerisyes(s)) - config_emulate3buttons = 1; - else - config_emulate3buttons = 0; - printf("\n"); - -#if (defined(sun) && (defined(__i386) || defined(__x86))) - /* SPARC & USB mice (VUID or AUTO protocols) default to /dev/mouse, - but PS/2 mice default to /dev/kdmouse */ - if ((config_mousetype != M_AUTO) && (config_mousetype != M_VUID)) { - def_mousedev = "/dev/kdmouse"; - } -#endif - - printf(mousedev_text, def_mousedev); - printf("Mouse device: "); - getstring(s); - if (strlen(s) == 0) { - config_pointerdevice = def_mousedev; - } else { - config_pointerdevice = Malloc(strlen(s) + 1); - strcpy(config_pointerdevice, s); - } - printf("\n"); - -#else - /* set some reasonable defaults for OS/2 */ - config_mousetype = M_OSMOUSE; - config_chordmiddle = 0; - config_cleardtrrts = 0; - config_emulate3buttons = 0; - config_pointerdevice = "QNXMOUSE"; -#endif -} - - -/* - * Keyboard configuration. - */ - -/* - * Configuration of XKB - */ -static char *xkbmodeltext = -"Please select one of the following keyboard types that is the better\n" -"description of your keyboard. If nothing really matches,\n" -"choose \"Generic 104-key PC\"\n\n"; - -static char *xkblayouttext = -"Please select the layout corresponding to your keyboard\n"; - -static char *xkbvarianttext = -"Please enter a variant name for '%s' layout. Or just press enter\n" -"for default variant\n\n"; - -static char *xkboptionstext = -"Please answer the following question with either 'y' or 'n'.\n" -"Do you want to select additional XKB options (group switcher,\n" -"group indicator, etc.)? "; - -#if defined(__OpenBSD__) && defined(WSCONS_SUPPORT) && !defined(PCVT_SUPPORT) -static char *kbdevtext = -"Please enter the device name for your keyboard or just press enter\n" -"for the default of wskbd0\n\n"; -#endif - -static void -keyboard_configuration(void) -{ - int i, j; - char s[80]; - char *rulesfile; - int number, options[MAX_XKBOPTIONS], num_options; - XkbRF_RulesPtr rules; - -#if defined(__OpenBSD__) && defined(WSCONS_SUPPORT) && !defined(PCVT_SUPPORT) - printf(kbdevtext); - getstring(s); - if (strlen(s) != 0) { - config_keyboard_dev = Malloc(strlen(s) + 1); - strcpy(config_keyboard_dev, s); - } -#endif - -#ifndef XKB_RULES_DIR -# define XKB_RULES_DIR XKB_BASE_DIRECTORY "/rules" -#endif - -#ifdef XFREE98_XKB - config_xkbrules = "xfree98"; /* static */ - rulesfile = XKB_RULES_DIR "/xfree98"; -#else - config_xkbrules = __XKBDEFRULES__; /* static */ - rulesfile = XKB_RULES_DIR "/" __XKBDEFRULES__; -#endif - - rules = XkbRF_Load(rulesfile, "", True, False); - emptylines(); - - if (!rules) { - printf("XKB rules file '%s' not found\n", rulesfile); - printf("Keyboard XKB options will be set to default values.\n"); - keypress(); - return; - } - - number = -1; - for (i=0;;) { - emptylines(); - printf(xkbmodeltext); - for (j = i; j < i + 16 && j < rules->models.num_desc; j++) - printf("%3d %-50s\n", j+1, rules->models.desc[j].desc); - printf("\nEnter a number to choose the keyboard.\n\n"); - if (rules->models.num_desc >= 16) - printf("Press enter for the next page\n"); - getstring(s); - if (strlen(s) == 0) { - i += 16; - if (i > rules->models.num_desc) - i = 0; - continue; - } - number = atoi(s) - 1; - if (number >= 0 && number < rules->models.num_desc) - break; - } - - i = strlen(rules->models.desc[number].name) + 1; - config_xkbmodel = Malloc(i); - sprintf(config_xkbmodel,"%s", rules->models.desc[number].name); - - emptylines(); - printf(xkblayouttext); - - number = -1; - for (i=0;;) { - emptylines(); - for (j = i; j < i + 18 && j < rules->layouts.num_desc; j++) - printf("%3d %-50s\n", j+1, - rules->layouts.desc[j].desc); - printf("\n"); - printf("Enter a number to choose the country.\n"); - if (rules->layouts.num_desc >= 18) - printf("Press enter for the next page\n"); - printf("\n"); - getstring(s); - if (strlen(s) == 0) { - i += 18; - if (i > rules->layouts.num_desc) - i = 0; - continue; - } - number = atoi(s) - 1; - if (number >= 0 && number < rules->layouts.num_desc) - break; - } - config_xkblayout = Malloc(strlen(rules->layouts.desc[number].name)+1); - sprintf(config_xkblayout,"%s", rules->layouts.desc[number].name); - - emptylines(); - printf(xkbvarianttext, config_xkblayout); - getstring(s); - if (strlen(s) != 0) { - config_xkbvariant = Malloc(strlen(s) + 1); - strcpy(config_xkbvariant, s); - } - - emptylines(); - printf(xkboptionstext); - getstring(s); - if (!answerisyes(s)) - return; - - num_options = 0; - for (j=0,i=0;;) { - if (!strchr(rules->options.desc[i].name, ':')) { - emptylines(); - printf(" %s\n\n", rules->options.desc[i].desc); - j = i; - } else { - printf("%3d %-50s\n", i - j, rules->options.desc[i].desc); - } - i++; - if ( i == rules->options.num_desc || - !strchr(rules->options.desc[i].name, ':')) { - printf("\nPlease select the option or just press enter if none\n"); - getstring(s); - if (strlen(s) != 0) { - number = atoi(s); - if (number && (num_options < MAX_XKBOPTIONS)) { - options[num_options++] = number + j; - } - } - } - if (i == rules->options.num_desc) - break; - } - - if (!num_options) - return; - - for (j=0,i=0; ioptions.desc[options[i]].name); - } - config_xkboptions = Malloc(j + num_options); - for (j=0,i=0; ioptions.desc[options[i]].name); - } - return; -} - - - -/* - * Monitor configuration. - */ - -static char *monitorintro_text = -"Now we want to set the specifications of the monitor. The two critical\n" -"parameters are the vertical refresh rate, which is the rate at which the\n" -"the whole screen is refreshed, and most importantly the horizontal sync rate,\n" -"which is the rate at which scanlines are displayed.\n" -"\n" -"The valid range for horizontal sync and vertical sync should be documented\n" -"in the manual of your monitor.\n" -"\n"; - -static char *hsyncintro_text = -"You must indicate the horizontal sync range of your monitor. You can either\n" -"select one of the predefined ranges below that correspond to industry-\n" -"standard monitor types, or give a specific range.\n" -"\n" -"It is VERY IMPORTANT that you do not specify a monitor type with a horizontal\n" -"sync range that is beyond the capabilities of your monitor. If in doubt,\n" -"choose a conservative setting.\n" -"\n"; - -static char *customhsync_text = -"Please enter the horizontal sync range of your monitor, in the format used\n" -"in the table of monitor types above. You can either specify one or more\n" -"continuous ranges (e.g. 15-25, 30-50), or one or more fixed sync frequencies.\n" -"\n"; - -static char *vsyncintro_text = -"You must indicate the vertical sync range of your monitor. You can either\n" -"select one of the predefined ranges below that correspond to industry-\n" -"standard monitor types, or give a specific range. For interlaced modes,\n" -"the number that counts is the high one (e.g. 87 Hz rather than 43 Hz).\n" -"\n" -" 1 50-70\n" -" 2 50-90\n" -" 3 50-100\n" -" 4 40-150\n" -" 5 Enter your own vertical sync range\n"; - -static char *monitordescintro_text = -"You must now enter a few identification/description strings, namely an\n" -"identifier, a vendor name, and a model name. Just pressing enter will fill\n" -"in default names.\n" -"\n"; - -#define NU_MONITORTYPES 10 - -static char *monitortype_range[NU_MONITORTYPES] = { - "31.5", - "31.5 - 35.1", - "31.5, 35.5", - "31.5, 35.15, 35.5", - "31.5 - 37.9", - "31.5 - 48.5", - "31.5 - 57.0", - "31.5 - 64.3", - "31.5 - 79.0", - "31.5 - 82.0" -}; - -static char *monitortype_name[NU_MONITORTYPES] = { - "Standard VGA, 640x480 @ 60 Hz", - "Super VGA, 800x600 @ 56 Hz", - "8514 Compatible, 1024x768 @ 87 Hz interlaced (no 800x600)", - "Super VGA, 1024x768 @ 87 Hz interlaced, 800x600 @ 56 Hz", - "Extended Super VGA, 800x600 @ 60 Hz, 640x480 @ 72 Hz", - "Non-Interlaced SVGA, 1024x768 @ 60 Hz, 800x600 @ 72 Hz", - "High Frequency SVGA, 1024x768 @ 70 Hz", - "Monitor that can do 1280x1024 @ 60 Hz", - "Monitor that can do 1280x1024 @ 74 Hz", - "Monitor that can do 1280x1024 @ 76 Hz" -}; - -static void -monitor_configuration(void) { - int i; - char s[80]; - printf("%s", monitorintro_text); - - keypress(); - emptylines(); - - printf("%s", hsyncintro_text); - - printf(" hsync in kHz; monitor type with characteristic modes\n"); - for (i = 0; i < NU_MONITORTYPES; i++) - printf("%2d %s; %s\n", i + 1, monitortype_range[i], - monitortype_name[i]); - - printf("%2d Enter your own horizontal sync range\n", - NU_MONITORTYPES + 1); - printf("\n"); - - printf("Enter your choice (1-%d): ", NU_MONITORTYPES + 1); - getstring(s); - config_monitortype = atoi(s) - 1; - if (config_monitortype < 0) - config_monitortype = 0; - - printf("\n"); - - if (config_monitortype < NU_MONITORTYPES) - config_hsyncrange = monitortype_range[config_monitortype]; - else { - /* Custom hsync range option selected. */ - printf("%s", customhsync_text); - printf("Horizontal sync range: "); - getstring(s); - config_hsyncrange = Malloc(strlen(s) + 1); - strcpy(config_hsyncrange, s); - printf("\n"); - } - - printf("%s", vsyncintro_text); - printf("\n"); - - printf("Enter your choice: "); - getstring(s); - printf("\n"); - switch (atoi(s)) { - case 0 : - case 1 : - config_vsyncrange = "50-70"; - break; - case 2 : - config_vsyncrange = "50-90"; - break; - case 3 : - config_vsyncrange = "50-100"; - break; - case 4 : - config_vsyncrange = "40-150"; - break; - case 5 : - /* Custom vsync range option selected. */ - printf("Vertical sync range: "); - getstring(s); - config_vsyncrange = Malloc(strlen(s) + 1); - strcpy(config_vsyncrange, s); - printf("\n"); - break; - } - printf("%s", monitordescintro_text); - printf("The strings are free-form, spaces are allowed.\n"); - printf("Enter an identifier for your monitor definition: "); - getstring(s); - if (strlen(s) == 0) - config_monitoridentifier = "My Monitor"; - else { - config_monitoridentifier = Malloc(strlen(s) + 1); - strcpy(config_monitoridentifier, s); - } -} - - -/* - * Card database. - */ - -static char *cardintro_text = -"Now we must configure video card specific settings. At this point you can\n" -"choose to make a selection out of a database of video card definitions.\n" -"Because there can be variation in Ramdacs and clock generators even\n" -"between cards of the same model, it is not sensible to blindly copy\n" -"the settings (e.g. a Device section). For this reason, after you make a\n" -"selection, you will still be asked about the components of the card, with\n" -"the settings from the chosen database entry presented as a strong hint.\n" -"\n" -"The database entries include information about the chipset, what driver to\n" -"run, the Ramdac and ClockChip, and comments that will be included in the\n" -"Device section. However, a lot of definitions only hint about what driver\n" -"to run (based on the chipset the card uses) and are untested.\n" -"\n" -"If you can't find your card in the database, there's nothing to worry about.\n" -"You should only choose a database entry that is exactly the same model as\n" -"your card; choosing one that looks similar is just a bad idea (e.g. a\n" -"GemStone Snail 64 may be as different from a GemStone Snail 64+ in terms of\n" -"hardware as can be).\n" -"\n"; - -static char *cardunsupported_text = -"This card is basically UNSUPPORTED. It may only work as a generic\n" -"VGA-compatible card. If you have an "__XSERVERNAME__" version more recent than what\n" -"this card definition was based on, there's a chance that it is now\n" -"supported.\n"; - -static void -carddb_configuration(void) { - int i; - char s[80]; - card_selected = -1; - printf("%s", cardintro_text); - printf("Do you want to look at the card database? "); - getstring(s); - printf("\n"); - if (!answerisyes(s)) - return; - - /* - * Choose a database entry. - */ - if (parse_database()) { - printf("Couldn't read card database file %s.\n", - CARD_DATABASE_FILE); - keypress(); - return; - } - - i = 0; - for (;;) { - int j; - emptylines(); - for (j = i; j < i + 18 && j <= lastcard; j++) { - char *name = card[j].name, - *chipset = card[j].chipset; - - printf("%3d %-50s%s\n", j, - name ? name : "-", - chipset ? chipset : "-"); - } - printf("\n"); - printf("Enter a number to choose the corresponding card definition.\n"); - printf("Press enter for the next page, q to continue configuration.\n"); - printf("\n"); - getstring(s); - if (s[0] == 'q') - break; - if (strlen(s) == 0) { - i += 18; - if (i > lastcard) - i = 0; - continue; - } - card_selected = atoi(s); - if (card_selected >= 0 && card_selected <= lastcard) - break; - } - - /* - * Look at the selected card. - */ - if (card_selected != -1) { - char *name = card[card_selected].name, - *chipset = card[card_selected].chipset; - - printf("\nYour selected card definition:\n\n"); - printf("Identifier: %s\n", name ? name : "-"); - printf("Chipset: %s\n", chipset ? chipset : "-"); - if (!card[card_selected].driver) - card[card_selected].driver = "unknown"; - printf("Driver: %s\n", card[card_selected].driver); - - if (card[card_selected].ramdac != NULL) - printf("Ramdac: %s\n", card[card_selected].ramdac); - if (card[card_selected].dacspeed != NULL) - printf("DacSpeed: %s\n", card[card_selected].dacspeed); - if (card[card_selected].clockchip != NULL) - printf("Clockchip: %s\n", card[card_selected].clockchip); - if (card[card_selected].flags & NOCLOCKPROBE) - printf("Do NOT probe clocks or use any Clocks line.\n"); - if (card[card_selected].flags & UNSUPPORTED) - printf("%s", cardunsupported_text); -#if 0 /* Might be confusing. */ - if (strlen(card[card_selected].lines) > 0) - printf("Device section text:\n%s", - card[card_selected].lines); -#endif - printf("\n"); - keypress(); - } -} - - -/* - * Screen/video card configuration. - */ - -static char *deviceintro_text = -"Now you must give information about your video card. This will be used for\n" -"the \"Device\" section of your video card in " CONFIGNAME ".\n" -"\n"; - -static char *videomemoryintro_text = -"It is probably a good idea to use the same approximate amount as that detected\n" -"by the server you intend to use. If you encounter problems that are due to the\n" -"used server not supporting the amount memory you have, specify the maximum\n" -"amount supported by the server.\n" -"\n" -"How much video memory do you have on your video card:\n" -"\n"; - -static char *carddescintro_text = -"You must now enter a few identification/description strings, namely an\n" -"identifier, a vendor name, and a model name. Just pressing enter will fill\n" -"in default names (possibly from a card definition).\n" -"\n"; - -#if 0 -static char *devicesettingscomment_text = -"Especially for accelerated drivers, Ramdac, Dacspeed and ClockChip settings\n" -"or special options may be required in the Device section.\n" -"\n"; - -static char *ramdaccomment_text = -"The RAMDAC setting only applies to some drivers. Some RAMDAC's are\n" -"auto-detected by the server. The detection of a RAMDAC is forced by using a\n" -"Ramdac \"identifier\" line in the Device section. The identifiers are shown\n" -"at the right of the following table of RAMDAC types:\n" -"\n"; - -#define NU_RAMDACS 24 - -static char *ramdac_name[NU_RAMDACS] = { - "AT&T 20C490 (S3 and AGX servers, ARK driver)", - "AT&T 20C498/21C498/22C498 (S3, autodetected)", - "AT&T 20C409/20C499 (S3, autodetected)", - "AT&T 20C505 (S3)", - "BrookTree BT481 (AGX)", - "BrookTree BT482 (AGX)", - "BrookTree BT485/9485 (S3)", - "Sierra SC15025 (S3, AGX)", -#if XFREE86_VERSION >= 311 - "S3 GenDAC (86C708) (autodetected)", - "S3 SDAC (86C716) (autodetected)", -#else - "S3 GenDAC (86C708)", - "S3 SDAC (86C716)", -#endif - "STG-1700 (S3, autodetected)", - "STG-1703 (S3, autodetected)", - "TI 3020 (S3, autodetected)", - "TI 3025 (S3, autodetected)", - "TI 3026 (S3, autodetected)", - "IBM RGB 514 (S3, autodetected)", - "IBM RGB 524 (S3, autodetected)", - "IBM RGB 525 (S3, autodetected)", - "IBM RGB 526 (S3)", - "IBM RGB 528 (S3, autodetected)", - "ICS5342 (S3, ARK)", - "ICS5341 (W32)", - "IC Works w30C516 ZoomDac (ARK)", - "Normal DAC" -}; - -static char *ramdac_id[NU_RAMDACS] = { - "att20c490", "att20c498", "att20c409", "att20c505", "bt481", "bt482", - "bt485", "sc15025", "s3gendac", "s3_sdac", "stg1700","stg1703", - "ti3020", "ti3025", "ti3026", "ibm_rgb514", "ibm_rgb524", - "ibm_rgb525", "ibm_rgb526", "ibm_rgb528", "ics5342", "ics5341", - "zoomdac", "normal" -}; - -static char *clockchipcomment_text = -"A Clockchip line in the Device section forces the detection of a\n" -"programmable clock device. With a clockchip enabled, any required\n" -"clock can be programmed without requiring probing of clocks or a\n" -"Clocks line. Most cards don't have a programmable clock chip.\n" -"Choose from the following list:\n" -"\n"; - -#define NU_CLOCKCHIPS 12 - -static char *clockchip_name[] = { - "Chrontel 8391", - "ICD2061A and compatibles (ICS9161A, DCS2824)", - "ICS2595", - "ICS5342 (similar to SDAC, but not completely compatible)", - "ICS5341", - "S3 GenDAC (86C708) and ICS5300 (autodetected)", - "S3 SDAC (86C716)", - "STG 1703 (autodetected)", - "Sierra SC11412", - "TI 3025 (autodetected)", - "TI 3026 (autodetected)", - "IBM RGB 51x/52x (autodetected)", -}; - -static char *clockchip_id[] = { - "ch8391", "icd2061a", "ics2595", "ics5342", "ics5341", - "s3gendac", "s3_sdac", - "stg1703", "sc11412", "ti3025", "ti3026", "ibm_rgb5xx", -}; - -static char *deviceclockscomment_text = -"For most modern configurations, a Clocks line is neither required or\n" -"desirable. However for some older hardware it can be useful since it\n" -"prevents the slow and nasty sounding clock probing at server start-up.\n" -"Probed clocks are displayed at server startup, along with other server\n" -"and hardware configuration info. You can save this information in a file\n" -"by running 'X -probeonly 2>output_file'. Be warned that clock probing is\n" -"inherently imprecise; some clocks may be slightly too high (varies per run).\n" -"\n"; - -static char *deviceclocksquestion_text = -"At this point I can run X -probeonly, and try to extract the clock information\n" -"from the output. It is recommended that you do this yourself and if a set of\n" -"clocks is shown then you add a clocks line (note that the list of clocks may\n" -"be split over multiple Clocks lines) to your Device section afterwards. Be\n" -"aware that a clocks line is not appropriate for most modern hardware that\n" -"has programmable clocks.\n" -"\n" -"You must be root to be able to run X -probeonly now.\n" -"\n"; - -static char *probeonlywarning_text = -"It is possible that the hardware detection routines in the server will somehow\n" -"cause the system to crash and the screen to remain blank. If this is the\n" -"case, do not choose this option the next time. The server may need a\n" -"Ramdac, ClockChip or special option (e.g. \"nolinear\" for S3) to probe\n" -"and start-up correctly.\n" -"\n"; -#endif - -static char *modesorderintro_text = -"For each depth, a list of modes (resolutions) is defined. The default\n" -"resolution that the server will start-up with will be the first listed\n" -"mode that can be supported by the monitor and card.\n" -"Currently it is set to:\n" -"\n"; - -static char *modesorder_text2 = -"Modes that cannot be supported due to monitor or clock constraints will\n" -"be automatically skipped by the server.\n" -"\n" -" 1 Change the modes for 8-bit (256 colors)\n" -" 2 Change the modes for 16-bit (32K/64K colors)\n" -" 3 Change the modes for 24-bit (24-bit color)\n" -" 4 The modes are OK, continue.\n" -"\n"; - -static char *modeslist_text = -"Please type the digits corresponding to the modes that you want to select.\n" -"For example, 432 selects \"1024x768\" \"800x600\" \"640x480\", with a\n" -"default mode of 1024x768.\n" -"\n"; - -static char *virtual_text = -"You can have a virtual screen (desktop), which is screen area that is larger\n" -"than the physical screen and which is panned by moving the mouse to the edge\n" -"of the screen. If you don't want virtual desktop at a certain resolution,\n" -"you cannot have modes listed that are larger. Each color depth can have a\n" -"differently-sized virtual screen\n" -"\n"; - -static int videomemory[] = { - 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144 -}; - -/* Is this required? */ -#if XFREE86_VERSION >= 400 -#define NU_MODESTRINGS 13 -#else -#if XFREE86_VERSION >= 330 -#define NU_MODESTRINGS 12 -#else -#if XFREE86_VERSION >= 311 -#define NU_MODESTRINGS 8 -#else -#define NU_MODESTRINGS 5 -#endif -#endif -#endif - -static char *modestring[NU_MODESTRINGS] = { - "\"640x400\"", - "\"640x480\"", - "\"800x600\"", - "\"1024x768\"", - "\"1280x1024\"", -#if XFREE86_VERSION >= 311 - "\"320x200\"", - "\"320x240\"", - "\"400x300\"" -#endif -#if XFREE86_VERSION >= 330 - ,"\"1152x864\"", - "\"1600x1200\"", - "\"1800x1400\"", - "\"512x384\"" -#endif -#if XFREE86_VERSION >= 400 - ,"\"1400x1050\"" -#endif -}; - -static int exists_dir(char *name) { - struct stat sbuf; - - /* is it there ? */ - if (stat(name,&sbuf) == -1) - return 0; - - /* is there, but is it a dir? */ - return S_ISDIR(sbuf.st_mode) ? 1 : 0; -} - -static int -screen_configuration(void) { - int i, c/*, np*/; - char s[80]; - - /* - * Configure the "Device" section for the video card. - */ - - printf("%s", deviceintro_text); - - printf("%s", videomemoryintro_text); - - for (i = 0; i < sizeof(videomemory) / sizeof(videomemory[0]); i++) - printf("%2d %dK\n", i + 1, videomemory[i]); - printf("%2d Other\n\n", i + 1); - - printf("Enter your choice: "); - getstring(s); - printf("\n"); - - c = atoi(s) - 1; - if (c >= 0 && c < sizeof(videomemory) / sizeof(videomemory[0])) - config_videomemory = videomemory[c]; - else { - printf("Amount of video memory in Kbytes: "); - getstring(s); - config_videomemory = atoi(s); - printf("\n"); - } - - printf("%s", carddescintro_text); - if (card_selected != -1) - printf("Your card definition is %s.\n\n", - card[card_selected].name); - printf("The strings are free-form, spaces are allowed.\n"); - printf("Enter an identifier for your video card definition: "); - getstring(s); - if (strlen(s) == 0) - if (card_selected != -1) - config_deviceidentifier = card[card_selected].name; - else - config_deviceidentifier = "My Video Card"; - else { - config_deviceidentifier = Malloc(strlen(s) + 1); - strcpy(config_deviceidentifier, s); - } - printf("\n"); - - emptylines(); - - /* - * Initialize screen mode variables for svga and accel - * to default values. - * XXXX Doesn't leave room for off-screen caching in 16/32bpp modes - * for the accelerated servers in some situations. - */ - config_modesline8bpp = - config_modesline16bpp = - config_modesline24bpp = "\"640x480\""; - config_virtualx8bpp = config_virtualx16bpp = config_virtualx24bpp = - config_virtualy8bpp = config_virtualy16bpp = config_virtualy24bpp = 0; - if (config_videomemory >= 4096) { - config_virtualx8bpp = 1600; - config_virtualy8bpp = 1280; - if (card_selected != -1 && !(card[card_selected].flags & UNSUPPORTED)) { - /* - * Allow room for font/pixmap cache for accel - * servers. - */ - config_virtualx16bpp = 1280; - config_virtualy16bpp = 1024; - } - else { - config_virtualx16bpp = 1600; - config_virtualy16bpp = 1280; - } - if (card_selected != -1 && !(card[card_selected].flags & UNSUPPORTED)) { - config_virtualx24bpp = 1152; - config_virtualy24bpp = 900; - } - else { - config_virtualx24bpp = 1280; - config_virtualy24bpp = 1024; - } - /* Add 1600x1280 */ - config_modesline8bpp = "\"1280x1024\" \"1024x768\" \"800x600\" \"640x480\""; - config_modesline16bpp = "\"1280x1024\" \"1024x768\" \"800x600\" \"640x480\""; - config_modesline24bpp = "\"1280x1024\" \"1024x768\" \"800x600\" \"640x480\""; - - } - else - if (config_videomemory >= 2048) { - if (card_selected != -1 && !(card[card_selected].flags & UNSUPPORTED)) { - /* - * Allow room for font/pixmap cache for accel - * servers. - * Also the mach32 is has a limited width. - */ - config_virtualx8bpp = 1280; - config_virtualy8bpp = 1024; - } - else { - config_virtualx8bpp = 1600; - config_virtualy8bpp = 1200; - } - if (card_selected != -1 && !(card[card_selected].flags & UNSUPPORTED)) { - config_virtualx16bpp = 1024; - config_virtualy16bpp = 768; - } - else { - config_virtualx16bpp = 1152; - config_virtualy16bpp = 900; - } - config_virtualx24bpp = 800; - config_virtualy24bpp = 600; - if (config_videomemory >= 2048 + 256) { - config_virtualx24bpp = 1024; - config_virtualy24bpp = 768; - } - config_modesline8bpp = "\"1280x1024\" \"1024x768\" \"800x600\" \"640x480\""; - config_modesline16bpp = "\"1024x768\" \"800x600\" \"640x480\""; - if (config_videomemory >= 2048 + 256) - config_modesline24bpp = "\"1024x768\" \"800x600\" \"640x480\""; - else - config_modesline24bpp = "\"800x600\" \"640x480\""; - } - else - if (config_videomemory >= 1024) { - if (card_selected != -1 && !(card[card_selected].flags & UNSUPPORTED)) { - /* - * Allow room for font/pixmap cache for accel - * servers. - */ - config_virtualx8bpp = 1024; - config_virtualy8bpp = 768; - } - else { - config_virtualx8bpp = 1152; - config_virtualy8bpp = 900; - } - config_virtualx16bpp = 800; /* Forget about cache space; */ - config_virtualy16bpp = 600; /* it's small enough as it is. */ - config_virtualx24bpp = 640; - config_virtualy24bpp = 480; - config_modesline8bpp = "\"1024x768\" \"800x600\" \"640x480\""; - config_modesline16bpp = "\"800x600\" \"640x480\""; - config_modesline24bpp = "\"640x480\""; - } - else - if (config_videomemory >= 512) { - config_virtualx8bpp = 800; - config_virtualy8bpp = 600; - config_modesline8bpp = "\"800x600\" \"640x480\""; - config_modesline16bpp = "\"640x400\""; - } - else - if (config_videomemory >= 256) { - config_modesline8bpp = "\"640x400\""; - config_virtualx8bpp = 640; - config_virtualy8bpp = 400; - } - else { - printf("Invalid amount of video memory. Please try again\n"); - return(1); - } - -#if 0 - /* - * Handle the Ramdac/Clockchip setting. - */ - - printf("%s", devicesettingscomment_text); - - if (card_selected == -1 || (card[card_selected].flags & UNSUPPORTED)) - goto skipramdacselection; - - printf("%s", ramdaccomment_text); - - /* meanwhile there are so many RAMDACs that they do no longer fit on - * on page - */ - for (np=12, i=0 ;;) { - int j; - for (j = i; j < i + np && j < NU_RAMDACS; j++) - printf("%3d %-60s%s\n", j+1, - ramdac_name[j], - ramdac_id[j]); - - printf("\n"); - if (card_selected != -1) - if (card[card_selected].ramdac != NULL) - printf("The card definition has Ramdac \"%s\".\n\n", - card[card_selected].ramdac); - printf("\n"); - printf("Enter a number to choose the corresponding RAMDAC.\n"); - printf("Press enter for the next page, q to quit without selection of a RAMDAC.\n"); - printf("\n"); - getstring(s); - - config_ramdac = NULL; - if (s[0] == 'q') - break; - - if (strlen(s) > 0) { - c = atoi(s)-1; - if (c >= 0 && c < NU_RAMDACS) { - config_ramdac = ramdac_id[atoi(s)-1]; - break; - } - } - - i += np; - if (np==12) np = 18; /* account intro lines only displayed 1st time */ - if (i >= NU_RAMDACS) - i = 0; - emptylines(); - } - -skipramdacselection: - emptylines(); - printf("%s", clockchipcomment_text); - - for (i = 0; i < NU_CLOCKCHIPS; i++) - printf("%2d %-60s%s\n", - i + 1, clockchip_name[i], clockchip_id[i]); - - printf("\n"); - - if (card_selected != -1) - if (card[card_selected].clockchip != NULL) - printf("The card definition has Clockchip \"%s\"\n\n", - card[card_selected].clockchip); - - printf("Just press enter if you don't want a Clockchip setting.\n"); - printf("What Clockchip setting do you want (1-%d)? ", NU_CLOCKCHIPS); - - getstring(s); - config_clockchip = NULL; - if (strlen(s) > 0) - config_clockchip = clockchip_id[atoi(s) - 1]; - - emptylines(); - - /* - * Optionally run X -probeonly to figure out the clocks. - */ - - config_numberofclockslines = 0; - - printf("%s", deviceclockscomment_text); - - printf("%s", deviceclocksquestion_text); -#endif - -#if 0 - /* - * XXX Change this to check for a CLOCKPROBE flag rather than an - * NOCLOCKPROBE. - */ - if (card_selected != -1) - if (card[card_selected].flags & NOCLOCKPROBE) - printf("The card definition says to NOT probe clocks.\n"); - - if (config_clockchip != NULL) { - printf("Because you have enabled a Clockchip line, there's no need for clock\n" - "probing.\n"); - keypress(); - goto skipclockprobing; - } - - printf("Do you want me to run 'X -probeonly' now? "); - getstring(s); - printf("\n"); - if (answerisyes(s)) { - /* - * Write temporary XF86Config and run X -probeonly. - * Only allow when root. - */ - FILE *f; - char *buf; - char syscmdline[2*256+100]; /* enough */ - char *fname = NULL; - char *d2name = NULL; - char *d3name = NULL; - - if (getuid() != 0) { - printf("Sorry, you must be root to do this.\n\n"); - goto endofprobeonly; - } - printf("%s", probeonlywarning_text); - keypress(); - fname = Malloc(strlen(temp_dir) + - strlen(TEMPORARY_XF86CONFIG_FILENAME) + 1); - sprintf(fname, "%s%s", temp_dir, - TEMPORARY_XF86CONFIG_FILENAME); - d2name = Malloc(strlen(temp_dir) + strlen(DUMBCONFIG2) + 1); - sprintf(d2name, "%s%s", temp_dir, DUMBCONFIG2); - d3name = Malloc(strlen(temp_dir) + strlen(DUMBCONFIG3) + 1); - sprintf(d3name, "%s%s", temp_dir, DUMBCONFIG3); - printf("Running X -probeonly -pn -xf86config %s.\n", fname); - write_XF86Config(fname); - sync(); - /* compose a line with the real path */ - sprintf(syscmdline, "X -probeonly -pn -xf86config %s 2> %s", - fname, d2name); - - if (system(syscmdline)) { - printf("X -probeonly call failed.\n"); - printf("No Clocks line inserted.\n"); - goto clocksprobefailed; - } - /* Look for 'clocks:' (case sensitive). */ - sprintf(syscmdline, "grep clocks\\: %s > %s", d2name, d3name); - if (system(syscmdline)) { - printf("grep failed.\n"); - printf("Cannot find clocks in server output.\n"); - goto clocksprobefailed; - } - f = fopen(d3name, "r"); - buf = Malloc(8192); - /* Parse lines. */ - while (fgets(buf, 8192, f) != NULL) { - char *clks; - clks = strstr(buf, "clocks: ") + 8; - if (clks >= buf + 3 && strcmp(clks - 11, "num") == 0) - /* Reject lines with 'numclocks:'. */ - continue; - if (clks >= buf + 8 && strcpy(clks - 14, "pixel ") == 0) - /* Reject lines with 'pixel clocks:'. */ - continue; - clks[strlen(clks) - 1] = '\0'; /* Remove '\n'. */ - config_clocksline[config_numberofclockslines] = - Malloc(strlen(clks) + 1); - strcpy(config_clocksline[config_numberofclockslines], - clks); - printf("Clocks %s\n", clks); - config_numberofclockslines++; - } - fclose(f); -clocksprobefailed: - unlink(d3name); - unlink(d2name); - unlink(fname); - printf("\n"); - -endofprobeonly: - keypress(); - } -skipclockprobing: -#endif - - /* - * For vga driver, no further configuration is required. - */ - if (card_selected == -1 || (card[card_selected].flags & UNSUPPORTED)) - return (0); - - /* - * Configure the modes order. - */ - config_virtual = 0; - for (;;) { - char modes[128]; - - emptylines(); - - printf("%s", modesorderintro_text); - printf("%s for 8-bit\n", config_modesline8bpp); - printf("%s for 16-bit\n", config_modesline16bpp); - printf("%s for 24-bit\n", config_modesline24bpp); - printf("\n"); - printf("%s", modesorder_text2); - - printf("Enter your choice: "); - getstring(s); - printf("\n"); - - c = atoi(s) - 1; - if (c < 0 || c >= 3) - break; - - printf("Select modes from the following list:\n\n"); - - for (i = 0; i < NU_MODESTRINGS; i++) - printf(" %c %s\n", i < 9 ? '1' + i : - 'a' + i - 9, - modestring[i]); - printf("\n"); - - printf("%s", modeslist_text); - - printf("Which modes? "); - getstring(s); - printf("\n"); - - modes[0] = '\0'; - for (i = 0; i < strlen(s); i++) { - if ( NU_MODESTRINGS > 9 ) { - if ((s[i] < '1' || s[i] > '9') && - (s[i] < 'a' || s[i] > 'a' + NU_MODESTRINGS - 10)) { - printf("Invalid mode skipped.\n"); - continue; - } - } - else { - if (s[i] < '1' || s[i] > '0' + NU_MODESTRINGS) { - printf("Invalid mode skipped.\n"); - continue; - } - } - if (i > 0) - strcat(modes, " "); - strcat(modes, modestring[s[i] <= '9' ? s[i] - '1' : - s[i] - 'a' + 9]); - } - switch (c) { - case 0 : - config_modesline8bpp = Malloc(strlen(modes) + 1); - strcpy(config_modesline8bpp, modes); - break; - case 1 : - config_modesline16bpp = Malloc(strlen(modes) + 1); - strcpy(config_modesline16bpp, modes); - break; - case 2 : - config_modesline24bpp = Malloc(strlen(modes) + 1); - strcpy(config_modesline24bpp, modes); - break; - } - - printf("%s", virtual_text); - - printf("Please answer the following question with either 'y' or 'n'.\n"); - printf("Do you want a virtual screen that is larger than the physical screen?"); - getstring(s); - if (answerisyes(s)) - config_virtual = 1; - } - return(0); -} - -static char *defaultdepthtext = -"Please specify which color depth you want to use by default:\n" -"\n"; - -static struct depth_str { - char *name; - char *desc; -} depth_list[] = { - { "1", "1 bit (monochrome)" }, - { "4", "4 bits (16 colors)" }, - { "8", "8 bits (256 colors)" }, - { "16", "16 bits (65536 colors)" }, - { "24", "24 bits (16 million colors)" } -}; - -static int ndepths = sizeof(depth_list)/sizeof(struct depth_str); - -static void -depth_configuration(void) -{ - int i; - char s[80]; - int depth; - - printf(defaultdepthtext); - for (i=0; i ndepths) ? 0 : i; - } - config_depth = depth_list[depth].name; -} - -/* - * Create the XF86Config file. - */ - -static char *XF86Config_firstchunk_text = -"# File generated by xorgconfig.\n" -"\n" -"#\n" -"# Copyright 2004 "XVENDORNAME"\n" -"#\n" -"# Permission is hereby granted, free of charge, to any person obtaining a\n" -"# copy of this software and associated documentation files (the \"Software\"),\n" -"# to deal in the Software without restriction, including without limitation\n" -"# the rights to use, copy, modify, merge, publish, distribute, sublicense,\n" -"# and/or sell copies of the Software, and to permit persons to whom the\n" -"# Software is furnished to do so, subject to the following conditions:\n" -"# \n" -"# The above copyright notice and this permission notice shall be included in\n" -"# all copies or substantial portions of the Software.\n" -"# \n" -"# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n" -"# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n" -"# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n" -"# "XVENDORNAME" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n" -"# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF\n" -"# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n" -"# SOFTWARE.\n" -"# \n" -"# Except as contained in this notice, the name of "XVENDORNAME" shall\n" -"# not be used in advertising or otherwise to promote the sale, use or other\n" -"# dealings in this Software without prior written authorization from\n" -"# "XVENDORNAME".\n" -"#\n" -"\n" -"# **********************************************************************\n" -"# Refer to the " CONFIGNAME "(" FILEMANSUFFIX ") man page for details about the format of \n" -"# this file.\n" -"# **********************************************************************\n" -"\n" -"# **********************************************************************\n" -"# Module section -- this section is used to specify\n" -"# which dynamically loadable modules to load.\n" -"# **********************************************************************\n" -"#\n" -"Section \"Module\"\n" -"\n" -"# This loads the DBE extension module.\n" -"\n" -" Load \"dbe\" # Double buffer extension\n" -"\n" -"# This loads the miscellaneous extensions module, and disables\n" -"# initialisation of the XFree86-DGA extension within that module.\n" -" SubSection \"extmod\"\n" -" Option \"omit xfree86-dga\" # don't initialise the DGA extension\n" -" EndSubSection\n" -"\n" -"# This loads the font modules\n" -#ifdef HAS_TYPE1 -" Load \"type1\"\n" -#else -"# Load \"type1\"\n" -#endif -" Load \"freetype\"\n" -"# Load \"xtt\"\n" -"\n" -"# This loads the GLX module\n" -"# Load \"glx\"\n" -"# This loads the DRI module\n" -"# Load \"dri\"\n" -"\n" -"EndSection\n" -"\n" -"# **********************************************************************\n" -"# Files section. This allows default font and rgb paths to be set\n" -"# **********************************************************************\n" -"\n" -"Section \"Files\"\n" -"\n" -"# Multiple FontPath entries are allowed (which are concatenated together),\n" -"# as well as specifying multiple comma-separated entries in one FontPath\n" -"# command (or a combination of both methods)\n" -"# \n" -"\n"; - -static char *XF86Config_fontpaths[] = -{ -/* " FontPath \"" TREEROOTFONT "/75dpi/\"\n"*/ - "/local/", - "/misc/", - "/75dpi/:unscaled", - "/100dpi/:unscaled", - "/Type1/", - "/TrueType/", - "/freefont/", - "/75dpi/", - "/100dpi/", - 0 /* end of fontpaths */ -}; - -static char *XF86Config_fontpathchunk_text = - -"\n" -"# The module search path. The default path is shown here.\n" -"\n" -"# ModulePath \"" MODULEPATH "\"\n" -"\n" -"EndSection\n" -"\n" -"# **********************************************************************\n" -"# Server flags section.\n" -"# **********************************************************************\n" -"\n" -"Section \"ServerFlags\"\n" -"\n" -"# Uncomment this to cause a core dump at the spot where a signal is \n" -"# received. This may leave the console in an unusable state, but may\n" -"# provide a better stack trace in the core dump to aid in debugging\n" -"\n" -"# Option \"NoTrapSignals\"\n" -"\n" -"# Uncomment this to disable the VT switch sequence\n" -"# (where n is 1 through 12). This allows clients to receive these key\n" -"# events.\n" -"\n" -"# Option \"DontVTSwitch\"\n" -"\n" -"# Uncomment this to disable the server abort sequence\n" -"# This allows clients to receive this key event.\n" -"\n" -"# Option \"DontZap\"\n" -"\n" -"# Uncomment this to disable the / mode switching\n" -"# sequences. This allows clients to receive these key events.\n" -"\n" -"# Option \"Dont Zoom\"\n" -"\n" -"# Uncomment this to disable tuning with the xvidtune client. With\n" -"# it the client can still run and fetch card and monitor attributes,\n" -"# but it will not be allowed to change them. If it tries it will\n" -"# receive a protocol error.\n" -"\n" -"# Option \"DisableVidModeExtension\"\n" -"\n" -"# Uncomment this to enable the use of a non-local xvidtune client. \n" -"\n" -"# Option \"AllowNonLocalXvidtune\"\n" -"\n" -"# Uncomment this to disable dynamically modifying the input device\n" -"# (mouse and keyboard) settings. \n" -"\n" -"# Option \"DisableModInDev\"\n" -"\n" -"# Uncomment this to enable the use of a non-local client to\n" -"# change the keyboard or mouse settings (currently only xset).\n" -"\n" -"# Option \"AllowNonLocalModInDev\"\n" -"\n" -"EndSection\n" -"\n" -"# **********************************************************************\n" -"# Input devices\n" -"# **********************************************************************\n" -"\n" -"# **********************************************************************\n" -"# Core keyboard's InputDevice section\n" -"# **********************************************************************\n" -"\n" -"Section \"InputDevice\"\n" -"\n" -" Identifier \"Keyboard1\"\n" -" Driver \"kbd\"\n" -"\n" -" Option \"AutoRepeat\" \"500 30\"\n" -"\n" -"# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))\n" -"# Option \"Xleds\" \"1 2 3\"\n" -"\n"; - -static char *keyboardchunk2_text = -"\n"; - -static char *keyboardchunk3_text = -"# To customise the XKB settings to suit your keyboard, modify the\n" -"# lines below (which are the defaults). For example, for a non-U.S.\n" -"# keyboard, you will probably want to use:\n" -"# Option \"XkbModel\" \"pc105\"\n" -"# If you have a US Microsoft Natural keyboard, you can use:\n" -"# Option \"XkbModel\" \"microsoft\"\n" -"#\n" -"# Then to change the language, change the Layout setting.\n" -"# For example, a german layout can be obtained with:\n" -"# Option \"XkbLayout\" \"de\"\n" -"# or:\n" -"# Option \"XkbLayout\" \"de\"\n" -"# Option \"XkbVariant\" \"nodeadkeys\"\n" -"#\n" -"# If you'd like to switch the positions of your capslock and\n" -"# control keys, use:\n" -"# Option \"XkbOptions\" \"ctrl:swapcaps\"\n" -"\n" -"# These are the default XKB settings for "__XSERVERNAME__"\n" -"# Option \"XkbRules\" \""__XKBDEFRULES__"\"\n" -"# Option \"XkbModel\" \"pc105\"\n" -"# Option \"XkbLayout\" \"us\"\n" -"# Option \"XkbVariant\" \"\"\n" -"# Option \"XkbOptions\" \"\"\n" -"\n"; - -static char *keyboardlastchunk_text = -"\n" -"EndSection\n" -"\n" -"\n"; - -static char *pointersection_text1 = -"# **********************************************************************\n" -"# Core Pointer's InputDevice section\n" -"# **********************************************************************\n" -"\n" -"Section \"InputDevice\"\n" -"\n" -"# Identifier and driver\n" -"\n" -#if defined(__UNIXWARE__) -"# Identifier \"Mouse1\"\n" -"# Driver \"mouse\"\n" -#else -" Identifier \"Mouse1\"\n" -" Driver \"mouse\"\n" -#endif -; - -static char *pointersection_text2 = -"\n" -"# Mouse-speed setting for PS/2 mouse.\n" -"\n" -"# Option \"Resolution\" \"256\"\n" -"\n" -"# Baudrate and SampleRate are only for some Logitech mice. In\n" -"# almost every case these lines should be omitted.\n" -"\n" -"# Option \"BaudRate\" \"9600\"\n" -"# Option \"SampleRate\" \"150\"\n" -"\n" -"# Mouse wheel mapping. Default is to map vertical wheel to buttons 4 & 5,\n" -"# horizontal wheel to buttons 6 & 7. Change if your mouse has more than\n" -"# 3 buttons and you need to map the wheel to different button ids to avoid\n" -"# conflicts.\n" -"\n" -" Option \"ZAxisMapping\" \"4 5 6 7\"\n" -"\n" -"# Emulate3Buttons is an option for 2-button mice\n" -"# Emulate3Timeout is the timeout in milliseconds (default is 50ms)\n" -"\n"; - - -static char *xinputsection_text = -"# **********************************************************************\n" -"# Other input device sections \n" -"# this is optional and is required only if you\n" -"# are using extended input devices. This is for example only. Refer\n" -"# to the " CONFIGNAME " man page for a description of the options.\n" -"# **********************************************************************\n" -"#\n" -"# Section \"InputDevice\" \n" -"# Identifier \"Mouse2\"\n" -"# Driver \"mouse\"\n" -"# Option \"Protocol\" \"MouseMan\"\n" -"# Option \"Device\" \"/dev/mouse2\"\n" -"# EndSection\n" -"#\n" -"# Section \"InputDevice\"\n" -"# Identifier \"spaceball\"\n" -"# Driver \"magellan\"\n" -"# Option \"Device\" \"/dev/cua0\"\n" -"# EndSection\n" -"#\n" -"# Section \"InputDevice\"\n" -"# Identifier \"spaceball2\"\n" -"# Driver \"spaceorb\"\n" -"# Option \"Device\" \"/dev/cua0\"\n" -"# EndSection\n" -"#\n" -"# Section \"InputDevice\"\n" -"# Identifier \"touchscreen0\"\n" -"# Driver \"microtouch\"\n" -"# Option \"Device\" \"/dev/ttyS0\"\n" -"# Option \"MinX\" \"1412\"\n" -"# Option \"MaxX\" \"15184\"\n" -"# Option \"MinY\" \"15372\"\n" -"# Option \"MaxY\" \"1230\"\n" -"# Option \"ScreenNumber\" \"0\"\n" -"# Option \"ReportingMode\" \"Scaled\"\n" -"# Option \"ButtonNumber\" \"1\"\n" -"# Option \"SendCoreEvents\"\n" -"# EndSection\n" -"#\n" -"# Section \"InputDevice\"\n" -"# Identifier \"touchscreen1\"\n" -"# Driver \"elo2300\"\n" -"# Option \"Device\" \"/dev/ttyS0\"\n" -"# Option \"MinX\" \"231\"\n" -"# Option \"MaxX\" \"3868\"\n" -"# Option \"MinY\" \"3858\"\n" -"# Option \"MaxY\" \"272\"\n" -"# Option \"ScreenNumber\" \"0\"\n" -"# Option \"ReportingMode\" \"Scaled\"\n" -"# Option \"ButtonThreshold\" \"17\"\n" -"# Option \"ButtonNumber\" \"1\"\n" -"# Option \"SendCoreEvents\"\n" -"# EndSection\n" -"\n"; - -static char *monitorsection_text1 = -"# **********************************************************************\n" -"# Monitor section\n" -"# **********************************************************************\n" -"\n" -"# Any number of monitor sections may be present\n" -"\n" -"Section \"Monitor\"\n" -"\n"; - -static char *monitorsection_text2 = -"# HorizSync is in kHz unless units are specified.\n" -"# HorizSync may be a comma separated list of discrete values, or a\n" -"# comma separated list of ranges of values.\n" -"# NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR\'S\n" -"# USER MANUAL FOR THE CORRECT NUMBERS.\n" -"\n"; - -static char *monitorsection_text3 = -"# HorizSync 30-64 # multisync\n" -"# HorizSync 31.5, 35.2 # multiple fixed sync frequencies\n" -"# HorizSync 15-25, 30-50 # multiple ranges of sync frequencies\n" -"\n" -"# VertRefresh is in Hz unless units are specified.\n" -"# VertRefresh may be a comma separated list of discrete values, or a\n" -"# comma separated list of ranges of values.\n" -"# NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR\'S\n" -"# USER MANUAL FOR THE CORRECT NUMBERS.\n" -"\n"; - -#if 0 -static char *monitorsection_text4 = -"# Modes can be specified in two formats. A compact one-line format, or\n" -"# a multi-line format.\n" -"\n" -"# These two are equivalent\n" -"\n" -"# ModeLine \"1024x768i\" 45 1024 1048 1208 1264 768 776 784 817 Interlace\n" -"\n" -"# Mode \"1024x768i\"\n" -"# DotClock 45\n" -"# HTimings 1024 1048 1208 1264\n" -"# VTimings 768 776 784 817\n" -"# Flags \"Interlace\"\n" -"# EndMode\n" -"\n"; - -static char *modelines_text = -"# This is a set of standard mode timings. Modes that are out of monitor spec\n" -"# are automatically deleted by the server (provided the HorizSync and\n" -"# VertRefresh lines are correct), so there's no immediate need to\n" -"# delete mode timings (unless particular mode timings don't work on your\n" -"# monitor). With these modes, the best standard mode that your monitor\n" -"# and video card can support for a given resolution is automatically\n" -"# used.\n" -"\n" -"# 640x400 @ 70 Hz, 31.5 kHz hsync\n" -"Modeline \"640x400\" 25.175 640 664 760 800 400 409 411 450\n" -"# 640x480 @ 60 Hz, 31.5 kHz hsync\n" -"Modeline \"640x480\" 25.175 640 664 760 800 480 491 493 525\n" -"# 800x600 @ 56 Hz, 35.15 kHz hsync\n" -"ModeLine \"800x600\" 36 800 824 896 1024 600 601 603 625\n" -"# 1024x768 @ 87 Hz interlaced, 35.5 kHz hsync\n" -"Modeline \"1024x768\" 44.9 1024 1048 1208 1264 768 776 784 817 Interlace\n" -"\n" -"# 640x400 @ 85 Hz, 37.86 kHz hsync\n" -"Modeline \"640x400\" 31.5 640 672 736 832 400 401 404 445 -HSync +VSync\n" -"# 640x480 @ 72 Hz, 36.5 kHz hsync\n" -"Modeline \"640x480\" 31.5 640 680 720 864 480 488 491 521\n" -"# 640x480 @ 75 Hz, 37.50 kHz hsync\n" -"ModeLine \"640x480\" 31.5 640 656 720 840 480 481 484 500 -HSync -VSync\n" -"# 800x600 @ 60 Hz, 37.8 kHz hsync\n" -"Modeline \"800x600\" 40 800 840 968 1056 600 601 605 628 +hsync +vsync\n" -"\n" -"# 640x480 @ 85 Hz, 43.27 kHz hsync\n" -"Modeline \"640x480\" 36 640 696 752 832 480 481 484 509 -HSync -VSync\n" -"# 1152x864 @ 89 Hz interlaced, 44 kHz hsync\n" -"ModeLine \"1152x864\" 65 1152 1168 1384 1480 864 865 875 985 Interlace\n" -"\n" -"# 800x600 @ 72 Hz, 48.0 kHz hsync\n" -"Modeline \"800x600\" 50 800 856 976 1040 600 637 643 666 +hsync +vsync\n" -"# 1024x768 @ 60 Hz, 48.4 kHz hsync\n" -"Modeline \"1024x768\" 65 1024 1032 1176 1344 768 771 777 806 -hsync -vsync\n" -"\n" -"# 640x480 @ 100 Hz, 53.01 kHz hsync\n" -"Modeline \"640x480\" 45.8 640 672 768 864 480 488 494 530 -HSync -VSync\n" -"# 1152x864 @ 60 Hz, 53.5 kHz hsync\n" -"Modeline \"1152x864\" 89.9 1152 1216 1472 1680 864 868 876 892 -HSync -VSync\n" -"# 800x600 @ 85 Hz, 55.84 kHz hsync\n" -"Modeline \"800x600\" 60.75 800 864 928 1088 600 616 621 657 -HSync -VSync\n" -"\n" -"# 1024x768 @ 70 Hz, 56.5 kHz hsync\n" -"Modeline \"1024x768\" 75 1024 1048 1184 1328 768 771 777 806 -hsync -vsync\n" -"# 1280x1024 @ 87 Hz interlaced, 51 kHz hsync\n" -"Modeline \"1280x1024\" 80 1280 1296 1512 1568 1024 1025 1037 1165 Interlace\n" -"\n" -"# 800x600 @ 100 Hz, 64.02 kHz hsync\n" -"Modeline \"800x600\" 69.65 800 864 928 1088 600 604 610 640 -HSync -VSync\n" -"# 1024x768 @ 76 Hz, 62.5 kHz hsync\n" -"Modeline \"1024x768\" 85 1024 1032 1152 1360 768 784 787 823\n" -"# 1152x864 @ 70 Hz, 62.4 kHz hsync\n" -"Modeline \"1152x864\" 92 1152 1208 1368 1474 864 865 875 895\n" -"# 1280x1024 @ 61 Hz, 64.2 kHz hsync\n" -"Modeline \"1280x1024\" 110 1280 1328 1512 1712 1024 1025 1028 1054\n" -"\n" -"# 1024x768 @ 85 Hz, 70.24 kHz hsync\n" -"Modeline \"1024x768\" 98.9 1024 1056 1216 1408 768 782 788 822 -HSync -VSync\n" -"# 1152x864 @ 78 Hz, 70.8 kHz hsync\n" -"Modeline \"1152x864\" 110 1152 1240 1324 1552 864 864 876 908\n" -"\n" -"# 1280x1024 @ 70 Hz, 74.59 kHz hsync\n" -"Modeline \"1280x1024\" 126.5 1280 1312 1472 1696 1024 1032 1040 1068 -HSync -VSync\n" -"# 1600x1200 @ 60Hz, 75.00 kHz hsync\n" -"Modeline \"1600x1200\" 162 1600 1664 1856 2160 1200 1201 1204 1250 +HSync +VSync\n" -"# 1152x864 @ 84 Hz, 76.0 kHz hsync\n" -"Modeline \"1152x864\" 135 1152 1464 1592 1776 864 864 876 908\n" -"\n" -"# 1280x1024 @ 74 Hz, 78.85 kHz hsync\n" -"Modeline \"1280x1024\" 135 1280 1312 1456 1712 1024 1027 1030 1064\n" -"\n" -"# 1024x768 @ 100Hz, 80.21 kHz hsync\n" -"Modeline \"1024x768\" 115.5 1024 1056 1248 1440 768 771 781 802 -HSync -VSync\n" -"# 1280x1024 @ 76 Hz, 81.13 kHz hsync\n" -"Modeline \"1280x1024\" 135 1280 1312 1416 1664 1024 1027 1030 1064\n" -"\n" -"# 1600x1200 @ 70 Hz, 87.50 kHz hsync\n" -"Modeline \"1600x1200\" 189 1600 1664 1856 2160 1200 1201 1204 1250 -HSync -VSync\n" -"# 1152x864 @ 100 Hz, 89.62 kHz hsync\n" -"Modeline \"1152x864\" 137.65 1152 1184 1312 1536 864 866 885 902 -HSync -VSync\n" -"# 1280x1024 @ 85 Hz, 91.15 kHz hsync\n" -"Modeline \"1280x1024\" 157.5 1280 1344 1504 1728 1024 1025 1028 1072 +HSync +VSync\n" -"# 1600x1200 @ 75 Hz, 93.75 kHz hsync\n" -"Modeline \"1600x1200\" 202.5 1600 1664 1856 2160 1200 1201 1204 1250 +HSync +VSync\n" -"# 1600x1200 @ 85 Hz, 105.77 kHz hsync\n" -"Modeline \"1600x1200\" 220 1600 1616 1808 2080 1200 1204 1207 1244 +HSync +VSync\n" -"# 1280x1024 @ 100 Hz, 107.16 kHz hsync\n" -"Modeline \"1280x1024\" 181.75 1280 1312 1440 1696 1024 1031 1046 1072 -HSync -VSync\n" -"\n" -"# 1800x1440 @ 64Hz, 96.15 kHz hsync \n" -"ModeLine \"1800X1440\" 230 1800 1896 2088 2392 1440 1441 1444 1490 +HSync +VSync\n" -"# 1800x1440 @ 70Hz, 104.52 kHz hsync \n" -"ModeLine \"1800X1440\" 250 1800 1896 2088 2392 1440 1441 1444 1490 +HSync +VSync\n" -"\n" -"# 512x384 @ 78 Hz, 31.50 kHz hsync\n" -"Modeline \"512x384\" 20.160 512 528 592 640 384 385 388 404 -HSync -VSync\n" -"# 512x384 @ 85 Hz, 34.38 kHz hsync\n" -"Modeline \"512x384\" 22 512 528 592 640 384 385 388 404 -HSync -VSync\n" -"\n" -#if XFREE86_VERSION >= 311 -"# Low-res Doublescan modes\n" -"# If your chipset does not support doublescan, you get a 'squashed'\n" -"# resolution like 320x400.\n" -"\n" -"# 320x200 @ 70 Hz, 31.5 kHz hsync, 8:5 aspect ratio\n" -"Modeline \"320x200\" 12.588 320 336 384 400 200 204 205 225 Doublescan\n" -"# 320x240 @ 60 Hz, 31.5 kHz hsync, 4:3 aspect ratio\n" -"Modeline \"320x240\" 12.588 320 336 384 400 240 245 246 262 Doublescan\n" -"# 320x240 @ 72 Hz, 36.5 kHz hsync\n" -"Modeline \"320x240\" 15.750 320 336 384 400 240 244 246 262 Doublescan\n" -"# 400x300 @ 56 Hz, 35.2 kHz hsync, 4:3 aspect ratio\n" -"ModeLine \"400x300\" 18 400 416 448 512 300 301 302 312 Doublescan\n" -"# 400x300 @ 60 Hz, 37.8 kHz hsync\n" -"Modeline \"400x300\" 20 400 416 480 528 300 301 303 314 Doublescan\n" -"# 400x300 @ 72 Hz, 48.0 kHz hsync\n" -"Modeline \"400x300\" 25 400 424 488 520 300 319 322 333 Doublescan\n" -"# 480x300 @ 56 Hz, 35.2 kHz hsync, 8:5 aspect ratio\n" -"ModeLine \"480x300\" 21.656 480 496 536 616 300 301 302 312 Doublescan\n" -"# 480x300 @ 60 Hz, 37.8 kHz hsync\n" -"Modeline \"480x300\" 23.890 480 496 576 632 300 301 303 314 Doublescan\n" -"# 480x300 @ 63 Hz, 39.6 kHz hsync\n" -"Modeline \"480x300\" 25 480 496 576 632 300 301 303 314 Doublescan\n" -"# 480x300 @ 72 Hz, 48.0 kHz hsync\n" -"Modeline \"480x300\" 29.952 480 504 584 624 300 319 322 333 Doublescan\n" -"\n" -#endif -; -#endif - -static char *devicesection_text = -"# **********************************************************************\n" -"# Graphics device section\n" -"# **********************************************************************\n" -"\n" -"# Any number of graphics device sections may be present\n" -"\n" -"# Standard VGA Device:\n" -"\n" -"Section \"Device\"\n" -" Identifier \"Standard VGA\"\n" -" VendorName \"Unknown\"\n" -" BoardName \"Unknown\"\n" -"\n" -"# The chipset line is optional in most cases. It can be used to override\n" -"# the driver's chipset detection, and should not normally be specified.\n" -"\n" -"# Chipset \"generic\"\n" -"\n" -"# The Driver line must be present. When using run-time loadable driver\n" -"# modules, this line instructs the server to load the specified driver\n" -"# module. Even when not using loadable driver modules, this line\n" -"# indicates which driver should interpret the information in this section.\n" -"\n" -" Driver \"vga\"\n" -"# The BusID line is used to specify which of possibly multiple devices\n" -"# this section is intended for. When this line isn't present, a device\n" -"# section can only match up with the primary video device. For PCI\n" -"# devices a line like the following could be used. This line should not\n" -"# normally be included unless there is more than one video device\n" -"# intalled.\n" -"\n" -"# BusID \"PCI:0:10:0\"\n" -"\n" -"# VideoRam 256\n" -"\n" -"# Clocks 25.2 28.3\n" -"\n" -"EndSection\n" -"\n" -"# Device configured by xorgconfig:\n" -"\n"; - -static char *screensection_text1 = -"# **********************************************************************\n" -"# Screen sections\n" -"# **********************************************************************\n" -"\n" -"# Any number of screen sections may be present. Each describes\n" -"# the configuration of a single screen. A single specific screen section\n" -"# may be specified from the X server command line with the \"-screen\"\n" -"# option.\n"; - -static char *serverlayout_section_text1 = -"# **********************************************************************\n" -"# ServerLayout sections.\n" -"# **********************************************************************\n" -"\n" -"# Any number of ServerLayout sections may be present. Each describes\n" -"# the way multiple screens are organised. A specific ServerLayout\n" -"# section may be specified from the X server command line with the\n" -"# \"-layout\" option. In the absence of this, the first section is used.\n" -"# When now ServerLayout section is present, the first Screen section\n" -"# is used alone.\n" -"\n" -"Section \"ServerLayout\"\n" -"\n" -"# The Identifier line must be present\n" -" Identifier \"Simple Layout\"\n" -"\n" -"# Each Screen line specifies a Screen section name, and optionally\n" -"# the relative position of other screens. The four names after\n" -"# primary screen name are the screens to the top, bottom, left and right\n" -"# of the primary screen. In this example, screen 2 is located to the\n" -"# right of screen 1.\n" -"\n"; - -static char *serverlayout_section_text2 = -"\n" -"# Each InputDevice line specifies an InputDevice section name and\n" -"# optionally some options to specify the way the device is to be\n" -"# used. Those options include \"CorePointer\", \"CoreKeyboard\" and\n" -"# \"SendCoreEvents\".\n" -"\n" -" InputDevice \"Mouse1\" \"CorePointer\"\n" -" InputDevice \"Keyboard1\" \"CoreKeyboard\"\n" -"\n" -"EndSection\n" -"\n" -"# Section \"DRI\"\n" -"# Mode 0666\n" -"# EndSection\n" -"\n"; - -static void -write_fontpath_section(FILE *f) -{ - /* this will create the Fontpath lines, but only after checking, - * that the corresponding dir exists (was THE absolute problem - * users had with XFree86/OS2 3.1.2D !) - */ - int i; - char cur[256+20],*colon, *hash; - -#ifdef COMPILEDDEFAULTFONTPATH - static const char dfp[] = COMPILEDDEFAULTFONTPATH; - const char *thisdir; - const char *nextdir; - int len; - - for (thisdir = dfp; thisdir != NULL; thisdir = nextdir) { - nextdir = strchr(thisdir, ','); - if (nextdir == NULL) { - len = strlen(thisdir); - } else { - len = nextdir - thisdir; - nextdir++; - } - if (len >= sizeof(cur)) - continue; - strncpy(cur, thisdir, len); - cur[len] = '\0'; - colon = strchr(cur+2,':'); /* OS/2: C:/...:scaled */ - if (colon) *colon = 0; - hash = exists_dir(cur) ? "" : "#"; - if (colon) *colon = ':'; - fprintf(f,"%s FontPath \"%s\"\n", hash, cur); - } -#endif - - for (i=0; XF86Config_fontpaths[i]; i++) { - strcpy(cur,TREEROOTFONT); - strcat(cur,XF86Config_fontpaths[i]); - /* remove a ':' */ - colon = strchr(cur+2,':'); /* OS/2: C:/...:scaled */ - if (colon) *colon = 0; -#ifdef COMPILEDDEFAULTFONTPATH - /* skip if we already added it as part of the default font path */ - if (strstr(dfp, cur) != NULL) - continue; -#endif - hash = exists_dir(cur) ? "" : "#"; - fprintf(f,"%s FontPath \"%s%s\"\n", - hash, - TREEROOTFONT, - XF86Config_fontpaths[i]); - } -} - -static int -write_XF86Config(char *filename) -{ - FILE *f; - - /* - * Write the file. - */ - - f = fopen(filename, "w"); - if (f == NULL) { - printf("Failed to open filename for writing.\n"); - if (getuid() != 0) - printf("Maybe you need to be root to write to the specified directory?\n"); - return(1); - } - - fprintf(f, "%s", XF86Config_firstchunk_text); - write_fontpath_section(f); - fprintf(f, "%s", XF86Config_fontpathchunk_text); - - /* - * Write keyboard section. - */ - if (config_altmeta) { - fprintf(f, " Option \"LeftAlt\" \"Meta\"\n"); - fprintf(f, " Option \"RightAlt\" \"ModeShift\"\n"); - } - else { - fprintf(f, "# Option \"LeftAlt\" \"Meta\"\n"); - fprintf(f, "# Option \"RightAlt\" \"ModeShift\"\n"); - } -#if defined(__OpenBSD__) && defined(WSCONS_SUPPORT) && !defined(PCVT_SUPPORT) - /* wscons keyoards need a protocol line */ - fprintf(f, " Option \"Protocol\" \"wskbd\"\n"); - fprintf(f, " Option \"Device\" \"%s\"\n", config_keyboard_dev); - fprintf(f, " Option \"XkbKeycodes\" \"wscons(ppc)\"\n"); -#endif - fprintf(f, "%s", keyboardchunk2_text); - - fprintf(f, "%s", keyboardchunk3_text); - if (config_xkbdisable) { - fprintf(f, " Option \"XkbDisable\"\n\n"); - } else { - fprintf(f, "# Option \"XkbDisable\"\n\n"); - } - fprintf(f, " Option \"XkbRules\" \"%s\"\n", - config_xkbrules); - fprintf(f, " Option \"XkbModel\" \"%s\"\n", - config_xkbmodel); - fprintf(f, " Option \"XkbLayout\" \"%s\"\n", - config_xkblayout); - if (config_xkbvariant) - fprintf(f, " Option \"XkbVariant\" \"%s\"\n", - config_xkbvariant); - if (config_xkboptions) - fprintf(f, " Option \"XkbOptions\" \"%s\"\n", - config_xkboptions); - - fprintf(f, "%s",keyboardlastchunk_text); - - /* - * Write pointer section. - */ - fprintf(f, "%s", pointersection_text1); - fprintf(f, " Option \"Protocol\" \"%s\"\t# %s\n", - mouse_info[config_mousetype].name, - mouse_info[config_mousetype].desc); -#if !defined(QNX4) - fprintf(f, " Option \"Device\" \"%s\"\n", config_pointerdevice); -#endif - fprintf(f, "%s", pointersection_text2); - if (!config_emulate3buttons) - fprintf(f, "#"); - fprintf(f, " Option \"Emulate3Buttons\"\n"); - fprintf(f, "# Option \"Emulate3Timeout\" \"50\"\n\n"); - fprintf(f, "# ChordMiddle is an option for some 3-button Logitech mice\n\n"); - if (!config_chordmiddle) - fprintf(f, "#"); - fprintf(f, " Option \"ChordMiddle\"\n\n"); - if (config_cleardtrrts) { - fprintf(f, " Option \"ClearDTR\"\n"); - fprintf(f, " Option \"ClearRTS\"\n\n"); - } - fprintf(f, "EndSection\n\n\n"); - - /* - * Write XInput sample section - */ - fprintf(f, "%s", xinputsection_text); - - /* - * Write monitor section. - */ - fprintf(f, "%s", monitorsection_text1); - fprintf(f, " Identifier \"%s\"\n", config_monitoridentifier); - fprintf(f, "\n"); - fprintf(f, "%s", monitorsection_text2); - fprintf(f, " HorizSync %s\n", config_hsyncrange); - fprintf(f, "\n"); - fprintf(f, "%s", monitorsection_text3); - fprintf(f, " VertRefresh %s\n", config_vsyncrange); - fprintf(f, "\n"); -#if 0 - fprintf(f, "%s", monitorsection_text4); - fprintf(f, "%s", modelines_text); -#endif - fprintf(f, "EndSection\n\n\n"); - - /* - * Write Device section. - */ - - fprintf(f, "%s", devicesection_text); - fprintf(f, "Section \"Device\"\n"); - fprintf(f, " Identifier \"%s\"\n", config_deviceidentifier); - if (card_selected != -1) { - fprintf(f, " Driver \"%s\"\n", card[card_selected].driver); - if (card[card_selected].flags & UNSUPPORTED) { - fprintf(f, " # unsupported card\n"); - } - } else { - fprintf(f, " Driver \"vga\"\n" - " # unsupported card\n"); - } - /* Rely on server to detect video memory. */ - fprintf(f, " #VideoRam %d\n", config_videomemory); - if (card_selected != -1) - /* Add comment lines from card definition. */ - fprintf(f, card[card_selected].lines); - if (config_ramdac != NULL) - fprintf(f, " Ramdac \"%s\"\n", config_ramdac); - if (card_selected != -1) - if (card[card_selected].dacspeed != NULL) - fprintf(f, " Dacspeed %s\n", - card[card_selected].dacspeed); - if (config_clockchip != NULL) - fprintf(f, " Clockchip \"%s\"\n", config_clockchip); - else - if (config_numberofclockslines == 0) - fprintf(f, " # Insert Clocks lines here if appropriate\n"); - else { - int i; - for (i = 0; i < config_numberofclockslines; i++) - fprintf(f, " Clocks %s\n", config_clocksline[i]); - } - fprintf(f, "EndSection\n\n\n"); - - /* - * Write Screen sections. - */ - - fprintf(f, "%s", screensection_text1); - - fprintf(f, - "Section \"Screen\"\n" - " Identifier \"Screen 1\"\n" - " Device \"%s\"\n" - " Monitor \"%s\"\n" - " DefaultDepth %s\n" - "\n" - " Subsection \"Display\"\n" - " Depth 8\n" - " Modes %s\n" - " ViewPort 0 0\n", - config_deviceidentifier, - config_monitoridentifier, - config_depth, - config_modesline8bpp); - if (config_virtual) - fprintf(f, " Virtual %d %d\n", - config_virtualx8bpp, config_virtualy8bpp); - fprintf(f, - " EndSubsection\n" - " Subsection \"Display\"\n" - " Depth 16\n" - " Modes %s\n" - " ViewPort 0 0\n", - config_modesline16bpp); - if (config_virtual) - fprintf(f, " Virtual %d %d\n", - config_virtualx16bpp, config_virtualy16bpp); - fprintf(f, - " EndSubsection\n" - " Subsection \"Display\"\n" - " Depth 24\n" - " Modes %s\n" - " ViewPort 0 0\n", - config_modesline24bpp); - if (config_virtual) - fprintf(f, " Virtual %d %d\n", - config_virtualx24bpp, config_virtualy24bpp); - fprintf(f, - " EndSubsection\n" - "EndSection\n" - "\n"); - - /* - * ServerLayout section - */ - - fprintf(f, serverlayout_section_text1); - /* replace with screen config */ - fprintf(f, " Screen \"Screen 1\"\n"); - - fprintf(f, serverlayout_section_text2); - - fclose(f); - return(0); -} - -static char * -append_version(char *name) -{ -#ifdef APPEND_VERSION_TO_CONFIG_NAME - char *ret = NULL; - - if (XF86_VERSION_MAJOR > 9 || XF86_VERSION_MAJOR < 0) - return name; - - ret = Malloc(strlen(name) + 2 + 1); - sprintf(ret, "%s-%d", name, XF86_VERSION_MAJOR); - free(name); - return ret; -#else - return name; -#endif -} - -/* - * Ask where to write XF86Config to. Returns filename. - */ - -static char * -ask_XF86Config_location(void) { - char s[80]; - char *filename = NULL; - - printf( -"I am going to write the " CONFIGNAME " file now. Make sure you don't accidently\n" -"overwrite a previously configured one.\n\n"); - - if (getuid() == 0) { -#ifdef PREFER_XF86CONFIG_IN_ETC - filename = Strdup("/etc/X11/" XCONFIGFILE); - filename = append_version(filename); - printf("Shall I write it to %s? ", filename); - getstring(s); - printf("\n"); - if (answerisyes(s)) - return filename; -#endif - - if (filename) - free(filename); - filename = Strdup(TREEROOTCFG "/" XCONFIGFILE); - filename = append_version(filename); - printf("Please answer the following question with either 'y' or 'n'.\n"); - printf("Shall I write it to the default location, %s? ", filename); - getstring(s); - printf("\n"); - if (answerisyes(s)) - return filename; - -#ifndef PREFER_XF86CONFIG_IN_ETC - if (filename) - free(filename); - filename = Strdup("/etc/X11/" XCONFIGFILE); - filename = append_version(filename); - printf("Shall I write it to %s? ", filename); - getstring(s); - printf("\n"); - if (answerisyes(s)) - return filename; -#endif - } - - if (filename) - free(filename); - filename = Strdup(XCONFIGFILE); - filename = append_version(filename); - printf("Do you want it written to the current directory as '%s'? ", filename); - getstring(s); - printf("\n"); - if (answerisyes(s)) { - return filename; - } - - printf("Please give a filename to write to: "); - getstring(s); - printf("\n"); - if (filename) - free(filename); - filename = Strdup(s); - return filename; -} - - -/* - * Check if an earlier version of XFree86 is installed; warn about proper - * search path order in that case. - */ - -static char *notinstalled_text = -"The directory " TREEROOT " does not exist. This probably means that you have\n" -"not yet installed the version of "__XSERVERNAME__" that this program was built\n" -"to configure. Please install "__XSERVERNAME__" "XVERSIONSTRING" before running this program,\n" -"following the instructions in the INSTALL or README that comes with the\n" -__XSERVERNAME__" distribution for your OS.\n" -"For a minimal installation it is sufficient to only install base binaries,\n" -"libraries, configuration files and a server that you want to use.\n" -"\n"; - -static char *oldxfree86_text = -"The directory '/usr/X386/bin' exists. You probably have a very old version of\n" -"XFree86 installed, but this program was built to configure "__XSERVERNAME__" "XVERSIONSTRING"\n" -"installed in '" TREEROOT "' instead of '/usr/X386'.\n" -"\n" -"It is important that the directory '" TREEROOT "' is present in your\n" -"search path, *before* any occurrence of '/usr/X386/bin'. If you have installed\n" -"X program binaries that are not in the base "__XSERVERNAME__" distribution in\n" -"'/usr/X386/bin', you can keep the directory in your path as long as it is\n" -"after '" TREEROOT "'.\n" -"\n"; - -static char *pathnote_text = -"Note that the X binary directory in your path may be a symbolic link.\n" -"In that case you could modify the symbolic link to point to the new binaries.\n" -"Example: 'rm -f /usr/bin/X11; ln -s /usr/X11R6/bin /usr/bin/X11', if the\n" -"link is '/usr/bin/X11'.\n" -"\n" -"Make sure the path is OK before continuing.\n"; - -static void -path_check(void) { - char s[80]; - int ok; - - ok = exists_dir(TREEROOT); - if (!ok) { - printf("%s", notinstalled_text); - printf("Do you want to continue? "); - getstring(s); - if (!answerisyes(s)) - exit(-1); - printf("\n"); - } - - ok = exists_dir("/usr/X386/bin"); - if (!ok) - return; - - printf("%s", oldxfree86_text); - printf("Your PATH is currently set as follows:\n%s\n\n", - getenv("PATH")); - printf("%s", pathnote_text); - keypress(); -} - - -static void -configdir_check(void) -{ - /* /etc/X11 may not exist on some systems */ - if (getuid() == 0) { - struct stat buf; - if (stat("/etc/X11", &buf) == -1 && errno == ENOENT) - mkdir("/etc/X11", 0777); - if (stat(TREEROOTCFG, &buf) == -1 && errno == ENOENT) - mkdir(TREEROOTCFG, 0777); - } -} - - -/* - * Program entry point. - */ - -int -main(int argc, char *argv[]) { - - createtmpdir(); - - emptylines(); - - printf("%s", intro_text); - - keypress(); - emptylines(); - - path_check(); - - emptylines(); - - configdir_check(); - - emptylines(); - - mouse_configuration(); - - emptylines(); - - keyboard_configuration(); - - emptylines(); - - monitor_configuration(); - - emptylines(); - - carddb_configuration(); - - emptylines(); - - while(screen_configuration()){}; - - emptylines(); - - depth_configuration(); - - emptylines(); - - while(write_XF86Config(ask_XF86Config_location())){}; - - printf("%s", finalcomment_text); - - exit(0); -} diff --git a/xorg-server/hw/xfree86/utils/xorgconfig/xorgconfig.man.pre b/xorg-server/hw/xfree86/utils/xorgconfig/xorgconfig.man.pre deleted file mode 100644 index b3d656cfa..000000000 --- a/xorg-server/hw/xfree86/utils/xorgconfig/xorgconfig.man.pre +++ /dev/null @@ -1,22 +0,0 @@ -.\" $XdotOrg: $ -.\" $XFree86: xc/programs/Xserver/hw/xfree86/xf86config/xorgconfig.man,v 1.5 2001/11/01 23:35:34 dawes Exp $ -.TH xorgconfig 1 __vendorversion__ -.SH NAME -xorgconfig \- generate an __XCONFIGFILE__ file -.SH SYNOPSIS -.B xorgconfig -.SH DESCRIPTION -\fIxorgconfig\fP is an interactive program for generating an __XCONFIGFILE__ file -for use with __XSERVERNAME__ X servers. -.PP -Note that the default name used by \fIxorgconfig\fP for the __XCONFIGFILE__ file -is system-dependent. For instance, on OS/2, XConfig is used. -.SH FILES -.TP -.I __projectroot__/lib/X11/Cards -Video cards database -.SH "SEE ALSO" -__XSERVERNAME__(1), __XCONFIGFILE__(__filemansuffix__), xorgcfg(1), reconfig(1) -.SH AUTHOR -Harm Hanemaayer. -.\" $TOG: xf86conf.man /main/9 1997/07/19 10:53:08 kaleb $ diff --git a/xorg-server/hw/xfree86/vbe/Makefile.in b/xorg-server/hw/xfree86/vbe/Makefile.in index 111ce5a46..6f935ed10 100644 --- a/xorg-server/hw/xfree86/vbe/Makefile.in +++ b/xorg-server/hw/xfree86/vbe/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,7 +45,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -71,9 +70,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -90,8 +86,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -112,10 +109,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -137,6 +130,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -146,18 +140,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -176,7 +167,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -190,7 +181,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -202,8 +196,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -212,8 +205,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -246,7 +239,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -256,27 +248,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -287,10 +264,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -299,13 +272,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -338,8 +306,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -359,7 +326,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -369,12 +335,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -392,8 +358,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ module_LTLIBRARIES = libvbe.la libvbe_la_LDFLAGS = -avoid-version libvbe_la_SOURCES = vbe.c vbeModes.c vbe_module.c @@ -410,8 +374,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -524,7 +488,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/vbe/vbe.c b/xorg-server/hw/xfree86/vbe/vbe.c index 8af1727cc..4986b5b29 100644 --- a/xorg-server/hw/xfree86/vbe/vbe.c +++ b/xorg-server/hw/xfree86/vbe/vbe.c @@ -1108,7 +1108,7 @@ VBEReadPanelID(vbeInfoPtr pVbe) { int RealOff = pVbe->real_mode_base; pointer page = pVbe->memory; - unsigned char *tmp = NULL; + void *tmp = NULL; int screen = pVbe->pInt10->scrnIndex; pVbe->pInt10->ax = 0x4F11; @@ -1129,8 +1129,8 @@ VBEReadPanelID(vbeInfoPtr pVbe) switch (pVbe->pInt10->ax & 0xff00) { case 0x0: xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE PanelID read successfully\n"); - tmp = (unsigned char *)xnfalloc(32); - memcpy(tmp,page,32); + tmp = xnfalloc(32); + memcpy(tmp, page, 32); break; case 0x100: xf86DrvMsgVerb(screen,X_INFO,3,"VESA VBE PanelID read failed\n"); diff --git a/xorg-server/hw/xfree86/vgahw/Makefile.in b/xorg-server/hw/xfree86/vgahw/Makefile.in index ab31d5354..65a593108 100644 --- a/xorg-server/hw/xfree86/vgahw/Makefile.in +++ b/xorg-server/hw/xfree86/vgahw/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,7 +45,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -71,9 +70,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -90,8 +86,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -112,10 +109,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -137,6 +130,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -146,18 +140,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -176,7 +167,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -190,7 +181,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -202,8 +196,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -212,8 +205,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -246,7 +239,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -256,27 +248,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -287,10 +264,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -299,13 +272,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -338,8 +306,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -359,7 +326,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -369,12 +335,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -392,8 +358,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ module_LTLIBRARIES = libvgahw.la libvgahw_la_LDFLAGS = -avoid-version libvgahw_la_SOURCES = vgaHW.c vgaHWmodule.c @@ -409,8 +373,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -522,7 +486,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/x86emu/Makefile.in b/xorg-server/hw/xfree86/x86emu/Makefile.in index 50e43896a..064228151 100644 --- a/xorg-server/hw/xfree86/x86emu/Makefile.in +++ b/xorg-server/hw/xfree86/x86emu/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -43,7 +43,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -62,9 +61,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -79,8 +75,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -101,10 +98,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -126,6 +119,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -135,18 +129,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -165,7 +156,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -179,7 +170,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -191,8 +185,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -201,8 +194,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -235,7 +228,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -245,27 +237,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -276,10 +253,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -288,13 +261,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -327,8 +295,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -348,7 +315,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -358,12 +324,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -381,8 +347,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ noinst_LIBRARIES = libx86emu.a libx86emu_a_SOURCES = debug.c \ decode.c \ @@ -416,8 +380,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -495,7 +459,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/x86emu/ops2.c b/xorg-server/hw/xfree86/x86emu/ops2.c index a1eda76d7..39bd0411d 100644 --- a/xorg-server/hw/xfree86/x86emu/ops2.c +++ b/xorg-server/hw/xfree86/x86emu/ops2.c @@ -110,7 +110,7 @@ Handles opcode 0x0f,0x80-0x8F static void x86emuOp2_long_jump(u8 op2) { s32 target; - char *name = 0; + char *name = NULL; int cond = 0; /* conditional jump to word offset. */ @@ -204,7 +204,7 @@ static void x86emuOp2_set_byte(u8 op2) int mod, rl, rh; uint destoffset; u8 *destreg; - char *name = 0; + char *name = NULL; int cond = 0; START_OF_INSTR(); diff --git a/xorg-server/hw/xfree86/x86emu/prim_ops.c b/xorg-server/hw/xfree86/x86emu/prim_ops.c index 41968e1a7..4a6ac5deb 100644 --- a/xorg-server/hw/xfree86/x86emu/prim_ops.c +++ b/xorg-server/hw/xfree86/x86emu/prim_ops.c @@ -103,7 +103,7 @@ #include "x86emu/x86emui.h" #if defined(__GNUC__) -# if defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__) || defined(__x86_64__) +# if defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__amd64__) # include "x86emu/prim_x86_gcc.h" # endif #endif diff --git a/xorg-server/hw/xfree86/x86emu/sys.c b/xorg-server/hw/xfree86/x86emu/sys.c index 4d90ea315..e15fb0931 100644 --- a/xorg-server/hw/xfree86/x86emu/sys.c +++ b/xorg-server/hw/xfree86/x86emu/sys.c @@ -68,7 +68,7 @@ X86EMU_intrFuncs _X86EMU_intrTab[256]; * packed structures to talk about such things with. */ -#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +#if defined(__GNUC__) struct __una_u64 { unsigned long x __attribute__((packed)); }; struct __una_u32 { unsigned int x __attribute__((packed)); }; struct __una_u16 { unsigned short x __attribute__((packed)); }; @@ -76,7 +76,7 @@ struct __una_u16 { unsigned short x __attribute__((packed)); }; static __inline__ unsigned long ldq_u(unsigned long * r11) { -#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +#if defined(__GNUC__) const struct __una_u64 *ptr = (const struct __una_u64 *) r11; return ptr->x; #else @@ -95,7 +95,7 @@ static __inline__ unsigned long ldq_u(unsigned long * r11) static __inline__ unsigned long ldl_u(unsigned int * r11) { -#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +#if defined(__GNUC__) const struct __una_u32 *ptr = (const struct __una_u32 *) r11; return ptr->x; #else @@ -114,7 +114,7 @@ static __inline__ unsigned long ldl_u(unsigned int * r11) static __inline__ unsigned long ldw_u(unsigned short * r11) { -#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +#if defined(__GNUC__) const struct __una_u16 *ptr = (const struct __una_u16 *) r11; return ptr->x; #else @@ -137,7 +137,7 @@ static __inline__ unsigned long ldw_u(unsigned short * r11) static __inline__ void stq_u(unsigned long r5, unsigned long * r11) { -#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +#if defined(__GNUC__) struct __una_u64 *ptr = (struct __una_u64 *) r11; ptr->x = r5; #else @@ -162,7 +162,7 @@ static __inline__ void stq_u(unsigned long r5, unsigned long * r11) static __inline__ void stl_u(unsigned long r5, unsigned int * r11) { -#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +#if defined(__GNUC__) struct __una_u32 *ptr = (struct __una_u32 *) r11; ptr->x = r5; #else @@ -187,7 +187,7 @@ static __inline__ void stl_u(unsigned long r5, unsigned int * r11) static __inline__ void stw_u(unsigned long r5, unsigned short * r11) { -#if defined(__GNUC__) && ((__GNUC__ > 2) || (__GNUC_MINOR__ >= 91)) +#if defined(__GNUC__) struct __una_u16 *ptr = (struct __una_u16 *) r11; ptr->x = r5; #else @@ -209,60 +209,6 @@ static __inline__ void stw_u(unsigned long r5, unsigned short * r11) :"r" (r5), "r" (r11)); #endif } - -#elif defined(__GNUC__) && ((__GNUC__ < 3)) && \ - (defined (__ia64__) || defined (ia64__)) -#define IA64_UALOADS -/* - * EGCS 1.1 knows about arbitrary unaligned loads. Define some - * packed structures to talk about such things with. - */ -struct __una_u64 { unsigned long x __attribute__((packed)); }; -struct __una_u32 { unsigned int x __attribute__((packed)); }; -struct __una_u16 { unsigned short x __attribute__((packed)); }; - -static __inline__ unsigned long -__uldq (const unsigned long * r11) -{ - const struct __una_u64 *ptr = (const struct __una_u64 *) r11; - return ptr->x; -} - -static __inline__ unsigned long -uldl (const unsigned int * r11) -{ - const struct __una_u32 *ptr = (const struct __una_u32 *) r11; - return ptr->x; -} - -static __inline__ unsigned long -uldw (const unsigned short * r11) -{ - const struct __una_u16 *ptr = (const struct __una_u16 *) r11; - return ptr->x; -} - -static __inline__ void -ustq (unsigned long r5, unsigned long * r11) -{ - struct __una_u64 *ptr = (struct __una_u64 *) r11; - ptr->x = r5; -} - -static __inline__ void -ustl (unsigned long r5, unsigned int * r11) -{ - struct __una_u32 *ptr = (struct __una_u32 *) r11; - ptr->x = r5; -} - -static __inline__ void -ustw (unsigned long r5, unsigned short * r11) -{ - struct __una_u16 *ptr = (struct __una_u16 *) r11; - ptr->x = r5; -} - #endif /**************************************************************************** diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h b/xorg-server/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h index 5a443cdbf..5530a3ada 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h @@ -42,7 +42,7 @@ #include "x86emu/types.h" -#if !defined(__GNUC__) || !(defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__) || defined(__x86_64__)) +#if !defined(__GNUC__) || !(defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__amd64__)) #error This file is intended to be used by gcc on i386 or x86-64 system #endif diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/types.h b/xorg-server/hw/xfree86/x86emu/x86emu/types.h index 2d41b0f18..c18e11cfb 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/types.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/types.h @@ -74,9 +74,8 @@ defined(__ia64__) || defined(ia64) || \ defined(__sparc64__) || \ defined(__s390x__) || \ - (defined(__hppa__) && defined(__LP64)) || \ - defined(__amd64__) || defined(amd64) || defined(__x86_64__) || \ - (defined(__sgi) && (_MIPS_SZLONG == 64)) + defined(__hppa__) && defined(__LP64) || \ + defined(__amd64__) || defined(amd64) #define NUM32 int #else #define NUM32 long diff --git a/xorg-server/hw/xfree86/xaa/Makefile.am b/xorg-server/hw/xfree86/xaa/Makefile.am index bd8267ad8..e9f5e687c 100644 --- a/xorg-server/hw/xfree86/xaa/Makefile.am +++ b/xorg-server/hw/xfree86/xaa/Makefile.am @@ -67,8 +67,8 @@ DISTCLEANFILES = $(POLYSEG) \ sdk_HEADERS = xaa.h xaalocal.h xaarop.h xaaWrapper.h EXTRA_DIST = xaacexp.h xaawrap.h xaaLine.c xaaDashLine.c \ xaaStipple.c xaaTEGlyph.c xaaNonTEGlyph.c xaaBitmap.c \ - xaaTEGlyphBlt.S XAA.HOWTO + XAA.HOWTO -INCLUDES = $(XORG_INCS) +INCLUDES = $(XORG_INCS) -I$(srcdir)/../../../miext/cw AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) diff --git a/xorg-server/hw/xfree86/xaa/Makefile.in b/xorg-server/hw/xfree86/xaa/Makefile.in index bea296fa0..2dc04250e 100644 --- a/xorg-server/hw/xfree86/xaa/Makefile.in +++ b/xorg-server/hw/xfree86/xaa/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,7 +45,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -91,9 +90,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -110,8 +106,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -132,10 +129,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -157,6 +150,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -166,18 +160,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -196,7 +187,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -210,7 +201,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -222,8 +216,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -232,8 +225,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -266,7 +259,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -276,27 +268,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -307,10 +284,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -319,13 +292,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -358,8 +326,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -379,7 +346,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -389,12 +355,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -412,8 +378,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ LSB_FIRST = l-xaaBitmap.c l-xaaStipple.c l-xaaTEGlyph.c LSB_3_FIRST = l3-xaaBitmap.c l3-xaaStipple.c MSB_FIRST = m-xaaBitmap.c m-xaaStipple.c m-xaaTEGlyph.c @@ -444,9 +408,9 @@ DISTCLEANFILES = $(POLYSEG) \ sdk_HEADERS = xaa.h xaalocal.h xaarop.h xaaWrapper.h EXTRA_DIST = xaacexp.h xaawrap.h xaaLine.c xaaDashLine.c \ xaaStipple.c xaaTEGlyph.c xaaNonTEGlyph.c xaaBitmap.c \ - xaaTEGlyphBlt.S XAA.HOWTO + XAA.HOWTO -INCLUDES = $(XORG_INCS) +INCLUDES = $(XORG_INCS) -I$(srcdir)/../../../miext/cw AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) all: all-am @@ -456,8 +420,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -620,7 +584,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/xaa/xaa.h b/xorg-server/hw/xfree86/xaa/xaa.h index 1dc7ed2d5..d6ccc31e2 100644 --- a/xorg-server/hw/xfree86/xaa/xaa.h +++ b/xorg-server/hw/xfree86/xaa/xaa.h @@ -2,6 +2,10 @@ #ifndef _XAA_H #define _XAA_H +#define XAA_VERSION_MAJOR 1 +#define XAA_VERSION_MINOR 2 +#define XAA_VERSION_RELEASE 1 + /* ******** OPERATION SPECIFIC FLAGS ********* diff --git a/xorg-server/hw/xfree86/xaa/xaaCpyPlane.c b/xorg-server/hw/xfree86/xaa/xaaCpyPlane.c index cd9e9d47f..aa4c0407c 100644 --- a/xorg-server/hw/xfree86/xaa/xaaCpyPlane.c +++ b/xorg-server/hw/xfree86/xaa/xaaCpyPlane.c @@ -110,12 +110,12 @@ XAACopyPlaneNtoNColorExpand( int Bpp = pSrc->bitsPerPixel >> 3; unsigned long mask = TmpBitPlane; - if(TmpBitPlane < 8) { + if(TmpBitPlane < (1 << 8)) { offset = 0; - } else if(TmpBitPlane < 16) { + } else if(TmpBitPlane < (1 << 16)) { offset = 1; mask >>= 8; - } else if(TmpBitPlane < 24) { + } else if(TmpBitPlane < (1 << 24)) { offset = 2; mask >>= 16; } else { @@ -131,11 +131,9 @@ XAACopyPlaneNtoNColorExpand( h = height = pbox->y2 - pbox->y1; pitch = BitmapBytePad(width); - if(!(data = xalloc(height * pitch))) + if(!(data = xcalloc(height, pitch))) goto ALLOC_FAILED; - bzero(data, height * pitch); - dataPtr = data; srcPtr = ((pptSrc->y) * srcwidth) + src + ((pptSrc->x) * Bpp) + offset; diff --git a/xorg-server/hw/xfree86/xaa/xaaInit.c b/xorg-server/hw/xfree86/xaa/xaaInit.c index 22a35a0a0..8d3833e5a 100644 --- a/xorg-server/hw/xfree86/xaa/xaaInit.c +++ b/xorg-server/hw/xfree86/xaa/xaaInit.c @@ -19,6 +19,9 @@ #include "xaawrap.h" #include "xf86fbman.h" #include "servermd.h" +#ifdef COMPOSITE +#include "cw.h" +#endif #define MAX_PREALLOC_MEM 65536 /* MUST be >= 1024 */ @@ -39,9 +42,12 @@ static int XAASetDGAMode(int index, int num, DGADevicePtr devRet); static void XAAEnableDisableFBAccess (int index, Bool enable); static Bool XAAChangeWindowAttributes (WindowPtr pWin, unsigned long mask); -static DevPrivateKey XAAScreenKey = &XAAScreenKey; -static DevPrivateKey XAAGCKey = &XAAGCKey; -static DevPrivateKey XAAPixmapKey = &XAAPixmapKey; +static int XAAScreenKeyIndex; +static DevPrivateKey XAAScreenKey = &XAAScreenKeyIndex; +static int XAAGCKeyIndex; +static DevPrivateKey XAAGCKey = &XAAGCKeyIndex; +static int XAAPixmapKeyIndex; +static DevPrivateKey XAAPixmapKey = &XAAPixmapKeyIndex; DevPrivateKey XAAGetScreenKey(void) { return XAAScreenKey; diff --git a/xorg-server/hw/xfree86/xaa/xaaInitAccel.c b/xorg-server/hw/xfree86/xaa/xaaInitAccel.c index 00483e3ed..3b397dc4a 100644 --- a/xorg-server/hw/xfree86/xaa/xaaInitAccel.c +++ b/xorg-server/hw/xfree86/xaa/xaaInitAccel.c @@ -16,8 +16,6 @@ #include "xf86fbman.h" #include "servermd.h" -static const OptionInfoRec *XAAAvailableOptions(void *unused); - /* * XAA Config options */ @@ -103,7 +101,9 @@ static XF86ModuleVersionInfo xaaVersRec = MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, - 1, 2, 0, + XAA_VERSION_MAJOR, + XAA_VERSION_MINOR, + XAA_VERSION_RELEASE, ABI_CLASS_VIDEODRV, /* requires the video driver ABI */ ABI_VIDEODRV_VERSION, MOD_CLASS_NONE, @@ -112,13 +112,6 @@ static XF86ModuleVersionInfo xaaVersRec = _X_EXPORT XF86ModuleData xaaModuleData = { &xaaVersRec, NULL, NULL }; -/*ARGSUSED*/ -static const OptionInfoRec * -XAAAvailableOptions(void *unused) -{ - return (XAAOptions); -} - Bool XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec) { diff --git a/xorg-server/hw/xfree86/xaa/xaaNonTEText.c b/xorg-server/hw/xfree86/xaa/xaaNonTEText.c index d4661e879..d32c0bbc5 100644 --- a/xorg-server/hw/xfree86/xaa/xaaNonTEText.c +++ b/xorg-server/hw/xfree86/xaa/xaaNonTEText.c @@ -291,8 +291,7 @@ PolyGlyphBltAsSingleBitmap ( pitch = (Right - Left + 31) >> 5; size = (pitch << 2) * (Bottom - Top); - block = (CARD32*)xalloc(size); - bzero(block, size); + block = xcalloc(1, size); topLine = 10000; botLine = -10000; diff --git a/xorg-server/hw/xfree86/xaa/xaaOverlayDF.c b/xorg-server/hw/xfree86/xaa/xaaOverlayDF.c index 64ca998ee..8db816e1e 100644 --- a/xorg-server/hw/xfree86/xaa/xaaOverlayDF.c +++ b/xorg-server/hw/xfree86/xaa/xaaOverlayDF.c @@ -151,7 +151,8 @@ typedef struct { int (*TiledFillChooser)(GCPtr); } XAAOverlayRec, *XAAOverlayPtr; -static DevPrivateKey XAAOverlayKey = &XAAOverlayKey; +static int XAAOverlayKeyIndex; +static DevPrivateKey XAAOverlayKey = &XAAOverlayKeyIndex; #define GET_OVERLAY_PRIV(pScreen) \ (XAAOverlayPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAOverlayKey) diff --git a/xorg-server/hw/xfree86/xaa/xaaStateChange.c b/xorg-server/hw/xfree86/xaa/xaaStateChange.c index 443bda628..57d8aa318 100644 --- a/xorg-server/hw/xfree86/xaa/xaaStateChange.c +++ b/xorg-server/hw/xfree86/xaa/xaaStateChange.c @@ -274,7 +274,8 @@ typedef struct _XAAStateWrapRec { #endif } XAAStateWrapRec, *XAAStateWrapPtr; -static DevPrivateKey XAAStateKey = &XAAStateKey; +static int XAAStateKeyIndex; +static DevPrivateKey XAAStateKey = &XAAStateKeyIndex; /* Wrap functions start here */ #define GET_STATEPRIV_GC(pGC) XAAStateWrapPtr pStatePriv =\ diff --git a/xorg-server/hw/xfree86/xaa/xaaTEGlyphBlt.S b/xorg-server/hw/xfree86/xaa/xaaTEGlyphBlt.S deleted file mode 100644 index 5f3137f45..000000000 --- a/xorg-server/hw/xfree86/xaa/xaaTEGlyphBlt.S +++ /dev/null @@ -1,964 +0,0 @@ -/* - * Copyright 1996 The XFree86 Project - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * HARM HANEMAAYER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Written by Harm Hanemaayer (H.Hanemaayer@inter.nl.net). - */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaTEGlyphBlt.S,v 1.1 1999/07/10 07:24:54 dawes Exp $ */ - - -/* - * Intel Pentium-optimized versions of "terminal emulator font" text - * bitmap transfer routines. - * - * SCANLINE_PAD_DWORD. - * - * Only for glyphs with a fixed width of 6 pixels or 8 pixels. - */ - -#include "assyntax.h" - -#ifndef QNX4 - FILE("xaaTEGlyphBlt.s") -#else - FILE( __FILE__ ) -#endif - - AS_BEGIN - -/* - * Definition of stack frame function arguments. - * All functions have the same arguments (some don't have glyphwidth, - * but that's OK, since it comes last and doesn't affect the offset - * of the other arguments). - */ - -#define base_arg REGOFF(20,ESP) -#define glyphp_arg REGOFF(24,ESP) -#define line_arg REGOFF(28,ESP) -#define width_arg REGOFF(32,ESP) -#define glyphwidth_arg REGOFF(36,ESP) - -#define BYTE_REVERSED GLNAME(byte_reversed) - -/* I assume %eax and %edx can be trashed. */ - - SEG_TEXT - - ALIGNTEXT4 - -#ifdef FIXEDBASE -# ifdef MSBFIRST - GLOBL GLNAME(DrawTETextScanlineWidth6PMSBFirstFixedBase) -GLNAME(DrawTETextScanlineWidth6PMSBFirstFixedBase): -# else - GLOBL GLNAME(DrawTETextScanlineWidth6PLSBFirstFixedBase) -GLNAME(DrawTETextScanlineWidth6PLSBFirstFixedBase): -# endif -#else -# ifdef MSBFIRST - GLOBL GLNAME(DrawTETextScanlineWidth6PMSBFirst) -GLNAME(DrawTETextScanlineWidth6PMSBFirst): -# else - GLOBL GLNAME(DrawTETextScanlineWidth6PLSBFirst) -GLNAME(DrawTETextScanlineWidth6PLSBFirst): -# endif -#endif - -/* Definition of stack frame function arguments. */ - -#define base_arg REGOFF(20,ESP) -#define glyphp_arg REGOFF(24,ESP) -#define line_arg REGOFF(28,ESP) -#define width_arg REGOFF(32,ESP) - - SUB_L (CONST(16),ESP) - MOV_L (EBP,REGOFF(12,ESP)) /* PUSH EBP */ - MOV_L (EBX,REGOFF(8,ESP)) /* PUSH EBX */ - MOV_L (ESI,REGOFF(4,ESP)) /* PUSH ESI */ - MOV_L (EDI,REGOFF(0,ESP)) /* PUSH EDI */ - - MOV_L (line_arg,EBP) - MOV_L (base_arg,EDI) - MOV_L (glyphp_arg,ESI) - - ALIGNTEXT4 - -.L6_1: - /* Pentium-optimized instruction pairing. */ - /* EBX = bits = glyph[0][line] */ - MOV_L (REGOFF(4,ESI),EDX) /* glyphp[1] */ - MOV_L (REGIND(ESI),EBX) /* glyphp[0] */ - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[1][line] */ - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[0][line] */ - SAL_L (CONST(6),EDX) /* glyphp[1][line] << 6 */ - MOV_L (REGOFF(8,ESI),ECX) /* glyphp[2] */ - MOV_L (REGOFF(12,ESI),EAX) /* glyphp[3] */ - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[2][line] */ - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[3][line] */ - SAL_L (CONST(12),ECX) /* glyphp[2][line] << 12 */ - OR_L (EDX,EBX) /* bits |= ..[1].. << 6 */ - SAL_L (CONST(18),EAX) /* glyphp[3][line] << 18 */ - OR_L (ECX,EBX) /* bits |= ..[2].. << 12 */ - - MOV_L (REGOFF(16,ESI),EDX) /* glyphp[4] */ - MOV_L (REGOFF(20,ESI),ECX) /* glyphp[5] */ - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[4][line] */ - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[5][line] */ - SAL_L (CONST(24),EDX) /* glyphp[4][line] << 24 */ - OR_L (EAX,EBX) /* bits |= ..[3].. << 18 */ - SAL_L (CONST(30),ECX) /* glyphp[5][line] << 30 */ - OR_L (EDX,EBX) /* bits |= ..[4].. << 24 */ - -#ifndef MSBFIRST - MOV_L (REGOFF(20,ESI),EAX) /* glyphp[5] */ - OR_L (ECX,EBX) /* bits |= ..[5].. << 30 */ - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[5][line] */ - MOV_L (EBX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (CONST(0),EAX) - OR_L (ECX,EBX) /* bits |= ..[5].. << 30 */ - MOV_L (CONST(0),EDX) - MOV_B (BL,AL) - MOV_B (BH,DL) - MOV_B (REGOFF(BYTE_REVERSED,EAX),BL) - MOV_B (REGOFF(BYTE_REVERSED,EDX),BH) - ROL_L (CONST(16),EBX) - MOV_B (BL,AL) - MOV_B (BH,DL) - MOV_B (REGOFF(BYTE_REVERSED,EAX),BL) - MOV_B (REGOFF(BYTE_REVERSED,EDX),BH) - ROL_L (CONST(16),EBX) - MOV_L (REGOFF(20,ESI),EAX) /* glyphp[5] */ - MOV_L (EBX,REGIND(EDI)) - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[5][line] */ -#endif - - CMP_L (CONST(32),width_arg) - JG (.L6_2) -#ifndef FIXEDBASE - ADD_L (CONST(4),EDI) /* base++ */ -#endif - JMP (.L6_4) -.L6_2: - /* Note that glyphp[5][line] is already read again. */ - /* EAX = bits = glyphp[5][line] >> 2 */ - MOV_L (REGOFF(24,ESI),EDX) /* glyphp[6] */ - MOV_L (REGOFF(28,ESI),EBX) /* glyphp[7] */ - SHR_L (CONST(2),EAX) /* glyphp[5][line] >> 2 */ - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[6][line] */ - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[7][line] */ - MOV_L (REGOFF(32,ESI),ECX) /* glyphp[8] */ - SAL_L (CONST(4),EDX) /* glyphp[6][line] << 4 */ - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[8][line] */ - SAL_L (CONST(10),EBX) /* glyphp[7][line] << 10 */ - OR_L (EDX,EAX) /* bits |= ..[6].. << 4 */ - SAL_L (CONST(16),ECX) /* glyphp[8][line] << 16 */ - MOV_L (REGOFF(36,ESI),EDX) /* glyphp[9] */ - OR_L (EBX,EAX) /* bits |= ..[7].. << 10 */ - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[9][line] */ - OR_L (ECX,EAX) /* bits |= ..[8].. << 16 */ - MOV_L (REGOFF(40,ESI),EBX) /* glyphp[10] */ - SAL_L (CONST(22),EDX) /* glyphp[9][line] << 22 */ - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[10][line] */ - OR_L (EDX,EAX) /* bits |= ..[9].. << 22 */ - -#ifndef MSBFIRST - MOV_L (REGOFF(40,ESI),ECX) /* glyphp[10] */ - SAL_L (CONST(28),EBX) /* glyphp[10][line] << 28 */ - MOV_L (REGOFF(44,ESI),EDX) /* glyphp[11] */ - OR_L (EBX,EAX) /* bits |= ..[10].. << 28 */ - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[10][line] */ -#ifndef FIXEDBASE - MOV_L (EAX,REGOFF(4,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (EAX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[11][line] */ -#else - MOV_L (CONST(0),ECX) - SAL_L (CONST(28),EBX) /* glyphp[10][line] << 28 */ - MOV_L (CONST(0),EDX) - OR_L (EBX,EAX) /* bits |= ..[10].. << 28 */ - MOV_B (AL,CL) - MOV_B (AH,DL) - MOV_B (REGOFF(BYTE_REVERSED,ECX),AL) - MOV_B (REGOFF(BYTE_REVERSED,EDX),AH) - ROL_L (CONST(16),EAX) - MOV_B (AL,CL) - MOV_B (AH,DL) - MOV_B (REGOFF(BYTE_REVERSED,ECX),AL) - MOV_B (REGOFF(BYTE_REVERSED,EDX),AH) - MOV_L (REGOFF(40,ESI),ECX) /* glyphp[10] */ - ROL_L (CONST(16),EAX) - MOV_L (REGOFF(44,ESI),EDX) /* glyphp[11] */ -#ifndef FIXEDBASE - MOV_L (EAX,REGOFF(4,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (EAX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[10][line] */ - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[11][line] */ -#endif - - CMP_L (CONST(64),width_arg) - JG (.L6_3) -#ifndef FIXEDBASE - ADD_L (CONST(8),EDI) /* base+=2 */ -#endif - JMP (.L6_4) -.L6_3: - /* Note that glyphp[10][line] is read again. */ - /* EAX = bits = glyphp[10][line] >> 4 */ - SHR_L (CONST(4),ECX) /* glyphp[10][line] >> 4 */ - MOV_L (REGOFF(48,ESI),EBX) /* glyphp[12] */ - SAL_L (CONST(2),EDX) /* glyphp[11][line] << 2 */ - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[12][line] */ - OR_L (EDX,ECX) /* bits |= ..[11].. << 2 */ - MOV_L (REGOFF(52,ESI),EAX) /* glyphp[13] */ - SAL_L (CONST(8),EBX) /* glyphp[12][line] << 8 */ - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[13][line] */ - OR_L (EBX,ECX) /* bits |= ..[12].. << 8 */ - MOV_L (REGOFF(56,ESI),EDX) /* glyphp[14] */ - SAL_L (CONST(14),EAX) /* glyphp[13][line] << 14 */ - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[14][line] */ - OR_L (EAX,ECX) /* bits |= ..[13].. << 14 */ - MOV_L (REGOFF(60,ESI),EBX) /* glyphp[15] */ - SAL_L (CONST(20),EDX) /* glyphp[14][line] << 20 */ - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[15][line] */ - OR_L (EDX,ECX) /* bits |= ..[14].. << 20 */ - -#ifndef MSBFIRST - SAL_L (CONST(26),EBX) /* glyphp[15][line] << 26 */ - OR_L (EBX,ECX) /* bits |= ..[15].. << 26 */ -#ifndef FIXEDBASE - MOV_L (ECX,REGOFF(8,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (ECX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif -#else - MOV_L (CONST(0),EAX) - SAL_L (CONST(26),EBX) /* glyphp[15][line] << 26 */ - MOV_L (CONST(0),EDX) - OR_L (EBX,ECX) /* bits |= ..[15].. << 26 */ - MOV_B (CL,AL) - MOV_B (CH,DL) - MOV_B (REGOFF(BYTE_REVERSED,EAX),CL) - MOV_B (REGOFF(BYTE_REVERSED,EDX),CH) - ROL_L (CONST(16),ECX) - MOV_B (CL,AL) - MOV_B (CH,DL) - MOV_B (REGOFF(BYTE_REVERSED,EAX),CL) - MOV_B (REGOFF(BYTE_REVERSED,EDX),CH) - ROL_L (CONST(16),ECX) -#ifndef FIXEDBASE - MOV_L (ECX,REGOFF(8,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (ECX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif -#endif - -#ifndef FIXEDBASE - ADD_L (CONST(12),EDI) /* base += 3*/ -#endif - CMP_L (CONST(96),width_arg) - JLE (.L6_4) - ADD_L (CONST(64),ESI) /* glyphp += 16 */ - SUB_L (CONST(96),width_arg) - JMP (.L6_1) - -.L6_4: - -#ifndef FIXEDBASE - MOV_L (EDI,EAX) /* return base */ -#else - MOV_L (base_arg,EAX) /* return base */ -#endif - MOV_L (REGOFF(0,ESP),EDI) /* POPL EDI */ - MOV_L (REGOFF(4,ESP),ESI) /* POPL ESI */ - MOV_L (REGOFF(8,ESP),EBX) /* POPL EBX */ - MOV_L (REGOFF(12,ESP),EBP) /* POPL EBP */ - ADD_L (CONST(16),ESP) - RET - - - ALIGNTEXT4 - -#ifdef FIXEDBASE -# ifdef MSBFIRST - GLOBL GLNAME(DrawTETextScanlineWidth8PMSBFirstFixedBase) -GLNAME(DrawTETextScanlineWidth8PMSBFirstFixedBase): -# else - GLOBL GLNAME(DrawTETextScanlineWidth8PLSBFirstFixedBase) -GLNAME(DrawTETextScanlineWidth8PLSBFirstFixedBase): -# endif -#else -# ifdef MSBFIRST - GLOBL GLNAME(DrawTETextScanlineWidth8PMSBFirst) -GLNAME(DrawTETextScanlineWidth8PMSBFirst): -# else - GLOBL GLNAME(DrawTETextScanlineWidth8PLSBFirst) -GLNAME(DrawTETextScanlineWidth8PLSBFirst): -# endif -#endif - - SUB_L (CONST(16),ESP) - MOV_L (EBP,REGOFF(12,ESP)) /* PUSH EBP */ - MOV_L (EBX,REGOFF(8,ESP)) /* PUSH EBX */ - MOV_L (ESI,REGOFF(4,ESP)) /* PUSH ESI */ - MOV_L (EDI,REGOFF(0,ESP)) /* PUSH EDI */ - - MOV_L (line_arg,EBP) - MOV_L (base_arg,EDI) - MOV_L (glyphp_arg,ESI) - - ALIGNTEXT4 - -.L8_1: - /* Pentium-optimized instruction pairing. */ - /* EBX = bits */ - MOV_L (REGIND(ESI),EAX) /* glyphp[0] */ - MOV_L (REGOFF(4,ESI),EDX) /* glyphp[1] */ - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[0][line] */ - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[1][line] */ -#ifdef MSBFIRST - MOV_B (REGOFF(BYTE_REVERSED,EAX),BL) - MOV_B (REGOFF(BYTE_REVERSED,EDX),BH) -#else - MOV_L (EAX,EBX) /* bits = glyph[0][line] */ - MOV_B (DL,BH) /* bits |= ..[1].. << 8 */ -#endif - - ROL_L (CONST(16),EBX) - MOV_L (REGOFF(8,ESI),EAX) /* glyphp[2] */ - MOV_L (REGOFF(12,ESI),ECX) /* glyphp[3] */ - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[2][line] */ - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[3][line] */ -#ifdef MSBFIRST - MOV_B (REGOFF(BYTE_REVERSED,EAX),BL) - MOV_B (REGOFF(BYTE_REVERSED,ECX),BH) -#else - MOV_B (AL,BL) /* bits |= ..[2].. << 16 */ - MOV_B (CL,BH) /* bits |= ..[3].. << 24 */ -#endif - ROL_L (CONST(16),EBX) - MOV_L (EBX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ - CMP_L (CONST(32),width_arg) -#ifndef FIXEDBASE - JLE (.L8_2) -#else - JLE (.L8_3) -#endif - - MOV_L (REGOFF(16,ESI),EAX) /* glyphp[4] */ - MOV_L (REGOFF(20,ESI),EDX) /* glyphp[5] */ - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[4][line] */ - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[5][line] */ -#ifdef MSBFIRST - MOV_B (REGOFF(BYTE_REVERSED,EAX),BL) - MOV_B (REGOFF(BYTE_REVERSED,EDX),BH) -#else - MOV_L (EAX,EBX) /* bits = glyph[4][line] */ - MOV_B (DL,BH) /* nits |= ..[5].. << 8 */ -#endif - - ROL_L (CONST(16),EBX) - MOV_L (REGOFF(24,ESI),EAX) /* glyphp[6] */ - MOV_L (REGOFF(28,ESI),ECX) /* glyphp[7] */ - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[6][line] */ - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[7][line] */ -#ifdef MSBFIRST - MOV_B (REGOFF(BYTE_REVERSED,EAX),BL) - MOV_B (REGOFF(BYTE_REVERSED,ECX),BH) -#else - MOV_B (AL,BL) /* bits |= ..[6].. << 16 */ - MOV_B (CL,BH) /* bits |= ..[7].. << 24 */ -#endif - ROL_L (CONST(16),EBX) -#ifndef FIXEDBASE - MOV_L (EAX,REGOFF(4,EDI)) /* WRITE_IN_BIT_ORDER(base+1, bits) */ - ADD_L (CONST(8),EDI) /* base += 2 */ -#else - MOV_L (EAX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif - CMP_L (CONST(64),width_arg) - JLE (.L8_3) - ADD_L (CONST(32),ESI) /* glyphp += 8 */ - SUB_L (CONST(64),width_arg) - JMP (.L8_1) - -#ifndef FIXEDBASE -.L8_2: - ADD_L (CONST(4),EDI) /* base++ */ -.L8_3: - MOV_L (EDI,EAX) /* return base */ -#else -.L8_3: - MOV_L (base_arg,EAX) /* return base */ -#endif - MOV_L (REGOFF(0,ESP),EDI) /* POPL EDI */ - MOV_L (REGOFF(4,ESP),ESI) /* POPL ESI */ - MOV_L (REGOFF(8,ESP),EBX) /* POPL EBX */ - MOV_L (REGOFF(12,ESP),EBP) /* POPL EBP */ - ADD_L (CONST(16),ESP) - RET - - ALIGNTEXT4 - -#ifdef FIXEDBASE -# ifdef MSBFIRST - GLOBL GLNAME(DrawTETextScanlineWidth9PMSBFirstFixedBase) -GLNAME(DrawTETextScanlineWidth9PMSBFirstFixedBase): -# else - GLOBL GLNAME(DrawTETextScanlineWidth9PLSBFirstFixedBase) -GLNAME(DrawTETextScanlineWidth9PLSBFirstFixedBase): -# endif -#else -# ifdef MSBFIRST - GLOBL GLNAME(DrawTETextScanlineWidth9PMSBFirst) -GLNAME(DrawTETextScanlineWidth9PMSBFirst): -# else - GLOBL GLNAME(DrawTETextScanlineWidth9PLSBFirst) -GLNAME(DrawTETextScanlineWidth9PLSBFirst): -# endif -#endif - - SUB_L (CONST(16),ESP) - MOV_L (EBP,REGOFF(12,ESP)) /* PUSH EBP */ - MOV_L (EBX,REGOFF(8,ESP)) /* PUSH EBX */ - MOV_L (ESI,REGOFF(4,ESP)) /* PUSH ESI */ - MOV_L (EDI,REGOFF(0,ESP)) /* PUSH EDI */ - - MOV_L (line_arg,EBP) - MOV_L (base_arg,EDI) - MOV_L (glyphp_arg,ESI) - - ALIGNTEXT4 - -.L9_1: - /* Pentium-optimized instruction pairing. */ - /* EAX = bits */ - MOV_L (REGOFF(4,ESI),EBX) /* glyphp[1] */ - MOV_L (REGIND(ESI),EAX) /* glyphp[0] */ - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[1][line] */ - MOV_L (REGOFF(8,ESI),ECX) /* glyphp[2] */ - SAL_L (CONST(9),EBX) /* glyphp[1][line] << 9 */ - MOV_L (REGOFF(12,ESI),EDX) /* glyphp[3] */ - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[0][line] */ - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[3][line] */ - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[2][line] */ - OR_L (EBX,EAX) /* bits |= ..[1].. << 9 */ - SAL_L (CONST(18),ECX) /* glyphp[2][line] << 18 */ - OR_L (ECX,EAX) /* bits |= ..[2].. << 18 */ - SAL_L (CONST(27),EDX) /* glyphp[3][line << 27 */ - -#ifndef MSBFIRST - MOV_L (REGOFF(12,ESI),EBX) /* glyphp[3] */ - OR_L (EDX,EAX) /* bits |= ..[3].. << 27 */ - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[3][line] */ - MOV_L (EAX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (CONST(0),EBX) - OR_L (EDX,EAX) /* bits |= ..[3].. << 27 */ - MOV_L (CONST(0),ECX) - MOV_B (AL,BL) - MOV_B (AH,CL) - MOV_B (REGOFF(BYTE_REVERSED,EBX),AL) - MOV_B (REGOFF(BYTE_REVERSED,ECX),AH) - ROL_L (CONST(16),EAX) - MOV_B (AL,BL) - MOV_B (AH,CL) - MOV_B (REGOFF(BYTE_REVERSED,EBX),AL) - MOV_B (REGOFF(BYTE_REVERSED,ECX),AH) - MOV_L (REGOFF(12,ESI),EBX) /* glyphp[3] */ - ROL_L (CONST(16),EAX) - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[3][line] */ - MOV_L (EAX,REGIND(EDI)) -#endif - - CMP_L (CONST(32),width_arg) - JG (.L9_2) -#ifndef FIXEDBASE - ADD_L (CONST(4),EDI) /* base++ */ -#endif - JMP (.L9_11) -.L9_2: - /* Note that glyphp[3][line] is read again. */ - /* EAX = bits, EBX = glyphp[3][line] >> 5 */ - SHR_L (CONST(5),EBX) /* glyphp[3][line] >> 5 */ - MOV_L (REGOFF(16,ESI),EAX) /* glyphp[4] */ - MOV_L (REGOFF(20,ESI),ECX) /* glyphp[5] */ - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[4][line] */ - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[5][line] */ - MOV_L (REGOFF(24,ESI),EDX) /* glyphp[6] */ - SAL_L (CONST(4),EAX) /* glyphp[4][line] << 4 */ - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[6][line] */ - SAL_L (CONST(13),ECX) /* glyphp[5][line] << 13 */ - OR_L (EBX,EAX) /* bits |= ..[4].. << 4 */ - SAL_L (CONST(22),EDX) /* glyphp[6][line] << 22 */ - MOV_L (REGOFF(28,ESI),EBX) /* glyphp[7] */ - OR_L (ECX,EAX) /* bits |= ..[5].. << 13 */ - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[7][line] */ - OR_L (EDX,EAX) /* bits |= ..[6].. << 22 */ - -#ifndef MSBFIRST - MOV_L (REGOFF(28,ESI),ECX) /* glyphp[7] */ - SAL_L (CONST(31),EBX) /* glyphp[7][line] << 31 */ - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[7][line] */ - OR_L (EBX,EAX) /* bits |= ..[7].. << 31 */ - MOV_L (REGOFF(32,ESI),EDX) /* glyphp[8] */ -#ifndef FIXEDBASE - MOV_L (EAX,REGOFF(4,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (EAX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif -#else - MOV_L (CONST(0),ECX) - SAL_L (CONST(31),EBX) /* glyphp[7][line] << 31 */ - MOV_L (CONST(0),EDX) - OR_L (EBX,EAX) /* bits |= ..[7].. << 31 */ - MOV_B (AL,CL) - MOV_B (AH,DL) - MOV_B (REGOFF(BYTE_REVERSED,ECX),AL) - MOV_B (REGOFF(BYTE_REVERSED,EDX),AH) - ROL_L (CONST(16),EAX) - MOV_B (AL,CL) - MOV_B (AH,DL) - MOV_B (REGOFF(BYTE_REVERSED,ECX),AL) - MOV_B (REGOFF(BYTE_REVERSED,EDX),AH) - MOV_L (REGOFF(28,ESI),ECX) /* glyphp[7] */ - ROL_L (CONST(16),EAX) - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[7][line] */ -#ifndef FIXEDBASE - MOV_L (EAX,REGOFF(4,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (EAX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif - MOV_L (REGOFF(32,ESI),EDX) /* glyphp[8] */ -#endif - - CMP_L (CONST(64),width_arg) - JG (.L9_3) -#ifndef FIXEDBASE - ADD_L (CONST(8),EDI) /* base+=2 */ -#endif - JMP (.L9_11) -.L9_3: - - /* Note that glyphp[7][line] is read again. */ - /* ECX = bits = glyphp[7][line] >> 1 */ - SHR_L (CONST(1),ECX) /* glyphp[7][line] >> 1 */ - MOV_L (REGOFF(36,ESI),EBX) /* glyphp[9] */ - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[8][line] */ - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[9][line] */ - SAL_L (CONST(8),EDX) /* glyphp[8][line] << 8 */ - MOV_L (REGOFF(40,ESI),EAX) /* glyphp[10] */ - SAL_L (CONST(17),EBX) /* glyphp[9][line] << 17 */ - OR_L (EDX,ECX) /* bits |= ..[8].. << 8 */ - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[10][line] */ - OR_L (EBX,ECX) /* bits |= ..[9].. << 17 */ - SAL_L (CONST(26),EAX) /* glyphp[10][line] << 26 */ - -#ifndef MSBFIRST - MOV_L (REGOFF(40,ESI),EDX) /* glyphp[10] */ - OR_L (EAX,ECX) /* bits |= ..[10].. << 26 */ - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[10][line] */ -#ifndef FIXEDBASE - MOV_L (ECX,REGOFF(8,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (ECX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif -#else - MOV_L (CONST(0),EDX) - OR_L (EAX,ECX) /* bits |= ..[10].. << 26 */ - MOV_L (CONST(0),EBX) - MOV_B (CL,DL) - MOV_B (CH,BL) - MOV_B (REGOFF(BYTE_REVERSED,EDX),CL) - MOV_B (REGOFF(BYTE_REVERSED,EBX),CH) - ROL_L (CONST(16),ECX) - MOV_B (CL,DL) - MOV_B (CH,BL) - MOV_B (REGOFF(BYTE_REVERSED,EDX),CL) - MOV_B (REGOFF(BYTE_REVERSED,EBX),CH) - MOV_L (REGOFF(40,ESI),EDX) /* glyphp[10] */ - ROL_L (CONST(16),ECX) - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[10][line] */ -#ifndef FIXEDBASE - MOV_L (ECX,REGOFF(8,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (ECX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif -#endif - - CMP_L (CONST(96),width_arg) - JG (.L9_4) -#ifndef FIXEDBASE - ADD_L (CONST(12),EDI) /* base+=3 */ -#endif - JMP (.L9_11) -.L9_4: - /* Note that glyphp[10][line] is read again. */ - /* EDX = bits = glyphp[10][line] >> 6 */ - SHR_L (CONST(6),EDX) /* glyphp[10][line] >> 6 */ - MOV_L (REGOFF(44,ESI),EBX) /* glyphp[11] */ - MOV_L (REGOFF(48,ESI),EAX) /* glyphp[12] */ - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[11][line] */ - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[12][line] */ - MOV_L (REGOFF(52,ESI),ECX) /* glyphp[13] */ - SAL_L (CONST(3),EBX) /* glyphp[11][line] << 3 */ - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[13][line] */ - SAL_L (CONST(12),EAX) /* glyphp[12][line] << 12 */ - OR_L (EBX,EDX) /* bits |= ..[11].. << 3 */ - SAL_L (CONST(21),ECX) /* glyphp[13][line] << 21 */ - MOV_L (REGOFF(56,ESI),EBX) /* glyphp[14] */ - OR_L (EAX,EDX) /* bits |= ..[12].. << 17 */ - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[14][line] */ - SAL_L (CONST(30),EBX) /* glyphp[14][line] << 30 */ - OR_L (ECX,EDX) /* bits |= ..[13].. << 21 */ - -#ifndef MSBFIRST - MOV_L (REGOFF(56,ESI),EAX) /* glyphp[14] */ - OR_L (EBX,EDX) /* bits |= ..[14].. << 30 */ - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[14][line] */ -#ifndef FIXEDBASE - MOV_L (EDX,REGOFF(12,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (EDX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif -#else - MOV_L (CONST(0),EAX) - OR_L (EBX,EDX) /* bits |= ..[14].. << 30 */ - MOV_L (CONST(0),ECX) - MOV_B (DL,AL) - MOV_B (DH,CL) - MOV_B (REGOFF(BYTE_REVERSED,EAX),DL) - MOV_B (REGOFF(BYTE_REVERSED,ECX),DH) - ROL_L (CONST(16),EDX) - MOV_B (DL,AL) - MOV_B (DH,CL) - MOV_B (REGOFF(BYTE_REVERSED,EAX),DL) - MOV_B (REGOFF(BYTE_REVERSED,ECX),DH) - MOV_L (REGOFF(56,ESI),EAX) /* glyphp[14] */ - ROL_L (CONST(16),EDX) - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[14][line] */ -#ifndef FIXEDBASE - MOV_L (EDX,REGOFF(12,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (EDX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif -#endif - - CMP_L (CONST(128),width_arg) - JG (.L9_5) -#ifndef FIXEDBASE - ADD_L (CONST(16),EDI) /* base+=4 */ -#endif - JMP (.L9_11) -.L9_5: - /* Note that glyphp[14][line] is read again. */ - /* EAX = bits = glyphp[14][line] >> 2 */ - SHR_L (CONST(2),EAX) /* glyphp[14][line] >> 2 */ - MOV_L (REGOFF(60,ESI),ECX) /* glyphp[15] */ - MOV_L (REGOFF(64,ESI),EBX) /* glyphp[16] */ - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[15][line] */ - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[16][line] */ - MOV_L (REGOFF(68,ESI),EDX) /* glyphp[17] */ - SAL_L (CONST(7),ECX) /* glyphp[15][line] << 7 */ - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[17][line] */ - SAL_L (CONST(16),EBX) /* glyphp[16][line] << 16 */ - OR_L (ECX,EAX) /* bits |= ..[15].. << 7 */ - SAL_L (CONST(25),EDX) /* glyphp[17][line] << 25 */ - OR_L (EBX,EAX) /* bits |= ..[16].. << 16 */ - -#ifndef MSBFIRST - MOV_L (REGOFF(68,ESI),ECX) /* glyphp[17] */ - OR_L (EDX,EAX) /* bits |= ..[17].. << 25 */ - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[17][line] */ -#ifndef FIXEDBASE - MOV_L (EAX,REGOFF(16,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (EAX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif -#else - MOV_L (CONST(0),ECX) - OR_L (EDX,EAX) /* bits |= ..[17].. << 25 */ - MOV_L (CONST(0),EBX) - MOV_B (AL,CL) - MOV_B (AH,BL) - MOV_B (REGOFF(BYTE_REVERSED,ECX),AL) - MOV_B (REGOFF(BYTE_REVERSED,EBX),AH) - ROL_L (CONST(16),EAX) - MOV_B (AL,CL) - MOV_B (AH,BL) - MOV_B (REGOFF(BYTE_REVERSED,ECX),AL) - MOV_B (REGOFF(BYTE_REVERSED,EBX),AH) - MOV_L (REGOFF(68,ESI),ECX) /* glyphp[17] */ - ROL_L (CONST(16),EAX) - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[17][line] */ -#ifndef FIXEDBASE - MOV_L (EAX,REGOFF(16,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (EAX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif -#endif - - CMP_L (CONST(160),width_arg) - JG (.L9_6) -#ifndef FIXEDBASE - ADD_L (CONST(20),EDI) /* base+=5 */ -#endif - JMP (.L9_11) -.L9_6: - /* Note that glyphp[17][line] is read again. */ - /* ECX = bits = glyphp[17][line] >> 7 */ - SHR_L (CONST(7),ECX) /* glyphp[17][line] >> 7 */ - MOV_L (REGOFF(72,ESI),EBX) /* glyphp[18] */ - MOV_L (REGOFF(76,ESI),EAX) /* glyphp[19] */ - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[18][line] */ - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[19][line] */ - MOV_L (REGOFF(80,ESI),EDX) /* glyphp[20] */ - SAL_L (CONST(2),EBX) /* glyphp[18][line] << 2 */ - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[20][line] */ - SAL_L (CONST(11),EAX) /* glyphp[19][line] << 11 */ - OR_L (EBX,ECX) /* bits |= ..[18].. << 2 */ - SAL_L (CONST(20),EDX) /* glyphp[20][line] << 20 */ - MOV_L (REGOFF(84,ESI),EBX) /* glyphp[21] */ - OR_L (EAX,ECX) /* bits |= ..[19].. << 11 */ - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[21][line] */ - OR_L (EDX,ECX) /* bits |= ..[20].. << 20 */ - -#ifndef MSBFIRST - MOV_L (REGOFF(84,ESI),EAX) /* glyphp[21] */ - SAL_L (CONST(29),EBX) /* glyphp[21][line] << 29 */ - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[21][line] */ - OR_L (EBX,ECX) /* bits |= ..[14].. << 30 */ - MOV_L (REGOFF(88,ESI),EDX) /* glyphp[22] */ -#ifndef FIXEDBASE - MOV_L (ECX,REGOFF(20,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (ECX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif -#else - MOV_L (CONST(0),EAX) - SAL_L (CONST(29),EBX) /* glyphp[21][line] << 29 */ - MOV_L (CONST(0),EDX) - OR_L (EBX,ECX) /* bits |= ..[14].. << 30 */ - MOV_B (CL,AL) - MOV_B (CH,DL) - MOV_B (REGOFF(BYTE_REVERSED,EAX),CL) - MOV_B (REGOFF(BYTE_REVERSED,EDX),CH) - ROL_L (CONST(16),ECX) - MOV_B (CL,AL) - MOV_B (CH,DL) - MOV_B (REGOFF(BYTE_REVERSED,EAX),CL) - MOV_B (REGOFF(BYTE_REVERSED,EDX),CH) - MOV_L (REGOFF(84,ESI),EAX) /* glyphp[21] */ - ROL_L (CONST(16),ECX) - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[21][line] */ -#ifndef FIXEDBASE - MOV_L (ECX,REGOFF(20,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (ECX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif - MOV_L (REGOFF(88,ESI),EDX) /* glyphp[22] */ -#endif - - CMP_L (CONST(192),width_arg) - JG (.L9_7) -#ifndef FIXEDBASE - ADD_L (CONST(24),EDI) /* base+=6 */ -#endif - JMP (.L9_11) -.L9_7: - /* Note that glyphp[21][line] is read again. */ - /* EAX = bits = glyphp[21][line] >> 3 */ - SHR_L (CONST(3),EAX) /* glyphp[21][line] >> 3 */ - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[22][line] */ - MOV_L (REGOFF(92,ESI),EBX) /* glyphp[23] */ - MOV_L (REGOFF(96,ESI),ECX) /* glyphp[24] */ - SAL_L (CONST(6),EDX) /* glyphp[22][line] << 6 */ - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[23][line] */ - OR_L (EDX,EAX) /* bits |= ..[22].. << 6 */ - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[24][line] */ - SAL_L (CONST(15),EBX) /* glyphp[23][line] << 15 */ - OR_L (EBX,EAX) /* bits |= ..[23].. << 15 */ - SAL_L (CONST(24),ECX) /* glyphp[24][line] << 24 */ - -#ifndef MSBFIRST - MOV_L (REGOFF(96,ESI),EDX) /* glyphp[24] */ - OR_L (ECX,EAX) /* bits |= ..[24].. << 24 */ - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[24][line] */ -#ifndef FIXEDBASE - MOV_L (EAX,REGOFF(24,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (EAX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif -#else - MOV_L (CONST(0),EDX) - OR_L (ECX,EAX) /* bits |= ..[24].. << 24 */ - MOV_L (CONST(0),EBX) - MOV_B (AL,DL) - MOV_B (AH,BL) - MOV_B (REGOFF(BYTE_REVERSED,EDX),AL) - MOV_B (REGOFF(BYTE_REVERSED,EBX),AH) - ROL_L (CONST(16),EAX) - MOV_B (AL,DL) - MOV_B (AH,BL) - MOV_B (REGOFF(BYTE_REVERSED,EDX),AL) - MOV_B (REGOFF(BYTE_REVERSED,EBX),AH) - MOV_L (REGOFF(96,ESI),EDX) /* glyphp[24] */ - ROL_L (CONST(16),EAX) - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[24][line] */ -#ifndef FIXEDBASE - MOV_L (EAX,REGOFF(24,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (EAX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif -#endif - - CMP_L (CONST(224),width_arg) - JG (.L9_8) -#ifndef FIXEDBASE - ADD_L (CONST(28),EDI) /* base+=7 */ -#endif - JMP (.L9_11) -.L9_8: - /* Note that glyphp[24][line] is read again. */ - /* EDX = bits = glyphp[24][line] >> 8 */ - - SHR_L (CONST(8),EDX) /* glyphp[24][line] >> 8 */ - MOV_L (REGOFF(100,ESI),EAX) /* glyphp[25] */ - MOV_L (REGOFF(104,ESI),EBX) /* glyphp[26] */ - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[25][line] */ - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[26][line] */ - MOV_L (REGOFF(108,ESI),ECX) /* glyphp[27] */ - SAL_L (CONST(1),EAX) /* glyphp[25][line] << 1 */ - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[27][line] */ - SAL_L (CONST(10),EBX) /* glyphp[26][line] << 10 */ - OR_L (EAX,EDX) /* bits |= ..[25].. << 1 */ - SAL_L (CONST(19),ECX) /* glyphp[27][line] << 19 */ - OR_L (EBX,EDX) /* bits |= ..[26].. << 10 */ - MOV_L (REGOFF(112,ESI),EAX) /* glyphp[28] */ - OR_L (ECX,EDX) /* bits |= ..[27].. << 19 */ - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[28][line] */ - -#ifndef MSBFIRST - MOV_L (REGOFF(112,ESI),EBX) /* glyphp[28] */ - SAL_L (CONST(28),EAX) /* glyphp[28][line] << 28 */ - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[28][line] */ - OR_L (EAX,EDX) /* bits |= ..[28].. << 28 */ - MOV_L (REGOFF(116,ESI),ECX) /* glyphp[29] */ -#ifndef FIXEDBASE - MOV_L (EDX,REGOFF(28,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (EDX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif -#else - MOV_L (CONST(0),EBX) - SAL_L (CONST(28),EAX) /* glyphp[28][line] << 28 */ - MOV_L (CONST(0),ECX) - OR_L (EAX,EDX) /* bits |= ..[28].. << 28 */ - MOV_B (DL,BL) - MOV_B (DH,CL) - MOV_B (REGOFF(BYTE_REVERSED,EBX),DL) - MOV_B (REGOFF(BYTE_REVERSED,ECX),DH) - ROL_L (CONST(16),EDX) - MOV_B (DL,BL) - MOV_B (DH,CL) - MOV_B (REGOFF(BYTE_REVERSED,EBX),DL) - MOV_B (REGOFF(BYTE_REVERSED,ECX),DH) - MOV_L (REGOFF(112,ESI),EBX) /* glyphp[28] */ - ROL_L (CONST(16),EDX) - MOV_L (REGOFF(116,ESI),ECX) /* glyphp[29] */ -#ifndef FIXEDBASE - MOV_L (EDX,REGOFF(28,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (EDX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif - MOV_L (REGBISD(EBX,EBP,4,0),EBX) /* glyphp[28][line] */ -#endif - - CMP_L (CONST(256),width_arg) - JG (.L9_9) -#ifndef FIXEDBASE - ADD_L (CONST(32),EDI) /* base+=8 */ -#endif - JMP (.L9_11) -.L9_9: - /* Note that glyphp[28][line] is read again. */ - /* EBX = bits = glyphp[28][line] >> 4 */ - SHR_L (CONST(4),EBX) /* glyphp[28][line] >> 4 */ - MOV_L (REGBISD(ECX,EBP,4,0),ECX) /* glyphp[29][line] */ - MOV_L (REGOFF(120,ESI),EAX) /* glyphp[30] */ - MOV_L (REGOFF(124,ESI),EDX) /* glyphp[31] */ - SAL_L (CONST(5),ECX) /* glyphp[29][line] << 5 */ - MOV_L (REGBISD(EAX,EBP,4,0),EAX) /* glyphp[30][line] */ - OR_L (ECX,EBX) /* bits |= ..[29].. << 5 */ - MOV_L (REGBISD(EDX,EBP,4,0),EDX) /* glyphp[31][line] */ - SAL_L (CONST(14),EAX) /* glyphp[30][line] << 14 */ - ADD_L (CONST(128),ESI) /* glyphp+=32 */ - SAL_L (CONST(23),EDX) /* glyphp[31][line] << 23 */ - OR_L (EAX,EBX) /* bits |= ..[30].. << 14 */ - SUB_L (CONST(288),width_arg) /* width-=288 */ - OR_L (EDX,EBX) /* bits |= ..[31].. << 23 */ - -#ifndef MSBFIRST -#ifndef FIXEDBASE - MOV_L (EBX,REGOFF(32,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (EBX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif -#else - MOV_L (CONST(0),ECX) - MOV_L (CONST(0),EAX) - MOV_B (BL,CL) - MOV_B (BH,AL) - MOV_B (REGOFF(BYTE_REVERSED,ECX),BL) - MOV_B (REGOFF(BYTE_REVERSED,EAX),BH) - ROL_L (CONST(16),EBX) - MOV_B (BL,CL) - MOV_B (BH,AL) - MOV_B (REGOFF(BYTE_REVERSED,ECX),BL) - MOV_B (REGOFF(BYTE_REVERSED,EAX),BH) - ROL_L (CONST(16),EBX) -#ifndef FIXEDBASE - MOV_L (EBX,REGOFF(32,EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#else - MOV_L (EBX,REGIND(EDI)) /* WRITE_IN_BIT_ORDER(base, bits) */ -#endif -#endif - - ADD_L (CONST(36),EDI) /* base+=9 */ - CMP_L (CONST(0),width_arg) - JG (.L9_1) - -.L9_11: -#ifndef FIXEDBASE - MOV_L (EDI,EAX) /* return base */ -#else - MOV_L (base_arg,EAX) /* return base */ -#endif - MOV_L (REGOFF(0,ESP),EDI) /* POPL EDI */ - MOV_L (REGOFF(4,ESP),ESI) /* POPL ESI */ - MOV_L (REGOFF(8,ESP),EBX) /* POPL EBX */ - MOV_L (REGOFF(12,ESP),EBP) /* POPL EBP */ - ADD_L (CONST(16),ESP) - RET diff --git a/xorg-server/hw/xfree86/xaa/xaaWrapper.c b/xorg-server/hw/xfree86/xaa/xaaWrapper.c index 5d6ea05cf..88418946f 100644 --- a/xorg-server/hw/xfree86/xaa/xaaWrapper.c +++ b/xorg-server/hw/xfree86/xaa/xaaWrapper.c @@ -129,8 +129,10 @@ typedef struct _xaaWrapperGCPriv { #define xaaWrapperGCPriv(pGC) xaaWrapperGCPrivPtr pGCPriv = xaaWrapperGetGCPriv(pGC) -static DevPrivateKey xaaWrapperScrPrivateKey = &xaaWrapperScrPrivateKey; -static DevPrivateKey xaaWrapperGCPrivateKey = &xaaWrapperGCPrivateKey; +static int xaaWrapperScrPrivateKeyIndex; +static DevPrivateKey xaaWrapperScrPrivateKey = &xaaWrapperScrPrivateKeyIndex; +static int xaaWrapperGCPrivateKeyIndex; +static DevPrivateKey xaaWrapperGCPrivateKey = &xaaWrapperGCPrivateKeyIndex; static Bool xaaWrapperCreateScreenResources(ScreenPtr pScreen) diff --git a/xorg-server/hw/xfree86/xaa/xaalocal.h b/xorg-server/hw/xfree86/xaa/xaalocal.h index e25b9df52..69a59050c 100644 --- a/xorg-server/hw/xfree86/xaa/xaalocal.h +++ b/xorg-server/hw/xfree86/xaa/xaalocal.h @@ -1051,6 +1051,10 @@ StippleScanlineProcPtr *XAAGetStippleScanlineFuncMSBFirstFixedBase(void); StippleScanlineProcPtr *XAAGetStippleScanlineFuncMSBFirst(void); StippleScanlineProcPtr *XAAGetStippleScanlineFuncLSBFirstFixedBase(void); StippleScanlineProcPtr *XAAGetStippleScanlineFuncLSBFirst(void); +StippleScanlineProcPtr *XAAGetStippleScanlineFunc3MSBFirstFixedBase(void); +StippleScanlineProcPtr *XAAGetStippleScanlineFunc3MSBFirst(void); +StippleScanlineProcPtr *XAAGetStippleScanlineFunc3LSBFirstFixedBase(void); +StippleScanlineProcPtr *XAAGetStippleScanlineFunc3LSBFirst(void); int XAAPolyText8TEColorExpansion( diff --git a/xorg-server/hw/xfree86/xaa/xaawrap.h b/xorg-server/hw/xfree86/xaa/xaawrap.h index 38c97d70b..857dbc3ed 100644 --- a/xorg-server/hw/xfree86/xaa/xaawrap.h +++ b/xorg-server/hw/xfree86/xaa/xaawrap.h @@ -48,8 +48,8 @@ XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDraw));\ GCFuncs *oldFuncs = pGC->funcs;\ pGC->funcs = pGCPriv->wrapFuncs;\ - pGC->ops = pGCPriv->wrapOps - + pGC->ops = pGCPriv->wrapOps; \ + SYNC_CHECK(pGC) #define XAA_PIXMAP_OP_EPILOGUE(pGC)\ pGCPriv->wrapOps = pGC->ops;\ diff --git a/xorg-server/hw/xfree86/xf1bpp/Makefile.am b/xorg-server/hw/xfree86/xf1bpp/Makefile.am deleted file mode 100644 index c724f760f..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/Makefile.am +++ /dev/null @@ -1,178 +0,0 @@ -module_LTLIBRARIES = libxf1bpp.la - -sdk_HEADERS = xf1bpp.h mfbmap.h mfbunmap.h - -libxf1bpp_la_LDFLAGS = -avoid-version - -libxf1bppgen_a_SOURCES = \ - mfbseg.c \ - mfbpgbwht.c \ - mfbpgbblak.c \ - mfbpgbinv.c \ - mfbigbwht.c \ - mfbigbblak.c \ - mfbpawhite.c \ - mfbpablack.c \ - mfbpainv.c \ - mfbtewhite.c \ - mfbteblack.c \ - mfbplywhite.c \ - mfbplyblack.c \ - mfbplyinv.c \ - mfbbltC.c \ - mfbbltX.c \ - mfbbltCI.c \ - mfbbltO.c \ - mfbbltG.c \ - mfbtileC.c \ - mfbtileG.c - -libxf1bppmfb_a_SOURCES = \ - maskbits.c \ - mfbbitblt.c \ - mfbbres.c \ - mfbbresd.c \ - mfbclip.c \ - mfbcmap.c \ - mfbfillarc.c \ - mfbfillrct.c \ - mfbfillsp.c \ - mfbfont.c \ - mfbgc.c \ - mfbgetsp.c \ - mfbhrzvert.c \ - mfbimage.c \ - mfbline.c \ - mfbmisc.c \ - mfbpixmap.c \ - mfbpolypnt.c \ - mfbpushpxl.c \ - mfbscrclse.c \ - mfbscrinit.c \ - mfbsetsp.c \ - mfbwindow.c \ - mfbzerarc.c - -BUILT_SOURCES = $(libxf1bppmfb_a_SOURCES) $(libxf1bppgen_a_SOURCES) - -libxf1bpp_la_SOURCES = $(libxf1bppmfb_a_SOURCES) $(libxf1bppgen_a_SOURCES) \ - mfbmodule.c - -AM_CFLAGS = -DXF86MONO $(DIX_CFLAGS) $(XORG_CFLAGS) -INCLUDES = $(XORG_INCS) -I$(top_srcdir)/mfb - -mfbseg.c: - echo "#define POLYSEGMENT" > $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbline.c\"" >> $@ -mfbpgbwht.c: - echo "#define MFBPOLYGLYPHBLT xf1bppPolyGlyphBltWhite" > $@ - echo "#define OPEQ |=" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbplygblt.c\"" >> $@ -mfbpgbblak.c: - echo "#define MFBPOLYGLYPHBLT xf1bppPolyGlyphBltBlack" > $@ - echo "#define OPEQ &=~" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbplygblt.c\"" >> $@ -mfbpgbinv.c: - echo "#define MFBPOLYGLYPHBLT xf1bppPolyGlyphBltInvert" > $@ - echo "#define OPEQ ^=" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbplygblt.c\"" >> $@ -mfbigbwht.c: - echo "#define MFBIMAGEGLYPHBLT xf1bppImageGlyphBltWhite" > $@ - echo "#define OPEQ |=" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbimggblt.c\"" >> $@ -mfbigbblak.c: - echo "#define MFBIMAGEGLYPHBLT xf1bppImageGlyphBltBlack" > $@ - echo "#define OPEQ &=~" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbimggblt.c\"" >> $@ -mfbpawhite.c: - echo "#define MFBSOLIDFILLAREA xf1bppSolidWhiteArea" > $@ - echo "#define MFBSTIPPLEFILLAREA xf1bppStippleWhiteArea" >> $@ - echo "#define OPEQ |=" >> $@ - echo "#define EQWHOLEWORD =~0" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbpntarea.c\"" >> $@ -mfbpablack.c: - echo "#define MFBSOLIDFILLAREA xf1bppSolidBlackArea" > $@ - echo "#define MFBSTIPPLEFILLAREA xf1bppStippleBlackArea" >> $@ - echo "#define OPEQ &=~" >> $@ - echo "#define EQWHOLEWORD =0" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbpntarea.c\"" >> $@ -mfbpainv.c: - echo "#define MFBSOLIDFILLAREA xf1bppSolidInvertArea" > $@ - echo "#define MFBSTIPPLEFILLAREA xf1bppStippleInvertArea" >> $@ - echo "#define OPEQ ^=" >> $@ - echo "#define EQWHOLEWORD ^=~0" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbpntarea.c\"" >> $@ -mfbtewhite.c: - echo "#define OP" > $@ - echo "#define CLIPTETEXT xf1bppImageGlyphBltWhite" >> $@ - echo "#define MFBTEGLYPHBLT xf1bppTEGlyphBltWhite" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbtegblt.c\"" >> $@ -mfbteblack.c: - echo "#define OP ~" > $@ - echo "#define CLIPTETEXT xf1bppImageGlyphBltBlack" >> $@ - echo "#define MFBTEGLYPHBLT xf1bppTEGlyphBltBlack" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbtegblt.c\"" >> $@ -mfbplywhite.c: - echo "#define MFBFILLPOLY1RECT xf1bppFillPolyWhite" > $@ - echo "#define OPEQ |=" >> $@ - echo "#define EQWHOLEWORD =~0" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbply1rct.c\"" >> $@ -mfbplyblack.c: - echo "#define MFBFILLPOLY1RECT xf1bppFillPolyBlack" > $@ - echo "#define OPEQ &=~" >> $@ - echo "#define EQWHOLEWORD =0" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbply1rct.c\"" >> $@ -mfbplyinv.c: - echo "#define MFBFILLPOLY1RECT xf1bppFillPolyInvert" > $@ - echo "#define OPEQ ^=" >> $@ - echo "#define EQWHOLEWORD ^=~0" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbply1rct.c\"" >> $@ -mfbbltC.c: - echo "#define MROP Mcopy" > $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbblt.c\"" >> $@ -mfbbltX.c: - echo "#define MROP Mxor" > $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbblt.c\"" >> $@ -mfbbltCI.c: - echo "#define MROP McopyInverted" > $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbblt.c\"" >> $@ -mfbbltO.c: - echo "#define MROP Mor" > $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbblt.c\"" >> $@ -mfbbltG.c: - echo "#define MROP M0" > $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbblt.c\"" >> $@ -mfbtileC.c: - echo "#define MROP Mcopy" > $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbtile.c\"" >> $@ -mfbtileG.c: - echo "#define MRop M0" > $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbtile.c\"" >> $@ - -$(libxf1bppmfb_a_SOURCES): - echo "#include \"mfbmap.h\"" > $@ - echo "#include \"$(top_srcdir)/mfb/$@\"" >> $@ - -EXTRA_DIST = mfbmap.sh mfbunmap.sh -DISTCLEANFILES = $(BUILT_SOURCES) diff --git a/xorg-server/hw/xfree86/xf1bpp/Makefile.in b/xorg-server/hw/xfree86/xf1bpp/Makefile.in deleted file mode 100644 index d57f4e994..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/Makefile.in +++ /dev/null @@ -1,929 +0,0 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = hw/xfree86/xf1bpp -DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ - $(top_builddir)/include/xorg-server.h \ - $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ - $(top_builddir)/include/xorg-config.h \ - $(top_builddir)/include/xkb-config.h \ - $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)" -moduleLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(module_LTLIBRARIES) -libxf1bpp_la_LIBADD = -am__objects_1 = maskbits.lo mfbbitblt.lo mfbbres.lo mfbbresd.lo \ - mfbclip.lo mfbcmap.lo mfbfillarc.lo mfbfillrct.lo mfbfillsp.lo \ - mfbfont.lo mfbgc.lo mfbgetsp.lo mfbhrzvert.lo mfbimage.lo \ - mfbline.lo mfbmisc.lo mfbpixmap.lo mfbpolypnt.lo mfbpushpxl.lo \ - mfbscrclse.lo mfbscrinit.lo mfbsetsp.lo mfbwindow.lo \ - mfbzerarc.lo -am__objects_2 = mfbseg.lo mfbpgbwht.lo mfbpgbblak.lo mfbpgbinv.lo \ - mfbigbwht.lo mfbigbblak.lo mfbpawhite.lo mfbpablack.lo \ - mfbpainv.lo mfbtewhite.lo mfbteblack.lo mfbplywhite.lo \ - mfbplyblack.lo mfbplyinv.lo mfbbltC.lo mfbbltX.lo mfbbltCI.lo \ - mfbbltO.lo mfbbltG.lo mfbtileC.lo mfbtileG.lo -am_libxf1bpp_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ - mfbmodule.lo -libxf1bpp_la_OBJECTS = $(am_libxf1bpp_la_OBJECTS) -libxf1bpp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libxf1bpp_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libxf1bpp_la_SOURCES) -DIST_SOURCES = $(libxf1bpp_la_SOURCES) -sdkHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(sdk_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ -ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ -APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ -APP_MAN_DIR = @APP_MAN_DIR@ -APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASE_FONT_PATH = @BASE_FONT_PATH@ -BUILD_DATE = @BUILD_DATE@ -BUILD_TIME = @BUILD_TIME@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DARWIN_LIBS = @DARWIN_LIBS@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ -DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ -DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DGA_CFLAGS = @DGA_CFLAGS@ -DGA_LIBS = @DGA_LIBS@ -DIX_CFLAGS = @DIX_CFLAGS@ -DLLTOOL = @DLLTOOL@ -DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ -DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ -DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ -DMXMODULES_LIBS = @DMXMODULES_LIBS@ -DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ -DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ -DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ -DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ -DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ -DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ -DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ -DRIPROTO_LIBS = @DRIPROTO_LIBS@ -DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ -DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ -DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ -DSYMUTIL = @DSYMUTIL@ -DTRACE = @DTRACE@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -FILE_MAN_DIR = @FILE_MAN_DIR@ -FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ -GLX_DEFINES = @GLX_DEFINES@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -HAL_CFLAGS = @HAL_CFLAGS@ -HAL_LIBS = @HAL_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ -KDRIVE_INCS = @KDRIVE_INCS@ -KDRIVE_LIBS = @KDRIVE_LIBS@ -KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ -KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ -KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ -LDFLAGS = @LDFLAGS@ -LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ -LIBDRM_LIBS = @LIBDRM_LIBS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_MAN_DIR = @LIB_MAN_DIR@ -LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ -MISC_MAN_DIR = @MISC_MAN_DIR@ -MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ -MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCCLD = @OBJCCLD@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJCLINK = @OBJCLINK@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ -PCIACCESS_LIBS = @PCIACCESS_LIBS@ -PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ -PERL = @PERL@ -PKG_CONFIG = @PKG_CONFIG@ -PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ -RANLIB = @RANLIB@ -RAWCPP = @RAWCPP@ -RAWCPPFLAGS = @RAWCPPFLAGS@ -SED = @SED@ -SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ -SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ -STRIP = @STRIP@ -TSLIB_CFLAGS = @TSLIB_CFLAGS@ -TSLIB_LIBS = @TSLIB_LIBS@ -UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ -VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ -VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ -X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ -X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ -XDMCP_CFLAGS = @XDMCP_CFLAGS@ -XDMCP_LIBS = @XDMCP_LIBS@ -XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ -XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ -XDMX_CFLAGS = @XDMX_CFLAGS@ -XDMX_LIBS = @XDMX_LIBS@ -XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ -XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ -XEPHYR_INCS = @XEPHYR_INCS@ -XEPHYR_LIBS = @XEPHYR_LIBS@ -XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ -XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ -XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ -XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ -XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ -XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ -XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ -XLIB_CFLAGS = @XLIB_CFLAGS@ -XLIB_LIBS = @XLIB_LIBS@ -XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ -XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ -XNEST_LIBS = @XNEST_LIBS@ -XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ -XORG_CFLAGS = @XORG_CFLAGS@ -XORG_INCS = @XORG_INCS@ -XORG_LIBS = @XORG_LIBS@ -XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ -XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ -XORG_OS = @XORG_OS@ -XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ -XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ -XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ -XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ -XSDL_INCS = @XSDL_INCS@ -XSDL_LIBS = @XSDL_LIBS@ -XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ -XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ -XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ -XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ -XSERVER_LIBS = @XSERVER_LIBS@ -XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ -XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ -XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ -XVFB_LIBS = @XVFB_LIBS@ -XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ -XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ -XWINMODULES_LIBS = @XWINMODULES_LIBS@ -XWIN_LIBS = @XWIN_LIBS@ -XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ -XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -__XCONFIGFILE__ = @__XCONFIGFILE__@ -abi_ansic = @abi_ansic@ -abi_extension = @abi_extension@ -abi_font = @abi_font@ -abi_videodrv = @abi_videodrv@ -abi_xinput = @abi_xinput@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -driverdir = @driverdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -extdir = @extdir@ -ft_config = @ft_config@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -logdir = @logdir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -moduledir = @moduledir@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sdkdir = @sdkdir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ -module_LTLIBRARIES = libxf1bpp.la -sdk_HEADERS = xf1bpp.h mfbmap.h mfbunmap.h -libxf1bpp_la_LDFLAGS = -avoid-version -libxf1bppgen_a_SOURCES = \ - mfbseg.c \ - mfbpgbwht.c \ - mfbpgbblak.c \ - mfbpgbinv.c \ - mfbigbwht.c \ - mfbigbblak.c \ - mfbpawhite.c \ - mfbpablack.c \ - mfbpainv.c \ - mfbtewhite.c \ - mfbteblack.c \ - mfbplywhite.c \ - mfbplyblack.c \ - mfbplyinv.c \ - mfbbltC.c \ - mfbbltX.c \ - mfbbltCI.c \ - mfbbltO.c \ - mfbbltG.c \ - mfbtileC.c \ - mfbtileG.c - -libxf1bppmfb_a_SOURCES = \ - maskbits.c \ - mfbbitblt.c \ - mfbbres.c \ - mfbbresd.c \ - mfbclip.c \ - mfbcmap.c \ - mfbfillarc.c \ - mfbfillrct.c \ - mfbfillsp.c \ - mfbfont.c \ - mfbgc.c \ - mfbgetsp.c \ - mfbhrzvert.c \ - mfbimage.c \ - mfbline.c \ - mfbmisc.c \ - mfbpixmap.c \ - mfbpolypnt.c \ - mfbpushpxl.c \ - mfbscrclse.c \ - mfbscrinit.c \ - mfbsetsp.c \ - mfbwindow.c \ - mfbzerarc.c - -BUILT_SOURCES = $(libxf1bppmfb_a_SOURCES) $(libxf1bppgen_a_SOURCES) -libxf1bpp_la_SOURCES = $(libxf1bppmfb_a_SOURCES) $(libxf1bppgen_a_SOURCES) \ - mfbmodule.c - -AM_CFLAGS = -DXF86MONO $(DIX_CFLAGS) $(XORG_CFLAGS) -INCLUDES = $(XORG_INCS) -I$(top_srcdir)/mfb -EXTRA_DIST = mfbmap.sh mfbunmap.sh -DISTCLEANFILES = $(BUILT_SOURCES) -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/xf1bpp/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign hw/xfree86/xf1bpp/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-moduleLTLIBRARIES: $(module_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(moduledir)" || $(MKDIR_P) "$(DESTDIR)$(moduledir)" - @list='$(module_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(moduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(moduledir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(moduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(moduledir)/$$f"; \ - else :; fi; \ - done - -uninstall-moduleLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(module_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(moduledir)/$$p'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(moduledir)/$$p"; \ - done - -clean-moduleLTLIBRARIES: - -test -z "$(module_LTLIBRARIES)" || rm -f $(module_LTLIBRARIES) - @list='$(module_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libxf1bpp.la: $(libxf1bpp_la_OBJECTS) $(libxf1bpp_la_DEPENDENCIES) - $(libxf1bpp_la_LINK) -rpath $(moduledir) $(libxf1bpp_la_OBJECTS) $(libxf1bpp_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maskbits.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbbitblt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbbltC.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbbltCI.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbbltG.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbbltO.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbbltX.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbbres.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbbresd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbclip.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbcmap.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbfillarc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbfillrct.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbfillsp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbfont.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbgc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbgetsp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbhrzvert.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbigbblak.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbigbwht.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbimage.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbline.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbmisc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbmodule.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbpablack.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbpainv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbpawhite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbpgbblak.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbpgbinv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbpgbwht.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbpixmap.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbplyblack.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbplyinv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbplywhite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbpolypnt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbpushpxl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbscrclse.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbscrinit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbseg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbsetsp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbteblack.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbtewhite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbtileC.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbtileG.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbwindow.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbzerarc.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-sdkHEADERS: $(sdk_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(sdkdir)" || $(MKDIR_P) "$(DESTDIR)$(sdkdir)" - @list='$(sdk_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(sdkHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(sdkdir)/$$f'"; \ - $(sdkHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(sdkdir)/$$f"; \ - done - -uninstall-sdkHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(sdk_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(sdkdir)/$$f'"; \ - rm -f "$(DESTDIR)$(sdkdir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libtool clean-moduleLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-moduleLTLIBRARIES install-sdkHEADERS - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-moduleLTLIBRARIES uninstall-sdkHEADERS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-moduleLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-moduleLTLIBRARIES install-pdf install-pdf-am \ - install-ps install-ps-am install-sdkHEADERS install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-moduleLTLIBRARIES \ - uninstall-sdkHEADERS - - -mfbseg.c: - echo "#define POLYSEGMENT" > $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbline.c\"" >> $@ -mfbpgbwht.c: - echo "#define MFBPOLYGLYPHBLT xf1bppPolyGlyphBltWhite" > $@ - echo "#define OPEQ |=" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbplygblt.c\"" >> $@ -mfbpgbblak.c: - echo "#define MFBPOLYGLYPHBLT xf1bppPolyGlyphBltBlack" > $@ - echo "#define OPEQ &=~" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbplygblt.c\"" >> $@ -mfbpgbinv.c: - echo "#define MFBPOLYGLYPHBLT xf1bppPolyGlyphBltInvert" > $@ - echo "#define OPEQ ^=" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbplygblt.c\"" >> $@ -mfbigbwht.c: - echo "#define MFBIMAGEGLYPHBLT xf1bppImageGlyphBltWhite" > $@ - echo "#define OPEQ |=" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbimggblt.c\"" >> $@ -mfbigbblak.c: - echo "#define MFBIMAGEGLYPHBLT xf1bppImageGlyphBltBlack" > $@ - echo "#define OPEQ &=~" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbimggblt.c\"" >> $@ -mfbpawhite.c: - echo "#define MFBSOLIDFILLAREA xf1bppSolidWhiteArea" > $@ - echo "#define MFBSTIPPLEFILLAREA xf1bppStippleWhiteArea" >> $@ - echo "#define OPEQ |=" >> $@ - echo "#define EQWHOLEWORD =~0" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbpntarea.c\"" >> $@ -mfbpablack.c: - echo "#define MFBSOLIDFILLAREA xf1bppSolidBlackArea" > $@ - echo "#define MFBSTIPPLEFILLAREA xf1bppStippleBlackArea" >> $@ - echo "#define OPEQ &=~" >> $@ - echo "#define EQWHOLEWORD =0" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbpntarea.c\"" >> $@ -mfbpainv.c: - echo "#define MFBSOLIDFILLAREA xf1bppSolidInvertArea" > $@ - echo "#define MFBSTIPPLEFILLAREA xf1bppStippleInvertArea" >> $@ - echo "#define OPEQ ^=" >> $@ - echo "#define EQWHOLEWORD ^=~0" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbpntarea.c\"" >> $@ -mfbtewhite.c: - echo "#define OP" > $@ - echo "#define CLIPTETEXT xf1bppImageGlyphBltWhite" >> $@ - echo "#define MFBTEGLYPHBLT xf1bppTEGlyphBltWhite" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbtegblt.c\"" >> $@ -mfbteblack.c: - echo "#define OP ~" > $@ - echo "#define CLIPTETEXT xf1bppImageGlyphBltBlack" >> $@ - echo "#define MFBTEGLYPHBLT xf1bppTEGlyphBltBlack" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbtegblt.c\"" >> $@ -mfbplywhite.c: - echo "#define MFBFILLPOLY1RECT xf1bppFillPolyWhite" > $@ - echo "#define OPEQ |=" >> $@ - echo "#define EQWHOLEWORD =~0" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbply1rct.c\"" >> $@ -mfbplyblack.c: - echo "#define MFBFILLPOLY1RECT xf1bppFillPolyBlack" > $@ - echo "#define OPEQ &=~" >> $@ - echo "#define EQWHOLEWORD =0" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbply1rct.c\"" >> $@ -mfbplyinv.c: - echo "#define MFBFILLPOLY1RECT xf1bppFillPolyInvert" > $@ - echo "#define OPEQ ^=" >> $@ - echo "#define EQWHOLEWORD ^=~0" >> $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbply1rct.c\"" >> $@ -mfbbltC.c: - echo "#define MROP Mcopy" > $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbblt.c\"" >> $@ -mfbbltX.c: - echo "#define MROP Mxor" > $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbblt.c\"" >> $@ -mfbbltCI.c: - echo "#define MROP McopyInverted" > $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbblt.c\"" >> $@ -mfbbltO.c: - echo "#define MROP Mor" > $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbblt.c\"" >> $@ -mfbbltG.c: - echo "#define MROP M0" > $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbblt.c\"" >> $@ -mfbtileC.c: - echo "#define MROP Mcopy" > $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbtile.c\"" >> $@ -mfbtileG.c: - echo "#define MRop M0" > $@ - echo "#include \"mfbmap.h\"" >> $@ - echo "#include \"$(top_srcdir)/mfb/mfbtile.c\"" >> $@ - -$(libxf1bppmfb_a_SOURCES): - echo "#include \"mfbmap.h\"" > $@ - echo "#include \"$(top_srcdir)/mfb/$@\"" >> $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/xorg-server/hw/xfree86/xf1bpp/maskbits.c b/xorg-server/hw/xfree86/xf1bpp/maskbits.c deleted file mode 100644 index a8869b2fd..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/maskbits.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/maskbits.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbbitblt.c b/xorg-server/hw/xfree86/xf1bpp/mfbbitblt.c deleted file mode 100644 index dd41a79f4..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbbitblt.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbbitblt.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbbltC.c b/xorg-server/hw/xfree86/xf1bpp/mfbbltC.c deleted file mode 100644 index 83c9066c6..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbbltC.c +++ /dev/null @@ -1,3 +0,0 @@ -#define MROP Mcopy -#include "mfbmap.h" -#include "../../../mfb/mfbblt.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbbltCI.c b/xorg-server/hw/xfree86/xf1bpp/mfbbltCI.c deleted file mode 100644 index c436d1533..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbbltCI.c +++ /dev/null @@ -1,3 +0,0 @@ -#define MROP McopyInverted -#include "mfbmap.h" -#include "../../../mfb/mfbblt.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbbltG.c b/xorg-server/hw/xfree86/xf1bpp/mfbbltG.c deleted file mode 100644 index 8ecd93835..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbbltG.c +++ /dev/null @@ -1,3 +0,0 @@ -#define MROP M0 -#include "mfbmap.h" -#include "../../../mfb/mfbblt.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbbltO.c b/xorg-server/hw/xfree86/xf1bpp/mfbbltO.c deleted file mode 100644 index 2e463a993..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbbltO.c +++ /dev/null @@ -1,3 +0,0 @@ -#define MROP Mor -#include "mfbmap.h" -#include "../../../mfb/mfbblt.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbbltX.c b/xorg-server/hw/xfree86/xf1bpp/mfbbltX.c deleted file mode 100644 index 2c26467c0..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbbltX.c +++ /dev/null @@ -1,3 +0,0 @@ -#define MROP Mxor -#include "mfbmap.h" -#include "../../../mfb/mfbblt.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbbres.c b/xorg-server/hw/xfree86/xf1bpp/mfbbres.c deleted file mode 100644 index 3ff1187b2..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbbres.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbbres.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbbresd.c b/xorg-server/hw/xfree86/xf1bpp/mfbbresd.c deleted file mode 100644 index b745fb6bc..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbbresd.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbbresd.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbclip.c b/xorg-server/hw/xfree86/xf1bpp/mfbclip.c deleted file mode 100644 index 2fadd7682..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbclip.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbclip.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbcmap.c b/xorg-server/hw/xfree86/xf1bpp/mfbcmap.c deleted file mode 100644 index 5255927a2..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbcmap.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbcmap.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbfillarc.c b/xorg-server/hw/xfree86/xf1bpp/mfbfillarc.c deleted file mode 100644 index 8d7cca2ba..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbfillarc.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbfillarc.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbfillrct.c b/xorg-server/hw/xfree86/xf1bpp/mfbfillrct.c deleted file mode 100644 index 2ec87f4b2..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbfillrct.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbfillrct.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbfillsp.c b/xorg-server/hw/xfree86/xf1bpp/mfbfillsp.c deleted file mode 100644 index 9c89144e8..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbfillsp.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbfillsp.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbfont.c b/xorg-server/hw/xfree86/xf1bpp/mfbfont.c deleted file mode 100644 index d3201a145..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbfont.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbfont.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbgc.c b/xorg-server/hw/xfree86/xf1bpp/mfbgc.c deleted file mode 100644 index f17eec900..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbgc.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbgc.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbgetsp.c b/xorg-server/hw/xfree86/xf1bpp/mfbgetsp.c deleted file mode 100644 index 3638cb85a..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbgetsp.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbgetsp.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbhrzvert.c b/xorg-server/hw/xfree86/xf1bpp/mfbhrzvert.c deleted file mode 100644 index 0b76abfee..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbhrzvert.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbhrzvert.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbigbblak.c b/xorg-server/hw/xfree86/xf1bpp/mfbigbblak.c deleted file mode 100644 index 628631d53..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbigbblak.c +++ /dev/null @@ -1,4 +0,0 @@ -#define MFBIMAGEGLYPHBLT xf1bppImageGlyphBltBlack -#define OPEQ &=~ -#include "mfbmap.h" -#include "../../../mfb/mfbimggblt.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbigbwht.c b/xorg-server/hw/xfree86/xf1bpp/mfbigbwht.c deleted file mode 100644 index c35f241bc..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbigbwht.c +++ /dev/null @@ -1,4 +0,0 @@ -#define MFBIMAGEGLYPHBLT xf1bppImageGlyphBltWhite -#define OPEQ |= -#include "mfbmap.h" -#include "../../../mfb/mfbimggblt.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbimage.c b/xorg-server/hw/xfree86/xf1bpp/mfbimage.c deleted file mode 100644 index cd43fe076..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbimage.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbimage.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbline.c b/xorg-server/hw/xfree86/xf1bpp/mfbline.c deleted file mode 100644 index dccff150f..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbline.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbline.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbmap.h b/xorg-server/hw/xfree86/xf1bpp/mfbmap.h deleted file mode 100644 index e330ebd5b..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbmap.h +++ /dev/null @@ -1,122 +0,0 @@ - -#ifndef _MFBMAP_H -#define _MFBMAP_H - -#define InverseAlu xf1bppInverseAlu -#define endtab xf1bppendtab -#define mask xf1bppmask -#define mergeRopBits xf1bppmergeRopBits -#define mergeGetRopBits xf1bppmergeGetRopBits -#define mfbAllocatePrivates xf1bppAllocatePrivates -#define mfbBSFuncRec xf1bppBSFuncRec -#define mfbBlackSolidFS xf1bppBlackSolidFS -#define mfbBlackStippleFS xf1bppBlackStippleFS -#define mfbBresD xf1bppBresD -#define mfbBresS xf1bppBresS -#define mfbChangeWindowAttributes xf1bppChangeWindowAttributes -#define mfbCloseScreen xf1bppCloseScreen -#define mfbCopyArea xf1bppCopyArea -#define mfbCopyPixmap xf1bppCopyPixmap -#define mfbCopyPlane xf1bppCopyPlane -#define mfbCopyRotatePixmap xf1bppCopyRotatePixmap -#define mfbCopyWindow xf1bppCopyWindow -#define mfbCreateColormap xf1bppCreateColormap -#define mfbCreateDefColormap xf1bppCreateDefColormap -#define mfbCreateGC xf1bppCreateGC -#define mfbCreatePixmap xf1bppCreatePixmap -#define mfbCreateWindow xf1bppCreateWindow -#define mfbDestroyColormap xf1bppDestroyColormap -#define mfbDestroyPixmap xf1bppDestroyPixmap -#define mfbDestroyWindow xf1bppDestroyWindow -#define mfbDoBitblt xf1bppDoBitblt -#define mfbDoBitbltCopy xf1bppDoBitbltCopy -#define mfbDoBitbltCopyInverted xf1bppDoBitbltCopyInverted -#define mfbDoBitbltGeneral xf1bppDoBitbltGeneral -#define mfbDoBitbltOr xf1bppDoBitbltOr -#define mfbDoBitbltXor xf1bppDoBitbltXor -#define mfbFillInScreen xf1bppFillInScreen -#define mfbFillPolyBlack xf1bppFillPolyBlack -#define mfbFillPolyInvert xf1bppFillPolyInvert -#define mfbFillPolyWhite xf1bppFillPolyWhite -#define mfbGCPrivateIndex xf1bppGCPrivateIndex -#define mfbGetGCPrivateIndex xf1bppGetGCPrivateIndex -#define mfbGetImage xf1bppGetImage -#define mfbGetInverseAlu xf1bppGetInverseAlu -#define mfbGetSpans xf1bppGetSpans -#define mfbGetWindowPixmap xf1bppGetWindowPixmap -#define mfbGetWindowPrivateIndex xf1bppGetWindowPrivateIndex -#define mfbGetmask xf1bppGetmask -#define mfbGetpartmasks xf1bppGetpartmasks -#define mfbGetrmask xf1bppGetrmask -#define mfbGetstarttab xf1bppGetstarttab -#define mfbGetendtab xf1bppGetendtab -#define mfbHorzS xf1bppHorzS -#define mfbImageGlyphBltBlack xf1bppImageGlyphBltBlack -#define mfbImageGlyphBltWhite xf1bppImageGlyphBltWhite -#define mfbInstallColormap xf1bppInstallColormap -#define mfbInvertSolidFS xf1bppInvertSolidFS -#define mfbInvertStippleFS xf1bppInvertStippleFS -#define mfbLineSD xf1bppLineSD -#define mfbLineSS xf1bppLineSS -#define mfbListInstalledColormaps xf1bppListInstalledColormaps -#define mfbMapWindow xf1bppMapWindow -#define mfbPadPixmap xf1bppPadPixmap -#define mfbPixmapToRegion xf1bppPixmapToRegion -#define mfbPixmapToRegionWeak xf1bppPixmapToRegionWeak -#define mfbPolyFillArcSolid xf1bppPolyFillArcSolid -#define mfbPolyFillRect xf1bppPolyFillRect -#define mfbPolyGlyphBltBlack xf1bppPolyGlyphBltBlack -#define mfbPolyGlyphBltInvert xf1bppPolyGlyphBltInvert -#define mfbPolyGlyphBltWhite xf1bppPolyGlyphBltWhite -#define mfbPolyPoint xf1bppPolyPoint -#define mfbPositionWindow xf1bppPositionWindow -#define mfbPushPixels xf1bppPushPixels -#define mfbPushPixelsWeak xf1bppPushPixelsWeak -#define mfbPutImage xf1bppPutImage -#define mfbQueryBestSize xf1bppQueryBestSize -#define mfbQueryBestSizeWeak xf1bppQueryBestSizeWeak -#define mfbRealizeFont xf1bppRealizeFont -#define mfbRealizeFontWeak xf1bppRealizeFontWeak -#define mfbReduceRop xf1bppReduceRop -#define mfbRegisterCopyPlaneProc xf1bppRegisterCopyPlaneProc -#define mfbResolveColor xf1bppResolveColor -#define mfbRestoreAreas xf1bppRestoreAreas -#define mfbSaveAreas xf1bppSaveAreas -#define mfbScreenInit xf1bppScreenInit -#define mfbSegmentSD xf1bppSegmentSD -#define mfbSegmentSS xf1bppSegmentSS -#define mfbSetScanline xf1bppSetScanline -#define mfbSetSpans xf1bppSetSpans -#define mfbSetWindowPixmap xf1bppSetWindowPixmap -#define mfbSolidBlackArea xf1bppSolidBlackArea -#define mfbSolidInvertArea xf1bppSolidInvertArea -#define mfbSolidPP xf1bppSolidPP -#define mfbSolidWhiteArea xf1bppSolidWhiteArea -#define mfbStippleBlackArea xf1bppStippleBlackArea -#define mfbStippleInvertArea xf1bppStippleInvertArea -#define mfbStippleWhiteArea xf1bppStippleWhiteArea -#define mfbTEGlyphBltBlack xf1bppTEGlyphBltBlack -#define mfbTEGlyphBltWhite xf1bppTEGlyphBltWhite -#define mfbTileAreaPPW xf1bppTileAreaPPW -#define mfbTileAreaPPWCopy xf1bppTileAreaPPWCopy -#define mfbTileAreaPPWGeneral xf1bppTileAreaPPWGeneral -#define mfbTileFS xf1bppTileFS -#define mfbUninstallColormap xf1bppUninstallColormap -#define mfbUnmapWindow xf1bppUnmapWindow -#define mfbUnnaturalStippleFS xf1bppUnnaturalStippleFS -#define mfbUnnaturalTileFS xf1bppUnnaturalTileFS -#define mfbUnrealizeFont xf1bppUnrealizeFont -#define mfbUnrealizeFontWeak xf1bppUnrealizeFontWeak -#define mfbValidateGC xf1bppValidateGC -#define mfbVertS xf1bppVertS -#define mfbWhiteSolidFS xf1bppWhiteSolidFS -#define mfbWhiteStippleFS xf1bppWhiteStippleFS -#define mfbWindowPrivateIndex xf1bppWindowPrivateIndex -#define mfbXRotatePixmap xf1bppXRotatePixmap -#define mfbYRotatePixmap xf1bppYRotatePixmap -#define mfbZeroPolyArcSS xf1bppZeroPolyArcSS -#define partmasks xf1bpppartmasks -#define rmask xf1bpprmask -#define starttab xf1bppstarttab - -#endif diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbmap.sh b/xorg-server/hw/xfree86/xf1bpp/mfbmap.sh deleted file mode 100644 index 514040776..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbmap.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -# $XFree86: xc/programs/Xserver/hw/xfree86/xf1bpp/mfbmap.sh,v 1.1.2.3 1998/06/27 14:48:23 dawes Exp $ -# -# This script recreates the mapping list that maps the mfb external -# symbols * to xf1bpp* (without "mfb") -# This should only be rerun if there have been changes in the mfb code -# that affect the external symbols. -# It assumes that Xserver/mfb has been compiled. -# The output goes to stdout. -echo "" -echo "#ifndef _MFBMAP_H" -echo "#define _MFBMAP_H" -echo "" - -nm ../../../mfb/*.o | \ -awk "{ if ((\$2 == \"D\") || (\$2 == \"T\") || (\$2 == \"C\")) print \$3 }" | \ -sed s/^_// | \ -grep -v "ModuleInit$" | \ -sort | \ -awk "{ print \"#define \" \$1 \" xf1bpp\"\$1 }" | \ -sed s/xf1bppmfb/xf1bpp/ - -echo "" -echo "#endif" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbmisc.c b/xorg-server/hw/xfree86/xf1bpp/mfbmisc.c deleted file mode 100644 index 0c0ddb851..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbmisc.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbmisc.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbmodule.c b/xorg-server/hw/xfree86/xf1bpp/mfbmodule.c deleted file mode 100644 index ccd3572e5..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbmodule.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 1997 The XFree86 Project, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the XFree86 Project shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from the - * XFree86 Project. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf86Module.h" - -static XF86ModuleVersionInfo VersRec = -{ - "xf1bpp", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 1, 0, 0, - ABI_CLASS_ANSIC, /* Only need ansic layer */ - ABI_ANSIC_VERSION, - MOD_CLASS_NONE, - {0,0,0,0} /* signature, to be patched into the file by a tool */ -}; - -_X_EXPORT XF86ModuleData xf1bppModuleData = { &VersRec, NULL, NULL }; diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbpablack.c b/xorg-server/hw/xfree86/xf1bpp/mfbpablack.c deleted file mode 100644 index 90aa7faf1..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbpablack.c +++ /dev/null @@ -1,6 +0,0 @@ -#define MFBSOLIDFILLAREA xf1bppSolidBlackArea -#define MFBSTIPPLEFILLAREA xf1bppStippleBlackArea -#define OPEQ &=~ -#define EQWHOLEWORD =0 -#include "mfbmap.h" -#include "../../../mfb/mfbpntarea.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbpainv.c b/xorg-server/hw/xfree86/xf1bpp/mfbpainv.c deleted file mode 100644 index fdbe7978a..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbpainv.c +++ /dev/null @@ -1,6 +0,0 @@ -#define MFBSOLIDFILLAREA xf1bppSolidInvertArea -#define MFBSTIPPLEFILLAREA xf1bppStippleInvertArea -#define OPEQ ^= -#define EQWHOLEWORD ^=~0 -#include "mfbmap.h" -#include "../../../mfb/mfbpntarea.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbpawhite.c b/xorg-server/hw/xfree86/xf1bpp/mfbpawhite.c deleted file mode 100644 index 5b5ccc93b..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbpawhite.c +++ /dev/null @@ -1,6 +0,0 @@ -#define MFBSOLIDFILLAREA xf1bppSolidWhiteArea -#define MFBSTIPPLEFILLAREA xf1bppStippleWhiteArea -#define OPEQ |= -#define EQWHOLEWORD =~0 -#include "mfbmap.h" -#include "../../../mfb/mfbpntarea.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbpgbblak.c b/xorg-server/hw/xfree86/xf1bpp/mfbpgbblak.c deleted file mode 100644 index d6451a962..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbpgbblak.c +++ /dev/null @@ -1,4 +0,0 @@ -#define MFBPOLYGLYPHBLT xf1bppPolyGlyphBltBlack -#define OPEQ &=~ -#include "mfbmap.h" -#include "../../../mfb/mfbplygblt.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbpgbinv.c b/xorg-server/hw/xfree86/xf1bpp/mfbpgbinv.c deleted file mode 100644 index 52b35a507..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbpgbinv.c +++ /dev/null @@ -1,4 +0,0 @@ -#define MFBPOLYGLYPHBLT xf1bppPolyGlyphBltInvert -#define OPEQ ^= -#include "mfbmap.h" -#include "../../../mfb/mfbplygblt.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbpgbwht.c b/xorg-server/hw/xfree86/xf1bpp/mfbpgbwht.c deleted file mode 100644 index bd4d2f7c1..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbpgbwht.c +++ /dev/null @@ -1,4 +0,0 @@ -#define MFBPOLYGLYPHBLT xf1bppPolyGlyphBltWhite -#define OPEQ |= -#include "mfbmap.h" -#include "../../../mfb/mfbplygblt.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbpixmap.c b/xorg-server/hw/xfree86/xf1bpp/mfbpixmap.c deleted file mode 100644 index 11c51c623..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbpixmap.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbpixmap.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbplyblack.c b/xorg-server/hw/xfree86/xf1bpp/mfbplyblack.c deleted file mode 100644 index f06f0dcf3..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbplyblack.c +++ /dev/null @@ -1,5 +0,0 @@ -#define MFBFILLPOLY1RECT xf1bppFillPolyBlack -#define OPEQ &=~ -#define EQWHOLEWORD =0 -#include "mfbmap.h" -#include "../../../mfb/mfbply1rct.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbplyinv.c b/xorg-server/hw/xfree86/xf1bpp/mfbplyinv.c deleted file mode 100644 index 9937d076d..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbplyinv.c +++ /dev/null @@ -1,5 +0,0 @@ -#define MFBFILLPOLY1RECT xf1bppFillPolyInvert -#define OPEQ ^= -#define EQWHOLEWORD ^=~0 -#include "mfbmap.h" -#include "../../../mfb/mfbply1rct.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbplywhite.c b/xorg-server/hw/xfree86/xf1bpp/mfbplywhite.c deleted file mode 100644 index 13560dfaa..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbplywhite.c +++ /dev/null @@ -1,5 +0,0 @@ -#define MFBFILLPOLY1RECT xf1bppFillPolyWhite -#define OPEQ |= -#define EQWHOLEWORD =~0 -#include "mfbmap.h" -#include "../../../mfb/mfbply1rct.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbpolypnt.c b/xorg-server/hw/xfree86/xf1bpp/mfbpolypnt.c deleted file mode 100644 index 0e45a3db6..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbpolypnt.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbpolypnt.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbpushpxl.c b/xorg-server/hw/xfree86/xf1bpp/mfbpushpxl.c deleted file mode 100644 index c03505454..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbpushpxl.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbpushpxl.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbscrclse.c b/xorg-server/hw/xfree86/xf1bpp/mfbscrclse.c deleted file mode 100644 index d4aee1bfc..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbscrclse.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbscrclse.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbscrinit.c b/xorg-server/hw/xfree86/xf1bpp/mfbscrinit.c deleted file mode 100644 index 50b3889ce..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbscrinit.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbscrinit.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbseg.c b/xorg-server/hw/xfree86/xf1bpp/mfbseg.c deleted file mode 100644 index b0bfd735f..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbseg.c +++ /dev/null @@ -1,3 +0,0 @@ -#define POLYSEGMENT -#include "mfbmap.h" -#include "../../../mfb/mfbline.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbsetsp.c b/xorg-server/hw/xfree86/xf1bpp/mfbsetsp.c deleted file mode 100644 index 4a16db9f3..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbsetsp.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbsetsp.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbteblack.c b/xorg-server/hw/xfree86/xf1bpp/mfbteblack.c deleted file mode 100644 index 32568b2ed..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbteblack.c +++ /dev/null @@ -1,5 +0,0 @@ -#define OP ~ -#define CLIPTETEXT xf1bppImageGlyphBltBlack -#define MFBTEGLYPHBLT xf1bppTEGlyphBltBlack -#include "mfbmap.h" -#include "../../../mfb/mfbtegblt.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbtewhite.c b/xorg-server/hw/xfree86/xf1bpp/mfbtewhite.c deleted file mode 100644 index 16c83f779..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbtewhite.c +++ /dev/null @@ -1,5 +0,0 @@ -#define OP -#define CLIPTETEXT xf1bppImageGlyphBltWhite -#define MFBTEGLYPHBLT xf1bppTEGlyphBltWhite -#include "mfbmap.h" -#include "../../../mfb/mfbtegblt.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbtileC.c b/xorg-server/hw/xfree86/xf1bpp/mfbtileC.c deleted file mode 100644 index 60c0e4069..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbtileC.c +++ /dev/null @@ -1,3 +0,0 @@ -#define MROP Mcopy -#include "mfbmap.h" -#include "../../../mfb/mfbtile.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbtileG.c b/xorg-server/hw/xfree86/xf1bpp/mfbtileG.c deleted file mode 100644 index 20764136d..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbtileG.c +++ /dev/null @@ -1,3 +0,0 @@ -#define MRop M0 -#include "mfbmap.h" -#include "../../../mfb/mfbtile.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbunmap.h b/xorg-server/hw/xfree86/xf1bpp/mfbunmap.h deleted file mode 100644 index 56b734bcd..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbunmap.h +++ /dev/null @@ -1,114 +0,0 @@ - -#ifdef _MFBMAP_H -#undef _MFBMAP_H - -#undef InverseAlu -#undef endtab -#undef mask -#undef mergeRopBits -#undef mergeGetRopBits -#undef mfbAllocatePrivates -#undef mfbBSFuncRec -#undef mfbBlackSolidFS -#undef mfbBlackStippleFS -#undef mfbBresD -#undef mfbBresS -#undef mfbChangeWindowAttributes -#undef mfbCloseScreen -#undef mfbCopyArea -#undef mfbCopyPixmap -#undef mfbCopyPlane -#undef mfbCopyRotatePixmap -#undef mfbCopyWindow -#undef mfbCreateColormap -#undef mfbCreateDefColormap -#undef mfbCreateGC -#undef mfbCreatePixmap -#undef mfbCreateWindow -#undef mfbDestroyColormap -#undef mfbDestroyPixmap -#undef mfbDestroyWindow -#undef mfbDoBitblt -#undef mfbDoBitbltCopy -#undef mfbDoBitbltCopyInverted -#undef mfbDoBitbltGeneral -#undef mfbDoBitbltOr -#undef mfbDoBitbltXor -#undef mfbFillPolyBlack -#undef mfbFillPolyInvert -#undef mfbFillPolyWhite -#undef mfbGCPrivateIndex -#undef mfbGetImage -#undef mfbGetInverseAlu -#undef mfbGetSpans -#undef mfbGetWindowPixmap -#undef mfbHorzS -#undef mfbImageGlyphBltBlack -#undef mfbImageGlyphBltWhite -#undef mfbInstallColormap -#undef mfbInvertSolidFS -#undef mfbInvertStippleFS -#undef mfbLineSD -#undef mfbLineSS -#undef mfbListInstalledColormaps -#undef mfbMapWindow -#undef mfbPadPixmap -#undef mfbPixmapToRegion -#undef mfbPixmapToRegionWeak -#undef mfbPolyFillArcSolid -#undef mfbPolyFillRect -#undef mfbPolyGlyphBltBlack -#undef mfbPolyGlyphBltInvert -#undef mfbPolyGlyphBltWhite -#undef mfbPolyPoint -#undef mfbPositionWindow -#undef mfbPushPixels -#undef mfbPushPixelsWeak -#undef mfbPutImage -#undef mfbQueryBestSize -#undef mfbQueryBestSizeWeak -#undef mfbRealizeFont -#undef mfbRealizeFontWeak -#undef mfbReduceRop -#undef mfbRegisterCopyPlaneProc -#undef mfbResolveColor -#undef mfbRestoreAreas -#undef mfbSaveAreas -#undef mfbScreenInit -#undef mfbSegmentSD -#undef mfbSegmentSS -#undef mfbSetScanline -#undef mfbSetSpans -#undef mfbSetWindowPixmap -#undef mfbSolidBlackArea -#undef mfbSolidInvertArea -#undef mfbSolidPP -#undef mfbSolidWhiteArea -#undef mfbStippleBlackArea -#undef mfbStippleInvertArea -#undef mfbStippleWhiteArea -#undef mfbTEGlyphBltBlack -#undef mfbTEGlyphBltWhite -#undef mfbTileAreaPPW -#undef mfbTileAreaPPWCopy -#undef mfbTileAreaPPWGeneral -#undef mfbTileFS -#undef mfbUninstallColormap -#undef mfbUnmapWindow -#undef mfbUnnaturalStippleFS -#undef mfbUnnaturalTileFS -#undef mfbUnrealizeFont -#undef mfbUnrealizeFontWeak -#undef mfbValidateGC -#undef mfbVertS -#undef mfbWhiteSolidFS -#undef mfbWhiteStippleFS -#undef mfbWindowPrivateIndex -#undef mfbXRotatePixmap -#undef mfbYRotatePixmap -#undef mfbZeroPolyArcSS -#undef partmasks -#undef rmask -#undef starttab - -#endif diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbunmap.sh b/xorg-server/hw/xfree86/xf1bpp/mfbunmap.sh deleted file mode 100644 index 44dc781fc..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbunmap.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -# $XFree86: xc/programs/Xserver/hw/xfree86/xf1bpp/mfbunmap.sh,v 1.1.2.1 1998/06/27 14:48:24 dawes Exp $ -# -# This script recreates a header that undoes the effect of mfbmap.h -# This should only be rerun if there have been changes in the mfb code -# that affect the external symbols. -# It assumes that Xserver/mfb has been compiled. -# The output goes to stdout. -echo "" -echo "#ifdef _MFBMAP_H" -echo "#undef _MFBMAP_H" -echo "" - -nm ../../../mfb/*.o | \ -awk "{ if ((\$2 == \"D\") || (\$2 == \"T\") || (\$2 == \"C\")) print \$3 }" | \ -sed s/^_// | \ -grep -v "ModuleInit$" | \ -sort | \ -awk "{ print \"#undef \" \$1 }" - -echo "" -echo "#endif" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbwindow.c b/xorg-server/hw/xfree86/xf1bpp/mfbwindow.c deleted file mode 100644 index e16082559..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbwindow.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbwindow.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/mfbzerarc.c b/xorg-server/hw/xfree86/xf1bpp/mfbzerarc.c deleted file mode 100644 index 01f2a5446..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/mfbzerarc.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "mfbmap.h" -#include "../../../mfb/mfbzerarc.c" diff --git a/xorg-server/hw/xfree86/xf1bpp/xf1bpp.h b/xorg-server/hw/xfree86/xf1bpp/xf1bpp.h deleted file mode 100644 index 33e5818c3..000000000 --- a/xorg-server/hw/xfree86/xf1bpp/xf1bpp.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 1994-1998 The XFree86 Project, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the XFree86 Project shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from the - * XFree86 Project. - */ - -#ifndef __XF1BPP_H__ -#define __XF1BPP_H__ - -#define MFB_PROTOTYPES_ONLY -#include "mfbmap.h" -#include "mfb.h" -#include "mfbunmap.h" -#undef MFB_PROTOTYPES_ONLY - -#endif diff --git a/xorg-server/hw/xfree86/xf4bpp/Makefile.am b/xorg-server/hw/xfree86/xf4bpp/Makefile.am deleted file mode 100644 index 1414a0d0f..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/Makefile.am +++ /dev/null @@ -1,57 +0,0 @@ -module_LTLIBRARIES = libxf4bpp.la - -sdk_HEADERS = xf4bpp.h - -libxf4bpp_la_LDFLAGS = -avoid-version - -libxf4bpp_la_SOURCES = \ - ppcArea.c \ - ppcClip.c \ - ppcCpArea.c \ - ppcCReduce.c \ - ppcDepth.c \ - ppcFillRct.c \ - ppcWinFS.c \ - ppcPixFS.c \ - ppcGC.c \ - ppcGetSp.c \ - ppcImg.c \ - ppcPixmap.c \ - ppcPolyPnt.c \ - ppcQuery.c \ - ppcRslvC.c \ - ppcSetSp.c \ - ppcWindow.c \ - ppcIO.c \ - emulOpStip.c \ - emulRepAre.c \ - emulTile.c \ - vgaGC.c \ - vgaBitBlt.c \ - vgaImages.c \ - vgaStipple.c \ - vgaSolid.c \ - offscreen.c \ - wm3.c \ - mfbimggblt.c \ - mfbline.c \ - mfbseg.c \ - mfbhrzvert.c \ - mfbbres.c \ - mfbbresd.c \ - mfbfillarc.c \ - mfbzerarc.c \ - vgamodule.c - -EXTRA_DIST = OScompiler.h ibmTrace.h ppcGCstr.h ppcSpMcro.h vgaReg.h \ - vgaVideo.h wm3.h NOTES - -DISTCLEANFILES = mfbseg.c - -mfbseg.c: - echo "#define POLYSEGMENT" > $@ - echo "#include \"$(srcdir)/mfbline.c\"" >> $@ - -INCLUDES = $(XORG_INCS) -I$(srcdir)/../xf1bpp -I$(top_srcdir)/mfb - -AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) diff --git a/xorg-server/hw/xfree86/xf4bpp/Makefile.in b/xorg-server/hw/xfree86/xf4bpp/Makefile.in deleted file mode 100644 index 0a242da14..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/Makefile.in +++ /dev/null @@ -1,791 +0,0 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = hw/xfree86/xf4bpp -DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ - $(top_builddir)/include/xorg-server.h \ - $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ - $(top_builddir)/include/xorg-config.h \ - $(top_builddir)/include/xkb-config.h \ - $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)" -moduleLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(module_LTLIBRARIES) -libxf4bpp_la_LIBADD = -am_libxf4bpp_la_OBJECTS = ppcArea.lo ppcClip.lo ppcCpArea.lo \ - ppcCReduce.lo ppcDepth.lo ppcFillRct.lo ppcWinFS.lo \ - ppcPixFS.lo ppcGC.lo ppcGetSp.lo ppcImg.lo ppcPixmap.lo \ - ppcPolyPnt.lo ppcQuery.lo ppcRslvC.lo ppcSetSp.lo ppcWindow.lo \ - ppcIO.lo emulOpStip.lo emulRepAre.lo emulTile.lo vgaGC.lo \ - vgaBitBlt.lo vgaImages.lo vgaStipple.lo vgaSolid.lo \ - offscreen.lo wm3.lo mfbimggblt.lo mfbline.lo mfbseg.lo \ - mfbhrzvert.lo mfbbres.lo mfbbresd.lo mfbfillarc.lo \ - mfbzerarc.lo vgamodule.lo -libxf4bpp_la_OBJECTS = $(am_libxf4bpp_la_OBJECTS) -libxf4bpp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libxf4bpp_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libxf4bpp_la_SOURCES) -DIST_SOURCES = $(libxf4bpp_la_SOURCES) -sdkHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(sdk_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ -ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ -APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ -APP_MAN_DIR = @APP_MAN_DIR@ -APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASE_FONT_PATH = @BASE_FONT_PATH@ -BUILD_DATE = @BUILD_DATE@ -BUILD_TIME = @BUILD_TIME@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DARWIN_LIBS = @DARWIN_LIBS@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ -DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ -DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DGA_CFLAGS = @DGA_CFLAGS@ -DGA_LIBS = @DGA_LIBS@ -DIX_CFLAGS = @DIX_CFLAGS@ -DLLTOOL = @DLLTOOL@ -DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ -DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ -DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ -DMXMODULES_LIBS = @DMXMODULES_LIBS@ -DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ -DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ -DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ -DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ -DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ -DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ -DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ -DRIPROTO_LIBS = @DRIPROTO_LIBS@ -DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ -DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ -DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ -DSYMUTIL = @DSYMUTIL@ -DTRACE = @DTRACE@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -FILE_MAN_DIR = @FILE_MAN_DIR@ -FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ -GLX_DEFINES = @GLX_DEFINES@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -HAL_CFLAGS = @HAL_CFLAGS@ -HAL_LIBS = @HAL_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ -KDRIVE_INCS = @KDRIVE_INCS@ -KDRIVE_LIBS = @KDRIVE_LIBS@ -KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ -KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ -KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ -LDFLAGS = @LDFLAGS@ -LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ -LIBDRM_LIBS = @LIBDRM_LIBS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_MAN_DIR = @LIB_MAN_DIR@ -LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ -MISC_MAN_DIR = @MISC_MAN_DIR@ -MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ -MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCCLD = @OBJCCLD@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJCLINK = @OBJCLINK@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ -PCIACCESS_LIBS = @PCIACCESS_LIBS@ -PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ -PERL = @PERL@ -PKG_CONFIG = @PKG_CONFIG@ -PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ -RANLIB = @RANLIB@ -RAWCPP = @RAWCPP@ -RAWCPPFLAGS = @RAWCPPFLAGS@ -SED = @SED@ -SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ -SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ -STRIP = @STRIP@ -TSLIB_CFLAGS = @TSLIB_CFLAGS@ -TSLIB_LIBS = @TSLIB_LIBS@ -UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ -VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ -VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ -X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ -X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ -XDMCP_CFLAGS = @XDMCP_CFLAGS@ -XDMCP_LIBS = @XDMCP_LIBS@ -XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ -XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ -XDMX_CFLAGS = @XDMX_CFLAGS@ -XDMX_LIBS = @XDMX_LIBS@ -XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ -XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ -XEPHYR_INCS = @XEPHYR_INCS@ -XEPHYR_LIBS = @XEPHYR_LIBS@ -XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ -XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ -XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ -XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ -XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ -XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ -XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ -XLIB_CFLAGS = @XLIB_CFLAGS@ -XLIB_LIBS = @XLIB_LIBS@ -XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ -XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ -XNEST_LIBS = @XNEST_LIBS@ -XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ -XORG_CFLAGS = @XORG_CFLAGS@ -XORG_INCS = @XORG_INCS@ -XORG_LIBS = @XORG_LIBS@ -XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ -XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ -XORG_OS = @XORG_OS@ -XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ -XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ -XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ -XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ -XSDL_INCS = @XSDL_INCS@ -XSDL_LIBS = @XSDL_LIBS@ -XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ -XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ -XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ -XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ -XSERVER_LIBS = @XSERVER_LIBS@ -XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ -XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ -XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ -XVFB_LIBS = @XVFB_LIBS@ -XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ -XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ -XWINMODULES_LIBS = @XWINMODULES_LIBS@ -XWIN_LIBS = @XWIN_LIBS@ -XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ -XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -__XCONFIGFILE__ = @__XCONFIGFILE__@ -abi_ansic = @abi_ansic@ -abi_extension = @abi_extension@ -abi_font = @abi_font@ -abi_videodrv = @abi_videodrv@ -abi_xinput = @abi_xinput@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -driverdir = @driverdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -extdir = @extdir@ -ft_config = @ft_config@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -logdir = @logdir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -moduledir = @moduledir@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sdkdir = @sdkdir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ -module_LTLIBRARIES = libxf4bpp.la -sdk_HEADERS = xf4bpp.h -libxf4bpp_la_LDFLAGS = -avoid-version -libxf4bpp_la_SOURCES = \ - ppcArea.c \ - ppcClip.c \ - ppcCpArea.c \ - ppcCReduce.c \ - ppcDepth.c \ - ppcFillRct.c \ - ppcWinFS.c \ - ppcPixFS.c \ - ppcGC.c \ - ppcGetSp.c \ - ppcImg.c \ - ppcPixmap.c \ - ppcPolyPnt.c \ - ppcQuery.c \ - ppcRslvC.c \ - ppcSetSp.c \ - ppcWindow.c \ - ppcIO.c \ - emulOpStip.c \ - emulRepAre.c \ - emulTile.c \ - vgaGC.c \ - vgaBitBlt.c \ - vgaImages.c \ - vgaStipple.c \ - vgaSolid.c \ - offscreen.c \ - wm3.c \ - mfbimggblt.c \ - mfbline.c \ - mfbseg.c \ - mfbhrzvert.c \ - mfbbres.c \ - mfbbresd.c \ - mfbfillarc.c \ - mfbzerarc.c \ - vgamodule.c - -EXTRA_DIST = OScompiler.h ibmTrace.h ppcGCstr.h ppcSpMcro.h vgaReg.h \ - vgaVideo.h wm3.h NOTES - -DISTCLEANFILES = mfbseg.c -INCLUDES = $(XORG_INCS) -I$(srcdir)/../xf1bpp -I$(top_srcdir)/mfb -AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/xf4bpp/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign hw/xfree86/xf4bpp/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-moduleLTLIBRARIES: $(module_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(moduledir)" || $(MKDIR_P) "$(DESTDIR)$(moduledir)" - @list='$(module_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(moduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(moduledir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(moduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(moduledir)/$$f"; \ - else :; fi; \ - done - -uninstall-moduleLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(module_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(moduledir)/$$p'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(moduledir)/$$p"; \ - done - -clean-moduleLTLIBRARIES: - -test -z "$(module_LTLIBRARIES)" || rm -f $(module_LTLIBRARIES) - @list='$(module_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libxf4bpp.la: $(libxf4bpp_la_OBJECTS) $(libxf4bpp_la_DEPENDENCIES) - $(libxf4bpp_la_LINK) -rpath $(moduledir) $(libxf4bpp_la_OBJECTS) $(libxf4bpp_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emulOpStip.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emulRepAre.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emulTile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbbres.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbbresd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbfillarc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbhrzvert.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbimggblt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbline.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbseg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfbzerarc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/offscreen.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcArea.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcCReduce.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcClip.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcCpArea.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcDepth.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcFillRct.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcGC.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcGetSp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcIO.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcImg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcPixFS.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcPixmap.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcPolyPnt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcQuery.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcRslvC.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcSetSp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcWinFS.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcWindow.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vgaBitBlt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vgaGC.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vgaImages.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vgaSolid.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vgaStipple.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vgamodule.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wm3.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-sdkHEADERS: $(sdk_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(sdkdir)" || $(MKDIR_P) "$(DESTDIR)$(sdkdir)" - @list='$(sdk_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(sdkHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(sdkdir)/$$f'"; \ - $(sdkHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(sdkdir)/$$f"; \ - done - -uninstall-sdkHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(sdk_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(sdkdir)/$$f'"; \ - rm -f "$(DESTDIR)$(sdkdir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-moduleLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-moduleLTLIBRARIES install-sdkHEADERS - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-moduleLTLIBRARIES uninstall-sdkHEADERS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-moduleLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-moduleLTLIBRARIES install-pdf install-pdf-am \ - install-ps install-ps-am install-sdkHEADERS install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-moduleLTLIBRARIES \ - uninstall-sdkHEADERS - - -mfbseg.c: - echo "#define POLYSEGMENT" > $@ - echo "#include \"$(srcdir)/mfbline.c\"" >> $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/xorg-server/hw/xfree86/xf4bpp/NOTES b/xorg-server/hw/xfree86/xf4bpp/NOTES deleted file mode 100644 index e3b77dcfd..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/NOTES +++ /dev/null @@ -1,194 +0,0 @@ -This code originally hails from IBM. It was ported to an early XFree86 by -Gertjan Akkerman, whose BUGS file I append here. - -In turn, this is a port of Gertjan's work to the new server design. Among the -changes are: - -- The removal of almost all unreferenced code. -- The removal of this code's own copy of mfb (xf1bpp is used instead). -- The removal of banking support (mibank is used instead). -- External symbols were made static where this was sufficient. -- The remaining external names were renamed to xf4bpp*. -- Several minor cleanups too many to mention here. - -To understate the matter, this code is >UGLY<. This seems inherent in IBM's -corporate culture. Be that as it may, it *does* survive X11R4's xtest -(whatever that means these days...). For now, this is sufficient for 4bpp -support in the new design, but at some point, I'll have to sit down and -rewrite this from scratch. A more technical justification for a rewrite is -that the pixmap format is 8bpp, instead of 4bpp, which is causing me to -pepper the rest of the server with unclean accomodations. - -Marc. - -=============================================================================== -Section 1: From IBM's X11R4 contribution towards XFree86. - -This section describes what I did to obtain a 16 colour vga server. - -I started with the SYSV, ppc, vga and common directories from IBM's X11R4 -contribution. Those directories have the following function: -1. SYSV implements the mouse and keyboard. -2. ppc is a generic layer implementing ddx in terms of drawing operations - through rectangles. (With spans as a boundary case: height = 1.) -3. vga implements a layer of operations drawing through rectangles. -4. common implements ddx initialization and quitting, and screen saving. - -I eliminated SYSV and common since the functionality provided therein is -already provided in XFree86. Since XFree86 is actively being ported to -new operating systems, while X11R4 is out of date, I preferred the XFree86 -code here above the SYSV and common code. -Whatever functionality was still needed from common (default colormap -initialization -- not much code) was moved into ppc. - -Since XFree86 uses the mi-provided software cursor code, IBM's software -cursor code was deleted from ppc and vga. This is a pity, since it is -expected that it is more efficient than mi's code, but the XFree86 mouse and -keyboard code directly call mi, and I do not want to maintain the XFree86 -mouse and keyboard code. - -Since we cannot support a monolithic multi-screen server using all of the -x11r4 contributed code yet, all multi screen code was deleted. This includes -one header file containing a nasty copyright statement. - -Since glyph handling has changed between X11R4 and X11R5, the code handling -glyphs was replaced by appropriate calls to mi. -I hope it can be modified and put back one day. - -Provisionally, some code was added (viz. file vga/offscreen.c) to intercept -calls to the rectangle drawing code when we are switched out of the VT. -I hope this can be replaced by some window tree invalidation and GC validation -scheme. - - -Section 2: BUGS - -This section describes fixed and still unfixed bugs in this code. -All bugs not labeled otherwise also occur in IBM's X11R4 code, and may be of -interest to anybody using that code. - -1. (Fixed.) -I found (and provisionally fixed) a bug in the IBM bitblit code: -In file ddx/ibm/vga/vgaImages.c a function vgaReadColorImage is defined. -When this function is used to read less than 8 pixels starting on a byte -boundary it will always read precisely 8 pixels. -Thus, when space is allocated for 4 or less pixels, it will write beyond -the allocated space. -Since the code is rather convoluted, this may not be apparent at first sight, -but going through the code with an example shows the error. - -2. (Fixed.) -In ppcPixmapFS.c, function ppcStipplePixmapFS there was a bug -regarding the stipple origin: The horizontal origin is added while -the vertical one is subtracted. The horizontal origin should be subtracted -instead of added here. -This bug gets visible when backing-store is enabled and one uses twm: -the submenu icons get truncated on their left hand side. -(In case you wonder why this bug appears: under those circumstances -twm prepares its menus by drawing into an unmapped window. -The miCopyPlane function uses the ppcStipplePixmap (and many others) -to get the plane copied.) -I also fixed this bug in the other routines (ppcOpStipplePixmapFS, -ppcTilePixmapFS) in this file, although I had no visible clues for this. -I hope this is appropriate. - -3. (Fixed.) -I find it suspect that ppcSetSpans gives different output when one -claims that an actually sorted list of spans is unsorted. -The unsorted code is wrong, and should be made to look more like the sorted -code. I.e., use ( xStart - ppt->x ) instead of ( xStart - pbox->x1 ) - -4. (Fixed.) -There used to be another bug that became visible when using twm and backing -store: popping up a submenu, and moving the cursor upwards til it leaves the -submenu, the submenu would disappears, as it should. -But the submenu icon would not get restored, while it should be. -10b. By replacing the clip-computing code in ppcValidateGC by that in -cfbValidateGC, I *finally* fixed the disappearing twm menu icon problem. - -5. Added mfbRegisterCopyplaneProc call. [Its omission was an error on my - part.] - Fixing a server core dump in XTest. - -6. Fixed not-very-high tile bug in function ppcTileRect, file emulTile.c - (I.e., if the tile was higher than the area to be tiled, far too much - was drawn, causing server core dumps in XTest.) - Actually, "savey" ought to be used to determine the height of the tiles in - the top line to be tiled, instead of "pTile->drawable.height". -7. A use of height where width was intended was fixed in ppcTileRect: - "savehcount = w / pTile->drawable.height;" should use "... .width" and - "savehcount = ( x + w - htarget ) / pTile->drawable.height;" too. - -8. Deleted overly clever code in ppcCReduce.c - (All code that tried to pre-compute how alu's could be replaced by - other alu's with inverted colors, etc. was deleted. I think it is - at least wrong for FillSolid.) - -9. Looked at suspicious code in ppcSetSp.c - "tmpx = *pdst;" was never updated during the loop. We took it out of the - initialization position of the for and moved it into the loop. - -10. Add xSrc := GC->patOrg.x + pDrawable.x and ySrc := ... in ppcPixmapFS.c, - functions ppcStipplePixmapFS, ppcOpStipplePixmapFS, and ppcTilePixmapFS. - This because stipple and tile origins are taken relative to the drawable. - Also use a "modulo" function that gets the cases of a negative stipple - or tile offset right. (When the stipple origin is to the right of or - below the origin of the drawable.) - -11. File vgaSolid.c, function vgaFillSolid: - Inverting is XORing with all ones. Not with the color we want to AND/OR - later. So we'll have to set the color to VGA_ALLPLANES - whenever we want to invert existing data, and reset it before the - AND/OR is done. - Also we replaced an outb( 0x3CF, tmp2 ) by the SetVideoGraphicsData( tmp2 ) - it is representing. (Just a cosmetic replacement.) - -12. File vgaImages, function vgaDrawColorImage. - Moved a line "invert_existing_data = TRUE;" two lines down, past a case - label. Now it is also part of the code executed for GXorReverse, as it - should be. - -13. The pixmap FillSpans routines (file ppcPixmapFS.c) got somewhat better - after importing some code from ddx/ibm/vga. (A getbits function that does - wrapping.) - They were wrong for the FillStippled and FillOpaqueStippled modes. - I don't understand the old code. How could it handle stipples of a size not - an exact multiple of 32? (or 8, for that matter.) - -14. In function vgaBitBlt file vgaBitBlt.c, in the shortcuts for - GXSet, GXClear and GXInvert, the source (x0,y0) is accidentally operated - upon by vgaFillSolid, instead of the destination (x1,y1). - -15. Notice that in DoMonoSingle and DoMonoMany in file vgaStipple.c, the left - edge of the square to be stippled is treated wrong. - Correct would be to get the bits with getbits using offset xshift, and - to shift them right (x & 07) places. - [One might wish to use the variable tmp1 at this place, since it had been - set to (x & 07) at this place; but that is already re-used at this point.] - Also note that NeedValX is set wrong: The implicit assumption was that - stipples are more than 8 wide. - This only fixes the problem when miPushPixel is used instead of ppcPushPixel. - I think I should look some more into this. - -16. I took out some code of the CopyArea function, in which a no-op function - was called while a real one was needed. My fix does not completely work, - although it improved the behaviour of GetImage somewhat. - -17. After finding three kinds of errors in this single function, - -- the new kinds being the right side not being always written due to - an incorrect if scope, and the lower end not always being written due - to variables being updated at the wrong place -- - (requiring modifications to be made at at least 10 places, - I decided to REWRITE the body of the ppcTileRect function from scratch. - This version simply computes all relevant margins in advance, and does - not try to reuse temporary variables. I leave that to the compiler. - (This was a maintenance and robustness nightmare anyway.) - -MORE NOTES: - It is funny that there are two files in mi that require compilation - with the proper #defines ( -DXF86VGA16 in my case ): - Besides the obvious mibitblt.c, there is also mipushpxl.c. - - - -$XFree86: xc/programs/Xserver/hw/xfree86/xf4bpp/NOTES,v 1.1.2.2 1998/06/27 15:15:45 dawes Exp $ diff --git a/xorg-server/hw/xfree86/xf4bpp/OScompiler.h b/xorg-server/hw/xfree86/xf4bpp/OScompiler.h deleted file mode 100644 index 8a8bbb59c..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/OScompiler.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#ifndef __COMPILER_DEPENDANCIES__ -#define __COMPILER_DEPENDANCIES__ - -#define MOVE( src, dst, length ) memcpy( dst, src, length) -#define MAX(a,b) (((a)>(b))?(a):(b)) -#define MIN(a,b) (((a)<(b))?(a):(b)) -#define ABS(x) (((x)>0)?(x):-(x)) - -#include "misc.h" -#include "compiler.h" - -#ifdef lint -/* So that lint doesn't complain about constructs it doesn't understand */ -#ifdef volatile -#undef volatile -#endif -#define volatile -#ifdef const -#undef const -#endif -#define const -#ifdef signed -#undef signed -#endif -#define signed -#ifdef _ANSI_DECLS_ -#undef _ANSI_DECLS_ -#endif -#endif - -#endif /* !__COMPILER_DEPENDANCIES__ */ diff --git a/xorg-server/hw/xfree86/xf4bpp/emulOpStip.c b/xorg-server/hw/xfree86/xf4bpp/emulOpStip.c deleted file mode 100644 index 542e9d394..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/emulOpStip.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -/* ppc OpaqueStipple - * - * Based on the private stipple; does a foreground, and then an inverted - * on the background - * - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "OScompiler.h" -#include "mfbmap.h" -#include "mfb.h" - -void -xf4bppOpaqueStipple( pWin, pStipple, fg, bg, alu, planes, x, y, w, h, xSrc, ySrc ) -WindowPtr pWin; /* GJA */ -register PixmapPtr pStipple ; -unsigned long int fg ; -unsigned long int bg ; -int alu ; -unsigned long int planes ; -register int x, y, w, h ; -int xSrc, ySrc ; -{ - /* DO BACKGROUND */ - switch ( alu ) { - /* Easy Cases -- i.e. Final Result Doesn't Depend On Initial Dest. */ - case GXclear: /* 0x0 Zero 0 */ - case GXset: /* 0xf 1 */ - /* Foreground And Background Are Both The Same !! */ - xf4bppFillSolid( pWin, bg, alu, planes, x, y, w, h ) ; - case GXnoop: /* 0x5 dst */ - break ; - case GXcopy: /* 0x3 src */ - case GXcopyInverted: /* 0xc NOT src */ - { /* Special Case Code */ - register int vtarget, htarget ; - - /* We Can Draw Just One Copy Then Blit The Rest !! */ - /* Draw The One Copy */ - htarget = MIN( w, pStipple->drawable.width ) ; - vtarget = MIN( h, pStipple->drawable.height ) ; - - /* First The Background */ - xf4bppFillSolid( pWin, bg, alu, planes, x, y, - htarget, vtarget ) ; - /* Then The Foreground */ - xf4bppFillStipple( pWin, pStipple, fg, alu, planes, - x, y, htarget, vtarget, - xSrc, ySrc ) ; - - /* Here We Double The Size Of The BLIT Each Iteration */ - xf4bppReplicateArea(pWin, x, y, planes, w, h, htarget, vtarget); - } - break ; - default: - /* Hard Cases -- i.e. Final Result DOES Depend On Initial Dest. */ - { /* Do The Background */ - register int i, j; - register PixmapPtr pInvPixmap = xf4bppCopyPixmap( pStipple ) ; - register unsigned char *data = pInvPixmap->devPrivate.ptr ; - - /* INVERT PIXMAP OK, jeff, this is for you */ - for ( i = pInvPixmap->drawable.height ; i-- ; ) - for ( j = pInvPixmap->devKind ; j-- ; data++ ) - *data = ~ ( *data ) ; - - xf4bppFillStipple( pWin, pInvPixmap, bg, alu, planes, x, y, w, h, xSrc, ySrc ); - mfbDestroyPixmap( pInvPixmap ) ; - /* DO FOREGROUND */ - xf4bppFillStipple( pWin, pStipple, fg, alu, planes, x, y, w, h, xSrc, ySrc ); - } - break ; - } - return; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/emulRepAre.c b/xorg-server/hw/xfree86/xf4bpp/emulRepAre.c deleted file mode 100644 index 20fff1e0c..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/emulRepAre.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -/* ppc Replicate Area -- A Divide & Conquer Algorithm - * a "ppc" Helper Function For Stipples And Tiling - * P. Shupak 1/88 - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" - -void xf4bppReplicateArea( pWin, x, y, planeMask, goalWidth, goalHeight, - currentHoriz, currentVert) -WindowPtr pWin; /* GJA */ -register int x, y, planeMask ; -int goalWidth, goalHeight ; -int currentHoriz, currentVert ; -{ - for ( ; - currentHoriz <= ( goalWidth >> 1 ) ; - currentHoriz <<= 1 ) { - xf4bppBitBlt( pWin, GXcopy, planeMask, - x, y, - x + currentHoriz, y, - currentHoriz, currentVert ) ; - } - if ( goalWidth - currentHoriz ) - xf4bppBitBlt( pWin, GXcopy, planeMask, - x, y, - x + currentHoriz, y, - goalWidth - currentHoriz, currentVert ) ; - for ( ; - currentVert <= ( goalHeight >> 1 ) ; - currentVert <<= 1 ) { - xf4bppBitBlt( pWin, GXcopy, planeMask, - x, y, - x, y + currentVert, - goalWidth, currentVert ) ; - } - if ( goalHeight - currentVert ) - xf4bppBitBlt( pWin, GXcopy, planeMask, - x, y, - x, y + currentVert, - goalWidth, goalHeight - currentVert ) ; -return ; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/emulTile.c b/xorg-server/hw/xfree86/xf4bpp/emulTile.c deleted file mode 100644 index 2f2a758f2..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/emulTile.c +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -/* ppc Tile - * P. Shupak 11/87 - * Modified From original ppc Tile - * T. Paquin 9/87 - * Uses private imageFill a bunch of times - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "OScompiler.h" -#include "ibmTrace.h" - -static void -DrawFirstTile -( - WindowPtr pWin, /* GJA */ - register PixmapPtr pTile, - register int x, - register int y, - int w, - int h, - int alu, - unsigned long int planes, - int xOffset, - int yOffset -) -{ -register int htarget ; -register int vtarget ; - - if ( xOffset ) { /* Not X-Aligned */ - if ( yOffset ) { /* Nor Y-Aligned */ - htarget = MIN( pTile->drawable.width - xOffset, w ), - vtarget = MIN( pTile->drawable.height - yOffset, h ), - yOffset *= pTile->devKind ; - xf4bppDrawColorImage( pWin,x, y, - htarget, - vtarget, - (unsigned char *)pTile->devPrivate.ptr + yOffset + xOffset, - pTile->devKind, - alu, planes ) ; - if ( w > htarget ) { - w = MIN( w, pTile->drawable.width ) ; - if ( h > vtarget ) { - h = MIN( h, pTile->drawable.height ) ; - xf4bppDrawColorImage( pWin, x, y + vtarget, - htarget, - h - vtarget, - (unsigned char *)pTile->devPrivate.ptr + xOffset, - pTile->devKind, - alu, planes ) ; - xf4bppDrawColorImage( pWin, x + htarget, y, - w - htarget, - vtarget, - (unsigned char *)pTile->devPrivate.ptr + yOffset, - pTile->devKind, - alu, planes ) ; - xf4bppDrawColorImage( pWin, x + htarget, - y + vtarget, - w - htarget, - h - vtarget, - pTile->devPrivate.ptr, - pTile->devKind, - alu, planes ) ; - } - else { /* h <= vtarget */ - xf4bppDrawColorImage( pWin, x + htarget, y, - w - htarget, - vtarget, - (unsigned char *)pTile->devPrivate.ptr + yOffset, - pTile->devKind, - alu, planes ) ; - } - } - else if ( h > vtarget ) { - xf4bppDrawColorImage( pWin, x, y + vtarget, - htarget, - MIN( h, pTile->drawable.height ) - vtarget, - (unsigned char *)pTile->devPrivate.ptr + xOffset, - pTile->devKind, - alu, planes ) ; - vtarget = pTile->drawable.height ; - } - } - else { /* No Y Offset */ - xf4bppDrawColorImage( pWin, x, y, - htarget = MIN( pTile->drawable.width - xOffset, w ), - vtarget = MIN( pTile->drawable.height, h ), - (unsigned char *)pTile->devPrivate.ptr + xOffset, - pTile->devKind, - alu, planes ) ; - if ( w > htarget ) { - xf4bppDrawColorImage( pWin, x + htarget, y, - MIN( pTile->drawable.width, w ) - htarget, - vtarget, - pTile->devPrivate.ptr, - pTile->devKind, - alu, planes ) ; - } - } - } - else if ( yOffset ) { - xf4bppDrawColorImage( pWin, x, y, - htarget = MIN( pTile->drawable.width, w ), - vtarget = MIN( pTile->drawable.height - yOffset, h ), - (unsigned char *)pTile->devPrivate.ptr + ( yOffset * pTile->devKind ), - pTile->devKind, - alu, planes ) ; - if ( h > vtarget ) { - xf4bppDrawColorImage( pWin, x, y + vtarget, - htarget, - MIN( pTile->drawable.height, h ) - vtarget, - pTile->devPrivate.ptr, - pTile->devKind, - alu, planes ) ; - } - } - else { /* NO Offset */ - xf4bppDrawColorImage( pWin, x, y, - htarget = MIN( pTile->drawable.width, w ), - vtarget = MIN( pTile->drawable.height, h ), - pTile->devPrivate.ptr, - pTile->devKind, - alu, planes ) ; - } - - return ; -} - -/* GJA -- - * After finding three kinds of errors in this single function, - * (requiring modifications to be made at at least 10 places, - * I decided to REWRITE the body of the xf4bppTileRect function from scratch. - * This version simply computes all relevant margins in advance, and does - * not try to reuse temporary variables. I leave that to the compiler. - * (This was a maintenance and robustness nightmare anyway.) - * The code is pretty obvious: all margins, coordinates, and numbers of tiles - * are computed before drawing starts. - * Notice that the margins consist of incompletely drawn tiles. Therefore - * we need offsets in the data for the left and upper margins. - * The right and lower margins are also incomplete, but start at offset 0 - * in the data. They just end at awkward offsets. - * The center block, by definition, consists of fully drawn tiles. - * Perhaps we could leave out some if's. But why bother? It would decrease - * robustness. - */ -void -xf4bppTileRect( pWin, pTile, alu, planes, x0, y0, w, h, xSrc, ySrc ) -WindowPtr pWin; /* GJA */ -register PixmapPtr pTile ; -const int alu ; -const unsigned long int planes ; -register int x0, y0, w, h ; -int xSrc ; -int ySrc ; -{ -int xOffset ; -int yOffset ; -int width, height; - -TRACE( ( "xf4bppTileRect(pTile=x%x,alu=x%x,planes=x%02x,x0=%d,y0=%d,w=%d,h=%d,xSrc=%d,ySrc=%d\n", - pTile, alu, planes, x0, y0, w, h, xSrc, ySrc ) ) ; - - switch ( alu ) { - case GXclear: /* 0x0 Zero 0 */ - case GXinvert: /* 0xa NOT dst */ - case GXset: /* 0xf 1 */ - xf4bppFillSolid - ( pWin, 0xFF, alu, planes, x0, y0, w, h ) ; - case GXnoop: /* 0x5 dst */ - return ; - default: - break ; -} - - width = pTile->drawable.width; - if ( ( xOffset = ( x0 - xSrc ) ) > 0 ) - xOffset %= width ; - else - xOffset = width - (( - xOffset ) % width ) ; - if ( xOffset == width ) xOffset = 0; /* For else case */ - - height = pTile->drawable.height; - if ( ( yOffset = ( y0 - ySrc ) ) > 0 ) - yOffset %= height ; - else - yOffset = height - (( - yOffset ) % height ) ; - if ( yOffset == height ) yOffset = 0; /* For else case */ - - switch ( alu ) { - case GXcopyInverted: /* 0xc NOT src */ - case GXcopy: /* 0x3 src */ - /* Special Case Code */ - DrawFirstTile( pWin, pTile, x0, y0, w, h, - alu, planes, xOffset, yOffset ) ; - /* Here We Double The Size Of The BLIT Each Iteration */ - xf4bppReplicateArea( pWin, x0, y0, planes, w, h, - MIN( w, pTile->drawable.width ), - MIN( h, pTile->drawable.height ) ) ; - break ; - case GXnor: /* 0x8 NOT src AND NOT dst */ - case GXandReverse: /* 0x2 src AND NOT dst */ - case GXorReverse: /* 0xb src OR NOT dst */ - case GXnand: /* 0xe NOT src OR NOT dst */ - case GXandInverted: /* 0x4 NOT src AND dst */ - case GXand: /* 0x1 src AND dst */ - case GXequiv: /* 0x9 NOT src XOR dst */ - case GXxor: /* 0x6 src XOR dst */ - case GXorInverted: /* 0xd NOT src OR dst */ - case GXor: /* 0x7 src OR dst */ - default: - { - register unsigned char *data ; - register int hcount, vcount ; /* Number of tiles in center */ - int xcount, ycount; /* Temporaries */ - int x1, y1; /* Left upper corner of center */ - int x2, y2; /* Left upper corner of lower right margin */ - int leftmgn, rightmgn, topmgn, botmgn; /* Margins */ - - int htarget, vtarget ; - - data = pTile->devPrivate.ptr; - - /* Compute the various sizes and coordinates. */ - leftmgn = MIN( w, width - xOffset ) ; - x1 = x0 + leftmgn; - topmgn = MIN( h, height - yOffset ) ; - y1 = y0 + topmgn; - - rightmgn = (w - leftmgn) % width; - hcount = (w - leftmgn) / width; - x2 = x0 + w - rightmgn; - botmgn = (h - topmgn) % height; - vcount = (h - topmgn) / height; - y2 = y0 + h - botmgn; - - /* We'll use yOffset as offset in data. - * This requires yOffset != height (ditto xOffset). - */ - yOffset *= pTile->devKind; - - /* Draw top margin, including corners */ - if ( topmgn ) { - if ( leftmgn ) { - xf4bppDrawColorImage( pWin, x0, y0, leftmgn, topmgn, - data + yOffset + xOffset, - pTile->devKind, alu, planes ) ; - } - for ( xcount = hcount, htarget = x1; - xcount ; - xcount--, htarget += width ) - { - xf4bppDrawColorImage( pWin, htarget, y0, width, topmgn, - data + yOffset, - pTile->devKind, alu, planes ) ; - } - if ( rightmgn ) { - xf4bppDrawColorImage( pWin, x2, y0, rightmgn, topmgn, - data + yOffset, - pTile->devKind, alu, planes ) ; - } - } - - /* Draw bottom margin, including corners */ - if ( botmgn ) { - if ( leftmgn ) { - xf4bppDrawColorImage( pWin, x0, y2, leftmgn, botmgn, - data + xOffset, - pTile->devKind, alu, planes ) ; - } - for ( xcount = hcount, htarget = x1; - xcount ; - xcount--, htarget += width ) - { - xf4bppDrawColorImage( pWin, htarget, y2, width, botmgn, - data, - pTile->devKind, alu, planes ) ; - } - if ( rightmgn ) { - xf4bppDrawColorImage( pWin, x2, y2, rightmgn, botmgn, - data, - pTile->devKind, alu, planes ) ; - } - } - - /* Draw left margin, excluding corners */ - if ( leftmgn ) { - for ( ycount = vcount, vtarget = y1 ; - ycount ; - ycount--, vtarget += height ) - { - xf4bppDrawColorImage( pWin, x0, vtarget, leftmgn, height, - data + xOffset, - pTile->devKind, alu, planes ) ; - } - } - - /* Draw right margin, excluding corners */ - if ( rightmgn ) { - for ( ycount = vcount, vtarget = y1 ; - ycount ; - ycount--, vtarget += height ) - { - xf4bppDrawColorImage( pWin, x2, vtarget, rightmgn, height, - data, - pTile->devKind, alu, planes ) ; - } - } - - /* Draw center consisting of full tiles */ - for ( ycount = vcount, vtarget = y1 ; - ycount ; - ycount--, vtarget += height ) - { - for ( xcount = hcount, htarget = x1 ; - xcount ; - xcount--, htarget += width ) - { - xf4bppDrawColorImage( pWin, htarget, vtarget, width, height, - data, - pTile->devKind, alu, planes ) ; - - } - } - } } /* Block + switch */ -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ibmTrace.h b/xorg-server/hw/xfree86/xf4bpp/ibmTrace.h deleted file mode 100644 index f1d88406d..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ibmTrace.h +++ /dev/null @@ -1 +0,0 @@ -#define TRACE(x) /* empty */ diff --git a/xorg-server/hw/xfree86/xf4bpp/mfbbres.c b/xorg-server/hw/xfree86/xf4bpp/mfbbres.c deleted file mode 100644 index 09d7ee288..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/mfbbres.c +++ /dev/null @@ -1,164 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ -/* GJA -- modified this file for vga16 */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "OScompiler.h" -#include "mfbmap.h" -#include "mfb.h" -#include "maskbits.h" -#include "miline.h" -#include "wm3.h" - -/* Solid bresenham line */ -/* NOTES - e2 is used less often than e1, so it's not in a register -*/ - -void -xf4bppBresS(addrlbase, nlwidth, signdx, signdy, axis, x1, y1, e, e1, e2, len) -PixelType *addrlbase; /* pointer to base of bitmap */ -int nlwidth; /* width in longwords of bitmap */ -int signdx, signdy; /* signs of directions */ -int axis; /* major axis (Y_AXIS or X_AXIS) */ -int x1, y1; /* initial point */ -register int e; /* error accumulator */ -register int e1; /* bresenham increments */ -int e2; -int len; /* length of line */ -{ - register int yinc; /* increment to next scanline, in bytes */ - register PixelType *addrl; /* bitmask long pointer - *dont* * cast to char pointer */ - register PixelType bit; /* current bit being set/cleared/etc. */ - PixelType leftbit = mfbGetmask(0); /* leftmost bit to process in new word */ - PixelType rightbit = mfbGetmask(PPW-1); /* rightmost bit to process in new word */ - - register int e3 = e2-e1; - - /* point to longword containing first point */ - addrl = mfbScanline(addrlbase, x1, y1, nlwidth); - yinc = signdy * nlwidth; - e = e-e1; /* to make looping easier */ - bit = mfbGetmask(x1 & PIM); - - if (!len) - return; - - if (axis == X_AXIS) - { - if (signdx > 0) - { - while(len--) - { - UPDRW(addrl,bit); - e += e1; - if (e >= 0) - { - addrl += yinc; - e += e3; - } - bit = SCRRIGHT(bit,1); - if (!bit) { bit = leftbit; addrl++; } - } - } - else - { - while(len--) - { - UPDRW(addrl,bit); - e += e1; - if (e >= 0) - { - addrl += yinc; - e += e3; - } - bit = SCRLEFT(bit,1); - if (!bit) { bit = rightbit; addrl--; } - } - } - } /* if X_AXIS */ - else - { - if (signdx > 0) - { - while(len--) - { - UPDRW(addrl,bit); - e += e1; - if (e >= 0) - { - bit = SCRRIGHT(bit,1); - if (!bit) { bit = leftbit; addrl++; } - e += e3; - } - addrl += yinc; - } - } - else - { - while(len--) - { - UPDRW(addrl,bit); - e += e1; - if (e >= 0) - { - bit = SCRLEFT(bit,1); - if (!bit) { bit = rightbit; addrl--; } - e += e3; - } - addrl += yinc; - } - } - } /* else Y_AXIS */ -} diff --git a/xorg-server/hw/xfree86/xf4bpp/mfbbresd.c b/xorg-server/hw/xfree86/xf4bpp/mfbbresd.c deleted file mode 100644 index 318d4f5da..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/mfbbresd.c +++ /dev/null @@ -1,205 +0,0 @@ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ -/* GJA -- modified this file for vga16 */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "OScompiler.h" -#include "mfbmap.h" -#include "mfb.h" -#include "maskbits.h" -#include "miline.h" -#include "wm3.h" -#include "xf86.h" - -/* Dashed bresenham line */ - -#define NO_INK (-1) /* GJA -- means: dash is off */ - -#define StepDash\ - if (!--dashRemaining) { \ - if (++ dashIndex == numInDashList) \ - dashIndex = 0; \ - dashRemaining = pDash[dashIndex]; \ - ink = fgink; \ - if (dashIndex & 1) \ - ink = bgink; \ - if (isDoubleDash) \ - WM3_SET_INK(ink); \ - } - -void -xf4bppBresD(pDrawable, fgink, bgink, - pdashIndex, pDash, numInDashList, pdashOffset, isDoubleDash, - addrlbase, nlwidth, - signdx, signdy, axis, x1, y1, e, e1, e2, len) -DrawablePtr pDrawable; -int fgink, bgink; -int *pdashIndex; /* current dash */ -unsigned char *pDash; /* dash list */ -int numInDashList; /* total length of dash list */ -int *pdashOffset; /* offset into current dash */ -int isDoubleDash; -PixelType *addrlbase; /* pointer to base of bitmap */ -int nlwidth; /* width in longwords of bitmap */ -int signdx, signdy; /* signs of directions */ -int axis; /* major axis (Y_AXIS or X_AXIS) */ -int x1, y1; /* initial point */ -register int e; /* error accumulator */ -register int e1; /* bresenham increments */ -int e2; -int len; /* length of line */ -{ - IOADDRESS REGBASE = - xf86Screens[pDrawable->pScreen->myNum]->domainIOBase + 0x300; - register int yinc; /* increment to next scanline, in bytes */ - register PixelType *addrl; - register int e3 = e2-e1; - register unsigned long bit; - PixelType leftbit = mfbGetmask(0); /* leftmost bit to process in new word */ - PixelType rightbit = mfbGetmask(PPW-1); /* rightmost bit to process in new word */ - int dashIndex; - int dashOffset; - int dashRemaining; - int ink; - - fgink &= 0x0F; bgink &= 0x0F; /* GJA -- so they're != NO_INK */ - - dashOffset = *pdashOffset; - dashIndex = *pdashIndex; - dashRemaining = pDash[dashIndex] - dashOffset; - ink = fgink; - if (!isDoubleDash) - bgink = NO_INK; - if (dashIndex & 1) - ink = bgink; - if ( ink != NO_INK ) WM3_SET_INK(ink); - - /* point to longword containing first point */ - addrl = mfbScanline(addrlbase, x1, y1, nlwidth); - yinc = signdy * nlwidth; - e = e-e1; /* to make looping easier */ - bit = mfbGetmask(x1 & PIM); - if (axis == X_AXIS) - { - if (signdx > 0) - { - while(len--) - { - if ( ink != NO_INK ) UPDRW(addrl,bit); - e += e1; - if (e >= 0) - { - addrl += yinc; - e += e3; - } - bit = SCRRIGHT(bit,1); - if (!bit) { bit = leftbit; addrl++; } - StepDash - } - } - else - { - while(len--) - { - - if ( ink != NO_INK ) UPDRW(addrl,bit); - e += e1; - if (e >= 0) - { - addrl += yinc; - e += e3; - } - bit = SCRLEFT(bit,1); - if (!bit) { bit = rightbit; addrl--; } - StepDash - } - } - } /* if X_AXIS */ - else - { - if (signdx > 0) - { - while(len--) - { - if ( ink != NO_INK ) UPDRW(addrl,bit); - e += e1; - if (e >= 0) - { - bit = SCRRIGHT(bit,1); - if (!bit) { bit = leftbit; addrl++; } - e += e3; - } - addrl += yinc; - StepDash - } - } - else - { - while(len--) - { - - if ( ink != NO_INK ) UPDRW(addrl,bit); - e += e1; - if (e >= 0) - { - bit = SCRLEFT(bit,1); - if (!bit) { bit = rightbit; addrl--; } - e += e3; - } - addrl += yinc; - StepDash - } - } - } /* else Y_AXIS */ - *pdashIndex = dashIndex; - *pdashOffset = pDash[dashIndex] - dashRemaining; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/mfbfillarc.c b/xorg-server/hw/xfree86/xf4bpp/mfbfillarc.c deleted file mode 100644 index 89aeadd2b..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/mfbfillarc.c +++ /dev/null @@ -1,301 +0,0 @@ -/************************************************************ - -Copyright (c) 1989 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -********************************************************/ - -/* GJA -- Took mfb code and modified it. */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "OScompiler.h" -#include "mfbmap.h" -#include "mfb.h" -#include "maskbits.h" -#include "mi.h" -#include "mifillarc.h" -#include "wm3.h" - -#include "xf86str.h" /* for pScrn->vtSema */ -extern ScrnInfoPtr *xf86Screens; - -static void -v16FillEllipseSolid -( - DrawablePtr pDraw, - xArc *arc -) -{ - int x, y, e; - int yk, xk, ym, xm, dx, dy, xorg, yorg; - register int slw; - miFillArcRec info; - int *addrlt, *addrlb; - register int *addrl; - register int n; - int nlwidth; - register int xpos; - int startmask, endmask, nlmiddle; - - if (pDraw->type == DRAWABLE_WINDOW) - { - addrlt = (int *) - (((PixmapPtr)(pDraw->pScreen->devPrivate))->devPrivate.ptr); - nlwidth = (int) - (((PixmapPtr)(pDraw->pScreen->devPrivate))->devKind) >> 2; - } - else - { - addrlt = (int *)(((PixmapPtr)pDraw)->devPrivate.ptr); - nlwidth = (int)(((PixmapPtr)pDraw)->devKind) >> 2; - } - - miFillArcSetup(arc, &info); - MIFILLARCSETUP(); - xorg += pDraw->x; - yorg += pDraw->y; - addrlb = addrlt; - addrlt += nlwidth * (yorg - y); - addrlb += nlwidth * (yorg + y + dy); - while (y) - { - addrlt += nlwidth; - addrlb -= nlwidth; - MIFILLARCSTEP(slw); - if (!slw) - continue; - xpos = xorg - x; - addrl = addrlt + (xpos >> PWSH); - if (((xpos & PIM) + slw) < PPW) - { - maskpartialbits(xpos, slw, startmask); - UPDRW(addrl,startmask); - if (miFillArcLower(slw)) - { - addrl = addrlb + (xpos >> PWSH); - UPDRW(addrl,startmask); - } - continue; - } - maskbits(xpos, slw, startmask, endmask, nlmiddle); - if (startmask) - { - UPDRW(addrl,startmask); addrl++; - } - n = nlmiddle; - while (n--) { - UPDRW(addrl,~0); addrl++; - } - if (endmask) - { - UPDRW(addrl,endmask); - } - if (!miFillArcLower(slw)) - continue; - addrl = addrlb + (xpos >> PWSH); - if (startmask) - { - UPDRW(addrl,startmask); addrl++; - } - n = nlmiddle; - while (n--) { - UPDRW(addrl,~0); addrl++; - } - if (endmask) - { - UPDRW(addrl,endmask); - } - } -} - -#define FILLSPAN(xl,xr,addr) \ - if (xr >= xl) \ - { \ - width = xr - xl + 1; \ - addrl = addr + (xl >> PWSH); \ - if (((xl & PIM) + width) < PPW) \ - { \ - maskpartialbits(xl, width, startmask); \ - UPDRW(addrl,startmask); \ - } \ - else \ - { \ - maskbits(xl, width, startmask, endmask, nlmiddle); \ - if (startmask) \ - { \ - UPDRW(addrl,startmask); addrl++; \ - } \ - n = nlmiddle; \ - while (n--) { \ - UPDRW(addrl,~0); addrl++; \ - } \ - if (endmask) \ - { \ - UPDRW(addrl,endmask); \ - } \ - } \ - } - -#define FILLSLICESPANS(flip,addr) \ - if (!flip) \ - { \ - FILLSPAN(xl, xr, addr); \ - } \ - else \ - { \ - xc = xorg - x; \ - FILLSPAN(xc, xr, addr); \ - xc += slw - 1; \ - FILLSPAN(xl, xc, addr); \ - } - -static void -v16FillArcSliceSolidCopy -( - DrawablePtr pDraw, - GCPtr pGC, - xArc *arc -) -{ - register int *addrl; - register int n; - int yk, xk, ym, xm, dx, dy, xorg, yorg, slw; - register int x, y, e; - miFillArcRec info; - miArcSliceRec slice; - int xl, xr, xc; - int *addrlt, *addrlb; - int nlwidth; - int width; - int startmask, endmask, nlmiddle; - - if (pDraw->type == DRAWABLE_WINDOW) - { - addrlt = (int *) - (((PixmapPtr)(pDraw->pScreen->devPrivate))->devPrivate.ptr); - nlwidth = (int) - (((PixmapPtr)(pDraw->pScreen->devPrivate))->devKind) >> 2; - } - else - { - addrlt = (int *)(((PixmapPtr)pDraw)->devPrivate.ptr); - nlwidth = (int)(((PixmapPtr)pDraw)->devKind) >> 2; - } - - miFillArcSetup(arc, &info); - miFillArcSliceSetup(arc, &slice, pGC); - MIFILLARCSETUP(); - xorg += pDraw->x; - yorg += pDraw->y; - addrlb = addrlt; - addrlt += nlwidth * (yorg - y); - addrlb += nlwidth * (yorg + y + dy); - slice.edge1.x += pDraw->x; - slice.edge2.x += pDraw->x; - while (y > 0) - { - addrlt += nlwidth; - addrlb -= nlwidth; - MIFILLARCSTEP(slw); - MIARCSLICESTEP(slice.edge1); - MIARCSLICESTEP(slice.edge2); - if (miFillSliceUpper(slice)) - { - MIARCSLICEUPPER(xl, xr, slice, slw); - FILLSLICESPANS(slice.flip_top, addrlt); - } - if (miFillSliceLower(slice)) - { - MIARCSLICELOWER(xl, xr, slice, slw); - FILLSLICESPANS(slice.flip_bot, addrlb); - } - } -} - -static void -xf4bppPolyFillArcSolid -( - register DrawablePtr pDraw, - GCPtr pGC, - int narcs, - xArc *parcs -) -{ - register xArc *arc; - register int i; - BoxRec box; - RegionPtr cclip; -#if 0 - mfbPrivGC *priv; - int rop; - - priv = (mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates, - mfbGetGCPrivateKey()); - rop = priv->rop; - if ((rop == RROP_NOP) || !(pGC->planemask & 1)) -#else - if ( !(pGC->planemask & 0x0F)) -#endif - return; - cclip = pGC->pCompositeClip; - for (arc = parcs, i = narcs; --i >= 0; arc++) - { - if (miFillArcEmpty(arc)) - continue; - if (miCanFillArc(arc)) - { - box.x1 = arc->x + pDraw->x; - box.y1 = arc->y + pDraw->y; - box.x2 = box.x1 + (int)arc->width + 1; - box.y2 = box.y1 + (int)arc->height + 1; - if (RECT_IN_REGION(pDraw->pScreen, cclip, &box) == rgnIN) - { - if ((arc->angle2 >= FULLCIRCLE) || - (arc->angle2 <= -FULLCIRCLE)) - DO_WM3(pGC,v16FillEllipseSolid(pDraw, arc)) - else - DO_WM3(pGC,v16FillArcSliceSolidCopy(pDraw, pGC, arc)) - continue; - } - } - miPolyFillArc(pDraw, pGC, 1, arc); - } -} - -void -xf4bppPolyFillArc(pDraw, pGC, narcs, parcs) - register DrawablePtr pDraw; - GCPtr pGC; - int narcs; - xArc *parcs; -{ - if ( !xf86Screens[pDraw->pScreen->myNum]->vtSema || (pGC->fillStyle != FillSolid) ) { - miPolyFillArc(pDraw, pGC, narcs, parcs); - } else { - xf4bppPolyFillArcSolid(pDraw, pGC, narcs, parcs); - } -} diff --git a/xorg-server/hw/xfree86/xf4bpp/mfbhrzvert.c b/xorg-server/hw/xfree86/xf4bpp/mfbhrzvert.c deleted file mode 100644 index 3444f48f5..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/mfbhrzvert.c +++ /dev/null @@ -1,135 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ -/* GJA -- modified this file for vga16 */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "OScompiler.h" -#include "mfbmap.h" -#include "mfb.h" -#include "maskbits.h" -#include "wm3.h" - -/* horizontal solid line - abs(len) > 1 -*/ - -void -xf4bppHorzS(addrl, nlwidth, x1, y1, len) -register PixelType *addrl; /* pointer to base of bitmap */ -register int nlwidth; /* width in longwords of bitmap */ -int x1; /* initial point */ -int y1; -int len; /* length of line */ -{ - register PixelType startmask; - register PixelType endmask; - register int nlmiddle; - - - /* force the line to go left to right - but don't draw the last point - */ - if (len < 0) - { - x1 += len; - x1 += 1; - len = -len; - } - - addrl = mfbScanline(addrl, x1, y1, nlwidth); - - /* all bits inside same longword */ - if ( ((x1 & PIM) + len) < PPW) - { - maskpartialbits(x1, len, startmask); - UPDRW(addrl,startmask); - } - else - { - maskbits(x1, len, startmask, endmask, nlmiddle); - if (startmask) { - UPDRW(addrl,startmask); addrl++; - } - Duff (nlmiddle, UPDRW(addrl,~0); addrl++); - if (endmask) { - UPDRW(addrl,endmask); - } - } -} - -/* vertical solid line - this uses do loops because pcc (Ultrix 1.2, bsd 4.2) generates - better code. sigh. we know that len will never be 0 or 1, so - it's OK to use it. -*/ - -void -xf4bppVertS(addrl, nlwidth, x1, y1, len) -register PixelType *addrl; /* pointer to base of bitmap */ -register int nlwidth; /* width in longwords of bitmap */ -int x1, y1; /* initial point */ -register int len; /* length of line */ -{ - register PixelType bitmask; - - addrl = mfbScanline(addrl, x1, y1, nlwidth); - - if (len < 0) - { - nlwidth = -nlwidth; - len = -len; - } - - bitmask = mfbGetmask(x1 & PIM); - Duff(len, UPDRW(addrl,bitmask); addrl += nlwidth); -} diff --git a/xorg-server/hw/xfree86/xf4bpp/mfbimggblt.c b/xorg-server/hw/xfree86/xf4bpp/mfbimggblt.c deleted file mode 100644 index 4f9561161..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/mfbimggblt.c +++ /dev/null @@ -1,505 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "OScompiler.h" -#include "mfbmap.h" -#include "mfb.h" -#include "maskbits.h" -#include "mi.h" -#include "dixfontstr.h" -#include "ppcGCstr.h" -#include "wm3.h" - -#include "xf86str.h" /* for pScrn->vtSema */ -extern ScrnInfoPtr *xf86Screens; - -/* - we should eventually special-case fixed-width fonts for ImageText. - - this works for fonts with glyphs <= 32 bits wide. - - the clipping calculations are done for worst-case fonts. -we make no assumptions about the heights, widths, or bearings -of the glyphs. if we knew that the glyphs are all the same height, -we could clip the tops and bottoms per clipping box, rather -than per character per clipping box. if we knew that the glyphs' -left and right bearings were wlle-behaved, we could clip a single -character at the start, output until the last unclipped -character, and then clip the last one. this is all straightforward -to determine based on max-bounds and min-bounds from the font. - there is some inefficiency introduced in the per-character -clipping to make what's going on clearer. - - (it is possible, for example, for a font to be defined in which the -next-to-last character in a font would be clipped out, but the last -one wouldn't. the code below deals with this.) - - Image text looks at the bits in the glyph and the fg and bg in the -GC. it paints a rectangle, as defined in the protocol dcoument, -and the paints the characters. - - to avoid source proliferation, this file is compiled -three times: - MFBIMAGEGLYPHBLT OPEQ - mfbImageGlyphBltWhite |= - mfbImageGlyphBltBlack &=~ - - the register allocations for startmask and endmask may not -be the right thing. are there two other deserving candidates? -xoff, pdst, pglyph, and tmpSrc seem like the right things, though. -*/ - -/* Forward declarations -- GJA */ -static void doImageGlyphBlt( - DrawablePtr, - GC *, - int, - int, - unsigned int, - CharInfoPtr *, - unsigned char *, - ExtentInfoRec * -); - -void -xf4bppImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) - DrawablePtr pDrawable; - GC *pGC; - int x, y; - unsigned int nglyph; - CharInfoPtr *ppci; /* array of character info */ - pointer pglyphBase; /* start of array of glyphs */ -{ - ExtentInfoRec info; /* used by QueryGlyphExtents() */ - xRectangle backrect;/* backing rectangle to paint. - in the general case, NOT necessarily - the same as the string's bounding box - */ - /* GJA -- I agree, this ALL should be moved to GC validation. */ - if ( (pDrawable->type != DRAWABLE_WINDOW) || (pGC->alu != GXcopy) || - !xf86Screens[pDrawable->pScreen->myNum]->vtSema || - ((pGC->font) && - (FONTMAXBOUNDS(pGC->font,rightSideBearing) - - FONTMINBOUNDS(pGC->font,leftSideBearing) > 32 || - FONTMINBOUNDS(pGC->font,characterWidth) < 0)) ) { - miImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); - } else { - ppcPrivGC *pPrivGC; - int oldfillStyle, oldfg, oldalu; - - if (!(pGC->planemask & 0x0F)) - return; - - QueryGlyphExtents(pGC->font, ppci, (unsigned long)nglyph, &info); - - backrect.x = x; - backrect.y = y - FONTASCENT(pGC->font); - backrect.width = info.overallWidth; - backrect.height = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); - - - pPrivGC = (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, - mfbGetGCPrivateKey()); - oldfillStyle = pPrivGC->colorRrop.fillStyle; /* GJA */ - oldfg = pPrivGC->colorRrop.fgPixel; /* GJA */ - oldalu = pPrivGC->colorRrop.alu; /* GJA */ - - pPrivGC->colorRrop.fillStyle = FillSolid; /* GJA */ - pPrivGC->colorRrop.fgPixel = pGC->bgPixel; /* GJA */ - pGC->fgPixel = pGC->bgPixel; - pPrivGC->colorRrop.alu = GXcopy; /* GJA */ - pGC->alu = GXcopy; - - /* Required fields: - * colorRrop.alu, colorRrop.planemask, colorRrop.fgPixel - */ - xf4bppPolyFillRect(pDrawable, pGC, 1, &backrect); - - pPrivGC->colorRrop.fgPixel = oldfg; /* GJA */ - pGC->fgPixel = oldfg; - - /* the faint-hearted can open their eyes now */ - - DO_WM3(pGC,doImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, - pglyphBase,&info)) - - pPrivGC->colorRrop.fillStyle = oldfillStyle; /* GJA */ - pPrivGC->colorRrop.alu = oldalu; /* GJA */ - pGC->alu = oldalu; - } - -} - -static void -doImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase,infop) - DrawablePtr pDrawable; - GC *pGC; - int x, y; - unsigned int nglyph; - CharInfoPtr *ppci; /* array of character info */ - unsigned char *pglyphBase; /* start of array of glyphs */ - ExtentInfoRec* infop; /* used by QueryGlyphExtents() */ -{ - BoxRec bbox; /* string's bounding box */ - - CharInfoPtr pci; - int xorg, yorg; /* origin of drawable in bitmap */ - int widthDst; /* width of dst in longwords */ - - /* these keep track of the character origin */ - CARD32 *pdstBase; - /* points to longword with character origin */ - int xchar; /* xorigin of char (mod 32) */ - - /* these are used for placing the glyph */ - register int xoff; /* x offset of left edge of glyph (mod 32) */ - register CARD32 *pdst; - /* pointer to current longword in dst */ - - int w; /* width of glyph in bits */ - int h; /* height of glyph */ - int widthGlyph; /* width of glyph, in bytes */ - register unsigned char *pglyph; - /* pointer to current row of glyph */ - - /* used for putting down glyph */ - register unsigned int tmpSrc; - /* for getting bits from glyph */ - register int startmask; - register int endmask; - - register int nFirst;/* bits of glyph in current longword */ - - xorg = pDrawable->x; - yorg = pDrawable->y; - if (pDrawable->type == DRAWABLE_WINDOW) - { - pdstBase = (CARD32 *) - (((PixmapPtr)(pDrawable->pScreen->devPrivate))->devPrivate.ptr); - widthDst = (int) - (((PixmapPtr)(pDrawable->pScreen->devPrivate))->devKind) >> 2; - } - else - { - pdstBase = (CARD32 *)(((PixmapPtr)pDrawable)->devPrivate.ptr); - widthDst = (int)(((PixmapPtr)pDrawable)->devKind) >> 2; - } - - x += xorg; - y += yorg; - bbox.x1 = x + infop->overallLeft; - bbox.x2 = x + infop->overallRight; - bbox.y1 = y - infop->overallAscent; - bbox.y2 = y + infop->overallDescent; - - /* UNCLEAN CODE - we know the mfbPolyFillRect uses only three fields in - devPrivate[mfbGetGCPrivateIndex()].ptr, two of which (the rotated - tile/stipple and the ropFillArea) are - irrelevant for solid filling, so we just poke the FillArea - field. the GC is now in an inconsistent state, but we'll fix - it as soon as PolyFillRect returns. fortunately, the server - is single threaded. - - NOTE: - if you are not using the standard mfbFillRectangle code, you - need to poke any fields in the GC the rectangle stuff need - (probably alu, fgPixel, and fillStyle) and in devPrivate[mfbGetGCPrivateIndex()].ptr - (probably rop or ropFillArea.) You could just call ValidateGC, - but that is usually not a cheap thing to do. - */ - - switch (RECT_IN_REGION(pGC->pScreen, pGC->pCompositeClip, &bbox)) - { - case rgnOUT: - break; - case rgnIN: - pdstBase = pdstBase + (widthDst * y) + (x >> PWSH); - xchar = x & PIM; - - while(nglyph--) - { - pci = *ppci; - pglyph = FONTGLYPHBITS(pglyphBase, pci); - w = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing; - h = pci->metrics.ascent + pci->metrics.descent; - widthGlyph = GLYPHWIDTHBYTESPADDED(pci); - - /* start at top scanline of glyph */ - pdst = pdstBase - (pci->metrics.ascent * widthDst); - - /* find correct word in scanline and x offset within it - for left edge of glyph - */ - xoff = xchar + pci->metrics.leftSideBearing; - if (xoff > PIM) - { - pdst++; - xoff &= PIM; - } - else if (xoff < 0) - { - xoff += PPW; - pdst--; - } - - if ((xoff + w) <= PPW) - { - /* glyph all in one longword */ - maskpartialbits(xoff, w, startmask); - - while (h--) - { - getleftbits(pglyph, w, tmpSrc); - UPDRW(pdst,(SCRRIGHT(tmpSrc, xoff) & startmask)); - pglyph += widthGlyph; - pdst += widthDst; - } - } - else - { - /* glyph crosses longword boundary */ - maskPPWbits(xoff, w, startmask, endmask); - nFirst = PPW - xoff; - while (h--) - { - getleftbits(pglyph, w, tmpSrc); - UPDRW(pdst,(SCRRIGHT(tmpSrc, xoff) & startmask)); - UPDRW(&(pdst[1]),(SCRLEFT(tmpSrc, nFirst) & endmask)); - pglyph += widthGlyph; - pdst += widthDst; - } - } /* glyph crosses longwords boundary */ - - /* update character origin */ - x += pci->metrics.characterWidth; - xchar += pci->metrics.characterWidth; - if (xchar > PLST) - { - xchar -= PPW; - pdstBase++; - } - else if (xchar < 0) - { - xchar += PPW; - pdstBase--; - } - ppci++; - } /* while nglyph-- */ - break; - case rgnPART: - { - TEXTPOS *ppos; - int nbox; - BoxPtr pbox; - RegionPtr cclip; - int xpos; /* x position of char origin */ - unsigned int i; - BoxRec clip; - int leftEdge, rightEdge; - int topEdge, bottomEdge; - int glyphRow; /* first row of glyph not wholly - clipped out */ - int glyphCol; /* leftmost visible column of glyph */ -#if GETLEFTBITS_ALIGNMENT > 1 - int getWidth; /* bits to get from glyph */ -#endif - - if(!(ppos = (TEXTPOS *)xalloc(nglyph * sizeof(TEXTPOS)))) - return; - - pdstBase = pdstBase + (widthDst * y) + (x >> PWSH); - xpos = x; - xchar = xpos & PIM; - - for (i=0; imetrics.leftSideBearing; - ppos[i].rightEdge = xpos + pci->metrics.rightSideBearing; - ppos[i].topEdge = y - pci->metrics.ascent; - ppos[i].bottomEdge = y + pci->metrics.descent; - ppos[i].pdstBase = pdstBase; - ppos[i].widthGlyph = GLYPHWIDTHBYTESPADDED(pci); - - xpos += pci->metrics.characterWidth; - xchar += pci->metrics.characterWidth; - if (xchar > PLST) - { - xchar &= PIM; - pdstBase++; - } - else if (xchar < 0) - { - xchar += PPW; - pdstBase--; - } - } - - cclip = pGC->pCompositeClip; - pbox = REGION_RECTS(cclip); - nbox = REGION_NUM_RECTS(cclip); - - /* HACK ALERT - since we continue out of the loop below so often, it - is easier to increment pbox at the top than at the end. - don't try this at home. - */ - pbox--; - while(nbox--) - { - pbox++; - clip.x1 = max(bbox.x1, pbox->x1); - clip.y1 = max(bbox.y1, pbox->y1); - clip.x2 = min(bbox.x2, pbox->x2); - clip.y2 = min(bbox.y2, pbox->y2); - if ((clip.x2<=clip.x1) || (clip.y2<=clip.y1)) - continue; - - for(i=0; i clip.x2) - rightEdge = clip.x2; - else - rightEdge = ppos[i].rightEdge; - - w = rightEdge - leftEdge; - if (w <= 0) - continue; - - /* clip the top and bottom edges */ - if (ppos[i].topEdge < clip.y1) - topEdge = clip.y1; - else - topEdge = ppos[i].topEdge; - - if (ppos[i].bottomEdge > clip.y2) - bottomEdge = clip.y2; - else - bottomEdge = ppos[i].bottomEdge; - - h = bottomEdge - topEdge; - if (h <= 0) - continue; - - glyphRow = (topEdge - y) + pci->metrics.ascent; - widthGlyph = ppos[i].widthGlyph; - pglyph = FONTGLYPHBITS(pglyphBase, pci); - pglyph += (glyphRow * widthGlyph); - - pdst = ppos[i].pdstBase - ((y-topEdge) * widthDst); - - glyphCol = (leftEdge - ppos[i].xpos) - - (pci->metrics.leftSideBearing); -#if GETLEFTBITS_ALIGNMENT > 1 - getWidth = w + glyphCol; -#endif - xoff = xchar + (leftEdge - ppos[i].xpos); - if (xoff > PLST) - { - xoff &= PIM; - pdst++; - } - else if (xoff < 0) - { - xoff += PPW; - pdst--; - } - - if ((xoff + w) <= PPW) - { - maskpartialbits(xoff, w, startmask); - while (h--) - { - getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); - UPDRW(pdst,(SCRRIGHT(tmpSrc, xoff) & startmask)); - pglyph += widthGlyph; - pdst += widthDst; - } - } - else - { - maskPPWbits(xoff, w, startmask, endmask); - nFirst = PPW - xoff; - while (h--) - { - getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); - UPDRW(pdst,(SCRRIGHT(tmpSrc, xoff) & startmask)); - UPDRW(&(pdst[1]),(SCRLEFT(tmpSrc, nFirst) & endmask)); - pglyph += widthGlyph; - pdst += widthDst; - } - } - } /* for each glyph */ - } /* while nbox-- */ - xfree(ppos); - break; - } - default: - break; - } -} - diff --git a/xorg-server/hw/xfree86/xf4bpp/mfbline.c b/xorg-server/hw/xfree86/xf4bpp/mfbline.c deleted file mode 100644 index d2d4e0b0e..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/mfbline.c +++ /dev/null @@ -1,976 +0,0 @@ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ -/* GJA -- modified this file for vga16 */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include - -#include "xf4bpp.h" -#include "OScompiler.h" -#include "mfbmap.h" -#include "mfb.h" -#include "maskbits.h" -#include "mi.h" -#include "miline.h" -#include "vgaVideo.h" -#include "wm3.h" - -#include "xf86str.h" /* for pScrn->vtSema */ -extern ScrnInfoPtr *xf86Screens; - -/* single-pixel lines on a color frame buffer - - NON-SLOPED LINES - horizontal lines are always drawn left to right; we have to -move the endpoints right by one after they're swapped. - horizontal lines will be confined to a single band of a -region. the code finds that band (giving up if the lower -bound of the band is above the line we're drawing); then it -finds the first box in that band that contains part of the -line. we clip the line to subsequent boxes in that band. - vertical lines are always drawn top to bottom (y-increasing.) -this requires adding one to the y-coordinate of each endpoint -after swapping. - - SLOPED LINES - when clipping a sloped line, we bring the second point inside -the clipping box, rather than one beyond it, and then add 1 to -the length of the line before drawing it. this lets us use -the same box for finding the outcodes for both endpoints. since -the equation for clipping the second endpoint to an edge gives us -1 beyond the edge, we then have to move the point towards the -first point by one step on the major axis. - eventually, there will be a diagram here to explain what's going -on. the method uses Cohen-Sutherland outcodes to determine -outsideness, and a method similar to Pike's layers for doing the -actual clipping. - -*/ -#ifdef POLYSEGMENT -static void DoV16SegmentSS( - DrawablePtr, GCPtr, int, xSegment* -); - -void -xf4bppSegmentSS (pDrawable, pGC, nseg, pSeg) - DrawablePtr pDrawable; - GCPtr pGC; - int nseg; - register xSegment *pSeg; -{ - if ( ! xf86Screens[pDrawable->pScreen->myNum]->vtSema ) { - miPolySegment(pDrawable, pGC, nseg, pSeg); - } else { - DO_WM3(pGC,DoV16SegmentSS (pDrawable, pGC, nseg, pSeg)); - } -} - -#else -static void DoV16LineSS( - DrawablePtr, GCPtr, int, int, DDXPointPtr -); - -void -xf4bppLineSS (pDrawable, pGC, mode, npt, pptInit) - DrawablePtr pDrawable; - GCPtr pGC; - int mode; /* Origin or Previous */ - int npt; /* number of points */ - DDXPointPtr pptInit; -{ - if ( ! xf86Screens[pDrawable->pScreen->myNum]->vtSema ) { - miZeroLine(pDrawable, pGC, mode, npt, pptInit); - } else { - DO_WM3(pGC,DoV16LineSS (pDrawable, pGC, mode, npt, pptInit)); - } -} -#endif - -static void -#ifdef POLYSEGMENT -DoV16SegmentSS (pDrawable, pGC, nseg, pSeg) - DrawablePtr pDrawable; - GCPtr pGC; - int nseg; - register xSegment *pSeg; -#else -DoV16LineSS (pDrawable, pGC, mode, npt, pptInit) - DrawablePtr pDrawable; - GCPtr pGC; - int mode; /* Origin or Previous */ - int npt; /* number of points */ - DDXPointPtr pptInit; -#endif -{ - int nboxInit; - register int nbox; - BoxPtr pboxInit; - register BoxPtr pbox; -#ifndef POLYSEGMENT - register DDXPointPtr ppt; /* pointer to list of translated points */ -#endif - - unsigned int oc1; /* outcode of point 1 */ - unsigned int oc2; /* outcode of point 2 */ - - PixelType *addrlBase; /* pointer to start of drawable */ -#ifndef POLYSEGMENT - PixelType *addrl; /* address of destination pixmap */ -#endif - int nlwidth; /* width in longwords of destination pixmap */ - int xorg, yorg; /* origin of window */ - - int adx; /* abs values of dx and dy */ - int ady; - int signdx; /* sign of dx and dy */ - int signdy; - int e, e1, e2; /* bresenham error and increments */ - int len; /* length of segment */ - int axis; /* major axis */ - int octant; - unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); - - /* a bunch of temporaries */ - register int y1, y2; - register int x1, x2; - RegionPtr cclip; -#ifndef POLYSEGMENT - int alu = pGC->alu; /* GJA */ -#endif - - if (!(pGC->planemask & 0x0F)) - return; - - cclip = pGC->pCompositeClip; - pboxInit = REGION_RECTS(cclip); - nboxInit = REGION_NUM_RECTS(cclip); - - nlwidth = BYTES_PER_LINE(pDrawable) >> 2; /* GJA */ - addrlBase = (PixelType *)VIDBASE(pDrawable); /* GJA */ - - xorg = pDrawable->x; - yorg = pDrawable->y; -#ifdef POLYSEGMENT - while (nseg--) -#else - ppt = pptInit; - x2 = ppt->x + xorg; - y2 = ppt->y + yorg; - while(--npt) -#endif - { - nbox = nboxInit; - pbox = pboxInit; - -#ifdef POLYSEGMENT - x1 = pSeg->x1 + xorg; - y1 = pSeg->y1 + yorg; - x2 = pSeg->x2 + xorg; - y2 = pSeg->y2 + yorg; - pSeg++; -#else - x1 = x2; - y1 = y2; - ++ppt; - if (mode == CoordModePrevious) - { - xorg = x1; - yorg = y1; - } - x2 = ppt->x + xorg; - y2 = ppt->y + yorg; -#endif - - if (x1 == x2) /* vertical line */ - { - /* make the line go top to bottom of screen, keeping - endpoint semantics - */ - if (y1 > y2) - { - register int tmp; - - tmp = y2; - y2 = y1 + 1; - y1 = tmp + 1; -#ifdef POLYSEGMENT - if (pGC->capStyle != CapNotLast) - y1--; -#endif - } -#ifdef POLYSEGMENT - else if (pGC->capStyle != CapNotLast) - y2++; -#endif - /* get to first band that might contain part of line */ - while ((nbox) && (pbox->y2 <= y1)) - { - pbox++; - nbox--; - } - - if (nbox) - { - /* stop when lower edge of box is beyond end of line */ - while((nbox) && (y2 >= pbox->y1)) - { - if ((x1 >= pbox->x1) && (x1 < pbox->x2)) - { - int y1t, y2t; - /* this box has part of the line in it */ - y1t = max(y1, pbox->y1); - y2t = min(y2, pbox->y2); - if (y1t != y2t) - { - xf4bppVertS (addrlBase, nlwidth, - x1, y1t, y2t-y1t); - } - } - nbox--; - pbox++; - } - } -#ifndef POLYSEGMENT - y2 = ppt->y + yorg; -#endif - } - else if (y1 == y2) /* horizontal line */ - { - /* force line from left to right, keeping - endpoint semantics - */ - if (x1 > x2) - { - register int tmp; - - tmp = x2; - x2 = x1 + 1; - x1 = tmp + 1; -#ifdef POLYSEGMENT - if (pGC->capStyle != CapNotLast) - x1--; -#endif - } -#ifdef POLYSEGMENT - else if (pGC->capStyle != CapNotLast) - x2++; -#endif - - /* find the correct band */ - while( (nbox) && (pbox->y2 <= y1)) - { - pbox++; - nbox--; - } - - /* try to draw the line, if we haven't gone beyond it */ - if ((nbox) && (pbox->y1 <= y1)) - { - int tmp; - - /* when we leave this band, we're done */ - tmp = pbox->y1; - while((nbox) && (pbox->y1 == tmp)) - { - int x1t, x2t; - - if (pbox->x2 <= x1) - { - /* skip boxes until one might contain start point */ - nbox--; - pbox++; - continue; - } - - /* stop if left of box is beyond right of line */ - if (pbox->x1 >= x2) - { - nbox = 0; - break; - } - - x1t = max(x1, pbox->x1); - x2t = min(x2, pbox->x2); - if (x1t != x2t) - { - xf4bppHorzS (addrlBase, nlwidth, - x1t, y1, x2t-x1t); - } - nbox--; - pbox++; - } - } -#ifndef POLYSEGMENT - x2 = ppt->x + xorg; -#endif - } - else /* sloped line */ - { - CalcLineDeltas(x1, y1, x2, y2, adx, ady, signdx, signdy, - 1, 1, octant); - - if (adx > ady) - { - axis = X_AXIS; - e1 = ady << 1; - e2 = e1 - (adx << 1); - e = e1 - adx; - } - else - { - axis = Y_AXIS; - e1 = adx << 1; - e2 = e1 - (ady << 1); - e = e1 - ady; - SetYMajorOctant(octant); - } - - FIXUP_ERROR(e, octant, bias); - - /* we have bresenham parameters and two points. - all we have to do now is clip and draw. - */ - - while(nbox--) - { - oc1 = 0; - oc2 = 0; - OUTCODES(oc1, x1, y1, pbox); - OUTCODES(oc2, x2, y2, pbox); - if ((oc1 | oc2) == 0) - { - if (axis == X_AXIS) - len = adx; - else - len = ady; -#ifdef POLYSEGMENT - if (pGC->capStyle != CapNotLast) - len++; -#endif - xf4bppBresS (addrlBase, nlwidth, - signdx, signdy, axis, x1, y1, - e, e1, e2, len); - break; - } - else if (oc1 & oc2) - { - pbox++; - } - else - { - int new_x1 = x1, new_y1 = y1, new_x2 = x2, new_y2 = y2; - int clip1 = 0, clip2 = 0; - int clipdx, clipdy; - int err; - - if (miZeroClipLine(pbox->x1, pbox->y1, pbox->x2-1, - pbox->y2-1, - &new_x1, &new_y1, &new_x2, &new_y2, - adx, ady, &clip1, &clip2, - octant, bias, oc1, oc2) == -1) - { - pbox++; - continue; - } - - if (axis == X_AXIS) - len = abs(new_x2 - new_x1); - else - len = abs(new_y2 - new_y1); -#ifdef POLYSEGMENT - if (clip2 != 0 || pGC->capStyle != CapNotLast) - len++; -#else - len += (clip2 != 0); -#endif - if (len) - { - /* unwind bresenham error term to first point */ - if (clip1) - { - clipdx = abs(new_x1 - x1); - clipdy = abs(new_y1 - y1); - if (axis == X_AXIS) - err = e+((clipdy*e2) + ((clipdx-clipdy)*e1)); - else - err = e+((clipdx*e2) + ((clipdy-clipdx)*e1)); - } - else - err = e; - xf4bppBresS (addrlBase, nlwidth, - signdx, signdy, axis, new_x1, new_y1, - err, e1, e2, len); - } - pbox++; - } - } /* while (nbox--) */ - } /* sloped line */ - } /* while (nline--) */ - -#ifndef POLYSEGMENT - - /* paint the last point if the end style isn't CapNotLast. - (Assume that a projecting, butt, or round cap that is one - pixel wide is the same as the single pixel of the endpoint.) - */ - - if ((pGC->capStyle != CapNotLast) && - ((ppt->x + xorg != pptInit->x + pDrawable->x) || - (ppt->y + yorg != pptInit->y + pDrawable->y) || - (ppt == pptInit + 1))) - { - PixelType _mask; - - if (alu == RROP_BLACK) - _mask = mfbGetrmask(x2 & PIM); - else - _mask = mfbGetmask(x2 & PIM); - - nbox = nboxInit; - pbox = pboxInit; - while (nbox--) - { - if ((x2 >= pbox->x1) && - (y2 >= pbox->y1) && - (x2 < pbox->x2) && - (y2 < pbox->y2)) - { - addrl = mfbScanline(addrlBase, x2, y2, nlwidth); - UPDRW(addrl,_mask); - break; - } - else - pbox++; - } - } -#endif -} - -/* - * Draw dashed 1-pixel lines. - */ - -#ifdef POLYSEGMENT -static void DoV16SegmentSD( - DrawablePtr, GCPtr, int, xSegment* -); - -void -xf4bppSegmentSD (pDrawable, pGC, nseg, pSeg) - DrawablePtr pDrawable; - GCPtr pGC; - int nseg; - register xSegment *pSeg; -{ - if ( ! xf86Screens[pDrawable->pScreen->myNum]->vtSema ) { - miPolySegment(pDrawable, pGC, nseg, pSeg); - } else { - DO_WM3(pGC,DoV16SegmentSD (pDrawable, pGC, nseg, pSeg)); - } -} - -#else -static void DoV16LineSD( - DrawablePtr, GCPtr, int, int, DDXPointPtr -); - -void -xf4bppLineSD (pDrawable, pGC, mode, npt, pptInit) - DrawablePtr pDrawable; - GCPtr pGC; - int mode; /* Origin or Previous */ - int npt; /* number of points */ - DDXPointPtr pptInit; -{ - if ( ! xf86Screens[pDrawable->pScreen->myNum]->vtSema ) { - miZeroDashLine(pDrawable, pGC, mode, npt, pptInit); - } else { - DO_WM3(pGC,DoV16LineSD (pDrawable, pGC, mode, npt, pptInit)); - } -} -#endif - -static void -#ifdef POLYSEGMENT -DoV16SegmentSD (pDrawable, pGC, nseg, pSeg) - DrawablePtr pDrawable; - register GCPtr pGC; - int nseg; - register xSegment *pSeg; -#else -DoV16LineSD( pDrawable, pGC, mode, npt, pptInit) - DrawablePtr pDrawable; - register GCPtr pGC; - int mode; /* Origin or Previous */ - int npt; /* number of points */ - DDXPointPtr pptInit; -#endif -{ - int nboxInit; - register int nbox; - BoxPtr pboxInit; - register BoxPtr pbox; -#ifndef POLYSEGMENT - register DDXPointPtr ppt; /* pointer to list of translated points */ -#endif - - register unsigned int oc1; /* outcode of point 1 */ - register unsigned int oc2; /* outcode of point 2 */ - - PixelType *addrl; /* address of destination pixmap */ - int nlwidth; /* width in longwords of destination pixmap */ - int xorg, yorg; /* origin of window */ - - int adx; /* abs values of dx and dy */ - int ady; - int signdx; /* sign of dx and dy */ - int signdy; - int e, e1, e2; /* bresenham error and increments */ - int len; /* length of segment */ - int axis; /* major axis */ - int octant; - unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); - int x1, x2, y1, y2; - RegionPtr cclip; - int fgink, bgink; /* GJA */ - unsigned char *pDash; - int dashOffset; - int numInDashList; - int dashIndex; - int isDoubleDash; - int dashIndexTmp, dashOffsetTmp; - int unclippedlen; - - if (!(pGC->planemask & 0x0F)) - return; - - cclip = pGC->pCompositeClip; - fgink = bgink = pGC->fgPixel; /* GJA */ - pboxInit = REGION_RECTS(cclip); - nboxInit = REGION_NUM_RECTS(cclip); - - nlwidth = BYTES_PER_LINE(pDrawable) >> 2; /* GJA */ - addrl = (PixelType *)VIDBASE(pDrawable); /* GJA */ - - /* compute initial dash values */ - - pDash = (unsigned char *) pGC->dash; - numInDashList = pGC->numInDashList; - isDoubleDash = (pGC->lineStyle == LineDoubleDash); - dashIndex = 0; - dashOffset = 0; - miStepDash ((int)pGC->dashOffset, &dashIndex, pDash, - numInDashList, &dashOffset); - - if (isDoubleDash) - bgink = pGC->bgPixel; /* GJA */ - - xorg = pDrawable->x; - yorg = pDrawable->y; -#ifdef POLYSEGMENT - while (nseg--) -#else - ppt = pptInit; - x2 = ppt->x + xorg; - y2 = ppt->y + yorg; - while(--npt) -#endif - { - nbox = nboxInit; - pbox = pboxInit; - -#ifdef POLYSEGMENT - x1 = pSeg->x1 + xorg; - y1 = pSeg->y1 + yorg; - x2 = pSeg->x2 + xorg; - y2 = pSeg->y2 + yorg; - pSeg++; -#else - x1 = x2; - y1 = y2; - ++ppt; - if (mode == CoordModePrevious) - { - xorg = x1; - yorg = y1; - } - x2 = ppt->x + xorg; - y2 = ppt->y + yorg; -#endif - - CalcLineDeltas(x1, y1, x2, y2, adx, ady, signdx, signdy, 1, 1, octant); - - if (adx > ady) - { - axis = X_AXIS; - e1 = ady << 1; - e2 = e1 - (adx << 1); - e = e1 - adx; - unclippedlen = adx; - } - else - { - axis = Y_AXIS; - e1 = adx << 1; - e2 = e1 - (ady << 1); - e = e1 - ady; - unclippedlen = ady; - SetYMajorOctant(octant); - } - - FIXUP_ERROR(e, octant, bias); - - /* we have bresenham parameters and two points. - all we have to do now is clip and draw. - */ - - while(nbox--) - { - oc1 = 0; - oc2 = 0; - OUTCODES(oc1, x1, y1, pbox); - OUTCODES(oc2, x2, y2, pbox); - if ((oc1 | oc2) == 0) - { -#ifdef POLYSEGMENT - if (pGC->capStyle != CapNotLast) - unclippedlen++; - dashIndexTmp = dashIndex; - dashOffsetTmp = dashOffset; - xf4bppBresD (pDrawable, fgink, bgink, - &dashIndexTmp, pDash, numInDashList, - &dashOffsetTmp, isDoubleDash, - addrl, nlwidth, - signdx, signdy, axis, x1, y1, - e, e1, e2, unclippedlen); - break; -#else - xf4bppBresD (pDrawable, fgink, bgink, - &dashIndex, pDash, numInDashList, - &dashOffset, isDoubleDash, - addrl, nlwidth, - signdx, signdy, axis, x1, y1, - e, e1, e2, unclippedlen); - goto dontStep; -#endif - } - else if (oc1 & oc2) - { - pbox++; - } - else /* have to clip */ - { - int new_x1 = x1, new_y1 = y1, new_x2 = x2, new_y2 = y2; - int clip1 = 0, clip2 = 0; - int clipdx, clipdy; - int err; - - if (miZeroClipLine(pbox->x1, pbox->y1, pbox->x2-1, pbox->y2-1, - &new_x1, &new_y1, &new_x2, &new_y2, - adx, ady, &clip1, &clip2, - octant, bias, oc1, oc2) == -1) - { - pbox++; - continue; - } - dashIndexTmp = dashIndex; - dashOffsetTmp = dashOffset; - if (clip1) - { - int dlen; - - if (axis == X_AXIS) - dlen = abs(new_x1 - x1); - else - dlen = abs(new_y1 - y1); - miStepDash (dlen, &dashIndexTmp, pDash, - numInDashList, &dashOffsetTmp); - } - if (axis == X_AXIS) - len = abs(new_x2 - new_x1); - else - len = abs(new_y2 - new_y1); -#ifdef POLYSEGMENT - if (clip2 != 0 || pGC->capStyle != CapNotLast) - len++; -#else - len += (clip2 != 0); -#endif - if (len) - { - /* unwind bresenham error term to first point */ - if (clip1) - { - clipdx = abs(new_x1 - x1); - clipdy = abs(new_y1 - y1); - if (axis == X_AXIS) - err = e+((clipdy*e2) + ((clipdx-clipdy)*e1)); - else - err = e+((clipdx*e2) + ((clipdy-clipdx)*e1)); - } - else - err = e; - xf4bppBresD (pDrawable, fgink, bgink, - &dashIndexTmp, pDash, numInDashList, - &dashOffsetTmp, isDoubleDash, - addrl, nlwidth, - signdx, signdy, axis, new_x1, new_y1, - err, e1, e2, len); - } - pbox++; - } - } /* while (nbox--) */ -#ifndef POLYSEGMENT - /* - * walk the dash list around to the next line - */ - miStepDash (unclippedlen, &dashIndex, pDash, - numInDashList, &dashOffset); -dontStep: ; -#endif - } /* while (nline--) */ - -#ifndef POLYSEGMENT - /* paint the last point if the end style isn't CapNotLast. - (Assume that a projecting, butt, or round cap that is one - pixel wide is the same as the single pixel of the endpoint.) - */ - - if ((pGC->capStyle != CapNotLast) && - ((dashIndex & 1) == 0 || isDoubleDash) && - ((ppt->x + xorg != pptInit->x + pDrawable->x) || - (ppt->y + yorg != pptInit->y + pDrawable->y) || - (ppt == pptInit + 1))) - { - nbox = nboxInit; - pbox = pboxInit; - while (nbox--) - { - if ((x2 >= pbox->x1) && - (y2 >= pbox->y1) && - (x2 < pbox->x2) && - (y2 < pbox->y2)) - { - unsigned long _mask; - - _mask = mfbGetmask(x2 & PIM); - addrl = mfbScanline(addrl, x2, y2, nlwidth); - UPDRW(addrl,_mask); - break; - } - else - pbox++; - } - } -#endif -} - - -#if 0 -#ifndef POLYSEGMENT -/* - the clipping code could be cleaned up some; most of its -mess derives from originally being inline in the line code, -then pulled out to make clipping dashes easier. -*/ - -int -mfbClipLine(pbox, box, - ppt1Orig, ppt1, ppt2, - adx, ady, signdx, signdy, axis, - pclip1, pclip2) -BoxPtr pbox; /* box to clip to */ -BoxRec box; /* box to do calculations with */ -DDXPointPtr ppt1Orig, ppt1, ppt2; -int adx, ady; -int signdx, signdy; -register int axis; -int *pclip1, *pclip2; -{ - DDXPointRec pt1Orig, pt1, pt2; - register int swapped = 0; - int clipDone = 0; - register unsigned int utmp; - register int oc1, oc2; - int clip1, clip2; - - pt1Orig = *ppt1Orig; - pt1 = *ppt1; - pt2 = *ppt2; - clip1 = 0; - clip2 = 0; - - do - { - oc1 = 0; - oc2 = 0; - OUTCODES(oc1, pt1.x, pt1.y, pbox); - OUTCODES(oc2, pt2.x, pt2.y, pbox); - - if (oc1 & oc2) - clipDone = -1; - else if ((oc1 | oc2) == 0) - { - clipDone = 1; - if (swapped) - { - SWAPPT(pt1, pt2); - SWAPINT(oc1, oc2); - SWAPINT(clip1, clip2); - } - } - else /* have to clip */ - { - /* only clip one point at a time */ - if (!oc1) - { - SWAPPT(pt1, pt2); - SWAPINT(oc1, oc2); - SWAPINT(clip1, clip2); - swapped = !swapped; - } - - clip1 |= oc1; - if (oc1 & OUT_LEFT) - { - pt1.x = box.x1; - utmp = abs(box.x1 - pt1Orig.x); - utmp *= ady; - if(axis==X_AXIS) - { - pt1.y = pt1Orig.y + SignTimes(signdy, round(utmp, adx)); - } - else - { - utmp <<= 1; - if (swapped) - utmp += ady; - else - utmp -= ady; - pt1.y = pt1Orig.y + SignTimes(signdy, ceiling(utmp, 2*adx)); - if (swapped) - pt1.y -= signdy; - } - } - else if (oc1 & OUT_ABOVE) - { - pt1.y = box.y1; - utmp = abs(box.y1 - pt1Orig.y); - utmp *= adx; - if (axis == Y_AXIS) - { - pt1.x = pt1Orig.x + SignTimes(signdx, round(utmp, ady)); - } - else - { - utmp <<= 1; - if (swapped) - utmp += adx; - else - utmp -= adx; - pt1.x = pt1Orig.x + SignTimes(signdx, ceiling(utmp, 2*ady)); - if (swapped) - pt1.x -= signdx; - } - } - else if (oc1 & OUT_RIGHT) - { - pt1.x = box.x2; - utmp = abs(pt1Orig.x - box.x2); - utmp *= ady; - if (axis == X_AXIS) - { - pt1.y = pt1Orig.y + SignTimes(signdy, round(utmp, adx)); - } - else - { - utmp <<= 1; - if (swapped) - utmp += ady; - else - utmp -= ady; - pt1.y = pt1Orig.y + SignTimes(signdy, ceiling(utmp, 2*adx)); - if (swapped) - pt1.y -= signdy; - } - } - else if (oc1 & OUT_BELOW) - { - pt1.y = box.y2; - utmp = abs(pt1Orig.y - box.y2); - utmp *= adx; - if (axis == Y_AXIS) - { - pt1.x = pt1Orig.x + SignTimes(signdx, round(utmp, ady)); - } - else - { - utmp <<= 1; - if (swapped) - utmp += adx; - else - utmp -= adx; - pt1.x = pt1Orig.x + SignTimes(signdx, ceiling(utmp, 2*ady)); - if (swapped) - pt1.x -= signdx; - } - } - } /* else have to clip */ - } while(!clipDone); - *ppt1 = pt1; - *ppt2 = pt2; - *pclip1 = clip1; - *pclip2 = clip2; - - return clipDone; -} -#endif -#endif diff --git a/xorg-server/hw/xfree86/xf4bpp/mfbseg.c b/xorg-server/hw/xfree86/xf4bpp/mfbseg.c deleted file mode 100644 index 3af37d817..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/mfbseg.c +++ /dev/null @@ -1,2 +0,0 @@ -#define POLYSEGMENT -#include "./mfbline.c" diff --git a/xorg-server/hw/xfree86/xf4bpp/mfbzerarc.c b/xorg-server/hw/xfree86/xf4bpp/mfbzerarc.c deleted file mode 100644 index 61fc7b184..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/mfbzerarc.c +++ /dev/null @@ -1,267 +0,0 @@ -/************************************************************ - -Copyright (c) 1989 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -********************************************************/ -/* GJA -- Took mfb code and modified it. */ - -/* Derived from: - * "Algorithm for drawing ellipses or hyperbolae with a digital plotter" - * by M. L. V. Pitteway - * The Computer Journal, November 1967, Volume 10, Number 3, pp. 282-289 - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "OScompiler.h" -#include "mfbmap.h" -#include "mfb.h" -#include "maskbits.h" -#include "mi.h" -#include "mizerarc.h" -#include "wm3.h" - -#include "xf86str.h" /* for pScrn->vtSema */ -extern ScrnInfoPtr *xf86Screens; - -/* - * Note, LEFTMOST must be the bit leftmost in the actual screen - * representation. This depends on both BITMAP_BIT_ORDER and - * IMAGE_BYTE_ORDER - * DHD 10/92 - */ - -#if (BITMAP_BIT_ORDER == MSBFirst) -#if (IMAGE_BYTE_ORDER == MSBFirst) -#define LEFTMOST ((unsigned int) 0x80000000) -#else -#define LEFTMOST ((unsigned int) 0x80) -#endif -#else -#if (IMAGE_BYTE_ORDER == LSBFirst) -#define LEFTMOST ((unsigned int) 1) -#else -#define LEFTMOST ((unsigned int) 0x1000000) -#endif -#endif - -#define PixelateWhite(addr,off) \ -{ \ - register int *tmpaddr = &((addr)[(off)>>PWSH]); \ - UPDRW(tmpaddr,SCRRIGHT (LEFTMOST, ((off) & PIM))); \ -} -#define PixelateBlack(addr,off) \ -{ \ - register int *tmpaddr = &((addr)[(off)>>PWSH]); \ - UPDRW(tmpaddr,~(SCRRIGHT (LEFTMOST, ((off) & PIM)))); \ -} - -#define Pixelate(base,off) \ -{ \ - paddr = base + ((off)>>PWSH); \ - pmask = SCRRIGHT(LEFTMOST, (off) & PIM); \ - UPDRW(paddr,(pixel & pmask)); \ -} - -#define DoPix(bit,base,off) if (msk & bit) Pixelate(base,off); - -static void -v16ZeroArcSS -( - DrawablePtr pDraw, - GCPtr pGC, - xArc *arc -) -{ - miZeroArcRec info; - Bool do360; - register int x, y, a, b, d, msk; - register int k1, k3, dx, dy; - int *addrl; - int *yorgl, *yorgol; - unsigned long pixel; - int nlwidth, yoffset, dyoffset; - int pmask; - register int *paddr; - - if (((mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates, - mfbGetGCPrivateKey()))->rop == - RROP_BLACK) - pixel = 0; - else - pixel = ~0UL; - - if (pDraw->type == DRAWABLE_WINDOW) - { - addrl = (int *) - (((PixmapPtr)(pDraw->pScreen->devPrivate))->devPrivate.ptr); - nlwidth = (int) - (((PixmapPtr)(pDraw->pScreen->devPrivate))->devKind) >> 2; - } - else - { - addrl = (int *)(((PixmapPtr)pDraw)->devPrivate.ptr); - nlwidth = (int)(((PixmapPtr)pDraw)->devKind) >> 2; - } - - do360 = miZeroArcSetup(arc, &info, TRUE); - yorgl = addrl + ((info.yorg + pDraw->y) * nlwidth); - yorgol = addrl + ((info.yorgo + pDraw->y) * nlwidth); - info.xorg += pDraw->x; - info.xorgo += pDraw->x; - MIARCSETUP(); - yoffset = y ? nlwidth : 0; - dyoffset = 0; - msk = info.initialMask; - if (!(arc->width & 1)) - { - DoPix(2, yorgl, info.xorgo); - DoPix(8, yorgol, info.xorgo); - } - if (!info.end.x || !info.end.y) - { - msk = info.end.mask; - info.end = info.altend; - } - if (do360 && (arc->width == arc->height) && !(arc->width & 1)) - { - int xoffset = nlwidth; - int *yorghl = yorgl + (info.h * nlwidth); - int xorghp = info.xorg + info.h; - int xorghn = info.xorg - info.h; - - while (1) - { - PixelateWhite(yorgl + yoffset, info.xorg + x); - PixelateWhite(yorgl + yoffset, info.xorg - x); - PixelateWhite(yorgol- yoffset, info.xorg - x); - PixelateWhite(yorgol - yoffset, info.xorg + x); - if (a < 0) - break; - PixelateWhite(yorghl - xoffset, xorghp - y); - PixelateWhite(yorghl - xoffset, xorghn + y); - PixelateWhite(yorghl + xoffset, xorghn + y); - PixelateWhite(yorghl + xoffset, xorghp - y); - xoffset += nlwidth; - MIARCCIRCLESTEP(yoffset += nlwidth;); - } - x = info.w; - yoffset = info.h * nlwidth; - } - else if (do360) - { - while (y < info.h || x < info.w) - { - MIARCOCTANTSHIFT(dyoffset = nlwidth;); - Pixelate(yorgl + yoffset, info.xorg + x); - Pixelate(yorgl + yoffset, info.xorgo - x); - Pixelate(yorgol - yoffset, info.xorgo - x); - Pixelate(yorgol - yoffset, info.xorg + x); - MIARCSTEP(yoffset += dyoffset;, yoffset += nlwidth;); - } - } - else - { - while (y < info.h || x < info.w) - { - MIARCOCTANTSHIFT(dyoffset = nlwidth;); - if ((x == info.start.x) || (y == info.start.y)) - { - msk = info.start.mask; - info.start = info.altstart; - } - DoPix(1, yorgl + yoffset, info.xorg + x); - DoPix(2, yorgl + yoffset, info.xorgo - x); - DoPix(4, yorgol - yoffset, info.xorgo - x); - DoPix(8, yorgol - yoffset, info.xorg + x); - if ((x == info.end.x) || (y == info.end.y)) - { - msk = info.end.mask; - info.end = info.altend; - } - MIARCSTEP(yoffset += dyoffset;, yoffset += nlwidth;); - } - } - if ((x == info.start.x) || (y == info.start.y)) - msk = info.start.mask; - DoPix(1, yorgl + yoffset, info.xorg + x); - DoPix(4, yorgol - yoffset, info.xorgo - x); - if (arc->height & 1) - { - DoPix(2, yorgl + yoffset, info.xorgo - x); - DoPix(8, yorgol - yoffset, info.xorg + x); - } -} - -static void -xf4bppZeroPolyArcSS -( - DrawablePtr pDraw, - GCPtr pGC, - int narcs, - xArc *parcs -) -{ - register xArc *arc; - register int i; - BoxRec box; - RegionPtr cclip; - - if (!pGC->planemask & 0x0F) - return; - cclip = pGC->pCompositeClip; - for (arc = parcs, i = narcs; --i >= 0; arc++) - { - if (miCanZeroArc(arc)) - { - box.x1 = arc->x + pDraw->x; - box.y1 = arc->y + pDraw->y; - box.x2 = box.x1 + (int)arc->width + 1; - box.y2 = box.y1 + (int)arc->height + 1; - if (RECT_IN_REGION(pDraw->pScreen, cclip, &box) == rgnIN) - v16ZeroArcSS(pDraw, pGC, arc); - else - miZeroPolyArc(pDraw, pGC, 1, arc); - } - else - miPolyArc(pDraw, pGC, 1, arc); - } -} - -void -xf4bppZeroPolyArc(pDraw, pGC, narcs, parcs) - DrawablePtr pDraw; - GCPtr pGC; - int narcs; - xArc *parcs; -{ - if ( !xf86Screens[pDraw->pScreen->myNum]->vtSema ) { - miZeroPolyArc(pDraw, pGC, narcs, parcs); - } else { - DO_WM3(pGC,xf4bppZeroPolyArcSS(pDraw, pGC, narcs, parcs)); - } -} diff --git a/xorg-server/hw/xfree86/xf4bpp/offscreen.c b/xorg-server/hw/xfree86/xf4bpp/offscreen.c deleted file mode 100644 index 3160e7ef8..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/offscreen.c +++ /dev/null @@ -1,342 +0,0 @@ -/* - * Copyright 1993 Gerrit Jan Akkerman - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of Gerrit Jan Akkerman not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * GERRIT JAN AKKERMAN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, - * IN NO EVENT SHALL GERRIT JAN AKKERMAN BE LIABLE FOR ANY SPECIAL, INDIRECT - * OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF - * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - * -*/ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "vgaVideo.h" -#include "pixmapstr.h" -#include "scrnintstr.h" -#include "windowstr.h" - -#define saved_screen(pWin) \ - ((unsigned char *)(((PixmapPtr)((pWin)->drawable.pScreen->devPrivate))->devPrivate.ptr)) - -#define SAVEDSCREEN(pWin, x, y) \ - (*(saved_screen(pWin) + (y) * (BYTES_PER_LINE(pWin)) + (x))) - -#define DO_ROP(src,dst,alu,planes) \ - ((dst) = do_rop((src),(dst),(alu),(planes))) - -/* NOTE: - * The following to functions don't do anything. They're just there to - * provide a stable interface to the rest of the system. - */ - -static int -do_rop -( - int src, - int dst, - int alu, - const unsigned long planes -) -{ - int _dst; /* New dst */ - - switch ( alu ) { - case GXclear: /* 0x0 Zero 0 */ - _dst = 0; break ; - case GXinvert: /* 0xa NOT dst */ - _dst = ~dst; break ; - case GXset: /* 0xf 1 */ - _dst = src; break ; - default: - case GXnoop: /* 0x5 dst */ - return dst; - case GXnor: /* 0x8 NOT src AND NOT dst */ - _dst = ~src & ~dst; break ; - case GXandInverted: /* 0x4 NOT src AND dst */ - _dst = ~src & dst; break ; - case GXand: /* 0x1 src AND dst */ - _dst = src & dst; break ; - case GXequiv: /* 0x9 NOT src XOR dst */ - _dst = ~src ^ dst; break ; - case GXxor: /* 0x6 src XOR dst */ - _dst = src ^ dst; break ; - case GXandReverse: /* 0x2 src AND NOT dst */ - _dst = src & ~dst; break ; - case GXnand: /* 0xe NOT src OR NOT dst */ - _dst = ~src | ~dst; break ; - case GXorReverse: /* 0xb src OR NOT dst */ - _dst = src | ~dst; break ; - case GXorInverted: /* 0xd NOT src OR dst */ - _dst = ~src | dst; break ; - case GXor: /* 0x7 src OR dst */ - _dst = src | dst; break ; - case GXcopyInverted: /* 0xc NOT src */ - _dst = ~src; break ; - case GXcopy: /* 0x3 src */ - _dst = src; break ; - } - return (dst & ~planes) | (_dst & planes); -} - -/* File vgaBitBlt.c */ -void -xf4bppOffBitBlt( pWin, alu, writeplanes, x0, y0, x1, y1, w, h ) -WindowPtr pWin; /* GJA */ -const int alu, writeplanes ; -register int x0 ; -int y0 ; -register int x1 ; -int y1 ; -register int w, h ; -{ - int x,y; - - switch ( alu ) { - case GXclear: /* 0x0 Zero 0 */ - case GXinvert: /* 0xa NOT dst */ - case GXset: /* 0xf 1 */ - xf4bppOffFillSolid( pWin, VGA_ALLPLANES, alu, writeplanes, - x0, y0, w, h ) ; - case GXnoop: /* 0x5 dst */ - return ; - default: - break ; - } - - if ( (w <= 0) || (h <= 0) ) return; - - for ( y = 0 ; y < h ; y++ ) { - for ( x = 0 ; x < w ; x++ ) { - DO_ROP(SAVEDSCREEN(pWin,x0+x,y0+y),SAVEDSCREEN(pWin,x1+x,y1+y), - alu,writeplanes); - } - } -} - -/* for file vgaImages.c */ - -void -xf4bppOffDrawColorImage( pWin, x, y, w, h, data, RowIncrement, alu, planes ) -WindowPtr pWin; /* GJA */ -int x, y ; -register int w, h ; -unsigned char *data ; -register int RowIncrement ; -const int alu ; -const unsigned long int planes ; -{ - int dx,dy; - - for ( dy = 0 ; dy < h ; dy++ ) { - for ( dx = 0 ; dx < w ; dx++ ) { - DO_ROP( data[dy * RowIncrement + dx], - SAVEDSCREEN(pWin,x+dx,y+dy), alu, planes); - } - } -} - -void -xf4bppOffReadColorImage( pWin, x, y, lx, ly, data, RowIncrement ) -WindowPtr pWin; /* GJA */ -int x, y ; -int lx, ly ; -unsigned char *data ; -int RowIncrement ; -{ - int dx, dy; - - if ( ( lx <= 0 ) || ( ly <= 0 ) ) - return ; - - for ( dy = 0 ; dy < ly ; dy++ ) { - for ( dx = 0 ; dx < lx ; dx++ ) { - data[dy*RowIncrement+dx] = SAVEDSCREEN(pWin,x+dx,y+dy); - } - } -} - -/* For file vgaSolid.c */ - -void xf4bppOffFillSolid( pWin, color, alu, planes, x0, y0, lx, ly ) -WindowPtr pWin; /* GJA */ -unsigned long int color ; -const int alu ; -unsigned long int planes ; -register int x0 ; -register const int y0 ; -register int lx ; -register const int ly ; /* MUST BE > 0 !! */ -{ - int dx, dy; - - if ( ( lx == 0 ) || ( ly == 0 ) ) - return; - - for ( dy = 0 ; dy < ly ; dy++ ) { - for ( dx = 0 ; dx < lx ; dx++ ) { - DO_ROP(color,SAVEDSCREEN(pWin, x0+dx,y0+dy),alu,planes); - } - } -} - -/* For file vgaStipple.c */ - -/* GJA -- modified this to take both Width and Height, and to - * reduce x and y to Width and Height by taking remainders. - */ -static unsigned char -xygetbits -( - register int x, - register int y, - register const unsigned int Width, - register const unsigned int paddedByteWidth, - register const unsigned int Height, - register const unsigned char * const data -) -{ - register unsigned char bits ; - unsigned const char *lineptr, *cptr ; - register int shift ; - register int wrap ; - - x = x % Width; - y = y % Height; - - lineptr = data + (y * paddedByteWidth); - cptr = lineptr + (x >> 3) ; - bits = *cptr ; - if ((shift = x & 7)) - bits = SCRLEFT8( bits, shift ) | - SCRRIGHT8( cptr[1], ( 8 - shift ) ) ; - if ( ( wrap = x + 8 - Width ) > 0 ) { - bits &= SCRLEFT8( 0xFF, wrap ) ; - bits |= SCRRIGHT8( *lineptr, ( 8 - wrap ) ) ; - } - - return bits ; -} - -static void -DoMono -( - WindowPtr pWin, /* GJA */ - int w, - int x, - int y, - register const unsigned char *mastersrc, - int h, - unsigned int width, - register unsigned int paddedByteWidth, - unsigned int height, - int xshift, - int yshift, - int alu, - int planes, - int fg -) -{ - int dy, dx, i; - int byte; - - for ( dy = 0 ; dy < h ; dy++ ) { - for ( dx = 0; dx <= w - 8 ; dx += 8 ) { - /* get next byte */ - byte = xygetbits(dx+xshift,dy+yshift,width, - paddedByteWidth, height, mastersrc); - for ( i = 0 ; i < 8 ; i++ ) { - if ( byte & (128 >> i) ) { - DO_ROP(fg,SAVEDSCREEN(pWin,x+dx+i,y+dy), - alu,planes); - } - } - } - /* get last bits */ - byte = xygetbits(dx+xshift,dy+yshift,width, - paddedByteWidth, height, mastersrc); - for ( i = 0 ; i < (w - dx) ; i++ ) { - if ( byte & (128 >> i) ) { - DO_ROP(fg,SAVEDSCREEN(pWin,x+dx+i,y+dy), - alu,planes); - } - } - } -} - -void -xf4bppOffFillStipple( pWin, pStipple, fg, alu, planes, x, y, w, h, xSrc, ySrc ) -WindowPtr pWin; /* GJA */ -register PixmapPtr const pStipple ; -unsigned long int fg ; -const int alu ; -unsigned long int planes ; -int x, y, w, h ; -const int xSrc, ySrc ; -{ - unsigned int width ; - unsigned int height ; - int xshift ; - int yshift ; - - if ( ( alu == GXnoop ) || !( planes &= VGA_ALLPLANES ) ) - return ; - - /* Figure Bit Offsets & Source Address */ - width = pStipple->drawable.width ; - if ( ( xshift = ( x - xSrc ) ) < 0 ) - xshift = width - ( ( - xshift ) % width ) ; - else - xshift %= width ; - - height = pStipple->drawable.height ; - if ( ( yshift = ( y - ySrc ) ) < 0 ) - yshift = height - ( ( - yshift ) % height ) ; - else - yshift %= height ; - - DoMono( pWin, w, x, y, - (const unsigned char *) pStipple->devPrivate.ptr, - h, - width, - ( ( width + 31 ) & (unsigned)(~31) ) >> 3, - height, - xshift, yshift, - alu, (int)planes, (int)fg ) ; - return ; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcArea.c b/xorg-server/hw/xfree86/xf4bpp/ppcArea.c deleted file mode 100644 index df7856a35..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcArea.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -/* - * ppc solid area fill - * - * Tom Paquin 8/87 - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "mfbmap.h" -#include "mfb.h" -#include "ppcGCstr.h" -#include "ibmTrace.h" - -void -xf4bppFillArea( pWin, nboxes, pBox, pGC ) - register WindowPtr pWin ; - register int nboxes ; - register BoxPtr pBox ; - GCPtr pGC ; -{ -register int x, y, w, h ; -int alu ; -unsigned long int fg, bg, pm ; -int xSrc, ySrc ; -PixmapPtr pPixmap ; -ppcPrivGC *pPrivGC = dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()); - -TRACE( ( "xf4bppFillArea(0x%x,%d,0x%x,0x%x)\n", pWin, nboxes, pBox, pGC ) ) ; - -if ( ( alu = pPrivGC->colorRrop.alu ) == GXnoop || !nboxes ) - return ; - -xSrc = pGC->patOrg.x + pWin->drawable.x ; -ySrc = pGC->patOrg.y + pWin->drawable.y ; - -pm = pPrivGC->colorRrop.planemask ; -fg = pPrivGC->colorRrop.fgPixel ; -bg = pPrivGC->colorRrop.bgPixel ; - -nboxes++ ; -switch ( pPrivGC->colorRrop.fillStyle ) { - case FillTiled: - for ( pPixmap = pGC->tile.pixmap ; --nboxes ; pBox++ ) - if ( ( w = pBox->x2 - ( x = pBox->x1 ) ) - && ( h = pBox->y2 - ( y = pBox->y1 ) ) ) - xf4bppTileRect( pWin, pPixmap, alu, pm, - x, y, w, h, xSrc, ySrc ) ; - break ; - case FillOpaqueStippled: - for ( pPixmap = pGC->stipple ; --nboxes ; pBox++ ) - if ( ( w = pBox->x2 - ( x = pBox->x1 ) ) - && ( h = pBox->y2 - ( y = pBox->y1 ) ) ) - xf4bppOpaqueStipple( pWin, pPixmap, fg, bg, alu, pm, - x, y, w, h, xSrc, ySrc ) ; - break ; - case FillStippled: - for ( pPixmap = pGC->stipple ; --nboxes ; pBox++ ) - if ( ( w = pBox->x2 - ( x = pBox->x1 ) ) - && ( h = pBox->y2 - ( y = pBox->y1 ) ) ) - xf4bppFillStipple( pWin, pPixmap, fg, alu, pm, - x, y, w, h, xSrc, ySrc ) ; - break ; - case FillSolid: - for ( ; --nboxes ; pBox++ ) - if ( ( w = pBox->x2 - ( x = pBox->x1 ) ) - && ( h = pBox->y2 - ( y = pBox->y1 ) ) ) - xf4bppFillSolid( pWin, fg, alu, pm, x, y, w, h ) ; - break ; -} - -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcCReduce.c b/xorg-server/hw/xfree86/xf4bpp/ppcCReduce.c deleted file mode 100644 index c567e6fd1..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcCReduce.c +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "ppcGCstr.h" - -/* xf4bppGetReducedColorRrop( pGC, drawableDepth, returnLoc ) - * An attempt to do "strength reduction" on color raster-ops - * P. Shupak 1/88 - */ - -static void -ppcReduceGeneral -( - register int alu, - register unsigned long pm, - register unsigned long fg, - register unsigned long bg, - register int fillStyle, - int drawableDepth, - ppcReducedRrop *returnLoc -) -{ - -if ( ( alu == GXnoop ) - || !( pm &= ( ( 1 << drawableDepth ) - 1 ) ) ) { - returnLoc->alu = GXnoop ; - return ; -} - -#ifdef DELETE_THIS -switch ( fillStyle ) { - case FillTiled: - switch ( alu ) { - case GXclear: /* 0x0 Zero 0 */ - case GXinvert: /* 0xa NOT dst */ - case GXset: /* 0xf 1 */ - fillStyle = FillSolid ; - default: /* We Can't Do Much Here */ - break ; - } - break ; - case FillOpaqueStippled: - if ( ( fg & pm ) != ( bg & pm ) ) { /* else FillSolid */ - switch ( alu ) { - case GXclear: /* 0x0 Zero 0 */ - case GXset: /* 0xf 1 */ - case GXinvert: /* 0xa NOT dst */ - fillStyle = FillSolid ; - break ; - case GXnor: /* 0x8 NOT src AND NOT dst */ - case GXnand: /* 0xe NOT src OR NOT dst */ - case GXcopy: /* 0x3 src */ - break ; - case GXandReverse: /* 0x2 src AND NOT dst */ - fg = ~fg ; - bg = ~bg ; - alu = GXnor ; - break ; - case GXandInverted: /* 0x4 NOT src AND dst */ - fg = ~fg ; - bg = ~bg ; - alu = GXand ; /* Fall Through */ - case GXand: /* 0x1 src AND dst */ - pm &= ~( fg & bg ) ; - if ( ( bg & pm ) == pm ) { - fillStyle = FillStippled ; - alu = GXclear ; - } - break ; - case GXequiv: /* 0x9 NOT src XOR dst */ - fg = ~fg ; - bg = ~bg ; - alu = GXxor ; /* Fall Through */ - case GXxor: /* 0x6 src XOR dst */ - pm &= ( fg | bg ) ; - if ( !( bg & pm ) ) { - fillStyle = FillStippled ; - alu = GXinvert ; - } - break ; - case GXorReverse: /* 0xb src OR NOT dst */ - fg = ~fg ; - bg = ~bg ; - alu = GXnand ; - break ; - case GXcopyInverted: /* 0xc NOT src */ - fg = ~fg ; - bg = ~bg ; - alu = GXcopy ; - break ; - case GXorInverted: /* 0xd NOT src OR dst */ - fg = ~fg ; - bg = ~bg ; - alu = GXor ; /* Fall Through */ - case GXor: /* 0x7 src OR dst */ - pm &= ( fg | bg ) ; - if ( !( bg & pm ) ) { - fillStyle = FillStippled ; - alu = GXset ; - } - break ; - default: - ErrorF( - "xf4bppGetReducedColorRrop: Unknown Alu Raster-Op" ) ; - break ; - } - break ; /* Don't Fall Through */ - } - else - fillStyle = FillSolid ; - /* Fall Through */ - case FillStippled: - case FillSolid: - switch ( alu ) { - case GXclear: /* 0x0 Zero 0 */ - case GXset: /* 0xf 1 */ - case GXinvert: /* 0xa NOT dst */ - break ; - case GXand: /* 0x1 src AND dst */ - pm &= ~fg ; - alu = GXclear ; - break ; - case GXandReverse: /* 0x2 src AND NOT dst */ - fg = ~fg ; - alu = GXnor ; /* Fall Through */ - case GXnor: /* 0x8 NOT src AND NOT dst */ - if ( !( fg & pm ) ) - alu = GXclear ; - else if ( ( fg & pm ) == pm ) - alu = GXinvert ; - break ; - case GXandInverted: /* 0x4 NOT src AND dst */ - pm &= fg ; - alu = GXclear ; - break ; - case GXxor: /* 0x6 src XOR dst */ - pm &= fg ; - alu = GXinvert ; - break ; - case GXor: /* 0x7 src OR dst */ - pm &= fg ; - alu = GXset ; - break ; - case GXequiv: /* 0x9 NOT src XOR dst */ - pm &= ~fg ; - alu = GXinvert ; - break ; - case GXorReverse: /* 0xb src OR NOT dst */ - fg = ~fg ; - alu = GXnand ; /* Fall Through */ - case GXnand: /* 0xe NOT src OR NOT dst */ - if ( !( fg & pm ) ) - alu = GXset ; - else if ( ( fg & pm ) == pm ) - alu = GXinvert ; - break ; - case GXcopyInverted: /* 0xc NOT src */ - fg = ~fg ; - alu = GXcopy ; /* Fall Through */ - case GXcopy: /* 0x3 src */ - if ( !( fg & pm ) ) - alu = GXclear ; - else if ( ( fg & pm ) == pm ) - alu = GXset ; - break ; - case GXorInverted: /* 0xd NOT src OR dst */ - pm &= ~fg ; - alu = GXset ; - break ; - default: - ErrorF( - "xf4bppGetReducedColorRrop: Unknown Alu Raster-Op" ) ; - break ; - } - break; - default: - ErrorF("xf4bppGetReducedColorRrop: Bad Fillstyle\n"); - break; -} -#endif - -/* Final Test On Restricted Plane Mask */ -if ( !pm ) - alu = GXnoop ; - -/* Set Actual Returned Values */ -returnLoc->planemask = pm ; -returnLoc->fgPixel = fg ; -returnLoc->bgPixel = bg ; -returnLoc->alu = alu ; -returnLoc->fillStyle = fillStyle ; - -return ; -} - -void -xf4bppGetReducedColorRrop( pGC, drawableDepth, returnLoc ) -GC *pGC ; -int drawableDepth ; -ppcReducedRrop *returnLoc ; -{ - -ppcReduceGeneral( pGC->alu, - pGC->planemask, - pGC->fgPixel, - pGC->bgPixel, - pGC->fillStyle, - drawableDepth, - returnLoc ) ; - -return ; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcClip.c b/xorg-server/hw/xfree86/xf4bpp/ppcClip.c deleted file mode 100644 index 899dba683..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcClip.c +++ /dev/null @@ -1,157 +0,0 @@ -/* - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the X Consortium. - - -Copyright IBM Corporation 1987,1988,1989 -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of IBM not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include - -#include "xf4bpp.h" -#include "mfbmap.h" -#include "mfb.h" -#include "scrnintstr.h" - -void -xf4bppDestroyClip(pGC) - GCPtr pGC; -{ - if(pGC->clientClipType == CT_NONE) - return; - else if (pGC->clientClipType == CT_PIXMAP) - { - mfbDestroyPixmap((PixmapPtr)(pGC->clientClip)); - } - else - { - /* we know we'll never have a list of rectangles, since - ChangeClip immediately turns them into a region - */ - REGION_DESTROY(pGC->pScreen, pGC->clientClip); - } - pGC->clientClip = NULL; - pGC->clientClipType = CT_NONE; -} - -void -xf4bppChangeClip(pGC, type, pvalue, nrects) - GCPtr pGC; - int type; - pointer pvalue; - int nrects; -{ - xf4bppDestroyClip(pGC); - if(type == CT_PIXMAP) - { - /* convert the pixmap to a region */ - pGC->clientClip = (pointer) (*pGC->pScreen->BitmapToRegion)((PixmapPtr)pvalue); - /* you wouldn't do this if you were leaving the pixmap in - rather than converting it. - */ - (*pGC->pScreen->DestroyPixmap)(pvalue); - } - else if (type == CT_REGION) - { - /* stuff the region in the GC */ - pGC->clientClip = pvalue; - } - else if (type != CT_NONE) - { - pGC->clientClip = (pointer) RECTS_TO_REGION(pGC->pScreen, nrects, - (xRectangle *)pvalue, - type); - xfree(pvalue); - } - pGC->clientClipType = (type != CT_NONE && pGC->clientClip) ? CT_REGION : - CT_NONE; - pGC->stateChanges |= GCClipMask; -} - -void -xf4bppCopyClip (pgcDst, pgcSrc) - GCPtr pgcDst, pgcSrc; -{ - RegionPtr prgnNew; - - switch(pgcSrc->clientClipType) - { - case CT_PIXMAP: - ((PixmapPtr) pgcSrc->clientClip)->refcnt++; - /* Fall through !! */ - case CT_NONE: - xf4bppChangeClip(pgcDst, pgcSrc->clientClipType, pgcSrc->clientClip, 0); - break; - case CT_REGION: - prgnNew = REGION_CREATE(pgcSrc->pScreen, NULL, 1); - REGION_COPY(pgcSrc->pScreen, prgnNew, (RegionPtr)(pgcSrc->clientClip)); - xf4bppChangeClip(pgcDst, CT_REGION, (pointer)prgnNew, 0); - break; - } -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcCpArea.c b/xorg-server/hw/xfree86/xf4bpp/ppcCpArea.c deleted file mode 100644 index 9bdaf89e3..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcCpArea.c +++ /dev/null @@ -1,470 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -/*********************************************************** -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include - -#include "xf4bpp.h" -#include "mfbmap.h" -#define PSZ 8 -#include "mfb.h" -#include "mergerop.h" -#include "mi.h" -#include "pixmapstr.h" -#include "scrnintstr.h" - -/* - * Graft in the DoBitblt from cfb. It does everything correctly. - */ -static void -vga16DoBitblt -( - DrawablePtr pSrc, - DrawablePtr pDst, - int alu, - RegionPtr prgnDst, - DDXPointPtr pptSrc, - unsigned long planemask -) -{ - int widthSrc, widthDst; /* add to get to same position in next line */ - BoxPtr pbox; - int nbox; - BoxPtr pboxTmp, pboxNext, pboxBase, pboxNew1, pboxNew2; - /* temporaries for shuffling rectangles */ - DDXPointPtr pptTmp, pptNew1, pptNew2; - /* shuffling boxes entails shuffling the - source points too */ - int w, h; - int careful; - - widthSrc = mfbGetPixelWidth(pSrc); - widthDst = mfbGetPixelWidth(pDst); - - /* XXX we have to err on the side of safety when both are windows, - * because we don't know if IncludeInferiors is being used. - */ - careful = ((pSrc == pDst) || - ((pSrc->type == DRAWABLE_WINDOW) && - (pDst->type == DRAWABLE_WINDOW))); - - pbox = REGION_RECTS(prgnDst); - nbox = REGION_NUM_RECTS(prgnDst); - - pboxNew1 = NULL; - pptNew1 = NULL; - pboxNew2 = NULL; - pptNew2 = NULL; - if (careful && (pptSrc->y < pbox->y1)) - { - /* walk source botttom to top */ - widthSrc = -widthSrc; - widthDst = -widthDst; - - if (nbox > 1) - { - /* keep ordering in each band, reverse order of bands */ - pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); - if(!pboxNew1) - return; - pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox); - if(!pptNew1) - { - xfree(pboxNew1); - return; - } - pboxBase = pboxNext = pbox+nbox-1; - while (pboxBase >= pbox) - { - while ((pboxNext >= pbox) && - (pboxBase->y1 == pboxNext->y1)) - pboxNext--; - pboxTmp = pboxNext+1; - pptTmp = pptSrc + (pboxTmp - pbox); - while (pboxTmp <= pboxBase) - { - *pboxNew1++ = *pboxTmp++; - *pptNew1++ = *pptTmp++; - } - pboxBase = pboxNext; - } - pboxNew1 -= nbox; - pbox = pboxNew1; - pptNew1 -= nbox; - pptSrc = pptNew1; - } - } - - if (careful && (pptSrc->x < pbox->x1)) - { - if (nbox > 1) - { - /* reverse order of rects in each band */ - pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); - pptNew2 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox); - if(!pboxNew2 || !pptNew2) - { - if (pptNew2) xfree(pptNew2); - if (pboxNew2) xfree(pboxNew2); - if (pboxNew1) - { - xfree(pptNew1); - xfree(pboxNew1); - } - return; - } - pboxBase = pboxNext = pbox; - while (pboxBase < pbox+nbox) - { - while ((pboxNext < pbox+nbox) && - (pboxNext->y1 == pboxBase->y1)) - pboxNext++; - pboxTmp = pboxNext; - pptTmp = pptSrc + (pboxTmp - pbox); - while (pboxTmp != pboxBase) - { - *pboxNew2++ = *--pboxTmp; - *pptNew2++ = *--pptTmp; - } - pboxBase = pboxNext; - } - pboxNew2 -= nbox; - pbox = pboxNew2; - pptNew2 -= nbox; - pptSrc = pptNew2; - } - } - - while(nbox--) - { - w = pbox->x2 - pbox->x1; - h = pbox->y2 - pbox->y1; - - if( pSrc->type == DRAWABLE_WINDOW ) - xf4bppBitBlt( (WindowPtr)pDst, alu, planemask, - pptSrc->x, /* x0 */ - pptSrc->y, /* y0 */ - pbox->x1, /* x1 */ - pbox->y1, /* y1 */ - w, h ); /* w, h */ - else /* DRAWABLE_PIXMAP */ - xf4bppDrawColorImage( (WindowPtr)pDst, - pbox->x1, pbox->y1, - w, - h, - ((unsigned char *)((PixmapPtr)pSrc)->devPrivate.ptr - + pptSrc->x + (pptSrc->y*((PixmapPtr)pSrc)->devKind)), - ((PixmapPtr)pSrc)->devKind, - alu, planemask ) ; - pbox++; - pptSrc++; - } - if (pboxNew2) - { - xfree(pptNew2); - xfree(pboxNew2); - } - if (pboxNew1) - { - xfree(pptNew1); - xfree(pboxNew1); - } -} - - -/* - * Graft in the CopyArea from mfb/cfb. It does everything correctly. - */ - -RegionPtr -xf4bppCopyArea(pSrcDrawable, pDstDrawable, - pGC, srcx, srcy, width, height, dstx, dsty) -register DrawablePtr pSrcDrawable; -register DrawablePtr pDstDrawable; -register GC *pGC; -int srcx, srcy; -int width, height; -int dstx, dsty; -{ - RegionPtr prgnSrcClip = NULL; /* may be a new region, or just a copy */ - Bool freeSrcClip = FALSE; - - RegionPtr prgnExposed; - RegionRec rgnDst; - DDXPointPtr pptSrc; - register DDXPointPtr ppt; - register BoxPtr pbox; - int i; - register int dx; - register int dy; - xRectangle origSource; - DDXPointRec origDest; - int numRects; - BoxRec fastBox; - int fastClip = 0; /* for fast clipping with pixmap source */ - int fastExpose = 0; /* for fast exposures with pixmap source */ - - if ( pDstDrawable->type != DRAWABLE_WINDOW ) - return miCopyArea( pSrcDrawable, pDstDrawable, pGC, - srcx, srcy, width, height, dstx, dsty ) ; - - /* Begin code from mfb/cfbCopyArea */ - - origSource.x = srcx; - origSource.y = srcy; - origSource.width = width; - origSource.height = height; - origDest.x = dstx; - origDest.y = dsty; - - if ((pSrcDrawable != pDstDrawable) && - pSrcDrawable->pScreen->SourceValidate) - { - (*pSrcDrawable->pScreen->SourceValidate) (pSrcDrawable, srcx, srcy, width, height); - } - - srcx += pSrcDrawable->x; - srcy += pSrcDrawable->y; - - /* clip the source */ - - if (pSrcDrawable->type == DRAWABLE_PIXMAP) - { - if ((pSrcDrawable == pDstDrawable) && - (pGC->clientClipType == CT_NONE)) - { - prgnSrcClip = pGC->pCompositeClip; - } - else - { - fastClip = 1; - } - } - else - { - if (pGC->subWindowMode == IncludeInferiors) - { - if (!((WindowPtr) pSrcDrawable)->parent) - { - /* - * special case bitblt from root window in - * IncludeInferiors mode; just like from a pixmap - */ - fastClip = 1; - } - else if ((pSrcDrawable == pDstDrawable) && - (pGC->clientClipType == CT_NONE)) - { - prgnSrcClip = pGC->pCompositeClip; - } - else - { - prgnSrcClip = NotClippedByChildren((WindowPtr)pSrcDrawable); - freeSrcClip = TRUE; - } - } - else - { - prgnSrcClip = &((WindowPtr)pSrcDrawable)->clipList; - } - } - - fastBox.x1 = srcx; - fastBox.y1 = srcy; - fastBox.x2 = srcx + width; - fastBox.y2 = srcy + height; - - /* Don't create a source region if we are doing a fast clip */ - if (fastClip) - { - fastExpose = 1; - /* - * clip the source; if regions extend beyond the source size, - * make sure exposure events get sent - */ - if (fastBox.x1 < pSrcDrawable->x) - { - fastBox.x1 = pSrcDrawable->x; - fastExpose = 0; - } - if (fastBox.y1 < pSrcDrawable->y) - { - fastBox.y1 = pSrcDrawable->y; - fastExpose = 0; - } - if (fastBox.x2 > pSrcDrawable->x + (int) pSrcDrawable->width) - { - fastBox.x2 = pSrcDrawable->x + (int) pSrcDrawable->width; - fastExpose = 0; - } - if (fastBox.y2 > pSrcDrawable->y + (int) pSrcDrawable->height) - { - fastBox.y2 = pSrcDrawable->y + (int) pSrcDrawable->height; - fastExpose = 0; - } - } - else - { - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); - REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip); - } - - dstx += pDstDrawable->x; - dsty += pDstDrawable->y; - - if (pDstDrawable->type == DRAWABLE_WINDOW) - { - if (!((WindowPtr)pDstDrawable)->realized) - { - if (!fastClip) - REGION_UNINIT(pGC->pScreen, &rgnDst); - if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); - return NULL; - } - } - - dx = srcx - dstx; - dy = srcy - dsty; - - /* Translate and clip the dst to the destination composite clip */ - if (fastClip) - { - RegionPtr cclip; - - /* Translate the region directly */ - fastBox.x1 -= dx; - fastBox.x2 -= dx; - fastBox.y1 -= dy; - fastBox.y2 -= dy; - - /* If the destination composite clip is one rectangle we can - do the clip directly. Otherwise we have to create a full - blown region and call intersect */ - cclip = pGC->pCompositeClip; - if (REGION_NUM_RECTS(cclip) == 1) - { - BoxPtr pBox = REGION_RECTS(cclip); - - if (fastBox.x1 < pBox->x1) fastBox.x1 = pBox->x1; - if (fastBox.x2 > pBox->x2) fastBox.x2 = pBox->x2; - if (fastBox.y1 < pBox->y1) fastBox.y1 = pBox->y1; - if (fastBox.y2 > pBox->y2) fastBox.y2 = pBox->y2; - - /* Check to see if the region is empty */ - if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2) - { - REGION_NULL(pGC->pScreen, &rgnDst); - } - else - { - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); - } - } - else - { - /* We must turn off fastClip now, since we must create - a full blown region. It is intersected with the - composite clip below. */ - fastClip = 0; - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); - } - } - else - { - REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy); - } - - if (!fastClip) - { - REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, pGC->pCompositeClip); - } - - /* Do bit blitting */ - numRects = REGION_NUM_RECTS(&rgnDst); - if (numRects && width && height) - { - if(!(pptSrc = (DDXPointPtr)xalloc(numRects * - sizeof(DDXPointRec)))) - { - REGION_UNINIT(pGC->pScreen, &rgnDst); - if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); - return NULL; - } - pbox = REGION_RECTS(&rgnDst); - ppt = pptSrc; - for (i = numRects; --i >= 0; pbox++, ppt++) - { - ppt->x = pbox->x1 + dx; - ppt->y = pbox->y1 + dy; - } - - vga16DoBitblt(pSrcDrawable, pDstDrawable, pGC->alu, - &rgnDst, pptSrc, pGC->planemask ); - xfree(pptSrc); - } - - prgnExposed = NULL; - if (pGC->fExpose) - { - /* Pixmap sources generate a NoExposed (we return NULL to do this) */ - if (!fastExpose) - prgnExposed = - miHandleExposures(pSrcDrawable, pDstDrawable, pGC, - origSource.x, origSource.y, - (int)origSource.width, - (int)origSource.height, - origDest.x, origDest.y, (unsigned long)0); - } - REGION_UNINIT(pGC->pScreen, &rgnDst); - if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); - return prgnExposed; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcDepth.c b/xorg-server/hw/xfree86/xf4bpp/ppcDepth.c deleted file mode 100644 index 2fa19ff80..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcDepth.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -/* Check to see if the alleged depth is acceptable for the Screen - * - * T. Paquin 9/87 - * - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "scrnintstr.h" - -Bool -xf4bppDepthOK(pDraw,depth) -register DrawablePtr pDraw; -register int depth; -{ -register ScreenPtr pScreen= pDraw->pScreen; -register int i = pScreen->numDepths; - - if ( ( pDraw->type == DRAWABLE_PIXMAP ) && ( depth == 1 ) ) - return TRUE ; - - while ( i-- ) - if ( depth == pScreen->allowedDepths[i].depth ) - return TRUE ; - - return FALSE ; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcFillRct.c b/xorg-server/hw/xfree86/xf4bpp/ppcFillRct.c deleted file mode 100644 index 3422c8092..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcFillRct.c +++ /dev/null @@ -1,215 +0,0 @@ -/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "mfbmap.h" -#include "mfb.h" -#include "maskbits.h" -#include "scrnintstr.h" - -#define MODEQ(a, b) ((a) %= (b)) - -/* - filled rectangles. - translate the rectangles, clip them, and call the -helper function in the GC. -*/ - -#define NUM_STACK_RECTS 1024 - -void -xf4bppPolyFillRect(pDrawable, pGC, nrectFill, prectInit) - DrawablePtr pDrawable; - GCPtr pGC; - int nrectFill; /* number of rectangles to fill */ - xRectangle *prectInit; /* Pointer to first rectangle to fill */ -{ - xRectangle *prect; - RegionPtr prgnClip; - register BoxPtr pbox; - register BoxPtr pboxClipped; - BoxPtr pboxClippedBase; - BoxPtr pextent; - BoxRec stackRects[NUM_STACK_RECTS]; - int numRects; - int n; - int xorg, yorg; - - if (!(pGC->planemask & 0x0F)) /* GJA */ - return; - - prgnClip = pGC->pCompositeClip; - - prect = prectInit; - xorg = pDrawable->x; - yorg = pDrawable->y; - if (xorg || yorg) - { - prect = prectInit; - n = nrectFill; - Duff (n, prect->x += xorg; prect->y += yorg; prect++); - } - - - prect = prectInit; - - numRects = REGION_NUM_RECTS(prgnClip) * nrectFill; - if (numRects > NUM_STACK_RECTS) - { - pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec)); - if (!pboxClippedBase) - return; - } - else - pboxClippedBase = stackRects; - - pboxClipped = pboxClippedBase; - - if (REGION_NUM_RECTS(prgnClip) == 1) - { - int x1, y1, x2, y2, bx2, by2; - - pextent = REGION_RECTS(prgnClip); - x1 = pextent->x1; - y1 = pextent->y1; - x2 = pextent->x2; - y2 = pextent->y2; - while (nrectFill--) - { - if ((pboxClipped->x1 = prect->x) < x1) - pboxClipped->x1 = x1; - - if ((pboxClipped->y1 = prect->y) < y1) - pboxClipped->y1 = y1; - - bx2 = (int) prect->x + (int) prect->width; - if (bx2 > x2) - bx2 = x2; - pboxClipped->x2 = bx2; - - by2 = (int) prect->y + (int) prect->height; - if (by2 > y2) - by2 = y2; - pboxClipped->y2 = by2; - - prect++; - if ((pboxClipped->x1 < pboxClipped->x2) && - (pboxClipped->y1 < pboxClipped->y2)) - { - pboxClipped++; - } - } - } - else - { - int x1, y1, x2, y2, bx2, by2; - - pextent = REGION_EXTENTS(pGC->pScreen, prgnClip); - x1 = pextent->x1; - y1 = pextent->y1; - x2 = pextent->x2; - y2 = pextent->y2; - while (nrectFill--) - { - BoxRec box; - - if ((box.x1 = prect->x) < x1) - box.x1 = x1; - - if ((box.y1 = prect->y) < y1) - box.y1 = y1; - - bx2 = (int) prect->x + (int) prect->width; - if (bx2 > x2) - bx2 = x2; - box.x2 = bx2; - - by2 = (int) prect->y + (int) prect->height; - if (by2 > y2) - by2 = y2; - box.y2 = by2; - - prect++; - - if ((box.x1 >= box.x2) || (box.y1 >= box.y2)) - continue; - - n = REGION_NUM_RECTS (prgnClip); - pbox = REGION_RECTS(prgnClip); - - /* clip the rectangle to each box in the clip region - this is logically equivalent to calling Intersect() - */ - while(n--) - { - pboxClipped->x1 = max(box.x1, pbox->x1); - pboxClipped->y1 = max(box.y1, pbox->y1); - pboxClipped->x2 = min(box.x2, pbox->x2); - pboxClipped->y2 = min(box.y2, pbox->y2); - pbox++; - - /* see if clipping left anything */ - if(pboxClipped->x1 < pboxClipped->x2 && - pboxClipped->y1 < pboxClipped->y2) - { - pboxClipped++; - } - } - } - } - if (pboxClipped != pboxClippedBase) - xf4bppFillArea((WindowPtr)pDrawable, pboxClipped-pboxClippedBase, - pboxClippedBase, pGC); - if (pboxClippedBase != stackRects) - xfree(pboxClippedBase); -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcGC.c b/xorg-server/hw/xfree86/xf4bpp/ppcGC.c deleted file mode 100644 index 7ef312d39..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcGC.c +++ /dev/null @@ -1,446 +0,0 @@ -/* - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the X Consortium. - - -Copyright IBM Corporation 1987,1988,1989 -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of IBM not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include - -#include "xf4bpp.h" -#include "mfbmap.h" -#include "mfb.h" -#include "mi.h" -#include "scrnintstr.h" -#include "ppcGCstr.h" -#include "vgaVideo.h" -#include "ibmTrace.h" - -#define ppcGCInterestValidateMask \ -( GCLineStyle | GCLineWidth | GCJoinStyle | GCBackground | GCForeground \ -| GCFunction | GCPlaneMask | GCFillStyle | GC_CALL_VALIDATE_BIT \ -| GCClipXOrigin | GCClipYOrigin | GCClipMask | GCSubwindowMode ) - -static void xf4bppValidateGC(GCPtr, unsigned long, DrawablePtr); -static void xf4bppDestroyGC(GC *); - -static GCFuncs vgaGCFuncs = { - xf4bppValidateGC, - (void (*)(GCPtr, unsigned long))NoopDDA, - (void (*)(GCPtr, unsigned long, GCPtr))NoopDDA, - xf4bppDestroyGC, - xf4bppChangeClip, - xf4bppDestroyClip, - xf4bppCopyClip, - { NULL } -}; - - -static ppcPrivGC vgaPrototypeGCPriv = { - GXcopy, /* unsigned char rop */ - 0, /* unsigned char ropOpStip */ - 0, /* unsigned char ropFillArea */ - {0, }, /* unsigned char unused[sizeof(long) - 3] */ - NULL, /* mfbFillAreaProcPtr FillArea */ - { - VGA_ALLPLANES, /* unsigned long planemask */ - 1, /* unsigned long fgPixel */ - 0, /* unsigned long bgPixel */ - GXcopy, /* int alu */ - FillSolid, /* int fillStyle */ - }, /* ppcReducedRrop colorRrop */ - -1, /* short lastDrawableType */ - -1, /* short lastDrawableDepth */ - 0 /* pointer devPriv */ -} ; - -static GCOps vgaGCOps = { - xf4bppSolidWindowFS, /* void (* FillSpans)() */ - xf4bppSetSpans, /* void (* SetSpans)() */ - miPutImage, /* void (* PutImage)() */ - xf4bppCopyArea, /* RegionPtr (* CopyArea)() */ - miCopyPlane, /* void (* CopyPlane)() */ - xf4bppPolyPoint, /* void (* PolyPoint)() */ - miZeroLine, /* void (* Polylines)() */ - miPolySegment, /* void (* PolySegment)() */ - miPolyRectangle, /* void (* PolyRectangle)() */ - xf4bppZeroPolyArc, /* void (* PolyArc)() */ - miFillPolygon, /* void (* FillPolygon)() */ - miPolyFillRect, /* void (* PolyFillRect)() */ - xf4bppPolyFillArc, /* void (* PolyFillArc)() */ - miPolyText8, /* int (* PolyText8)() */ - miPolyText16, /* int (* PolyText16)() */ - miImageText8, /* void (* ImageText8)() */ - miImageText16, /* void (* ImageText16)() */ - xf4bppImageGlyphBlt, /* GJA -- void (* ImageGlyphBlt)() */ - miPolyGlyphBlt, /* GJA -- void (* PolyGlyphBlt)() */ - miPushPixels, /* void (* PushPixels)() */ - {NULL} /* devPrivate */ -}; - -Bool -xf4bppCreateGC( pGC ) -register GCPtr pGC ; -{ - ppcPrivGC *pPriv ; - GCOps *pOps ; - - if ( pGC->depth == 1 ) - { - return (mfbCreateGC(pGC)); - } - - if ( !( pPriv = xalloc( sizeof( ppcPrivGC ) ) ) ) - return FALSE ; - - if ( !( pOps = xalloc( sizeof( GCOps ) ) ) ) { - xfree(pPriv); - return FALSE; - } - - /* Now we initialize the GC fields */ - pGC->miTranslate = 1; - pGC->unused = 0; - pGC->planemask = VGA_ALLPLANES; - pGC->fgPixel = VGA_BLACK_PIXEL; - pGC->bgPixel = VGA_WHITE_PIXEL; - pGC->funcs = &vgaGCFuncs; - /* ops, -- see below */ - - pGC->fExpose = TRUE; - pGC->freeCompClip = FALSE; - - /* GJA: I don't like this code: - * they allocated a mfbPrivGC, ignore the allocated data and place - * a pointer to a ppcPrivGC in its slot. - */ - *pPriv = vgaPrototypeGCPriv; - dixSetPrivate(&pGC->devPrivates, mfbGetGCPrivateKey(), pPriv); - - /* Set the vgaGCOps */ - *pOps = vgaGCOps; - pOps->devPrivate.val = 1; - pGC->ops = pOps; - - return TRUE ; -} - -static void -xf4bppDestroyGC( pGC ) - register GC *pGC ; - -{ - TRACE( ( "xf4bppDestroyGC(pGC=0x%x)\n", pGC ) ) ; - - if ( pGC->freeCompClip && pGC->pCompositeClip ) - REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip); - if(pGC->ops->devPrivate.val) xfree( pGC->ops ); - xfree(dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey())); - return ; -} - -static Mask -ppcChangePixmapGC -( - register GC *pGC, - register Mask changes -) -{ -register ppcPrivGCPtr devPriv = (ppcPrivGCPtr)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()); -register unsigned long int idx ; /* used for stepping through bitfields */ - -#define LOWBIT( x ) ( x & - x ) /* Two's complement */ -while ((idx = LOWBIT(changes))) { - switch ( idx ) { - - case GCLineStyle: - case GCLineWidth: - pGC->ops->Polylines = ( ! pGC->lineWidth ) - ? miZeroLine - : ( ( pGC->lineStyle == LineSolid ) - ? miWideLine : miWideDash ) ; - changes &= ~( GCLineStyle | GCLineWidth ) ; - break ; - - case GCJoinStyle: - changes &= ~ idx ; /* i.e. changes &= ~ GCJoinStyle */ - break ; - - case GCBackground: - if ( pGC->fillStyle != FillOpaqueStippled ) { - changes &= ~ idx ; /* i.e. changes &= ~GCBackground */ - break ; - } /* else Fall Through */ - case GCForeground: - if ( pGC->fillStyle == FillTiled ) { - changes &= ~ idx ; /* i.e. changes &= ~GCForeground */ - break ; - } /* else Fall Through */ - case GCFunction: - case GCPlaneMask: - case GCFillStyle: - { /* new_fill */ - int fillStyle = devPriv->colorRrop.fillStyle ; - /* install a suitable fillspans */ - if ( fillStyle == FillSolid ) - pGC->ops->FillSpans = xf4bppSolidPixmapFS ; - else if ( fillStyle == FillStippled ) - pGC->ops->FillSpans = xf4bppStipplePixmapFS ; - else if ( fillStyle == FillOpaqueStippled ) - pGC->ops->FillSpans = xf4bppOpStipplePixmapFS ; - else /* fillStyle == FillTiled */ - pGC->ops->FillSpans = xf4bppTilePixmapFS ; - changes &= ~( GCBackground | GCForeground - | GCFunction | GCPlaneMask | GCFillStyle ) ; - break ; - } /* end of new_fill */ - - default: - ErrorF( "ppcChangePixmapGC: Unexpected GC Change\n" ) ; - changes &= ~ idx ; /* Remove it anyway */ - break ; - } -} - -return 0 ; -} - -/* Clipping conventions - if the drawable is a window - CT_REGION ==> pCompositeClip really is the composite - CT_other ==> pCompositeClip is the window clip region - if the drawable is a pixmap - CT_REGION ==> pCompositeClip is the translated client region - clipped to the pixmap boundary - CT_other ==> pCompositeClip is the pixmap bounding box -*/ - -static void -xf4bppValidateGC( pGC, changes, pDrawable ) - GCPtr pGC; - unsigned long changes; - DrawablePtr pDrawable; -{ - register ppcPrivGCPtr devPriv ; - WindowPtr pWin ; - - devPriv = (ppcPrivGCPtr)dixLookupPrivate(&pGC->devPrivates, - mfbGetGCPrivateKey()); - if ( pDrawable->type != devPriv->lastDrawableType ) { - devPriv->lastDrawableType = pDrawable->type ; - xf4bppChangeGCtype( pGC, devPriv ) ; - changes = (unsigned)~0 ; - } - - if ( pDrawable->depth == 1 ) { -/* ibmAbort(); */ - xf4bppNeverCalled(); - } - - if ( pDrawable->type == DRAWABLE_WINDOW ) { - pWin = (WindowPtr) pDrawable ; - pGC->lastWinOrg.x = pWin->drawable.x ; - pGC->lastWinOrg.y = pWin->drawable.y ; - } - else { - pWin = (WindowPtr) NULL ; - pGC->lastWinOrg.x = 0 ; - pGC->lastWinOrg.y = 0 ; - } - - changes &= ppcGCInterestValidateMask ; - /* If Nothing REALLY Changed, Just Return */ - if ( pDrawable->serialNumber == (pGC->serialNumber & DRAWABLE_SERIAL_BITS) ) - if ( !( changes &= ~ GC_CALL_VALIDATE_BIT ) ) - return ; - - /* GJA -- start of cfb code */ - /* - * if the client clip is different or moved OR the subwindowMode has - * changed OR the window's clip has changed since the last validation - * we need to recompute the composite clip - */ - - if ((changes & (GCClipXOrigin|GCClipYOrigin|GCClipMask|GCSubwindowMode)) || - (pDrawable->serialNumber != (pGC->serialNumber & DRAWABLE_SERIAL_BITS)) - ) - { - if (pWin) { - RegionPtr pregWin; - Bool freeTmpClip, freeCompClip; - - if (pGC->subWindowMode == IncludeInferiors) { - pregWin = NotClippedByChildren(pWin); - freeTmpClip = TRUE; - } - else { - pregWin = &pWin->clipList; - freeTmpClip = FALSE; - } - freeCompClip = pGC->freeCompClip; - - /* - * if there is no client clip, we can get by with just keeping - * the pointer we got, and remembering whether or not should - * destroy (or maybe re-use) it later. this way, we avoid - * unnecessary copying of regions. (this wins especially if - * many clients clip by children and have no client clip.) - */ - if (pGC->clientClipType == CT_NONE) { - if (freeCompClip) - REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip); - pGC->pCompositeClip = pregWin; - pGC->freeCompClip = freeTmpClip; - } - else { - /* - * we need one 'real' region to put into the composite - * clip. if pregWin the current composite clip are real, - * we can get rid of one. if pregWin is real and the - * current composite clip isn't, use pregWin for the - * composite clip. if the current composite clip is real - * and pregWin isn't, use the current composite clip. if - * neither is real, create a new region. - */ - - REGION_TRANSLATE(pGC->pScreen, pGC->clientClip, - pDrawable->x + pGC->clipOrg.x, - pDrawable->y + pGC->clipOrg.y); - - if (freeCompClip) - { - REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, - pregWin, pGC->clientClip); - if (freeTmpClip) - REGION_DESTROY(pGC->pScreen, pregWin); - } - else if (freeTmpClip) - { - REGION_INTERSECT(pGC->pScreen, pregWin, pregWin, - pGC->clientClip); - pGC->pCompositeClip = pregWin; - } - else - { - pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, NullBox, 0); - REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, - pregWin, pGC->clientClip); - } - pGC->freeCompClip = TRUE; - REGION_TRANSLATE(pGC->pScreen, pGC->clientClip, - -(pDrawable->x + pGC->clipOrg.x), - -(pDrawable->y + pGC->clipOrg.y)); - - } - } /* end of composite clip for a window */ - else { - BoxRec pixbounds; - - /* XXX should we translate by drawable.x/y here ? */ - pixbounds.x1 = 0; - pixbounds.y1 = 0; - pixbounds.x2 = pDrawable->width; - pixbounds.y2 = pDrawable->height; - - if (pGC->freeCompClip) { - REGION_RESET(pGC->pScreen, pGC->pCompositeClip, &pixbounds); - } else { - pGC->freeCompClip = TRUE; - pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, &pixbounds, 1); - } - - if (pGC->clientClipType == CT_REGION) - { - REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip, - -pGC->clipOrg.x, -pGC->clipOrg.y); - REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, - pGC->pCompositeClip, pGC->clientClip); - REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip, - pGC->clipOrg.x, pGC->clipOrg.y); - } - } /* end of composute clip for pixmap */ - } - /* GJA -- End of cfb code */ - - changes &= ~ ( GCClipXOrigin | GCClipYOrigin | GCClipMask | GCSubwindowMode - | GC_CALL_VALIDATE_BIT ) ; - - /* If needed, Calculate the Color Reduced Raster-Op */ - if ( changes & ( GCFillStyle | GCBackground | GCForeground - | GCPlaneMask | GCFunction ) ) - xf4bppGetReducedColorRrop( pGC, pDrawable->depth, - &devPriv->colorRrop ) ; - - (* ( ( pDrawable->type == DRAWABLE_WINDOW ) - ? xf4bppChangeWindowGC - : ppcChangePixmapGC ) )( pGC, changes ) ; - - return ; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcGCstr.h b/xorg-server/hw/xfree86/xf4bpp/ppcGCstr.h deleted file mode 100644 index 82d1f2df4..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcGCstr.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "gc.h" -#include "mfb.h" - -typedef struct { - unsigned long planemask ; - unsigned long fgPixel ; - unsigned long bgPixel ; - int alu ; - int fillStyle ; - } ppcReducedRrop ; - -/* ************************************************************************ */ - -/* private field of GC */ -typedef struct { -/* The next five (5) fields MUST CORRESPOND to - * the fields of a "mfbPrivGC" struct - * ----- BEGINNING OF "DO-NOT-CHANGE" REGION ----- - */ - unsigned char rop ; /* reduction of rasterop to 1 of 3 */ - unsigned char ropOpStip ; /* rop for opaque stipple */ - unsigned char ropFillArea ; /* == alu, rop, or ropOpStip */ - unsigned char unused[sizeof(long) - 3]; - mfbFillAreaProcPtr FillArea; /* fills regions; look at the code */ -/* ----- END OF "DO-NOT-CHANGE" REGION ----- */ - ppcReducedRrop colorRrop ; - short lastDrawableType ; /* was last drawable a window or a pixmap? */ - short lastDrawableDepth ; /* was last drawable 1 or 8 planes? */ - pointer devPriv ; /* Private area for device specific stuff */ - } ppcPrivGC ; -typedef ppcPrivGC *ppcPrivGCPtr ; - -/* ppcCReduce.c */ -void xf4bppGetReducedColorRrop( - GCPtr, - int, - ppcReducedRrop * -); - -/* vgaGC.c */ -void xf4bppChangeGCtype( - GCPtr, - ppcPrivGCPtr -); diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcGetSp.c b/xorg-server/hw/xfree86/xf4bpp/ppcGetSp.c deleted file mode 100644 index d88abe02b..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcGetSp.c +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include "xf4bpp.h" -#include "OScompiler.h" -#include "mfbmap.h" -#include "mfb.h" -#include "servermd.h" -#include "ibmTrace.h" - -/* GetSpans -- for each span, gets bits from drawable starting at ppt[i] - * and continuing for pwidth[i] bits - * Each scanline returned will be server scanline padded, i.e., it will come - * out to an integral number of words. - */ -void -xf4bppGetSpans( pDrawable, wMax, ppt, pwidth, nspans, pdstStart ) - DrawablePtr pDrawable ; /* drawable from which to get bits */ - int wMax ; /* largest value of all *pwidths */ - DDXPointPtr ppt ; /* points to start copying from */ - int *pwidth ; /* list of number of bits to copy */ - int nspans ; /* number of scanlines to copy */ - char *pdstStart ; -{ - register int j ; - register unsigned char *pdst ; /* where to put the bits */ - register unsigned char *psrc ; /* where to get the bits */ - register int pixmapStride ; - - - TRACE( ( "xf4bppGetSpans(pDrawable=0x%x,wMax=%d,ppt=0x%x,pwidth=0x%x,nspans=%d)\n", - pDrawable, wMax, ppt, pwidth, nspans ) ) ; - - if ( ( pDrawable->depth == 1 ) && ( pDrawable->type == DRAWABLE_PIXMAP ) ) - { - mfbGetSpans( pDrawable, wMax, ppt, pwidth, nspans, pdstStart ) ; - return; - } - - pixmapStride = PixmapBytePad( wMax, pDrawable->depth ) ; - pdst = (unsigned char *) /* GJA */ pdstStart ; - - if ( pDrawable->type == DRAWABLE_WINDOW ) { - for ( ; nspans-- ; ppt++, pwidth++ ) { - xf4bppReadColorImage( (WindowPtr)pDrawable, - ppt->x, ppt->y, j = *pwidth, 1, pdst, pixmapStride ) ; - pdst += j ; /* width is in 32 bit words */ - j = ( -j ) & 3 ; - while ( j-- ) /* Pad out to 32-bit boundary */ - *pdst++ = 0 ; - } - } - else { /* OK, if we are here, we had better be a DRAWABLE PIXMAP */ - register int widthSrc = /* width of pixmap in bytes */ - (int) ( (PixmapPtr) pDrawable )->devKind ; - - psrc = (unsigned char *) ( (PixmapPtr) pDrawable )->devPrivate.ptr ; - for ( ; nspans-- ; ppt++, pwidth++ ) { - MOVE( psrc + ( ppt->y * widthSrc ) + ppt->x, - pdst, j = *pwidth ) ; - pdst += j ; - j = ( -j ) & 3 ; - while ( j-- ) /* Pad out to 32-bit boundary */ - *pdst++ = 0 ; - } - } - return ; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcIO.c b/xorg-server/hw/xfree86/xf4bpp/ppcIO.c deleted file mode 100644 index 83952d12d..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcIO.c +++ /dev/null @@ -1,233 +0,0 @@ -/* - -Copyright (c) 1990 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the X Consortium. - - -Copyright IBM Corporation 1987,1988,1989 -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of IBM not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include - -#include "xf4bpp.h" -#include "mfbmap.h" -#include "mfb.h" -#include "mi.h" -#include "micmap.h" -#include "scrnintstr.h" -#include "vgaVideo.h" - -#if 0 -/* XXX This remains to remind of the PC98 difference */ -static VisualRec vgaVisuals[] = { -/* StaticColor needs to be first so is can be used as the default */ -/* vid class bpRGB cmpE nplan rMask gMask bMask oRed oGreen oBlue */ -#ifdef PC98 -{ 0, StaticColor, 4, 1 << VGA_MAXPLANES, VGA_MAXPLANES, 0, 0, 0, 0, 0, 0 }, -{ 0, StaticGray, 4, 1 << VGA_MAXPLANES, VGA_MAXPLANES, 0, 0, 0, 0, 0, 0 }, -{ 0, GrayScale, 4, 1 << VGA_MAXPLANES, VGA_MAXPLANES, 0, 0, 0, 0, 0, 0 }, -{ 0, PseudoColor, 4, 1 << VGA_MAXPLANES, VGA_MAXPLANES, 0, 0, 0, 0, 0, 0 }, -#else -{ 0, StaticColor, 6, 1 << VGA_MAXPLANES, VGA_MAXPLANES, 0, 0, 0, 0, 0, 0 }, -{ 0, StaticGray, 6, 1 << VGA_MAXPLANES, VGA_MAXPLANES, 0, 0, 0, 0, 0, 0 }, -{ 0, GrayScale, 6, 1 << VGA_MAXPLANES, VGA_MAXPLANES, 0, 0, 0, 0, 0, 0 }, -{ 0, PseudoColor, 6, 1 << VGA_MAXPLANES, VGA_MAXPLANES, 0, 0, 0, 0, 0, 0 }, -#endif -} ; -#endif - -void -xf4bppNeverCalled() -{ - FatalError("xf4bppNeverCalled was nevertheless called\n"); -} - -/*ARGSUSED*/ -static Bool -vgaScreenClose -( - int idx, - ScreenPtr pScreen -) -{ - pScreen->defColormap = 0 ; - return TRUE; -} - - -static GCPtr sampleGCperDepth[MAXFORMATS+1] = { 0 }; -static PixmapPtr samplePixmapPerDepth[1] = { 0 }; - -/* GJA -- Took this from miscrinit.c. - * We want that devKind contains the distance in bytes between two scanlines. - * The computation that mi does is not appropriate for planar VGA. - * Therefore we provide here our own routine. - */ - -/* GJA -- WARNING: this is an internal structure declaration, taken from - * miscrinit.c - */ -typedef struct -{ - pointer pbits; /* pointer to framebuffer */ - int width; /* delta to add to a framebuffer addr to move one row down */ -} miScreenInitParmsRec, *miScreenInitParmsPtr; - -/* With the introduction of pixmap privates, the "screen pixmap" can no - * longer be created in miScreenInit, since all the modules that could - * possibly ask for pixmap private space have not been initialized at - * that time. pScreen->CreateScreenResources is called after all - * possible private-requesting modules have been inited; we create the - * screen pixmap here. - */ -static Bool -v16CreateScreenResources -( - ScreenPtr pScreen -) -{ - miScreenInitParmsPtr pScrInitParms; - pointer value; - - pScrInitParms = (miScreenInitParmsPtr)pScreen->devPrivate; - - /* if width is non-zero, pScreen->devPrivate will be a pixmap - * else it will just take the value pbits - */ - if (pScrInitParms->width) - { - PixmapPtr pPixmap; - - /* create a pixmap with no data, then redirect it to point to - * the screen - */ - pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, pScreen->rootDepth, 0); - if (!pPixmap) - return FALSE; - - if (!(*pScreen->ModifyPixmapHeader)(pPixmap, pScreen->width, - pScreen->height, pScreen->rootDepth, 8 /* bits per pixel */, -/* GJA: was PixmapBytePad(pScrInitParms->width, pScreen->rootDepth), */ -#define BITS_PER_BYTE_SHIFT 3 - pScrInitParms->width >> BITS_PER_BYTE_SHIFT, - pScrInitParms->pbits)) - return FALSE; - value = (pointer)pPixmap; - } - else - { - value = pScrInitParms->pbits; - } - xfree(pScreen->devPrivate); /* freeing miScreenInitParmsRec */ - pScreen->devPrivate = value; /* pPixmap or pbits */ - return TRUE; -} - - -Bool -xf4bppScreenInit( pScreen, pbits, virtx, virty, dpix, dpiy, width ) - ScreenPtr pScreen; - pointer pbits; - int virtx, virty; - int dpix, dpiy; - int width; -{ - Bool ret; - VisualPtr visuals; - DepthPtr depths; - int nvisuals; - int ndepths; - int rootdepth; - VisualID defaultVisual; - - rootdepth = 0; - ret = miInitVisuals(&visuals, &depths, &nvisuals, &ndepths, &rootdepth, - &defaultVisual, (unsigned long)1 << 8, 6, -1); - if (!ret) - return FALSE; - - pScreen-> id = 0; - pScreen->defColormap = FakeClientID(0); - pScreen-> whitePixel = VGA_WHITE_PIXEL; - pScreen-> blackPixel = VGA_BLACK_PIXEL; - pScreen-> rgf = 0; - *(pScreen-> GCperDepth) = *(sampleGCperDepth); - *(pScreen-> PixmapPerDepth) = *(samplePixmapPerDepth); - pScreen-> CloseScreen = vgaScreenClose; - pScreen-> QueryBestSize = xf4bppQueryBestSize; - pScreen-> GetImage = xf4bppGetImage; - pScreen-> GetSpans = xf4bppGetSpans; - pScreen-> CreateWindow = xf4bppCreateWindowForXYhardware; - pScreen-> DestroyWindow = xf4bppDestroyWindow; - pScreen-> PositionWindow = xf4bppPositionWindow; - pScreen-> CopyWindow = xf4bppCopyWindow; - pScreen-> CreatePixmap = xf4bppCreatePixmap; - pScreen-> CreateGC = xf4bppCreateGC; - pScreen-> CreateColormap = xf4bppInitializeColormap; - pScreen-> DestroyColormap = (DestroyColormapProcPtr)NoopDDA; - pScreen-> InstallColormap = miInstallColormap; - pScreen-> UninstallColormap = miUninstallColormap; - pScreen-> ListInstalledColormaps = miListInstalledColormaps; - pScreen-> StoreColors = (StoreColorsProcPtr)NoopDDA; - pScreen-> ResolveColor = xf4bppResolveColor; - mfbFillInScreen(pScreen); - - if (!mfbAllocatePrivates(pScreen, NULL)) - return FALSE; - - if (!miScreenInit(pScreen, pbits, virtx, virty, dpix, dpiy, width, - rootdepth, ndepths, depths, defaultVisual /* See above */, - nvisuals, visuals)) - return FALSE; - - /* GJA -- Now we override the supplied default: */ - pScreen -> CreateScreenResources = v16CreateScreenResources; - - mfbRegisterCopyPlaneProc(pScreen,miCopyPlane); /* GJA -- R4->R5 */ - return TRUE; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcImg.c b/xorg-server/hw/xfree86/xf4bpp/ppcImg.c deleted file mode 100644 index 33c6b89c5..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcImg.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include - -#include "xf4bpp.h" -#include "OScompiler.h" -#include "mi.h" -#include "scrnintstr.h" -#include "servermd.h" - -/* Was MIGETIMAGE -- public entry for the GetImage Request - * We're getting the image into a memory buffer. While we have to use GetSpans - * to read a line from the device ( since we don't know what that looks like ) , - * we can just write into the destination buffer - * - * two different strategies are used, depending on whether we're getting the - * image in Z format or XY format - * Z format: - * Line at a time, GetSpans a line and bcopy it to the destination - * buffer, except that if the planemask is not all ones, we create a - * temporary pixmap and do a SetSpans into it ( to get bits turned off ) - * and then another GetSpans to get stuff back ( because pixmaps are - * opaque, and we are passed in the memory to write into ) . This is - * completely ugly and slow but works, but the interfaces just aren't - * designed for this case. Life is hard. - * XY format: - * get the single plane specified in planemask - */ -void -xf4bppGetImage( pDraw, sx, sy, w, h, format, planeMask, pdstLine ) - DrawablePtr pDraw ; - int sx, sy, w, h ; - unsigned int format ; - unsigned long planeMask ; - char * pdstLine ; -{ -#if 1 - int depth, i, linelength, width ; - DDXPointRec pt ; - char *pbits ; - XID gcv[2] ; - PixmapPtr pPixmap = (PixmapPtr) NULL ; - GCPtr pGC ; - char *pDst = pdstLine ; - - depth = pDraw->depth ; - if ( format == ZPixmap ) { - linelength = PixmapBytePad( w, depth ) ; -/* if ( pDraw->type == DRAWABLE_WINDOW ) { */ - sx += pDraw->x ; - sy += pDraw->y ; -/* } */ - if ( ( ( ( 1 << pDraw->depth ) - 1 ) & planeMask ) - != (unsigned)( 1 << pDraw->depth ) - 1 ) { - pGC = GetScratchGC( depth, pDraw->pScreen ) ; - pPixmap = (PixmapPtr) - (* pDraw->pScreen->CreatePixmap)( pDraw->pScreen, w, h, depth, - CREATE_PIXMAP_USAGE_SCRATCH) ; - gcv[0] = GXcopy ; - gcv[1] = planeMask ; - DoChangeGC( pGC, GCPlaneMask | GCFunction, gcv, 0 ) ; - ValidateGC( (DrawablePtr)pPixmap, pGC ) ; - - pbits = (char *)xalloc(w); - - for ( i = 0 ; i < h ; i++ ) { - pt.x = sx ; - pt.y = sy + i ; - width = w ; - (* pDraw->pScreen->GetSpans)( pDraw, w, &pt, &width, 1, pbits ) ; - pt.x = 0 ; - pt.y = i ; - width = w ; - if ( planeMask & ((1 << depth) - 1) ) /* GJA -- mfb bug */ - (* pGC->ops->SetSpans)( (DrawablePtr)pPixmap, pGC, pbits, &pt, &width, 1, TRUE ) ; - (* pDraw->pScreen->GetSpans)( (DrawablePtr)pPixmap, w, &pt, &width, 1, pDst ) ; - pDst += linelength ; - } - - xfree(pbits) ; - (* pGC->pScreen->DestroyPixmap)( pPixmap ) ; - FreeScratchGC( pGC ) ; - return ; - } - - for ( i = 0 ; i < h ; i++ ) { - pt.x = sx ; - pt.y = sy + i ; - width = w ; - (* pDraw->pScreen->GetSpans)( pDraw, w, &pt, &width, 1, pDst ) ; - pDst += linelength ; - } - } - else -#endif - miGetImage( pDraw, sx, sy, w, h, format, planeMask, pdstLine ) ; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcPixFS.c b/xorg-server/hw/xfree86/xf4bpp/ppcPixFS.c deleted file mode 100644 index 9fd29efce..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcPixFS.c +++ /dev/null @@ -1,502 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -/****************************************************************** -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "mfbmap.h" -#include "mfb.h" -#include "maskbits.h" -#include "mi.h" -#include "mispans.h" -#include "ppcGCstr.h" -#include "ppcSpMcro.h" -#include "vgaVideo.h" -#include "ibmTrace.h" - -#define LeftMostBitInScreenLongWord SCRLEFT( 0xFFFFFFFF, 31 ) - -/* GJA -- copied this from VGA */ -#define SCRLEFT8(lw, n) ( (unsigned char) (((unsigned char) lw) << (n)) ) -#define SCRRIGHT8(lw, n) ( (unsigned char) (((unsigned char)lw) >> (n)) ) -/* -********** ********** ********** ********** ********** ********** ********** - these routines all clip. they assume that anything that has called -them has already translated the points (i.e. pGC->miTranslate is -non-zero, which is howit gets set in mfbCreateGC().) - - the number of new scnalines created by clipping == -MaxRectsPerBand * nSpans. -********** ********** ********** ********** ********** ********** ********** -*/ -/* A mod definition that goes smoothly into the negative. - */ -static int -modulo -( - int n1, - int n2 -) -{ - int tmp; - if ( n1 < 0 ) { - tmp = (-n1) % n2; - if ( tmp == 0 ) { - return 0; - } else { - return n2 - tmp; - } - } else { - return n1 % n2; - } -} - -void -xf4bppSolidPixmapFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) - DrawablePtr pDrawable ; - GCPtr pGC ; - int nInit ; /* number of spans to fill */ - DDXPointPtr pptInit ; /* pointer to list of start points */ - int *pwidthInit ; /* pointer to list of n widths */ - int fSorted ; -{ - register unsigned long int pm, npm ; - register unsigned long int fg ; - register int alu ; - /* next three parameters are post-clip */ - int n ; /* number of spans to fill */ - register DDXPointPtr ppt ; /* pointer to list of start points */ - register int *pwidth ; /* pointer to list of n widths */ - register unsigned char *addrl ; /* pointer to current longword in bitmap */ - int i ; - int *pwidthFree ; /* copies of the pointers to free */ - DDXPointPtr pptFree ; - - TRACE(("xf4bppSolidPixmapFS(pDrawable=0x%x, pGC=0x%x, nInit=%d, pptInit=0x%x, pwidthInit=0x%x, fSorted=%d)\n", pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)) ; - - if ( pDrawable->type != DRAWABLE_PIXMAP ) { - ErrorF("xf4bppSolidPixmapFS: drawable is not a pixmap\n") ; - return ; - } - - if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()))->colorRrop.alu ) == GXnoop ) - return ; - - n = nInit * miFindMaxBand(pGC->pCompositeClip) ; - if ( !( pwidthFree = (int *) xalloc( n * sizeof( int ) ) ) ) - return ; - pwidth = pwidthFree ; - - if ( !( pptFree = (DDXPointRec *) - xalloc( n * sizeof( DDXPointRec ) ) ) ) { - xfree( pwidth ) ; - return ; - } - ppt = pptFree ; - - n = miClipSpans( pGC->pCompositeClip, pptInit, pwidthInit, nInit, - ppt, pwidth, fSorted ) ; - - pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ; - fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ; - npm = ( ~ pm ) & ( ( 1 << pDrawable->depth ) - 1 ) ; - - for ( ; n-- ; ppt++, pwidth++ ) { - addrl = ( (unsigned char *) ( ( (PixmapPtr) pDrawable )->devPrivate.ptr ) ) - + ( ppt->y * ( (int) ( ( (PixmapPtr) pDrawable )->devKind ) ) ) - + ppt->x ; - for ( i = *pwidth ; i-- ; addrl++ ) - { - unsigned _p; - DoRop( _p, alu, fg, *addrl ); - *addrl = ( *addrl & npm ) | ( pm & _p ) ; - } -#ifdef notdef /* PURDUE */ - *addrl = ( *addrl & npm ) | ( pm & DoRop( alu, fg, *addrl ) ) ; -#endif /* PURDUE */ - } - xfree( pptFree ) ; - xfree( pwidthFree ) ; - return ; -} - -/* GJA -- copied from vgaStipple.c */ -static unsigned char -vgagetbits -( - register const int x, - register const unsigned int patternWidth, - register const unsigned char * const lineptr -) -{ -register unsigned char bits ; -register const unsigned char *cptr ; -register int shift ; -register int wrap ; - -cptr = lineptr + ( x >> 3 ) ; -bits = *cptr ; -if ((shift = x & 7)) - bits = SCRLEFT8( bits, shift ) | SCRRIGHT8( cptr[1], ( 8 - shift ) ) ; -if ( ( wrap = x + 8 - patternWidth ) > 0 ) { - bits &= SCRLEFT8( 0xFF, wrap ) ; - bits |= SCRRIGHT8( *lineptr, ( 8 - wrap ) ) ; -} - -/* GJA -- Handle extraction of 8 bits from < 8 bits wide stipple. - * I duplicated case 4,5,6,7 to give the compiler a chance to optimize. - */ -switch (patternWidth) { -case 1: /* Not really useful. */ - bits &= ~SCRRIGHT8(0xFF,1); - bits |= SCRRIGHT8(bits,1); - bits |= SCRRIGHT8(bits,2); - bits |= SCRRIGHT8(bits,4); - break; -case 2: - bits &= ~SCRRIGHT8(0xFF,2); - bits |= SCRRIGHT8(bits,2); bits |= SCRRIGHT8(bits,4); break; -case 3: - bits &= ~SCRRIGHT8(0xFF,3); - bits |= (SCRRIGHT8(bits,3) | SCRRIGHT8(bits,6)); break; -case 4: - bits = (bits & ~SCRRIGHT8(0xFF,4)) | SCRRIGHT8(bits,4); break; -case 5: - bits = (bits & ~SCRRIGHT8(0xFF,5)) | SCRRIGHT8(bits,5); break; -case 6: - bits = (bits & ~SCRRIGHT8(0xFF,6)) | SCRRIGHT8(bits,6); break; -case 7: - bits = (bits & ~SCRRIGHT8(0xFF,7)) | SCRRIGHT8(bits,7); break; -default: - ; - /* Do nothing, of course */ -} - -return bits ; -} - -void -xf4bppStipplePixmapFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) -register DrawablePtr pDrawable ; -GC *pGC ; -int nInit ; /* number of spans to fill */ -DDXPointPtr pptInit ; /* pointer to list of start points */ -int *pwidthInit ; /* pointer to list of n widths */ -int fSorted ; -{ - register unsigned char *pdst ; /* pointer to current word in bitmap */ - register unsigned long int pm, npm ; - register unsigned long int fg ; - register int alu ; - /* next three parameters are post-clip */ - int n ; /* number of spans to fill */ - register DDXPointPtr ppt ; /* pointer to list of start points */ - register int *pwidth ; /* pointer to list of n widths */ - PixmapPtr pTile ; /* pointer to tile we want to fill with */ - int width, x, xSrc, ySrc ; - int tlwidth, tileWidth ; - unsigned char *psrcT ; - int *pwidthFree ; /* copies of the pointers to free */ - DDXPointPtr pptFree ; - int xoff, count, stip, i ; - - TRACE(("xf4bppStipplePixmapFS(pDrawable=0x%x, pGC=0x%x, nInit=%d, pptInit=0x%x, pwidthInit=0x%x, fSorted=%d)\n", - pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted)) ; - - if ( pDrawable->type != DRAWABLE_PIXMAP ) { - ErrorF( "xf4bppStippleWindowFS: drawable is not a pixmap\n") ; - return ; - } - if ( pGC->stipple->drawable.depth != 1 ) { - ErrorF( "ppcStippleFS: bad depth\ntype = %d, depth = %d\n", - pDrawable->type, pGC->stipple->drawable.depth ) ; - return ; - } - - if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop ) - return ; - - SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit, - pptFree, pwidth, ppt, fSorted ) ; - - pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ; - fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ; - - pTile = pGC->stipple ; - tlwidth = pTile->devKind ; - - tileWidth = pTile->drawable.width ; - - npm = ( ~ pm ) & ( ( 1 << pDrawable->depth ) - 1 ) ; - - /* this replaces rotating the stipple. Instead, we just adjust the offset - * at which we start grabbing bits from the stipple */ - xSrc = pGC->patOrg.x + pDrawable->x; - ySrc = pGC->patOrg.y + pDrawable->y; - - while ( n-- ) { - pdst = ( (unsigned char *) ( (PixmapPtr) pDrawable )->devPrivate.ptr ) - + ( ppt->y * ( (int) ( ( (PixmapPtr) pDrawable )->devKind ) ) ) - + ppt->x ; - psrcT = (unsigned char *)pTile->devPrivate.ptr - + ( modulo( ppt->y - ySrc, pTile->drawable.height ) * tlwidth ) ; - x = ppt->x ; - - xoff = modulo( x - xSrc, tileWidth) ; - for ( width = *pwidth ; width ; width -= count, xoff+=count ) { - - if ( xoff >= tileWidth ) xoff -= tileWidth; - - if ( width < 8 ) - count = width; - else - count = 8; - - stip = vgagetbits( xoff, tileWidth, psrcT ) ; - - for ( i = count ; i-- ; ) { - if ( stip & 128 ) - { - unsigned _p; - DoRop( _p, alu, fg, *pdst ) ; - *pdst = ( *pdst & npm ) | ( pm & _p ) ; - } -#ifdef notdef /* PURDUE */ - *pdst = ( *pdst & npm ) | ( pm & DoRop( alu, fg, *pdst ) ) ; -#endif /* PURDUE */ - pdst++ ; - stip = SCRLEFT( stip, 1 ) ; - } - } - ppt++ ; - pwidth++ ; - } - xfree( pptFree ) ; - xfree( pwidthFree ) ; - return ; -} - -void -xf4bppOpStipplePixmapFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) -DrawablePtr pDrawable ; -GC *pGC ; -int nInit ; /* number of spans to fill */ -DDXPointPtr pptInit ; /* pointer to list of start points */ -int *pwidthInit ; /* pointer to list of n widths */ -int fSorted ; -{ - register unsigned char *pdst ; /* pointer to current word in bitmap */ - register unsigned long int pm, npm ; - register unsigned long int fg, bg ; - register int alu ; - /* next three parameters are post-clip */ - int n ; /* number of spans to fill */ - register DDXPointPtr ppt ; /* pointer to list of start points */ - register int *pwidth ; /* pointer to list of n widths */ - PixmapPtr pTile ; /* pointer to tile we want to fill with */ - int width ; - int xSrc, ySrc ; - int tlwidth, tileWidth ; - unsigned char *psrcT ; - int *pwidthFree ; /* copies of the pointers to free */ - DDXPointPtr pptFree ; - int xoff, count, stip, i ; - - TRACE( ( "xf4bppOpStipplePixmapFS(pDrawable=0x%x,pGC=0x%x,nInit=%d,pptInit=0x%x,pwidthInit=0x%x,fSorted=%d)\n", - pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) ) ; - - if ( pGC->stipple->drawable.depth != 1 ) { - ErrorF( "xf4bppOpStipplePixmapFS: bad depth\ntype = %d, depth = %d\n", - pDrawable->type, pGC->stipple->drawable.depth ) ; - return ; - } - - if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop ) - return ; - - SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit, - pptFree, pwidth, ppt, fSorted ) ; - - fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ; - bg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.bgPixel ; - pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ; - npm = ( ~ pm ) & ( ( 1 << pDrawable->depth ) - 1 ) ; - - pTile = pGC->stipple ; - tlwidth = pTile->devKind ; - tileWidth = pTile->drawable.width ; - - xSrc = pGC->patOrg.x + pDrawable->x; - ySrc = pGC->patOrg.y + pDrawable->y; - - /* this replaces rotating the stipple. Instead, we just adjust the offset - * at which we start grabbing bits from the stipple */ - for ( ; n-- ; ppt++, pwidth++ ) { - pdst = ( (unsigned char *) ( (PixmapPtr) pDrawable )->devPrivate.ptr ) - + ( ppt->y * ( (int) ( (PixmapPtr) pDrawable )->devKind ) ) - + ppt->x ; - psrcT = (unsigned char *)pTile->devPrivate.ptr - + ( modulo( ppt->y - ySrc, pTile->drawable.height ) * tlwidth ) ; - - xoff = modulo( ppt->x - xSrc, tileWidth) ; - - for ( width = *pwidth ; width ; width -= count, xoff+=count ) { - - if ( xoff >= tileWidth ) xoff -= tileWidth; - - if ( width < 8 ) - count = width; - else - count = 8; - - stip = vgagetbits( xoff, tileWidth, psrcT ) ; - for ( i = count ; i-- ; pdst++, stip = SCRLEFT( stip, 1 ) ) - if ( stip & 128 ) - { - unsigned _p; - DoRop( _p, alu, fg, *pdst ) ; - *pdst = ( *pdst & npm ) | ( pm & _p ) ; - } -#ifdef notdef /* PURDUE */ - *pdst = ( *pdst & npm ) | ( pm & DoRop( alu, fg, *pdst ) ) ; -#endif /* PURDUE */ - else - { - unsigned _p; - DoRop( _p, alu, bg, *pdst ) ; - *pdst = ( *pdst & npm ) | ( pm & _p ) ; - } -#ifdef notdef /* PURDUE */ - *pdst = ( *pdst & npm ) | ( pm & DoRop( alu, bg, *pdst ) ) ; -#endif /* PURDUE */ - } - } - xfree( pptFree ) ; - xfree( pwidthFree ) ; - return ; -} - -void -xf4bppTilePixmapFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) -register DrawablePtr pDrawable ; -GC *pGC ; -int nInit ; /* number of spans to fill */ -DDXPointPtr pptInit ; /* pointer to list of start points */ -int *pwidthInit ; /* pointer to list of n widths */ -int fSorted ; -{ - register DDXPointPtr ppt ; /* pointer to list of start points */ - register int *pwidth ; /* pointer to list of n widths */ - register unsigned char *pdst ; /* pointer to current word in bitmap */ - register unsigned char *psrc ; /* pointer to current word in tile */ - register PixmapPtr pTile ; /* pointer to tile we want to fill with */ - int i ; - int alu ; - unsigned char pm, npm ; - /* next three parameters are post-clip */ - int n ; /* number of spans to fill */ - int tileWidth ; - int xSrc, ySrc; - unsigned char *psrcT ; - int *pwidthFree ; /* copies of the pointers to free */ - DDXPointPtr pptFree ; - - TRACE( ( "ppcTileFS(pDrawable=0x%x,pGC=0x%x,nInit=%d,pptInit=0x%x,pwidthInit=0x%x,fSorted=%d)\n", - pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) ) ; - - if ( ( pDrawable->depth == 1 ) && ( pDrawable->type == DRAWABLE_PIXMAP ) ) { - mfbTileFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) ; - return ; - } - if ( !xf4bppDepthOK( pDrawable, pGC->tile.pixmap->drawable.depth ) ) { - ErrorF( "ppcTileFS: bad depth\ntype = %d, depth = %d\n", - pDrawable->type, pDrawable->depth) ; - return ; - } - - if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop ) - return ; - - SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit, - pptFree, pwidth, ppt, fSorted ) ; - - /* the following code is for 8 bits per pixel addressable memory only */ - pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ; - npm = ( ~ pm ) & ( ( 1 << pDrawable->depth ) - 1 ) ; - pTile = pGC->tile.pixmap ; - tileWidth = pTile->drawable.width ; - - xSrc = pGC->patOrg.x + pDrawable->x; - ySrc = pGC->patOrg.y + pDrawable->y; - /* this replaces rotating the tile. Instead we just adjust the offset - * at which we start grabbing bits from the tile */ - for ( ; n-- ; ppt++, pwidth++ ) { - pdst = ( (unsigned char *) ( (PixmapPtr) pDrawable )->devPrivate.ptr ) - + ( ppt->y * ( (int) ( (PixmapPtr) pDrawable )->devKind ) ) - + ppt->x ; - psrcT = (unsigned char *) pTile->devPrivate.ptr - + ( modulo( ppt->y - ySrc, pTile->drawable.height) * pTile->devKind ) ; - - psrc = psrcT + modulo( ppt->x - xSrc, tileWidth ) ; - for ( i = *pwidth ; i-- ; pdst++, psrc++ ) { - if ( psrc >= ( psrcT + tileWidth ) ) - psrc = psrcT ; - { - unsigned _p; - DoRop( _p, alu, *psrc, *pdst ) ; - *pdst = ( *pdst & npm ) | ( pm & _p ) ; - } -#ifdef notdef /* PURDUE */ - *pdst = ( *pdst & npm ) | ( pm & DoRop( alu, *psrc, *pdst ) ) ; -#endif /* PURDUE */ - } - } - xfree( pptFree ) ; - xfree( pwidthFree ) ; - return ; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcPixmap.c b/xorg-server/hw/xfree86/xf4bpp/ppcPixmap.c deleted file mode 100644 index d04aacf82..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcPixmap.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include - -#include "xf4bpp.h" -#include "servermd.h" -#include "OScompiler.h" -#include "ibmTrace.h" -#include "scrnintstr.h" - -PixmapPtr -xf4bppCreatePixmap( pScreen, width, height, depth, usage_hint ) - ScreenPtr pScreen ; - int width ; - int height ; - int depth ; - unsigned usage_hint ; -{ - register PixmapPtr pPixmap = (PixmapPtr)NULL; - size_t size ; - - TRACE(("xf4bppCreatePixmap(pScreen=0x%x, width=%d, height=%d, depth=%d, usage_hint=%d)\n", pScreen, width, height, depth, usage_hint)) ; - - if ( depth > 8 ) - return (PixmapPtr) NULL ; - - size = PixmapBytePad(width, depth); - - if (size / 4 > 32767 || height > 32767) - return (PixmapPtr) NULL ; - - pPixmap = AllocatePixmap (pScreen, (height * size)); - - if ( !pPixmap ) - return (PixmapPtr) NULL ; - pPixmap->drawable.type = DRAWABLE_PIXMAP ; - pPixmap->drawable.class = 0 ; - pPixmap->drawable.pScreen = pScreen ; - pPixmap->drawable.depth = depth ; - pPixmap->drawable.id = 0 ; - pPixmap->drawable.bitsPerPixel = ( depth == 1 ) ? 1 : 8 ; - pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER ; - pPixmap->drawable.x = 0 ; - pPixmap->drawable.y = 0 ; - pPixmap->drawable.width = width ; - pPixmap->drawable.height = height ; - pPixmap->devKind = size; - pPixmap->refcnt = 1 ; - size = height * pPixmap->devKind ; - pPixmap->devPrivate.ptr = (pointer) (((CARD8*)pPixmap) - + pScreen->totalPixmapSize); - bzero( (char *) pPixmap->devPrivate.ptr, size ) ; - pPixmap->usage_hint = usage_hint; - return pPixmap ; -} - -PixmapPtr -xf4bppCopyPixmap(pSrc) - register PixmapPtr pSrc; -{ - register PixmapPtr pDst; - int size; - - TRACE(("xf4bppCopyPixmap(pSrc=0x%x)\n", pSrc)) ; - size = pSrc->drawable.height * pSrc->devKind; - pDst = xalloc(sizeof(PixmapRec) + size); - if (!pDst) - return NullPixmap; - pDst->devPrivates = NULL; - pDst->drawable = pSrc->drawable; - pDst->drawable.id = 0; - pDst->drawable.serialNumber = NEXT_SERIAL_NUMBER; - pDst->devKind = pSrc->devKind; - pDst->refcnt = 1; - pDst->devPrivate.ptr = (pointer)(pDst + 1); - MOVE( (char *)pSrc->devPrivate.ptr, (char *)pDst->devPrivate.ptr, size ) ; - return pDst; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcPolyPnt.c b/xorg-server/hw/xfree86/xf4bpp/ppcPolyPnt.c deleted file mode 100644 index c61fd6d26..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcPolyPnt.c +++ /dev/null @@ -1,143 +0,0 @@ -/* - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the X Consortium. - - -Copyright IBM Corporation 1987,1988,1989 -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of IBM not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "mfbmap.h" -#include "mfb.h" -#include "mi.h" -#include "scrnintstr.h" -#include "ppcGCstr.h" -#include "ibmTrace.h" - -void -xf4bppPolyPoint( pDrawable, pGC, mode, npt, pptInit ) -DrawablePtr pDrawable ; -GCPtr pGC ; -int mode ; /* Origin or Previous */ -int npt ; -xPoint *pptInit ; -{ -register xPoint *ppt ; -ppcPrivGC *devPriv ; -int alu ; -int nptTmp ; - -TRACE( ("xf4bppPolyPoint(0x%x,0x%x,%d,%d,0x%x)\n", - pDrawable, pGC, mode, npt, pptInit ) ) ; - -if ( pDrawable->type == DRAWABLE_PIXMAP ) { - if ( pGC->alu != GXnoop ) - miPolyPoint( pDrawable, pGC, mode, npt, pptInit ) ; - return ; -} - -devPriv = (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()); -if ( ( alu = devPriv->colorRrop.alu ) == GXnoop ) - return ; - -/* make pointlist origin relative */ -if ( mode == CoordModePrevious ) - for ( ppt = pptInit, nptTmp = npt ; --nptTmp ; ) { - ppt++ ; - ppt->x += (ppt-1)->x ; - ppt->y += (ppt-1)->y ; - } - -if ( pGC->miTranslate ) { - register int xorg = pDrawable->x ; - register int yorg = pDrawable->y ; - for ( ppt = pptInit, nptTmp = npt ; nptTmp-- ; ppt++ ) { - ppt->x += xorg ; - ppt->y += yorg ; - } -} - -{ - register RegionPtr pRegion = pGC->pCompositeClip ; - register unsigned long int fg = devPriv->colorRrop.fgPixel ; - register unsigned long int pm = devPriv->colorRrop.planemask ; - BoxRec box ; /* Scratch Space */ - - if ( ! REGION_NUM_RECTS(pRegion)) - return ; - - for ( ppt = pptInit ; npt-- ; ppt++ ) - if (POINT_IN_REGION(pDrawable->pScreen, pRegion, - ppt->x, ppt->y, &box)) - xf4bppFillSolid( (WindowPtr)pDrawable, - fg, alu, pm, ppt->x, ppt->y, 1, 1 ) ; -} - -return ; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcQuery.c b/xorg-server/hw/xfree86/xf4bpp/ppcQuery.c deleted file mode 100644 index d42360da5..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcQuery.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" - -void -xf4bppQueryBestSize -( - register int class, - register unsigned short *pwidth, - register unsigned short *pheight, - ScreenPtr pScreen -) -{ -if ( class == CursorShape ) - *pwidth = *pheight = 32 ; /* ppc's cursor max out at 32 by 32 */ -else /* either TileShape or StippleShape */ - /* Round Up To Nearest Multiple Of 8 -- We don't care what height they use */ - *pwidth = ( *pwidth + 0x7 ) & ~ 0x7 ; - -return ; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcRslvC.c b/xorg-server/hw/xfree86/xf4bpp/ppcRslvC.c deleted file mode 100644 index 0337feb62..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcRslvC.c +++ /dev/null @@ -1,177 +0,0 @@ -/************************************************************ -Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, provided that the above copyright no- -tice appear in all copies and that both that copyright no- -tice and this permission notice appear in supporting docu- -mentation, and that the names of Sun or X Consortium -not be used in advertising or publicity pertaining to -distribution of the software without specific prior -written permission. Sun and X Consortium make no -representations about the suitability of this software for -any purpose. It is provided "as is" without any express or -implied warranty. - -SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- -NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI- -ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH -THE USE OR PERFORMANCE OF THIS SOFTWARE. - -********************************************************/ - -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -/* Generic Color Resolution Scheme - * P. Shupak 12/31/87 - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "scrnintstr.h" - -/* - * New colormap routines that can support multiple Visual types. - */ - -static unsigned short defstaticpalette[16][3] = { - /* R G B */ - { 0x0000, 0x0000, 0x0000 }, /* black */ - { 0xFFFF, 0xFFFF, 0xFFFF }, /* white */ - { 0xAAAA, 0xAAAA, 0xAAAA }, /* grey */ - { 0x0000, 0x0000, 0xAAAA }, /* dark blue */ - { 0x0000, 0x0000, 0xFFFF }, /* medium blue */ - { 0x0000, 0xAAAA, 0xFFFF }, /* light blue */ - { 0x0000, 0xFFFF, 0xFFFF }, /* cyan */ - { 0x0000, 0xAAAA, 0x0000 }, /* dark green */ - { 0x0000, 0xFFFF, 0x0000 }, /* green */ - { 0xAAAA, 0xFFFF, 0x5555 }, /* pale green */ - { 0xAAAA, 0x5555, 0x0000 }, /* brown */ - { 0xFFFF, 0xAAAA, 0x0000 }, /* light brown */ - { 0xFFFF, 0xFFFF, 0x0000 }, /* yellow */ - { 0xAAAA, 0x0000, 0xAAAA }, /* purple */ - { 0xFFFF, 0x0000, 0xFFFF }, /* magenta */ - { 0xFFFF, 0x0000, 0x0000 }, /* red */ - }; - -Bool -xf4bppInitializeColormap(pmap) - register ColormapPtr pmap; -{ - register unsigned i; - register VisualPtr pVisual; - unsigned lim, maxent, shift; - - pVisual = pmap->pVisual; - lim = (1 << pVisual->bitsPerRGBValue) - 1; - shift = 16 - pVisual->bitsPerRGBValue; - maxent = pVisual->ColormapEntries - 1; - - switch( pVisual->class ) - { - case StaticGray: - for ( i = 0 ; i < maxent ; i++ ) { - pmap->red[i].co.local.red = - pmap->red[i].co.local.green = - pmap->red[i].co.local.blue = - ((((i * 65535) / maxent) >> shift) * 65535) / lim; - } - break; - case StaticColor: - for ( i = 0 ; i < 16 ; i++ ) { - pmap->red[i].co.local.red = (defstaticpalette[i][0]); - pmap->red[i].co.local.green = (defstaticpalette[i][1]); - pmap->red[i].co.local.blue = (defstaticpalette[i][2]); - } - break; - case GrayScale: - case PseudoColor: - for(i=0;i<=maxent;i++) { - int a,b,c; - a = i << 10; - b = i << 12; - c = i << 14; - pmap->red[i].co.local.red = a; - pmap->red[i].co.local.green = b; - pmap->red[i].co.local.blue = c; - } - break; - case TrueColor: - case DirectColor: - default: - ErrorF( "Unsupported Visual class %d\b", pVisual->class ); - return FALSE; - } - return TRUE; -} - -void -xf4bppResolveColor( pred, pgreen, pblue, pVisual ) -register unsigned short* pred ; -register unsigned short* pgreen ; -register unsigned short* pblue ; -register VisualPtr pVisual ; -{ - unsigned lim, maxent, shift; - - lim = (1 << pVisual->bitsPerRGBValue) - 1; - shift = 16 - pVisual->bitsPerRGBValue; - maxent = pVisual->ColormapEntries - 1; - - switch( pVisual->class ) - { - case StaticGray: - *pred = (30L * *pred + 59L * *pgreen + 11L * *pblue) / 100; - *pred = (((*pred * (maxent + 1)) >> 16) * 65535) / maxent; - *pblue = *pgreen = *pred = ((*pred >> shift) * 65535) / lim; - break; - case StaticColor: - break; - case GrayScale: - *pred = (30L * *pred + 59L * *pgreen + 11L * *pblue) / 100; - *pblue = *pgreen = *pred = ((*pred >> shift) * 65535) / lim; - break; - case PseudoColor: - /* rescale to rgb bits */ - *pred = ((*pred >> shift) * 65535) / lim; - *pgreen = ((*pgreen >> shift) * 65535) / lim; - *pblue = ((*pblue >> shift) * 65535) / lim; - break; - case TrueColor: - case DirectColor: - default: - ErrorF( "Unsupported Visual class %d\b", pVisual->class ); - } -} - diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcSetSp.c b/xorg-server/hw/xfree86/xf4bpp/ppcSetSp.c deleted file mode 100644 index 7659384e7..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcSetSp.c +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -/*********************************************************** - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include - -#include "xf4bpp.h" -#include "OScompiler.h" -#include "mfbmap.h" -#include "mfb.h" -#include "servermd.h" - -/* SetScanline -- copies the bits from psrc to the drawable starting at - * (xStart, y) and continuing to (xEnd, y). xOrigin tells us where psrc - * starts on the scanline. (I.e., if this scanline passes through multiple - * boxes, we may not want to start grabbing bits at psrc but at some offset - * further on.) - */ -static void -ppcSetScanline -( - register int pixCount, /* width of scanline in bits */ - register char *psrc, - register unsigned char *pdst, /* where to put the bits */ - register int pm, /* plane mask */ - const int alu /* raster op */ -) -{ -register int npm = ~pm ; /* inverted plane mask */ -register char tmpx ; - -pm &= 0x0F; npm &= 0x0F; /* GJA */ - -switch ( alu ) { - case GXclear: /* 0x0 Zero 0 */ - while ( pixCount-- ) - *pdst++ &= npm ; - break ; - case GXand: /* 0x1 src AND dst */ - while ( pixCount-- ) - *pdst++ &= *psrc++ | npm ; - break ; - case GXandReverse: /* 0x2 src AND NOT dst */ - for ( ; pixCount-- ; pdst++, psrc++ ) { - tmpx = *pdst; - *pdst = ( tmpx & npm ) | ( pm & *psrc & ~tmpx ) ; - } - break ; - case GXcopy: /* 0x3 src */ - for ( ; pixCount-- ; pdst++, psrc++ ) - *pdst = ( *pdst & npm ) | ( pm & *psrc ) ; - break ; - case GXandInverted: /* 0x4 NOT src AND dst */ - while ( pixCount-- ) - *pdst++ &= npm | ~*psrc++ ; - break ; - case GXnoop: /* 0x5 dst */ - break ; - case GXxor: /* 0x6 src XOR dst */ - while ( pixCount-- ) - *pdst++ ^= pm & *psrc++ ; - break ; - case GXor: /* 0x7 src OR dst */ - while ( pixCount-- ) - *pdst++ |= *psrc++ & pm ; - break ; - case GXnor: /* 0x8 NOT src AND NOT dst */ - for ( ; pixCount-- ; pdst++, psrc++ ) { - tmpx = *pdst; - *pdst = ( tmpx & npm ) | ( pm & ~( tmpx | *psrc ) ) ; - } - break ; - case GXequiv: /* 0x9 NOT src XOR dst */ - while ( pixCount-- ) - *pdst++ ^= pm & ~ *psrc++ ; - break ; - case GXorReverse: /* 0xb src OR NOT dst */ - for ( ; pixCount-- ; pdst++, psrc++ ) { - tmpx = *pdst; - *pdst = ( tmpx & npm ) | ( pm & ( *psrc | ~tmpx ) ) ; - } - break ; - case GXinvert: /* 0xa NOT dst */ - while ( pixCount-- ) - *pdst++ ^= pm ; - break ; - case GXcopyInverted: /* 0xc NOT src */ - for ( ; pixCount-- ; pdst++, psrc++ ) - *pdst = ( *pdst & npm ) | ( pm & ~ *psrc ) ; - break ; - case GXorInverted: /* 0xd NOT src OR dst */ - while ( pixCount-- ) - *pdst++ |= pm & ~ *psrc++ ; - break ; - case GXnand: /* 0xe NOT src OR NOT dst */ - for ( ; pixCount-- ; pdst++, psrc++ ) { - tmpx = *pdst; - *pdst = ( tmpx & npm ) | ( pm & ~( tmpx & *psrc ) ) ; - } - break ; - case GXset: /* 0xf 1 */ - while ( pixCount-- ) - *pdst++ |= pm ; - break ; - default: - ErrorF( "ppcSetScanLine: bad alu value == 0x%02X\n", alu ) ; - break ; -} - -return ; -} - -/* SetSpans -- for each span copy pwidth[i] bits from psrc to pDrawable at - * ppt[i] using the raster op from the GC. If fSorted is TRUE, the scanlines - * are in increasing Y order. - * Source bit lines are server scanline padded so that they always begin - * on a word boundary. - */ -void -xf4bppSetSpans( pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted ) - register DrawablePtr pDrawable ; - GCPtr pGC ; - char *psrc ; - register DDXPointPtr ppt ; - int *pwidth ; - int nspans ; - int fSorted ; -{ - unsigned char *pdstBase = NULL; /* start of dst bitmap */ - int widthDst = 0; /* width of bitmap in words */ - register BoxPtr pbox, pboxLast, pboxTest ; - register DDXPointPtr pptLast ; - RegionPtr prgnDst ; - register int width ; - int xStart, xEnd ; - int yMax ; - int alu ; - int pm ; - - /* allow for 1-deep windows on nfb machines (eg apa8, aed) */ - if ( ( pDrawable->depth == 1 ) && ( pDrawable->type == DRAWABLE_PIXMAP ) ) { - mfbSetSpans( pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted ) ; - return ; - } - - if ( !( pm = pGC->planemask & ~( (~0) << pDrawable->depth ) ) - || ( ( alu = pGC->alu ) == GXnoop ) ) - return ; - - prgnDst = pGC->pCompositeClip ; - - if ( ! REGION_NUM_RECTS(prgnDst)) - return ; - - pboxLast = ( pbox = REGION_RECTS(prgnDst) ) + REGION_NUM_RECTS(prgnDst); - pptLast = ppt + nspans ; - - if ( pDrawable->type == DRAWABLE_WINDOW ) { - yMax = (int) pDrawable->height + pDrawable->y ; - } - else { - pdstBase = (unsigned char *) ( (PixmapPtr) pDrawable )->devPrivate.ptr ; - widthDst = (int) ( (PixmapPtr) pDrawable )->devKind ; - yMax = pDrawable->height ; - } - - if ( fSorted ) { - /* scan lines sorted in ascending order. Because they are sorted, we - * don't have to check each scanline against each clip box. We can be - * sure that this scanline only has to be clipped to boxes at or after the - * beginning of this y-band - */ - for ( pboxTest = pbox ; - ( ppt < pptLast ) && ( ppt->y < yMax ) ; - ppt++, pwidth++, - psrc += PixmapBytePad( width, pDrawable->depth ) ) { - width = *pwidth ; - for ( pbox = pboxTest ; - pbox < pboxLast ; - pbox++ ) { - if ( pbox->y2 <= ppt->y ) { - /* clip box is before scanline */ - pboxTest = pbox + 1 ; - } - else if ( ( pbox->y1 > ppt->y ) - || ( pbox->x1 > ppt->x + width ) ) - break ; /* scanline before clip box or left of clip box */ - else if ( pbox->x2 > ppt->x ) { - /* some of the scanline is in the current clip box */ - xStart = MAX( pbox->x1, ppt->x ) ; - xEnd = MIN( ppt->x + width, pbox->x2 ) ; - if ( pDrawable->type == DRAWABLE_PIXMAP ) - ppcSetScanline( xEnd - xStart, - psrc + ( xStart - ppt->x ), - pdstBase + xStart - + ( ppt->y * widthDst ), - pm, alu ) ; - else - xf4bppDrawColorImage( (WindowPtr)pDrawable, - xStart, ppt->y, xEnd - xStart, 1, - (unsigned char *)psrc + ( xStart - ppt->x ), - xEnd - xStart, alu, pm ) ; - if ( ppt->x + width <= pbox->x2 ) - break ; /* End of the line, as it were */ - } - } - /* We've tried this line against every box ; it must be outside them - * all. move on to the next point */ - } - } - else { - /* scan lines not sorted. We must clip each line against all the boxes */ - for ( ; - ppt < pptLast ; - ppt++, pwidth++, - psrc += PixmapBytePad( width, pDrawable->depth ) ) { - width = *pwidth ; - if ( ppt->y >= 0 && ppt->y < yMax ) { - for ( pbox = REGION_RECTS(prgnDst) ; pbox < pboxLast ; pbox++ ) { - if ( pbox->y1 > ppt->y ) - break ; /* rest of clip region is above this scanline */ - else if ( ( pbox->y2 > ppt->y ) - && ( pbox->x1 <= ppt->x + width ) - && ( pbox->x2 > ppt->x ) ) { - xStart = MAX( pbox->x1, ppt->x ) ; - xEnd = MIN( pbox->x2, ppt->x + width ) ; - if ( pDrawable->type == DRAWABLE_PIXMAP ) - ppcSetScanline( xEnd - xStart, - psrc + ( xStart - ppt->x ), - /* ^ GJA */ - ( ( pdstBase - + ( ppt->y * widthDst ) ) - + xStart ), - pm, alu ) ; - else /* pDrawable->type == DRAWABLE_WINDOW */ - xf4bppDrawColorImage( (WindowPtr)pDrawable, - xStart, ppt->y, xEnd - xStart, 1, - (unsigned char *)psrc + ( xStart - ppt->x ), - /* GJA ^ */ - xEnd - xStart, alu, pm ) ; - } - - } - } - } - } - return ; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcSpMcro.h b/xorg-server/hw/xfree86/xf4bpp/ppcSpMcro.h deleted file mode 100644 index 655a883e5..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcSpMcro.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -/* This screwy macro is used in all the spans routines and you find - it all over the place, so it is a macro just to tidy things up. -*/ - -#define SETSPANPTRS(IN,N,IPW,PW,IPPT,PPT,FPW,FPPT,FSORT) \ - { \ - N = IN * miFindMaxBand(pGC->pCompositeClip); \ - if(!(PW = (int *)xalloc(N * sizeof(int)))) \ - return; \ - if(!(PPT = (DDXPointRec *)xalloc(N * sizeof(DDXPointRec)))) \ - { \ - free(PW); \ - return; \ - } \ - FPW = PW; \ - FPPT = PPT; \ - N = miClipSpans(pGC->pCompositeClip, IPPT, IPW, IN, \ - PPT, PW, FSORT); \ - } - diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcWinFS.c b/xorg-server/hw/xfree86/xf4bpp/ppcWinFS.c deleted file mode 100644 index 1522afd9e..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcWinFS.c +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -/****************************************************************** -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "mfbmap.h" -#include "mfb.h" -#include "mi.h" -#include "mispans.h" -#include "ppcGCstr.h" -#include "ppcSpMcro.h" -#include "ibmTrace.h" - -#define LeftMostBitInScreenLongWord SCRLEFT( 0xFFFFFFFF, 31 ) -/* -********** ********** ********** ********** ********** ********** ********** - these routines all clip. they assume that anything that has called -them has already translated the points (i.e. pGC->miTranslate is -non-zero, which is howit gets set in mfbCreateGC().) - - the number of new scanlines created by clipping == -MaxRectsPerBand * nSpans. -********** ********** ********** ********** ********** ********** ********** -*/ - -void -xf4bppSolidWindowFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) - DrawablePtr pDrawable ; - GCPtr pGC ; - int nInit ; /* number of spans to fill */ - DDXPointPtr pptInit ; /* pointer to list of start points */ - int *pwidthInit ; /* pointer to list of n widths */ - int fSorted ; -{ - register unsigned long int pm ; - register unsigned long int fg ; - register int alu ; - /* next three parameters are post-clip */ - int n ; /* number of spans to fill */ - register DDXPointPtr ppt ; /* pointer to list of start points */ - register int *pwidth ; /* pointer to list of n widths */ - int *pwidthFree ; /* copies of the pointers to free */ - DDXPointPtr pptFree ; - - TRACE( ( "xf4bppSolidWindowFS(pDrawable=0x%x,pGC=0x%x,nInit=%d,pptInit=0x%x,pwidthInit=0x%x,fSorted=%d)\n", - pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) ) ; - - if ( pDrawable->type != DRAWABLE_WINDOW ) { - ErrorF( "xf4bppSolidWindowFS: drawable is not a window\n") ; - return ; - } - - if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop ) - return ; - - n = nInit * miFindMaxBand( pGC->pCompositeClip ) ; - if ( !( pwidthFree = (int *) xalloc( n * sizeof( int ) ) ) ) - return ; - pwidth = pwidthFree ; - - if ( !( pptFree = (DDXPointRec *) - xalloc( n * sizeof( DDXPointRec ) ) ) ) { - xfree( pwidth ) ; - return ; - } - ppt = pptFree ; - - n = miClipSpans( pGC->pCompositeClip, pptInit, pwidthInit, nInit, - ppt, pwidth, fSorted ) ; - - pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ; - fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ; - - for ( ; n-- ; ppt++, pwidth++ ) - if ( *pwidth ) - xf4bppFillSolid( (WindowPtr)pDrawable, - fg, alu, pm, ppt->x, ppt->y, *pwidth, 1 ) ; - - xfree( pptFree ) ; - xfree( pwidthFree ) ; - return ; -} - -void -xf4bppStippleWindowFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) -DrawablePtr pDrawable ; -register GC *pGC ; -int nInit ; /* number of spans to fill */ -DDXPointPtr pptInit ; /* pointer to list of start points */ -int *pwidthInit ; /* pointer to list of n widths */ -int fSorted ; -{ - register unsigned long int pm ; - register unsigned long int fg ; - register int alu ; - /* next three parameters are post-clip */ - int n ; /* number of spans to fill */ - register DDXPointPtr ppt ; /* pointer to list of start points */ - register int *pwidth ; /* pointer to list of n widths */ - PixmapPtr pTile ; /* pointer to tile we want to fill with */ - int xSrc ; - int ySrc ; - int *pwidthFree ; /* copies of the pointers to free */ - DDXPointPtr pptFree ; - - TRACE( ( "xf4bppStippleWindowFS(pDrawable=0x%x,pGC=0x%x,nInit=%d,pptInit=0x%x,pwidthInit=0x%x,fSorted=%d)\n", - pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) ) ; - - if ( pDrawable->type != DRAWABLE_WINDOW ) { - ErrorF( "xf4bppStippleWindowFS: drawable is not a window\n" ) ; - return ; - } - - if ( pGC->stipple->drawable.depth != 1 ) { - ErrorF("ppcStippleFS: bad depth\ntype = %d, depth = %d\n", - pDrawable->type, pGC->stipple->drawable.depth ) ; - return ; - } - - if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop ) - return ; - - SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit, - pptFree, pwidth, ppt, fSorted ) ; - - pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ; - fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ; - - xSrc = pGC->patOrg.x + pDrawable->x ; - ySrc = pGC->patOrg.y + pDrawable->y ; - pTile = pGC->stipple ; - - for ( ; n-- ; ppt++, pwidth++ ) - xf4bppFillStipple( (WindowPtr)pDrawable, pTile, fg, alu, pm, - ppt->x, ppt->y, *pwidth, 1, xSrc, ySrc ) ; - - xfree( pptFree ) ; - xfree( pwidthFree ) ; - - return ; -} - -void -xf4bppOpStippleWindowFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) -DrawablePtr pDrawable ; -register GC *pGC ; -int nInit ; /* number of spans to fill */ -DDXPointPtr pptInit ; /* pointer to list of start points */ -int *pwidthInit ; /* pointer to list of n widths */ -int fSorted ; -{ - register DDXPointPtr ppt ; /* pointer to list of start points */ - register int *pwidth ; /* pointer to list of n widths */ - int n ; /* number of spans to fill */ - int xSrc ; - int ySrc ; - unsigned long int pm ; - unsigned long int fg, bg ; - int alu ; - int *pwidthFree ; /* copies of the pointers to free */ - DDXPointPtr pptFree ; - - TRACE( ( "xf4bppOpStippleWindowFS(pDrawable=0x%x,pGC=0x%x,nInit=%d,pptInit=0x%x,pwidthInit=0x%x,fSorted=%d)\n", - pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) ) ; - - if ( pGC->stipple->drawable.depth != 1 ) { - ErrorF( "xf4bppOpStippleWindowFS: bad depth\ntype = %d, depth = %d\n", - pDrawable->type, pGC->stipple->drawable.depth ) ; - return ; - } - - if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop ) - return ; - - SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit, - pptFree, pwidth, ppt, fSorted ) ; - - pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ; - fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ; - bg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.bgPixel ; - - xSrc = pGC->patOrg.x + pDrawable->x ; - ySrc = pGC->patOrg.y + pDrawable->y ; - - for ( ; n-- ; ppt++, pwidth++ ) - xf4bppOpaqueStipple( (WindowPtr)pDrawable, pGC->stipple, fg, bg, alu, pm, - ppt->x, ppt->y, *pwidth, 1, xSrc, ySrc ) ; - - xfree( pptFree ) ; - xfree( pwidthFree ) ; - return ; -} - -void -xf4bppTileWindowFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) -DrawablePtr pDrawable ; -register GC *pGC ; -int nInit ; /* number of spans to fill */ -DDXPointPtr pptInit ; /* pointer to list of start points */ -int *pwidthInit ; /* pointer to list of n widths */ -int fSorted ; -{ - /* next three parameters are post-clip */ - register DDXPointPtr ppt ; /* pointer to list of start points */ - register int *pwidth ; /* pointer to list of n widths */ - int n ; /* number of spans to fill */ - unsigned char pm ; - int alu ; - int xSrc ; - int ySrc ; - int *pwidthFree ; /* copies of the pointers to free */ - DDXPointPtr pptFree ; - - TRACE( ( "xf4bppTileWindowFS(pDrawable=0x%x,pGC=0x%x,nInit=%d,pptInit=0x%x,pwidthInit=0x%x,fSorted=%d)\n", - pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) ) ; - - if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop ) - return ; - - SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit, - pptFree, pwidth, ppt, fSorted ) ; - - xSrc = pGC->patOrg.x + pDrawable->x ; - ySrc = pGC->patOrg.y + pDrawable->y ; - pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ; - - for ( ; n-- ; ppt++, pwidth++ ) - xf4bppTileRect( (WindowPtr)pDrawable, pGC->tile.pixmap, alu, pm, - ppt->x, ppt->y, *pwidth, 1, xSrc, ySrc ) ; - - xfree( pptFree ) ; - xfree( pwidthFree ) ; - return ; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/ppcWindow.c b/xorg-server/hw/xfree86/xf4bpp/ppcWindow.c deleted file mode 100644 index 6165e04b6..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/ppcWindow.c +++ /dev/null @@ -1,220 +0,0 @@ -/* - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the X Consortium. - - -Copyright IBM Corporation 1987,1988,1989 -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of IBM not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include - -#include "xf4bpp.h" -#include "mfbmap.h" -#include "mfb.h" -#include "scrnintstr.h" -#include "ibmTrace.h" - -/* - xf4bppCopyWindow copies only the parts of the destination that are -visible in the source. -*/ - -void -xf4bppCopyWindow(pWin, ptOldOrg, prgnSrc) - register WindowPtr pWin ; - DDXPointRec ptOldOrg ; - RegionPtr prgnSrc ; -{ - RegionPtr prgnDst ; - register BoxPtr pbox ; - register int dx, dy ; - register int nbox ; - register int pm ; - - BoxPtr pboxTmp, pboxNext, pboxBase, pboxNew ; - /* temporaries for shuffling rectangles */ - - TRACE(("xf4bppCopyWindow(pWin= 0x%x, ptOldOrg= 0x%x, prgnSrc= 0x%x)\n", pWin, ptOldOrg, prgnSrc)) ; - - - dx = ptOldOrg.x - pWin->drawable.x ; - dy = ptOldOrg.y - pWin->drawable.y ; - REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); - - prgnDst = REGION_CREATE(pWin->drawable.pScreen, NULL, 1); - REGION_INTERSECT(pWin->drawable.pScreen, prgnDst, - &pWin->borderClip, prgnSrc); - - if ( !( nbox = REGION_NUM_RECTS(prgnDst) ) ) - return; - - pbox = REGION_RECTS(prgnDst); - - pboxNew = 0 ; - if ( nbox > 1 ) { - if ( dy < 0 ) { - if ( dx > 0 ) { - /* walk source bottom to top */ - /* keep ordering in each band, reverse order of bands */ - if ( !( pboxNew = - (BoxPtr) xalloc( sizeof( BoxRec ) * nbox ) ) ) - return ; - pboxBase = pboxNext = pbox+nbox - 1 ; - while ( pboxBase >= pbox ) { - while ( ( pboxNext >= pbox ) - && ( pboxBase->y1 == pboxNext->y1 ) ) - pboxNext-- ; - pboxTmp = pboxNext + 1 ; - while ( pboxTmp <= pboxBase ) - *pboxNew++ = *pboxTmp++ ; - pboxBase = pboxNext ; - } - pboxNew -= nbox ; - pbox = pboxNew ; - } - else { /* dx <= 0 */ - /* we can just reverse the entire list in place */ - /* Do three-position swaps */ - BoxRec tmpBox ; - - pboxBase = pbox ; - pboxNext = pbox + nbox - 1 ; - while ( pboxBase < pboxNext ) { - /* ****** Warning Structure Assignment !! ****** */ - tmpBox = *pboxBase ; - *pboxBase = *pboxNext ; - *pboxNext = tmpBox ; - pboxBase++ ; - pboxNext-- ; - } - } - } - else if ( dx < 0 ) { - /* walk source right to left */ - /* reverse order of rects in each band */ - if ( !( pboxNew = (BoxPtr)xalloc(sizeof(BoxRec) * nbox) ) ) - return ; - pboxBase = pboxNext = pbox ; - while (pboxBase < pbox+nbox) - { - while ((pboxNext < pbox+nbox) && - (pboxNext->y1 == pboxBase->y1)) - pboxNext++ ; - pboxTmp = pboxNext ; - while (pboxTmp != pboxBase) - *pboxNew++ = *--pboxTmp ; - pboxBase = pboxNext ; - } - pboxNew -= nbox ; - pbox = pboxNew ; - } - } /* END if nbox > 1 */ - - /* - * call blit several times, the parms are: - * blit( alu,rplanes, wplanes, srcx, srcy, destx, desty, width, height ) ; - */ - - pm = ( 1 << pWin->drawable.depth ) - 1 ; - for ( ; nbox-- ; pbox++ ) - xf4bppBitBlt( pWin, GXcopy, pm, - pbox->x1 + dx, pbox->y1 + dy, - pbox->x1, pbox->y1, - pbox->x2 - pbox->x1, pbox->y2 - pbox->y1) ; - - /* free up stuff */ - if ( pboxNew ) - xfree( pboxNew ) ; - - REGION_DESTROY(pWin->drawable.pScreen, prgnDst); -} - -Bool xf4bppPositionWindow(pWin, x, y) -register WindowPtr pWin ; -register int x, y ; -{ - return TRUE ; -} - -Bool -xf4bppDestroyWindow(pWin) -register WindowPtr pWin ; -{ -return pWin ? TRUE : FALSE ; -} - -/* As The Name Says -- Used For ega, vga and apa8c */ -Bool -xf4bppCreateWindowForXYhardware(pWin) -register WindowPtr pWin ; -{ - TRACE(("xf4bppCreateWindowForXYhardware (pWin= 0x%x)\n", pWin)); - - return TRUE; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/vgaBitBlt.c b/xorg-server/hw/xfree86/xf4bpp/vgaBitBlt.c deleted file mode 100644 index 2e89f43b7..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/vgaBitBlt.c +++ /dev/null @@ -1,749 +0,0 @@ -/* GJA -- span move routines */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "OScompiler.h" -#include "vgaReg.h" -#include "vgaVideo.h" - -#include "xf86str.h" /* for pScrn->vtSema */ -extern ScrnInfoPtr *xf86Screens; - -#ifndef PC98_EGC /* not PC98_EGC */ -/* NOTE: It seems that there is no way to program the VGA to copy just - * a part of a byte in the smarter modes. Therefore we copy the boundaries - * plane by plane. - */ -#define WORDSZ 8 - /* The fast blit code requires WORDSZ = 8 for its read-modify write cycle. - * Therefore, we do not fully implement the other options. - */ -#define HIGHPLANEMASK 0x08 -#define HIGHPLANEINDEX 3 - -/* Of course, we want the following anyway: - * (Yes, they're identical now.) - */ -#define SMEM(x,y) ( VIDBASE(pWin) + (y) * BYTES_PER_LINE(pWin) + (x) ) -#define DMEM(x,y) ( VIDBASE(pWin) + (y) * BYTES_PER_LINE(pWin) + (x) ) - -#define WORD8 unsigned char -#define LW8 BYTES_PER_LINE(pWin) /* Line width */ -#define WSHIFT8 0x3 -#define WMASK8 0x07 -/* NOTE: lmask[8] matters. It must be different from lmask[0] */ -static unsigned char lmasktab[] = { - 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE, 0xFF -} ; -static unsigned char rmasktab[] = { - 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x01, 0x00 -} ; - -#define LMASK8(n) lmasktab[n] -#define RMASK8(n) rmasktab[n] -#define SWAPB8(x) (x) - -#if (WORDSZ == 8) - -#define WORD WORD8 -#define LW LW8 -#define WSHIFT WSHIFT8 -#define WMASK WMASK8 - -#define LMASK(n) LMASK8(n) -#define RMASK(n) RMASK8(n) -#define SWAPB(x) SWAPB8(x) - -#endif /* WORDSZ == 8 */ - -#define DO_ALU(dst,src,mask,alu) {\ - int _ndst, _odst; _odst = dst; \ - switch ( alu ) { \ - case GXclear: \ - _ndst = 0; break; \ - case GXand: \ - _ndst = src & _odst; break; \ - case GXandReverse: \ - _ndst = src & ~ _odst; break; \ - case GXcopy: \ - _ndst = src; break; \ - case GXandInverted: \ - _ndst = ~ src & _odst; break; \ - default: \ - case GXnoop: \ - _ndst = _odst; break; \ - case GXxor: \ - _ndst = src ^ _odst; break; \ - case GXor: \ - _ndst = src | _odst; break; \ - case GXnor: \ - _ndst = ~ src & ~ _odst; break; \ - case GXequiv: \ - _ndst = ~ src ^ _odst; break; \ - case GXinvert: \ - _ndst = ~ _odst; break; \ - case GXorReverse: \ - _ndst = src | ~ _odst; break; \ - case GXcopyInverted: \ - _ndst = ~ src; break; \ - case GXorInverted: \ - _ndst = ~ src | _odst; break; \ - case GXnand: \ - _ndst = ~ src | ~ _odst; break; \ - case GXset: \ - _ndst = ~0; break; \ - } \ - dst = (_odst & ~(mask)) | (_ndst & (mask)); \ - } - -static void aligned_blit( - WindowPtr, int, int, int, int, int, int, int, int -); - -static void aligned_blit_center( - WindowPtr, int, int, int, int, int, int -); - -static void shift( - WindowPtr, int, int, int, int, int, int, int -); - -static void shift_thin_rect( - WindowPtr, int, int, int, int, int, int, int -); - -static void shift_center( - WindowPtr, int, int, int, int, int, int, int -); - -void xf4bppBitBlt(pWin,alu,writeplanes,x0,y0,x1,y1,w,h) -WindowPtr pWin; /* GJA */ -int alu; -int writeplanes; /* planes */ -int x0, y0, x1, y1, w, h; -{ - IOADDRESS REGBASE; - int plane, bit; - - if ( !w || !h ) return; - - if ( ! xf86Screens[((DrawablePtr)pWin)->pScreen->myNum]->vtSema ) { - xf4bppOffBitBlt(pWin,alu,writeplanes,x0,y0,x1,y1,w,h); - return; - } - - REGBASE = - xf86Screens[((DrawablePtr)pWin)->pScreen->myNum]->domainIOBase + 0x300; - - /* 0x7, not WMASK: it is hardware dependant */ - if ( ((x0 - x1) & 0x7) || (alu != GXcopy) ) { - /* Use slow copy */ - SetVideoGraphics(Enb_Set_ResetIndex, 0); /* All from CPU */ - SetVideoGraphics(Bit_MaskIndex, 0xFF); /* All bits */ - SetVideoGraphics(Graphics_ModeIndex, 0); /* Write mode 0 */ - SetVideoGraphics(Data_RotateIndex, 0); /* Don't rotate, replace */ - - for ( plane = HIGHPLANEMASK, bit = HIGHPLANEINDEX ; - plane ; plane >>= 1, bit-- ) - { - - if ( writeplanes & plane) { - SetVideoGraphics(Read_Map_SelectIndex, bit); - SetVideoSequencer(Mask_MapIndex, plane); - - shift(pWin,x0,x1,y0,y1,w,h,alu); - } - } - } else { - aligned_blit(pWin,x0,x1,y0,y1,w,h,alu,writeplanes); - } -} - -/* Copy a span a number of places to the right. - */ -static void -shift(pWin,x0,x1,y0,y1,w,h,alu) -WindowPtr pWin; /* GJA */ -int x0; /* left edge of source */ -int x1; /* left edge of target */ -int y0; -int y1; -int w; /* length of source, and of target */ -int h; -int alu; -{ - if ( ((x1 & WMASK) + w) <= WORDSZ ) { - shift_thin_rect(pWin,x0,x1,y0,y1,w,h,alu); - } else if ( x1 > x0 ) { /* Shift right: start right */ - int l1 = x1 & WMASK, r1 = (x1 + w) & WMASK; - - if ( r1 ) /* right edge */ - shift_thin_rect(pWin,x0+w-r1,x1+w-r1,y0,y1,r1,h,alu); - shift_center(pWin,x0,x1,y0,y1,w,h,alu); - if ( l1 ) /* left edge */ - shift_thin_rect(pWin,x0,x1,y0,y1,(WORDSZ-l1),h,alu); - } else { - int l1 = x1 & WMASK, r1 = (x1 + w) & WMASK; - - if ( l1 ) /* left edge */ - shift_thin_rect(pWin,x0,x1,y0,y1,(WORDSZ-l1),h,alu); - shift_center(pWin,x0,x1,y0,y1,w,h,alu); - if ( r1 ) /* right edge */ - shift_thin_rect(pWin,x0+w-r1,x1+w-r1,y0,y1,r1,h,alu); - } -} - -/* The whole rectangle is so thin that it fits in one byte written */ -static void -shift_thin_rect(pWin,x0,x1,y0,y1,w,h,alu) -WindowPtr pWin; /* GJA */ -int x0; /* left edge of source */ -int x1; /* left edge of target */ -int y0; -int y1; -int w; /* length of source, and of target */ -int h; -int alu; -{ - int l0 = x0 & WMASK; /* Left edge of source, as bit */ - int l1 = x1 & WMASK; /* Left edge of target, as bit */ - int L0 = x0 >> WSHIFT; /* Left edge of source, as byte */ - int L1 = x1 >> WSHIFT; /* Left edge of target, as byte */ - int pad; - int htmp; - int mask; - int tmp; - int bs; - - volatile unsigned char *sp, *dp; - - mask = RMASK(l1) & LMASK(l1+w); - bs = (x1 - x0) & WMASK; - - if ( y1 > y0 ) { /* Move down, start at the bottom */ - pad = - BYTES_PER_LINE(pWin); - sp = SMEM(L0,y0+h-1); - dp = DMEM(L1,y1+h-1); - } else { /* Move up, start at the top */ - pad = BYTES_PER_LINE(pWin); - sp = SMEM(L0,y0); - dp = DMEM(L1,y1); - } - - if ( l0+w > WORDSZ ) { - /* Need two bytes */ - for ( htmp = h ; htmp ; htmp-- ) { - tmp = (sp[0] << (WORDSZ - bs)); - sp++; - tmp |= (sp[0] >> bs); - sp--; - DO_ALU(dp[0],tmp,mask,alu); - dp += pad; - sp += pad; - } - } else if ( l0 <= l1 ) { - /* Need one byte, shifted right */ - for ( htmp = h ; htmp ; htmp-- ) { - tmp = (sp[0] >> bs); - DO_ALU(dp[0],tmp,mask,alu); - dp += pad; - sp += pad; - } - } else { - /* Need one byte, shifted left */ - for ( htmp = h ; htmp ; htmp-- ) { - tmp = (sp[0] << (WORDSZ - bs)); - DO_ALU(dp[0],tmp,mask,alu); - dp += pad; - sp += pad; - } - } -} - -static void -shift_center(pWin,x0,x1,y0,y1,w,h,alu) -WindowPtr pWin; /* GJA */ -int x0; /* left edge of source */ -int x1; /* left edge of target */ -int y0; -int y1; -int w; /* length of source, and of target */ -int h; -int alu; -{ - int l1 = x1 & WMASK; /* Left edge of target, as bit */ - int r1 = (x1 + w) & WMASK; /* Right edge of target, as bit */ - int pad; - int htmp, wtmp; /* Temporaries for indices over height and width */ - volatile unsigned char tmp; /* Temporary result of the shifts */ - int bs; - int rem; /* Remaining bits; temporary in loop */ - int bytecnt; - - volatile unsigned char *sp, *dp; - - bs = (x1 - x0) & WMASK; - - if ( l1 ) { - bytecnt = (w - (WORDSZ - l1) - r1) >> WSHIFT; - sp = SMEM( ((x0 + (WORDSZ - l1)) >> WSHIFT), y0); - dp = DMEM( ((x1 + (WORDSZ - l1)) >> WSHIFT), y1); - } else { - bytecnt = (w - r1) >> WSHIFT; - sp = SMEM( (x0 >> WSHIFT), y0); - dp = DMEM( (x1 >> WSHIFT), y1); - } - - if ( y1 > y0 ) { /* Move down, start at the bottom */ - if ( x1 > x0 ) { /* Move right, start right */ - pad = - BYTES_PER_LINE(pWin) + bytecnt; - sp += BYTES_PER_LINE(pWin) * (h - 1) + bytecnt - 1; - dp += BYTES_PER_LINE(pWin) * (h - 1) + bytecnt - 1; - } else { /* Move left, start left */ - pad = - BYTES_PER_LINE(pWin) - bytecnt; - sp += BYTES_PER_LINE(pWin) * (h - 1); - dp += BYTES_PER_LINE(pWin) * (h - 1); - } - } else { /* Move up, start at the top */ - if ( x1 > x0 ) { /* Move right, start right */ - pad = BYTES_PER_LINE(pWin) + bytecnt; - sp += bytecnt - 1; - dp += bytecnt - 1; - } else { /* Move left, start left */ - pad = BYTES_PER_LINE(pWin) - bytecnt; - sp += 0; - dp += 0; - } - } - - if ( x1 > x0 ) { /* Move right, start right */ - if ( bs == 0 ) { /* No shift. Need one byte only */ - for ( htmp = h ; htmp ; htmp-- ) { - for ( wtmp = bytecnt ; wtmp ; wtmp-- ) { - tmp = sp[0]; - DO_ALU(dp[0],tmp,~0,alu); - dp--; - sp--; - } - dp += pad; - sp += pad; - } - } else { - for ( htmp = h ; htmp ; htmp-- ) { - if ( bytecnt ) { - sp++; - rem = sp[0]; - sp--; - for ( wtmp = bytecnt ; wtmp ; wtmp-- ) { - tmp = (rem >> bs); - rem = sp[0]; - tmp |= (rem << (WORDSZ - bs)) ; - DO_ALU(dp[0],tmp,~0,alu); - dp--; - sp--; - } - } - dp += pad; - sp += pad; - } - } - } else { /* x1 <= x0 */ /* Move left, start left */ - if ( bs == 0 ) { /* No shift. Need one byte only */ - for ( htmp = h ; htmp ; htmp-- ) { - for ( wtmp = bytecnt ; wtmp ; wtmp-- ) { - tmp = sp[0]; - DO_ALU(dp[0],tmp,~0,alu); - dp++; - sp++; - } - dp += pad; - sp += pad; - } - } else { - for ( htmp = h ; htmp ; htmp-- ) { - if ( bytecnt ) { - rem = sp[0]; - for ( wtmp = bytecnt ; wtmp ; wtmp-- ) { - tmp = (rem << (WORDSZ - bs)); - sp++; - rem = sp[0]; - sp--; - tmp |= (rem >> bs); - DO_ALU(dp[0],tmp,~0,alu); - dp++; - sp++; - } - } - dp += pad; - sp += pad; - } - } - } -} - -/* Copy a rectangle. - */ -static void -aligned_blit(pWin,x0,x1,y0,y1,w,h,alu,planes) -WindowPtr pWin; /* GJA */ -int x0; /* left edge of source */ -int x1; /* left edge of target */ -int y0; -int y1; -int w; /* length of source, and of target */ -int h; -int alu; -int planes; -{ - IOADDRESS REGBASE = - xf86Screens[((DrawablePtr)pWin)->pScreen->myNum]->domainIOBase + 0x300; - int plane, bit; - - if ( ((x1 & WMASK) + w) <= WORDSZ ) { - SetVideoGraphics(Enb_Set_ResetIndex, 0); /* All from CPU */ - SetVideoGraphics(Bit_MaskIndex, 0xFF); /* All bits */ - SetVideoGraphics(Graphics_ModeIndex, 0); /* Write mode 0 */ - SetVideoGraphics(Data_RotateIndex, 0); /* Don't rotate, replace */ - - for ( plane = HIGHPLANEMASK, bit = HIGHPLANEINDEX; - plane ; plane >>= 1, bit-- ) - { - if ( planes & plane) { - SetVideoGraphics(Read_Map_SelectIndex, bit); - SetVideoSequencer(Mask_MapIndex, plane); - - shift_thin_rect(pWin,x0,x1,y0,y1,w,h,alu); - } - } - } else if ( x1 > x0 ) { /* Shift right: start right */ - int l1 = x1 & WMASK, r1 = (x1 + w) & WMASK; - - if ( r1 ) { /* right edge */ - SetVideoGraphics(Enb_Set_ResetIndex, 0); /* All from CPU */ - SetVideoGraphics(Bit_MaskIndex, 0xFF); /* All bits */ - SetVideoGraphics(Graphics_ModeIndex, 0); /* Write mode 0 */ - SetVideoGraphics(Data_RotateIndex, 0); /* Don't rotate, replace */ - - for ( plane = HIGHPLANEMASK, bit = HIGHPLANEINDEX; - plane ; plane >>= 1, bit-- ) - { - if ( planes & plane) { - SetVideoGraphics(Read_Map_SelectIndex, bit); - SetVideoSequencer(Mask_MapIndex, plane); - - shift_thin_rect(pWin,x0+w-r1,x1+w-r1,y0,y1,r1,h,alu); - } - } - } - - /* Center */ - SetVideoGraphics(Graphics_ModeIndex, 1); /* Write mode 1 */ - SetVideoSequencer(Mask_MapIndex, planes); - - aligned_blit_center(pWin,x0,x1,y0,y1,w,h); - - if ( l1 ) { /* left edge */ - SetVideoGraphics(Enb_Set_ResetIndex, 0); /* All from CPU */ - SetVideoGraphics(Bit_MaskIndex, 0xFF); /* All bits */ - SetVideoGraphics(Graphics_ModeIndex, 0); /* Write mode 0 */ - SetVideoGraphics(Data_RotateIndex, 0); /* Don't rotate, replace */ - - for ( plane = HIGHPLANEMASK, bit = HIGHPLANEINDEX; - plane ; plane >>= 1, bit-- ) - { - if ( planes & plane) { - SetVideoGraphics(Read_Map_SelectIndex, bit); - SetVideoSequencer(Mask_MapIndex, plane); - - shift_thin_rect(pWin,x0,x1,y0,y1,(WORDSZ-l1),h,alu); - } - } - } - } else { - int l1 = x1 & WMASK, r1 = (x1 + w) & WMASK; - - if ( l1 ) { /* left edge */ - SetVideoGraphics(Enb_Set_ResetIndex, 0); /* All from CPU */ - SetVideoGraphics(Bit_MaskIndex, 0xFF); /* All bits */ - SetVideoGraphics(Graphics_ModeIndex, 0); /* Write mode 0 */ - SetVideoGraphics(Data_RotateIndex, 0); /* Don't rotate, replace */ - - for ( plane = HIGHPLANEMASK, bit = HIGHPLANEINDEX; - plane ; plane >>= 1, bit-- ) - { - if ( planes & plane) { - SetVideoGraphics(Read_Map_SelectIndex, bit); - SetVideoSequencer(Mask_MapIndex, plane); - - shift_thin_rect(pWin,x0,x1,y0,y1,(WORDSZ-l1),h,alu); - } - } - } - - /* Center */ - SetVideoGraphics(Graphics_ModeIndex, 1); /* Write mode 1 */ - SetVideoSequencer(Mask_MapIndex, planes); - - aligned_blit_center(pWin,x0,x1,y0,y1,w,h); - - if ( r1 ) { /* right edge */ - SetVideoGraphics(Enb_Set_ResetIndex, 0); /* All from CPU */ - SetVideoGraphics(Bit_MaskIndex, 0xFF); /* All bits */ - SetVideoGraphics(Graphics_ModeIndex, 0); /* Write mode 0 */ - SetVideoGraphics(Data_RotateIndex, 0); /* Don't rotate, replace */ - - for ( plane = HIGHPLANEMASK, bit = HIGHPLANEINDEX ; - plane ; plane >>= 1, bit-- ) - { - if ( planes & plane) { - SetVideoGraphics(Read_Map_SelectIndex, bit); - SetVideoSequencer(Mask_MapIndex, plane); - - shift_thin_rect(pWin,x0+w-r1,x1+w-r1,y0,y1,r1,h,alu); - } - } - } - } -} - -static void -aligned_blit_center(pWin,x0,x1,y0,y1,w,h) -WindowPtr pWin; /* GJA */ -int x0; /* left edge of source */ -int x1; /* left edge of target */ -int y0; -int y1; -int w; /* length of source, and of target */ -int h; -{ - int l1 = x1 & WMASK; /* Left edge of target, as bit */ - int r1 = (x1 + w) & WMASK; /* Right edge of target, as bit */ - int pad; - int htmp, wtmp; /* Temporaries for indices over height and width */ - volatile unsigned char tmp; /* Temporary result of the shifts */ - int bytecnt; - - volatile unsigned char *sp, *dp; - - if ( l1 ) { - bytecnt = (w - (WORDSZ - l1) - r1) >> WSHIFT; - sp = SMEM( ((x0 + (WORDSZ - l1)) >> WSHIFT), y0); - dp = DMEM( ((x1 + (WORDSZ - l1)) >> WSHIFT), y1); - } else { - bytecnt = (w - r1) >> WSHIFT; - sp = SMEM( (x0 >> WSHIFT), y0); - dp = DMEM( (x1 >> WSHIFT), y1); - } - - if ( y1 > y0 ) { /* Move down, start at the bottom */ - if ( x1 > x0 ) { /* Move right, start right */ - pad = - BYTES_PER_LINE(pWin) + bytecnt; - sp += BYTES_PER_LINE(pWin) * (h - 1) + bytecnt - 1; - dp += BYTES_PER_LINE(pWin) * (h - 1) + bytecnt - 1; - } else { /* Move left, start left */ - pad = - BYTES_PER_LINE(pWin) - bytecnt; - sp += BYTES_PER_LINE(pWin) * (h - 1); - dp += BYTES_PER_LINE(pWin) * (h - 1); - } - } else { /* Move up, start at the top */ - if ( x1 > x0 ) { /* Move right, start right */ - pad = BYTES_PER_LINE(pWin) + bytecnt; - sp += bytecnt - 1; - dp += bytecnt - 1; - } else { /* Move left, start left */ - pad = BYTES_PER_LINE(pWin) - bytecnt; - sp += 0; - dp += 0; - } - } - - if ( x1 > x0 ) { /* Move right, start right */ - for ( htmp = h ; htmp ; htmp-- ) { - for ( wtmp = bytecnt ; wtmp ; wtmp-- ) { - tmp = sp[0]; - dp[0] = tmp; - dp--; - sp--; - } - dp += pad; - sp += pad; - } - } else { /* x1 <= x0 */ /* Move left, start left */ - for ( htmp = h ; htmp ; htmp-- ) { - for ( wtmp = bytecnt ; wtmp ; wtmp-- ) { - tmp = sp[0]; - dp[0] = tmp; - dp++; - sp++; - } - dp += pad; - sp += pad; - } - } -} -#else /* PC98_EGC */ - -static void -egc_fast_blt (pWin, alu, writeplanes, x0, y0, x1, y1, w, h) -WindowPtr pWin; -const int alu, writeplanes ; -register int x0, x1 ; -int y0, y1 ; -register int w, h ; -{ -register volatile unsigned char *src ; -register volatile unsigned char *dst ; -unsigned short *src_x ; -unsigned short *dst_x ; -int x_direction, y_interval ; -int src_off, dst_off ; -register int k, i ; -unsigned short ROP_value; - -src = (unsigned char *)SCREENADDRESS( pWin, 0, y0); -dst = (unsigned char *)SCREENADDRESS( pWin, 0, y1); - -/* Set Map Mask */ -outw(EGC_PLANE, ~(writeplanes & VGA_ALLPLANES)); -switch(alu) { -case GXnor: /* ~(S|D) */ - ROP_value = 0x2903; - break; -case GXandInverted: /* ~S&D */ - ROP_value = 0x290c; - break; -case GXand: /* S&D */ - ROP_value = 0x29c0; - break; -case GXequiv: /* ~S ^ D */ - ROP_value = 0x29c3; - break; -case GXxor: /* S^D */ - ROP_value = 0x293c; - break; -case GXandReverse: /* S&~D */ - ROP_value = 0x2930; - break; -case GXorReverse: /* S|~D */ - ROP_value = 0x29f3; - break; -case GXnand: /* ~(S&D) */ - ROP_value = 0x293f; - break; -case GXorInverted: /* ~S|D */ - ROP_value = 0x29cf; - break; -case GXor: /* S|D */ - ROP_value = 0x29fa; - break; -case GXcopyInverted: /* ~S */ - ROP_value = 0x290f; - break; -case GXcopy: /* S */ -default: - ROP_value = 0x29f0; -} -outw(EGC_MODE, ROP_value); -if ( y1 > y0 ) { - y_interval = - BYTES_PER_LINE(pWin) * 8 ; - src += BYTES_PER_LINE(pWin) * ( h - 1 ) ; - dst += BYTES_PER_LINE(pWin) * ( h - 1 ) ; -} -else { - y_interval = BYTES_PER_LINE(pWin) * 8 ; -} - -src = (unsigned char *)((int)src << 3) ; -dst = (unsigned char *)((int)dst << 3) ; - -if ( y1 > y0) { - x_direction = 0x1000 ; - src += x0 + w - 1 ; - dst += x1 + w - 1 ; -} else if ( y1 < y0 ) { - x_direction = 0 ; - src += x0 ; - dst += x1 ; -} else { - if ( x1 < x0 ) { - x_direction = 0 ; - src += x0 ; - dst += x1 ; - } else { - x_direction = 0x1000 ; - src += x0 + w - 1 ; - dst += x1 + w - 1 ; - } -} - outw ( EGC_LENGTH , w - 1 ) ; - -for ( ; h-- ; ) { - if ( x_direction ) { - src_off = 15 - (int)src & 0xf ; - dst_off = 15 - (int)dst & 0xf ; - } else { - src_off = (int)src & 0xf ; - dst_off = (int)dst & 0xf ; - } -#if defined(__NetBSD__) || defined(__OpenBSD__) - src_x = (unsigned short *)(((unsigned int)src >> 4 ) << 1) ; - dst_x = (unsigned short *)(((unsigned int)dst >> 4 ) << 1) ; -#else - src_x = (unsigned short *)(((int)src >> 4 ) << 1) ; - dst_x = (unsigned short *)(((int)dst >> 4 ) << 1) ; -#endif - k = ( src_off + w + 15 ) >> 4 ; - if ( src_off < dst_off ) { - if ( ((src_off + w - 1 ) >> 4) < ((dst_off + w - 1) >> 4)) k++ ; - } - if ( src_off > dst_off ) { - if ( ((src_off + w - 1) >> 4 ) == ((dst_off + w - 1) >> 4) ) k++ ; - if ( x_direction ) dst_x ++ ; - else dst_x -- ; - } - outw ( EGC_ADD , x_direction | src_off | dst_off << 4 ); - if ( x_direction ) { - wcopyl ( src_x, dst_x, k, VIDBASE(pWin) ) ; - } else { - wcopyr ( src_x, dst_x, k, VIDBASE(pWin) ) ; - } -src += y_interval ; -dst += y_interval ; -} -outw ( EGC_ADD, 0 ) ; -outw ( EGC_LENGTH , 0xf ); -return; -} - -void -xf4bppBitBlt( pWin,alu, writeplanes, x0, y0, x1, y1, w, h ) -WindowPtr pWin; /* GJA */ -int alu; -int writeplanes; /* planes */ -int x0, y0, x1, y1, w, h; -{ - if ( ! xf86Screens[((DrawablePtr)pWin)->pScreen->myNum]->vtSema ) { - xf4bppOffBitBlt( pWin, alu, writeplanes, - x0, y0, x1, y1, w, h ); - return; - } - -switch ( alu ) { - case GXclear: /* 0x0 Zero 0 */ - case GXinvert: /* 0xa NOT dst */ - case GXset: /* 0xf 1 */ - xf4bppFillSolid( pWin, VGA_ALLPLANES, alu, writeplanes, x1, y1, w, h ) ; - /* x1, y1, GJA */ - case GXnoop: /* 0x5 dst */ - return ; - default: - break ; -} - -egc_fast_blt ( pWin, alu, writeplanes, x0, y0, x1, y1, w, h); -return; -} -#endif diff --git a/xorg-server/hw/xfree86/xf4bpp/vgaGC.c b/xorg-server/hw/xfree86/xf4bpp/vgaGC.c deleted file mode 100644 index 6495e5638..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/vgaGC.c +++ /dev/null @@ -1,213 +0,0 @@ -/* - -Copyright (c) 1987 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the X Consortium. - - -Copyright IBM Corporation 1987,1988,1989 -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of IBM not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "mfbmap.h" -#include "mfb.h" -#include "mi.h" -#include "ppcGCstr.h" - -void -xf4bppChangeGCtype( pGC, devPriv ) -register GC *pGC ; -register ppcPrivGCPtr devPriv ; -{ - if ( devPriv->lastDrawableType == DRAWABLE_PIXMAP ) { - pGC->ops->CopyArea = miCopyArea ; - pGC->ops->PolyFillRect = miPolyFillRect ; - pGC->ops->PushPixels = miPushPixels ; - pGC->ops->PolyArc = miPolyArc ; - pGC->ops->PolyFillArc = miPolyFillArc ; - pGC->ops->PolySegment = miPolySegment ; - } - else { - pGC->ops->CopyArea = xf4bppCopyArea ; - pGC->ops->PolyFillRect = xf4bppPolyFillRect ; - pGC->ops->PushPixels = miPushPixels ; /* GJA */ - pGC->ops->PolyArc = xf4bppZeroPolyArc ; - pGC->ops->PolyFillArc = xf4bppPolyFillArc ; - pGC->ops->PolySegment = xf4bppSegmentSS ; - } - return; -} - -Mask -xf4bppChangeWindowGC( pGC, changes ) -register GC *pGC ; -register Mask changes ; -{ -register ppcPrivGCPtr devPriv = (ppcPrivGCPtr)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()); -register unsigned long int idx ; /* used for stepping through bitfields */ - -#define LOWBIT( x ) ( x & - x ) /* Two's complement */ - while ((idx = LOWBIT(changes))) { - switch ( idx ) { - - case GCLineStyle: - case GCLineWidth: - pGC->ops->PolyArc = ( ( pGC->lineStyle == LineSolid ) - ? ( ( pGC->lineWidth == 0 ) ? xf4bppZeroPolyArc - : miPolyArc ) - : miPolyArc ) ; - pGC->ops->PolySegment = ( ( pGC->lineStyle == LineSolid ) - ? ( ( pGC->lineWidth == 0 ) - ? ( ( pGC->fillStyle == FillSolid ) ? - xf4bppSegmentSS : miPolySegment ) - : miPolySegment ) - : ( ( pGC->lineWidth == 0 ) - ? ( ( pGC->fillStyle == FillSolid ) ? - xf4bppSegmentSD : miPolySegment ) - : miPolySegment ) ) ; - pGC->ops->Polylines = ( ( pGC->lineStyle == LineSolid ) - ? ( ( pGC->lineWidth == 0 ) - ? ( (pGC->fillStyle == FillSolid ) ? - xf4bppLineSS : miZeroLine ) - : miWideLine ) - : ( ( pGC->lineWidth == 0 ) - ? ( (pGC->fillStyle == FillSolid ) ? - xf4bppLineSD : miWideDash ) - : miWideDash ) ) ; - /* - * If these are just square boxes with no funny business - * going on we can call the fast routine that draws - * rectangles without floating point. - */ -/* too buggy */ -#if 0 - if ( ( pGC->lineStyle == LineSolid ) - && ( pGC->joinStyle == JoinMiter ) - && ( pGC->lineWidth != 0 ) ) - pGC->ops->PolyRectangle = xf4bppPolyRectangle; - else -#endif - pGC->ops->PolyRectangle = miPolyRectangle; - - changes &= ~( GCLineStyle | GCLineWidth ) ; - break ; - case GCJoinStyle: - /* - * If these are just square boxes with no funny business - * going on we can call the fast routine that draws - * rectangles without floating point. - */ -/* too buggy */ -#if 0 - if ( ( pGC->lineStyle == LineSolid ) - && ( pGC->joinStyle == JoinMiter ) - && ( pGC->lineWidth != 0 ) ) - pGC->ops->PolyRectangle = xf4bppPolyRectangle; - else -#endif - pGC->ops->PolyRectangle = miPolyRectangle; - changes &= ~ idx ; /* i.e. changes &= ~ GCJoinStyle */ - break ; - - case GCBackground: - if ( pGC->fillStyle != FillOpaqueStippled ) { - changes &= ~ idx ; /* i.e. changes &= ~GCBackground */ - break ; - } /* else Fall Through */ - case GCForeground: - if ( pGC->fillStyle == FillTiled ) { - changes &= ~ idx ; /* i.e. changes &= ~GCForeground */ - break ; - } /* else Fall Through */ - case GCFunction: - case GCPlaneMask: - case GCFillStyle: - { /* new_fill */ - int fillStyle = devPriv->colorRrop.fillStyle ; - /* install a suitable fillspans */ - if ( fillStyle == FillSolid ) - pGC->ops->FillSpans = xf4bppSolidWindowFS ; - else if ( fillStyle == FillStippled ) - pGC->ops->FillSpans = xf4bppStippleWindowFS ; - else if ( fillStyle == FillOpaqueStippled ) - pGC->ops->FillSpans = xf4bppOpStippleWindowFS ; - else /* fillStyle == FillTiled */ - pGC->ops->FillSpans = xf4bppTileWindowFS ; - } /* end of new_fill */ - changes &= ~( GCBackground | GCForeground - | GCFunction - | GCPlaneMask | GCFillStyle ) ; - break ; - - default: - ErrorF("xf4bppChangeWindowGC: Unexpected GC Change\n") ; - changes &= ~ idx ; /* Remove it anyway */ - break ; - } - } - return changes; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/vgaImages.c b/xorg-server/hw/xfree86/xf4bpp/vgaImages.c deleted file mode 100644 index bea2d0a17..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/vgaImages.c +++ /dev/null @@ -1,460 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "OScompiler.h" -#include "vgaReg.h" -#include "vgaVideo.h" - -#include "xf86str.h" /* for pScrn->vtSema */ -extern ScrnInfoPtr *xf86Screens; - -#undef TRUE -#undef FALSE -#define TRUE 1 -#define FALSE 0 - -void -xf4bppDrawColorImage( pWin, x, y, w, h, data, RowIncrement, alu, planes ) -WindowPtr pWin; /* GJA */ -int x, y ; -register int w, h ; -unsigned char *data ; -register int RowIncrement ; -const int alu ; -const unsigned long int planes ; -{ -IOADDRESS REGBASE; -register unsigned long int tmp ; -register const unsigned char *src ; -register volatile unsigned char *dst ; -register int Pixel_Count ; -register unsigned int currMask ; -register unsigned int InitialMask ; -register volatile unsigned char *StartByte ; -unsigned int invert_source_data = FALSE ; -#ifdef PC98_EGC /* new EGC test */ -register unsigned char tmp1; -#endif - -{ /* Start GJA */ - if ( !xf86Screens[((DrawablePtr)pWin)->pScreen->myNum]->vtSema ) { - xf4bppOffDrawColorImage( pWin, x, y, w, h, data, RowIncrement, alu, planes ); - return; - } -} /* End GJA */ - -{ - unsigned int invert_existing_data = FALSE ; - unsigned int data_rotate_value = VGA_COPY_MODE ; -#ifdef PC98_EGC - unsigned short ROP_value; -#endif - - REGBASE = 0x300 + - xf86Screens[((DrawablePtr)pWin)->pScreen->myNum]->domainIOBase; - - switch ( alu ) { - case GXclear: /* 0x0 Zero 0 */ - case GXinvert: /* 0xa NOT dst */ - case GXset: /* 0xf 1 */ - xf4bppFillSolid( pWin, VGA_ALLPLANES, alu, planes, x, y, w, h ) ; - case GXnoop: /* 0x5 dst */ - return ; - case GXnor: /* 0x8 NOT src AND NOT dst */ - invert_existing_data = TRUE ; - case GXandInverted: /* 0x4 NOT src AND dst */ - invert_source_data = TRUE ; - case GXand: /* 0x1 src AND dst */ - data_rotate_value = VGA_AND_MODE ; - break ; - case GXequiv: /* 0x9 NOT src XOR dst */ - invert_source_data = TRUE ; - case GXxor: /* 0x6 src XOR dst */ - data_rotate_value = VGA_XOR_MODE ; - break ; - case GXandReverse: /* 0x2 src AND NOT dst */ - invert_existing_data = TRUE ; - data_rotate_value = VGA_AND_MODE ; - break ; - case GXnand: /* 0xe NOT src OR NOT dst */ - invert_source_data = TRUE ; - case GXorReverse: /* 0xb src OR NOT dst */ - invert_existing_data = TRUE ; - /* GJA -- moved this here */ - data_rotate_value = VGA_OR_MODE ; - break ; - case GXorInverted: /* 0xd NOT src OR dst */ - invert_source_data = TRUE ; - case GXor: /* 0x7 src OR dst */ - data_rotate_value = VGA_OR_MODE ; - break ; - case GXcopyInverted: /* 0xc NOT src */ - invert_source_data = TRUE ; - case GXcopy: /* 0x3 src */ - default: - break ; - } - -#ifdef PC98_EGC - /* Setup EGC Registers */ - switch(data_rotate_value) { -/* EGC MODE.. Cmp Read: Flase, WriteSource=ROP, ReadSource=CPU */ - case VGA_AND_MODE: - if (invert_existing_data) - ROP_value = EGC_AND_INV_MODE; - else - ROP_value = EGC_AND_MODE; - break; - case VGA_OR_MODE: - if (invert_existing_data) - ROP_value = EGC_OR_INV_MODE; - else - ROP_value = EGC_OR_MODE; - break; - case VGA_XOR_MODE: - if (invert_existing_data) - ROP_value = EGC_XOR_INV_MODE; - else - ROP_value = EGC_XOR_MODE; - break; - case VGA_COPY_MODE: - default: - ROP_value = EGC_COPY_MODE; - break; - } - outw(EGC_PLANE, ~(planes & VGA_ALLPLANES)); - outw(EGC_MODE, ROP_value); - outw(EGC_FGC, 0x0000); - tmp1 = 0; -#else - if ( invert_existing_data ) - xf4bppFillSolid( pWin, VGA_ALLPLANES, GXinvert, planes, x, y, w, h ) ; - /* Setup VGA Registers */ - SetVideoSequencer( Mask_MapIndex, planes & VGA_ALLPLANES ) ; - /* Set Raster Op */ - SetVideoGraphics( Data_RotateIndex, data_rotate_value ) ; - SetVideoGraphics( Graphics_ModeIndex, VGA_WRITE_MODE_2 ) ; -#endif -} - -StartByte = SCREENADDRESS(pWin, x, y); -InitialMask = SCRRIGHT8( LeftmostBit, BIT_OFFSET( x ) ) ; -if ( invert_source_data ) -#ifdef PC98_EGC -#if 0 /* New EGC version */ - egc_image_invert ( StartByte, data, InitialMask, w, h, - RowIncrement ) ; -#else /* new EGC c version */ - for ( ; - h-- ; - data += RowIncrement, StartByte += BYTES_PER_LINE(pWin) ) { - dst = StartByte; - for ( src = data, - Pixel_Count = w, currMask = InitialMask ; - Pixel_Count-- ; - src++ ) { - if (tmp1 != (~*src & VGA_ALLPLANES)) { - tmp1 = ~*src & VGA_ALLPLANES; - /* set FGC */ - outw(EGC_FGC, ~*src & VGA_ALLPLANES); - } - *((VgaMemoryPtr) dst) = currMask; - if ( currMask & RightmostBit ) { - currMask = LeftmostBit ; - dst++; - } - else - currMask = SCRRIGHT8( currMask, 1 ) ; - } - } -#endif /* new EGC */ -#else /* original */ - for ( ; - h-- ; - data += RowIncrement, StartByte += BYTES_PER_LINE(pWin) ) { - dst = StartByte; - for ( src = data, - Pixel_Count = w, currMask = InitialMask ; - Pixel_Count-- ; - src++ ) { - /* Set The Bit Mask Reg */ - SetVideoGraphics( Bit_MaskIndex, currMask ) ; - /* Read To Load vga Data Latches */ - tmp = *( (VgaMemoryPtr) dst ) ; - (void) tmp; - *( (VgaMemoryPtr) dst ) = ~ *src ; - if ( currMask & RightmostBit ) { - currMask = LeftmostBit ; - dst++; - } - else - currMask = SCRRIGHT8( currMask, 1 ) ; - } - } -#endif -else /* invert_source_data == FALSE */ -#ifdef PC98_EGC -#if 0 /* new EGC version */ - egc_image ( StartByte, data, InitialMask, w, h, - RowIncrement ); -#else /* new EGC c version */ - for ( ; - h-- ; - data += RowIncrement, StartByte += BYTES_PER_LINE(pWin) ) { - dst = StartByte; - for ( src = data, - Pixel_Count = w, currMask = InitialMask ; - Pixel_Count-- ; - src++ ) { - if (tmp1 != *src & VGA_ALLPLANES) { - tmp1 = *src & VGA_ALLPLANES; - outw(EGC_FGC, tmp1); /* set FGC */ - } - *((VgaMemoryPtr) dst) = currMask; /* write with mask */ - if ( currMask & RightmostBit ) { - currMask = LeftmostBit ; - dst++; - } - else - currMask = SCRRIGHT8( currMask, 1 ) ; - } - } -#endif /* new EGC version */ -#else /* original */ - for ( ; - h-- ; - data += RowIncrement, StartByte += BYTES_PER_LINE(pWin) ) { - dst = StartByte; - for ( src = data, - Pixel_Count = w, currMask = InitialMask ; - Pixel_Count-- ; - src++ ) { - /* Set The Bit Mask Reg */ - SetVideoGraphics( Bit_MaskIndex, currMask ) ; /* GJA */ - /* Read To Load vga Data Latches */ - tmp = *( (VgaMemoryPtr) dst ) ; - (void) tmp; - *( (VgaMemoryPtr) dst ) = *src ; - if ( currMask & RightmostBit ) { - currMask = LeftmostBit ; - dst++; - } - else - currMask = SCRRIGHT8( currMask, 1 ) ; - } - } -#endif /* original */ - -return ; -} - -#ifndef PC98_EGC -static unsigned long int -read8Z -( - IOADDRESS REGBASE, - register volatile unsigned char *screen_ptr -) -{ -register unsigned long int i ; -register unsigned long int j ; - -/* Read One Byte At A Time to get - * i == [ Plane 3 ] [ Plane 2 ] [ Plane 1 ] [ Plane 0 ] - * into a single register - */ -SetVideoGraphicsData( 3 ) ; -i = *( (VgaMemoryPtr) screen_ptr ) << 8 ; -SetVideoGraphicsData( 2 ) ; -i |= *( (VgaMemoryPtr) screen_ptr ) ; -i <<= 8 ; -SetVideoGraphicsData( 1 ) ; -i |= *( (VgaMemoryPtr) screen_ptr ) ; -i <<= 8 ; -SetVideoGraphicsData( 0 ) ; -i |= *( (VgaMemoryPtr) screen_ptr ) ; - -/* Push Bits To Get - * j == [Pixel 7][Pixel 6][Pixel 5][Pixel 4][Pixel 3][Pixel 2][Pixel 1][Pixel 0] - * into one register - */ - -j = ( i & 0x1 ) << 4 ; -j |= ( i >>= 1 ) & 0x1 ; -j <<= 4 ; -j |= ( i >>= 1 ) & 0x1 ; -j <<= 4 ; -j |= ( i >>= 1 ) & 0x1 ; -j <<= 4 ; -j |= ( i >>= 1 ) & 0x1 ; -j <<= 4 ; -j |= ( i >>= 1 ) & 0x1 ; -j <<= 4 ; -j |= ( i >>= 1 ) & 0x1 ; -j <<= 4 ; -j |= ( i >>= 1 ) & 0x1 ; - -j |= ( i & 0x2 ) << 28 ; -j |= ( ( i >>= 1 ) & 0x2 ) << 24 ; -j |= ( ( i >>= 1 ) & 0x2 ) << 20 ; -j |= ( ( i >>= 1 ) & 0x2 ) << 16 ; -j |= ( ( i >>= 1 ) & 0x2 ) << 12 ; -j |= ( ( i >>= 1 ) & 0x2 ) << 8 ; -j |= ( ( i >>= 1 ) & 0x2 ) << 4 ; -j |= ( i >>= 1 ) & 0x2 ; - -j |= ( i & 0x4 ) << 28 ; -j |= ( ( i >>= 1 ) & 0x4 ) << 24 ; -j |= ( ( i >>= 1 ) & 0x4 ) << 20 ; -j |= ( ( i >>= 1 ) & 0x4 ) << 16 ; -j |= ( ( i >>= 1 ) & 0x4 ) << 12 ; -j |= ( ( i >>= 1 ) & 0x4 ) << 8 ; -j |= ( ( i >>= 1 ) & 0x4 ) << 4 ; -j |= ( i >>= 1 ) & 0x4 ; - -j |= ( i & 0x8 ) << 28 ; -j |= ( ( i >>= 1 ) & 0x8 ) << 24 ; -j |= ( ( i >>= 1 ) & 0x8 ) << 20 ; -j |= ( ( i >>= 1 ) & 0x8 ) << 16 ; -j |= ( ( i >>= 1 ) & 0x8 ) << 12 ; -j |= ( ( i >>= 1 ) & 0x8 ) << 8 ; -j |= ( ( i >>= 1 ) & 0x8 ) << 4 ; -j |= ( i >>= 1 ) & 0x8 ; - -return j ; -} -#endif /* not PC98_EGC */ - -void -xf4bppReadColorImage( pWin, x, y, lx, ly, data, RowIncrement ) -WindowPtr pWin; /* GJA */ -int x, y ; -int lx, ly ; -register unsigned char *data ; -int RowIncrement ; -{ -IOADDRESS REGBASE; -register unsigned long int tmp ; -register volatile unsigned char *src ; -volatile unsigned char *masterSrc ; -int savCenterWidth ; -int dx ; -int skip ; -int center_width ; -int ignore ; -int pad ; -unsigned char tmpc; - -{ /* Start GJA */ - if ( !xf86Screens[((DrawablePtr)pWin)->pScreen->myNum]->vtSema ) { - xf4bppOffReadColorImage( pWin, x, y, lx, ly, data, RowIncrement ); - return; - } -} /* End GJA */ - -if ( ( lx <= 0 ) || ( ly <= 0 ) ) - return ; - - REGBASE = 0x300 + - xf86Screens[((DrawablePtr)pWin)->pScreen->myNum]->domainIOBase; - -/* Setup VGA Registers */ -#ifndef PC98_EGC -SetVideoGraphicsIndex( Graphics_ModeIndex ) ; -tmpc = inb( GraphicsDataRegister ); -SetVideoGraphicsData( tmpc & ~0x8 ) ; /* Clear the bit */ -SetVideoGraphicsIndex( Read_Map_SelectIndex ) ; -#else -outw(EGC_MODE, 0x0800); -#endif - -skip = BIT_OFFSET( x ) ; -pad = RowIncrement - lx ; -ignore = BIT_OFFSET( x + lx ) ; -masterSrc = SCREENADDRESS( pWin, x, y ) ; -center_width = ROW_OFFSET( x + lx ) - ROW_OFFSET( ( x + 0x7 ) & ~0x7 ) ; - -#define SINGLE_STEP *data++ = tmp & VGA_ALLPLANES ; tmp >>= 4 - - -if ( center_width < 0 ) { - src = masterSrc; - for ( ; ly-- ; ) { - tmp = read8Z( REGBASE, src ) >> ( skip << 2 ) ; - for ( dx = lx + 1 ; --dx ; ) { - SINGLE_STEP ; - } - data += pad ; - src += BYTES_PER_LINE(pWin); - } -} else - for ( savCenterWidth = center_width ; - ly-- ; - center_width = savCenterWidth, - masterSrc += BYTES_PER_LINE(pWin) ) { - src = masterSrc ; - tmp = read8Z( REGBASE, src ) ; src++; - if ((dx = skip)) - tmp >>= ( dx << 2 ) ; - else - if ( lx < 8 ) { /* kludge -- GJA */ - --center_width ; /* kludge -- GJA */ - dx = 8 - lx ; /* kludge -- GJA */ - } else /* kludge -- GJA */ - --center_width ; - BranchPoint: - switch ( dx ) { - LoopTop: - case 0x0: SINGLE_STEP ; - case 0x1: SINGLE_STEP ; - case 0x2: SINGLE_STEP ; - case 0x3: SINGLE_STEP ; - case 0x4: SINGLE_STEP ; - case 0x5: SINGLE_STEP ; - case 0x6: SINGLE_STEP ; - case 0x7: *data++ = tmp & VGA_ALLPLANES ; - - /* Fall Through To End Of Inner Loop */ - if ( center_width > 0 ) { - tmp = read8Z( REGBASE, src ) ; src++; - center_width-- ; - goto LoopTop ; - } - else if ( ( center_width == 0 ) - && ( dx = ( - ignore ) & 07 ) ) { - tmp = read8Z( REGBASE, src ) ; src++; - center_width-- ; - goto BranchPoint ; /* Do Mod 8 edge */ - } - else /* End of this line */ - data += pad ; - } - } - -return ; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/vgaReg.h b/xorg-server/hw/xfree86/xf4bpp/vgaReg.h deleted file mode 100644 index 32ec0daed..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/vgaReg.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -#define SET_BYTE_REGISTER( ioport, value ) outb( ioport, value ) -#define SET_INDEX_REGISTER( ioport, value ) SET_BYTE_REGISTER( ioport, value ) -#define SET_DATA_REGISTER( ioport, value ) SET_BYTE_REGISTER( ioport, value ) -/* GJA -- deleted RTIO and ATRIO case here, so that a PCIO #define became - * superfluous. - */ -#define SET_INDEXED_REGISTER(RegGroup, Index, Value) \ - (SET_BYTE_REGISTER(RegGroup, Index), \ - SET_BYTE_REGISTER((RegGroup) + 1, Value)) - -/* There is a jumper on the ega to change this to 0x200 instead !! */ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#if 0 /* This is now a stack variable, as needed */ -#define REGBASE 0x300 -#endif - -#define AttributeIndexRegister REGBASE + 0xC0 -#define AttributeDataWriteRegister REGBASE + 0xC0 -#define AttributeDataReadRegister REGBASE + 0xC1 -#define AttributeRegister AttributeIndexRegister -#define AttributeModeIndex 0x30 -#define OverScanColorIndex 0x31 -#define ColorPlaneEnableIndex 0x32 -#define HorizPelPanIndex 0x33 -#define ColorSelectIndex 0x34 -#ifndef PC98_EGC -#define SetVideoAttributeIndex( index ) \ - SET_INDEX_REGISTER( AttributeIndexRegister, index ) -#define SetVideoAttribute( index, value ) \ - SetVideoAttributeIndex( index ) ; \ - SET_BYTE_REGISTER( AttributeDataWriteRegister, value ) -#endif - - /* Graphics Registers 03CE & 03CF */ -#define GraphicsIndexRegister REGBASE + 0xCE -#define GraphicsDataRegister REGBASE + 0xCF -#define GraphicsRegister GraphicsIndexRegister -#define Set_ResetIndex 0x00 -#define Enb_Set_ResetIndex 0x01 -#define Color_CompareIndex 0x02 -#define Data_RotateIndex 0x03 -#define Read_Map_SelectIndex 0x04 -#define Graphics_ModeIndex 0x05 -#define MiscellaneousIndex 0x06 -#define Color_Dont_CareIndex 0x07 -#define Bit_MaskIndex 0x08 -#ifndef PC98_EGC -#define SetVideoGraphicsIndex( index ) \ - SET_INDEX_REGISTER( GraphicsIndexRegister, index ) -#define SetVideoGraphicsData( value ) \ - SET_INDEX_REGISTER( GraphicsDataRegister, value ) -#define SetVideoGraphics( index, value ) \ - SET_INDEXED_REGISTER( GraphicsRegister, index, value ) -#endif - -/* Sequencer Registers 03C4 & 03C5 */ -#define SequencerIndexRegister REGBASE + 0xC4 -#define SequencerDataRegister REGBASE + 0xC5 -#define SequencerRegister SequencerIndexRegister -#define Seq_ResetIndex 00 -#define Clock_ModeIndex 01 -#define Mask_MapIndex 02 -#define Char_Map_SelectIndex 03 -#define Memory_ModeIndex 04 -#ifndef PC98_EGC -#define SetVideoSequencerIndex( index ) \ - SET_INDEX_REGISTER( SequencerIndexRegister, index ) -#define SetVideoSequencer( index, value ) \ - SET_INDEXED_REGISTER( SequencerRegister, index, value ) -#endif - -/* BIT CONSTANTS FOR THE VGA/EGA HARDWARE */ -/* for the Graphics' Data_Rotate Register */ -#define VGA_ROTATE_FUNC_SHIFT 3 -#define VGA_COPY_MODE ( 0 << VGA_ROTATE_FUNC_SHIFT ) /* 0x00 */ -#define VGA_AND_MODE ( 1 << VGA_ROTATE_FUNC_SHIFT ) /* 0x08 */ -#define VGA_OR_MODE ( 2 << VGA_ROTATE_FUNC_SHIFT ) /* 0x10 */ -#define VGA_XOR_MODE ( 3 << VGA_ROTATE_FUNC_SHIFT ) /* 0x18 */ -/* for the Graphics' Graphics_Mode Register */ -#define VGA_READ_MODE_SHIFT 3 -#define VGA_WRITE_MODE_0 0 -#define VGA_WRITE_MODE_1 1 -#define VGA_WRITE_MODE_2 2 -#define VGA_WRITE_MODE_3 3 -#define VGA_READ_MODE_0 ( 0 << VGA_READ_MODE_SHIFT ) -#define VGA_READ_MODE_1 ( 1 << VGA_READ_MODE_SHIFT ) - -#ifdef PC98_EGC -/* I/O port address define for extended EGC */ -#define EGC_PLANE 0x4a0 /* EGC active plane select */ -#define EGC_READ 0x4a2 /* EGC FGC,EGC,Read Plane */ -#define EGC_MODE 0x4a4 /* EGC Mode register & ROP */ -#define EGC_FGC 0x4a6 /* EGC Forground color */ -#define EGC_MASK 0x4a8 /* EGC Mask register */ -#define EGC_BGC 0x4aa /* EGC Background color */ -#define EGC_ADD 0x4ac /* EGC Dest/Source address */ -#define EGC_LENGTH 0x4ae /* EGC Bit length */ - -#define PALETTE_ADD 0xa8 /* Palette address */ -#define PALETTE_GRE 0xaa /* Palette Green */ -#define PALETTE_RED 0xac /* Palette Red */ -#define PALETTE_BLU 0xae /* Palette Blue */ - -#define EGC_AND_MODE 0x2c8c /* (S&P&D)|(~S&D) */ -#define EGC_AND_INV_MODE 0x2c2c /* (S&P&~D)|(~S&D) */ -#define EGC_OR_MODE 0x2cec /* S&(P|D)|(~S&D) */ -#define EGC_OR_INV_MODE 0x2cbc /* S&(P|~D)|(~S&D) */ -#define EGC_XOR_MODE 0x2c6c /* (S&(P&~D|~P&D))|(~S&D) */ -#define EGC_XOR_INV_MODE 0x2c9c /* (S&(P&D)|(~P&~D))|(~S&D) */ -#define EGC_COPY_MODE 0x2cac /* (S&P)|(~S&D) */ -#endif diff --git a/xorg-server/hw/xfree86/xf4bpp/vgaSolid.c b/xorg-server/hw/xfree86/xf4bpp/vgaSolid.c deleted file mode 100644 index 0ef18cfeb..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/vgaSolid.c +++ /dev/null @@ -1,574 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "OScompiler.h" -#include "vgaReg.h" -#include "vgaVideo.h" - -#include "xf86str.h" /* for pScrn->vtSema */ -extern ScrnInfoPtr *xf86Screens; - -#undef TRUE -#undef FALSE -#define TRUE 1 -#define FALSE 0 - -#ifndef PC98_EGC -#ifdef USE_ASM -extern void fastFill(); -extern void fastFillRMW(); -#else - -static void fastFill -( - register volatile unsigned char *destination, - register const unsigned int bytes_per_line, - register const unsigned int bytewidth, /* MUST BE > 0 !! */ - register unsigned int height /* MUST BE > 0 !! */ -) -{ -int stop_count = bytewidth ; -register int row_jump = bytes_per_line - bytewidth ; -#if !defined(OLDHC) && defined(BSDrt) && !defined(__i386__) -register const unsigned int notZero = ((unsigned char)(~0x0)); -#else -#define notZero ((unsigned char)(~0)) -#endif - -#define SINGLE_STORE \ - ( *( (VgaMemoryPtr) destination ) = notZero ); \ - destination++; stop_count--; - -/* TOP OF FIRST LOOP */ -BranchPoint: - -switch ( bytewidth & 0xF ) { /* Jump into loop at mod 16 remainder */ - LoopTop : - case 0x0 : SINGLE_STORE ; - case 0xF : SINGLE_STORE ; - case 0xE : SINGLE_STORE ; - case 0xD : SINGLE_STORE ; - case 0xC : SINGLE_STORE ; - case 0xB : SINGLE_STORE ; - case 0xA : SINGLE_STORE ; - case 0x9 : SINGLE_STORE ; - case 0x8 : SINGLE_STORE ; - case 0x7 : SINGLE_STORE ; - case 0x6 : SINGLE_STORE ; - case 0x5 : SINGLE_STORE ; - case 0x4 : SINGLE_STORE ; - case 0x3 : SINGLE_STORE ; - case 0x2 : SINGLE_STORE ; - case 0x1 : SINGLE_STORE ; -/* FIRST LOOP */ - if ( stop_count ) - goto LoopTop ; -/* SECOND LOOP */ - if ( --height ) { - destination += row_jump ; - stop_count = bytewidth ; - goto BranchPoint ; - } - else - return ; -#undef SINGLE_STORE -} -/*NOTREACHED*/ -} - -/* For Read-Modify-Write Case */ -static void fastFillRMW -( - register volatile unsigned char *destination, - register const unsigned int bytes_per_line, - register const unsigned int bytewidth, /* MUST BE > 0 !! */ - register unsigned int height /* MUST BE > 0 !! */ -) -{ -int stop_count = bytewidth ; -register int row_jump = bytes_per_line - bytewidth ; -#if !defined(OLDHC) && defined(BSDrt) && !defined(__i386__) -register const unsigned int notZero = ((unsigned char)(~0x0)); -#endif -register int tmp ; - -#define SINGLE_STORE \ - tmp = *( (VgaMemoryPtr) destination ) ; (void)tmp; \ - ( *( (VgaMemoryPtr) destination ) = notZero ) ; \ - destination++; stop_count-- ; - -/* TOP OF FIRST LOOP */ -BranchPoint: - -switch ( bytewidth & 0xF ) { /* Jump into loop at mod 16 remainder */ - LoopTop : - case 0x0 : SINGLE_STORE ; - case 0xF : SINGLE_STORE ; - case 0xE : SINGLE_STORE ; - case 0xD : SINGLE_STORE ; - case 0xC : SINGLE_STORE ; - case 0xB : SINGLE_STORE ; - case 0xA : SINGLE_STORE ; - case 0x9 : SINGLE_STORE ; - case 0x8 : SINGLE_STORE ; - case 0x7 : SINGLE_STORE ; - case 0x6 : SINGLE_STORE ; - case 0x5 : SINGLE_STORE ; - case 0x4 : SINGLE_STORE ; - case 0x3 : SINGLE_STORE ; - case 0x2 : SINGLE_STORE ; - case 0x1 : SINGLE_STORE ; -/* FIRST LOOP */ - if ( stop_count ) - goto LoopTop ; -/* SECOND LOOP */ - if ( --height ) { - destination += row_jump ; - stop_count = bytewidth ; - goto BranchPoint ; - } - else - return ; -} -#undef SINGLE_STORE -/*NOTREACHED*/ -} -#endif - - -void xf4bppFillSolid( pWin, color, alu, planes, x0, y0, lx, ly ) -WindowPtr pWin; /* GJA */ -unsigned long int color ; -const int alu ; -unsigned long int planes ; -register int x0 ; -register const int y0 ; -register int lx ; -register const int ly ; /* MUST BE > 0 !! */ -{ -IOADDRESS REGBASE; -register volatile unsigned char *dst ; -register int tmp ; -register int tmp2 ; -register int tmp3 ; -unsigned int data_rotate_value = VGA_COPY_MODE ; -unsigned int read_write_modify = FALSE ; -unsigned int invert_existing_data = FALSE ; - -{ /* Start GJA */ - if ( !xf86Screens[((DrawablePtr)pWin)->pScreen->myNum]->vtSema ) { - xf4bppOffFillSolid( pWin, color, alu, planes, x0, y0, lx, ly ); - return; - } -} /* End GJA */ - -if ( ( lx == 0 ) || ( ly == 0 ) ) - return; - -switch ( alu ) { - case GXclear: /* 0x0 Zero 0 */ - color = 0 ; - break ; - case GXnor: /* 0x8 NOT src AND NOT dst */ - invert_existing_data = TRUE ; - case GXandInverted: /* 0x4 NOT src AND dst */ - color = ~color ; - case GXand: /* 0x1 src AND dst */ - data_rotate_value = VGA_AND_MODE ; - read_write_modify = TRUE ; - case GXcopy: /* 0x3 src */ - break ; - case GXnoop: /* 0x5 dst */ - return ; - case GXequiv: /* 0x9 NOT src XOR dst */ - color = ~color ; - case GXxor: /* 0x6 src XOR dst */ - data_rotate_value = VGA_XOR_MODE ; - read_write_modify = TRUE ; - planes &= color ; - break ; - case GXandReverse: /* 0x2 src AND NOT dst */ - invert_existing_data = TRUE ; - data_rotate_value = VGA_AND_MODE ; - read_write_modify = TRUE ; - break ; - case GXorReverse: /* 0xb src OR NOT dst */ - invert_existing_data = TRUE ; - data_rotate_value = VGA_OR_MODE ; - read_write_modify = TRUE ; - break ; - case GXnand: /* 0xe NOT src OR NOT dst */ - invert_existing_data = TRUE ; - case GXorInverted: /* 0xd NOT src OR dst */ - color = ~color ; - case GXor: /* 0x7 src OR dst */ - data_rotate_value = VGA_OR_MODE ; - read_write_modify = TRUE ; - break ; - case GXcopyInverted: /* 0xc NOT src */ - color = ~color ; - break ; - case GXinvert: /* 0xa NOT dst */ - data_rotate_value = VGA_XOR_MODE ; - read_write_modify = TRUE ; - case GXset: /* 0xf 1 */ - color = VGA_ALLPLANES ; - default: - break ; -} - -if ( !( planes &= VGA_ALLPLANES ) ) - return ; - -REGBASE = - xf86Screens[((DrawablePtr)pWin)->pScreen->myNum]->domainIOBase + 0x300; - -/* - * Set The Plane-Enable - */ -SetVideoSequencer( Mask_MapIndex, planes ) ; -SetVideoGraphics( Enb_Set_ResetIndex, planes ) ; -/* - * Put Display Into SET/RESET Write Mode - */ -SetVideoGraphics( Graphics_ModeIndex, VGA_WRITE_MODE_3 ) ; -/* - * Set The Color in The Set/Reset Register - */ -SetVideoGraphics( Set_ResetIndex, color & VGA_ALLPLANES ) ; -/* - * Set The Function-Select In The Data Rotate Register - */ -SetVideoGraphics( Data_RotateIndex, data_rotate_value ) ; - -/* Do Left Edge */ -if ((tmp = x0 & 07)) { - tmp2 = SCRRIGHT8( ( (unsigned) 0xFF ), tmp ) ; - /* Catch The Cases Where The Entire Region Is Within One Byte */ - if ( ( lx -= 8 - tmp ) < 0 ) { - tmp2 &= SCRLEFT8( 0xFF, -lx ) ; - lx = 0 ; - } - /* Set The Bit Mask Reg */ - SetVideoGraphics(Bit_MaskIndex, tmp2 ) ; - if ( invert_existing_data == TRUE ) { - SetVideoGraphics( Set_ResetIndex, VGA_ALLPLANES ) ; - SetVideoGraphics( Data_RotateIndex, VGA_XOR_MODE ) ; - dst = SCREENADDRESS( pWin, x0, y0 ); - for ( tmp = ly; - tmp-- ; ) { - tmp3 = *( (VgaMemoryPtr) dst ) ; - (void)tmp3; - *( (VgaMemoryPtr) dst ) = tmp2 ; - dst += BYTES_PER_LINE(pWin); - } - SetVideoGraphics( Set_ResetIndex, color & VGA_ALLPLANES ) ; - SetVideoGraphics( Data_RotateIndex, data_rotate_value ) ; - /* Un-Set XOR */ - } - dst = SCREENADDRESS( pWin, x0, y0 ); - for ( tmp = ly; - tmp-- ; ) { - tmp3 = *( (VgaMemoryPtr) dst ) ; - (void)tmp3; - *( (VgaMemoryPtr) dst ) = tmp2 ; - dst += BYTES_PER_LINE(pWin); - } - if ( !lx ) { /* All Handled In This Byte */ - return ; - } - x0 = ( x0 + 8 ) & ~07 ; -} - -/* Fill The Center Of The Box */ -if ( ROW_OFFSET( lx ) ) { - SetVideoGraphics(Bit_MaskIndex, 0xFF ) ; - if ( invert_existing_data == TRUE ) { - SetVideoGraphics( Set_ResetIndex, VGA_ALLPLANES ) ; - SetVideoGraphics( Data_RotateIndex, VGA_XOR_MODE ) ; - fastFillRMW( SCREENADDRESS( pWin, x0, y0 ), - BYTES_PER_LINE(pWin), - ROW_OFFSET( lx ), ly ) ; - SetVideoGraphics( Set_ResetIndex, color & VGA_ALLPLANES ) ; - SetVideoGraphics( Data_RotateIndex, data_rotate_value ) ; - /* Un-Set XOR */ - /* Point At The Bit Mask Reg */ - } - (* ( ( read_write_modify == FALSE ) ? fastFill : fastFillRMW ) ) - ( SCREENADDRESS( pWin, x0, y0 ), BYTES_PER_LINE(pWin), - ROW_OFFSET( lx ), ly ) ; -} - -/* Do Right Edge */ -if ((tmp = BIT_OFFSET(lx))) { /* x0 Now Is Byte Aligned */ - /* Set The Bit Mask */ - SetVideoGraphics( Bit_MaskIndex, - (tmp2 = SCRLEFT8( 0xFF, ( 8 - tmp ) ) ) ) ; - if ( invert_existing_data == TRUE ) { - SetVideoGraphics( Set_ResetIndex, VGA_ALLPLANES ) ; - SetVideoGraphics( Data_RotateIndex, VGA_XOR_MODE ) ; - dst = SCREENADDRESS( pWin, ( x0 + lx ), y0 ); - for ( tmp = ly; - tmp-- ; ) { - tmp3 = *( (VgaMemoryPtr) dst ) ; - (void)tmp3; - *( (VgaMemoryPtr) dst ) = tmp2 ; - dst += BYTES_PER_LINE(pWin); - } - SetVideoGraphics( Set_ResetIndex, color & VGA_ALLPLANES ) ; - SetVideoGraphics( Data_RotateIndex, data_rotate_value ) ; - /* Un-Set XOR */ - } - dst = SCREENADDRESS( pWin, ( x0 + lx ), y0 ); - for ( tmp = ly; - tmp-- ; ) { - tmp3 = *( (VgaMemoryPtr) dst ) ; - (void)tmp3; - *( (VgaMemoryPtr) dst ) = tmp2 ; - dst += BYTES_PER_LINE(pWin) ; - } -} -/* Disable Set/Reset Register */ -SetVideoGraphics( Enb_Set_ResetIndex, 0 ) ; - - -return ; -} - -#else /* for PC98 EGC */ -static void WordfastFill( destination, bytes_per_line, wordwidth, height ) -register volatile unsigned char *destination ; -register const unsigned int bytes_per_line ; -register const unsigned int wordwidth ; /* MUST BE > 0 !! */ -register unsigned int height ; /* MUST BE > 0 !! */ -{ -int stop_count = wordwidth ; -register int row_jump = bytes_per_line - wordwidth*2 ; -#if !defined(OLDHC) && defined(BSDrt) && !defined(__i386__) && 0 -register const int notZero = ~0x0 ; -#else -#define notZero ( ~0 ) -#endif - -#define SINGLE_STORE \ - ( *( (unsigned short *) destination++ ) = notZero ); \ - destination++; stop_count--; - -/* TOP OF FIRST LOOP */ -BranchPoint: - -switch ( wordwidth & 0xF ) { /* Jump into loop at mod 16 remainder */ - LoopTop : - case 0x0 : SINGLE_STORE ; - case 0xF : SINGLE_STORE ; - case 0xE : SINGLE_STORE ; - case 0xD : SINGLE_STORE ; - case 0xC : SINGLE_STORE ; - case 0xB : SINGLE_STORE ; - case 0xA : SINGLE_STORE ; - case 0x9 : SINGLE_STORE ; - case 0x8 : SINGLE_STORE ; - case 0x7 : SINGLE_STORE ; - case 0x6 : SINGLE_STORE ; - case 0x5 : SINGLE_STORE ; - case 0x4 : SINGLE_STORE ; - case 0x3 : SINGLE_STORE ; - case 0x2 : SINGLE_STORE ; - case 0x1 : SINGLE_STORE ; -/* FIRST LOOP */ - if ( stop_count ) - goto LoopTop ; -/* SECOND LOOP */ - if ( --height ) { - destination += row_jump ; - stop_count = wordwidth ; - goto BranchPoint ; - } - else - return ; -#undef SINGLE_STORE -} -/*NOTREACHED*/ -} - -void xf4bppFillSolid( pWin, color, alu, planes, x0, y0, lx, ly ) -WindowPtr pWin; /* GJA */ -unsigned long int color ; -const int alu ; -unsigned long int planes ; -register int x0 ; -register const int y0 ; -register int lx ; -register const int ly ; /* MUST BE > 0 !! */ -{ -register volatile unsigned char *dst ; -register tmp ; -register tmp2 ; -register unsigned short tmp3 ; -unsigned short ROP_value; -unsigned int data_rotate_value = VGA_COPY_MODE ; -unsigned int read_write_modify = FALSE ; -unsigned int invert_existing_data = FALSE ; - -{ /* Start GJA */ - if ( !xf86Screens[((DrawablePtr)pWin)->pScreen->myNum]->vtSema ) { - xf4bppOffFillSolid( pWin, color, alu, planes, x0, y0, lx, ly ); - return; - } -} /* End GJA */ - -if ( ( lx == 0 ) || ( ly == 0 ) ) - return; - -switch ( alu ) { - case GXclear: /* 0x0 Zero 0 */ - color = 0 ; - break ; - case GXnor: /* 0x8 NOT src AND NOT dst */ - invert_existing_data = TRUE ; - case GXandInverted: /* 0x4 NOT src AND dst */ - color = ~color ; - case GXand: /* 0x1 src AND dst */ - data_rotate_value = VGA_AND_MODE ; - read_write_modify = TRUE ; - case GXcopy: /* 0x3 src */ - break ; - case GXnoop: /* 0x5 dst */ - return ; - case GXequiv: /* 0x9 NOT src XOR dst */ - color = ~color ; - case GXxor: /* 0x6 src XOR dst */ - data_rotate_value = VGA_XOR_MODE ; - read_write_modify = TRUE ; - planes &= color ; - break ; - case GXandReverse: /* 0x2 src AND NOT dst */ - invert_existing_data = TRUE ; - data_rotate_value = VGA_AND_MODE ; - read_write_modify = TRUE ; - break ; - case GXorReverse: /* 0xb src OR NOT dst */ - invert_existing_data = TRUE ; - data_rotate_value = VGA_OR_MODE ; - read_write_modify = TRUE ; - break ; - case GXnand: /* 0xe NOT src OR NOT dst */ - invert_existing_data = TRUE ; - case GXorInverted: /* 0xd NOT src OR dst */ - color = ~color ; - case GXor: /* 0x7 src OR dst */ - data_rotate_value = VGA_OR_MODE ; - read_write_modify = TRUE ; - break ; - case GXcopyInverted: /* 0xc NOT src */ - color = ~color ; - break ; - case GXinvert: /* 0xa NOT dst */ - data_rotate_value = VGA_XOR_MODE ; - read_write_modify = TRUE ; - case GXset: /* 0xf 1 */ - color = VGA_ALLPLANES ; - default: - break ; -} - -if ( !( planes &= VGA_ALLPLANES ) ) - return ; - -/* Set Access Planes */ -outw(EGC_PLANE, ~planes); -switch(data_rotate_value) { -/* EGC MODE.. Cmp Read: Flase, WriteSource=ROP, ReadSource=CPU */ - case VGA_AND_MODE: - if (invert_existing_data) - ROP_value = EGC_AND_INV_MODE; - else - ROP_value = EGC_AND_MODE; - break; - case VGA_OR_MODE: - if (invert_existing_data) - ROP_value = EGC_OR_INV_MODE; - else - ROP_value = EGC_OR_MODE; - break; - case VGA_XOR_MODE: - if (invert_existing_data) - ROP_value = EGC_XOR_INV_MODE; - else - ROP_value = EGC_XOR_MODE; - break; - case VGA_COPY_MODE: - default: - ROP_value = EGC_COPY_MODE; - break; -} -outw(EGC_MODE, ROP_value); -outw(EGC_FGC, color & VGA_ALLPLANES); -/* Do Left Edge */ -if ( tmp = x0 & 0x0f ) { - dst = (unsigned char *)((int)(SCREENADDRESS(pWin,x0,y0)) & ~0x01); - tmp3 = (unsigned)0xffff >>tmp; - /* Catch The Cases Where The Entire Region Is Within One Word */ - if ( ( lx -= 16 - tmp ) < 0 ) { - tmp3 &= (unsigned)0xffff << -lx; - lx = 0 ; - } - tmp3 = (unsigned short)(tmp3 >> 8 | tmp3 << 8); - for ( tmp = ly; - tmp-- ; ) { - *((unsigned short *) dst ) = tmp3 ; - dst += BYTES_PER_LINE(pWin); - } - if ( !lx ) { /* All Handled In This Word */ - return ; - } - x0 = ( x0 + 0x0f ) & ~0x0f ; -} - -/* Fill The Center Of The Box */ -if (lx >> 4) { - WordfastFill( SCREENADDRESS( pWin, x0, y0 ), BYTES_PER_LINE(pWin), - (lx >> 4), ly ) ; -} - -/* Do Right Edge */ -if ( tmp = lx & 0x0f ) { /* x0 Now Is Word Aligned */ - /* Set The Bit Mask */ - tmp3 = (unsigned)0xffff << ( 16 - tmp ); - dst = (unsigned char*)((int)SCREENADDRESS(pWin,(x0+lx),y0) & ~0x01); - tmp3 = (unsigned short)(tmp3 >> 8 | tmp3 << 8); - for ( tmp = ly; - tmp-- ; ) { - *( (unsigned short *) dst ) = tmp3 ; - dst += BYTES_PER_LINE(pWin); - } -} - -return ; -} -#endif diff --git a/xorg-server/hw/xfree86/xf4bpp/vgaStipple.c b/xorg-server/hw/xfree86/xf4bpp/vgaStipple.c deleted file mode 100644 index 5ad53028c..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/vgaStipple.c +++ /dev/null @@ -1,720 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "OScompiler.h" -#include "vgaReg.h" -#include "vgaVideo.h" - -#include "xf86str.h" /* for pScrn->vtSema */ -extern ScrnInfoPtr *xf86Screens; - -#ifndef PC98_EGC -static unsigned char -getbits -( - register const int x, - register const unsigned int patternWidth, - register const unsigned char * const lineptr -) -{ -register unsigned char bits ; -register const unsigned char *cptr ; -register int shift ; -register int wrap ; - -cptr = lineptr + ( x >> 3 ) ; -bits = *cptr ; -if ((shift = x & 7)) - bits = SCRLEFT8( bits, shift ) | SCRRIGHT8( cptr[1], ( 8 - shift ) ) ; -if ( ( wrap = x + 8 - patternWidth ) > 0 ) { - bits &= SCRLEFT8( 0xFF, wrap ) ; - bits |= SCRRIGHT8( *lineptr, ( 8 - wrap ) ) ; -} - -/* GJA -- Handle extraction of 8 bits from < 8 bits wide stipple. - * I duplicated case 4,5,6,7 to give the compiler a chance to optimize. - */ -switch (patternWidth) { -case 1: /* Not really useful. */ - bits &= ~SCRRIGHT8(0xFF,1); - bits |= SCRRIGHT8(bits,1); - bits |= SCRRIGHT8(bits,2); - bits |= SCRRIGHT8(bits,4); - break; -case 2: - bits &= ~SCRRIGHT8(0xFF,2); - bits |= SCRRIGHT8(bits,2); bits |= SCRRIGHT8(bits,4); break; -case 3: - bits &= ~SCRRIGHT8(0xFF,3); - bits |= (SCRRIGHT8(bits,3) | SCRRIGHT8(bits,6)); break; -case 4: - bits = (bits & ~SCRRIGHT8(0xFF,4)) | SCRRIGHT8(bits,4); break; -case 5: - bits = (bits & ~SCRRIGHT8(0xFF,5)) | SCRRIGHT8(bits,5); break; -case 6: - bits = (bits & ~SCRRIGHT8(0xFF,6)) | SCRRIGHT8(bits,6); break; -case 7: - bits = (bits & ~SCRRIGHT8(0xFF,7)) | SCRRIGHT8(bits,7); break; -default: - ; - /* Do nothing, of course */ -} -return bits ; -} -#endif - -/* GJA -- - * Basically, in the code below, we will draw a stipple in the usual - * three parts: left edge, center and right edge. - * For efficiency reasons, the center will be drawn byte aligned, so that - * we will have to shuffle the bits in the left and right edges. - * The hard cases will be stipples with width < 8: In order to get 8 - * bits from those, we will need a loop. One single 'if' will never do. - * This is taken care of above. - */ -static void -DoMonoSingle -( - WindowPtr pWin, /* GJA */ - int w, - int x, - int y, - register const unsigned char *mastersrc, - int h, - register unsigned int width, - register unsigned int paddedByteWidth, - unsigned int height, - int xshift, - int yshift -) -{ -IOADDRESS REGBASE = - xf86Screens[((DrawablePtr)pWin)->pScreen->myNum]->domainIOBase + 0x300; -register volatile unsigned char *xDst ; -register VideoAdapterObject tmp2 ; -register int NeedValX ; -register int counter ; -register int tmp1 ; -unsigned int rowCounter ; -int byte_cnt ; -#ifdef PC98_EGC -unsigned char bitmask; -#endif - -/* Do Left Edge */ -if ((tmp1 = x & 07)) { - tmp2 = SCRRIGHT8( ( (unsigned) 0xFF ), tmp1 ) ; - /* Catch The Cases Where The Entire Region Is Within One Byte */ - if ( ( w -= 8 - tmp1 ) < 0 ) { - tmp2 &= SCRLEFT8( (unsigned) 0xFF, -w ) ; - w = 0 ; - } -#ifndef PC98_EGC - SetVideoGraphics( Bit_MaskIndex, tmp2 ) ; /* Set The Bit Mask */ -#else - bitmask = tmp2; /* Set The Bit Mask */ -#endif - /* - * For Each Line In The Source Pixmap - */ - xDst = SCREENADDRESS( pWin, x, y ); - for ( tmp1 = yshift, rowCounter = h; - rowCounter ; - rowCounter-- , tmp1++ ) { - - if ( tmp1 >= (int)height ) - tmp1 -= height ; -#ifndef PC98_EGC - /* Read To Save */ - tmp2 = *( (VgaMemoryPtr) xDst) ; -#endif - /* Write Pattern */ - *( (VgaMemoryPtr) xDst ) = -#ifndef PC98_EGC - getbits( xshift /* GJA */, width, - mastersrc - + ( tmp1 * paddedByteWidth ) ) >> (x & 07) ; -#else -#if 0 - (getbits( xshift /* GJA */, width, - mastersrc - + ( tmp1 * paddedByteWidth ) ) >> (x & 07) - & bitmask); -#else - (getbits_x( xshift /* GJA */, width, - mastersrc - + ( tmp1 * paddedByteWidth ), (x & 07)) - & bitmask); -#endif -#endif - xDst += BYTES_PER_LINE(pWin); - } - NeedValX = (xshift + 8 - (x & 07)) % width; - x = ( x + 7 ) & ~07 ; -} -else { - NeedValX = xshift ; -} - -if ((byte_cnt = ROW_OFFSET(w))) { /* Fill The Center Of The Box */ - int SavNeedX = NeedValX ; - -#ifndef PC98_EGC - SetVideoGraphics( Bit_MaskIndex, 0xFF ) ; /* Set The Bit Mask */ -#endif - /* - * For Each Line In The Source Pixmap - */ - xDst = SCREENADDRESS( pWin, x, y ); - for ( tmp1 = yshift, rowCounter = h; - rowCounter ; - rowCounter-- , tmp1++ ) { - register const unsigned char *l_ptr ; - if ( tmp1 >= (int)height ) - tmp1 -= height ; - l_ptr = mastersrc + ( tmp1 * paddedByteWidth ) ; - /* - * For Each Byte Across The Pattern In X - */ - for ( counter = byte_cnt, NeedValX = SavNeedX ; - counter-- ; ) { -#ifndef PC98_EGC - /* Read To Save */ - tmp2 = *( (VgaMemoryPtr) xDst) ; -#endif - /* Write Pattern */ - *( (VgaMemoryPtr) xDst ) = -#ifndef PC98_EGC - getbits( NeedValX, width, l_ptr ) ; -#else -#if 0 - getbits( NeedValX, width, l_ptr ) ; -#else - getbits_x ( NeedValX, width, l_ptr, 0 ) ; -#endif -#endif - /* GJA -- The '%' is there since width could be < 8 */ - NeedValX = (NeedValX + 8) % width; - xDst++; - } - xDst += BYTES_PER_LINE(pWin) - byte_cnt; - } -} - -/* Do Right Edge */ -if ((tmp1 = BIT_OFFSET(w))) { /* x Now Is Byte Aligned */ - /* Set The Bit Mask */ -#ifndef PC98_EGC - SetVideoGraphics( Bit_MaskIndex, SCRLEFT8( 0xFF, ( 8 - tmp1 ) ) ) ; -#else - bitmask = SCRLEFT8( 0xFF, ( 8 - tmp1 )); -#endif - /* - * For Each Line In The Source Pixmap - */ - xDst = SCREENADDRESS( pWin, ( x + w ), y ); - for ( tmp1 = yshift, rowCounter = h; - rowCounter ; - rowCounter-- , tmp1++ ) { - if ( tmp1 >= (int)height ) - tmp1 -= height ; -#ifndef PC98_EGC - /* Read To Save */ - tmp2 = *( (VgaMemoryPtr) xDst) ; -#endif - /* Write Pattern */ - *( (VgaMemoryPtr) xDst ) = -#ifndef PC98_EGC - getbits( NeedValX, width, - mastersrc - + ( tmp1 * paddedByteWidth ) ) ; -#else -#if 0 - (getbits( NeedValX, width, - mastersrc - + ( tmp1 * paddedByteWidth ) ) & bitmask); -#else - (getbits_x( NeedValX, width, - mastersrc - + ( tmp1 * paddedByteWidth ), 0 ) & bitmask); -#endif -#endif - xDst += BYTES_PER_LINE(pWin) ; - } -} - -return ; -} - -static void -DoMonoMany -( - WindowPtr pWin, /* GJA */ - int w, - int x, - int y, - register const unsigned char *mastersrc, - int h, - register unsigned int width, - register unsigned int paddedByteWidth, - unsigned int height, - int xshift, - int yshift -) -{ -IOADDRESS REGBASE = - xf86Screens[((DrawablePtr)pWin)->pScreen->myNum]->domainIOBase + 0x300; -register volatile unsigned char *xDst ; -register VideoAdapterObject tmp2 ; -register int NeedValX ; -register int byte_cnt ; -register int tmp1 ; -unsigned DestinationRow ; -unsigned int SourceRow ; -volatile unsigned char *dst ; -int scr_incr = ( height * BYTES_PER_LINE(pWin) ) ; -#ifdef PC98_EGC -unsigned char bitmask; -#endif - -/* Do Left Edge */ -if ((tmp1 = x & 07)) { - tmp2 = SCRRIGHT8( ( (unsigned) 0xFF ), tmp1 ) ; - /* Catch The Cases Where The Entire Region Is Within One Byte */ - if ( ( w -= 8 - tmp1 ) < 0 ) { - tmp2 &= SCRLEFT8( (unsigned) 0xFF, -w ) ; - w = 0 ; - } -#ifndef PC98_EGC - SetVideoGraphics( Bit_MaskIndex, tmp2 ) ; /* Set The Bit Mask */ -#else - bitmask = tmp2; /* Set The Bit Mask */ -#endif - /* - * For Each Line In The Source Pixmap - */ - for ( tmp1 = yshift, SourceRow = 0, dst = SCREENADDRESS( pWin, x, y ) ; - SourceRow < height ; - tmp1++, SourceRow++, dst += BYTES_PER_LINE(pWin) ) { - register unsigned bitPattern ; - - if ( tmp1 >= (int)height ) - tmp1 -= height ; - /* - * For Each Time Pattern Repeats In The Y Dimension - */ - xDst = dst; - for ( DestinationRow = SourceRow, -#ifndef PC98_EGC - bitPattern = getbits( xshift, width, - mastersrc - + ( tmp1 * paddedByteWidth ) ) ; -#else -#if 0 - bitPattern = getbits( xshift, width, - mastersrc - + ( tmp1 * paddedByteWidth ) ) ; -#else - bitPattern = getbits_x( xshift, width, - mastersrc - + ( tmp1 * paddedByteWidth ), 0 ) ; -#endif -#endif - (int)DestinationRow < h ; - DestinationRow += height ) { -#ifndef PC98_EGC - /* Read To Save */ - tmp2 = *( (VgaMemoryPtr) xDst ) ; -#endif - /* Write Pattern */ -#ifndef PC98_EGC - *( (VgaMemoryPtr) xDst ) = bitPattern >> (x & 07); -#else - *( (VgaMemoryPtr) xDst ) = (bitPattern >> (x & 07)) & bitmask; -#endif - xDst += scr_incr; - } - } - NeedValX = (xshift + 8 - (x & 07)) % width; - x = ( x + 7 ) & ~07 ; -} -else { - NeedValX = xshift ; -} - -if ((byte_cnt = ROW_OFFSET(w))) { /* Fill The Center Of The Box */ - int SavNeedX = NeedValX ; - -#ifndef PC98_EGC - SetVideoGraphics( Bit_MaskIndex, 0xFF ) ; /* Set The Bit Mask */ -#endif - /* - * For Each Line In The Source Pixmap - */ - for ( tmp1 = yshift, SourceRow = 0, dst = SCREENADDRESS( pWin, x, y ) ; - SourceRow < height ; - tmp1++, SourceRow++, dst += BYTES_PER_LINE(pWin) - byte_cnt ) { - register const unsigned char *l_ptr ; - if ( tmp1 >= (int)height ) - tmp1 -= height ; - l_ptr = mastersrc + ( tmp1 * paddedByteWidth ) ; - /* - * For Each Byte Across The Pattern In X - */ - for ( tmp2 = byte_cnt, NeedValX = SavNeedX ; - tmp2-- ; - dst++ ) { - register unsigned bitPattern ; -#ifndef PC98_EGC - register VideoAdapterObject tmp3 ; -#endif - /* - * For Each Time Pattern Repeats In Y - */ - xDst = dst; - for ( DestinationRow = SourceRow, -#ifndef PC98_EGC - bitPattern = getbits( NeedValX, width, l_ptr ) ; -#else -#if 0 - bitPattern = getbits( NeedValX, width, l_ptr ) ; -#else - bitPattern = getbits_x( NeedValX, width, l_ptr, 0 ) ; -#endif -#endif - (int)DestinationRow < h ; - DestinationRow += height ) { -#ifndef PC98_EGC - /* Read To Save */ - tmp3 = *( (VgaMemoryPtr) xDst) ; - (void)tmp3; -#endif - /* Write Pattern */ - *( (VgaMemoryPtr) xDst ) = bitPattern ; - xDst += scr_incr; - } - NeedValX = (NeedValX + 8) % width; - } - } -} - -/* Do Right Edge */ -if ((tmp1 = BIT_OFFSET(w))) { /* x Now Is Byte Aligned */ - /* Set The Bit Mask */ -#ifndef PC98_EGC - SetVideoGraphics( Bit_MaskIndex, SCRLEFT8( 0xFF, ( 8 - tmp1 ) ) ) ; -#else - bitmask = SCRLEFT8( 0xFF, ( 8 - tmp1 ) ); -#endif - /* - * For Each Line In The Source Pixmap - */ - for ( tmp1 = yshift, SourceRow = 0, - dst = SCREENADDRESS( pWin, ( x + w ), y ) ; - SourceRow < height ; - tmp1++, SourceRow++, dst += BYTES_PER_LINE(pWin) ) { - register unsigned bitPattern ; - if ( tmp1 >= (int)height ) - tmp1 -= height ; - /* - * For Each Time Pattern Repeats In The Y Dimension - */ - xDst = dst; - for ( DestinationRow = SourceRow, -#ifndef PC98_EGC - bitPattern = getbits( NeedValX, width, - mastersrc - + ( tmp1 * paddedByteWidth ) ) ; -#else -#if 0 - bitPattern = getbits( NeedValX, width, - mastersrc - + ( tmp1 * paddedByteWidth ) ) ; -#else - bitPattern = getbits_x( NeedValX, width, - mastersrc - + ( tmp1 * paddedByteWidth ), 0 ) ; -#endif -#endif - (int)DestinationRow < h ; - DestinationRow += height ) { -#ifndef PC98_EGC - /* Read To Save */ - tmp2 = *( (VgaMemoryPtr) xDst) ; -#endif - /* Write Pattern */ -#ifndef PC98_EGC - *( (VgaMemoryPtr) xDst ) = bitPattern ; -#else - *( (VgaMemoryPtr) xDst ) = bitPattern & bitmask; -#endif - xDst += scr_incr; - } - } -} - -return ; -} - -#define DO_RECURSE 0x10000 - -static void -vgaSetMonoRegisters -( - DrawablePtr pDrawable, - register unsigned long int plane_mask, - register unsigned long int desiredState -) -{ -IOADDRESS REGBASE = - xf86Screens[pDrawable->pScreen->myNum]->domainIOBase + 0x300; -#ifndef PC98_EGC -/* Setup VGA Registers */ -/* - * Set The Plane-Enable - */ -SetVideoSequencer( Mask_MapIndex, plane_mask ) ; -SetVideoGraphics( Enb_Set_ResetIndex, plane_mask ) ; -/* - * Put Display Into SET-AND (i.e. Write Mode 3 ) - */ -SetVideoGraphics( Graphics_ModeIndex, VGA_WRITE_MODE_3 ) ; -/* - * Set The Color in The Set/Reset Register - */ -SetVideoGraphics( Set_ResetIndex, desiredState & VGA_ALLPLANES ) ; -/* - * Set The Vga's Alu Function - */ -SetVideoGraphics( Data_RotateIndex, desiredState >> 8 ) ; -#else /* PC98_EGC */ -unsigned short ROP_value; -/* Setup VGA Registers */ -/* - * Set The Plane-Enable - */ -outw(EGC_PLANE, ~plane_mask); -switch((desiredState >> 8)&0x18) { -/* EGC MODE.. Cmp Read: Flase, WriteSource=ROP, ReadSource=CPU */ - case VGA_AND_MODE: - if (desiredState & DO_RECURSE) - ROP_value = EGC_AND_INV_MODE; - else - ROP_value = EGC_AND_MODE; - break; - case VGA_OR_MODE: - if (desiredState & DO_RECURSE) - ROP_value = EGC_OR_INV_MODE; - else - ROP_value = EGC_OR_MODE; - break; - case VGA_XOR_MODE: - if (desiredState & DO_RECURSE) - ROP_value = EGC_XOR_INV_MODE; - else - ROP_value = EGC_XOR_MODE; - break; - case VGA_COPY_MODE: - default: - ROP_value = EGC_COPY_MODE; - break; -} -outw(EGC_MODE, ROP_value); -outw(EGC_FGC, desiredState & VGA_ALLPLANES); -#endif - -return ; -} - -static unsigned long -vgaCalcMonoMode -( - int rasterOp, - register unsigned long int color -) -{ -register unsigned int data_rotate_value = VGA_COPY_MODE << 8 ; -register unsigned int invert_existing_data = 0 ; - -/* Test The Raster-Op */ -switch ( rasterOp ) { - case GXclear: /* 0x0 Zero 0 */ - color = 0 ; - break ; - case GXinvert: /* 0xa NOT dst */ - data_rotate_value = VGA_XOR_MODE << 8 ; - case GXset: /* 0xf 1 */ - color = VGA_ALLPLANES ; - break ; - case GXnor: /* 0x8 NOT src AND NOT dst */ - invert_existing_data = DO_RECURSE ; - case GXandInverted: /* 0x4 NOT src AND dst */ - color = ~color ; - case GXand: /* 0x1 src AND dst */ - data_rotate_value = VGA_AND_MODE << 8 ; - case GXcopy: /* 0x3 src */ - break ; - case GXequiv: /* 0x9 NOT src XOR dst */ - color = ~color ; - case GXxor: /* 0x6 src XOR dst */ - data_rotate_value = VGA_XOR_MODE << 8 ; - break ; - case GXandReverse: /* 0x2 src AND NOT dst */ - invert_existing_data = DO_RECURSE ; - data_rotate_value = VGA_AND_MODE << 8 ; - break ; - case GXorReverse: /* 0xb src OR NOT dst */ - invert_existing_data = DO_RECURSE ; - data_rotate_value = VGA_OR_MODE << 8 ; - break ; - case GXnand: /* 0xe NOT src OR NOT dst */ - invert_existing_data = DO_RECURSE ; - case GXorInverted: /* 0xd NOT src OR dst */ - color = ~color ; - case GXor: /* 0x7 src OR dst */ - data_rotate_value = VGA_OR_MODE << 8 ; - break ; - case GXcopyInverted: /* 0xc NOT src */ - color = ~color ; - break ; - case GXnoop: /* 0x5 dst */ - ; /* Shouldn't Get Here !! */ -} - -return ( color & VGA_ALLPLANES ) | data_rotate_value | invert_existing_data ; -} - -static void -vgaDrawMonoImage -( - WindowPtr pWin, /* GJA */ - unsigned char *data, - int x, - int y, - int w, - int h, - unsigned long int fg, - int alu, - unsigned long int planes -) -{ -unsigned long regState ; - -if ( !xf86Screens[((DrawablePtr)pWin)->pScreen->myNum]->vtSema ) { - xf4bppOffDrawMonoImage( pWin, data, x, y, w, h, fg, alu, planes ); - return; -} - -if ( ( alu == GXnoop ) || !( planes &= VGA_ALLPLANES ) ) - return ; - -#ifndef PC98_EGC -if ( ( regState = vgaCalcMonoMode( alu, fg ) ) & DO_RECURSE ) { - vgaDrawMonoImage( pWin, data, x, y, w, h, - VGA_ALLPLANES, GXinvert, planes ) ; - regState &= ~DO_RECURSE ; -} -#else -regState = vgaCalcMonoMode(alu, (char)fg); -#endif - - -vgaSetMonoRegisters( (DrawablePtr)pWin, planes, regState ) ; - -DoMonoSingle( pWin, w, x, y, (const unsigned char *) data, h, - w, ( ( w + 31 ) & ~31 ) >> 3, h, 0, 0 ) ; - - -return ; -} - -void -xf4bppFillStipple( pWin, pStipple, fg, alu, planes, x, y, w, h, xSrc, ySrc ) -WindowPtr pWin; /* GJA */ -register PixmapPtr const pStipple ; -unsigned long int fg ; -const int alu ; -unsigned long int planes ; -int x, y, w, h ; -const int xSrc, ySrc ; -{ -unsigned int width ; -unsigned int height ; -int xshift ; -int yshift ; -unsigned long regState ; - -if ( !xf86Screens[((DrawablePtr)pWin)->pScreen->myNum]->vtSema ) { - xf4bppOffFillStipple( pWin, pStipple, fg, alu, planes, - x, y, w, h, xSrc, ySrc ); - return; -} - -if ( ( alu == GXnoop ) || !( planes &= VGA_ALLPLANES ) ) - return ; - -#if 1 -if ( ( regState = vgaCalcMonoMode( alu, fg ) ) & DO_RECURSE ) { - xf4bppFillStipple( pWin, pStipple, VGA_ALLPLANES, GXinvert, planes, - x, y, w, h, xSrc, ySrc ) ; - regState &= ~DO_RECURSE ; -} -#else -regState = vgaCalcMonoMode(alu, (char)fg); -#endif - - -vgaSetMonoRegisters( (DrawablePtr)pWin, planes, regState ) ; - -/* Figure Bit Offsets & Source Address */ -width = pStipple->drawable.width ; -if ( ( xshift = ( x - xSrc ) ) < 0 ) - xshift = width - ( ( - xshift ) % width ) ; -else - xshift %= width ; -if ( xshift == (int)width ) xshift = 0; - -height = pStipple->drawable.height ; -if ( ( yshift = ( y - ySrc ) ) < 0 ) - yshift = height - ( ( - yshift ) % height ) ; -else - yshift %= height ; -if ( yshift == (int)height ) yshift = 0; - - (* ( (h > (int)height) ? DoMonoMany : DoMonoSingle ) ) ( - pWin, w, x, y, - (const unsigned char *) pStipple->devPrivate.ptr, - h, - width, - ( ( width + 31 ) & ((unsigned)(~31)) ) >> 3, - height, - xshift, yshift - ) ; - -return ; -} diff --git a/xorg-server/hw/xfree86/xf4bpp/vgaVideo.h b/xorg-server/hw/xfree86/xf4bpp/vgaVideo.h deleted file mode 100644 index 60afa5bb6..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/vgaVideo.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright IBM Corporation 1987,1988,1989 - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of IBM not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "misc.h" /* GJA -- for pointer data type */ -#ifdef lint -#if defined(volatile) -#undef volatile -#endif -#define volatile /**/ -#if defined(const) -#undef const -#endif -#define const /**/ -#if defined(signed) -#undef signed -#endif -#define signed /**/ -#endif - -/* - * References to all pc ( i.e. '286 ) memory in the - * regions used by the [ev]ga server ( the 128K windows ) - * MUST be long-word ( i.e. 32-bit ) reads or writes. - * This definition will change for other memory architectures - * ( e.g. AIX-Rt ) - */ -typedef unsigned char VideoAdapterObject ; -typedef volatile VideoAdapterObject *VideoMemoryPtr ; -typedef volatile VideoAdapterObject *VgaMemoryPtr ; -#if !defined(BITMAP_BIT_ORDER) -#define BITMAP_BIT_ORDER MSBFirst -#endif - -#if !defined(IMAGE_BYTE_ORDER) -#define IMAGE_BYTE_ORDER LSBFirst -#endif - -/* Bit Ordering Macros */ -#if !defined(SCRLEFT8) -#define SCRLEFT8(lw, n) ( (unsigned char) (((unsigned char) lw) << (n)) ) -#endif -#if !defined(SCRRIGHT8) -#define SCRRIGHT8(lw, n) ( (unsigned char) (((unsigned char)lw) >> (n)) ) -#endif -/* These work ONLY on 8-bit wide Quantities !! */ -#define LeftmostBit ( SCRLEFT8( 0xFF, 7 ) & 0xFF ) -#define RightmostBit ( SCRRIGHT8( 0xFF, 7 ) & 0xFF ) - -/* - * [ev]ga video screen defines & macros - */ -#define VGA_BLACK_PIXEL 0 -#define VGA_WHITE_PIXEL 1 - -#define VGA_MAXPLANES 4 -#define VGA_ALLPLANES 0xFL - -#define VIDBASE(pDraw) ((volatile unsigned char *) \ - (((PixmapPtr)(((DrawablePtr)(pDraw))->pScreen->devPrivate))-> \ - devPrivate.ptr)) -#define BYTES_PER_LINE(pDraw) \ - ((int)((PixmapPtr)(((DrawablePtr)(pDraw))->pScreen->devPrivate))->devKind) - -#define ROW_OFFSET( x ) ( ( x ) >> 3 ) -#define BIT_OFFSET( x ) ( ( x ) & 0x7 ) -#define SCREENADDRESS( pWin, x, y ) \ - ( VIDBASE(pWin) + (y) * BYTES_PER_LINE(pWin) + ROW_OFFSET(x) ) - - diff --git a/xorg-server/hw/xfree86/xf4bpp/vgamodule.c b/xorg-server/hw/xfree86/xf4bpp/vgamodule.c deleted file mode 100644 index e7324914b..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/vgamodule.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 1998 The XFree86 Project, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name of the XFree86 Project shall - * not be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from the - * XFree86 Project. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf86Module.h" - -static MODULESETUPPROTO(xf4bppSetup); - -static XF86ModuleVersionInfo VersRec = -{ - "xf4bpp", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 1, 0, 0, - ABI_CLASS_ANSIC, /* Only need ansic layer */ - ABI_ANSIC_VERSION, - MOD_CLASS_NONE, - {0,0,0,0} /* signature, to be patched into the file by a tool */ -}; - -_X_EXPORT XF86ModuleData xf4bppModuleData = { &VersRec, xf4bppSetup, NULL }; - -static pointer -xf4bppSetup(pointer module, pointer opts, int *errmaj, int *errmin) -{ - /* This module requires xf1bpp for bitmap support */ - return LoadSubModule(module, "xf1bpp", NULL, NULL, NULL, NULL, - errmaj, errmin); -} diff --git a/xorg-server/hw/xfree86/xf4bpp/wm3.c b/xorg-server/hw/xfree86/xf4bpp/wm3.c deleted file mode 100644 index 3a57221f2..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/wm3.c +++ /dev/null @@ -1,203 +0,0 @@ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf4bpp.h" -#include "OScompiler.h" -#include "wm3.h" -#include "vgaVideo.h" -#include "xf86.h" - -/* Ferraro is wrong. GJA */ -#define COPY (0 << 3) -#define AND (1 << 3) -#define OR (2 << 3) -#define XOR (3 << 3) - -int -wm3_set_regs(pGC) -GC *pGC; -{ -#ifndef PC98_EGC - IOADDRESS REGBASE = xf86Screens[pGC->pScreen->myNum]->domainIOBase + 0x300; - int post_invert = 0; - int ALU; - - switch(pGC->alu) { - case GXclear: /* rop0 = RROP_BLACK; rop1 = RROP_BLACK; */ - pGC->fgPixel = 0; - pGC->bgPixel = 0; - ALU = COPY; - break; - case GXand: /* rop0 = RROP_BLACK; rop1 = RROP_NOP; */ - ALU = AND; - break; - case GXandReverse: /* rop0 = RROP_BLACK; rop1 = RROP_INVERT; -- TRICKY */ - pGC->fgPixel = ~pGC->fgPixel; - pGC->bgPixel = ~pGC->bgPixel; - ALU = OR; - post_invert = 1; - break; - case GXcopy: /* rop0 = RROP_BLACK; rop1 = RROP_WHITE; */ - ALU = COPY; - break; - case GXandInverted: /* rop0 = RROP_NOP; rop1 = RROP_BLACK; */ - pGC->fgPixel = ~pGC->fgPixel; - pGC->bgPixel = ~pGC->bgPixel; - ALU = AND; - break; - default: - case GXnoop: /* rop0 = RROP_NOP; rop1 = RROP_NOP; */ - return 0; - case GXxor: /* rop0 = RROP_NOP; rop1 = RROP_INVERT; */ - ALU = XOR; - break; - case GXor: /* rop0 = RROP_NOP; rop1 = RROP_WHITE; */ - ALU = OR; - break; - case GXnor: /* rop0 = RROP_INVERT; rop1 = RROP_BLACK; -- TRICKY*/ - ALU = OR; - post_invert = 1; - break; - case GXequiv: /* rop0 = RROP_INVERT; rop1 = RROP_NOP; */ - pGC->fgPixel = ~pGC->fgPixel; - pGC->bgPixel = ~pGC->bgPixel; - ALU = XOR; - break; - case GXinvert: /* rop0 = RROP_INVERT; rop1 = RROP_INVERT; */ - pGC->fgPixel = 0x0F; - pGC->bgPixel = 0x0F; - ALU = XOR; - break; - case GXorReverse: /* rop0 = RROP_INVERT; rop1 = RROP_WHITE; -- TRICKY */ - pGC->fgPixel = ~pGC->fgPixel; - pGC->bgPixel = ~pGC->bgPixel; - ALU = AND; - post_invert = 1; - break; - case GXcopyInverted: /* rop0 = RROP_WHITE; rop1 = RROP_BLACK; */ - pGC->fgPixel = ~pGC->fgPixel; - pGC->bgPixel = ~pGC->bgPixel; - ALU = COPY; - break; - case GXorInverted: /* rop0 = RROP_WHITE; rop1 = RROP_NOP; */ - pGC->fgPixel = ~pGC->fgPixel; - pGC->bgPixel = ~pGC->bgPixel; - ALU = OR; - break; - case GXnand: /* rop0 = RROP_WHITE; rop1 = RROP_INVERT; -- TRICKY */ - ALU = AND; - post_invert = 1; - break; - case GXset: /* rop0 = RROP_WHITE; rop1 = RROP_WHITE; */ - pGC->fgPixel = 0x0F; - pGC->bgPixel = 0x0F; - ALU = COPY; - break; - } - - - SetVideoSequencer(Mask_MapIndex, (pGC->planemask & VGA_ALLPLANES)); - SetVideoGraphics(Enb_Set_ResetIndex, VGA_ALLPLANES); - SetVideoGraphics(Set_ResetIndex, pGC->fgPixel); - SetVideoGraphics(Bit_MaskIndex, 0xFF); - SetVideoGraphics(Graphics_ModeIndex, 3); /* Write Mode 3 */ - SetVideoGraphics(Data_RotateIndex, ALU); - - return post_invert; -#else - int ALU; - - switch(pGC->alu) { - case GXclear: /* rop0 = RROP_BLACK; rop1 = RROP_BLACK; */ - pGC->fgPixel = 0; - pGC->bgPixel = 0; - ALU = EGC_COPY_MODE; - break; - case GXand: /* rop0 = RROP_BLACK; rop1 = RROP_NOP; */ - ALU = EGC_AND_MODE; - break; - case GXandReverse: /* rop0 = RROP_BLACK; rop1 = RROP_INVERT; -- TRICKY */ - pGC->fgPixel = ~pGC->fgPixel; - pGC->bgPixel = ~pGC->bgPixel; - ALU = EGC_OR_INV_MODE; - break; - case GXcopy: /* rop0 = RROP_BLACK; rop1 = RROP_WHITE; */ - ALU = EGC_COPY_MODE; - break; - case GXandInverted: /* rop0 = RROP_NOP; rop1 = RROP_BLACK; */ - pGC->fgPixel = ~pGC->fgPixel; - pGC->bgPixel = ~pGC->bgPixel; - ALU = EGC_AND_MODE; - break; - case GXnoop: /* rop0 = RROP_NOP; rop1 = RROP_NOP; */ - return 0; - case GXxor: /* rop0 = RROP_NOP; rop1 = RROP_INVERT; */ - ALU = EGC_XOR_MODE; - break; - case GXor: /* rop0 = RROP_NOP; rop1 = RROP_WHITE; */ - ALU = EGC_OR_MODE; - break; - case GXnor: /* rop0 = RROP_INVERT; rop1 = RROP_BLACK; -- TRICKY*/ - ALU = EGC_OR_INV_MODE; - break; - case GXequiv: /* rop0 = RROP_INVERT; rop1 = RROP_NOP; */ - pGC->fgPixel = ~pGC->fgPixel; - pGC->bgPixel = ~pGC->bgPixel; - ALU = EGC_XOR_MODE; - break; - case GXinvert: /* rop0 = RROP_INVERT; rop1 = RROP_INVERT; */ - pGC->fgPixel = 0x0F; - pGC->bgPixel = 0x0F; - ALU = EGC_XOR_MODE; - break; - case GXorReverse: /* rop0 = RROP_INVERT; rop1 = RROP_WHITE; -- TRICKY */ - pGC->fgPixel = ~pGC->fgPixel; - pGC->bgPixel = ~pGC->bgPixel; - ALU = EGC_AND_INV_MODE; - break; - case GXcopyInverted: /* rop0 = RROP_WHITE; rop1 = RROP_BLACK; */ - pGC->fgPixel = ~pGC->fgPixel; - pGC->bgPixel = ~pGC->bgPixel; - ALU = EGC_COPY_MODE; - break; - case GXorInverted: /* rop0 = RROP_WHITE; rop1 = RROP_NOP; */ - pGC->fgPixel = ~pGC->fgPixel; - pGC->bgPixel = ~pGC->bgPixel; - ALU = EGC_OR_MODE; - break; - case GXnand: /* rop0 = RROP_WHITE; rop1 = RROP_INVERT; -- TRICKY */ - ALU = EGC_OR_INV_MODE; - break; - case GXset: /* rop0 = RROP_WHITE; rop1 = RROP_WHITE; */ - pGC->fgPixel = 0x0F; - pGC->bgPixel = 0x0F; - ALU = EGC_COPY_MODE; - break; - } - - outw(EGC_PLANE, ~(pGC->planemask & VGA_ALLPLANES)); - outw(EGC_MODE, ALU); - outw(EGC_FGC, pGC->fgPixel & VGA_ALLPLANES); /* set FGC */ - - return 0; -#endif -} - -/* - Now we will have to set the alu. - Problematic is: How do we handle IsDoubleDash, which draws with both fg - and bg colour? - The answer is: We take care to store the ink colour in one register only. - Then we need set only this register to change the ink. - */ - -/* -- MORE NOTES: - We might try to 'wrap' the mfb functions in a 16-colour wrapper that does - all operations once. However, this does not work: - Some operations (esp) CopyArea may for example cause expositions. - Such expositions will cause data to be copied in from backing store, - and this copying in may damage the contents of the VGA registers. - So we must take care to set the VGA registers at each place where they could - be modified. - */ diff --git a/xorg-server/hw/xfree86/xf4bpp/wm3.h b/xorg-server/hw/xfree86/xf4bpp/wm3.h deleted file mode 100644 index 113723283..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/wm3.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "vgaReg.h" - -#ifdef PC98_EGC -#define VGA_ALLPLANES 0xFL -#endif - -/* Do call in Write Mode 3. - * We take care of the possibility that two passes are needed. - */ -#ifndef PC98_EGC -#define DO_WM3(pgc,call) \ - { int _tp, _fg, _bg, _alu; \ - _fg = pgc->fgPixel; _bg = pgc->bgPixel; \ - _tp = wm3_set_regs(pgc); \ - (call); \ - if ( _tp ) { \ - _alu = pgc->alu; \ - pgc->alu = GXinvert; \ - _tp = wm3_set_regs(pgc); \ - (call); \ - pgc->alu = _alu; \ - } \ - pgc->fgPixel = _fg; pgc->bgPixel = _bg; \ - } -#else -#define DO_WM3(pgc,call) \ - { int _tp, _fg, _bg; \ - _fg = pgc->fgPixel; _bg = pgc->bgPixel; \ - _tp = wm3_set_regs(pgc); \ - (call); \ - pgc->fgPixel = _fg; pgc->bgPixel = _bg; \ - } -#endif - -#ifndef PC98_EGC -#define WM3_SET_INK(ink) \ - SetVideoGraphics(Set_ResetIndex, ink) -#else -#define WM3_SET_INK(ink) \ - outw(EGC_FGC, ink) -#endif - -/* GJA -- Move a long word to screen memory. - * The reads into 'dummy' are here to load the VGA latches. - * This is a RMW operation except for trivial cases. - * Notice that we ignore the operation. - */ -#ifdef PC98_EGC -#define UPDRW(destp,src) \ - { volatile unsigned short *_dtmp = \ - (volatile unsigned short *)(destp); \ - unsigned int _stmp = (src); \ - *_dtmp = _stmp; _dtmp++; _stmp >>= 16; \ - *_dtmp = _stmp; } -#else -#define UPDRW(destp,src) \ - { volatile char *_dtmp = (volatile char *)(destp); \ - unsigned int _stmp = (src); \ - volatile int dummy; /* Bit bucket. */ \ - _stmp = ldl_u(&_stmp); \ - dummy = *_dtmp; *_dtmp = _stmp; _dtmp++; _stmp >>= 8; \ - dummy = *_dtmp; *_dtmp = _stmp; _dtmp++; _stmp >>= 8; \ - dummy = *_dtmp; *_dtmp = _stmp; _dtmp++; _stmp >>= 8; \ - dummy = *_dtmp; *_dtmp = _stmp; } -#endif - -#define UPDRWB(destp,src) \ - { volatile int dummy; /* Bit bucket. */ \ - dummy = *(destp); *(destp) = (src); } diff --git a/xorg-server/hw/xfree86/xf4bpp/xf4bpp.h b/xorg-server/hw/xfree86/xf4bpp/xf4bpp.h deleted file mode 100644 index cf0822444..000000000 --- a/xorg-server/hw/xfree86/xf4bpp/xf4bpp.h +++ /dev/null @@ -1,622 +0,0 @@ - -#ifndef __XF4BPP_H__ -#define __XF4BPP_H__ - - -#include "windowstr.h" -#include "gcstruct.h" -#include "colormapst.h" -#include -#ifndef PixelType -#define PixelType CARD32 -#endif - -/* ppcArea.c */ -void xf4bppFillArea( - WindowPtr, - int, - BoxPtr, - GCPtr -); - -/* ppcClip.c */ -void xf4bppDestroyClip( - GCPtr -); -void xf4bppChangeClip( - GCPtr, - int, - pointer, - int -); -void xf4bppCopyClip( - GCPtr, - GCPtr -); - -/* ppcCpArea.c */ -RegionPtr xf4bppCopyArea( - DrawablePtr, - DrawablePtr, - GCPtr, - int, - int, - int, - int, - int, - int -); - -/* ppcDepth.c */ -Bool xf4bppDepthOK( - DrawablePtr, - int -); - -/* ppcFillRct.c */ -void xf4bppPolyFillRect( - DrawablePtr, - GCPtr, - int, - xRectangle * -); - -/* ppcWindowFS.c */ -void xf4bppSolidWindowFS( - DrawablePtr, - GCPtr, - int, - DDXPointPtr, - int *, - int -); -void xf4bppStippleWindowFS( - DrawablePtr, - GCPtr, - int, - DDXPointPtr, - int *, - int -); -void xf4bppOpStippleWindowFS( - DrawablePtr, - GCPtr, - int, - DDXPointPtr, - int *, - int -); -void xf4bppTileWindowFS( - DrawablePtr, - GCPtr, - int, - DDXPointPtr, - int *, - int -); - -/* xf4bppPixmapFS.c */ -void xf4bppSolidPixmapFS( - DrawablePtr, - GCPtr, - int, - DDXPointPtr, - int *, - int -); -void xf4bppStipplePixmapFS( - DrawablePtr, - GCPtr, - int, - DDXPointPtr, - int *, - int -); -void xf4bppOpStipplePixmapFS( - DrawablePtr, - GCPtr, - int, - DDXPointPtr, - int *, - int -); -void xf4bppTilePixmapFS( - DrawablePtr, - GCPtr, - int, - DDXPointPtr, - int *, - int -); - -/* ppcGC.c */ -Bool xf4bppCreateGC( - GCPtr -); - -/* ppcGetSp.c */ -void xf4bppGetSpans( - DrawablePtr, - int, - DDXPointPtr, - int *, - int, - char * -); - -/* ppcImg.c */ -void xf4bppGetImage( - DrawablePtr, - int, - int, - int, - int, - unsigned int, - unsigned long, - char * -); - -/* ppcLine.c */ -void xf4bppScrnZeroLine( - DrawablePtr, - GCPtr, - int, - int, - DDXPointPtr -); -void xf4bppScrnZeroDash( - DrawablePtr, - GCPtr, - int, - int, - DDXPointPtr -); -void xf4bppScrnZeroSegs( - DrawablePtr, - GCPtr, - int, - xSegment * -); - -/* ppcPixmap.c */ -PixmapPtr xf4bppCreatePixmap( - ScreenPtr, - int, - int, - int, - unsigned -); -PixmapPtr xf4bppCopyPixmap( - PixmapPtr -); - -/* ppcPolyPnt.c */ -void xf4bppPolyPoint( - DrawablePtr, - GCPtr, - int, - int, - xPoint * -); - -/* ppcPolyRec.c */ -void xf4bppPolyRectangle( - DrawablePtr, - GCPtr, - int, - xRectangle * -); - -/* ppcQuery.c */ -void xf4bppQueryBestSize( - int, - unsigned short *, - unsigned short *, - ScreenPtr -); - -/* ppcRslvC.c */ -void xf4bppResolveColor( - unsigned short *, - unsigned short *, - unsigned short *, - VisualPtr -); -Bool xf4bppInitializeColormap( - ColormapPtr -); - -/* ppcSetSp.c */ -void xf4bppSetSpans( - DrawablePtr, - GCPtr, - char *, - DDXPointPtr, - int *, - int, - int -); - -/* ppcWindow.c */ -void xf4bppCopyWindow( - WindowPtr, - DDXPointRec, - RegionPtr -); -Bool xf4bppPositionWindow( - WindowPtr, - int, - int -); -Bool xf4bppUnrealizeWindow( - WindowPtr, - int, - int -); -Bool xf4bppDestroyWindow( - WindowPtr -); -Bool xf4bppCreateWindowForXYhardware( - WindowPtr -); - -/* emulOpStip.c */ -void xf4bppOpaqueStipple( - WindowPtr, - PixmapPtr, - unsigned long int, - unsigned long int, - int, - unsigned long int, - int, - int, - int, - int, - int, - int -); - -/* emulRepAre.c */ -void xf4bppReplicateArea( - WindowPtr, - int, - int, - int, - int, - int, - int, - int -); - -/* emulTile.c */ -void xf4bppTileRect( - WindowPtr, - PixmapPtr, - const int, - const unsigned long int, - int, - int, - int, - int, - int, - int -); - -/* vgaGC.c */ -Mask xf4bppChangeWindowGC( - GCPtr, - Mask -); - -/* vgaBitBlt.c */ -void xf4bppBitBlt( - WindowPtr, - int, - int, - int, - int, - int, - int, - int, - int -); - -/* vgaImages.c */ -void xf4bppDrawColorImage( - WindowPtr, - int, - int, - int, - int, - unsigned char *, - int, - const int, - const unsigned long int -); -void xf4bppReadColorImage( - WindowPtr, - int, - int, - int, - int, - unsigned char *, - int -); - -/* vgaLine.c */ -void xf4bppHorzLine( - WindowPtr, - unsigned long int, - int, - unsigned long int, - int, - int, - int -); -void xf4bppVertLine( - WindowPtr, - unsigned long int, - int, - unsigned long int, - int, - int, - int -); -void xf4bppBresLine( - WindowPtr, - unsigned long int, - int, - unsigned long int, - int, - int, - int, - int, - int, - int, - int, - int, - unsigned long int -); - -/* vgaStipple.c */ -void xf4bppFillStipple( - WindowPtr, - const PixmapPtr, - unsigned long int, - const int, - unsigned long int, - int, - int, - int, - int, - const int, - const int -); - -/* vgaSolid.c */ -void xf4bppFillSolid( - WindowPtr, - unsigned long int, - const int, - unsigned long int, - int, - const int, - int, - const int -); - -/* offscreen.c */ -void xf4bppOffBitBlt( - WindowPtr, - const int, - const int, - int, - int, - int, - int, - int, - int -); -void xf4bppOffDrawColorImage( - WindowPtr, - int, - int, - int, - int, - unsigned char *, - int, - const int, - const unsigned long int -); -void xf4bppOffReadColorImage( - WindowPtr, - int, - int, - int, - int, - unsigned char *, - int -); -void xf4bppOffFillSolid( - WindowPtr, - unsigned long int, - const int, - unsigned long int, - int, - const int, - int, - const int -); -void xf4bppOffDrawMonoImage( - WindowPtr, - unsigned char *, - int, - int, - int, - int, - unsigned long int, - int, - unsigned long int -); -void xf4bppOffFillStipple( - WindowPtr, - const PixmapPtr, - unsigned long int, - const int, - unsigned long int, - int, - int, - int, - int, - const int, - const int -); - -/* mfbimggblt.c */ -void xf4bppImageGlyphBlt( - DrawablePtr, - GCPtr, - int, - int, - unsigned int, - CharInfoPtr *, - pointer -); - -/* wm3.c */ -int wm3_set_regs( - GC * -); - -/* ppcIO.c */ -void xf4bppNeverCalled( - void -); -Bool xf4bppScreenInit( - ScreenPtr, - pointer, - int, - int, - int, - int, - int -); - -/* mfbfillarc.c */ -void xf4bppPolyFillArc( - DrawablePtr, - GCPtr, - int, - xArc * -); - -/* mfbzerarc.c */ -void xf4bppZeroPolyArc( - DrawablePtr, - GCPtr, - int, - xArc * -); - -/* mfbline.c */ -void xf4bppSegmentSS ( - DrawablePtr, - GCPtr, - int, - xSegment * -); -void xf4bppLineSS ( - DrawablePtr, - GCPtr, - int, - int, - DDXPointPtr -); -void xf4bppSegmentSD ( - DrawablePtr, - GCPtr, - int, - xSegment * -); -void xf4bppLineSD ( - DrawablePtr, - GCPtr, - int, - int, - DDXPointPtr -); - -/* mfbbres.c */ -void xf4bppBresS( - PixelType *, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int -); - -/* mfbbresd.c */ -void xf4bppBresD( - DrawablePtr, - int, int, - int *, - unsigned char *, - int, - int *, - int, - PixelType *, - int, int, int, int, int, int, - int, int, - int, int -); - -/* mfbhrzvert.c */ -void xf4bppHorzS( - PixelType *, - int, - int, - int, - int -); -void xf4bppVertS( - PixelType *, - int, - int, - int, - int -); - -#ifdef PC98_EGC - -/* egc_asm.s */ -unsigned char getbits_x( - int, - unsigned int, - pointer, - unsigned int -); -void wcopyr( - pointer, - pointer, - int, - pointer -); -void wcopyl( - pointer, - pointer, - int, - pointer -); -unsigned long int read8Z( - pointer -); - -#endif /* PC98_EGC */ - -#endif /* __XF4BPP_H__ */ diff --git a/xorg-server/hw/xfree86/xf8_16bpp/Makefile.in b/xorg-server/hw/xfree86/xf8_16bpp/Makefile.in index d930ddce1..68a62716e 100644 --- a/xorg-server/hw/xfree86/xf8_16bpp/Makefile.in +++ b/xorg-server/hw/xfree86/xf8_16bpp/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.10.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -45,7 +45,6 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -71,9 +70,6 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -90,8 +86,9 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -112,10 +109,6 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -137,6 +130,7 @@ DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ +DOLT_BASH = @DOLT_BASH@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -146,18 +140,15 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -176,7 +167,7 @@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -190,7 +181,10 @@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINUXDOC = @LINUXDOC@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -202,8 +196,7 @@ MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ +NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ @@ -212,8 +205,8 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -246,7 +239,6 @@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -256,27 +248,12 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -287,10 +264,6 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ @@ -299,13 +272,8 @@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -338,8 +306,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -359,7 +326,6 @@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -369,12 +335,12 @@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ @@ -392,8 +358,6 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ module_LTLIBRARIES = libxf8_16bpp.la sdk_HEADERS = cfb8_16.h INCLUDES = $(XORG_INCS) -I$(top_srcdir)/fb @@ -408,8 +372,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ @@ -520,7 +484,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS diff --git a/xorg-server/hw/xfree86/xf8_32bpp/Makefile.am b/xorg-server/hw/xfree86/xf8_32bpp/Makefile.am deleted file mode 100644 index 6f51a628e..000000000 --- a/xorg-server/hw/xfree86/xf8_32bpp/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -module_LTLIBRARIES = libxf8_32bpp.la - -sdk_HEADERS = cfb8_32.h - -INCLUDES = $(XORG_INCS) -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb - -AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) - -libxf8_32bpp_la_LDFLAGS = -avoid-version - -libxf8_32bpp_la_SOURCES = \ - cfbcpyarea.c \ - cfbcpyplane.c \ - cfbgcmisc.c \ - cfbimage.c \ - cfbpntwin.c \ - cfbscrinit.c \ - cfbwindow.c \ - xf86overlay.c \ - cfb8_32module.c \ - cfbgc8.c \ - cfbgc32.c \ - cfbgcunder.c - -libxf8_32bpp_la_LIBADD = $(top_builddir)/cfb32/libcfb32.la - -EXTRA_DIST = cfbgc.c - -cfbgc8.c: $(srcdir)/cfbgc.c - echo '#define PSZ 8' > $@ - echo '#include "$(srcdir)/cfbgc.c"' >> $@ - -cfbgc32.c: $(srcdir)/cfbgc.c - echo '#define PSZ 32' > $@ - echo '#include "$(srcdir)/cfbgc.c"' >> $@ - -DISTCLEANFILES = cfbgc8.c cfbgc32.c diff --git a/xorg-server/hw/xfree86/xf8_32bpp/Makefile.in b/xorg-server/hw/xfree86/xf8_32bpp/Makefile.in deleted file mode 100644 index 5bea22162..000000000 --- a/xorg-server/hw/xfree86/xf8_32bpp/Makefile.in +++ /dev/null @@ -1,739 +0,0 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = hw/xfree86/xf8_32bpp -DIST_COMMON = $(sdk_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ - $(top_builddir)/include/xorg-server.h \ - $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ - $(top_builddir)/include/xorg-config.h \ - $(top_builddir)/include/xkb-config.h \ - $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h -CONFIG_CLEAN_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)" -moduleLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(module_LTLIBRARIES) -libxf8_32bpp_la_DEPENDENCIES = $(top_builddir)/cfb32/libcfb32.la -am_libxf8_32bpp_la_OBJECTS = cfbcpyarea.lo cfbcpyplane.lo cfbgcmisc.lo \ - cfbimage.lo cfbpntwin.lo cfbscrinit.lo cfbwindow.lo \ - xf86overlay.lo cfb8_32module.lo cfbgc8.lo cfbgc32.lo \ - cfbgcunder.lo -libxf8_32bpp_la_OBJECTS = $(am_libxf8_32bpp_la_OBJECTS) -libxf8_32bpp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libxf8_32bpp_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libxf8_32bpp_la_SOURCES) -DIST_SOURCES = $(libxf8_32bpp_la_SOURCES) -sdkHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(sdk_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ -ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ -APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ -APP_MAN_DIR = @APP_MAN_DIR@ -APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASE_FONT_PATH = @BASE_FONT_PATH@ -BUILD_DATE = @BUILD_DATE@ -BUILD_TIME = @BUILD_TIME@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DARWIN_LIBS = @DARWIN_LIBS@ -DBUS_CFLAGS = @DBUS_CFLAGS@ -DBUS_LIBS = @DBUS_LIBS@ -DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ -DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ -DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DGA_CFLAGS = @DGA_CFLAGS@ -DGA_LIBS = @DGA_LIBS@ -DIX_CFLAGS = @DIX_CFLAGS@ -DLLTOOL = @DLLTOOL@ -DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ -DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ -DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ -DMXMODULES_LIBS = @DMXMODULES_LIBS@ -DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ -DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ -DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ -DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ -DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ -DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ -DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ -DRIPROTO_LIBS = @DRIPROTO_LIBS@ -DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ -DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ -DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ -DSYMUTIL = @DSYMUTIL@ -DTRACE = @DTRACE@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -FILE_MAN_DIR = @FILE_MAN_DIR@ -FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ -GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ -GLX_DEFINES = @GLX_DEFINES@ -GL_CFLAGS = @GL_CFLAGS@ -GL_LIBS = @GL_LIBS@ -GREP = @GREP@ -HAL_CFLAGS = @HAL_CFLAGS@ -HAL_LIBS = @HAL_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ -KDRIVE_INCS = @KDRIVE_INCS@ -KDRIVE_LIBS = @KDRIVE_LIBS@ -KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ -KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ -KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ -LAUNCHD = @LAUNCHD@ -LDFLAGS = @LDFLAGS@ -LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ -LIBDRM_LIBS = @LIBDRM_LIBS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_MAN_DIR = @LIB_MAN_DIR@ -LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ -MISC_MAN_DIR = @MISC_MAN_DIR@ -MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ -MKDIR_P = @MKDIR_P@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ -NMEDIT = @NMEDIT@ -OBJC = @OBJC@ -OBJCCLD = @OBJCCLD@ -OBJCDEPMODE = @OBJCDEPMODE@ -OBJCFLAGS = @OBJCFLAGS@ -OBJCLINK = @OBJCLINK@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ -PCIACCESS_LIBS = @PCIACCESS_LIBS@ -PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ -PERL = @PERL@ -PKG_CONFIG = @PKG_CONFIG@ -PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ -RANLIB = @RANLIB@ -RAWCPP = @RAWCPP@ -RAWCPPFLAGS = @RAWCPPFLAGS@ -SED = @SED@ -SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ -SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ -STRIP = @STRIP@ -TSLIB_CFLAGS = @TSLIB_CFLAGS@ -TSLIB_LIBS = @TSLIB_LIBS@ -UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ -VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ -VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ -X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ -X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ -XDMCP_CFLAGS = @XDMCP_CFLAGS@ -XDMCP_LIBS = @XDMCP_LIBS@ -XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ -XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ -XDMX_CFLAGS = @XDMX_CFLAGS@ -XDMX_LIBS = @XDMX_LIBS@ -XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ -XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ -XEPHYR_INCS = @XEPHYR_INCS@ -XEPHYR_LIBS = @XEPHYR_LIBS@ -XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_LIBS = @XF86MISC_LIBS@ -XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ -XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ -XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ -XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ -XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ -XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ -XLIB_CFLAGS = @XLIB_CFLAGS@ -XLIB_LIBS = @XLIB_LIBS@ -XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ -XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ -XNEST_LIBS = @XNEST_LIBS@ -XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ -XORG_CFLAGS = @XORG_CFLAGS@ -XORG_INCS = @XORG_INCS@ -XORG_LIBS = @XORG_LIBS@ -XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ -XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ -XORG_OS = @XORG_OS@ -XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ -XORG_SYS_LIBS = @XORG_SYS_LIBS@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ -XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ -XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ -XSDL_INCS = @XSDL_INCS@ -XSDL_LIBS = @XSDL_LIBS@ -XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ -XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ -XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ -XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ -XSERVER_LIBS = @XSERVER_LIBS@ -XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ -XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ -XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ -XVFB_LIBS = @XVFB_LIBS@ -XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ -XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ -XWINMODULES_LIBS = @XWINMODULES_LIBS@ -XWIN_LIBS = @XWIN_LIBS@ -XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ -XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -__XCONFIGFILE__ = @__XCONFIGFILE__@ -abi_ansic = @abi_ansic@ -abi_extension = @abi_extension@ -abi_font = @abi_font@ -abi_videodrv = @abi_videodrv@ -abi_xinput = @abi_xinput@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -driverdir = @driverdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -extdir = @extdir@ -ft_config = @ft_config@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -logdir = @logdir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -moduledir = @moduledir@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sdkdir = @sdkdir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ -module_LTLIBRARIES = libxf8_32bpp.la -sdk_HEADERS = cfb8_32.h -INCLUDES = $(XORG_INCS) -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb -AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) -libxf8_32bpp_la_LDFLAGS = -avoid-version -libxf8_32bpp_la_SOURCES = \ - cfbcpyarea.c \ - cfbcpyplane.c \ - cfbgcmisc.c \ - cfbimage.c \ - cfbpntwin.c \ - cfbscrinit.c \ - cfbwindow.c \ - xf86overlay.c \ - cfb8_32module.c \ - cfbgc8.c \ - cfbgc32.c \ - cfbgcunder.c - -libxf8_32bpp_la_LIBADD = $(top_builddir)/cfb32/libcfb32.la -EXTRA_DIST = cfbgc.c -DISTCLEANFILES = cfbgc8.c cfbgc32.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/xf8_32bpp/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign hw/xfree86/xf8_32bpp/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-moduleLTLIBRARIES: $(module_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(moduledir)" || $(MKDIR_P) "$(DESTDIR)$(moduledir)" - @list='$(module_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(moduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(moduledir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(moduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(moduledir)/$$f"; \ - else :; fi; \ - done - -uninstall-moduleLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(module_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(moduledir)/$$p'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(moduledir)/$$p"; \ - done - -clean-moduleLTLIBRARIES: - -test -z "$(module_LTLIBRARIES)" || rm -f $(module_LTLIBRARIES) - @list='$(module_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libxf8_32bpp.la: $(libxf8_32bpp_la_OBJECTS) $(libxf8_32bpp_la_DEPENDENCIES) - $(libxf8_32bpp_la_LINK) -rpath $(moduledir) $(libxf8_32bpp_la_OBJECTS) $(libxf8_32bpp_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfb8_32module.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbcpyarea.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbcpyplane.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbgc32.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbgc8.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbgcmisc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbgcunder.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbimage.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbpntwin.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbscrinit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfbwindow.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86overlay.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-sdkHEADERS: $(sdk_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(sdkdir)" || $(MKDIR_P) "$(DESTDIR)$(sdkdir)" - @list='$(sdk_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(sdkHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(sdkdir)/$$f'"; \ - $(sdkHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(sdkdir)/$$f"; \ - done - -uninstall-sdkHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(sdk_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(sdkdir)/$$f'"; \ - rm -f "$(DESTDIR)$(sdkdir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-moduleLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-moduleLTLIBRARIES install-sdkHEADERS - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-moduleLTLIBRARIES uninstall-sdkHEADERS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-moduleLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-moduleLTLIBRARIES install-pdf install-pdf-am \ - install-ps install-ps-am install-sdkHEADERS install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-moduleLTLIBRARIES \ - uninstall-sdkHEADERS - - -cfbgc8.c: $(srcdir)/cfbgc.c - echo '#define PSZ 8' > $@ - echo '#include "$(srcdir)/cfbgc.c"' >> $@ - -cfbgc32.c: $(srcdir)/cfbgc.c - echo '#define PSZ 32' > $@ - echo '#include "$(srcdir)/cfbgc.c"' >> $@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfb8_32.h b/xorg-server/hw/xfree86/xf8_32bpp/cfb8_32.h deleted file mode 100644 index 6e985da20..000000000 --- a/xorg-server/hw/xfree86/xf8_32bpp/cfb8_32.h +++ /dev/null @@ -1,191 +0,0 @@ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#ifndef _CFB8_32_H -#define _CFB8_32_H - -#include "gcstruct.h" - -typedef struct { - GCOps *Ops8bpp; - GCOps *Ops32bpp; - unsigned long changes; - Bool OpsAre8bpp; -} cfb8_32GCRec, *cfb8_32GCPtr; - -typedef struct { - unsigned char key; - void (*EnableDisableFBAccess)(int scrnIndex, Bool enable); - pointer visualData; -} cfb8_32ScreenRec, *cfb8_32ScreenPtr; - - -extern DevPrivateKey cfb8_32GetGCPrivateKey(void); -extern DevPrivateKey cfb8_32GetScreenPrivateKey(void); - -RegionPtr -cfb8_32CopyArea( - DrawablePtr pSrcDraw, - DrawablePtr pDstDraw, - GC *pGC, - int srcx, int srcy, - int width, int height, - int dstx, int dsty -); - -void -cfbDoBitblt8To32( - DrawablePtr pSrc, - DrawablePtr pDst, - int rop, - RegionPtr prgnDst, - DDXPointPtr pptSrc, - unsigned long planemask -); - -void -cfbDoBitblt32To8( - DrawablePtr pSrc, - DrawablePtr pDst, - int rop, - RegionPtr prgnDst, - DDXPointPtr pptSrc, - unsigned long planemask -); - - -void -cfb8_32ValidateGC8( - GCPtr pGC, - unsigned long changes, - DrawablePtr pDrawable -); - -void -cfb8_32ValidateGC32( - GCPtr pGC, - unsigned long changes, - DrawablePtr pDrawable -); - -void -cfb32ValidateGC_Underlay( - GCPtr pGC, - unsigned long changes, - DrawablePtr pDrawable -); - -Bool cfb8_32CreateGC(GCPtr pGC); - -void -cfb8_32GetSpans( - DrawablePtr pDraw, - int wMax, - DDXPointPtr ppt, - int *pwidth, - int nspans, - char *pchardstStart -); - -void -cfb8_32PutImage ( - DrawablePtr pDraw, - GCPtr pGC, - int depth, - int x, int y, int w, int h, - int leftPad, - int format, - char *pImage -); - -void -cfb8_32GetImage ( - DrawablePtr pDraw, - int sx, int sy, int w, int h, - unsigned int format, - unsigned long planeMask, - char *pdstLine -); - -Bool -cfb8_32ScreenInit ( - ScreenPtr pScreen, - pointer pbits, - int xsize, int ysize, - int dpix, int dpiy, - int width -); - -void -cfb8_32FillBoxSolid8 ( - DrawablePtr pDraw, - int nbox, - BoxPtr pBox, - unsigned long color -); - -RegionPtr -cfb8_32CopyPlane( - DrawablePtr pSrc, - DrawablePtr pDst, - GCPtr pGC, - int srcx, int srcy, - int width, int height, - int dstx, int dsty, - unsigned long bitPlane -); - -void -cfbDoBitblt8To8GXcopy( - DrawablePtr pSrc, - DrawablePtr pDst, - int rop, - RegionPtr prgnDst, - DDXPointPtr pptSrc, - unsigned long pm -); - -void -cfbDoBitblt24To24GXcopy( - DrawablePtr pSrc, - DrawablePtr pDst, - int rop, - RegionPtr prgnDst, - DDXPointPtr pptSrc, - unsigned long pm -); - -Bool cfb8_32CreateWindow(WindowPtr pWin); -Bool cfb8_32DestroyWindow(WindowPtr pWin); - -Bool -cfb8_32PositionWindow( - WindowPtr pWin, - int x, int y -); - -void -cfb8_32CopyWindow( - WindowPtr pWin, - DDXPointRec ptOldOrg, - RegionPtr prgnSrc -); - -Bool -cfb8_32ChangeWindowAttributes( - WindowPtr pWin, - unsigned long mask -); - - -#define CFB8_32_GET_GC_PRIVATE(pGC) ((cfb8_32GCPtr) \ - dixLookupPrivate(&(pGC)->devPrivates, cfb8_32GetGCPrivateKey())) - -#define CFB8_32_GET_SCREEN_PRIVATE(pScreen) ((cfb8_32ScreenPtr) \ - dixLookupPrivate(&(pScreen)->devPrivates, cfb8_32GetScreenPrivateKey())) - -Bool xf86Overlay8Plus32Init (ScreenPtr pScreen); - -#endif /* _CFB8_32_H */ diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfb8_32module.c b/xorg-server/hw/xfree86/xf8_32bpp/cfb8_32module.c deleted file mode 100644 index 5afabe52d..000000000 --- a/xorg-server/hw/xfree86/xf8_32bpp/cfb8_32module.c +++ /dev/null @@ -1,39 +0,0 @@ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf86Module.h" - -static MODULESETUPPROTO(xf8_32bppSetup); - -static XF86ModuleVersionInfo VersRec = -{ - "xf8_32bpp", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 1, 0, 0, - ABI_CLASS_ANSIC, /* Only need the ansic layer */ - ABI_ANSIC_VERSION, - MOD_CLASS_NONE, - {0,0,0,0} /* signature, to be patched into the file by a tool */ -}; - -_X_EXPORT XF86ModuleData xf8_32bppModuleData = { - &VersRec, - xf8_32bppSetup, - NULL -}; - -static pointer -xf8_32bppSetup(pointer module, pointer opts, int *errmaj, int *errmin) -{ - if (!LoadSubModule(module, "cfb", NULL, NULL, NULL, NULL, - errmaj, errmin)) - return NULL; - if (!LoadSubModule(module, "cfb32", NULL, NULL, NULL, NULL, - errmaj, errmin)) - return NULL; - return (pointer)1; /* non-NULL required to indicate success */ -} diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbcpyarea.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbcpyarea.c deleted file mode 100644 index d8f0c6d76..000000000 --- a/xorg-server/hw/xfree86/xf8_32bpp/cfbcpyarea.c +++ /dev/null @@ -1,549 +0,0 @@ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include - -#include -#include -#include "servermd.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "resource.h" -#include "colormap.h" -#include "colormapst.h" -#define PSZ 8 -#include "cfb.h" -#undef PSZ -#include "cfb32.h" -#include "cfb8_32.h" -#include "mi.h" -#include "mistruct.h" -#include "dix.h" -#include "mibstore.h" - - -RegionPtr -cfb8_32CopyArea( - DrawablePtr pSrcDraw, - DrawablePtr pDstDraw, - GC *pGC, - int srcx, int srcy, - int width, int height, - int dstx, int dsty -){ - - if(pSrcDraw->bitsPerPixel == 32) { - if(pDstDraw->bitsPerPixel == 32) { - if((pGC->alu == GXcopy) && (pGC->planemask == 0xff000000)) { - return cfb32BitBlt (pSrcDraw, pDstDraw, - pGC, srcx, srcy, width, height, dstx, dsty, - cfbDoBitblt8To8GXcopy, 0L); - } - return(cfb32CopyArea(pSrcDraw, pDstDraw, pGC, srcx, srcy, - width, height, dstx, dsty)); - } else { - /* have to translate 32 -> 8 copies */ - return cfb32BitBlt (pSrcDraw, pDstDraw, - pGC, srcx, srcy, width, height, dstx, dsty, - cfbDoBitblt32To8, 0L); - } - } else { - if(pDstDraw->bitsPerPixel == 32) { - /* have to translate 8 -> 32 copies */ - return cfb32BitBlt (pSrcDraw, pDstDraw, - pGC, srcx, srcy, width, height, dstx, dsty, - cfbDoBitblt8To32, 0L); - } else { - return(cfbCopyArea(pSrcDraw, pDstDraw, pGC, srcx, srcy, - width, height, dstx, dsty)); - } - } -} - - - - -void -cfbDoBitblt8To32( - DrawablePtr pSrc, - DrawablePtr pDst, - int rop, - RegionPtr prgnDst, - DDXPointPtr pptSrc, - unsigned long pm -){ - BoxPtr pbox = REGION_RECTS(prgnDst); - int nbox = REGION_NUM_RECTS(prgnDst); - unsigned char *ptr8, *ptr32; - unsigned char *data8, *data32; - int pitch8, pitch32; - int height, width, i; - - cfbGetByteWidthAndPointer(pSrc, pitch8, ptr8); - cfbGetByteWidthAndPointer(pDst, pitch32, ptr32); - ptr32 += 3; /* point to the top byte */ - - pm >>= 24; - - if((pm == 0xff) && (rop == GXcopy)) { - for(;nbox; pbox++, pptSrc++, nbox--) { - data8 = ptr8 + (pptSrc->y * pitch8) + pptSrc->x; - data32 = ptr32 + (pbox->y1 * pitch32) + (pbox->x1 << 2); - width = pbox->x2 - pbox->x1; - height = pbox->y2 - pbox->y1; - - while(height--) { - for(i = 0; i < width; i++) - data32[i << 2] = data8[i]; - data8 += pitch8; - data32 += pitch32; - } - } - } else { /* it ain't pretty, but hey */ - for(;nbox; pbox++, pptSrc++, nbox--) { - data8 = ptr8 + (pptSrc->y * pitch8) + pptSrc->x; - data32 = ptr32 + (pbox->y1 * pitch32) + (pbox->x1 << 2); - width = pbox->x2 - pbox->x1; - height = pbox->y2 - pbox->y1; - - while(height--) { - switch(rop) { - case GXcopy: - for(i = 0; i < width; i++) - data32[i<<2] = (data8[i] & pm) | (data32[i<<2] & ~pm); - break; - case GXor: - for(i = 0; i < width; i++) - data32[i<<2] |= data8[i] & pm; - break; - case GXclear: - for(i = 0; i < width; i++) - data32[i<<2] &= ~pm; - break; - case GXand: - for(i = 0; i < width; i++) - data32[i<<2] &= data8[i] | ~pm; - break; - case GXandReverse: - for(i = 0; i < width; i++) - data32[i<<2] = ~data32[i<<2] & (data8[i] | ~pm); - break; - case GXandInverted: - for(i = 0; i < width; i++) - data32[i<<2] &= ~data8[i] | ~pm; - break; - case GXnoop: - return; - case GXxor: - for(i = 0; i < width; i++) - data32[i<<2] ^= data8[i] & pm; - break; - case GXnor: - for(i = 0; i < width; i++) - data32[i<<2] = ~(data32[i<<2] | (data8[i] & pm)); - break; - case GXequiv: - for(i = 0; i < width; i++) - data32[i<<2] = ~(data32[i<<2] ^ (data8[i] & pm)); - break; - case GXinvert: - for(i = 0; i < width; i++) - data32[i<<2] ^= pm; - break; - case GXorReverse: - for(i = 0; i < width; i++) - data32[i<<2] = ~data32[i<<2] | (data8[i] & pm); - break; - case GXcopyInverted: - for(i = 0; i < width; i++) - data32[i<<2] = (~data8[i] & pm) | (data32[i<<2] & ~pm); - break; - case GXorInverted: - for(i = 0; i < width; i++) - data32[i<<2] |= ~data8[i] & pm; - break; - case GXnand: - for(i = 0; i < width; i++) - data32[i<<2] = ~(data32[i<<2] & (data8[i] | ~pm)); - break; - case GXset: - for(i = 0; i < width; i++) - data32[i<<2] |= pm; - break; - } - data8 += pitch8; - data32 += pitch32; - } - } - } -} - - -void -cfbDoBitblt32To8( - DrawablePtr pSrc, - DrawablePtr pDst, - int rop, - RegionPtr prgnDst, - DDXPointPtr pptSrc, - unsigned long pm -){ - BoxPtr pbox = REGION_RECTS(prgnDst); - int nbox = REGION_NUM_RECTS(prgnDst); - unsigned char *ptr8, *ptr32; - unsigned char *data8, *data32; - int pitch8, pitch32; - int height, width, i; - - cfbGetByteWidthAndPointer(pDst, pitch8, ptr8); - cfbGetByteWidthAndPointer(pSrc, pitch32, ptr32); - ptr32 += 3; /* point to the top byte */ - - if(((pm & 0xff) == 0xff) && (rop == GXcopy)) { - for(;nbox; pbox++, pptSrc++, nbox--) { - data8 = ptr8 + (pbox->y1 * pitch8) + pbox->x1; - data32 = ptr32 + (pptSrc->y * pitch32) + (pptSrc->x << 2); - - width = pbox->x2 - pbox->x1; - height = pbox->y2 - pbox->y1; - - while(height--) { - for(i = 0; i < width; i++) - data8[i] = data32[i << 2]; - data8 += pitch8; - data32 += pitch32; - } - } - } else { - for(;nbox; pbox++, pptSrc++, nbox--) { - data8 = ptr8 + (pbox->y1 * pitch8) + pbox->x1; - data32 = ptr32 + (pptSrc->y * pitch32) + (pptSrc->x << 2); - - width = pbox->x2 - pbox->x1; - height = pbox->y2 - pbox->y1; - - while(height--) { - switch(rop) { - case GXcopy: - for(i = 0; i < width; i++) - data8[i] = (data32[i<<2] & pm) | (data8[i] & ~pm); - break; - case GXor: - for(i = 0; i < width; i++) - data8[i] |= data32[i<<2] & pm; - break; - case GXclear: - for(i = 0; i < width; i++) - data8[i] &= ~pm; - break; - case GXand: - for(i = 0; i < width; i++) - data8[i] &= data32[i<<2] | ~pm; - break; - case GXandReverse: - for(i = 0; i < width; i++) - data8[i] = ~data8[i] & (data32[i<<2] | ~pm); - break; - case GXandInverted: - for(i = 0; i < width; i++) - data8[i] &= ~data32[i<<2] | ~pm; - break; - case GXnoop: - return; - case GXxor: - for(i = 0; i < width; i++) - data8[i] ^= data32[i<<2] & pm; - break; - case GXnor: - for(i = 0; i < width; i++) - data8[i] = ~(data8[i] | (data32[i<<2] & pm)); - break; - case GXequiv: - for(i = 0; i < width; i++) - data8[i] = ~(data8[i] ^ (data32[i<<2] & pm)); - break; - case GXinvert: - for(i = 0; i < width; i++) - data8[i] ^= pm; - break; - case GXorReverse: - for(i = 0; i < width; i++) - data8[i] = ~data8[i] | (data32[i<<2] & pm); - break; - case GXcopyInverted: - for(i = 0; i < width; i++) - data8[i] = (~data32[i<<2] & pm) | (data8[i] & ~pm); - break; - case GXorInverted: - for(i = 0; i < width; i++) - data8[i] |= ~data32[i<<2] & pm; - break; - case GXnand: - for(i = 0; i < width; i++) - data8[i] = ~(data8[i] & (data32[i<<2] | ~pm)); - break; - case GXset: - for(i = 0; i < width; i++) - data8[i] |= pm; - break; - } - data8 += pitch8; - data32 += pitch32; - } - } - } -} - - - -static void -Do8To8Blt( - unsigned char *SrcPtr, - int SrcPitch, - unsigned char *DstPtr, - int DstPitch, - int nbox, - DDXPointPtr pptSrc, - BoxPtr pbox, - int xdir, int ydir -){ - int i, j, width, height, ydir2; - CARD8 *src, *dst; - - SrcPtr += 3; - DstPtr += 3; - xdir *= 4; - ydir2 = ydir * DstPitch; - ydir *= SrcPitch; - - for(;nbox; pbox++, pptSrc++, nbox--) { - src = SrcPtr + (pptSrc->y * SrcPitch) + (pptSrc->x << 2); - dst = DstPtr + (pbox->y1 * DstPitch) + (pbox->x1 << 2); - width = pbox->x2 - pbox->x1; - height = pbox->y2 - pbox->y1; - - if(ydir < 0) { - src += (height - 1) * SrcPitch; - dst += (height - 1) * DstPitch; - } - - if(xdir < 0) { - register int tmp = (width - 1) << 2; - src += tmp; - dst += tmp; - } - - while(height--) { - for(i = width, j = 0; i--; j+=xdir) - dst[j] = src[j]; - src += ydir; - dst += ydir2; - } - } -} - -static void -Do24To24Blt( - unsigned char *SrcPtr, - int SrcPitch, - unsigned char *DstPtr, - int DstPitch, - int nbox, - DDXPointPtr pptSrc, - BoxPtr pbox, - int xdir, int ydir -){ - int i, j, width, height, ydir2; - CARD8 *src, *dst; - - xdir *= 4; - ydir2 = ydir * DstPitch; - ydir *= SrcPitch; - - for(;nbox; pbox++, pptSrc++, nbox--) { - src = SrcPtr + (pptSrc->y * SrcPitch) + (pptSrc->x << 2); - dst = DstPtr + (pbox->y1 * DstPitch) + (pbox->x1 << 2); - width = pbox->x2 - pbox->x1; - height = pbox->y2 - pbox->y1; - - if(ydir < 0) { - src += (height - 1) * SrcPitch; - dst += (height - 1) * DstPitch; - } - - if(xdir < 0) { - register int tmp = (width - 1) << 2; - src += tmp; - dst += tmp; - } - - while(height--) { - for(i = width, j = 0; i--; j+=xdir) { - *((CARD16*)(dst + j)) = *((CARD32*)(src + j)); - dst[j + 2] = src[j + 2]; - } - src += ydir; - dst += ydir2; - } - } -} - - -static void -cfb8_32DoBitBlt( - DrawablePtr pSrc, - DrawablePtr pDst, - RegionPtr prgnDst, - DDXPointPtr pptSrc, - void (*DoBlt)( - unsigned char *SrcPtr, - int SrcPitch, - unsigned char *DstPtr, - int DstPitch, - int nbox, - DDXPointPtr pptSrc, - BoxPtr pbox, - int xdir, int ydir) -){ - int nbox, careful, SrcPitch, DstPitch; - BoxPtr pbox, pboxTmp, pboxNext, pboxBase, pboxNew1, pboxNew2; - DDXPointPtr pptTmp, pptNew1, pptNew2; - int xdir, ydir; - unsigned char *SrcPtr, *DstPtr; - - /* XXX we have to err on the side of safety when both are windows, - * because we don't know if IncludeInferiors is being used. - */ - careful = ((pSrc == pDst) || - ((pSrc->type == DRAWABLE_WINDOW) && - (pDst->type == DRAWABLE_WINDOW))); - - pbox = REGION_RECTS(prgnDst); - nbox = REGION_NUM_RECTS(prgnDst); - - pboxNew1 = NULL; - pptNew1 = NULL; - pboxNew2 = NULL; - pptNew2 = NULL; - if (careful && (pptSrc->y < pbox->y1)) { - /* walk source botttom to top */ - ydir = -1; - - if (nbox > 1) { - /* keep ordering in each band, reverse order of bands */ - pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); - if(!pboxNew1) - return; - pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox); - if(!pptNew1) { - xfree(pboxNew1); - return; - } - pboxBase = pboxNext = pbox+nbox-1; - while (pboxBase >= pbox) { - while ((pboxNext >= pbox) && - (pboxBase->y1 == pboxNext->y1)) - pboxNext--; - pboxTmp = pboxNext+1; - pptTmp = pptSrc + (pboxTmp - pbox); - while (pboxTmp <= pboxBase) { - *pboxNew1++ = *pboxTmp++; - *pptNew1++ = *pptTmp++; - } - pboxBase = pboxNext; - } - pboxNew1 -= nbox; - pbox = pboxNew1; - pptNew1 -= nbox; - pptSrc = pptNew1; - } - } else { - /* walk source top to bottom */ - ydir = 1; - } - - if (careful && (pptSrc->x < pbox->x1)) { - /* walk source right to left */ - xdir = -1; - - if (nbox > 1) { - /* reverse order of rects in each band */ - pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); - pptNew2 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox); - if(!pboxNew2 || !pptNew2) { - if (pptNew2) xfree(pptNew2); - if (pboxNew2) xfree(pboxNew2); - if (pboxNew1) { - xfree(pptNew1); - xfree(pboxNew1); - } - return; - } - pboxBase = pboxNext = pbox; - while (pboxBase < pbox+nbox) { - while ((pboxNext < pbox+nbox) && - (pboxNext->y1 == pboxBase->y1)) - pboxNext++; - pboxTmp = pboxNext; - pptTmp = pptSrc + (pboxTmp - pbox); - while (pboxTmp != pboxBase) { - *pboxNew2++ = *--pboxTmp; - *pptNew2++ = *--pptTmp; - } - pboxBase = pboxNext; - } - pboxNew2 -= nbox; - pbox = pboxNew2; - pptNew2 -= nbox; - pptSrc = pptNew2; - } - } else { - /* walk source left to right */ - xdir = 1; - } - - cfbGetByteWidthAndPointer(pSrc, SrcPitch, SrcPtr); - cfbGetByteWidthAndPointer(pDst, DstPitch, DstPtr); - - (*DoBlt)(SrcPtr,SrcPitch,DstPtr,DstPitch,nbox,pptSrc,pbox,xdir,ydir); - - if (pboxNew2) { - xfree(pptNew2); - xfree(pboxNew2); - } - if (pboxNew1) { - xfree(pptNew1); - xfree(pboxNew1); - } - -} - - -/* A couple routines to speed up full planemask copies */ - -void -cfbDoBitblt8To8GXcopy( - DrawablePtr pSrc, - DrawablePtr pDst, - int rop, - RegionPtr prgnDst, - DDXPointPtr pptSrc, - unsigned long pm -){ - cfb8_32DoBitBlt(pSrc, pDst, prgnDst, pptSrc, Do8To8Blt); -} - - -void -cfbDoBitblt24To24GXcopy( - DrawablePtr pSrc, - DrawablePtr pDst, - int rop, - RegionPtr prgnDst, - DDXPointPtr pptSrc, - unsigned long pm -){ - cfb8_32DoBitBlt(pSrc, pDst, prgnDst, pptSrc, Do24To24Blt); -} diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbcpyplane.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbcpyplane.c deleted file mode 100644 index e10b52525..000000000 --- a/xorg-server/hw/xfree86/xf8_32bpp/cfbcpyplane.c +++ /dev/null @@ -1,41 +0,0 @@ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include -#include -#include "gcstruct.h" -#include "windowstr.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "regionstr.h" -#define PSZ 8 -#include "cfb.h" -#undef PSZ -#include "cfb32.h" -#include "cfb8_32.h" -#include "mi.h" - - -RegionPtr -cfb8_32CopyPlane( - DrawablePtr pSrc, - DrawablePtr pDst, - GCPtr pGC, - int srcx, int srcy, - int width, int height, - int dstx, int dsty, - unsigned long bitPlane -){ - /* There's actually much more to it than this */ - - if((pDst->bitsPerPixel == 8) && (pSrc->bitsPerPixel != 32)){ - return(cfbCopyPlane(pSrc, pDst, - pGC, srcx, srcy, width, height, dstx, dsty, bitPlane)); - } - - - return(miCopyPlane (pSrc, pDst, - pGC, srcx, srcy, width, height, dstx, dsty, bitPlane)); -} diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbgc.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbgc.c deleted file mode 100644 index a7787caa9..000000000 --- a/xorg-server/hw/xfree86/xf8_32bpp/cfbgc.c +++ /dev/null @@ -1,646 +0,0 @@ -/*********************************************************** - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - - -/* - -PSZ 8 16 24 32 -PIXEL_ADDR True True True True -NO_ONE_RECT False False False False -WriteBitGroup True True True True -FOUR_BIT_CODE True False False False -LOWMEMFTPT False False False False - -*/ - - -/* This gets built twice. Once for 8bpp and another for 32bpp */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include -#include -#include "cfb.h" -#include -#include "dixfontstr.h" -#include "gcstruct.h" -#include "windowstr.h" -#include "pixmapstr.h" -#include "scrnintstr.h" -#include "region.h" - -#include "mistruct.h" -#include "mibstore.h" -#include "migc.h" -#include "mioverlay.h" - -#include "cfb8_32.h" -#include "cfbmskbits.h" -#include "cfb8bit.h" - - -#if PSZ == 8 -# define useTEGlyphBlt cfbTEGlyphBlt8 -#else -# ifdef WriteBitGroup -# define useTEGlyphBlt cfbImageGlyphBlt8 -# else -# define useTEGlyphBlt cfbTEGlyphBlt -# endif -#endif - -#ifdef WriteBitGroup -# define useImageGlyphBlt cfbImageGlyphBlt8 -# define usePolyGlyphBlt cfbPolyGlyphBlt8 -#else -# define useImageGlyphBlt miImageGlyphBlt -# define usePolyGlyphBlt miPolyGlyphBlt -#endif - -#ifdef FOUR_BIT_CODE -# define usePushPixels cfbPushPixels8 -#else -# define usePushPixels mfbPushPixels -#endif - -#ifdef PIXEL_ADDR -# define ZeroPolyArc cfbZeroPolyArcSS8Copy -#else -# define ZeroPolyArc miZeroPolyArc -#endif - - -static GCOps cfb8_32TEOps1Rect = { - cfbSolidSpansCopy, - cfbSetSpans, - cfb8_32PutImage, - cfb8_32CopyArea, - cfb8_32CopyPlane, - cfbPolyPoint, -#ifdef PIXEL_ADDR - cfb8LineSS1Rect, - cfb8SegmentSS1Rect, -#else - cfbLineSS, - cfbSegmentSS, -#endif - miPolyRectangle, - ZeroPolyArc, - cfbFillPoly1RectCopy, - cfbPolyFillRect, - cfbPolyFillArcSolidCopy, - miPolyText8, - miPolyText16, - miImageText8, - miImageText16, - useTEGlyphBlt, - usePolyGlyphBlt, - usePushPixels -}; - -static GCOps cfb8_32NonTEOps1Rect = { - cfbSolidSpansCopy, - cfbSetSpans, - cfb8_32PutImage, - cfb8_32CopyArea, - cfb8_32CopyPlane, - cfbPolyPoint, -#ifdef PIXEL_ADDR - cfb8LineSS1Rect, - cfb8SegmentSS1Rect, -#else - cfbLineSS, - cfbSegmentSS, -#endif - miPolyRectangle, - ZeroPolyArc, - cfbFillPoly1RectCopy, - cfbPolyFillRect, - cfbPolyFillArcSolidCopy, - miPolyText8, - miPolyText16, - miImageText8, - miImageText16, - useImageGlyphBlt, - usePolyGlyphBlt, - usePushPixels -}; - -static GCOps cfb8_32TEOps = { - cfbSolidSpansCopy, - cfbSetSpans, - cfb8_32PutImage, - cfb8_32CopyArea, - cfb8_32CopyPlane, - cfbPolyPoint, - cfbLineSS, - cfbSegmentSS, - miPolyRectangle, - ZeroPolyArc, - miFillPolygon, - cfbPolyFillRect, - cfbPolyFillArcSolidCopy, - miPolyText8, - miPolyText16, - miImageText8, - miImageText16, - useTEGlyphBlt, - usePolyGlyphBlt, - usePushPixels -}; - -static GCOps cfb8_32NonTEOps = { - cfbSolidSpansCopy, - cfbSetSpans, - cfb8_32PutImage, - cfb8_32CopyArea, - cfb8_32CopyPlane, - cfbPolyPoint, - cfbLineSS, - cfbSegmentSS, - miPolyRectangle, -#ifdef PIXEL_ADDR - cfbZeroPolyArcSS8Copy, -#else - miZeroPolyArc, -#endif - miFillPolygon, - cfbPolyFillRect, - cfbPolyFillArcSolidCopy, - miPolyText8, - miPolyText16, - miImageText8, - miImageText16, - useImageGlyphBlt, - usePolyGlyphBlt, - usePushPixels -}; - -static GCOps * -cfb8_32MatchCommon (GCPtr pGC, cfbPrivGCPtr devPriv) -{ - if (pGC->lineWidth != 0) - return 0; - if (pGC->lineStyle != LineSolid) - return 0; - if (pGC->fillStyle != FillSolid) - return 0; - if (devPriv->rop != GXcopy) - return 0; - if (pGC->font && - FONTMAXBOUNDS(pGC->font,rightSideBearing) - - FONTMINBOUNDS(pGC->font,leftSideBearing) <= 32 && - FONTMINBOUNDS(pGC->font,characterWidth) >= 0) - { - if (TERMINALFONT(pGC->font) -#ifdef FOUR_BIT_CODE - && FONTMAXBOUNDS(pGC->font,characterWidth) >= PGSZB -#endif - ) -#ifdef NO_ONE_RECT - return &cfb8_32TEOps1Rect; -#else - if (devPriv->oneRect) - return &cfb8_32TEOps1Rect; - else - return &cfb8_32TEOps; -#endif - else -#ifdef NO_ONE_RECT - return &cfb8_32NonTEOps1Rect; -#else - if (devPriv->oneRect) - return &cfb8_32NonTEOps1Rect; - else - return &cfb8_32NonTEOps; -#endif - } - return 0; -} - - -/* Clipping conventions - if the drawable is a window - CT_REGION ==> pCompositeClip really is the composite - CT_other ==> pCompositeClip is the window clip region - if the drawable is a pixmap - CT_REGION ==> pCompositeClip is the translated client region - clipped to the pixmap boundary - CT_other ==> pCompositeClip is the pixmap bounding box -*/ - -void -#if PSZ == 8 -cfb8_32ValidateGC8( -#else -cfb8_32ValidateGC32( -#endif - GCPtr pGC, - unsigned long changes, - DrawablePtr pDrawable -){ - int mask; /* stateChanges */ - int index; /* used for stepping through bitfields */ - int new_rrop; - int new_line, new_text, new_fillspans, new_fillarea; - /* flags for changing the proc vector */ - cfbPrivGCPtr devPriv; - int oneRect; - - pGC->lastWinOrg.x = pDrawable->x; - pGC->lastWinOrg.y = pDrawable->y; - devPriv = cfbGetGCPrivate(pGC); - - new_rrop = FALSE; - new_line = FALSE; - new_text = FALSE; - new_fillspans = FALSE; - new_fillarea = FALSE; - - /* - * if the client clip is different or moved OR the subwindowMode has - * changed OR the window's clip has changed since the last validation - * we need to recompute the composite clip - */ - - if ((changes & (GCClipXOrigin|GCClipYOrigin|GCClipMask|GCSubwindowMode)) || - (pDrawable->serialNumber != (pGC->serialNumber & DRAWABLE_SERIAL_BITS))) - { - miComputeCompositeClip (pGC, pDrawable); -#ifdef NO_ONE_RECT - devPriv->oneRect = FALSE; -#else - oneRect = REGION_NUM_RECTS(pGC->pCompositeClip) == 1; - if (oneRect != devPriv->oneRect) - new_line = TRUE; - devPriv->oneRect = oneRect; -#endif - } - - mask = changes; - while (mask) { - index = lowbit (mask); - mask &= ~index; - - switch (index) { - case GCFunction: - case GCForeground: - new_rrop = TRUE; - break; - case GCPlaneMask: - new_rrop = TRUE; - new_text = TRUE; - break; - case GCBackground: - break; - case GCLineStyle: - case GCLineWidth: - new_line = TRUE; - break; - case GCJoinStyle: - case GCCapStyle: - break; - case GCFillStyle: - new_text = TRUE; - new_fillspans = TRUE; - new_line = TRUE; - new_fillarea = TRUE; - break; - case GCFillRule: - break; - case GCTile: - new_fillspans = TRUE; - new_fillarea = TRUE; - break; - case GCStipple: - new_fillspans = TRUE; - new_fillarea = TRUE; - break; - case GCTileStipXOrigin: - case GCTileStipYOrigin: - break; - case GCFont: - new_text = TRUE; - break; - case GCSubwindowMode: - case GCGraphicsExposures: - case GCClipXOrigin: - case GCClipYOrigin: - case GCClipMask: - case GCDashOffset: - case GCDashList: - case GCArcMode: - default: - break; - } - } - - /* - * If the drawable has changed, ensure suitable - * entries are in the proc vector. - */ - if (pDrawable->serialNumber != (pGC->serialNumber & (DRAWABLE_SERIAL_BITS))) - new_fillspans = TRUE; /* deal with FillSpans later */ - - if (new_rrop) - { - int old_rrop; - - old_rrop = devPriv->rop; - devPriv->rop = cfbReduceRasterOp (pGC->alu, pGC->fgPixel, - pGC->planemask, - &devPriv->and, &devPriv->xor); - if (old_rrop == devPriv->rop) - new_rrop = FALSE; - else - { -#ifdef PIXEL_ADDR - new_line = TRUE; -#endif -#ifdef WriteBitGroup - new_text = TRUE; -#endif - new_fillspans = TRUE; - new_fillarea = TRUE; - } - } - - if(!pGC->ops) - pGC->ops = & cfb8_32NonTEOps; - - if (new_rrop || new_fillspans || new_text || new_fillarea || new_line) - { - GCOps *newops; - - if ((newops = cfb8_32MatchCommon (pGC, devPriv))) - { - if (pGC->ops->devPrivate.val) - miDestroyGCOps (pGC->ops); - pGC->ops = newops; - new_rrop = new_line = new_fillspans = new_text = new_fillarea = 0; - } - else - { - if (!pGC->ops->devPrivate.val) - { - pGC->ops = miCreateGCOps (pGC->ops); - pGC->ops->devPrivate.val = 1; - } - } - } - - /* deal with the changes we've collected */ - if (new_line) - { - pGC->ops->FillPolygon = miFillPolygon; -#ifdef NO_ONE_RECT - if (pGC->fillStyle == FillSolid) - { - switch (devPriv->rop) { - case GXcopy: - pGC->ops->FillPolygon = cfbFillPoly1RectCopy; - break; - default: - pGC->ops->FillPolygon = cfbFillPoly1RectGeneral; - break; - } - } -#else - if (devPriv->oneRect && pGC->fillStyle == FillSolid) - { - switch (devPriv->rop) { - case GXcopy: - pGC->ops->FillPolygon = cfbFillPoly1RectCopy; - break; - default: - pGC->ops->FillPolygon = cfbFillPoly1RectGeneral; - break; - } - } -#endif - if (pGC->lineWidth == 0) - { -#ifdef PIXEL_ADDR - if ((pGC->lineStyle == LineSolid) && (pGC->fillStyle == FillSolid)) - { - switch (devPriv->rop) - { - case GXxor: - pGC->ops->PolyArc = cfbZeroPolyArcSS8Xor; - break; - case GXcopy: - pGC->ops->PolyArc = cfbZeroPolyArcSS8Copy; - break; - default: - pGC->ops->PolyArc = cfbZeroPolyArcSS8General; - break; - } - } - else -#endif - pGC->ops->PolyArc = miZeroPolyArc; - } - else - pGC->ops->PolyArc = miPolyArc; - pGC->ops->PolySegment = miPolySegment; - switch (pGC->lineStyle) - { - case LineSolid: - if(pGC->lineWidth == 0) - { - if (pGC->fillStyle == FillSolid) - { -#if defined(PIXEL_ADDR) && !defined(NO_ONE_RECT) - if (devPriv->oneRect && - ((pDrawable->x >= pGC->pScreen->width - 32768) && - (pDrawable->y >= pGC->pScreen->height - 32768))) - { - pGC->ops->Polylines = cfb8LineSS1Rect; - pGC->ops->PolySegment = cfb8SegmentSS1Rect; - } else -#endif -#ifdef NO_ONE_RECT - { - pGC->ops->Polylines = cfb8LineSS1Rect; - pGC->ops->PolySegment = cfb8SegmentSS1Rect; - } -#else - { - pGC->ops->Polylines = cfbLineSS; - pGC->ops->PolySegment = cfbSegmentSS; - } -#endif - } - else - pGC->ops->Polylines = miZeroLine; - } - else - pGC->ops->Polylines = miWideLine; - break; - case LineOnOffDash: - case LineDoubleDash: - if (pGC->lineWidth == 0 && pGC->fillStyle == FillSolid) - { - pGC->ops->Polylines = cfbLineSD; - pGC->ops->PolySegment = cfbSegmentSD; - } else - pGC->ops->Polylines = miWideDash; - break; - } - } - - if (new_text && (pGC->font)) - { - if (FONTMAXBOUNDS(pGC->font,rightSideBearing) - - FONTMINBOUNDS(pGC->font,leftSideBearing) > 32 || - FONTMINBOUNDS(pGC->font,characterWidth) < 0) - { - pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; - pGC->ops->ImageGlyphBlt = miImageGlyphBlt; - } - else - { -#ifdef WriteBitGroup - if (pGC->fillStyle == FillSolid) - { - if (devPriv->rop == GXcopy) - pGC->ops->PolyGlyphBlt = cfbPolyGlyphBlt8; - else -#ifdef FOUR_BIT_CODE - pGC->ops->PolyGlyphBlt = cfbPolyGlyphRop8; -#else - pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; -#endif - } - else -#endif - pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; - /* special case ImageGlyphBlt for terminal emulator fonts */ -#if !defined(WriteBitGroup) || PSZ == 8 - if (TERMINALFONT(pGC->font) && - (pGC->planemask & PMSK) == PMSK -#ifdef FOUR_BIT_CODE - && FONTMAXBOUNDS(pGC->font,characterWidth) >= PGSZB -#endif - ) - { - pGC->ops->ImageGlyphBlt = useTEGlyphBlt; - } - else -#endif - { -#ifdef WriteBitGroup - if (devPriv->rop == GXcopy && - pGC->fillStyle == FillSolid && - (pGC->planemask & PMSK) == PMSK) - pGC->ops->ImageGlyphBlt = cfbImageGlyphBlt8; - else -#endif - pGC->ops->ImageGlyphBlt = miImageGlyphBlt; - } - } - } - - - if (new_fillspans) { - switch (pGC->fillStyle) { - case FillSolid: - switch (devPriv->rop) { - case GXcopy: - pGC->ops->FillSpans = cfbSolidSpansCopy; - break; - case GXxor: - pGC->ops->FillSpans = cfbSolidSpansXor; - break; - default: - pGC->ops->FillSpans = cfbSolidSpansGeneral; - break; - } - break; - case FillTiled: - pGC->ops->FillSpans = cfbUnnaturalTileFS; - break; - case FillStippled: - case FillOpaqueStippled: - pGC->ops->FillSpans = cfbUnnaturalStippleFS; - break; - default: - FatalError("cfbValidateGC: illegal fillStyle\n"); - } - } /* end of new_fillspans */ - - if (new_fillarea) { -#ifndef FOUR_BIT_CODE - pGC->ops->PolyFillRect = miPolyFillRect; - if (pGC->fillStyle == FillSolid || pGC->fillStyle == FillTiled) - { - pGC->ops->PolyFillRect = cfbPolyFillRect; - } -#endif -#ifdef FOUR_BIT_CODE - pGC->ops->PushPixels = mfbPushPixels; - if (pGC->fillStyle == FillSolid && devPriv->rop == GXcopy) - pGC->ops->PushPixels = cfbPushPixels8; -#endif - pGC->ops->PolyFillArc = miPolyFillArc; - if (pGC->fillStyle == FillSolid) - { - switch (devPriv->rop) - { - case GXcopy: - pGC->ops->PolyFillArc = cfbPolyFillArcSolidCopy; - break; - default: - pGC->ops->PolyFillArc = cfbPolyFillArcSolidGeneral; - break; - } - } - } -} diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbgc32.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbgc32.c deleted file mode 100644 index 61a97b97b..000000000 --- a/xorg-server/hw/xfree86/xf8_32bpp/cfbgc32.c +++ /dev/null @@ -1,2 +0,0 @@ -#define PSZ 32 -#include "./cfbgc.c" diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbgc8.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbgc8.c deleted file mode 100644 index 53e4f95e4..000000000 --- a/xorg-server/hw/xfree86/xf8_32bpp/cfbgc8.c +++ /dev/null @@ -1,2 +0,0 @@ -#define PSZ 8 -#include "./cfbgc.c" diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbgcmisc.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbgcmisc.c deleted file mode 100644 index f009afc0c..000000000 --- a/xorg-server/hw/xfree86/xf8_32bpp/cfbgcmisc.c +++ /dev/null @@ -1,150 +0,0 @@ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include - -#include -#include -#include -#define PSZ 8 -#include "cfb.h" -#undef PSZ -#include "cfb32.h" -#include "cfb8_32.h" -#include -#include "dixfontstr.h" -#include "gcstruct.h" -#include "windowstr.h" -#include "pixmapstr.h" -#include "scrnintstr.h" -#include "region.h" - -#include "mistruct.h" -#include "mibstore.h" -#include "migc.h" - - -static void cfb8_32ValidateGC(GCPtr, unsigned long, DrawablePtr); -static void cfb8_32DestroyGC(GCPtr pGC); -static void cfb32DestroyGC_Underlay(GCPtr pGC); - -static -GCFuncs cfb8_32GCFuncs = { - cfb8_32ValidateGC, - miChangeGC, - miCopyGC, - cfb8_32DestroyGC, - miChangeClip, - miDestroyClip, - miCopyClip, -}; - - -static -GCFuncs cfb32GCFuncs_Underlay = { - cfb32ValidateGC_Underlay, - miChangeGC, - miCopyGC, - cfb32DestroyGC_Underlay, - miChangeClip, - miDestroyClip, - miCopyClip, -}; - -static void -cfb32DestroyGC_Underlay(GCPtr pGC) -{ - if (pGC->freeCompClip) - REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip); - - if(pGC->ops) - miDestroyGCOps(pGC->ops); -} - - -static void -cfb8_32DestroyGC(GCPtr pGC) -{ - cfb8_32GCPtr pGCPriv = CFB8_32_GET_GC_PRIVATE(pGC); - - if (pGC->freeCompClip) - REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip); - if(pGCPriv->Ops8bpp) - miDestroyGCOps(pGCPriv->Ops8bpp); - if(pGCPriv->Ops32bpp) - miDestroyGCOps(pGCPriv->Ops32bpp); -} - -Bool -cfb8_32CreateGC(GCPtr pGC) -{ - cfb8_32GCPtr pGCPriv; - cfbPrivGC *pPriv; - - if (PixmapWidthPaddingInfo[pGC->depth].padPixelsLog2 == LOG2_BITMAP_PAD) - return (mfbCreateGC(pGC)); - - pGC->clientClip = NULL; - pGC->clientClipType = CT_NONE; - pGC->miTranslate = 1; - pGC->fExpose = TRUE; - pGC->freeCompClip = FALSE; - pGC->pRotatedPixmap = (PixmapPtr) NULL; - - pPriv = cfbGetGCPrivate(pGC); - pPriv->rop = pGC->alu; - pPriv->oneRect = FALSE; - - pGC->ops = NULL; - - if (pGC->depth == 8) { - pGC->funcs = &cfb8_32GCFuncs; - - pGCPriv = CFB8_32_GET_GC_PRIVATE(pGC); - pGCPriv->Ops8bpp = NULL; - pGCPriv->Ops32bpp = NULL; - pGCPriv->OpsAre8bpp = FALSE; - pGCPriv->changes = 0; - } else - pGC->funcs = &cfb32GCFuncs_Underlay; - - return TRUE; -} - - -static void -cfb8_32ValidateGC( - GCPtr pGC, - unsigned long changes, - DrawablePtr pDraw -){ - cfb8_32GCPtr pGCPriv = CFB8_32_GET_GC_PRIVATE(pGC); - - if(pDraw->bitsPerPixel == 32) { - if(pGCPriv->OpsAre8bpp) { - int origChanges = changes; - pGC->ops = pGCPriv->Ops32bpp; - changes |= pGCPriv->changes; - pGCPriv->changes = origChanges; - pGCPriv->OpsAre8bpp = FALSE; - } else - pGCPriv->changes |= changes; - - cfb8_32ValidateGC32(pGC, changes, pDraw); - pGCPriv->Ops32bpp = pGC->ops; - } else { /* bitsPerPixel == 8 */ - if(!pGCPriv->OpsAre8bpp) { - int origChanges = changes; - pGC->ops = pGCPriv->Ops8bpp; - changes |= pGCPriv->changes; - pGCPriv->changes = origChanges; - pGCPriv->OpsAre8bpp = TRUE; - } else - pGCPriv->changes |= changes; - - cfb8_32ValidateGC8(pGC, changes, pDraw); - pGCPriv->Ops8bpp = pGC->ops; - } -} - diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbgcunder.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbgcunder.c deleted file mode 100644 index d90321355..000000000 --- a/xorg-server/hw/xfree86/xf8_32bpp/cfbgcunder.c +++ /dev/null @@ -1,620 +0,0 @@ -/*********************************************************** - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ -#define PSZ 32 - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include -#include -#include "cfb.h" -#include -#include "dixfontstr.h" -#include "gcstruct.h" -#include "windowstr.h" -#include "pixmapstr.h" -#include "scrnintstr.h" -#include "region.h" - -#include "mistruct.h" -#include "mibstore.h" -#include "migc.h" -#include "mioverlay.h" - -#include "cfbmskbits.h" -#include "cfb8bit.h" -#include "cfb8_32.h" - -#ifdef WriteBitGroup -# define useTEGlyphBlt cfbImageGlyphBlt8 -#else -# define useTEGlyphBlt cfbTEGlyphBlt -#endif - -#ifdef WriteBitGroup -# define useImageGlyphBlt cfbImageGlyphBlt8 -# define usePolyGlyphBlt cfbPolyGlyphBlt8 -#else -# define useImageGlyphBlt miImageGlyphBlt -# define usePolyGlyphBlt miPolyGlyphBlt -#endif - -#ifdef FOUR_BIT_CODE -# define usePushPixels cfbPushPixels8 -#else -# define usePushPixels mfbPushPixels -#endif - -#ifdef PIXEL_ADDR -# define ZeroPolyArc cfbZeroPolyArcSS8Copy -#else -# define ZeroPolyArc miZeroPolyArc -#endif - - -static GCOps cfbTEOps1Rect = { - cfbSolidSpansCopy, - cfbSetSpans, - cfbPutImage, - cfbCopyArea, - cfbCopyPlane, - cfbPolyPoint, -#ifdef PIXEL_ADDR - cfb8LineSS1Rect, - cfb8SegmentSS1Rect, -#else - cfbLineSS, - cfbSegmentSS, -#endif - miPolyRectangle, - ZeroPolyArc, - cfbFillPoly1RectCopy, - cfbPolyFillRect, - cfbPolyFillArcSolidCopy, - miPolyText8, - miPolyText16, - miImageText8, - miImageText16, - useTEGlyphBlt, - usePolyGlyphBlt, - usePushPixels -}; - -static GCOps cfbNonTEOps1Rect = { - cfbSolidSpansCopy, - cfbSetSpans, - cfbPutImage, - cfbCopyArea, - cfbCopyPlane, - cfbPolyPoint, -#ifdef PIXEL_ADDR - cfb8LineSS1Rect, - cfb8SegmentSS1Rect, -#else - cfbLineSS, - cfbSegmentSS, -#endif - miPolyRectangle, - ZeroPolyArc, - cfbFillPoly1RectCopy, - cfbPolyFillRect, - cfbPolyFillArcSolidCopy, - miPolyText8, - miPolyText16, - miImageText8, - miImageText16, - useImageGlyphBlt, - usePolyGlyphBlt, - usePushPixels -}; - -static GCOps cfbTEOps = { - cfbSolidSpansCopy, - cfbSetSpans, - cfbPutImage, - cfbCopyArea, - cfbCopyPlane, - cfbPolyPoint, - cfbLineSS, - cfbSegmentSS, - miPolyRectangle, - ZeroPolyArc, - miFillPolygon, - cfbPolyFillRect, - cfbPolyFillArcSolidCopy, - miPolyText8, - miPolyText16, - miImageText8, - miImageText16, - useTEGlyphBlt, - usePolyGlyphBlt, - usePushPixels -}; - -static GCOps cfbNonTEOps = { - cfbSolidSpansCopy, - cfbSetSpans, - cfbPutImage, - cfbCopyArea, - cfbCopyPlane, - cfbPolyPoint, - cfbLineSS, - cfbSegmentSS, - miPolyRectangle, -#ifdef PIXEL_ADDR - cfbZeroPolyArcSS8Copy, -#else - miZeroPolyArc, -#endif - miFillPolygon, - cfbPolyFillRect, - cfbPolyFillArcSolidCopy, - miPolyText8, - miPolyText16, - miImageText8, - miImageText16, - useImageGlyphBlt, - usePolyGlyphBlt, - usePushPixels -}; - -static GCOps * -cfb32MatchCommon_Underlay( - GCPtr pGC, - cfbPrivGCPtr devPriv) -{ - if (pGC->lineWidth != 0) - return 0; - if (pGC->lineStyle != LineSolid) - return 0; - if (pGC->fillStyle != FillSolid) - return 0; - if (devPriv->rop != GXcopy) - return 0; - if (pGC->font && - FONTMAXBOUNDS(pGC->font,rightSideBearing) - - FONTMINBOUNDS(pGC->font,leftSideBearing) <= 32 && - FONTMINBOUNDS(pGC->font,characterWidth) >= 0) - { - if (TERMINALFONT(pGC->font) -#ifdef FOUR_BIT_CODE - && FONTMAXBOUNDS(pGC->font,characterWidth) >= PGSZB -#endif - ) -#ifdef NO_ONE_RECT - return &cfbTEOps1Rect; -#else - if (devPriv->oneRect) - return &cfbTEOps1Rect; - else - return &cfbTEOps; -#endif - else -#ifdef NO_ONE_RECT - return &cfbNonTEOps1Rect; -#else - if (devPriv->oneRect) - return &cfbNonTEOps1Rect; - else - return &cfbNonTEOps; -#endif - } - return 0; -} - - -void -cfb32ValidateGC_Underlay( - GCPtr pGC, - unsigned long changes, - DrawablePtr pDrawable -){ - int mask; /* stateChanges */ - int index; /* used for stepping through bitfields */ - int new_rrop; - int new_line, new_text, new_fillspans, new_fillarea; - /* flags for changing the proc vector */ - cfbPrivGCPtr devPriv; - int oneRect; - - pGC->lastWinOrg.x = pDrawable->x; - pGC->lastWinOrg.y = pDrawable->y; - devPriv = cfbGetGCPrivate(pGC); - - new_rrop = FALSE; - new_line = FALSE; - new_text = FALSE; - new_fillspans = FALSE; - new_fillarea = FALSE; - - /* - * if the client clip is different or moved OR the subwindowMode has - * changed OR the window's clip has changed since the last validation - * we need to recompute the composite clip - */ - - if ((changes & (GCClipXOrigin|GCClipYOrigin|GCClipMask|GCSubwindowMode)) || - (pDrawable->serialNumber != (pGC->serialNumber & DRAWABLE_SERIAL_BITS)) - ) - { - if(pDrawable->type == DRAWABLE_WINDOW) - miOverlayComputeCompositeClip (pGC, (WindowPtr)pDrawable); - else - miComputeCompositeClip (pGC, pDrawable); -#ifdef NO_ONE_RECT - devPriv->oneRect = FALSE; -#else - oneRect = REGION_NUM_RECTS(pGC->pCompositeClip) == 1; - if (oneRect != devPriv->oneRect) - new_line = TRUE; - devPriv->oneRect = oneRect; -#endif - } - - mask = changes; - while (mask) { - index = lowbit (mask); - mask &= ~index; - - switch (index) { - case GCFunction: - case GCForeground: - new_rrop = TRUE; - break; - case GCPlaneMask: - new_rrop = TRUE; - new_text = TRUE; - break; - case GCBackground: - break; - case GCLineStyle: - case GCLineWidth: - new_line = TRUE; - break; - case GCJoinStyle: - case GCCapStyle: - break; - case GCFillStyle: - new_text = TRUE; - new_fillspans = TRUE; - new_line = TRUE; - new_fillarea = TRUE; - break; - case GCFillRule: - break; - case GCTile: - new_fillspans = TRUE; - new_fillarea = TRUE; - break; - case GCStipple: - new_fillspans = TRUE; - new_fillarea = TRUE; - break; - case GCTileStipXOrigin: - case GCTileStipYOrigin: - break; - case GCFont: - new_text = TRUE; - break; - case GCSubwindowMode: - case GCGraphicsExposures: - case GCClipXOrigin: - case GCClipYOrigin: - case GCClipMask: - case GCDashOffset: - case GCDashList: - case GCArcMode: - default: - break; - } - } - - /* - * If the drawable has changed, ensure suitable - * entries are in the proc vector. - */ - if (pDrawable->serialNumber != (pGC->serialNumber & (DRAWABLE_SERIAL_BITS))) - new_fillspans = TRUE; /* deal with FillSpans later */ - - if (new_rrop) - { - int old_rrop; - - old_rrop = devPriv->rop; - devPriv->rop = cfbReduceRasterOp (pGC->alu, pGC->fgPixel, - pGC->planemask, - &devPriv->and, &devPriv->xor); - if (old_rrop == devPriv->rop) - new_rrop = FALSE; - else - { -#ifdef PIXEL_ADDR - new_line = TRUE; -#endif -#ifdef WriteBitGroup - new_text = TRUE; -#endif - new_fillspans = TRUE; - new_fillarea = TRUE; - } - } - - if(!pGC->ops) - pGC->ops = & cfbNonTEOps; - - - if (new_rrop || new_fillspans || new_text || new_fillarea || new_line) - { - GCOps *newops; - - if ((newops = cfb32MatchCommon_Underlay (pGC, devPriv))) - { - if (pGC->ops->devPrivate.val) - miDestroyGCOps (pGC->ops); - pGC->ops = newops; - new_rrop = new_line = new_fillspans = new_text = new_fillarea = 0; - } - else - { - if (!pGC->ops->devPrivate.val) - { - pGC->ops = miCreateGCOps (pGC->ops); - pGC->ops->devPrivate.val = 1; - } - } - } - - /* deal with the changes we've collected */ - if (new_line) - { - pGC->ops->FillPolygon = miFillPolygon; -#ifdef NO_ONE_RECT - if (pGC->fillStyle == FillSolid) - { - switch (devPriv->rop) { - case GXcopy: - pGC->ops->FillPolygon = cfbFillPoly1RectCopy; - break; - default: - pGC->ops->FillPolygon = cfbFillPoly1RectGeneral; - break; - } - } -#else - if (devPriv->oneRect && pGC->fillStyle == FillSolid) - { - switch (devPriv->rop) { - case GXcopy: - pGC->ops->FillPolygon = cfbFillPoly1RectCopy; - break; - default: - pGC->ops->FillPolygon = cfbFillPoly1RectGeneral; - break; - } - } -#endif - if (pGC->lineWidth == 0) - { -#ifdef PIXEL_ADDR - if ((pGC->lineStyle == LineSolid) && (pGC->fillStyle == FillSolid)) - { - switch (devPriv->rop) - { - case GXxor: - pGC->ops->PolyArc = cfbZeroPolyArcSS8Xor; - break; - case GXcopy: - pGC->ops->PolyArc = cfbZeroPolyArcSS8Copy; - break; - default: - pGC->ops->PolyArc = cfbZeroPolyArcSS8General; - break; - } - } - else -#endif - pGC->ops->PolyArc = miZeroPolyArc; - } - else - pGC->ops->PolyArc = miPolyArc; - pGC->ops->PolySegment = miPolySegment; - switch (pGC->lineStyle) - { - case LineSolid: - if(pGC->lineWidth == 0) - { - if (pGC->fillStyle == FillSolid) - { -#if defined(PIXEL_ADDR) && !defined(NO_ONE_RECT) - if (devPriv->oneRect && - ((pDrawable->x >= pGC->pScreen->width - 32768) && - (pDrawable->y >= pGC->pScreen->height - 32768))) - { - pGC->ops->Polylines = cfb8LineSS1Rect; - pGC->ops->PolySegment = cfb8SegmentSS1Rect; - } else -#endif -#ifdef NO_ONE_RECT - { - pGC->ops->Polylines = cfb8LineSS1Rect; - pGC->ops->PolySegment = cfb8SegmentSS1Rect; - } -#else - { - pGC->ops->Polylines = cfbLineSS; - pGC->ops->PolySegment = cfbSegmentSS; - } -#endif - } - else - pGC->ops->Polylines = miZeroLine; - } - else - pGC->ops->Polylines = miWideLine; - break; - case LineOnOffDash: - case LineDoubleDash: - if (pGC->lineWidth == 0 && pGC->fillStyle == FillSolid) - { - pGC->ops->Polylines = cfbLineSD; - pGC->ops->PolySegment = cfbSegmentSD; - } else - pGC->ops->Polylines = miWideDash; - break; - } - } - - if (new_text && (pGC->font)) - { - if (FONTMAXBOUNDS(pGC->font,rightSideBearing) - - FONTMINBOUNDS(pGC->font,leftSideBearing) > 32 || - FONTMINBOUNDS(pGC->font,characterWidth) < 0) - { - pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; - pGC->ops->ImageGlyphBlt = miImageGlyphBlt; - } - else - { -#ifdef WriteBitGroup - if (pGC->fillStyle == FillSolid) - { - if (devPriv->rop == GXcopy) - pGC->ops->PolyGlyphBlt = cfbPolyGlyphBlt8; - else -#ifdef FOUR_BIT_CODE - pGC->ops->PolyGlyphBlt = cfbPolyGlyphRop8; -#else - pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; -#endif - } - else -#endif - pGC->ops->PolyGlyphBlt = miPolyGlyphBlt; - /* special case ImageGlyphBlt for terminal emulator fonts */ -#if !defined(WriteBitGroup) || PSZ == 8 - if (TERMINALFONT(pGC->font) && - (pGC->planemask & PMSK) == PMSK -#ifdef FOUR_BIT_CODE - && FONTMAXBOUNDS(pGC->font,characterWidth) >= PGSZB -#endif - ) - { - pGC->ops->ImageGlyphBlt = useTEGlyphBlt; - } - else -#endif - { -#ifdef WriteBitGroup - if (devPriv->rop == GXcopy && - pGC->fillStyle == FillSolid && - (pGC->planemask & PMSK) == PMSK) - pGC->ops->ImageGlyphBlt = cfbImageGlyphBlt8; - else -#endif - pGC->ops->ImageGlyphBlt = miImageGlyphBlt; - } - } - } - - - if (new_fillspans) { - switch (pGC->fillStyle) { - case FillSolid: - switch (devPriv->rop) { - case GXcopy: - pGC->ops->FillSpans = cfbSolidSpansCopy; - break; - case GXxor: - pGC->ops->FillSpans = cfbSolidSpansXor; - break; - default: - pGC->ops->FillSpans = cfbSolidSpansGeneral; - break; - } - break; - case FillTiled: - pGC->ops->FillSpans = cfbUnnaturalTileFS; - break; - case FillStippled: - case FillOpaqueStippled: - pGC->ops->FillSpans = cfbUnnaturalStippleFS; - break; - default: - FatalError("cfbValidateGC: illegal fillStyle\n"); - } - } /* end of new_fillspans */ - - if (new_fillarea) { -#ifndef FOUR_BIT_CODE - pGC->ops->PolyFillRect = miPolyFillRect; - if (pGC->fillStyle == FillSolid || pGC->fillStyle == FillTiled) - { - pGC->ops->PolyFillRect = cfbPolyFillRect; - } -#endif -#ifdef FOUR_BIT_CODE - pGC->ops->PushPixels = mfbPushPixels; - if (pGC->fillStyle == FillSolid && devPriv->rop == GXcopy) - pGC->ops->PushPixels = cfbPushPixels8; -#endif - pGC->ops->PolyFillArc = miPolyFillArc; - if (pGC->fillStyle == FillSolid) - { - switch (devPriv->rop) - { - case GXcopy: - pGC->ops->PolyFillArc = cfbPolyFillArcSolidCopy; - break; - default: - pGC->ops->PolyFillArc = cfbPolyFillArcSolidGeneral; - break; - } - } - } -} diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbimage.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbimage.c deleted file mode 100644 index 01a5a5eb6..000000000 --- a/xorg-server/hw/xfree86/xf8_32bpp/cfbimage.c +++ /dev/null @@ -1,174 +0,0 @@ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include - -#include -#include "windowstr.h" -#include "pixmapstr.h" -#include "scrnintstr.h" -#include "gcstruct.h" -#define PSZ 8 -#include "cfb.h" -#undef PSZ -#include "cfb32.h" -#include "cfb8_32.h" -#include "servermd.h" -#include "mi.h" - - -void -cfb8_32GetImage ( - DrawablePtr pDraw, - int sx, int sy, int w, int h, - unsigned int format, - unsigned long planemask, - char *pdstLine -){ - if(!w || !h) return; - - if (!cfbDrawableEnabled (pDraw)) - return; - - if(pDraw->depth == 24){ - cfb32GetImage(pDraw, sx, sy, w, h, format, planemask, pdstLine); - return; - } - - if((pDraw->bitsPerPixel == 8) || (pDraw->bitsPerPixel == 1)){ - cfbGetImage(pDraw, sx, sy, w, h, format, planemask, pdstLine); - return; - } - - /* source is depth 8, 32 bpp */ - if(format != ZPixmap) { - miGetImage(pDraw, sx, sy, w, h, format, planemask, pdstLine); - return; - } else { - BoxRec box; - DDXPointRec ptSrc; - RegionRec rgnDst; - ScreenPtr pScreen; - PixmapPtr pPixmap; - - pScreen = pDraw->pScreen; - pPixmap = GetScratchPixmapHeader(pScreen, w, h, 8, 8, - PixmapBytePad(w,8), (pointer)pdstLine); - if (!pPixmap) - return; - if ((planemask & 0xff) != 0xff) - memset((char *)pdstLine, 0, pPixmap->devKind * h); - ptSrc.x = sx + pDraw->x; - ptSrc.y = sy + pDraw->y; - box.x1 = 0; - box.y1 = 0; - box.x2 = w; - box.y2 = h; - REGION_INIT(pScreen, &rgnDst, &box, 1); - cfbDoBitblt32To8(pDraw, (DrawablePtr)pPixmap, GXcopy, &rgnDst, - &ptSrc, planemask); - REGION_UNINIT(pScreen, &rgnDst); - FreeScratchPixmapHeader(pPixmap); - } -} - -void -cfb8_32PutImage ( - DrawablePtr pDraw, - GCPtr pGC, - int depth, - int x, int y, int w, int h, - int leftPad, - int format, - char *pImage -){ - if(!w || !h) return; - - if((pDraw->bitsPerPixel == 8) || (format != XYPixmap)){ - cfbPutImage(pDraw, pGC, depth, x, y, w, h, leftPad, format, pImage); - return; - } else { /* moving an 8bpp XYPixmap to a 32bpp screen */ - unsigned long oldFg, oldBg; - XID gcv[3]; - unsigned long oldPlanemask; - unsigned long i; - long bytesPer; - - oldPlanemask = pGC->planemask; - oldFg = pGC->fgPixel; - oldBg = pGC->bgPixel; - gcv[0] = ~0L; - gcv[1] = 0; - DoChangeGC(pGC, GCForeground | GCBackground, gcv, 0); - bytesPer = (long)h * BitmapBytePad(w + leftPad); - - for (i = 0x80000000; i & 0xff000000; i >>= 1, pImage += bytesPer) - { - if (i & oldPlanemask) - { - gcv[0] = i; - DoChangeGC(pGC, GCPlaneMask, gcv, 0); - ValidateGC(pDraw, pGC); - (*pGC->ops->PutImage)(pDraw, pGC, 1, x, y, w, h, leftPad, - XYBitmap, pImage); - } - } - gcv[0] = oldPlanemask; - gcv[1] = oldFg; - gcv[2] = oldBg; - DoChangeGC(pGC, GCPlaneMask | GCForeground | GCBackground, gcv, 0); - ValidateGC(pDraw, pGC); - } -} - - - - -void -cfb8_32GetSpans( - DrawablePtr pDraw, - int wMax, - DDXPointPtr ppt, - int *pwidth, - int nspans, - char *pDst -){ - int pitch, i; - CARD8 *ptr, *ptrBase; - - if (!cfbDrawableEnabled (pDraw)) - return; - - if(pDraw->bitsPerPixel == 1) { - mfbGetSpans(pDraw, wMax, ppt, pwidth, nspans, pDst); - return; - } - - if(pDraw->depth == 24) { - cfb32GetSpans(pDraw, wMax, ppt, pwidth, nspans, pDst); - return; - } else if(pDraw->bitsPerPixel == 8) { - cfbGetSpans(pDraw, wMax, ppt, pwidth, nspans, pDst); - return; - } - - /* gotta get spans from a depth 8 window */ - cfbGetByteWidthAndPointer(pDraw, pitch, ptrBase); - ptrBase += 3; /* point to top byte */ - - while(nspans--) { - ptr = ptrBase + (ppt->y * pitch) + (ppt->x << 2); - - for(i = *pwidth; i--; ptr += 4) - *(pDst++) = *ptr; - - pDst = (char*)((long)(pDst + 3) & ~3L); - - ppt++; pwidth++; - } -} - - diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbpntwin.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbpntwin.c deleted file mode 100644 index fbf597d22..000000000 --- a/xorg-server/hw/xfree86/xf8_32bpp/cfbpntwin.c +++ /dev/null @@ -1,51 +0,0 @@ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include - -#include "windowstr.h" -#include "regionstr.h" -#include "pixmapstr.h" -#include "scrnintstr.h" - -#define PSZ 8 -#include "cfb.h" -#undef PSZ -#include "cfb32.h" -#include "cfb8_32.h" -#include "mi.h" - -#ifdef PANORAMIX -#include "panoramiX.h" -#include "panoramiXsrv.h" -#endif - -void -cfb8_32FillBoxSolid8( - DrawablePtr pDraw, - int nbox, - BoxPtr pbox, - unsigned long color -){ - CARD8 *ptr, *data; - int pitch, height, width, i; - CARD8 c = (CARD8)color; - - cfbGetByteWidthAndPointer(pDraw, pitch, ptr); - ptr += 3; /* point to the top byte */ - - while(nbox--) { - data = ptr + (pbox->y1 * pitch) + (pbox->x1 << 2); - width = (pbox->x2 - pbox->x1) << 2; - height = pbox->y2 - pbox->y1; - - while(height--) { - for(i = 0; i < width; i+=4) - data[i] = c; - data += pitch; - } - pbox++; - } -} diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbscrinit.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbscrinit.c deleted file mode 100644 index c3432b803..000000000 --- a/xorg-server/hw/xfree86/xf8_32bpp/cfbscrinit.c +++ /dev/null @@ -1,311 +0,0 @@ - - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include -#include "misc.h" -#include "servermd.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "resource.h" -#include "colormap.h" -#include "colormapst.h" -#define PSZ 8 -#include "cfb.h" -#undef PSZ -#include "cfb32.h" -#include "cfb8_32.h" -#include "mi.h" -#include "micmap.h" -#include "mistruct.h" -#include "dix.h" -#include "mibstore.h" -#include "mioverlay.h" -#include "xf86.h" -#include "xf86str.h" -#include "globals.h" - -/* CAUTION: We require that cfb8 and cfb32 were NOT - compiled with CFB_NEED_SCREEN_PRIVATE */ - -static DevPrivateKey cfb8_32GCPrivateKey = &cfb8_32GCPrivateKey; -DevPrivateKey cfb8_32GetGCPrivateKey(void) -{ - return cfb8_32GCPrivateKey; -} - -static DevPrivateKey cfb8_32ScreenPrivateKey = &cfb8_32ScreenPrivateKey; -DevPrivateKey cfb8_32GetScreenPrivateKey(void) -{ - return cfb8_32ScreenPrivateKey; -} - -static Bool -cfb8_32AllocatePrivates(ScreenPtr pScreen) -{ - cfb8_32ScreenPtr pScreenPriv; - - if (!(pScreenPriv = xalloc(sizeof(cfb8_32ScreenRec)))) - return FALSE; - - dixSetPrivate(&pScreen->devPrivates, cfb8_32ScreenPrivateKey, pScreenPriv); - - - /* All cfb will have the same GC and Window private indicies */ - if(!mfbAllocatePrivates(pScreen, &cfbGCPrivateKey)) - return FALSE; - - if(!dixRequestPrivate(cfbGCPrivateKey, sizeof(cfbPrivGC))) - return FALSE; - - if(!dixRequestPrivate(cfb8_32GCPrivateKey, sizeof(cfb8_32GCRec))) - return FALSE; - - return TRUE; -} - -static void DestroyColormapNoop( - ColormapPtr pColormap) -{ - /* NOOP */ -} - -static void StoreColorsNoop( - ColormapPtr pColormap, - int ndef, - xColorItem * pdef) -{ - /* NOOP */ -} - -static Bool -cfb8_32SetupScreen( - ScreenPtr pScreen, - pointer pbits, /* pointer to screen bitmap */ - int xsize, int ysize, /* in pixels */ - int dpix, int dpiy, /* dots per inch */ - int width /* pixel width of frame buffer */ -){ - if (!cfb8_32AllocatePrivates(pScreen)) - return FALSE; - pScreen->defColormap = FakeClientID(0); - /* let CreateDefColormap do whatever it wants for pixels */ - pScreen->blackPixel = pScreen->whitePixel = (Pixel) 0; - pScreen->QueryBestSize = mfbQueryBestSize; - /* SaveScreen */ - pScreen->GetImage = cfb8_32GetImage; - pScreen->GetSpans = cfb8_32GetSpans; - pScreen->CreateWindow = cfb8_32CreateWindow; - pScreen->DestroyWindow = cfb8_32DestroyWindow; - pScreen->PositionWindow = cfb8_32PositionWindow; - pScreen->ChangeWindowAttributes = cfb8_32ChangeWindowAttributes; - pScreen->RealizeWindow = cfb32MapWindow; /* OK */ - pScreen->UnrealizeWindow = cfb32UnmapWindow; /* OK */ - pScreen->CopyWindow = cfb8_32CopyWindow; - pScreen->CreatePixmap = cfb32CreatePixmap; /* OK */ - pScreen->DestroyPixmap = cfb32DestroyPixmap; /* OK */ - pScreen->RealizeFont = mfbRealizeFont; - pScreen->UnrealizeFont = mfbUnrealizeFont; - pScreen->CreateGC = cfb8_32CreateGC; - pScreen->CreateColormap = miInitializeColormap; - pScreen->DestroyColormap = DestroyColormapNoop; - pScreen->InstallColormap = miInstallColormap; - pScreen->UninstallColormap = miUninstallColormap; - pScreen->ListInstalledColormaps = miListInstalledColormaps; - pScreen->StoreColors = StoreColorsNoop; - pScreen->ResolveColor = miResolveColor; - pScreen->BitmapToRegion = mfbPixmapToRegion; - - mfbRegisterCopyPlaneProc (pScreen, cfb8_32CopyPlane); - return TRUE; -} - -typedef struct { - pointer pbits; - int width; -} miScreenInitParmsRec, *miScreenInitParmsPtr; - -static Bool -cfb8_32CreateScreenResources(ScreenPtr pScreen) -{ - miScreenInitParmsPtr pScrInitParms; - int pitch; - Bool retval; - - /* get the pitch before mi destroys it */ - pScrInitParms = (miScreenInitParmsPtr)pScreen->devPrivate; - pitch = pScrInitParms->width << 2; - - if((retval = miCreateScreenResources(pScreen))) { - /* fix the screen pixmap */ - PixmapPtr pPix = (PixmapPtr)pScreen->devPrivate; - pPix->drawable.bitsPerPixel = 32; - pPix->drawable.depth = 8; - pPix->devKind = pitch; - } - - return retval; -} - - -static Bool -cfb8_32CloseScreen (int i, ScreenPtr pScreen) -{ - cfb8_32ScreenPtr pScreenPriv = CFB8_32_GET_SCREEN_PRIVATE(pScreen); - if(pScreenPriv->visualData) - xfree(pScreenPriv->visualData); - - xfree((pointer) pScreenPriv); - dixSetPrivate(&pScreen->devPrivates, cfb8_32ScreenPrivateKey, NULL); - - return(cfb32CloseScreen(i, pScreen)); -} - -static void -cfb8_32TransFunc( - ScreenPtr pScreen, - int nbox, - BoxPtr pbox -){ - cfb8_32FillBoxSolid8(&(WindowTable[pScreen->myNum]->drawable), - nbox, pbox, xf86Screens[pScreen->myNum]->colorKey); -} - -static Bool -cfb8_32InOverlayFunc(WindowPtr pWin) -{ - return (pWin->drawable.depth == 8); -} - -static Bool -cfb8_32FinishScreenInit( - ScreenPtr pScreen, - pointer pbits, /* pointer to screen bitmap */ - int xsize, int ysize, /* in pixels */ - int dpix, int dpiy, /* dots per inch */ - int width /* pixel width of frame buffer */ -){ - VisualPtr visuals; - DepthPtr depths; - int nvisuals; - int ndepths; - int rootdepth; - VisualID defaultVisual; - - rootdepth = 0; - if (!miInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth, - &defaultVisual,((unsigned long)1<<(32-1)), 8, -1)) - return FALSE; - if (! miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, - rootdepth, ndepths, depths, - defaultVisual, nvisuals, visuals)) - return FALSE; - - pScreen->CreateScreenResources = cfb8_32CreateScreenResources; - pScreen->CloseScreen = cfb8_32CloseScreen; - pScreen->GetScreenPixmap = cfb32GetScreenPixmap; /* OK */ - pScreen->SetScreenPixmap = cfb32SetScreenPixmap; /* OK */ - - if (! miInitOverlay(pScreen, cfb8_32InOverlayFunc, cfb8_32TransFunc)) - return FALSE; - - return TRUE; -} - -static void -cfb8_32EnableDisableFBAccess ( - int index, - Bool enable -){ - ScreenPtr pScreen = screenInfo.screens[index]; - cfb8_32ScreenPtr pScreenPriv = CFB8_32_GET_SCREEN_PRIVATE(pScreen); - - miOverlaySetRootClip(pScreen, enable); - - (*pScreenPriv->EnableDisableFBAccess) (index, enable); -} - -static Atom overlayVisualsAtom; - -typedef struct { - CARD32 overlay_visual; - CARD32 transparent_type; - CARD32 value; - CARD32 layer; -} overlayVisualRec; - -static void -cfb8_32SetupVisuals (ScreenPtr pScreen) -{ - cfb8_32ScreenPtr pScreenPriv = CFB8_32_GET_SCREEN_PRIVATE(pScreen); - char atomString[] = {"SERVER_OVERLAY_VISUALS"}; - overlayVisualRec *overlayVisuals; - VisualID *visuals = NULL; - int numVisuals = 0; - DepthPtr pDepth = pScreen->allowedDepths; - int numDepths = pScreen->numDepths; - int i; - - /* find depth 8 visuals */ - for(i = 0; i < numDepths; i++, pDepth++) { - if(pDepth->depth == 8) { - numVisuals = pDepth->numVids; - visuals = pDepth->vids; - break; - } - } - - if(!numVisuals || !visuals) { - ErrorF("No overlay visuals found!\n"); - return; - } - - if(!(overlayVisuals = xalloc(numVisuals * sizeof(overlayVisualRec)))) - return; - - for(i = 0; i < numVisuals; i++) { - overlayVisuals[i].overlay_visual = visuals[i]; - overlayVisuals[i].transparent_type = 1; /* transparent pixel */ - overlayVisuals[i].value = pScreenPriv->key; - overlayVisuals[i].layer = 1; - } - - overlayVisualsAtom = MakeAtom(atomString, sizeof(atomString) - 1, TRUE); - xf86RegisterRootWindowProperty(pScreen->myNum, overlayVisualsAtom, - overlayVisualsAtom, 32, numVisuals * 4, overlayVisuals); - pScreenPriv->visualData = (pointer)overlayVisuals; -} - -Bool -cfb8_32ScreenInit( - ScreenPtr pScreen, - pointer pbits, /* pointer to screen bitmap */ - int xsize, int ysize, /* in pixels */ - int dpix, int dpiy, /* dots per inch */ - int w /* pixel width of frame buffer */ -){ - cfb8_32ScreenPtr pScreenPriv; - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - - if (!cfb8_32SetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, w)) - return FALSE; - - pScreenPriv = CFB8_32_GET_SCREEN_PRIVATE(pScreen); - pScreenPriv->key = pScrn->colorKey; - pScreenPriv->visualData = NULL; - - - pScreenPriv->EnableDisableFBAccess = pScrn->EnableDisableFBAccess; - pScrn->EnableDisableFBAccess = cfb8_32EnableDisableFBAccess; - - - if(cfb8_32FinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, w)) - { - cfb8_32SetupVisuals(pScreen); - return TRUE; - } - return FALSE; -} diff --git a/xorg-server/hw/xfree86/xf8_32bpp/cfbwindow.c b/xorg-server/hw/xfree86/xf8_32bpp/cfbwindow.c deleted file mode 100644 index 2e6057f12..000000000 --- a/xorg-server/hw/xfree86/xf8_32bpp/cfbwindow.c +++ /dev/null @@ -1,116 +0,0 @@ - - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include - -#include -#include "scrnintstr.h" -#include "windowstr.h" -#define PSZ 8 -#include "cfb.h" -#undef PSZ -#include "cfb32.h" -#include "cfb8_32.h" -#include "mistruct.h" -#include "regionstr.h" -#include "cfbmskbits.h" -#include "mioverlay.h" - - -/* We don't bother with cfb's fastBackground/Border so we don't - need to use the Window privates */ - - -Bool -cfb8_32CreateWindow(WindowPtr pWin) -{ - pWin->drawable.bitsPerPixel = 32; - return TRUE; -} - - -Bool -cfb8_32DestroyWindow(WindowPtr pWin) -{ - return TRUE; -} - -Bool -cfb8_32PositionWindow( - WindowPtr pWin, - int x, int y -){ - return TRUE; -} - -void -cfb8_32CopyWindow(pWin, ptOldOrg, prgnSrc) - WindowPtr pWin; - DDXPointRec ptOldOrg; - RegionPtr prgnSrc; -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - DDXPointPtr ppt, pptSrc; - RegionRec rgnDst; - RegionPtr borderClip = &pWin->borderClip; - BoxPtr pbox; - int dx, dy, i, nbox; - WindowPtr pwinRoot; - Bool doUnderlay = miOverlayCopyUnderlay(pScreen); - Bool freeReg = FALSE; - - pwinRoot = WindowTable[pScreen->myNum]; - - if(doUnderlay) - freeReg = miOverlayCollectUnderlayRegions(pWin, &borderClip); - - REGION_NULL(pScreen, &rgnDst); - - dx = ptOldOrg.x - pWin->drawable.x; - dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); - REGION_INTERSECT(pScreen, &rgnDst, borderClip, prgnSrc); - - pbox = REGION_RECTS(&rgnDst); - nbox = REGION_NUM_RECTS(&rgnDst); - if(!nbox || - !(pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))) - { - REGION_UNINIT(pScreen, &rgnDst); - return; - } - ppt = pptSrc; - - for (i = nbox; --i >= 0; ppt++, pbox++) - { - ppt->x = pbox->x1 + dx; - ppt->y = pbox->y1 + dy; - } - - if(doUnderlay) - cfbDoBitblt24To24GXcopy((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, - GXcopy, &rgnDst, pptSrc, ~0); - else - cfbDoBitblt8To8GXcopy((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, - GXcopy, &rgnDst, pptSrc, ~0); - - xfree(pptSrc); - REGION_UNINIT(pScreen, &rgnDst); - if(freeReg) - REGION_DESTROY(pScreen, borderClip); -} - -Bool -cfb8_32ChangeWindowAttributes( - WindowPtr pWin, - unsigned long mask -){ - return TRUE; -} - - - - diff --git a/xorg-server/hw/xfree86/xf8_32bpp/xf86overlay.c b/xorg-server/hw/xfree86/xf8_32bpp/xf86overlay.c deleted file mode 100644 index c63b3cfd1..000000000 --- a/xorg-server/hw/xfree86/xf8_32bpp/xf86overlay.c +++ /dev/null @@ -1,1179 +0,0 @@ - -/* - Copyright (C) 1998. The XFree86 Project Inc. - - Written by Mark Vojkovich (mvojkovi@ucsd.edu) -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "misc.h" -#include "xf86.h" -#include "xf86_OSproc.h" - -#include -#include "scrnintstr.h" -#include "regionstr.h" -#include "windowstr.h" -#include "xf86str.h" -#include "migc.h" -#include "gcstruct.h" -#include "pixmapstr.h" -#include "colormapst.h" -#include "cfb8_32.h" - -#define IS_DIRTY 1 -#define IS_SHARED 2 - -/** Screen Functions **/ - -static Bool OverlayCloseScreen (int, ScreenPtr); -static Bool OverlayCreateGC(GCPtr pGC); -static Bool OverlayDestroyPixmap(PixmapPtr); -static PixmapPtr OverlayCreatePixmap(ScreenPtr, int, int, int, unsigned); -static Bool OverlayChangeWindowAttributes(WindowPtr, unsigned long); - -/** Funcs **/ -static void OverlayValidateGC(GCPtr, unsigned long, DrawablePtr); -static void OverlayChangeGC(GCPtr, unsigned long); -static void OverlayCopyGC(GCPtr, unsigned long, GCPtr); -static void OverlayDestroyGC(GCPtr); -static void OverlayChangeClip(GCPtr, int, pointer, int); -static void OverlayDestroyClip(GCPtr); -static void OverlayCopyClip(GCPtr, GCPtr); - - -static PixmapPtr OverlayRefreshPixmap(PixmapPtr); - -static GCFuncs OverlayGCFuncs = { - OverlayValidateGC, OverlayChangeGC, - OverlayCopyGC, OverlayDestroyGC, - OverlayChangeClip, OverlayDestroyClip, - OverlayCopyClip -}; - - -/** Pixmap Ops */ -static void PixmapFillSpans(DrawablePtr, GCPtr, int, DDXPointPtr, int *, - int); -static void PixmapSetSpans(DrawablePtr, GCPtr, char *, DDXPointPtr, - int *, int, int); -static void PixmapPutImage(DrawablePtr, GCPtr, int, int, int, int, int, - int, int, char *); -static void PixmapPushPixels(GCPtr, PixmapPtr, DrawablePtr, int, int, - int, int); -static RegionPtr PixmapCopyArea(DrawablePtr, DrawablePtr, GCPtr, int, int, - int, int, int, int); -static RegionPtr PixmapCopyPlane(DrawablePtr, DrawablePtr, GCPtr, int, int, - int, int, int, int, unsigned long); -static void PixmapPolyPoint(DrawablePtr, GCPtr, int, int, xPoint *); -static void PixmapPolylines(DrawablePtr, GCPtr, int, int, DDXPointPtr); -static void PixmapPolySegment(DrawablePtr, GCPtr, int, xSegment *); -static void PixmapPolyRectangle(DrawablePtr, GCPtr, int, xRectangle *); -static void PixmapPolyArc(DrawablePtr, GCPtr, int, xArc *); -static void PixmapFillPolygon(DrawablePtr, GCPtr, int, int, int, - DDXPointPtr); -static void PixmapPolyFillRect(DrawablePtr, GCPtr, int, xRectangle *); -static void PixmapPolyFillArc(DrawablePtr, GCPtr, int, xArc *); -static int PixmapPolyText8(DrawablePtr, GCPtr, int, int, int, char *); -static int PixmapPolyText16(DrawablePtr, GCPtr, int, int, int, - unsigned short *); -static void PixmapImageText8(DrawablePtr, GCPtr, int, int, int, char *); -static void PixmapImageText16(DrawablePtr, GCPtr, int, int, int, - unsigned short *); -static void PixmapImageGlyphBlt(DrawablePtr, GCPtr, int, int, - unsigned int, CharInfoPtr *, pointer); -static void PixmapPolyGlyphBlt(DrawablePtr, GCPtr, int, int, - unsigned int, CharInfoPtr *, pointer); - -static GCOps PixmapGCOps = { - PixmapFillSpans, PixmapSetSpans, - PixmapPutImage, PixmapCopyArea, - PixmapCopyPlane, PixmapPolyPoint, - PixmapPolylines, PixmapPolySegment, - PixmapPolyRectangle, PixmapPolyArc, - PixmapFillPolygon, PixmapPolyFillRect, - PixmapPolyFillArc, PixmapPolyText8, - PixmapPolyText16, PixmapImageText8, - PixmapImageText16, PixmapImageGlyphBlt, - PixmapPolyGlyphBlt, PixmapPushPixels, - {NULL} /* devPrivate */ -}; - - -/** Window Ops **/ -static void WindowFillSpans(DrawablePtr, GCPtr, int, DDXPointPtr, int *, - int); -static void WindowSetSpans(DrawablePtr, GCPtr, char *, DDXPointPtr, - int *, int, int); -static void WindowPutImage(DrawablePtr, GCPtr, int, int, int, int, int, - int, int, char *); -static void WindowPushPixels(GCPtr, PixmapPtr, DrawablePtr, int, int, - int, int); -static RegionPtr WindowCopyArea(DrawablePtr, DrawablePtr, GCPtr, int, int, - int, int, int, int); -static RegionPtr WindowCopyPlane(DrawablePtr, DrawablePtr, GCPtr, int, int, - int, int, int, int, unsigned long); -static void WindowPolyPoint(DrawablePtr, GCPtr, int, int, xPoint *); -static void WindowPolylines(DrawablePtr, GCPtr, int, int, DDXPointPtr); -static void WindowPolySegment(DrawablePtr, GCPtr, int, xSegment *); -static void WindowPolyRectangle(DrawablePtr, GCPtr, int, xRectangle *); -static void WindowPolyArc(DrawablePtr, GCPtr, int, xArc *); -static void WindowFillPolygon(DrawablePtr, GCPtr, int, int, int, - DDXPointPtr); -static void WindowPolyFillRect(DrawablePtr, GCPtr, int, xRectangle *); -static void WindowPolyFillArc(DrawablePtr, GCPtr, int, xArc *); -static int WindowPolyText8(DrawablePtr, GCPtr, int, int, int, char *); -static int WindowPolyText16(DrawablePtr, GCPtr, int, int, int, - unsigned short *); -static void WindowImageText8(DrawablePtr, GCPtr, int, int, int, char *); -static void WindowImageText16(DrawablePtr, GCPtr, int, int, int, - unsigned short *); -static void WindowImageGlyphBlt(DrawablePtr, GCPtr, int, int, - unsigned int, CharInfoPtr *, pointer); -static void WindowPolyGlyphBlt(DrawablePtr, GCPtr, int, int, - unsigned int, CharInfoPtr *, pointer); - -static GCOps WindowGCOps = { - WindowFillSpans, WindowSetSpans, - WindowPutImage, WindowCopyArea, - WindowCopyPlane, WindowPolyPoint, - WindowPolylines, WindowPolySegment, - WindowPolyRectangle, WindowPolyArc, - WindowFillPolygon, WindowPolyFillRect, - WindowPolyFillArc, WindowPolyText8, - WindowPolyText16, WindowImageText8, - WindowImageText16, WindowImageGlyphBlt, - WindowPolyGlyphBlt, WindowPushPixels, - {NULL} /* devPrivate */ -}; - -/** privates **/ - -typedef struct { - CloseScreenProcPtr CloseScreen; - CreateGCProcPtr CreateGC; - CreatePixmapProcPtr CreatePixmap; - DestroyPixmapProcPtr DestroyPixmap; - ChangeWindowAttributesProcPtr ChangeWindowAttributes; - int LockPrivate; -} OverlayScreenRec, *OverlayScreenPtr; - -typedef struct { - GCFuncs *wrapFuncs; - GCOps *wrapOps; - GCOps *overlayOps; - unsigned long fg; - unsigned long bg; - unsigned long pm; - PixmapPtr tile; -} OverlayGCRec, *OverlayGCPtr; - -typedef struct { - PixmapPtr pix32; - CARD32 dirty; -} OverlayPixmapRec, *OverlayPixmapPtr; - - -static DevPrivateKey OverlayScreenKey = &OverlayScreenKey; -static DevPrivateKey OverlayGCKey = &OverlayGCKey; -static DevPrivateKey OverlayPixmapKey = &OverlayPixmapKey; - -/** Macros **/ - -#define TILE_EXISTS(pGC) (!(pGC)->tileIsPixel && (pGC)->tile.pixmap) - -#define OVERLAY_GET_PIXMAP_PRIVATE(pPix) ((OverlayPixmapPtr) \ - dixLookupPrivate(&(pPix)->devPrivates, OverlayPixmapKey)) - -#define OVERLAY_GET_SCREEN_PRIVATE(pScreen) ((OverlayScreenPtr) \ - dixLookupPrivate(&(pScreen)->devPrivates, OverlayScreenKey)) - -#define OVERLAY_GET_GC_PRIVATE(pGC) ((OverlayGCPtr) \ - dixLookupPrivate(&(pGC)->devPrivates, OverlayGCKey)) - -#define OVERLAY_GC_FUNC_PROLOGUE(pGC)\ - OverlayGCPtr pGCPriv = OVERLAY_GET_GC_PRIVATE(pGC);\ - (pGC)->funcs = pGCPriv->wrapFuncs;\ - if(pGCPriv->overlayOps) \ - (pGC)->ops = pGCPriv->wrapOps - -#define OVERLAY_GC_FUNC_EPILOGUE(pGC)\ - pGCPriv->wrapFuncs = (pGC)->funcs;\ - (pGC)->funcs = &OverlayGCFuncs;\ - if(pGCPriv->overlayOps) { \ - pGCPriv->wrapOps = (pGC)->ops;\ - (pGC)->ops = pGCPriv->overlayOps;\ - } - -#define WINDOW_GC_OP_PROLOGUE(pGC)\ - OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE((pGC)->pScreen);\ - OverlayGCPtr pGCPriv = OVERLAY_GET_GC_PRIVATE(pGC);\ - unsigned long oldfg = (pGC)->fgPixel;\ - unsigned long oldbg = (pGC)->bgPixel;\ - unsigned long oldpm = (pGC)->planemask;\ - PixmapPtr oldtile = (pGC)->tile.pixmap;\ - (pGC)->fgPixel = pGCPriv->fg;\ - (pGC)->bgPixel = pGCPriv->bg;\ - (pGC)->planemask = pGCPriv->pm;\ - if(pGCPriv->tile) (pGC)->tile.pixmap = pGCPriv->tile;\ - (pGC)->funcs = pGCPriv->wrapFuncs;\ - (pGC)->ops = pGCPriv->wrapOps;\ - pScreenPriv->LockPrivate++ - - -#define WINDOW_GC_OP_EPILOGUE(pGC)\ - pGCPriv->wrapOps = (pGC)->ops;\ - pGCPriv->wrapFuncs = (pGC)->funcs;\ - (pGC)->fgPixel = oldfg;\ - (pGC)->bgPixel = oldbg;\ - (pGC)->planemask = oldpm;\ - (pGC)->tile.pixmap = oldtile;\ - (pGC)->funcs = &OverlayGCFuncs;\ - (pGC)->ops = &WindowGCOps;\ - pScreenPriv->LockPrivate-- - - -#define PIXMAP_GC_OP_PROLOGUE(pGC)\ - OverlayGCPtr pGCPriv = OVERLAY_GET_GC_PRIVATE(pGC);\ - OverlayPixmapPtr pPixPriv = OVERLAY_GET_PIXMAP_PRIVATE((PixmapPtr)pDraw);\ - pGC->funcs = pGCPriv->wrapFuncs;\ - pGC->ops = pGCPriv->wrapOps - -#define PIXMAP_GC_OP_EPILOGUE(pGC)\ - pGCPriv->wrapOps = pGC->ops;\ - pGC->funcs = &OverlayGCFuncs;\ - pGC->ops = &PixmapGCOps;\ - pPixPriv->dirty |= IS_DIRTY - - -Bool -xf86Overlay8Plus32Init (ScreenPtr pScreen) -{ - OverlayScreenPtr pScreenPriv; - - if (!dixRequestPrivate(OverlayGCKey, sizeof(OverlayGCRec))) - return FALSE; - - if (!dixRequestPrivate(OverlayPixmapKey, sizeof(OverlayPixmapRec))) - return FALSE; - - if (!(pScreenPriv = xalloc(sizeof(OverlayScreenRec)))) - return FALSE; - - dixSetPrivate(&pScreen->devPrivates, OverlayScreenKey, pScreenPriv); - - pScreenPriv->CreateGC = pScreen->CreateGC; - pScreenPriv->CloseScreen = pScreen->CloseScreen; - pScreenPriv->CreatePixmap = pScreen->CreatePixmap; - pScreenPriv->DestroyPixmap = pScreen->DestroyPixmap; - pScreenPriv->ChangeWindowAttributes = pScreen->ChangeWindowAttributes; - - pScreen->CreateGC = OverlayCreateGC; - pScreen->CloseScreen = OverlayCloseScreen; - pScreen->CreatePixmap = OverlayCreatePixmap; - pScreen->DestroyPixmap = OverlayDestroyPixmap; - pScreen->ChangeWindowAttributes = OverlayChangeWindowAttributes; - - pScreenPriv->LockPrivate = 0; - - /* allocate the key in the default map */ - if(pScreen->defColormap) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - ColormapPtr pmap; - xColorItem color; - - pmap = (ColormapPtr)LookupIDByType(pScreen->defColormap, RT_COLORMAP); - - pmap->red[pScrn->colorKey].refcnt = AllocPrivate; - pmap->red[pScrn->colorKey].fShared = FALSE; - pmap->freeRed--; - - color.red = color.blue = color.green = 0; - color.pixel = pScrn->colorKey; - color.flags = DoRed | DoGreen | DoBlue; - - StoreColors(pmap, 1, &color); - } - - return TRUE; -} - - -/*********************** Screen Funcs ***********************/ - -Bool -OverlayCreateGC(GCPtr pGC) -{ - ScreenPtr pScreen = pGC->pScreen; - OverlayGCPtr pGCPriv = OVERLAY_GET_GC_PRIVATE(pGC); - OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pScreen); - Bool ret; - - pScreen->CreateGC = pScreenPriv->CreateGC; - - if((ret = (*pScreen->CreateGC)(pGC)) && (pGC->depth != 1)) { - pGCPriv->wrapFuncs = pGC->funcs; - pGC->funcs = &OverlayGCFuncs; - pGCPriv->wrapOps = NULL; - pGCPriv->overlayOps = NULL; - pGCPriv->tile = NULL; - } - - pScreen->CreateGC = OverlayCreateGC; - - return ret; -} - -static PixmapPtr -OverlayCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, - unsigned usage_hint) -{ - OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pScreen); - PixmapPtr pPix; - - pScreen->CreatePixmap = pScreenPriv->CreatePixmap; - pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, usage_hint); - pScreen->CreatePixmap = OverlayCreatePixmap; - - /* We initialize all the privates */ - if(pPix) { - OverlayPixmapPtr pPriv = OVERLAY_GET_PIXMAP_PRIVATE(pPix); - pPriv->pix32 = NULL; - pPriv->dirty = IS_DIRTY; - if(!w || !h) - pPriv->dirty |= IS_SHARED; - } - - return pPix; -} - -static Bool -OverlayDestroyPixmap(PixmapPtr pPix) -{ - ScreenPtr pScreen = pPix->drawable.pScreen; - OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pScreen); - Bool result; - - pScreen->DestroyPixmap = pScreenPriv->DestroyPixmap; - - if((pPix->refcnt == 1) && (pPix->drawable.bitsPerPixel == 8)) { - OverlayPixmapPtr pPriv = OVERLAY_GET_PIXMAP_PRIVATE(pPix); - if(pPriv->pix32) { - if(pPriv->pix32->refcnt != 1) - ErrorF("Warning! private pix refcnt = %i\n", pPriv->pix32->refcnt); - (*pScreen->DestroyPixmap)(pPriv->pix32); - } - pPriv->pix32 = NULL; - } - - result = (*pScreen->DestroyPixmap) (pPix); - pScreen->DestroyPixmap = OverlayDestroyPixmap; - - return result; -} - -static Bool -OverlayCloseScreen (int i, ScreenPtr pScreen) -{ - OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pScreen); - - pScreen->CreateGC = pScreenPriv->CreateGC; - pScreen->CloseScreen = pScreenPriv->CloseScreen; - pScreen->CreatePixmap = pScreenPriv->CreatePixmap; - pScreen->DestroyPixmap = pScreenPriv->DestroyPixmap; - pScreen->ChangeWindowAttributes = pScreenPriv->ChangeWindowAttributes; - - xfree ((pointer) pScreenPriv); - - return (*pScreen->CloseScreen) (i, pScreen); -} - - - -static Bool -OverlayChangeWindowAttributes (WindowPtr pWin, unsigned long mask) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pScreen); - Bool result; - - if(pWin->drawable.depth == 8) { - if((mask & CWBackPixmap) && - (pWin->backgroundState == BackgroundPixmap)) - OverlayRefreshPixmap(pWin->background.pixmap); - - if((mask & CWBorderPixmap) && !pWin->borderIsPixel) - OverlayRefreshPixmap(pWin->border.pixmap); - } - - pScreen->ChangeWindowAttributes = pScreenPriv->ChangeWindowAttributes; - result = (*pScreen->ChangeWindowAttributes) (pWin, mask); - pScreen->ChangeWindowAttributes = OverlayChangeWindowAttributes; - - return result; -} - -/*********************** GC Funcs *****************************/ - - -static PixmapPtr -OverlayRefreshPixmap(PixmapPtr pix8) -{ - OverlayPixmapPtr pixPriv = OVERLAY_GET_PIXMAP_PRIVATE(pix8); - ScreenPtr pScreen = pix8->drawable.pScreen; - - if(!pixPriv->pix32) { - PixmapPtr newPix; - - newPix = (*pScreen->CreatePixmap)(pScreen, pix8->drawable.width, - pix8->drawable.height, 24, 0); - newPix->drawable.depth = 8; /* Bad Mark! Bad Mark! */ - pixPriv->pix32 = newPix; - } - - if(pixPriv->dirty) { - OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pScreen); - GCPtr pGC; - - pGC = GetScratchGC(8, pScreen); - - pScreenPriv->LockPrivate++; /* don't modify this one */ - ValidateGC((DrawablePtr)pixPriv->pix32, pGC); - - (*pGC->ops->CopyArea)((DrawablePtr)pix8, (DrawablePtr)pixPriv->pix32, - pGC, 0, 0, pix8->drawable.width, pix8->drawable.height, 0, 0); - pScreenPriv->LockPrivate--; - FreeScratchGC(pGC); - - pixPriv->dirty &= ~IS_DIRTY; - pixPriv->pix32->drawable.serialNumber = NEXT_SERIAL_NUMBER; - } - - return pixPriv->pix32; -} - - -static void -OverlayValidateGC( - GCPtr pGC, - unsigned long changes, - DrawablePtr pDraw -){ - OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pGC->pScreen); - OVERLAY_GC_FUNC_PROLOGUE (pGC); - - if(pScreenPriv->LockPrivate < 0) { - ErrorF("Something is wrong in OverlayValidateGC!\n"); - pScreenPriv->LockPrivate = 0; - } - - if(pGC->depth == 24) { - unsigned long oldpm = pGC->planemask; - pGCPriv->overlayOps = NULL; - - if(pDraw->type == DRAWABLE_WINDOW) - pGC->planemask &= 0x00ffffff; - else - pGC->planemask |= 0xff000000; - - if(oldpm != pGC->planemask) changes |= GCPlaneMask; - - (*pGC->funcs->ValidateGC)(pGC, changes, pDraw); - - } else { /* depth == 8 */ - unsigned long newChanges = 0; - - if(pDraw->bitsPerPixel == 32) { - - if(pGC->fillStyle == FillTiled) - pGCPriv->tile = OverlayRefreshPixmap(pGC->tile.pixmap); - else pGCPriv->tile = NULL; - - if(pGCPriv->overlayOps != &WindowGCOps) { - newChanges = GCForeground | GCBackground | GCPlaneMask; - if(pGCPriv->tile) - newChanges |= GCTile; - } - pGCPriv->overlayOps = &WindowGCOps; - - if(!pScreenPriv->LockPrivate) { - unsigned long oldfg = pGC->fgPixel; - unsigned long oldbg = pGC->bgPixel; - unsigned long oldpm = pGC->planemask; - PixmapPtr oldtile = pGC->tile.pixmap; - - pGC->fgPixel = pGCPriv->fg = oldfg << 24; - pGC->bgPixel = pGCPriv->bg = oldbg << 24; - pGC->planemask = pGCPriv->pm = oldpm << 24; - if(pGCPriv->tile) - pGC->tile.pixmap = pGCPriv->tile; - - (*pGC->funcs->ValidateGC)(pGC, changes | newChanges, pDraw); - - pGC->fgPixel = oldfg; - pGC->bgPixel = oldbg; - pGC->planemask = oldpm; - pGC->tile.pixmap = oldtile; - } else { - pGCPriv->fg = pGC->fgPixel; - pGCPriv->bg = pGC->bgPixel; - pGCPriv->pm = pGC->planemask; - - (*pGC->funcs->ValidateGC)(pGC, changes | newChanges, pDraw); - } - - } else { /* bitsPerPixel == 8 */ - if(pGCPriv->overlayOps == &WindowGCOps) { - newChanges = GCForeground | GCBackground | GCPlaneMask; - if(pGCPriv->tile) - newChanges |= GCTile; - } - pGCPriv->overlayOps = &PixmapGCOps; - - (*pGC->funcs->ValidateGC)(pGC, changes | newChanges, pDraw); - } - } - - OVERLAY_GC_FUNC_EPILOGUE (pGC); -} - - -static void -OverlayDestroyGC(GCPtr pGC) -{ - OVERLAY_GC_FUNC_PROLOGUE (pGC); - (*pGC->funcs->DestroyGC)(pGC); - OVERLAY_GC_FUNC_EPILOGUE (pGC); -} - -static void -OverlayChangeGC ( - GCPtr pGC, - unsigned long mask -){ - OVERLAY_GC_FUNC_PROLOGUE (pGC); - (*pGC->funcs->ChangeGC) (pGC, mask); - OVERLAY_GC_FUNC_EPILOGUE (pGC); -} - -static void -OverlayCopyGC ( - GCPtr pGCSrc, - unsigned long mask, - GCPtr pGCDst -){ - OVERLAY_GC_FUNC_PROLOGUE (pGCDst); - (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); - OVERLAY_GC_FUNC_EPILOGUE (pGCDst); -} -static void -OverlayChangeClip ( - GCPtr pGC, - int type, - pointer pvalue, - int nrects -){ - OVERLAY_GC_FUNC_PROLOGUE (pGC); - (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); - OVERLAY_GC_FUNC_EPILOGUE (pGC); -} - -static void -OverlayCopyClip(GCPtr pgcDst, GCPtr pgcSrc) -{ - OVERLAY_GC_FUNC_PROLOGUE (pgcDst); - (* pgcDst->funcs->CopyClip)(pgcDst, pgcSrc); - OVERLAY_GC_FUNC_EPILOGUE (pgcDst); -} - -static void -OverlayDestroyClip(GCPtr pGC) -{ - OVERLAY_GC_FUNC_PROLOGUE (pGC); - (* pGC->funcs->DestroyClip)(pGC); - OVERLAY_GC_FUNC_EPILOGUE (pGC); -} - - - -/******************* Window GC ops ***********************/ - -static void -WindowFillSpans( - DrawablePtr pDraw, - GC *pGC, - int nInit, - DDXPointPtr pptInit, - int *pwidthInit, - int fSorted -){ - WINDOW_GC_OP_PROLOGUE(pGC); - (*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted); - WINDOW_GC_OP_EPILOGUE(pGC); -} - -static void -WindowSetSpans( - DrawablePtr pDraw, - GCPtr pGC, - char *pcharsrc, - register DDXPointPtr ppt, - int *pwidth, - int nspans, - int fSorted -){ - WINDOW_GC_OP_PROLOGUE(pGC); - (*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, ppt, pwidth, nspans, fSorted); - WINDOW_GC_OP_EPILOGUE(pGC); -} - -static void -WindowPutImage( - DrawablePtr pDraw, - GCPtr pGC, - int depth, - int x, int y, int w, int h, - int leftPad, - int format, - char *pImage -){ - WINDOW_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h, - leftPad, format, pImage); - WINDOW_GC_OP_EPILOGUE(pGC); -} - -static RegionPtr -WindowCopyArea( - DrawablePtr pSrc, - DrawablePtr pDst, - GC *pGC, - int srcx, int srcy, - int width, int height, - int dstx, int dsty -){ - RegionPtr ret; - - WINDOW_GC_OP_PROLOGUE(pGC); - ret = (*pGC->ops->CopyArea)(pSrc, pDst, - pGC, srcx, srcy, width, height, dstx, dsty); - WINDOW_GC_OP_EPILOGUE(pGC); - return ret; -} - -static RegionPtr -WindowCopyPlane( - DrawablePtr pSrc, - DrawablePtr pDst, - GCPtr pGC, - int srcx, int srcy, - int width, int height, - int dstx, int dsty, - unsigned long bitPlane -){ - RegionPtr ret; - - WINDOW_GC_OP_PROLOGUE(pGC); - ret = (*pGC->ops->CopyPlane)(pSrc, pDst, - pGC, srcx, srcy, width, height, dstx, dsty, bitPlane); - WINDOW_GC_OP_EPILOGUE(pGC); - return ret; -} - -static void -WindowPolyPoint( - DrawablePtr pDraw, - GCPtr pGC, - int mode, - int npt, - xPoint *pptInit -){ - WINDOW_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit); - WINDOW_GC_OP_EPILOGUE(pGC); -} - -static void -WindowPolylines( - DrawablePtr pDraw, - GCPtr pGC, - int mode, - int npt, - DDXPointPtr pptInit -){ - WINDOW_GC_OP_PROLOGUE(pGC); - (*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit); - WINDOW_GC_OP_EPILOGUE(pGC); -} - -static void -WindowPolySegment( - DrawablePtr pDraw, - GCPtr pGC, - int nseg, - xSegment *pSeg -){ - WINDOW_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg); - WINDOW_GC_OP_EPILOGUE(pGC); -} - -static void -WindowPolyRectangle( - DrawablePtr pDraw, - GCPtr pGC, - int nRectsInit, - xRectangle *pRectsInit -){ - WINDOW_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PolyRectangle)(pDraw, pGC, nRectsInit, pRectsInit); - WINDOW_GC_OP_EPILOGUE(pGC); -} - -static void -WindowPolyArc( - DrawablePtr pDraw, - GCPtr pGC, - int narcs, - xArc *parcs -){ - WINDOW_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs); - WINDOW_GC_OP_EPILOGUE(pGC); -} - -static void -WindowFillPolygon( - DrawablePtr pDraw, - GCPtr pGC, - int shape, - int mode, - int count, - DDXPointPtr ptsIn -){ - WINDOW_GC_OP_PROLOGUE(pGC); - (*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, ptsIn); - WINDOW_GC_OP_EPILOGUE(pGC); -} - -static void -WindowPolyFillRect( - DrawablePtr pDraw, - GCPtr pGC, - int nrectFill, - xRectangle *prectInit -){ - WINDOW_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PolyFillRect)(pDraw, pGC, nrectFill, prectInit); - WINDOW_GC_OP_EPILOGUE(pGC); -} - -static void -WindowPolyFillArc( - DrawablePtr pDraw, - GCPtr pGC, - int narcs, - xArc *parcs -){ - WINDOW_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs); - WINDOW_GC_OP_EPILOGUE(pGC); -} - -static int -WindowPolyText8( - DrawablePtr pDraw, - GCPtr pGC, - int x, - int y, - int count, - char *chars -){ - int ret; - - WINDOW_GC_OP_PROLOGUE(pGC); - ret = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars); - WINDOW_GC_OP_EPILOGUE(pGC); - return ret; -} - -static int -WindowPolyText16( - DrawablePtr pDraw, - GCPtr pGC, - int x, - int y, - int count, - unsigned short *chars -){ - int ret; - - WINDOW_GC_OP_PROLOGUE(pGC); - ret = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars); - WINDOW_GC_OP_EPILOGUE(pGC); - return ret; -} - -static void -WindowImageText8( - DrawablePtr pDraw, - GCPtr pGC, - int x, - int y, - int count, - char *chars -){ - WINDOW_GC_OP_PROLOGUE(pGC); - (*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars); - WINDOW_GC_OP_EPILOGUE(pGC); -} - -static void -WindowImageText16( - DrawablePtr pDraw, - GCPtr pGC, - int x, - int y, - int count, - unsigned short *chars -){ - WINDOW_GC_OP_PROLOGUE(pGC); - (*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars); - WINDOW_GC_OP_EPILOGUE(pGC); -} - -static void -WindowImageGlyphBlt( - DrawablePtr pDraw, - GCPtr pGC, - int xInit, int yInit, - unsigned int nglyph, - CharInfoPtr *ppci, - pointer pglyphBase -){ - WINDOW_GC_OP_PROLOGUE(pGC); - (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, xInit, yInit, nglyph, - ppci, pglyphBase); - WINDOW_GC_OP_EPILOGUE(pGC); -} - -static void -WindowPolyGlyphBlt( - DrawablePtr pDraw, - GCPtr pGC, - int xInit, int yInit, - unsigned int nglyph, - CharInfoPtr *ppci, - pointer pglyphBase -){ - WINDOW_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PolyGlyphBlt)(pDraw, pGC, xInit, yInit, nglyph, - ppci, pglyphBase); - WINDOW_GC_OP_EPILOGUE(pGC); -} - -static void -WindowPushPixels( - GCPtr pGC, - PixmapPtr pBitMap, - DrawablePtr pDraw, - int dx, int dy, int xOrg, int yOrg -){ - WINDOW_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg); - WINDOW_GC_OP_EPILOGUE(pGC); -} - - -/******************* Pixmap GC ops ***********************/ - -static void -PixmapFillSpans( - DrawablePtr pDraw, - GC *pGC, - int nInit, - DDXPointPtr pptInit, - int *pwidthInit, - int fSorted -){ - PIXMAP_GC_OP_PROLOGUE(pGC); - (*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted); - PIXMAP_GC_OP_EPILOGUE(pGC); -} - -static void -PixmapSetSpans( - DrawablePtr pDraw, - GCPtr pGC, - char *pcharsrc, - register DDXPointPtr ppt, - int *pwidth, - int nspans, - int fSorted -){ - PIXMAP_GC_OP_PROLOGUE(pGC); - (*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, ppt, pwidth, nspans, fSorted); - PIXMAP_GC_OP_EPILOGUE(pGC); -} - -static void -PixmapPutImage( - DrawablePtr pDraw, - GCPtr pGC, - int depth, - int x, int y, int w, int h, - int leftPad, - int format, - char *pImage -){ - PIXMAP_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h, - leftPad, format, pImage); - PIXMAP_GC_OP_EPILOGUE(pGC); -} - -static RegionPtr -PixmapCopyArea( - DrawablePtr pSrc, - DrawablePtr pDraw, - GC *pGC, - int srcx, int srcy, - int width, int height, - int dstx, int dsty -){ - RegionPtr ret; - - PIXMAP_GC_OP_PROLOGUE(pGC); - ret = (*pGC->ops->CopyArea)(pSrc, pDraw, - pGC, srcx, srcy, width, height, dstx, dsty); - PIXMAP_GC_OP_EPILOGUE(pGC); - return ret; -} - -static RegionPtr -PixmapCopyPlane( - DrawablePtr pSrc, - DrawablePtr pDraw, - GCPtr pGC, - int srcx, int srcy, - int width, int height, - int dstx, int dsty, - unsigned long bitPlane -){ - RegionPtr ret; - - PIXMAP_GC_OP_PROLOGUE(pGC); - ret = (*pGC->ops->CopyPlane)(pSrc, pDraw, - pGC, srcx, srcy, width, height, dstx, dsty, bitPlane); - PIXMAP_GC_OP_EPILOGUE(pGC); - return ret; -} - -static void -PixmapPolyPoint( - DrawablePtr pDraw, - GCPtr pGC, - int mode, - int npt, - xPoint *pptInit -){ - PIXMAP_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit); - PIXMAP_GC_OP_EPILOGUE(pGC); -} - -static void -PixmapPolylines( - DrawablePtr pDraw, - GCPtr pGC, - int mode, - int npt, - DDXPointPtr pptInit -){ - PIXMAP_GC_OP_PROLOGUE(pGC); - (*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit); - PIXMAP_GC_OP_EPILOGUE(pGC); -} - -static void -PixmapPolySegment( - DrawablePtr pDraw, - GCPtr pGC, - int nseg, - xSegment *pSeg -){ - PIXMAP_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg); - PIXMAP_GC_OP_EPILOGUE(pGC); -} - -static void -PixmapPolyRectangle( - DrawablePtr pDraw, - GCPtr pGC, - int nRectsInit, - xRectangle *pRectsInit -){ - PIXMAP_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PolyRectangle)(pDraw, pGC, nRectsInit, pRectsInit); - PIXMAP_GC_OP_EPILOGUE(pGC); -} - -static void -PixmapPolyArc( - DrawablePtr pDraw, - GCPtr pGC, - int narcs, - xArc *parcs -){ - PIXMAP_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs); - PIXMAP_GC_OP_EPILOGUE(pGC); -} - -static void -PixmapFillPolygon( - DrawablePtr pDraw, - GCPtr pGC, - int shape, - int mode, - int count, - DDXPointPtr ptsIn -){ - PIXMAP_GC_OP_PROLOGUE(pGC); - (*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, ptsIn); - PIXMAP_GC_OP_EPILOGUE(pGC); -} - -static void -PixmapPolyFillRect( - DrawablePtr pDraw, - GCPtr pGC, - int nrectFill, - xRectangle *prectInit -){ - PIXMAP_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PolyFillRect)(pDraw, pGC, nrectFill, prectInit); - PIXMAP_GC_OP_EPILOGUE(pGC); -} - -static void -PixmapPolyFillArc( - DrawablePtr pDraw, - GCPtr pGC, - int narcs, - xArc *parcs -){ - PIXMAP_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs); - PIXMAP_GC_OP_EPILOGUE(pGC); -} - -static int -PixmapPolyText8( - DrawablePtr pDraw, - GCPtr pGC, - int x, - int y, - int count, - char *chars -){ - int ret; - - PIXMAP_GC_OP_PROLOGUE(pGC); - ret = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars); - PIXMAP_GC_OP_EPILOGUE(pGC); - return ret; -} - -static int -PixmapPolyText16( - DrawablePtr pDraw, - GCPtr pGC, - int x, - int y, - int count, - unsigned short *chars -){ - int ret; - - PIXMAP_GC_OP_PROLOGUE(pGC); - ret = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars); - PIXMAP_GC_OP_EPILOGUE(pGC); - return ret; -} - -static void -PixmapImageText8( - DrawablePtr pDraw, - GCPtr pGC, - int x, - int y, - int count, - char *chars -){ - PIXMAP_GC_OP_PROLOGUE(pGC); - (*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars); - PIXMAP_GC_OP_EPILOGUE(pGC); -} - -static void -PixmapImageText16( - DrawablePtr pDraw, - GCPtr pGC, - int x, - int y, - int count, - unsigned short *chars -){ - PIXMAP_GC_OP_PROLOGUE(pGC); - (*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars); - PIXMAP_GC_OP_EPILOGUE(pGC); -} - -static void -PixmapImageGlyphBlt( - DrawablePtr pDraw, - GCPtr pGC, - int xInit, int yInit, - unsigned int nglyph, - CharInfoPtr *ppci, - pointer pglyphBase -){ - PIXMAP_GC_OP_PROLOGUE(pGC); - (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, xInit, yInit, nglyph, - ppci, pglyphBase); - PIXMAP_GC_OP_EPILOGUE(pGC); -} - -static void -PixmapPolyGlyphBlt( - DrawablePtr pDraw, - GCPtr pGC, - int xInit, int yInit, - unsigned int nglyph, - CharInfoPtr *ppci, - pointer pglyphBase -){ - PIXMAP_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PolyGlyphBlt)(pDraw, pGC, xInit, yInit, nglyph, - ppci, pglyphBase); - PIXMAP_GC_OP_EPILOGUE(pGC); -} - -static void -PixmapPushPixels( - GCPtr pGC, - PixmapPtr pBitMap, - DrawablePtr pDraw, - int dx, int dy, int xOrg, int yOrg -){ - PIXMAP_GC_OP_PROLOGUE(pGC); - (*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg); - PIXMAP_GC_OP_EPILOGUE(pGC); -} - - -- cgit v1.2.3