[PATCH 5/6] dix: remove valuator_mask_copy_valuators, not needed anymore.
Peter Hutterer
peter.hutterer at who-t.net
Tue Oct 19 16:44:13 PDT 2010
With the switch to masks internally, this isn't needed anymore.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Chase Douglas <chase.douglas at canonical.com>
---
dix/inpututils.c | 25 -------------------------
include/inpututils.h | 1 -
2 files changed, 0 insertions(+), 26 deletions(-)
diff --git a/dix/inpututils.c b/dix/inpututils.c
index 0e24792..e4b157e 100644
--- a/dix/inpututils.c
+++ b/dix/inpututils.c
@@ -524,31 +524,6 @@ valuator_mask_unset(ValuatorMask *mask, int valuator)
}
}
-
-/**
- * Copy the valuator data from the given mask and return it as one closed
- * array (i.e., with holes where the masks are unset.
- * If valuators_in is not NULL, the valuator data will be copied into
- * valuators_in. The caller is responsible to allocate enough memory.
- *
- * Otherwise, memory is allocated and returned.
- */
-int*
-valuator_mask_copy_valuators(const ValuatorMask *mask, int *valuators_in)
-{
- int *valuators;
-
- if (!valuators_in)
- valuators = calloc(valuator_mask_size(mask), sizeof(int));
- else
- valuators = valuators_in;
-
- memcpy(valuators, mask->valuators,
- valuator_mask_size(mask) * sizeof(int));
-
- return valuators;
-}
-
void
valuator_mask_copy(ValuatorMask *dest, const ValuatorMask *src)
{
diff --git a/include/inpututils.h b/include/inpututils.h
index 56bb75d..54b5764 100644
--- a/include/inpututils.h
+++ b/include/inpututils.h
@@ -41,7 +41,6 @@ struct _ValuatorMask {
extern _X_HIDDEN int valuator_mask_size(const ValuatorMask *mask);
extern _X_HIDDEN int valuator_mask_isset(const ValuatorMask *mask, int bit);
extern _X_HIDDEN void valuator_mask_unset(ValuatorMask *mask, int bit);
-extern _X_HIDDEN int* valuator_mask_copy_valuators(const ValuatorMask *mask, int *valuators_in);
extern _X_HIDDEN int valuator_mask_num_valuators(const ValuatorMask *mask);
extern _X_HIDDEN void valuator_mask_copy(ValuatorMask *dest, const ValuatorMask *src);
extern _X_HIDDEN int valuator_mask_get(const ValuatorMask *mask, int valnum);
--
1.7.2.3
More information about the xorg-devel
mailing list