tizen 2.3 release tizen_2.3 submit/tizen_2.3/20150202.052959 tizen_2.3_release
authorjk7744.park <jk7744.park@samsung.com>
Sun, 1 Feb 2015 04:00:41 +0000 (13:00 +0900)
committerjk7744.park <jk7744.park@samsung.com>
Sun, 1 Feb 2015 04:00:41 +0000 (13:00 +0900)
27 files changed:
bin/xevlog_analyze/xevlog_analyze.c
common/Makefile.am
common/xdbg_dbus.h
common/xdbg_dbus_client.c
common/xdbg_dbus_server.c
common/xdbg_evlog.c
common/xdbg_evlog.h
common/xdbg_evlog_composite.c
common/xdbg_evlog_core.c
common/xdbg_evlog_damage.c
common/xdbg_evlog_dri2.c
common/xdbg_evlog_gesture.c
common/xdbg_evlog_hwc.c [new file with mode: 0755]
common/xdbg_evlog_hwc.h [new file with mode: 0755]
common/xdbg_evlog_randr.c
common/xdbg_evlog_xext.c
common/xdbg_evlog_xinput.c
common/xdbg_evlog_xv.c
common/xdbg_types.h
configure.ac
lib/xdbg_log.c
lib/xdbg_log.h
lib/xdbg_log_plist.c
module/xdbg_module_evlog.c
module/xdbg_module_options.c
packaging/xorg-x11-module-xdbg.spec
xorg-x11-module-xdbg.manifest [new file with mode: 0644]

index 7f64c33..5ea0014 100644 (file)
@@ -160,6 +160,7 @@ static void _xEvlogAnalyzePrint (EvlogOption *eo, char* reply, int* len)
 
             read_len = read (fd, &Extensions_size, sizeof (int));
             GOTO_IF_FAIL (read_len == sizeof (int), print_done);
+            GOTO_IF_FAIL (Extensions_size > 0, print_done);
             total += read_len;
 
             for (i = 0 ; i < Extensions_size ; i++)
index 2473a4a..3af3469 100644 (file)
@@ -42,6 +42,10 @@ COMMON_SOURCE =  \
     ds/bool_exp_rule_checker.c \
     ds/bool_exp_tokenizer.c
 
+if HAVE_HWC
+COMMON_SOURCE += xdbg_evlog_hwc.c
+endif
+
 COMMON_CFLAGS = \
     ${CFLAGS} \
     @XDBG_CFLAGS@ \
index bc9c017..37ba436 100644 (file)
@@ -32,9 +32,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #ifndef __X_DEBUG_DBUS_H__
 #define __X_DEBUG_DBUS_H__
 
-#define XDBG_DBUS_SERVER        "org.x.dbg.server"
 #define XDBG_DBUS_INTERFACE     "org.x.dbg.interface"
-#define XDBG_DBUS_PATH          "/org/x/dbg/path"
 #define XDBG_DBUS_CLIENT        "org.x.dbg.client"
 #define XDBG_DBUS_METHOD        "x_dbg_method"
 
index 54827da..2f2550a 100644 (file)
@@ -48,6 +48,8 @@ struct _XDbgDBusClientInfo
     char reqname[STR_LEN];
     char client[STR_LEN];
     int  pid;
+    char xdbg_dbus_server[STR_LEN];
+    char xdbg_dbus_path[STR_LEN];
 };
 
 static DBusHandlerResult
