Module Name: xsrc
Committed By: mrg
Date: Thu May 30 23:09:16 UTC 2013
Modified Files:
xsrc/external/mit/libX11/dist/man: XCreateGC.man
xsrc/external/mit/libX11/dist/modules/lc/gen: lcGenConv.c
xsrc/external/mit/libX11/dist/src: XlibInt.c
xsrc/external/mit/libX11/dist/src/xcms: cmsTrig.c
Removed Files:
xsrc/external/mit/libX11/dist/nls: compose-chart.pl xmlrules.in
xsrc/external/mit/libX11/dist/nls/ja.S90: Compose.pre XI18N_OBJS
XLC_LOCALE.pre
xsrc/external/mit/libX11/dist/nls/ja.U90: Compose.pre XI18N_OBJS
XLC_LOCALE.pre
Log Message:
merge libX11 1.5.99.902.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/libX11/dist/man/XCreateGC.man
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/libX11/dist/modules/lc/gen/lcGenConv.c
cvs rdiff -u -r1.1.1.2 -r0 xsrc/external/mit/libX11/dist/nls/compose-chart.pl
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/libX11/dist/nls/xmlrules.in
cvs rdiff -u -r1.1.1.1 -r0 \
xsrc/external/mit/libX11/dist/nls/ja.S90/Compose.pre \
xsrc/external/mit/libX11/dist/nls/ja.S90/XI18N_OBJS
cvs rdiff -u -r1.1.1.2 -r0 \
xsrc/external/mit/libX11/dist/nls/ja.S90/XLC_LOCALE.pre
cvs rdiff -u -r1.1.1.1 -r0 \
xsrc/external/mit/libX11/dist/nls/ja.U90/Compose.pre \
xsrc/external/mit/libX11/dist/nls/ja.U90/XI18N_OBJS
cvs rdiff -u -r1.1.1.2 -r0 \
xsrc/external/mit/libX11/dist/nls/ja.U90/XLC_LOCALE.pre
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/libX11/dist/src/XlibInt.c
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/libX11/dist/src/xcms/cmsTrig.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/libX11/dist/man/XCreateGC.man
diff -u xsrc/external/mit/libX11/dist/man/XCreateGC.man:1.2 xsrc/external/mit/libX11/dist/man/XCreateGC.man:1.3
--- xsrc/external/mit/libX11/dist/man/XCreateGC.man:1.2 Wed Jun 2 20:38:54 2010
+++ xsrc/external/mit/libX11/dist/man/XCreateGC.man Thu May 30 23:09:16 2013
@@ -50,7 +50,7 @@
.de Ds
.nf
.\\$1D \\$2 \\$1
-.ft 1
+.ft CW
.\".ps \\n(PS
.\".if \\n(VS>=40 .vs \\n(VSu
.\".if \\n(VS<=39 .vs \\n(VSp
@@ -64,43 +64,8 @@
.sp \\n(DDu
.fi
..
-.de FD
-.LP
-.KS
-.TA .5i 3i
-.ta .5i 3i
-.nf
-..
-.de FN
-.fi
-.KE
-.LP
-..
.de IN \" send an index entry to the stderr
..
-.de C{
-.KS
-.nf
-.D
-.\"
-.\" choose appropriate monospace font
-.\" the imagen conditional, 480,
-.\" may be changed to L if LB is too
-.\" heavy for your eyes...
-.\"
-.ie "\\*(.T"480" .ft L
-.el .ie "\\*(.T"300" .ft L
-.el .ie "\\*(.T"202" .ft PO
-.el .ie "\\*(.T"aps" .ft CW
-.el .ft R
-.ps \\n(PS
-.ie \\n(VS>40 .vs \\n(VSu
-.el .vs \\n(VSp
-..
-.de C}
-.DE
-.R
-..
.de Pn
.ie t \\$1\fB\^\\$2\^\fR\\$3
.el \\$1\fI\^\\$2\^\fP\\$3
@@ -113,32 +78,6 @@
.ie t <\fB\\$1\fR>\\$2
.el <\fI\\$1\fP>\\$2
..
-.de NT
-.ne 7
-.ds NO Note
-.if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
-.if \\n(.$ .if !'\\$1'C' .ds NO \\$1
-.ie n .sp
-.el .sp 10p
-.TB
-.ce
-\\*(NO
-.ie n .sp
-.el .sp 5p
-.if '\\$1'C' .ce 99
-.if '\\$2'C' .ce 99
-.in +5n
-.ll -5n
-.R
-..
-. \" Note End -- doug kraft 3/85
-.de NE
-.ce 0
-.in -5n
-.ll +5n
-.ie n .sp
-.el .sp 10p
-..
.ny0
'\" t
.TH XCreateGC __libmansuffix__ __xorgversion__ "XLIB FUNCTIONS"
@@ -476,34 +415,32 @@ T}
.TE
.IN "XGCValues" "" "@DEF@"
.Ds 0
-.TA .5i 3i
-.ta .5i 3i
/\&* Values */
typedef struct {
- int function; /\&* logical operation */
- unsigned long plane_mask; /\&* plane mask */
- unsigned long foreground; /\&* foreground pixel */
- unsigned long background; /\&* background pixel */
- int line_width; /\&* line width (in pixels) */
- int line_style; /\&* LineSolid, LineOnOffDash, LineDoubleDash */
- int cap_style; /\&* CapNotLast, CapButt, CapRound, CapProjecting */
- int join_style; /\&* JoinMiter, JoinRound, JoinBevel */
- int fill_style; /\&* FillSolid, FillTiled, FillStippled FillOpaqueStippled*/
- int fill_rule; /\&* EvenOddRule, WindingRule */
- int arc_mode; /\&* ArcChord, ArcPieSlice */
- Pixmap tile; /\&* tile pixmap for tiling operations */
- Pixmap stipple; /\&* stipple 1 plane pixmap for stippling */
- int ts_x_origin; /\&* offset for tile or stipple operations */
- int ts_y_origin;
- Font font; /\&* default text font for text operations */
- int subwindow_mode; /\&* ClipByChildren, IncludeInferiors */
- Bool graphics_exposures; /\&* boolean, should exposures be generated */
- int clip_x_origin; /\&* origin for clipping */
- int clip_y_origin;
- Pixmap clip_mask; /\&* bitmap clipping; other calls for rects */
- int dash_offset; /\&* patterned/dashed line information */
- char dashes;
+ int function; /\&* logical operation */
+ unsigned long plane_mask; /\&* plane mask */
+ unsigned long foreground; /\&* foreground pixel */
+ unsigned long background; /\&* background pixel */
+ int line_width; /\&* line width (in pixels) */
+ int line_style; /\&* LineSolid, LineOnOffDash, LineDoubleDash */
+ int cap_style; /\&* CapNotLast, CapButt, CapRound, CapProjecting */
+ int join_style; /\&* JoinMiter, JoinRound, JoinBevel */
+ int fill_style; /\&* FillSolid, FillTiled, FillStippled FillOpaqueStippled*/
+ int fill_rule; /\&* EvenOddRule, WindingRule */
+ int arc_mode; /\&* ArcChord, ArcPieSlice */
+ Pixmap tile; /\&* tile pixmap for tiling operations */
+ Pixmap stipple; /\&* stipple 1 plane pixmap for stippling */
+ int ts_x_origin; /\&* offset for tile or stipple operations */
+ int ts_y_origin;
+ Font font; /\&* default text font for text operations */
+ int subwindow_mode; /\&* ClipByChildren, IncludeInferiors */
+ Bool graphics_exposures; /\&* boolean, should exposures be generated */
+ int clip_x_origin; /\&* origin for clipping */
+ int clip_y_origin;
+ Pixmap clip_mask; /\&* bitmap clipping; other calls for rects */
+ int dash_offset; /\&* patterned/dashed line information */
+ char dashes;
} XGCValues;
.De
.LP
@@ -684,8 +621,6 @@ the bounding box of a wide line with end
width w is a rectangle with vertices at the following real coordinates:
.LP
.Ds
-.TA .5i 2.5i
-.ta .5i 2.5i
[x1-(w*sn/2), y1+(w*cs/2)], [x1+(w*sn/2), y1-(w*cs/2)],
[x2-(w*sn/2), y2+(w*cs/2)], [x2+(w*sn/2), y2-(w*cs/2)]
.De
Index: xsrc/external/mit/libX11/dist/modules/lc/gen/lcGenConv.c
diff -u xsrc/external/mit/libX11/dist/modules/lc/gen/lcGenConv.c:1.4 xsrc/external/mit/libX11/dist/modules/lc/gen/lcGenConv.c:1.5
--- xsrc/external/mit/libX11/dist/modules/lc/gen/lcGenConv.c:1.4 Wed Aug 3 03:06:00 2011
+++ xsrc/external/mit/libX11/dist/modules/lc/gen/lcGenConv.c Thu May 30 23:09:16 2013
@@ -1794,11 +1794,6 @@ mbtocs(
return( 0 );
}
-#ifdef notdef
- if (*from_left > *to_left)
- *from_left = *to_left;
-#endif
-
while (*from_left && *to_left) {
ch = *inbufptr++;
@@ -1884,7 +1879,7 @@ output:
return -1;
}
- /* nomal end */
+ /* normal end */
*from = (XPointer) inbufptr;
*to = (XPointer) outbufptr;
@@ -2187,7 +2182,7 @@ end:
return -1;
}
- /* nomal end */
+ /* normal end */
*from = (XPointer) inbufptr;
*to = (XPointer) outbufptr;
@@ -2241,7 +2236,7 @@ end:
return -1;
}
- /* nomal end */
+ /* normal end */
*from = (XPointer) src;
*from_left = src_left;
Index: xsrc/external/mit/libX11/dist/src/XlibInt.c
diff -u xsrc/external/mit/libX11/dist/src/XlibInt.c:1.4 xsrc/external/mit/libX11/dist/src/XlibInt.c:1.5
--- xsrc/external/mit/libX11/dist/src/XlibInt.c:1.4 Sat Jul 23 11:11:58 2011
+++ xsrc/external/mit/libX11/dist/src/XlibInt.c Thu May 30 23:09:16 2013
@@ -152,7 +152,7 @@ Bool _XPollfdCacheInit(
#ifdef USE_POLL
struct pollfd *pfp;
- pfp = (struct pollfd *)Xmalloc(POLLFD_CACHE_SIZE * sizeof(struct pollfd));
+ pfp = Xmalloc(POLLFD_CACHE_SIZE * sizeof(struct pollfd));
if (!pfp)
return False;
pfp[0].fd = dpy->fd;
@@ -293,124 +293,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 */
/*
* The hard part about this is that we only get 16 bits from a reply.
@@ -492,10 +374,10 @@ _XRegisterInternalConnection(
struct _XConnWatchInfo *watchers;
XPointer *wd;
- new_conni = (struct _XConnectionInfo*)Xmalloc(sizeof(struct _XConnectionInfo));
+ new_conni = Xmalloc(sizeof(struct _XConnectionInfo));
if (!new_conni)
return 0;
- new_conni->watch_data = (XPointer *)Xmalloc(dpy->watcher_count * sizeof(XPointer));
+ new_conni->watch_data = Xmalloc(dpy->watcher_count * sizeof(XPointer));
if (!new_conni->watch_data) {
Xfree(new_conni);
return 0;
@@ -582,7 +464,7 @@ XInternalConnectionNumbers(
count = 0;
for (info_list=dpy->im_fd_info; info_list; info_list=info_list->next)
count++;
- fd_list = (int*) Xmalloc (count * sizeof(int));
+ fd_list = Xmalloc (count * sizeof(int));
if (!fd_list) {
UnlockDisplay(dpy);
return 0;
@@ -655,9 +537,8 @@ XAddConnectionWatch(
/* allocate new watch data */
for (info_list=dpy->im_fd_info; info_list; info_list=info_list->next) {
- wd_array = (XPointer *)Xrealloc((char *)info_list->watch_data,
- (dpy->watcher_count + 1) *
- sizeof(XPointer));
+ wd_array = Xrealloc(info_list->watch_data,
+ (dpy->watcher_count + 1) * sizeof(XPointer));
if (!wd_array) {
UnlockDisplay(dpy);
return 0;
@@ -666,7 +547,7 @@ XAddConnectionWatch(
wd_array[dpy->watcher_count] = NULL; /* for cleanliness */
}
- new_watcher = (struct _XConnWatchInfo*)Xmalloc(sizeof(struct _XConnWatchInfo));
+ new_watcher = Xmalloc(sizeof(struct _XConnWatchInfo));
if (!new_watcher) {
UnlockDisplay(dpy);
return 0;
@@ -874,8 +755,7 @@ void _XEnq(
/* If dpy->qfree is non-NULL do this, else malloc a new one. */
dpy->qfree = qelt->next;
}
- else if ((qelt =
- (_XQEvent *) Xmalloc((unsigned)sizeof(_XQEvent))) == NULL) {
+ else if ((qelt = Xmalloc(sizeof(_XQEvent))) == NULL) {
/* Malloc call failed! */
ESET(ENOMEM);
_XIOError(dpy);
@@ -886,7 +766,7 @@ void _XEnq(
extension = ((xGenericEvent*)event)->extension;
qelt->event.type = type;
- /* If an extension has registerd a generic_event_vec handler, then
+ /* If an extension has registered a generic_event_vec handler, then
* it can handle event cookies. Otherwise, proceed with the normal
* event handlers.
*
@@ -1432,7 +1312,7 @@ static int _XPrintDefaultError(
mesg, BUFSIZ);
(void) fprintf(fp, mesg, event->request_code);
if (event->request_code < 128) {
- sprintf(number, "%d", event->request_code);
+ snprintf(number, sizeof(number), "%d", event->request_code);
XGetErrorDatabaseText(dpy, "XRequest", number, "", buffer, BUFSIZ);
} else {
for (ext = dpy->ext_procs;
@@ -1452,7 +1332,7 @@ static int _XPrintDefaultError(
fputs(" ", fp);
(void) fprintf(fp, mesg, event->minor_code);
if (ext) {
- sprintf(mesg, "%s.%d", ext->name, event->minor_code);
+ snprintf(mesg, sizeof(mesg), "%s.%d", ext->name, event->minor_code);
XGetErrorDatabaseText(dpy, "XRequest", mesg, "", buffer, BUFSIZ);
(void) fprintf(fp, " (%s)", buffer);
}
@@ -1475,8 +1355,8 @@ static int _XPrintDefaultError(
bext = ext;
}
if (bext)
- sprintf(buffer, "%s.%d", bext->name,
- event->error_code - bext->codes.first_error);
+ snprintf(buffer, sizeof(buffer), "%s.%d", bext->name,
+ event->error_code - bext->codes.first_error);
else
strcpy(buffer, "Value");
XGetErrorDatabaseText(dpy, mtype, buffer, "", mesg, BUFSIZ);
@@ -1636,7 +1516,7 @@ char *_XAllocScratch(
{
if (nbytes > dpy->scratch_length) {
if (dpy->scratch_buffer) Xfree (dpy->scratch_buffer);
- if ((dpy->scratch_buffer = Xmalloc((unsigned) nbytes)))
+ if ((dpy->scratch_buffer = Xmalloc(nbytes)))
dpy->scratch_length = nbytes;
else dpy->scratch_length = 0;
}
@@ -1722,7 +1602,7 @@ void _Xbcopy(b1, b2, length)
#ifdef DataRoutineIsProcedure
void Data(
Display *dpy,
- char *data,
+ _Xconst char *data,
long len)
{
if (dpy->bufptr + (len) <= dpy->bufmax) {
@@ -1739,7 +1619,7 @@ void Data(
int
_XData32(
Display *dpy,
- register long *data,
+ register _Xconst long *data,
unsigned len)
{
register int *buf;
@@ -1764,122 +1644,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.
@@ -1956,6 +1720,35 @@ Screen *_XScreenOfWindow(Display *dpy, W
}
+/*
+ * WARNING: This implementation's pre-conditions and post-conditions
+ * must remain compatible with the old macro-based implementations of
+ * GetReq, GetReqExtra, GetResReq, and GetEmptyReq. The portions of the
+ * Display structure affected by those macros are part of libX11's
+ * ABI.
+ */
+void *_XGetRequest(Display *dpy, CARD8 type, size_t len)
+{
+ xReq *req;
+
+ if (dpy->bufptr + len > dpy->bufmax)
+ _XFlush(dpy);
+
+ if (len % 4)
+ fprintf(stderr,
+ "Xlib: request %d length %zd not a multiple of 4.\n",
+ type, len);
+
+ dpy->last_req = dpy->bufptr;
+
+ req = (xReq*)dpy->bufptr;
+ req->reqType = type;
+ req->length = len / 4;
+ dpy->bufptr += len;
+ dpy->request++;
+ return req;
+}
+
#if defined(WIN32)
/*
Index: xsrc/external/mit/libX11/dist/src/xcms/cmsTrig.c
diff -u xsrc/external/mit/libX11/dist/src/xcms/cmsTrig.c:1.2 xsrc/external/mit/libX11/dist/src/xcms/cmsTrig.c:1.3
--- xsrc/external/mit/libX11/dist/src/xcms/cmsTrig.c:1.2 Mon Feb 13 16:59:51 2012
+++ xsrc/external/mit/libX11/dist/src/xcms/cmsTrig.c Thu May 30 23:09:16 2013
@@ -84,12 +84,8 @@ _XcmsModuloF(
#define XCMS_FABS(x) ((x) < 0.0 ? -(x) : (x))
/* XCMS_DMAXPOWTWO - largest power of two exactly representable as a double */
-#ifdef _CRAY
-#define XCMS_DMAXPOWTWO ((double)(1 < 47))
-#else
#define XCMS_DMAXPOWTWO ((double)(XCMS_LONG_MAX) * \
(1L << ((XCMS_NBITS(double)-XCMS_DEXPLEN) - XCMS_NBITS(int) + 1)))
-#endif
/*
* LOCAL VARIABLES