From e42e42e6dcbd4d7c159aaa980a74dd5647bcb45a Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Sun, 21 Sep 2014 01:28:29 -0700 Subject: [PATCH] Xorg: some define changes, remove dups --- xorg/server/module/rdp.h | 10 ++++++++++ xorg/server/module/rdpMain.c | 10 +--------- xorg/server/module/rdpXv.c | 2 +- xorg/server/xrdpdev/xrdpdev.c | 14 +++----------- xorg/server/xrdpkeyb/rdpKeyboard.c | 12 ++---------- xorg/server/xrdpmouse/rdpMouse.c | 12 ++---------- 6 files changed, 19 insertions(+), 41 deletions(-) diff --git a/xorg/server/module/rdp.h b/xorg/server/module/rdp.h index 80df5f01..61dfbb1c 100644 --- a/xorg/server/module/rdp.h +++ b/xorg/server/module/rdp.h @@ -30,6 +30,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "rdpPri.h" +#define XRDP_MODULE_NAME "XRDPMOD" +#define XRDP_DRIVER_NAME "XRDPDEV" +#define XRDP_MOUSE_NAME "XRDPMOUSE" +#define XRDP_KEYB_NAME "XRDPKEYB" +#define XRDP_VERSION 1000 + +#define PACKAGE_VERSION_MAJOR 1 +#define PACKAGE_VERSION_MINOR 0 +#define PACKAGE_VERSION_PATCHLEVEL 0 + #define COLOR8(r, g, b) \ ((((r) >> 5) << 0) | (((g) >> 5) << 3) | (((b) >> 6) << 6)) #define COLOR15(r, g, b) \ diff --git a/xorg/server/module/rdpMain.c b/xorg/server/module/rdpMain.c index a8786ac2..2f6db7c7 100644 --- a/xorg/server/module/rdpMain.c +++ b/xorg/server/module/rdpMain.c @@ -47,14 +47,6 @@ rdp module main #define LLOGLN(_level, _args) \ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0) -#define XRDP_DRIVER_NAME "XORGXRDP" -#define XRDP_NAME "XORGXRDP" -#define XRDP_VERSION 1000 - -#define PACKAGE_VERSION_MAJOR 1 -#define PACKAGE_VERSION_MINOR 0 -#define PACKAGE_VERSION_PATCHLEVEL 0 - static Bool g_initialised = FALSE; /*****************************************************************************/ @@ -95,7 +87,7 @@ xorgxrdpDownDown(ScreenPtr pScreen) static MODULESETUPPROTO(xorgxrdpSetup); static XF86ModuleVersionInfo RDPVersRec = { - XRDP_DRIVER_NAME, + XRDP_MODULE_NAME, MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, diff --git a/xorg/server/module/rdpXv.c b/xorg/server/module/rdpXv.c index 44a4d76c..1c347b2f 100644 --- a/xorg/server/module/rdpXv.c +++ b/xorg/server/module/rdpXv.c @@ -545,7 +545,7 @@ rdpXvInit(ScreenPtr pScreen, ScrnInfoPtr pScrn) } adaptor->type = XvInputMask | XvImageMask | XvVideoMask | XvStillMask | XvWindowMask | XvPixmapMask; adaptor->flags = VIDEO_CLIP_TO_VIEWPORT; - adaptor->name = "XORGXRDP XVideo Adaptor"; + adaptor->name = XRDP_MODULE_NAME " XVideo Adaptor"; adaptor->nEncodings = T_NUM_ENCODINGS; adaptor->pEncodings = &(g_xrdpVidEncodings[0]); adaptor->nFormats = T_NUM_FORMATS; diff --git a/xorg/server/xrdpdev/xrdpdev.c b/xorg/server/xrdpdev/xrdpdev.c index fc33ca8a..f3c8fd83 100644 --- a/xorg/server/xrdpdev/xrdpdev.c +++ b/xorg/server/xrdpdev/xrdpdev.c @@ -55,14 +55,6 @@ This is the main driver file #include "rdpClientCon.h" #include "rdpXv.h" -#define XRDP_DRIVER_NAME "XRDPDEV" -#define XRDP_NAME "XRDPDEV" -#define XRDP_VERSION 1000 - -#define PACKAGE_VERSION_MAJOR 1 -#define PACKAGE_VERSION_MINOR 0 -#define PACKAGE_VERSION_PATCHLEVEL 0 - #define LLOG_LEVEL 1 #define LLOGLN(_level, _args) \ do \ @@ -458,7 +450,7 @@ rdpScreenInit(ScreenPtr pScreen, int argc, char **argv) miInitializeBackingStore(pScreen); #endif -#if 1 +#if defined(XvExtension) && XvExtension /* XVideo */ if (!rdpXvInit(pScreen, pScrn)) { @@ -665,7 +657,7 @@ rdpProbe(DriverPtr drv, int flags) found_screen = 1; pscrn->driverVersion = XRDP_VERSION; pscrn->driverName = XRDP_DRIVER_NAME; - pscrn->name = XRDP_NAME; + pscrn->name = XRDP_DRIVER_NAME; pscrn->Probe = rdpProbe; pscrn->PreInit = rdpPreInit; pscrn->ScreenInit = rdpScreenInit; @@ -717,7 +709,7 @@ static void rdpIdentify(int flags) { LLOGLN(0, ("rdpIdentify:")); - xf86PrintChipsets(XRDP_NAME, "driver for xrdp", g_Chipsets); + xf86PrintChipsets(XRDP_DRIVER_NAME, "driver for xrdp", g_Chipsets); } /*****************************************************************************/ diff --git a/xorg/server/xrdpkeyb/rdpKeyboard.c b/xorg/server/xrdpkeyb/rdpKeyboard.c index a1e840b2..0157de21 100644 --- a/xorg/server/xrdpkeyb/rdpKeyboard.c +++ b/xorg/server/xrdpkeyb/rdpKeyboard.c @@ -52,14 +52,6 @@ xrdp keyboard module #define LLOGLN(_level, _args) \ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0) -#define XRDP_DRIVER_NAME "XRDPKEYB" -#define XRDP_NAME "XRDPKEYB" -#define XRDP_VERSION 1000 - -#define PACKAGE_VERSION_MAJOR 1 -#define PACKAGE_VERSION_MINOR 0 -#define PACKAGE_VERSION_PATCHLEVEL 0 - #define MIN_KEY_CODE 8 #define MAX_KEY_CODE 255 #define NO_OF_KEYS ((MAX_KEY_CODE - MIN_KEY_CODE) + 1) @@ -688,7 +680,7 @@ rdpkeybUnInit(InputDriverPtr drv, InputInfoPtr info, int flags) static InputDriverRec rdpkeyb = { PACKAGE_VERSION_MAJOR, /* version */ - XRDP_NAME, /* name */ + XRDP_KEYB_NAME, /* name */ NULL, /* identify */ rdpkeybPreInit, /* preinit */ rdpkeybUnInit, /* uninit */ @@ -715,7 +707,7 @@ rdpkeybUnplug(pointer p) /******************************************************************************/ static XF86ModuleVersionInfo rdpkeybVersionRec = { - XRDP_DRIVER_NAME, + XRDP_KEYB_NAME, MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, diff --git a/xorg/server/xrdpmouse/rdpMouse.c b/xorg/server/xrdpmouse/rdpMouse.c index 2d8213cd..d64e9233 100644 --- a/xorg/server/xrdpmouse/rdpMouse.c +++ b/xorg/server/xrdpmouse/rdpMouse.c @@ -50,14 +50,6 @@ xrdp mouse module #define LLOGLN(_level, _args) \ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0) -#define XRDP_DRIVER_NAME "XRDPMOUSE" -#define XRDP_NAME "XRDPMOUSE" -#define XRDP_VERSION 1000 - -#define PACKAGE_VERSION_MAJOR 1 -#define PACKAGE_VERSION_MINOR 0 -#define PACKAGE_VERSION_PATCHLEVEL 0 - /******************************************************************************/ static void rdpmouseDeviceInit(void) @@ -323,7 +315,7 @@ rdpmouseUnInit(InputDriverPtr drv, InputInfoPtr info, int flags) static InputDriverRec rdpmouse = { PACKAGE_VERSION_MAJOR, /* version */ - XRDP_NAME, /* name */ + XRDP_MOUSE_NAME, /* name */ NULL, /* identify */ rdpmousePreInit, /* preinit */ rdpmouseUnInit, /* uninit */ @@ -350,7 +342,7 @@ rdpmouseUnplug(pointer p) /******************************************************************************/ static XF86ModuleVersionInfo rdpmouseVersionRec = { - XRDP_DRIVER_NAME, + XRDP_MOUSE_NAME, MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2,