Index: trunk/psLib/src/math/psFunctions.c
===================================================================
--- trunk/psLib/src/math/psFunctions.c	(revision 4581)
+++ trunk/psLib/src/math/psFunctions.c	(revision 4857)
@@ -7,6 +7,6 @@
 *  polynomials.  It also contains a Gaussian functions.
 *
-*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-07-20 01:21:13 $
+*  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-08-23 23:23:05 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -20,7 +20,4 @@
 /*  INCLUDE FILES                                                            */
 /*****************************************************************************/
-#include <gsl/gsl_rng.h>
-#include <gsl/gsl_randist.h>
-
 #include <stdio.h>
 #include <stdbool.h>
@@ -28,4 +25,5 @@
 #include <math.h>
 
+#include "psRandom.h"
 #include "psMemory.h"
 #include "psVector.h"
@@ -36,5 +34,4 @@
 #include "psFunctions.h"
 #include "psConstants.h"
-
 #include "psErrorText.h"
 
@@ -688,9 +685,5 @@
  This private routine (formerly a psLib API routine) creates a psVector of the
  specified size and type F32 and fills it with a random Gaussian distribution
- of numbers with the specified mean and sigma.  This routine makes use of the
- GSL routines for generating both uniformly distributed numbers and the
- Gaussian distribution as well.
- 
-XXX: There is no way to seed the random generator.
+ of numbers with the specified mean and sigma.
  *****************************************************************************/
 psVector* p_psGaussianDev(psF32 mean, psF32 sigma, psS32 Npts)
@@ -698,21 +691,11 @@
     PS_ASSERT_INT_NONNEGATIVE(Npts, NULL);
 
-    psVector* gauss = NULL;
-    const gsl_rng_type *T = NULL;
-    gsl_rng *r = NULL;
-    psS32 i = 0;
-
-
-    gauss = psVectorAlloc(Npts, PS_TYPE_F32);
-    gauss->n = Npts;
-    gsl_rng_env_setup();
-    T = gsl_rng_default;
-    r = gsl_rng_alloc(T);
-
-    for (i = 0; i < Npts; i++) {
-        gauss->data.F32[i] = mean + gsl_ran_gaussian(r, sigma);
-    }
-
-    // XXX: Should I free r, T as well?  This is a memory leak.
+    psRandom *r = psRandomAlloc(PS_RANDOM_TAUS, p_psRandomGetSystemSeed());
+    psVector* gauss = psVectorAlloc(Npts, PS_TYPE_F32);
+    for (psS32 i = 0; i < Npts; i++) {
+        gauss->data.F32[i] = mean + p_psRandomGaussian(r, sigma);
+    }
+    psFree(r);
+
     return(gauss);
 }
