Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit merge libXext 1.3.5, libbXmu 1.1.4, libXrende...
details: https://anonhg.NetBSD.org/xsrc/rev/4e0a43340ab8
branches: trunk
changeset: 7219:4e0a43340ab8
user: mrg <mrg%NetBSD.org@localhost>
date: Sat Oct 29 21:02:03 2022 +0000
description:
merge libXext 1.3.5, libbXmu 1.1.4, libXrender 1.0.1, libxkbfile 1.1.1 and
libxshmfence 1.3.1.
diffstat:
external/mit/libXext/dist/src/XEVI.c | 7 +-
external/mit/libXext/dist/src/XSync.c | 2 +-
external/mit/libXext/dist/src/Xge.c | 10 +-
external/mit/libXext/dist/src/extutil.c | 13 +-
external/mit/libXmu/dist/src/CmapAlloc.c | 2 +-
external/mit/libXpresent/dist/README | 5 -
external/mit/libXrender/dist/README | 25 -----
external/mit/libXrender/dist/src/Filter.c | 36 ++++---
external/mit/libXrender/dist/src/Xrender.c | 91 ++++++++++---------
external/mit/libxkbfile/dist/src/cout.c | 4 -
external/mit/libxshmfence/dist/README | 36 -------
external/mit/libxshmfence/dist/src/xshmfence_alloc.c | 20 ++++
12 files changed, 105 insertions(+), 146 deletions(-)
diffs (truncated from 673 to 300 lines):
diff -r 262c258385d4 -r 4e0a43340ab8 external/mit/libXext/dist/src/XEVI.c
--- a/external/mit/libXext/dist/src/XEVI.c Sat Oct 29 21:00:10 2022 +0000
+++ b/external/mit/libXext/dist/src/XEVI.c Sat Oct 29 21:02:03 2022 +0000
@@ -31,6 +31,7 @@
#include <X11/extensions/extutil.h>
#include <X11/Xutil.h>
#include <limits.h>
+#include "reallocarray.h"
static XExtensionInfo *xevi_info;/* needs to move to globals.c */
static const char *xevi_extension_name = EVINAME;
@@ -126,7 +127,7 @@
return BadValue;
}
if (!n_visual || !visual) { /* copy the all visual */
- temp_visual = (VisualID32 *)Xmalloc(sz_VisualID32 * sz_info);
+ temp_visual = Xcalloc(sz_info, sz_VisualID32);
n_visual = 0;
for (vinfoIndex = 0; vinfoIndex < sz_info; vinfoIndex++)
if (notInList(temp_visual, n_visual, vinfo[vinfoIndex].visualid))
@@ -148,7 +149,7 @@
return BadValue;
}
}
- temp_visual = (VisualID32 *)Xmalloc(sz_VisualID32 * n_visual);
+ temp_visual = Xmallocarray(n_visual, sz_VisualID32);
for (visualIndex = 0; visualIndex < n_visual; visualIndex++)
temp_visual[visualIndex] = visual[visualIndex];
}
@@ -172,7 +173,7 @@
sz_xInfo = rep.n_info * sz_xExtendedVisualInfo;
sz_conflict = rep.n_conflicts * sizeof(VisualID);
sz_xConflict = rep.n_conflicts * sz_VisualID32;
- *evi_return = Xmalloc(sz_info + sz_conflict);
+ *evi_return = Xcalloc(sz_info + sz_conflict, 1);
temp_xInfo = Xmalloc(sz_xInfo);
temp_conflict = Xmalloc(sz_xConflict);
} else {
diff -r 262c258385d4 -r 4e0a43340ab8 external/mit/libXext/dist/src/XSync.c
--- a/external/mit/libXext/dist/src/XSync.c Sat Oct 29 21:00:10 2022 +0000
+++ b/external/mit/libXext/dist/src/XSync.c Sat Oct 29 21:02:03 2022 +0000
@@ -358,7 +358,7 @@
int i;
if (rep.nCounters < (INT_MAX / sizeof(XSyncSystemCounter)))
- list = Xmalloc(rep.nCounters * sizeof(XSyncSystemCounter));
+ list = Xcalloc(rep.nCounters, sizeof(XSyncSystemCounter));
if (rep.length < (INT_MAX >> 2)) {
replylen = rep.length << 2;
pWireSysCounter = Xmalloc (replylen + sizeof(XSyncCounter));
diff -r 262c258385d4 -r 4e0a43340ab8 external/mit/libXext/dist/src/Xge.c
--- a/external/mit/libXext/dist/src/Xge.c Sat Oct 29 21:00:10 2022 +0000
+++ b/external/mit/libXext/dist/src/Xge.c Sat Oct 29 21:02:03 2022 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright © 2007-2008 Peter Hutterer
+ * Copyright © 2007-2008 Peter Hutterer
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -39,6 +39,8 @@
#include <X11/extensions/extutil.h>
#include <X11/extensions/Xge.h>
+#include "extutilP.h"
+
/***********************************************************************/
/* internal data structures */
/***********************************************************************/
@@ -141,7 +143,7 @@
if (!info->data)
{
- XGEData* data = (XGEData*)Xmalloc(sizeof(XGEData));
+ XGEData* data = Xmalloc(sizeof(XGEData));
if (!data) {
goto cleanup;
}
@@ -190,7 +192,7 @@
return NULL;
}
- vers = (XGEVersionRec*)Xmalloc(sizeof(XGEVersionRec));
+ vers = Xmalloc(sizeof(XGEVersionRec));
vers->major_version = rep.majorVersion;
vers->minor_version = rep.minorVersion;
return vers;
@@ -313,7 +315,7 @@
xge_data = (XGEData*)info->data;
- newExt = (XGEExtNode*)Xmalloc(sizeof(XGEExtNode));
+ newExt = Xmalloc(sizeof(XGEExtNode));
if (!newExt)
{
fprintf(stderr, "xgeExtRegister: Failed to alloc memory.\n");
diff -r 262c258385d4 -r 4e0a43340ab8 external/mit/libXext/dist/src/extutil.c
--- a/external/mit/libXext/dist/src/extutil.c Sat Oct 29 21:00:10 2022 +0000
+++ b/external/mit/libXext/dist/src/extutil.c Sat Oct 29 21:02:03 2022 +0000
@@ -54,9 +54,7 @@
#include <X11/extensions/extutil.h>
#include <X11/extensions/ge.h>
-/* defined in Xge.c */
-extern _X_HIDDEN Bool
-xgeExtRegister(Display* dpy, int extension, XExtensionHooks* callbacks);
+#include "extutilP.h"
/*
* XextCreateExtension - return an extension descriptor containing context
@@ -65,8 +63,7 @@
*/
XExtensionInfo *XextCreateExtension (void)
{
- register XExtensionInfo *info =
- (XExtensionInfo *) Xmalloc (sizeof (XExtensionInfo));
+ register XExtensionInfo *info = Xmalloc (sizeof (XExtensionInfo));
if (info) {
info->head = NULL;
@@ -85,7 +82,7 @@
info->head = NULL; /* to catch refs after this */
info->cur = NULL;
info->ndisplays = 0;
- XFree ((char *) info);
+ XFree (info);
}
@@ -103,7 +100,7 @@
{
XExtDisplayInfo *dpyinfo;
- dpyinfo = (XExtDisplayInfo *) Xmalloc (sizeof (XExtDisplayInfo));
+ dpyinfo = Xmalloc (sizeof (XExtDisplayInfo));
if (!dpyinfo) return NULL;
dpyinfo->display = dpy;
dpyinfo->data = data;
@@ -205,7 +202,7 @@
if (dpyinfo == extinfo->cur) extinfo->cur = NULL; /* flush cache */
_XUnlockMutex(_Xglobal_lock);
- Xfree ((char *) dpyinfo);
+ Xfree (dpyinfo);
return 1;
}
diff -r 262c258385d4 -r 4e0a43340ab8 external/mit/libXmu/dist/src/CmapAlloc.c
--- a/external/mit/libXmu/dist/src/CmapAlloc.c Sat Oct 29 21:00:10 2022 +0000
+++ b/external/mit/libXmu/dist/src/CmapAlloc.c Sat Oct 29 21:02:03 2022 +0000
@@ -205,7 +205,7 @@
* maximum blue value = floor(cube_root(n)) - 1;
* maximum green value = n / ((# red values) * (# blue values)) - 1;
* Which, on a GPX, allows for 252 entries in the best map, out of 254
- * defineable colormap entries.
+ * definable colormap entries.
*/
static void
diff -r 262c258385d4 -r 4e0a43340ab8 external/mit/libXpresent/dist/README
--- a/external/mit/libXpresent/dist/README Sat Oct 29 21:00:10 2022 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-This package contains header files and documentation for the Present
-extension. Library and server implementations are separate.
-
-Keith Packard
-keithp%keithp.com@localhost
diff -r 262c258385d4 -r 4e0a43340ab8 external/mit/libXrender/dist/README
--- a/external/mit/libXrender/dist/README Sat Oct 29 21:00:10 2022 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-libXrender - library for the Render Extension to the X11 protocol
-
-All questions regarding this software should be directed at the
-Xorg mailing list:
-
- http://lists.freedesktop.org/mailman/listinfo/xorg
-
-Please submit bug reports to the Xorg bugzilla:
-
- https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
-
-The master development code repository can be found at:
-
- git://anongit.freedesktop.org/git/xorg/lib/libXrender
-
- http://cgit.freedesktop.org/xorg/lib/libXrender
-
-For patch submission instructions, see:
-
- http://www.x.org/wiki/Development/Documentation/SubmittingPatches
-
-For more information on the git code manager, see:
-
- http://wiki.x.org/wiki/GitPage
-
diff -r 262c258385d4 -r 4e0a43340ab8 external/mit/libXrender/dist/src/Filter.c
--- a/external/mit/libXrender/dist/src/Filter.c Sat Oct 29 21:00:10 2022 +0000
+++ b/external/mit/libXrender/dist/src/Filter.c Sat Oct 29 21:02:03 2022 +0000
@@ -30,15 +30,15 @@
XFilters *
XRenderQueryFilters (Display *dpy, Drawable drawable)
{
- XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
+ XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
XRenderInfo *xri;
xRenderQueryFiltersReq *req;
xRenderQueryFiltersReply rep;
XFilters *filters;
char *name;
char len;
- int i;
- unsigned long nbytes, nbytesAlias, nbytesName, reply_left;
+ unsigned int i;
+ unsigned long nbytesName, reply_left;
if (!RenderHasExtension (info))
return NULL;
@@ -52,9 +52,9 @@
LockDisplay (dpy);
GetReq (RenderQueryFilters, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->renderReqType = X_RenderQueryFilters;
- req->drawable = drawable;
+ req->drawable = (CARD32) drawable;
if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
{
UnlockDisplay (dpy);
@@ -69,6 +69,8 @@
if ((rep.length < (INT_MAX >> 2)) &&
(rep.numFilters < ((INT_MAX / 4) / sizeof (char *))) &&
(rep.numAliases < ((INT_MAX / 4) / sizeof (short)))) {
+ unsigned long nbytes, nbytesAlias;
+
/*
* Compute total number of bytes for filter names
*/
@@ -104,8 +106,8 @@
* nbytesName char strings
*/
- filters->nfilter = rep.numFilters;
- filters->nalias = rep.numAliases;
+ filters->nfilter = (int) rep.numFilters;
+ filters->nalias = (int) rep.numAliases;
filters->filter = (char **) (filters + 1);
filters->alias = (short *) (filters->filter + rep.numFilters);
name = (char *) (filters->alias + rep.numAliases);
@@ -132,14 +134,14 @@
SyncHandle ();
return NULL;
}
- nbytesName -= l + 1;
+ nbytesName -= (unsigned long) (l + 1);
filters->filter[i] = name;
_XRead (dpy, name, l);
- reply_left -= l;
+ reply_left -= (unsigned long) l;
name[l] = '\0';
name += l + 1;
}
- i = name - (char *) (filters->alias + rep.numAliases);
+ i = (unsigned) (name - (char *) (filters->alias + rep.numAliases));
if (i & 3)
_XEatData (dpy, 4 - (i & 3));
@@ -156,20 +158,20 @@
XFixed *params,
int nparams)
{
- XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
+ XRenderExtDisplayInfo *info = XRenderFindDisplay (dpy);
xRenderSetPictureFilterReq *req;
- int nbytes = strlen (filter);
+ int nbytes = (int) strlen (filter);
RenderSimpleCheckExtension (dpy, info);
LockDisplay(dpy);
GetReq(RenderSetPictureFilter, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->renderReqType = X_RenderSetPictureFilter;
- req->picture = picture;
- req->nbytes = nbytes;
- req->length += ((nbytes + 3) >> 2) + nparams;
+ req->picture = (CARD32) picture;
+ req->nbytes = (CARD16) nbytes;
+ req->length = (CARD16) (req->length + (((nbytes + 3) >> 2) + nparams));
Data (dpy, filter, nbytes);
- Data (dpy, (_Xconst char *)params, nparams << 2);
+ Data (dpy, (_Xconst char *)params, (nparams << 2));
UnlockDisplay(dpy);
SyncHandle();
}
diff -r 262c258385d4 -r 4e0a43340ab8 external/mit/libXrender/dist/src/Xrender.c
--- a/external/mit/libXrender/dist/src/Xrender.c Sat Oct 29 21:00:10 2022 +0000
+++ b/external/mit/libXrender/dist/src/Xrender.c Sat Oct 29 21:02:03 2022 +0000
Home |
Main Index |
Thread Index |
Old Index