Index: trunk/psLib/src/image/psPixels.c
===================================================================
--- trunk/psLib/src/image/psPixels.c	(revision 3737)
+++ trunk/psLib/src/image/psPixels.c	(revision 3741)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-04-21 21:18:23 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-04-21 23:28:39 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -19,11 +19,4 @@
 #include "psMemory.h"
 
-typedef struct
-{
-    psS32 x;
-    psS32 y;
-}
-p_psPixelCoord;
-
 typedef int(*qsortCompareFcn)(const void *, const void *);
 
@@ -31,11 +24,10 @@
 {
     if (pixels != NULL) {
-        psFree(pixels->x);
-        psFree(pixels->y);
+        psFree(pixels->data);
     }
 }
 
 // for use by qsort, etc.
-static int comparePixelCoord(p_psPixelCoord* coord1, p_psPixelCoord* coord2)
+static int comparePixelCoord(psPixelCoord* coord1, psPixelCoord* coord2)
 {
     // check row first
@@ -65,9 +57,7 @@
 
     if (size > 0) {
-        out->x = psVectorAlloc(size, PS_TYPE_S32);
-        out->y = psVectorAlloc(size, PS_TYPE_S32);
+        out->data = psAlloc(sizeof(psPixelCoord)*size);
     } else {
-        out->x = NULL;
-        out->y = NULL;
+        out->data = NULL;
     }
 
@@ -83,6 +73,5 @@
     }
 
-    pixels->x = psVectorRealloc(pixels->x, size);
-    pixels->y = psVectorRealloc(pixels->y, size);
+    pixels->data = psRealloc(pixels->data, sizeof(psPixelCoord)*size);
 
     return pixels;
@@ -97,17 +86,6 @@
         return NULL;
     }
-    psVector* xVec = pixels->x;
-    psVector* yVec = pixels->y;
-    if (xVec == NULL || yVec == NULL) {
-        // XXX: Error message
-        psFree(out);
-        return NULL;
-    }
-    if (xVec->type.type != PS_TYPE_S32) {
-        // XXX: Error message
-        psFree(out);
-        return NULL;
-    }
-    if (yVec->type.type != PS_TYPE_S32) {
+    psPixelCoord* data = pixels->data;
+    if (data == NULL) {
         // XXX: Error message
         psFree(out);
@@ -151,17 +129,11 @@
 
     // determine the length of the pixel vector
-    int length = pixels->x->n;
-    if (pixels->y->n != length) {
-        // XXX: warning message
-        if (pixels->y->n < length) {
-            length = pixels->y->n;
-        }
-    }
+    int length = pixels->n;
 
     // cycle through the vector of pixels and insert pixels into image
     psMaskType** outData = out->data.PS_TYPE_MASK_DATA;
     for (int p = 0; p < length; p++) {
-        psS32 x = xVec->data.S32[p];
-        psS32 y = yVec->data.S32[p];
+        psS32 x = data[p].x;
+        psS32 y = data[p].y;
         // pixel in region?
         if (x >= x0 && x < x1 && y >= y0 && y < y1) {
@@ -198,6 +170,5 @@
         out = psPixelsAlloc(minPixels);
     }
-    psVector* xVec = out->x;
-    psVector* yVec = out->y;
+    psPixelCoord* data = out->data;
 
     // check the x and y vector validity (type/minimum size)
