Index: trunk/psLib/src/math/psMinimize.c
===================================================================
--- trunk/psLib/src/math/psMinimize.c	(revision 5090)
+++ trunk/psLib/src/math/psMinimize.c	(revision 5113)
@@ -10,6 +10,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.139 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-22 02:47:16 $
+ *  @version $Revision: 1.140 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-09-23 23:01:30 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -204,13 +204,15 @@
     # ifndef PS_NO_TRACE
     // dump some useful info if trace is defined
-    if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") >= 5) {
-        p_psImagePrint  (psTraceGetDestination(), alpha, "alpha guess");
-        p_psVectorPrint (psTraceGetDestination(), beta, "beta guess");
-        p_psVectorPrint (psTraceGetDestination(), params, "params guess");
-    }
-    if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") == 4) {
-        // XXX: Where is this?
-        // p_psVectorPrintRow (psTraceGetDestination(), Params, "params guess");
-    }
+    /* XXX: This code is seg faulting.
+        if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") >= 5) {
+            p_psImagePrint  (psTraceGetDestination(), alpha, "alpha guess");
+            p_psVectorPrint (psTraceGetDestination(), beta, "beta guess");
+            p_psVectorPrint (psTraceGetDestination(), params, "params guess");
+        }
+        if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") >= 4) {
+            // XXX: Where is this?
+            // p_psVectorPrintRow (psTraceGetDestination(), Params, "params guess");
+        }
+    */
     # endif /* PS_NO_TRACE */
 
@@ -226,13 +228,15 @@
         # ifndef PS_NO_TRACE
         // dump some useful info if trace is defined
-        if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") >= 5) {
-            p_psImagePrint  (psTraceGetDestination(), Alpha, "alpha guess");
-            p_psVectorPrint (psTraceGetDestination(), Beta, "beta guess");
-            p_psVectorPrint (psTraceGetDestination(), Params, "params guess");
-        }
-        if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") == 4) {
-            // XXX: Where is this?
-            // p_psVectorPrintRow (psTraceGetDestination(), Params, "params guess");
-        }
+        /* XXX: This code is seg faulting.
+                if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") >= 5) {
+                    p_psImagePrint  (psTraceGetDestination(), Alpha, "alpha guess");
+                    p_psVectorPrint (psTraceGetDestination(), Beta, "beta guess");
+                    p_psVectorPrint (psTraceGetDestination(), Params, "params guess");
+                }
+                if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") >= 4) {
+                    // XXX: Where is this?
+                    // p_psVectorPrintRow (psTraceGetDestination(), Params, "params guess");
+                }
+        */
         # endif /* PS_NO_TRACE */
 
@@ -249,9 +253,11 @@
         # ifndef PS_NO_TRACE
         // dump some useful info if trace is defined
-        if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") >= 5) {
-            p_psImagePrint  (psTraceGetDestination(), Alpha, "alpha guess");
-            p_psVectorPrint (psTraceGetDestination(), Beta, "beta guess");
-            p_psVectorPrint (psTraceGetDestination(), Params, "params guess");
-        }
+        /* XXX: This code is seg faulting.
+                if (psTraceGetLevel (".psLib.dataManip.psMinimizeLMChi2") >= 5) {
+                    p_psImagePrint  (psTraceGetDestination(), Alpha, "alpha guess");
+                    p_psVectorPrint (psTraceGetDestination(), Beta, "beta guess");
+                    p_psVectorPrint (psTraceGetDestination(), Params, "params guess");
+                }
+        */
         # endif /* PS_NO_TRACE */
 
@@ -271,5 +277,5 @@
         //        printf("CONDITIONS: (%f > %f) && (%d < %d)\n", min->lastDelta, min->tol, min->iter, min->maxIter);
     }
-    psTrace (".psLib.dataManip.psMinimizeLMChi2", 3, "chisq: %f, last delta: %f, Niter: %d\n", min->value, min->lastDelta, min->iter);
+    psTrace (".psLib.dataManip.psMinimizeLMChi2", 4, "chisq: %f, last delta: %f, Niter: %d\n", min->value, min->lastDelta, min->iter);
 
     // construct & return the covariance matrix (if requested)
@@ -1579,20 +1585,18 @@
 
     if (psTraceGetLevel (".psLib.dataManip.VectorFitPolynomial1DOrd") >= 5) {
-        FILE *fp = fdopen((psTraceGetDestination ()), "a+");
-        fprintf(fp, "VectorFitPolynomial1D()\n");
+        psTrace(__func__, 6, "VectorFitPolynomial1D()\n");
         for (int i = 0; i < f->n; i++) {
-            fprintf(fp, "(x, f, fErr) is (");
+            psTrace(__func__, 6, "(x, f, fErr) is (");
             if (x != NULL) {
-                fprintf(fp, "%f, %f, ", x->data.F64[i], f->data.F64[i]);
+                psTrace(__func__, 6, "%f, %f, ", x->data.F64[i], f->data.F64[i]);
             } else {
-                fprintf(fp, "%f, %f, ", (psF64) i, f->data.F64[i]);
+                psTrace(__func__, 6, "%f, %f, ", (psF64) i, f->data.F64[i]);
             }
             if (fErr != NULL) {
-                fprintf(fp, "%f)\n", fErr->data.F64[i]);
+                psTrace(__func__, 6, "%f)\n", fErr->data.F64[i]);
             } else {
-                fprintf(fp, "NULL)\n");
-            }
-        }
-        fclose(fp);
+                psTrace(__func__, 6, "NULL)\n");
+            }
+        }
     }
 
