Commit e2e45b2b authored by Ulrich Sibiller's avatar Ulrich Sibiller

Align files with upstream libX11-1.6.0

This commit looks a bit crazy at first glance. It (re-)introduces lots of whitespaces and bad formatting. Explanation: Backporting upstream changes lead to commits being applied out of order. This meant a lot of manual intervention which in turn lead to slight differences between upstream and NX. With this commit these slight differences are minimized which will be of great help when adding further upstream patches.
parent 878040bf
...@@ -24,7 +24,6 @@ in this Software without prior written authorization from The Open Group. ...@@ -24,7 +24,6 @@ in this Software without prior written authorization from The Open Group.
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#endif #endif
......
...@@ -66,6 +66,7 @@ XDrawArc( ...@@ -66,6 +66,7 @@ XDrawArc(
arc->angle1 = angle1; arc->angle1 = angle1;
arc->angle2 = angle2; arc->angle2 = angle2;
UnlockDisplay(dpy); UnlockDisplay(dpy);
SyncHandle(); SyncHandle();
return 1; return 1;
......
...@@ -63,3 +63,4 @@ XFillRectangles( ...@@ -63,3 +63,4 @@ XFillRectangles(
SyncHandle(); SyncHandle();
return 1; return 1;
} }
...@@ -260,7 +260,6 @@ _XQueryFont ( ...@@ -260,7 +260,6 @@ _XQueryFont (
* 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){
/* nCharInfos is a CARD32 */ /* nCharInfos is a CARD32 */
......
...@@ -47,3 +47,4 @@ XFreeGC ( ...@@ -47,3 +47,4 @@ XFreeGC (
Xfree ((char *) gc); Xfree ((char *) gc);
return 1; return 1;
} }
...@@ -543,8 +543,7 @@ static unsigned long _XGetPixel32 ( ...@@ -543,8 +543,7 @@ static unsigned long _XGetPixel32 (
[y * ximage->bytes_per_line + (x << 2)]; [y * ximage->bytes_per_line + (x << 2)];
if (*((const char *)&byteorderpixel) == ximage->byte_order) if (*((const char *)&byteorderpixel) == ximage->byte_order)
pixel = *((CARD32 *)addr); pixel = *((CARD32 *)addr);
else else 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 |
(unsigned long)addr[2] << 8 | (unsigned long)addr[2] << 8 |
...@@ -732,8 +731,7 @@ static int _XPutPixel32 ( ...@@ -732,8 +731,7 @@ static int _XPutPixel32 (
[y * ximage->bytes_per_line + (x << 2)]; [y * ximage->bytes_per_line + (x << 2)];
if (*((const char *)&byteorderpixel) == ximage->byte_order) if (*((const char *)&byteorderpixel) == ximage->byte_order)
*((CARD32 *)addr) = pixel; *((CARD32 *)addr) = pixel;
else else 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;
addr[2] = pixel >> 8; addr[2] = pixel >> 8;
......
...@@ -154,3 +154,4 @@ XHostAddress *XListHosts ( ...@@ -154,3 +154,4 @@ XHostAddress *XListHosts (
...@@ -203,7 +203,8 @@ XDrawText16( ...@@ -203,7 +203,8 @@ XDrawText16(
elt->len = PartialNChars; elt->len = PartialNChars;
memcpy ((char *) (elt + 1), (char *)CharacterOffset, memcpy ((char *) (elt + 1), (char *)CharacterOffset,
PartialNChars * 2); PartialNChars *
2);
} }
} }
item++; item++;
......
...@@ -97,4 +97,3 @@ XQueryColors( ...@@ -97,4 +97,3 @@ XQueryColors(
SyncHandle(); SyncHandle();
return 1; return 1;
} }
...@@ -57,3 +57,5 @@ XRestackWindows ( ...@@ -57,3 +57,5 @@ XRestackWindows (
} }
...@@ -78,3 +78,4 @@ XSetClipRectangles ( ...@@ -78,3 +78,4 @@ XSetClipRectangles (
SyncHandle(); SyncHandle();
return 1; return 1;
} }
...@@ -74,3 +74,4 @@ XChangeKeyboardMapping ( ...@@ -74,3 +74,4 @@ XChangeKeyboardMapping (
SyncHandle(); SyncHandle();
return 0; return 0;
} }
...@@ -51,6 +51,7 @@ XStoreColor( ...@@ -51,6 +51,7 @@ XStoreColor(
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 */
UnlockDisplay(dpy); UnlockDisplay(dpy);
SyncHandle(); SyncHandle();
return 1; return 1;
......
...@@ -24,7 +24,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -24,7 +24,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/ ********************************************************/
#define NEED_MAP_READERS #define NEED_MAP_READERS
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
......
...@@ -116,9 +116,7 @@ _XkbReadCopyData32(int *wire,long *to,int num_words) ...@@ -116,9 +116,7 @@ _XkbReadCopyData32(int *wire,long *to,int num_words)
} }
return 1; return 1;
} }
#endif
#if defined(LONG64)
int int
_XkbReadBufferCopy32(XkbReadBufferPtr from,long *to,int num_words) _XkbReadBufferCopy32(XkbReadBufferPtr from,long *to,int num_words)
{ {
...@@ -128,9 +126,7 @@ _XkbReadBufferCopy32(XkbReadBufferPtr from,long *to,int num_words) ...@@ -128,9 +126,7 @@ _XkbReadBufferCopy32(XkbReadBufferPtr from,long *to,int num_words)
from->data+= (4*num_words); from->data+= (4*num_words);
return True; return True;
} }
#endif
#ifdef LONG64
int int
_XkbWriteCopyData32 (register unsigned long *from,CARD32 *to,int len) _XkbWriteCopyData32 (register unsigned long *from,CARD32 *to,int len)
{ {
...@@ -142,6 +138,7 @@ _XkbWriteCopyData32 (register unsigned long *from,CARD32 *to,int len) ...@@ -142,6 +138,7 @@ _XkbWriteCopyData32 (register unsigned long *from,CARD32 *to,int len)
} }
#endif /* LONG64 */ #endif /* LONG64 */
char * char *
_XkbPeekAtReadBuffer(XkbReadBufferPtr from,int size) _XkbPeekAtReadBuffer(XkbReadBufferPtr from,int size)
{ {
......
...@@ -213,7 +213,7 @@ extern int _XkbCopyFromReadBuffer( ...@@ -213,7 +213,7 @@ extern int _XkbCopyFromReadBuffer(
); );
#if defined(LONG64) #ifdef LONG64
extern int _XkbReadCopyData32( extern int _XkbReadCopyData32(
int * /* from */, int * /* from */,
long * /* to */, long * /* to */,
......
...@@ -243,10 +243,6 @@ struct _XDisplay ...@@ -243,10 +243,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
*/
#ifndef _XEVENT_ #ifndef _XEVENT_
/* /*
* _QEvent datatype for use in input queueing. * _QEvent datatype for use in input queueing.
...@@ -445,6 +441,9 @@ extern LockInfoPtr _Xglobal_lock; ...@@ -445,6 +441,9 @@ extern LockInfoPtr _Xglobal_lock;
* X Protocol packetizing macros. * X Protocol packetizing macros.
*/ */
/* Leftover from CRAY support - was defined empty on all non-Cray systems */
#define WORD64ALIGN
/** /**
* Return a len-sized request buffer for the request type. This function may * Return a len-sized request buffer for the request type. This function may
* flush the output queue. * flush the output queue.
...@@ -593,7 +592,7 @@ extern void _XFlushGCCache(Display *dpy, GC gc); ...@@ -593,7 +592,7 @@ extern void _XFlushGCCache(Display *dpy, GC gc);
* 32 bit word alignment. Transmit if the buffer fills. * 32 bit word alignment. Transmit if the buffer fills.
* *
* "dpy" is a pointer to a Display. * "dpy" is a pointer to a Display.
* "data" is a pinter to a data buffer. * "data" is a pointer to a data buffer.
* "len" is the length of the data buffer. * "len" is the length of the data buffer.
*/ */
#ifndef DataRoutineIsProcedure #ifndef DataRoutineIsProcedure
...@@ -715,7 +714,6 @@ extern void _XRead32( ...@@ -715,7 +714,6 @@ extern void _XRead32(
} }
/* 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); }
...@@ -894,7 +892,7 @@ extern int _XError( ...@@ -894,7 +892,7 @@ extern int _XError(
); );
extern int _XIOError( extern int _XIOError(
Display* /* dpy */ Display* /* dpy */
); ) _X_NORETURN;
extern int (*_XIOErrorFunction)( extern int (*_XIOErrorFunction)(
Display* /* dpy */ Display* /* dpy */
); );
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
#include <nx-X11/Xlib.h> #include <nx-X11/Xlib.h>
extern void _XIDHandler(Display *dpy); extern _X_HIDDEN void _XIDHandler(Display *dpy);
extern void _XSeqSyncFunction(Display *dpy); extern _X_HIDDEN void _XSeqSyncFunction(Display *dpy);
extern void _XSetPrivSyncFunction(Display *dpy); extern _X_HIDDEN void _XSetPrivSyncFunction(Display *dpy);
extern void _XSetSeqSyncFunction(Display *dpy); extern _X_HIDDEN void _XSetSeqSyncFunction(Display *dpy);
#ifdef XTHREADS #ifdef XTHREADS
#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
......
...@@ -50,7 +50,7 @@ SOFTWARE. ...@@ -50,7 +50,7 @@ SOFTWARE.
#define _X11_XUTIL_H_ #define _X11_XUTIL_H_
#define _XUTIL_H_ #define _XUTIL_H_
/* You must include <nx-X11/Xlib.h> before including this file */ /* You must include <X11/Xlib.h> before including this file */
#include <nx-X11/Xlib.h> #include <nx-X11/Xlib.h>
#include <nx-X11/keysym.h> #include <nx-X11/keysym.h>
......
...@@ -36,9 +36,7 @@ THIS SOFTWARE. ...@@ -36,9 +36,7 @@ THIS SOFTWARE.
#include <config.h> #include <config.h>
#endif #endif
#include <stdio.h> #include <stdio.h>
/*
#include <nx-X11/Xlib.h>
*/
#include <nx-X11/Xmd.h> #include <nx-X11/Xmd.h>
#include <nx-X11/Xatom.h> #include <nx-X11/Xatom.h>
#include <nx-X11/Xos.h> #include <nx-X11/Xos.h>
......
...@@ -6249,3 +6249,4 @@ big5hkscs_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) ...@@ -6249,3 +6249,4 @@ big5hkscs_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
} }
return RET_TOOSMALL; return RET_TOOSMALL;
} }
...@@ -335,7 +335,6 @@ _XomConvert( ...@@ -335,7 +335,6 @@ _XomConvert(
length = *to_left - cs_left; length = *to_left - cs_left;
{
if (font_set->side != charset->side) { if (font_set->side != charset->side) {
if (font_set->side == XlcGL) if (font_set->side == XlcGL)
shift_to_gl(*to, length); shift_to_gl(*to, length);
...@@ -347,7 +346,6 @@ _XomConvert( ...@@ -347,7 +346,6 @@ _XomConvert(
length >>= 1; length >>= 1;
*to = cs; *to = cs;
*to_left -= length; *to_left -= length;
}
*((XFontStruct **) args[0]) = font_set->font; *((XFontStruct **) args[0]) = font_set->font;
*((Bool *) args[1]) = font_set->is_xchar2b; *((Bool *) args[1]) = font_set->is_xchar2b;
......
...@@ -79,4 +79,3 @@ SOFTWARE. ...@@ -79,4 +79,3 @@ SOFTWARE.
#endif #endif
#endif #endif
#endif #endif
...@@ -113,3 +113,4 @@ do { ...@@ -113,3 +113,4 @@ do {
for(el=head,tmp=el->next;el;el=tmp,tmp=(el) ? (el->next) : NULL) for(el=head,tmp=el->next;el;el=tmp,tmp=(el) ? (el->next) : NULL)
#endif /* UTLIST_H */ #endif /* UTLIST_H */
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