Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit merge libXtst-1.2.4 and libXxf86vm-1.1.5



details:   https://anonhg.NetBSD.org/xsrc/rev/167020200e64
branches:  trunk
changeset: 7178:167020200e64
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Sep 27 18:23:26 2022 +0000

description:
merge libXtst-1.2.4 and libXxf86vm-1.1.5

diffstat:

 external/mit/libXtst/dist/README                      |  33 -----------------
 external/mit/libXtst/dist/man/XTestQueryExtension.man |   2 +-
 external/mit/libXtst/dist/src/XRecord.c               |  33 +++++++---------
 external/mit/libXtst/dist/src/XTest.c                 |  14 ++++--
 external/mit/libXxf86vm/dist/README                   |  25 -------------
 external/mit/libXxf86vm/dist/src/XF86VMode.c          |  36 ++++++++++--------
 6 files changed, 44 insertions(+), 99 deletions(-)

diffs (truncated from 412 to 300 lines):

diff -r 148750527005 -r 167020200e64 external/mit/libXtst/dist/README
--- a/external/mit/libXtst/dist/README  Tue Sep 27 18:22:36 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-libXtst provides the Xlib-based client API for the XTEST & RECORD extensions.
-
-The XTEST extension is a minimal set of client and server extensions
-required to completely test the X11 server with no user intervention.
-This extension is not intended to support general journaling and
-playback of user actions.
-
-The RECORD extension supports the recording and reporting of all
-core X protocol and arbitrary X extension 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/libXtst
-
-        http://cgit.freedesktop.org/xorg/lib/libXtst
-
-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 148750527005 -r 167020200e64 external/mit/libXtst/dist/man/XTestQueryExtension.man
--- a/external/mit/libXtst/dist/man/XTestQueryExtension.man     Tue Sep 27 18:22:36 2022 +0000
+++ b/external/mit/libXtst/dist/man/XTestQueryExtension.man     Tue Sep 27 18:23:26 2022 +0000
@@ -1,7 +1,7 @@
 '\" t
 .\"     Title: XTest
 .\"    Author: Kieron Drake
-.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Generator: DocBook XSL Stylesheets vsnapshot_9276 <http://docbook.sf.net/>
 .\"      Date: <pubdate>6 June 2007</pubdate>
 .\"    Manual: XTST FUNCTIONS
 .\"    Source: __xorgversion__
diff -r 148750527005 -r 167020200e64 external/mit/libXtst/dist/src/XRecord.c
--- a/external/mit/libXtst/dist/src/XRecord.c   Tue Sep 27 18:22:36 2022 +0000
+++ b/external/mit/libXtst/dist/src/XRecord.c   Tue Sep 27 18:23:26 2022 +0000
@@ -166,7 +166,7 @@
     struct mem_cache_str *cache;
 
     /* note that an error will go unnoticed */
-    cache = (struct mem_cache_str *) Xmalloc(sizeof(struct mem_cache_str));
+    cache = Xmalloc(sizeof(struct mem_cache_str));
     if (cache) {
        cache->display_closed = False;
        cache->inter_data = NULL;
@@ -317,7 +317,7 @@
 XRecordRange *
 XRecordAllocRange(void)
 {
-    return (XRecordRange*)Xcalloc(1, sizeof(XRecordRange));
+    return Xcalloc(1, sizeof(XRecordRange));
 }
 
 Status
@@ -409,7 +409,7 @@
     XExtDisplayInfo    *info = find_display (dpy);
     register           xRecordGetContextReq    *req;
     xRecordGetContextReply     rep;
-    unsigned int       count, i, rn;
+    unsigned int       count;
     xRecordRange       xrange;
     xRecordClientInfo   xclient_inf;
     XRecordState       *ret;
@@ -427,7 +427,7 @@
     }
     count = rep.nClients;
 
