tizen 2.3 release
[adaptation/xorg/driver/xserver-xorg-module-xdbg.git] / common / xdbg_evlog_core.c
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