@@ -74,6 +76,18 @@ _xDbgDBusClinetInit (XDbgDBusClientInfo *info)
 {
     DBusError err;
     int ret;
+    char *display_num;
+
+    if(!(display_num = getenv("DISPLAY")))
+    {
+        XDBG_LOG ("[CLIENT:%s] failed: get DISPLAY ENV\n", info->client);
+        return FALSE;
+    }
+
+    snprintf(info->xdbg_dbus_server, sizeof(info->xdbg_dbus_path), "org.x.dbg.server%d", atoi(display_num));
+    snprintf(info->xdbg_dbus_path, sizeof(info->xdbg_dbus_path), "/org/x/dbg/path/%d", atoi(display_num));
+
+    XDBG_LOG ("[CLIENT:%s] display number :%d\n", info->client, atoi(display_num));
 
     dbus_error_init (&err);
     RETURN_VAL_IF_FAIL (info->conn == NULL, FALSE);
@@ -205,7 +219,7 @@ xDbugDBusClientSendMessage (XDbgDBusClientInfo *info, int argc, char **argv)
 
     dbus_error_init (&err);
 
-    msg = dbus_message_new_method_call (XDBG_DBUS_SERVER, XDBG_DBUS_PATH,
+    msg = dbus_message_new_method_call (info->xdbg_dbus_server, info->xdbg_dbus_path,
                                         XDBG_DBUS_INTERFACE, XDBG_DBUS_METHOD);
     GOTO_IF_FAIL (msg != NULL, err_send);
 
index ab2645f..3b3180c 100644 (file)
@@ -51,6 +51,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define RECONNECT_TIME  1000
 #define DISPATCH_TIME   50
 
+extern _X_EXPORT char *display;
+
 typedef struct _XDbgDBusServerInfo
 {
     OsTimerPtr timer;
@@ -58,6 +60,8 @@ typedef struct _XDbgDBusServerInfo
     XDbgDbusServerMethod *methods;
     char rule[STR_LEN];
     int fd;
+    char xdbg_dbus_server[STR_LEN];
+    char xdbg_dbus_path[STR_LEN];
 } XDbgDBusServerInfo;
 
 static XDbgDBusServerInfo server_info;
@@ -286,6 +290,11 @@ _xDbgDBusServerInit (XDbgDBusServerInfo *info)
 
     XDBG_RETURN_VAL_IF_FAIL (info->conn == NULL, FALSE);
 
+    snprintf(info->xdbg_dbus_server, sizeof(info->xdbg_dbus_server), "org.x.dbg.server%d", atoi(display));
+    snprintf(info->xdbg_dbus_path, sizeof(info->xdbg_dbus_path), "/org/x/dbg/path/%d", atoi(display));
+
+    XDBG_DEBUG (MDBUS, "[SERVER] display number %d\n", atoi(display));
+
     info->conn = dbus_bus_get (DBUS_BUS_SYSTEM, &err);
     if (dbus_error_is_set (&err))
     {
@@ -298,7 +307,7 @@ _xDbgDBusServerInit (XDbgDBusServerInfo *info)
         goto free_err;
     }
 
-    ret = dbus_bus_request_name (info->conn, XDBG_DBUS_SERVER,
+    ret = dbus_bus_request_name (info->conn, info->xdbg_dbus_server,
                                  DBUS_NAME_FLAG_REPLACE_EXISTING , &err);
     if (dbus_error_is_set (&err))
     {
@@ -323,7 +332,7 @@ _xDbgDBusServerInit (XDbgDBusServerInfo *info)
     }
 
     if (!dbus_connection_register_object_path (info->conn,
-                                               XDBG_DBUS_PATH, &vtable,
+                                               info->xdbg_dbus_path, &vtable,
                                                info))
     {
         XDBG_ERROR (MDBUS, "[SERVER] failed: register object path\n");
@@ -357,12 +366,12 @@ _xDbgDBusServerInit (XDbgDBusServerInfo *info)
 free_filter:
     dbus_connection_remove_filter (info->conn, _xDbgDBusServerMsgFilter, info);
 free_register:
-    dbus_connection_unregister_object_path (info->conn, XDBG_DBUS_PATH);
+    dbus_connection_unregister_object_path (info->conn, info->xdbg_dbus_path);
 free_match:
     dbus_bus_remove_match (info->conn, info->rule, &err);
     dbus_error_free (&err);
 free_name:
-    dbus_bus_release_name (info->conn, XDBG_DBUS_SERVER, &err);
+    dbus_bus_release_name (info->conn, info->xdbg_dbus_server, &err);
     dbus_error_free (&err);
 free_conn:
     dbus_connection_close (info->conn);
@@ -388,10 +397,10 @@ _xDbgDBusServerDeinit (XDbgDBusServerInfo *info)
         DBusError err;
         dbus_error_init (&err);
         dbus_connection_remove_filter (info->conn, _xDbgDBusServerMsgFilter, info);
-        dbus_connection_unregister_object_path (info->conn, XDBG_DBUS_PATH);
+        dbus_connection_unregister_object_path (info->conn, info->xdbg_dbus_path);
         dbus_bus_remove_match (info->conn, info->rule, &err);
         dbus_error_free (&err);
-        dbus_bus_release_name (info->conn, XDBG_DBUS_SERVER, &err);
+        dbus_bus_release_name (info->conn, info->xdbg_dbus_server, &err);
         dbus_error_free (&err);
         dbus_connection_unref (info->conn);
         info->conn = NULL;
index b572b6c..9da588c 100644 (file)
@@ -29,6 +29,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 **************************************************************************/
 
+#include <config.h>
+
 #include <stdio.h>
 #include <string.h>
 #include <strings.h>
@@ -241,7 +243,7 @@ xDbgEvlogRuleSet (const int argc, const char **argv, char *reply, int *len)
         if (!xDbgEvlogReadRuleFile(argv[1], reply, len))
             return FALSE;
         rulechecker_print_rule (rc, reply, len);
-        
+
         return TRUE;
     }
     else if (!_strcasecmp (command, "print"))
@@ -337,12 +339,13 @@ xDbgEvlogReadRuleFile(const char *filename, char *reply, int *len)
 
         pfs += (strlen(new_argv[2]) + 1);
 
-
         if(!xDbgEvlogRuleSet ((const int) new_argc, (const char**) new_argv, reply, len))
         {
+            if (fd >= 0)
+                close (fd);
+
             return FALSE;
         }
-
     }
 
     if (fd >= 0)
@@ -351,7 +354,6 @@ xDbgEvlogReadRuleFile(const char *filename, char *reply, int *len)
     return TRUE;
 }
 
-
 ExtensionInfo Evlog_extensions[] = {
     {xDbgEvlogCompositeGetBase, 0, 0, 0, NULL, NULL},
     {xDbgEvlogDamageGetBase, 0, 0, 0, NULL, NULL},
@@ -365,8 +367,12 @@ ExtensionInfo Evlog_extensions[] = {
     {xDbgEvlogXextXtestGetBase, 0, 0, 0, NULL, NULL},
     {xDbgEvlogXextXtestExt1GetBase, 0, 0, 0, NULL, NULL},
     {xDbgEvlogXextShapeGetBase, 0, 0, 0, NULL, NULL},
-    {xDbgEvlogXvGetBase, 0, 0, 0, NULL, NULL}
+    {xDbgEvlogXvGetBase, 0, 0, 0, NULL, NULL},
+#if HAVE_HWC
+    {xDbgEvlogHwcGetBase, 0, 0, 0, NULL, NULL},
+#endif
 };
+
 ExtensionInfo* Sorted_Evlog_extensions;
 int Extensions_size = 0;
 
@@ -455,7 +461,7 @@ xDbgEvlogFillLog (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     else
         REPLY ("[%10.3f][%5ld] %22s(%2d:%5d) %s %7s ",
                     evinfo->time / 1000.0,
-                    evinfo->time - prev,
+                    (long int)evinfo->time - prev,
                     xDbgEvlogGetCmd (evinfo->client.command),
                     evinfo->client.index,
                     evinfo->client.pid,
@@ -483,9 +489,9 @@ xDbgEvlogFillLog (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     }
     else if (evinfo->type == ERROR)
     {
-        REPLY("(ErrorCode(0x%02x) resourceID(0x%lx) majorCode(%d) minorCode(%d))",
+        REPLY("(ErrorCode(0x%02x) resourceID(0x%x) majorCode(%d) minorCode(%d))",
             evinfo->err.errorCode,
-            evinfo->err.resourceID,
+            (unsigned int)evinfo->err.resourceID,
             evinfo->err.majorCode,
             evinfo->err.minorCode);
     }
@@ -563,7 +569,7 @@ char* xDbgGetAtom(Atom atom, EvlogInfo *evinfo, char *reply, int *len)
     if (NameForAtom(atom))
         snprintf (table->buf, XDBG_BUF_SIZE, "%s", (char*)NameForAtom(atom));
     else
-        snprintf (table->buf, XDBG_BUF_SIZE, "0x%lx", atom);
+        snprintf (table->buf, XDBG_BUF_SIZE, "0x%x", (unsigned int)atom);
 
     xorg_list_add(&table->link, &evinfo->evatom.list);
     evinfo->evatom.size++;
@@ -607,7 +613,7 @@ char* xDbgGetRegion(XserverRegion region, EvlogInfo *evinfo, char *reply, int *l
 
         table->xid = region;
 
-        snprintf (table->buf, XDBG_BUF_SIZE, "0x%lx", region);
+        snprintf (table->buf, XDBG_BUF_SIZE, "0x%x", (unsigned int)region);
         xorg_list_add(&table->link, &evinfo->evregion.list);
         evinfo->evregion.size++;
     }
index 0c1069e..70a2742 100644 (file)
@@ -32,6 +32,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #ifndef __XDBG_EVLOG_H__
 #define __XDBG_EVLOG_H__
 
+#include <config.h>
+
 #include "xdbg_types.h"
 #include "xdbg_evlog_request.h"
 #include "xdbg_evlog_event.h"
@@ -46,6 +48,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "xdbg_evlog_randr.h"
 #include "xdbg_evlog_xinput.h"
 #include "xdbg_evlog_xv.h"
+#if HAVE_HWC
+#include "xdbg_evlog_hwc.h"
+#endif
 #include <list.h>
 
 
index 0f887d3..c64e965 100644 (file)
@@ -53,6 +53,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include <windowstr.h>
 #include <X11/extensions/Xcomposite.h>
 #include <X11/extensions/compositeproto.h>
+#include <X11/extensions/composite.h>
 
 #include "xdbg_types.h"
 #include "xdbg_evlog_composite.h"
@@ -68,8 +69,8 @@ _EvlogRequestComposite(EvlogInfo *evinfo, int detail_level, char *reply, int *le
     case X_CompositeRedirectWindow:
         {
             xCompositeRedirectWindowReq *stuff = (xCompositeRedirectWindowReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -83,8 +84,8 @@ _EvlogRequestComposite(EvlogInfo *evinfo, int detail_level, char *reply, int *le
     case X_CompositeRedirectSubwindows:
         {
             xCompositeRedirectSubwindowsReq *stuff = (xCompositeRedirectSubwindowsReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -98,8 +99,8 @@ _EvlogRequestComposite(EvlogInfo *evinfo, int detail_level, char *reply, int *le
     case X_CompositeUnredirectWindow:
         {
             xCompositeUnredirectWindowReq *stuff = (xCompositeUnredirectWindowReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -113,8 +114,8 @@ _EvlogRequestComposite(EvlogInfo *evinfo, int detail_level, char *reply, int *le
     case X_CompositeUnredirectSubwindows:
         {
             xCompositeUnredirectSubwindowsReq *stuff = (xCompositeUnredirectSubwindowsReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -128,13 +129,27 @@ _EvlogRequestComposite(EvlogInfo *evinfo, int detail_level, char *reply, int *le
     case X_CompositeNameWindowPixmap:
         {
             xCompositeNameWindowPixmapReq *stuff = (xCompositeNameWindowPixmapReq *)req;
-            REPLY (": XID(0x%lx) Pixmap(0x%lx)",
-                stuff->window,
-                stuff->pixmap);
+            REPLY (": XID(0x%x) Pixmap(0x%x)",
+                (unsigned int)stuff->window,
+                (unsigned int)stuff->pixmap);
 
             return reply;
         }
 
+#ifdef _F_INPUT_REDIRECTION_
+    case X_CompositeSetCoordinateTransform:
+        {
+            xCompositeSetCoordinateTransformReq *stuff = (xCompositeSetCoordinateTransformReq *)req;
+            REPLY (": XID(0x%x) (%.3f,%.3f,%.3f) (%.3f,%.3f,%.3f) (%.3f,%.3f,%.3f)",
+                (unsigned int)stuff->window,
+                (float)pixman_fixed_to_double(stuff->transform.matrix11), (float)pixman_fixed_to_double(stuff->transform.matrix12), (float)pixman_fixed_to_double(stuff->transform.matrix13),
+                (float)pixman_fixed_to_double(stuff->transform.matrix21), (float)pixman_fixed_to_double(stuff->transform.matrix22), (float)pixman_fixed_to_double(stuff->transform.matrix23),
+                (float)pixman_fixed_to_double(stuff->transform.matrix31), (float)pixman_fixed_to_double(stuff->transform.matrix32), (float)pixman_fixed_to_double(stuff->transform.matrix33));
+
+            return reply;
+        }
+#endif
+
     default:
             break;
     }
index 8dffeb4..6c5934a 100755 (executable)
@@ -283,9 +283,9 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
         {
             xCreateWindowReq *stuff = (xCreateWindowReq *)req;
 
-            REPLY (": Window(0x%lx) Parent(0x%lx) size(%dx%d) boaderWid(%d) coordinate(%d,%d)",
-                stuff->wid,
-                stuff->parent,
+            REPLY (": Window(0x%x) Parent(0x%x) size(%dx%d) boaderWid(%d) coordinate(%d,%d)",
+                (unsigned int)stuff->wid,
+                (unsigned int)stuff->parent,
                 stuff->width,
                 stuff->height,
                 stuff->borderWidth,
@@ -300,7 +300,7 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
                 switch (stuff->visual)
                 {
                     case CopyFromParent:  visual = "CopyFromParent"; break;
-                    default:  visual = dvisual; snprintf (dvisual, 10, "0x%lx", stuff->visual); break;
+                    default:  visual = dvisual; snprintf (dvisual, 10, "0x%x", (unsigned int)stuff->visual); break;
                 }
 
                 switch (stuff->class)
@@ -330,14 +330,16 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_ChangeWindowAttributes:
         {
             xChangeWindowAttributesReq *stuff = (xChangeWindowAttributesReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)", (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
-    \r           REPLY (" value_mask");
+    \r           REPLY (" detail");
     \r           REPLY ("(");
                 reply = _getWindowAttributeMask(stuff->valueMask, reply, len);
+                if (stuff->valueMask == CWEventMask)
+        
+           REPLY (", mask(%x)", (unsigned int)*((XID *)&stuff[1]));
     \r           REPLY (")");
             }
 
@@ -348,8 +350,8 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
         {
             xChangeSaveSetReq *stuff = (xChangeSaveSetReq *)req;
 
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -373,9 +375,9 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_ReparentWindow:
         {
             xReparentWindowReq *stuff = (xReparentWindowReq *)req;
-            REPLY (": Window(0x%lx) Parent(0x%lx) coord(%d,%d)",
-                stuff->window,
-                stuff->parent,
+            REPLY (": Window(0x%x) Parent(0x%x) coord(%d,%d)",
+                (unsigned int)stuff->window,
+                (unsigned int)stuff->parent,
                 stuff->x,
                 stuff->y);
 
@@ -385,8 +387,8 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_ConfigureWindow:
         {
             xConfigureWindowReq *stuff = (xConfigureWindowReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -403,8 +405,8 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
         {
             xCirculateWindowReq *stuff = (xCirculateWindowReq *)req;
 
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -429,8 +431,8 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
         {
             xChangePropertyReq *stuff = (xChangePropertyReq *)req;
 
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             REPLY (" Property");
             reply = xDbgGetAtom(stuff->property, evinfo, reply, len);
@@ -456,7 +458,7 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
                     " ",
                     mode,
                     stuff->format,
-                    stuff->nUnits);
+                    (long int)stuff->nUnits);
             }
 
             return reply;
@@ -465,8 +467,8 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_DeleteProperty:
         {
             xDeletePropertyReq *stuff = (xDeletePropertyReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             REPLY (" Property");
             reply = xDbgGetAtom(stuff->property, evinfo, reply, len);
@@ -478,8 +480,8 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
         {
             xGetPropertyReq *stuff = (xGetPropertyReq *)req;
 
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             REPLY (" Property");
             reply = xDbgGetAtom(stuff->property, evinfo, reply, len);
@@ -492,8 +494,8 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
                 REPLY ("%67s delete(%s) longOffset(%ld) longLength(%ld)",
                     " ",
                     stuff->delete ? "YES" : "NO",
-                    stuff->longOffset,
-                    stuff->longLength);
+                    (long int)stuff->longOffset,
+                    (long int)stuff->longLength);
             }
 
             return reply;
@@ -502,8 +504,8 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_SetSelectionOwner:
         {
             xSetSelectionOwnerReq *stuff = (xSetSelectionOwnerReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             REPLY (" Selection");
             reply = xDbgGetAtom(stuff->selection, evinfo, reply, len);
@@ -511,7 +513,7 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" time(%lums)",
-                    stuff->time);
+                    (unsigned long)stuff->time);
             }
 
             return reply;
@@ -520,8 +522,8 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_ConvertSelection:
         {
             xConvertSelectionReq *stuff = (xConvertSelectionReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->requestor);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->requestor);
 
             REPLY (" Selection");
             reply = xDbgGetAtom(stuff->selection, evinfo, reply, len);
@@ -533,7 +535,7 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" time(%lums)",
-                    stuff->time);
+                    (unsigned long)stuff->time);
             }
 
             return reply;
@@ -542,8 +544,8 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_SendEvent:
         {
             xSendEventReq *stuff = (xSendEventReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->destination);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->destination);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -563,10 +565,10 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
         {
             xGrabPointerReq *stuff = (xGrabPointerReq *)req;
 
-            REPLY (": XID(0x%lx) ConfineTo(0x%lx) Cursor(0x%lx)",
-                stuff->grabWindow,
-                stuff->confineTo,
-                stuff->cursor);
+            REPLY (": XID(0x%x) ConfineTo(0x%x) Cursor(0x%x)",
+                (unsigned int)stuff->grabWindow,
+                (unsigned int)stuff->confineTo,
+                (unsigned int)stuff->cursor);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -590,7 +592,7 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
                 REPLY (" pointer_mode(%s) keyboard_mode(%s) time(%lums)\n",
                     pointer_mode,
                     keyboard_mode,
-                    stuff->time);
+                    (unsigned long)stuff->time);
 
                 REPLY (" event_mask");
                 REPLY ("(");
@@ -605,10 +607,10 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
         {
             xGrabButtonReq *stuff = (xGrabButtonReq *)req;
 
-            REPLY (": XID(0x%lx) ConfineTo(0x%lx) Cursor(0x%lx)",
-                stuff->grabWindow,
-                stuff->confineTo,
-                stuff->cursor);
+            REPLY (": XID(0x%x) ConfineTo(0x%x) Cursor(0x%x)",
+                (unsigned int)stuff->grabWindow,
+                (unsigned int)stuff->confineTo,
+                (unsigned int)stuff->cursor);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -659,8 +661,8 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_UngrabButton:
         {
             xUngrabButtonReq *stuff = (xUngrabButtonReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->grabWindow);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->grabWindow);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -676,13 +678,13 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_ChangeActivePointerGrab:
         {
             xChangeActivePointerGrabReq *stuff = (xChangeActivePointerGrabReq *)req;
-            REPLY (": Cursor(0x%lx)",
-                stuff->cursor);
+            REPLY (": Cursor(0x%x)",
+                (unsigned int)stuff->cursor);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" time(%lums)",
-                    stuff->time);
+                    (unsigned long)stuff->time);
 
                 REPLY (" event_mask");
                 REPLY ("(");
@@ -697,8 +699,8 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
         {
             xGrabKeyboardReq *stuff = (xGrabKeyboardReq *)req;
 
-            REPLY (": XID(0x%lx)",
-                stuff->grabWindow);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->grabWindow);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -732,8 +734,8 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
         {
             xGrabKeyReq *stuff = (xGrabKeyReq *)req;
 
-            REPLY (": XID(0x%lx)",
-                stuff->grabWindow);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->grabWindow);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -771,8 +773,8 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_UngrabKey:
         {
             xUngrabKeyReq *stuff = (xUngrabKeyReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->grabWindow);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->grabWindow);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -791,14 +793,14 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_SetInputFocus:
         {
             xSetInputFocusReq *stuff = (xSetInputFocusReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->focus);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->focus);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" reverTo(%d) time(%lums)",
                     stuff->revertTo,
-                    stuff->time);
+                    (unsigned long)stuff->time);
             }
 
             return reply;
@@ -807,9 +809,9 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_CreatePixmap:
         {
             xCreatePixmapReq *stuff = (xCreatePixmapReq *)req;
-            REPLY (": Pixmap(0x%lx) Drawable(0x%lx) size(%dx%d)",
-                stuff->pid,
-                stuff->drawable,
+            REPLY (": Pixmap(0x%x) Drawable(0x%x) size(%dx%d)",
+                (unsigned int)stuff->pid,
+                (unsigned int)stuff->drawable,
                 stuff->width,
                 stuff->height);
 
@@ -822,11 +824,21 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
             return reply;
         }
 
+    case X_CreateGC:
+        {
+            xCreateGCReq *stuff = (xCreateGCReq *)req;
+            REPLY (": Gc(0x%x) Drawable(0x%x)",
+                (unsigned int)stuff->gc,
+                (unsigned int)stuff->drawable);
+
+            return reply;
+        }
+
     case X_ClearArea:
         {
             xClearAreaReq *stuff = (xClearAreaReq *)req;
-            REPLY (": XID(0x%lx) area(%d,%d %dx%d)",
-                stuff->window,
+            REPLY (": XID(0x%x) area(%d,%d %dx%d)",
+                (unsigned int)stuff->window,
                 stuff->x,
                 stuff->y,
                 stuff->width,
@@ -844,10 +856,10 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_CopyArea:
         {
             xCopyAreaReq *stuff = (xCopyAreaReq *)req;
-            REPLY (": srcXID(0x%lx) dstXID(0x%lx) gc(0x%lx) size(%dx%d) src(%d,%d) dst(%d,%d)",
-                stuff->srcDrawable,
-                stuff->dstDrawable,
-                stuff->gc,
+            REPLY (": srcXID(0x%x) dstXID(0x%x) gc(0x%x) size(%dx%d) src(%d,%d) dst(%d,%d)",
+                (unsigned int)stuff->srcDrawable,
+                (unsigned int)stuff->dstDrawable,
+                (unsigned int)stuff->gc,
                 stuff->width,
                 stuff->height,
                 stuff->srcX,
@@ -861,10 +873,10 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_CopyPlane:
         {
             xCopyPlaneReq *stuff = (xCopyPlaneReq *)req;
-            REPLY (": srcXID(0x%lx) dstXID(0x%lx) gc(0x%lx) size(%dx%d) src(%d,%d) dst(%d,%d)",
-                stuff->srcDrawable,
-                stuff->dstDrawable,
-                stuff->gc,
+            REPLY (": srcXID(0x%x) dstXID(0x%x) gc(0x%x) size(%dx%d) src(%d,%d) dst(%d,%d)",
+                (unsigned int)stuff->srcDrawable,
+                (unsigned int)stuff->dstDrawable,
+                (unsigned int)stuff->gc,
                 stuff->width,
                 stuff->height,
                 stuff->srcX,
@@ -874,8 +886,8 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
-                REPLY (" bit_plane(0x%lx)",
-                    stuff->bitPlane);
+                REPLY (" bit_plane(0x%x)",
+                    (unsigned int)stuff->bitPlane);
             }
 
             return reply;
@@ -884,9 +896,9 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_PolyPoint:
         {
             xPolyPointReq *stuff = (xPolyPointReq *)req;
-            REPLY (": XID(0x%lx) gc(0x%lx)",
-                stuff->drawable,
-                stuff->gc);
+            REPLY (": XID(0x%x) gc(0x%x)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -910,9 +922,9 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_PolyLine:
         {
             xPolyLineReq *stuff = (xPolyLineReq *)req;
-            REPLY (": XID(0x%lx gc(0x%lx)",
-                stuff->drawable,
-                stuff->gc);
+            REPLY (": XID(0x%x gc(0x%x)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -936,9 +948,9 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_PolySegment:
         {
             xPolySegmentReq *stuff = (xPolySegmentReq *)req;
-            REPLY (": XID(0x%lx) gc(0x%lx)",
-                stuff->drawable,
-                stuff->gc);
+            REPLY (": XID(0x%x) gc(0x%x)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc);
 
             return reply;
         }
@@ -946,9 +958,9 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_PolyRectangle:
         {
             xPolyRectangleReq *stuff = (xPolyRectangleReq *)req;
-            REPLY (": XID(0x%lx) gc(0x%lx)",
-                stuff->drawable,
-                stuff->gc);
+            REPLY (": XID(0x%x) gc(0x%x)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc);
 
             return reply;
         }
@@ -956,9 +968,9 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_PolyArc:
         {
             xPolyArcReq *stuff = (xPolyArcReq *)req;
-            REPLY (": XID(0x%lx) gc(0x%lx)",
-                stuff->drawable,
-                stuff->gc);
+            REPLY (": XID(0x%x) gc(0x%x)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc);
 
             return reply;
         }
@@ -966,9 +978,9 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_FillPoly:
         {
             xFillPolyReq *stuff = (xFillPolyReq *)req;
-            REPLY (": XID(0x%lx) gc(0x%lx)",
-                stuff->drawable,
-                stuff->gc);
+            REPLY (": XID(0x%x) gc(0x%x)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -1001,9 +1013,9 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_PolyFillRectangle:
         {
             xPolyFillRectangleReq *stuff = (xPolyFillRectangleReq *)req;
-            REPLY (": XID(0x%lx) gc(0x%lx)",
-                stuff->drawable,
-                stuff->gc);
+            REPLY (": XID(0x%x) gc(0x%x)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc);
 
             return reply;
         }
@@ -1011,9 +1023,9 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_PolyFillArc:
         {
             xPolyFillArcReq *stuff = (xPolyFillArcReq *)req;
-            REPLY (": XID(0x%lx) gc(0x%lx)",
-                stuff->drawable,
-                stuff->gc);
+            REPLY (": XID(0x%x) gc(0x%x)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc);
 
             return reply;
         }
@@ -1021,9 +1033,9 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_PutImage:
         {
             xPutImageReq *stuff = (xPutImageReq *)req;
-            REPLY (": XID(0x%lx) gc(0x%lx) size(%dx%d) dst(%d,%d)",
-                stuff->drawable,
-                stuff->gc,
+            REPLY (": XID(0x%x) gc(0x%x) size(%dx%d) dst(%d,%d)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc,
                 stuff->width,
                 stuff->height,
                 stuff->dstX,
@@ -1053,8 +1065,8 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_GetImage:
         {
             xGetImageReq *stuff = (xGetImageReq *)req;
-            REPLY (": XID(0x%lx) size(%dx%d) dst(%d,%d)",
-                stuff->drawable,
+            REPLY (": XID(0x%x) size(%dx%d) dst(%d,%d)",
+                (unsigned int)stuff->drawable,
                 stuff->width,
                 stuff->height,
                 stuff->x,
@@ -1073,9 +1085,9 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
                     default:  format = dformat; snprintf (dformat, 10, "%d", stuff->format); break;
                 }
 
-                REPLY (" format(%s) plane_mask(0x%lx)",
+                REPLY (" format(%s) plane_mask(0x%x)",
                     format,
-                    stuff->planeMask);
+                    (unsigned int)stuff->planeMask);
             }
 
             return reply;
@@ -1084,9 +1096,9 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_PolyText8:
         {
             xPolyText8Req *stuff = (xPolyText8Req *)req;
-            REPLY (": XID(0x%lx) gc(0x%lx) coord(%d,%d)",
-                stuff->drawable,
-                stuff->gc,
+            REPLY (": XID(0x%x) gc(0x%x) coord(%d,%d)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc,
                 stuff->x,
                 stuff->y);
 
@@ -1096,9 +1108,9 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_PolyText16:
         {
             xPolyText16Req *stuff = (xPolyText16Req *)req;
-            REPLY (": XID(0x%lx) gc(0x%lx) coord(%d,%d)",
-                stuff->drawable,
-                stuff->gc,
+            REPLY (": XID(0x%x) gc(0x%x) coord(%d,%d)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc,
                 stuff->x,
                 stuff->y);
 
@@ -1108,9 +1120,9 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_ImageText8:
         {
             xImageText8Req *stuff = (xImageText8Req *)req;
-            REPLY (": XID(0x%lx) gc(0x%lx) coord(%d,%d)",
-                stuff->drawable,
-                stuff->gc,
+            REPLY (": XID(0x%x) gc(0x%x) coord(%d,%d)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc,
                 stuff->x,
                 stuff->y);
 
@@ -1126,9 +1138,9 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_ImageText16:
         {
             xImageText16Req *stuff = (xImageText16Req *)req;
-            REPLY (": XID(0x%lx) gc(0x%lx) coord(%d,%d)",
-                stuff->drawable,
-                stuff->gc,
+            REPLY (": XID(0x%x) gc(0x%x) coord(%d,%d)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc,
                 stuff->x,
                 stuff->y);
 
@@ -1225,10 +1237,11 @@ char * xDbgEvlogRequestCore (EvlogInfo *evinfo, int detail_level, char *reply, i
     case X_UngrabKeyboard:
     case X_FreePixmap:
     case X_KillClient:
+    case X_FreeGC:
         {
             xResourceReq *stuff = (xResourceReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->id);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->id);
 
             return reply;
         }
@@ -1252,14 +1265,14 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
     case ButtonRelease:
     case MotionNotify:
         {
-            REPLY (": Root(0x%lx %d,%d) Event(0x%lx %d,%d) Child(0x%lx)",
-                evt->u.keyButtonPointer.root,
+            REPLY (": Root(0x%x %d,%d) Event(0x%x %d,%d) Child(0x%x)",
+                (unsigned int)evt->u.keyButtonPointer.root,
                 evt->u.keyButtonPointer.rootX,
                 evt->u.keyButtonPointer.rootY,
-                evt->u.keyButtonPointer.event,
+                (unsigned int)evt->u.keyButtonPointer.event,
                 evt->u.keyButtonPointer.eventX,
                 evt->u.keyButtonPointer.eventY,
-                evt->u.keyButtonPointer.child);
+                (unsigned int)evt->u.keyButtonPointer.child);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -1276,21 +1289,21 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
     case EnterNotify:
     case LeaveNotify:
         {
-            REPLY (": Root(0x%lx %d,%d) Event(0x%lx %d,%d) Child(0x%lx)",
-                evt->u.enterLeave.root,
+            REPLY (": Root(0x%x %d,%d) Event(0x%x %d,%d) Child(0x%x)",
+                (unsigned int)evt->u.enterLeave.root,
                 evt->u.enterLeave.rootX,
                 evt->u.enterLeave.rootY,
-                evt->u.enterLeave.event,
+                (unsigned int)evt->u.enterLeave.event,
                 evt->u.enterLeave.eventX,
                 evt->u.enterLeave.eventY,
-                evt->u.enterLeave.child);
+                (unsigned int)evt->u.enterLeave.child);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY ("\n");
                 REPLY ("%67s time(%lums) state(0x%x) same_screen(%s) focus(%s)",
                     " ",
-                    evt->u.enterLeave.time,
+                    (unsigned long)evt->u.enterLeave.time,
                     evt->u.enterLeave.state,
                     evt->u.enterLeave.flags & ELFlagSameScreen ? "YES" : "NO",
                     evt->u.enterLeave.flags & ELFlagFocus ? "YES" : "NO");
@@ -1303,8 +1316,8 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
     case FocusOut:
     case KeymapNotify:
         {
-            REPLY (": XID(0x%lx)",
-                evt->u.focus.window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)evt->u.focus.window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -1329,8 +1342,8 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case Expose:
         {
-            REPLY (": XID(0x%lx) size(%dx%d) coord(%d,%d)",
-                evt->u.expose.window,
+            REPLY (": XID(0x%x) size(%dx%d) coord(%d,%d)",
+                (unsigned int)evt->u.expose.window,
                 evt->u.expose.width,
                 evt->u.expose.height,
                 evt->u.expose.x,
@@ -1347,8 +1360,8 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case GraphicsExpose:
         {
-            REPLY (": XID(0x%lx) size(%dx%d) coord(%d,%d)",
-                evt->u.graphicsExposure.drawable,
+            REPLY (": XID(0x%x) size(%dx%d) coord(%d,%d)",
+                (unsigned int)evt->u.graphicsExposure.drawable,
                 evt->u.graphicsExposure.width,
                 evt->u.graphicsExposure.height,
                 evt->u.graphicsExposure.x,
@@ -1377,8 +1390,8 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case NoExpose:
         {
-            REPLY (": XID(0x%lx)",
-                evt->u.noExposure.drawable);
+            REPLY (": XID(0x%x)",
+                (unsigned int)evt->u.noExposure.drawable);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -1402,8 +1415,8 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case VisibilityNotify:
         {
-            REPLY (": XID(0x%lx)",
-                evt->u.visibility.window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)evt->u.visibility.window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -1427,9 +1440,9 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case CreateNotify:
         {
-            REPLY (": Window(0x%lx) Parent(0x%lx) size(%dx%d) coord(%d,%d) borderWidth(%d)",
-                evt->u.createNotify.window,
-                evt->u.createNotify.parent,
+            REPLY (": Window(0x%x) Parent(0x%x) size(%dx%d) coord(%d,%d) borderWidth(%d)",
+                (unsigned int)evt->u.createNotify.window,
+                (unsigned int)evt->u.createNotify.parent,
                 evt->u.createNotify.width,
                 evt->u.createNotify.height,
                 evt->u.createNotify.x,
@@ -1447,18 +1460,18 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case DestroyNotify:
         {
-            REPLY (": Window(0x%lx) Event(0x%lx)",
-                evt->u.destroyNotify.window,
-                evt->u.destroyNotify.event);
+            REPLY (": Window(0x%x) Event(0x%x)",
+                (unsigned int)evt->u.destroyNotify.window,
+                (unsigned int)evt->u.destroyNotify.event);
 
             return reply;
                }
 
     case UnmapNotify:
         {
-            REPLY (": Window(0x%lx) Event(0x%lx)",
-                evt->u.unmapNotify.window,
-                evt->u.unmapNotify.event);
+            REPLY (": Window(0x%x) Event(0x%x)",
+                (unsigned int)evt->u.unmapNotify.window,
+                (unsigned int)evt->u.unmapNotify.event);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -1471,9 +1484,9 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case MapNotify:
         {
-            REPLY (": Window(0x%lx) Event(0x%lx)",
-                evt->u.mapNotify.window,
-                evt->u.mapNotify.event);
+            REPLY (": Window(0x%x) Event(0x%x)",
+                (unsigned int)evt->u.mapNotify.window,
+                (unsigned int)evt->u.mapNotify.event);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -1486,19 +1499,19 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case MapRequest:
         {
-            REPLY (": Window(0x%lx) Parent(0x%lx)",
-                evt->u.mapRequest.window,
-                evt->u.mapRequest.parent);
+            REPLY (": Window(0x%x) Parent(0x%x)",
+                (unsigned int)evt->u.mapRequest.window,
+                (unsigned int)evt->u.mapRequest.parent);
 
             return reply;
         }
 
     case ReparentNotify:
         {
-            REPLY (": Window(0x%lx) Event(0x%lx) Parent(0x%lx) coord(%d,%d)",
-                evt->u.reparent.window,
-                evt->u.reparent.event,
-                evt->u.reparent.parent,
+            REPLY (": Window(0x%x) Event(0x%x) Parent(0x%x) coord(%d,%d)",
+                (unsigned int)evt->u.reparent.window,
+                (unsigned int)evt->u.reparent.event,
+                (unsigned int)evt->u.reparent.parent,
                 evt->u.reparent.x,
                 evt->u.reparent.y);
 
@@ -1513,10 +1526,10 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case ConfigureNotify:
         {
-            REPLY (": Window(0x%lx) Event(0x%lx) AboveSibling(0x%lx) size(%dx%d) coord(%d,%d) borderWidth(%d)",
-                evt->u.configureNotify.window,
-                evt->u.configureNotify.event,
-                evt->u.configureNotify.aboveSibling,
+            REPLY (": Window(0x%x) Event(0x%x) AboveSibling(0x%x) size(%dx%d) coord(%d,%d) borderWidth(%d)",
+                (unsigned int)evt->u.configureNotify.window,
+                (unsigned int)evt->u.configureNotify.event,
+                (unsigned int)evt->u.configureNotify.aboveSibling,
                 evt->u.configureNotify.width,
                 evt->u.configureNotify.height,
                 evt->u.configureNotify.x,
@@ -1534,10 +1547,10 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case ConfigureRequest:
         {
-            REPLY (": Window(0x%lx) Parent(0x%lx) Sibling(0x%lx) size(%dx%d) coord(%d,%d) borderWidth(%d)",
-                evt->u.configureRequest.window,
-                evt->u.configureRequest.parent,
-                evt->u.configureRequest.sibling,
+            REPLY (": Window(0x%x) Parent(0x%x) Sibling(0x%x) size(%dx%d) coord(%d,%d) borderWidth(%d)",
+                (unsigned int)evt->u.configureRequest.window,
+                (unsigned int)evt->u.configureRequest.parent,
+                (unsigned int)evt->u.configureRequest.sibling,
                 evt->u.configureRequest.width,
                 evt->u.configureRequest.height,
                 evt->u.configureRequest.x,
@@ -1559,9 +1572,9 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case GravityNotify:
         {
-            REPLY (": Window(0x%lx) Event(0x%lx) coord(%d,%d)",
-                evt->u.gravity.window,
-                evt->u.gravity.event,
+            REPLY (": Window(0x%x) Event(0x%x) coord(%d,%d)",
+                (unsigned int)evt->u.gravity.window,
+                (unsigned int)evt->u.gravity.event,
                 evt->u.gravity.x,
                 evt->u.gravity.y);
 
@@ -1570,8 +1583,8 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case ResizeRequest:
         {
-            REPLY (": Window(0x%lx) size(%dx%d)",
-                evt->u.resizeRequest.window,
+            REPLY (": Window(0x%x) size(%dx%d)",
+                (unsigned int)evt->u.resizeRequest.window,
                 evt->u.resizeRequest.width,
                 evt->u.resizeRequest.height);
 
@@ -1581,10 +1594,10 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
     case CirculateNotify:
     case CirculateRequest:
         {
-            REPLY (": Window(0x%lx) Event(0x%lx) parent(0x%lx)",
-                evt->u.circulate.window,
-                evt->u.circulate.event,
-                evt->u.circulate.parent);
+            REPLY (": Window(0x%x) Event(0x%x) parent(0x%x)",
+                (unsigned int)evt->u.circulate.window,
+                (unsigned int)evt->u.circulate.event,
+                (unsigned int)evt->u.circulate.parent);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -1607,8 +1620,8 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case PropertyNotify:
         {
-            REPLY (": Window(0x%lx)",
-                evt->u.property.window);
+            REPLY (": Window(0x%x)",
+                (unsigned int)evt->u.property.window);
 
             REPLY (" Property");
             reply = xDbgGetAtom(evt->u.property.atom, evinfo, reply, len);
@@ -1628,7 +1641,7 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
                 REPLY ("\n");
                 REPLY ("%67s time(%lums) state(%s)",
                     " ",
-                    evt->u.property.time,
+                    (unsigned long)evt->u.property.time,
                     state);
             }
 
@@ -1637,8 +1650,8 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case SelectionClear:
         {
-            REPLY (": Window(0x%lx)",
-                evt->u.selectionClear.window);
+            REPLY (": Window(0x%x)",
+                (unsigned int)evt->u.selectionClear.window);
 
             REPLY (" Atom");
             reply = xDbgGetAtom(evt->u.selectionClear.atom, evinfo, reply, len);
@@ -1646,7 +1659,7 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" time(%lums)",
-                    evt->u.selectionClear.time);
+                    (unsigned long)evt->u.selectionClear.time);
             }
 
             return reply;
@@ -1654,9 +1667,9 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case SelectionRequest:
         {
-            REPLY (": Owner(0x%lx) Requestor(0x%lx)",
-                evt->u.selectionRequest.owner,
-                evt->u.selectionRequest.requestor);
+            REPLY (": Owner(0x%x) Requestor(0x%x)",
+                (unsigned int)evt->u.selectionRequest.owner,
+                (unsigned int)evt->u.selectionRequest.requestor);
 
             REPLY (" selection");
             reply = xDbgGetAtom(evt->u.selectionRequest.selection, evinfo, reply, len);
@@ -1668,7 +1681,7 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" time(%lums)",
-                    evt->u.selectionRequest.time);
+                    (unsigned long)evt->u.selectionRequest.time);
             }
 
             return reply;
@@ -1676,8 +1689,8 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case SelectionNotify:
         {
-            REPLY (": Requestor(0x%lx)",
-                evt->u.selectionNotify.requestor);
+            REPLY (": Requestor(0x%x)",
+                (unsigned int)evt->u.selectionNotify.requestor);
 
             REPLY (" selection");
             reply = xDbgGetAtom(evt->u.selectionNotify.selection, evinfo, reply, len);
@@ -1689,7 +1702,7 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" time(%lums)",
-                    evt->u.selectionNotify.time);
+                    (unsigned long)evt->u.selectionNotify.time);
             }
 
             return reply;
@@ -1697,9 +1710,9 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case ColormapNotify:
         {
-            REPLY (": XID(0x%lx) Colormap(0x%lx)",
-                evt->u.colormap.window,
-                evt->u.colormap.colormap);
+            REPLY (": XID(0x%x) Colormap(0x%x)",
+                (unsigned int)evt->u.colormap.window,
+                (unsigned int)evt->u.colormap.colormap);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -1723,8 +1736,8 @@ char * xDbgEvlogEventCore (EvlogInfo *evinfo, int detail_level, char *reply, int
 
     case ClientMessage:
         {
-            REPLY (": XID(0x%lx)",
-                evt->u.clientMessage.window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)evt->u.clientMessage.window);
 
             REPLY (" Type");
             reply = xDbgGetAtom(evt->u.clientMessage.u.b.type, evinfo, reply, len);
@@ -1753,8 +1766,8 @@ char * xDbgEvlogReplyCore (EvlogInfo *evinfo, int detail_level, char *reply, int
             {
                 xGetGeometryReply *stuff = (xGetGeometryReply *)rep;
 
-                REPLY (": XID(0x%lx) coord(%d,%d %dx%d) borderWidth(%d)",
-                    stuff->root,
+                REPLY (": XID(0x%x) coord(%d,%d %dx%d) borderWidth(%d)",
+                    (unsigned int)stuff->root,
                     stuff->x,
                     stuff->y,
                     stuff->width,
@@ -1775,9 +1788,9 @@ char * xDbgEvlogReplyCore (EvlogInfo *evinfo, int detail_level, char *reply, int
             {
                 xQueryTreeReply *stuff = (xQueryTreeReply *)rep;
 
-                REPLY (": XID(0x%lx) Parent(0x%lx) ChildrenNum(%d)",
-                    stuff->root,
-                    stuff->parent,
+                REPLY (": XID(0x%x) Parent(0x%x) ChildrenNum(%d)",
+                    (unsigned int)stuff->root,
+                    (unsigned int)stuff->parent,
                     stuff->nChildren);
             }
             else
@@ -1789,7 +1802,7 @@ char * xDbgEvlogReplyCore (EvlogInfo *evinfo, int detail_level, char *reply, int
                 REPLY ("(");
                 for (i = 0 ; i < evinfo->rep.size / sizeof(Window) ; i++)
                 {
-                    REPLY("0x%lx", stuff[i]);
+                    REPLY("0x%x", (unsigned int)stuff[i]);
                     if(i != evinfo->rep.size / sizeof(Window) - 1)
                         REPLY (", ");
                 }
@@ -1808,10 +1821,10 @@ char * xDbgEvlogReplyCore (EvlogInfo *evinfo, int detail_level, char *reply, int
                 REPLY (": PropertyType");
                 reply = xDbgGetAtom(stuff->propertyType, evinfo, reply, len);
 
-                REPLY (" bytesAfter(0x%lx) format(%d) ItemNum(%ld)",
-                    stuff->bytesAfter,
+                REPLY (" bytesAfter(0x%x) format(%d) ItemNum(%ld)",
+                    (unsigned int)stuff->bytesAfter,
                     stuff->format,
-                    stuff->nItems);
+                    (long int)stuff->nItems);
             }
             else
             {
@@ -1855,8 +1868,8 @@ char * xDbgEvlogReplyCore (EvlogInfo *evinfo, int detail_level, char *reply, int
             {
                 xGetImageReply *stuff = (xGetImageReply *)rep;
 
-                REPLY (": XID(0x%lx)",
-                    stuff->visual);
+                REPLY (": XID(0x%x)",
+                    (unsigned int)stuff->visual);
             }
             else
             {
@@ -1910,4 +1923,4 @@ char * xDbgEvlogReplyCore (EvlogInfo *evinfo, int detail_level, char *reply, int
     }
 
     return reply;
-}
+}
\ No newline at end of file
index 5f90b67..85518bb 100644 (file)
@@ -69,9 +69,9 @@ _EvlogRequestDamage(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_DamageCreate:
         {
             xDamageCreateReq *stuff = (xDamageCreateReq *)req;
-            REPLY (": XID(0x%lx) Drawable(0x%lx)",
-                stuff->damage,
-                stuff->drawable);
+            REPLY (": XID(0x%x) Drawable(0x%x)",
+                (unsigned int)stuff->damage,
+                (unsigned int)stuff->drawable);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -97,8 +97,8 @@ _EvlogRequestDamage(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_DamageDestroy:
         {
             xDamageDestroyReq *stuff = (xDamageDestroyReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->damage);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->damage);
 
             return reply;
         }
@@ -120,9 +120,9 @@ _EvlogEventDamage (EvlogInfo *evinfo, int first_base, int detail_level, char *re
     case XDamageNotify:
         {
             xDamageNotifyEvent *stuff = (xDamageNotifyEvent*)evt;
-            REPLY (": XID(0x%lx) Damage(0x%lx) area(%d,%d %dx%d) geo(%d,%d %dx%d)",
-                stuff->drawable,
-                stuff->damage,
+            REPLY (": XID(0x%x) Damage(0x%x) area(%d,%d %dx%d) geo(%d,%d %dx%d)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->damage,
                 stuff->area.x,
                 stuff->area.y,
                 stuff->area.width,
@@ -137,7 +137,7 @@ _EvlogEventDamage (EvlogInfo *evinfo, int first_base, int detail_level, char *re
                 REPLY ("\n");
                 REPLY ("%67s time(%lums) level(%d) sequence_num(%d)",
                     " ",
-                    stuff->timestamp,
+                    (unsigned long)stuff->timestamp,
                     stuff->level,
                     stuff->sequenceNumber);
             }
index 68e5c96..533a18f 100644 (file)
@@ -69,8 +69,8 @@ _EvlogRequestDri2 (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_DRI2CreateDrawable:
         {
             xDRI2CreateDrawableReq *stuff = (xDRI2CreateDrawableReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->drawable);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->drawable);
 
             return reply;
         }
@@ -78,8 +78,8 @@ _EvlogRequestDri2 (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_DRI2DestroyDrawable:
         {
             xDRI2DestroyDrawableReq *stuff = (xDRI2DestroyDrawableReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->drawable);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->drawable);
 
             return reply;
         }
@@ -87,13 +87,13 @@ _EvlogRequestDri2 (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_DRI2GetBuffers:
         {
             xDRI2GetBuffersReq *stuff = (xDRI2GetBuffersReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->drawable);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->drawable);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" count(%ld)",
-                    stuff->count);
+                    (long int)stuff->count);
             }
 
             return reply;
@@ -102,10 +102,10 @@ _EvlogRequestDri2 (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_DRI2CopyRegion:
         {
             xDRI2CopyRegionReq *stuff = (xDRI2CopyRegionReq *)req;
-            REPLY (": XID(0x%lx) src(0x%lx) dst(0x%lx)",
-                stuff->drawable,
-                stuff->src,
-                stuff->dest);
+            REPLY (": XID(0x%x) src(0x%x) dst(0x%x)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->src,
+                (unsigned int)stuff->dest);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -119,13 +119,13 @@ _EvlogRequestDri2 (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_DRI2GetBuffersWithFormat:
         {
             xDRI2GetBuffersReq *stuff = (xDRI2GetBuffersReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->drawable);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->drawable);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" count(%ld)",
-                    stuff->count);
+                    (long int)stuff->count);
             }
 
             return reply;
@@ -135,14 +135,14 @@ _EvlogRequestDri2 (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_DRI2SwapBuffers:
         {
             xDRI2SwapBuffersReq *stuff = (xDRI2SwapBuffersReq *)req;
-            REPLY (": XID(0x%lx) msc(0x%lx/0x%lx) divisor(0x%lx/0x%lx) remainder(0x%lx/0x%lx)",
-                stuff->drawable,
-                stuff->target_msc_hi,
-                stuff->target_msc_lo,
-                stuff->divisor_hi,
-                stuff->divisor_lo,
-                stuff->remainder_hi,
-                stuff->remainder_lo);
+            REPLY (": XID(0x%x) msc(0x%x/0x%x) divisor(0x%x/0x%x) remainder(0x%x/0x%x)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->target_msc_hi,
+                (unsigned int)stuff->target_msc_lo,
+                (unsigned int)stuff->divisor_hi,
+                (unsigned int)stuff->divisor_lo,
+                (unsigned int)stuff->remainder_hi,
+                (unsigned int)stuff->remainder_lo);
 
             return reply;
         }
@@ -150,13 +150,13 @@ _EvlogRequestDri2 (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_DRI2SwapInterval:
         {
             xDRI2SwapIntervalReq *stuff = (xDRI2SwapIntervalReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->drawable);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->drawable);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" interval(%ld)",
-                    stuff->interval);
+                    (long int)stuff->interval);
             }
 
             return reply;
@@ -165,8 +165,8 @@ _EvlogRequestDri2 (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_DRI2SwapBuffersWithRegion:
         {
             xDRI2SwapBuffersWithRegionReq *stuff = (xDRI2SwapBuffersWithRegionReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->drawable);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->drawable);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -195,14 +195,14 @@ _EvlogEventDri2 (EvlogInfo *evinfo, int first_base, int detail_level, char *repl
     case DRI2_BufferSwapComplete:
         {
             xDRI2BufferSwapComplete *stuff = (xDRI2BufferSwapComplete *) evt;
-            REPLY (": XID(0x%lx) ust(0x%lx/0x%lx) msc(0x%lx/0x%lx) sbc(0x%lx/0x%lx)",
-                stuff->drawable,
-                stuff->ust_hi,
-                stuff->ust_lo,
-                stuff->msc_hi,
-                stuff->msc_lo,
-                stuff->sbc_hi,
-                stuff->sbc_lo);
+            REPLY (": XID(0x%x) ust(0x%x/0x%x) msc(0x%x/0x%x) sbc(0x%x/0x%x)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->ust_hi,
+                (unsigned int)stuff->ust_lo,
+                (unsigned int)stuff->msc_hi,
+                (unsigned int)stuff->msc_lo,
+                (unsigned int)stuff->sbc_hi,
+                (unsigned int)stuff->sbc_lo);
 
             evinfo->evt.size = sizeof (xDRI2BufferSwapComplete);
 
@@ -221,8 +221,8 @@ _EvlogEventDri2 (EvlogInfo *evinfo, int first_base, int detail_level, char *repl
     case DRI2_InvalidateBuffers:
         {
             xDRI2InvalidateBuffers *stuff = (xDRI2InvalidateBuffers *) evt;
-            REPLY (": XID(0x%lx)",
-                stuff->drawable);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->drawable);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -253,9 +253,9 @@ _EvlogReplyDri2 (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
             {
                 xDRI2GetBuffersReply *stuff = (xDRI2GetBuffersReply *)rep;
                 REPLY (": size(%ldx%ld) count(%ld)",
-                    stuff->width,
-                    stuff->height,
-                    stuff->count);
+                    (long int)stuff->width,
+                    (long int)stuff->height,
+                    (long int)stuff->count);
 
                 if (detail_level >= EVLOG_PRINT_DETAIL)
                 {
@@ -267,12 +267,12 @@ _EvlogReplyDri2 (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
             {
                 xDRI2Buffer *stuff = (xDRI2Buffer *)rep;
 
-                REPLY ("attachment(0x%lx) Name(0x%lx) pitch(0x%lx) cpp(0x%lx) flags(0x%lx)",
-                    stuff->attachment,
-                    stuff->name,
-                    stuff->pitch,
-                    stuff->cpp,
-                    stuff->flags);
+                REPLY ("attachment(0x%x) Name(0x%x) pitch(0x%x) cpp(0x%x) flags(0x%x)",
+                    (unsigned int)stuff->attachment,
+                    (unsigned int)stuff->name,
+                    (unsigned int)stuff->pitch,
+                    (unsigned int)stuff->cpp,
+                    (unsigned int)stuff->flags);
             }
 
             return reply;
@@ -284,8 +284,8 @@ _EvlogReplyDri2 (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
             {
                 xDRI2SwapBuffersReply *stuff = (xDRI2SwapBuffersReply *)rep;
                 REPLY (": swap(%ld/%ld)",
-                    stuff->swap_hi,
-                    stuff->swap_lo);
+                    (long int)stuff->swap_hi,
+                    (long int)stuff->swap_lo);
 
                 if (detail_level >= EVLOG_PRINT_DETAIL)
                 {
index 69e1143..74c87e3 100644 (file)
@@ -69,13 +69,13 @@ _EvlogRequestGesture(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_GestureSelectEvents:
         {
             xGestureSelectEventsReq *stuff = (xGestureSelectEventsReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
-                REPLY (" mask(0x%lx)",
-                    stuff->mask);
+                REPLY (" mask(0x%x)",
+                    (unsigned int)stuff->mask);
             }
 
             return reply;
@@ -84,8 +84,8 @@ _EvlogRequestGesture(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_GestureGetSelectedEvents:
         {
             xGestureGetSelectedEventsReq *stuff = (xGestureGetSelectedEventsReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             return reply;
         }
@@ -93,8 +93,8 @@ _EvlogRequestGesture(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_GestureGrabEvent:
         {
             xGestureGrabEventReq *stuff = (xGestureGrabEventReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -110,13 +110,13 @@ _EvlogRequestGesture(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                     case GestureNotifyTapNHold:  event_type = "GestureNotifyTapNHold"; break;
                     case GestureNotifyHold:  event_type = "GestureNotifyHold"; break;
                     case GestureNotifyGroup:  event_type = "GestureNotifyGroup"; break;
-                    default:  event_type = devent_type; snprintf (devent_type, 10, "%ld", stuff->eventType); break;
+                    default:  event_type = devent_type; sprintf (devent_type, "%ld", (long int)stuff->eventType); break;
                 }
 
                 REPLY (" event_type(%s) num_finger(%d) time(%lums)",
                     event_type,
                     stuff->num_finger,
-                    stuff->time);
+                    (unsigned long)stuff->time);
             }
 
             return reply;
@@ -125,8 +125,8 @@ _EvlogRequestGesture(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_GestureUngrabEvent:
         {
             xGestureUngrabEventReq *stuff = (xGestureUngrabEventReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -142,13 +142,13 @@ _EvlogRequestGesture(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                     case GestureNotifyTapNHold:  event_type = "GestureNotifyTapNHold"; break;
                     case GestureNotifyHold:  event_type = "GestureNotifyHold"; break;
                     case GestureNotifyGroup:  event_type = "GestureNotifyGroup"; break;
-                    default:  event_type = devent_type; snprintf (devent_type, 10, "%ld", stuff->eventType); break;
+                    default:  event_type = devent_type; sprintf (devent_type, "%ld", (long int)stuff->eventType); break;
                 }
 
                 REPLY (" event_type(%s) num_finger(%d) time(%lums)",
                     event_type,
                     stuff->num_finger,
-                    stuff->time);
+                    (unsigned long)stuff->time);
             }
 
             return reply;
@@ -171,8 +171,8 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
     case GestureNotifyFlick:
         {
             xGestureNotifyFlickEvent *stuff = (xGestureNotifyFlickEvent *) evt;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -190,7 +190,7 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
 
                 REPLY (" kind(%s) time(%lums) num_finger(%d) direction(%d) distance(%d)",
                     kind,
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->num_finger,
                     stuff->direction,
                     stuff->distance);
@@ -198,8 +198,8 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
                 REPLY ("\n");
                 REPLY ("%67s duration(%lums) angle(%ld)",
                     " ",
-                    stuff->duration,
-                    stuff->angle);
+                    (unsigned long)stuff->duration,
+                    (long int)stuff->angle);
             }
 
             return reply;
@@ -208,8 +208,8 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
     case GestureNotifyPan:
         {
             xGestureNotifyPanEvent *stuff = (xGestureNotifyPanEvent *) evt;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -228,7 +228,7 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
                 REPLY (" kind(%s) sequence_num(%d) time(%lums) num_finger(%d) direction(%d) ",
                     kind,
                     stuff->sequenceNumber,
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->num_finger,
                     stuff->direction);
 
@@ -236,7 +236,7 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
                 REPLY ("%67s distance(%d) duration(%ldms) coord(%d,%d)",
                     " ",
                     stuff->distance,
-                    stuff->duration,
+                    (long int)stuff->duration,
                     stuff->dx,
                     stuff->dy);
             }
@@ -247,8 +247,8 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
     case GestureNotifyPinchRotation:
         {
             xGestureNotifyPinchRotationEvent *stuff = (xGestureNotifyPinchRotationEvent *) evt;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -267,7 +267,7 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
                 REPLY (" kind(%s) sequence_num(%d) time(%lums) num_finger(%d) distance(%d)",
                     kind,
                     stuff->sequenceNumber,
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->num_finger,
                     stuff->distance);
 
@@ -276,8 +276,8 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
                     " ",
                     stuff->cx,
                     stuff->cy,
-                    stuff->zoom,
-                    stuff->angle);
+                    (long int)stuff->zoom,
+                    (long int)stuff->angle);
             }
 
             return reply;
@@ -286,8 +286,8 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
     case GestureNotifyTap:
         {
             xGestureNotifyTapEvent *stuff = (xGestureNotifyTapEvent *) evt;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -306,7 +306,7 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
                 REPLY (" kind(%s) sequence_num(%d) time(%lums) num_finger(%d) coord(%d,%d)",
                     kind,
                     stuff->sequenceNumber,
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->num_finger,
                     stuff->cx,
                     stuff->cy);
@@ -315,7 +315,7 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
                 REPLY ("%67s tap_repeat(%d) interval(%lums)",
                     " ",
                     stuff->tap_repeat,
-                    stuff->interval);
+                    (unsigned long)stuff->interval);
             }
 
             return reply;
@@ -324,8 +324,8 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
     case GestureNotifyTapNHold:
         {
             xGestureNotifyTapNHoldEvent *stuff = (xGestureNotifyTapNHoldEvent *) evt;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -344,7 +344,7 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
                 REPLY (" kind(%s) sequence_num(%d) time(%lums) num_finger(%d) coord(%d,%d)",
                     kind,
                     stuff->sequenceNumber,
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->num_finger,
                     stuff->cx,
                     stuff->cy);
@@ -352,8 +352,8 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
                 REPLY ("\n");
                 REPLY ("%67s interval(%lums) hold_time(%lums)",
                     " ",
-                    stuff->interval,
-                    stuff->holdtime);
+                    (unsigned long)stuff->interval,
+                    (unsigned long)stuff->holdtime);
             }
 
             return reply;
@@ -362,8 +362,8 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
     case GestureNotifyHold:
         {
             xGestureNotifyHoldEvent *stuff = (xGestureNotifyHoldEvent *) evt;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -382,7 +382,7 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
                 REPLY (" kind(%s) sequence_num(%d) time(%lums) num_finger(%d) coord(%d,%d) ",
                     kind,
                     stuff->sequenceNumber,
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->num_finger,
                     stuff->cx,
                     stuff->cy);
@@ -390,7 +390,7 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
                 REPLY ("\n");
                 REPLY ("%67s hold_time(%lums)",
                     " ",
-                    stuff->holdtime);
+                    (unsigned long)stuff->holdtime);
             }
 
             return reply;
@@ -399,8 +399,8 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
     case GestureNotifyGroup:
         {
             xGestureNotifyGroupEvent *stuff = (xGestureNotifyGroupEvent *) evt;
-            REPLY (": XID(0x%lx) groupID(%d) groupNum(%d)",
-                stuff->window,
+            REPLY (": XID(0x%x) groupID(%d) groupNum(%d)",
+                (unsigned int)stuff->window,
                 stuff->groupid,
                 stuff->num_group);
 
@@ -422,7 +422,7 @@ _EvlogEventGesture (EvlogInfo *evinfo, int first_base, int detail_level, char *r
                     " ",
                     kind,
                     stuff->sequenceNumber,
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->groupid,
                     stuff->num_group);
             }
diff --git a/common/xdbg_evlog_hwc.c b/common/xdbg_evlog_hwc.c
new file mode 100755 (executable)
index 0000000..7432f54
--- /dev/null
@@ -0,0 +1,173 @@
+/**************************************************************************
+
+xdbg
+
+Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
+
+Contact: Boram Park <boram1288.park@samsung.com>
+         Sangjin LEE <lsj119@samsung.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sub license, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <strings.h>
+#include <sys/types.h>
+#include <sys/fcntl.h>
+#include <unistd.h>
+#include <stdarg.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include <dix.h>
+#define XREGISTRY
+#include <registry.h>
+#include <xace.h>
+#include <xacestr.h>
+#include <X11/Xatom.h>
+#include <X11/Xlib.h>
+#include <windowstr.h>
+#include <X11/extensions/hwcproto.h>
+#include <X11/extensions/hwc.h>
+
+#include "xdbg_types.h"
+#include "xdbg_evlog_hwc.h"
+#include "xdbg_evlog.h"
+
+static char *
+_EvlogRequestHwc (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
+{
+    xReq *req = evinfo->req.ptr;
+    int i;
+    CARD32 *p;
+
+    switch (req->data)
+    {
+    case X_HWCOpen:
+        {
+            xHWCOpenReq *stuff = (xHWCOpenReq *)req;
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
+
+            return reply;
+        }
+
+    case X_HWCSetDrawables:
+        {
+            xHWCSetDrawablesReq *stuff = (xHWCSetDrawablesReq *)req;
+            REPLY (": XID(0x%x) count(%ld)",
+                (unsigned int)stuff->window, stuff->count);
+
+            p = (CARD32 *) & req[3];
+            REPLY (" Drawables(");
+            for (i = 0; i < stuff->count; i++)
+                REPLY (" 0x%x", (unsigned int)p[i]);
+            REPLY (" )");
+
+
+            return reply;
+        }
+
+    default:
+            break;
+    }
+
+    return reply;
+}
+
+
+static char *
+_EvlogEventHwc (EvlogInfo *evinfo, int first_base, int detail_level, char *reply, int *len)
+{
+    xGenericEvent *evt = (xGenericEvent *)evinfo->evt.ptr;
+
+    switch (evt->evtype)
+    {
+    case HWCConfigureNotify:
+        {
+            xHWCConfigureNotify *stuff = (xHWCConfigureNotify *) evt;
+            REPLY (": maxLayer(%d)",
+                (unsigned int)stuff->maxLayer);
+
+            return reply;
+        }
+
+    default:
+            break;
+    }
+
+    return reply;
+}
+
+static char *
+_EvlogReplyHwc (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
+{
+    xGenericReply *rep = evinfo->rep.ptr;
+
+    switch (evinfo->rep.reqData)
+    {
+    case X_HWCOpen:
+        {
+            if (evinfo->rep.isStart)
+            {
+                xHWCOpenReply *stuff = (xHWCOpenReply *)rep;
+                REPLY (": maxLayers(%d)",
+                    (unsigned int)stuff->maxLayer);
+            }
+
+            return reply;
+        }
+
+    default:
+            break;
+    }
+
+    return reply;
+}
+
+void
+xDbgEvlogHwcGetBase (ExtensionInfo *extinfo)
+{
+#ifdef XDBG_CLIENT
+    RETURN_IF_FAIL (extinfo != NULL);
+
+    extinfo->req_func = _EvlogRequestHwc;
+    extinfo->evt_func = _EvlogEventHwc;
+    extinfo->rep_func = _EvlogReplyHwc;
+#else
+    ExtensionEntry *xext = CheckExtension (HWC_NAME);
+    RETURN_IF_FAIL (xext != NULL);
+    RETURN_IF_FAIL (extinfo != NULL);
+
+    extinfo->opcode = xext->base;
+    extinfo->evt_base = xext->eventBase;
+    extinfo->err_base = xext->errorBase;
+    extinfo->req_func = _EvlogRequestHwc;
+    extinfo->evt_func = _EvlogEventHwc;
+    extinfo->rep_func = _EvlogReplyHwc;
+#endif
+}
diff --git a/common/xdbg_evlog_hwc.h b/common/xdbg_evlog_hwc.h
new file mode 100755 (executable)
index 0000000..3b87070
--- /dev/null
@@ -0,0 +1,39 @@
+/**************************************************************************
+
+xdbg
+
+Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
+
+Contact: Boram Park <boram1288.park@samsung.com>
+         Sangjin LEE <lsj119@samsung.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sub license, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
+#ifndef __XDBG_EVLOG_HWC_H__
+#define __XDBG_EVLOG_HWC_H__
+
+#include "xdbg_types.h"
+
+void    xDbgEvlogHwcGetBase (ExtensionInfo *extinfo);
+
+#endif
index 87f3069..f2e86b1 100644 (file)
@@ -70,8 +70,8 @@ _EvlogRequestRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_RRGetScreenSizeRange:
         {
             xRRGetScreenSizeRangeReq *stuff = (xRRGetScreenSizeRangeReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             return reply;
         }
@@ -79,16 +79,16 @@ _EvlogRequestRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_RRSetScreenSize:
         {
             xRRSetScreenSizeReq *stuff = (xRRSetScreenSizeReq *)req;
-            REPLY (": XID(0x%lx) size(%dx%d)",
-                stuff->window,
+            REPLY (": XID(0x%x) size(%dx%d)",
+                (unsigned int)stuff->window,
                 stuff->width,
                 stuff->height);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" milliSize(%ldx%ld)",
-                    stuff->widthInMillimeters,
-                    stuff->heightInMillimeters);
+                    (long int)stuff->widthInMillimeters,
+                    (long int)stuff->heightInMillimeters);
             }
 
             return reply;
@@ -97,8 +97,8 @@ _EvlogRequestRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_RRGetScreenResources:
         {
             xRRGetScreenResourcesReq *stuff = (xRRGetScreenResourcesReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             return reply;
         }
@@ -106,13 +106,13 @@ _EvlogRequestRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_RRGetOutputInfo:
         {
             xRRGetOutputInfoReq *stuff = (xRRGetOutputInfoReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->output);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->output);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" config_timestamp(%lums)",
-                    stuff->configTimestamp);
+                    (unsigned long)stuff->configTimestamp);
             }
 
             return reply;
@@ -121,8 +121,8 @@ _EvlogRequestRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_RRListOutputProperties:
         {
             xRRListOutputPropertiesReq *stuff = (xRRListOutputPropertiesReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->output);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->output);
 
             return reply;
         }
@@ -130,8 +130,8 @@ _EvlogRequestRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_RRQueryOutputProperty:
         {
             xRRQueryOutputPropertyReq *stuff = (xRRQueryOutputPropertyReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->output);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->output);
 
             REPLY (" Property");
             reply = xDbgGetAtom(stuff->property, evinfo, reply, len);
@@ -142,8 +142,8 @@ _EvlogRequestRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_RRConfigureOutputProperty:
         {
             xRRConfigureOutputPropertyReq *stuff = (xRRConfigureOutputPropertyReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->output);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->output);
 
             REPLY (" Property");
             reply = xDbgGetAtom(stuff->property, evinfo, reply, len);
@@ -161,8 +161,8 @@ _EvlogRequestRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_RRChangeOutputProperty:
         {
             xRRChangeOutputPropertyReq *stuff = (xRRChangeOutputPropertyReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->output);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->output);
 
             REPLY (" Property");
             reply = xDbgGetAtom(stuff->property, evinfo, reply, len);
@@ -187,7 +187,7 @@ _EvlogRequestRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                     " ",
                     mode,
                     stuff->format,
-                    stuff->nUnits);
+                    (long int)stuff->nUnits);
             }
 
             return reply;
@@ -196,8 +196,8 @@ _EvlogRequestRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_RRDeleteOutputProperty:
         {
             xRRDeleteOutputPropertyReq *stuff = (xRRDeleteOutputPropertyReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->output);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->output);
 
             REPLY (" Property");
             reply = xDbgGetAtom(stuff->property, evinfo, reply, len);
@@ -208,8 +208,8 @@ _EvlogRequestRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_RRGetOutputProperty:
         {
             xRRGetOutputPropertyReq *stuff = (xRRGetOutputPropertyReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->output);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->output);
 
             REPLY (" Property");
             reply = xDbgGetAtom(stuff->property, evinfo, reply, len);
@@ -219,8 +219,8 @@ _EvlogRequestRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" longOffset(%ld) longLength(%ld)",
-                    stuff->longOffset,
-                    stuff->longLength);
+                    (long int)stuff->longOffset,
+                    (long int)stuff->longLength);
             }
 
             return reply;
@@ -229,13 +229,13 @@ _EvlogRequestRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_RRGetCrtcInfo:
         {
             xRRGetCrtcInfoReq *stuff = (xRRGetCrtcInfoReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->crtc);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->crtc);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" config_timestamp(%lums)",
-                    stuff->configTimestamp);
+                    (unsigned long)stuff->configTimestamp);
             }
 
             return reply;
@@ -244,8 +244,8 @@ _EvlogRequestRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_RRSetCrtcConfig:
         {
             xRRSetCrtcConfigReq *stuff = (xRRSetCrtcConfigReq *)req;
-            REPLY (": XID(0x%lx) coord(%d,%d) ",
-                stuff->crtc,
+            REPLY (": XID(0x%x) coord(%d,%d) ",
+                (unsigned int)stuff->crtc,
                 stuff->x,
                 stuff->y);
 
@@ -263,11 +263,11 @@ _EvlogRequestRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                 }
 
                 REPLY ("\n");
-                REPLY ("%67s timestamp(%lums) config_timestamp(%lums) RRmode(0x%lx) rotation(%s)",
+                REPLY ("%67s timestamp(%lums) config_timestamp(%lums) RRmode(0x%x) rotation(%s)",
                     " ",
-                    stuff->timestamp,
-                    stuff->configTimestamp,
-                    stuff->mode,
+                    (unsigned long)stuff->timestamp,
+                    (unsigned long)stuff->configTimestamp,
+                    (unsigned int)stuff->mode,
                     rotation);
             }
 
@@ -277,8 +277,8 @@ _EvlogRequestRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_RRGetScreenResourcesCurrent:
         {
             xRRGetScreenResourcesCurrentReq *stuff = (xRRGetScreenResourcesCurrentReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             return reply;
         }
@@ -301,9 +301,9 @@ _EvlogEventRandr (EvlogInfo *evinfo, int first_base, int detail_level, char *rep
     case RRScreenChangeNotify:
         {
             xRRScreenChangeNotifyEvent *stuff = (xRRScreenChangeNotifyEvent *) evt;
-            REPLY (": Root(0x%lx) Window(0x%lx)",
-                stuff->root,
-                stuff->window);
+            REPLY (": Root(0x%x) Window(0x%x)",
+                (unsigned int)stuff->root,
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -331,8 +331,8 @@ _EvlogEventRandr (EvlogInfo *evinfo, int first_base, int detail_level, char *rep
                     " ",
                     rotation,
                     stuff->sequenceNumber,
-                    stuff->timestamp,
-                    stuff->configTimestamp);
+                    (unsigned long)stuff->timestamp,
+                    (unsigned long)stuff->configTimestamp);
             }
 
             return reply;
@@ -345,10 +345,10 @@ _EvlogEventRandr (EvlogInfo *evinfo, int first_base, int detail_level, char *rep
             case RRNotify_CrtcChange:
                 {
                     xRRCrtcChangeNotifyEvent *stuff = (xRRCrtcChangeNotifyEvent *) evt;
-                    REPLY (": XID(0x%lx) Crtc(0x%lx) RRmode(0x%lx) new_size(%udx%ud) new_coord(%d,%d)",
-                        stuff->window,
-                        stuff->crtc,
-                        stuff->mode,
+                    REPLY (": XID(0x%x) Crtc(0x%x) RRmode(0x%x) new_size(%udx%ud) new_coord(%d,%d)",
+                        (unsigned int)stuff->window,
+                        (unsigned int)stuff->crtc,
+                        (unsigned int)stuff->mode,
                         stuff->width,
                         stuff->height,
                         stuff->x,
@@ -372,7 +372,7 @@ _EvlogEventRandr (EvlogInfo *evinfo, int first_base, int detail_level, char *rep
                             " ",
                             rotation,
                             stuff->sequenceNumber,
-                            stuff->timestamp);
+                            (unsigned long)stuff->timestamp);
                     }
 
                     return reply;
@@ -381,11 +381,11 @@ _EvlogEventRandr (EvlogInfo *evinfo, int first_base, int detail_level, char *rep
             case RRNotify_OutputChange:
                 {
                     xRROutputChangeNotifyEvent *stuff = (xRROutputChangeNotifyEvent *) evt;
-                    REPLY (": XID(0x%lx) Output(0x%lx) Crtc(0x%lx) RRmode(0x%lx)",
-                        stuff->window,
-                        stuff->output,
-                        stuff->crtc,
-                        stuff->mode);
+                    REPLY (": XID(0x%x) Output(0x%x) Crtc(0x%x) RRmode(0x%x)",
+                        (unsigned int)stuff->window,
+                        (unsigned int)stuff->output,
+                        (unsigned int)stuff->crtc,
+                        (unsigned int)stuff->mode);
 
                     if (detail_level >= EVLOG_PRINT_DETAIL)
                     {
@@ -426,8 +426,8 @@ _EvlogEventRandr (EvlogInfo *evinfo, int first_base, int detail_level, char *rep
                         REPLY ("\n");
                         REPLY ("%67s timestamp(%lums) config_timestamp(%lums) rotation(%s) connection(%s) subpixel_order(%s)",
                             " ",
-                            stuff->timestamp,
-                            stuff->configTimestamp,
+                            (unsigned long)stuff->timestamp,
+                            (unsigned long)stuff->configTimestamp,
                             rotation,
                             connection,
                             subpixelOrder);
@@ -439,9 +439,9 @@ _EvlogEventRandr (EvlogInfo *evinfo, int first_base, int detail_level, char *rep
             case RRNotify_OutputProperty:
                 {
                     xRROutputPropertyNotifyEvent *stuff = (xRROutputPropertyNotifyEvent *) evt;
-                    REPLY (": XID(0x%lx) Output(0x%lx)",
-                        stuff->window,
-                        stuff->output);
+                    REPLY (": XID(0x%x) Output(0x%x)",
+                        (unsigned int)stuff->window,
+                        (unsigned int)stuff->output);
 
                     REPLY (" Property");
                     reply = xDbgGetAtom(stuff->atom, evinfo, reply, len);
@@ -462,7 +462,7 @@ _EvlogEventRandr (EvlogInfo *evinfo, int first_base, int detail_level, char *rep
                         REPLY ("%67s sequence_num(%d) timestamp(%lums) state(%s)",
                             " ",
                             stuff->sequenceNumber,
-                            stuff->timestamp,
+                            (unsigned long)stuff->timestamp,
                             state);
                     }
 
@@ -472,15 +472,15 @@ _EvlogEventRandr (EvlogInfo *evinfo, int first_base, int detail_level, char *rep
             case RRNotify_ProviderChange:
                 {
                     xRRProviderChangeNotifyEvent *stuff = (xRRProviderChangeNotifyEvent *) evt;
-                    REPLY (": XID(0x%lx) Provider(0x%lx)",
-                        stuff->window,
-                        stuff->provider);
+                    REPLY (": XID(0x%x) Provider(0x%x)",
+                        (unsigned int)stuff->window,
+                        (unsigned int)stuff->provider);
 
                     if (detail_level >= EVLOG_PRINT_DETAIL)
                     {
                         REPLY (" sequence_num(%d) timestamp(%lums)",
                             stuff->sequenceNumber,
-                            stuff->timestamp);
+                            (unsigned long)stuff->timestamp);
                     }
 
                     return reply;
@@ -489,9 +489,9 @@ _EvlogEventRandr (EvlogInfo *evinfo, int first_base, int detail_level, char *rep
             case RRNotify_ProviderProperty:
                 {
                     xRRProviderPropertyNotifyEvent *stuff = (xRRProviderPropertyNotifyEvent *) evt;
-                    REPLY (": XID(0x%lx) Provider(0x%lx)",
-                        stuff->window,
-                        stuff->provider);
+                    REPLY (": XID(0x%x) Provider(0x%x)",
+                        (unsigned int)stuff->window,
+                        (unsigned int)stuff->provider);
 
                     REPLY (" Atom");
                     reply = xDbgGetAtom(stuff->atom, evinfo, reply, len);
@@ -510,7 +510,7 @@ _EvlogEventRandr (EvlogInfo *evinfo, int first_base, int detail_level, char *rep
 
                         REPLY (" sequence_num(%d) timestamp(%lums) state(%s)",
                             stuff->sequenceNumber,
-                            stuff->timestamp,
+                            (unsigned long)stuff->timestamp,
                             state);
                     }
 
@@ -520,14 +520,14 @@ _EvlogEventRandr (EvlogInfo *evinfo, int first_base, int detail_level, char *rep
             case RRNotify_ResourceChange:
                 {
                     xRRResourceChangeNotifyEvent *stuff = (xRRResourceChangeNotifyEvent *) evt;
-                    REPLY (": XID(0x%lx)",
-                        stuff->window);
+                    REPLY (": XID(0x%x)",
+                        (unsigned int)stuff->window);
 
                     if (detail_level >= EVLOG_PRINT_DETAIL)
                     {
                         REPLY (" sequence_num(%d) timestamp(%lums)",
                             stuff->sequenceNumber,
-                            stuff->timestamp);
+                            (unsigned long)stuff->timestamp);
                     }
 
                     return reply;
@@ -579,8 +579,8 @@ _EvlogReplyRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
             {
                 xRRGetScreenResourcesReply *stuff = (xRRGetScreenResourcesReply *)rep;
                 REPLY (": Timestamp(%ldms) ConfigTimestamp(%ldms) nCrtcs(%d) nOutputs(%d) nModes(%d) nbytesNames(%d)",
-                    stuff->timestamp,
-                    stuff->configTimestamp,
+                    (long int)stuff->timestamp,
+                    (long int)stuff->configTimestamp,
                     stuff->nCrtcs,
                     stuff->nOutputs,
                     stuff->nModes,
@@ -606,7 +606,7 @@ _EvlogReplyRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                 REPLY ("(");
                 for (i = 0 ; i < nCrtcs ; i++)
                 {
-                    REPLY ("0x%lx", crtcs[i]);
+                    REPLY ("0x%x", (unsigned int)crtcs[i]);
                     if(i != nCrtcs - 1)
                         REPLY (", ");
                 }
@@ -616,7 +616,7 @@ _EvlogReplyRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                 REPLY ("(");
                 for (i = 0 ; i < nOutputs ; i++)
                 {
-                    REPLY ("0x%lx", outputs[i]);
+                    REPLY ("0x%x", (unsigned int)outputs[i]);
                     if(i != nOutputs - 1)
                         REPLY (", ");
                 }
@@ -626,7 +626,7 @@ _EvlogReplyRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                 REPLY ("(");
                 for (i = 0 ; i < nModes ; i++)
                 {
-                    REPLY ("0x%lx %dx%d", modeinfos[i].id, modeinfos[i].width, modeinfos[i].height);
+                    REPLY ("0x%x %dx%d", (unsigned int)modeinfos[i].id, modeinfos[i].width, modeinfos[i].height);
                     if(i != nModes - 1)
                         REPLY (", ");
                 }
@@ -653,11 +653,11 @@ _EvlogReplyRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
             if (evinfo->rep.isStart)
             {
                 xRRGetOutputInfoReply *stuff = (xRRGetOutputInfoReply *)rep;
-                REPLY (": Timestamp(%ldms) Crtc(0x%lx) mmSize(%ldx%ld) nCrtcs(%d) nModes(%d) nPreferred(%d) nClones(%d)",
-                    stuff->timestamp,
-                    stuff->crtc,
-                    stuff->mmWidth,
-                    stuff->mmHeight,
+                REPLY (": Timestamp(%ldms) Crtc(0x%x) mmSize(%ldx%ld) nCrtcs(%d) nModes(%d) nPreferred(%d) nClones(%d)",
+                    (long int)stuff->timestamp,
+                    (unsigned int)stuff->crtc,
+                    (long int)stuff->mmWidth,
+                    (long int)stuff->mmHeight,
                     stuff->nCrtcs,
                     stuff->nModes,
                     stuff->nPreferred,
@@ -682,7 +682,7 @@ _EvlogReplyRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                 REPLY ("(");
                 for (i = 0 ; i < nCrtcs ; i++)
                 {
-                    REPLY ("0x%lx", crtcs[i]);
+                    REPLY ("0x%x", (unsigned int)crtcs[i]);
                     if(i != nCrtcs - 1)
                         REPLY (", ");
                 }
@@ -692,7 +692,7 @@ _EvlogReplyRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                 REPLY ("(");
                 for (i = 0 ; i < nModes ; i++)
                 {
-                    REPLY ("0x%lx", modes[i]);
+                    REPLY ("0x%x", (unsigned int)modes[i]);
                     if(i != nModes - 1)
                         REPLY (", ");
                 }
@@ -702,7 +702,7 @@ _EvlogReplyRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                 REPLY ("(");
                 for (i = 0 ; i < nClones ; i++)
                 {
-                    REPLY ("0x%lx", clones[i]);
+                    REPLY ("0x%x", (unsigned int)clones[i]);
                     if(i != nClones - 1)
                         REPLY (", ");
                 }
@@ -751,8 +751,8 @@ _EvlogReplyRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                 reply = xDbgGetAtom(stuff->propertyType, evinfo, reply, len);
 
                 REPLY (" bytesAfter(%ld) nItems(%ld)",
-                    stuff->bytesAfter,
-                    stuff->nItems);
+                    (long int)stuff->bytesAfter,
+                    (long int)stuff->nItems);
             }
             else
             {
@@ -769,13 +769,13 @@ _EvlogReplyRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
             if (evinfo->rep.isStart)
             {
                 xRRGetCrtcInfoReply *stuff = (xRRGetCrtcInfoReply *)rep;
-                REPLY (" Timestamp(%ldms) coord(%d,%d %dx%d) RRmode(0x%lx) rot(%d) rots(%d) nOutput(%d) nPossibleOutput(%d)",
-                    stuff->timestamp,
+                REPLY (" Timestamp(%ldms) coord(%d,%d %dx%d) RRmode(0x%x) rot(%d) rots(%d) nOutput(%d) nPossibleOutput(%d)",
+                    (long int)stuff->timestamp,
                     stuff->x,
                     stuff->y,
                     stuff->width,
                     stuff->height,
-                    stuff->mode,
+                    (unsigned int)stuff->mode,
                     stuff->rotation,
                     stuff->rotations,
                     stuff->nOutput,
@@ -794,7 +794,7 @@ _EvlogReplyRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                 REPLY ("(");
                 for (i = 0 ; i < nOutput ; i++)
                 {
-                    REPLY ("0x%lx", outputs[i]);
+                    REPLY ("0x%x", (unsigned int)outputs[i]);
                     if(i != nOutput - 1)
                         REPLY (", ");
                 }
@@ -804,7 +804,7 @@ _EvlogReplyRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                 REPLY ("(");
                 for (i = 0 ; i < nPossibleOutput ; i++)
                 {
-                    REPLY ("0x%lx", possible[i]);
+                    REPLY ("0x%x", (unsigned int)possible[i]);
                     if(i != nPossibleOutput - 1)
                         REPLY (", ");
                 }
@@ -821,7 +821,7 @@ _EvlogReplyRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                 xRRSetCrtcConfigReply *stuff = (xRRSetCrtcConfigReply *)rep;
 
                 REPLY (" newTimestamp(%ldms)",
-                    stuff->newTimestamp);
+                    (long int)stuff->newTimestamp);
             }
             else
             {
@@ -840,8 +840,8 @@ _EvlogReplyRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                 xRRGetScreenResourcesReply *stuff = (xRRGetScreenResourcesReply *)rep;
 
                 REPLY (" Timestamp(%ldms) ConfigTimestamp(%ldms) nCrtcs(%d) nOutputs(%d) nModes(%d) nbytesNames(%d)",
-                    stuff->timestamp,
-                    stuff->configTimestamp,
+                    (long int)stuff->timestamp,
+                    (long int)stuff->configTimestamp,
                     stuff->nCrtcs,
                     stuff->nOutputs,
                     stuff->nModes,
@@ -865,7 +865,7 @@ _EvlogReplyRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                 REPLY ("(");
                 for (i = 0 ; i < nCrtcs ; i++)
                 {
-                    REPLY ("0x%lx", crtcs[i]);
+                    REPLY ("0x%x", (unsigned int)crtcs[i]);
                     if(i != nCrtcs - 1)
                         REPLY (", ");
                 }
@@ -875,7 +875,7 @@ _EvlogReplyRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                 REPLY ("(");
                 for (i = 0 ; i < nOutputs ; i++)
                 {
-                    REPLY ("0x%lx", outputs[i]);
+                    REPLY ("0x%x", (unsigned int)outputs[i]);
                     if(i != nOutputs - 1)
                         REPLY (", ");
                 }
@@ -885,7 +885,7 @@ _EvlogReplyRandr (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                 REPLY ("(");
                 for (i = 0 ; i < nModes ; i++)
                 {
-                    REPLY ("0x%lx %dx%d", modeinfos[i].id, modeinfos[i].width, modeinfos[i].height);
+                    REPLY ("0x%x %dx%d", (unsigned int)modeinfos[i].id, modeinfos[i].width, modeinfos[i].height);
                     if(i != nModes - 1)
                         REPLY (", ");
                 }
index e0a9747..5c898b4 100644 (file)
@@ -114,9 +114,9 @@ _EvlogRequestXextShm (EvlogInfo *evinfo, int detail_level, char *reply, int *len
     case X_ShmPutImage:
         {
             xShmPutImageReq *stuff = (xShmPutImageReq *)req;
-            REPLY (": XID(0x%lx) gc(0x%lx) size(%dx%d) src(%d,%d %dx%d) dst(%d,%d)",
-                stuff->drawable,
-                stuff->gc,
+            REPLY (": XID(0x%x) gc(0x%x) size(%dx%d) src(%d,%d %dx%d) dst(%d,%d)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc,
                 stuff->totalWidth,
                 stuff->totalHeight,
                 stuff->srcX,
@@ -140,13 +140,13 @@ _EvlogRequestXextShm (EvlogInfo *evinfo, int detail_level, char *reply, int *len
                 }
 
                 REPLY ("\n");
-                REPLY ("%67s depth(%d) format(%s) send_event(%s) shmseg(0x%lx) offset(%ld)",
+                REPLY ("%67s depth(%d) format(%s) send_event(%s) shmseg(0x%x) offset(%ld)",
                     " ",
                     stuff->depth,
                     format,
                     stuff->sendEvent ? "YES" : "NO",
-                    stuff->shmseg,
-                    stuff->offset);
+                    (unsigned int)stuff->shmseg,
+                    (long int)stuff->offset);
             }
 
             return reply;
@@ -155,8 +155,8 @@ _EvlogRequestXextShm (EvlogInfo *evinfo, int detail_level, char *reply, int *len
     case X_ShmGetImage:
         {
             xShmGetImageReq *stuff = (xShmGetImageReq *)req;
-            REPLY (": XID(0x%lx) size(%dx%d) coord(%d,%d)",
-                stuff->drawable,
+            REPLY (": XID(0x%x) size(%dx%d) coord(%d,%d)",
+                (unsigned int)stuff->drawable,
                 stuff->width,
                 stuff->height,
                 stuff->x,
@@ -176,12 +176,12 @@ _EvlogRequestXextShm (EvlogInfo *evinfo, int detail_level, char *reply, int *len
                 }
 
                 REPLY ("\n");
-                REPLY ("%67s format(%s) plain_mask(0x%lx) shmseg(0x%lx) offset(%ld)",
+                REPLY ("%67s format(%s) plain_mask(0x%x) shmseg(0x%x) offset(%ld)",
                     " ",
                     format,
-                    stuff->planeMask,
-                    stuff->shmseg,
-                    stuff->offset);
+                    (unsigned int)stuff->planeMask,
+                    (unsigned int)stuff->shmseg,
+                    (long int)stuff->offset);
             }
 
             return reply;
@@ -190,20 +190,20 @@ _EvlogRequestXextShm (EvlogInfo *evinfo, int detail_level, char *reply, int *len
     case X_ShmCreatePixmap:
         {
             xShmCreatePixmapReq *stuff = (xShmCreatePixmapReq *)req;
-            REPLY (": Pixmap(0x%lx) Drawable(0x%lx) size(%dx%d)",
-                stuff->pid,
-                stuff->drawable,
+            REPLY (": Pixmap(0x%x) Drawable(0x%x) size(%dx%d)",
+                (unsigned int)stuff->pid,
+                (unsigned int)stuff->drawable,
                 stuff->width,
                 stuff->height);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY ("\n");
-                REPLY ("%67s depth(%d) shmseg(0x%lx) offset(%ld)",
+                REPLY ("%67s depth(%d) shmseg(0x%x) offset(%ld)",
                     " ",
                     stuff->depth,
-                    stuff->shmseg,
-                    stuff->offset);
+                    (unsigned int)stuff->shmseg,
+                    (long int)stuff->offset);
             }
 
             return reply;
@@ -226,10 +226,10 @@ _EvlogRequestXextSync(EvlogInfo *evinfo, int detail_level, char *reply, int *len
     case X_SyncCreateCounter:
         {
             xSyncCreateCounterReq *stuff = (xSyncCreateCounterReq *)req;
-            REPLY (": XID(0x%lx) initValue(%ld/%ld)",
-                stuff->cid,
-                stuff->initial_value_hi,
-                stuff->initial_value_lo);
+            REPLY (": XID(0x%x) initValue(%ld/%ld)",
+                (unsigned int)stuff->cid,
+                (long int)stuff->initial_value_hi,
+                (long int)stuff->initial_value_lo);
 
             return reply;
         }
@@ -237,10 +237,10 @@ _EvlogRequestXextSync(EvlogInfo *evinfo, int detail_level, char *reply, int *len
     case X_SyncSetCounter:
         {
             xSyncSetCounterReq *stuff = (xSyncSetCounterReq *)req;
-            REPLY (": XID(0x%lx) Value(%ld/%ld)",
-                stuff->cid,
-                stuff->value_hi,
-                stuff->value_lo);
+            REPLY (": XID(0x%x) Value(%ld/%ld)",
+                (unsigned int)stuff->cid,
+                (long int)stuff->value_hi,
+                (long int)stuff->value_lo);
 
             return reply;
         }
@@ -248,10 +248,10 @@ _EvlogRequestXextSync(EvlogInfo *evinfo, int detail_level, char *reply, int *len
     case X_SyncChangeCounter:
         {
             xSyncChangeCounterReq *stuff = (xSyncChangeCounterReq *)req;
-            REPLY (": XID(0x%lx) Value(%ld/%ld)",
-                stuff->cid,
-                stuff->value_hi,
-                stuff->value_lo);
+            REPLY (": XID(0x%x) Value(%ld/%ld)",
+                (unsigned int)stuff->cid,
+                (long int)stuff->value_hi,
+                (long int)stuff->value_lo);
 
             return reply;
         }
@@ -259,8 +259,8 @@ _EvlogRequestXextSync(EvlogInfo *evinfo, int detail_level, char *reply, int *len
     case X_SyncQueryCounter:
         {
             xSyncQueryCounterReq *stuff = (xSyncQueryCounterReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->counter);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->counter);
 
             return reply;
         }
@@ -268,8 +268,8 @@ _EvlogRequestXextSync(EvlogInfo *evinfo, int detail_level, char *reply, int *len
     case X_SyncDestroyCounter:
         {
             xSyncDestroyCounterReq *stuff = (xSyncDestroyCounterReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->counter);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->counter);
 
             return reply;
         }
@@ -280,8 +280,8 @@ _EvlogRequestXextSync(EvlogInfo *evinfo, int detail_level, char *reply, int *len
             xSyncWaitCondition *pProtocolWaitConds;
 
             pProtocolWaitConds = (xSyncWaitCondition *) &stuff[1];
-            REPLY (": XID(0x%lx) VType:%d TType:%d Value(%d/%d)",
-                pProtocolWaitConds->counter,
+            REPLY (": XID(0x%x) VType:%d TType:%d Value(%d/%d)",
+                (unsigned int)pProtocolWaitConds->counter,
                 (unsigned int)pProtocolWaitConds->value_type,
                 (unsigned int)pProtocolWaitConds->test_type,
                 (unsigned int)pProtocolWaitConds->wait_value_hi,
@@ -305,8 +305,8 @@ _EvlogRequestXextXtestExt1(EvlogInfo *evinfo, int detail_level, char *reply, int
     case X_TestFakeInput:
         {
             xTestFakeInputReq *stuff = (xTestFakeInputReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->ack);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->ack);
 
             return reply;
         }
@@ -314,8 +314,8 @@ _EvlogRequestXextXtestExt1(EvlogInfo *evinfo, int detail_level, char *reply, int
     case X_TestGetInput:
         {
             xTestGetInputReq *stuff = (xTestGetInputReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->mode);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->mode);
 
             return reply;
         }
@@ -348,9 +348,9 @@ _EvlogRequestXextXtest(EvlogInfo *evinfo, int detail_level, char *reply, int *le
     case X_XTestCompareCursor:
         {
             xXTestCompareCursorReq *stuff = (xXTestCompareCursorReq *)req;
-            REPLY (": XID(0x%lx) Cursor(0x%lx)",
-                stuff->window,
-                stuff->cursor);
+            REPLY (": XID(0x%x) Cursor(0x%x)",
+                (unsigned int)stuff->window,
+                (unsigned int)stuff->cursor);
 
             return reply;
         }
@@ -358,8 +358,8 @@ _EvlogRequestXextXtest(EvlogInfo *evinfo, int detail_level, char *reply, int *le
     case X_XTestFakeInput:
         {
             xXTestFakeInputReq *stuff = (xXTestFakeInputReq *)req;
-            REPLY (": XID(0x%lx) coord(%d,%d)",
-                stuff->root,
+            REPLY (": XID(0x%x) coord(%d,%d)",
+                (unsigned int)stuff->root,
                 stuff->rootX,
                 stuff->rootY);
 
@@ -368,7 +368,7 @@ _EvlogRequestXextXtest(EvlogInfo *evinfo, int detail_level, char *reply, int *le
                 REPLY (" type(%d) detail(%d) time(%lums) device_id(%d)",
                     stuff->type,
                     stuff->detail,
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->deviceid);
             }
 
@@ -389,8 +389,8 @@ _EvlogRequestXextShape(EvlogInfo *evinfo, int detail_level, char *reply, int *le
     case X_ShapeRectangles:
         {
             xShapeRectanglesReq *stuff = (xShapeRectanglesReq *)req;
-            REPLY (": XID(0x%lx) coord(%d,%d)",
-                stuff->dest,
+            REPLY (": XID(0x%x) coord(%d,%d)",
+                (unsigned int)stuff->dest,
                 stuff->xOff,
                 stuff->yOff);
 
@@ -453,11 +453,11 @@ _EvlogRequestXextShape(EvlogInfo *evinfo, int detail_level, char *reply, int *le
     case X_ShapeMask:
         {
             xShapeMaskReq *stuff = (xShapeMaskReq *)req;
-            REPLY (": XID(0x%lx) coord(%d,%d) src(0x%lx)",
-                stuff->dest,
+            REPLY (": XID(0x%x) coord(%d,%d) src(0x%x)",
+                (unsigned int)stuff->dest,
                 stuff->xOff,
                 stuff->yOff,
-                stuff->src);
+                (unsigned int)stuff->src);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -483,11 +483,11 @@ _EvlogRequestXextShape(EvlogInfo *evinfo, int detail_level, char *reply, int *le
     case X_ShapeCombine:
         {
             xShapeCombineReq *stuff = (xShapeCombineReq *)req;
-            REPLY (": XID(0x%lx) coord(%d,%d) src(0x%lx)",
-                stuff->dest,
+            REPLY (": XID(0x%x) coord(%d,%d) src(0x%x)",
+                (unsigned int)stuff->dest,
                 stuff->xOff,
                 stuff->yOff,
-                stuff->src);
+                (unsigned int)stuff->src);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -522,8 +522,8 @@ _EvlogRequestXextShape(EvlogInfo *evinfo, int detail_level, char *reply, int *le
     case X_ShapeOffset:
         {
             xShapeOffsetReq *stuff = (xShapeOffsetReq *)req;
-            REPLY (": XID(0x%lx) coord(%d,%d)",
-                stuff->dest,
+            REPLY (": XID(0x%x) coord(%d,%d)",
+                (unsigned int)stuff->dest,
                 stuff->xOff,
                 stuff->yOff);
 
@@ -550,8 +550,8 @@ _EvlogRequestXextShape(EvlogInfo *evinfo, int detail_level, char *reply, int *le
     case X_ShapeQueryExtents:
         {
             xShapeQueryExtentsReq *stuff = (xShapeQueryExtentsReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             return reply;
         }
@@ -559,8 +559,8 @@ _EvlogRequestXextShape(EvlogInfo *evinfo, int detail_level, char *reply, int *le
     case X_ShapeSelectInput:
         {
             xShapeSelectInputReq *stuff = (xShapeSelectInputReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -574,8 +574,8 @@ _EvlogRequestXextShape(EvlogInfo *evinfo, int detail_level, char *reply, int *le
     case X_ShapeInputSelected:
         {
             xShapeInputSelectedReq *stuff = (xShapeInputSelectedReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             return reply;
         }
@@ -583,8 +583,8 @@ _EvlogRequestXextShape(EvlogInfo *evinfo, int detail_level, char *reply, int *le
     case X_ShapeGetRectangles:
         {
             xShapeGetRectanglesReq *stuff = (xShapeGetRectanglesReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->window);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -640,17 +640,17 @@ _EvlogEventXextShm (EvlogInfo *evinfo, int first_base, int detail_level, char *r
     case ShmCompletion:
         {
             xShmCompletionEvent *stuff = (xShmCompletionEvent *) evt;
-            REPLY (": XID(0x%lx)",
-                stuff->drawable);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->drawable);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
-                REPLY (" sequence_num(%d) major_event(%d) minor_event(%d) shmseg(0x%lx) offset(%ld)",
+                REPLY (" sequence_num(%d) major_event(%d) minor_event(%d) shmseg(0x%x) offset(%ld)",
                     stuff->sequenceNumber,
                     stuff->majorEvent,
                     stuff->minorEvent,
-                    stuff->shmseg,
-                    stuff->offset);
+                    (unsigned int)stuff->shmseg,
+                    (long int)stuff->offset);
             }
             return reply;
         }
@@ -673,12 +673,12 @@ _EvlogEventXextSync (EvlogInfo *evinfo, int first_base, int detail_level, char *
     case XSyncCounterNotify:
         {
             xSyncCounterNotifyEvent *stuff = (xSyncCounterNotifyEvent *) evt;
-            REPLY (": XID(0x%lx) WaitValue(0x%lx/0x%lx) CounterValue(0x%lx/0x%lx)",
-                stuff->counter,
-                stuff->wait_value_hi,
-                stuff->wait_value_lo,
-                stuff->counter_value_hi,
-                stuff->counter_value_lo);
+            REPLY (": XID(0x%x) WaitValue(0x%x/0x%x) CounterValue(0x%x/0x%x)",
+                (unsigned int)stuff->counter,
+                (unsigned int)stuff->wait_value_hi,
+                (unsigned int)stuff->wait_value_lo,
+                (unsigned int)stuff->counter_value_hi,
+                (unsigned int)stuff->counter_value_lo);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -686,7 +686,7 @@ _EvlogEventXextSync (EvlogInfo *evinfo, int first_base, int detail_level, char *
                 REPLY ("%67s sequence_num(%d) time(%lums) count(%d) destroyed(%s)",
                     " ",
                     stuff->sequenceNumber,
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->count,
                     stuff->destroyed ? "YES" : "NO");
             }
@@ -697,12 +697,12 @@ _EvlogEventXextSync (EvlogInfo *evinfo, int first_base, int detail_level, char *
     case XSyncAlarmNotify:
         {
             xSyncAlarmNotifyEvent *stuff = (xSyncAlarmNotifyEvent *) evt;
-            REPLY (": XID(0x%lx) CounterValue(0x%lx/0x%lx) AlarmValue(0x%lx/0x%lx)",
-                stuff->alarm,
-                stuff->counter_value_hi,
-                stuff->counter_value_lo,
-                stuff->alarm_value_hi,
-                stuff->alarm_value_lo);
+            REPLY (": XID(0x%x) CounterValue(0x%x/0x%x) AlarmValue(0x%x/0x%x)",
+                (unsigned int)stuff->alarm,
+                (unsigned int)stuff->counter_value_hi,
+                (unsigned int)stuff->counter_value_lo,
+                (unsigned int)stuff->alarm_value_hi,
+                (unsigned int)stuff->alarm_value_lo);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -710,7 +710,7 @@ _EvlogEventXextSync (EvlogInfo *evinfo, int first_base, int detail_level, char *
                 REPLY ("%67s sequence_num(%d) time(%lums) state(%d)",
                     " ",
                     stuff->sequenceNumber,
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->state);
             }
 
@@ -765,8 +765,8 @@ _EvlogEventXextShape (EvlogInfo *evinfo, int first_base, int detail_level, char
     case ShapeNotify:
         {
             xShapeNotifyEvent *stuff = (xShapeNotifyEvent *) evt;
-            REPLY (": XID(0x%lx) coord(%d,%d %dx%d)",
-                stuff->window,
+            REPLY (": XID(0x%x) coord(%d,%d %dx%d)",
+                (unsigned int)stuff->window,
                 stuff->x,
                 stuff->y,
                 stuff->width,
@@ -791,7 +791,7 @@ _EvlogEventXextShape (EvlogInfo *evinfo, int first_base, int detail_level, char
                     " ",
                     kind,
                     stuff->sequenceNumber,
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->shaped ? "EXIST" : "NON_EXIST");
             }
 
@@ -850,9 +850,9 @@ _EvlogReplyXextShm (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
             if (evinfo->rep.isStart)
             {
                 xShmGetImageReply *stuff = (xShmGetImageReply *)rep;
-                REPLY (": Visual(0x%lx) size(%ld) sequence_num(%d)",
-                    stuff->visual,
-                    stuff->size,
+                REPLY (": Visual(0x%x) size(%ld) sequence_num(%d)",
+                    (unsigned int)stuff->visual,
+                    (long int)stuff->size,
                     stuff->sequenceNumber);
             }
             else
@@ -883,8 +883,8 @@ _EvlogReplyXextSync (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
             {
                 xSyncQueryCounterReply *stuff = (xSyncQueryCounterReply *)rep;
                 REPLY (": Value(%ld/%ld) sequence_num(%d)",
-                    stuff->value_hi,
-                    stuff->value_lo,
+                    (long int)stuff->value_hi,
+                    (long int)stuff->value_lo,
                     stuff->sequenceNumber);
             }
             else
@@ -914,8 +914,8 @@ _EvlogReplyXextXtestExt1 (EvlogInfo *evinfo, int detail_level, char *reply, int
             if (evinfo->rep.isStart)
             {
                 xTestQueryInputSizeReply *stuff = (xTestQueryInputSizeReply *)rep;
-                REPLY (": sizeReturn(0x%lx) sequence_num(%d)",
-                    stuff->size_return,
+                REPLY (": sizeReturn(0x%x) sequence_num(%d)",
+                    (unsigned int)stuff->size_return,
                     stuff->sequenceNumber);
             }
             else
@@ -1064,7 +1064,7 @@ _EvlogReplyXextShape(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                 }
                 REPLY (": ordering(%s) nrects(%ld)",
                     ordering,
-                    stuff->nrects);
+                    (long int)stuff->nrects);
             }
             else
             {
index 6aebbfd..d7a22a6 100644 (file)
@@ -91,8 +91,8 @@ _EvlogRequestXinput (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_GrabDevice:
         {
             xGrabDeviceReq *stuff = (xGrabDeviceReq *)req;
-            REPLY (": XID(0x%lx) device_ID(%d)",
-                stuff->grabWindow,
+            REPLY (": XID(0x%x) device_ID(%d)",
+                (unsigned int)stuff->grabWindow,
                 stuff->deviceid);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
@@ -108,7 +108,7 @@ _EvlogRequestXinput (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
                 REPLY (")");
 
                 REPLY (" time(%lums) evt_cnt(%d)  owner_events(%s)",
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->event_count,
                     stuff->ownerEvents ? "YES" : "NO");
             }
@@ -125,7 +125,7 @@ _EvlogRequestXinput (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" time(%lums)",
-                    stuff->time);
+                    (unsigned long)stuff->time);
             }
 
             return reply;
@@ -134,8 +134,8 @@ _EvlogRequestXinput (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_GrabDeviceKey:
         {
             xGrabDeviceKeyReq *stuff = (xGrabDeviceKeyReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->grabWindow);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->grabWindow);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -169,8 +169,8 @@ _EvlogRequestXinput (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_UngrabDeviceKey:
         {
             xUngrabDeviceKeyReq *stuff = (xUngrabDeviceKeyReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->grabWindow);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->grabWindow);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -187,8 +187,8 @@ _EvlogRequestXinput (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_GrabDeviceButton:
         {
             xGrabDeviceButtonReq *stuff = (xGrabDeviceButtonReq *)req;
-            REPLY (": XID(0x%lx))",
-                stuff->grabWindow);
+            REPLY (": XID(0x%x))",
+                (unsigned int)stuff->grabWindow);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -221,8 +221,8 @@ _EvlogRequestXinput (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_UngrabDeviceButton:
         {
             xUngrabDeviceButtonReq *stuff = (xUngrabDeviceButtonReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->grabWindow);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->grabWindow);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -245,7 +245,7 @@ _EvlogRequestXinput (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" time(%lums) mode(%d)",
-                stuff->time,
+                (unsigned long)stuff->time,
                 stuff->mode);
             }
 
@@ -264,14 +264,14 @@ _EvlogRequestXinput (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case X_SetDeviceFocus:
         {
             xSetDeviceFocusReq *stuff = (xSetDeviceFocusReq *)req;
-            REPLY (": XID(0x%lx) dev_ID(%d)",
-                stuff->focus,
+            REPLY (": XID(0x%x) dev_ID(%d)",
+                (unsigned int)stuff->focus,
                 stuff->device);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" time(%lums) revertTo(%d)",
-                stuff->time,
+                (unsigned long)stuff->time,
                 stuff->revertTo);
             }
 
@@ -665,7 +665,7 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
                 {
                     REPLY (" valuator%d(%ld)",
                         i,
-                        *(&stuff->valuator0 + i));
+                        (long int)*(&stuff->valuator0 + i));
                 }
             }
 
@@ -675,22 +675,22 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
     case XI_DeviceKeyPress:
         {
             XDeviceKeyPressedEvent *stuff = (XDeviceKeyPressedEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx %d,%d) Root(0x%lx %d,%d) subWindow(0x%lx)",
-                stuff->deviceid,
-                stuff->window,
+            REPLY (": XID(0x%x) Window(0x%x %d,%d) Root(0x%x %d,%d) subWindow(0x%x)",
+                (unsigned int)stuff->deviceid,
+                (unsigned int)stuff->window,
                 stuff->x,
                 stuff->y,
-                stuff->root,
+                (unsigned int)stuff->root,
                 stuff->x_root,
                 stuff->y_root,
-                stuff->subwindow);
+                (unsigned int)stuff->subwindow);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY ("\n");
                 REPLY ("%67s time(%lums) state(%d) key_code(%d) same_screen(%s) device_state(%d) first_axis(%d)",
                     " ",
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->state,
                     stuff->keycode,
                     stuff->same_screen ? "YES" : "NO",
@@ -704,22 +704,22 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
     case XI_DeviceKeyRelease:
         {
             XDeviceKeyReleasedEvent *stuff = (XDeviceKeyReleasedEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx %d,%d) Root(0x%lx %d,%d) subWindow(0x%lx)",
-                stuff->deviceid,
-                stuff->window,
+            REPLY (": XID(0x%x) Window(0x%x %d,%d) Root(0x%x %d,%d) subWindow(0x%x)",
+                (unsigned int)stuff->deviceid,
+                (unsigned int)stuff->window,
                 stuff->x,
                 stuff->y,
-                stuff->root,
+                (unsigned int)stuff->root,
                 stuff->x_root,
                 stuff->y_root,
-                stuff->subwindow);
+                (unsigned int)stuff->subwindow);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY ("\n");
                 REPLY ("%67s time(%lums) state(%d) key_code(%d) same_screen(%s) device_state(%d) first_axis(%d)",
                     " ",
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->state,
                     stuff->keycode,
                     stuff->same_screen ? "YES" : "NO",
@@ -733,22 +733,22 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
     case XI_DeviceButtonPress:
         {
             XDeviceButtonPressedEvent *stuff = (XDeviceButtonPressedEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx %d,%d) Root(0x%lx %d,%d) subWindow(0x%lx)",
-                stuff->deviceid,
-                stuff->window,
+            REPLY (": XID(0x%x) Window(0x%x %d,%d) Root(0x%x %d,%d) subWindow(0x%x)",
+                (unsigned int)stuff->deviceid,
+                (unsigned int)stuff->window,
                 stuff->x,
                 stuff->y,
-                stuff->root,
+                (unsigned int)stuff->root,
                 stuff->x_root,
                 stuff->y_root,
-                stuff->subwindow);
+                (unsigned int)stuff->subwindow);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY ("\n");
                 REPLY ("%67s time(%lums) state(%d) button(%d) same_screen(%s) device_state(%d) first_axis(%d)",
                     " ",
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->state,
                     stuff->button,
                     stuff->same_screen ? "YES" : "NO",
@@ -762,22 +762,22 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
     case XI_DeviceButtonRelease:
         {
             XDeviceButtonReleasedEvent *stuff = (XDeviceButtonReleasedEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx %d,%d) Root(0x%lx %d,%d) subWindow(0x%lx)",
-                stuff->deviceid,
-                stuff->window,
+            REPLY (": XID(0x%x) Window(0x%x %d,%d) Root(0x%x %d,%d) subWindow(0x%x)",
+                (unsigned int)stuff->deviceid,
+                (unsigned int)stuff->window,
                 stuff->x,
                 stuff->y,
-                stuff->root,
+                (unsigned int)stuff->root,
                 stuff->x_root,
                 stuff->y_root,
-                stuff->subwindow);
+                (unsigned int)stuff->subwindow);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY ("\n");
                 REPLY ("%67s time(%lums) state(%d) button(%d) same_screen(%s) device_state(%d) first_axis(%d)",
                     " ",
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->state,
                     stuff->button,
                     stuff->same_screen ? "YES" : "NO",
@@ -791,22 +791,22 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
     case XI_DeviceMotionNotify:
         {
             XDeviceMotionEvent *stuff = (XDeviceMotionEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx %d,%d) Root(0x%lx %d,%d) subWindow(0x%lx)",
-                stuff->deviceid,
-                stuff->window,
+            REPLY (": XID(0x%x) Window(0x%x %d,%d) Root(0x%x %d,%d) subWindow(0x%x)",
+                (unsigned int)stuff->deviceid,
+                (unsigned int)stuff->window,
                 stuff->x,
                 stuff->y,
-                stuff->root,
+                (unsigned int)stuff->root,
                 stuff->x_root,
                 stuff->y_root,
-                stuff->subwindow);
+                (unsigned int)stuff->subwindow);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY ("\n");
                 REPLY ("%67s time(%lums) state(%d) is_hint(%d) same_screen(%s) device_state(%d) first_axis(%d)",
                     " ",
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->state,
                     stuff->is_hint,
                     stuff->same_screen ? "YES" : "NO",
@@ -820,9 +820,9 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
     case XI_DeviceFocusIn:
         {
             XDeviceFocusInEvent *stuff = (XDeviceFocusInEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx)",
-                stuff->deviceid,
-                stuff->window);
+            REPLY (": XID(0x%x) Window(0x%x)",
+                (unsigned int)stuff->deviceid,
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -854,7 +854,7 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
                 REPLY (" mode(%s) detail(%s) time(%lums)",
                     mode,
                     detail,
-                    stuff->time);
+                    (unsigned long)stuff->time);
             }
 
             return reply;
@@ -863,9 +863,9 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
     case XI_DeviceFocusOut:
         {
             XDeviceFocusOutEvent *stuff = (XDeviceFocusOutEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx)",
-                stuff->deviceid,
-                stuff->window);
+            REPLY (": XID(0x%x) Window(0x%x)",
+                (unsigned int)stuff->deviceid,
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -897,7 +897,7 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
                 REPLY (" mode(%s) detail(%s) time(%lums)",
                     mode,
                     detail,
-                    stuff->time);
+                    (unsigned long)stuff->time);
             }
 
             return reply;
@@ -906,22 +906,22 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
     case XI_ProximityIn:
         {
             XProximityInEvent *stuff = (XProximityInEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx %d,%d) Root(0x%lx %d,%d) subWindow(0x%lx)",
-                stuff->deviceid,
-                stuff->window,
+            REPLY (": XID(0x%x) Window(0x%x %d,%d) Root(0x%x %d,%d) subWindow(0x%x)",
+                (unsigned int)stuff->deviceid,
+                (unsigned int)stuff->window,
                 stuff->x,
                 stuff->y,
-                stuff->root,
+                (unsigned int)stuff->root,
                 stuff->x_root,
                 stuff->y_root,
-                stuff->subwindow);
+                (unsigned int)stuff->subwindow);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY ("\n");
                 REPLY ("%67s time(%lums) state(%d) same_screen(%s) device_state(%d) first_axis(%d)",
                     " ",
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->state,
                     stuff->same_screen ? "YES" : "NO",
                     stuff->device_state,
@@ -934,22 +934,22 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
     case XI_ProximityOut:
         {
             XProximityOutEvent *stuff = (XProximityOutEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx %d,%d) Root(0x%lx %d,%d) subWindow(0x%lx)",
-                stuff->deviceid,
-                stuff->window,
+            REPLY (": XID(0x%x) Window(0x%x %d,%d) Root(0x%x %d,%d) subWindow(0x%x)",
+                (unsigned int)stuff->deviceid,
+                (unsigned int)stuff->window,
                 stuff->x,
                 stuff->y,
-                stuff->root,
+                (unsigned int)stuff->root,
                 stuff->x_root,
                 stuff->y_root,
-                stuff->subwindow);
+                (unsigned int)stuff->subwindow);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY ("\n");
                 REPLY ("%67s time(%lums) state(%d) same_screen(%s) device_state(%d) first_axis(%d)",
                     " ",
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->state,
                     stuff->same_screen ? "YES" : "NO",
                     stuff->device_state,
@@ -962,14 +962,14 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
     case XI_DeviceStateNotify:
         {
             XDeviceStateNotifyEvent *stuff = (XDeviceStateNotifyEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx)",
-                stuff->deviceid,
-                stuff->window);
+            REPLY (": XID(0x%x) Window(0x%x)",
+                (unsigned int)stuff->deviceid,
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" time(%lums) num_classes(%d)",
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->num_classes);
             }
 
@@ -979,9 +979,9 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
     case XI_DeviceMappingNotify:
         {
             XDeviceMappingEvent *stuff = (XDeviceMappingEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx)",
-                stuff->deviceid,
-                stuff->window);
+            REPLY (": XID(0x%x) Window(0x%x)",
+                (unsigned int)stuff->deviceid,
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -997,7 +997,7 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
                 }
 
                 REPLY (" time(%lums) request(%s) first_keycode(%d) count(%d)",
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     request,
                     stuff->first_keycode,
                     stuff->count);
@@ -1009,9 +1009,9 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
     case XI_ChangeDeviceNotify:
         {
             XChangeDeviceNotifyEvent *stuff = (XChangeDeviceNotifyEvent *) evt;
-            REPLY (": XID(0x%lx) Window(0x%lx)",
-                stuff->deviceid,
-                stuff->window);
+            REPLY (": XID(0x%x) Window(0x%x)",
+                (unsigned int)stuff->deviceid,
+                (unsigned int)stuff->window);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -1026,7 +1026,7 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
                 }
 
                 REPLY (" time(%lums) request(%s)",
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     request);
             }
 
@@ -1072,7 +1072,7 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" time(%lums) device_change(%d) control(%d) sequence_num(%d)",
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->devchange,
                     stuff->control,
                     stuff->sequenceNumber);
@@ -1093,7 +1093,7 @@ _EvlogEventXinput (EvlogInfo *evinfo, int first_base, int detail_level, char *re
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" time(%lums) state(%d) sequence_num(%d)",
-                    stuff->time,
+                    (unsigned long)stuff->time,
                     stuff->state,
                     stuff->sequenceNumber);
             }
@@ -1152,9 +1152,9 @@ _EvlogReplyXinput (EvlogInfo *evinfo, int detail_level, char *reply, int *len)
             if (evinfo->rep.isStart)
             {
                 xGetDeviceFocusReply *stuff = (xGetDeviceFocusReply *) rep;
-                REPLY (": XID(0x%lx) Time(0x%lx)",
-                    stuff->focus,
-                    stuff->time);
+                REPLY (": XID(0x%x) Time(0x%x)",
+                    (unsigned int)stuff->focus,
+                    (unsigned int)stuff->time);
             }
             else
             {
index d68b7d4..41548f9 100644 (file)
@@ -70,13 +70,13 @@ _EvlogRequestXv(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case xv_GrabPort:
         {
             xvGrabPortReq *stuff = (xvGrabPortReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->port);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->port);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" time(%lums)",
-                    stuff->time);
+                    (unsigned long)stuff->time);
             }
 
             return reply;
@@ -85,13 +85,13 @@ _EvlogRequestXv(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case xv_UngrabPort:
         {
             xvUngrabPortReq *stuff = (xvUngrabPortReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->port);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->port);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" time(%lums)",
-                    stuff->time);
+                    (unsigned long)stuff->time);
             }
 
             return reply;
@@ -100,10 +100,10 @@ _EvlogRequestXv(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case xv_PutStill:
         {
             xvPutStillReq *stuff = (xvPutStillReq *)req;
-            REPLY (": XID(0x%lx) Drawable(0x%lx) GC(0x%lx) Vid(%d,%d %dx%d) Drw(%d,%d %dx%d)",
-                stuff->port,
-                stuff->drawable,
-                stuff->gc,
+            REPLY (": XID(0x%x) Drawable(0x%x) GC(0x%x) Vid(%d,%d %dx%d) Drw(%d,%d %dx%d)",
+                (unsigned int)stuff->port,
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc,
                 stuff->vid_x,
                 stuff->vid_y,
                 stuff->vid_w,
@@ -119,10 +119,10 @@ _EvlogRequestXv(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case xv_GetStill:
         {
             xvGetStillReq *stuff = (xvGetStillReq *)req;
-            REPLY (": XID(0x%lx) Drawable(0x%lx) GC(0x%lx) Vid(%d,%d %dx%d) Drw(%d,%d %dx%d)",
-                stuff->port,
-                stuff->drawable,
-                stuff->gc,
+            REPLY (": XID(0x%x) Drawable(0x%x) GC(0x%x) Vid(%d,%d %dx%d) Drw(%d,%d %dx%d)",
+                (unsigned int)stuff->port,
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc,
                 stuff->vid_x,
                 stuff->vid_y,
                 stuff->vid_w,
@@ -138,10 +138,10 @@ _EvlogRequestXv(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case xv_PutVideo:
         {
             xvPutVideoReq *stuff = (xvPutVideoReq *)req;
-            REPLY (": XID(0x%lx) Drawable(0x%lx) GC(0x%lx) Vid(%d,%d %dx%d) Drw(%d,%d %dx%d)",
-                stuff->port,
-                stuff->drawable,
-                stuff->gc,
+            REPLY (": XID(0x%x) Drawable(0x%x) GC(0x%x) Vid(%d,%d %dx%d) Drw(%d,%d %dx%d)",
+                (unsigned int)stuff->port,
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc,
                 stuff->vid_x,
                 stuff->vid_y,
                 stuff->vid_w,
@@ -157,10 +157,10 @@ _EvlogRequestXv(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case xv_GetVideo:
         {
             xvGetVideoReq *stuff = (xvGetVideoReq *)req;
-            REPLY (": XID(0x%lx) Drawable(0x%lx) GC(0x%lx) Vid(%d,%d %dx%d) Drw(%d,%d %dx%d)",
-                stuff->port,
-                stuff->drawable,
-                stuff->gc,
+            REPLY (": XID(0x%x) Drawable(0x%x) GC(0x%x) Vid(%d,%d %dx%d) Drw(%d,%d %dx%d)",
+                (unsigned int)stuff->port,
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc,
                 stuff->vid_x,
                 stuff->vid_y,
                 stuff->vid_w,
@@ -176,9 +176,9 @@ _EvlogRequestXv(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case xv_StopVideo:
         {
             xvStopVideoReq *stuff = (xvStopVideoReq *)req;
-            REPLY (": XID(0x%lx) Drawable(0x%lx)",
-                stuff->port,
-                stuff->drawable);
+            REPLY (": XID(0x%x) Drawable(0x%x)",
+                (unsigned int)stuff->port,
+                (unsigned int)stuff->drawable);
 
             return reply;
         }
@@ -186,8 +186,8 @@ _EvlogRequestXv(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case xv_SelectVideoNotify:
         {
             xvSelectVideoNotifyReq *stuff = (xvSelectVideoNotifyReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->drawable);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->drawable);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -201,8 +201,8 @@ _EvlogRequestXv(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case xv_SelectPortNotify:
         {
             xvSelectPortNotifyReq *stuff = (xvSelectPortNotifyReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->port);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->port);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
@@ -216,8 +216,8 @@ _EvlogRequestXv(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case xv_QueryBestSize:
         {
             xvQueryBestSizeReq *stuff = (xvQueryBestSizeReq *)req;
-            REPLY (": XID(0x%lx) VidSize(%dx%d) DrwSize(%dx%d)",
-                stuff->port,
+            REPLY (": XID(0x%x) VidSize(%dx%d) DrwSize(%dx%d)",
+                (unsigned int)stuff->port,
                 stuff->vid_w,
                 stuff->vid_h,
                 stuff->drw_w,
@@ -235,8 +235,8 @@ _EvlogRequestXv(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case xv_SetPortAttribute:
         {
             xvSetPortAttributeReq *stuff = (xvSetPortAttributeReq *)req;
-            REPLY (": XID(0x%lx) ",
-                stuff->port);
+            REPLY (": XID(0x%x) ",
+                (unsigned int)stuff->port);
 
             REPLY (" Attribute");
             reply = xDbgGetAtom(stuff->attribute, evinfo, reply, len);
@@ -244,7 +244,7 @@ _EvlogRequestXv(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY ("  value(%ld)",
-                    stuff->value);
+                    (long int)stuff->value);
             }
 
             return reply;
@@ -253,8 +253,8 @@ _EvlogRequestXv(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case xv_GetPortAttribute:
         {
             xvGetPortAttributeReq *stuff = (xvGetPortAttributeReq *)req;
-            REPLY (": XID(0x%lx)",
-                stuff->port);
+            REPLY (": XID(0x%x)",
+                (unsigned int)stuff->port);
 
             REPLY (" Attribute");
             reply = xDbgGetAtom(stuff->attribute, evinfo, reply, len);
@@ -265,11 +265,11 @@ _EvlogRequestXv(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case xv_PutImage:
         {
             xvPutImageReq *stuff = (xvPutImageReq *)req;
-            REPLY (": XID(0x%lx) Drawable(0x%lx) GC(0x%lx) ID(%lx) buf(%dx%d) src(%d,%d %dx%d) drw(%d,%d %dx%d)",
-                stuff->port,
-                stuff->drawable,
-                stuff->gc,
-                stuff->id,
+            REPLY (": XID(0x%x) Drawable(0x%x) GC(0x%x) ID(%x) buf(%dx%d) src(%d,%d %dx%d) drw(%d,%d %dx%d)",
+                (unsigned int)stuff->port,
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc,
+                (unsigned int)stuff->id,
                 stuff->width,
                 stuff->height,
                 stuff->src_x,
@@ -287,11 +287,11 @@ _EvlogRequestXv(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
     case xv_ShmPutImage:
         {
             xvShmPutImageReq *stuff = (xvShmPutImageReq *)req;
-            REPLY (": XID(0x%lx) Drawable(0x%lx) GC(0x%lx) ID(%lx) buf(%dx%d) src(%d,%d %dx%d) drw(%d,%d %dx%d)",
-                stuff->port,
-                stuff->drawable,
-                stuff->gc,
-                stuff->id,
+            REPLY (": XID(0x%x) Drawable(0x%x) GC(0x%x) ID(%x) buf(%dx%d) src(%d,%d %dx%d) drw(%d,%d %dx%d)",
+                (unsigned int)stuff->port,
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->gc,
+                (unsigned int)stuff->id,
                 stuff->width,
                 stuff->height,
                 stuff->src_x,
@@ -306,10 +306,10 @@ _EvlogRequestXv(EvlogInfo *evinfo, int detail_level, char *reply, int *len)
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY ("\n");
-                REPLY ("%67s shmseg(0x%lx) offset(%ld) send_event(%s)",
+                REPLY ("%67s shmseg(0x%x) offset(%ld) send_event(%s)",
                     " ",
-                    stuff->shmseg,
-                    stuff->offset,
+                    (unsigned int)stuff->shmseg,
+                    (long int)stuff->offset,
                     stuff->send_event ? "YES" : "NO");
             }
 
@@ -333,16 +333,16 @@ _EvlogEventXv (EvlogInfo *evinfo, int first_base, int detail_level, char *reply,
     case XvVideoNotify:
         {
             XvVideoNotifyEvent *stuff = (XvVideoNotifyEvent *) evt;
-            REPLY (": XID(0x%lx) portID(0x%lx)",
-                stuff->drawable,
-                stuff->port_id);
+            REPLY (": XID(0x%x) portID(0x%x)",
+                (unsigned int)stuff->drawable,
+                (unsigned int)stuff->port_id);
 
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" serial(%lu) reason(%lu) time(%lums)",
-                    stuff->serial,
-                    stuff->reason,
-                    stuff->time);
+                    (unsigned long)stuff->serial,
+                    (unsigned long)stuff->reason,
+                    (unsigned long)stuff->time);
             }
 
             return reply;
@@ -351,9 +351,9 @@ _EvlogEventXv (EvlogInfo *evinfo, int first_base, int detail_level, char *reply,
     case XvPortNotify:
         {
             XvPortNotifyEvent *stuff = (XvPortNotifyEvent *) evt;
-            REPLY (": XID(0x%lx) Value(%ld)",
-                stuff->port_id,
-                stuff->value);
+            REPLY (": XID(0x%x) Value(%ld)",
+                (unsigned int)stuff->port_id,
+                (long int)stuff->value);
 
             REPLY (" Attribute");
             reply = xDbgGetAtom(stuff->attribute, evinfo, reply, len);
@@ -361,9 +361,9 @@ _EvlogEventXv (EvlogInfo *evinfo, int first_base, int detail_level, char *reply,
             if (detail_level >= EVLOG_PRINT_DETAIL)
             {
                 REPLY (" serial(%lu) value(%ld) time(%lums)",
-                    stuff->serial,
-                    stuff->value,
-                    stuff->time);
+                    (unsigned long)stuff->serial,
+                    (long int)stuff->value,
+                    (unsigned long)stuff->time);
             }
 
             return reply;
index 6c6749f..f6ab206 100644 (file)
@@ -32,6 +32,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #ifndef __XDBG_TYPES_H__
 #define __XDBG_TYPES_H__
 
+#include <config.h>
+
 #include <xf86.h>
 #include <X11/Xdefs.h> /* for Bool */
 #include <X11/Xlib.h>
index f6e49d5..7843f1e 100644 (file)
@@ -55,6 +55,19 @@ AC_ARG_ENABLE(secure-log,
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XDBG, dlog xorg-server x11 xdamage xext dbus-1 bigreqsproto compositeproto damageproto dri2proto fixesproto fontsproto gestureproto inputproto kbproto randrproto recordproto renderproto resourceproto videoproto xcmiscproto xextproto xf86vidmodeproto xproto libdrm xcomposite libdri2 xgesture xtst xrandr xi xv)
 
+PKG_CHECK_MODULES(HWC, libhwc hwcproto,
+       [SAVE_CPPFLAGS="$CPPFLAGS"
+       CPPFLAGS="$CPPFLAGS $HWC_CFLAGS"
+       AC_CHECK_HEADERS([X11/extensions/hwc.h],[have_hwc_h="yes"],[have_hwc_h="no"])
+       CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
+
+AM_CONDITIONAL(HAVE_HWC, [test "x$have_hwc_h" = xyes])
+if test "x$have_hwc_h" = xyes; then
+    AC_DEFINE(HAVE_HWC, 1, [Have libhwc])
+    XDBG_CFLAGS="$XDBG_CFLAGS $HWC_CFLAGS"
+    XDBG_LIBS="$XDBG_LIBS $HWC_LIBS"
+fi
+
 AC_SUBST([XDBG_CFLAGS])
 AC_SUBST([XDBG_LIBS])
 
index f2b1c5e..c2bbd0d 100644 (file)
@@ -33,6 +33,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "config.h"
 #endif
 
+#include <sys/time.h>
+#include <unistd.h>
+#include <time.h>
 #include <string.h>
 #include <stdarg.h>
 #include <dlog.h>
@@ -49,6 +52,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define MAX_MODULE_NAME        4
 #define MAX_MODULE_CNT 256
 #define BUF_LEN         1024
+#define MAX_MONTH 12
 
 typedef struct
 {
@@ -60,6 +64,7 @@ typedef struct
 static ModuleInfo modules[MAX_MODULE_CNT];
 static int module_cnt = 0;
 static int default_level = XLOG_LEVEL_DEFAULT;
+static char *st_month[MAX_MONTH] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
 
 static Bool dlog_enable;
 
@@ -89,6 +94,8 @@ _LogModule (void * handle, int logoption, const char * file, int line, const cha
     char tmpBuf[BUF_LEN];
     int loglevel = logoption & XLOG_MASK_LOGLEVEL;
     const char *name;
+    struct timeval  tv;
+    struct tm      *tm=NULL;
 
     if (!h)
         return;
@@ -100,24 +107,32 @@ _LogModule (void * handle, int logoption, const char * file, int line, const cha
         snprintf(tmpBuf, BUF_LEN, "[%s]%s", (name)?name:"", f);
         kLogWrapper (loglevel, logoption, file, line, tmpBuf, args);
     }
-
-    /* write to file */
-    if (loglevel >= XLOG_LEVEL_INFO)
+    else if (loglevel >= XLOG_LEVEL_INFO)
     {
-        if (logoption & XLOG_OPTION_SECURE)
-            snprintf(tmpBuf, BUF_LEN, "(%s) > [SECURE_LOG] [%s]%s", ostr[loglevel], (name)?name:"", f);
-        else
-            snprintf(tmpBuf, BUF_LEN, "(%s) [%s]%s", ostr[loglevel], (name)?name:"", f);
+        if( !dlog_enable )
+        {
+            /* get local time from tv */
+            gettimeofday(&tv, NULL);
+            tm = localtime(&tv.tv_sec);
+
+            /* write to file */
+            if (logoption & XLOG_OPTION_SECURE)
+                snprintf(tmpBuf, BUF_LEN, "[%s %d %02d:%02d:%02d:%03ld] (%s) > [SECURE_LOG] [%s]%s", st_month[tm->tm_mon], tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, tv.tv_usec/1000, ostr[loglevel], (name)?name:"", f);
+            else
+                snprintf(tmpBuf, BUF_LEN, "[%s %d %02d:%02d:%02d:%03ld] (%s) [%s]%s", st_month[tm->tm_mon], tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, tv.tv_usec/1000, ostr[loglevel], (name)?name:"", f);
 
-        if (!dlog_enable)
             LogVWrite (1, tmpBuf, args);
+        }
         else
         {
-            dLogWrapper (loglevel, logoption, file, line, tmpBuf, args);
+            /* dlog already supports localtime stamp. So we just add clock time! */
+            /* write to file */
+            if (logoption & XLOG_OPTION_SECURE)
+                snprintf(tmpBuf, BUF_LEN, "[%10.3f] (%s) > [SECURE_LOG] [%s]%s", GetTimeInMillis()/1000.0, ostr[loglevel], (name)?name:"", f);
+            else
+                snprintf(tmpBuf, BUF_LEN, "[%10.3f] (%s) [%s]%s", GetTimeInMillis()/1000.0, ostr[loglevel], (name)?name:"", f);
 
-            /* write to Xorg.0.log too */
-            if (loglevel >= XLOG_LEVEL_WARNING)
-                LogVWrite (1, tmpBuf, args);
+            dLogWrapper (loglevel, logoption, file, line, tmpBuf, args);
         }
     }
 
@@ -127,8 +142,16 @@ _LogModule (void * handle, int logoption, const char * file, int line, const cha
         char *buf = tmpBuf;
         int   remain = BUF_LEN;
         int   len = 0;
+        unsigned int tv_ms;
+
+        if( tm == NULL )
+        {
+            gettimeofday(&tv, NULL);
+            tm = localtime(&tv.tv_sec);
+        }
 
-        len = snprintf (buf, remain, "(%s) [%10.3f][%s]", ostr[loglevel], GetTimeInMillis()/1000.0, name?name:"");
+        tv_ms = tv.tv_usec/1000;
+        len = snprintf (buf, remain, "[%10.3f] [%s %d %02d:%02d:%02d:%03d] (%s) [%s]", GetTimeInMillis()/1000.0, st_month[tm->tm_mon], tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, tv_ms, ostr[loglevel], name?name:"");
         buf += len;
         remain -= len;
 
index be08f57..5829221 100644 (file)
@@ -64,7 +64,7 @@ enum
     XLOG_LEVEL_3,
     XLOG_LEVEL_4,
     XLOG_LEVEL_MAX,
-    XLOG_LEVEL_DEFAULT = XLOG_LEVEL_2,
+    XLOG_LEVEL_DEFAULT = XLOG_LEVEL_MAX,
 };
 
 #define XDBG_ALL_MODULE  0xFFFFFFFF
index 6f4b730..ade55b6 100644 (file)
@@ -449,8 +449,16 @@ XDbgLogSetWindowPixmap (WindowPtr pWin, PixmapPtr pPixmap)
             XDBG_TRACE (MMEM,"Unset WinPixmap win(0x%x): pixmap(%p) to NULL\n",
                         (unsigned int)pWin->drawable.id, d->pRefPixmap->pPixmap);
 
-            xorg_list_del (&d->pRefPixmap->link);
-            free (d->pRefPixmap);
+            p_ref = _findXDbgRefPixmap (d, d->pRefPixmap->pPixmap);
+            if(p_ref)
+            {
+                xorg_list_del (&d->pRefPixmap->link);
+                free (d->pRefPixmap);
+            }
+            else
+                XDBG_WARNING (MMEM, "Unknown refpixmap : WinPixmap win(0x%x) pixmap(%p) \n",
+                                       (unsigned int)pWin->drawable.id, d->pRefPixmap->pPixmap);
+
             d->pRefPixmap = NULL;
 
             if (xorg_list_is_empty (&d->refPixmaps))
index 22583eb..3ce9b51 100644 (file)
@@ -73,7 +73,6 @@ Bool      xev_trace_on = FALSE;
 int         xev_trace_detail_level = EVLOG_PRINT_DEFAULT;
 static int  xev_trace_fd = -1;
 static int  xev_trace_record_fd = -1;
-static Atom atom_rotate = None;
 static Atom atom_client_pid = None;
 static int  init = 0;
 
@@ -509,20 +508,20 @@ _traceEvent (CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
             {
             case KeyPress:
             case KeyRelease:
-                XDBG_SECURE (MXDBG, "%s(%d)_%d(%s.%d : %s.0x%lx) root(%d,%d) win(%d,%d)\n"
+                XDBG_SECURE (MXDBG, "%s(%d)_%d(%s.%d : %s.0x%x) root(%d,%d) win(%d,%d)\n"
                         , ename[type-KeyPress], pev->u.u.detail, pev->u.u.type
                         , info->command, info->pid
-                        , _traceGetWindowName (pClient, pev->u.keyButtonPointer.event), pev->u.keyButtonPointer.event
+                        , _traceGetWindowName (pClient, pev->u.keyButtonPointer.event), (unsigned int)pev->u.keyButtonPointer.event
                         , pev->u.keyButtonPointer.rootX, pev->u.keyButtonPointer.rootY
                         , pev->u.keyButtonPointer.eventX, pev->u.keyButtonPointer.eventY);
                 break;
 
             case ButtonPress:
             case ButtonRelease:
-                XDBG_SECURE (MXDBG, "%s(%d)_%d(%s.%d : %s.0x%lx) root(%d,%d) win(%d,%d)\n"
+                XDBG_SECURE (MXDBG, "%s(%d)_%d(%s.%d : %s.0x%x) root(%d,%d) win(%d,%d)\n"
                         , ename[type-KeyPress], pev->u.u.detail, pev->u.u.type
                         , info->command, info->pid
-                        , _traceGetWindowName (pClient, pev->u.keyButtonPointer.event), pev->u.keyButtonPointer.event
+                        , _traceGetWindowName (pClient, pev->u.keyButtonPointer.event), (unsigned int)pev->u.keyButtonPointer.event
                         , pev->u.keyButtonPointer.rootX, pev->u.keyButtonPointer.rootY
                         , pev->u.keyButtonPointer.eventX, pev->u.keyButtonPointer.eventY);
                 break;
@@ -660,8 +659,6 @@ xDbgModuleEvlogInstallHooks (XDbgModule *pMod)
 
     if (atom_client_pid == None)
         atom_client_pid = MakeAtom ("X_CLIENT_PID", 12, TRUE);
-    if (atom_rotate == None)
-        atom_rotate = MakeAtom ("_E_ILLUME_ROTATE_ROOT_ANGLE", 12, TRUE);
 
     if (!ret)
     {
index c41ba17..b885835 100644 (file)
@@ -63,7 +63,8 @@ void
 xDbgModuleParseOptions (XDbgModule *pMod, XF86OptionPtr pOpt)
 {
     OptionInfoPtr options = xnfalloc (sizeof (module_options));
-    char *log_path, *evlog_path, *evlog_rule_path;
+    const char *path;
+    char temp[256];
     int log_level = XLOG_LEVEL_DEFAULT;
 
     memcpy (options, module_options, sizeof(module_options));
@@ -76,8 +77,13 @@ xDbgModuleParseOptions (XDbgModule *pMod, XF86OptionPtr pOpt)
     xDbgLogEnableDlog (pMod->dlog);
 
     /* log_path */
-    log_path = xf86GetOptValString (options, OPTION_LOG_PATH);
-    XDBG_INFO (MXDBG, "log path: \"%s\"\n", (log_path)?log_path:"none");
+    path = xf86GetOptValString (options, OPTION_LOG_PATH);
+    XDBG_INFO (MXDBG, "log path: \"%s\"\n", (path)?path:"none");
+    if (path)
+    {
+        snprintf (temp, sizeof(temp), "%s", path);
+        xDbgModuleCommandInitLogPath (pMod, temp);
+    }
 
     /* log_level */
     xf86GetOptValInteger (options, OPTION_LOG_LEVEL, &log_level);
@@ -85,16 +91,22 @@ xDbgModuleParseOptions (XDbgModule *pMod, XF86OptionPtr pOpt)
     xDbgLogSetLevel (XDBG_ALL_MODULE, log_level);
 
     /* evlog_path */
-    evlog_path = xf86GetOptValString (options, OPTION_EVLOG_PATH);
-    XDBG_INFO (MXDBG, "evlog path: \"%s\"\n", (evlog_path)?evlog_path:"none");
+    path = xf86GetOptValString (options, OPTION_EVLOG_PATH);
+    XDBG_INFO (MXDBG, "evlog path: \"%s\"\n", (path)?path:"none");
+    if (path)
+    {
+        snprintf (temp, sizeof(temp), "%s", path);
+        xDbgModuleEvlogSetEvlogPath (pMod, -1, temp, NULL, NULL);
+    }
 
     /* evlog_rule_path */
-    evlog_rule_path = xf86GetOptValString (options, OPTION_EVLOG_RULE_PATH);
-    XDBG_INFO (MXDBG, "evlog rule path: \"%s\"\n", (evlog_rule_path)?evlog_rule_path:"none");
-
-    xDbgModuleCommandInitLogPath (pMod, log_path);
-    xDbgModuleEvlogSetEvlogPath (pMod, -1, evlog_path, NULL, NULL);
-    xDbgModuleCommandInitEvlogRulePath (pMod, evlog_rule_path);
+    path = xf86GetOptValString (options, OPTION_EVLOG_RULE_PATH);
+    XDBG_INFO (MXDBG, "evlog rule path: \"%s\"\n", (path)?path:"none");
+    if (path)
+    {
+        snprintf (temp, sizeof(temp), "%s", path);
+        xDbgModuleCommandInitEvlogRulePath (pMod, temp);
+    }
 
     free (options);
 }
index b13d7b9..93281fa 100644 (file)
@@ -1,6 +1,6 @@
 Name: xorg-x11-module-xdbg
 Summary: Xserver debug module
-Version: 0.1.33
+Version: 0.1.46
 Release:    1
 VCS:        adaptation/xorg/driver/xserver-xorg-module-xdbg#xorg-x11-module-xdbg-0.1.13-1-79-gfb1d23b62faa7f302ac1b19ff1d3f757c4745b13
 Group:      System/Libraries
@@ -76,6 +76,7 @@ cp -af COPYING %{buildroot}/usr/share/license/%{name}
 %remove_docs
 
 %files
+%manifest xorg-x11-module-xdbg.manifest
 %defattr(-,root,root,-)
 /usr/share/license/%{name}
 %{_bindir}/xdbg
diff --git a/xorg-x11-module-xdbg.manifest b/xorg-x11-module-xdbg.manifest
new file mode 100644 (file)
index 0000000..7f541e8
--- /dev/null
@@ -0,0 +1,9 @@
+<manifest>
+        <request>
+                <domain name="_"/>
+        </request>
+        <assign>
+                <filesystem path="/usr/bin/*" label="_" exec_label="none" />
+        </assign>
+</manifest>
+