-    ret = (XRecordState*)Xmalloc(sizeof(XRecordState));
+    ret = Xmalloc(sizeof(XRecordState));
     if (!ret) {
        _XEatDataWords (dpy, rep.length);
        UnlockDisplay(dpy);
@@ -459,7 +459,7 @@
           SyncHandle();
           return 0;
         }
-        for(i = 0; i < count; i++)
+        for (unsigned int i = 0; i < count; i++)
         {
            client_inf[i] = &(client_inf_str[i]);
             _XRead(dpy, (char *)&xclient_inf, (long)sizeof(xRecordClientInfo));
@@ -487,7 +487,7 @@
                    SyncHandle();
                    return 0;
                }
-               for (rn=0; rn<xclient_inf.nRanges; rn++) {
+               for (unsigned int rn = 0; rn < xclient_inf.nRanges; rn++) {
                    client_inf_str[i].ranges[rn] = &(ranges[rn]);
                    _XRead(dpy, (char *)&xrange, (long)sizeof(xRecordRange));
                    WireToLibRange(&xrange, &(ranges[rn]));
@@ -510,9 +510,7 @@
 void
 XRecordFreeState(XRecordState *state)
 {
-    int i;
-
-    for(i=0; i<state->nclients; i++) {
+    for (unsigned long i = 0; i < state->nclients; i++) {
        if (state->client_info[i]->ranges) {
            if (state->client_info[i]->ranges[0])
                Xfree(state->client_info[i]->ranges[0]);
@@ -560,10 +558,10 @@
     /*
      * nothing available; malloc a new struct
      */
-    rbp = (struct reply_buffer *)Xmalloc(sizeof(struct reply_buffer));
+    rbp = Xmalloc(sizeof(struct reply_buffer));
     if (!rbp)
        return NULL;
-    rbp->buf = (unsigned char *)Xmalloc(nbytes);
+    rbp->buf = Xmalloc(nbytes);
     if (!rbp->buf) {
        Xfree(rbp);
        return NULL;
@@ -587,7 +585,7 @@
        return &iq->data;
     }
     /* allocate a new one */
-    iq = (struct intercept_queue *)Xmalloc(sizeof(struct intercept_queue));
+    iq = Xmalloc(sizeof(struct intercept_queue));
     if (!iq)
        return NULL;
     iq->cache = cache;
@@ -727,14 +725,13 @@
     XRecordInterceptProc callback,
     XPointer            closure)
 {
-    int current_index;
+    unsigned int current_index;
     int datum_bytes = 0;
-    XRecordInterceptData *data;
 
     /* call the callback for each protocol element in the reply */
     current_index = 0;
     do {
-       data = alloc_inter_data(info);
+       XRecordInterceptData *data = alloc_inter_data(info);
        if (!data)
            return Error;
 
@@ -875,7 +872,6 @@
     register xRecordEnableContextReq           *req;
     xRecordEnableContextReply  rep;
     struct reply_buffer *reply;
-    enum parser_return status;
 
     XRecordCheckExtension (dpy, info, 0);
     LockDisplay(dpy);
@@ -887,6 +883,8 @@
 
     while (1)
     {
+       enum parser_return status;
+
        /* This code should match that in XRecordEnableContextAsync */
        if (!_XReply (dpy, (xReply *)&rep, 0, xFalse))
        {
@@ -1020,8 +1018,7 @@
     record_async_state *async_state;
 
     XRecordCheckExtension (dpy, info, 0);
-    async = (_XAsyncHandler *)Xmalloc(sizeof(_XAsyncHandler) +
-       sizeof(record_async_state));
+    async = Xmalloc(sizeof(_XAsyncHandler) + sizeof(record_async_state));
     if (!async)
        return 0;
     async_state = (record_async_state *)(async + 1);
diff -r 148750527005 -r 167020200e64 external/mit/libXtst/dist/src/XTest.c
--- a/external/mit/libXtst/dist/src/XTest.c     Tue Sep 27 18:22:36 2022 +0000
+++ b/external/mit/libXtst/dist/src/XTest.c     Tue Sep 27 18:23:26 2022 +0000
@@ -99,10 +99,11 @@
                     int *major_return, int *minor_return)
 {
     XExtDisplayInfo *info = find_display (dpy);
-    register xXTestGetVersionReq *req;
     xXTestGetVersionReply rep;
 
     if (XextHasExtension(info)) {
+       xXTestGetVersionReq *req;
+
        LockDisplay(dpy);
        GetReq(XTestGetVersion, req);
        req->reqType = info->codes->major_opcode;
@@ -259,7 +260,6 @@
     int n_axes)
 {
     deviceValuator ev;
-    int n;
 
     req->deviceid |= MORE_EVENTS;
     req->length += ((n_axes + 5) / 6) * (SIZEOF(xEvent) >> 2);
@@ -267,19 +267,24 @@
     ev.deviceid = dev->device_id;
     ev.first_valuator = first_axis;
     while (n_axes > 0) {
-       n = n_axes > 6 ? 6 : n_axes;
+       int n = n_axes > 6 ? 6 : n_axes;
        ev.num_valuators = n;
        switch (n) {
        case 6:
            ev.valuator5 = *(axes+5);
+           /* fallthrough */
        case 5:
            ev.valuator4 = *(axes+4);
+           /* fallthrough */
        case 4:
            ev.valuator3 = *(axes+3);
+           /* fallthrough */
        case 3:
            ev.valuator2 = *(axes+2);
+           /* fallthrough */
        case 2:
            ev.valuator1 = *(axes+1);
+           /* fallthrough */
        case 1:
            ev.valuator0 = *axes;
        }
@@ -428,11 +433,10 @@
 XTestDiscard(Display *dpy)
 {
     Bool something;
-    register char *ptr;
 
     LockDisplay(dpy);
     if ((something = (dpy->bufptr != dpy->buffer))) {
-       for (ptr = dpy->buffer;
+       for (char *ptr = dpy->buffer;
             ptr < dpy->bufptr;
             ptr += (((xReq *)ptr)->length << 2))
            dpy->request--;
diff -r 148750527005 -r 167020200e64 external/mit/libXxf86vm/dist/README
--- a/external/mit/libXxf86vm/dist/README       Tue Sep 27 18:22:36 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-libXxf86vm - Extension library for the XFree86-VidMode X extension
-
-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/libXxf86vm
-
-        http://cgit.freedesktop.org/xorg/lib/libXxf86vm
-
-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 148750527005 -r 167020200e64 external/mit/libXxf86vm/dist/src/XF86VMode.c
--- a/external/mit/libXxf86vm/dist/src/XF86VMode.c      Tue Sep 27 18:22:36 2022 +0000
+++ b/external/mit/libXxf86vm/dist/src/XF86VMode.c      Tue Sep 27 18:23:26 2022 +0000
@@ -267,7 +267,7 @@
     }
 
     if (modeline->privsize > 0) {
-       if (modeline->privsize < (INT_MAX / sizeof(INT32)))
+       if ((unsigned) modeline->privsize < (INT_MAX / sizeof(INT32)))
            modeline->private = Xcalloc(modeline->privsize, sizeof(INT32));
        else
            modeline->private = NULL;
@@ -418,14 +418,8 @@
  * GetReq replacement for use with VidMode protocols earlier than 2.0
  */
 #define GetOldReq(name, oldname, req) \
-        WORD64ALIGN\
-       if ((dpy->bufptr + SIZEOF(x##oldname##Req)) > dpy->bufmax)\
-               _XFlush(dpy);\
-       req = (x##oldname##Req *)(dpy->last_req = dpy->bufptr);\
-       req->reqType = X_##name;\
-       req->length = (SIZEOF(x##oldname##Req))>>2;\
-       dpy->bufptr += SIZEOF(x##oldname##Req);\
-       dpy->request++
+       req = (x##oldname##Req *) \



Home | Main Index | Thread Index | Old Index