Index: trunk/psLib/src/mathtypes/psImage.c
===================================================================
--- trunk/psLib/src/mathtypes/psImage.c	(revision 4886)
+++ trunk/psLib/src/mathtypes/psImage.c	(revision 4887)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.76 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-26 03:35:02 $
+ *  @version $Revision: 1.77 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-26 23:01:17 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -219,8 +219,10 @@
     case PS_TYPE_U8:
         temp = va_arg (argp, psU32);
-        if ( temp >= 0 || temp <= 255 )
+        if ( temp >= PS_MIN_U8 && temp <= PS_MAX_U8 )
             vU8 = temp;
-        else
+        else {
             psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Error:  U8 Value out of Range.\n");
+            return false;
+        }
         for (int iy = 0; iy < image->numRows; iy++) {
             for (int ix = 0; ix < image->numCols; ix++) {
Index: trunk/psLib/src/mathtypes/psVector.c
===================================================================
--- trunk/psLib/src/mathtypes/psVector.c	(revision 4886)
+++ trunk/psLib/src/mathtypes/psVector.c	(revision 4887)
@@ -9,6 +9,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-08-19 21:27:43 $
+*  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-08-26 23:01:17 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -612,5 +612,4 @@
                   ...)
 {
-
     va_list argp;
     psU8  vU8;
@@ -627,4 +626,7 @@
     psC64 vC64;
 
+    unsigned int temp;
+    int temp2;
+
     if (image == NULL)
         return (false);
@@ -634,35 +636,35 @@
     switch (image->type.type) {
     case PS_TYPE_U8:
-        vU8 = va_arg (argp, psU32);
-
-        for (long iy = 0; iy < image->n; iy++) {
-            //            for (int ix = 0; ix < image->numCols; ix++) {
+        temp = va_arg (argp, psU32);
+        if ( temp >= PS_MIN_U8 && temp <= PS_MAX_U8 )
+            vU8 = temp;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Error:  U8 Value out of Range.\n");
+            return false;
+        }
+        for (long iy = 0; iy < image->n; iy++) {
             image->data.U8[iy] = vU8;
-            //            }
-        }
-        break;
-
+        }
+        return (true);
     case PS_TYPE_F32:
-        vF32 = va_arg (argp, psF64);
-
-        for (long iy = 0; iy < image->n; iy++) {
-            //           for (int ix = 0; ix < image->numCols; ix++) {
+        vF32 = (psF32)va_arg (argp, psF64);
+        for (long iy = 0; iy < image->n; iy++) {
             image->data.F32[iy] = vF32;
-            //            }
-        }
-        return (true);
-
+        }
+        return (true);
     case PS_TYPE_F64:
         vF64 = va_arg (argp, psF64);
-
-        for (long iy = 0; iy < image->n; iy++) {
-            //            for (int ix = 0; ix < image->numCols; ix++) {
+        for (long iy = 0; iy < image->n; iy++) {
             image->data.F64[iy] = vF64;
-            //            }
         }
         return (true);
     case PS_TYPE_U16:
-        vU16 = va_arg (argp, psU32);
-
+        temp = va_arg (argp, psU32);
+        if ( temp >= PS_MIN_U16 && temp <= PS_MAX_U16 )
+            vU16 = temp;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Error:  U16 Value out of Range.\n");
+            return false;
+        }
         for (long iy = 0; iy < image->n; iy++) {
             image->data.U16[iy] = vU16;
@@ -671,5 +673,4 @@
     case PS_TYPE_U32:
         vU32 = va_arg (argp, psU32);
-
         for (long iy = 0; iy < image->n; iy++) {
             image->data.U32[iy] = vU32;
@@ -678,5 +679,4 @@
     case PS_TYPE_U64:
         vU64 = va_arg (argp, psU64);
-
         for (long iy = 0; iy < image->n; iy++) {
             image->data.U64[iy] = vU64;
@@ -684,6 +684,11 @@
         return (true);
     case PS_TYPE_S8:
-        vS8 = va_arg (argp, psS32);
-
+        temp2 = va_arg (argp, psS32);
+        if ( temp2 >= PS_MIN_S8 && temp2 <= PS_MAX_S8 )
+            vS8 = temp2;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Error:  S8 Value out of Range.\n");
+            return false;
+        }
         for (long iy = 0; iy < image->n; iy++) {
             image->data.S8[iy] = vS8;
@@ -691,6 +696,11 @@
         return (true);
     case PS_TYPE_S16:
-        vS16 = va_arg (argp, psS32);
-
+        temp2 = va_arg (argp, psS32);
+        if ( temp2 >= PS_MIN_S16 && temp2 <= PS_MAX_S16 )
+            vS16 = temp2;
+        else {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Error:  S16 Value out of Range.\n");
+            return false;
+        }
         for (long iy = 0; iy < image->n; iy++) {
             image->data.S16[iy] = vS16;
@@ -699,5 +709,4 @@
     case PS_TYPE_S32:
         vS32 = va_arg (argp, psS32);
-
         for (long iy = 0; iy < image->n; iy++) {
             image->data.S32[iy] = vS32;
@@ -706,5 +715,4 @@
     case PS_TYPE_S64:
         vS64 = va_arg (argp, psS64);
-
         for (long iy = 0; iy < image->n; iy++) {
             image->data.S64[iy] = vS64;
@@ -713,5 +721,4 @@
     case PS_TYPE_C32:
         vC32 = va_arg (argp, psC32);
-
         for (long iy = 0; iy < image->n; iy++) {
             image->data.C32[iy] = vC32;
@@ -720,10 +727,8 @@
     case PS_TYPE_C64:
         vC64 = va_arg (argp, psC64);
-
         for (long iy = 0; iy < image->n; iy++) {
             image->data.C64[iy] = vC64;
         }
         return (true);
-
     default:
         psError (PS_ERR_BAD_PARAMETER_TYPE, true, "datatype %d not defined in psImageInit\n", image->type);
Index: trunk/psLib/src/mathtypes/psVector.h
===================================================================
--- trunk/psLib/src/mathtypes/psVector.h	(revision 4886)
+++ trunk/psLib/src/mathtypes/psVector.h	(revision 4887)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-19 21:27:43 $
+ *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-26 23:01:17 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -27,22 +27,4 @@
 /// @{
 
-///< Union of psVector data types.
-/*
-typedef union {
-    psU8* U8;                          ///< Unsigned 8-bit integer data.
-    psU16* U16;                        ///< Unsigned 16-bit integer data.
-    psU32* U32;                        ///< Unsigned 32-bit integer data.
-    psU64* U64;                        ///< Unsigned 64-bit integer data.
-    psS8* S8;                          ///< Signed 8-bit integer data.
-    psS16* S16;                        ///< Signed 16-bit integer data.
-    psS32* S32;                        ///< Signed 32-bit integer data.
-    psS64* S64;                        ///< Signed 64-bit integer data.
-    psF32* F32;                        ///< Single-precision float data.
-    psF64* F64;                        ///< Double-precision float data.
-    psC32* C32;                        ///< Single-precision complex data.
-    psC64* C64;                        ///< Double-precision complex data.
-}
-p_psVectorData;
-*/
 /** An vector to support primitive types.
  *
