Index: trunk/psLib/src/fits/psFitsFloat.c
===================================================================
--- trunk/psLib/src/fits/psFitsFloat.c	(revision 17446)
+++ trunk/psLib/src/fits/psFitsFloat.c	(revision 17447)
@@ -153,5 +153,5 @@
             return NULL;
         }
-        assert(out->type.type == PS_TYPE_F32);
+        psAssert(out->type.type == PS_TYPE_F32, "impossible");
         for (int y = 0; y < numRows; y++) {
             for (int x = 0; x < numCols; x++) {
Index: trunk/psLib/src/fits/psFitsHeader.c
===================================================================
--- trunk/psLib/src/fits/psFitsHeader.c	(revision 17446)
+++ trunk/psLib/src/fits/psFitsHeader.c	(revision 17447)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-03-19 20:23:06 $
+ *  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-04-17 23:43:02 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -21,4 +21,5 @@
 #include <strings.h>
 
+#include "psAbort.h"
 #include "psAssert.h"
 #include "psFits.h"
@@ -230,5 +231,5 @@
                               )
 {
-    assert(fits);
+    psAssert(fits, "impossible");
 
     psMetadata *header = psMetadataAlloc(); // Header, to return
@@ -414,5 +415,5 @@
         // Need to look for MULTI, which won't be picked up using the iterator.
         psMetadataItem *multiCheckItem = psMetadataLookup(header, item->name);
-        assert(multiCheckItem);
+        psAssert(multiCheckItem, "impossible");
         unsigned int flag = 0;      // Flag to indicate MULTI; otherwise default action
         if (multiCheckItem->type == PS_DATA_METADATA_MULTI) {
Index: trunk/psLib/src/fits/psFitsImage.c
===================================================================
--- trunk/psLib/src/fits/psFitsImage.c	(revision 17446)
+++ trunk/psLib/src/fits/psFitsImage.c	(revision 17447)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-03-11 19:57:41 $
+ *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-04-17 23:43:02 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -253,9 +253,9 @@
                                           )
 {
-    assert(bscale);
-    assert(bzero);
-    assert(floatType);
-    assert(fits);
-    assert(image);
+    psAssert(bscale, "impossible");
+    psAssert(bzero, "impossible");
+    psAssert(floatType, "impossible");
+    psAssert(fits, "impossible");
+    psAssert(image, "impossible");
 
     *bscale = 1.0;
@@ -358,10 +358,10 @@
 {
     // n.b., this assumes contiguous image buffer
-    assert(output);
-    assert(fits);
-    assert(info);
-    assert(output->numCols == info->lastPixel[0] - info->firstPixel[0] + 1);
-    assert(output->numRows == info->lastPixel[1] - info->firstPixel[1] + 1); // Right size
-    assert(!output->parent);            // No parents means the buffer is contiguous
+    psAssert(output, "impossible");
+    psAssert(fits, "impossible");
+    psAssert(info, "impossible");
+    psAssert(output->numCols == info->lastPixel[0] - info->firstPixel[0] + 1, "impossible");
+    psAssert(output->numRows == info->lastPixel[1] - info->firstPixel[1] + 1, "impossible"); // Right size
+    psAssert(!output->parent, "impossible");            // No parents means the buffer is contiguous
 
     int anynull = 0;                    // Are there any NULLs in the data?
@@ -516,10 +516,10 @@
     if (cfitsioBzero != 0.0) {
         // p_psFitsTypeToCfitsio and imageToDiskRepresentation must not clash!
-        assert(bzero == 0.0 && bscale == 1.0);
+        psAssert(bzero == 0.0 && bscale == 1.0, "impossible");
         bscale = 1.0;
         bzero = cfitsioBzero;
     }
     psFitsOptions *options = fits->options; // FITS I/O options
-    assert(!options || bitPix == options->bitpix || options->bitpix == 0);
+    psAssert(!options || bitPix == options->bitpix || options->bitpix == 0, "impossible");
 
     int naxis = 3;                      // Number of axes
@@ -647,10 +647,10 @@
     if (cfitsioBzero != 0.0) {
         // p_psFitsTypeToCfitsio and imageToDiskRepresentation must not clash!
-        assert(bzero == 0.0 && bscale == 1.0);
+        psAssert(bzero == 0.0 && bscale == 1.0, "impossible");
         bscale = 1.0;
         bzero = cfitsioBzero;
     }
     psFitsOptions *options = fits->options; // FITS I/O options
-    assert(!options || bitPix == options->bitpix || options->bitpix == 0);
+    psAssert(!options || bitPix == options->bitpix || options->bitpix == 0, "impossible");
 
     //check to see if the HDU has the same datatype
Index: trunk/psLib/src/fits/psFitsScale.c
===================================================================
--- trunk/psLib/src/fits/psFitsScale.c	(revision 17446)
+++ trunk/psLib/src/fits/psFitsScale.c	(revision 17447)
@@ -41,8 +41,8 @@
     )
 {
-    assert(bscale);
-    assert(bzero);
-    assert(image);
-    assert(options);
+    psAssert(bscale, "impossible");
+    psAssert(bzero, "impossible");
+    psAssert(image, "impossible");
+    psAssert(options, "impossible");
 
     double range = pow(2.0, options->bitpix); // Range of values for target BITPIX
@@ -101,8 +101,8 @@
     )
 {
-    assert(bscale);
-    assert(bzero);
-    assert(image);
-    assert(options);
+    psAssert(bscale, "impossible");
+    psAssert(bzero, "impossible");
+    psAssert(image, "impossible");
+    psAssert(options, "impossible");
 
     // Measure the mean and stdev
Index: trunk/psLib/src/imageops/psImageMapFit.c
===================================================================
--- trunk/psLib/src/imageops/psImageMapFit.c	(revision 17446)
+++ trunk/psLib/src/imageops/psImageMapFit.c	(revision 17447)
@@ -7,6 +7,6 @@
  *  @author Eugene Magnier, IfA
  *
- *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-12-15 01:20:03 $
+ *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-04-17 23:43:02 $
  *
  *  Copyright 2007 Institute for Astronomy, University of Hawaii
@@ -338,9 +338,9 @@
 {
     // XXX add in full PS_ASSERTS
-    assert(map);
-    assert(stats);
-    assert(x);
-    assert(y);
-    assert(f);
+    psAssert(map, "impossible");
+    psAssert(stats, "impossible");
+    psAssert(x, "impossible");
+    psAssert(y, "impossible");
+    psAssert(f, "impossible");
 
     // the user supplies one of various stats option pairs,
Index: trunk/psLib/src/math/psMatrix.c
===================================================================
--- trunk/psLib/src/math/psMatrix.c	(revision 17446)
+++ trunk/psLib/src/math/psMatrix.c	(revision 17447)
@@ -22,6 +22,6 @@
  *  @author Andy Becker, University of Washington (SVD).
  *
- *  @version $Revision: 1.55 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-12-14 02:49:44 $
+ *  @version $Revision: 1.56 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-04-17 23:43:02 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -768,5 +768,5 @@
         /* make sure that these things are sorted! */
         if (i > 0) {
-            assert(eval->data.F64[i] <= eval->data.F64[i-1]);
+            psAssert(eval->data.F64[i] <= eval->data.F64[i-1], "impossible");
         }
     }
Index: trunk/psLib/src/math/psPolynomialMD.c
===================================================================
--- trunk/psLib/src/math/psPolynomialMD.c	(revision 17446)
+++ trunk/psLib/src/math/psPolynomialMD.c	(revision 17447)
@@ -44,6 +44,6 @@
 {
     int numTerms = vector->n;           // Number of terms
-    assert(matrix->numCols == numTerms && matrix->numRows == numTerms);
-    assert(buffer && buffer->n == numTerms && buffer->type.type == PS_TYPE_F64);
+    psAssert(matrix->numCols == numTerms && matrix->numRows == numTerms, "impossible");
+    psAssert(buffer && buffer->n == numTerms && buffer->type.type == PS_TYPE_F64, "impossible");
 
 #ifdef DEBUG
@@ -161,7 +161,7 @@
                               )
 {
-    assert(poly);
-    assert(coords);
-    assert(values);
+    psAssert(poly, "impossible");
+    psAssert(coords, "impossible");
+    psAssert(values, "impossible");
 
     double rms = 0.0;                   // Root mean square deviation
Index: trunk/psLib/src/math/psStats.c
===================================================================
--- trunk/psLib/src/math/psStats.c	(revision 17446)
+++ trunk/psLib/src/math/psStats.c	(revision 17447)
@@ -13,6 +13,6 @@
  * use ->min and ->max (PS_STAT_USE_RANGE)
  *
- *  @version $Revision: 1.221 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-12-15 01:17:28 $
+ *  @version $Revision: 1.222 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-04-17 23:43:02 $
  *
  *  Copyright 2006 IfA, University of Hawaii
@@ -521,5 +521,5 @@
     }
 
-    assert(count > 1);                  // It should be, because we have a mean and standard deviation
+    psAssert(count > 1, "impossible");                  // It should be, because we have a mean and standard deviation
 
     double stdev = stats->sampleStdev;  // Standard deviation
Index: trunk/psLib/src/sys/psTrace.c
===================================================================
--- trunk/psLib/src/sys/psTrace.c	(revision 17446)
+++ trunk/psLib/src/sys/psTrace.c	(revision 17447)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.86 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-03-07 00:17:48 $
+ *  @version $Revision: 1.87 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-04-17 23:43:02 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -52,4 +52,5 @@
 #include <stdarg.h>
 
+#include "psAbort.h"
 #include "psAssert.h"
 #include "psTrace.h"
@@ -83,5 +84,5 @@
 static p_psComponent* componentAlloc(const char *name, int level)
 {
-    assert(name);
+    psAssert(name, "impossible");
 
     p_psComponent* comp = psAlloc(sizeof(p_psComponent));
@@ -149,5 +150,5 @@
 void p_psTraceReset(p_psComponent* currentNode)
 {
-    assert(currentNode);
+    psAssert(currentNode, "impossible");
 
     psS32 i = 0;
@@ -184,5 +185,5 @@
 static bool componentAdd(const char *addNodeName, psS32 level)
 {
-    assert(addNodeName);
+    psAssert(addNodeName, "impossible");
 
     psS32 i = 0;                        // Loop index variable.
@@ -346,5 +347,5 @@
 static psS32 doGetTraceLevel(const char *aname)
 {
-    assert(aname);
+    psAssert(aname, "impossible");
     char name[strlen(aname) + 1];       // need a writeable copy: for strsep()
     char *pname = name;
@@ -472,5 +473,5 @@
                                psS32 defLevel)
 {
-    assert(comp);
+    psAssert(comp, "impossible");
 
     char line[1024];
Index: trunk/psLib/src/types/psHash.c
===================================================================
--- trunk/psLib/src/types/psHash.c	(revision 17446)
+++ trunk/psLib/src/types/psHash.c	(revision 17447)
@@ -12,6 +12,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2007-03-08 19:58:37 $
+*  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2008-04-17 23:43:03 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -27,4 +27,5 @@
 #include <inttypes.h>
 
+#include "psAbort.h"
 #include "psHash.h"
 #include "psMemory.h"
@@ -92,5 +93,5 @@
                                      psHashBucket* next)
 {
-    assert(key && strlen(key) > 0);
+    psAssert(key && strlen(key) > 0, "impossible");
 
     // Allocate memory for the new hash bucket.
@@ -229,7 +230,7 @@
                            )
 {
-    assert(table);
-    assert(table->n >= 0);
-    assert(key && strlen(key) > 0);
+    psAssert(table, "impossible");
+    psAssert(table->n >= 0, "impossible");
+    psAssert(key && strlen(key) > 0, "impossible");
 
     if (table->n == 0) {
@@ -244,5 +245,5 @@
         hash = (64 * hash + *tmpchar) % (table->n);
     }
-    assert(hash >= 0 && hash < table->n);
+    psAssert(hash >= 0 && hash < table->n, "impossible");
 
     // ptr will have the correct hash bucket.
Index: trunk/psLib/src/types/psList.c
===================================================================
--- trunk/psLib/src/types/psList.c	(revision 17446)
+++ trunk/psLib/src/types/psList.c	(revision 17447)
@@ -7,6 +7,6 @@
  *  @author Joshua Hoblitt, University of Hawaii
  *
- *  @version $Revision: 1.67 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-03-08 20:38:30 $
+ *  @version $Revision: 1.68 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-04-17 23:43:03 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -84,5 +84,5 @@
 static bool listIteratorRemove(psListIterator* iterator)
 {
-    assert(iterator);
+    psAssert(iterator, "impossible");
     if (iterator->cursor == NULL) {
         return false;
Index: trunk/psLib/src/types/psLookupTable.c
===================================================================
--- trunk/psLib/src/types/psLookupTable.c	(revision 17446)
+++ trunk/psLib/src/types/psLookupTable.c	(revision 17447)
@@ -7,6 +7,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2007-03-08 22:08:26 $
+*  @version $Revision: 1.51 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2008-04-17 23:43:03 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
@@ -193,5 +193,5 @@
 static void lookupTableFree(psLookupTable* table)
 {
-    assert(table);
+    psAssert(table, "impossible");
     psFree(table->values);
     psFree(table->filename);
Index: trunk/psLib/src/types/psPixels.c
===================================================================
--- trunk/psLib/src/types/psPixels.c	(revision 17446)
+++ trunk/psLib/src/types/psPixels.c	(revision 17447)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-03-13 01:03:08 $
+ *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-04-17 23:43:03 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -20,4 +20,5 @@
 #include <stdlib.h>
 
+#include "psAbort.h"
 #include "psPixels.h"
 #include "psMemory.h"
@@ -31,5 +32,5 @@
 static void pixelsFree(psPixels* pixels)
 {
-    assert(pixels);
+    psAssert(pixels, "impossible");
     psFree(pixels->data);
 }
