From e77e37ff0f97a5845fa0c634e978361541d7991f Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 1 Jul 2016 00:05:30 +0200 Subject: remove XShape code from libNX_Xext use system libXext instead --- debian/copyright.in | 2 - debian/libnx-xext-dev.install | 1 - debian/nx-x11proto-xext-dev.install | 1 - nx-X11/include/extensions/Imakefile | 1 - nx-X11/include/extensions/shape.h | 180 ---------- nx-X11/include/extensions/shapestr.h | 234 ------------ nx-X11/include/extensions/xfixesproto.h | 2 +- nx-X11/lib/Xext/Imakefile | 2 - nx-X11/lib/Xext/XShape.c | 490 -------------------------- nx-X11/programs/Xserver/Imakefile | 8 +- nx-X11/programs/Xserver/Xext/extmod/modinit.h | 3 +- nx-X11/programs/Xserver/Xext/shape.c | 3 +- nx-X11/programs/Xserver/hw/nxagent/Agent.h | 2 +- nx-libs.spec | 14 +- 14 files changed, 10 insertions(+), 933 deletions(-) delete mode 100644 nx-X11/include/extensions/shape.h delete mode 100644 nx-X11/include/extensions/shapestr.h delete mode 100644 nx-X11/lib/Xext/XShape.c diff --git a/debian/copyright.in b/debian/copyright.in index 4ffde0ba0..8d6f30208 100644 --- a/debian/copyright.in +++ b/debian/copyright.in @@ -47,8 +47,6 @@ Files: nx-X11/config/imake/ccimake.c nx-X11/include/extensions/multibufst.h nx-X11/include/extensions/security.h nx-X11/include/extensions/securstr.h - nx-X11/include/extensions/shape.h - nx-X11/include/extensions/shapestr.h nx-X11/include/extensions/shmstr.h nx-X11/include/extensions/xcmiscstr.h nx-X11/include/extensions/xteststr.h diff --git a/debian/libnx-xext-dev.install b/debian/libnx-xext-dev.install index 819c82013..5b88215e0 100644 --- a/debian/libnx-xext-dev.install +++ b/debian/libnx-xext-dev.install @@ -2,4 +2,3 @@ usr/lib/*/libNX_Xext.so usr/include/*/nx-X11/extensions/XShm.h usr/include/*/nx-X11/extensions/Xext.h usr/include/*/nx-X11/extensions/extutil.h -usr/include/*/nx-X11/extensions/shape.h diff --git a/debian/nx-x11proto-xext-dev.install b/debian/nx-x11proto-xext-dev.install index f34e66519..ae415e6ca 100644 --- a/debian/nx-x11proto-xext-dev.install +++ b/debian/nx-x11proto-xext-dev.install @@ -2,7 +2,6 @@ usr/include/*/nx-X11/extensions/dpmsstr.h usr/include/*/nx-X11/extensions/xteststr.h usr/include/*/nx-X11/extensions/xtestconst.h usr/include/*/nx-X11/extensions/securstr.h -usr/include/*/nx-X11/extensions/shapestr.h usr/include/*/nx-X11/extensions/shmstr.h usr/include/*/nx-X11/extensions/syncstr.h usr/include/*/nx-X11/extensions/Xdbeproto.h diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index 9f03df68c..3a26bed58 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -67,7 +67,6 @@ HEADERS = Xext.h \ $(EXTRAHEADERS) \ record.h recordstr.h \ security.h securstr.h \ - shape.h shapestr.h \ sync.h syncstr.h \ dpms.h dpmsstr.h \ $(NULL) diff --git a/nx-X11/include/extensions/shape.h b/nx-X11/include/extensions/shape.h deleted file mode 100644 index 5e85ffc04..000000000 --- a/nx-X11/include/extensions/shape.h +++ /dev/null @@ -1,180 +0,0 @@ -/* $XFree86: xc/include/extensions/shape.h,v 1.3 2001/12/14 19:53:29 dawes Exp $ */ -/************************************************************ - -Copyright 1989, 1998 The Open Group - -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. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -********************************************************/ - -/* $Xorg: shape.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ - -#ifndef _SHAPE_H_ -#define _SHAPE_H_ - -#include - -#define X_ShapeQueryVersion 0 -#define X_ShapeRectangles 1 -#define X_ShapeMask 2 -#define X_ShapeCombine 3 -#define X_ShapeOffset 4 -#define X_ShapeQueryExtents 5 -#define X_ShapeSelectInput 6 -#define X_ShapeInputSelected 7 -#define X_ShapeGetRectangles 8 - -#define ShapeSet 0 -#define ShapeUnion 1 -#define ShapeIntersect 2 -#define ShapeSubtract 3 -#define ShapeInvert 4 - -#define ShapeBounding 0 -#define ShapeClip 1 -#define ShapeInput 2 - -#define ShapeNotifyMask (1L << 0) -#define ShapeNotify 0 - -#define ShapeNumberEvents (ShapeNotify + 1) - -#ifndef _SHAPE_SERVER_ - -#include - -typedef struct { - int type; /* of event */ - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came frome a SendEvent request */ - Display *display; /* Display the event was read from */ - Window window; /* window of event */ - int kind; /* ShapeBounding or ShapeClip */ - int x, y; /* extents of new region */ - unsigned width, height; - Time time; /* server timestamp when region changed */ - Bool shaped; /* true if the region exists */ -} XShapeEvent; - -_XFUNCPROTOBEGIN - -extern Bool XShapeQueryExtension ( - Display* /* display */, - int* /* event_base */, - int* /* error_base */ -); - -extern Status XShapeQueryVersion ( - Display* /* display */, - int* /* major_version */, - int* /* minor_version */ -); - -extern void XShapeCombineRegion ( - Display* /* display */, - Window /* dest */, - int /* dest_kind */, - int /* x_off */, - int /* y_off */, - Region /* region */, - int /* op */ -); - -extern void XShapeCombineRectangles ( - Display* /* display */, - Window /* dest */, - int /* dest_kind */, - int /* x_off */, - int /* y_off */, - XRectangle* /* rectangles */, - int /* n_rects */, - int /* op */, - int /* ordering */ -); - -extern void XShapeCombineMask ( - Display* /* display */, - Window /* dest */, - int /* dest_kind */, - int /* x_off */, - int /* y_off */, - Pixmap /* src */, - int /* op */ -); - -extern void XShapeCombineShape ( - Display* /* display */, - Window /* dest */, - int /* dest_kind */, - int /* x_off */, - int /* y_off */, - Window /* src */, - int /* src_kind */, - int /* op */ -); - -extern void XShapeOffsetShape ( - Display* /* display */, - Window /* dest */, - int /* dest_kind */, - int /* x_off */, - int /* y_off */ -); - -extern Status XShapeQueryExtents ( - Display* /* display */, - Window /* window */, - Bool* /* bounding_shaped */, - int* /* x_bounding */, - int* /* y_bounding */, - unsigned int* /* w_bounding */, - unsigned int* /* h_bounding */, - Bool* /* clip_shaped */, - int* /* x_clip */, - int* /* y_clip */, - unsigned int* /* w_clip */, - unsigned int* /* h_clip */ -); - -extern void XShapeSelectInput ( - Display* /* display */, - Window /* window */, - unsigned long /* mask */ -); - -extern unsigned long XShapeInputSelected ( - Display* /* display */, - Window /* window */ -); - -extern XRectangle *XShapeGetRectangles ( - Display* /* display */, - Window /* window */, - int /* kind */, - int* /* count */, - int* /* ordering */ -); - -_XFUNCPROTOEND - -#endif /* _SHAPE_SERVER_ */ - -#endif /* _SHAPE_H_ */ diff --git a/nx-X11/include/extensions/shapestr.h b/nx-X11/include/extensions/shapestr.h deleted file mode 100644 index 4742ba8e9..000000000 --- a/nx-X11/include/extensions/shapestr.h +++ /dev/null @@ -1,234 +0,0 @@ -/************************************************************ - -Copyright 1989, 1998 The Open Group - -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. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -********************************************************/ - -/* $Xorg: shapestr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ - -#ifndef _SHAPESTR_H_ -#define _SHAPESTR_H_ - -/* - * Protocol requests constants and alignment values - * These would really be in SHAPE's X.h and Xproto.h equivalents - */ - -#include "shape.h" - -#define Window CARD32 -#define Time CARD32 - -#define SHAPENAME "SHAPE" - -#define SHAPE_MAJOR_VERSION 1 /* current version numbers */ -#define SHAPE_MINOR_VERSION 1 - -typedef struct _ShapeQueryVersion { - CARD8 reqType; /* always ShapeReqCode */ - CARD8 shapeReqType; /* always X_ShapeQueryVersion */ - CARD16 length B16; -} xShapeQueryVersionReq; -#define sz_xShapeQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of SHAPE protocol */ - CARD16 minorVersion B16; /* minor version of SHAPE protocol */ - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xShapeQueryVersionReply; -#define sz_xShapeQueryVersionReply 32 - -typedef struct _ShapeRectangles { - CARD8 reqType; /* always ShapeReqCode */ - CARD8 shapeReqType; /* always X_ShapeRectangles */ - CARD16 length B16; - CARD8 op; /* Set, ... */ - CARD8 destKind; /* ShapeBounding or ShapeClip */ - CARD8 ordering; /* UnSorted, YSorted, YXSorted, YXBanded */ - CARD8 pad0; /* not used */ - Window dest B32; - INT16 xOff B16; - INT16 yOff B16; -} xShapeRectanglesReq; /* followed by xRects */ -#define sz_xShapeRectanglesReq 16 - -typedef struct _ShapeMask { - CARD8 reqType; /* always ShapeReqCode */ - CARD8 shapeReqType; /* always X_ShapeMask */ - CARD16 length B16; - - CARD8 op; /* Set, ... */ - CARD8 destKind; /* ShapeBounding or ShapeClip */ - CARD16 junk B16; /* not used */ - - Window dest B32; - INT16 xOff B16; - INT16 yOff B16; - CARD32 src B32; /* 1 bit pixmap */ -} xShapeMaskReq; -#define sz_xShapeMaskReq 20 - -typedef struct _ShapeCombine { - CARD8 reqType; /* always ShapeReqCode */ - CARD8 shapeReqType; /* always X_ShapeCombine */ - CARD16 length B16; - CARD8 op; /* Set, ... */ - CARD8 destKind; /* ShapeBounding or ShapeClip */ - CARD8 srcKind; /* ShapeBounding or ShapeClip */ - CARD8 junk; /* not used */ - Window dest B32; - INT16 xOff B16; - INT16 yOff B16; - Window src B32; -} xShapeCombineReq; -#define sz_xShapeCombineReq 20 - -typedef struct _ShapeOffset { - CARD8 reqType; /* always ShapeReqCode */ - CARD8 shapeReqType; /* always X_ShapeOffset */ - CARD16 length B16; - CARD8 destKind; /* ShapeBounding or ShapeClip */ - CARD8 junk1; /* not used */ - CARD16 junk2 B16; /* not used */ - Window dest B32; - INT16 xOff B16; - INT16 yOff B16; -} xShapeOffsetReq; -#define sz_xShapeOffsetReq 16 - -typedef struct _ShapeQueryExtents { - CARD8 reqType; /* always ShapeReqCode */ - CARD8 shapeReqType; /* always X_ShapeQueryExtents */ - CARD16 length B16; - Window window B32; -} xShapeQueryExtentsReq; -#define sz_xShapeQueryExtentsReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* 0 */ - CARD8 boundingShaped; /* window has bounding shape */ - CARD8 clipShaped; /* window has clip shape */ - CARD16 unused1 B16; - INT16 xBoundingShape B16; /* extents of bounding shape */ - INT16 yBoundingShape B16; - CARD16 widthBoundingShape B16; - CARD16 heightBoundingShape B16; - INT16 xClipShape B16; /* extents of clip shape */ - INT16 yClipShape B16; - CARD16 widthClipShape B16; - CARD16 heightClipShape B16; - CARD32 pad1 B32; -} xShapeQueryExtentsReply; -#define sz_xShapeQueryExtentsReply 32 - -typedef struct _ShapeSelectInput { - CARD8 reqType; /* always ShapeReqCode */ - CARD8 shapeReqType; /* always X_ShapeSelectInput */ - CARD16 length B16; - Window window B32; - BYTE enable; /* xTrue -> send events */ - BYTE pad1; - CARD16 pad2 B16; -} xShapeSelectInputReq; -#define sz_xShapeSelectInputReq 12 - -typedef struct _ShapeNotify { - BYTE type; /* always eventBase + ShapeNotify */ - BYTE kind; /* either ShapeBounding or ShapeClip */ - CARD16 sequenceNumber B16; - Window window B32; - INT16 x B16; - INT16 y B16; /* extents of new shape */ - CARD16 width B16; - CARD16 height B16; - Time time B32; /* time of change */ - BYTE shaped; /* set when a shape actual exists */ - BYTE pad0; - CARD16 pad1 B16; - CARD32 pad2 B32; - CARD32 pad3 B32; -} xShapeNotifyEvent; -#define sz_xShapeNotifyEvent 32 - -typedef struct _ShapeInputSelected { - CARD8 reqType; /* always ShapeReqCode */ - CARD8 shapeReqType; /* always X_ShapeInputSelected */ - CARD16 length B16; - Window window B32; -} xShapeInputSelectedReq; -#define sz_xShapeInputSelectedReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 enabled; /* current status */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* 0 */ - CARD32 pad1 B32; /* unused */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xShapeInputSelectedReply; -#define sz_xShapeInputSelectedReply 32 - -typedef struct _ShapeGetRectangles { - CARD8 reqType; /* always ShapeReqCode */ - CARD8 shapeReqType; /* always X_ShapeGetRectangles */ - CARD16 length B16; - Window window B32; - CARD8 kind; /* ShapeBounding or ShapeClip */ - CARD8 junk1; - CARD16 junk2 B16; -} xShapeGetRectanglesReq; -#define sz_xShapeGetRectanglesReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 ordering; /* UnSorted, YSorted, YXSorted, YXBanded */ - CARD16 sequenceNumber B16; - CARD32 length B32; /* not zero */ - CARD32 nrects B32; /* number of rectangles */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xShapeGetRectanglesReply; /* followed by xRectangles */ -#define sz_xShapeGetRectanglesReply 32 - -#undef Window -#undef Time - -#endif /* _SHAPESTR_H_ */ diff --git a/nx-X11/include/extensions/xfixesproto.h b/nx-X11/include/extensions/xfixesproto.h index 0ef6a2fd6..b3f35e878 100644 --- a/nx-X11/include/extensions/xfixesproto.h +++ b/nx-X11/include/extensions/xfixesproto.h @@ -28,7 +28,7 @@ #include #include #define _SHAPE_SERVER_ -#include +#include #undef _SHAPE_SERVER_ #define Window CARD32 diff --git a/nx-X11/lib/Xext/Imakefile b/nx-X11/lib/Xext/Imakefile index e96e23510..629a14bf1 100644 --- a/nx-X11/lib/Xext/Imakefile +++ b/nx-X11/lib/Xext/Imakefile @@ -31,13 +31,11 @@ ALLOC_DEFINES = Malloc0ReturnsNullDefines INCLUDES = -I$(XLIBSRC) SRCS = globals.c \ extutil.c \ - XShape.c \ $(SHMSRCS) \ $(NULL) OBJS = globals.o \ extutil.o \ - XShape.o \ $(SHMOBJS) \ $(NULL) diff --git a/nx-X11/lib/Xext/XShape.c b/nx-X11/lib/Xext/XShape.c deleted file mode 100644 index 79b4b78f6..000000000 --- a/nx-X11/lib/Xext/XShape.c +++ /dev/null @@ -1,490 +0,0 @@ -/* - * $Xorg: XShape.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ - * -Copyright 1989, 1998 The Open Group - -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. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * - * Author: Keith Packard, MIT X Consortium - */ -/* $XFree86: xc/lib/Xext/XShape.c,v 1.3 2002/10/16 00:37:27 dawes Exp $ */ -#define NEED_EVENTS -#define NEED_REPLIES -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include -#include - -static XExtensionInfo _shape_info_data; -static XExtensionInfo *shape_info = &_shape_info_data; -static /* const */ char *shape_extension_name = SHAPENAME; - -#define ShapeCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, shape_extension_name, val) -#define ShapeSimpleCheckExtension(dpy,i) \ - XextSimpleCheckExtension (dpy, i, shape_extension_name) - - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -static int close_display(Display *dpy, XExtCodes *codes); -static Bool wire_to_event (Display *dpy, XEvent *re, xEvent *event); -static Status event_to_wire (Display *dpy, XEvent *re, xEvent *event); -static /* const */ XExtensionHooks shape_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - wire_to_event, /* wire_to_event */ - event_to_wire, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, shape_info, - shape_extension_name, - &shape_extension_hooks, - ShapeNumberEvents, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, shape_info) - - -static Bool -wire_to_event (Display *dpy, XEvent *re, xEvent *event) -{ - XExtDisplayInfo *info = find_display (dpy); - XShapeEvent *se; - xShapeNotifyEvent *sevent; - - ShapeCheckExtension (dpy, info, False); - - switch ((event->u.u.type & 0x7f) - info->codes->first_event) { - case ShapeNotify: - se = (XShapeEvent *) re; - sevent = (xShapeNotifyEvent *) event; - se->type = sevent->type & 0x7f; - se->serial = _XSetLastRequestRead(dpy,(xGenericReply *) event); - se->send_event = (sevent->type & 0x80) != 0; - se->display = dpy; - se->window = sevent->window; - se->kind = sevent->kind; - se->x = cvtINT16toInt (sevent->x); - se->y = cvtINT16toInt (sevent->y); - se->width = sevent->width; - se->height = sevent->height; - se->time = sevent->time; - se->shaped = True; - if (sevent->shaped == xFalse) - se->shaped = False; - return True; - } - return False; -} - -static Status -event_to_wire (Display *dpy, XEvent *re, xEvent *event) -{ - XExtDisplayInfo *info = find_display (dpy); - XShapeEvent *se; - xShapeNotifyEvent *sevent; - - ShapeCheckExtension (dpy, info, 0); - - switch ((re->type & 0x7f) - info->codes->first_event) { - case ShapeNotify: - se = (XShapeEvent *) re; - sevent = (xShapeNotifyEvent *) event; - sevent->type = se->type | (se->send_event ? 0x80 : 0); - sevent->sequenceNumber = se->serial & 0xffff; - sevent->window = se->window; - sevent->kind = se->kind; - sevent->x = se->x; - sevent->y = se->y; - sevent->width = se->width; - sevent->height = se->height; - sevent->time = se->time; - return 1; - } - return 0; -} - - -/**************************************************************************** - * * - * Shape public interfaces * - * * - ****************************************************************************/ - -Bool XShapeQueryExtension (Display *dpy, int *event_basep, int *error_basep) -{ - XExtDisplayInfo *info = find_display (dpy); - - if (XextHasExtension(info)) { - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - return True; - } else { - return False; - } -} - - -Status XShapeQueryVersion( - Display *dpy, - int *major_versionp, - int *minor_versionp) -{ - XExtDisplayInfo *info = find_display (dpy); - xShapeQueryVersionReply rep; - register xShapeQueryVersionReq *req; - - ShapeCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - GetReq (ShapeQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->shapeReqType = X_ShapeQueryVersion; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - *major_versionp = rep.majorVersion; - *minor_versionp = rep.minorVersion; - UnlockDisplay (dpy); - SyncHandle (); - return 1; -} - -void XShapeCombineRegion( - register Display *dpy, - Window dest, - int destKind, int xOff, int yOff, - register REGION *r, - int op) -{ - XExtDisplayInfo *info = find_display (dpy); - register xShapeRectanglesReq *req; - register long nbytes; - register int i; - register XRectangle *xr, *pr; - register BOX *pb; - - ShapeSimpleCheckExtension (dpy, info); - - LockDisplay(dpy); - GetReq(ShapeRectangles, req); - xr = (XRectangle *) - _XAllocScratch(dpy, (unsigned long)(r->numRects * sizeof (XRectangle))); - for (pr = xr, pb = r->rects, i = r->numRects; --i >= 0; pr++, pb++) { - pr->x = pb->x1; - pr->y = pb->y1; - pr->width = pb->x2 - pb->x1; - pr->height = pb->y2 - pb->y1; - } - req->reqType = info->codes->major_opcode; - req->shapeReqType = X_ShapeRectangles; - req->op = op; - req->ordering = YXBanded; - req->destKind = destKind; - req->dest = dest; - req->xOff = xOff; - req->yOff = yOff; - - /* SIZEOF(xRectangle) will be a multiple of 4 */ - req->length += r->numRects * (SIZEOF(xRectangle) / 4); - - nbytes = r->numRects * sizeof(xRectangle); - - Data16 (dpy, (short *) xr, nbytes); - UnlockDisplay(dpy); - SyncHandle(); -} - - -void XShapeCombineRectangles ( - register Display *dpy, - XID dest, - int destKind, int xOff, int yOff, - XRectangle *rects, - int n_rects, - int op, int ordering) -{ - XExtDisplayInfo *info = find_display (dpy); - register xShapeRectanglesReq *req; - register long nbytes; - - ShapeSimpleCheckExtension (dpy, info); - - LockDisplay(dpy); - GetReq(ShapeRectangles, req); - req->reqType = info->codes->major_opcode; - req->shapeReqType = X_ShapeRectangles; - req->op = op; - req->ordering = ordering; - req->destKind = destKind; - req->dest = dest; - req->xOff = xOff; - req->yOff = yOff; - - /* SIZEOF(xRectangle) will be a multiple of 4 */ - req->length += n_rects * (SIZEOF(xRectangle) / 4); - - nbytes = n_rects * sizeof(xRectangle); - - Data16 (dpy, (short *) rects, nbytes); - UnlockDisplay(dpy); - SyncHandle(); -} - - -void XShapeCombineMask ( - register Display *dpy, - XID dest, - int destKind, - int xOff, int yOff, - Pixmap src, - int op) -{ - XExtDisplayInfo *info = find_display (dpy); - register xShapeMaskReq *req; - - ShapeSimpleCheckExtension (dpy, info); - - LockDisplay(dpy); - GetReq(ShapeMask, req); - req->reqType = info->codes->major_opcode; - req->shapeReqType = X_ShapeMask; - req->op = op; - req->destKind = destKind; - req->dest = dest; - req->xOff = xOff; - req->yOff = yOff; - req->src = src; - UnlockDisplay(dpy); - SyncHandle(); -} - -void XShapeCombineShape ( - register Display *dpy, - XID dest, - int destKind, - int xOff, int yOff, - XID src, - int srcKind, - int op) -{ - XExtDisplayInfo *info = find_display (dpy); - register xShapeCombineReq *req; - - ShapeSimpleCheckExtension (dpy, info); - - LockDisplay(dpy); - GetReq(ShapeCombine, req); - req->reqType = info->codes->major_opcode; - req->shapeReqType = X_ShapeCombine; - req->op = op; - req->destKind = destKind; - req->srcKind = srcKind; - req->dest = dest; - req->xOff = xOff; - req->yOff = yOff; - req->src = src; - UnlockDisplay(dpy); - SyncHandle(); -} - -void XShapeOffsetShape ( - register Display *dpy, - XID dest, - int destKind, - int xOff, int yOff) -{ - XExtDisplayInfo *info = find_display (dpy); - register xShapeOffsetReq *req; - - ShapeSimpleCheckExtension (dpy, info); - - LockDisplay(dpy); - GetReq(ShapeOffset, req); - req->reqType = info->codes->major_opcode; - req->shapeReqType = X_ShapeOffset; - req->destKind = destKind; - req->dest = dest; - req->xOff = xOff; - req->yOff = yOff; - UnlockDisplay(dpy); - SyncHandle(); -} - -Status XShapeQueryExtents ( - register Display *dpy, - Window window, - int *bShaped, int *xbs, int *ybs, unsigned int *wbs, unsigned int *hbs, /* RETURN */ - int *cShaped, int *xcs, int *ycs, unsigned int *wcs, unsigned int *hcs /* RETURN */) -{ - XExtDisplayInfo *info = find_display (dpy); - xShapeQueryExtentsReply rep; - register xShapeQueryExtentsReq *req; - - ShapeCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - GetReq (ShapeQueryExtents, req); - req->reqType = info->codes->major_opcode; - req->shapeReqType = X_ShapeQueryExtents; - req->window = window; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - *bShaped = rep.boundingShaped; - *cShaped = rep.clipShaped; - *xbs = cvtINT16toInt (rep.xBoundingShape); - *ybs = cvtINT16toInt (rep.yBoundingShape); - *wbs = rep.widthBoundingShape; - *hbs = rep.heightBoundingShape; - *xcs = cvtINT16toInt (rep.xClipShape); - *ycs = cvtINT16toInt (rep.yClipShape); - *wcs = rep.widthClipShape; - *hcs = rep.heightClipShape; - UnlockDisplay (dpy); - SyncHandle (); - return 1; -} - - -void XShapeSelectInput ( - register Display *dpy, - Window window, - unsigned long mask) -{ - XExtDisplayInfo *info = find_display (dpy); - register xShapeSelectInputReq *req; - - ShapeSimpleCheckExtension (dpy, info); - - LockDisplay (dpy); - GetReq (ShapeSelectInput, req); - req->reqType = info->codes->major_opcode; - req->shapeReqType = X_ShapeSelectInput; - req->window = window; - if (mask & ShapeNotifyMask) - req->enable = xTrue; - else - req->enable = xFalse; - UnlockDisplay (dpy); - SyncHandle (); -} - -unsigned long XShapeInputSelected (register Display *dpy, Window window) -{ - XExtDisplayInfo *info = find_display (dpy); - register xShapeInputSelectedReq *req; - xShapeInputSelectedReply rep; - - ShapeCheckExtension (dpy, info, False); - - LockDisplay (dpy); - GetReq (ShapeInputSelected, req); - req->reqType = info->codes->major_opcode; - req->shapeReqType = X_ShapeInputSelected; - req->window = window; - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { - UnlockDisplay (dpy); - SyncHandle (); - return False; - } - UnlockDisplay (dpy); - SyncHandle (); - return rep.enabled ? ShapeNotifyMask : 0L; -} - - -XRectangle *XShapeGetRectangles ( - register Display *dpy, - Window window, - int kind, - int *count, /* RETURN */ - int *ordering /* RETURN */) -{ - XExtDisplayInfo *info = find_display (dpy); - register xShapeGetRectanglesReq *req; - xShapeGetRectanglesReply rep; - XRectangle *rects; - xRectangle *xrects; - int i; - - ShapeCheckExtension (dpy, info, (XRectangle *)NULL); - - LockDisplay (dpy); - GetReq (ShapeGetRectangles, req); - req->reqType = info->codes->major_opcode; - req->shapeReqType = X_ShapeGetRectangles; - req->window = window; - req->kind = kind; - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { - UnlockDisplay (dpy); - SyncHandle (); - return (XRectangle *)NULL; - } - *count = rep.nrects; - *ordering = rep.ordering; - rects = 0; - if (*count) { - xrects = (xRectangle *) Xmalloc (*count * sizeof (xRectangle)); - rects = (XRectangle *) Xmalloc (*count * sizeof (XRectangle)); - if (!xrects || !rects) { - if (xrects) - Xfree (xrects); - if (rects) - Xfree (rects); - _XEatData (dpy, *count * sizeof (xRectangle)); - rects = 0; - *count = 0; - } else { - _XRead (dpy, (char *) xrects, *count * sizeof (xRectangle)); - for (i = 0; i < *count; i++) { - rects[i].x = (short) cvtINT16toInt (xrects[i].x); - rects[i].y = (short) cvtINT16toInt (xrects[i].y); - rects[i].width = xrects[i].width; - rects[i].height = xrects[i].height; - } - Xfree (xrects); - } - } - UnlockDisplay (dpy); - SyncHandle (); - return rects; -} diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index 93a3286b1..d0699d857 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -429,7 +429,7 @@ NXAGENTNXLIBS = -L/usr/sfw/lib \ -lXcomp \ -lXcompext -lXcompshad \ -lXrender -lXfixes -lXfont -lXcomposite -lXinerama -lXdmcp \ - -lNX_X11 -lNX_Xext + -lNX_X11 -lNX_Xext -Xext #elif defined(cygwinArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp \ -L../../../nx-X11/exports/lib \ @@ -437,7 +437,7 @@ NXAGENTNXLIBS = -L ../../../nxcomp \ -lXcomp \ -lXcompext -lXcompshad \ -lXrender -lXfixes -lXfont -lXcomposite -lXdmcp \ - -lNX_X11 -lNX_Xext + -lNX_X11 -lNX_Xext -lXext #else NXAGENTNXLIBS = -L ../../../nxcomp \ -L../../../nx-X11/exports/lib \ @@ -445,7 +445,7 @@ NXAGENTNXLIBS = -L ../../../nxcomp \ -lXcomp \ -lXcompext -lXcompshad \ -lXrender -lXfixes -lXfont -lXcomposite -lXinerama -lXdmcp \ - -lNX_X11 -lNX_Xext + -lNX_X11 -lNX_Xext -lXext #endif #endif @@ -478,7 +478,7 @@ nxagent_static_nolibs: nxagent else exit 0; fi $(CCLINK) -o nxagent_static_nolibs -Wl,-Bstatic $(LDOPTIONS) $(NXAGENTOBJS) \ $(NXAGENTLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER) $(LDLIBS) \ - $(LDPRELIBS) $(SYSLIBS) -Wl,-Bdynamic -lNX_Xext -lNX_X11 $(EXTRA_LOAD_FLAGS) + $(LDPRELIBS) $(SYSLIBS) -Wl,-Bdynamic -lNX_Xext -lNX_X11 -lXext $(EXTRA_LOAD_FLAGS) #endif /* NXAgentServer */ #if defined(NXWinServer) && NXWinServer diff --git a/nx-X11/programs/Xserver/Xext/extmod/modinit.h b/nx-X11/programs/Xserver/Xext/extmod/modinit.h index 96a349add..24cef286b 100644 --- a/nx-X11/programs/Xserver/Xext/extmod/modinit.h +++ b/nx-X11/programs/Xserver/Xext/extmod/modinit.h @@ -11,8 +11,7 @@ #ifdef SHAPE extern void ShapeExtensionInit(INITARGS); -#define _SHAPE_SERVER_ /* don't want Xlib structures */ -#include +#include #endif #ifdef XTEST diff --git a/nx-X11/programs/Xserver/Xext/shape.c b/nx-X11/programs/Xserver/Xext/shape.c index 8516192c0..51fcd7d9f 100644 --- a/nx-X11/programs/Xserver/Xext/shape.c +++ b/nx-X11/programs/Xserver/Xext/shape.c @@ -44,8 +44,7 @@ in this Software without prior written authorization from The Open Group. #include "dixstruct.h" #include "resource.h" #include "opaque.h" -#define _SHAPE_SERVER_ /* don't want Xlib structures */ -#include +#include #include "regionstr.h" #include "gcstruct.h" #ifdef EXTMODULE diff --git a/nx-X11/programs/Xserver/hw/nxagent/Agent.h b/nx-X11/programs/Xserver/hw/nxagent/Agent.h index ec312bad2..2fa2b6240 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Agent.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Agent.h @@ -104,7 +104,7 @@ typedef XID KeySym64; #define NX_TRANS_SOCKET #define GC XlibGC #include -#include +#include #undef GC #ifdef _XSERVER64_tmp diff --git a/nx-libs.spec b/nx-libs.spec index a82849476..a29d697b2 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -166,9 +166,7 @@ NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. -The NX_Xext library contains a handful of X11 extensions: -- Display Power Management Signaling (DPMS) extension -- X11 Nonrectangular Window Shape extension (Xshape) +The NX_Xext library contains only one X11 extension: - The MIT Shared Memory extension (MIT-SHM/Xshm) This package contains all necessary include files and libraries @@ -186,14 +184,8 @@ NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. -The NX_Xext library contains a handful of X11 extensions: -- Double Buffer extension (DBE/Xdbe) -- Display Power Management Signaling (DPMS) extension -- X11 Nonrectangular Window Shape extension (Xshape) +The NX_Xext library contains only one X11 extension: - The MIT Shared Memory extension (MIT-SHM/Xshm) -- TOG-CUP (colormap) protocol extension (Xcup) -- X Extended Visual Information extension (XEvi) -- X11 Double-Buffering, Multi-Buffering, and Stereo extension (Xmbuf) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X @@ -483,7 +475,6 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %{_includedir}/nx-X11/extensions/XShm.h %{_includedir}/nx-X11/extensions/Xext.h %{_includedir}/nx-X11/extensions/extutil.h -%{_includedir}/nx-X11/extensions/shape.h %files -n libNX_Xext6 %defattr(-,root,root) @@ -581,7 +572,6 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %{_includedir}/nx-X11/extensions/render.h %{_includedir}/nx-X11/extensions/renderproto.h %{_includedir}/nx-X11/extensions/securstr.h -%{_includedir}/nx-X11/extensions/shapestr.h %{_includedir}/nx-X11/extensions/shmstr.h %{_includedir}/nx-X11/extensions/syncstr.h %{_includedir}/nx-X11/extensions/xcmiscstr.h -- cgit v1.2.3 From 232c7ad9146ce372afc2a1682dd01e3d65916c53 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 1 Jul 2016 00:55:53 +0200 Subject: avoid conflicts when mixing own includes with upstream includes We might better change all guard defines with the ones upstream is using but for now this should also work. --- nx-X11/lib/X11/Xlib.h | 4 +++- nx-X11/lib/X11/Xutil.h | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nx-X11/lib/X11/Xlib.h b/nx-X11/lib/X11/Xlib.h index d4cecc7b5..86945a9e7 100644 --- a/nx-X11/lib/X11/Xlib.h +++ b/nx-X11/lib/X11/Xlib.h @@ -33,8 +33,10 @@ in this Software without prior written authorization from The Open Group. * interface library (Xlib) to the X Window System Protocol (V11). * Structures and symbols starting with "_" are private to the library. */ -#ifndef _XLIB_H_ + +#if !defined(_XLIB_H_) && !defined(_X11_XLIB_H_) #define _XLIB_H_ +#define _X11_XLIB_H_ #define XlibSpecificationRelease 6 diff --git a/nx-X11/lib/X11/Xutil.h b/nx-X11/lib/X11/Xutil.h index d3c991944..a50f254bb 100644 --- a/nx-X11/lib/X11/Xutil.h +++ b/nx-X11/lib/X11/Xutil.h @@ -48,8 +48,9 @@ SOFTWARE. ******************************************************************/ /* $XFree86: xc/lib/X11/Xutil.h,v 3.6 2003/04/13 19:22:20 dawes Exp $ */ -#ifndef _XUTIL_H_ +#if !defined(_XUTIL_H_) && !defined(_X11_XUTIL_H_) #define _XUTIL_H_ +#define _X11_XUTIL_H_ /* You must include before including this file */ #include -- cgit v1.2.3 From e78c5bc3c2df117b4c8e5e4bd24c985cd89c49ad Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 1 Jul 2016 13:54:10 +0200 Subject: remove shm code from libNX_Xext --- .../extras/Mesa/src/mesa/drivers/x11/glxheader.h | 2 +- nx-X11/extras/Mesa/src/mesa/drivers/x11/xmesaP.h | 2 +- nx-X11/include/extensions/Imakefile | 1 - nx-X11/include/extensions/XShm.h | 161 -------- nx-X11/include/extensions/shmstr.h | 217 ---------- nx-X11/lib/Xext/Imakefile | 7 - nx-X11/lib/Xext/XShm.c | 437 --------------------- nx-X11/programs/Xserver/Xext/extmod/modinit.h | 2 +- nx-X11/programs/Xserver/Xext/shm.c | 4 +- nx-X11/programs/Xserver/Xext/xvdisp.c | 2 +- nx-X11/programs/Xserver/mi/miinitext.c | 2 +- nx-X11/programs/Xserver/mi/miscrinit.c | 2 +- nxcompshad/X11.h | 2 +- 13 files changed, 9 insertions(+), 832 deletions(-) delete mode 100644 nx-X11/include/extensions/XShm.h delete mode 100644 nx-X11/include/extensions/shmstr.h delete mode 100644 nx-X11/lib/Xext/XShm.c diff --git a/nx-X11/extras/Mesa/src/mesa/drivers/x11/glxheader.h b/nx-X11/extras/Mesa/src/mesa/drivers/x11/glxheader.h index 1e4db26f7..33d937f1c 100644 --- a/nx-X11/extras/Mesa/src/mesa/drivers/x11/glxheader.h +++ b/nx-X11/extras/Mesa/src/mesa/drivers/x11/glxheader.h @@ -48,7 +48,7 @@ # ifdef USE_XSHM /* was SHM */ # include # include -# include +# include # endif # include diff --git a/nx-X11/extras/Mesa/src/mesa/drivers/x11/xmesaP.h b/nx-X11/extras/Mesa/src/mesa/drivers/x11/xmesaP.h index 640bdf954..26255ae56 100644 --- a/nx-X11/extras/Mesa/src/mesa/drivers/x11/xmesaP.h +++ b/nx-X11/extras/Mesa/src/mesa/drivers/x11/xmesaP.h @@ -31,7 +31,7 @@ # include "GL/xf86glx.h" # include "xf86glx_util.h" #elif defined(USE_XSHM) -# include +# include #endif #include "GL/xmesa.h" #include "mtypes.h" diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index 3a26bed58..3b4760414 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -63,7 +63,6 @@ HEADERS = Xext.h \ xtestconst.h xtestext1.h xteststr.h \ XKB.h XKBgeom.h XKBproto.h XKBstr.h XKBsrv.h \ Xdbeproto.h \ - XShm.h shmstr.h \ $(EXTRAHEADERS) \ record.h recordstr.h \ security.h securstr.h \ diff --git a/nx-X11/include/extensions/XShm.h b/nx-X11/include/extensions/XShm.h deleted file mode 100644 index 4b0d01bef..000000000 --- a/nx-X11/include/extensions/XShm.h +++ /dev/null @@ -1,161 +0,0 @@ -/* $XFree86: xc/include/extensions/XShm.h,v 1.11 2003/04/03 15:11:07 dawes Exp $ */ -/************************************************************ - -Copyright 1989, 1998 The Open Group - -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. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -********************************************************/ - -/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ - -/* $Xorg: XShm.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ - -#ifndef _XSHM_H_ -#define _XSHM_H_ - -#include - -#define X_ShmQueryVersion 0 -#define X_ShmAttach 1 -#define X_ShmDetach 2 -#define X_ShmPutImage 3 -#define X_ShmGetImage 4 -#define X_ShmCreatePixmap 5 - -#define ShmCompletion 0 -#define ShmNumberEvents (ShmCompletion + 1) - -#define BadShmSeg 0 -#define ShmNumberErrors (BadShmSeg + 1) - -typedef unsigned long ShmSeg; - -#ifndef _XSHM_SERVER_ -typedef struct { - int type; /* of event */ - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came frome a SendEvent request */ - Display *display; /* Display the event was read from */ - Drawable drawable; /* drawable of request */ - int major_code; /* ShmReqCode */ - int minor_code; /* X_ShmPutImage */ - ShmSeg shmseg; /* the ShmSeg used in the request */ - unsigned long offset; /* the offset into ShmSeg used in the request */ -} XShmCompletionEvent; - -typedef struct { - ShmSeg shmseg; /* resource id */ - int shmid; /* kernel id */ - char *shmaddr; /* address in client */ - Bool readOnly; /* how the server should attach it */ -} XShmSegmentInfo; - -_XFUNCPROTOBEGIN - -Bool XShmQueryExtension( - Display* /* dpy */ -); - -int XShmGetEventBase( - Display* /* dpy */ -); - -Bool XShmQueryVersion( - Display* /* dpy */, - int* /* majorVersion */, - int* /* minorVersion */, - Bool* /* sharedPixmaps */ -); - -int XShmPixmapFormat( - Display* /* dpy */ -); - -Status XShmAttach( - Display* /* dpy */, - XShmSegmentInfo* /* shminfo */ -); - -Status XShmDetach( - Display* /* dpy */, - XShmSegmentInfo* /* shminfo */ -); - -Status XShmPutImage( - Display* /* dpy */, - Drawable /* d */, - GC /* gc */, - XImage* /* image */, - int /* src_x */, - int /* src_y */, - int /* dst_x */, - int /* dst_y */, - unsigned int /* src_width */, - unsigned int /* src_height */, - Bool /* send_event */ -); - -Status XShmGetImage( - Display* /* dpy */, - Drawable /* d */, - XImage* /* image */, - int /* x */, - int /* y */, - unsigned long /* plane_mask */ -); - -XImage *XShmCreateImage( - Display* /* dpy */, - Visual* /* visual */, - unsigned int /* depth */, - int /* format */, - char* /* data */, - XShmSegmentInfo* /* shminfo */, - unsigned int /* width */, - unsigned int /* height */ -); - -Pixmap XShmCreatePixmap( - Display* /* dpy */, - Drawable /* d */, - char* /* data */, - XShmSegmentInfo* /* shminfo */, - unsigned int /* width */, - unsigned int /* height */, - unsigned int /* depth */ -); - -_XFUNCPROTOEND - -#else /* _XSHM_SERVER_ */ - -#include "screenint.h" -#include "pixmap.h" -#include "gc.h" - -extern void ShmRegisterFbFuncs( - ScreenPtr /* pScreen */ -); - -#endif - -#endif diff --git a/nx-X11/include/extensions/shmstr.h b/nx-X11/include/extensions/shmstr.h deleted file mode 100644 index b15538d4e..000000000 --- a/nx-X11/include/extensions/shmstr.h +++ /dev/null @@ -1,217 +0,0 @@ -/* $XFree86: xc/include/extensions/shmstr.h,v 3.3 2001/12/14 19:53:29 dawes Exp $ */ -/************************************************************ - -Copyright 1989, 1998 The Open Group - -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. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - -********************************************************/ - -/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ - -#ifndef _SHMSTR_H_ -#define _SHMSTR_H_ - -/* $Xorg: shmstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ - -#include "XShm.h" - -#define ShmSeg CARD32 -#define Drawable CARD32 -#define VisualID CARD32 -#define GContext CARD32 -#define Pixmap CARD32 - -#define SHMNAME "MIT-SHM" - -#define SHM_MAJOR_VERSION 1 /* current version numbers */ -#define SHM_MINOR_VERSION 1 - -#ifdef _XSHM_SERVER_ -#define XSHM_PUT_IMAGE_ARGS \ - DrawablePtr /* dst */, \ - GCPtr /* pGC */, \ - int /* depth */, \ - unsigned int /* format */, \ - int /* w */, \ - int /* h */, \ - int /* sx */, \ - int /* sy */, \ - int /* sw */, \ - int /* sh */, \ - int /* dx */, \ - int /* dy */, \ - char * /* data */ - -#define XSHM_CREATE_PIXMAP_ARGS \ - ScreenPtr /* pScreen */, \ - int /* width */, \ - int /* height */, \ - int /* depth */, \ - char * /* addr */ - -typedef struct _ShmFuncs { - PixmapPtr (* CreatePixmap)(XSHM_CREATE_PIXMAP_ARGS); - void (* PutImage)(XSHM_PUT_IMAGE_ARGS); -} ShmFuncs, *ShmFuncsPtr; -#endif - -typedef struct _ShmQueryVersion { - CARD8 reqType; /* always ShmReqCode */ - CARD8 shmReqType; /* always X_ShmQueryVersion */ - CARD16 length B16; -} xShmQueryVersionReq; -#define sz_xShmQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL sharedPixmaps; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of SHM protocol */ - CARD16 minorVersion B16; /* minor version of SHM protocol */ - CARD16 uid B16; - CARD16 gid B16; - CARD8 pixmapFormat; - CARD8 pad0; - CARD16 pad1 B16; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xShmQueryVersionReply; -#define sz_xShmQueryVersionReply 32 - -typedef struct _ShmAttach { - CARD8 reqType; /* always ShmReqCode */ - CARD8 shmReqType; /* always X_ShmAttach */ - CARD16 length B16; - ShmSeg shmseg B32; - CARD32 shmid B32; - BOOL readOnly; - BYTE pad0; - CARD16 pad1 B16; -} xShmAttachReq; -#define sz_xShmAttachReq 16 - -typedef struct _ShmDetach { - CARD8 reqType; /* always ShmReqCode */ - CARD8 shmReqType; /* always X_ShmDetach */ - CARD16 length B16; - ShmSeg shmseg B32; -} xShmDetachReq; -#define sz_xShmDetachReq 8 - -typedef struct _ShmPutImage { - CARD8 reqType; /* always ShmReqCode */ - CARD8 shmReqType; /* always X_ShmPutImage */ - CARD16 length B16; - Drawable drawable B32; - GContext gc B32; - CARD16 totalWidth B16; - CARD16 totalHeight B16; - CARD16 srcX B16; - CARD16 srcY B16; - CARD16 srcWidth B16; - CARD16 srcHeight B16; - INT16 dstX B16; - INT16 dstY B16; - CARD8 depth; - CARD8 format; - CARD8 sendEvent; - CARD8 bpad; - ShmSeg shmseg B32; - CARD32 offset B32; -} xShmPutImageReq; -#define sz_xShmPutImageReq 40 - -typedef struct _ShmGetImage { - CARD8 reqType; /* always ShmReqCode */ - CARD8 shmReqType; /* always X_ShmGetImage */ - CARD16 length B16; - Drawable drawable B32; - INT16 x B16; - INT16 y B16; - CARD16 width B16; - CARD16 height B16; - CARD32 planeMask B32; - CARD8 format; - CARD8 pad0; - CARD8 pad1; - CARD8 pad2; - ShmSeg shmseg B32; - CARD32 offset B32; -} xShmGetImageReq; -#define sz_xShmGetImageReq 32 - -typedef struct _ShmGetImageReply { - BYTE type; /* X_Reply */ - CARD8 depth; - CARD16 sequenceNumber B16; - CARD32 length B32; - VisualID visual B32; - CARD32 size B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; -} xShmGetImageReply; -#define sz_xShmGetImageReply 32 - -typedef struct _ShmCreatePixmap { - CARD8 reqType; /* always ShmReqCode */ - CARD8 shmReqType; /* always X_ShmCreatePixmap */ - CARD16 length B16; - Pixmap pid B32; - Drawable drawable B32; - CARD16 width B16; - CARD16 height B16; - CARD8 depth; - CARD8 pad0; - CARD8 pad1; - CARD8 pad2; - ShmSeg shmseg B32; - CARD32 offset B32; -} xShmCreatePixmapReq; -#define sz_xShmCreatePixmapReq 28 - -typedef struct _ShmCompletion { - BYTE type; /* always eventBase + ShmCompletion */ - BYTE bpad0; - CARD16 sequenceNumber B16; - Drawable drawable B32; - CARD16 minorEvent B16; - BYTE majorEvent; - BYTE bpad1; - ShmSeg shmseg B32; - CARD32 offset B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; -} xShmCompletionEvent; -#define sz_xShmCompletionEvent 32 - -#undef ShmSeg -#undef Drawable -#undef VisualID -#undef GContext -#undef Pixmap - -#endif /* _SHMSTR_H_ */ diff --git a/nx-X11/lib/Xext/Imakefile b/nx-X11/lib/Xext/Imakefile index 629a14bf1..4083ee61f 100644 --- a/nx-X11/lib/Xext/Imakefile +++ b/nx-X11/lib/Xext/Imakefile @@ -18,11 +18,6 @@ XCOMM $XFree86: xc/lib/Xext/Imakefile,v 1.12 2002/10/16 00:37:27 dawes Exp $ REQUIREDLIBS = SharedXextReqs #endif -#if HasShm - SHMSRCS = XShm.c - SHMOBJS = XShm.o -#endif - #if Malloc0ReturnsNull ALLOC_DEFINES = Malloc0ReturnsNullDefines #endif @@ -31,12 +26,10 @@ ALLOC_DEFINES = Malloc0ReturnsNullDefines INCLUDES = -I$(XLIBSRC) SRCS = globals.c \ extutil.c \ - $(SHMSRCS) \ $(NULL) OBJS = globals.o \ extutil.o \ - $(SHMOBJS) \ $(NULL) LINTLIBS = $(LINTXLIB) diff --git a/nx-X11/lib/Xext/XShm.c b/nx-X11/lib/Xext/XShm.c deleted file mode 100644 index ec3720732..000000000 --- a/nx-X11/lib/Xext/XShm.c +++ /dev/null @@ -1,437 +0,0 @@ -/* $XdotOrg: xc/lib/Xext/XShm.c,v 1.5 2005/07/30 21:07:25 alanc Exp $ */ -/* - * $Xorg: XShm.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ - * -Copyright 1989, 1998 The Open Group - -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. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * - * Author: Bob Scheifler and Keith Packard, MIT X Consortium - */ -/* $XFree86: xc/lib/Xext/XShm.c,v 1.6 2002/10/16 02:19:22 dawes Exp $ */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ - -#define NEED_EVENTS -#define NEED_REPLIES -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include - -static XExtensionInfo _shm_info_data; -static XExtensionInfo *shm_info = &_shm_info_data; -static /* const */ char *shm_extension_name = SHMNAME; - -#define ShmCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, shm_extension_name, val) - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -static int close_display(Display *dpy, XExtCodes *codes); -static char *error_string(Display *dpy, int code, XExtCodes *codes, - char *buf, int n); -static Bool wire_to_event (Display *dpy, XEvent *re, xEvent *event); -static Status event_to_wire (Display *dpy, XEvent *re, xEvent *event); -static /* const */ XExtensionHooks shm_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - wire_to_event, /* wire_to_event */ - event_to_wire, /* event_to_wire */ - NULL, /* error */ - error_string, /* error_string */ -}; - -static /* const */ char *shm_error_list[] = { - "BadShmSeg", /* BadShmSeg */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, shm_info, shm_extension_name, - &shm_extension_hooks, ShmNumberEvents, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, shm_info) - -static XEXT_GENERATE_ERROR_STRING (error_string, shm_extension_name, - ShmNumberErrors, shm_error_list) - - -static Bool -wire_to_event (Display *dpy, XEvent *re, xEvent *event) -{ - XExtDisplayInfo *info = find_display (dpy); - XShmCompletionEvent *se; - xShmCompletionEvent *sevent; - - ShmCheckExtension (dpy, info, False); - - switch ((event->u.u.type & 0x7f) - info->codes->first_event) { - case ShmCompletion: - se = (XShmCompletionEvent *) re; - sevent = (xShmCompletionEvent *) event; - se->type = sevent->type & 0x7f; - se->serial = _XSetLastRequestRead(dpy,(xGenericReply *) event); - se->send_event = (sevent->type & 0x80) != 0; - se->display = dpy; - se->drawable = sevent->drawable; - se->major_code = sevent->majorEvent; - se->minor_code = sevent->minorEvent; - se->shmseg = sevent->shmseg; - se->offset = sevent->offset; - return True; - } - return False; -} - -static Status -event_to_wire (Display *dpy, XEvent *re, xEvent *event) -{ - XExtDisplayInfo *info = find_display (dpy); - XShmCompletionEvent *se; - xShmCompletionEvent *sevent; - - ShmCheckExtension (dpy, info, 0); - - switch ((re->type & 0x7f) - info->codes->first_event) { - case ShmCompletion: - se = (XShmCompletionEvent *) re; - sevent = (xShmCompletionEvent *) event; - sevent->type = se->type | (se->send_event ? 0x80 : 0); - sevent->sequenceNumber = se->serial & 0xffff; - sevent->drawable = se->drawable; - sevent->majorEvent = se->major_code; - sevent->minorEvent = se->minor_code; - sevent->shmseg = se->shmseg; - sevent->offset = se->offset; - return True; - } - return False; -} - -/***************************************************************************** - * * - * public Shared Memory Extension routines * - * * - *****************************************************************************/ - -Bool XShmQueryExtension (Display *dpy /* int *event_basep, *error_basep */) -{ - XExtDisplayInfo *info = find_display (dpy); - - if (XextHasExtension(info)) { -/* *event_basep = info->codes->first_event; - *error_basep = info->codes->error_event; */ - return True; - } else { - return False; - } -} - - -int XShmGetEventBase(Display *dpy) -{ - XExtDisplayInfo *info = find_display (dpy); - - if (XextHasExtension(info)) { - return info->codes->first_event; - } else { - return -1; - } -} - - -Bool XShmQueryVersion( - Display *dpy, - int *majorVersion, - int *minorVersion, - Bool *sharedPixmaps) -{ - XExtDisplayInfo *info = find_display (dpy); - xShmQueryVersionReply rep; - register xShmQueryVersionReq *req; - - ShmCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(ShmQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->shmReqType = X_ShmQueryVersion; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *majorVersion = rep.majorVersion; - *minorVersion = rep.minorVersion; - *sharedPixmaps = rep.sharedPixmaps ? True : False; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - - -int XShmPixmapFormat(Display *dpy) -{ - XExtDisplayInfo *info = find_display (dpy); - xShmQueryVersionReply rep; - register xShmQueryVersionReq *req; - - ShmCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(ShmQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->shmReqType = X_ShmQueryVersion; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return 0; - } - UnlockDisplay(dpy); - SyncHandle(); - if (rep.sharedPixmaps && - (rep.majorVersion > 1 || rep.minorVersion > 0)) - return rep.pixmapFormat; - return 0; -} - - -Status XShmAttach(Display *dpy, XShmSegmentInfo *shminfo) -{ - XExtDisplayInfo *info = find_display (dpy); - register xShmAttachReq *req; - - ShmCheckExtension (dpy, info, 0); - - shminfo->shmseg = XAllocID(dpy); - LockDisplay(dpy); - GetReq(ShmAttach, req); - req->reqType = info->codes->major_opcode; - req->shmReqType = X_ShmAttach; - req->shmseg = shminfo->shmseg; - req->shmid = shminfo->shmid; - req->readOnly = shminfo->readOnly ? xTrue : xFalse; - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - - -Status XShmDetach(Display *dpy, XShmSegmentInfo *shminfo) -{ - XExtDisplayInfo *info = find_display (dpy); - register xShmDetachReq *req; - - ShmCheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(ShmDetach, req); - req->reqType = info->codes->major_opcode; - req->shmReqType = X_ShmDetach; - req->shmseg = shminfo->shmseg; - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -static int _XShmDestroyImage (XImage *ximage) -{ - Xfree((char *)ximage); - return 1; -} - -#define ROUNDUP(nbytes, pad) ((((nbytes) + ((pad) - 1)) / (pad)) * (pad)) - -XImage *XShmCreateImage ( - register Display *dpy, - register Visual *visual, - unsigned int depth, - int format, - char *data, - XShmSegmentInfo *shminfo, - unsigned int width, - unsigned int height) -{ - register XImage *image; - - image = (XImage *)Xcalloc(1, (unsigned)sizeof(XImage)); - if (!image) - return image; - image->data = data; - image->obdata = (char *)shminfo; - image->width = width; - image->height = height; - image->depth = depth; - image->format = format; - image->byte_order = dpy->byte_order; - image->bitmap_unit = dpy->bitmap_unit; - image->bitmap_bit_order = dpy->bitmap_bit_order; - image->bitmap_pad = _XGetScanlinePad(dpy, depth); - image->xoffset = 0; - if (visual) { - image->red_mask = visual->red_mask; - image->green_mask = visual->green_mask; - image->blue_mask = visual->blue_mask; - } else { - image->red_mask = image->green_mask = image->blue_mask = 0; - } - if (format == ZPixmap) - image->bits_per_pixel = _XGetBitsPerPixel(dpy, (int)depth); - else - image->bits_per_pixel = 1; - image->bytes_per_line = ROUNDUP((image->bits_per_pixel * width), - image->bitmap_pad) >> 3; - _XInitImageFuncPtrs(image); - image->f.destroy_image = _XShmDestroyImage; - return image; -} - -Status XShmPutImage ( - register Display *dpy, - Drawable d, - GC gc, - register XImage *image, - int src_x, int src_y, int dst_x, int dst_y, - unsigned int src_width, unsigned int src_height, - Bool send_event) -{ - XExtDisplayInfo *info = find_display (dpy); - XShmSegmentInfo *shminfo = (XShmSegmentInfo *)image->obdata; - register xShmPutImageReq *req; - - ShmCheckExtension (dpy, info, 0); - if (!shminfo) return 0; - - LockDisplay(dpy); - FlushGC(dpy, gc); - GetReq(ShmPutImage, req); - req->reqType = info->codes->major_opcode; - req->shmReqType = X_ShmPutImage; - req->drawable = d; - req->gc = gc->gid; - req->srcX = src_x; - req->srcY = src_y; - req->srcWidth = src_width; - req->srcHeight = src_height; - req->dstX = dst_x; - req->dstY = dst_y; - req->totalWidth = image->width; - req->totalHeight = image->height; - req->depth = image->depth; - req->format = image->format; - req->sendEvent = send_event; - req->shmseg = shminfo->shmseg; - req->offset = image->data - shminfo->shmaddr; - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - - -Status XShmGetImage( - register Display *dpy, - Drawable d, - XImage *image, - int x, int y, - unsigned long plane_mask) -{ - XExtDisplayInfo *info = find_display (dpy); - XShmSegmentInfo *shminfo = (XShmSegmentInfo *)image->obdata; - register xShmGetImageReq *req; - xShmGetImageReply rep; - register Visual *visual; - - ShmCheckExtension (dpy, info, 0); - if (!shminfo) return 0; - - LockDisplay(dpy); - GetReq(ShmGetImage, req); - req->reqType = info->codes->major_opcode; - req->shmReqType = X_ShmGetImage; - req->drawable = d; - req->x = x; - req->y = y; - req->width = image->width; - req->height = image->height; - req->planeMask = plane_mask; - req->format = image->format; - req->shmseg = shminfo->shmseg; - req->offset = image->data - shminfo->shmaddr; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return 0; - } - visual = _XVIDtoVisual(dpy, rep.visual); - if (visual) { - image->red_mask = visual->red_mask; - image->green_mask = visual->green_mask; - image->blue_mask = visual->blue_mask; - } else { - image->red_mask = image->green_mask = image->blue_mask = 0; - } - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -Pixmap XShmCreatePixmap ( - register Display *dpy, - Drawable d, - char *data, - XShmSegmentInfo *shminfo, - unsigned int width, unsigned int height, unsigned int depth) -{ - XExtDisplayInfo *info = find_display (dpy); - Pixmap pid; - register xShmCreatePixmapReq *req; - - ShmCheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(ShmCreatePixmap, req); - req->reqType = info->codes->major_opcode; - req->shmReqType = X_ShmCreatePixmap; - req->drawable = d; - req->width = width; - req->height = height; - req->depth = depth; - req->shmseg = shminfo->shmseg; - req->offset = data - shminfo->shmaddr; - pid = req->pid = XAllocID(dpy); - UnlockDisplay(dpy); - SyncHandle(); - return pid; -} diff --git a/nx-X11/programs/Xserver/Xext/extmod/modinit.h b/nx-X11/programs/Xserver/Xext/extmod/modinit.h index 24cef286b..094837d34 100644 --- a/nx-X11/programs/Xserver/Xext/extmod/modinit.h +++ b/nx-X11/programs/Xserver/Xext/extmod/modinit.h @@ -67,7 +67,7 @@ extern void ResExtensionInit(INITARGS); #ifdef SHM extern void ShmExtensionInit(INITARGS); -#include +#include extern void ShmSetPixmapFormat( ScreenPtr pScreen, int format); diff --git a/nx-X11/programs/Xserver/Xext/shm.c b/nx-X11/programs/Xserver/Xext/shm.c index 94d6b4ac1..bca8c2e0e 100644 --- a/nx-X11/programs/Xserver/Xext/shm.c +++ b/nx-X11/programs/Xserver/Xext/shm.c @@ -60,7 +60,7 @@ in this Software without prior written authorization from The Open Group. #include "extnsionst.h" #include "servermd.h" #define _XSHM_SERVER_ -#include +#include #include #ifdef EXTMODULE #include "xf86_ansic.h" @@ -1319,4 +1319,4 @@ SProcShmDispatch (client) return BadRequest; } } -#endif /* NXAGENT_SERVER */ \ No newline at end of file +#endif /* NXAGENT_SERVER */ diff --git a/nx-X11/programs/Xserver/Xext/xvdisp.c b/nx-X11/programs/Xserver/Xext/xvdisp.c index ecd4f9a66..3bcb130c7 100644 --- a/nx-X11/programs/Xserver/Xext/xvdisp.c +++ b/nx-X11/programs/Xserver/Xext/xvdisp.c @@ -68,7 +68,7 @@ SOFTWARE. #include "xvdix.h" #ifdef MITSHM #define _XSHM_SERVER_ -#include +#include #endif #ifdef EXTMODULE diff --git a/nx-X11/programs/Xserver/mi/miinitext.c b/nx-X11/programs/Xserver/mi/miinitext.c index b58202ebd..dcd91c5e0 100644 --- a/nx-X11/programs/Xserver/mi/miinitext.c +++ b/nx-X11/programs/Xserver/mi/miinitext.c @@ -158,7 +158,7 @@ typedef void (*InitExtension)(INITARGS); #ifdef MITSHM #define _XSHM_SERVER_ -#include +#include #endif #ifdef XTEST #define _XTEST_SERVER_ diff --git a/nx-X11/programs/Xserver/mi/miscrinit.c b/nx-X11/programs/Xserver/mi/miscrinit.c index addd5dd64..da80932ad 100644 --- a/nx-X11/programs/Xserver/mi/miscrinit.c +++ b/nx-X11/programs/Xserver/mi/miscrinit.c @@ -42,7 +42,7 @@ from The Open Group. #include "miline.h" #ifdef MITSHM #define _XSHM_SERVER_ -#include +#include #endif /* We use this structure to propogate some information from miScreenInit to diff --git a/nxcompshad/X11.h b/nxcompshad/X11.h index d7b858100..f5d7f2916 100644 --- a/nxcompshad/X11.h +++ b/nxcompshad/X11.h @@ -19,7 +19,7 @@ #define X11Poller_H #include -#include +#include #include "X11/include/Xdamage_nxcompshad.h" #include "X11/include/Xrandr_nxcompshad.h" -- cgit v1.2.3 From 1cd7e35cbdd348f6a383ad4b5149c1f8d2ece0cf Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 1 Jul 2016 13:54:11 +0200 Subject: finally drop libNX_Xext --- debian/control | 98 +++------- debian/libnx-xext-dev.install | 4 - debian/libnx-xext6.install | 1 - debian/libnx-xext6.symbols | 128 ------------- debian/nx-x11proto-xext-dev.install | 1 - debian/rules | 1 - nx-X11/config/cf/README | 4 - nx-X11/config/cf/X11.tmpl | 28 --- nx-X11/include/extensions/Imakefile | 3 +- nx-X11/include/extensions/Xext.h | 57 ------ nx-X11/include/extensions/extutil.h | 192 ------------------- nx-X11/lib/Imakefile | 6 - nx-X11/lib/Xext/Imakefile | 39 ---- nx-X11/lib/Xext/extutil.c | 273 ---------------------------- nx-X11/lib/Xext/globals.c | 90 --------- nx-X11/programs/Xserver/Imakefile | 8 +- nx-X11/programs/Xserver/hw/nxagent/Render.c | 2 +- nx-libs.spec | 55 ------ nxcompshad/Makefile.in | 2 +- 19 files changed, 30 insertions(+), 962 deletions(-) delete mode 100644 debian/libnx-xext-dev.install delete mode 100644 debian/libnx-xext6.install delete mode 100644 debian/libnx-xext6.symbols delete mode 100644 nx-X11/include/extensions/Xext.h delete mode 100644 nx-X11/include/extensions/extutil.h delete mode 100644 nx-X11/lib/Xext/Imakefile delete mode 100644 nx-X11/lib/Xext/extutil.c delete mode 100644 nx-X11/lib/Xext/globals.c diff --git a/debian/control b/debian/control index c7e36f50c..4d9fcbddf 100644 --- a/debian/control +++ b/debian/control @@ -18,6 +18,7 @@ Build-Depends: libxfont-dev, libxdmcp-dev, libxdamage-dev, + libxext-dev, libxcomposite-dev, libxrandr-dev, libxfixes-dev, @@ -75,6 +76,7 @@ Depends: nx-x11-common (>= ${source:Version}), nx-x11-common (<< ${source:Version}.1), Breaks: nxlibs (<= 3.5.1), libnx-x11 (<< 2:3.5.0.29-1~), + libnx-xext6 (<< 2:3.6.0.0), libnx-xau6 (<< 2:3.6.0.0), libnx-xcomposite1 (<< 2:3.6.0.0), libnx-xdamage1 (<< 2:3.6.0.0), @@ -86,6 +88,7 @@ Breaks: nxlibs (<= 3.5.1), libnx-xrender1 (<< 2:3.6.0.0), libnx-xtst6 (<< 2:3.6.0.0), Replaces: nxlibs, + libnx-xext6, libnx-xau6, libnx-xcomposite1, libnx-xdamage1, @@ -109,6 +112,7 @@ Provides: libnx-x11-6-dev Section: libdevel Architecture: any Breaks: nxlibs-dev (<=3.5.1), + libnx-xext-dev (<< 2:3.6.0.0), libnx-xau-dev (<< 2:3.6.0.0), libnx-xcomposite-dev (<< 2:3.6.0.0), libnx-xdamage-dev (<< 2:3.6.0.0), @@ -120,6 +124,7 @@ Breaks: nxlibs-dev (<=3.5.1), libnx-xrender-dev (<< 2:3.6.0.0), libnx-xtst-dev (<< 2:3.6.0.0), Replaces: nxlibs-dev, + libnx-xext-dev, libnx-xau-dev, libnx-xcomposite-dev, libnx-xdamage-dev, @@ -149,6 +154,7 @@ Depends: ${misc:Depends}, Section: debug Breaks: nx-x11-dbg (<< 2:3.5.0.29-1~), + libnx-xext6-dbg (<< 2:3.6.0.0), libnx-xau6-dbg (<< 2:3.6.0.0), libnx-xcomposite1-dbg (<< 2:3.6.0.0), libnx-xdamage1-dbg (<< 2:3.6.0.0), @@ -160,6 +166,7 @@ Breaks: nx-x11-dbg (<< 2:3.5.0.29-1~), libnx-xrender1-dbg (<< 2:3.6.0.0), libnx-xtst6-dbg (<< 2:3.6.0.0), Replaces: nx-x11-dbg, + libnx-xext6-dbg, libnx-xau6-dbg, libnx-xcomposite1-dbg, libnx-xdamage1-dbg, @@ -178,7 +185,7 @@ Description: nx-X11 client-side library (debug package) This package contains debug symbols for the core nx-X11 libraries customized for nxagent. -Package: nx-x11proto-composite-dev +Package: nx-x11proto-xext-dev Section: libdevel Architecture: any Multi-Arch: same @@ -186,108 +193,49 @@ Depends: ${misc:Depends}, Breaks: nxlibs (<= 3.5.1), libnx-x11-dev (<< 2:3.5.0.29-1~), -Description: nx-X11 Composite extension wire protocol + libnx-xext-dev (<< 2:3.5.99.0~), +Description: nx-X11 miscellaneous extension wire protocol NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . This package provides development headers describing the wire protocol - for the Composite extension in nx-X11, used to let arbitrary client - programs control drawing of the final image. - -Package: nx-x11proto-damage-dev -Section: libdevel -Architecture: any -Multi-Arch: same -Depends: - ${misc:Depends}, -Description: nx-X11 Damage extension wire protocol (dummy package) - NX is a software suite which implements very efficient - compression of the X11 protocol. This increases performance when - using X applications over a network, especially a slow one. - . - This package removes the obsoleted wire protocol headers for the - libNX_Xdamage.so.1 library. With recent versions of NX, the system-wide - installed libXdamage gets used. - . - This package can be safely removed. - -Package: libnx-xext6 -Architecture: any -Multi-Arch: same -Depends: - ${shlibs:Depends}, - ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11 (<< 2:3.5.0.29-1~), -Description: nx-X11 miscellaneous extension library - NX is a software suite which implements very efficient - compression of the X11 protocol. This increases performance when - using X applications over a network, especially a slow one. - . - libNX_Xext provides an X Window System client interface to several - extensions to the X protocol. - . - libnx_Xext also provides a small set of utility functions to aid authors - of client APIs for X protocol extensions. - -Package: libnx-xext-dev -Provides: libnx-xext6-dev -Section: libdevel -Architecture: any -Multi-Arch: same -Depends: - libnx-xext6 (= ${binary:Version}), - nx-x11proto-xext-dev (= ${binary:Version}), - ${misc:Depends}, -Breaks: nxlibs (<= 3.5.1), - libnx-x11-dev (<< 2:3.5.0.29-1~), -Description: nx-X11 miscellaneous extension library (development headers) - NX is a software suite which implements very efficient - compression of the X11 protocol. This increases performance when - using X applications over a network, especially a slow one. - . - libNX_Xext provides an X Window System client interface to several - extensions to the X protocol. - . - This package contains the development headers for this library. + for various extensions, the client-side libraries of which are provided + in the Xext library. -Package: nx-x11proto-xext-dev +Package: nx-x11proto-composite-dev Section: libdevel Architecture: any Multi-Arch: same Depends: - libnx-xext6 (= ${binary:Version}), ${misc:Depends}, Breaks: nxlibs (<= 3.5.1), libnx-x11-dev (<< 2:3.5.0.29-1~), - libnx-xext-dev (<< 2:3.5.99.0~), -Description: nx-X11 miscellaneous extension wire protocol +Description: nx-X11 Composite extension wire protocol NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . This package provides development headers describing the wire protocol - for various extensions, the client-side libraries of which are provided - in the Xext library. + for the Composite extension in nx-X11, used to let arbitrary client + programs control drawing of the final image. -Package: libnx-xext6-dbg +Package: nx-x11proto-damage-dev +Section: libdevel Architecture: any Multi-Arch: same Depends: - libnx-xext6 (= ${binary:Version}), ${misc:Depends}, -Section: debug -Breaks: nx-x11-dbg (<< 2:3.5.0.29-1~), -Description: nx-X11 miscellaneous extension library (debug package) +Description: nx-X11 Damage extension wire protocol (dummy package) NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when using X applications over a network, especially a slow one. . - libNX_Xext provides an X Window System client interface to several - extensions to the X protocol. + This package removes the obsoleted wire protocol headers for the + libNX_Xdamage.so.1 library. With recent versions of NX, the system-wide + installed libXdamage gets used. . - This package contains debug symbols for this library. + This package can be safely removed. Package: nx-x11proto-xfixes-dev Section: libdevel diff --git a/debian/libnx-xext-dev.install b/debian/libnx-xext-dev.install deleted file mode 100644 index 5b88215e0..000000000 --- a/debian/libnx-xext-dev.install +++ /dev/null @@ -1,4 +0,0 @@ -usr/lib/*/libNX_Xext.so -usr/include/*/nx-X11/extensions/XShm.h -usr/include/*/nx-X11/extensions/Xext.h -usr/include/*/nx-X11/extensions/extutil.h diff --git a/debian/libnx-xext6.install b/debian/libnx-xext6.install deleted file mode 100644 index 361d951f5..000000000 --- a/debian/libnx-xext6.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/libNX_Xext.so.* diff --git a/debian/libnx-xext6.symbols b/debian/libnx-xext6.symbols deleted file mode 100644 index a548baf57..000000000 --- a/debian/libnx-xext6.symbols +++ /dev/null @@ -1,128 +0,0 @@ -libNX_Xext.so.6 libnx-xext6 #MINVER# -#MISSING: 2:3.5.99.0-0# DPMSCapable@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# DPMSDisable@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# DPMSEnable@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# DPMSForceLevel@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# DPMSGetTimeouts@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# DPMSGetVersion@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# DPMSInfo@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# DPMSQueryExtension@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# DPMSSetTimeouts@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XLbxGetEventBase@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XLbxQueryExtension@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XLbxQueryVersion@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XMITMiscGetBugMode@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XMITMiscQueryExtension@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XMITMiscSetBugMode@Base 3.5.0.29 - XMissingExtension@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSecurityAllocXauth@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSecurityFreeXauth@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSecurityGenerateAuthorization@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSecurityQueryExtension@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSecurityRevokeAuthorization@Base 3.5.0.29 - XSetExtensionErrorHandler@Base 3.5.0.29 - XShapeCombineMask@Base 3.5.0.29 - XShapeCombineRectangles@Base 3.5.0.29 - XShapeCombineRegion@Base 3.5.0.29 - XShapeCombineShape@Base 3.5.0.29 - XShapeGetRectangles@Base 3.5.0.29 - XShapeInputSelected@Base 3.5.0.29 - XShapeOffsetShape@Base 3.5.0.29 - XShapeQueryExtension@Base 3.5.0.29 - XShapeQueryExtents@Base 3.5.0.29 - XShapeQueryVersion@Base 3.5.0.29 - XShapeSelectInput@Base 3.5.0.29 - XShmAttach@Base 3.5.0.29 - XShmCreateImage@Base 3.5.0.29 - XShmCreatePixmap@Base 3.5.0.29 - XShmDetach@Base 3.5.0.29 - XShmGetEventBase@Base 3.5.0.29 - XShmGetImage@Base 3.5.0.29 - XShmPixmapFormat@Base 3.5.0.29 - XShmPutImage@Base 3.5.0.29 - XShmQueryExtension@Base 3.5.0.29 - XShmQueryVersion@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncAwait@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncChangeAlarm@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncChangeCounter@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncCreateAlarm@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncCreateCounter@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncDestroyAlarm@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncDestroyCounter@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncFreeSystemCounterList@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncGetPriority@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncInitialize@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncIntToValue@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncIntsToValue@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncListSystemCounters@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncMaxValue@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncMinValue@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncQueryAlarm@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncQueryCounter@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncQueryExtension@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncSetCounter@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncSetPriority@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncValueAdd@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncValueEqual@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncValueGreaterOrEqual@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncValueGreaterThan@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncValueHigh32@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncValueIsNegative@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncValueIsPositive@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncValueIsZero@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncValueLessOrEqual@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncValueLessThan@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncValueLow32@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XSyncValueSubtract@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XTestFakeAckType@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XTestFakeInput@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XTestFlush@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XTestGetInput@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XTestInputActionType@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XTestMovePointer@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XTestPressButton@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XTestPressKey@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XTestQueryInputSize@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XTestReset@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XTestStopInput@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XagCreateAssociation@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XagCreateEmbeddedApplicationGroup@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XagCreateNonembeddedApplicationGroup@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XagDestroyApplicationGroup@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XagDestroyAssociation@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XagGetApplicationGroupAttributes@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XagQueryApplicationGroup@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XagQueryVersion@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XcupGetReservedColormapEntries@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XcupQueryVersion@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XcupStoreColors@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeAllocateBackBufferName@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeBeginIdiom@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeDeallocateBackBufferName@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeEndIdiom@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeFreeVisualInfo@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeGetBackBufferAttributes@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeGetVisualInfo@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeQueryExtension@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XdbeSwapBuffers@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XeviGetVisualInfo@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XeviQueryExtension@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XeviQueryVersion@Base 3.5.0.29 - XextAddDisplay@Base 3.5.0.29 - XextCreateExtension@Base 3.5.0.29 - XextDestroyExtension@Base 3.5.0.29 - XextFindDisplay@Base 3.5.0.29 - XextRemoveDisplay@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufChangeBufferAttributes@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufChangeWindowAttributes@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufClearBufferArea@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufCreateBuffers@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufCreateStereoWindow@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufDestroyBuffers@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufDisplayBuffers@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufGetBufferAttributes@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufGetScreenInfo@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufGetVersion@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufGetWindowAttributes@Base 3.5.0.29 -#MISSING: 2:3.5.99.0-0# XmbufQueryExtension@Base 3.5.0.29 - _XExtensionErrorFunction@Base 3.5.0.29 diff --git a/debian/nx-x11proto-xext-dev.install b/debian/nx-x11proto-xext-dev.install index ae415e6ca..dff1fb037 100644 --- a/debian/nx-x11proto-xext-dev.install +++ b/debian/nx-x11proto-xext-dev.install @@ -2,6 +2,5 @@ usr/include/*/nx-X11/extensions/dpmsstr.h usr/include/*/nx-X11/extensions/xteststr.h usr/include/*/nx-X11/extensions/xtestconst.h usr/include/*/nx-X11/extensions/securstr.h -usr/include/*/nx-X11/extensions/shmstr.h usr/include/*/nx-X11/extensions/syncstr.h usr/include/*/nx-X11/extensions/Xdbeproto.h diff --git a/debian/rules b/debian/rules index 2395f43e5..766042fee 100755 --- a/debian/rules +++ b/debian/rules @@ -56,7 +56,6 @@ override_dh_auto_build: override_dh_strip: dh_strip -plibnx-x11-6 --dbg-package=libnx-x11-6-dbg - dh_strip -plibnx-xext6 --dbg-package=libnx-xext6-dbg dh_strip -plibxcomp3 --dbg-package=libxcomp3-dbg dh_strip -plibxcompshad3 --dbg-package=libxcompshad3-dbg dh_strip -plibxcompext3 --dbg-package=libxcompext3-dbg diff --git a/nx-X11/config/cf/README b/nx-X11/config/cf/README index 0cd37245a..75fa4767c 100644 --- a/nx-X11/config/cf/README +++ b/nx-X11/config/cf/README @@ -183,7 +183,6 @@ X11.tmpl provides defaults for the following variables: ConnectionFlags -D's for supported transports ContribDir location of user-contributed sources DebugLibX11 build libX11_d.a - DebugLibXext build libXext_d.a DefaultCursorTheme name of default cursor theme DefaultFontPath default server font path DefaultRGBDatabase default server rgb color database @@ -215,11 +214,9 @@ X11.tmpl provides defaults for the following variables: NeedDefaultDepLibs boolean for enabling default DEPLIBS NlsDir directory in which to install nls files NormalLibX11 build libX11.a - NormalLibXext build libXext.a OsNameDefines If uname(2) unavailable, set to -DOS_NAME=OSName PrimaryScreenResolution resolution of default server screen ProfileLibX11 build libX11_p.a - ProfileLibXext build libXext_p.a ProjectX version indicating this is the X Window System RemoveTargetProgramByMoving boolean for rm -f that doesn't SHELLPATH -D for /bin/sh @@ -229,7 +226,6 @@ X11.tmpl provides defaults for the following variables: ServerOSDefines OS -D's for server ServerAssertDefines -DNDEBUG for no assertions, /**/ for assertions SharedLibX11 boolean for making sharable libX11.so - SharedLibXext boolean for making sharable libXext.so ShmDefines MIT-SHM define TwmDir directory in which to install twm config files UseCCMakeDepend boolean for using alternate makedepend script diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index ce952fb68..a6c410512 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -150,9 +150,6 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildLoadableXlibXcursor #define BuildLoadableXlibXcursor (HasDlopen && SharedLibX11) #endif -#ifndef BuildXextLib -#define BuildXextLib BuildLibraries -#endif #ifndef BuildTestExt #define BuildTestExt YES #endif @@ -1194,31 +1191,6 @@ ProjectUnsharedLibReferences(XONLY,NX_X11,$(XLIBSRC),XBuildLibDir) DEPXLIBONLY = $(DEPXONLYLIB) XLIBONLY = $(XONLYLIB) LINTXONLYLIB = $(LINTXONLY) -#ifndef SharedLibXext -#define SharedLibXext HasSharedLibraries -#endif -#ifndef NormalLibXext -#define NormalLibXext (!SharedLibXext | ForceNormalLib) -#endif -#ifndef DebugLibXext -#define DebugLibXext NO /* debugged Xext library */ -#endif -#ifndef ProfileLibXext -#define ProfileLibXext NO /* profiled Xext library */ -#endif - XEXTLIBSRC = $(LIBSRC)/Xext -#if SharedLibXext -#ifndef SharedXextRev -#define SharedXextRev 6.4 -#endif -SharedLibReferences(EXTENSION,NX_Xext,$(XEXTLIBSRC),SOXEXTREV,SharedXextRev) -#else -ProjectUnsharedLibReferences(EXTENSION,NX_Xext,$(XEXTLIBSRC),XBuildLibDir) -#endif -LINTEXTENSIONLIB = $(LINTEXTENSION) - DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB) - XLIB = $(EXTENSIONLIB) $(XONLYLIB) - LINTXLIB = $(LINTXONLYLIB) #if HasMotif diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index 3b4760414..f9c9598c7 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -55,10 +55,9 @@ EXTRAHEADERS = \ $(XRESHEADERS) \ $(NULL) -HEADERS = Xext.h \ +HEADERS = \ xcmiscstr.h \ bigreqstr.h \ - extutil.h \ XI.h XInput.h XIproto.h \ xtestconst.h xtestext1.h xteststr.h \ XKB.h XKBgeom.h XKBproto.h XKBstr.h XKBsrv.h \ diff --git a/nx-X11/include/extensions/Xext.h b/nx-X11/include/extensions/Xext.h deleted file mode 100644 index b0ce292fc..000000000 --- a/nx-X11/include/extensions/Xext.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * $Xorg: Xext.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ - * -Copyright 1989, 1998 The Open Group - -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. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - */ -/* $XFree86: xc/include/extensions/Xext.h,v 1.4 2001/12/14 19:53:28 dawes Exp $ */ - -#ifndef _XEXT_H_ -#define _XEXT_H_ - -#include - -_XFUNCPROTOBEGIN - -extern int (*XSetExtensionErrorHandler( - int (*handler)( - Display *, - char *, - char * - ) -))( - Display *, - char *, - char * -); - -extern int XMissingExtension( - Display* /* dpy */, - _Xconst char* /* ext_name */ -); - -_XFUNCPROTOEND - -#define X_EXTENSION_UNKNOWN "unknown" -#define X_EXTENSION_MISSING "missing" - -#endif /* _XEXT_H_ */ diff --git a/nx-X11/include/extensions/extutil.h b/nx-X11/include/extensions/extutil.h deleted file mode 100644 index de6becfd2..000000000 --- a/nx-X11/include/extensions/extutil.h +++ /dev/null @@ -1,192 +0,0 @@ -/* - * $Xorg: extutil.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ - * -Copyright 1989, 1998 The Open Group - -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. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * - * Author: Jim Fulton, MIT The Open Group - * - * Xlib Extension-Writing Utilities - * - * This package contains utilities for writing the client API for various - * protocol extensions. THESE INTERFACES ARE NOT PART OF THE X STANDARD AND - * ARE SUBJECT TO CHANGE! - */ -/* $XFree86: xc/include/extensions/extutil.h,v 1.9 2001/12/14 19:53:28 dawes Exp $ */ - -#ifndef _EXTUTIL_H_ -#define _EXTUTIL_H_ - -#include - -/* - * We need to keep a list of open displays since the Xlib display list isn't - * public. We also have to per-display info in a separate block since it isn't - * stored directly in the Display structure. - */ -typedef struct _XExtDisplayInfo { - struct _XExtDisplayInfo *next; /* keep a linked list */ - Display *display; /* which display this is */ - XExtCodes *codes; /* the extension protocol codes */ - XPointer data; /* extra data for extension to use */ -} XExtDisplayInfo; - -typedef struct _XExtensionInfo { - XExtDisplayInfo *head; /* start of list */ - XExtDisplayInfo *cur; /* most recently used */ - int ndisplays; /* number of displays */ -} XExtensionInfo; - -typedef struct _XExtensionHooks { - int (*create_gc)( - Display* /* display */, - GC /* gc */, - XExtCodes* /* codes */ -); - int (*copy_gc)( - Display* /* display */, - GC /* gc */, - XExtCodes* /* codes */ -); - int (*flush_gc)( - Display* /* display */, - GC /* gc */, - XExtCodes* /* codes */ -); - int (*free_gc)( - Display* /* display */, - GC /* gc */, - XExtCodes* /* codes */ -); - int (*create_font)( - Display* /* display */, - XFontStruct* /* fs */, - XExtCodes* /* codes */ -); - int (*free_font)( - Display* /* display */, - XFontStruct* /* fs */, - XExtCodes* /* codes */ -); - int (*close_display)( - Display* /* display */, - XExtCodes* /* codes */ -); - Bool (*wire_to_event)( - Display* /* display */, - XEvent* /* re */, - xEvent* /* event */ -); - Status (*event_to_wire)( - Display* /* display */, - XEvent* /* re */, - xEvent* /* event */ -); - int (*error)( - Display* /* display */, - xError* /* err */, - XExtCodes* /* codes */, - int* /* ret_code */ -); - char *(*error_string)( - Display* /* display */, - int /* code */, - XExtCodes* /* codes */, - char* /* buffer */, - int /* nbytes */ -); -} XExtensionHooks; - -extern XExtensionInfo *XextCreateExtension( - void -); -extern void XextDestroyExtension( - XExtensionInfo* /* info */ -); -extern XExtDisplayInfo *XextAddDisplay( - XExtensionInfo* /* extinfo */, - Display* /* dpy */, - char* /* ext_name */, - XExtensionHooks* /* hooks */, - int /* nevents */, - XPointer /* data */ -); -extern int XextRemoveDisplay( - XExtensionInfo* /* extinfo */, - Display* /* dpy */ -); -extern XExtDisplayInfo *XextFindDisplay( - XExtensionInfo* /* extinfo */, - Display* /* dpy */ -); - -#define XextHasExtension(i) ((i) && ((i)->codes)) -#define XextCheckExtension(dpy,i,name,val) \ - if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return val; } -#define XextSimpleCheckExtension(dpy,i,name) \ - if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return; } - - -/* - * helper macros to generate code that is common to all extensions; caller - * should prefix it with static if extension source is in one file; this - * could be a utility function, but have to stack 6 unused arguments for - * something that is called many, many times would be bad. - */ -#define XEXT_GENERATE_FIND_DISPLAY(proc,extinfo,extname,hooks,nev,data) \ -XExtDisplayInfo *proc (Display *dpy) \ -{ \ - XExtDisplayInfo *dpyinfo; \ - if (!extinfo) { if (!(extinfo = XextCreateExtension())) return NULL; } \ - if (!(dpyinfo = XextFindDisplay (extinfo, dpy))) \ - dpyinfo = XextAddDisplay (extinfo,dpy,extname,hooks,nev,data); \ - return dpyinfo; \ -} - -#define XEXT_FIND_DISPLAY_PROTO(proc) \ - XExtDisplayInfo *proc(Display *dpy) - -#define XEXT_GENERATE_CLOSE_DISPLAY(proc,extinfo) \ -int proc (Display *dpy, XExtCodes *codes) \ -{ \ - return XextRemoveDisplay (extinfo, dpy); \ -} - -#define XEXT_CLOSE_DISPLAY_PROTO(proc) \ - int proc(Display *dpy, XExtCodes *codes) - -#define XEXT_GENERATE_ERROR_STRING(proc,extname,nerr,errl) \ -char *proc (Display *dpy, int code, XExtCodes *codes, char *buf, int n) \ -{ \ - code -= codes->first_error; \ - if (code >= 0 && code < nerr) { \ - char tmp[256]; \ - sprintf (tmp, "%s.%d", extname, code); \ - XGetErrorDatabaseText (dpy, "XProtoError", tmp, errl[code], buf, n); \ - return buf; \ - } \ - return (char *)0; \ -} - -#define XEXT_ERROR_STRING_PROTO(proc) \ - char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n) -#endif diff --git a/nx-X11/lib/Imakefile b/nx-X11/lib/Imakefile index 4cf8bf08e..79b7e96c1 100644 --- a/nx-X11/lib/Imakefile +++ b/nx-X11/lib/Imakefile @@ -19,14 +19,8 @@ XKBLIBDIR = xkbfile X11LIBDIR = X11 #endif -#if BuildXextLib -XEXTLIBDIR = Xext -#endif - - LINTSUBDIRS = \ $(X11LIBDIR) \ - $(XEXTLIBDIR) \ $(XKBLIBDIR) \ $(NULL) diff --git a/nx-X11/lib/Xext/Imakefile b/nx-X11/lib/Xext/Imakefile deleted file mode 100644 index 4083ee61f..000000000 --- a/nx-X11/lib/Xext/Imakefile +++ /dev/null @@ -1,39 +0,0 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:45:50 cpqbld Exp $ -XCOMM $XFree86: xc/lib/Xext/Imakefile,v 1.12 2002/10/16 00:37:27 dawes Exp $ - - NULL = - -#define DoNormalLib NormalLibXext -#define DoSharedLib SharedLibXext -#define DoExtraLib SharedLibXext -#define DoDebugLib DebugLibXext -#define DoProfileLib ProfileLibXext -#define LibName NX_Xext -#define SoRev SOXEXTREV -#define LibHeaders NO - -#include - -#ifdef SharedXextReqs -REQUIREDLIBS = SharedXextReqs -#endif - -#if Malloc0ReturnsNull -ALLOC_DEFINES = Malloc0ReturnsNullDefines -#endif - - DEFINES = $(ALLOC_DEFINES) - INCLUDES = -I$(XLIBSRC) - SRCS = globals.c \ - extutil.c \ - $(NULL) - - OBJS = globals.o \ - extutil.o \ - $(NULL) - - LINTLIBS = $(LINTXLIB) - -#include - -DependTarget() diff --git a/nx-X11/lib/Xext/extutil.c b/nx-X11/lib/Xext/extutil.c deleted file mode 100644 index bd79dbdb2..000000000 --- a/nx-X11/lib/Xext/extutil.c +++ /dev/null @@ -1,273 +0,0 @@ -/* - * $Xorg: extutil.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ - * -Copyright 1989, 1998 The Open Group - -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. - -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 -OPEN GROUP 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 Open Group 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 Open Group. - * - * Author: Jim Fulton, MIT X Consortium - * - * - * Xlib Extension-Writing Utilities - * - * This package contains utilities for writing the client API for various - * protocol extensions. THESE INTERFACES ARE NOT PART OF THE X STANDARD AND - * ARE SUBJECT TO CHANGE! - * - * Routines include: - * - * XextCreateExtension called once per extension - * XextDestroyExtension if no longer using extension - * XextAddDisplay add another display - * XextRemoveDisplay remove a display - * XextFindDisplay is a display open - * - * In addition, the following Xlib-style interfaces are provided: - * - * XSetExtensionErrorHandler establish an extension error handler - * XMissingExtension raise an error about missing ext - */ -/* $XFree86: xc/lib/Xext/extutil.c,v 1.5 2002/10/16 00:37:27 dawes Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - - -/* - * XextCreateExtension - return an extension descriptor containing context - * information for this extension. This object is passed to all Xext - * routines. - */ -XExtensionInfo *XextCreateExtension (void) -{ - register XExtensionInfo *info = - (XExtensionInfo *) Xmalloc (sizeof (XExtensionInfo)); - - if (info) { - info->head = NULL; - info->cur = NULL; - info->ndisplays = 0; - } - return info; -} - - -/* - * XextDestroyExtension - free memory the given extension descriptor - */ -void XextDestroyExtension (XExtensionInfo *info) -{ - info->head = NULL; /* to catch refs after this */ - info->cur = NULL; - info->ndisplays = 0; - XFree ((char *) info); -} - - - -/* - * XextAddDisplay - add a display to this extension - */ -XExtDisplayInfo *XextAddDisplay ( - XExtensionInfo *extinfo, - Display *dpy, - char *ext_name, - XExtensionHooks *hooks, - int nevents, - XPointer data) -{ - XExtDisplayInfo *dpyinfo; - - dpyinfo = (XExtDisplayInfo *) Xmalloc (sizeof (XExtDisplayInfo)); - if (!dpyinfo) return NULL; - dpyinfo->display = dpy; - dpyinfo->data = data; - dpyinfo->codes = XInitExtension (dpy, ext_name); - - /* - * if the server has the extension, then we can initialize the - * appropriate function vectors - */ - if (dpyinfo->codes) { - int i, j; - - for (i = 0, j = dpyinfo->codes->first_event; i < nevents; i++, j++) { - XESetWireToEvent (dpy, j, hooks->wire_to_event); - XESetEventToWire (dpy, j, hooks->event_to_wire); - } - if (hooks->create_gc) - XESetCreateGC (dpy, dpyinfo->codes->extension, hooks->create_gc); - if (hooks->copy_gc) - XESetCopyGC (dpy, dpyinfo->codes->extension, hooks->copy_gc); - if (hooks->flush_gc) - XESetFlushGC (dpy, dpyinfo->codes->extension, hooks->flush_gc); - if (hooks->free_gc) - XESetFreeGC (dpy, dpyinfo->codes->extension, hooks->free_gc); - if (hooks->create_font) - XESetCreateFont (dpy, dpyinfo->codes->extension, hooks->create_font); - if (hooks->free_font) - XESetFreeFont (dpy, dpyinfo->codes->extension, hooks->free_font); - if (hooks->close_display) - XESetCloseDisplay (dpy, dpyinfo->codes->extension, - hooks->close_display); - if (hooks->error) - XESetError (dpy, dpyinfo->codes->extension, hooks->error); - if (hooks->error_string) - XESetErrorString (dpy, dpyinfo->codes->extension, - hooks->error_string); - } else if (hooks->close_display) { - /* The server doesn't have this extension. - * Use a private Xlib-internal extension to hang the close_display - * hook on so that the "cache" (extinfo->cur) is properly cleaned. - * (XBUG 7955) - */ - XExtCodes *codes = XAddExtension(dpy); - if (!codes) { - XFree(dpyinfo); - return NULL; - } - XESetCloseDisplay (dpy, codes->extension, hooks->close_display); - } - - /* - * now, chain it onto the list - */ - _XLockMutex(_Xglobal_lock); - dpyinfo->next = extinfo->head; - extinfo->head = dpyinfo; - extinfo->cur = dpyinfo; - extinfo->ndisplays++; - _XUnlockMutex(_Xglobal_lock); - return dpyinfo; -} - - -/* - * XextRemoveDisplay - remove the indicated display from the extension object - */ -int XextRemoveDisplay (XExtensionInfo *extinfo, Display *dpy) -{ - XExtDisplayInfo *dpyinfo, *prev; - - /* - * locate this display and its back link so that it can be removed - */ - _XLockMutex(_Xglobal_lock); - prev = NULL; - for (dpyinfo = extinfo->head; dpyinfo; dpyinfo = dpyinfo->next) { - if (dpyinfo->display == dpy) break; - prev = dpyinfo; - } - if (!dpyinfo) { - _XUnlockMutex(_Xglobal_lock); - return 0; /* hmm, actually an error */ - } - - /* - * remove the display from the list; handles going to zero - */ - if (prev) - prev->next = dpyinfo->next; - else - extinfo->head = dpyinfo->next; - - extinfo->ndisplays--; - if (dpyinfo == extinfo->cur) extinfo->cur = NULL; /* flush cache */ - _XUnlockMutex(_Xglobal_lock); - - Xfree ((char *) dpyinfo); - return 1; -} - - -/* - * XextFindDisplay - look for a display in this extension; keeps a cache - * of the most-recently used for efficiency. - */ -XExtDisplayInfo *XextFindDisplay (XExtensionInfo *extinfo, Display *dpy) -{ - register XExtDisplayInfo *dpyinfo; - - /* - * see if this was the most recently accessed display - */ - if ((dpyinfo = extinfo->cur)&& dpyinfo->display == dpy) return dpyinfo; - - - /* - * look for display in list - */ - _XLockMutex(_Xglobal_lock); - for (dpyinfo = extinfo->head; dpyinfo; dpyinfo = dpyinfo->next) { - if (dpyinfo->display == dpy) { - extinfo->cur = dpyinfo; /* cache most recently used */ - _XUnlockMutex(_Xglobal_lock); - return dpyinfo; - } - } - _XUnlockMutex(_Xglobal_lock); - - return NULL; -} - - - -static int _default_exterror (Display *dpy, char *ext_name, char *reason) -{ - fprintf (stderr, "Xlib: extension \"%s\" %s on display \"%s\".\n", - ext_name, reason, DisplayString(dpy)); - return 0; -} - - -/* - * XSetExtensionErrorHandler - sets the handler that gets called when a - * requested extension is referenced. This should eventually move into Xlib. - */ - -extern int (*_XExtensionErrorFunction)(); - -int (*XSetExtensionErrorHandler(int (*handler)(Display*, char *, char * )))() -{ - int (*oldhandler)() = _XExtensionErrorFunction; - - _XExtensionErrorFunction = (handler ? handler : - _default_exterror); - return oldhandler; -} - - -/* - * XMissingExtension - call the extension error handler - */ -int XMissingExtension (Display *dpy, _Xconst char *ext_name) -{ - int (*func)() = (_XExtensionErrorFunction ? - _XExtensionErrorFunction : _default_exterror); - - if (!ext_name) ext_name = X_EXTENSION_UNKNOWN; - return (*func) (dpy, ext_name, X_EXTENSION_MISSING); -} diff --git a/nx-X11/lib/Xext/globals.c b/nx-X11/lib/Xext/globals.c deleted file mode 100644 index 53a18690d..000000000 --- a/nx-X11/lib/Xext/globals.c +++ /dev/null @@ -1,90 +0,0 @@ -/* $Xorg: globals.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ -/* - -Copyright 1989, 1998 The Open Group - -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. - -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 OPEN GROUP 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 Open Group 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 Open Group. - -*/ -/* $XFree86: xc/lib/Xext/globals.c,v 3.4 2001/07/29 05:01:12 tsi Exp $ */ - -/* - * This file should contain only those objects which must be predefined. - */ -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include /* for definition of NULL */ - -/* - * If possible, it is useful to have the global data default to a null value. - * Some shared library implementations are *much* happier if there isn't any - * global initialized data. - */ -#ifdef NULL_NOT_ZERO /* then need to initialize */ -#define SetZero(t,var,z) t var = z -#else -#define SetZero(t,var,z) t var -#endif - -#ifdef ATTSHAREDLIB /* then need extra variables */ -/* - * If we need to define extra variables for each global - */ -#if !defined(UNIXCPP) || defined(ANSICPP) -#define ZEROINIT(t,var,val) SetZero(t,var,val); \ - SetZero (long, _libX_##var##Flag, 0); \ - SetZero (void *, _libX_##var##Ptr, NULL) -#else /* else pcc concatenation */ -#define ZEROINIT(t,var,val) SetZero(t,var,val); \ - SetZero (long, _libX_/**/var/**/Flag, 0); \ - SetZero (void *, _libX_/**/var/**/Ptr, NULL) -#endif /* concat ANSI C vs. pcc */ - -#else /* else not ATTSHAREDLIB */ -/* - * no extra crud - */ -#define ZEROINIT(t,var,val) SetZero (t, var, val) - -#endif /* ATTSHAREDLIB */ - - -/* - * Error handlers; used to be in XlibInt.c - */ -typedef int (*funcptr)(); -ZEROINIT (funcptr, _XExtensionErrorFunction, NULL); - -/* - * NOTE: any additional external definition NEED - * to be inserted BELOW this point!!! - */ - -/* - * NOTE: any additional external definition NEED - * to be inserted ABOVE this point!!! - */ - diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index d0699d857..1c582614d 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -429,7 +429,7 @@ NXAGENTNXLIBS = -L/usr/sfw/lib \ -lXcomp \ -lXcompext -lXcompshad \ -lXrender -lXfixes -lXfont -lXcomposite -lXinerama -lXdmcp \ - -lNX_X11 -lNX_Xext -Xext + -lNX_X11 -lXext #elif defined(cygwinArchitecture) NXAGENTNXLIBS = -L ../../../nxcomp \ -L../../../nx-X11/exports/lib \ @@ -437,7 +437,7 @@ NXAGENTNXLIBS = -L ../../../nxcomp \ -lXcomp \ -lXcompext -lXcompshad \ -lXrender -lXfixes -lXfont -lXcomposite -lXdmcp \ - -lNX_X11 -lNX_Xext -lXext + -lNX_X11 -lXext #else NXAGENTNXLIBS = -L ../../../nxcomp \ -L../../../nx-X11/exports/lib \ @@ -445,7 +445,7 @@ NXAGENTNXLIBS = -L ../../../nxcomp \ -lXcomp \ -lXcompext -lXcompshad \ -lXrender -lXfixes -lXfont -lXcomposite -lXinerama -lXdmcp \ - -lNX_X11 -lNX_Xext -lXext + -lNX_X11 -lXext #endif #endif @@ -478,7 +478,7 @@ nxagent_static_nolibs: nxagent else exit 0; fi $(CCLINK) -o nxagent_static_nolibs -Wl,-Bstatic $(LDOPTIONS) $(NXAGENTOBJS) \ $(NXAGENTLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER) $(LDLIBS) \ - $(LDPRELIBS) $(SYSLIBS) -Wl,-Bdynamic -lNX_Xext -lNX_X11 -lXext $(EXTRA_LOAD_FLAGS) + $(LDPRELIBS) $(SYSLIBS) -Wl,-Bdynamic -lNX_X11 -lXext $(EXTRA_LOAD_FLAGS) #endif /* NXAgentServer */ #if defined(NXWinServer) && NXWinServer diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c index 72da2df19..866ab581c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Render.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c @@ -44,7 +44,7 @@ #undef Pixmap #include "region.h" -#include "extutil.h" +#include #include "Display.h" #include "Pixmaps.h" diff --git a/nx-libs.spec b/nx-libs.spec index a29d697b2..5adb42ca2 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -154,44 +154,6 @@ stream connection. This package contains all necessary include files and libraries needed to develop applications that require these. - -%package -n libNX_Xext-devel -Group: Development/Libraries -Summary: Development files for the NX Common Extensions library -Requires: libNX_Xext6%{?_isa} = %{version}-%{release} -Requires: nx-proto-devel%{?_isa} = %{version}-%{release} - -%description -n libNX_Xext-devel -NX is a software suite which implements very efficient compression of -the X11 protocol. This increases performance when using X -applications over a network, especially a slow one. - -The NX_Xext library contains only one X11 extension: -- The MIT Shared Memory extension (MIT-SHM/Xshm) - -This package contains all necessary include files and libraries -needed to develop applications that require these. - - -%package -n libNX_Xext6 -Group: System Environment/Libraries -Summary: Common extensions to the NX protocol -Requires: %{name}%{?_isa} >= 3.5.0.29 -Obsoletes: libNX_Xext - -%description -n libNX_Xext6 -NX is a software suite which implements very efficient compression of -the X11 protocol. This increases performance when using X -applications over a network, especially a slow one. - -The NX_Xext library contains only one X11 extension: -- The MIT Shared Memory extension (MIT-SHM/Xshm) - -NX is a software suite which implements very efficient compression of -the X11 protocol. This increases performance when using X -applications over a network, especially a slow one. - - %package -n libXcomp-devel Group: Development/Libraries Summary: Development files for the NX differential compression library @@ -255,7 +217,6 @@ Group: Development/Libraries Summary: Development files for the NX session shadowing library Requires: libXcompshad3%{?_isa} = %{version}-%{release} Requires: libNX_X11-devel%{?_isa} = %{version}-%{release} -Requires: libNX_Xext-devel%{?_isa} = %{version}-%{release} Requires: nx-proto-devel%{?_isa} = %{version}-%{release} Requires: %{name}-devel%{?_isa} = %{version}-%{release} @@ -285,7 +246,6 @@ This package provides the session shadowing library. Group: Development/Libraries Summary: Include files and libraries for NX development Requires: libNX_X11-devel%{?_isa} = %{version}-%{release} -Requires: libNX_Xext-devel%{?_isa} = %{version}-%{release} Requires: nx-proto-devel%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release} @@ -428,13 +388,11 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %post -p /sbin/ldconfig %post -n libNX_X11-6 -p /sbin/ldconfig -%post -n libNX_Xext6 -p /sbin/ldconfig %post -n libXcomp3 -p /sbin/ldconfig %post -n libXcompext3 -p /sbin/ldconfig %post -n libXcompshad3 -p /sbin/ldconfig %postun -p /sbin/ldconfig %postun -n libNX_X11-6 -p /sbin/ldconfig -%postun -n libNX_Xext6 -p /sbin/ldconfig %postun -n libXcomp3 -p /sbin/ldconfig %postun -n libXcompext3 -p /sbin/ldconfig %postun -n libXcompshad3 -p /sbin/ldconfig @@ -468,18 +426,6 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %{_includedir}/nx-X11/Xutil.h %{_includedir}/nx-X11/cursorfont.h -%files -n libNX_Xext-devel -%defattr(-,root,root) -%{_libdir}/libNX_Xext.so -%dir %{_includedir}/nx-X11/extensions -%{_includedir}/nx-X11/extensions/XShm.h -%{_includedir}/nx-X11/extensions/Xext.h -%{_includedir}/nx-X11/extensions/extutil.h - -%files -n libNX_Xext6 -%defattr(-,root,root) -%{_libdir}/libNX_Xext.so.6* - %files -n libXcomp-devel %defattr(-,root,root) %_libdir/libXcomp.so @@ -572,7 +518,6 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %{_includedir}/nx-X11/extensions/render.h %{_includedir}/nx-X11/extensions/renderproto.h %{_includedir}/nx-X11/extensions/securstr.h -%{_includedir}/nx-X11/extensions/shmstr.h %{_includedir}/nx-X11/extensions/syncstr.h %{_includedir}/nx-X11/extensions/xcmiscstr.h %{_includedir}/nx-X11/extensions/xf86bigfont.h diff --git a/nxcompshad/Makefile.in b/nxcompshad/Makefile.in index 9c2b6f4fd..053b00988 100644 --- a/nxcompshad/Makefile.in +++ b/nxcompshad/Makefile.in @@ -153,7 +153,7 @@ all: depend $(LIBARCHIVE) $(LIBDLL) else -EXTRALIBS = -lNX_Xext -lXtst -lXrandr -lXdamage +EXTRALIBS = -lXext -lXtst -lXrandr -lXdamage all: depend $(LIBFULL) $(LIBLOAD) $(LIBSHARED) $(LIBARCHIVE) -- cgit v1.2.3