summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-10-19 10:59:09 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-10-22 11:02:53 +1000
commit2362adc2da9745e01c79ed4905aa81926355c4e2 (patch)
treeec537536b3d70b1ee77b717feab0487447ac1741
parent2b04a3ef739a7ba5708400999e5d81418236a0a4 (diff)
dix: remove valuator_mask_copy_valuators, not needed anymore.
With the switch to masks internally, this isn't needed anymore. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--dix/inpututils.c25
-rw-r--r--include/inpututils.h1
2 files changed, 0 insertions, 26 deletions
diff --git a/dix/inpututils.c b/dix/inpututils.c
index 9b4f10834..2877804d6 100644
--- a/dix/inpututils.c
+++ b/dix/inpututils.c
@@ -527,31 +527,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 56bb75d07..54b5764a4 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);