diff options
author | Kevin Ryde <user42@zip.com.au> | 2002-09-24 02:19:54 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2002-09-24 02:19:54 +0200 |
commit | 92cf0836c07d28f52f709600241dd64d5304403d (patch) | |
tree | 8b1fa5a382c3f70a193f062d9ba6a4219a78fb41 /tests/rand | |
parent | 9c4f99b8891f826680c58b88392b3305f5828cb1 (diff) | |
download | gmp-92cf0836c07d28f52f709600241dd64d5304403d.tar.gz |
2002-09-24 Pedro Gimeno <pggimeno@wanadoo.es>
* tests/rand/gen.c: Get rid of gmp_errno.
Diffstat (limited to 'tests/rand')
-rw-r--r-- | tests/rand/gen.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/rand/gen.c b/tests/rand/gen.c index fa596bb4e..bc343b34e 100644 --- a/tests/rand/gen.c +++ b/tests/rand/gen.c @@ -117,6 +117,8 @@ int main (argc, argv) RNG_LC }; gmp_randalg_t ralg = RNG_MT; + /* Texts for the algorithms. The index of each must match the + corresponding algorithm in the enum above. */ char *ralg_str[] = { "mt", "lc" }; mpf_init (f_xf); @@ -296,17 +298,10 @@ int main (argc, argv) break; default: - gmp_errno = GMP_ERROR_UNSUPPORTED_ARGUMENT; - } - - if (gmp_errno != GMP_ERROR_NONE) - { - if (gmp_errno & GMP_ERROR_INVALID_ARGUMENT) - fprintf (stderr, "gen: asking for too big random state\n"); - if (gmp_errno & GMP_ERROR_UNSUPPORTED_ARGUMENT) - fprintf (stderr, "gen: unsupported algorithm\n"); + fprintf (stderr, "gen: unsupported algorithm\n"); exit (1); } + gmp_randseed (rstate, z_seed); break; |