Index: trunk/psLib/src/image/psImage.c
===================================================================
--- trunk/psLib/src/image/psImage.c	(revision 2105)
+++ trunk/psLib/src/image/psImage.c	(revision 2204)
@@ -10,6 +10,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-14 01:22:59 $
+ *  @version $Revision: 1.51 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -29,11 +29,11 @@
 static void imageFree(psImage* image);
 
-psImage* psImageAlloc(unsigned int numCols,
-                      unsigned int numRows,
+psImage* psImageAlloc(psU32 numCols,
+                      psU32 numRows,
                       const psElemType type)
 {
-    int area = 0;
-    int elementSize = PSELEMTYPE_SIZEOF(type);  // element size in bytes
-    int rowSize = numCols * elementSize;        // row size in bytes.
+    psS32 area = 0;
+    psS32 elementSize = PSELEMTYPE_SIZEOF(type);  // element size in bytes
+    psS32 rowSize = numCols * elementSize;        // row size in bytes.
 
     area = numCols * numRows;
@@ -51,5 +51,5 @@
     p_psMemSetDeallocator(image, (psFreeFcn) imageFree);
 
-    image->data.V = psAlloc(sizeof(void *) * numRows);
+    image->data.V = psAlloc(sizeof(psPtr ) * numRows);
 
     image->rawDataBuffer = psAlloc(area * elementSize);
@@ -57,12 +57,12 @@
     // set the row pointers.
     image->data.V[0] = image->rawDataBuffer;
-    for (int i = 1; i < numRows; i++) {
-        image->data.V[i] = (void *)((int8_t *) image->data.V[i - 1] + rowSize);
-    }
-
-    *(int *)&image->col0 = 0;
-    *(int *)&image->row0 = 0;
-    *(unsigned int *)&image->numCols = numCols;
-    *(unsigned int *)&image->numRows = numRows;
+    for (psS32 i = 1; i < numRows; i++) {
+        image->data.V[i] = (psPtr )((int8_t *) image->data.V[i - 1] + rowSize);
+    }
+
+    *(psS32 *)&image->col0 = 0;
+    *(psS32 *)&image->row0 = 0;
+    *(psU32 *)&image->numCols = numCols;
+    *(psU32 *)&image->numRows = numRows;
     *(psDimen* ) & image->type.dimen = PS_DIMEN_IMAGE;
     *(psElemType* ) & image->type.type = type;
@@ -81,11 +81,11 @@
     if (image->type.type == PS_TYPE_PTR) {
         // 2-D array of pointers -- must dereference elements
-        unsigned int oldNumRows = image->numRows;
-        unsigned int oldNumCols = image->numCols;
-        psPTR* rowPtr;
-
-        for (unsigned int row = 0; row < oldNumRows; row++) {
+        psU32 oldNumRows = image->numRows;
+        psU32 oldNumCols = image->numCols;
+        psPtr* rowPtr;
+
+        for (psU32 row = 0; row < oldNumRows; row++) {
             rowPtr = image->data.PTR[row];
-            for (unsigned int col = 0; col < oldNumCols; col++) {
+            for (psU32 col = 0; col < oldNumCols; col++) {
                 psMemDecrRefCounter(rowPtr[col]);
             }
@@ -105,10 +105,10 @@
 
 psImage* psImageRecycle(psImage* old,
-                        unsigned int numCols,
-                        unsigned int numRows,
+                        psU32 numCols,
+                        psU32 numRows,
                         const psElemType type)
 {
-    int elementSize = PSELEMTYPE_SIZEOF(type);  // element size in bytes
-    int rowSize = numCols * elementSize;        // row size in bytes.
+    psS32 elementSize = PSELEMTYPE_SIZEOF(type);  // element size in bytes
+    psS32 rowSize = numCols * elementSize;        // row size in bytes.
 
     if (old == NULL) {
@@ -128,11 +128,11 @@
         // 2-D array of pointers -- must
         // dereference
-        unsigned int oldNumRows = old->numRows;
-        unsigned int oldNumCols = old->numCols;
-        psPTR* rowPtr;
-
-        for (unsigned int row = 0; row < oldNumRows; row++) {
+        psU32 oldNumRows = old->numRows;
+        psU32 oldNumCols = old->numCols;
+        psPtr* rowPtr;
+
+        for (psU32 row = 0; row < oldNumRows; row++) {
             rowPtr = old->data.PTR[row];
-            for (unsigned int col = 0; col < oldNumCols; col++) {
+            for (psU32 col = 0; col < oldNumCols; col++) {
                 psMemDecrRefCounter(rowPtr[col]);
                 rowPtr[col] = NULL;
@@ -149,14 +149,14 @@
     old->rawDataBuffer = psRealloc(old->data.V[0],
                                    numCols * numRows * elementSize);
-    old->data.V = (void **)psRealloc(old->data.V, numRows * sizeof(void *));
+    old->data.V = (psPtr *)psRealloc(old->data.V, numRows * sizeof(psPtr ));
 
     // recreate the row pointers
     old->data.V[0] = old->rawDataBuffer;
-    for (int i = 1; i < numRows; i++) {
-        old->data.V[i] = (void *)((int8_t *) old->data.V[i - 1] + rowSize);
-    }
-
-    *(unsigned int *)&old->numCols = numCols;
-    *(unsigned int *)&old->numRows = numRows;
+    for (psS32 i = 1; i < numRows; i++) {
+        old->data.V[i] = (psPtr )((int8_t *) old->data.V[i - 1] + rowSize);
+    }
+
+    *(psU32 *)&old->numCols = numCols;
+    *(psU32 *)&old->numRows = numRows;
     *(psElemType* ) & old->type.type = type;
 
@@ -169,8 +169,8 @@
 {
     psElemType inDatatype;
-    int elementSize;
-    int elements;
-    int numRows;
-    int numCols;
+    psS32 elementSize;
+    psS32 elements;
+    psS32 numRows;
+    psS32 numCols;
 
     if (input == NULL || input->data.V == NULL) {
@@ -218,5 +218,5 @@
     // datatype.
     if (type == inDatatype) {
-        for (int row=0;row<numRows;row++) {
+        for (psS32 row=0;row<numRows;row++) {
             memcpy(output->data.V[row], input->data.V[row], elementSize * numCols);
         }
@@ -227,8 +227,8 @@
         ps##INTYPE *in; \
         ps##OUTTYPE *out; \
-        for(int row=0;row<numRows;row++) { \
+        for(psS32 row=0;row<numRows;row++) { \
             in = IN->data.INTYPE[row]; \
             out = OUT->data.OUTTYPE[row]; \
-            for (int col=0;col<numCols;col++) { \
+            for (psS32 col=0;col<numCols;col++) { \
                 *(out++) = *(in++); \
             } \
@@ -331,7 +331,7 @@
 }
 
-int psImageFreeChildren(psImage* image)
+psS32 psImageFreeChildren(psImage* image)
 {
-    int numFreed = 0;
+    psS32 numFreed = 0;
 
     if (image == NULL) {
@@ -345,5 +345,5 @@
         // orphan the children first
         // (so psFree doesn't try to modify the parent's children array while I'm using it)
-        for (int i=0;i<numFreed;i++) {
+        for (psS32 i=0;i<numFreed;i++) {
             children[i]->parent = NULL;
         }
@@ -366,5 +366,5 @@
                               float y,
                               const psImage* mask,
-                              unsigned int maskVal,
+                              psU32 maskVal,
                               psC64 unexposedValue,
                               psImageInterpolateMode mode)
@@ -438,11 +438,11 @@
         float y, \
         const psImage* mask, \
-        unsigned int maskVal, \
+        psU32 maskVal, \
         psF64 unexposedValue) \
 { \
-    int intX = (int) round((psF64)(x) - 0.5 + FLT_EPSILON); \
-    int intY = (int) round((psF64)(y) - 0.5 + FLT_EPSILON); \
-    int lastX = input->numCols - 1; \
-    int lastY = input->numRows - 1; \
+    psS32 intX = (psS32) round((psF64)(x) - 0.5 + FLT_EPSILON); \
+    psS32 intY = (psS32) round((psF64)(y) - 0.5 + FLT_EPSILON); \
+    psS32 lastX = input->numCols - 1; \
+    psS32 lastY = input->numRows - 1; \
     \
     if ((intX < 0) || \
@@ -463,11 +463,11 @@
         float y, \
         const psImage* mask, \
-        unsigned int maskVal, \
+        psU32 maskVal, \
         psC64 unexposedValue) \
 { \
-    int intX = (int) round((psF64)(x) - 0.5); \
-    int intY = (int) round((psF64)(y) - 0.5); \
-    int lastX = input->numCols - 1; \
-    int lastY = input->numRows - 1; \
+    psS32 intX = (psS32) round((psF64)(x) - 0.5); \
+    psS32 intY = (psS32) round((psF64)(y) - 0.5); \
+    psS32 lastX = input->numCols - 1; \
+    psS32 lastY = input->numRows - 1; \
     \
     if ((intX < 0) || \
@@ -501,5 +501,5 @@
         float y, \
         const psImage* mask, \
-        unsigned int maskVal, \
+        psU32 maskVal, \
         psF64 unexposedValue) \
 { \
@@ -508,16 +508,16 @@
     psF64 fracX = x - 0.5 - floorX; \
     psF64 fracY = y - 0.5 - floorY; \
-    int intFloorX = (int) floorX; \
-    int intFloorY = (int) floorY; \
-    int lastX = input->numCols - 1; \
-    int lastY = input->numRows - 1; \
+    psS32 intFloorX = (psS32) floorX; \
+    psS32 intFloorY = (psS32) floorY; \
+    psS32 lastX = input->numCols - 1; \
+    psS32 lastY = input->numRows - 1; \
     ps##TYPE V00; \
     ps##TYPE V01; \
     ps##TYPE V10; \
     ps##TYPE V11; \
-    bool valid00 = false; \
-    bool valid01 = false; \
-    bool valid10 = false; \
-    bool valid11 = false; \
+    psBool valid00 = false; \
+    psBool valid01 = false; \
+    psBool valid10 = false; \
+    psBool valid11 = false; \
     \
     if (intFloorY >= 0 && intFloorY <= lastY) { \
@@ -556,5 +556,5 @@
     \
     psF64 V0; \
-    bool valid0 = true; \
+    psBool valid0 = true; \
     if (valid00 && valid10) { \
         V0 = V00*(1-fracX)+V10*fracX; \
@@ -568,5 +568,5 @@
     \
     psF64 V1; \
-    bool valid1 = true; \
+    psBool valid1 = true; \
     if (valid01 && valid11) { \
         V1 = V01*(1-fracX)+V11*fracX; \
@@ -595,5 +595,5 @@
         float y, \
         const psImage* mask, \
-        unsigned int maskVal, \
+        psU32 maskVal, \
         psC64 unexposedValue) \
 { \
@@ -602,16 +602,16 @@
     psF64 fracX = x - 0.5 - floorX; \
     psF64 fracY = y - 0.5 - floorY; \
-    int intFloorX = (int) floorX; \
-    int intFloorY = (int) floorY; \
-    int lastX = input->numCols - 1; \
-    int lastY = input->numRows - 1; \
+    psS32 intFloorX = (psS32) floorX; \
+    psS32 intFloorY = (psS32) floorY; \
+    psS32 lastX = input->numCols - 1; \
+    psS32 lastY = input->numRows - 1; \
     ps##TYPE V00; \
     ps##TYPE V01; \
     ps##TYPE V10; \
     ps##TYPE V11; \
-    bool valid00 = false; \
-    bool valid01 = false; \
-    bool valid10 = false; \
-    bool valid11 = false; \
+    psBool valid00 = false; \
+    psBool valid01 = false; \
+    psBool valid10 = false; \
+    psBool valid11 = false; \
     \
     if (intFloorY >= 0 && intFloorY <= lastY) { \
@@ -650,5 +650,5 @@
     \
     psC64 V0; \
-    bool valid0 = true; \
+    psBool valid0 = true; \
     if (valid00 && valid10) { \
         V0 = V00*(1-fracX)+V10*fracX; \
@@ -662,5 +662,5 @@
     \
     psC64 V1; \
-    bool valid1 = true; \
+    psBool valid1 = true; \
     if (valid01 && valid11) { \
         V0 = V01*(1-fracX)+V11*fracX; \
Index: trunk/psLib/src/image/psImage.h
===================================================================
--- trunk/psLib/src/image/psImage.h	(revision 2105)
+++ trunk/psLib/src/image/psImage.h	(revision 2204)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-14 01:22:59 $
+ *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -47,8 +47,8 @@
 {
     const psType type;                 ///< Image data type and dimension.
-    const unsigned int numCols;        ///< Number of columns in image
-    const unsigned int numRows;        ///< Number of rows in image.
-    const int col0;                    ///< Column position relative to parent.
-    const int row0;                    ///< Row position relative to parent.
+    const psU32 numCols;        ///< Number of columns in image
+    const psU32 numRows;        ///< Number of rows in image.
+    const psS32 col0;                    ///< Column position relative to parent.
+    const psS32 row0;                    ///< Row position relative to parent.
 
     union {
@@ -65,11 +65,11 @@
         psC32** C32;                   ///< Single-precision complex data.
         psC64** C64;                   ///< Double-precision complex data.
-        psPTR** PTR;                   ///< Void pointers.
-        psPTR*  V;                     ///< Pointer to data.
+        psPtr** PTR;                   ///< Void pointers.
+        psPtr*  V;                     ///< Pointer to data.
     } data;                            ///< Union for data types.
     const struct psImage* parent;      ///< Parent, if a subimage.
     psArray* children;                 ///< Children of this region.
 
-    void* rawDataBuffer;
+    psPtr rawDataBuffer;
 }
 psImage;
@@ -84,6 +84,6 @@
  */
 psImage* psImageAlloc(
-    unsigned int numCols,              ///< Number of rows in image.
-    unsigned int numRows,              ///< Number of columns in image.
+    psU32 numCols,              ///< Number of rows in image.
+    psU32 numRows,              ///< Number of columns in image.
     const psElemType type              ///< Type of data for image.
 );
@@ -96,6 +96,6 @@
 psImage* psImageRecycle(
     psImage* old,                      ///< the psImage to recycle by resizing image buffer
-    unsigned int numCols,              ///< the desired number of columns in image
-    unsigned int numRows,              ///< the desired number of rows in image
+    psU32 numCols,              ///< the desired number of columns in image
+    psU32 numRows,              ///< the desired number of rows in image
     const psElemType type              ///< the desired datatype of the image
 );
@@ -115,8 +115,8 @@
 /** Frees all children of a psImage.
  *
- *  @return int      Number of children freed.
+ *  @return psS32      Number of children freed.
  *
  */
-int psImageFreeChildren(
+psS32 psImageFreeChildren(
     psImage* image                     ///< psImage in which all children shall be deallocated
 );
@@ -132,5 +132,5 @@
     float y,                           ///< row location ot derive value of
     const psImage* mask,               ///< if not NULL, the mask of the input image
-    unsigned int maskVal,              ///< the mask value
+    psU32 maskVal,              ///< the mask value
     psC64 unexposedValue,              ///< return value if x,y location is not in image.
     psImageInterpolateMode mode        ///< interpolation mode
@@ -143,5 +143,5 @@
         float y,                       /**< row location ot derive value of */ \
         const psImage* mask,           /**< if not NULL, the mask of the input image */ \
-        unsigned int maskVal,          /**< the mask value */ \
+        psU32 maskVal,          /**< the mask value */ \
         psF64 unexposedValue           /**< return value if x,y location is not in image. */ \
                                                  ); \
@@ -151,5 +151,5 @@
         float y,                       /**< row location ot derive value of */ \
         const psImage* mask,           /**< if not NULL, the mask of the input image */ \
-        unsigned int maskVal,          /**< the mask value */ \
+        psU32 maskVal,          /**< the mask value */ \
         psF64 unexposedValue           /**< return value if x,y location is not in image. */ \
                                                      );
@@ -161,5 +161,5 @@
         float y,                       /**< row location ot derive value of */ \
         const psImage* mask,           /**< if not NULL, the mask of the input image */ \
-        unsigned int maskVal,          /**< the mask value */ \
+        psU32 maskVal,          /**< the mask value */ \
         psC64 unexposedValue           /**< return value if x,y location is not in image. */ \
                                                  ); \
@@ -169,5 +169,5 @@
         float y,                       /**< row location ot derive value of */ \
         const psImage* mask,           /**< if not NULL, the mask of the input image */ \
-        unsigned int maskVal,          /**< the mask value */ \
+        psU32 maskVal,          /**< the mask value */ \
         psC64 unexposedValue           /**< return value if x,y location is not in image. */ \
                                                      );
Index: trunk/psLib/src/image/psImageConvolve.c
===================================================================
--- trunk/psLib/src/image/psImageConvolve.c	(revision 2105)
+++ trunk/psLib/src/image/psImageConvolve.c	(revision 2204)
@@ -5,6 +5,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-06 21:31:30 $
+ *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -28,9 +28,9 @@
 static void freeKernel(psKernel* ptr);
 
-psKernel* psKernelAlloc(int xMin, int xMax, int yMin, int yMax)
+psKernel* psKernelAlloc(psS32 xMin, psS32 xMax, psS32 yMin, psS32 yMax)
 {
     psKernel* result;
-    int numRows;
-    int numCols;
+    psS32 numRows;
+    psS32 numCols;
 
     // following is explicitly spelled out in the SDRS as a requirement
@@ -40,5 +40,5 @@
                  yMin, yMax);
 
-        int temp = yMin;
+        psS32 temp = yMin;
         yMin = yMax;
         yMax = temp;
@@ -51,5 +51,5 @@
                  xMin, xMax);
 
-        int temp = xMin;
+        psS32 temp = xMin;
         xMin = xMax;
         xMax = temp;
@@ -70,5 +70,5 @@
     psKernelType** kernelRows = result->p_kernelRows;
     psKernelType** imageRows = result->image->data.PS_TYPE_KERNEL_DATA;
-    for (int i = 0; i < numRows; i++) {
+    for (psS32 i = 0; i < numRows; i++) {
         kernelRows[i] = imageRows[i] - xMin;
     }
@@ -91,17 +91,17 @@
                            const psVector* xShifts,
                            const psVector* yShifts,
-                           bool relative)
+                           psBool relative)
 {
-    int x = 0;
-    int y = 0;
-    int t = 0;
-    int deltaT;
-    int oldX;
-    int oldY;
-    int xMin = 0;
-    int xMax = 0;
-    int yMin = 0;
-    int yMax = 0;
-    int length = 0;
+    psS32 x = 0;
+    psS32 y = 0;
+    psS32 t = 0;
+    psS32 deltaT;
+    psS32 oldX;
+    psS32 oldY;
+    psS32 xMin = 0;
+    psS32 xMax = 0;
+    psS32 yMin = 0;
+    psS32 yMax = 0;
+    psS32 length = 0;
     psKernelType normalizeTime = 1.0;  // fraction of total time for each shift clock
     psKernel* result = NULL;
@@ -153,5 +153,5 @@
         y = 0; \
         t = 0; \
-        for (int lcv = 0; lcv < length; lcv++) { \
+        for (psS32 lcv = 0; lcv < length; lcv++) { \
             if (relative) { \
                 x += xShiftData[lcv]; \
@@ -181,5 +181,5 @@
         y = 0; \
         t = 0; \
-        for (int i = 0; i < length; i++) { \
+        for (psS32 i = 0; i < length; i++) { \
             deltaT = t; \
             oldX = x; \
@@ -228,5 +228,5 @@
 }
 
-psImage* psImageConvolve(psImage* out, const psImage* in, const psKernel* kernel, bool direct)
+psImage* psImageConvolve(psImage* out, const psImage* in, const psKernel* kernel, psBool direct)
 {
     if (in == NULL) {
@@ -242,13 +242,13 @@
         return NULL;
     }
-    int xMin = kernel->xMin;
-    int xMax = kernel->xMax;
-    int yMin = kernel->yMin;
-    int yMax = kernel->yMax;
+    psS32 xMin = kernel->xMin;
+    psS32 xMax = kernel->xMax;
+    psS32 yMin = kernel->yMin;
+    psS32 yMax = kernel->yMax;
     psKernelType** kData = kernel->kernel;
 
     // make the output image to the proper size and type
-    int numRows = in->numRows;
-    int numCols = in->numCols;
+    psS32 numRows = in->numRows;
+    psS32 numCols = in->numCols;
 
 
@@ -261,11 +261,11 @@
             ps##TYPE** inData = in->data.TYPE; \
             out = psImageRecycle(out, numCols, numRows, PS_TYPE_##TYPE); \
-            for (int row=0;row<numRows;row++) { \
+            for (psS32 row=0;row<numRows;row++) { \
                 ps##TYPE* outRow = out->data.TYPE[row]; \
-                for (int col=0;col<numCols;col++) { \
+                for (psS32 col=0;col<numCols;col++) { \
                     ps##TYPE pixel = 0.0; \
-                    for (int kRow = yMin; kRow < yMax; kRow++) { \
+                    for (psS32 kRow = yMin; kRow < yMax; kRow++) { \
                         if (row-kRow >= 0 && row-kRow < numRows) { \
-                            for (int kCol = xMin; kCol < xMax; kCol++) { \
+                            for (psS32 kCol = xMin; kCol < xMax; kCol++) { \
                                 if (col-kCol >= 0 && col-kCol < numCols) { \
                                     pixel += kData[kRow][kCol] * inData[row-kRow][col-kCol]; \
@@ -310,10 +310,10 @@
     } else {
         // fourier convolution
-        int paddedCols = numCols+2*FOURIER_PADDING;
-        int paddedRows = numRows+2*FOURIER_PADDING;
+        psS32 paddedCols = numCols+2*FOURIER_PADDING;
+        psS32 paddedRows = numRows+2*FOURIER_PADDING;
 
         // check to see if kernel is smaller, otherwise padding it up will fail.
-        int kRows = kernel->image->numRows;
-        int kCols = kernel->image->numCols;
+        psS32 kRows = kernel->image->numRows;
+        psS32 kCols = kernel->image->numCols;
         if (kRows >= numRows || kCols >= numCols) {
             psErrorMsg(PS_ERRORNAME_DOMAIN "psImageConvolve",
@@ -328,5 +328,5 @@
         // pad the image
         psImage* paddedImage = psImageAlloc(paddedCols,paddedRows,in->type.type);
-        int elementSize = PSELEMTYPE_SIZEOF(in->type.type);
+        psS32 elementSize = PSELEMTYPE_SIZEOF(in->type.type);
 
         // zero out padded area on top and bottom
@@ -335,8 +335,8 @@
 
         // fill in the image-containing rows.
-        int sidePaddingSize = FOURIER_PADDING*elementSize;
-        int imageRowSize = numCols*elementSize;
+        psS32 sidePaddingSize = FOURIER_PADDING*elementSize;
+        psS32 imageRowSize = numCols*elementSize;
         psU8* paddedData = paddedImage->data.U8[FOURIER_PADDING];
-        for (int row=0;row<numRows;row++) {
+        for (psS32 row=0;row<numRows;row++) {
             // zero out padded area on left edge.
             memset(paddedData,0,sidePaddingSize);
@@ -354,8 +354,8 @@
         psImage* paddedKernel = psImageAlloc(paddedCols,paddedRows,PS_TYPE_KERNEL);
         memset(paddedKernel->data.U8[0],0,sizeof(psKernelType)*numCols*numRows); // zero-out image
-        int yMax = kernel->yMax;
-        int xMax = kernel->xMax;
-        for (int row = kernel->yMin; row <= yMax;row++) {
-            int padRow = row;
+        psS32 yMax = kernel->yMax;
+        psS32 xMax = kernel->xMax;
+        for (psS32 row = kernel->yMin; row <= yMax;row++) {
+            psS32 padRow = row;
             if (padRow < 0) {
                 padRow += paddedRows;
@@ -363,5 +363,5 @@
             psKernelType* padData = paddedKernel->data.PS_TYPE_KERNEL_DATA[padRow];
             psKernelType* kernelRow = kernel->kernel[row];
-            for (int col = kernel->xMin; col <= xMax; col++) {
+            for (psS32 col = kernel->xMin; col <= xMax; col++) {
                 if (col < 0) {
                     padData[col+paddedCols] = kernelRow[col];
@@ -418,8 +418,8 @@
         out = psImageRecycle(out,numCols,numRows,PS_TYPE_F32);
         float factor = 1.0f/numCols/numRows;
-        for (int row = 0; row < numRows; row++) {
+        for (psS32 row = 0; row < numRows; row++) {
             psF32* outRow = out->data.F32[row];
             psC32* resultRow = complexOutSansPad->data.C32[row];
-            for (int col = 0; col < numCols; col++) {
+            for (psS32 col = 0; col < numCols; col++) {
                 outRow[col] = crealf(resultRow[col])*factor;
             }
Index: trunk/psLib/src/image/psImageConvolve.h
===================================================================
--- trunk/psLib/src/image/psImageConvolve.h	(revision 2105)
+++ trunk/psLib/src/image/psImageConvolve.h	(revision 2204)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-23 18:30:57 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -15,6 +15,4 @@
 #ifndef PS_IMAGE_CONVOLVE_H
 #define PS_IMAGE_CONVOLVE_H
-
-#include<stdbool.h>
 
 #include "psImage.h"
@@ -32,8 +30,8 @@
 {
     psImage* image;                    ///< Kernel data, in the form of an image
-    int xMin;                          ///< Most negative x index
-    int yMin;                          ///< Most negative y index
-    int xMax;                          ///< Most positive x index
-    int yMax;                          ///< Most positive y index
+    psS32 xMin;                          ///< Most negative x index
+    psS32 yMin;                          ///< Most negative y index
+    psS32 xMax;                          ///< Most positive x index
+    psS32 yMax;                          ///< Most positive y index
     psKernelType** kernel;             ///< Pointer to the kernel data
     psKernelType** p_kernelRows;       ///< Pointer to the rows of the kernel data; not intended for user use.
@@ -68,8 +66,8 @@
  */
 psKernel* psKernelAlloc(
-    int xMin,                          ///< Most negative x index
-    int xMax,                          ///< Most positive x index
-    int yMin,                          ///< Most negative y index
-    int yMax                           ///< Most positive y index
+    psS32 xMin,                          ///< Most negative x index
+    psS32 xMax,                          ///< Most positive x index
+    psS32 yMin,                          ///< Most negative y index
+    psS32 yMax                           ///< Most positive y index
 );
 
@@ -94,5 +92,5 @@
     const psVector* xShifts,           ///< list of x-axis shifts
     const psVector* yShifts,           ///< list of y-axis shifts
-    bool relative
+    psBool relative
 );
 
@@ -118,5 +116,5 @@
     const psImage* in,                 ///< the psImage to convolve
     const psKernel* kernel,            ///< kernel to colvolve with
-    bool direct                        ///< specifies method, true=direct convolution, false=fourier
+    psBool direct                        ///< specifies method, true=direct convolution, false=fourier
 );
 
Index: trunk/psLib/src/image/psImageExtraction.c
===================================================================
--- trunk/psLib/src/image/psImageExtraction.c	(revision 2105)
+++ trunk/psLib/src/image/psImageExtraction.c	(revision 2204)
@@ -9,6 +9,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-14 01:22:59 $
+ *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -26,11 +26,11 @@
 psImage* imageSubset(psImage* out,
                      psImage* image,
-                     int col0,
-                     int row0,
-                     int col1,
-                     int row1)
+                     psS32 col0,
+                     psS32 row0,
+                     psS32 col1,
+                     psS32 row1)
 {
-    unsigned int elementSize;          // size of image element in bytes
-    unsigned int inputColOffset;       // offset in bytes to first subset pixel in input row
+    psU32 elementSize;          // size of image element in bytes
+    psU32 inputColOffset;       // offset in bytes to first subset pixel in input row
 
     if (image == NULL || image->data.V == NULL) {
@@ -68,6 +68,6 @@
         return NULL;
     }
-    int numRows = row1-row0;
-    int numCols = col1-col0;
+    psS32 numRows = row1-row0;
+    psS32 numCols = col1-col0;
 
     elementSize = PSELEMTYPE_SIZEOF(image->type.type);
@@ -82,5 +82,5 @@
 
     // increment the raw data buffer before freeing anything in the 'out'
-    void* rawData = psMemIncrRefCounter(image->rawDataBuffer);
+    psPtr rawData = psMemIncrRefCounter(image->rawDataBuffer);
 
     if (out != NULL) {
@@ -97,10 +97,10 @@
     }
 
-    out->data.V = psRealloc(out->data.V,sizeof(void*)*numRows); // resize row pointer array
+    out->data.V = psRealloc(out->data.V,sizeof(psPtr)*numRows); // resize row pointer array
     *(psType*)&out->type = image->type;
-    *(unsigned int*)&out->numCols = numCols;
-    *(unsigned int*)&out->numRows = numRows;
-    *(int*)&out->row0 = row0;
-    *(int*)&out->col0 = col0;
+    *(psU32*)&out->numCols = numCols;
+    *(psU32*)&out->numRows = numRows;
+    *(psS32*)&out->row0 = row0;
+    *(psS32*)&out->col0 = col0;
     out->parent = image;
     out->children = NULL;
@@ -111,10 +111,10 @@
 
     inputColOffset = elementSize * col0;
-    for (int row = 0; row < numRows; row++) {
+    for (psS32 row = 0; row < numRows; row++) {
         out->data.V[row] = image->data.U8[row0 + row] + inputColOffset;
     }
 
     // add output image as a child of the input image.
-    int n = 0;
+    psS32 n = 0;
     psArray* children = image->children;
     if (children == NULL) {
@@ -134,8 +134,8 @@
 
 psImage* psImageSubset(psImage* image,
-                       int col0,
-                       int row0,
-                       int col1,
-                       int row1)
+                       psS32 col0,
+                       psS32 row0,
+                       psS32 col1,
+                       psS32 row1)
 {
     return imageSubset(NULL,image,col0,row0,col1,row1);
@@ -145,8 +145,8 @@
                            const char* section)
 {
-    int col0;
-    int col1;
-    int row0;
-    int row1;
+    psS32 col0;
+    psS32 col1;
+    psS32 row0;
+    psS32 row1;
 
     // section should be of the form '[col0:col1,row0:row1]'
@@ -177,5 +177,5 @@
 }
 
-psImage* psImageTrim(psImage* image, int col0, int row0, int col1, int row1)
+psImage* psImageTrim(psImage* image, psS32 col0, psS32 row0, psS32 col1, psS32 row1)
 {
     if (image == NULL || image->data.V == NULL) {
@@ -220,24 +220,24 @@
     psImageFreeChildren(image);
 
-    unsigned int elementSize = PSELEMTYPE_SIZEOF(image->type.type);
-    unsigned int numCols = col1-col0;
-    unsigned int numRows = row1-row0;
-    unsigned int rowSize = elementSize*numCols;
-    unsigned int colOffset = elementSize * col0;
+    psU32 elementSize = PSELEMTYPE_SIZEOF(image->type.type);
+    psU32 numCols = col1-col0;
+    psU32 numRows = row1-row0;
+    psU32 rowSize = elementSize*numCols;
+    psU32 colOffset = elementSize * col0;
     psU8* imageData = image->rawDataBuffer;
-    for (int row = row0; row < row1; row++) {
+    for (psS32 row = row0; row < row1; row++) {
         memmove(imageData,image->data.U8[row] + colOffset,rowSize);
         imageData += rowSize;
     }
 
-    *(unsigned int*)&image->numRows = numRows;
-    *(unsigned int*)&image->numCols = numCols;
+    *(psU32*)&image->numRows = numRows;
+    *(psU32*)&image->numCols = numCols;
 
     // XXX: should I really resize the buffers?
-    image->data.V = psRealloc(image->data.V,sizeof(void*)*numRows);
+    image->data.V = psRealloc(image->data.V,sizeof(psPtr)*numRows);
     image->rawDataBuffer = psRealloc(image->rawDataBuffer,rowSize*numRows);
 
     image->data.V[0] = image->rawDataBuffer;
-    for (int r = 1; r < numRows; r++) {
+    for (psS32 r = 1; r < numRows; r++) {
         image->data.U8[r] = image->data.U8[r-1] + rowSize;
     }
@@ -250,9 +250,9 @@
                        const psImage* restrict in,
                        const psImage* restrict mask,
-                       unsigned int maskVal,
-                       int col0,
-                       int row0,
-                       int col1,
-                       int row1,
+                       psU32 maskVal,
+                       psS32 col0,
+                       psS32 row0,
+                       psS32 col1,
+                       psS32 row1,
                        psImageCutDirection direction,
                        const psStats* stats)
@@ -261,7 +261,7 @@
     psStats* myStats;
     psElemType type;
-    int inRows;
-    int inCols;
-    int delta = 1;
+    psS32 inRows;
+    psS32 inCols;
+    psS32 delta = 1;
     psF64* outData;
 
@@ -349,6 +349,6 @@
     *myStats = *stats;
 
-    int numCols = col1-col0;
-    int numRows = row1-row0;
+    psS32 numCols = col1-col0;
+    psS32 numRows = row1-row0;
 
     if (direction == PS_CUT_X_POS || direction == PS_CUT_X_NEG) {
@@ -380,5 +380,5 @@
     case PS_TYPE_##TYPE: { \
             psMaskType* maskVecData = NULL; \
-            for (int c=col0;c<col1;c++) { \
+            for (psS32 c=col0;c<col1;c++) { \
                 ps##TYPE *imgData = in->data.TYPE[row0] + c; \
                 ps##TYPE *imgVecData = imgVec->data.TYPE; \
@@ -387,5 +387,5 @@
                     maskData = (psMaskType* )(mask->data.V[row0]) + c; \
                 } \
-                for (int r=row0;r<row1;r++) { \
+                for (psS32 r=row0;r<row1;r++) { \
                     *(imgVecData++) = *imgData; \
                     imgData += inCols; \
@@ -437,5 +437,5 @@
         psVector* imgVec = NULL;
         psVector* maskVec = NULL;
-        int elementSize = PSELEMTYPE_SIZEOF(type);
+        psS32 elementSize = PSELEMTYPE_SIZEOF(type);
         psU32* outPosition = NULL;
 
@@ -465,10 +465,10 @@
         }
 
-        for (int r = row0; r < row1; r++) {
+        for (psS32 r = row0; r < row1; r++) {
             // point the vector struct to the
             // data to calculate the stats
-            imgVec->data.V = (void *)(in->data.U8[r] + col0 * elementSize);
+            imgVec->data.V = (psPtr )(in->data.U8[r] + col0 * elementSize);
             if (maskVec != NULL) {
-                maskVec->data.V = (void *)(mask->data.U8[r] + col0 * sizeof(psMaskType));
+                maskVec->data.V = (psPtr )(mask->data.U8[r] + col0 * sizeof(psMaskType));
             }
             myStats = psVectorStats(myStats, imgVec, maskVec, maskVal);
@@ -503,10 +503,10 @@
                      const psImage* in,
                      const psImage* restrict mask,
-                     unsigned int maskVal,
+                     psU32 maskVal,
                      float startCol,
                      float startRow,
                      float endCol,
                      float endRow,
-                     unsigned int nSamples,
+                     psU32 nSamples,
                      psImageInterpolateMode mode)
 {
@@ -518,6 +518,6 @@
         return NULL;
     }
-    int numCols = in->numCols;
-    int numRows = in->numRows;
+    psS32 numCols = in->numCols;
+    psS32 numRows = in->numRows;
 
     if (nSamples < 2) {
@@ -594,5 +594,5 @@
 case PS_TYPE_##TYPE: { \
         ps##TYPE* outData = out->data.TYPE; \
-        for (int i = 0; i < nSamples; i++) { \
+        for (psS32 i = 0; i < nSamples; i++) { \
             float x = startCol + (float)i*dX; \
             float y = startRow + (float)i*dY; \
@@ -642,5 +642,5 @@
                            const psImage* in,
                            const psImage* restrict mask,
-                           unsigned int maskVal,
+                           psU32 maskVal,
                            float centerCol,
                            float centerRow,
@@ -659,6 +659,6 @@
         return NULL;
     }
-    int numCols = in->numCols;
-    int numRows = in->numRows;
+    psS32 numCols = in->numCols;
+    psS32 numRows = in->numRows;
 
     if (mask != NULL) {
@@ -734,5 +734,5 @@
 
     // size the output vector to proper size.
-    int numOut = radii->n - 1;
+    psS32 numOut = radii->n - 1;
     out = psVectorRecycle(out, numOut, PS_TYPE_F64);
     psF64* outData = out->data.F64;
@@ -741,8 +741,8 @@
     psF32* rSq = rSqVec->data.F32;
 
-    int startRow = centerRow - rSq[numOut];
-    int endRow = centerRow + rSq[numOut];
-    int startCol = centerCol - rSq[numOut];
-    int endCol = centerCol + rSq[numOut];
+    psS32 startRow = centerRow - rSq[numOut];
+    psS32 endRow = centerRow + rSq[numOut];
+    psS32 startCol = centerCol - rSq[numOut];
+    psS32 endCol = centerCol + rSq[numOut];
 
     if (startRow < 0) {
@@ -763,5 +763,5 @@
 
     // Square the radii data
-    for (int d = 0; d <= numOut; d++) {
+    for (psS32 d = 0; d <= numOut; d++) {
         rSq[d] *= rSq[d];
     }
@@ -770,5 +770,5 @@
     psVector** buffer = psAlloc(sizeof(psVector*)*numOut);
     psVector** bufferMask = psAlloc(sizeof(psVector*)*numOut);
-    for (int lcv = 0; lcv < numOut; lcv++) {
+    for (psS32 lcv = 0; lcv < numOut; lcv++) {
         // n.b. alloc enough for the data by making the vectors slightly larger
         // than the area of the region of interest.
@@ -788,5 +788,5 @@
     float dY;
     float dist;
-    for (int row=startRow; row <= endRow; row++) {
+    for (psS32 row=startRow; row <= endRow; row++) {
         psF32* inRow = in->data.F32[row];
         psMaskType* maskRow = NULL;
@@ -794,11 +794,11 @@
             maskRow = mask->data.PS_TYPE_MASK_DATA[row];
         }
-        for (int col=startCol; col <= endCol; col++) {
+        for (psS32 col=startCol; col <= endCol; col++) {
             dX = centerCol - (float)col - 0.5f;
             dY = centerRow - (float)row - 0.5f;
             dist = dX*dX+dY*dY;
-            for (int r = 0; r < numOut; r++) {
+            for (psS32 r = 0; r < numOut; r++) {
                 if (rSq[r] < dist && dist < rSq[r+1]) {
-                    int n = buffer[r]->n;
+                    psS32 n = buffer[r]->n;
                     if (n == buffer[r]->nalloc) { // in case buffers already full, expand
                         buffer[r] = psVectorRealloc(buffer[r], n*2);
@@ -825,5 +825,5 @@
     *myStats = *stats;
 
-    for (int r = 0; r < numOut; r++) {
+    for (psS32 r = 0; r < numOut; r++) {
         myStats = psVectorStats(myStats,buffer[r], bufferMask[r],maskVal);
         (void)p_psGetStatValue(myStats,&statVal);
@@ -833,5 +833,5 @@
     psFree(myStats);
 
-    for (int lcv = 0; lcv < numOut; lcv++) {
+    for (psS32 lcv = 0; lcv < numOut; lcv++) {
         psFree(buffer[lcv]);
         psFree(bufferMask[lcv]);
Index: trunk/psLib/src/image/psImageExtraction.h
===================================================================
--- trunk/psLib/src/image/psImageExtraction.h	(revision 2105)
+++ trunk/psLib/src/image/psImageExtraction.h	(revision 2204)
@@ -10,6 +10,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-10-13 22:05:03 $
+*  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-10-27 00:57:31 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -54,8 +54,8 @@
 psImage* psImageSubset(
     psImage* image,                    ///< Parent image.
-    int col0,                          ///< starting column of subimage
-    int row0,                          ///< starting row of subimage
-    int col1,                          ///< exclusive end column of subimage.
-    int row1                           ///< exclusive end row of subimage
+    psS32 col0,                          ///< starting column of subimage
+    psS32 row0,                          ///< starting row of subimage
+    psS32 col1,                          ///< exclusive end column of subimage.
+    psS32 row1                           ///< exclusive end row of subimage
 );
 
@@ -93,8 +93,8 @@
 psImage* psImageTrim(
     psImage* image,                    ///< image to trim
-    int col0,                          ///< column of trim region's left boundary
-    int row0,                          ///< row of trim region's lower boundary
-    int col1,                          ///< column of trim region's right boundary
-    int row1                           ///< row of trim region's upper boundary
+    psS32 col0,                          ///< column of trim region's left boundary
+    psS32 row0,                          ///< row of trim region's lower boundary
+    psS32 col1,                          ///< column of trim region's right boundary
+    psS32 row1                           ///< row of trim region's upper boundary
 );
 
@@ -130,9 +130,9 @@
     const psImage* restrict input,     ///< the input image in which to perform the slice
     const psImage* restrict mask,      ///< the mask for the input image.
-    unsigned int maskVal,              ///< the mask value to apply to the mask
-    int col0,                          ///< the leftmost column of the slice region
-    int row0,                          ///< the bottommost row of the slice region
-    int col1,                          ///< exclusive end column of the slice region
-    int row1,                           ///< exclusive end row of the slice region
+    psU32 maskVal,              ///< the mask value to apply to the mask
+    psS32 col0,                          ///< the leftmost column of the slice region
+    psS32 row0,                          ///< the bottommost row of the slice region
+    psS32 col1,                          ///< exclusive end column of the slice region
+    psS32 row1,                           ///< exclusive end row of the slice region
     psImageCutDirection direction,     ///< the slice dimension and direction
     const psStats* stats               ///< the statistic to perform in slice operation
@@ -161,10 +161,10 @@
     const psImage* input,              ///< the input image in which to perform the cut
     const psImage* restrict mask,      ///< the mask for the input image.
-    unsigned int maskVal,              ///< the mask value to apply to the mask
+    psU32 maskVal,              ///< the mask value to apply to the mask
     float startCol,                    ///< the column of the start of the cut line
     float startRow,                    ///< the row of the start of the cut line
     float endCol,                      ///< the column of the end of the cut line
     float endRow,                      ///< the row of the end of the cut line
-    unsigned int nSamples,             ///< the number of samples along the cut
+    psU32 nSamples,             ///< the number of samples along the cut
     psImageInterpolateMode mode        ///< the interpolation method to use
 );
@@ -187,5 +187,5 @@
     const psImage* input,              ///< the input image in which to perform the cut
     const psImage* restrict mask,      ///< the mask for the input image.
-    unsigned int maskVal,              ///< the mask value to apply to the mask
+    psU32 maskVal,              ///< the mask value to apply to the mask
     float centerCol,                   ///< the column of the center of the cut circle
     float centerRow,                   ///< the row of the center of the cut circle
Index: trunk/psLib/src/image/psImageFFT.c
===================================================================
--- trunk/psLib/src/image/psImageFFT.c	(revision 2105)
+++ trunk/psLib/src/image/psImageFFT.c	(revision 2204)
@@ -5,11 +5,10 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-06 21:31:30 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  */
 #include <unistd.h>
-#include <stdbool.h>
 #include <string.h>
 #include <complex.h>
@@ -27,10 +26,10 @@
 #define PS_FFTW_PLAN_RIGOR FFTW_ESTIMATE
 
-static bool p_fftwWisdomImported = false;
+static psBool p_fftwWisdomImported = false;
 
 psImage* psImageFFT(psImage* out, const psImage* in, psFftDirection direction)
 {
-    unsigned int numCols;
-    unsigned int numRows;
+    psU32 numCols;
+    psU32 numRows;
     psElemType type;
     fftwf_plan plan;
@@ -77,5 +76,5 @@
 
     // n.b. FFTW can perform a in-place transform at the same rate or faster than out-of-place.
-    int sign = ((direction & PS_FFT_FORWARD) != 0) ? FFTW_FORWARD : FFTW_BACKWARD;
+    psS32 sign = ((direction & PS_FFT_FORWARD) != 0) ? FFTW_FORWARD : FFTW_BACKWARD;
     out = psImageCopy(out, in, PS_TYPE_C32);
     plan = fftwf_plan_dft_2d(numCols, numRows,
@@ -118,6 +117,6 @@
 {
     psElemType type;
-    unsigned int numCols;
-    unsigned int numRows;
+    psU32 numCols;
+    psU32 numRows;
 
     if (in == NULL) {
@@ -140,9 +139,9 @@
 
         out = psImageRecycle(out, numCols, numRows, PS_TYPE_F32);
-        for (unsigned int row = 0; row < numRows; row++) {
+        for (psU32 row = 0; row < numRows; row++) {
             outRow = out->data.F32[row];
             inRow = in->data.C32[row];
 
-            for (unsigned int col = 0; col < numCols; col++) {
+            for (psU32 col = 0; col < numCols; col++) {
                 outRow[col] = crealf(inRow[col]);
             }
@@ -153,9 +152,9 @@
 
         out = psImageRecycle(out, numCols, numRows, PS_TYPE_F64);
-        for (unsigned int row = 0; row < numRows; row++) {
+        for (psU32 row = 0; row < numRows; row++) {
             outRow = out->data.F64[row];
             inRow = in->data.C64[row];
 
-            for (unsigned int col = 0; col < numCols; col++) {
+            for (psU32 col = 0; col < numCols; col++) {
                 outRow[col] = creal(inRow[col]);
             }
@@ -179,6 +178,6 @@
 {
     psElemType type;
-    unsigned int numCols;
-    unsigned int numRows;
+    psU32 numCols;
+    psU32 numRows;
 
     if (in == NULL) {
@@ -203,9 +202,9 @@
 
         out = psImageRecycle(out, numCols, numRows, PS_TYPE_F32);
-        for (unsigned int row = 0; row < numRows; row++) {
+        for (psU32 row = 0; row < numRows; row++) {
             outRow = out->data.F32[row];
             inRow = in->data.C32[row];
 
-            for (unsigned int col = 0; col < numCols; col++) {
+            for (psU32 col = 0; col < numCols; col++) {
                 outRow[col] = cimagf(inRow[col]);
             }
@@ -216,9 +215,9 @@
 
         out = psImageRecycle(out, numCols, numRows, PS_TYPE_F64);
-        for (unsigned int row = 0; row < numRows; row++) {
+        for (psU32 row = 0; row < numRows; row++) {
             outRow = out->data.F64[row];
             inRow = in->data.C64[row];
 
-            for (unsigned int col = 0; col < numCols; col++) {
+            for (psU32 col = 0; col < numCols; col++) {
                 outRow[col] = cimag(inRow[col]);
             }
@@ -241,6 +240,6 @@
 {
     psElemType type;
-    unsigned int numCols;
-    unsigned int numRows;
+    psU32 numCols;
+    psU32 numRows;
 
     if (real == NULL || imag == NULL) {
@@ -282,10 +281,10 @@
         out = psImageRecycle(out, numCols, numRows, PS_TYPE_C32);
 
-        for (unsigned int row = 0; row < numRows; row++) {
+        for (psU32 row = 0; row < numRows; row++) {
             outRow = out->data.C32[row];
             realRow = real->data.F32[row];
             imagRow = imag->data.F32[row];
 
-            for (unsigned int col = 0; col < numCols; col++) {
+            for (psU32 col = 0; col < numCols; col++) {
                 outRow[col] = realRow[col] + I * imagRow[col];
             }
@@ -297,10 +296,10 @@
 
         out = psImageRecycle(out, numCols, numRows, PS_TYPE_C64);
-        for (unsigned int row = 0; row < numRows; row++) {
+        for (psU32 row = 0; row < numRows; row++) {
             outRow = out->data.C64[row];
             realRow = real->data.F64[row];
             imagRow = imag->data.F64[row];
 
-            for (unsigned int col = 0; col < numCols; col++) {
+            for (psU32 col = 0; col < numCols; col++) {
                 outRow[col] = realRow[col] + I * imagRow[col];
             }
@@ -324,6 +323,6 @@
 {
     psElemType type;
-    unsigned int numCols;
-    unsigned int numRows;
+    psU32 numCols;
+    psU32 numRows;
 
     if (in == NULL) {
@@ -346,9 +345,9 @@
 
         out = psImageRecycle(out, numCols, numRows, PS_TYPE_C32);
-        for (unsigned int row = 0; row < numRows; row++) {
+        for (psU32 row = 0; row < numRows; row++) {
             outRow = out->data.C32[row];
             inRow = in->data.C32[row];
 
-            for (unsigned int col = 0; col < numCols; col++) {
+            for (psU32 col = 0; col < numCols; col++) {
                 outRow[col] = crealf(inRow[col]) - I * cimagf(inRow[col]);
             }
@@ -359,9 +358,9 @@
 
         out = psImageRecycle(out, numCols, numRows, PS_TYPE_C64);
-        for (unsigned int row = 0; row < numRows; row++) {
+        for (psU32 row = 0; row < numRows; row++) {
             outRow = out->data.C64[row];
             inRow = in->data.C64[row];
 
-            for (unsigned int col = 0; col < numCols; col++) {
+            for (psU32 col = 0; col < numCols; col++) {
                 outRow[col] = creal(inRow[col]) - I * cimag(inRow[col]);
             }
@@ -384,7 +383,7 @@
 {
     psElemType type;
-    unsigned int numCols;
-    unsigned int numRows;
-    int numElementsSquared;
+    psU32 numCols;
+    psU32 numRows;
+    psS32 numElementsSquared;
 
     if (in == NULL) {
@@ -405,9 +404,9 @@
 
         out = psImageRecycle(out, numCols, numRows, PS_TYPE_F32);
-        for (unsigned int row = 0; row < numRows; row++) {
+        for (psU32 row = 0; row < numRows; row++) {
             outRow = out->data.F32[row];
             inRow = in->data.C32[row];
 
-            for (unsigned int col = 0; col < numCols; col++) {
+            for (psU32 col = 0; col < numCols; col++) {
                 real = crealf(inRow[col]);
                 imag = cimagf(inRow[col]);
@@ -422,9 +421,9 @@
 
         out = psImageRecycle(out, numCols, numRows, PS_TYPE_F64);
-        for (unsigned int row = 0; row < numRows; row++) {
+        for (psU32 row = 0; row < numRows; row++) {
             outRow = out->data.F64[row];
             inRow = in->data.C64[row];
 
-            for (unsigned int col = 0; col < numCols; col++) {
+            for (psU32 col = 0; col < numCols; col++) {
                 real = creal(inRow[col]);
                 imag = cimag(inRow[col]);
Index: trunk/psLib/src/image/psImageIO.c
===================================================================
--- trunk/psLib/src/image/psImageIO.c	(revision 2105)
+++ trunk/psLib/src/image/psImageIO.c	(revision 2204)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-02 02:08:00 $
+ *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -15,5 +15,4 @@
 #include <fitsio.h>
 #include <unistd.h>
-#include <stdbool.h>
 
 #include "psImageIO.h"
@@ -24,26 +23,26 @@
 
 psImage* psImageReadSection(psImage* output,
-                            int col,
-                            int row,
-                            int numCols,
-                            int numRows,
-                            int z,
+                            psS32 col,
+                            psS32 row,
+                            psS32 numCols,
+                            psS32 numRows,
+                            psS32 z,
                             char *extname,
-                            int extnum,
+                            psS32 extnum,
                             char *filename)
 {
     fitsfile *fptr = NULL;      /* Pointer to the FITS file */
-    int status = 0;             /* CFITSIO file vars */
-    int nAxis = 0;
-    int anynull = 0;
-    int bitPix = 0;             /* Pixel type */
-    long nAxes[3];
-    long firstPixel[3];         /* lower-left corner of image subset */
-    long lastPixel[3];          /* upper-right corner of image subset */
-    long increment[3];          /* increment for image subset */
+    psS32 status = 0;             /* CFITSIO file vars */
+    psS32 nAxis = 0;
+    psS32 anynull = 0;
+    psS32 bitPix = 0;             /* Pixel type */
+    psS64 nAxes[3];
+    psS64 firstPixel[3];         /* lower-left corner of image subset */
+    psS64 lastPixel[3];          /* upper-right corner of image subset */
+    psS64 increment[3];          /* increment for image subset */
     char fitsErr[80] = "";      /* CFITSIO error message string */
-    int hduType = IMAGE_HDU;
-    int fitsDatatype = 0;
-    int datatype = 0;
+    psS32 hduType = IMAGE_HDU;
+    psS32 fitsDatatype = 0;
+    psS32 datatype = 0;
 
     if (filename == NULL) {
@@ -228,27 +227,27 @@
 }
 
-bool psImageWriteSection(psImage* input,
-                         int col0,
-                         int row0,
-                         int z,
-                         char *extname,
-                         int extnum,
-                         char *filename)
+psBool psImageWriteSection(psImage* input,
+                           psS32 col0,
+                           psS32 row0,
+                           psS32 z,
+                           char *extname,
+                           psS32 extnum,
+                           char *filename)
 {
-    int numCols = 0;
-    int numRows = 0;
-
-    int status = 0;             /* CFITSIO status */
+    psS32 numCols = 0;
+    psS32 numRows = 0;
+
+    psS32 status = 0;             /* CFITSIO status */
     fitsfile *fptr = NULL;      /* pointer to the FITS file */
-    long nAxes[3];              /* Image axis vars */
-    long firstPixel[3];         /* First Pixel to read */
-    long lastPixel[3];          /* Last Pixel to read */
+    psS64 nAxes[3];              /* Image axis vars */
+    psS64 firstPixel[3];         /* First Pixel to read */
+    psS64 lastPixel[3];          /* Last Pixel to read */
     char fitsErr[80];           /* FITSIO message string */
-    int datatype = 0;           /* the datatype of the image */
-    int bitPix = 0;             /* FITS bitPix value */
-    int hduType = IMAGE_HDU;    /* the HDU type (image,table, etc.) */
+    psS32 datatype = 0;           /* the datatype of the image */
+    psS32 bitPix = 0;             /* FITS bitPix value */
+    psS32 hduType = IMAGE_HDU;    /* the HDU type (image,table, etc.) */
     double bscale = 1.0;
     double bzero = 0.0;
-    bool createNewHDU = false;
+    psBool createNewHDU = false;
 
     /* need a valid image to write */
@@ -336,5 +335,5 @@
             }
         } else {
-            int numHDUs = 0;
+            psS32 numHDUs = 0;
 
             fits_get_num_hdus(fptr, &numHDUs, &status);
Index: trunk/psLib/src/image/psImageIO.h
===================================================================
--- trunk/psLib/src/image/psImageIO.h	(revision 2105)
+++ trunk/psLib/src/image/psImageIO.h	(revision 2204)
@@ -10,6 +10,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-10 01:05:53 $
+ *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -17,6 +17,4 @@
 #ifndef PS_IMAGEIO_H
 #define PS_IMAGEIO_H
-
-#include <stdbool.h>
 
 #include "psImage.h"
@@ -34,17 +32,17 @@
     /**< the output psImage to recycle, or NULL if new psImage desired */
 
-    int col0,
+    psS32 col0,
     /**< the column index of the origin to start reading */
 
-    int row0,
+    psS32 row0,
     /**< the row index of the origin to start reading */
 
-    int numCols,
+    psS32 numCols,
     /**< the number of desired columns to read */
 
-    int numRows,
+    psS32 numRows,
     /**< the number of desired rows to read */
 
-    int z,
+    psS32 z,
     /**< the z index to read if file is organized as a 3D image cube. */
 
@@ -54,5 +52,5 @@
         */
 
-    int extnum,
+    psS32 extnum,
     /**< the image extension to read (0=PHU, 1=first extension, etc.)  This is
         *   only used if extname is NULL
@@ -65,17 +63,17 @@
 /** Read an image or subimage from a FITS file specified by a filename.
  *
- *  return bool         TRUE is successful, otherwise FALSE.
+ *  return psBool         TRUE is successful, otherwise FALSE.
  */
-bool psImageWriteSection(
+psBool psImageWriteSection(
     psImage* input,
     /**< the psImage to write */
 
-    int col0,
+    psS32 col0,
     /**< the column index of the origin to start writing */
 
-    int row0,
+    psS32 row0,
     /**< the row index of the origin to start writing */
 
-    int z,
+    psS32 z,
     /**< the z index to start writing */
 
@@ -85,5 +83,5 @@
     */
 
-    int extnum,
+    psS32 extnum,
     /**< the image extension to write (0=PHU, 1=first extension, etc.)  This is
     *   only used if extname is NULL.
Index: trunk/psLib/src/image/psImageManip.c
===================================================================
--- trunk/psLib/src/image/psImageManip.c	(revision 2105)
+++ trunk/psLib/src/image/psImageManip.c	(revision 2204)
@@ -10,6 +10,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-14 01:22:59 $
+ *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -18,5 +18,4 @@
 #include <math.h>                          // for isfinite(), etc.
 #include <stdlib.h>
-#include <stdbool.h>
 #include <string.h>                        // for memcpy, etc.
 
@@ -29,13 +28,13 @@
 #include "psImageErrors.h"
 
-int psImageClip(psImage* input,
-                psF64 min,
-                psF64 vmin,
-                psF64 max,
-                psF64 vmax)
+psS32 psImageClip(psImage* input,
+                  psF64 min,
+                  psF64 vmin,
+                  psF64 max,
+                  psF64 vmax)
 {
-    int numClipped = 0;
-    unsigned int numRows;
-    unsigned int numCols;
+    psS32 numClipped = 0;
+    psU32 numRows;
+    psU32 numCols;
 
     if (input == NULL) {
@@ -72,7 +71,7 @@
                            (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \
             } \
-            for (unsigned int row = 0;row<numRows;row++) { \
+            for (psU32 row = 0;row<numRows;row++) { \
                 ps##type* inputRow = input->data.type[row]; \
-                for (unsigned int col = 0; col < numCols; col++) { \
+                for (psU32 col = 0; col < numCols; col++) { \
                     if ((psF64)inputRow[col] < min) { \
                         inputRow[col] = (ps##type)vmin; \
@@ -103,7 +102,7 @@
                            (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \
             } \
-            for (unsigned int row = 0;row<numRows;row++) { \
+            for (psU32 row = 0;row<numRows;row++) { \
                 ps##type* inputRow = input->data.type[row]; \
-                for (unsigned int col = 0; col < numCols; col++) { \
+                for (psU32 col = 0; col < numCols; col++) { \
                     if (absfcn(inputRow[col]) < min) { \
                         inputRow[col] = (ps##type)vmin; \
@@ -144,10 +143,10 @@
 }
 
-int psImageClipNaN(psImage* input,
-                   psF64 value)
+psS32 psImageClipNaN(psImage* input,
+                     psF64 value)
 {
-    int numClipped = 0;
-    unsigned int numRows;
-    unsigned int numCols;
+    psS32 numClipped = 0;
+    psU32 numRows;
+    psU32 numCols;
 
     if (input == NULL) {
@@ -161,7 +160,7 @@
         #define psImageClipNaNCase(type) \
     case PS_TYPE_##type: \
-        for (unsigned int row = 0;row<numRows;row++) { \
+        for (psU32 row = 0;row<numRows;row++) { \
             ps##type* inputRow = input->data.type[row]; \
-            for (unsigned int col = 0; col < numCols; col++) { \
+            for (psU32 col = 0; col < numCols; col++) { \
                 if (! isfinite(inputRow[col])) { \
                     inputRow[col] = (ps##type)value; \
@@ -190,16 +189,16 @@
 }
 
-int psImageOverlaySection(psImage* image,
-                          const psImage* overlay,
-                          int col0,
-                          int row0,
-                          const char *op)
+psS32 psImageOverlaySection(psImage* image,
+                            const psImage* overlay,
+                            psS32 col0,
+                            psS32 row0,
+                            const char *op)
 {
-    unsigned int imageNumRows;
-    unsigned int imageNumCols;
-    unsigned int overlayNumRows;
-    unsigned int overlayNumCols;
-    unsigned int imageRowLimit;
-    unsigned int imageColLimit;
+    psU32 imageNumRows;
+    psU32 imageNumCols;
+    psU32 overlayNumRows;
+    psU32 overlayNumCols;
+    psU32 imageRowLimit;
+    psU32 imageColLimit;
     psElemType type;
 
@@ -257,8 +256,8 @@
         #define psImageOverlayCase(DATATYPE) \
     case PS_TYPE_##DATATYPE: \
-        for (unsigned int row=row0;row<imageRowLimit;row++) { \
+        for (psU32 row=row0;row<imageRowLimit;row++) { \
             ps##DATATYPE* imageRow = image->data.DATATYPE[row]; \
             ps##DATATYPE* overlayRow = overlay->data.DATATYPE[row-row0]; \
-            for (unsigned int col=col0;col<imageColLimit;col++) { \
+            for (psU32 col=col0;col<imageColLimit;col++) { \
                 switch (*op) { \
                 case '+': \
@@ -315,13 +314,13 @@
 }
 
-int psImageClipComplexRegion(psImage* input,
-                             psC64 min,
-                             psC64 vmin,
-                             psC64 max,
-                             psC64 vmax)
+psS32 psImageClipComplexRegion(psImage* input,
+                               psC64 min,
+                               psC64 vmin,
+                               psC64 max,
+                               psC64 vmax)
 {
-    int numClipped = 0;
-    unsigned int numRows;
-    unsigned int numCols;
+    psS32 numClipped = 0;
+    psU32 numRows;
+    psU32 numCols;
     psF64 realMin = creal(min);
     psF64 imagMin = cimag(min);
@@ -374,7 +373,7 @@
             break; \
         } \
-        for (unsigned int row = 0;row<numRows;row++) { \
+        for (psU32 row = 0;row<numRows;row++) { \
             ps##type* inputRow = input->data.type[row]; \
-            for (unsigned int col = 0; col < numCols; col++) { \
+            for (psU32 col = 0; col < numCols; col++) { \
                 if ( (realfcn(inputRow[col]) > realMax) || (imagfcn(inputRow[col]) > imagMax) ) { \
                     inputRow[col] = (ps##type)vmax; \
@@ -411,11 +410,11 @@
                       const psImage* restrict mask,
                       psMaskType maskVal,
-                      unsigned int scale,
+                      psU32 scale,
                       const psStats* stats)
 {
-    int inRows;
-    int inCols;
-    int outRows;
-    int outCols;
+    psS32 inRows;
+    psS32 inCols;
+    psS32 outRows;
+    psS32 outCols;
     psVector* vec;                     // vector to hold the values of a single bin.
     psVector* maskVec = NULL;          // vector to hold the mask of a single bin.
@@ -491,18 +490,18 @@
         ps##type* vecData = vec->data.type; \
         psMaskType* inRowMask = NULL; \
-        for (int row = 0; row < outRows; row++) { \
+        for (psS32 row = 0; row < outRows; row++) { \
             outRowData = out->data.type[row]; \
-            int inCurrentRow = row*scale; \
-            int inNextRow = (row+1)*scale; \
-            for (int col = 0; col < outCols; col++) { \
-                int inCurrentCol = col*scale; \
-                int inNextCol = (col+1)*scale; \
-                int n = 0; \
-                for (int inRow = inCurrentRow; inRow < inNextRow && inRow < inRows; inRow++) { \
+            psS32 inCurrentRow = row*scale; \
+            psS32 inNextRow = (row+1)*scale; \
+            for (psS32 col = 0; col < outCols; col++) { \
+                psS32 inCurrentCol = col*scale; \
+                psS32 inNextCol = (col+1)*scale; \
+                psS32 n = 0; \
+                for (psS32 inRow = inCurrentRow; inRow < inNextRow && inRow < inRows; inRow++) { \
                     ps##type* inRowData = in->data.type[inRow]; \
                     if (mask != NULL) { \
                         inRowMask = mask->data.PS_TYPE_MASK_DATA[inRow]; \
                     } \
-                    for (int inCol = inCurrentCol; inCol < inNextCol && inCol < inCols; inCol++) { \
+                    for (psS32 inCol = inCurrentCol; inCol < inNextCol && inCol < inCols; inCol++) { \
                         if (maskData != NULL) { \
                             maskData[n] = inRowMask[inCol]; \
@@ -555,9 +554,9 @@
 psImage* psImageResample(psImage* out,
                          const psImage* in,
-                         int scale,
+                         psS32 scale,
                          psImageInterpolateMode mode)
 {
-    int outRows;
-    int outCols;
+    psS32 outRows;
+    psS32 outCols;
     float invScale;
 
@@ -597,8 +596,8 @@
 case PS_TYPE_##TYPE: { \
         out = psImageRecycle(out,outCols, outRows, PS_TYPE_##TYPE); \
-        for (int row=0;row<outRows;row++) { \
+        for (psS32 row=0;row<outRows;row++) { \
             ps##TYPE* rowData = out->data.TYPE[row]; \
             float inRow = (float)row * invScale; \
-            for (int col=0;col<outCols;col++) { \
+            for (psS32 col=0;col<outCols;col++) { \
                 rowData[col] = psImagePixelInterpolate(in,(float)col*invScale,inRow,NULL,0,0,mode); \
             } \
@@ -637,10 +636,10 @@
 psImage* psImageRoll(psImage* out,
                      const psImage* in,
-                     int dx,
-                     int dy)
+                     psS32 dx,
+                     psS32 dy)
 {
-    int outRows;
-    int outCols;
-    int elementSize;
+    psS32 outRows;
+    psS32 outCols;
+    psS32 elementSize;
 
     if (in == NULL) {
@@ -669,9 +668,9 @@
     }
 
-    int segment1Size = elementSize * (outCols - dx);
-    int segment2Size = elementSize * dx;
-
-    for (int row = 0; row < outRows; row++) {
-        int inRowNumber = row + dy;
+    psS32 segment1Size = elementSize * (outCols - dx);
+    psS32 segment2Size = elementSize * dx;
+
+    for (psS32 row = 0; row < outRows; row++) {
+        psS32 inRowNumber = row + dy;
 
         if (inRowNumber >= outRows) {
@@ -706,7 +705,7 @@
     if (fabsf(angle - 90.0f) < FLT_EPSILON) {
         // perform 1/4 rotate counter-clockwise
-        int numRows = in->numCols;
-        int numCols = in->numRows;
-        int lastCol = numCols - 1;
+        psS32 numRows = in->numCols;
+        psS32 numCols = in->numRows;
+        psS32 lastCol = numCols - 1;
         psElemType type = in->type.type;
 
@@ -716,7 +715,7 @@
     case PS_TYPE_##TYPE: { \
             ps##TYPE** inData = in->data.TYPE; \
-            for (int row=0;row<numRows;row++) { \
+            for (psS32 row=0;row<numRows;row++) { \
                 ps##TYPE* outRow = out->data.TYPE[row]; \
-                for (int col=0;col<numCols;col++) { \
+                for (psS32 col=0;col<numCols;col++) { \
                     outRow[col] = inData[lastCol-col][row]; \
                 } \
@@ -752,8 +751,8 @@
     } else if (fabsf(angle - 180.0f) < FLT_EPSILON) {
         // perform 1/2 rotate
-        int numRows = in->numRows;
-        int lastRow = numRows - 1;
-        int numCols = in->numCols;
-        int lastCol = numCols - 1;
+        psS32 numRows = in->numRows;
+        psS32 lastRow = numRows - 1;
+        psS32 numCols = in->numCols;
+        psS32 lastCol = numCols - 1;
         psElemType type = in->type.type;
 
@@ -762,8 +761,8 @@
         #define PSIMAGE_ROTATE_180_CASE(TYPE) \
     case PS_TYPE_##TYPE: { \
-            for (int row=0;row<numRows;row++) { \
+            for (psS32 row=0;row<numRows;row++) { \
                 ps##TYPE* outRow = out->data.TYPE[row]; \
                 ps##TYPE* inRow = in->data.TYPE[lastRow-row]; \
-                for (int col=0;col<numCols;col++) { \
+                for (psS32 col=0;col<numCols;col++) { \
                     outRow[col] = inRow[lastCol - col]; \
                 } \
@@ -799,7 +798,7 @@
     } else if (fabsf(angle - 270.0f) < FLT_EPSILON) {
         // perform 1/4 rotate clockwise
-        int numRows = in->numCols;
-        int lastRow = numRows - 1;
-        int numCols = in->numRows;
+        psS32 numRows = in->numCols;
+        psS32 lastRow = numRows - 1;
+        psS32 numCols = in->numRows;
         psElemType type = in->type.type;
 
@@ -809,7 +808,7 @@
     case PS_TYPE_##TYPE: { \
             ps##TYPE** inData = in->data.TYPE; \
-            for (int row=0;row<numRows;row++) { \
+            for (psS32 row=0;row<numRows;row++) { \
                 ps##TYPE* outRow = out->data.TYPE[row]; \
-                for (int col=0;col<numCols;col++) { \
+                for (psS32 col=0;col<numCols;col++) { \
                     outRow[col] = inData[col][lastRow-row]; \
                 } \
@@ -847,6 +846,6 @@
     } else {
         psElemType type = in->type.type;
-        int numRows = in->numRows;
-        int numCols = in->numCols;
+        psS32 numRows = in->numRows;
+        psS32 numCols = in->numCols;
         float centerX = (float)(numCols) / 2.0f;
         float centerY = (float)(numRows) / 2.0f;
@@ -859,8 +858,8 @@
         // y' = y cos(t) - x sin(t); i.e. y' = (y-centerY)*cosT - (x-centerX)*sinT;
 
-        int outCols = ceil(abs(numCols * cosT) + abs(numRows * sinT)) + 1;
-        int outRows = ceil(abs(numCols * sinT) + abs(numRows * cosT)) + 1;
+        psS32 outCols = ceil(abs(numCols * cosT) + abs(numRows * sinT)) + 1;
+        psS32 outRows = ceil(abs(numCols * sinT) + abs(numRows * cosT)) + 1;
         float minX = (float)outCols / -2.0f;
-        int intMinY = outRows / -2;
+        psS32 intMinY = outRows / -2;
 
         out = psImageRecycle(out, outCols, outRows, type);
@@ -906,9 +905,9 @@
             float inY; \
             ps##TYPE* outRow; \
-            for (int y = 0; y < outRows; y++) { \
+            for (psS32 y = 0; y < outRows; y++) { \
                 inX = minXTimesCosTPlusCenterX + (y+intMinY) * sinT; \
                 inY = CenterYMinusminXTimesSinT + (y+intMinY) * cosT; \
                 outRow = out->data.TYPE[y]; \
-                for (int x = 0; x < outCols; x++) { \
+                for (psS32 x = 0; x < outCols; x++) { \
                     outRow[x] = p_psImagePixelInterpolate##MODE##_##TYPE(in,inX,inY,NULL,0,unexposedValue); \
                     inX += cosT; \
@@ -993,7 +992,7 @@
                       psImageInterpolateMode mode)
 {
-    int outRows;
-    int outCols;
-    int elementSize;
+    psS32 outRows;
+    psS32 outCols;
+    psS32 elementSize;
     psElemType type;
 
@@ -1030,8 +1029,8 @@
         break; \
     } \
-    for (int row=0;row<outRows;row++) { \
+    for (psS32 row=0;row<outRows;row++) { \
         ps##TYPE* outRow = out->data.TYPE[row]; \
         float y = dy+(float)row; \
-        for (int col=0;col<outCols;col++) { \
+        for (psS32 col=0;col<outCols;col++) { \
             outRow[col] = p_psImagePixelInterpolate##MODE##_##TYPE( \
                           in,dx+(float)col,y,NULL,0,unexposedValue); \
Index: trunk/psLib/src/image/psImageManip.h
===================================================================
--- trunk/psLib/src/image/psImageManip.h	(revision 2105)
+++ trunk/psLib/src/image/psImageManip.h	(revision 2204)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-27 19:49:54 $
+ *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-27 00:57:31 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -30,7 +30,7 @@
  *  defined for psU8, psU16, psS8, psS16, psF32, psF64, psC32, and psC64.
  *
- *  @return int     The number of clipped pixels
+ *  @return psS32     The number of clipped pixels
  */
-int psImageClip(
+psS32 psImageClip(
     psImage* input,                    ///< the image to clip
     psF64 min,                         ///< the minimum image value allowed
@@ -47,7 +47,7 @@
  *  This function is defined for psC32, and psC64 imagery only.
  *
- *  @return int     The number of clipped pixels
+ *  @return psS32     The number of clipped pixels
  */
-int psImageClipComplexRegion(
+psS32 psImageClipComplexRegion(
     psImage* input,                    ///< the image to clip
     psC64 min,                         ///< the minimum image value allowed
@@ -62,7 +62,7 @@
  *  function is defined for psF32, psF64, psC32, and psC64.
  *
- *  @return int     The number of clipped pixels
+ *  @return psS32     The number of clipped pixels
  */
-int psImageClipNaN(
+psS32 psImageClipNaN(
     psImage* input,                    ///< the image to clip
     psF64 value                        ///< the value to set all NaN/Inf values to
@@ -78,11 +78,11 @@
  *  function is defined for psU8, psS8, psS16, psF32, psF64, psC32, and psC64.
  *
- *  @return int         0 if success, non-zero if failed.
+ *  @return psS32         0 if success, non-zero if failed.
  */
-int psImageOverlaySection(
+psS32 psImageOverlaySection(
     psImage* image,                    ///< target image
     const psImage* overlay,            ///< the overlay image
-    int col0,                          ///< the column to start overlay
-    int row0,                          ///< the row to start overlay
+    psS32 col0,                          ///< the column to start overlay
+    psS32 row0,                          ///< the row to start overlay
     const char *op                     ///< the operation to perform for overlay
 );
@@ -103,5 +103,5 @@
     const psImage* restrict mask,      ///< mask for input image.  If NULL, no masking is done.
     psMaskType maskVal,                ///< the bits to check in mask.
-    unsigned int scale,                ///< the scale to rebin for each dimension
+    psU32 scale,                ///< the scale to rebin for each dimension
     const psStats* stats
     ///< the statistic to perform when rebinning.  Only one method should be set.
@@ -121,5 +121,5 @@
     psImage* out,                      ///< an psImage to recycle.  If NULL, a new image is created
     const psImage* in,                 ///< input image
-    int scale,                         ///< resample scaling factor
+    psS32 scale,                         ///< resample scaling factor
     psImageInterpolateMode mode        ///< the interpolation mode used in resampling
 );
@@ -176,6 +176,6 @@
     psImage* out,                      ///< an psImage to recycle.  If NULL, a new image is created
     const psImage* in,                 ///< input image
-    int dx,                            ///< number of pixels to roll in the x-dimension
-    int dy                             ///< number of pixels to roll in the y-dimension
+    psS32 dx,                            ///< number of pixels to roll in the x-dimension
+    psS32 dy                             ///< number of pixels to roll in the y-dimension
 );
 
Index: trunk/psLib/src/image/psImageStats.c
===================================================================
--- trunk/psLib/src/image/psImageStats.c	(revision 2105)
+++ trunk/psLib/src/image/psImageStats.c	(revision 2204)
@@ -9,6 +9,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-10-14 01:06:44 $
+*  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-10-27 00:57:31 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -40,5 +40,5 @@
                       psImage* in,
                       psImage* mask,
-                      int maskVal)
+                      psS32 maskVal)
 {
     psVector* junkData = NULL;
@@ -106,5 +106,5 @@
                               psImage* in,
                               psImage* mask,
-                              unsigned int maskVal)
+                              psU32 maskVal)
 {
     psVector* junkData = NULL;
@@ -150,7 +150,7 @@
 
 // XXX: Why do we have this function?
-float *p_psCalcScaleFactorsFit(int n)
-{
-    int i = 0;
+float *p_psCalcScaleFactorsFit(psS32 n)
+{
+    psS32 i = 0;
     float tmp = 0.0;
     float *scalingFactors = (float *)psAlloc(n * sizeof(float));
@@ -175,7 +175,7 @@
 output a vector of evenly spaced floating point values between -1.0:1.0.
  *****************************************************************************/
-float *p_psCalcScaleFactorsEval(int n)
-{
-    int i = 0;
+float *p_psCalcScaleFactorsEval(psS32 n)
+{
+    psS32 i = 0;
     float tmp = 0.0;
 
@@ -196,5 +196,5 @@
 
 // XXX: Use a static array of CHebyshev polynomials.
-psPolynomial1D **p_psCreateChebyshevPolys(int maxChebyPoly)
+psPolynomial1D **p_psCreateChebyshevPolys(psS32 maxChebyPoly)
 {
     if (maxChebyPoly < 1) {
@@ -202,6 +202,6 @@
     }
     psPolynomial1D **chebPolys = NULL;
-    int i = 0;
-    int j = 0;
+    psS32 i = 0;
+    psS32 j = 0;
 
     chebPolys = (psPolynomial1D **) psAlloc(maxChebyPoly * sizeof(psPolynomial1D *));
@@ -245,11 +245,11 @@
                                      const psImage* input)
 {
-    int x = 0;
-    int y = 0;
-    int i = 0;
-    int j = 0;
+    psS32 x = 0;
+    psS32 y = 0;
+    psS32 i = 0;
+    psS32 j = 0;
     float **sums = NULL;
     psPolynomial1D* *chebPolys = NULL;
-    int maxChebyPoly = 0;
+    psS32 maxChebyPoly = 0;
     float *cScalingFactors = NULL;
     float *rScalingFactors = NULL;
@@ -365,11 +365,11 @@
 psImage* psImageEvalPolynomial(psImage* input, const psPolynomial2D* coeffs)
 {
-    int x = 0;
-    int y = 0;
-    int i = 0;
-    int j = 0;
+    psS32 x = 0;
+    psS32 y = 0;
+    psS32 i = 0;
+    psS32 j = 0;
     //    float **sums = NULL;
     psPolynomial1D* *chebPolys = NULL;
-    int maxChebyPoly = 0;
+    psS32 maxChebyPoly = 0;
     float *cScalingFactors = NULL;
     float *rScalingFactors = NULL;
Index: trunk/psLib/src/image/psImageStats.h
===================================================================
--- trunk/psLib/src/image/psImageStats.h	(revision 2105)
+++ trunk/psLib/src/image/psImageStats.h	(revision 2204)
@@ -9,6 +9,6 @@
 *  @author George Gusciora, MHPCC
 *
-*  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-10-05 01:03:11 $
+*  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-10-27 00:57:31 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -40,5 +40,5 @@
     psImage* in,                       ///< image (or subimage) to calculate stats
     psImage* mask,                     ///< mask data for image (NULL ok)
-    int maskVal                        ///< mask Mask for mask
+    psS32 maskVal                        ///< mask Mask for mask
 );
 
@@ -55,5 +55,5 @@
     psImage* in,                       ///< Image data to be histogramed.
     psImage* mask,                     ///< mask data for image (NULL ok)
-    unsigned int maskVal               ///< mask Mask for mask
+    psU32 maskVal               ///< mask Mask for mask
 );
 
