diff options
Diffstat (limited to 'xorg-server/hw/kdrive')
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyr.c | 13 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyr.h | 6 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyrinit.c | 12 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyrlog.h | 4 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/hostx.c | 28 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/hostx.h | 4 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/makefile | 6 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/src/kdrive.c | 4 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/src/kdrive.h | 2 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/src/kinput.c | 27 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/src/makefile | 14 |
11 files changed, 113 insertions, 7 deletions
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c index b2a79855c..ac988b2bc 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyr.c +++ b/xorg-server/hw/kdrive/ephyr/ephyr.c @@ -76,8 +76,11 @@ host_has_extension(xcb_extension_t *extension) Bool ephyrInitialize(KdCardInfo * card, EphyrPriv * priv) { +#ifdef _MSC_VER + __asm int 3; +#else OsSignal(SIGUSR1, hostx_handle_signal); - +#endif priv->base = 0; priv->bytes_per_line = 0; return TRUE; @@ -786,6 +789,14 @@ ephyrUpdateModifierState(unsigned int state) } } +#ifdef _MSC_VER + __asm int 3; +#else +#endif +#ifdef _MSC_VER + __asm int 3; +#else +#endif static Bool ephyrCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y) { diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.h b/xorg-server/hw/kdrive/ephyr/ephyr.h index 73fdb59e6..d66c76e1e 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyr.h +++ b/xorg-server/hw/kdrive/ephyr/ephyr.h @@ -26,9 +26,11 @@ #ifndef _EPHYR_H_ #define _EPHYR_H_ #include <stdio.h> +#ifndef _MSC_VER #include <unistd.h> -#include <signal.h> #include <libgen.h> +#endif +#include <signal.h> #include <xcb/xcb_image.h> #include "os.h" /* for OsSignal() */ @@ -189,6 +191,8 @@ extern void ephyrCursorEnable(ScreenPtr pScreen); extern int ephyrBufferHeight(KdScreenInfo * screen); +extern int ephyrBufferHeight(KdScreenInfo *screen); + /* ephyr_draw.c */ Bool diff --git a/xorg-server/hw/kdrive/ephyr/ephyrinit.c b/xorg-server/hw/kdrive/ephyr/ephyrinit.c index cf8bc9073..218e3b00c 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrinit.c +++ b/xorg-server/hw/kdrive/ephyr/ephyrinit.c @@ -55,6 +55,7 @@ InitCard(char *name) KdCardInfoAdd(&ephyrFuncs, 0); } +#ifndef _MSC_VER static const ExtensionModule ephyrExtensions[] = { #ifdef GLXEXT { GlxExtensionInit, "GLX", &noGlxExtension }, @@ -152,6 +153,7 @@ ddxUseMsg(void) exit(1); } +#endif void processScreenArg(const char *screen_size, char *parent_id) @@ -182,6 +184,7 @@ processScreenArg(const char *screen_size, char *parent_id) } } +#ifndef _MSC_VER int ddxProcessArgument(int argc, char **argv, int i) { @@ -331,6 +334,15 @@ OsVendorInit(void) KdOsInit(&EphyrOsFuncs); } +#ifdef DDXOSFATALERROR +void +OsVendorFatalError(void) +{ +} +#endif + +#endif + /* 'Fake' cursor stuff, could be improved */ static Bool diff --git a/xorg-server/hw/kdrive/ephyr/ephyrlog.h b/xorg-server/hw/kdrive/ephyr/ephyrlog.h index 0da0a2518..6671c4779 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrlog.h +++ b/xorg-server/hw/kdrive/ephyr/ephyrlog.h @@ -43,14 +43,14 @@ #ifndef EPHYR_LOG #define EPHYR_LOG(...) \ LogMessageVerb(X_NOTICE, INFO_LOG_LEVEL, "in %s:%d:%s: ",\ - __FILE__, __LINE__, __func__) ; \ + __FILE__, __LINE__, __FUNCTION__) ; \ LogMessageVerb(X_NOTICE, INFO_LOG_LEVEL, __VA_ARGS__) #endif /*nomadik_log */ #ifndef EPHYR_LOG_ERROR #define EPHYR_LOG_ERROR(...) \ LogMessageVerb(X_NOTICE, ERROR_LOG_LEVEL, "Error:in %s:%d:%s: ",\ - __FILE__, __LINE__, __func__) ; \ + __FILE__, __LINE__, __FUNCTION__) ; \ LogMessageVerb(X_NOTICE, ERROR_LOG_LEVEL, __VA_ARGS__) #endif /*EPHYR_LOG_ERROR */ diff --git a/xorg-server/hw/kdrive/ephyr/hostx.c b/xorg-server/hw/kdrive/ephyr/hostx.c index 3e01a4770..873033373 100644 --- a/xorg-server/hw/kdrive/ephyr/hostx.c +++ b/xorg-server/hw/kdrive/ephyr/hostx.c @@ -37,9 +37,11 @@ #include <errno.h> #include <time.h> +#ifndef _MSC_VER #include <sys/ipc.h> #include <sys/shm.h> #include <sys/time.h> +#endif #include <X11/keysym.h> #include <xcb/xcb.h> @@ -131,7 +133,11 @@ hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num) void hostx_set_display_name(char *name) { +#ifdef _MSC_VER + __asm int 3; +#else HostX.server_dpy_name = strdup(name); +#endif } void @@ -460,6 +466,9 @@ hostx_init(void) xcb_free_pixmap(HostX.conn, cursor_pxm); } +#ifdef _MSC_VER + __asm int 3; +#else /* Try to get share memory ximages for a little bit more speed */ shm_rep = xcb_get_extension_data(HostX.conn, &xcb_shm_id); if (!shm_rep || !shm_rep->present || getenv("XEPHYR_NO_SHM")) { @@ -492,6 +501,7 @@ hostx_init(void) shmdt(shminfo.shmaddr); shmctl(shminfo.shmid, IPC_RMID, 0); } +#endif xcb_flush(HostX.conn); @@ -618,7 +628,7 @@ hostx_screen_init(KdScreenInfo *screen, Bool shm_success = FALSE; if (!scrpriv) { - fprintf(stderr, "%s: Error in accessing hostx data\n", __func__); + fprintf(stderr, "%s: Error in accessing hostx data\n", __FUNCTION__); exit(1); } @@ -631,10 +641,14 @@ hostx_screen_init(KdScreenInfo *screen, */ if (HostX.have_shm) { +#ifdef _MSC_VER + __asm int 3; +#else xcb_shm_detach(HostX.conn, scrpriv->shminfo.shmseg); xcb_image_destroy(scrpriv->ximg); shmdt(scrpriv->shminfo.shmaddr); shmctl(scrpriv->shminfo.shmid, IPC_RMID, 0); +#endif } else { free(scrpriv->ximg->data); @@ -645,6 +659,9 @@ hostx_screen_init(KdScreenInfo *screen, } if (HostX.have_shm) { +#ifdef _MSC_VER +__asm int 3; +#else scrpriv->ximg = xcb_image_create_native(HostX.conn, width, buffer_height, @@ -677,6 +694,7 @@ hostx_screen_init(KdScreenInfo *screen, FALSE); shm_success = TRUE; } +#endif } if (!shm_success) { @@ -806,10 +824,14 @@ hostx_paint_rect(KdScreenInfo *screen, } if (HostX.have_shm) { +#ifdef _MSC_VER + __asm int 3; +#else xcb_image_shm_put(HostX.conn, scrpriv->win, HostX.gc, scrpriv->ximg, scrpriv->shminfo, sx, sy, dx, dy, width, height, FALSE); +#endif } else { xcb_image_put(HostX.conn, scrpriv->win, HostX.gc, scrpriv->ximg, @@ -823,6 +845,9 @@ static void hostx_paint_debug_rect(KdScreenInfo *screen, int x, int y, int width, int height) { +#ifdef _MSC_VER + __asm int 3; +#else EphyrScrPriv *scrpriv = screen->driver; struct timespec tspec; xcb_rectangle_t rect = { .x = x, .y = y, .width = width, .height = height }; @@ -844,6 +869,7 @@ hostx_paint_debug_rect(KdScreenInfo *screen, /* nanosleep seems to work better than usleep for me... */ nanosleep(&tspec, NULL); +#endif } void diff --git a/xorg-server/hw/kdrive/ephyr/hostx.h b/xorg-server/hw/kdrive/ephyr/hostx.h index e83323a0c..f2350efba 100644 --- a/xorg-server/hw/kdrive/ephyr/hostx.h +++ b/xorg-server/hw/kdrive/ephyr/hostx.h @@ -37,8 +37,12 @@ #define EPHYR_DBG(x, a...) \ fprintf(stderr, __FILE__ ":%d,%s() " x "\n", __LINE__, __func__, ##a) #else +#ifdef _MSC_VER +#define EPHYR_DBG() +#else #define EPHYR_DBG(x, a...) do {} while (0) #endif +#endif typedef struct EphyrHostXVars EphyrHostXVars; diff --git a/xorg-server/hw/kdrive/ephyr/makefile b/xorg-server/hw/kdrive/ephyr/makefile new file mode 100644 index 000000000..eba9a93e1 --- /dev/null +++ b/xorg-server/hw/kdrive/ephyr/makefile @@ -0,0 +1,6 @@ +LIBRARY = libxephyr + +CSRCS=ephyrinit.c ephyr.c hostx.c + +INCLUDES += ..\src ..\..\..\exa + diff --git a/xorg-server/hw/kdrive/src/kdrive.c b/xorg-server/hw/kdrive/src/kdrive.c index 382968420..d56ba8fc5 100644 --- a/xorg-server/hw/kdrive/src/kdrive.c +++ b/xorg-server/hw/kdrive/src/kdrive.c @@ -221,6 +221,7 @@ KdProcessSwitch(void) KdEnableScreens(); } +#ifndef _MSC_VER void AbortDDX(enum ExitCode error) { @@ -242,6 +243,7 @@ ddxGiveUp(enum ExitCode error) { AbortDDX(error); } +#endif Bool kdDumbDriver; Bool kdSoftCursor; @@ -1105,6 +1107,7 @@ KdInitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) OsRegisterSigWrapper(KdSignalWrapper); } +#ifndef _MSC_VER void OsVendorFatalError(const char *f, va_list args) { @@ -1121,3 +1124,4 @@ DPMSSupported(void) { return FALSE; } +#endif diff --git a/xorg-server/hw/kdrive/src/kdrive.h b/xorg-server/hw/kdrive/src/kdrive.h index 296d611ed..f52072003 100644 --- a/xorg-server/hw/kdrive/src/kdrive.h +++ b/xorg-server/hw/kdrive/src/kdrive.h @@ -52,7 +52,7 @@ #define KD_DPMS_POWERDOWN 3 #define KD_DPMS_MAX KD_DPMS_POWERDOWN -#define Status int +typedef int Status; typedef struct _KdCardInfo { struct _KdCardFuncs *cfuncs; diff --git a/xorg-server/hw/kdrive/src/kinput.c b/xorg-server/hw/kdrive/src/kinput.c index a9a9fa583..d5171a7f7 100644 --- a/xorg-server/hw/kdrive/src/kinput.c +++ b/xorg-server/hw/kdrive/src/kinput.c @@ -102,6 +102,14 @@ KdSigio(int sig) (*kdInputFds[i].read) (kdInputFds[i].fd, kdInputFds[i].closure); } +#ifdef _MSC_VER + __asm int 3; +#else +#endif +#ifdef _MSC_VER + __asm int 3; +#else +#endif #ifdef DEBUG_SIGIO void @@ -145,16 +153,23 @@ KdResetInputMachine(void) static void KdNonBlockFd(int fd) { +#ifdef _MSC_VER + __asm int 3; +#else int flags; flags = fcntl(fd, F_GETFL); flags |= FASYNC | NOBLOCK; fcntl(fd, F_SETFL, flags); +#endif } static void KdAddFd(int fd) { +#ifdef _MSC_VER + __asm int 3; +#else struct sigaction act; sigset_t set; @@ -171,11 +186,15 @@ KdAddFd(int fd) sigaction(SIGIO, &act, 0); sigemptyset(&set); sigprocmask(SIG_SETMASK, &set, 0); +#endif } static void KdRemoveFd(int fd) { +#ifdef _MSC_VER + __asm int 3; +#else struct sigaction act; int flags; @@ -190,6 +209,7 @@ KdRemoveFd(int fd) sigemptyset(&act.sa_mask); sigaction(SIGIO, &act, 0); } +#endif } Bool @@ -526,11 +546,13 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff) return BadImplementation; } +#ifndef _MSC_VER Bool LegalModifier(unsigned int key, DeviceIntPtr pDev) { return TRUE; } +#endif static void KdBell(int volume, DeviceIntPtr pDev, pointer arg, int something) @@ -549,6 +571,7 @@ KdBell(int volume, DeviceIntPtr pDev, pointer arg, int something) KdRingBell(ki, volume, ctrl->bell_pitch, ctrl->bell_duration); } +#ifndef _MSC_VER void DDXRingBell(int volume, int pitch, int duration) { @@ -564,7 +587,7 @@ DDXRingBell(int volume, int pitch, int duration) } } } - +#endif void KdRingBell(KdKeyboardInfo * ki, int volume, int pitch, int duration) { @@ -2096,6 +2119,7 @@ miPointerScreenFuncRec kdPointerScreenFuncs = { KdWarpCursor }; +#ifndef _MSC_VER void ProcessInputEvents(void) { @@ -2104,6 +2128,7 @@ ProcessInputEvents(void) KdProcessSwitch(); KdCheckLock(); } +#endif /* At the moment, absolute/relative is up to the client. */ int diff --git a/xorg-server/hw/kdrive/src/makefile b/xorg-server/hw/kdrive/src/makefile new file mode 100644 index 000000000..e3a826faa --- /dev/null +++ b/xorg-server/hw/kdrive/src/makefile @@ -0,0 +1,14 @@ +LIBRARY = libkdrive + +CSRCS = \ + kcmap.c \ + kcurscol.c \ + kdrive.c \ + kinfo.c \ + kinput.c \ + kmap.c \ + kmode.c \ + kshadow.c + + + |