style cleanup
[blender.git] / intern / ghost / test / multitest / EventToBuf.c
index 034fbe0..0eb37a5 100644 (file)
@@ -203,33 +203,36 @@ void event_to_buf(GHOST_EventHandle evt, char buf[128])
        void *data= GHOST_GetEventData(evt);
        char *pos= buf;
 
-       pos+= sprintf(pos, "event: %6.2f, %16s", time, eventtype_to_string(type));
+       pos += sprintf(pos, "event: %6.2f, %16s", time, eventtype_to_string(type));
        if (win) {
                char *s= GHOST_GetTitle(win);
-               pos+= sprintf(pos, " - win: %s", s);
+               pos += sprintf(pos, " - win: %s", s);
                free(s);
        } else {
                pos+= sprintf(pos, " - sys evt");
        }
        switch (type) {
-       case GHOST_kEventCursorMove: {
-               GHOST_TEventCursorData *cd= data;
-               pos+= sprintf(pos, " - pos: (%d, %d)", cd->x, cd->y);
-               break;
-       }
-       case GHOST_kEventButtonDown:
-       case GHOST_kEventButtonUp: {
-               GHOST_TEventButtonData *bd= data;
-               pos+= sprintf(pos, " - but: %d", bd->button);
-               break;
-       }
-       
-       case GHOST_kEventKeyDown:
-       case GHOST_kEventKeyUp: {
-               GHOST_TEventKeyData *kd= data;
-               pos+= sprintf(pos, " - key: %s (%d)", keytype_to_string(kd->key), kd->key);
-               if (kd->ascii) pos+= sprintf(pos, " ascii: '%c' (%d)", kd->ascii, kd->ascii);
-               break;
-       }
+               case GHOST_kEventCursorMove:
+               {
+                       GHOST_TEventCursorData *cd= data;
+                       pos += sprintf(pos, " - pos: (%d, %d)", cd->x, cd->y);
+                       break;
+               }
+               case GHOST_kEventButtonDown:
+               case GHOST_kEventButtonUp:
+               {
+                       GHOST_TEventButtonData *bd= data;
+                       pos += sprintf(pos, " - but: %d", bd->button);
+                       break;
+               }
+
+               case GHOST_kEventKeyDown:
+               case GHOST_kEventKeyUp:
+               {
+                       GHOST_TEventKeyData *kd= data;
+                       pos += sprintf(pos, " - key: %s (%d)", keytype_to_string(kd->key), kd->key);
+                       if (kd->ascii) pos+= sprintf(pos, " ascii: '%c' (%d)", kd->ascii, kd->ascii);
+                       break;
+               }
        }
 }