summaryrefslogtreecommitdiff
path: root/hw/kdrive/src/kinfo.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2001-10-12 06:33:12 +0000
committerKeith Packard <keithp@keithp.com>2001-10-12 06:33:12 +0000
commit28fd5f7525848cf0109f9cf2d6311f3717570a5d (patch)
tree70adc7664477ac1c13ed92dcf62bee23a3b22e21 /hw/kdrive/src/kinfo.c
parent5f310d7f8b566b1e331286752d349f87ef43a811 (diff)
kdrive: add new auto-detecting and auto-switching mouse driver
Diffstat (limited to 'hw/kdrive/src/kinfo.c')
-rw-r--r--hw/kdrive/src/kinfo.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/hw/kdrive/src/kinfo.c b/hw/kdrive/src/kinfo.c
index 911097834..7e245ebbb 100644
--- a/hw/kdrive/src/kinfo.c
+++ b/hw/kdrive/src/kinfo.c
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/hw/kdrive/kinfo.c,v 1.1 1999/11/19 13:53:49 hohndel Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/kdrive/kinfo.c,v 1.2 2000/02/23 20:29:53 dawes Exp $ */
#include "kdrive.h"
@@ -108,3 +108,37 @@ KdScreenInfoDispose (KdScreenInfo *si)
break;
}
}
+
+KdMouseInfo *kdMouseInfo;
+
+KdMouseInfo *
+KdMouseInfoAdd (void)
+{
+ KdMouseInfo *mi, **prev;
+
+ mi = (KdMouseInfo *) xalloc (sizeof (KdMouseInfo));
+ if (!mi)
+ return 0;
+ bzero (mi, sizeof (KdMouseInfo));
+ for (prev = &kdMouseInfo; *prev; prev = &(*prev)->next);
+ *prev = mi;
+ return mi;
+}
+
+void
+KdMouseInfoDispose (KdMouseInfo *mi)
+{
+ KdMouseInfo **prev;
+
+ for (prev = &kdMouseInfo; *prev; prev = &(*prev)->next)
+ if (*prev == mi)
+ {
+ *prev = mi->next;
+ if (mi->name)
+ xfree (mi->name);
+ if (mi->prot)
+ xfree (mi->prot);
+ xfree (mi);
+ break;
+ }
+}