Index: /trunk/psLib/src/mathtypes/psVector.c
===================================================================
--- /trunk/psLib/src/mathtypes/psVector.c	(revision 7041)
+++ /trunk/psLib/src/mathtypes/psVector.c	(revision 7042)
@@ -9,6 +9,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.68 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-04-25 03:30:29 $
+*  @version $Revision: 1.69 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-05-02 21:48:55 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -403,6 +403,6 @@
 #define PSVECTOR_SORT_INDEX_CASE(NAME) \
 case PS_TYPE_##NAME: { \
-    psU32 temp; \
-    psU32 *index = out->data.U32; \
+    psS32 temp; \
+    psS32 *index = out->data.S32; \
     ps##NAME *value = inVector->data.NAME; \
     for (;;) { \
@@ -417,10 +417,10 @@
             } \
         } \
-        int i = l; \
-        int j = (l << 1) + 1; \
+        long i = l; \
+        long j = (l << 1) + 1; \
         while (j <= ir) { \
             if (j < ir && value[index[j]] < value[index[j+1]]) \
                 ++j; \
-            if (value[temp] < value[index[j]]) { \
+            if (value[temp ] < value[index[j]]) { \
                 index[i]=index[j]; \
                 j += (i=j) + 1; \
@@ -444,6 +444,6 @@
     }
 
-    psVector *out = psVectorRecycle(outVector, inVector->n, PS_TYPE_U32); // Vector for output
-    out = psVectorCreate(out, 0, inVector->n, 1, PS_TYPE_U32);
+    psVector *out = psVectorRecycle(outVector, inVector->n, PS_TYPE_S32); // Vector for output
+    out = psVectorCreate(out, 0, inVector->n, 1, PS_TYPE_S32);
     long N = out->n;                    // Number of elements
     if (N < 2) {
@@ -452,5 +452,5 @@
     long l = N >> 1;
     long ir = N - 1;
-    switch (out->type.type) {
+    switch (inVector->type.type) {
         PSVECTOR_SORT_INDEX_CASE(U8);
         PSVECTOR_SORT_INDEX_CASE(U16);
