Commit bad67799 authored by Mike Gabriel's avatar Mike Gabriel

old-arch cleanup: Drop CRAY support (i.e., drop code related to CRAY, _CRAY,…

old-arch cleanup: Drop CRAY support (i.e., drop code related to CRAY, _CRAY, WORD64, WORD64ALIGN, MUSTCOPY, UNSIGNEDBITFIELDS definitions).
parent 097562b8
...@@ -520,17 +520,6 @@ XCOMM $XFree86: xc/config/cf/Imake.cf,v 3.88 2003/12/16 21:30:21 herrb Exp $ ...@@ -520,17 +520,6 @@ XCOMM $XFree86: xc/config/cf/Imake.cf,v 3.88 2003/12/16 21:30:21 herrb Exp $
# define MacIIArchitecture # define MacIIArchitecture
#endif /* macII */ #endif /* macII */
#ifdef _CRAY
# define MacroIncludeFile <cray.cf>
# define MacroFile cray.cf
# undef cray
# undef CRAY
# undef CRAY1
# undef CRAY2
# undef YMP
# define CrayArchitecture
#endif /* _CRAY */
#ifdef sgi #ifdef sgi
# define MacroIncludeFile <sgi.cf> # define MacroIncludeFile <sgi.cf>
# define MacroFile sgi.cf # define MacroFile sgi.cf
......
...@@ -112,9 +112,6 @@ in this Software without prior written authorization from The Open Group. ...@@ -112,9 +112,6 @@ in this Software without prior written authorization from The Open Group.
#endif #endif
#endif #endif
#endif #endif
#ifdef _CRAY
#define imake_ccflags "-DSYSV -DUSG"
#endif
#if defined(_IBMR2) || defined(aix) #if defined(_IBMR2) || defined(aix)
#define imake_ccflags "-Daix -DSYSV" #define imake_ccflags "-Daix -DSYSV"
...@@ -225,7 +222,7 @@ in this Software without prior written authorization from The Open Group. ...@@ -225,7 +222,7 @@ in this Software without prior written authorization from The Open Group.
* descriptor onto another, define such a mechanism here (if you don't * descriptor onto another, define such a mechanism here (if you don't
* already fall under the existing category(ies). * already fall under the existing category(ies).
*/ */
#if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_) && !defined(__SCO__) #if defined(SYSV) && !defined(Mips) && !defined(_SEQUENT_) && !defined(__SCO__)
#define dup2(fd1,fd2) ((fd1 == fd2) ? fd1 : (close(fd2), \ #define dup2(fd1,fd2) ((fd1 == fd2) ? fd1 : (close(fd2), \
fcntl(fd1, F_DUPFD, fd2))) fcntl(fd1, F_DUPFD, fd2)))
#endif #endif
...@@ -309,9 +306,6 @@ in this Software without prior written authorization from The Open Group. ...@@ -309,9 +306,6 @@ in this Software without prior written authorization from The Open Group.
#ifdef __sxg__ #ifdef __sxg__
#define DEFAULT_CPP "/usr/lib/cpp" #define DEFAULT_CPP "/usr/lib/cpp"
#endif #endif
#ifdef _CRAY
#define DEFAULT_CPP "/lib/pcpp"
#endif
#if defined(__386BSD__) #if defined(__386BSD__)
#define DEFAULT_CPP "/usr/libexec/cpp" #define DEFAULT_CPP "/usr/libexec/cpp"
#endif #endif
...@@ -497,9 +491,6 @@ char *cpp_argv[ARGUMENTS] = { ...@@ -497,9 +491,6 @@ char *cpp_argv[ARGUMENTS] = {
"-Duniosu", "-Duniosu",
#endif #endif
#endif /* luna */ #endif /* luna */
#ifdef _CRAY /* Cray */
"-Ucray",
#endif
#ifdef Mips #ifdef Mips
"-DMips", /* Define and use Mips for Mips Co. OS/mach. */ "-DMips", /* Define and use Mips for Mips Co. OS/mach. */
# if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43) # if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
...@@ -1098,15 +1089,6 @@ struct symtab predefs[] = { ...@@ -1098,15 +1089,6 @@ struct symtab predefs[] = {
#ifdef VMS #ifdef VMS
{"VMS", "1"}, {"VMS", "1"},
#endif #endif
#ifdef cray
{"cray", "1"},
#endif
#ifdef CRAY
{"CRAY", "1"},
#endif
#ifdef _CRAY
{"_CRAY", "1"},
#endif
#ifdef att #ifdef att
{"att", "1"}, {"att", "1"},
#endif #endif
......
...@@ -746,7 +746,7 @@ char *base_name(char *file) ...@@ -746,7 +746,7 @@ char *base_name(char *file)
# define NEED_RENAME # define NEED_RENAME
# endif # endif
#else /* Imake configured, check known OS'es without rename() */ #else /* Imake configured, check known OS'es without rename() */
# if defined(USG) && !defined(CRAY) && !defined(SVR4) && !defined(__UNIXOS2__) && !defined(clipper) && !defined(__clipper__) # if defined(USG) && !defined(SVR4) && !defined(__UNIXOS2__) && !defined(clipper) && !defined(__clipper__)
# define NEED_RENAME # define NEED_RENAME
# endif # endif
#endif #endif
......
...@@ -55,9 +55,6 @@ SOFTWARE. ...@@ -55,9 +55,6 @@ SOFTWARE.
/* /*
* Special per-machine configuration flags. * Special per-machine configuration flags.
*/ */
#ifdef CRAY
#define WORD64 /* 64-bit architecture */
#endif
#if defined (_LP64) || \ #if defined (_LP64) || \
defined(__alpha) || defined(__alpha__) || \ defined(__alpha) || defined(__alpha__) || \
defined(__ia64__) || defined(ia64) || \ defined(__ia64__) || defined(ia64) || \
...@@ -71,15 +68,6 @@ SOFTWARE. ...@@ -71,15 +68,6 @@ SOFTWARE.
#endif #endif
/* /*
* Stuff to handle large architecture machines; the constants were generated
* on a 32-bit machine and must coorespond to the protocol.
*/
#ifdef WORD64
#define MUSTCOPY
#endif /* WORD64 */
/*
* Definition of macro used to set constants for size of network structures; * Definition of macro used to set constants for size of network structures;
* machines with preprocessors that can't handle all of the sz_ symbols * machines with preprocessors that can't handle all of the sz_ symbols
* can define this macro to be sizeof(x) if and only if their compiler doesn't * can define this macro to be sizeof(x) if and only if their compiler doesn't
...@@ -105,24 +93,6 @@ SOFTWARE. ...@@ -105,24 +93,6 @@ SOFTWARE.
* need them. Note that bitfields are not guarranteed to be signed * need them. Note that bitfields are not guarranteed to be signed
* (or even unsigned) according to ANSI C. * (or even unsigned) according to ANSI C.
*/ */
#ifdef WORD64
typedef long INT64;
typedef unsigned long CARD64;
#define B32 :32
#define B16 :16
#ifdef UNSIGNEDBITFIELDS
typedef unsigned int INT32;
typedef unsigned int INT16;
#else
#ifdef __STDC__
typedef signed int INT32;
typedef signed int INT16;
#else
typedef int INT32;
typedef int INT16;
#endif
#endif
#else
#define B32 #define B32
#define B16 #define B16
#ifdef LONG64 #ifdef LONG64
...@@ -132,7 +102,6 @@ typedef int INT32; ...@@ -132,7 +102,6 @@ typedef int INT32;
typedef long INT32; typedef long INT32;
#endif #endif
typedef short INT16; typedef short INT16;
#endif
#if defined(__STDC__) || defined(sgi) || defined(AIXV3) #if defined(__STDC__) || defined(sgi) || defined(AIXV3)
typedef signed char INT8; typedef signed char INT8;
...@@ -163,17 +132,6 @@ typedef CARD8 BOOL; ...@@ -163,17 +132,6 @@ typedef CARD8 BOOL;
/* /*
* definitions for sign-extending bitfields on 64-bit architectures * definitions for sign-extending bitfields on 64-bit architectures
*/ */
#if defined(WORD64) && defined(UNSIGNEDBITFIELDS)
#define cvtINT8toInt(val) (((val) & 0x00000080) ? ((val) | 0xffffffffffffff00) : (val))
#define cvtINT16toInt(val) (((val) & 0x00008000) ? ((val) | 0xffffffffffff0000) : (val))
#define cvtINT32toInt(val) (((val) & 0x80000000) ? ((val) | 0xffffffff00000000) : (val))
#define cvtINT8toShort(val) cvtINT8toInt(val)
#define cvtINT16toShort(val) cvtINT16toInt(val)
#define cvtINT32toShort(val) cvtINT32toInt(val)
#define cvtINT8toLong(val) cvtINT8toInt(val)
#define cvtINT16toLong(val) cvtINT16toInt(val)
#define cvtINT32toLong(val) cvtINT32toInt(val)
#else
#define cvtINT8toInt(val) (val) #define cvtINT8toInt(val) (val)
#define cvtINT16toInt(val) (val) #define cvtINT16toInt(val) (val)
#define cvtINT32toInt(val) (val) #define cvtINT32toInt(val) (val)
...@@ -183,21 +141,12 @@ typedef CARD8 BOOL; ...@@ -183,21 +141,12 @@ typedef CARD8 BOOL;
#define cvtINT8toLong(val) (val) #define cvtINT8toLong(val) (val)
#define cvtINT16toLong(val) (val) #define cvtINT16toLong(val) (val)
#define cvtINT32toLong(val) (val) #define cvtINT32toLong(val) (val)
#endif /* WORD64 and UNSIGNEDBITFIELDS */
#ifdef MUSTCOPY
/*
* This macro must not cast or else pointers will get aligned and be wrong
*/
#define NEXTPTR(p,t) (((char *) p) + SIZEOF(t))
#else /* else not MUSTCOPY, this is used for 32-bit machines */
/* /*
* this version should leave result of type (t *), but that should only be * this version should leave result of type (t *)
* used when not in MUSTCOPY
*/ */
#define NEXTPTR(p,t) (((t *)(p)) + 1) #define NEXTPTR(p,t) (((t *)(p)) + 1)
#endif /* MUSTCOPY - used machines whose C structs don't line up with proto */
#endif /* XMD_H */ #endif /* XMD_H */
...@@ -45,9 +45,6 @@ in this Software without prior written authorization from The Open Group. ...@@ -45,9 +45,6 @@ in this Software without prior written authorization from The Open Group.
#ifdef USG #ifdef USG
#ifndef __TYPES__ #ifndef __TYPES__
#ifdef CRAY
#define word word_t
#endif /* CRAY */
#include <sys/types.h> /* forgot to protect it... */ #include <sys/types.h> /* forgot to protect it... */
#define __TYPES__ #define __TYPES__
#endif /* __TYPES__ */ #endif /* __TYPES__ */
...@@ -149,7 +146,7 @@ extern int sys_nerr; ...@@ -149,7 +146,7 @@ extern int sys_nerr;
*/ */
#if defined(X_NOT_POSIX) #if defined(X_NOT_POSIX)
#include <fcntl.h> #include <fcntl.h>
#if defined(USL) || defined(CRAY) || defined(MOTOROLA) || (defined(i386) && (defined(SYSV) || defined(SVR4))) || defined(__sxg__) #if defined(USL) || defined(MOTOROLA) || (defined(i386) && (defined(SYSV) || defined(SVR4))) || defined(__sxg__)
#include <unistd.h> #include <unistd.h>
#endif #endif
#ifdef WIN32 #ifdef WIN32
...@@ -179,10 +176,7 @@ extern int sys_nerr; ...@@ -179,10 +176,7 @@ extern int sys_nerr;
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#include <time.h> #include <time.h>
#ifdef CRAY #if defined(USG) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__) && !defined(clipper) && !defined(__clipper__)
#undef word
#endif /* CRAY */
#if defined(USG) && !defined(CRAY) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__) && !defined(clipper) && !defined(__clipper__)
struct timeval { struct timeval {
long tv_sec; long tv_sec;
long tv_usec; long tv_usec;
......
...@@ -81,12 +81,12 @@ from The Open Group. ...@@ -81,12 +81,12 @@ from The Open Group.
* 'the branch below is the fallthrough for halfway modern systems', and include * 'the branch below is the fallthrough for halfway modern systems', and include
* <sys/select.h>, so we get the FD_* macros. */ * <sys/select.h>, so we get the FD_* macros. */
#if !defined(DGUX) #if !defined(DGUX)
# if (defined(SVR4) || defined(CRAY) || defined(AIXV3)) && !defined(FD_SETSIZE) # if (defined(SVR4) || defined(AIXV3)) && !defined(FD_SETSIZE)
# include <sys/select.h> # include <sys/select.h>
# ifdef luna # ifdef luna
# include <sysent.h> # include <sysent.h>
# endif # endif
# else /* not SVR4/CRAY/AIXv3 */ # else /* not SVR4/AIXv3 */
# if defined(AIXV4) /* AIX 4.2 fubar-ed <sys/select.h>, so try really hard. */ # if defined(AIXV4) /* AIX 4.2 fubar-ed <sys/select.h>, so try really hard. */
# if !defined(NFDBITS) # if !defined(NFDBITS)
# include <sys/select.h> # include <sys/select.h>
......
...@@ -629,13 +629,9 @@ typedef struct _xQueryFontReply { ...@@ -629,13 +629,9 @@ typedef struct _xQueryFontReply {
CARD16 sequenceNumber B16; CARD16 sequenceNumber B16;
CARD32 length B32; /* definitely > 0, even if "nCharInfos" is 0 */ CARD32 length B32; /* definitely > 0, even if "nCharInfos" is 0 */
xCharInfo minBounds; xCharInfo minBounds;
#ifndef WORD64
CARD32 walign1 B32; CARD32 walign1 B32;
#endif
xCharInfo maxBounds; xCharInfo maxBounds;
#ifndef WORD64
CARD32 walign2 B32; CARD32 walign2 B32;
#endif
CARD16 minCharOrByte2 B16, maxCharOrByte2 B16; CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
CARD16 defaultChar B16; CARD16 defaultChar B16;
CARD16 nFontProps B16; /* followed by this many xFontProp structures */ CARD16 nFontProps B16; /* followed by this many xFontProp structures */
...@@ -678,13 +674,9 @@ typedef struct { ...@@ -678,13 +674,9 @@ typedef struct {
CARD16 sequenceNumber B16; CARD16 sequenceNumber B16;
CARD32 length B32; /* definitely > 0, even if "nameLength" is 0 */ CARD32 length B32; /* definitely > 0, even if "nameLength" is 0 */
xCharInfo minBounds; xCharInfo minBounds;
#ifndef WORD64
CARD32 walign1 B32; CARD32 walign1 B32;
#endif
xCharInfo maxBounds; xCharInfo maxBounds;
#ifndef WORD64
CARD32 walign2 B32; CARD32 walign2 B32;
#endif
CARD16 minCharOrByte2 B16, maxCharOrByte2 B16; CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
CARD16 defaultChar B16; CARD16 defaultChar B16;
CARD16 nFontProps B16; /* followed by this many xFontProp structures */ CARD16 nFontProps B16; /* followed by this many xFontProp structures */
...@@ -1419,12 +1411,7 @@ typedef struct { ...@@ -1419,12 +1411,7 @@ typedef struct {
CARD16 length B16; CARD16 length B16;
Window destination B32; Window destination B32;
CARD32 eventMask B32; CARD32 eventMask B32;
#ifdef WORD64
/* the structure should have been quad-aligned */
BYTE eventdata[SIZEOF(xEvent)];
#else
xEvent event; xEvent event;
#endif /* WORD64 */
} xSendEventReq; } xSendEventReq;
typedef struct { typedef struct {
......
...@@ -33,12 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -33,12 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f)) #define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f))
#define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff))) #define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff)))
#if defined(WORD64) && defined(UNSIGNEDBITFIELDS)
#define Xkb2CharsToInt(h,l) ((h)&0x80?(int)(((h)<<8)|(l)|(~0xffff)):\
(int)(((h)<<8)|(l)&0x7fff))
#else
#define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l))) #define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l)))
#endif
/* /*
* Common data structures and access macros * Common data structures and access macros
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
#include <sys/types.h> #include <sys/types.h>
#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__))
struct iovec { struct iovec {
caddr_t iov_base; caddr_t iov_base;
......
...@@ -377,13 +377,9 @@ typedef struct { ...@@ -377,13 +377,9 @@ typedef struct {
typedef struct { typedef struct {
xCharInfo minBounds; xCharInfo minBounds;
/* XXX do we need to leave this gunk? */ /* XXX do we need to leave this gunk? */
#ifndef WORD64
CARD32 walign1 B32; CARD32 walign1 B32;
#endif
xCharInfo maxBounds; xCharInfo maxBounds;
#ifndef WORD64
CARD32 walign2 B32; CARD32 walign2 B32;
#endif
CARD16 minCharOrByte2 B16, maxCharOrByte2 B16; CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
CARD16 defaultChar B16; CARD16 defaultChar B16;
CARD16 nFontProps B16; /* followed by this many xFontProp structures */ CARD16 nFontProps B16; /* followed by this many xFontProp structures */
......
...@@ -58,13 +58,9 @@ typedef struct { ...@@ -58,13 +58,9 @@ typedef struct {
CARD16 sequenceNumber B16; CARD16 sequenceNumber B16;
CARD32 length B32; CARD32 length B32;
xCharInfo minBounds; xCharInfo minBounds;
#ifndef WORD64
CARD32 walign1 B32; CARD32 walign1 B32;
#endif
xCharInfo maxBounds; xCharInfo maxBounds;
#ifndef WORD64
CARD32 walign2 B32; CARD32 walign2 B32;
#endif
CARD16 minCharOrByte2 B16; CARD16 minCharOrByte2 B16;
CARD16 maxCharOrByte2 B16; CARD16 maxCharOrByte2 B16;
CARD16 defaultChar B16; CARD16 defaultChar B16;
......
...@@ -44,20 +44,11 @@ unsigned int width, height; ...@@ -44,20 +44,11 @@ unsigned int width, height;
req->window = w; req->window = w;
req->mask = CWWidth | CWHeight; 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); CARD32 *valuePtr = (CARD32 *) NEXTPTR(req,xConfigureWindowReq);
*valuePtr++ = width; *valuePtr++ = width;
*valuePtr = height; *valuePtr = height;
} }
#endif /* MUSTCOPY */
UnlockDisplay(dpy); UnlockDisplay(dpy);
SyncHandle(); SyncHandle();
return 1; return 1;
......
...@@ -44,18 +44,6 @@ unsigned int width, height; ...@@ -44,18 +44,6 @@ unsigned int width, height;
GetReqExtra(ConfigureWindow, 16, req); GetReqExtra(ConfigureWindow, 16, req);
req->window = w; req->window = w;
req->mask = CWX | CWY | CWWidth | CWHeight; 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 = register CARD32 *valuePtr =
(CARD32 *) NEXTPTR(req,xConfigureWindowReq); (CARD32 *) NEXTPTR(req,xConfigureWindowReq);
...@@ -64,7 +52,6 @@ unsigned int width, height; ...@@ -64,7 +52,6 @@ unsigned int width, height;
*valuePtr++ = width; *valuePtr++ = width;
*valuePtr = height; *valuePtr = height;
} }
#endif /* MUSTCOPY */
UnlockDisplay(dpy); UnlockDisplay(dpy);
SyncHandle(); SyncHandle();
return 1; return 1;
......
...@@ -56,20 +56,11 @@ Window XCreateSimpleWindow(dpy, parent, x, y, width, height, ...@@ -56,20 +56,11 @@ Window XCreateSimpleWindow(dpy, parent, x, y, width, height,
wid = req->wid = XAllocID(dpy); wid = req->wid = XAllocID(dpy);
req->mask = CWBackPixel | CWBorderPixel; 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); register CARD32 *valuePtr = (CARD32 *) NEXTPTR(req,xCreateWindowReq);
*valuePtr++ = background; *valuePtr++ = background;
*valuePtr = border; *valuePtr = border;
} }
#endif /* MUSTCOPY */
UnlockDisplay(dpy); UnlockDisplay(dpy);
SyncHandle(); SyncHandle();
......
...@@ -48,12 +48,6 @@ XDrawArc(dpy, d, gc, x, y, width, height, angle1, angle2) ...@@ -48,12 +48,6 @@ XDrawArc(dpy, d, gc, x, y, width, height, angle1, angle2)
{ {
register xPolyArcReq *req; register xPolyArcReq *req;
register xArc *arc; register xArc *arc;
#ifdef MUSTCOPY
xArc arcdata;
long len = SIZEOF(xArc);
arc = &arcdata;
#endif /* MUSTCOPY */
LockDisplay(dpy); LockDisplay(dpy);
FlushGC(dpy, gc); FlushGC(dpy, gc);
...@@ -62,9 +56,7 @@ XDrawArc(dpy, d, gc, x, y, width, height, angle1, angle2) ...@@ -62,9 +56,7 @@ XDrawArc(dpy, d, gc, x, y, width, height, angle1, angle2)
req->drawable = d; req->drawable = d;
req->gc = gc->gid; req->gc = gc->gid;
#ifndef MUSTCOPY
arc = (xArc *) NEXTPTR(req,xPolyArcReq); arc = (xArc *) NEXTPTR(req,xPolyArcReq);
#endif /* MUSTCOPY */
arc->x = x; arc->x = x;
arc->y = y; arc->y = y;
...@@ -73,11 +65,6 @@ XDrawArc(dpy, d, gc, x, y, width, height, angle1, angle2) ...@@ -73,11 +65,6 @@ XDrawArc(dpy, d, gc, x, y, width, height, angle1, angle2)
arc->angle1 = angle1; arc->angle1 = angle1;
arc->angle2 = angle2; arc->angle2 = angle2;
#ifdef MUSTCOPY
dpy->bufptr -= SIZEOF(xArc);
Data (dpy, (char *) arc, len);
#endif /* MUSTCOPY */
UnlockDisplay(dpy); UnlockDisplay(dpy);
SyncHandle(); SyncHandle();
return 1; return 1;
......
...@@ -44,12 +44,6 @@ XDrawLine (dpy, d, gc, x1, y1, x2, y2) ...@@ -44,12 +44,6 @@ XDrawLine (dpy, d, gc, x1, y1, x2, y2)
int x1, y1, x2, y2; int x1, y1, x2, y2;
{ {
register xSegment *segment; register xSegment *segment;
#ifdef MUSTCOPY
xSegment segmentdata;
long len = SIZEOF(xSegment);
segment = &segmentdata;
#endif /* not MUSTCOPY */
LockDisplay(dpy); LockDisplay(dpy);
FlushGC(dpy, gc); FlushGC(dpy, gc);
...@@ -66,21 +60,15 @@ XDrawLine (dpy, d, gc, x1, y1, x2, y2) ...@@ -66,21 +60,15 @@ XDrawLine (dpy, d, gc, x1, y1, x2, y2)
&& (((char *)dpy->bufptr - (char *)req) < (gc->values.line_width ? && (((char *)dpy->bufptr - (char *)req) < (gc->values.line_width ?
wsize : zsize)) ) { wsize : zsize)) ) {
req->length += SIZEOF(xSegment) >> 2; req->length += SIZEOF(xSegment) >> 2;
#ifndef MUSTCOPY
segment = (xSegment *) dpy->bufptr; segment = (xSegment *) dpy->bufptr;
dpy->bufptr += SIZEOF(xSegment); dpy->bufptr += SIZEOF(xSegment);
#endif /* not MUSTCOPY */
} }
else { else {
GetReqExtra (PolySegment, SIZEOF(xSegment), req); GetReqExtra (PolySegment, SIZEOF(xSegment), req);
req->drawable = d; req->drawable = d;
req->gc = gc->gid; req->gc = gc->gid;
#ifdef MUSTCOPY
dpy->bufptr -= SIZEOF(xSegment);
#else
segment = (xSegment *) NEXTPTR(req,xPolySegmentReq); segment = (xSegment *) NEXTPTR(req,xPolySegmentReq);
#endif /* MUSTCOPY */
} }
segment->x1 = x1; segment->x1 = x1;
...@@ -88,10 +76,6 @@ XDrawLine (dpy, d, gc, x1, y1, x2, y2) ...@@ -88,10 +76,6 @@ XDrawLine (dpy, d, gc, x1, y1, x2, y2)
segment->x2 = x2; segment->x2 = x2;
segment->y2 = y2; segment->y2 = y2;
#ifdef MUSTCOPY
Data (dpy, (char *) &segmentdata, len);
#endif /* MUSTCOPY */
UnlockDisplay(dpy); UnlockDisplay(dpy);
SyncHandle(); SyncHandle();
} }
......
...@@ -43,12 +43,6 @@ XDrawPoint(dpy, d, gc, x, y) ...@@ -43,12 +43,6 @@ XDrawPoint(dpy, d, gc, x, y)
int x, y; /* INT16 */ int x, y; /* INT16 */
{ {
xPoint *point; xPoint *point;
#ifdef MUSTCOPY
xPoint pointdata;
long len = SIZEOF(xPoint);
point = &pointdata;
#endif /* MUSTCOPY */
LockDisplay(dpy); LockDisplay(dpy);
FlushGC(dpy, gc); FlushGC(dpy, gc);
...@@ -66,10 +60,8 @@ XDrawPoint(dpy, d, gc, x, y) ...@@ -66,10 +60,8 @@ XDrawPoint(dpy, d, gc, x, y)
&& ((dpy->bufptr + SIZEOF(xPoint)) <= dpy->bufmax) && ((dpy->bufptr + SIZEOF(xPoint)) <= dpy->bufmax)
&& (((char *)dpy->bufptr - (char *)req) < size) ) { && (((char *)dpy->bufptr - (char *)req) < size) ) {
req->length += SIZEOF(xPoint) >> 2; req->length += SIZEOF(xPoint) >> 2;
#ifndef MUSTCOPY
point = (xPoint *) dpy->bufptr; point = (xPoint *) dpy->bufptr;
dpy->bufptr += SIZEOF(xPoint); dpy->bufptr += SIZEOF(xPoint);
#endif /* not MUSTCOPY */
} }
else { else {
...@@ -77,19 +69,12 @@ XDrawPoint(dpy, d, gc, x, y) ...@@ -77,19 +69,12 @@ XDrawPoint(dpy, d, gc, x, y)
req->drawable = d; req->drawable = d;
req->gc = gc->gid; req->gc = gc->gid;
req->coordMode = CoordModeOrigin; req->coordMode = CoordModeOrigin;
#ifdef MUSTCOPY
dpy->bufptr -= SIZEOF(xPoint);
#else
point = (xPoint *) NEXTPTR(req,xPolyPointReq); point = (xPoint *) NEXTPTR(req,xPolyPointReq);
#endif /* MUSTCOPY */
} }
point->x = x; point->x = x;
point->y = y; point->y = y;
#ifdef MUSTCOPY
Data (dpy, (char *) point, len);
#endif /* MUSTCOPY */
} }
UnlockDisplay(dpy); UnlockDisplay(dpy);
SyncHandle(); SyncHandle();
......
...@@ -45,12 +45,6 @@ XDrawRectangle(dpy, d, gc, x, y, width, height) ...@@ -45,12 +45,6 @@ XDrawRectangle(dpy, d, gc, x, y, width, height)
unsigned int width, height; /* CARD16 */ unsigned int width, height; /* CARD16 */
{ {
xRectangle *rect; xRectangle *rect;
#ifdef MUSTCOPY
xRectangle rectdata;
long len = SIZEOF(xRectangle);
rect = &rectdata;
#endif /* MUSTCOPY */
LockDisplay(dpy); LockDisplay(dpy);
FlushGC(dpy, gc); FlushGC(dpy, gc);
...@@ -67,21 +61,15 @@ XDrawRectangle(dpy, d, gc, x, y, width, height) ...@@ -67,21 +61,15 @@ XDrawRectangle(dpy, d, gc, x, y, width, height)
&& (((char *)dpy->bufptr - (char *)req) < (gc->values.line_width ? && (((char *)dpy->bufptr - (char *)req) < (gc->values.line_width ?
wsize : zsize)) ) { wsize : zsize)) ) {
req->length += SIZEOF(xRectangle) >> 2; req->length += SIZEOF(xRectangle) >> 2;
#ifndef MUSTCOPY
rect = (xRectangle *) dpy->bufptr; rect = (xRectangle *) dpy->bufptr;
dpy->bufptr += SIZEOF(xRectangle); dpy->bufptr += SIZEOF(xRectangle);
#endif /* not MUSTCOPY */
} }
else { else {
GetReqExtra(PolyRectangle, SIZEOF(xRectangle), req); GetReqExtra(PolyRectangle, SIZEOF(xRectangle), req);
req->drawable = d; req->drawable = d;
req->gc = gc->gid; req->gc = gc->gid;
#ifdef MUSTCOPY
dpy->bufptr -= SIZEOF(xRectangle);
#else
rect = (xRectangle *) NEXTPTR(req,xPolyRectangleReq); rect = (xRectangle *) NEXTPTR(req,xPolyRectangleReq);
#endif /* MUSTCOPY */
} }
rect->x = x; rect->x = x;
...@@ -89,10 +77,6 @@ XDrawRectangle(dpy, d, gc, x, y, width, height) ...@@ -89,10 +77,6 @@ XDrawRectangle(dpy, d, gc, x, y, width, height)
rect->width = width; rect->width = width;
rect->height = height; rect->height = height;
#ifdef MUSTCOPY
Data (dpy, (char *) rect, len); /* subtracted bufptr up above */
#endif /* MUSTCOPY */
} }
UnlockDisplay(dpy); UnlockDisplay(dpy);
SyncHandle(); SyncHandle();
......
...@@ -45,12 +45,6 @@ XFillArc(dpy, d, gc, x, y, width, height, angle1, angle2) ...@@ -45,12 +45,6 @@ XFillArc(dpy, d, gc, x, y, width, height, angle1, angle2)
int angle1, angle2; /* INT16 */ int angle1, angle2; /* INT16 */
{ {
xArc *arc; xArc *arc;
#ifdef MUSTCOPY
xArc arcdata;
long len = SIZEOF(xArc);
arc = &arcdata;
#endif /* MUSTCOPY */
LockDisplay(dpy); LockDisplay(dpy);
FlushGC(dpy, gc); FlushGC(dpy, gc);
...@@ -66,10 +60,8 @@ XFillArc(dpy, d, gc, x, y, width, height, angle1, angle2) ...@@ -66,10 +60,8 @@ XFillArc(dpy, d, gc, x, y, width, height, angle1, angle2)
&& ((dpy->bufptr + SIZEOF(xArc)) <= dpy->bufmax) && ((dpy->bufptr + SIZEOF(xArc)) <= dpy->bufmax)
&& (((char *)dpy->bufptr - (char *)req) < size) ) { && (((char *)dpy->bufptr - (char *)req) < size) ) {
req->length += SIZEOF(xArc) >> 2; req->length += SIZEOF(xArc) >> 2;
#ifndef MUSTCOPY
arc = (xArc *) dpy->bufptr; arc = (xArc *) dpy->bufptr;
dpy->bufptr += SIZEOF(xArc); dpy->bufptr += SIZEOF(xArc);
#endif /* not MUSTCOPY */
} }
else { else {
...@@ -77,11 +69,7 @@ XFillArc(dpy, d, gc, x, y, width, height, angle1, angle2) ...@@ -77,11 +69,7 @@ XFillArc(dpy, d, gc, x, y, width, height, angle1, angle2)
req->drawable = d; req->drawable = d;
req->gc = gc->gid; req->gc = gc->gid;
#ifdef MUSTCOPY
dpy->bufptr -= SIZEOF(xArc);
#else
arc = (xArc *) NEXTPTR(req,xPolyFillArcReq); arc = (xArc *) NEXTPTR(req,xPolyFillArcReq);
#endif /* MUSTCOPY */
} }
arc->x = x; arc->x = x;
arc->y = y; arc->y = y;
...@@ -90,10 +78,6 @@ XFillArc(dpy, d, gc, x, y, width, height, angle1, angle2) ...@@ -90,10 +78,6 @@ XFillArc(dpy, d, gc, x, y, width, height, angle1, angle2)
arc->angle1 = angle1; arc->angle1 = angle1;
arc->angle2 = angle2; arc->angle2 = angle2;
#ifdef MUSTCOPY
Data (dpy, (char *) arc, len);
#endif /* MUSTCOPY */
} }
UnlockDisplay(dpy); UnlockDisplay(dpy);
SyncHandle(); SyncHandle();
......
...@@ -44,12 +44,6 @@ XFillRectangle(dpy, d, gc, x, y, width, height) ...@@ -44,12 +44,6 @@ XFillRectangle(dpy, d, gc, x, y, width, height)
unsigned int width, height; /* CARD16 */ unsigned int width, height; /* CARD16 */
{ {
xRectangle *rect; xRectangle *rect;
#ifdef MUSTCOPY
xRectangle rectdata;
long len = SIZEOF(xRectangle);
rect = &rectdata;
#endif /* MUSTCOPY */
LockDisplay(dpy); LockDisplay(dpy);
FlushGC(dpy, gc); FlushGC(dpy, gc);
...@@ -66,30 +60,21 @@ XFillRectangle(dpy, d, gc, x, y, width, height) ...@@ -66,30 +60,21 @@ XFillRectangle(dpy, d, gc, x, y, width, height)
&& ((dpy->bufptr + SIZEOF(xRectangle)) <= dpy->bufmax) && ((dpy->bufptr + SIZEOF(xRectangle)) <= dpy->bufmax)
&& (((char *)dpy->bufptr - (char *)req) < size) ) { && (((char *)dpy->bufptr - (char *)req) < size) ) {
req->length += SIZEOF(xRectangle) >> 2; req->length += SIZEOF(xRectangle) >> 2;
#ifndef MUSTCOPY
rect = (xRectangle *) dpy->bufptr; rect = (xRectangle *) dpy->bufptr;
dpy->bufptr += SIZEOF(xRectangle); dpy->bufptr += SIZEOF(xRectangle);
#endif /* not MUSTCOPY */
} }
else { else {
GetReqExtra(PolyFillRectangle, SIZEOF(xRectangle), req); GetReqExtra(PolyFillRectangle, SIZEOF(xRectangle), req);
req->drawable = d; req->drawable = d;
req->gc = gc->gid; req->gc = gc->gid;
#ifdef MUSTCOPY
dpy->bufptr -= SIZEOF(xRectangle);
#else
rect = (xRectangle *) NEXTPTR(req,xPolyFillRectangleReq); rect = (xRectangle *) NEXTPTR(req,xPolyFillRectangleReq);
#endif /* MUSTCOPY */
} }
rect->x = x; rect->x = x;
rect->y = y; rect->y = y;
rect->width = width; rect->width = width;
rect->height = height; rect->height = height;
#ifdef MUSTCOPY
Data (dpy, (char *) rect, len);
#endif /* MUSTCOPY */
} }
UnlockDisplay(dpy); UnlockDisplay(dpy);
SyncHandle(); SyncHandle();
......
...@@ -35,7 +35,7 @@ authorization from the X Consortium and the XFree86 Project. ...@@ -35,7 +35,7 @@ authorization from the X Consortium and the XFree86 Project.
#endif #endif
#include "Xlibint.h" #include "Xlibint.h"
#if defined(XF86BIGFONT) && !defined(MUSTCOPY) #if defined(XF86BIGFONT)
#define USE_XF86BIGFONT #define USE_XF86BIGFONT
#endif #endif
#ifdef USE_XF86BIGFONT #ifdef USE_XF86BIGFONT
...@@ -231,31 +231,9 @@ _XQueryFont (dpy, fid, seq) ...@@ -231,31 +231,9 @@ _XQueryFont (dpy, fid, seq)
fs->ascent = cvtINT16toInt (reply.fontAscent); fs->ascent = cvtINT16toInt (reply.fontAscent);
fs->descent = cvtINT16toInt (reply.fontDescent); 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 */ /* XXX the next two statements won't work if short isn't 16 bits */
fs->min_bounds = * (XCharStruct *) &reply.minBounds; fs->min_bounds = * (XCharStruct *) &reply.minBounds;
fs->max_bounds = * (XCharStruct *) &reply.maxBounds; fs->max_bounds = * (XCharStruct *) &reply.maxBounds;
#endif /* MUSTCOPY */
fs->n_properties = reply.nFontProps; fs->n_properties = reply.nFontProps;
/* /*
...@@ -279,7 +257,6 @@ _XQueryFont (dpy, fid, seq) ...@@ -279,7 +257,6 @@ _XQueryFont (dpy, fid, seq)
* If no characters in font, then it is a bad font, but * If no characters in font, then it is a bad font, but
* shouldn't try to read nothing. * shouldn't try to read nothing.
*/ */
/* have to unpack charinfos on some machines (CRAY) */
fs->per_char = NULL; fs->per_char = NULL;
if (reply.nCharInfos > 0){ if (reply.nCharInfos > 0){
nbytes = reply.nCharInfos * sizeof(XCharStruct); nbytes = reply.nCharInfos * sizeof(XCharStruct);
...@@ -290,28 +267,8 @@ _XQueryFont (dpy, fid, seq) ...@@ -290,28 +267,8 @@ _XQueryFont (dpy, fid, seq)
(reply.nCharInfos * SIZEOF(xCharInfo))); (reply.nCharInfos * SIZEOF(xCharInfo)));
return (XFontStruct *)NULL; 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); nbytes = reply.nCharInfos * SIZEOF(xCharInfo);
_XRead16 (dpy, (char *)fs->per_char, nbytes); _XRead16 (dpy, (char *)fs->per_char, nbytes);
#endif
} }
/* call out to any extensions interested */ /* call out to any extensions interested */
......
...@@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group. ...@@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group.
#endif #endif
#include "Xlibint.h" #include "Xlibint.h"
#if defined(XF86BIGFONT) && !defined(MUSTCOPY) #if defined(XF86BIGFONT)
#define USE_XF86BIGFONT #define USE_XF86BIGFONT
#endif #endif
#ifdef USE_XF86BIGFONT #ifdef USE_XF86BIGFONT
...@@ -135,31 +135,9 @@ XFontStruct **info) /* RETURN */ ...@@ -135,31 +135,9 @@ XFontStruct **info) /* RETURN */
fs->ascent = cvtINT16toInt (reply.fontAscent); fs->ascent = cvtINT16toInt (reply.fontAscent);
fs->descent = cvtINT16toInt (reply.fontDescent); 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 */ /* XXX the next two statements won't work if short isn't 16 bits */
fs->min_bounds = * (XCharStruct *) &reply.minBounds; fs->min_bounds = * (XCharStruct *) &reply.minBounds;
fs->max_bounds = * (XCharStruct *) &reply.maxBounds; fs->max_bounds = * (XCharStruct *) &reply.maxBounds;
#endif /* MUSTCOPY */
fs->n_properties = reply.nFontProps; fs->n_properties = reply.nFontProps;
if (fs->n_properties > 0) { if (fs->n_properties > 0) {
......
...@@ -533,9 +533,7 @@ static unsigned long _XGetPixel (ximage, x, y) ...@@ -533,9 +533,7 @@ static unsigned long _XGetPixel (ximage, x, y)
return (pixel & low_bits_table[ximage->depth]); return (pixel & low_bits_table[ximage->depth]);
} }
#ifndef WORD64
static CARD32 const byteorderpixel = MSBFirst << 24; static CARD32 const byteorderpixel = MSBFirst << 24;
#endif
static unsigned long _XGetPixel32 (ximage, x, y) static unsigned long _XGetPixel32 (ximage, x, y)
register XImage *ximage; register XImage *ximage;
...@@ -548,11 +546,9 @@ static unsigned long _XGetPixel32 (ximage, x, y) ...@@ -548,11 +546,9 @@ static unsigned long _XGetPixel32 (ximage, x, y)
if ((ximage->format == ZPixmap) && (ximage->bits_per_pixel == 32)) { if ((ximage->format == ZPixmap) && (ximage->bits_per_pixel == 32)) {
addr = &((unsigned char *)ximage->data) addr = &((unsigned char *)ximage->data)
[y * ximage->bytes_per_line + (x << 2)]; [y * ximage->bytes_per_line + (x << 2)];
#ifndef WORD64
if (*((const char *)&byteorderpixel) == ximage->byte_order) if (*((const char *)&byteorderpixel) == ximage->byte_order)
pixel = *((CARD32 *)addr); pixel = *((CARD32 *)addr);
else else
#endif
if (ximage->byte_order == MSBFirst) if (ximage->byte_order == MSBFirst)
pixel = ((unsigned long)addr[0] << 24 | pixel = ((unsigned long)addr[0] << 24 |
(unsigned long)addr[1] << 16 | (unsigned long)addr[1] << 16 |
...@@ -739,11 +735,9 @@ static int _XPutPixel32 (ximage, x, y, pixel) ...@@ -739,11 +735,9 @@ static int _XPutPixel32 (ximage, x, y, pixel)
if ((ximage->format == ZPixmap) && (ximage->bits_per_pixel == 32)) { if ((ximage->format == ZPixmap) && (ximage->bits_per_pixel == 32)) {
addr = &((unsigned char *)ximage->data) addr = &((unsigned char *)ximage->data)
[y * ximage->bytes_per_line + (x << 2)]; [y * ximage->bytes_per_line + (x << 2)];
#ifndef WORD64
if (*((const char *)&byteorderpixel) == ximage->byte_order) if (*((const char *)&byteorderpixel) == ximage->byte_order)
*((CARD32 *)addr) = pixel; *((CARD32 *)addr) = pixel;
else else
#endif
if (ximage->byte_order == MSBFirst) { if (ximage->byte_order == MSBFirst) {
addr[0] = pixel >> 24; addr[0] = pixel >> 24;
addr[1] = pixel >> 16; addr[1] = pixel >> 16;
...@@ -1002,7 +996,6 @@ _XAddPixel (ximage, value) ...@@ -1002,7 +996,6 @@ _XAddPixel (ximage, value)
x = ximage->bytes_per_line * ximage->height; x = ximage->bytes_per_line * ximage->height;
while (--x >= 0) while (--x >= 0)
*dp++ += value; *dp++ += value;
#ifndef WORD64
} else if ((ximage->format == ZPixmap) && } else if ((ximage->format == ZPixmap) &&
(ximage->bits_per_pixel == 16) && (ximage->bits_per_pixel == 16) &&
(*((const char *)&byteorderpixel) == ximage->byte_order)) { (*((const char *)&byteorderpixel) == ximage->byte_order)) {
...@@ -1017,7 +1010,6 @@ _XAddPixel (ximage, value) ...@@ -1017,7 +1010,6 @@ _XAddPixel (ximage, value)
x = (ximage->bytes_per_line >> 2) * ximage->height; x = (ximage->bytes_per_line >> 2) * ximage->height;
while (--x >= 0) while (--x >= 0)
*dp++ += value; *dp++ += value;
#endif
} else { } else {
for (y = ximage->height; --y >= 0; ) { for (y = ximage->height; --y >= 0; ) {
for (x = ximage->width; --x >= 0; ) { for (x = ximage->width; --x >= 0; ) {
......
...@@ -95,15 +95,8 @@ XHostAddress *XListHosts ( ...@@ -95,15 +95,8 @@ XHostAddress *XListHosts (
_XRead (dpy, (char *) buf, nbytes); _XRead (dpy, (char *) buf, nbytes);
for (i = 0; i < reply.nHosts; i++) { 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->family = ((xHostEntry *) bp)->family;
op->length =((xHostEntry *) bp)->length; op->length =((xHostEntry *) bp)->length;
#endif
if (op->family == FamilyServerInterpreted) { if (op->family == FamilyServerInterpreted) {
char *tp = (char *) (bp + SIZEOF(xHostEntry)); char *tp = (char *) (bp + SIZEOF(xHostEntry));
char *vp = memchr(tp, 0, op->length); char *vp = memchr(tp, 0, op->length);
......
...@@ -126,12 +126,7 @@ int XImageByteOrder(dpy) Display *dpy; { return (ImageByteOrder(dpy)); } ...@@ -126,12 +126,7 @@ int XImageByteOrder(dpy) Display *dpy; { return (ImageByteOrder(dpy)); }
unsigned long XNextRequest(dpy) unsigned long XNextRequest(dpy)
Display *dpy; Display *dpy;
{ {
#ifdef WORD64
WORD64ALIGN
return dpy->request + 1;
#else
return (NextRequest(dpy)); return (NextRequest(dpy));
#endif
} }
unsigned long XLastKnownRequestProcessed(dpy) unsigned long XLastKnownRequestProcessed(dpy)
......
...@@ -45,20 +45,11 @@ XMoveWindow (dpy, w, x, y) ...@@ -45,20 +45,11 @@ XMoveWindow (dpy, w, x, y)
req->window = w; req->window = w;
req->mask = CWX | CWY; 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); CARD32 *valuePtr = (CARD32 *) NEXTPTR(req,xConfigureWindowReq);
*valuePtr++ = x; *valuePtr++ = x;
*valuePtr = y; *valuePtr = y;
} }
#endif /* MUSTCOPY */
UnlockDisplay(dpy); UnlockDisplay(dpy);
SyncHandle(); SyncHandle();
return 1; return 1;
......
...@@ -169,18 +169,7 @@ XDrawText16(dpy, d, gc, x, y, items, nitems) ...@@ -169,18 +169,7 @@ XDrawText16(dpy, d, gc, x, y, items, nitems)
} }
elt->len = 254; 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); memcpy ((char *) (elt + 1), (char *)CharacterOffset, 254 * 2);
#endif
PartialNChars = PartialNChars - 254; PartialNChars = PartialNChars - 254;
CharacterOffset += 254; CharacterOffset += 254;
...@@ -214,21 +203,8 @@ XDrawText16(dpy, d, gc, x, y, items, nitems) ...@@ -214,21 +203,8 @@ XDrawText16(dpy, d, gc, x, y, items, nitems)
} }
elt->len = PartialNChars; 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, memcpy ((char *) (elt + 1), (char *)CharacterOffset,
PartialNChars * PartialNChars * 2);
2);
#endif
} }
} }
item++; item++;
......
...@@ -133,10 +133,8 @@ static char *permalloc(unsigned int length) ...@@ -133,10 +133,8 @@ static char *permalloc(unsigned int length)
return(ret); return(ret);
} }
#ifndef WORD64
typedef struct {char a; double b;} TestType1; typedef struct {char a; double b;} TestType1;
typedef struct {char a; unsigned long b;} TestType2; typedef struct {char a; unsigned long b;} TestType2;
#endif
#ifdef XTHREADS #ifdef XTHREADS
static char *_Xpermalloc(unsigned int length); static char *_Xpermalloc(unsigned int length);
...@@ -159,7 +157,6 @@ char *Xpermalloc(unsigned int length) ...@@ -159,7 +157,6 @@ char *Xpermalloc(unsigned int length)
int i; int i;
if (neverFreeTableSize && length < NEVERFREETABLESIZE) { if (neverFreeTableSize && length < NEVERFREETABLESIZE) {
#ifndef WORD64
if ((sizeof(TestType1) != if ((sizeof(TestType1) !=
(sizeof(TestType2) - sizeof(unsigned long) + sizeof(double))) && (sizeof(TestType2) - sizeof(unsigned long) + sizeof(double))) &&
!(length & (DALIGN-1)) && !(length & (DALIGN-1)) &&
...@@ -167,7 +164,6 @@ char *Xpermalloc(unsigned int length) ...@@ -167,7 +164,6 @@ char *Xpermalloc(unsigned int length)
neverFreeTableSize -= DALIGN - i; neverFreeTableSize -= DALIGN - i;
neverFreeTable += DALIGN - i; neverFreeTable += DALIGN - i;
} else } else
#endif
if ((i = (NEVERFREETABLESIZE - neverFreeTableSize) & (WALIGN-1))) { if ((i = (NEVERFREETABLESIZE - neverFreeTableSize) & (WALIGN-1))) {
neverFreeTableSize -= WALIGN - i; neverFreeTableSize -= WALIGN - i;
neverFreeTable += WALIGN - i; neverFreeTable += WALIGN - i;
......
...@@ -38,9 +38,6 @@ XRestackWindows (dpy, windows, n) ...@@ -38,9 +38,6 @@ XRestackWindows (dpy, windows, n)
int n; int n;
{ {
int i = 0; int i = 0;
#ifdef MUSTCOPY
unsigned long val = Below; /* needed for macro below */
#endif
LockDisplay(dpy); LockDisplay(dpy);
while (windows++, ++i < n) { while (windows++, ++i < n) {
...@@ -49,18 +46,12 @@ XRestackWindows (dpy, windows, n) ...@@ -49,18 +46,12 @@ XRestackWindows (dpy, windows, n)
GetReqExtra (ConfigureWindow, 8, req); GetReqExtra (ConfigureWindow, 8, req);
req->window = *windows; req->window = *windows;
req->mask = CWSibling | CWStackMode; 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 *) register CARD32 *values = (CARD32 *)
NEXTPTR(req,xConfigureWindowReq); NEXTPTR(req,xConfigureWindowReq);
*values++ = *(windows-1); *values++ = *(windows-1);
*values = Below; *values = Below;
} }
#endif /* MUSTCOPY */
} }
UnlockDisplay(dpy); UnlockDisplay(dpy);
SyncHandle(); SyncHandle();
......
...@@ -65,12 +65,7 @@ XSendEvent(dpy, w, propagate, event_mask, event) ...@@ -65,12 +65,7 @@ XSendEvent(dpy, w, propagate, event_mask, event)
req->destination = w; req->destination = w;
req->propagate = propagate; req->propagate = propagate;
req->eventMask = event_mask; req->eventMask = event_mask;
#ifdef WORD64
/* avoid quad-alignment problems */
memcpy ((char *) req->eventdata, (char *) &ev, SIZEOF(xEvent));
#else
req->event = ev; req->event = ev;
#endif /* WORD64 */
} }
UnlockDisplay(dpy); UnlockDisplay(dpy);
......
...@@ -39,21 +39,13 @@ XColor *def; ...@@ -39,21 +39,13 @@ XColor *def;
{ {
xColorItem *citem; xColorItem *citem;
register xStoreColorsReq *req; register xStoreColorsReq *req;
#ifdef MUSTCOPY
xColorItem citemdata;
long len = SIZEOF(xColorItem);
citem = &citemdata;
#endif /* MUSTCOPY */
LockDisplay(dpy); LockDisplay(dpy);
GetReqExtra(StoreColors, SIZEOF(xColorItem), req); /* assume size is 4*n */ GetReqExtra(StoreColors, SIZEOF(xColorItem), req); /* assume size is 4*n */
req->cmap = cmap; req->cmap = cmap;
#ifndef MUSTCOPY
citem = (xColorItem *) NEXTPTR(req,xStoreColorsReq); citem = (xColorItem *) NEXTPTR(req,xStoreColorsReq);
#endif /* not MUSTCOPY */
citem->pixel = def->pixel; citem->pixel = def->pixel;
citem->red = def->red; citem->red = def->red;
...@@ -61,11 +53,6 @@ XColor *def; ...@@ -61,11 +53,6 @@ XColor *def;
citem->blue = def->blue; citem->blue = def->blue;
citem->flags = def->flags; /* do_red, do_green, do_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); UnlockDisplay(dpy);
SyncHandle(); SyncHandle();
return 1; return 1;
......
...@@ -84,18 +84,7 @@ XDrawString16( ...@@ -84,18 +84,7 @@ XDrawString16(
BufAlloc (xTextElt *, elt, nbytes); BufAlloc (xTextElt *, elt, nbytes);
elt->delta = 0; elt->delta = 0;
elt->len = 254; 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); memcpy (((char *) elt) + 2, (char *)CharacterOffset, 254 * 2);
#endif
PartialNChars = PartialNChars - 254; PartialNChars = PartialNChars - 254;
CharacterOffset += 254; CharacterOffset += 254;
} }
...@@ -106,19 +95,7 @@ XDrawString16( ...@@ -106,19 +95,7 @@ XDrawString16(
BufAlloc (xTextElt *, elt, nbytes); BufAlloc (xTextElt *, elt, nbytes);
elt->delta = 0; elt->delta = 0;
elt->len = PartialNChars; 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); memcpy(((char *)elt) + 2, (char *)CharacterOffset, PartialNChars * 2);
#endif
} }
} }
......
...@@ -498,38 +498,10 @@ XkbSetNames( Display * dpy, ...@@ -498,38 +498,10 @@ XkbSetNames( Display * dpy,
if (which&XkbGroupNamesMask) if (which&XkbGroupNamesMask)
_XkbCopyAtoms(dpy,names->groups,groups,XkbNumKbdGroups); _XkbCopyAtoms(dpy,names->groups,groups,XkbNumKbdGroups);
if (which&XkbKeyNamesMask) { 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); Data(dpy,(char *)&names->keys[firstKey],nKeys*XkbKeyNameLength);
#endif
} }
if (which&XkbKeyAliasesMask) { 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); Data(dpy,(char *)names->key_aliases,nKA*XkbKeyNameLength*2);
#endif
} }
if (which&XkbRGNamesMask) { if (which&XkbRGNamesMask) {
Data32(dpy,(long *)names->radio_groups,nRG*4); Data32(dpy,(long *)names->radio_groups,nRG*4);
...@@ -754,38 +726,10 @@ XkbChangeNames(Display *dpy,XkbDescPtr xkb,XkbNameChangesPtr changes) ...@@ -754,38 +726,10 @@ XkbChangeNames(Display *dpy,XkbDescPtr xkb,XkbNameChangesPtr changes)
if (which&XkbGroupNamesMask) if (which&XkbGroupNamesMask)
_XkbCopyAtoms(dpy,names->groups,groups,XkbNumKbdGroups); _XkbCopyAtoms(dpy,names->groups,groups,XkbNumKbdGroups);
if (which&XkbKeyNamesMask) { 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); Data(dpy,(char *)&names->keys[firstKey],nKeys*XkbKeyNameLength);
#endif
} }
if (which&XkbKeyAliasesMask) { 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); Data(dpy,(char *)names->key_aliases,nKA*XkbKeyNameLength*2);
#endif
} }
if (which&XkbRGNamesMask) { if (which&XkbRGNamesMask) {
Data32(dpy,(long *)names->radio_groups,nRG*4); Data32(dpy,(long *)names->radio_groups,nRG*4);
......
...@@ -121,29 +121,8 @@ _XkbReadCopyData32(int *wire,long *to,int num_words) ...@@ -121,29 +121,8 @@ _XkbReadCopyData32(int *wire,long *to,int num_words)
return 1; return 1;
} }
#endif #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 int
_XkbReadBufferCopy32(XkbReadBufferPtr from,long *to,int num_words) _XkbReadBufferCopy32(XkbReadBufferPtr from,long *to,int num_words)
{ {
...@@ -167,10 +146,6 @@ _XkbWriteCopyData32 (register unsigned long *from,CARD32 *to,int len) ...@@ -167,10 +146,6 @@ _XkbWriteCopyData32 (register unsigned long *from,CARD32 *to,int len)
} }
#endif /* LONG64 */ #endif /* LONG64 */
#ifdef WORD64
_XkbWriteCopyData32 Not Implemented Yet for sizeof(int)==8
#endif
char * char *
_XkbPeekAtReadBuffer(XkbReadBufferPtr from,int size) _XkbPeekAtReadBuffer(XkbReadBufferPtr from,int size)
{ {
......
...@@ -215,7 +215,7 @@ extern int _XkbCopyFromReadBuffer( ...@@ -215,7 +215,7 @@ extern int _XkbCopyFromReadBuffer(
); );
#if defined(WORD64) || defined(LONG64) #if defined(LONG64)
extern int _XkbReadCopyData32( extern int _XkbReadCopyData32(
int * /* from */, int * /* from */,
long * /* to */, long * /* to */,
......
...@@ -144,11 +144,7 @@ typedef char *XPointer; ...@@ -144,11 +144,7 @@ typedef char *XPointer;
#define BitmapBitOrder(dpy) (((_XPrivDisplay)dpy)->bitmap_bit_order) #define BitmapBitOrder(dpy) (((_XPrivDisplay)dpy)->bitmap_bit_order)
#define BitmapPad(dpy) (((_XPrivDisplay)dpy)->bitmap_pad) #define BitmapPad(dpy) (((_XPrivDisplay)dpy)->bitmap_pad)
#define ImageByteOrder(dpy) (((_XPrivDisplay)dpy)->byte_order) #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) #define NextRequest(dpy) (((_XPrivDisplay)dpy)->request + 1)
#endif
#define LastKnownRequestProcessed(dpy) (((_XPrivDisplay)dpy)->last_request_read) #define LastKnownRequestProcessed(dpy) (((_XPrivDisplay)dpy)->last_request_read)
/* macros for screen oriented applications (toolkit) */ /* macros for screen oriented applications (toolkit) */
......
...@@ -119,11 +119,6 @@ _XGetAsyncReply(dpy, replbuf, rep, buf, len, extra, discard) ...@@ -119,11 +119,6 @@ _XGetAsyncReply(dpy, replbuf, rep, buf, len, extra, discard)
_XRead(dpy, replbuf + len, size - len); _XRead(dpy, replbuf + len, size - len);
buf = replbuf; buf = replbuf;
len = size; len = size;
#ifdef MUSTCOPY
} else {
memcpy(replbuf, buf, size);
buf = replbuf;
#endif
} }
if (discard && rep->generic.length > extra && if (discard && rep->generic.length > extra &&
......
...@@ -202,20 +202,6 @@ extern int _X11TransSocketCongestionChange(XtransConnInfo, int *); ...@@ -202,20 +202,6 @@ extern int _X11TransSocketCongestionChange(XtransConnInfo, int *);
#define MAX_PATH _POSIX_PATH_MAX #define MAX_PATH _POSIX_PATH_MAX
#endif #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) \ #define STARTITERATE(tpvar,type,start,endcond) \
for (tpvar = (type *) (start); endcond; ) for (tpvar = (type *) (start); endcond; )
#define ITERPTR(tpvar) (char *)tpvar #define ITERPTR(tpvar) (char *)tpvar
...@@ -223,8 +209,6 @@ extern int _X11TransSocketCongestionChange(XtransConnInfo, int *); ...@@ -223,8 +209,6 @@ extern int _X11TransSocketCongestionChange(XtransConnInfo, int *);
#define INCITERPTR(tpvar,type) tpvar++ #define INCITERPTR(tpvar,type) tpvar++
#define ENDITERATE #define ENDITERATE
#endif /* MUSTCOPY */
typedef union { typedef union {
xReply rep; xReply rep;
char buf[BUFSIZE]; char buf[BUFSIZE];
...@@ -1611,125 +1595,6 @@ void _XRead32( ...@@ -1611,125 +1595,6 @@ void _XRead32(
} }
#endif /* LONG64 */ #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 * _XReadPad - Read bytes from the socket taking into account incomplete
...@@ -3795,123 +3660,6 @@ _XData32( ...@@ -3795,123 +3660,6 @@ _XData32(
} }
#endif /* LONG64 */ #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. /* 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. * Otherwise, Xau will not be able to find your cookies in the Xauthority file.
......
...@@ -215,13 +215,6 @@ struct _XDisplay ...@@ -215,13 +215,6 @@ struct _XDisplay
#define XAllocIDs(dpy,ids,n) (*(dpy)->idlist_alloc)(dpy,ids,n) #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_ #ifndef _XEVENT_
/* /*
* _QEvent datatype for use in input queueing. * _QEvent datatype for use in input queueing.
...@@ -426,26 +419,8 @@ extern LockInfoPtr _Xglobal_lock; ...@@ -426,26 +419,8 @@ extern LockInfoPtr _Xglobal_lock;
* X Protocol packetizing macros. * X Protocol packetizing macros.
*/ */
/* Need to start requests on 64 bit word boundaries /* Leftover from CRAY support - was defined empty on all non-Cray systems */
* 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 #define WORD64ALIGN
#endif /* WORD64 */
/* /*
* GetReq - Get the next available X request packet in the buffer and * GetReq - Get the next available X request packet in the buffer and
...@@ -458,7 +433,6 @@ extern LockInfoPtr _Xglobal_lock; ...@@ -458,7 +433,6 @@ extern LockInfoPtr _Xglobal_lock;
#if !defined(UNIXCPP) || defined(ANSICPP) #if !defined(UNIXCPP) || defined(ANSICPP)
#define GetReq(name, req) \ #define GetReq(name, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\ if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\
_XFlush(dpy);\ _XFlush(dpy);\
req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\ req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
...@@ -469,7 +443,6 @@ extern LockInfoPtr _Xglobal_lock; ...@@ -469,7 +443,6 @@ extern LockInfoPtr _Xglobal_lock;
#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */ #else /* non-ANSI C uses empty comment instead of "##" for token concatenation */
#define GetReq(name, req) \ #define GetReq(name, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\ if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\
_XFlush(dpy);\ _XFlush(dpy);\
req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\ req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
...@@ -484,7 +457,6 @@ extern LockInfoPtr _Xglobal_lock; ...@@ -484,7 +457,6 @@ extern LockInfoPtr _Xglobal_lock;
#if !defined(UNIXCPP) || defined(ANSICPP) #if !defined(UNIXCPP) || defined(ANSICPP)
#define GetReqExtra(name, n, req) \ #define GetReqExtra(name, n, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(x##name##Req) + n) > dpy->bufmax)\ if ((dpy->bufptr + SIZEOF(x##name##Req) + n) > dpy->bufmax)\
_XFlush(dpy);\ _XFlush(dpy);\
req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\ req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
...@@ -494,7 +466,6 @@ extern LockInfoPtr _Xglobal_lock; ...@@ -494,7 +466,6 @@ extern LockInfoPtr _Xglobal_lock;
dpy->request++ dpy->request++
#else #else
#define GetReqExtra(name, n, req) \ #define GetReqExtra(name, n, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(x/**/name/**/Req) + n) > dpy->bufmax)\ if ((dpy->bufptr + SIZEOF(x/**/name/**/Req) + n) > dpy->bufmax)\
_XFlush(dpy);\ _XFlush(dpy);\
req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\ req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
...@@ -513,7 +484,6 @@ extern LockInfoPtr _Xglobal_lock; ...@@ -513,7 +484,6 @@ extern LockInfoPtr _Xglobal_lock;
#if !defined(UNIXCPP) || defined(ANSICPP) #if !defined(UNIXCPP) || defined(ANSICPP)
#define GetResReq(name, rid, req) \ #define GetResReq(name, rid, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\ if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\
_XFlush(dpy);\ _XFlush(dpy);\
req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\ req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\
...@@ -524,7 +494,6 @@ extern LockInfoPtr _Xglobal_lock; ...@@ -524,7 +494,6 @@ extern LockInfoPtr _Xglobal_lock;
dpy->request++ dpy->request++
#else #else
#define GetResReq(name, rid, req) \ #define GetResReq(name, rid, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\ if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\
_XFlush(dpy);\ _XFlush(dpy);\
req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\ req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\
...@@ -541,7 +510,6 @@ extern LockInfoPtr _Xglobal_lock; ...@@ -541,7 +510,6 @@ extern LockInfoPtr _Xglobal_lock;
*/ */
#if !defined(UNIXCPP) || defined(ANSICPP) #if !defined(UNIXCPP) || defined(ANSICPP)
#define GetEmptyReq(name, req) \ #define GetEmptyReq(name, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\ if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\
_XFlush(dpy);\ _XFlush(dpy);\
req = (xReq *) (dpy->last_req = dpy->bufptr);\ req = (xReq *) (dpy->last_req = dpy->bufptr);\
...@@ -551,7 +519,6 @@ extern LockInfoPtr _Xglobal_lock; ...@@ -551,7 +519,6 @@ extern LockInfoPtr _Xglobal_lock;
dpy->request++ dpy->request++
#else #else
#define GetEmptyReq(name, req) \ #define GetEmptyReq(name, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\ if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\
_XFlush(dpy);\ _XFlush(dpy);\
req = (xReq *) (dpy->last_req = dpy->bufptr);\ req = (xReq *) (dpy->last_req = dpy->bufptr);\
...@@ -561,18 +528,6 @@ extern LockInfoPtr _Xglobal_lock; ...@@ -561,18 +528,6 @@ extern LockInfoPtr _Xglobal_lock;
dpy->request++ dpy->request++
#endif #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 #ifdef LONG64
#define MakeBigReq(req,n) \ #define MakeBigReq(req,n) \
{ \ { \
...@@ -596,7 +551,6 @@ extern LockInfoPtr _Xglobal_lock; ...@@ -596,7 +551,6 @@ extern LockInfoPtr _Xglobal_lock;
Data32(dpy, &_BRdat, 4); \ Data32(dpy, &_BRdat, 4); \
} }
#endif #endif
#endif
#define SetReqLen(req,n,badlen) \ #define SetReqLen(req,n,badlen) \
if ((req->length + n) > (unsigned)65535) { \ if ((req->length + n) > (unsigned)65535) { \
...@@ -655,10 +609,6 @@ extern void _XFlushGCCache(Display *dpy, GC gc); ...@@ -655,10 +609,6 @@ extern void _XFlushGCCache(Display *dpy, GC gc);
(void)ptr; \ (void)ptr; \
dpy->bufptr += (n); 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 Data16(dpy, data, len) Data((dpy), (char *)(data), (len))
#define _XRead16Pad(dpy, data, len) _XReadPad((dpy), (char *)(data), (len)) #define _XRead16Pad(dpy, data, len) _XReadPad((dpy), (char *)(data), (len))
#define _XRead16(dpy, data, len) _XRead((dpy), (char *)(data), (len)) #define _XRead16(dpy, data, len) _XRead((dpy), (char *)(data), (len))
...@@ -678,7 +628,6 @@ extern void _XRead32( ...@@ -678,7 +628,6 @@ extern void _XRead32(
#define Data32(dpy, data, len) Data((dpy), (char *)(data), (len)) #define Data32(dpy, data, len) Data((dpy), (char *)(data), (len))
#define _XRead32(dpy, data, len) _XRead((dpy), (char *)(data), (len)) #define _XRead32(dpy, data, len) _XRead((dpy), (char *)(data), (len))
#endif #endif
#endif /* not WORD64 */
#define PackData16(dpy,data,len) Data16 (dpy, data, len) #define PackData16(dpy,data,len) Data16 (dpy, data, len)
#define PackData32(dpy,data,len) Data32 (dpy, data, len) #define PackData32(dpy,data,len) Data32 (dpy, data, len)
...@@ -747,20 +696,10 @@ extern void _XRead32( ...@@ -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 */ /* srcvar must be a variable for large architecture version */
#define OneDataCard32(dpy,dstaddr,srcvar) \ #define OneDataCard32(dpy,dstaddr,srcvar) \
{ *(CARD32 *)(dstaddr) = (srcvar); } { *(CARD32 *)(dstaddr) = (srcvar); }
#endif /* MUSTCOPY */
typedef struct _XInternalAsync { typedef struct _XInternalAsync {
struct _XInternalAsync *next; struct _XInternalAsync *next;
/* /*
......
...@@ -82,12 +82,8 @@ _XcmsModuloF( ...@@ -82,12 +82,8 @@ _XcmsModuloF(
#define XCMS_FABS(x) ((x) < 0.0 ? -(x) : (x)) #define XCMS_FABS(x) ((x) < 0.0 ? -(x) : (x))
/* XCMS_DMAXPOWTWO - largest power of two exactly representable as a double */ /* 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) * \ #define XCMS_DMAXPOWTWO ((double)(XCMS_LONG_MAX) * \
(1L << ((XCMS_NBITS(double)-XCMS_DEXPLEN) - XCMS_NBITS(int) + 1))) (1L << ((XCMS_NBITS(double)-XCMS_DEXPLEN) - XCMS_NBITS(int) + 1)))
#endif
/* /*
* LOCAL VARIABLES * LOCAL VARIABLES
......
...@@ -264,47 +264,6 @@ _XomGetFontSetFromCharSet( ...@@ -264,47 +264,6 @@ _XomGetFontSetFromCharSet(
return (FontSet) NULL; 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 static void
shift_to_gl( shift_to_gl(
register char *text, register char *text,
...@@ -360,10 +319,6 @@ _XomConvert( ...@@ -360,10 +319,6 @@ _XomConvert(
XlcCharSet charset; XlcCharSet charset;
int length, cs_left, ret; int length, cs_left, ret;
FontSet font_set; FontSet font_set;
#ifdef MUSTCOPY
XChar2b *xchar2b;
char *buf, buf_local[BUFSIZ];
#endif
cs = *to; cs = *to;
cs_left = *to_left; cs_left = *to_left;
...@@ -382,32 +337,6 @@ _XomConvert( ...@@ -382,32 +337,6 @@ _XomConvert(
length = *to_left - cs_left; 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 != charset->side) {
if (font_set->side == XlcGL) if (font_set->side == XlcGL)
......
...@@ -44,12 +44,6 @@ XRenderFillRectangle (Display *dpy, ...@@ -44,12 +44,6 @@ XRenderFillRectangle (Display *dpy,
XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy); XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRectangle *rect; xRectangle *rect;
xRenderFillRectanglesReq *req; xRenderFillRectanglesReq *req;
#ifdef MUSTCOPY
xRectangle rectdata;
long len = SIZEOF(xRectangle);
rect = &rectdata;
#endif /* MUSTCOPY */
RenderSimpleCheckExtension (dpy, info); RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy); LockDisplay(dpy);
...@@ -68,10 +62,8 @@ XRenderFillRectangle (Display *dpy, ...@@ -68,10 +62,8 @@ XRenderFillRectangle (Display *dpy,
(char *)dpy->bufptr - (char *)req < size) (char *)dpy->bufptr - (char *)req < size)
{ {
req->length += SIZEOF(xRectangle) >> 2; req->length += SIZEOF(xRectangle) >> 2;
#ifndef MUSTCOPY
rect = (xRectangle *) dpy->bufptr; rect = (xRectangle *) dpy->bufptr;
dpy->bufptr += SIZEOF(xRectangle); dpy->bufptr += SIZEOF(xRectangle);
#endif /* not MUSTCOPY */
} }
else else
{ {
...@@ -86,20 +78,13 @@ XRenderFillRectangle (Display *dpy, ...@@ -86,20 +78,13 @@ XRenderFillRectangle (Display *dpy,
req->color.blue = color->blue; req->color.blue = color->blue;
req->color.alpha = color->alpha; req->color.alpha = color->alpha;
#ifdef MUSTCOPY
dpy->bufptr -= SIZEOF(xRectangle);
#else
rect = (xRectangle *) NEXTPTR(req,xRenderFillRectanglesReq); rect = (xRectangle *) NEXTPTR(req,xRenderFillRectanglesReq);
#endif /* MUSTCOPY */
} }
rect->x = x; rect->x = x;
rect->y = y; rect->y = y;
rect->width = width; rect->width = width;
rect->height = height; rect->height = height;
#ifdef MUSTCOPY
Data (dpy, (char *) rect, len);
#endif /* MUSTCOPY */
UnlockDisplay(dpy); UnlockDisplay(dpy);
SyncHandle(); SyncHandle();
} }
......
...@@ -101,14 +101,9 @@ XRenderFindDisplay (Display *dpy); ...@@ -101,14 +101,9 @@ XRenderFindDisplay (Display *dpy);
/* /*
* Xlib uses long for 32-bit values. Xrender uses int. This * Xlib uses long for 32-bit values. Xrender uses int. This
* matters on alpha. Note that this macro assumes that int is 32 bits * matters on alpha. Note that this macro assumes that int is 32 bits.
* except on WORD64 machines where it is 64 bits.
*/ */
#ifdef WORD64
#define DataInt32(dpy,d,len) Data32(dpy,(long *) (d),len)
#else
#define DataInt32(dpy,d,len) Data(dpy,(char *) (d),len) #define DataInt32(dpy,d,len) Data(dpy,(char *) (d),len)
#endif
#endif /* _XRENDERINT_H_ */ #endif /* _XRENDERINT_H_ */
...@@ -672,8 +672,6 @@ XRecordFreeData(data) ...@@ -672,8 +672,6 @@ XRecordFreeData(data)
/* the EXTRACT macros are adapted from ICElibint.h */ /* the EXTRACT macros are adapted from ICElibint.h */
#ifndef WORD64
#define EXTRACT_CARD16(swap, src, dst) \ #define EXTRACT_CARD16(swap, src, dst) \
{ \ { \
(dst) = *((CARD16 *) (src)); \ (dst) = *((CARD16 *) (src)); \
...@@ -688,32 +686,6 @@ XRecordFreeData(data) ...@@ -688,32 +686,6 @@ XRecordFreeData(data)
(dst) = lswapl (dst); \ (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 swapping macros from xfs/include/misc.h */
/* byte swap a long literal */ /* byte swap a long literal */
......
...@@ -421,7 +421,6 @@ XF86VidModeGetAllModeLines(dpy, screen, modecount, modelinesPtr) ...@@ -421,7 +421,6 @@ XF86VidModeGetAllModeLines(dpy, screen, modecount, modelinesPtr)
*/ */
#if !defined(UNIXCPP) || defined(ANSICPP) #if !defined(UNIXCPP) || defined(ANSICPP)
#define GetOldReq(name, oldname, req) \ #define GetOldReq(name, oldname, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(x##oldname##Req)) > dpy->bufmax)\ if ((dpy->bufptr + SIZEOF(x##oldname##Req)) > dpy->bufmax)\
_XFlush(dpy);\ _XFlush(dpy);\
req = (x##oldname##Req *)(dpy->last_req = dpy->bufptr);\ req = (x##oldname##Req *)(dpy->last_req = dpy->bufptr);\
...@@ -432,7 +431,6 @@ XF86VidModeGetAllModeLines(dpy, screen, modecount, modelinesPtr) ...@@ -432,7 +431,6 @@ XF86VidModeGetAllModeLines(dpy, screen, modecount, modelinesPtr)
#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */ #else /* non-ANSI C uses empty comment instead of "##" for token concatenation */
#define GetOldReq(name, oldname, req) \ #define GetOldReq(name, oldname, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(x/**/oldname/**/Req)) > dpy->bufmax)\ if ((dpy->bufptr + SIZEOF(x/**/oldname/**/Req)) > dpy->bufmax)\
_XFlush(dpy);\ _XFlush(dpy);\
req = (x/**/oldname/**/Req *)(dpy->last_req = dpy->bufptr);\ req = (x/**/oldname/**/Req *)(dpy->last_req = dpy->bufptr);\
......
...@@ -90,11 +90,7 @@ from The Open Group. ...@@ -90,11 +90,7 @@ from The Open Group.
#endif /* FONT_OPEN_MAX */ #endif /* FONT_OPEN_MAX */
#ifdef WORD64
#define NMSKBITS 64
#else
#define NMSKBITS 32 #define NMSKBITS 32
#endif
#define MSKCNT ((FONT_OPEN_MAX + NMSKBITS - 1) / NMSKBITS) #define MSKCNT ((FONT_OPEN_MAX + NMSKBITS - 1) / NMSKBITS)
......
...@@ -125,14 +125,12 @@ FontFileCheckRegisterFpeFunctions (void) ...@@ -125,14 +125,12 @@ FontFileCheckRegisterFpeFunctions (void)
BitmapRegisterFontFileFunctions (); BitmapRegisterFontFileFunctions ();
#ifndef CRAY
#ifdef BUILD_SPEEDO #ifdef BUILD_SPEEDO
SpeedoRegisterFontFileFunctions (); SpeedoRegisterFontFileFunctions ();
#endif #endif
#ifdef BUILD_TYPE1 #ifdef BUILD_TYPE1
Type1RegisterFontFileFunctions(); Type1RegisterFontFileFunctions();
#endif #endif
#endif
#ifdef BUILD_CID #ifdef BUILD_CID
CIDRegisterFontFileFunctions(); CIDRegisterFontFileFunctions();
#endif #endif
......
...@@ -54,13 +54,11 @@ in this Software without prior written authorization from The Open Group. ...@@ -54,13 +54,11 @@ in this Software without prior written authorization from The Open Group.
* with other packages. * with other packages.
*/ */
#ifndef CRAY #ifdef BUILD_SPEEDO
# ifdef BUILD_SPEEDO
# define XFONT_SPEEDO 1 # define XFONT_SPEEDO 1
# endif #endif
# ifdef BUILD_TYPE1 #ifdef BUILD_TYPE1
# define XFONT_TYPE1 1 # define XFONT_TYPE1 1
# endif
#endif #endif
#ifdef BUILD_CID #ifdef BUILD_CID
......
...@@ -1265,44 +1265,6 @@ TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret, ...@@ -1265,44 +1265,6 @@ TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret,
* may be used by it. * 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__) #if (defined(SYSV) && defined(i386) && !defined(__SCO__)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__)
/* /*
......
...@@ -198,7 +198,7 @@ typedef long BytesReadable_t; ...@@ -198,7 +198,7 @@ typedef long BytesReadable_t;
#endif #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 * TRANS(Readv) and TRANS(Writev) use struct iovec, normally found
......
...@@ -384,7 +384,7 @@ typedef struct _Xtransport_table { ...@@ -384,7 +384,7 @@ typedef struct _Xtransport_table {
* systems, so they may be emulated. * 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) #define READV(ciptr, iov, iovcnt) TRANS(ReadV)(ciptr, iov, iovcnt)
...@@ -398,10 +398,10 @@ static int TRANS(ReadV)( ...@@ -398,10 +398,10 @@ static int TRANS(ReadV)(
#define READV(ciptr, iov, iovcnt) readv(ciptr->fd, iov, iovcnt) #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) #define WRITEV(ciptr, iov, iovcnt) TRANS(WriteV)(ciptr, iov, iovcnt)
...@@ -415,7 +415,7 @@ static int TRANS(WriteV)( ...@@ -415,7 +415,7 @@ static int TRANS(WriteV)(
#define WRITEV(ciptr, iov, iovcnt) writev(ciptr->fd, iov, iovcnt) #define WRITEV(ciptr, iov, iovcnt) writev(ciptr->fd, iov, iovcnt)
#endif /* CRAY || WIN32 || __sxg__ */ #endif /* WIN32 || __sxg__ */
static int is_numeric ( static int is_numeric (
......
...@@ -2359,26 +2359,10 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr, char *host, char *port) ...@@ -2359,26 +2359,10 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr, char *host, char *port)
ESET(EPROTOTYPE); ESET(EPROTOTYPE);
return TRANS_CONNECT_FAILED; 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, memcpy ((char *) &sockname.sin_addr, (char *) hostp->h_addr,
sizeof (sockname.sin_addr)); sizeof (sockname.sin_addr));
#endif /* CRAY and OLDTCP */
} else { } 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; sockname.sin_addr.s_addr = tmpaddr;
#endif /* CRAY and OLDTCP */
} }
/* /*
......
...@@ -104,17 +104,8 @@ TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr **addrp) ...@@ -104,17 +104,8 @@ TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr **addrp)
*/ */
struct sockaddr_in saddr; 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); int len = sizeof(saddr.sin_addr.s_addr);
char *cp = (char *) &saddr.sin_addr.s_addr; char *cp = (char *) &saddr.sin_addr.s_addr;
#endif /* CRAY */
memcpy (&saddr, *addrp, sizeof (struct sockaddr_in)); memcpy (&saddr, *addrp, sizeof (struct sockaddr_in));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment