[PATCH v3 09/23] Use CARD32 for timestamps

Daniel Stone daniel at fooishbar.org
Thu Jun 23 15:12:44 PDT 2011


As GetTimeInMillis() returns a CARD32, switch every timestamp usage to
follow.

Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
 src/synaptics.c    |    6 +++---
 src/synapticsstr.h |    2 +-
 src/synproto.h     |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

v3: New.

diff --git a/src/synaptics.c b/src/synaptics.c
index 715a793..d949aa9 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -1455,7 +1455,7 @@ SelectTapButton(SynapticsPrivate *priv, edge_type edge)
 }
 
 static void
-SetTapState(SynapticsPrivate *priv, enum TapState tap_state, int millis)
+SetTapState(SynapticsPrivate *priv, enum TapState tap_state, CARD32 millis)
 {
     SynapticsParameters *para = &priv->synpara;
     DBG(7, "SetTapState - %d -> %d (millis:%d)\n", priv->tap_state, tap_state, millis);
@@ -1496,7 +1496,7 @@ SetTapState(SynapticsPrivate *priv, enum TapState tap_state, int millis)
 }
 
 static void
-SetMovingState(SynapticsPrivate *priv, enum MovingState moving_state, int millis)
+SetMovingState(SynapticsPrivate *priv, enum MovingState moving_state, CARD32 millis)
 {
     DBG(7, "SetMovingState - %d -> %d center at %d/%d (millis:%d)\n", priv->moving_state,
 		  moving_state,priv->hwState.x, priv->hwState.y, millis);
@@ -1691,7 +1691,7 @@ HandleTapProcessing(SynapticsPrivate *priv, struct SynapticsHwState *hw,
 #define HIST_DELTA(a, b, e) ((HIST((a)).e) - (HIST((b)).e))
 
 static void
-store_history(SynapticsPrivate *priv, int x, int y, unsigned int millis)
+store_history(SynapticsPrivate *priv, int x, int y, CARD32 millis)
 {
     int idx = (priv->hist_index + 1) % SYNAPTICS_MOVE_HISTORY;
     priv->move_hist[idx].x = x;
diff --git a/src/synapticsstr.h b/src/synapticsstr.h
index c69ba09..a32fc73 100644
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -48,7 +48,7 @@
 typedef struct _SynapticsMoveHist
 {
     int x, y;
-    int millis;
+    CARD32 millis;
 } SynapticsMoveHistRec;
 
 enum FingerState {              /* Note! The order matters. Compared with < operator. */
diff --git a/src/synproto.h b/src/synproto.h
index 75f90e4..f9af37c 100644
--- a/src/synproto.h
+++ b/src/synproto.h
@@ -36,7 +36,7 @@
  * A structure to describe the state of the touchpad hardware (buttons and pad)
  */
 struct SynapticsHwState {
-    int millis;			/* Timestamp in milliseconds */
+    CARD32 millis;		/* Timestamp in milliseconds */
     int x;			/* X position of finger */
     int y;			/* Y position of finger */
     int z;			/* Finger pressure */
-- 
1.7.5.4



More information about the xorg-devel mailing list