hlfw.ca

x9dev

Download patch

ref: 9ab873a1af5818a699bb2e30fd51f87c2b97226a
parent: 2db7af7d64f10a65fc8cd141f08972629608ca7f
author: halfwit <michaelmisch1985@gmail.com>
date: Wed Oct 7 11:08:25 PDT 2020

We're using two computers, so git is gonna be a bit messy

--- a/draw.c
+++ b/draw.c
@@ -25,9 +25,6 @@
 #include <dix-config.h>
 #endif
 
-
-#include <X11/X.h>
-#include "mi.h"
 #define NEED_EVENTS
 #include <X11/Xproto.h>
 #include <X11/Xos.h>
@@ -36,13 +33,11 @@
 #define XK_PUBLISHING
 #include <X11/keysym.h>
 #include <X11/keysymdef.h>
-#include "scrnintstr.h"
 #include "servermd.h"
 #define PSZ 8
 #include "fb.h"
 #include "colormapst.h"
 #include "gcstruct.h"
-#include "input.h"
 #include "mipointer.h"
 #include "micmap.h"
 #include "dix.h"
@@ -57,8 +52,8 @@
 
 x9devInfo x9di;
 
-static DeviceIntPtr x9devMouse;
-static DeviceIntPtr x9devKeybd;
+extern DeviceIntPtr x9devMouse;
+extern DeviceIntPtr x9devKeybd;
 static int  oldx, oldy, oldbut;
 
 static CARD8 modmap[MAP_LENGTH];
@@ -206,7 +201,7 @@
 static void
 x9devInfoInit(void)
 {
-/*
+
     char    buf[256];
 
     if(initdraw(NULL, 0, "x9dev") < 0)
@@ -237,7 +232,6 @@
         FatalError("can't open consctl");
     if(c9write(x9di.consctlFd, "rawon", 5) != 5)
         FatalError("can't set rawon");
-*/
 }
 
 static int  
@@ -368,7 +362,7 @@
     return Success;
 }
 
-static int  
+int  
 x9devMouseProc(DeviceIntPtr pDevice, int what)
 {
     static unsigned char    map[] = {0, 1, 2, 3, 4, 5};
@@ -441,7 +435,7 @@
     return ret;
 }
 
-static Bool
+Bool
 x9devScreenInit(ScreenPtr pScreen, int argc, char *argv[])
 {
     int v, i;
--- a/x9dev.c
+++ b/x9dev.c
@@ -25,6 +25,7 @@
 #include <dix-config.h>
 #endif
 #include "glx_extinit.h"
+#include "x9dev.h"
 
 void
 InitOutput(ScreenInfo *si, int argc, char *argv[])
--- a/x9dev.h
+++ b/x9dev.h
@@ -23,9 +23,11 @@
 
 #ifndef _X9DEV_H_
 #define _X9DEV_H_
-#include <stdio.h>
-#include <unistd.h>
+#include <X11/X.h>
 
+#include "mi.h"
+#include "input.h"
+#include "scrnintstr.h"
 typedef struct x9devInfo x9devInfo;
 
 struct x9devInfo
@@ -43,5 +45,11 @@
 
 #define KF      0xF000
 #define Kdown   0x80
+
+DeviceIntPtr x9devMouse;
+DeviceIntPtr x9devKeybd;
+
+Bool x9devScreenInit(ScreenPtr, int, char **);
+int  x9devMouseProc(DeviceIntPtr, int);
 
 #endif