diff options
author | Linus Nordberg <linus@nordberg.se> | 2000-04-01 16:00:06 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2000-04-01 16:00:06 +0200 |
commit | 85d25c7fe115730bcb1ef1a017a764acb15f51d4 (patch) | |
tree | dd4c7fb7d069c2c9018e8dd98a2ad3960f8d1075 /randsd.c | |
parent | 3513f4430fc55c130f48a5685c3599584eda158f (diff) | |
download | gmp-85d25c7fe115730bcb1ef1a017a764acb15f51d4.tar.gz |
New file.
Diffstat (limited to 'randsd.c')
-rw-r--r-- | randsd.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/randsd.c b/randsd.c new file mode 100644 index 000000000..7200833af --- /dev/null +++ b/randsd.c @@ -0,0 +1,37 @@ +/* gmp_rand_seed (state, seed) -- Set initial seed SEED in random + state STATE. + +Copyright (C) 2000 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Library General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public +License for more details. + +You should have received a copy of the GNU Library General Public License +along with the GNU MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. */ + +#include "gmp.h" +#include "gmp-impl.h" + +void +#if __STDC__ +gmp_rand_seed (gmp_rand_state s, + mpz_t seed) +#else +gmp_rand_seed (s, seed) + gmp_rand_state s; + mpz_t seed; +#endif +{ + mpz_set (s->seed, seed); +} |