[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] Changes to pspp/src/settings.c
From: |
Ben Pfaff |
Subject: |
[Pspp-cvs] Changes to pspp/src/settings.c |
Date: |
Sun, 11 Dec 2005 02:35:55 -0500 |
Index: pspp/src/settings.c
diff -u pspp/src/settings.c:1.1 pspp/src/settings.c:1.2
--- pspp/src/settings.c:1.1 Sun Dec 11 02:48:45 2005
+++ pspp/src/settings.c Sun Dec 11 07:35:51 2005
@@ -20,6 +20,7 @@
#include <config.h>
#include "settings.h"
#include <assert.h>
+#include <stdlib.h>
#include <time.h>
#include "format.h"
#include "val.h"
@@ -77,8 +78,6 @@
CC_INITIALIZER,
};
-static gsl_rng *rng;
-
static bool testing_mode = false;
static int global_algorithm = ENHANCED;
@@ -92,9 +91,6 @@
void
done_settings (void)
{
- if (rng != NULL)
- gsl_rng_free (rng);
-
free (prompt);
free (cprompt);
free (dprompt);
@@ -494,7 +490,7 @@
/* Approximate maximum amount of memory to use for cases, in
bytes. */
size_t
-get_workspace(void)
+get_workspace (void)
{
return workspace;
}
@@ -538,26 +534,6 @@
{
assert (idx >= 0 && idx < CC_CNT);
cc[idx] = *cc_;
-}
-
-/* Returns the current random number generator. */
-gsl_rng *
-get_rng (void)
-{
- if (rng == NULL)
- set_rng (time (0));
- return rng;
-}
-
-/* Initializes or reinitializes the random number generator with
- the given SEED. */
-void
-set_rng (unsigned long seed)
-{
- rng = gsl_rng_alloc (gsl_rng_mt19937);
- if (rng == NULL)
- xalloc_die ();
- gsl_rng_set (rng, seed);
}
/* Are we in testing mode? (e.g. --testing-mode command line