aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/lib/X11/Xlib.h4
-rw-r--r--nx-X11/lib/X11/XlibAsync.c5
-rw-r--r--nx-X11/lib/X11/XlibInt.c250
-rw-r--r--nx-X11/lib/X11/Xlibint.h58
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrenderint_nxagent.h7
5 files changed, 1 insertions, 323 deletions
diff --git a/nx-X11/lib/X11/Xlib.h b/nx-X11/lib/X11/Xlib.h
index 883b1330f..e537c7522 100644
--- a/nx-X11/lib/X11/Xlib.h
+++ b/nx-X11/lib/X11/Xlib.h
@@ -121,11 +121,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 b56e6f0cb..2e528d8b1 100644
--- a/nx-X11/lib/X11/XlibAsync.c
+++ b/nx-X11/lib/X11/XlibAsync.c
@@ -125,11 +125,6 @@ _XGetAsyncReply(
_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 44c77af52..6ecbdc932 100644
--- a/nx-X11/lib/X11/XlibInt.c
+++ b/nx-X11/lib/X11/XlibInt.c
@@ -199,19 +199,6 @@ extern int _X11TransSocketCongestionChange(XtransConnInfo, int *);
#endif
#if !USE_XCB
-#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; )
@@ -220,7 +207,6 @@ extern int _X11TransSocketCongestionChange(XtransConnInfo, int *);
#define INCITERPTR(tpvar,type) tpvar++
#define ENDITERATE
-#endif /* MUSTCOPY */
typedef union {
xReply rep;
@@ -1658,124 +1644,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 */
#if !USE_XCB
@@ -4022,122 +3890,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.
@@ -4224,8 +3976,6 @@ void *_XGetRequest(Display *dpy, CARD8 type, size_t len)
{
xReq *req;
- WORD64ALIGN
-
if (dpy->bufptr + len > dpy->bufmax)
_XFlush(dpy);
diff --git a/nx-X11/lib/X11/Xlibint.h b/nx-X11/lib/X11/Xlibint.h
index ca004623d..cd972cfae 100644
--- a/nx-X11/lib/X11/Xlibint.h
+++ b/nx-X11/lib/X11/Xlibint.h
@@ -238,9 +238,6 @@ struct _XDisplay
/*
* define the following if you want the Data macro to be a procedure instead
*/
-#ifdef CRAY
-#define DataRoutineIsProcedure
-#endif /* CRAY */
#ifndef _XEVENT_
/*
@@ -440,27 +437,6 @@ 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 */
-#define WORD64ALIGN
-#endif /* WORD64 */
-
-
/*
* GetReq - Get the next available X request packet in the buffer and
* return it.
@@ -472,7 +448,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);\
@@ -483,7 +458,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);\
@@ -498,7 +472,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);\
@@ -508,7 +481,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);\
@@ -527,7 +499,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);\
@@ -538,7 +509,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);\
@@ -555,7 +525,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);\
@@ -565,7 +534,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);\
@@ -575,18 +543,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) \
{ \
@@ -610,7 +566,6 @@ extern LockInfoPtr _Xglobal_lock;
Data32(dpy, &_BRdat, 4); \
}
#endif
-#endif
#define SetReqLen(req,n,badlen) \
if ((req->length + n) > (unsigned)65535) { \
@@ -669,10 +624,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))
@@ -692,7 +643,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)
@@ -761,19 +711,11 @@ 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/programs/Xserver/hw/nxagent/X11/include/Xrenderint_nxagent.h b/nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrenderint_nxagent.h
index 823d1e427..ff14aa26a 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrenderint_nxagent.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrenderint_nxagent.h
@@ -98,14 +98,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_ */