diff options
Diffstat (limited to 'nx-X11/lib')
42 files changed, 18 insertions, 911 deletions
diff --git a/nx-X11/lib/X11/ChWindow.c b/nx-X11/lib/X11/ChWindow.c index a403d76d8..615b6d27c 100644 --- a/nx-X11/lib/X11/ChWindow.c +++ b/nx-X11/lib/X11/ChWindow.c @@ -44,20 +44,11 @@ unsigned int width, height; req->window = w; req->mask = CWWidth | CWHeight; -#ifdef MUSTCOPY - { - unsigned long lwidth = width, lheight = height; - dpy->bufptr -= 8; - Data32 (dpy, (long *) &lwidth, 4); /* order dictated by values of */ - Data32 (dpy, (long *) &lheight, 4); /* CWWidth and CWHeight */ - } -#else { CARD32 *valuePtr = (CARD32 *) NEXTPTR(req,xConfigureWindowReq); *valuePtr++ = width; *valuePtr = height; } -#endif /* MUSTCOPY */ UnlockDisplay(dpy); SyncHandle(); return 1; diff --git a/nx-X11/lib/X11/ConfWind.c b/nx-X11/lib/X11/ConfWind.c index fddd28319..adcc7b667 100644 --- a/nx-X11/lib/X11/ConfWind.c +++ b/nx-X11/lib/X11/ConfWind.c @@ -44,18 +44,6 @@ unsigned int width, height; GetReqExtra(ConfigureWindow, 16, req); req->window = w; req->mask = CWX | CWY | CWWidth | CWHeight; -#ifdef MUSTCOPY - { - long lx = x, ly = y; - unsigned long lwidth = width, lheight = height; - - dpy->bufptr -= 16; - Data32 (dpy, (long *) &lx, 4); /* order must match values of */ - Data32 (dpy, (long *) &ly, 4); /* CWX, CWY, CWWidth, and CWHeight */ - Data32 (dpy, (long *) &lwidth, 4); - Data32 (dpy, (long *) &lheight, 4); - } -#else { register CARD32 *valuePtr = (CARD32 *) NEXTPTR(req,xConfigureWindowReq); @@ -64,7 +52,6 @@ unsigned int width, height; *valuePtr++ = width; *valuePtr = height; } -#endif /* MUSTCOPY */ UnlockDisplay(dpy); SyncHandle(); return 1; diff --git a/nx-X11/lib/X11/CrWindow.c b/nx-X11/lib/X11/CrWindow.c index 9a15f2ec1..f64ca9f64 100644 --- a/nx-X11/lib/X11/CrWindow.c +++ b/nx-X11/lib/X11/CrWindow.c @@ -56,20 +56,11 @@ Window XCreateSimpleWindow(dpy, parent, x, y, width, height, wid = req->wid = XAllocID(dpy); req->mask = CWBackPixel | CWBorderPixel; -#ifdef MUSTCOPY - { - unsigned long lbackground = background, lborder = border; - dpy->bufptr -= 8; - Data32 (dpy, (long *) &lbackground, 4); - Data32 (dpy, (long *) &lborder, 4); - } -#else { register CARD32 *valuePtr = (CARD32 *) NEXTPTR(req,xCreateWindowReq); *valuePtr++ = background; *valuePtr = border; } -#endif /* MUSTCOPY */ UnlockDisplay(dpy); SyncHandle(); diff --git a/nx-X11/lib/X11/DrArc.c b/nx-X11/lib/X11/DrArc.c index 311167647..58e55771e 100644 --- a/nx-X11/lib/X11/DrArc.c +++ b/nx-X11/lib/X11/DrArc.c @@ -48,12 +48,6 @@ XDrawArc(dpy, d, gc, x, y, width, height, angle1, angle2) { register xPolyArcReq *req; register xArc *arc; -#ifdef MUSTCOPY - xArc arcdata; - long len = SIZEOF(xArc); - - arc = &arcdata; -#endif /* MUSTCOPY */ LockDisplay(dpy); FlushGC(dpy, gc); @@ -62,9 +56,7 @@ XDrawArc(dpy, d, gc, x, y, width, height, angle1, angle2) req->drawable = d; req->gc = gc->gid; -#ifndef MUSTCOPY arc = (xArc *) NEXTPTR(req,xPolyArcReq); -#endif /* MUSTCOPY */ arc->x = x; arc->y = y; @@ -73,11 +65,6 @@ XDrawArc(dpy, d, gc, x, y, width, height, angle1, angle2) arc->angle1 = angle1; arc->angle2 = angle2; -#ifdef MUSTCOPY - dpy->bufptr -= SIZEOF(xArc); - Data (dpy, (char *) arc, len); -#endif /* MUSTCOPY */ - UnlockDisplay(dpy); SyncHandle(); return 1; diff --git a/nx-X11/lib/X11/DrLine.c b/nx-X11/lib/X11/DrLine.c index 59095069b..4a7c620b5 100644 --- a/nx-X11/lib/X11/DrLine.c +++ b/nx-X11/lib/X11/DrLine.c @@ -44,12 +44,6 @@ XDrawLine (dpy, d, gc, x1, y1, x2, y2) int x1, y1, x2, y2; { register xSegment *segment; -#ifdef MUSTCOPY - xSegment segmentdata; - long len = SIZEOF(xSegment); - - segment = &segmentdata; -#endif /* not MUSTCOPY */ LockDisplay(dpy); FlushGC(dpy, gc); @@ -66,21 +60,15 @@ XDrawLine (dpy, d, gc, x1, y1, x2, y2) && (((char *)dpy->bufptr - (char *)req) < (gc->values.line_width ? wsize : zsize)) ) { req->length += SIZEOF(xSegment) >> 2; -#ifndef MUSTCOPY segment = (xSegment *) dpy->bufptr; dpy->bufptr += SIZEOF(xSegment); -#endif /* not MUSTCOPY */ } else { GetReqExtra (PolySegment, SIZEOF(xSegment), req); req->drawable = d; req->gc = gc->gid; -#ifdef MUSTCOPY - dpy->bufptr -= SIZEOF(xSegment); -#else segment = (xSegment *) NEXTPTR(req,xPolySegmentReq); -#endif /* MUSTCOPY */ } segment->x1 = x1; @@ -88,10 +76,6 @@ XDrawLine (dpy, d, gc, x1, y1, x2, y2) segment->x2 = x2; segment->y2 = y2; -#ifdef MUSTCOPY - Data (dpy, (char *) &segmentdata, len); -#endif /* MUSTCOPY */ - UnlockDisplay(dpy); SyncHandle(); } diff --git a/nx-X11/lib/X11/DrPoint.c b/nx-X11/lib/X11/DrPoint.c index 3cd6b7f57..26d17ef88 100644 --- a/nx-X11/lib/X11/DrPoint.c +++ b/nx-X11/lib/X11/DrPoint.c @@ -43,12 +43,6 @@ XDrawPoint(dpy, d, gc, x, y) int x, y; /* INT16 */ { xPoint *point; -#ifdef MUSTCOPY - xPoint pointdata; - long len = SIZEOF(xPoint); - - point = &pointdata; -#endif /* MUSTCOPY */ LockDisplay(dpy); FlushGC(dpy, gc); @@ -66,10 +60,8 @@ XDrawPoint(dpy, d, gc, x, y) && ((dpy->bufptr + SIZEOF(xPoint)) <= dpy->bufmax) && (((char *)dpy->bufptr - (char *)req) < size) ) { req->length += SIZEOF(xPoint) >> 2; -#ifndef MUSTCOPY point = (xPoint *) dpy->bufptr; dpy->bufptr += SIZEOF(xPoint); -#endif /* not MUSTCOPY */ } else { @@ -77,19 +69,12 @@ XDrawPoint(dpy, d, gc, x, y) req->drawable = d; req->gc = gc->gid; req->coordMode = CoordModeOrigin; -#ifdef MUSTCOPY - dpy->bufptr -= SIZEOF(xPoint); -#else point = (xPoint *) NEXTPTR(req,xPolyPointReq); -#endif /* MUSTCOPY */ } point->x = x; point->y = y; -#ifdef MUSTCOPY - Data (dpy, (char *) point, len); -#endif /* MUSTCOPY */ } UnlockDisplay(dpy); SyncHandle(); diff --git a/nx-X11/lib/X11/DrRect.c b/nx-X11/lib/X11/DrRect.c index 984e291c6..affbc982d 100644 --- a/nx-X11/lib/X11/DrRect.c +++ b/nx-X11/lib/X11/DrRect.c @@ -45,12 +45,6 @@ XDrawRectangle(dpy, d, gc, x, y, width, height) unsigned int width, height; /* CARD16 */ { xRectangle *rect; -#ifdef MUSTCOPY - xRectangle rectdata; - long len = SIZEOF(xRectangle); - - rect = &rectdata; -#endif /* MUSTCOPY */ LockDisplay(dpy); FlushGC(dpy, gc); @@ -67,21 +61,15 @@ XDrawRectangle(dpy, d, gc, x, y, width, height) && (((char *)dpy->bufptr - (char *)req) < (gc->values.line_width ? wsize : zsize)) ) { req->length += SIZEOF(xRectangle) >> 2; -#ifndef MUSTCOPY rect = (xRectangle *) dpy->bufptr; dpy->bufptr += SIZEOF(xRectangle); -#endif /* not MUSTCOPY */ } else { GetReqExtra(PolyRectangle, SIZEOF(xRectangle), req); req->drawable = d; req->gc = gc->gid; -#ifdef MUSTCOPY - dpy->bufptr -= SIZEOF(xRectangle); -#else rect = (xRectangle *) NEXTPTR(req,xPolyRectangleReq); -#endif /* MUSTCOPY */ } rect->x = x; @@ -89,10 +77,6 @@ XDrawRectangle(dpy, d, gc, x, y, width, height) rect->width = width; rect->height = height; -#ifdef MUSTCOPY - Data (dpy, (char *) rect, len); /* subtracted bufptr up above */ -#endif /* MUSTCOPY */ - } UnlockDisplay(dpy); SyncHandle(); diff --git a/nx-X11/lib/X11/FillArc.c b/nx-X11/lib/X11/FillArc.c index 2aa88d8fd..12d17dba1 100644 --- a/nx-X11/lib/X11/FillArc.c +++ b/nx-X11/lib/X11/FillArc.c @@ -45,12 +45,6 @@ XFillArc(dpy, d, gc, x, y, width, height, angle1, angle2) int angle1, angle2; /* INT16 */ { xArc *arc; -#ifdef MUSTCOPY - xArc arcdata; - long len = SIZEOF(xArc); - - arc = &arcdata; -#endif /* MUSTCOPY */ LockDisplay(dpy); FlushGC(dpy, gc); @@ -66,10 +60,8 @@ XFillArc(dpy, d, gc, x, y, width, height, angle1, angle2) && ((dpy->bufptr + SIZEOF(xArc)) <= dpy->bufmax) && (((char *)dpy->bufptr - (char *)req) < size) ) { req->length += SIZEOF(xArc) >> 2; -#ifndef MUSTCOPY arc = (xArc *) dpy->bufptr; dpy->bufptr += SIZEOF(xArc); -#endif /* not MUSTCOPY */ } else { @@ -77,11 +69,7 @@ XFillArc(dpy, d, gc, x, y, width, height, angle1, angle2) req->drawable = d; req->gc = gc->gid; -#ifdef MUSTCOPY - dpy->bufptr -= SIZEOF(xArc); -#else arc = (xArc *) NEXTPTR(req,xPolyFillArcReq); -#endif /* MUSTCOPY */ } arc->x = x; arc->y = y; @@ -90,10 +78,6 @@ XFillArc(dpy, d, gc, x, y, width, height, angle1, angle2) arc->angle1 = angle1; arc->angle2 = angle2; -#ifdef MUSTCOPY - Data (dpy, (char *) arc, len); -#endif /* MUSTCOPY */ - } UnlockDisplay(dpy); SyncHandle(); diff --git a/nx-X11/lib/X11/FillRct.c b/nx-X11/lib/X11/FillRct.c index d4a362af7..e1b7ad091 100644 --- a/nx-X11/lib/X11/FillRct.c +++ b/nx-X11/lib/X11/FillRct.c @@ -44,12 +44,6 @@ XFillRectangle(dpy, d, gc, x, y, width, height) unsigned int width, height; /* CARD16 */ { xRectangle *rect; -#ifdef MUSTCOPY - xRectangle rectdata; - long len = SIZEOF(xRectangle); - - rect = &rectdata; -#endif /* MUSTCOPY */ LockDisplay(dpy); FlushGC(dpy, gc); @@ -66,30 +60,21 @@ XFillRectangle(dpy, d, gc, x, y, width, height) && ((dpy->bufptr + SIZEOF(xRectangle)) <= dpy->bufmax) && (((char *)dpy->bufptr - (char *)req) < size) ) { req->length += SIZEOF(xRectangle) >> 2; -#ifndef MUSTCOPY rect = (xRectangle *) dpy->bufptr; dpy->bufptr += SIZEOF(xRectangle); -#endif /* not MUSTCOPY */ } else { GetReqExtra(PolyFillRectangle, SIZEOF(xRectangle), req); req->drawable = d; req->gc = gc->gid; -#ifdef MUSTCOPY - dpy->bufptr -= SIZEOF(xRectangle); -#else rect = (xRectangle *) NEXTPTR(req,xPolyFillRectangleReq); -#endif /* MUSTCOPY */ } rect->x = x; rect->y = y; rect->width = width; rect->height = height; -#ifdef MUSTCOPY - Data (dpy, (char *) rect, len); -#endif /* MUSTCOPY */ } UnlockDisplay(dpy); SyncHandle(); diff --git a/nx-X11/lib/X11/Font.c b/nx-X11/lib/X11/Font.c index c37617cf9..92a6a8f4a 100644 --- a/nx-X11/lib/X11/Font.c +++ b/nx-X11/lib/X11/Font.c @@ -35,7 +35,7 @@ authorization from the X Consortium and the XFree86 Project. #endif #include "Xlibint.h" -#if defined(XF86BIGFONT) && !defined(MUSTCOPY) +#if defined(XF86BIGFONT) #define USE_XF86BIGFONT #endif #ifdef USE_XF86BIGFONT @@ -231,31 +231,9 @@ _XQueryFont (dpy, fid, seq) fs->ascent = cvtINT16toInt (reply.fontAscent); fs->descent = cvtINT16toInt (reply.fontDescent); -#ifdef MUSTCOPY - { - xCharInfo *xcip; - - xcip = (xCharInfo *) &reply.minBounds; - fs->min_bounds.lbearing = cvtINT16toShort(xcip->leftSideBearing); - fs->min_bounds.rbearing = cvtINT16toShort(xcip->rightSideBearing); - fs->min_bounds.width = cvtINT16toShort(xcip->characterWidth); - fs->min_bounds.ascent = cvtINT16toShort(xcip->ascent); - fs->min_bounds.descent = cvtINT16toShort(xcip->descent); - fs->min_bounds.attributes = xcip->attributes; - - xcip = (xCharInfo *) &reply.maxBounds; - fs->max_bounds.lbearing = cvtINT16toShort(xcip->leftSideBearing); - fs->max_bounds.rbearing = cvtINT16toShort(xcip->rightSideBearing); - fs->max_bounds.width = cvtINT16toShort(xcip->characterWidth); - fs->max_bounds.ascent = cvtINT16toShort(xcip->ascent); - fs->max_bounds.descent = cvtINT16toShort(xcip->descent); - fs->max_bounds.attributes = xcip->attributes; - } -#else /* XXX the next two statements won't work if short isn't 16 bits */ fs->min_bounds = * (XCharStruct *) &reply.minBounds; fs->max_bounds = * (XCharStruct *) &reply.maxBounds; -#endif /* MUSTCOPY */ fs->n_properties = reply.nFontProps; /* @@ -279,7 +257,6 @@ _XQueryFont (dpy, fid, seq) * If no characters in font, then it is a bad font, but * shouldn't try to read nothing. */ - /* have to unpack charinfos on some machines (CRAY) */ fs->per_char = NULL; if (reply.nCharInfos > 0){ nbytes = reply.nCharInfos * sizeof(XCharStruct); @@ -290,28 +267,8 @@ _XQueryFont (dpy, fid, seq) (reply.nCharInfos * SIZEOF(xCharInfo))); return (XFontStruct *)NULL; } - -#ifdef MUSTCOPY - { - register XCharStruct *cs = fs->per_char; - register int i; - - for (i = 0; i < reply.nCharInfos; i++, cs++) { - xCharInfo xcip; - - _XRead(dpy, (char *)&xcip, SIZEOF(xCharInfo)); - cs->lbearing = cvtINT16toShort(xcip.leftSideBearing); - cs->rbearing = cvtINT16toShort(xcip.rightSideBearing); - cs->width = cvtINT16toShort(xcip.characterWidth); - cs->ascent = cvtINT16toShort(xcip.ascent); - cs->descent = cvtINT16toShort(xcip.descent); - cs->attributes = xcip.attributes; - } - } -#else nbytes = reply.nCharInfos * SIZEOF(xCharInfo); _XRead16 (dpy, (char *)fs->per_char, nbytes); -#endif } /* call out to any extensions interested */ diff --git a/nx-X11/lib/X11/FontInfo.c b/nx-X11/lib/X11/FontInfo.c index f92375853..bc096fef7 100644 --- a/nx-X11/lib/X11/FontInfo.c +++ b/nx-X11/lib/X11/FontInfo.c @@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group. #endif #include "Xlibint.h" -#if defined(XF86BIGFONT) && !defined(MUSTCOPY) +#if defined(XF86BIGFONT) #define USE_XF86BIGFONT #endif #ifdef USE_XF86BIGFONT @@ -135,31 +135,9 @@ XFontStruct **info) /* RETURN */ fs->ascent = cvtINT16toInt (reply.fontAscent); fs->descent = cvtINT16toInt (reply.fontDescent); -#ifdef MUSTCOPY - { - xCharInfo *xcip; - - xcip = (xCharInfo *) &reply.minBounds; - fs->min_bounds.lbearing = xcip->leftSideBearing; - fs->min_bounds.rbearing = xcip->rightSideBearing; - fs->min_bounds.width = xcip->characterWidth; - fs->min_bounds.ascent = xcip->ascent; - fs->min_bounds.descent = xcip->descent; - fs->min_bounds.attributes = xcip->attributes; - - xcip = (xCharInfo *) &reply.maxBounds; - fs->max_bounds.lbearing = xcip->leftSideBearing; - fs->max_bounds.rbearing = xcip->rightSideBearing; - fs->max_bounds.width = xcip->characterWidth; - fs->max_bounds.ascent = xcip->ascent; - fs->max_bounds.descent = xcip->descent; - fs->max_bounds.attributes = xcip->attributes; - } -#else /* XXX the next two statements won't work if short isn't 16 bits */ fs->min_bounds = * (XCharStruct *) &reply.minBounds; fs->max_bounds = * (XCharStruct *) &reply.maxBounds; -#endif /* MUSTCOPY */ fs->n_properties = reply.nFontProps; if (fs->n_properties > 0) { diff --git a/nx-X11/lib/X11/ImUtil.c b/nx-X11/lib/X11/ImUtil.c index 9e667bb9c..85f4183f4 100644 --- a/nx-X11/lib/X11/ImUtil.c +++ b/nx-X11/lib/X11/ImUtil.c @@ -533,9 +533,7 @@ static unsigned long _XGetPixel (ximage, x, y) return (pixel & low_bits_table[ximage->depth]); } -#ifndef WORD64 static CARD32 const byteorderpixel = MSBFirst << 24; -#endif static unsigned long _XGetPixel32 (ximage, x, y) register XImage *ximage; @@ -548,11 +546,9 @@ static unsigned long _XGetPixel32 (ximage, x, y) if ((ximage->format == ZPixmap) && (ximage->bits_per_pixel == 32)) { addr = &((unsigned char *)ximage->data) [y * ximage->bytes_per_line + (x << 2)]; -#ifndef WORD64 if (*((const char *)&byteorderpixel) == ximage->byte_order) pixel = *((CARD32 *)addr); else -#endif if (ximage->byte_order == MSBFirst) pixel = ((unsigned long)addr[0] << 24 | (unsigned long)addr[1] << 16 | @@ -739,11 +735,9 @@ static int _XPutPixel32 (ximage, x, y, pixel) if ((ximage->format == ZPixmap) && (ximage->bits_per_pixel == 32)) { addr = &((unsigned char *)ximage->data) [y * ximage->bytes_per_line + (x << 2)]; -#ifndef WORD64 if (*((const char *)&byteorderpixel) == ximage->byte_order) *((CARD32 *)addr) = pixel; else -#endif if (ximage->byte_order == MSBFirst) { addr[0] = pixel >> 24; addr[1] = pixel >> 16; @@ -1002,7 +996,6 @@ _XAddPixel (ximage, value) x = ximage->bytes_per_line * ximage->height; while (--x >= 0) *dp++ += value; -#ifndef WORD64 } else if ((ximage->format == ZPixmap) && (ximage->bits_per_pixel == 16) && (*((const char *)&byteorderpixel) == ximage->byte_order)) { @@ -1017,7 +1010,6 @@ _XAddPixel (ximage, value) x = (ximage->bytes_per_line >> 2) * ximage->height; while (--x >= 0) *dp++ += value; -#endif } else { for (y = ximage->height; --y >= 0; ) { for (x = ximage->width; --x >= 0; ) { diff --git a/nx-X11/lib/X11/LiHosts.c b/nx-X11/lib/X11/LiHosts.c index 01cfadb13..bd0864448 100644 --- a/nx-X11/lib/X11/LiHosts.c +++ b/nx-X11/lib/X11/LiHosts.c @@ -95,15 +95,8 @@ XHostAddress *XListHosts ( _XRead (dpy, (char *) buf, nbytes); for (i = 0; i < reply.nHosts; i++) { -#ifdef WORD64 - xHostEntry xhe; - memcpy((char *)&xhe, bp, SIZEOF(xHostEntry)); - op->family = xhe.family; - op->length = xhe.length; -#else op->family = ((xHostEntry *) bp)->family; op->length =((xHostEntry *) bp)->length; -#endif if (op->family == FamilyServerInterpreted) { char *tp = (char *) (bp + SIZEOF(xHostEntry)); char *vp = memchr(tp, 0, op->length); diff --git a/nx-X11/lib/X11/Macros.c b/nx-X11/lib/X11/Macros.c index 34d11feaf..ebb513226 100644 --- a/nx-X11/lib/X11/Macros.c +++ b/nx-X11/lib/X11/Macros.c @@ -126,12 +126,7 @@ int XImageByteOrder(dpy) Display *dpy; { return (ImageByteOrder(dpy)); } unsigned long XNextRequest(dpy) Display *dpy; { -#ifdef WORD64 - WORD64ALIGN - return dpy->request + 1; -#else return (NextRequest(dpy)); -#endif } unsigned long XLastKnownRequestProcessed(dpy) diff --git a/nx-X11/lib/X11/MoveWin.c b/nx-X11/lib/X11/MoveWin.c index d3c4f8821..44097fea5 100644 --- a/nx-X11/lib/X11/MoveWin.c +++ b/nx-X11/lib/X11/MoveWin.c @@ -45,20 +45,11 @@ XMoveWindow (dpy, w, x, y) req->window = w; req->mask = CWX | CWY; -#ifdef MUSTCOPY - { - long lx = (long) x, ly = (long) y; - dpy->bufptr -= 8; - Data32 (dpy, (long *) &lx, 4); /* order dictated by CWX and CWY */ - Data32 (dpy, (long *) &ly, 4); - } -#else { CARD32 *valuePtr = (CARD32 *) NEXTPTR(req,xConfigureWindowReq); *valuePtr++ = x; *valuePtr = y; } -#endif /* MUSTCOPY */ UnlockDisplay(dpy); SyncHandle(); return 1; diff --git a/nx-X11/lib/X11/PolyTxt16.c b/nx-X11/lib/X11/PolyTxt16.c index ddaa62d08..ded535dc3 100644 --- a/nx-X11/lib/X11/PolyTxt16.c +++ b/nx-X11/lib/X11/PolyTxt16.c @@ -169,18 +169,7 @@ XDrawText16(dpy, d, gc, x, y, items, nitems) } elt->len = 254; -#if defined(MUSTCOPY) || defined(MUSTCOPY2B) - { - register int i; - register unsigned char *cp; - for (i = 0, cp = ((unsigned char *)elt) + 2; i < 254; i++) { - *cp++ = CharacterOffset[i].byte1; - *cp++ = CharacterOffset[i].byte2; - } - } -#else memcpy ((char *) (elt + 1), (char *)CharacterOffset, 254 * 2); -#endif PartialNChars = PartialNChars - 254; CharacterOffset += 254; @@ -214,21 +203,8 @@ XDrawText16(dpy, d, gc, x, y, items, nitems) } elt->len = PartialNChars; -#if defined(MUSTCOPY) || defined(MUSTCOPY2B) - { - register int i; - register unsigned char *cp; - for (i = 0, cp = ((unsigned char *)elt) + 2; i < PartialNChars; - i++) { - *cp++ = CharacterOffset[i].byte1; - *cp++ = CharacterOffset[i].byte2; - } - } -#else memcpy ((char *) (elt + 1), (char *)CharacterOffset, - PartialNChars * -2); -#endif + PartialNChars * 2); } } item++; diff --git a/nx-X11/lib/X11/Quarks.c b/nx-X11/lib/X11/Quarks.c index a5ffa8ac1..d47bce314 100644 --- a/nx-X11/lib/X11/Quarks.c +++ b/nx-X11/lib/X11/Quarks.c @@ -133,10 +133,8 @@ static char *permalloc(unsigned int length) return(ret); } -#ifndef WORD64 typedef struct {char a; double b;} TestType1; typedef struct {char a; unsigned long b;} TestType2; -#endif #ifdef XTHREADS static char *_Xpermalloc(unsigned int length); @@ -159,7 +157,6 @@ char *Xpermalloc(unsigned int length) int i; if (neverFreeTableSize && length < NEVERFREETABLESIZE) { -#ifndef WORD64 if ((sizeof(TestType1) != (sizeof(TestType2) - sizeof(unsigned long) + sizeof(double))) && !(length & (DALIGN-1)) && @@ -167,7 +164,6 @@ char *Xpermalloc(unsigned int length) neverFreeTableSize -= DALIGN - i; neverFreeTable += DALIGN - i; } else -#endif if ((i = (NEVERFREETABLESIZE - neverFreeTableSize) & (WALIGN-1))) { neverFreeTableSize -= WALIGN - i; neverFreeTable += WALIGN - i; diff --git a/nx-X11/lib/X11/RestackWs.c b/nx-X11/lib/X11/RestackWs.c index 1887e7c73..ab5386251 100644 --- a/nx-X11/lib/X11/RestackWs.c +++ b/nx-X11/lib/X11/RestackWs.c @@ -38,9 +38,6 @@ XRestackWindows (dpy, windows, n) int n; { int i = 0; -#ifdef MUSTCOPY - unsigned long val = Below; /* needed for macro below */ -#endif LockDisplay(dpy); while (windows++, ++i < n) { @@ -49,19 +46,13 @@ XRestackWindows (dpy, windows, n) GetReqExtra (ConfigureWindow, 8, req); req->window = *windows; req->mask = CWSibling | CWStackMode; -#ifdef MUSTCOPY - dpy->bufptr -= 8; - Data32 (dpy, (long *)(windows-1), 4); - Data32 (dpy, (long *)&val, 4); -#else { register CARD32 *values = (CARD32 *) NEXTPTR(req,xConfigureWindowReq); *values++ = *(windows-1); *values = Below; } -#endif /* MUSTCOPY */ - } + } UnlockDisplay(dpy); SyncHandle(); return 1; diff --git a/nx-X11/lib/X11/SendEvent.c b/nx-X11/lib/X11/SendEvent.c index 06e23a5c9..a1b8d6620 100644 --- a/nx-X11/lib/X11/SendEvent.c +++ b/nx-X11/lib/X11/SendEvent.c @@ -65,12 +65,7 @@ XSendEvent(dpy, w, propagate, event_mask, event) req->destination = w; req->propagate = propagate; req->eventMask = event_mask; -#ifdef WORD64 - /* avoid quad-alignment problems */ - memcpy ((char *) req->eventdata, (char *) &ev, SIZEOF(xEvent)); -#else req->event = ev; -#endif /* WORD64 */ } UnlockDisplay(dpy); diff --git a/nx-X11/lib/X11/StColor.c b/nx-X11/lib/X11/StColor.c index b2b197a99..b6784b5e2 100644 --- a/nx-X11/lib/X11/StColor.c +++ b/nx-X11/lib/X11/StColor.c @@ -39,21 +39,13 @@ XColor *def; { xColorItem *citem; register xStoreColorsReq *req; -#ifdef MUSTCOPY - xColorItem citemdata; - long len = SIZEOF(xColorItem); - - citem = &citemdata; -#endif /* MUSTCOPY */ LockDisplay(dpy); GetReqExtra(StoreColors, SIZEOF(xColorItem), req); /* assume size is 4*n */ req->cmap = cmap; -#ifndef MUSTCOPY citem = (xColorItem *) NEXTPTR(req,xStoreColorsReq); -#endif /* not MUSTCOPY */ citem->pixel = def->pixel; citem->red = def->red; @@ -61,11 +53,6 @@ XColor *def; citem->blue = def->blue; citem->flags = def->flags; /* do_red, do_green, do_blue */ -#ifdef MUSTCOPY - dpy->bufptr -= SIZEOF(xColorItem); /* adjust for GetReqExtra */ - Data (dpy, (char *) citem, len); -#endif /* MUSTCOPY */ - UnlockDisplay(dpy); SyncHandle(); return 1; diff --git a/nx-X11/lib/X11/Text16.c b/nx-X11/lib/X11/Text16.c index 96d5911d6..dbf876326 100644 --- a/nx-X11/lib/X11/Text16.c +++ b/nx-X11/lib/X11/Text16.c @@ -84,18 +84,7 @@ XDrawString16( BufAlloc (xTextElt *, elt, nbytes); elt->delta = 0; elt->len = 254; -#if defined(MUSTCOPY) || defined(MUSTCOPY2B) - { - register int i; - register unsigned char *cp; - for (i = 0, cp = ((unsigned char *)elt) + 2; i < 254; i++) { - *cp++ = CharacterOffset[i].byte1; - *cp++ = CharacterOffset[i].byte2; - } - } -#else memcpy (((char *) elt) + 2, (char *)CharacterOffset, 254 * 2); -#endif PartialNChars = PartialNChars - 254; CharacterOffset += 254; } @@ -106,19 +95,7 @@ XDrawString16( BufAlloc (xTextElt *, elt, nbytes); elt->delta = 0; elt->len = PartialNChars; -#if defined(MUSTCOPY) || defined(MUSTCOPY2B) - { - register int i; - register unsigned char *cp; - for (i = 0, cp = ((unsigned char *)elt) + 2; i < PartialNChars; - i++) { - *cp++ = CharacterOffset[i].byte1; - *cp++ = CharacterOffset[i].byte2; - } - } -#else memcpy(((char *)elt) + 2, (char *)CharacterOffset, PartialNChars * 2); -#endif } } diff --git a/nx-X11/lib/X11/XKBNames.c b/nx-X11/lib/X11/XKBNames.c index a8eeb2adf..8483187c3 100644 --- a/nx-X11/lib/X11/XKBNames.c +++ b/nx-X11/lib/X11/XKBNames.c @@ -498,38 +498,10 @@ XkbSetNames( Display * dpy, if (which&XkbGroupNamesMask) _XkbCopyAtoms(dpy,names->groups,groups,XkbNumKbdGroups); if (which&XkbKeyNamesMask) { -#ifdef WORD64 - char *tmp; - register int i; - BufAlloc(char *,tmp,nKeys*XkbKeyNameLength); - for (i=0;i<nKeys;i++,tmp+= XkbKeyNameLength) { - tmp[0]= names->keys[firstKey+i].name[0]; - tmp[1]= names->keys[firstKey+i].name[1]; - tmp[2]= names->keys[firstKey+i].name[2]; - tmp[3]= names->keys[firstKey+i].name[3]; - } -#else Data(dpy,(char *)&names->keys[firstKey],nKeys*XkbKeyNameLength); -#endif } if (which&XkbKeyAliasesMask) { -#ifdef WORD64 - char *tmp; - register int i; - BufAlloc(char *,tmp,nKA*XkbKeyNameLength*2); - for (i=0;i<nKeys;i++,tmp+= 2*XkbKeyNameLength) { - tmp[0]= names->key_aliases[i].real[0]; - tmp[1]= names->key_aliases[i].real[1]; - tmp[2]= names->key_aliases[i].real[2]; - tmp[3]= names->key_aliases[i].real[3]; - tmp[4]= names->key_aliases[i].alias[0]; - tmp[5]= names->key_aliases[i].alias[1]; - tmp[6]= names->key_aliases[i].alias[2]; - tmp[7]= names->key_aliases[i].alias[3]; - } -#else Data(dpy,(char *)names->key_aliases,nKA*XkbKeyNameLength*2); -#endif } if (which&XkbRGNamesMask) { Data32(dpy,(long *)names->radio_groups,nRG*4); @@ -754,38 +726,10 @@ XkbChangeNames(Display *dpy,XkbDescPtr xkb,XkbNameChangesPtr changes) if (which&XkbGroupNamesMask) _XkbCopyAtoms(dpy,names->groups,groups,XkbNumKbdGroups); if (which&XkbKeyNamesMask) { -#ifdef WORD64 - char *tmp; - register int i; - BufAlloc(char *,tmp,nKeys*4); - for (i=0;i<nKeys;i++,tmp+= 4) { - tmp[0]= names->keys[firstKey+i].name[0]; - tmp[1]= names->keys[firstKey+i].name[1]; - tmp[2]= names->keys[firstKey+i].name[2]; - tmp[3]= names->keys[firstKey+i].name[3]; - } -#else Data(dpy,(char *)&names->keys[firstKey],nKeys*XkbKeyNameLength); -#endif } if (which&XkbKeyAliasesMask) { -#ifdef WORD64 - char *tmp; - register int i; - BufAlloc(char *,tmp,nKA*XkbKeyNameLength*2); - for (i=0;i<nKeys;i++,tmp+= 2*XkbKeyNameLength) { - tmp[0]= names->key_aliases[i].real[0]; - tmp[1]= names->key_aliases[i].real[1]; - tmp[2]= names->key_aliases[i].real[2]; - tmp[3]= names->key_aliases[i].real[3]; - tmp[4]= names->key_aliases[i].alias[0]; - tmp[5]= names->key_aliases[i].alias[1]; - tmp[6]= names->key_aliases[i].alias[2]; - tmp[7]= names->key_aliases[i].alias[3]; - } -#else Data(dpy,(char *)names->key_aliases,nKA*XkbKeyNameLength*2); -#endif } if (which&XkbRGNamesMask) { Data32(dpy,(long *)names->radio_groups,nRG*4); diff --git a/nx-X11/lib/X11/XKBRdBuf.c b/nx-X11/lib/X11/XKBRdBuf.c index a68a80a33..d0b7045d6 100644 --- a/nx-X11/lib/X11/XKBRdBuf.c +++ b/nx-X11/lib/X11/XKBRdBuf.c @@ -121,29 +121,8 @@ _XkbReadCopyData32(int *wire,long *to,int num_words) return 1; } #endif -#ifdef WORD64 -int -_XkbReadCopyData32(int *from,long *lp,int num_words) -{ -long *lpack; -long mask32 = 0x00000000ffffffff; -long maskw, i, bits; - - lpack = (long *)from; - bits = 32; - - for (i=0;i<num_words;i++) { - maskw = mask32 << bits; - *lp++ = (*lpack & maskw) >> bits; - bits = bits ^ 32; - if (bits) - lpack++; - } - return 1; -} -#endif -#if defined(LONG64) || defined(WORD64) +#if defined(LONG64) int _XkbReadBufferCopy32(XkbReadBufferPtr from,long *to,int num_words) { @@ -167,10 +146,6 @@ _XkbWriteCopyData32 (register unsigned long *from,CARD32 *to,int len) } #endif /* LONG64 */ -#ifdef WORD64 -_XkbWriteCopyData32 Not Implemented Yet for sizeof(int)==8 -#endif - char * _XkbPeekAtReadBuffer(XkbReadBufferPtr from,int size) { diff --git a/nx-X11/lib/X11/XKBlibint.h b/nx-X11/lib/X11/XKBlibint.h index a154d1bce..0244e2ef3 100644 --- a/nx-X11/lib/X11/XKBlibint.h +++ b/nx-X11/lib/X11/XKBlibint.h @@ -215,7 +215,7 @@ extern int _XkbCopyFromReadBuffer( ); -#if defined(WORD64) || defined(LONG64) +#if defined(LONG64) extern int _XkbReadCopyData32( int * /* from */, long * /* to */, diff --git a/nx-X11/lib/X11/Xlib.h b/nx-X11/lib/X11/Xlib.h index e21d9ffac..8ce7fb577 100644 --- a/nx-X11/lib/X11/Xlib.h +++ b/nx-X11/lib/X11/Xlib.h @@ -144,11 +144,7 @@ typedef char *XPointer; #define BitmapBitOrder(dpy) (((_XPrivDisplay)dpy)->bitmap_bit_order) #define BitmapPad(dpy) (((_XPrivDisplay)dpy)->bitmap_pad) #define ImageByteOrder(dpy) (((_XPrivDisplay)dpy)->byte_order) -#ifdef CRAY /* unable to get WORD64 without pulling in other symbols */ -#define NextRequest(dpy) XNextRequest(dpy) -#else #define NextRequest(dpy) (((_XPrivDisplay)dpy)->request + 1) -#endif #define LastKnownRequestProcessed(dpy) (((_XPrivDisplay)dpy)->last_request_read) /* macros for screen oriented applications (toolkit) */ diff --git a/nx-X11/lib/X11/XlibAsync.c b/nx-X11/lib/X11/XlibAsync.c index 70bd82bad..81403ebc9 100644 --- a/nx-X11/lib/X11/XlibAsync.c +++ b/nx-X11/lib/X11/XlibAsync.c @@ -119,11 +119,6 @@ _XGetAsyncReply(dpy, replbuf, rep, buf, len, extra, discard) _XRead(dpy, replbuf + len, size - len); buf = replbuf; len = size; -#ifdef MUSTCOPY - } else { - memcpy(replbuf, buf, size); - buf = replbuf; -#endif } if (discard && rep->generic.length > extra && diff --git a/nx-X11/lib/X11/XlibInt.c b/nx-X11/lib/X11/XlibInt.c index 47e2ea139..0514470dd 100644 --- a/nx-X11/lib/X11/XlibInt.c +++ b/nx-X11/lib/X11/XlibInt.c @@ -202,20 +202,6 @@ extern int _X11TransSocketCongestionChange(XtransConnInfo, int *); #define MAX_PATH _POSIX_PATH_MAX #endif -#ifdef MUSTCOPY - -#define STARTITERATE(tpvar,type,start,endcond) \ - { register char *cpvar; \ - for (cpvar = (char *) (start); endcond; ) { \ - type dummy; memcpy ((char *) &dummy, cpvar, SIZEOF(type)); \ - tpvar = &dummy; -#define ITERPTR(tpvar) cpvar -#define RESETITERPTR(tpvar,type,start) cpvar = start -#define INCITERPTR(tpvar,type) cpvar += SIZEOF(type) -#define ENDITERATE }} - -#else - #define STARTITERATE(tpvar,type,start,endcond) \ for (tpvar = (type *) (start); endcond; ) #define ITERPTR(tpvar) (char *)tpvar @@ -223,8 +209,6 @@ extern int _X11TransSocketCongestionChange(XtransConnInfo, int *); #define INCITERPTR(tpvar,type) tpvar++ #define ENDITERATE -#endif /* MUSTCOPY */ - typedef union { xReply rep; char buf[BUFSIZE]; @@ -1611,125 +1595,6 @@ void _XRead32( } #endif /* LONG64 */ -#ifdef WORD64 - -/* - * XXX This is a *really* stupid way of doing this.... - * PACKBUFFERSIZE must be a multiple of 4. - */ - -#define PACKBUFFERSIZE 4096 - - -/* - * _XRead32 - Read bytes from the socket unpacking each 32 bits - * into a long (64 bits on a CRAY computer). - * - */ -static void _doXRead32( - register Display *dpy, - register long *data - register long size, - register char *packbuffer) -{ - long *lpack,*lp; - long mask32 = 0x00000000ffffffff; - long maskw, nwords, i, bits; - - _XReadPad (dpy, packbuffer, size); - - lp = data; - lpack = (long *) packbuffer; - nwords = size >> 2; - bits = 32; - - for(i=0;i<nwords;i++){ - maskw = mask32 << bits; - *lp++ = ( *lpack & maskw ) >> bits; - bits = bits ^32; - if(bits){ - lpack++; - } - } -} - -void _XRead32( - Display *dpy, - long *data, - long len) -{ - char packbuffer[PACKBUFFERSIZE]; - unsigned nunits = PACKBUFFERSIZE >> 2; - - for (; len > PACKBUFFERSIZE; len -= PACKBUFFERSIZE, data += nunits) { - _doXRead32 (dpy, data, PACKBUFFERSIZE, packbuffer); - } - if (len) _doXRead32 (dpy, data, len, packbuffer); -} - - - -/* - * _XRead16 - Read bytes from the socket unpacking each 16 bits - * into a long (64 bits on a CRAY computer). - * - */ -static _doXRead16( - register Display *dpy, - register short *data, - register long size, - char *packbuffer) -{ - long *lpack,*lp; - long mask16 = 0x000000000000ffff; - long maskw, nwords, i, bits; - - (void) _XRead(dpy,packbuffer,size); /* don't do a padded read... */ - - lp = (long *) data; - lpack = (long *) packbuffer; - nwords = size >> 1; /* number of 16 bit words to be unpacked */ - bits = 48; - for(i=0;i<nwords;i++){ - maskw = mask16 << bits; - *lp++ = ( *lpack & maskw ) >> bits; - bits -= 16; - if(bits < 0){ - lpack++; - bits = 48; - } - } -} - -void _XRead16( - Display *dpy, - short *data, - long len) -{ - char packbuffer[PACKBUFFERSIZE]; - unsigned nunits = PACKBUFFERSIZE >> 1; - - for (; len > PACKBUFFERSIZE; len -= PACKBUFFERSIZE, data += nunits) { - _doXRead16 (dpy, data, PACKBUFFERSIZE, packbuffer); - } - if (len) _doXRead16 (dpy, data, len, packbuffer); -} - -void _XRead16Pad( - Display *dpy, - short *data, - long size) -{ - int slop = (size & 3); - short slopbuf[3]; - - _XRead16 (dpy, data, size); - if (slop > 0) { - _XRead16 (dpy, slopbuf, 4 - slop); - } -} -#endif /* WORD64 */ - /* * _XReadPad - Read bytes from the socket taking into account incomplete @@ -3795,123 +3660,6 @@ _XData32( } #endif /* LONG64 */ -#ifdef WORD64 - -/* - * XXX This is a *really* stupid way of doing this. It should just use - * dpy->bufptr directly, taking into account where in the word it is. - */ - -/* - * Data16 - Place 16 bit data in the buffer. - * - * "dpy" is a pointer to a Display. - * "data" is a pointer to the data. - * "len" is the length in bytes of the data. - */ - -static doData16( - register Display *dpy, - short *data, - unsigned len, - char *packbuffer) -{ - long *lp,*lpack; - long i, nwords,bits; - long mask16 = 0x000000000000ffff; - - lp = (long *)data; - lpack = (long *)packbuffer; - -/* nwords is the number of 16 bit values to be packed, - * the low order 16 bits of each word will be packed - * into 64 bit words - */ - nwords = len >> 1; - bits = 48; - - for(i=0;i<nwords;i++){ - if (bits == 48) *lpack = 0; - *lpack ^= (*lp & mask16) << bits; - bits -= 16 ; - lp++; - if(bits < 0){ - lpack++; - bits = 48; - } - } - Data(dpy, packbuffer, len); -} - -_XData16 ( - Display *dpy, - short *data, - unsigned len) -{ - char packbuffer[PACKBUFFERSIZE]; - unsigned nunits = PACKBUFFERSIZE >> 1; - - for (; len > PACKBUFFERSIZE; len -= PACKBUFFERSIZE, data += nunits) { - doData16 (dpy, data, PACKBUFFERSIZE, packbuffer); - } - if (len) doData16 (dpy, data, len, packbuffer); -} - -/* - * Data32 - Place 32 bit data in the buffer. - * - * "dpy" is a pointer to a Display. - * "data" is a pointer to the data. - * "len" is the length in bytes of the data. - */ - -static doData32( - register Display *dpy - long *data, - unsigned len, - char *packbuffer) -{ - long *lp,*lpack; - long i,bits,nwords; - long mask32 = 0x00000000ffffffff; - - lpack = (long *) packbuffer; - lp = data; - -/* nwords is the number of 32 bit values to be packed - * the low order 32 bits of each word will be packed - * into 64 bit words - */ - nwords = len >> 2; - bits = 32; - - for(i=0;i<nwords;i++){ - if (bits == 32) *lpack = 0; - *lpack ^= (*lp & mask32) << bits; - bits = bits ^32; - lp++; - if(bits) - lpack++; - } - Data(dpy, packbuffer, len); -} - -void _XData32( - Display *dpy, - long *data, - unsigned len, -{ - char packbuffer[PACKBUFFERSIZE]; - unsigned nunits = PACKBUFFERSIZE >> 2; - - for (; len > PACKBUFFERSIZE; len -= PACKBUFFERSIZE, data += nunits) { - doData32 (dpy, data, PACKBUFFERSIZE, packbuffer); - } - if (len) doData32 (dpy, data, len, packbuffer); -} - -#endif /* WORD64 */ - /* Make sure this produces the same string as DefineLocal/DefineSelf in xdm. * Otherwise, Xau will not be able to find your cookies in the Xauthority file. diff --git a/nx-X11/lib/X11/Xlibint.h b/nx-X11/lib/X11/Xlibint.h index 56da2349b..b9a39b25e 100644 --- a/nx-X11/lib/X11/Xlibint.h +++ b/nx-X11/lib/X11/Xlibint.h @@ -215,13 +215,6 @@ struct _XDisplay #define XAllocIDs(dpy,ids,n) (*(dpy)->idlist_alloc)(dpy,ids,n) -/* - * define the following if you want the Data macro to be a procedure instead - */ -#ifdef CRAY -#define DataRoutineIsProcedure -#endif /* CRAY */ - #ifndef _XEVENT_ /* * _QEvent datatype for use in input queueing. @@ -426,26 +419,8 @@ extern LockInfoPtr _Xglobal_lock; * X Protocol packetizing macros. */ -/* Need to start requests on 64 bit word boundaries - * on a CRAY computer so add a NoOp (127) if needed. - * A character pointer on a CRAY computer will be non-zero - * after shifting right 61 bits of it is not pointing to - * a word boundary. - */ -#ifdef WORD64 -#define WORD64ALIGN if ((long)dpy->bufptr >> 61) {\ - dpy->last_req = dpy->bufptr;\ - *(dpy->bufptr) = X_NoOperation;\ - *(dpy->bufptr+1) = 0;\ - *(dpy->bufptr+2) = 0;\ - *(dpy->bufptr+3) = 1;\ - dpy->request++;\ - dpy->bufptr += 4;\ - } -#else /* else does not require alignment on 64-bit boundaries */ +/* Leftover from CRAY support - was defined empty on all non-Cray systems */ #define WORD64ALIGN -#endif /* WORD64 */ - /* * GetReq - Get the next available X request packet in the buffer and @@ -458,7 +433,6 @@ extern LockInfoPtr _Xglobal_lock; #if !defined(UNIXCPP) || defined(ANSICPP) #define GetReq(name, req) \ - WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\ _XFlush(dpy);\ req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\ @@ -469,7 +443,6 @@ extern LockInfoPtr _Xglobal_lock; #else /* non-ANSI C uses empty comment instead of "##" for token concatenation */ #define GetReq(name, req) \ - WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\ _XFlush(dpy);\ req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\ @@ -484,7 +457,6 @@ extern LockInfoPtr _Xglobal_lock; #if !defined(UNIXCPP) || defined(ANSICPP) #define GetReqExtra(name, n, req) \ - WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(x##name##Req) + n) > dpy->bufmax)\ _XFlush(dpy);\ req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\ @@ -494,7 +466,6 @@ extern LockInfoPtr _Xglobal_lock; dpy->request++ #else #define GetReqExtra(name, n, req) \ - WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(x/**/name/**/Req) + n) > dpy->bufmax)\ _XFlush(dpy);\ req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\ @@ -513,7 +484,6 @@ extern LockInfoPtr _Xglobal_lock; #if !defined(UNIXCPP) || defined(ANSICPP) #define GetResReq(name, rid, req) \ - WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\ _XFlush(dpy);\ req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\ @@ -524,7 +494,6 @@ extern LockInfoPtr _Xglobal_lock; dpy->request++ #else #define GetResReq(name, rid, req) \ - WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\ _XFlush(dpy);\ req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\ @@ -541,7 +510,6 @@ extern LockInfoPtr _Xglobal_lock; */ #if !defined(UNIXCPP) || defined(ANSICPP) #define GetEmptyReq(name, req) \ - WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\ _XFlush(dpy);\ req = (xReq *) (dpy->last_req = dpy->bufptr);\ @@ -551,7 +519,6 @@ extern LockInfoPtr _Xglobal_lock; dpy->request++ #else #define GetEmptyReq(name, req) \ - WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\ _XFlush(dpy);\ req = (xReq *) (dpy->last_req = dpy->bufptr);\ @@ -561,18 +528,6 @@ extern LockInfoPtr _Xglobal_lock; dpy->request++ #endif -#ifdef WORD64 -#define MakeBigReq(req,n) \ - { \ - char _BRdat[4]; \ - unsigned long _BRlen = req->length - 1; \ - req->length = 0; \ - memcpy(_BRdat, ((char *)req) + (_BRlen << 2), 4); \ - memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen << 2); \ - memcpy(((char *)req) + 4, _BRdat, 4); \ - Data32(dpy, (long *)&_BRdat, 4); \ - } -#else #ifdef LONG64 #define MakeBigReq(req,n) \ { \ @@ -596,7 +551,6 @@ extern LockInfoPtr _Xglobal_lock; Data32(dpy, &_BRdat, 4); \ } #endif -#endif #define SetReqLen(req,n,badlen) \ if ((req->length + n) > (unsigned)65535) { \ @@ -655,10 +609,6 @@ extern void _XFlushGCCache(Display *dpy, GC gc); (void)ptr; \ dpy->bufptr += (n); -#ifdef WORD64 -#define Data16(dpy, data, len) _XData16(dpy, (short *)data, len) -#define Data32(dpy, data, len) _XData32(dpy, (long *)data, len) -#else #define Data16(dpy, data, len) Data((dpy), (char *)(data), (len)) #define _XRead16Pad(dpy, data, len) _XReadPad((dpy), (char *)(data), (len)) #define _XRead16(dpy, data, len) _XRead((dpy), (char *)(data), (len)) @@ -678,7 +628,6 @@ extern void _XRead32( #define Data32(dpy, data, len) Data((dpy), (char *)(data), (len)) #define _XRead32(dpy, data, len) _XRead((dpy), (char *)(data), (len)) #endif -#endif /* not WORD64 */ #define PackData16(dpy,data,len) Data16 (dpy, data, len) #define PackData32(dpy,data,len) Data32 (dpy, data, len) @@ -747,20 +696,10 @@ extern void _XRead32( } -#ifdef MUSTCOPY - -/* for when 32-bit alignment is not good enough */ -#define OneDataCard32(dpy,dstaddr,srcvar) \ - { dpy->bufptr -= 4; Data32 (dpy, (char *) &(srcvar), 4); } - -#else - /* srcvar must be a variable for large architecture version */ #define OneDataCard32(dpy,dstaddr,srcvar) \ { *(CARD32 *)(dstaddr) = (srcvar); } -#endif /* MUSTCOPY */ - typedef struct _XInternalAsync { struct _XInternalAsync *next; /* diff --git a/nx-X11/lib/X11/cmsTrig.c b/nx-X11/lib/X11/cmsTrig.c index 1859fa93e..a2d100c04 100644 --- a/nx-X11/lib/X11/cmsTrig.c +++ b/nx-X11/lib/X11/cmsTrig.c @@ -82,12 +82,8 @@ _XcmsModuloF( #define XCMS_FABS(x) ((x) < 0.0 ? -(x) : (x)) /* XCMS_DMAXPOWTWO - largest power of two exactly representable as a double */ -#ifdef _CRAY -#define XCMS_DMAXPOWTWO ((double)(1 < 47)) -#else #define XCMS_DMAXPOWTWO ((double)(XCMS_LONG_MAX) * \ (1L << ((XCMS_NBITS(double)-XCMS_DEXPLEN) - XCMS_NBITS(int) + 1))) -#endif /* * LOCAL VARIABLES diff --git a/nx-X11/lib/X11/omXChar.c b/nx-X11/lib/X11/omXChar.c index 4afafd40f..5ddd03584 100644 --- a/nx-X11/lib/X11/omXChar.c +++ b/nx-X11/lib/X11/omXChar.c @@ -264,47 +264,6 @@ _XomGetFontSetFromCharSet( return (FontSet) NULL; } -#ifdef MUSTCOPY -static void -cs_to_xchar2b( - register char *from, - register XChar2b *to, - register length) -{ - while (length-- > 0) { - to->byte1 = *from++; - to->byte2 = *from++; - to++; - } -} - -static void -cs_to_xchar2b_gl( - register char *from, - register XChar2b *to, - register length) -{ - while (length-- > 0) { - to->byte1 = *from++ & 0x7f; - to->byte2 = *from++ & 0x7f; - to++; - } -} - -static void -cs_to_xchar2b_gr( - register char *from, - register XChar2b *to, - register length) -{ - while (length-- > 0) { - to->byte1 = *from++ | 0x80; - to->byte2 = *from++ | 0x80; - to++; - } -} -#endif - static void shift_to_gl( register char *text, @@ -360,10 +319,6 @@ _XomConvert( XlcCharSet charset; int length, cs_left, ret; FontSet font_set; -#ifdef MUSTCOPY - XChar2b *xchar2b; - char *buf, buf_local[BUFSIZ]; -#endif cs = *to; cs_left = *to_left; @@ -382,32 +337,6 @@ _XomConvert( length = *to_left - cs_left; -#ifdef MUSTCOPY - if (font_set->is_xchar2b) { - buf = (length > BUFSIZ) ? Xmalloc(length) : buf_local; - if (buf == NULL) - return -1; - memcpy(buf, (char *) *to, length); - - xchar2b = (XChar2b *) *to; - length >>= 1; - - if (font_set->side == charset->side) - cs_to_xchar2b(buf, xchar2b, length); - else if (font_set->side == XlcGL) - cs_to_xchar2b_gl(buf, xchar2b, length); - else if (font_set->side == XlcGR) - cs_to_xchar2b_gr(buf, xchar2b, length); - else - cs_to_xchar2b(buf, xchar2b, length); - - if (buf != buf_local) - Xfree(buf); - - *to = (XPointer) (xchar2b + length); - *to_left -= length; - } else -#endif { if (font_set->side != charset->side) { if (font_set->side == XlcGL) diff --git a/nx-X11/lib/Xrender/FillRect.c b/nx-X11/lib/Xrender/FillRect.c index 319c35d57..75915379e 100644 --- a/nx-X11/lib/Xrender/FillRect.c +++ b/nx-X11/lib/Xrender/FillRect.c @@ -44,12 +44,6 @@ XRenderFillRectangle (Display *dpy, XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); xRectangle *rect; xRenderFillRectanglesReq *req; -#ifdef MUSTCOPY - xRectangle rectdata; - long len = SIZEOF(xRectangle); - - rect = &rectdata; -#endif /* MUSTCOPY */ RenderSimpleCheckExtension (dpy, info); LockDisplay(dpy); @@ -68,10 +62,8 @@ XRenderFillRectangle (Display *dpy, (char *)dpy->bufptr - (char *)req < size) { req->length += SIZEOF(xRectangle) >> 2; -#ifndef MUSTCOPY rect = (xRectangle *) dpy->bufptr; dpy->bufptr += SIZEOF(xRectangle); -#endif /* not MUSTCOPY */ } else { @@ -86,20 +78,13 @@ XRenderFillRectangle (Display *dpy, req->color.blue = color->blue; req->color.alpha = color->alpha; -#ifdef MUSTCOPY - dpy->bufptr -= SIZEOF(xRectangle); -#else rect = (xRectangle *) NEXTPTR(req,xRenderFillRectanglesReq); -#endif /* MUSTCOPY */ } rect->x = x; rect->y = y; rect->width = width; rect->height = height; -#ifdef MUSTCOPY - Data (dpy, (char *) rect, len); -#endif /* MUSTCOPY */ UnlockDisplay(dpy); SyncHandle(); } diff --git a/nx-X11/lib/Xrender/Xrenderint.h b/nx-X11/lib/Xrender/Xrenderint.h index 49a294b14..a90fe65d8 100644 --- a/nx-X11/lib/Xrender/Xrenderint.h +++ b/nx-X11/lib/Xrender/Xrenderint.h @@ -101,14 +101,9 @@ XRenderFindDisplay (Display *dpy); /* * Xlib uses long for 32-bit values. Xrender uses int. This - * matters on alpha. Note that this macro assumes that int is 32 bits - * except on WORD64 machines where it is 64 bits. + * matters on alpha. Note that this macro assumes that int is 32 bits. */ -#ifdef WORD64 -#define DataInt32(dpy,d,len) Data32(dpy,(long *) (d),len) -#else #define DataInt32(dpy,d,len) Data(dpy,(char *) (d),len) -#endif #endif /* _XRENDERINT_H_ */ diff --git a/nx-X11/lib/Xtst/XRecord.c b/nx-X11/lib/Xtst/XRecord.c index 16eaeffd7..05cbda889 100644 --- a/nx-X11/lib/Xtst/XRecord.c +++ b/nx-X11/lib/Xtst/XRecord.c @@ -672,8 +672,6 @@ XRecordFreeData(data) /* the EXTRACT macros are adapted from ICElibint.h */ -#ifndef WORD64 - #define EXTRACT_CARD16(swap, src, dst) \ { \ (dst) = *((CARD16 *) (src)); \ @@ -688,32 +686,6 @@ XRecordFreeData(data) (dst) = lswapl (dst); \ } -#else /* WORD64 */ - -#define EXTRACT_CARD16(swap, src, dst) \ -{ \ - (dst) = *((src) + 0); \ - (dst) <<= 8; \ - (dst) |= *((src) + 1); \ - if (swap) \ - (dst) = lswaps (dst); \ -} - -#define EXTRACT_CARD32(swap, src, dst) \ -{ \ - (dst) = *((src) + 0); \ - (dst) <<= 8; \ - (dst) |= *((src) + 1); \ - (dst) <<= 8; \ - (dst) |= *((src) + 2); \ - (dst) <<= 8; \ - (dst) |= *((src) + 3); \ - if (swap) \ - (dst) = lswapl (dst); \ -} - -#endif /* WORD64 */ - /* byte swapping macros from xfs/include/misc.h */ /* byte swap a long literal */ diff --git a/nx-X11/lib/Xxf86vm/XF86VMode.c b/nx-X11/lib/Xxf86vm/XF86VMode.c index 75a49d2ba..edff93fe5 100644 --- a/nx-X11/lib/Xxf86vm/XF86VMode.c +++ b/nx-X11/lib/Xxf86vm/XF86VMode.c @@ -421,7 +421,6 @@ XF86VidModeGetAllModeLines(dpy, screen, modecount, modelinesPtr) */ #if !defined(UNIXCPP) || defined(ANSICPP) #define GetOldReq(name, oldname, req) \ - WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(x##oldname##Req)) > dpy->bufmax)\ _XFlush(dpy);\ req = (x##oldname##Req *)(dpy->last_req = dpy->bufptr);\ @@ -432,7 +431,6 @@ XF86VidModeGetAllModeLines(dpy, screen, modecount, modelinesPtr) #else /* non-ANSI C uses empty comment instead of "##" for token concatenation */ #define GetOldReq(name, oldname, req) \ - WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(x/**/oldname/**/Req)) > dpy->bufmax)\ _XFlush(dpy);\ req = (x/**/oldname/**/Req *)(dpy->last_req = dpy->bufptr);\ diff --git a/nx-X11/lib/font/fc/fslibos.h b/nx-X11/lib/font/fc/fslibos.h index acc1f16dc..dd266bdc4 100644 --- a/nx-X11/lib/font/fc/fslibos.h +++ b/nx-X11/lib/font/fc/fslibos.h @@ -90,11 +90,7 @@ from The Open Group. #endif /* FONT_OPEN_MAX */ -#ifdef WORD64 -#define NMSKBITS 64 -#else #define NMSKBITS 32 -#endif #define MSKCNT ((FONT_OPEN_MAX + NMSKBITS - 1) / NMSKBITS) diff --git a/nx-X11/lib/font/fontfile/ffcheck.c b/nx-X11/lib/font/fontfile/ffcheck.c index 9a70a17f9..d3d121700 100644 --- a/nx-X11/lib/font/fontfile/ffcheck.c +++ b/nx-X11/lib/font/fontfile/ffcheck.c @@ -125,14 +125,12 @@ FontFileCheckRegisterFpeFunctions (void) BitmapRegisterFontFileFunctions (); -#ifndef CRAY #ifdef BUILD_SPEEDO SpeedoRegisterFontFileFunctions (); #endif #ifdef BUILD_TYPE1 Type1RegisterFontFileFunctions(); #endif -#endif #ifdef BUILD_CID CIDRegisterFontFileFunctions(); #endif diff --git a/nx-X11/lib/font/fontfile/register.c b/nx-X11/lib/font/fontfile/register.c index cb74c7cab..5ddab0386 100644 --- a/nx-X11/lib/font/fontfile/register.c +++ b/nx-X11/lib/font/fontfile/register.c @@ -54,13 +54,11 @@ in this Software without prior written authorization from The Open Group. * with other packages. */ -#ifndef CRAY -# ifdef BUILD_SPEEDO -# define XFONT_SPEEDO 1 -# endif -# ifdef BUILD_TYPE1 -# define XFONT_TYPE1 1 -# endif +#ifdef BUILD_SPEEDO +# define XFONT_SPEEDO 1 +#endif +#ifdef BUILD_TYPE1 +# define XFONT_TYPE1 1 #endif #ifdef BUILD_CID diff --git a/nx-X11/lib/xtrans/Xtrans.c b/nx-X11/lib/xtrans/Xtrans.c index a6bfbedc6..ef4d64aed 100644 --- a/nx-X11/lib/xtrans/Xtrans.c +++ b/nx-X11/lib/xtrans/Xtrans.c @@ -1265,44 +1265,6 @@ TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret, * may be used by it. */ -#ifdef CRAY - -/* - * Cray UniCOS does not have readv and writev so we emulate - */ - -static int TRANS(ReadV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt) - -{ - struct msghdr hdr; - - hdr.msg_iov = iov; - hdr.msg_iovlen = iovcnt; - hdr.msg_accrights = 0; - hdr.msg_accrightslen = 0; - hdr.msg_name = 0; - hdr.msg_namelen = 0; - - return (recvmsg (ciptr->fd, &hdr, 0)); -} - -static int TRANS(WriteV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt) - -{ - struct msghdr hdr; - - hdr.msg_iov = iov; - hdr.msg_iovlen = iovcnt; - hdr.msg_accrights = 0; - hdr.msg_accrightslen = 0; - hdr.msg_name = 0; - hdr.msg_namelen = 0; - - return (sendmsg (ciptr->fd, &hdr, 0)); -} - -#endif /* CRAY */ - #if (defined(SYSV) && defined(i386) && !defined(__SCO__)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__) /* diff --git a/nx-X11/lib/xtrans/Xtrans.h b/nx-X11/lib/xtrans/Xtrans.h index e8d4bdfcd..ae808667e 100644 --- a/nx-X11/lib/xtrans/Xtrans.h +++ b/nx-X11/lib/xtrans/Xtrans.h @@ -198,7 +198,7 @@ typedef long BytesReadable_t; #endif -#if defined(WIN32) || (defined(USG) && !defined(CRAY) && !defined(umips) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__)) +#if defined(WIN32) || (defined(USG) && !defined(umips) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__)) /* * TRANS(Readv) and TRANS(Writev) use struct iovec, normally found diff --git a/nx-X11/lib/xtrans/Xtransint.h b/nx-X11/lib/xtrans/Xtransint.h index 5ca0d9328..60d3a9e60 100644 --- a/nx-X11/lib/xtrans/Xtransint.h +++ b/nx-X11/lib/xtrans/Xtransint.h @@ -384,7 +384,7 @@ typedef struct _Xtransport_table { * systems, so they may be emulated. */ -#if defined(CRAY) || (defined(SYSV) && defined(i386) && !defined(__SCO__)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__) +#if (defined(SYSV) && defined(i386) && !defined(__SCO__)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__) #define READV(ciptr, iov, iovcnt) TRANS(ReadV)(ciptr, iov, iovcnt) @@ -398,10 +398,10 @@ static int TRANS(ReadV)( #define READV(ciptr, iov, iovcnt) readv(ciptr->fd, iov, iovcnt) -#endif /* CRAY || (SYSV && i386) || WIN32 || __sxg__ || */ +#endif /* (SYSV && i386) || WIN32 || __sxg__ || */ -#if defined(CRAY) || (defined(SYSV) && defined(i386) && !defined(__SCO__)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__) +#if (defined(SYSV) && defined(i386) && !defined(__SCO__)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__) #define WRITEV(ciptr, iov, iovcnt) TRANS(WriteV)(ciptr, iov, iovcnt) @@ -415,7 +415,7 @@ static int TRANS(WriteV)( #define WRITEV(ciptr, iov, iovcnt) writev(ciptr->fd, iov, iovcnt) -#endif /* CRAY || WIN32 || __sxg__ */ +#endif /* WIN32 || __sxg__ */ static int is_numeric ( diff --git a/nx-X11/lib/xtrans/Xtranssock.c b/nx-X11/lib/xtrans/Xtranssock.c index 091fc1ccd..62feefed7 100644 --- a/nx-X11/lib/xtrans/Xtranssock.c +++ b/nx-X11/lib/xtrans/Xtranssock.c @@ -2359,26 +2359,10 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr, char *host, char *port) ESET(EPROTOTYPE); return TRANS_CONNECT_FAILED; } - -#if defined(CRAY) && defined(OLDTCP) - /* Only Cray UNICOS3 and UNICOS4 will define this */ - { - long t; - memcpy ((char *)&t, (char *) hostp->h_addr, sizeof (t)); - sockname.sin_addr = t; - } -#else memcpy ((char *) &sockname.sin_addr, (char *) hostp->h_addr, sizeof (sockname.sin_addr)); -#endif /* CRAY and OLDTCP */ - } else { -#if defined(CRAY) && defined(OLDTCP) - /* Only Cray UNICOS3 and UNICOS4 will define this */ - sockname.sin_addr = tmpaddr; -#else sockname.sin_addr.s_addr = tmpaddr; -#endif /* CRAY and OLDTCP */ } /* diff --git a/nx-X11/lib/xtrans/Xtransutil.c b/nx-X11/lib/xtrans/Xtransutil.c index 253e8b099..729e65caa 100644 --- a/nx-X11/lib/xtrans/Xtransutil.c +++ b/nx-X11/lib/xtrans/Xtransutil.c @@ -104,17 +104,8 @@ TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr **addrp) */ struct sockaddr_in saddr; -#ifdef CRAY -#ifdef OLDTCP - int len = sizeof(saddr.sin_addr); -#else - int len = SIZEOF_in_addr; -#endif /* OLDTCP */ - char *cp = (char *) &saddr.sin_addr; -#else /* else not CRAY */ int len = sizeof(saddr.sin_addr.s_addr); char *cp = (char *) &saddr.sin_addr.s_addr; -#endif /* CRAY */ memcpy (&saddr, *addrp, sizeof (struct sockaddr_in)); |