summaryrefslogtreecommitdiff
path: root/hw/xfree86/os-support/shared
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2006-12-08 17:24:15 -0800
committerIan Romanick <idr@us.ibm.com>2006-12-08 17:24:15 -0800
commite1f73d220873fa091695e46b7fcd008663a95a6f (patch)
treee6e58038b6aea53eca32326a903de4074600df54 /hw/xfree86/os-support/shared
parent27d682fa030501611a5b52f41f29738134b45c0b (diff)
parentd56249a15ead51ad4d2117d5538ada24af05b693 (diff)
Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework
Conflicts: hw/xfree86/common/xf86Configure.c hw/xfree86/common/xf86Helper.c hw/xfree86/common/xf86pciBus.c hw/xfree86/int10/helper_exec.c hw/xfree86/os-support/bus/Pci.c hw/xfree86/os-support/bus/linuxPci.c hw/xfree86/os-support/linux/lnx_pci.c hw/xfree86/scanpci/Makefile.am hw/xfree86/utils/pcitweak/Makefile.am hw/xfree86/utils/scanpci/Makefile.am
Diffstat (limited to 'hw/xfree86/os-support/shared')
-rw-r--r--hw/xfree86/os-support/shared/at_scancode.c131
-rw-r--r--hw/xfree86/os-support/shared/kbd.c38
-rw-r--r--hw/xfree86/os-support/shared/std_kbdEv.c49
-rw-r--r--hw/xfree86/os-support/shared/sysv_kbd.c105
4 files changed, 0 insertions, 323 deletions
diff --git a/hw/xfree86/os-support/shared/at_scancode.c b/hw/xfree86/os-support/shared/at_scancode.c
deleted file mode 100644
index 10d3da2ba..000000000
--- a/hw/xfree86/os-support/shared/at_scancode.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2002-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 "xf86.h"
-#include "xf86Xinput.h"
-#include "xf86OSKbd.h"
-#include "atKeynames.h"
-
-Bool
-ATScancode(InputInfoPtr pInfo, int *scanCode)
-{
- KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
-
- switch (pKbd->scanPrefix) {
- case 0:
- switch (*scanCode) {
- case KEY_Prefix0:
- case KEY_Prefix1:
- pKbd->scanPrefix = *scanCode; /* special prefixes */
- return TRUE;
- }
- if (!xf86IsPc98()) {
- switch (*scanCode) {
- case 0x59: *scanCode = KEY_0x59; break;
- case 0x5a: *scanCode = KEY_0x5A; break;
- case 0x5b: *scanCode = KEY_0x5B; break;
- case 0x5c: *scanCode = KEY_KP_Equal; break; /* Keypad Equal */
- case 0x5d: *scanCode = KEY_0x5D; break;
- case 0x5e: *scanCode = KEY_0x5E; break;
- case 0x5f: *scanCode = KEY_0x5F; break;
- case 0x62: *scanCode = KEY_0x62; break;
- case 0x63: *scanCode = KEY_0x63; break;
- case 0x64: *scanCode = KEY_0x64; break;
- case 0x65: *scanCode = KEY_0x65; break;
- case 0x66: *scanCode = KEY_0x66; break;
- case 0x67: *scanCode = KEY_0x67; break;
- case 0x68: *scanCode = KEY_0x68; break;
- case 0x69: *scanCode = KEY_0x69; break;
- case 0x6a: *scanCode = KEY_0x6A; break;
- case 0x6b: *scanCode = KEY_0x6B; break;
- case 0x6c: *scanCode = KEY_0x6C; break;
- case 0x6d: *scanCode = KEY_0x6D; break;
- case 0x6e: *scanCode = KEY_0x6E; break;
- case 0x6f: *scanCode = KEY_0x6F; break;
- case 0x70: *scanCode = KEY_0x70; break;
- case 0x71: *scanCode = KEY_0x71; break;
- case 0x72: *scanCode = KEY_0x72; break;
- case 0x73: *scanCode = KEY_0x73; break;
- case 0x74: *scanCode = KEY_0x74; break;
- case 0x75: *scanCode = KEY_0x75; break;
- case 0x76: *scanCode = KEY_0x76; break;
- }
- }
- break;
- case KEY_Prefix0:
- pKbd->scanPrefix = 0;
- switch (*scanCode) {
- case KEY_KP_7: *scanCode = KEY_Home; break; /* curs home */
- case KEY_KP_8: *scanCode = KEY_Up; break; /* curs up */
- case KEY_KP_9: *scanCode = KEY_PgUp; break; /* curs pgup */
- case KEY_KP_4: *scanCode = KEY_Left; break; /* curs left */
- case KEY_KP_5: *scanCode = KEY_Begin; break; /* curs begin */
- case KEY_KP_6: *scanCode = KEY_Right; break; /* curs right */
- case KEY_KP_1: *scanCode = KEY_End; break; /* curs end */
- case KEY_KP_2: *scanCode = KEY_Down; break; /* curs down */
- case KEY_KP_3: *scanCode = KEY_PgDown; break; /* curs pgdown */
- case KEY_KP_0: *scanCode = KEY_Insert; break; /* curs insert */
- case KEY_KP_Decimal: *scanCode = KEY_Delete; break; /* curs delete */
- case KEY_Enter: *scanCode = KEY_KP_Enter; break; /* keypad enter */
- case KEY_LCtrl: *scanCode = KEY_RCtrl; break; /* right ctrl */
- case KEY_KP_Multiply: *scanCode = KEY_Print; break; /* print */
- case KEY_Slash: *scanCode = KEY_KP_Divide; break; /* keyp divide */
- case KEY_Alt: *scanCode = KEY_AltLang; break; /* right alt */
- case KEY_ScrollLock: *scanCode = KEY_Break; break; /* curs break */
- case 0x5b: *scanCode = KEY_LMeta; break;
- case 0x5c: *scanCode = KEY_RMeta; break;
- case 0x5d: *scanCode = KEY_Menu; break;
- case KEY_F3: *scanCode = KEY_F13; break;
- case KEY_F4: *scanCode = KEY_F14; break;
- case KEY_F5: *scanCode = KEY_F15; break;
- case KEY_F6: *scanCode = KEY_F16; break;
- case KEY_F7: *scanCode = KEY_F17; break;
- case KEY_KP_Plus: *scanCode = KEY_KP_DEC; break;
- case 0x2A:
- case 0x36:
- return TRUE;
- default:
- xf86MsgVerb(X_INFO, 4, "Unreported Prefix0 scancode: 0x%02x\n",
- *scanCode);
- *scanCode += 0x78;
- }
- break;
- case KEY_Prefix1:
- pKbd->scanPrefix = (*scanCode == KEY_LCtrl) ? KEY_LCtrl : 0;
- return TRUE;
- case KEY_LCtrl:
- pKbd->scanPrefix = 0;
- if (*scanCode != KEY_NumLock)
- return TRUE;
- *scanCode = KEY_Pause; /* pause */
- }
- return FALSE;
-}
diff --git a/hw/xfree86/os-support/shared/kbd.c b/hw/xfree86/os-support/shared/kbd.c
deleted file mode 100644
index dd6d77d82..000000000
--- a/hw/xfree86/os-support/shared/kbd.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2001-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 "xf86OSKbd.h"
-
-_X_EXPORT Bool
-xf86OSKbdPreInit(InputInfoPtr pInfo)
-{
- return FALSE;
-}
diff --git a/hw/xfree86/os-support/shared/std_kbdEv.c b/hw/xfree86/os-support/shared/std_kbdEv.c
deleted file mode 100644
index f56a5fd05..000000000
--- a/hw/xfree86/os-support/shared/std_kbdEv.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
- * Copyright 1993 by David Dawes <dawes@xfree86.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the names of Thomas Roell and David Dawes
- * not be used in advertising or publicity pertaining to distribution of
- * the software without specific, written prior permission. Thomas Roell and
- * David Dawes makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- *
- * THOMAS ROELL AND DAVID DAWES DISCLAIMS ALL WARRANTIES WITH REGARD TO
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THOMAS ROELL OR DAVID DAWES BE LIABLE FOR
- * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
- * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/* $XConsortium: std_kbdEv.c /main/4 1996/03/11 10:47:33 kaleb $ */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-void
-xf86KbdEvents()
-{
- unsigned char rBuf[64];
- int nBytes, i;
-
- if ((nBytes = read( xf86Info.consoleFd, (char *)rBuf, sizeof(rBuf)))
- > 0)
- {
- for (i = 0; i < nBytes; i++)
- xf86PostKbdEvent(rBuf[i]);
- }
-}
-
diff --git a/hw/xfree86/os-support/shared/sysv_kbd.c b/hw/xfree86/os-support/shared/sysv_kbd.c
deleted file mode 100644
index d7d75191e..000000000
--- a/hw/xfree86/os-support/shared/sysv_kbd.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
- * Copyright 1993 by David Dawes <dawes@XFree86.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the names of Thomas Roell and David Dawes
- * not be used in advertising or publicity pertaining to distribution of
- * the software without specific, written prior permission. Thomas Roell and
- * David Dawes makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- *
- * THOMAS ROELL AND DAVID DAWES DISCLAIMS ALL WARRANTIES WITH REGARD TO
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THOMAS ROELL OR DAVID DAWES BE LIABLE FOR
- * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
- * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/* $XConsortium: sysv_kbd.c /main/3 1996/02/21 17:53:59 kaleb $ */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-
-#include "compiler.h"
-
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-int
-xf86GetKbdLeds()
-{
- int leds;
-
- ioctl(xf86Info.consoleFd, KDGETLED, &leds);
- return(leds);
-}
-
-void
-xf86SetKbdRepeat(char rad)
-{
-#ifdef KDSETRAD
- ioctl(xf86Info.consoleFd, KDSETRAD, rad);
-#endif
-}
-
-static int kbdtrans;
-static struct termio kbdtty;
-static char *kbdemap = NULL;
-
-void
-xf86KbdInit()
-{
-#ifdef KDGKBMODE
- ioctl (xf86Info.consoleFd, KDGKBMODE, &kbdtrans);
-#endif
- ioctl (xf86Info.consoleFd, TCGETA, &kbdtty);
-#if defined(E_TABSZ)
- kbdemap = xalloc(E_TABSZ);
- if (ioctl(xf86Info.consoleFd, LDGMAP, kbdemap) < 0)
- {
- xfree(kbdemap);
- kbdemap = NULL;
- }
-#endif
-}
-
-int
-xf86KbdOn()
-{
- struct termio nTty;
-
- ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW);
- ioctl(xf86Info.consoleFd, LDNMAP, 0); /* disable mapping completely */
- nTty = kbdtty;
- nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP);
- nTty.c_oflag = 0;
- nTty.c_cflag = CREAD | CS8 | B9600;
- nTty.c_lflag = 0;
- nTty.c_cc[VTIME]=0;
- nTty.c_cc[VMIN]=1;
- ioctl(xf86Info.consoleFd, TCSETA, &nTty);
- return(xf86Info.consoleFd);
-}
-
-int
-xf86KbdOff()
-{
- if (kbdemap)
- {
- ioctl(xf86Info.consoleFd, LDSMAP, kbdemap);
- }
- ioctl(xf86Info.consoleFd, KDSKBMODE, kbdtrans);
- ioctl(xf86Info.consoleFd, TCSETA, &kbdtty);
- return(xf86Info.consoleFd);
-}