aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/os-support/bsd
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/os-support/bsd')
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/Makefile.am27
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/Makefile.in132
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/alpha_video.c18
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/arm_video.c21
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsdResource.c92
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_axp.c2
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_init.c107
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_jstk.c183
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_mouse.c791
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/i386_video.c98
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/libusb/data.c92
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/libusb/descr.c73
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/libusb/parse.c401
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/libusb/usage.c196
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/libusb/usb.3191
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/libusb/usb.h92
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/libusb/usb_hid_usages1079
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/libusb/usbvar.h31
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/ppc_video.c18
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c18
20 files changed, 125 insertions, 3537 deletions
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 <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#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 <sys/param.h>
#include "xf86_OSlib.h"
#include <stdio.h>
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. <fred@sugix.frmug.fr.net>
- *
- * 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 <dawes@XFree86.org> */
-
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <machine/joystick.h>
-#include <fcntl.h>
-
-#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 <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#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 <dev/wscons/wsconsio.h>
-#endif
-#ifdef USBMOUSE_SUPPORT
-#ifdef HAS_LIB_USB_HID
-#include <usbhid.h>
-#else
-#include "usb.h"
-#endif
-
-#include <dev/usb/usb.h>
-#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 <machine/mtrr.h>
-#include <machine/sysarch.h>
-#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
@@ -229,10 +219,6 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
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 <augustss@netbsd.org>
- * 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 <xorg-config.h>
-#endif
-
-#include <assert.h>
-#include <stdlib.h>
-#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 <augustss@netbsd.org>
- * 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 <xorg-config.h>
-#endif
-
-#include <sys/types.h>
-
-#include <assert.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/time.h>
-
-#include <dev/usb/usb.h>
-
-#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 <augustss@netbsd.org>
- * 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 <xorg-config.h>
-#endif
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/time.h>
-
-#include <dev/usb/usb.h>
-#include <dev/usb/usbhid.h>
-
-#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<<k); hid_get_item(d, &h); ) {
- if (h.report_ID != 0) {
- if (idp)
- *idp = h.report_ID;
- id = 8;
- }
- }
- hid_end_parse(d);
- size = h.pos + id;
- return ((size + 7) / 8);
-}
-
-int
-hid_locate(desc, u, k, h)
- report_desc_t desc;
- unsigned int u;
- enum hid_kind k;
- hid_item_t *h;
-{
- hid_data_t d;
-
- _DIAGASSERT(desc != NULL);
- _DIAGASSERT(h != NULL);
-
- for (d = hid_start_parse(desc, 1<<k); hid_get_item(d, h); ) {
- if (h->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 <augustss@netbsd.org>
- * 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 <xorg-config.h>
-#endif
-
-#include <ctype.h>
-#include <err.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#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 <augustss@netbsd.org>
-.\" 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 <usb.h>
-.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 <usb.h>
-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 <augustss@netbsd.org>
- * 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 <augustss@netbsd.org>
- * 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;
-}