Index: trunk/Ohana/src/opihi/cmd.data/uniq.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/uniq.c	(revision 7917)
+++ trunk/Ohana/src/opihi/cmd.data/uniq.c	(revision 20936)
@@ -4,5 +4,4 @@
   
   int Nnew, i, j, found;
-  float *v1, *v2;
   Vector *ivec, *ovec;
 
@@ -16,22 +15,38 @@
 
   /* allocate the maximum possible needed */
-  ALLOCATE (ovec[0].elements, float, ivec[0].Nelements);
+  ResetVector (ovec, ivec->type, ivec->Nelements);
 
   Nnew = 0;
-  v1 = ivec[0].elements;
-  for (i = 0; i < ivec[0].Nelements; i++, v1++) {
-    v2 = ovec[0].elements;
-    found = FALSE;
-    for (j = 0; !found && (j < Nnew); j++, v2++) {
-      if (*v1 == *v2) found = TRUE;
+
+  if (ivec->type == OPIHI_FLT) {
+    opihi_flt *v1 = ivec[0].elements.Flt;
+    for (i = 0; i < ivec[0].Nelements; i++, v1++) {
+      opihi_flt *v2 = ovec[0].elements.Flt;
+      found = FALSE;
+      for (j = 0; !found && (j < Nnew); j++, v2++) {
+	if (*v1 == *v2) found = TRUE;
+      }
+      if (!found) {
+	ovec[0].elements.Flt[Nnew] = *v1;
+	Nnew ++;
+      }
     }
-    if (!found) {
-      ovec[0].elements[Nnew] = *v1;
-      Nnew ++;
+  } else {
+    opihi_int *v1 = ivec[0].elements.Int;
+    for (i = 0; i < ivec[0].Nelements; i++, v1++) {
+      opihi_int *v2 = ovec[0].elements.Int;
+      found = FALSE;
+      for (j = 0; !found && (j < Nnew); j++, v2++) {
+	if (*v1 == *v2) found = TRUE;
+      }
+      if (!found) {
+	ovec[0].elements.Int[Nnew] = *v1;
+	Nnew ++;
+      }
     }
   }
 
-  ovec[0].Nelements = Nnew;
-  REALLOCATE (ovec[0].elements, float, ovec[0].Nelements);
+  // free up extra memory
+  ResetVector (ovec, ivec->type, Nnew);
 
   return (TRUE);
